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-05-13/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 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
497
498 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
499
500 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
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.HealthStatus != "" {
547 objectMap["healthStatus"] = afpi.HealthStatus
548 }
549 if afpi.LastBackupStatus != nil {
550 objectMap["lastBackupStatus"] = afpi.LastBackupStatus
551 }
552 if afpi.LastBackupTime != nil {
553 objectMap["lastBackupTime"] = afpi.LastBackupTime
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 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1379
1380 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1381
1382 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1383
1384 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1385 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
1386
1387 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1388
1389 WorkloadType DataSourceType `json:"workloadType,omitempty"`
1390
1391 ContainerName *string `json:"containerName,omitempty"`
1392
1393 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1394
1395 PolicyID *string `json:"policyId,omitempty"`
1396
1397 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
1398
1399 BackupSetName *string `json:"backupSetName,omitempty"`
1400
1401 CreateMode CreateMode `json:"createMode,omitempty"`
1402
1403 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
1404
1405 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
1406
1407 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
1408
1409 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
1410
1411 IsRehydrate *bool `json:"isRehydrate,omitempty"`
1412
1413 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
1414 }
1415
1416
1417 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
1418 aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines
1419 objectMap := make(map[string]interface{})
1420 if aisccvpi.FriendlyName != nil {
1421 objectMap["friendlyName"] = aisccvpi.FriendlyName
1422 }
1423 if aisccvpi.VirtualMachineID != nil {
1424 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
1425 }
1426 if aisccvpi.ProtectionStatus != nil {
1427 objectMap["protectionStatus"] = aisccvpi.ProtectionStatus
1428 }
1429 if aisccvpi.ProtectionState != "" {
1430 objectMap["protectionState"] = aisccvpi.ProtectionState
1431 }
1432 if aisccvpi.HealthStatus != "" {
1433 objectMap["healthStatus"] = aisccvpi.HealthStatus
1434 }
1435 if aisccvpi.HealthDetails != nil {
1436 objectMap["healthDetails"] = aisccvpi.HealthDetails
1437 }
1438 if aisccvpi.LastBackupStatus != nil {
1439 objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus
1440 }
1441 if aisccvpi.LastBackupTime != nil {
1442 objectMap["lastBackupTime"] = aisccvpi.LastBackupTime
1443 }
1444 if aisccvpi.ProtectedItemDataID != nil {
1445 objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID
1446 }
1447 if aisccvpi.ExtendedInfo != nil {
1448 objectMap["extendedInfo"] = aisccvpi.ExtendedInfo
1449 }
1450 if aisccvpi.ExtendedProperties != nil {
1451 objectMap["extendedProperties"] = aisccvpi.ExtendedProperties
1452 }
1453 if aisccvpi.BackupManagementType != "" {
1454 objectMap["backupManagementType"] = aisccvpi.BackupManagementType
1455 }
1456 if aisccvpi.WorkloadType != "" {
1457 objectMap["workloadType"] = aisccvpi.WorkloadType
1458 }
1459 if aisccvpi.ContainerName != nil {
1460 objectMap["containerName"] = aisccvpi.ContainerName
1461 }
1462 if aisccvpi.SourceResourceID != nil {
1463 objectMap["sourceResourceId"] = aisccvpi.SourceResourceID
1464 }
1465 if aisccvpi.PolicyID != nil {
1466 objectMap["policyId"] = aisccvpi.PolicyID
1467 }
1468 if aisccvpi.LastRecoveryPoint != nil {
1469 objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint
1470 }
1471 if aisccvpi.BackupSetName != nil {
1472 objectMap["backupSetName"] = aisccvpi.BackupSetName
1473 }
1474 if aisccvpi.CreateMode != "" {
1475 objectMap["createMode"] = aisccvpi.CreateMode
1476 }
1477 if aisccvpi.DeferredDeleteTimeInUTC != nil {
1478 objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC
1479 }
1480 if aisccvpi.IsScheduledForDeferredDelete != nil {
1481 objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete
1482 }
1483 if aisccvpi.DeferredDeleteTimeRemaining != nil {
1484 objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining
1485 }
1486 if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil {
1487 objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming
1488 }
1489 if aisccvpi.IsRehydrate != nil {
1490 objectMap["isRehydrate"] = aisccvpi.IsRehydrate
1491 }
1492 if aisccvpi.ProtectedItemType != "" {
1493 objectMap["protectedItemType"] = aisccvpi.ProtectedItemType
1494 }
1495 return json.Marshal(objectMap)
1496 }
1497
1498
1499 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
1500 return nil, false
1501 }
1502
1503
1504 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
1505 return &aisccvpi, true
1506 }
1507
1508
1509 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
1510 return nil, false
1511 }
1512
1513
1514 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
1515 return nil, false
1516 }
1517
1518
1519 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
1520 return &aisccvpi, true
1521 }
1522
1523
1524 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
1525 return nil, false
1526 }
1527
1528
1529 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
1530 return nil, false
1531 }
1532
1533
1534 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
1535 return nil, false
1536 }
1537
1538
1539 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
1540 return nil, false
1541 }
1542
1543
1544 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
1545 return nil, false
1546 }
1547
1548
1549 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
1550 return nil, false
1551 }
1552
1553
1554 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
1555 return nil, false
1556 }
1557
1558
1559 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
1560 return nil, false
1561 }
1562
1563
1564 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
1565 return nil, false
1566 }
1567
1568
1569 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
1570 return nil, false
1571 }
1572
1573
1574 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
1575 return &aisccvpi, true
1576 }
1577
1578
1579
1580 type AzureIaaSComputeVMContainer struct {
1581
1582 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1583
1584 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1585
1586 ResourceGroup *string `json:"resourceGroup,omitempty"`
1587
1588 FriendlyName *string `json:"friendlyName,omitempty"`
1589
1590 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1591
1592 RegistrationStatus *string `json:"registrationStatus,omitempty"`
1593
1594 HealthStatus *string `json:"healthStatus,omitempty"`
1595
1596 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
1597 }
1598
1599
1600 func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) {
1601 aiscvc.ContainerType = ContainerTypeMicrosoftComputevirtualMachines
1602 objectMap := make(map[string]interface{})
1603 if aiscvc.VirtualMachineID != nil {
1604 objectMap["virtualMachineId"] = aiscvc.VirtualMachineID
1605 }
1606 if aiscvc.VirtualMachineVersion != nil {
1607 objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion
1608 }
1609 if aiscvc.ResourceGroup != nil {
1610 objectMap["resourceGroup"] = aiscvc.ResourceGroup
1611 }
1612 if aiscvc.FriendlyName != nil {
1613 objectMap["friendlyName"] = aiscvc.FriendlyName
1614 }
1615 if aiscvc.BackupManagementType != "" {
1616 objectMap["backupManagementType"] = aiscvc.BackupManagementType
1617 }
1618 if aiscvc.RegistrationStatus != nil {
1619 objectMap["registrationStatus"] = aiscvc.RegistrationStatus
1620 }
1621 if aiscvc.HealthStatus != nil {
1622 objectMap["healthStatus"] = aiscvc.HealthStatus
1623 }
1624 if aiscvc.ContainerType != "" {
1625 objectMap["containerType"] = aiscvc.ContainerType
1626 }
1627 return json.Marshal(objectMap)
1628 }
1629
1630
1631 func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
1632 return nil, false
1633 }
1634
1635
1636 func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
1637 return nil, false
1638 }
1639
1640
1641 func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
1642 return &aiscvc, true
1643 }
1644
1645
1646 func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
1647 return nil, false
1648 }
1649
1650
1651 func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
1652 return nil, false
1653 }
1654
1655
1656 func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
1657 return nil, false
1658 }
1659
1660
1661 func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
1662 return nil, false
1663 }
1664
1665
1666 func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
1667 return nil, false
1668 }
1669
1670
1671 func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
1672 return nil, false
1673 }
1674
1675
1676 func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
1677 return nil, false
1678 }
1679
1680
1681 func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
1682 return nil, false
1683 }
1684
1685
1686 func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
1687 return nil, false
1688 }
1689
1690
1691 func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
1692 return nil, false
1693 }
1694
1695
1696 func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
1697 return &aiscvc, true
1698 }
1699
1700
1701 func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
1702 return nil, false
1703 }
1704
1705
1706 func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
1707 return nil, false
1708 }
1709
1710
1711 func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
1712 return &aiscvc, true
1713 }
1714
1715
1716
1717 type AzureIaaSComputeVMProtectableItem struct {
1718
1719 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1720
1721 BackupManagementType *string `json:"backupManagementType,omitempty"`
1722
1723 WorkloadType *string `json:"workloadType,omitempty"`
1724
1725 FriendlyName *string `json:"friendlyName,omitempty"`
1726
1727 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
1728
1729 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
1730 }
1731
1732
1733 func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
1734 aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines
1735 objectMap := make(map[string]interface{})
1736 if aiscvpi.VirtualMachineID != nil {
1737 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
1738 }
1739 if aiscvpi.BackupManagementType != nil {
1740 objectMap["backupManagementType"] = aiscvpi.BackupManagementType
1741 }
1742 if aiscvpi.WorkloadType != nil {
1743 objectMap["workloadType"] = aiscvpi.WorkloadType
1744 }
1745 if aiscvpi.FriendlyName != nil {
1746 objectMap["friendlyName"] = aiscvpi.FriendlyName
1747 }
1748 if aiscvpi.ProtectionState != "" {
1749 objectMap["protectionState"] = aiscvpi.ProtectionState
1750 }
1751 if aiscvpi.ProtectableItemType != "" {
1752 objectMap["protectableItemType"] = aiscvpi.ProtectableItemType
1753 }
1754 return json.Marshal(objectMap)
1755 }
1756
1757
1758 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
1759 return nil, false
1760 }
1761
1762
1763 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
1764 return nil, false
1765 }
1766
1767
1768 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
1769 return &aiscvpi, true
1770 }
1771
1772
1773 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
1774 return nil, false
1775 }
1776
1777
1778 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
1779 return nil, false
1780 }
1781
1782
1783 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
1784 return nil, false
1785 }
1786
1787
1788 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
1789 return nil, false
1790 }
1791
1792
1793 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
1794 return nil, false
1795 }
1796
1797
1798 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
1799 return nil, false
1800 }
1801
1802
1803 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
1804 return nil, false
1805 }
1806
1807
1808 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
1809 return nil, false
1810 }
1811
1812
1813 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
1814 return nil, false
1815 }
1816
1817
1818 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
1819 return &aiscvpi, true
1820 }
1821
1822
1823 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
1824 return nil, false
1825 }
1826
1827
1828 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
1829 return &aiscvpi, true
1830 }
1831
1832
1833
1834 type AzureIaaSComputeVMProtectedItem struct {
1835
1836 FriendlyName *string `json:"friendlyName,omitempty"`
1837
1838 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1839
1840 ProtectionStatus *string `json:"protectionStatus,omitempty"`
1841
1842 ProtectionState ProtectionState `json:"protectionState,omitempty"`
1843
1844 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
1845
1846 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
1847
1848 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1849
1850 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1851
1852 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1853
1854 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1855 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
1856
1857 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1858
1859 WorkloadType DataSourceType `json:"workloadType,omitempty"`
1860
1861 ContainerName *string `json:"containerName,omitempty"`
1862
1863 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1864
1865 PolicyID *string `json:"policyId,omitempty"`
1866
1867 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
1868
1869 BackupSetName *string `json:"backupSetName,omitempty"`
1870
1871 CreateMode CreateMode `json:"createMode,omitempty"`
1872
1873 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
1874
1875 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
1876
1877 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
1878
1879 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
1880
1881 IsRehydrate *bool `json:"isRehydrate,omitempty"`
1882
1883 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
1884 }
1885
1886
1887 func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
1888 aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines
1889 objectMap := make(map[string]interface{})
1890 if aiscvpi.FriendlyName != nil {
1891 objectMap["friendlyName"] = aiscvpi.FriendlyName
1892 }
1893 if aiscvpi.VirtualMachineID != nil {
1894 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
1895 }
1896 if aiscvpi.ProtectionStatus != nil {
1897 objectMap["protectionStatus"] = aiscvpi.ProtectionStatus
1898 }
1899 if aiscvpi.ProtectionState != "" {
1900 objectMap["protectionState"] = aiscvpi.ProtectionState
1901 }
1902 if aiscvpi.HealthStatus != "" {
1903 objectMap["healthStatus"] = aiscvpi.HealthStatus
1904 }
1905 if aiscvpi.HealthDetails != nil {
1906 objectMap["healthDetails"] = aiscvpi.HealthDetails
1907 }
1908 if aiscvpi.LastBackupStatus != nil {
1909 objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus
1910 }
1911 if aiscvpi.LastBackupTime != nil {
1912 objectMap["lastBackupTime"] = aiscvpi.LastBackupTime
1913 }
1914 if aiscvpi.ProtectedItemDataID != nil {
1915 objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID
1916 }
1917 if aiscvpi.ExtendedInfo != nil {
1918 objectMap["extendedInfo"] = aiscvpi.ExtendedInfo
1919 }
1920 if aiscvpi.ExtendedProperties != nil {
1921 objectMap["extendedProperties"] = aiscvpi.ExtendedProperties
1922 }
1923 if aiscvpi.BackupManagementType != "" {
1924 objectMap["backupManagementType"] = aiscvpi.BackupManagementType
1925 }
1926 if aiscvpi.WorkloadType != "" {
1927 objectMap["workloadType"] = aiscvpi.WorkloadType
1928 }
1929 if aiscvpi.ContainerName != nil {
1930 objectMap["containerName"] = aiscvpi.ContainerName
1931 }
1932 if aiscvpi.SourceResourceID != nil {
1933 objectMap["sourceResourceId"] = aiscvpi.SourceResourceID
1934 }
1935 if aiscvpi.PolicyID != nil {
1936 objectMap["policyId"] = aiscvpi.PolicyID
1937 }
1938 if aiscvpi.LastRecoveryPoint != nil {
1939 objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint
1940 }
1941 if aiscvpi.BackupSetName != nil {
1942 objectMap["backupSetName"] = aiscvpi.BackupSetName
1943 }
1944 if aiscvpi.CreateMode != "" {
1945 objectMap["createMode"] = aiscvpi.CreateMode
1946 }
1947 if aiscvpi.DeferredDeleteTimeInUTC != nil {
1948 objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC
1949 }
1950 if aiscvpi.IsScheduledForDeferredDelete != nil {
1951 objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete
1952 }
1953 if aiscvpi.DeferredDeleteTimeRemaining != nil {
1954 objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining
1955 }
1956 if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil {
1957 objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming
1958 }
1959 if aiscvpi.IsRehydrate != nil {
1960 objectMap["isRehydrate"] = aiscvpi.IsRehydrate
1961 }
1962 if aiscvpi.ProtectedItemType != "" {
1963 objectMap["protectedItemType"] = aiscvpi.ProtectedItemType
1964 }
1965 return json.Marshal(objectMap)
1966 }
1967
1968
1969 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
1970 return nil, false
1971 }
1972
1973
1974 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
1975 return nil, false
1976 }
1977
1978
1979 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
1980 return &aiscvpi, true
1981 }
1982
1983
1984 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
1985 return nil, false
1986 }
1987
1988
1989 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
1990 return &aiscvpi, true
1991 }
1992
1993
1994 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
1995 return nil, false
1996 }
1997
1998
1999 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2000 return nil, false
2001 }
2002
2003
2004 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2005 return nil, false
2006 }
2007
2008
2009 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2010 return nil, false
2011 }
2012
2013
2014 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2015 return nil, false
2016 }
2017
2018
2019 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2020 return nil, false
2021 }
2022
2023
2024 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2025 return nil, false
2026 }
2027
2028
2029 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2030 return nil, false
2031 }
2032
2033
2034 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2035 return nil, false
2036 }
2037
2038
2039 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2040 return nil, false
2041 }
2042
2043
2044 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2045 return &aiscvpi, true
2046 }
2047
2048
2049 type AzureIaaSVMErrorInfo struct {
2050
2051 ErrorCode *int32 `json:"errorCode,omitempty"`
2052
2053 ErrorTitle *string `json:"errorTitle,omitempty"`
2054
2055 ErrorString *string `json:"errorString,omitempty"`
2056
2057 Recommendations *[]string `json:"recommendations,omitempty"`
2058 }
2059
2060
2061 func (aisei AzureIaaSVMErrorInfo) MarshalJSON() ([]byte, error) {
2062 objectMap := make(map[string]interface{})
2063 return json.Marshal(objectMap)
2064 }
2065
2066
2067 type AzureIaaSVMHealthDetails struct {
2068
2069 Code *int32 `json:"code,omitempty"`
2070
2071 Title *string `json:"title,omitempty"`
2072
2073 Message *string `json:"message,omitempty"`
2074
2075 Recommendations *[]string `json:"recommendations,omitempty"`
2076 }
2077
2078
2079 func (aishd AzureIaaSVMHealthDetails) MarshalJSON() ([]byte, error) {
2080 objectMap := make(map[string]interface{})
2081 return json.Marshal(objectMap)
2082 }
2083
2084
2085 type AzureIaaSVMJob struct {
2086
2087 Duration *string `json:"duration,omitempty"`
2088
2089 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
2090
2091 ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"`
2092
2093 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
2094
2095 ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"`
2096
2097 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
2098
2099 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2100
2101 Operation *string `json:"operation,omitempty"`
2102
2103 Status *string `json:"status,omitempty"`
2104
2105 StartTime *date.Time `json:"startTime,omitempty"`
2106
2107 EndTime *date.Time `json:"endTime,omitempty"`
2108
2109 ActivityID *string `json:"activityId,omitempty"`
2110
2111 JobType JobType `json:"jobType,omitempty"`
2112 }
2113
2114
2115 func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) {
2116 aisj.JobType = JobTypeAzureIaaSVMJob
2117 objectMap := make(map[string]interface{})
2118 if aisj.Duration != nil {
2119 objectMap["duration"] = aisj.Duration
2120 }
2121 if aisj.ActionsInfo != nil {
2122 objectMap["actionsInfo"] = aisj.ActionsInfo
2123 }
2124 if aisj.ErrorDetails != nil {
2125 objectMap["errorDetails"] = aisj.ErrorDetails
2126 }
2127 if aisj.VirtualMachineVersion != nil {
2128 objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion
2129 }
2130 if aisj.ExtendedInfo != nil {
2131 objectMap["extendedInfo"] = aisj.ExtendedInfo
2132 }
2133 if aisj.EntityFriendlyName != nil {
2134 objectMap["entityFriendlyName"] = aisj.EntityFriendlyName
2135 }
2136 if aisj.BackupManagementType != "" {
2137 objectMap["backupManagementType"] = aisj.BackupManagementType
2138 }
2139 if aisj.Operation != nil {
2140 objectMap["operation"] = aisj.Operation
2141 }
2142 if aisj.Status != nil {
2143 objectMap["status"] = aisj.Status
2144 }
2145 if aisj.StartTime != nil {
2146 objectMap["startTime"] = aisj.StartTime
2147 }
2148 if aisj.EndTime != nil {
2149 objectMap["endTime"] = aisj.EndTime
2150 }
2151 if aisj.ActivityID != nil {
2152 objectMap["activityId"] = aisj.ActivityID
2153 }
2154 if aisj.JobType != "" {
2155 objectMap["jobType"] = aisj.JobType
2156 }
2157 return json.Marshal(objectMap)
2158 }
2159
2160
2161 func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
2162 return &aisj, true
2163 }
2164
2165
2166 func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
2167 return nil, false
2168 }
2169
2170
2171 func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
2172 return nil, false
2173 }
2174
2175
2176 func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) {
2177 return nil, false
2178 }
2179
2180
2181 func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) {
2182 return nil, false
2183 }
2184
2185
2186 func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) {
2187 return nil, false
2188 }
2189
2190
2191 func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) {
2192 return &aisj, true
2193 }
2194
2195
2196 type AzureIaaSVMJobExtendedInfo struct {
2197
2198 TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"`
2199
2200 PropertyBag map[string]*string `json:"propertyBag"`
2201
2202 InternalPropertyBag map[string]*string `json:"internalPropertyBag"`
2203
2204 ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2205
2206 EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"`
2207
2208 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
2209 }
2210
2211
2212 func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) {
2213 objectMap := make(map[string]interface{})
2214 if aisjei.TasksList != nil {
2215 objectMap["tasksList"] = aisjei.TasksList
2216 }
2217 if aisjei.PropertyBag != nil {
2218 objectMap["propertyBag"] = aisjei.PropertyBag
2219 }
2220 if aisjei.InternalPropertyBag != nil {
2221 objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag
2222 }
2223 if aisjei.ProgressPercentage != nil {
2224 objectMap["progressPercentage"] = aisjei.ProgressPercentage
2225 }
2226 if aisjei.EstimatedRemainingDuration != nil {
2227 objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration
2228 }
2229 if aisjei.DynamicErrorMessage != nil {
2230 objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage
2231 }
2232 return json.Marshal(objectMap)
2233 }
2234
2235
2236 type AzureIaaSVMJobTaskDetails struct {
2237
2238 TaskID *string `json:"taskId,omitempty"`
2239
2240 StartTime *date.Time `json:"startTime,omitempty"`
2241
2242 EndTime *date.Time `json:"endTime,omitempty"`
2243
2244 InstanceID *string `json:"instanceId,omitempty"`
2245
2246 Duration *string `json:"duration,omitempty"`
2247
2248 Status *string `json:"status,omitempty"`
2249
2250 ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2251
2252
2253 TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"`
2254 }
2255
2256
2257 type BasicAzureIaaSVMProtectedItem interface {
2258 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
2259 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
2260 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
2261 }
2262
2263
2264 type AzureIaaSVMProtectedItem struct {
2265
2266 FriendlyName *string `json:"friendlyName,omitempty"`
2267
2268 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
2269
2270 ProtectionStatus *string `json:"protectionStatus,omitempty"`
2271
2272 ProtectionState ProtectionState `json:"protectionState,omitempty"`
2273
2274 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
2275
2276 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
2277
2278 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
2279
2280 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
2281
2282 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
2283
2284 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
2285 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
2286
2287 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2288
2289 WorkloadType DataSourceType `json:"workloadType,omitempty"`
2290
2291 ContainerName *string `json:"containerName,omitempty"`
2292
2293 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2294
2295 PolicyID *string `json:"policyId,omitempty"`
2296
2297 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
2298
2299 BackupSetName *string `json:"backupSetName,omitempty"`
2300
2301 CreateMode CreateMode `json:"createMode,omitempty"`
2302
2303 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
2304
2305 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
2306
2307 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
2308
2309 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
2310
2311 IsRehydrate *bool `json:"isRehydrate,omitempty"`
2312
2313 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
2314 }
2315
2316 func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) {
2317 var m map[string]interface{}
2318 err := json.Unmarshal(body, &m)
2319 if err != nil {
2320 return nil, err
2321 }
2322
2323 switch m["protectedItemType"] {
2324 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
2325 var aisccvpi AzureIaaSClassicComputeVMProtectedItem
2326 err := json.Unmarshal(body, &aisccvpi)
2327 return aisccvpi, err
2328 case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
2329 var aiscvpi AzureIaaSComputeVMProtectedItem
2330 err := json.Unmarshal(body, &aiscvpi)
2331 return aiscvpi, err
2332 default:
2333 var aispi AzureIaaSVMProtectedItem
2334 err := json.Unmarshal(body, &aispi)
2335 return aispi, err
2336 }
2337 }
2338 func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) {
2339 var rawMessages []*json.RawMessage
2340 err := json.Unmarshal(body, &rawMessages)
2341 if err != nil {
2342 return nil, err
2343 }
2344
2345 aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages))
2346
2347 for index, rawMessage := range rawMessages {
2348 aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage)
2349 if err != nil {
2350 return nil, err
2351 }
2352 aispiArray[index] = aispi
2353 }
2354 return aispiArray, nil
2355 }
2356
2357
2358 func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) {
2359 aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem
2360 objectMap := make(map[string]interface{})
2361 if aispi.FriendlyName != nil {
2362 objectMap["friendlyName"] = aispi.FriendlyName
2363 }
2364 if aispi.VirtualMachineID != nil {
2365 objectMap["virtualMachineId"] = aispi.VirtualMachineID
2366 }
2367 if aispi.ProtectionStatus != nil {
2368 objectMap["protectionStatus"] = aispi.ProtectionStatus
2369 }
2370 if aispi.ProtectionState != "" {
2371 objectMap["protectionState"] = aispi.ProtectionState
2372 }
2373 if aispi.HealthStatus != "" {
2374 objectMap["healthStatus"] = aispi.HealthStatus
2375 }
2376 if aispi.HealthDetails != nil {
2377 objectMap["healthDetails"] = aispi.HealthDetails
2378 }
2379 if aispi.LastBackupStatus != nil {
2380 objectMap["lastBackupStatus"] = aispi.LastBackupStatus
2381 }
2382 if aispi.LastBackupTime != nil {
2383 objectMap["lastBackupTime"] = aispi.LastBackupTime
2384 }
2385 if aispi.ProtectedItemDataID != nil {
2386 objectMap["protectedItemDataId"] = aispi.ProtectedItemDataID
2387 }
2388 if aispi.ExtendedInfo != nil {
2389 objectMap["extendedInfo"] = aispi.ExtendedInfo
2390 }
2391 if aispi.ExtendedProperties != nil {
2392 objectMap["extendedProperties"] = aispi.ExtendedProperties
2393 }
2394 if aispi.BackupManagementType != "" {
2395 objectMap["backupManagementType"] = aispi.BackupManagementType
2396 }
2397 if aispi.WorkloadType != "" {
2398 objectMap["workloadType"] = aispi.WorkloadType
2399 }
2400 if aispi.ContainerName != nil {
2401 objectMap["containerName"] = aispi.ContainerName
2402 }
2403 if aispi.SourceResourceID != nil {
2404 objectMap["sourceResourceId"] = aispi.SourceResourceID
2405 }
2406 if aispi.PolicyID != nil {
2407 objectMap["policyId"] = aispi.PolicyID
2408 }
2409 if aispi.LastRecoveryPoint != nil {
2410 objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint
2411 }
2412 if aispi.BackupSetName != nil {
2413 objectMap["backupSetName"] = aispi.BackupSetName
2414 }
2415 if aispi.CreateMode != "" {
2416 objectMap["createMode"] = aispi.CreateMode
2417 }
2418 if aispi.DeferredDeleteTimeInUTC != nil {
2419 objectMap["deferredDeleteTimeInUTC"] = aispi.DeferredDeleteTimeInUTC
2420 }
2421 if aispi.IsScheduledForDeferredDelete != nil {
2422 objectMap["isScheduledForDeferredDelete"] = aispi.IsScheduledForDeferredDelete
2423 }
2424 if aispi.DeferredDeleteTimeRemaining != nil {
2425 objectMap["deferredDeleteTimeRemaining"] = aispi.DeferredDeleteTimeRemaining
2426 }
2427 if aispi.IsDeferredDeleteScheduleUpcoming != nil {
2428 objectMap["isDeferredDeleteScheduleUpcoming"] = aispi.IsDeferredDeleteScheduleUpcoming
2429 }
2430 if aispi.IsRehydrate != nil {
2431 objectMap["isRehydrate"] = aispi.IsRehydrate
2432 }
2433 if aispi.ProtectedItemType != "" {
2434 objectMap["protectedItemType"] = aispi.ProtectedItemType
2435 }
2436 return json.Marshal(objectMap)
2437 }
2438
2439
2440 func (aispi AzureIaaSVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
2441 return nil, false
2442 }
2443
2444
2445 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
2446 return nil, false
2447 }
2448
2449
2450 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
2451 return nil, false
2452 }
2453
2454
2455 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
2456 return &aispi, true
2457 }
2458
2459
2460 func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
2461 return &aispi, true
2462 }
2463
2464
2465 func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
2466 return nil, false
2467 }
2468
2469
2470 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2471 return nil, false
2472 }
2473
2474
2475 func (aispi AzureIaaSVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2476 return nil, false
2477 }
2478
2479
2480 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2481 return nil, false
2482 }
2483
2484
2485 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2486 return nil, false
2487 }
2488
2489
2490 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2491 return nil, false
2492 }
2493
2494
2495 func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2496 return nil, false
2497 }
2498
2499
2500 func (aispi AzureIaaSVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2501 return nil, false
2502 }
2503
2504
2505 func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2506 return nil, false
2507 }
2508
2509
2510 func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2511 return nil, false
2512 }
2513
2514
2515 func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2516 return &aispi, true
2517 }
2518
2519
2520 type AzureIaaSVMProtectedItemExtendedInfo struct {
2521
2522 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
2523
2524 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
2525
2526 PolicyInconsistent *bool `json:"policyInconsistent,omitempty"`
2527 }
2528
2529
2530 type AzureIaaSVMProtectionPolicy struct {
2531
2532 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
2533
2534 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
2535
2536 InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"`
2537
2538 TimeZone *string `json:"timeZone,omitempty"`
2539
2540 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
2541
2542 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
2543 }
2544
2545
2546 func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) {
2547 aispp.BackupManagementType = BackupManagementTypeAzureIaasVM
2548 objectMap := make(map[string]interface{})
2549 objectMap["schedulePolicy"] = aispp.SchedulePolicy
2550 objectMap["retentionPolicy"] = aispp.RetentionPolicy
2551 if aispp.InstantRpRetentionRangeInDays != nil {
2552 objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays
2553 }
2554 if aispp.TimeZone != nil {
2555 objectMap["timeZone"] = aispp.TimeZone
2556 }
2557 if aispp.ProtectedItemsCount != nil {
2558 objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount
2559 }
2560 if aispp.BackupManagementType != "" {
2561 objectMap["backupManagementType"] = aispp.BackupManagementType
2562 }
2563 return json.Marshal(objectMap)
2564 }
2565
2566
2567 func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
2568 return nil, false
2569 }
2570
2571
2572 func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
2573 return nil, false
2574 }
2575
2576
2577 func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
2578 return &aispp, true
2579 }
2580
2581
2582 func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
2583 return nil, false
2584 }
2585
2586
2587 func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
2588 return nil, false
2589 }
2590
2591
2592 func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
2593 return nil, false
2594 }
2595
2596
2597 func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
2598 return nil, false
2599 }
2600
2601
2602 func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
2603 return &aispp, true
2604 }
2605
2606
2607 func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error {
2608 var m map[string]*json.RawMessage
2609 err := json.Unmarshal(body, &m)
2610 if err != nil {
2611 return err
2612 }
2613 for k, v := range m {
2614 switch k {
2615 case "schedulePolicy":
2616 if v != nil {
2617 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
2618 if err != nil {
2619 return err
2620 }
2621 aispp.SchedulePolicy = schedulePolicy
2622 }
2623 case "retentionPolicy":
2624 if v != nil {
2625 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
2626 if err != nil {
2627 return err
2628 }
2629 aispp.RetentionPolicy = retentionPolicy
2630 }
2631 case "instantRpRetentionRangeInDays":
2632 if v != nil {
2633 var instantRpRetentionRangeInDays int32
2634 err = json.Unmarshal(*v, &instantRpRetentionRangeInDays)
2635 if err != nil {
2636 return err
2637 }
2638 aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays
2639 }
2640 case "timeZone":
2641 if v != nil {
2642 var timeZone string
2643 err = json.Unmarshal(*v, &timeZone)
2644 if err != nil {
2645 return err
2646 }
2647 aispp.TimeZone = &timeZone
2648 }
2649 case "protectedItemsCount":
2650 if v != nil {
2651 var protectedItemsCount int32
2652 err = json.Unmarshal(*v, &protectedItemsCount)
2653 if err != nil {
2654 return err
2655 }
2656 aispp.ProtectedItemsCount = &protectedItemsCount
2657 }
2658 case "backupManagementType":
2659 if v != nil {
2660 var backupManagementType ManagementTypeBasicProtectionPolicy
2661 err = json.Unmarshal(*v, &backupManagementType)
2662 if err != nil {
2663 return err
2664 }
2665 aispp.BackupManagementType = backupManagementType
2666 }
2667 }
2668 }
2669
2670 return nil
2671 }
2672
2673
2674 type BasicAzureRecoveryServiceVaultProtectionIntent interface {
2675 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
2676 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
2677 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
2678 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
2679 }
2680
2681
2682 type AzureRecoveryServiceVaultProtectionIntent struct {
2683
2684 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2685
2686 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2687
2688 ItemID *string `json:"itemId,omitempty"`
2689
2690 PolicyID *string `json:"policyId,omitempty"`
2691
2692 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
2693
2694 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
2695 }
2696
2697 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) {
2698 var m map[string]interface{}
2699 err := json.Unmarshal(body, &m)
2700 if err != nil {
2701 return nil, err
2702 }
2703
2704 switch m["protectionIntentItemType"] {
2705 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
2706 var awapi AzureWorkloadAutoProtectionIntent
2707 err := json.Unmarshal(body, &awapi)
2708 return awapi, err
2709 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
2710 var awsapi AzureWorkloadSQLAutoProtectionIntent
2711 err := json.Unmarshal(body, &awsapi)
2712 return awsapi, err
2713 default:
2714 var arsvpi AzureRecoveryServiceVaultProtectionIntent
2715 err := json.Unmarshal(body, &arsvpi)
2716 return arsvpi, err
2717 }
2718 }
2719 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) {
2720 var rawMessages []*json.RawMessage
2721 err := json.Unmarshal(body, &rawMessages)
2722 if err != nil {
2723 return nil, err
2724 }
2725
2726 arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages))
2727
2728 for index, rawMessage := range rawMessages {
2729 arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage)
2730 if err != nil {
2731 return nil, err
2732 }
2733 arsvpiArray[index] = arsvpi
2734 }
2735 return arsvpiArray, nil
2736 }
2737
2738
2739 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) {
2740 arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem
2741 objectMap := make(map[string]interface{})
2742 if arsvpi.BackupManagementType != "" {
2743 objectMap["backupManagementType"] = arsvpi.BackupManagementType
2744 }
2745 if arsvpi.SourceResourceID != nil {
2746 objectMap["sourceResourceId"] = arsvpi.SourceResourceID
2747 }
2748 if arsvpi.ItemID != nil {
2749 objectMap["itemId"] = arsvpi.ItemID
2750 }
2751 if arsvpi.PolicyID != nil {
2752 objectMap["policyId"] = arsvpi.PolicyID
2753 }
2754 if arsvpi.ProtectionState != "" {
2755 objectMap["protectionState"] = arsvpi.ProtectionState
2756 }
2757 if arsvpi.ProtectionIntentItemType != "" {
2758 objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType
2759 }
2760 return json.Marshal(objectMap)
2761 }
2762
2763
2764 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
2765 return &arsvpi, true
2766 }
2767
2768
2769 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
2770 return &arsvpi, true
2771 }
2772
2773
2774 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
2775 return nil, false
2776 }
2777
2778
2779 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
2780 return nil, false
2781 }
2782
2783
2784 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
2785 return nil, false
2786 }
2787
2788
2789 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
2790 return nil, false
2791 }
2792
2793
2794 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
2795 return nil, false
2796 }
2797
2798
2799 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
2800 return &arsvpi, true
2801 }
2802
2803
2804 type AzureResourceProtectionIntent struct {
2805
2806 FriendlyName *string `json:"friendlyName,omitempty"`
2807
2808 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2809
2810 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2811
2812 ItemID *string `json:"itemId,omitempty"`
2813
2814 PolicyID *string `json:"policyId,omitempty"`
2815
2816 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
2817
2818 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
2819 }
2820
2821
2822 func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) {
2823 arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem
2824 objectMap := make(map[string]interface{})
2825 if arpi.FriendlyName != nil {
2826 objectMap["friendlyName"] = arpi.FriendlyName
2827 }
2828 if arpi.BackupManagementType != "" {
2829 objectMap["backupManagementType"] = arpi.BackupManagementType
2830 }
2831 if arpi.SourceResourceID != nil {
2832 objectMap["sourceResourceId"] = arpi.SourceResourceID
2833 }
2834 if arpi.ItemID != nil {
2835 objectMap["itemId"] = arpi.ItemID
2836 }
2837 if arpi.PolicyID != nil {
2838 objectMap["policyId"] = arpi.PolicyID
2839 }
2840 if arpi.ProtectionState != "" {
2841 objectMap["protectionState"] = arpi.ProtectionState
2842 }
2843 if arpi.ProtectionIntentItemType != "" {
2844 objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType
2845 }
2846 return json.Marshal(objectMap)
2847 }
2848
2849
2850 func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
2851 return nil, false
2852 }
2853
2854
2855 func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
2856 return nil, false
2857 }
2858
2859
2860 func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
2861 return &arpi, true
2862 }
2863
2864
2865 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
2866 return nil, false
2867 }
2868
2869
2870 func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
2871 return nil, false
2872 }
2873
2874
2875 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
2876 return nil, false
2877 }
2878
2879
2880 func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
2881 return nil, false
2882 }
2883
2884
2885 func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
2886 return &arpi, true
2887 }
2888
2889
2890 type AzureSQLAGWorkloadContainerProtectionContainer struct {
2891
2892 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2893
2894 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
2895
2896 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
2897
2898 WorkloadType WorkloadType `json:"workloadType,omitempty"`
2899
2900 OperationType OperationType `json:"operationType,omitempty"`
2901
2902 FriendlyName *string `json:"friendlyName,omitempty"`
2903
2904 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2905
2906 RegistrationStatus *string `json:"registrationStatus,omitempty"`
2907
2908 HealthStatus *string `json:"healthStatus,omitempty"`
2909
2910 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
2911 }
2912
2913
2914 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) {
2915 aswcpc.ContainerType = ContainerTypeSQLAGWorkLoadContainer1
2916 objectMap := make(map[string]interface{})
2917 if aswcpc.SourceResourceID != nil {
2918 objectMap["sourceResourceId"] = aswcpc.SourceResourceID
2919 }
2920 if aswcpc.LastUpdatedTime != nil {
2921 objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime
2922 }
2923 if aswcpc.ExtendedInfo != nil {
2924 objectMap["extendedInfo"] = aswcpc.ExtendedInfo
2925 }
2926 if aswcpc.WorkloadType != "" {
2927 objectMap["workloadType"] = aswcpc.WorkloadType
2928 }
2929 if aswcpc.OperationType != "" {
2930 objectMap["operationType"] = aswcpc.OperationType
2931 }
2932 if aswcpc.FriendlyName != nil {
2933 objectMap["friendlyName"] = aswcpc.FriendlyName
2934 }
2935 if aswcpc.BackupManagementType != "" {
2936 objectMap["backupManagementType"] = aswcpc.BackupManagementType
2937 }
2938 if aswcpc.RegistrationStatus != nil {
2939 objectMap["registrationStatus"] = aswcpc.RegistrationStatus
2940 }
2941 if aswcpc.HealthStatus != nil {
2942 objectMap["healthStatus"] = aswcpc.HealthStatus
2943 }
2944 if aswcpc.ContainerType != "" {
2945 objectMap["containerType"] = aswcpc.ContainerType
2946 }
2947 return json.Marshal(objectMap)
2948 }
2949
2950
2951 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
2952 return nil, false
2953 }
2954
2955
2956 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
2957 return nil, false
2958 }
2959
2960
2961 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
2962 return nil, false
2963 }
2964
2965
2966 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
2967 return &aswcpc, true
2968 }
2969
2970
2971 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
2972 return nil, false
2973 }
2974
2975
2976 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
2977 return nil, false
2978 }
2979
2980
2981 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
2982 return nil, false
2983 }
2984
2985
2986 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
2987 return nil, false
2988 }
2989
2990
2991 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
2992 return &aswcpc, true
2993 }
2994
2995
2996 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
2997 return nil, false
2998 }
2999
3000
3001 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3002 return nil, false
3003 }
3004
3005
3006 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
3007 return nil, false
3008 }
3009
3010
3011 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3012 return nil, false
3013 }
3014
3015
3016 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3017 return nil, false
3018 }
3019
3020
3021 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
3022 return nil, false
3023 }
3024
3025
3026 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3027 return nil, false
3028 }
3029
3030
3031 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3032 return &aswcpc, true
3033 }
3034
3035
3036 type AzureSQLContainer struct {
3037
3038 FriendlyName *string `json:"friendlyName,omitempty"`
3039
3040 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3041
3042 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3043
3044 HealthStatus *string `json:"healthStatus,omitempty"`
3045
3046 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3047 }
3048
3049
3050 func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) {
3051 asc.ContainerType = ContainerTypeAzureSQLContainer1
3052 objectMap := make(map[string]interface{})
3053 if asc.FriendlyName != nil {
3054 objectMap["friendlyName"] = asc.FriendlyName
3055 }
3056 if asc.BackupManagementType != "" {
3057 objectMap["backupManagementType"] = asc.BackupManagementType
3058 }
3059 if asc.RegistrationStatus != nil {
3060 objectMap["registrationStatus"] = asc.RegistrationStatus
3061 }
3062 if asc.HealthStatus != nil {
3063 objectMap["healthStatus"] = asc.HealthStatus
3064 }
3065 if asc.ContainerType != "" {
3066 objectMap["containerType"] = asc.ContainerType
3067 }
3068 return json.Marshal(objectMap)
3069 }
3070
3071
3072 func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3073 return nil, false
3074 }
3075
3076
3077 func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3078 return nil, false
3079 }
3080
3081
3082 func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3083 return nil, false
3084 }
3085
3086
3087 func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3088 return nil, false
3089 }
3090
3091
3092 func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3093 return &asc, true
3094 }
3095
3096
3097 func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3098 return nil, false
3099 }
3100
3101
3102 func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3103 return nil, false
3104 }
3105
3106
3107 func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3108 return nil, false
3109 }
3110
3111
3112 func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3113 return nil, false
3114 }
3115
3116
3117 func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) {
3118 return nil, false
3119 }
3120
3121
3122 func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3123 return nil, false
3124 }
3125
3126
3127 func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) {
3128 return nil, false
3129 }
3130
3131
3132 func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3133 return nil, false
3134 }
3135
3136
3137 func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3138 return nil, false
3139 }
3140
3141
3142 func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) {
3143 return nil, false
3144 }
3145
3146
3147 func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3148 return nil, false
3149 }
3150
3151
3152 func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3153 return &asc, true
3154 }
3155
3156
3157 type AzureSQLProtectedItem struct {
3158
3159 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
3160
3161 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
3162
3163 ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
3164
3165 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3166
3167 WorkloadType DataSourceType `json:"workloadType,omitempty"`
3168
3169 ContainerName *string `json:"containerName,omitempty"`
3170
3171 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3172
3173 PolicyID *string `json:"policyId,omitempty"`
3174
3175 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
3176
3177 BackupSetName *string `json:"backupSetName,omitempty"`
3178
3179 CreateMode CreateMode `json:"createMode,omitempty"`
3180
3181 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
3182
3183 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
3184
3185 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
3186
3187 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
3188
3189 IsRehydrate *bool `json:"isRehydrate,omitempty"`
3190
3191 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
3192 }
3193
3194
3195 func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) {
3196 aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases
3197 objectMap := make(map[string]interface{})
3198 if aspi.ProtectedItemDataID != nil {
3199 objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID
3200 }
3201 if aspi.ProtectionState != "" {
3202 objectMap["protectionState"] = aspi.ProtectionState
3203 }
3204 if aspi.ExtendedInfo != nil {
3205 objectMap["extendedInfo"] = aspi.ExtendedInfo
3206 }
3207 if aspi.BackupManagementType != "" {
3208 objectMap["backupManagementType"] = aspi.BackupManagementType
3209 }
3210 if aspi.WorkloadType != "" {
3211 objectMap["workloadType"] = aspi.WorkloadType
3212 }
3213 if aspi.ContainerName != nil {
3214 objectMap["containerName"] = aspi.ContainerName
3215 }
3216 if aspi.SourceResourceID != nil {
3217 objectMap["sourceResourceId"] = aspi.SourceResourceID
3218 }
3219 if aspi.PolicyID != nil {
3220 objectMap["policyId"] = aspi.PolicyID
3221 }
3222 if aspi.LastRecoveryPoint != nil {
3223 objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint
3224 }
3225 if aspi.BackupSetName != nil {
3226 objectMap["backupSetName"] = aspi.BackupSetName
3227 }
3228 if aspi.CreateMode != "" {
3229 objectMap["createMode"] = aspi.CreateMode
3230 }
3231 if aspi.DeferredDeleteTimeInUTC != nil {
3232 objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC
3233 }
3234 if aspi.IsScheduledForDeferredDelete != nil {
3235 objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete
3236 }
3237 if aspi.DeferredDeleteTimeRemaining != nil {
3238 objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining
3239 }
3240 if aspi.IsDeferredDeleteScheduleUpcoming != nil {
3241 objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming
3242 }
3243 if aspi.IsRehydrate != nil {
3244 objectMap["isRehydrate"] = aspi.IsRehydrate
3245 }
3246 if aspi.ProtectedItemType != "" {
3247 objectMap["protectedItemType"] = aspi.ProtectedItemType
3248 }
3249 return json.Marshal(objectMap)
3250 }
3251
3252
3253 func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
3254 return nil, false
3255 }
3256
3257
3258 func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
3259 return nil, false
3260 }
3261
3262
3263 func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
3264 return nil, false
3265 }
3266
3267
3268 func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
3269 return nil, false
3270 }
3271
3272
3273 func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
3274 return nil, false
3275 }
3276
3277
3278 func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
3279 return &aspi, true
3280 }
3281
3282
3283 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
3284 return nil, false
3285 }
3286
3287
3288 func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
3289 return nil, false
3290 }
3291
3292
3293 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
3294 return nil, false
3295 }
3296
3297
3298 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
3299 return nil, false
3300 }
3301
3302
3303 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
3304 return nil, false
3305 }
3306
3307
3308 func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
3309 return nil, false
3310 }
3311
3312
3313 func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
3314 return nil, false
3315 }
3316
3317
3318 func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
3319 return nil, false
3320 }
3321
3322
3323 func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
3324 return nil, false
3325 }
3326
3327
3328 func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
3329 return &aspi, true
3330 }
3331
3332
3333 type AzureSQLProtectedItemExtendedInfo struct {
3334
3335 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
3336
3337 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
3338
3339 PolicyState *string `json:"policyState,omitempty"`
3340 }
3341
3342
3343 type AzureSQLProtectionPolicy struct {
3344
3345 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
3346
3347 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
3348
3349 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
3350 }
3351
3352
3353 func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) {
3354 aspp.BackupManagementType = BackupManagementTypeAzureSQL
3355 objectMap := make(map[string]interface{})
3356 objectMap["retentionPolicy"] = aspp.RetentionPolicy
3357 if aspp.ProtectedItemsCount != nil {
3358 objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount
3359 }
3360 if aspp.BackupManagementType != "" {
3361 objectMap["backupManagementType"] = aspp.BackupManagementType
3362 }
3363 return json.Marshal(objectMap)
3364 }
3365
3366
3367 func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
3368 return nil, false
3369 }
3370
3371
3372 func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
3373 return nil, false
3374 }
3375
3376
3377 func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
3378 return nil, false
3379 }
3380
3381
3382 func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
3383 return &aspp, true
3384 }
3385
3386
3387 func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
3388 return nil, false
3389 }
3390
3391
3392 func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
3393 return nil, false
3394 }
3395
3396
3397 func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
3398 return nil, false
3399 }
3400
3401
3402 func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
3403 return &aspp, true
3404 }
3405
3406
3407 func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error {
3408 var m map[string]*json.RawMessage
3409 err := json.Unmarshal(body, &m)
3410 if err != nil {
3411 return err
3412 }
3413 for k, v := range m {
3414 switch k {
3415 case "retentionPolicy":
3416 if v != nil {
3417 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
3418 if err != nil {
3419 return err
3420 }
3421 aspp.RetentionPolicy = retentionPolicy
3422 }
3423 case "protectedItemsCount":
3424 if v != nil {
3425 var protectedItemsCount int32
3426 err = json.Unmarshal(*v, &protectedItemsCount)
3427 if err != nil {
3428 return err
3429 }
3430 aspp.ProtectedItemsCount = &protectedItemsCount
3431 }
3432 case "backupManagementType":
3433 if v != nil {
3434 var backupManagementType ManagementTypeBasicProtectionPolicy
3435 err = json.Unmarshal(*v, &backupManagementType)
3436 if err != nil {
3437 return err
3438 }
3439 aspp.BackupManagementType = backupManagementType
3440 }
3441 }
3442 }
3443
3444 return nil
3445 }
3446
3447
3448 type AzureStorageContainer struct {
3449
3450 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3451
3452 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3453
3454 ResourceGroup *string `json:"resourceGroup,omitempty"`
3455
3456 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
3457
3458 FriendlyName *string `json:"friendlyName,omitempty"`
3459
3460 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3461
3462 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3463
3464 HealthStatus *string `json:"healthStatus,omitempty"`
3465
3466 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3467 }
3468
3469
3470 func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) {
3471 asc.ContainerType = ContainerTypeStorageContainer1
3472 objectMap := make(map[string]interface{})
3473 if asc.SourceResourceID != nil {
3474 objectMap["sourceResourceId"] = asc.SourceResourceID
3475 }
3476 if asc.StorageAccountVersion != nil {
3477 objectMap["storageAccountVersion"] = asc.StorageAccountVersion
3478 }
3479 if asc.ResourceGroup != nil {
3480 objectMap["resourceGroup"] = asc.ResourceGroup
3481 }
3482 if asc.ProtectedItemCount != nil {
3483 objectMap["protectedItemCount"] = asc.ProtectedItemCount
3484 }
3485 if asc.FriendlyName != nil {
3486 objectMap["friendlyName"] = asc.FriendlyName
3487 }
3488 if asc.BackupManagementType != "" {
3489 objectMap["backupManagementType"] = asc.BackupManagementType
3490 }
3491 if asc.RegistrationStatus != nil {
3492 objectMap["registrationStatus"] = asc.RegistrationStatus
3493 }
3494 if asc.HealthStatus != nil {
3495 objectMap["healthStatus"] = asc.HealthStatus
3496 }
3497 if asc.ContainerType != "" {
3498 objectMap["containerType"] = asc.ContainerType
3499 }
3500 return json.Marshal(objectMap)
3501 }
3502
3503
3504 func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3505 return nil, false
3506 }
3507
3508
3509 func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3510 return nil, false
3511 }
3512
3513
3514 func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3515 return nil, false
3516 }
3517
3518
3519 func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3520 return nil, false
3521 }
3522
3523
3524 func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3525 return nil, false
3526 }
3527
3528
3529 func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3530 return &asc, true
3531 }
3532
3533
3534 func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3535 return nil, false
3536 }
3537
3538
3539 func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3540 return nil, false
3541 }
3542
3543
3544 func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3545 return nil, false
3546 }
3547
3548
3549 func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) {
3550 return nil, false
3551 }
3552
3553
3554 func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3555 return nil, false
3556 }
3557
3558
3559 func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) {
3560 return nil, false
3561 }
3562
3563
3564 func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3565 return nil, false
3566 }
3567
3568
3569 func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3570 return nil, false
3571 }
3572
3573
3574 func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) {
3575 return nil, false
3576 }
3577
3578
3579 func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3580 return nil, false
3581 }
3582
3583
3584 func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3585 return &asc, true
3586 }
3587
3588
3589 type AzureStorageErrorInfo struct {
3590
3591 ErrorCode *int32 `json:"errorCode,omitempty"`
3592
3593 ErrorString *string `json:"errorString,omitempty"`
3594
3595 Recommendations *[]string `json:"recommendations,omitempty"`
3596 }
3597
3598
3599 type AzureStorageJob struct {
3600
3601 Duration *string `json:"duration,omitempty"`
3602
3603 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
3604
3605 ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"`
3606
3607 StorageAccountName *string `json:"storageAccountName,omitempty"`
3608
3609 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3610
3611 ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"`
3612
3613 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
3614
3615 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3616
3617 Operation *string `json:"operation,omitempty"`
3618
3619 Status *string `json:"status,omitempty"`
3620
3621 StartTime *date.Time `json:"startTime,omitempty"`
3622
3623 EndTime *date.Time `json:"endTime,omitempty"`
3624
3625 ActivityID *string `json:"activityId,omitempty"`
3626
3627 JobType JobType `json:"jobType,omitempty"`
3628 }
3629
3630
3631 func (asj AzureStorageJob) MarshalJSON() ([]byte, error) {
3632 asj.JobType = JobTypeAzureStorageJob
3633 objectMap := make(map[string]interface{})
3634 if asj.Duration != nil {
3635 objectMap["duration"] = asj.Duration
3636 }
3637 if asj.ActionsInfo != nil {
3638 objectMap["actionsInfo"] = asj.ActionsInfo
3639 }
3640 if asj.ErrorDetails != nil {
3641 objectMap["errorDetails"] = asj.ErrorDetails
3642 }
3643 if asj.StorageAccountName != nil {
3644 objectMap["storageAccountName"] = asj.StorageAccountName
3645 }
3646 if asj.StorageAccountVersion != nil {
3647 objectMap["storageAccountVersion"] = asj.StorageAccountVersion
3648 }
3649 if asj.ExtendedInfo != nil {
3650 objectMap["extendedInfo"] = asj.ExtendedInfo
3651 }
3652 if asj.EntityFriendlyName != nil {
3653 objectMap["entityFriendlyName"] = asj.EntityFriendlyName
3654 }
3655 if asj.BackupManagementType != "" {
3656 objectMap["backupManagementType"] = asj.BackupManagementType
3657 }
3658 if asj.Operation != nil {
3659 objectMap["operation"] = asj.Operation
3660 }
3661 if asj.Status != nil {
3662 objectMap["status"] = asj.Status
3663 }
3664 if asj.StartTime != nil {
3665 objectMap["startTime"] = asj.StartTime
3666 }
3667 if asj.EndTime != nil {
3668 objectMap["endTime"] = asj.EndTime
3669 }
3670 if asj.ActivityID != nil {
3671 objectMap["activityId"] = asj.ActivityID
3672 }
3673 if asj.JobType != "" {
3674 objectMap["jobType"] = asj.JobType
3675 }
3676 return json.Marshal(objectMap)
3677 }
3678
3679
3680 func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
3681 return nil, false
3682 }
3683
3684
3685 func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
3686 return &asj, true
3687 }
3688
3689
3690 func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
3691 return nil, false
3692 }
3693
3694
3695 func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) {
3696 return nil, false
3697 }
3698
3699
3700 func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) {
3701 return nil, false
3702 }
3703
3704
3705 func (asj AzureStorageJob) AsJob() (*Job, bool) {
3706 return nil, false
3707 }
3708
3709
3710 func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) {
3711 return &asj, true
3712 }
3713
3714
3715 type AzureStorageJobExtendedInfo struct {
3716
3717 TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"`
3718
3719 PropertyBag map[string]*string `json:"propertyBag"`
3720
3721 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
3722 }
3723
3724
3725 func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) {
3726 objectMap := make(map[string]interface{})
3727 if asjei.TasksList != nil {
3728 objectMap["tasksList"] = asjei.TasksList
3729 }
3730 if asjei.PropertyBag != nil {
3731 objectMap["propertyBag"] = asjei.PropertyBag
3732 }
3733 if asjei.DynamicErrorMessage != nil {
3734 objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage
3735 }
3736 return json.Marshal(objectMap)
3737 }
3738
3739
3740 type AzureStorageJobTaskDetails struct {
3741
3742 TaskID *string `json:"taskId,omitempty"`
3743
3744 Status *string `json:"status,omitempty"`
3745 }
3746
3747
3748 type AzureStorageProtectableContainer struct {
3749
3750 FriendlyName *string `json:"friendlyName,omitempty"`
3751
3752 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3753
3754 HealthStatus *string `json:"healthStatus,omitempty"`
3755
3756 ContainerID *string `json:"containerId,omitempty"`
3757
3758 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
3759 }
3760
3761
3762 func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) {
3763 aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer
3764 objectMap := make(map[string]interface{})
3765 if aspc.FriendlyName != nil {
3766 objectMap["friendlyName"] = aspc.FriendlyName
3767 }
3768 if aspc.BackupManagementType != "" {
3769 objectMap["backupManagementType"] = aspc.BackupManagementType
3770 }
3771 if aspc.HealthStatus != nil {
3772 objectMap["healthStatus"] = aspc.HealthStatus
3773 }
3774 if aspc.ContainerID != nil {
3775 objectMap["containerId"] = aspc.ContainerID
3776 }
3777 if aspc.ProtectableContainerType != "" {
3778 objectMap["protectableContainerType"] = aspc.ProtectableContainerType
3779 }
3780 return json.Marshal(objectMap)
3781 }
3782
3783
3784 func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
3785 return &aspc, true
3786 }
3787
3788
3789 func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
3790 return nil, false
3791 }
3792
3793
3794 func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
3795 return nil, false
3796 }
3797
3798
3799 func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
3800 return &aspc, true
3801 }
3802
3803
3804 type AzureVMAppContainerProtectableContainer struct {
3805
3806 FriendlyName *string `json:"friendlyName,omitempty"`
3807
3808 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3809
3810 HealthStatus *string `json:"healthStatus,omitempty"`
3811
3812 ContainerID *string `json:"containerId,omitempty"`
3813
3814 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
3815 }
3816
3817
3818 func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) {
3819 avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer
3820 objectMap := make(map[string]interface{})
3821 if avacpc.FriendlyName != nil {
3822 objectMap["friendlyName"] = avacpc.FriendlyName
3823 }
3824 if avacpc.BackupManagementType != "" {
3825 objectMap["backupManagementType"] = avacpc.BackupManagementType
3826 }
3827 if avacpc.HealthStatus != nil {
3828 objectMap["healthStatus"] = avacpc.HealthStatus
3829 }
3830 if avacpc.ContainerID != nil {
3831 objectMap["containerId"] = avacpc.ContainerID
3832 }
3833 if avacpc.ProtectableContainerType != "" {
3834 objectMap["protectableContainerType"] = avacpc.ProtectableContainerType
3835 }
3836 return json.Marshal(objectMap)
3837 }
3838
3839
3840 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
3841 return nil, false
3842 }
3843
3844
3845 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
3846 return &avacpc, true
3847 }
3848
3849
3850 func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
3851 return nil, false
3852 }
3853
3854
3855 func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
3856 return &avacpc, true
3857 }
3858
3859
3860 type AzureVMAppContainerProtectionContainer struct {
3861
3862 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3863
3864 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
3865
3866 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
3867
3868 WorkloadType WorkloadType `json:"workloadType,omitempty"`
3869
3870 OperationType OperationType `json:"operationType,omitempty"`
3871
3872 FriendlyName *string `json:"friendlyName,omitempty"`
3873
3874 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3875
3876 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3877
3878 HealthStatus *string `json:"healthStatus,omitempty"`
3879
3880 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3881 }
3882
3883
3884 func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) {
3885 avacpc.ContainerType = ContainerTypeVMAppContainer1
3886 objectMap := make(map[string]interface{})
3887 if avacpc.SourceResourceID != nil {
3888 objectMap["sourceResourceId"] = avacpc.SourceResourceID
3889 }
3890 if avacpc.LastUpdatedTime != nil {
3891 objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime
3892 }
3893 if avacpc.ExtendedInfo != nil {
3894 objectMap["extendedInfo"] = avacpc.ExtendedInfo
3895 }
3896 if avacpc.WorkloadType != "" {
3897 objectMap["workloadType"] = avacpc.WorkloadType
3898 }
3899 if avacpc.OperationType != "" {
3900 objectMap["operationType"] = avacpc.OperationType
3901 }
3902 if avacpc.FriendlyName != nil {
3903 objectMap["friendlyName"] = avacpc.FriendlyName
3904 }
3905 if avacpc.BackupManagementType != "" {
3906 objectMap["backupManagementType"] = avacpc.BackupManagementType
3907 }
3908 if avacpc.RegistrationStatus != nil {
3909 objectMap["registrationStatus"] = avacpc.RegistrationStatus
3910 }
3911 if avacpc.HealthStatus != nil {
3912 objectMap["healthStatus"] = avacpc.HealthStatus
3913 }
3914 if avacpc.ContainerType != "" {
3915 objectMap["containerType"] = avacpc.ContainerType
3916 }
3917 return json.Marshal(objectMap)
3918 }
3919
3920
3921 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3922 return nil, false
3923 }
3924
3925
3926 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3927 return nil, false
3928 }
3929
3930
3931 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3932 return nil, false
3933 }
3934
3935
3936 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3937 return nil, false
3938 }
3939
3940
3941 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3942 return nil, false
3943 }
3944
3945
3946 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3947 return nil, false
3948 }
3949
3950
3951 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3952 return &avacpc, true
3953 }
3954
3955
3956 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3957 return nil, false
3958 }
3959
3960
3961 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3962 return &avacpc, true
3963 }
3964
3965
3966 func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
3967 return nil, false
3968 }
3969
3970
3971 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3972 return nil, false
3973 }
3974
3975
3976 func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
3977 return nil, false
3978 }
3979
3980
3981 func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3982 return nil, false
3983 }
3984
3985
3986 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3987 return nil, false
3988 }
3989
3990
3991 func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
3992 return nil, false
3993 }
3994
3995
3996 func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3997 return nil, false
3998 }
3999
4000
4001 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
4002 return &avacpc, true
4003 }
4004
4005
4006 type AzureVMResourceFeatureSupportRequest struct {
4007
4008 VMSize *string `json:"vmSize,omitempty"`
4009
4010 VMSku *string `json:"vmSku,omitempty"`
4011
4012 FeatureType FeatureType `json:"featureType,omitempty"`
4013 }
4014
4015
4016 func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) {
4017 avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup
4018 objectMap := make(map[string]interface{})
4019 if avrfsr.VMSize != nil {
4020 objectMap["vmSize"] = avrfsr.VMSize
4021 }
4022 if avrfsr.VMSku != nil {
4023 objectMap["vmSku"] = avrfsr.VMSku
4024 }
4025 if avrfsr.FeatureType != "" {
4026 objectMap["featureType"] = avrfsr.FeatureType
4027 }
4028 return json.Marshal(objectMap)
4029 }
4030
4031
4032 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
4033 return nil, false
4034 }
4035
4036
4037 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
4038 return &avrfsr, true
4039 }
4040
4041
4042 func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
4043 return nil, false
4044 }
4045
4046
4047 func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
4048 return &avrfsr, true
4049 }
4050
4051
4052 type AzureVMResourceFeatureSupportResponse struct {
4053 autorest.Response `json:"-"`
4054
4055 SupportStatus SupportStatus `json:"supportStatus,omitempty"`
4056 }
4057
4058
4059 type BasicAzureVMWorkloadItem interface {
4060 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
4061 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
4062 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
4063 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
4064 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
4065 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
4066 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
4067 }
4068
4069
4070 type AzureVMWorkloadItem struct {
4071
4072 ParentName *string `json:"parentName,omitempty"`
4073
4074 ServerName *string `json:"serverName,omitempty"`
4075
4076 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4077
4078 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4079
4080 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
4081
4082 BackupManagementType *string `json:"backupManagementType,omitempty"`
4083
4084 WorkloadType *string `json:"workloadType,omitempty"`
4085
4086 FriendlyName *string `json:"friendlyName,omitempty"`
4087
4088 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4089
4090 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
4091 }
4092
4093 func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) {
4094 var m map[string]interface{}
4095 err := json.Unmarshal(body, &m)
4096 if err != nil {
4097 return nil, err
4098 }
4099
4100 switch m["workloadItemType"] {
4101 case string(WorkloadItemTypeSAPAseDatabase1):
4102 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
4103 err := json.Unmarshal(body, &avwsadwi)
4104 return avwsadwi, err
4105 case string(WorkloadItemTypeSAPAseSystem1):
4106 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
4107 err := json.Unmarshal(body, &avwsaswi)
4108 return avwsaswi, err
4109 case string(WorkloadItemTypeSAPHanaDatabase1):
4110 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
4111 err := json.Unmarshal(body, &avwshdwi)
4112 return avwshdwi, err
4113 case string(WorkloadItemTypeSAPHanaSystem1):
4114 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
4115 err := json.Unmarshal(body, &avwshswi)
4116 return avwshswi, err
4117 case string(WorkloadItemTypeSQLDataBase1):
4118 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
4119 err := json.Unmarshal(body, &avwsdwi)
4120 return avwsdwi, err
4121 case string(WorkloadItemTypeSQLInstance1):
4122 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
4123 err := json.Unmarshal(body, &avwsiwi)
4124 return avwsiwi, err
4125 default:
4126 var avwi AzureVMWorkloadItem
4127 err := json.Unmarshal(body, &avwi)
4128 return avwi, err
4129 }
4130 }
4131 func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) {
4132 var rawMessages []*json.RawMessage
4133 err := json.Unmarshal(body, &rawMessages)
4134 if err != nil {
4135 return nil, err
4136 }
4137
4138 avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages))
4139
4140 for index, rawMessage := range rawMessages {
4141 avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage)
4142 if err != nil {
4143 return nil, err
4144 }
4145 avwiArray[index] = avwi
4146 }
4147 return avwiArray, nil
4148 }
4149
4150
4151 func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) {
4152 avwi.WorkloadItemType = WorkloadItemTypeAzureVMWorkloadItem
4153 objectMap := make(map[string]interface{})
4154 if avwi.ParentName != nil {
4155 objectMap["parentName"] = avwi.ParentName
4156 }
4157 if avwi.ServerName != nil {
4158 objectMap["serverName"] = avwi.ServerName
4159 }
4160 if avwi.IsAutoProtectable != nil {
4161 objectMap["isAutoProtectable"] = avwi.IsAutoProtectable
4162 }
4163 if avwi.Subinquireditemcount != nil {
4164 objectMap["subinquireditemcount"] = avwi.Subinquireditemcount
4165 }
4166 if avwi.SubWorkloadItemCount != nil {
4167 objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount
4168 }
4169 if avwi.BackupManagementType != nil {
4170 objectMap["backupManagementType"] = avwi.BackupManagementType
4171 }
4172 if avwi.WorkloadType != nil {
4173 objectMap["workloadType"] = avwi.WorkloadType
4174 }
4175 if avwi.FriendlyName != nil {
4176 objectMap["friendlyName"] = avwi.FriendlyName
4177 }
4178 if avwi.ProtectionState != "" {
4179 objectMap["protectionState"] = avwi.ProtectionState
4180 }
4181 if avwi.WorkloadItemType != "" {
4182 objectMap["workloadItemType"] = avwi.WorkloadItemType
4183 }
4184 return json.Marshal(objectMap)
4185 }
4186
4187
4188 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
4189 return &avwi, true
4190 }
4191
4192
4193 func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
4194 return &avwi, true
4195 }
4196
4197
4198 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
4199 return nil, false
4200 }
4201
4202
4203 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
4204 return nil, false
4205 }
4206
4207
4208 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
4209 return nil, false
4210 }
4211
4212
4213 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
4214 return nil, false
4215 }
4216
4217
4218 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
4219 return nil, false
4220 }
4221
4222
4223 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
4224 return nil, false
4225 }
4226
4227
4228 func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
4229 return nil, false
4230 }
4231
4232
4233 func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
4234 return &avwi, true
4235 }
4236
4237
4238 type BasicAzureVMWorkloadProtectableItem interface {
4239 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
4240 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
4241 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
4242 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
4243 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
4244 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
4245 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
4246 }
4247
4248
4249 type AzureVMWorkloadProtectableItem struct {
4250
4251 ParentName *string `json:"parentName,omitempty"`
4252
4253
4254 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
4255
4256 ServerName *string `json:"serverName,omitempty"`
4257
4258 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4259
4260 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
4261
4262 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4263
4264 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
4265
4266 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
4267
4268 BackupManagementType *string `json:"backupManagementType,omitempty"`
4269
4270 WorkloadType *string `json:"workloadType,omitempty"`
4271
4272 FriendlyName *string `json:"friendlyName,omitempty"`
4273
4274 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4275
4276 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
4277 }
4278
4279 func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) {
4280 var m map[string]interface{}
4281 err := json.Unmarshal(body, &m)
4282 if err != nil {
4283 return nil, err
4284 }
4285
4286 switch m["protectableItemType"] {
4287 case string(ProtectableItemTypeSAPAseSystem):
4288 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
4289 err := json.Unmarshal(body, &avwsaspi)
4290 return avwsaspi, err
4291 case string(ProtectableItemTypeSAPHanaDatabase):
4292 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
4293 err := json.Unmarshal(body, &avwshdpi)
4294 return avwshdpi, err
4295 case string(ProtectableItemTypeSAPHanaSystem):
4296 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
4297 err := json.Unmarshal(body, &avwshspi)
4298 return avwshspi, err
4299 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
4300 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
4301 err := json.Unmarshal(body, &avwsagpi)
4302 return avwsagpi, err
4303 case string(ProtectableItemTypeSQLDataBase):
4304 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
4305 err := json.Unmarshal(body, &avwsdpi)
4306 return avwsdpi, err
4307 case string(ProtectableItemTypeSQLInstance):
4308 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
4309 err := json.Unmarshal(body, &avwsipi)
4310 return avwsipi, err
4311 default:
4312 var avwpi AzureVMWorkloadProtectableItem
4313 err := json.Unmarshal(body, &avwpi)
4314 return avwpi, err
4315 }
4316 }
4317 func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) {
4318 var rawMessages []*json.RawMessage
4319 err := json.Unmarshal(body, &rawMessages)
4320 if err != nil {
4321 return nil, err
4322 }
4323
4324 avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages))
4325
4326 for index, rawMessage := range rawMessages {
4327 avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage)
4328 if err != nil {
4329 return nil, err
4330 }
4331 avwpiArray[index] = avwpi
4332 }
4333 return avwpiArray, nil
4334 }
4335
4336
4337 func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) {
4338 avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem
4339 objectMap := make(map[string]interface{})
4340 if avwpi.ParentName != nil {
4341 objectMap["parentName"] = avwpi.ParentName
4342 }
4343 if avwpi.ParentUniqueName != nil {
4344 objectMap["parentUniqueName"] = avwpi.ParentUniqueName
4345 }
4346 if avwpi.ServerName != nil {
4347 objectMap["serverName"] = avwpi.ServerName
4348 }
4349 if avwpi.IsAutoProtectable != nil {
4350 objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable
4351 }
4352 if avwpi.IsAutoProtected != nil {
4353 objectMap["isAutoProtected"] = avwpi.IsAutoProtected
4354 }
4355 if avwpi.Subinquireditemcount != nil {
4356 objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount
4357 }
4358 if avwpi.Subprotectableitemcount != nil {
4359 objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount
4360 }
4361 if avwpi.Prebackupvalidation != nil {
4362 objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation
4363 }
4364 if avwpi.BackupManagementType != nil {
4365 objectMap["backupManagementType"] = avwpi.BackupManagementType
4366 }
4367 if avwpi.WorkloadType != nil {
4368 objectMap["workloadType"] = avwpi.WorkloadType
4369 }
4370 if avwpi.FriendlyName != nil {
4371 objectMap["friendlyName"] = avwpi.FriendlyName
4372 }
4373 if avwpi.ProtectionState != "" {
4374 objectMap["protectionState"] = avwpi.ProtectionState
4375 }
4376 if avwpi.ProtectableItemType != "" {
4377 objectMap["protectableItemType"] = avwpi.ProtectableItemType
4378 }
4379 return json.Marshal(objectMap)
4380 }
4381
4382
4383 func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
4384 return nil, false
4385 }
4386
4387
4388 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
4389 return nil, false
4390 }
4391
4392
4393 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
4394 return nil, false
4395 }
4396
4397
4398 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
4399 return &avwpi, true
4400 }
4401
4402
4403 func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
4404 return &avwpi, true
4405 }
4406
4407
4408 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
4409 return nil, false
4410 }
4411
4412
4413 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
4414 return nil, false
4415 }
4416
4417
4418 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
4419 return nil, false
4420 }
4421
4422
4423 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
4424 return nil, false
4425 }
4426
4427
4428 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
4429 return nil, false
4430 }
4431
4432
4433 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
4434 return nil, false
4435 }
4436
4437
4438 func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
4439 return nil, false
4440 }
4441
4442
4443 func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
4444 return nil, false
4445 }
4446
4447
4448 func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
4449 return nil, false
4450 }
4451
4452
4453 func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
4454 return &avwpi, true
4455 }
4456
4457
4458 type BasicAzureVMWorkloadProtectedItem interface {
4459 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
4460 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
4461 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
4462 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
4463 }
4464
4465
4466 type AzureVMWorkloadProtectedItem struct {
4467
4468 FriendlyName *string `json:"friendlyName,omitempty"`
4469
4470 ServerName *string `json:"serverName,omitempty"`
4471
4472 ParentName *string `json:"parentName,omitempty"`
4473
4474 ParentType *string `json:"parentType,omitempty"`
4475
4476 ProtectionStatus *string `json:"protectionStatus,omitempty"`
4477
4478 ProtectionState ProtectionState `json:"protectionState,omitempty"`
4479
4480 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
4481
4482 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
4483
4484 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
4485
4486 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
4487
4488 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
4489
4490 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
4491
4492 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4493
4494 WorkloadType DataSourceType `json:"workloadType,omitempty"`
4495
4496 ContainerName *string `json:"containerName,omitempty"`
4497
4498 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4499
4500 PolicyID *string `json:"policyId,omitempty"`
4501
4502 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
4503
4504 BackupSetName *string `json:"backupSetName,omitempty"`
4505
4506 CreateMode CreateMode `json:"createMode,omitempty"`
4507
4508 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
4509
4510 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
4511
4512 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
4513
4514 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
4515
4516 IsRehydrate *bool `json:"isRehydrate,omitempty"`
4517
4518 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
4519 }
4520
4521 func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) {
4522 var m map[string]interface{}
4523 err := json.Unmarshal(body, &m)
4524 if err != nil {
4525 return nil, err
4526 }
4527
4528 switch m["protectedItemType"] {
4529 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
4530 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
4531 err := json.Unmarshal(body, &avwsadpi)
4532 return avwsadpi, err
4533 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
4534 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
4535 err := json.Unmarshal(body, &avwshdpi)
4536 return avwshdpi, err
4537 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
4538 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
4539 err := json.Unmarshal(body, &avwsdpi)
4540 return avwsdpi, err
4541 default:
4542 var avwpi AzureVMWorkloadProtectedItem
4543 err := json.Unmarshal(body, &avwpi)
4544 return avwpi, err
4545 }
4546 }
4547 func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) {
4548 var rawMessages []*json.RawMessage
4549 err := json.Unmarshal(body, &rawMessages)
4550 if err != nil {
4551 return nil, err
4552 }
4553
4554 avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages))
4555
4556 for index, rawMessage := range rawMessages {
4557 avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage)
4558 if err != nil {
4559 return nil, err
4560 }
4561 avwpiArray[index] = avwpi
4562 }
4563 return avwpiArray, nil
4564 }
4565
4566
4567 func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) {
4568 avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem
4569 objectMap := make(map[string]interface{})
4570 if avwpi.FriendlyName != nil {
4571 objectMap["friendlyName"] = avwpi.FriendlyName
4572 }
4573 if avwpi.ServerName != nil {
4574 objectMap["serverName"] = avwpi.ServerName
4575 }
4576 if avwpi.ParentName != nil {
4577 objectMap["parentName"] = avwpi.ParentName
4578 }
4579 if avwpi.ParentType != nil {
4580 objectMap["parentType"] = avwpi.ParentType
4581 }
4582 if avwpi.ProtectionStatus != nil {
4583 objectMap["protectionStatus"] = avwpi.ProtectionStatus
4584 }
4585 if avwpi.ProtectionState != "" {
4586 objectMap["protectionState"] = avwpi.ProtectionState
4587 }
4588 if avwpi.LastBackupStatus != "" {
4589 objectMap["lastBackupStatus"] = avwpi.LastBackupStatus
4590 }
4591 if avwpi.LastBackupTime != nil {
4592 objectMap["lastBackupTime"] = avwpi.LastBackupTime
4593 }
4594 if avwpi.LastBackupErrorDetail != nil {
4595 objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail
4596 }
4597 if avwpi.ProtectedItemDataSourceID != nil {
4598 objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID
4599 }
4600 if avwpi.ProtectedItemHealthStatus != "" {
4601 objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus
4602 }
4603 if avwpi.ExtendedInfo != nil {
4604 objectMap["extendedInfo"] = avwpi.ExtendedInfo
4605 }
4606 if avwpi.BackupManagementType != "" {
4607 objectMap["backupManagementType"] = avwpi.BackupManagementType
4608 }
4609 if avwpi.WorkloadType != "" {
4610 objectMap["workloadType"] = avwpi.WorkloadType
4611 }
4612 if avwpi.ContainerName != nil {
4613 objectMap["containerName"] = avwpi.ContainerName
4614 }
4615 if avwpi.SourceResourceID != nil {
4616 objectMap["sourceResourceId"] = avwpi.SourceResourceID
4617 }
4618 if avwpi.PolicyID != nil {
4619 objectMap["policyId"] = avwpi.PolicyID
4620 }
4621 if avwpi.LastRecoveryPoint != nil {
4622 objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint
4623 }
4624 if avwpi.BackupSetName != nil {
4625 objectMap["backupSetName"] = avwpi.BackupSetName
4626 }
4627 if avwpi.CreateMode != "" {
4628 objectMap["createMode"] = avwpi.CreateMode
4629 }
4630 if avwpi.DeferredDeleteTimeInUTC != nil {
4631 objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC
4632 }
4633 if avwpi.IsScheduledForDeferredDelete != nil {
4634 objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete
4635 }
4636 if avwpi.DeferredDeleteTimeRemaining != nil {
4637 objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining
4638 }
4639 if avwpi.IsDeferredDeleteScheduleUpcoming != nil {
4640 objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming
4641 }
4642 if avwpi.IsRehydrate != nil {
4643 objectMap["isRehydrate"] = avwpi.IsRehydrate
4644 }
4645 if avwpi.ProtectedItemType != "" {
4646 objectMap["protectedItemType"] = avwpi.ProtectedItemType
4647 }
4648 return json.Marshal(objectMap)
4649 }
4650
4651
4652 func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
4653 return nil, false
4654 }
4655
4656
4657 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
4658 return nil, false
4659 }
4660
4661
4662 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
4663 return nil, false
4664 }
4665
4666
4667 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
4668 return nil, false
4669 }
4670
4671
4672 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
4673 return nil, false
4674 }
4675
4676
4677 func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
4678 return nil, false
4679 }
4680
4681
4682 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
4683 return &avwpi, true
4684 }
4685
4686
4687 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
4688 return &avwpi, true
4689 }
4690
4691
4692 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
4693 return nil, false
4694 }
4695
4696
4697 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
4698 return nil, false
4699 }
4700
4701
4702 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
4703 return nil, false
4704 }
4705
4706
4707 func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
4708 return nil, false
4709 }
4710
4711
4712 func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
4713 return nil, false
4714 }
4715
4716
4717 func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
4718 return nil, false
4719 }
4720
4721
4722 func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
4723 return nil, false
4724 }
4725
4726
4727 func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
4728 return &avwpi, true
4729 }
4730
4731
4732
4733 type AzureVMWorkloadProtectedItemExtendedInfo struct {
4734
4735 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
4736
4737 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
4738
4739 PolicyState *string `json:"policyState,omitempty"`
4740 }
4741
4742
4743 type AzureVMWorkloadProtectionPolicy struct {
4744
4745 WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
4746
4747 Settings *Settings `json:"settings,omitempty"`
4748
4749 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
4750
4751 MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"`
4752
4753 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
4754
4755 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
4756 }
4757
4758
4759 func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) {
4760 avwpp.BackupManagementType = BackupManagementTypeAzureWorkload
4761 objectMap := make(map[string]interface{})
4762 if avwpp.WorkLoadType != "" {
4763 objectMap["workLoadType"] = avwpp.WorkLoadType
4764 }
4765 if avwpp.Settings != nil {
4766 objectMap["settings"] = avwpp.Settings
4767 }
4768 if avwpp.SubProtectionPolicy != nil {
4769 objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy
4770 }
4771 if avwpp.MakePolicyConsistent != nil {
4772 objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent
4773 }
4774 if avwpp.ProtectedItemsCount != nil {
4775 objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount
4776 }
4777 if avwpp.BackupManagementType != "" {
4778 objectMap["backupManagementType"] = avwpp.BackupManagementType
4779 }
4780 return json.Marshal(objectMap)
4781 }
4782
4783
4784 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
4785 return &avwpp, true
4786 }
4787
4788
4789 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
4790 return nil, false
4791 }
4792
4793
4794 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
4795 return nil, false
4796 }
4797
4798
4799 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
4800 return nil, false
4801 }
4802
4803
4804 func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
4805 return nil, false
4806 }
4807
4808
4809 func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
4810 return nil, false
4811 }
4812
4813
4814 func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
4815 return nil, false
4816 }
4817
4818
4819 func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
4820 return &avwpp, true
4821 }
4822
4823
4824
4825 type AzureVMWorkloadSAPAseDatabaseProtectedItem struct {
4826
4827 FriendlyName *string `json:"friendlyName,omitempty"`
4828
4829 ServerName *string `json:"serverName,omitempty"`
4830
4831 ParentName *string `json:"parentName,omitempty"`
4832
4833 ParentType *string `json:"parentType,omitempty"`
4834
4835 ProtectionStatus *string `json:"protectionStatus,omitempty"`
4836
4837 ProtectionState ProtectionState `json:"protectionState,omitempty"`
4838
4839 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
4840
4841 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
4842
4843 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
4844
4845 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
4846
4847 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
4848
4849 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
4850
4851 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4852
4853 WorkloadType DataSourceType `json:"workloadType,omitempty"`
4854
4855 ContainerName *string `json:"containerName,omitempty"`
4856
4857 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4858
4859 PolicyID *string `json:"policyId,omitempty"`
4860
4861 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
4862
4863 BackupSetName *string `json:"backupSetName,omitempty"`
4864
4865 CreateMode CreateMode `json:"createMode,omitempty"`
4866
4867 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
4868
4869 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
4870
4871 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
4872
4873 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
4874
4875 IsRehydrate *bool `json:"isRehydrate,omitempty"`
4876
4877 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
4878 }
4879
4880
4881 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
4882 avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase
4883 objectMap := make(map[string]interface{})
4884 if avwsadpi.FriendlyName != nil {
4885 objectMap["friendlyName"] = avwsadpi.FriendlyName
4886 }
4887 if avwsadpi.ServerName != nil {
4888 objectMap["serverName"] = avwsadpi.ServerName
4889 }
4890 if avwsadpi.ParentName != nil {
4891 objectMap["parentName"] = avwsadpi.ParentName
4892 }
4893 if avwsadpi.ParentType != nil {
4894 objectMap["parentType"] = avwsadpi.ParentType
4895 }
4896 if avwsadpi.ProtectionStatus != nil {
4897 objectMap["protectionStatus"] = avwsadpi.ProtectionStatus
4898 }
4899 if avwsadpi.ProtectionState != "" {
4900 objectMap["protectionState"] = avwsadpi.ProtectionState
4901 }
4902 if avwsadpi.LastBackupStatus != "" {
4903 objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus
4904 }
4905 if avwsadpi.LastBackupTime != nil {
4906 objectMap["lastBackupTime"] = avwsadpi.LastBackupTime
4907 }
4908 if avwsadpi.LastBackupErrorDetail != nil {
4909 objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail
4910 }
4911 if avwsadpi.ProtectedItemDataSourceID != nil {
4912 objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID
4913 }
4914 if avwsadpi.ProtectedItemHealthStatus != "" {
4915 objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus
4916 }
4917 if avwsadpi.ExtendedInfo != nil {
4918 objectMap["extendedInfo"] = avwsadpi.ExtendedInfo
4919 }
4920 if avwsadpi.BackupManagementType != "" {
4921 objectMap["backupManagementType"] = avwsadpi.BackupManagementType
4922 }
4923 if avwsadpi.WorkloadType != "" {
4924 objectMap["workloadType"] = avwsadpi.WorkloadType
4925 }
4926 if avwsadpi.ContainerName != nil {
4927 objectMap["containerName"] = avwsadpi.ContainerName
4928 }
4929 if avwsadpi.SourceResourceID != nil {
4930 objectMap["sourceResourceId"] = avwsadpi.SourceResourceID
4931 }
4932 if avwsadpi.PolicyID != nil {
4933 objectMap["policyId"] = avwsadpi.PolicyID
4934 }
4935 if avwsadpi.LastRecoveryPoint != nil {
4936 objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint
4937 }
4938 if avwsadpi.BackupSetName != nil {
4939 objectMap["backupSetName"] = avwsadpi.BackupSetName
4940 }
4941 if avwsadpi.CreateMode != "" {
4942 objectMap["createMode"] = avwsadpi.CreateMode
4943 }
4944 if avwsadpi.DeferredDeleteTimeInUTC != nil {
4945 objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC
4946 }
4947 if avwsadpi.IsScheduledForDeferredDelete != nil {
4948 objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete
4949 }
4950 if avwsadpi.DeferredDeleteTimeRemaining != nil {
4951 objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining
4952 }
4953 if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil {
4954 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming
4955 }
4956 if avwsadpi.IsRehydrate != nil {
4957 objectMap["isRehydrate"] = avwsadpi.IsRehydrate
4958 }
4959 if avwsadpi.ProtectedItemType != "" {
4960 objectMap["protectedItemType"] = avwsadpi.ProtectedItemType
4961 }
4962 return json.Marshal(objectMap)
4963 }
4964
4965
4966 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
4967 return nil, false
4968 }
4969
4970
4971 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
4972 return nil, false
4973 }
4974
4975
4976 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
4977 return nil, false
4978 }
4979
4980
4981 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
4982 return nil, false
4983 }
4984
4985
4986 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
4987 return nil, false
4988 }
4989
4990
4991 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
4992 return nil, false
4993 }
4994
4995
4996 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
4997 return nil, false
4998 }
4999
5000
5001 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5002 return &avwsadpi, true
5003 }
5004
5005
5006 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5007 return &avwsadpi, true
5008 }
5009
5010
5011 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5012 return nil, false
5013 }
5014
5015
5016 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5017 return nil, false
5018 }
5019
5020
5021 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5022 return nil, false
5023 }
5024
5025
5026 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5027 return nil, false
5028 }
5029
5030
5031 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5032 return nil, false
5033 }
5034
5035
5036 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5037 return nil, false
5038 }
5039
5040
5041 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5042 return &avwsadpi, true
5043 }
5044
5045
5046
5047 type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct {
5048
5049 ParentName *string `json:"parentName,omitempty"`
5050
5051 ServerName *string `json:"serverName,omitempty"`
5052
5053 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5054
5055 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5056
5057 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5058
5059 BackupManagementType *string `json:"backupManagementType,omitempty"`
5060
5061 WorkloadType *string `json:"workloadType,omitempty"`
5062
5063 FriendlyName *string `json:"friendlyName,omitempty"`
5064
5065 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5066
5067 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5068 }
5069
5070
5071 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
5072 avwsadwi.WorkloadItemType = WorkloadItemTypeSAPAseDatabase1
5073 objectMap := make(map[string]interface{})
5074 if avwsadwi.ParentName != nil {
5075 objectMap["parentName"] = avwsadwi.ParentName
5076 }
5077 if avwsadwi.ServerName != nil {
5078 objectMap["serverName"] = avwsadwi.ServerName
5079 }
5080 if avwsadwi.IsAutoProtectable != nil {
5081 objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable
5082 }
5083 if avwsadwi.Subinquireditemcount != nil {
5084 objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount
5085 }
5086 if avwsadwi.SubWorkloadItemCount != nil {
5087 objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount
5088 }
5089 if avwsadwi.BackupManagementType != nil {
5090 objectMap["backupManagementType"] = avwsadwi.BackupManagementType
5091 }
5092 if avwsadwi.WorkloadType != nil {
5093 objectMap["workloadType"] = avwsadwi.WorkloadType
5094 }
5095 if avwsadwi.FriendlyName != nil {
5096 objectMap["friendlyName"] = avwsadwi.FriendlyName
5097 }
5098 if avwsadwi.ProtectionState != "" {
5099 objectMap["protectionState"] = avwsadwi.ProtectionState
5100 }
5101 if avwsadwi.WorkloadItemType != "" {
5102 objectMap["workloadItemType"] = avwsadwi.WorkloadItemType
5103 }
5104 return json.Marshal(objectMap)
5105 }
5106
5107
5108 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5109 return nil, false
5110 }
5111
5112
5113 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5114 return &avwsadwi, true
5115 }
5116
5117
5118 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5119 return &avwsadwi, true
5120 }
5121
5122
5123 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5124 return nil, false
5125 }
5126
5127
5128 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5129 return nil, false
5130 }
5131
5132
5133 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5134 return nil, false
5135 }
5136
5137
5138 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5139 return nil, false
5140 }
5141
5142
5143 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5144 return nil, false
5145 }
5146
5147
5148 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5149 return nil, false
5150 }
5151
5152
5153 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5154 return &avwsadwi, true
5155 }
5156
5157
5158
5159 type AzureVMWorkloadSAPAseSystemProtectableItem struct {
5160
5161 ParentName *string `json:"parentName,omitempty"`
5162
5163
5164 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5165
5166 ServerName *string `json:"serverName,omitempty"`
5167
5168 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5169
5170 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5171
5172 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5173
5174 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5175
5176 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5177
5178 BackupManagementType *string `json:"backupManagementType,omitempty"`
5179
5180 WorkloadType *string `json:"workloadType,omitempty"`
5181
5182 FriendlyName *string `json:"friendlyName,omitempty"`
5183
5184 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5185
5186 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5187 }
5188
5189
5190 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) {
5191 avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem
5192 objectMap := make(map[string]interface{})
5193 if avwsaspi.ParentName != nil {
5194 objectMap["parentName"] = avwsaspi.ParentName
5195 }
5196 if avwsaspi.ParentUniqueName != nil {
5197 objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName
5198 }
5199 if avwsaspi.ServerName != nil {
5200 objectMap["serverName"] = avwsaspi.ServerName
5201 }
5202 if avwsaspi.IsAutoProtectable != nil {
5203 objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable
5204 }
5205 if avwsaspi.IsAutoProtected != nil {
5206 objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected
5207 }
5208 if avwsaspi.Subinquireditemcount != nil {
5209 objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount
5210 }
5211 if avwsaspi.Subprotectableitemcount != nil {
5212 objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount
5213 }
5214 if avwsaspi.Prebackupvalidation != nil {
5215 objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation
5216 }
5217 if avwsaspi.BackupManagementType != nil {
5218 objectMap["backupManagementType"] = avwsaspi.BackupManagementType
5219 }
5220 if avwsaspi.WorkloadType != nil {
5221 objectMap["workloadType"] = avwsaspi.WorkloadType
5222 }
5223 if avwsaspi.FriendlyName != nil {
5224 objectMap["friendlyName"] = avwsaspi.FriendlyName
5225 }
5226 if avwsaspi.ProtectionState != "" {
5227 objectMap["protectionState"] = avwsaspi.ProtectionState
5228 }
5229 if avwsaspi.ProtectableItemType != "" {
5230 objectMap["protectableItemType"] = avwsaspi.ProtectableItemType
5231 }
5232 return json.Marshal(objectMap)
5233 }
5234
5235
5236 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5237 return nil, false
5238 }
5239
5240
5241 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5242 return nil, false
5243 }
5244
5245
5246 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5247 return nil, false
5248 }
5249
5250
5251 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5252 return nil, false
5253 }
5254
5255
5256 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5257 return &avwsaspi, true
5258 }
5259
5260
5261 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5262 return &avwsaspi, true
5263 }
5264
5265
5266 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5267 return nil, false
5268 }
5269
5270
5271 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5272 return nil, false
5273 }
5274
5275
5276 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5277 return nil, false
5278 }
5279
5280
5281 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5282 return nil, false
5283 }
5284
5285
5286 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5287 return nil, false
5288 }
5289
5290
5291 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5292 return nil, false
5293 }
5294
5295
5296 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5297 return nil, false
5298 }
5299
5300
5301 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5302 return nil, false
5303 }
5304
5305
5306 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5307 return &avwsaspi, true
5308 }
5309
5310
5311
5312 type AzureVMWorkloadSAPAseSystemWorkloadItem struct {
5313
5314 ParentName *string `json:"parentName,omitempty"`
5315
5316 ServerName *string `json:"serverName,omitempty"`
5317
5318 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5319
5320 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5321
5322 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5323
5324 BackupManagementType *string `json:"backupManagementType,omitempty"`
5325
5326 WorkloadType *string `json:"workloadType,omitempty"`
5327
5328 FriendlyName *string `json:"friendlyName,omitempty"`
5329
5330 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5331
5332 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5333 }
5334
5335
5336 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) {
5337 avwsaswi.WorkloadItemType = WorkloadItemTypeSAPAseSystem1
5338 objectMap := make(map[string]interface{})
5339 if avwsaswi.ParentName != nil {
5340 objectMap["parentName"] = avwsaswi.ParentName
5341 }
5342 if avwsaswi.ServerName != nil {
5343 objectMap["serverName"] = avwsaswi.ServerName
5344 }
5345 if avwsaswi.IsAutoProtectable != nil {
5346 objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable
5347 }
5348 if avwsaswi.Subinquireditemcount != nil {
5349 objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount
5350 }
5351 if avwsaswi.SubWorkloadItemCount != nil {
5352 objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount
5353 }
5354 if avwsaswi.BackupManagementType != nil {
5355 objectMap["backupManagementType"] = avwsaswi.BackupManagementType
5356 }
5357 if avwsaswi.WorkloadType != nil {
5358 objectMap["workloadType"] = avwsaswi.WorkloadType
5359 }
5360 if avwsaswi.FriendlyName != nil {
5361 objectMap["friendlyName"] = avwsaswi.FriendlyName
5362 }
5363 if avwsaswi.ProtectionState != "" {
5364 objectMap["protectionState"] = avwsaswi.ProtectionState
5365 }
5366 if avwsaswi.WorkloadItemType != "" {
5367 objectMap["workloadItemType"] = avwsaswi.WorkloadItemType
5368 }
5369 return json.Marshal(objectMap)
5370 }
5371
5372
5373 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5374 return nil, false
5375 }
5376
5377
5378 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5379 return &avwsaswi, true
5380 }
5381
5382
5383 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5384 return nil, false
5385 }
5386
5387
5388 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5389 return &avwsaswi, true
5390 }
5391
5392
5393 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5394 return nil, false
5395 }
5396
5397
5398 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5399 return nil, false
5400 }
5401
5402
5403 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5404 return nil, false
5405 }
5406
5407
5408 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5409 return nil, false
5410 }
5411
5412
5413 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5414 return nil, false
5415 }
5416
5417
5418 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5419 return &avwsaswi, true
5420 }
5421
5422
5423
5424 type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct {
5425
5426 ParentName *string `json:"parentName,omitempty"`
5427
5428
5429 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5430
5431 ServerName *string `json:"serverName,omitempty"`
5432
5433 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5434
5435 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5436
5437 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5438
5439 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5440
5441 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5442
5443 BackupManagementType *string `json:"backupManagementType,omitempty"`
5444
5445 WorkloadType *string `json:"workloadType,omitempty"`
5446
5447 FriendlyName *string `json:"friendlyName,omitempty"`
5448
5449 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5450
5451 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5452 }
5453
5454
5455 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
5456 avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase
5457 objectMap := make(map[string]interface{})
5458 if avwshdpi.ParentName != nil {
5459 objectMap["parentName"] = avwshdpi.ParentName
5460 }
5461 if avwshdpi.ParentUniqueName != nil {
5462 objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName
5463 }
5464 if avwshdpi.ServerName != nil {
5465 objectMap["serverName"] = avwshdpi.ServerName
5466 }
5467 if avwshdpi.IsAutoProtectable != nil {
5468 objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable
5469 }
5470 if avwshdpi.IsAutoProtected != nil {
5471 objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected
5472 }
5473 if avwshdpi.Subinquireditemcount != nil {
5474 objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount
5475 }
5476 if avwshdpi.Subprotectableitemcount != nil {
5477 objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount
5478 }
5479 if avwshdpi.Prebackupvalidation != nil {
5480 objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation
5481 }
5482 if avwshdpi.BackupManagementType != nil {
5483 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
5484 }
5485 if avwshdpi.WorkloadType != nil {
5486 objectMap["workloadType"] = avwshdpi.WorkloadType
5487 }
5488 if avwshdpi.FriendlyName != nil {
5489 objectMap["friendlyName"] = avwshdpi.FriendlyName
5490 }
5491 if avwshdpi.ProtectionState != "" {
5492 objectMap["protectionState"] = avwshdpi.ProtectionState
5493 }
5494 if avwshdpi.ProtectableItemType != "" {
5495 objectMap["protectableItemType"] = avwshdpi.ProtectableItemType
5496 }
5497 return json.Marshal(objectMap)
5498 }
5499
5500
5501 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5502 return nil, false
5503 }
5504
5505
5506 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5507 return nil, false
5508 }
5509
5510
5511 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5512 return nil, false
5513 }
5514
5515
5516 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5517 return nil, false
5518 }
5519
5520
5521 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5522 return &avwshdpi, true
5523 }
5524
5525
5526 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5527 return nil, false
5528 }
5529
5530
5531 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5532 return &avwshdpi, true
5533 }
5534
5535
5536 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5537 return nil, false
5538 }
5539
5540
5541 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5542 return nil, false
5543 }
5544
5545
5546 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5547 return nil, false
5548 }
5549
5550
5551 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5552 return nil, false
5553 }
5554
5555
5556 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5557 return nil, false
5558 }
5559
5560
5561 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5562 return nil, false
5563 }
5564
5565
5566 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5567 return nil, false
5568 }
5569
5570
5571 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5572 return &avwshdpi, true
5573 }
5574
5575
5576
5577 type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct {
5578
5579 FriendlyName *string `json:"friendlyName,omitempty"`
5580
5581 ServerName *string `json:"serverName,omitempty"`
5582
5583 ParentName *string `json:"parentName,omitempty"`
5584
5585 ParentType *string `json:"parentType,omitempty"`
5586
5587 ProtectionStatus *string `json:"protectionStatus,omitempty"`
5588
5589 ProtectionState ProtectionState `json:"protectionState,omitempty"`
5590
5591 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
5592
5593 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
5594
5595 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
5596
5597 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
5598
5599 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
5600
5601 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
5602
5603 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
5604
5605 WorkloadType DataSourceType `json:"workloadType,omitempty"`
5606
5607 ContainerName *string `json:"containerName,omitempty"`
5608
5609 SourceResourceID *string `json:"sourceResourceId,omitempty"`
5610
5611 PolicyID *string `json:"policyId,omitempty"`
5612
5613 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
5614
5615 BackupSetName *string `json:"backupSetName,omitempty"`
5616
5617 CreateMode CreateMode `json:"createMode,omitempty"`
5618
5619 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
5620
5621 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
5622
5623 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
5624
5625 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
5626
5627 IsRehydrate *bool `json:"isRehydrate,omitempty"`
5628
5629 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
5630 }
5631
5632
5633 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
5634 avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase
5635 objectMap := make(map[string]interface{})
5636 if avwshdpi.FriendlyName != nil {
5637 objectMap["friendlyName"] = avwshdpi.FriendlyName
5638 }
5639 if avwshdpi.ServerName != nil {
5640 objectMap["serverName"] = avwshdpi.ServerName
5641 }
5642 if avwshdpi.ParentName != nil {
5643 objectMap["parentName"] = avwshdpi.ParentName
5644 }
5645 if avwshdpi.ParentType != nil {
5646 objectMap["parentType"] = avwshdpi.ParentType
5647 }
5648 if avwshdpi.ProtectionStatus != nil {
5649 objectMap["protectionStatus"] = avwshdpi.ProtectionStatus
5650 }
5651 if avwshdpi.ProtectionState != "" {
5652 objectMap["protectionState"] = avwshdpi.ProtectionState
5653 }
5654 if avwshdpi.LastBackupStatus != "" {
5655 objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus
5656 }
5657 if avwshdpi.LastBackupTime != nil {
5658 objectMap["lastBackupTime"] = avwshdpi.LastBackupTime
5659 }
5660 if avwshdpi.LastBackupErrorDetail != nil {
5661 objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail
5662 }
5663 if avwshdpi.ProtectedItemDataSourceID != nil {
5664 objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID
5665 }
5666 if avwshdpi.ProtectedItemHealthStatus != "" {
5667 objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus
5668 }
5669 if avwshdpi.ExtendedInfo != nil {
5670 objectMap["extendedInfo"] = avwshdpi.ExtendedInfo
5671 }
5672 if avwshdpi.BackupManagementType != "" {
5673 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
5674 }
5675 if avwshdpi.WorkloadType != "" {
5676 objectMap["workloadType"] = avwshdpi.WorkloadType
5677 }
5678 if avwshdpi.ContainerName != nil {
5679 objectMap["containerName"] = avwshdpi.ContainerName
5680 }
5681 if avwshdpi.SourceResourceID != nil {
5682 objectMap["sourceResourceId"] = avwshdpi.SourceResourceID
5683 }
5684 if avwshdpi.PolicyID != nil {
5685 objectMap["policyId"] = avwshdpi.PolicyID
5686 }
5687 if avwshdpi.LastRecoveryPoint != nil {
5688 objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint
5689 }
5690 if avwshdpi.BackupSetName != nil {
5691 objectMap["backupSetName"] = avwshdpi.BackupSetName
5692 }
5693 if avwshdpi.CreateMode != "" {
5694 objectMap["createMode"] = avwshdpi.CreateMode
5695 }
5696 if avwshdpi.DeferredDeleteTimeInUTC != nil {
5697 objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC
5698 }
5699 if avwshdpi.IsScheduledForDeferredDelete != nil {
5700 objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete
5701 }
5702 if avwshdpi.DeferredDeleteTimeRemaining != nil {
5703 objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining
5704 }
5705 if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil {
5706 objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming
5707 }
5708 if avwshdpi.IsRehydrate != nil {
5709 objectMap["isRehydrate"] = avwshdpi.IsRehydrate
5710 }
5711 if avwshdpi.ProtectedItemType != "" {
5712 objectMap["protectedItemType"] = avwshdpi.ProtectedItemType
5713 }
5714 return json.Marshal(objectMap)
5715 }
5716
5717
5718 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5719 return nil, false
5720 }
5721
5722
5723 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5724 return nil, false
5725 }
5726
5727
5728 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5729 return nil, false
5730 }
5731
5732
5733 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5734 return nil, false
5735 }
5736
5737
5738 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5739 return nil, false
5740 }
5741
5742
5743 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5744 return nil, false
5745 }
5746
5747
5748 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5749 return nil, false
5750 }
5751
5752
5753 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5754 return &avwshdpi, true
5755 }
5756
5757
5758 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5759 return nil, false
5760 }
5761
5762
5763 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5764 return &avwshdpi, true
5765 }
5766
5767
5768 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5769 return nil, false
5770 }
5771
5772
5773 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5774 return nil, false
5775 }
5776
5777
5778 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5779 return nil, false
5780 }
5781
5782
5783 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5784 return nil, false
5785 }
5786
5787
5788 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5789 return nil, false
5790 }
5791
5792
5793 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5794 return &avwshdpi, true
5795 }
5796
5797
5798
5799 type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct {
5800
5801 ParentName *string `json:"parentName,omitempty"`
5802
5803 ServerName *string `json:"serverName,omitempty"`
5804
5805 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5806
5807 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5808
5809 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5810
5811 BackupManagementType *string `json:"backupManagementType,omitempty"`
5812
5813 WorkloadType *string `json:"workloadType,omitempty"`
5814
5815 FriendlyName *string `json:"friendlyName,omitempty"`
5816
5817 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5818
5819 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5820 }
5821
5822
5823 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
5824 avwshdwi.WorkloadItemType = WorkloadItemTypeSAPHanaDatabase1
5825 objectMap := make(map[string]interface{})
5826 if avwshdwi.ParentName != nil {
5827 objectMap["parentName"] = avwshdwi.ParentName
5828 }
5829 if avwshdwi.ServerName != nil {
5830 objectMap["serverName"] = avwshdwi.ServerName
5831 }
5832 if avwshdwi.IsAutoProtectable != nil {
5833 objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable
5834 }
5835 if avwshdwi.Subinquireditemcount != nil {
5836 objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount
5837 }
5838 if avwshdwi.SubWorkloadItemCount != nil {
5839 objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount
5840 }
5841 if avwshdwi.BackupManagementType != nil {
5842 objectMap["backupManagementType"] = avwshdwi.BackupManagementType
5843 }
5844 if avwshdwi.WorkloadType != nil {
5845 objectMap["workloadType"] = avwshdwi.WorkloadType
5846 }
5847 if avwshdwi.FriendlyName != nil {
5848 objectMap["friendlyName"] = avwshdwi.FriendlyName
5849 }
5850 if avwshdwi.ProtectionState != "" {
5851 objectMap["protectionState"] = avwshdwi.ProtectionState
5852 }
5853 if avwshdwi.WorkloadItemType != "" {
5854 objectMap["workloadItemType"] = avwshdwi.WorkloadItemType
5855 }
5856 return json.Marshal(objectMap)
5857 }
5858
5859
5860 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5861 return nil, false
5862 }
5863
5864
5865 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5866 return &avwshdwi, true
5867 }
5868
5869
5870 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5871 return nil, false
5872 }
5873
5874
5875 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5876 return nil, false
5877 }
5878
5879
5880 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5881 return &avwshdwi, true
5882 }
5883
5884
5885 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5886 return nil, false
5887 }
5888
5889
5890 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5891 return nil, false
5892 }
5893
5894
5895 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5896 return nil, false
5897 }
5898
5899
5900 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5901 return nil, false
5902 }
5903
5904
5905 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5906 return &avwshdwi, true
5907 }
5908
5909
5910
5911 type AzureVMWorkloadSAPHanaSystemProtectableItem struct {
5912
5913 ParentName *string `json:"parentName,omitempty"`
5914
5915
5916 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5917
5918 ServerName *string `json:"serverName,omitempty"`
5919
5920 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5921
5922 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5923
5924 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5925
5926 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5927
5928 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5929
5930 BackupManagementType *string `json:"backupManagementType,omitempty"`
5931
5932 WorkloadType *string `json:"workloadType,omitempty"`
5933
5934 FriendlyName *string `json:"friendlyName,omitempty"`
5935
5936 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5937
5938 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5939 }
5940
5941
5942 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) {
5943 avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem
5944 objectMap := make(map[string]interface{})
5945 if avwshspi.ParentName != nil {
5946 objectMap["parentName"] = avwshspi.ParentName
5947 }
5948 if avwshspi.ParentUniqueName != nil {
5949 objectMap["parentUniqueName"] = avwshspi.ParentUniqueName
5950 }
5951 if avwshspi.ServerName != nil {
5952 objectMap["serverName"] = avwshspi.ServerName
5953 }
5954 if avwshspi.IsAutoProtectable != nil {
5955 objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable
5956 }
5957 if avwshspi.IsAutoProtected != nil {
5958 objectMap["isAutoProtected"] = avwshspi.IsAutoProtected
5959 }
5960 if avwshspi.Subinquireditemcount != nil {
5961 objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount
5962 }
5963 if avwshspi.Subprotectableitemcount != nil {
5964 objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount
5965 }
5966 if avwshspi.Prebackupvalidation != nil {
5967 objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation
5968 }
5969 if avwshspi.BackupManagementType != nil {
5970 objectMap["backupManagementType"] = avwshspi.BackupManagementType
5971 }
5972 if avwshspi.WorkloadType != nil {
5973 objectMap["workloadType"] = avwshspi.WorkloadType
5974 }
5975 if avwshspi.FriendlyName != nil {
5976 objectMap["friendlyName"] = avwshspi.FriendlyName
5977 }
5978 if avwshspi.ProtectionState != "" {
5979 objectMap["protectionState"] = avwshspi.ProtectionState
5980 }
5981 if avwshspi.ProtectableItemType != "" {
5982 objectMap["protectableItemType"] = avwshspi.ProtectableItemType
5983 }
5984 return json.Marshal(objectMap)
5985 }
5986
5987
5988 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5989 return nil, false
5990 }
5991
5992
5993 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5994 return nil, false
5995 }
5996
5997
5998 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5999 return nil, false
6000 }
6001
6002
6003 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6004 return nil, false
6005 }
6006
6007
6008 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6009 return &avwshspi, true
6010 }
6011
6012
6013 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6014 return nil, false
6015 }
6016
6017
6018 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6019 return nil, false
6020 }
6021
6022
6023 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6024 return &avwshspi, true
6025 }
6026
6027
6028 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6029 return nil, false
6030 }
6031
6032
6033 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6034 return nil, false
6035 }
6036
6037
6038 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6039 return nil, false
6040 }
6041
6042
6043 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6044 return nil, false
6045 }
6046
6047
6048 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6049 return nil, false
6050 }
6051
6052
6053 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6054 return nil, false
6055 }
6056
6057
6058 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6059 return &avwshspi, true
6060 }
6061
6062
6063
6064 type AzureVMWorkloadSAPHanaSystemWorkloadItem struct {
6065
6066 ParentName *string `json:"parentName,omitempty"`
6067
6068 ServerName *string `json:"serverName,omitempty"`
6069
6070 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6071
6072 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6073
6074 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6075
6076 BackupManagementType *string `json:"backupManagementType,omitempty"`
6077
6078 WorkloadType *string `json:"workloadType,omitempty"`
6079
6080 FriendlyName *string `json:"friendlyName,omitempty"`
6081
6082 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6083
6084 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6085 }
6086
6087
6088 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) {
6089 avwshswi.WorkloadItemType = WorkloadItemTypeSAPHanaSystem1
6090 objectMap := make(map[string]interface{})
6091 if avwshswi.ParentName != nil {
6092 objectMap["parentName"] = avwshswi.ParentName
6093 }
6094 if avwshswi.ServerName != nil {
6095 objectMap["serverName"] = avwshswi.ServerName
6096 }
6097 if avwshswi.IsAutoProtectable != nil {
6098 objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable
6099 }
6100 if avwshswi.Subinquireditemcount != nil {
6101 objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount
6102 }
6103 if avwshswi.SubWorkloadItemCount != nil {
6104 objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount
6105 }
6106 if avwshswi.BackupManagementType != nil {
6107 objectMap["backupManagementType"] = avwshswi.BackupManagementType
6108 }
6109 if avwshswi.WorkloadType != nil {
6110 objectMap["workloadType"] = avwshswi.WorkloadType
6111 }
6112 if avwshswi.FriendlyName != nil {
6113 objectMap["friendlyName"] = avwshswi.FriendlyName
6114 }
6115 if avwshswi.ProtectionState != "" {
6116 objectMap["protectionState"] = avwshswi.ProtectionState
6117 }
6118 if avwshswi.WorkloadItemType != "" {
6119 objectMap["workloadItemType"] = avwshswi.WorkloadItemType
6120 }
6121 return json.Marshal(objectMap)
6122 }
6123
6124
6125 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6126 return nil, false
6127 }
6128
6129
6130 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6131 return &avwshswi, true
6132 }
6133
6134
6135 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6136 return nil, false
6137 }
6138
6139
6140 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6141 return nil, false
6142 }
6143
6144
6145 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6146 return nil, false
6147 }
6148
6149
6150 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6151 return &avwshswi, true
6152 }
6153
6154
6155 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6156 return nil, false
6157 }
6158
6159
6160 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6161 return nil, false
6162 }
6163
6164
6165 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6166 return nil, false
6167 }
6168
6169
6170 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6171 return &avwshswi, true
6172 }
6173
6174
6175
6176 type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct {
6177
6178 ParentName *string `json:"parentName,omitempty"`
6179
6180
6181 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6182
6183 ServerName *string `json:"serverName,omitempty"`
6184
6185 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6186
6187 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6188
6189 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6190
6191 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6192
6193 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6194
6195 BackupManagementType *string `json:"backupManagementType,omitempty"`
6196
6197 WorkloadType *string `json:"workloadType,omitempty"`
6198
6199 FriendlyName *string `json:"friendlyName,omitempty"`
6200
6201 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6202
6203 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6204 }
6205
6206
6207 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) {
6208 avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer
6209 objectMap := make(map[string]interface{})
6210 if avwsagpi.ParentName != nil {
6211 objectMap["parentName"] = avwsagpi.ParentName
6212 }
6213 if avwsagpi.ParentUniqueName != nil {
6214 objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName
6215 }
6216 if avwsagpi.ServerName != nil {
6217 objectMap["serverName"] = avwsagpi.ServerName
6218 }
6219 if avwsagpi.IsAutoProtectable != nil {
6220 objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable
6221 }
6222 if avwsagpi.IsAutoProtected != nil {
6223 objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected
6224 }
6225 if avwsagpi.Subinquireditemcount != nil {
6226 objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount
6227 }
6228 if avwsagpi.Subprotectableitemcount != nil {
6229 objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount
6230 }
6231 if avwsagpi.Prebackupvalidation != nil {
6232 objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation
6233 }
6234 if avwsagpi.BackupManagementType != nil {
6235 objectMap["backupManagementType"] = avwsagpi.BackupManagementType
6236 }
6237 if avwsagpi.WorkloadType != nil {
6238 objectMap["workloadType"] = avwsagpi.WorkloadType
6239 }
6240 if avwsagpi.FriendlyName != nil {
6241 objectMap["friendlyName"] = avwsagpi.FriendlyName
6242 }
6243 if avwsagpi.ProtectionState != "" {
6244 objectMap["protectionState"] = avwsagpi.ProtectionState
6245 }
6246 if avwsagpi.ProtectableItemType != "" {
6247 objectMap["protectableItemType"] = avwsagpi.ProtectableItemType
6248 }
6249 return json.Marshal(objectMap)
6250 }
6251
6252
6253 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6254 return nil, false
6255 }
6256
6257
6258 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6259 return nil, false
6260 }
6261
6262
6263 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6264 return nil, false
6265 }
6266
6267
6268 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6269 return nil, false
6270 }
6271
6272
6273 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6274 return &avwsagpi, true
6275 }
6276
6277
6278 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6279 return nil, false
6280 }
6281
6282
6283 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6284 return nil, false
6285 }
6286
6287
6288 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6289 return nil, false
6290 }
6291
6292
6293 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6294 return &avwsagpi, true
6295 }
6296
6297
6298 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6299 return nil, false
6300 }
6301
6302
6303 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6304 return nil, false
6305 }
6306
6307
6308 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6309 return nil, false
6310 }
6311
6312
6313 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6314 return nil, false
6315 }
6316
6317
6318 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6319 return nil, false
6320 }
6321
6322
6323 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6324 return &avwsagpi, true
6325 }
6326
6327
6328
6329 type AzureVMWorkloadSQLDatabaseProtectableItem struct {
6330
6331 ParentName *string `json:"parentName,omitempty"`
6332
6333
6334 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6335
6336 ServerName *string `json:"serverName,omitempty"`
6337
6338 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6339
6340 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6341
6342 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6343
6344 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6345
6346 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6347
6348 BackupManagementType *string `json:"backupManagementType,omitempty"`
6349
6350 WorkloadType *string `json:"workloadType,omitempty"`
6351
6352 FriendlyName *string `json:"friendlyName,omitempty"`
6353
6354 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6355
6356 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6357 }
6358
6359
6360 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
6361 avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase
6362 objectMap := make(map[string]interface{})
6363 if avwsdpi.ParentName != nil {
6364 objectMap["parentName"] = avwsdpi.ParentName
6365 }
6366 if avwsdpi.ParentUniqueName != nil {
6367 objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName
6368 }
6369 if avwsdpi.ServerName != nil {
6370 objectMap["serverName"] = avwsdpi.ServerName
6371 }
6372 if avwsdpi.IsAutoProtectable != nil {
6373 objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable
6374 }
6375 if avwsdpi.IsAutoProtected != nil {
6376 objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected
6377 }
6378 if avwsdpi.Subinquireditemcount != nil {
6379 objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount
6380 }
6381 if avwsdpi.Subprotectableitemcount != nil {
6382 objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount
6383 }
6384 if avwsdpi.Prebackupvalidation != nil {
6385 objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation
6386 }
6387 if avwsdpi.BackupManagementType != nil {
6388 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6389 }
6390 if avwsdpi.WorkloadType != nil {
6391 objectMap["workloadType"] = avwsdpi.WorkloadType
6392 }
6393 if avwsdpi.FriendlyName != nil {
6394 objectMap["friendlyName"] = avwsdpi.FriendlyName
6395 }
6396 if avwsdpi.ProtectionState != "" {
6397 objectMap["protectionState"] = avwsdpi.ProtectionState
6398 }
6399 if avwsdpi.ProtectableItemType != "" {
6400 objectMap["protectableItemType"] = avwsdpi.ProtectableItemType
6401 }
6402 return json.Marshal(objectMap)
6403 }
6404
6405
6406 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6407 return nil, false
6408 }
6409
6410
6411 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6412 return nil, false
6413 }
6414
6415
6416 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6417 return nil, false
6418 }
6419
6420
6421 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6422 return nil, false
6423 }
6424
6425
6426 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6427 return &avwsdpi, true
6428 }
6429
6430
6431 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6432 return nil, false
6433 }
6434
6435
6436 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6437 return nil, false
6438 }
6439
6440
6441 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6442 return nil, false
6443 }
6444
6445
6446 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6447 return nil, false
6448 }
6449
6450
6451 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6452 return &avwsdpi, true
6453 }
6454
6455
6456 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6457 return nil, false
6458 }
6459
6460
6461 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6462 return nil, false
6463 }
6464
6465
6466 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6467 return nil, false
6468 }
6469
6470
6471 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6472 return nil, false
6473 }
6474
6475
6476 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6477 return &avwsdpi, true
6478 }
6479
6480
6481
6482 type AzureVMWorkloadSQLDatabaseProtectedItem struct {
6483
6484 FriendlyName *string `json:"friendlyName,omitempty"`
6485
6486 ServerName *string `json:"serverName,omitempty"`
6487
6488 ParentName *string `json:"parentName,omitempty"`
6489
6490 ParentType *string `json:"parentType,omitempty"`
6491
6492 ProtectionStatus *string `json:"protectionStatus,omitempty"`
6493
6494 ProtectionState ProtectionState `json:"protectionState,omitempty"`
6495
6496 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
6497
6498 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
6499
6500 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
6501
6502 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
6503
6504 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
6505
6506 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
6507
6508 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
6509
6510 WorkloadType DataSourceType `json:"workloadType,omitempty"`
6511
6512 ContainerName *string `json:"containerName,omitempty"`
6513
6514 SourceResourceID *string `json:"sourceResourceId,omitempty"`
6515
6516 PolicyID *string `json:"policyId,omitempty"`
6517
6518 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
6519
6520 BackupSetName *string `json:"backupSetName,omitempty"`
6521
6522 CreateMode CreateMode `json:"createMode,omitempty"`
6523
6524 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
6525
6526 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
6527
6528 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
6529
6530 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
6531
6532 IsRehydrate *bool `json:"isRehydrate,omitempty"`
6533
6534 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
6535 }
6536
6537
6538 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
6539 avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase
6540 objectMap := make(map[string]interface{})
6541 if avwsdpi.FriendlyName != nil {
6542 objectMap["friendlyName"] = avwsdpi.FriendlyName
6543 }
6544 if avwsdpi.ServerName != nil {
6545 objectMap["serverName"] = avwsdpi.ServerName
6546 }
6547 if avwsdpi.ParentName != nil {
6548 objectMap["parentName"] = avwsdpi.ParentName
6549 }
6550 if avwsdpi.ParentType != nil {
6551 objectMap["parentType"] = avwsdpi.ParentType
6552 }
6553 if avwsdpi.ProtectionStatus != nil {
6554 objectMap["protectionStatus"] = avwsdpi.ProtectionStatus
6555 }
6556 if avwsdpi.ProtectionState != "" {
6557 objectMap["protectionState"] = avwsdpi.ProtectionState
6558 }
6559 if avwsdpi.LastBackupStatus != "" {
6560 objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus
6561 }
6562 if avwsdpi.LastBackupTime != nil {
6563 objectMap["lastBackupTime"] = avwsdpi.LastBackupTime
6564 }
6565 if avwsdpi.LastBackupErrorDetail != nil {
6566 objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail
6567 }
6568 if avwsdpi.ProtectedItemDataSourceID != nil {
6569 objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID
6570 }
6571 if avwsdpi.ProtectedItemHealthStatus != "" {
6572 objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus
6573 }
6574 if avwsdpi.ExtendedInfo != nil {
6575 objectMap["extendedInfo"] = avwsdpi.ExtendedInfo
6576 }
6577 if avwsdpi.BackupManagementType != "" {
6578 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6579 }
6580 if avwsdpi.WorkloadType != "" {
6581 objectMap["workloadType"] = avwsdpi.WorkloadType
6582 }
6583 if avwsdpi.ContainerName != nil {
6584 objectMap["containerName"] = avwsdpi.ContainerName
6585 }
6586 if avwsdpi.SourceResourceID != nil {
6587 objectMap["sourceResourceId"] = avwsdpi.SourceResourceID
6588 }
6589 if avwsdpi.PolicyID != nil {
6590 objectMap["policyId"] = avwsdpi.PolicyID
6591 }
6592 if avwsdpi.LastRecoveryPoint != nil {
6593 objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint
6594 }
6595 if avwsdpi.BackupSetName != nil {
6596 objectMap["backupSetName"] = avwsdpi.BackupSetName
6597 }
6598 if avwsdpi.CreateMode != "" {
6599 objectMap["createMode"] = avwsdpi.CreateMode
6600 }
6601 if avwsdpi.DeferredDeleteTimeInUTC != nil {
6602 objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC
6603 }
6604 if avwsdpi.IsScheduledForDeferredDelete != nil {
6605 objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete
6606 }
6607 if avwsdpi.DeferredDeleteTimeRemaining != nil {
6608 objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining
6609 }
6610 if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil {
6611 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming
6612 }
6613 if avwsdpi.IsRehydrate != nil {
6614 objectMap["isRehydrate"] = avwsdpi.IsRehydrate
6615 }
6616 if avwsdpi.ProtectedItemType != "" {
6617 objectMap["protectedItemType"] = avwsdpi.ProtectedItemType
6618 }
6619 return json.Marshal(objectMap)
6620 }
6621
6622
6623 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
6624 return nil, false
6625 }
6626
6627
6628 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
6629 return nil, false
6630 }
6631
6632
6633 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
6634 return nil, false
6635 }
6636
6637
6638 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
6639 return nil, false
6640 }
6641
6642
6643 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
6644 return nil, false
6645 }
6646
6647
6648 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
6649 return nil, false
6650 }
6651
6652
6653 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
6654 return nil, false
6655 }
6656
6657
6658 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
6659 return &avwsdpi, true
6660 }
6661
6662
6663 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
6664 return nil, false
6665 }
6666
6667
6668 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
6669 return nil, false
6670 }
6671
6672
6673 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
6674 return &avwsdpi, true
6675 }
6676
6677
6678 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
6679 return nil, false
6680 }
6681
6682
6683 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
6684 return nil, false
6685 }
6686
6687
6688 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
6689 return nil, false
6690 }
6691
6692
6693 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
6694 return nil, false
6695 }
6696
6697
6698 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
6699 return &avwsdpi, true
6700 }
6701
6702
6703
6704 type AzureVMWorkloadSQLDatabaseWorkloadItem struct {
6705
6706 ParentName *string `json:"parentName,omitempty"`
6707
6708 ServerName *string `json:"serverName,omitempty"`
6709
6710 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6711
6712 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6713
6714 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6715
6716 BackupManagementType *string `json:"backupManagementType,omitempty"`
6717
6718 WorkloadType *string `json:"workloadType,omitempty"`
6719
6720 FriendlyName *string `json:"friendlyName,omitempty"`
6721
6722 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6723
6724 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6725 }
6726
6727
6728 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
6729 avwsdwi.WorkloadItemType = WorkloadItemTypeSQLDataBase1
6730 objectMap := make(map[string]interface{})
6731 if avwsdwi.ParentName != nil {
6732 objectMap["parentName"] = avwsdwi.ParentName
6733 }
6734 if avwsdwi.ServerName != nil {
6735 objectMap["serverName"] = avwsdwi.ServerName
6736 }
6737 if avwsdwi.IsAutoProtectable != nil {
6738 objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable
6739 }
6740 if avwsdwi.Subinquireditemcount != nil {
6741 objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount
6742 }
6743 if avwsdwi.SubWorkloadItemCount != nil {
6744 objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount
6745 }
6746 if avwsdwi.BackupManagementType != nil {
6747 objectMap["backupManagementType"] = avwsdwi.BackupManagementType
6748 }
6749 if avwsdwi.WorkloadType != nil {
6750 objectMap["workloadType"] = avwsdwi.WorkloadType
6751 }
6752 if avwsdwi.FriendlyName != nil {
6753 objectMap["friendlyName"] = avwsdwi.FriendlyName
6754 }
6755 if avwsdwi.ProtectionState != "" {
6756 objectMap["protectionState"] = avwsdwi.ProtectionState
6757 }
6758 if avwsdwi.WorkloadItemType != "" {
6759 objectMap["workloadItemType"] = avwsdwi.WorkloadItemType
6760 }
6761 return json.Marshal(objectMap)
6762 }
6763
6764
6765 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6766 return nil, false
6767 }
6768
6769
6770 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6771 return &avwsdwi, true
6772 }
6773
6774
6775 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6776 return nil, false
6777 }
6778
6779
6780 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6781 return nil, false
6782 }
6783
6784
6785 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6786 return nil, false
6787 }
6788
6789
6790 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6791 return nil, false
6792 }
6793
6794
6795 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6796 return &avwsdwi, true
6797 }
6798
6799
6800 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6801 return nil, false
6802 }
6803
6804
6805 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6806 return nil, false
6807 }
6808
6809
6810 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6811 return &avwsdwi, true
6812 }
6813
6814
6815
6816 type AzureVMWorkloadSQLInstanceProtectableItem struct {
6817
6818 ParentName *string `json:"parentName,omitempty"`
6819
6820
6821 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6822
6823 ServerName *string `json:"serverName,omitempty"`
6824
6825 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6826
6827 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6828
6829 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6830
6831 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6832
6833 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6834
6835 BackupManagementType *string `json:"backupManagementType,omitempty"`
6836
6837 WorkloadType *string `json:"workloadType,omitempty"`
6838
6839 FriendlyName *string `json:"friendlyName,omitempty"`
6840
6841 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6842
6843 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6844 }
6845
6846
6847 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) {
6848 avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance
6849 objectMap := make(map[string]interface{})
6850 if avwsipi.ParentName != nil {
6851 objectMap["parentName"] = avwsipi.ParentName
6852 }
6853 if avwsipi.ParentUniqueName != nil {
6854 objectMap["parentUniqueName"] = avwsipi.ParentUniqueName
6855 }
6856 if avwsipi.ServerName != nil {
6857 objectMap["serverName"] = avwsipi.ServerName
6858 }
6859 if avwsipi.IsAutoProtectable != nil {
6860 objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable
6861 }
6862 if avwsipi.IsAutoProtected != nil {
6863 objectMap["isAutoProtected"] = avwsipi.IsAutoProtected
6864 }
6865 if avwsipi.Subinquireditemcount != nil {
6866 objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount
6867 }
6868 if avwsipi.Subprotectableitemcount != nil {
6869 objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount
6870 }
6871 if avwsipi.Prebackupvalidation != nil {
6872 objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation
6873 }
6874 if avwsipi.BackupManagementType != nil {
6875 objectMap["backupManagementType"] = avwsipi.BackupManagementType
6876 }
6877 if avwsipi.WorkloadType != nil {
6878 objectMap["workloadType"] = avwsipi.WorkloadType
6879 }
6880 if avwsipi.FriendlyName != nil {
6881 objectMap["friendlyName"] = avwsipi.FriendlyName
6882 }
6883 if avwsipi.ProtectionState != "" {
6884 objectMap["protectionState"] = avwsipi.ProtectionState
6885 }
6886 if avwsipi.ProtectableItemType != "" {
6887 objectMap["protectableItemType"] = avwsipi.ProtectableItemType
6888 }
6889 return json.Marshal(objectMap)
6890 }
6891
6892
6893 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6894 return nil, false
6895 }
6896
6897
6898 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6899 return nil, false
6900 }
6901
6902
6903 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6904 return nil, false
6905 }
6906
6907
6908 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6909 return nil, false
6910 }
6911
6912
6913 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6914 return &avwsipi, true
6915 }
6916
6917
6918 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6919 return nil, false
6920 }
6921
6922
6923 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6924 return nil, false
6925 }
6926
6927
6928 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6929 return nil, false
6930 }
6931
6932
6933 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6934 return nil, false
6935 }
6936
6937
6938 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6939 return nil, false
6940 }
6941
6942
6943 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6944 return &avwsipi, true
6945 }
6946
6947
6948 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6949 return nil, false
6950 }
6951
6952
6953 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6954 return nil, false
6955 }
6956
6957
6958 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6959 return nil, false
6960 }
6961
6962
6963 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6964 return &avwsipi, true
6965 }
6966
6967
6968
6969 type AzureVMWorkloadSQLInstanceWorkloadItem struct {
6970
6971 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
6972
6973 ParentName *string `json:"parentName,omitempty"`
6974
6975 ServerName *string `json:"serverName,omitempty"`
6976
6977 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6978
6979 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6980
6981 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6982
6983 BackupManagementType *string `json:"backupManagementType,omitempty"`
6984
6985 WorkloadType *string `json:"workloadType,omitempty"`
6986
6987 FriendlyName *string `json:"friendlyName,omitempty"`
6988
6989 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6990
6991 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6992 }
6993
6994
6995 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) {
6996 avwsiwi.WorkloadItemType = WorkloadItemTypeSQLInstance1
6997 objectMap := make(map[string]interface{})
6998 if avwsiwi.DataDirectoryPaths != nil {
6999 objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths
7000 }
7001 if avwsiwi.ParentName != nil {
7002 objectMap["parentName"] = avwsiwi.ParentName
7003 }
7004 if avwsiwi.ServerName != nil {
7005 objectMap["serverName"] = avwsiwi.ServerName
7006 }
7007 if avwsiwi.IsAutoProtectable != nil {
7008 objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable
7009 }
7010 if avwsiwi.Subinquireditemcount != nil {
7011 objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount
7012 }
7013 if avwsiwi.SubWorkloadItemCount != nil {
7014 objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount
7015 }
7016 if avwsiwi.BackupManagementType != nil {
7017 objectMap["backupManagementType"] = avwsiwi.BackupManagementType
7018 }
7019 if avwsiwi.WorkloadType != nil {
7020 objectMap["workloadType"] = avwsiwi.WorkloadType
7021 }
7022 if avwsiwi.FriendlyName != nil {
7023 objectMap["friendlyName"] = avwsiwi.FriendlyName
7024 }
7025 if avwsiwi.ProtectionState != "" {
7026 objectMap["protectionState"] = avwsiwi.ProtectionState
7027 }
7028 if avwsiwi.WorkloadItemType != "" {
7029 objectMap["workloadItemType"] = avwsiwi.WorkloadItemType
7030 }
7031 return json.Marshal(objectMap)
7032 }
7033
7034
7035 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
7036 return nil, false
7037 }
7038
7039
7040 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
7041 return &avwsiwi, true
7042 }
7043
7044
7045 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
7046 return nil, false
7047 }
7048
7049
7050 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
7051 return nil, false
7052 }
7053
7054
7055 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
7056 return nil, false
7057 }
7058
7059
7060 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
7061 return nil, false
7062 }
7063
7064
7065 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
7066 return nil, false
7067 }
7068
7069
7070 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
7071 return &avwsiwi, true
7072 }
7073
7074
7075 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
7076 return nil, false
7077 }
7078
7079
7080 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
7081 return &avwsiwi, true
7082 }
7083
7084
7085 type BasicAzureWorkloadAutoProtectionIntent interface {
7086 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
7087 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
7088 }
7089
7090
7091 type AzureWorkloadAutoProtectionIntent struct {
7092
7093 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7094
7095 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7096
7097 ItemID *string `json:"itemId,omitempty"`
7098
7099 PolicyID *string `json:"policyId,omitempty"`
7100
7101 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7102
7103 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
7104 }
7105
7106 func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) {
7107 var m map[string]interface{}
7108 err := json.Unmarshal(body, &m)
7109 if err != nil {
7110 return nil, err
7111 }
7112
7113 switch m["protectionIntentItemType"] {
7114 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
7115 var awsapi AzureWorkloadSQLAutoProtectionIntent
7116 err := json.Unmarshal(body, &awsapi)
7117 return awsapi, err
7118 default:
7119 var awapi AzureWorkloadAutoProtectionIntent
7120 err := json.Unmarshal(body, &awapi)
7121 return awapi, err
7122 }
7123 }
7124 func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) {
7125 var rawMessages []*json.RawMessage
7126 err := json.Unmarshal(body, &rawMessages)
7127 if err != nil {
7128 return nil, err
7129 }
7130
7131 awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages))
7132
7133 for index, rawMessage := range rawMessages {
7134 awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage)
7135 if err != nil {
7136 return nil, err
7137 }
7138 awapiArray[index] = awapi
7139 }
7140 return awapiArray, nil
7141 }
7142
7143
7144 func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) {
7145 awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent
7146 objectMap := make(map[string]interface{})
7147 if awapi.BackupManagementType != "" {
7148 objectMap["backupManagementType"] = awapi.BackupManagementType
7149 }
7150 if awapi.SourceResourceID != nil {
7151 objectMap["sourceResourceId"] = awapi.SourceResourceID
7152 }
7153 if awapi.ItemID != nil {
7154 objectMap["itemId"] = awapi.ItemID
7155 }
7156 if awapi.PolicyID != nil {
7157 objectMap["policyId"] = awapi.PolicyID
7158 }
7159 if awapi.ProtectionState != "" {
7160 objectMap["protectionState"] = awapi.ProtectionState
7161 }
7162 if awapi.ProtectionIntentItemType != "" {
7163 objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType
7164 }
7165 return json.Marshal(objectMap)
7166 }
7167
7168
7169 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
7170 return nil, false
7171 }
7172
7173
7174 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
7175 return &awapi, true
7176 }
7177
7178
7179 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
7180 return nil, false
7181 }
7182
7183
7184 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
7185 return &awapi, true
7186 }
7187
7188
7189 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
7190 return &awapi, true
7191 }
7192
7193
7194 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
7195 return nil, false
7196 }
7197
7198
7199 func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
7200 return nil, false
7201 }
7202
7203
7204 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
7205 return &awapi, true
7206 }
7207
7208
7209 type AzureWorkloadBackupRequest struct {
7210
7211 BackupType TypeEnum `json:"backupType,omitempty"`
7212
7213 EnableCompression *bool `json:"enableCompression,omitempty"`
7214
7215 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
7216
7217 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
7218 }
7219
7220
7221 func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) {
7222 awbr.ObjectType = ObjectTypeAzureWorkloadBackupRequest
7223 objectMap := make(map[string]interface{})
7224 if awbr.BackupType != "" {
7225 objectMap["backupType"] = awbr.BackupType
7226 }
7227 if awbr.EnableCompression != nil {
7228 objectMap["enableCompression"] = awbr.EnableCompression
7229 }
7230 if awbr.RecoveryPointExpiryTimeInUTC != nil {
7231 objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC
7232 }
7233 if awbr.ObjectType != "" {
7234 objectMap["objectType"] = awbr.ObjectType
7235 }
7236 return json.Marshal(objectMap)
7237 }
7238
7239
7240 func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
7241 return nil, false
7242 }
7243
7244
7245 func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
7246 return &awbr, true
7247 }
7248
7249
7250 func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
7251 return nil, false
7252 }
7253
7254
7255 func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) {
7256 return nil, false
7257 }
7258
7259
7260 func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) {
7261 return &awbr, true
7262 }
7263
7264
7265 type BasicAzureWorkloadContainer interface {
7266 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
7267 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
7268 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
7269 }
7270
7271
7272 type AzureWorkloadContainer struct {
7273
7274 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7275
7276 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
7277
7278 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
7279
7280 WorkloadType WorkloadType `json:"workloadType,omitempty"`
7281
7282 OperationType OperationType `json:"operationType,omitempty"`
7283
7284 FriendlyName *string `json:"friendlyName,omitempty"`
7285
7286 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7287
7288 RegistrationStatus *string `json:"registrationStatus,omitempty"`
7289
7290 HealthStatus *string `json:"healthStatus,omitempty"`
7291
7292 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
7293 }
7294
7295 func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) {
7296 var m map[string]interface{}
7297 err := json.Unmarshal(body, &m)
7298 if err != nil {
7299 return nil, err
7300 }
7301
7302 switch m["containerType"] {
7303 case string(ContainerTypeSQLAGWorkLoadContainer1):
7304 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
7305 err := json.Unmarshal(body, &aswcpc)
7306 return aswcpc, err
7307 case string(ContainerTypeVMAppContainer1):
7308 var avacpc AzureVMAppContainerProtectionContainer
7309 err := json.Unmarshal(body, &avacpc)
7310 return avacpc, err
7311 default:
7312 var awc AzureWorkloadContainer
7313 err := json.Unmarshal(body, &awc)
7314 return awc, err
7315 }
7316 }
7317 func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) {
7318 var rawMessages []*json.RawMessage
7319 err := json.Unmarshal(body, &rawMessages)
7320 if err != nil {
7321 return nil, err
7322 }
7323
7324 awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages))
7325
7326 for index, rawMessage := range rawMessages {
7327 awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage)
7328 if err != nil {
7329 return nil, err
7330 }
7331 awcArray[index] = awc
7332 }
7333 return awcArray, nil
7334 }
7335
7336
7337 func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) {
7338 awc.ContainerType = ContainerTypeAzureWorkloadContainer
7339 objectMap := make(map[string]interface{})
7340 if awc.SourceResourceID != nil {
7341 objectMap["sourceResourceId"] = awc.SourceResourceID
7342 }
7343 if awc.LastUpdatedTime != nil {
7344 objectMap["lastUpdatedTime"] = awc.LastUpdatedTime
7345 }
7346 if awc.ExtendedInfo != nil {
7347 objectMap["extendedInfo"] = awc.ExtendedInfo
7348 }
7349 if awc.WorkloadType != "" {
7350 objectMap["workloadType"] = awc.WorkloadType
7351 }
7352 if awc.OperationType != "" {
7353 objectMap["operationType"] = awc.OperationType
7354 }
7355 if awc.FriendlyName != nil {
7356 objectMap["friendlyName"] = awc.FriendlyName
7357 }
7358 if awc.BackupManagementType != "" {
7359 objectMap["backupManagementType"] = awc.BackupManagementType
7360 }
7361 if awc.RegistrationStatus != nil {
7362 objectMap["registrationStatus"] = awc.RegistrationStatus
7363 }
7364 if awc.HealthStatus != nil {
7365 objectMap["healthStatus"] = awc.HealthStatus
7366 }
7367 if awc.ContainerType != "" {
7368 objectMap["containerType"] = awc.ContainerType
7369 }
7370 return json.Marshal(objectMap)
7371 }
7372
7373
7374 func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
7375 return nil, false
7376 }
7377
7378
7379 func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
7380 return nil, false
7381 }
7382
7383
7384 func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
7385 return nil, false
7386 }
7387
7388
7389 func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
7390 return nil, false
7391 }
7392
7393
7394 func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
7395 return nil, false
7396 }
7397
7398
7399 func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
7400 return nil, false
7401 }
7402
7403
7404 func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
7405 return nil, false
7406 }
7407
7408
7409 func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
7410 return &awc, true
7411 }
7412
7413
7414 func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
7415 return &awc, true
7416 }
7417
7418
7419 func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) {
7420 return nil, false
7421 }
7422
7423
7424 func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
7425 return nil, false
7426 }
7427
7428
7429 func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) {
7430 return nil, false
7431 }
7432
7433
7434 func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
7435 return nil, false
7436 }
7437
7438
7439 func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
7440 return nil, false
7441 }
7442
7443
7444 func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) {
7445 return nil, false
7446 }
7447
7448
7449 func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
7450 return nil, false
7451 }
7452
7453
7454 func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
7455 return &awc, true
7456 }
7457
7458
7459 type AzureWorkloadContainerExtendedInfo struct {
7460
7461 HostServerName *string `json:"hostServerName,omitempty"`
7462
7463 InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"`
7464
7465 NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"`
7466 }
7467
7468
7469 type AzureWorkloadErrorInfo struct {
7470
7471 ErrorCode *int32 `json:"errorCode,omitempty"`
7472
7473 ErrorString *string `json:"errorString,omitempty"`
7474
7475 ErrorTitle *string `json:"errorTitle,omitempty"`
7476
7477 Recommendations *[]string `json:"recommendations,omitempty"`
7478
7479 AdditionalDetails *string `json:"additionalDetails,omitempty"`
7480 }
7481
7482
7483 type AzureWorkloadJob struct {
7484
7485 WorkloadType *string `json:"workloadType,omitempty"`
7486
7487 Duration *string `json:"duration,omitempty"`
7488
7489 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
7490
7491 ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"`
7492
7493 ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"`
7494
7495 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
7496
7497 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7498
7499 Operation *string `json:"operation,omitempty"`
7500
7501 Status *string `json:"status,omitempty"`
7502
7503 StartTime *date.Time `json:"startTime,omitempty"`
7504
7505 EndTime *date.Time `json:"endTime,omitempty"`
7506
7507 ActivityID *string `json:"activityId,omitempty"`
7508
7509 JobType JobType `json:"jobType,omitempty"`
7510 }
7511
7512
7513 func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) {
7514 awj.JobType = JobTypeAzureWorkloadJob
7515 objectMap := make(map[string]interface{})
7516 if awj.WorkloadType != nil {
7517 objectMap["workloadType"] = awj.WorkloadType
7518 }
7519 if awj.Duration != nil {
7520 objectMap["duration"] = awj.Duration
7521 }
7522 if awj.ActionsInfo != nil {
7523 objectMap["actionsInfo"] = awj.ActionsInfo
7524 }
7525 if awj.ErrorDetails != nil {
7526 objectMap["errorDetails"] = awj.ErrorDetails
7527 }
7528 if awj.ExtendedInfo != nil {
7529 objectMap["extendedInfo"] = awj.ExtendedInfo
7530 }
7531 if awj.EntityFriendlyName != nil {
7532 objectMap["entityFriendlyName"] = awj.EntityFriendlyName
7533 }
7534 if awj.BackupManagementType != "" {
7535 objectMap["backupManagementType"] = awj.BackupManagementType
7536 }
7537 if awj.Operation != nil {
7538 objectMap["operation"] = awj.Operation
7539 }
7540 if awj.Status != nil {
7541 objectMap["status"] = awj.Status
7542 }
7543 if awj.StartTime != nil {
7544 objectMap["startTime"] = awj.StartTime
7545 }
7546 if awj.EndTime != nil {
7547 objectMap["endTime"] = awj.EndTime
7548 }
7549 if awj.ActivityID != nil {
7550 objectMap["activityId"] = awj.ActivityID
7551 }
7552 if awj.JobType != "" {
7553 objectMap["jobType"] = awj.JobType
7554 }
7555 return json.Marshal(objectMap)
7556 }
7557
7558
7559 func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
7560 return nil, false
7561 }
7562
7563
7564 func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
7565 return nil, false
7566 }
7567
7568
7569 func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
7570 return &awj, true
7571 }
7572
7573
7574 func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) {
7575 return nil, false
7576 }
7577
7578
7579 func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) {
7580 return nil, false
7581 }
7582
7583
7584 func (awj AzureWorkloadJob) AsJob() (*Job, bool) {
7585 return nil, false
7586 }
7587
7588
7589 func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) {
7590 return &awj, true
7591 }
7592
7593
7594 type AzureWorkloadJobExtendedInfo struct {
7595
7596 TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"`
7597
7598 PropertyBag map[string]*string `json:"propertyBag"`
7599
7600 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
7601 }
7602
7603
7604 func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) {
7605 objectMap := make(map[string]interface{})
7606 if awjei.TasksList != nil {
7607 objectMap["tasksList"] = awjei.TasksList
7608 }
7609 if awjei.PropertyBag != nil {
7610 objectMap["propertyBag"] = awjei.PropertyBag
7611 }
7612 if awjei.DynamicErrorMessage != nil {
7613 objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage
7614 }
7615 return json.Marshal(objectMap)
7616 }
7617
7618
7619 type AzureWorkloadJobTaskDetails struct {
7620
7621 TaskID *string `json:"taskId,omitempty"`
7622
7623 Status *string `json:"status,omitempty"`
7624 }
7625
7626
7627 type BasicAzureWorkloadPointInTimeRecoveryPoint interface {
7628 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
7629 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
7630 }
7631
7632
7633 type AzureWorkloadPointInTimeRecoveryPoint struct {
7634
7635 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
7636
7637 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
7638
7639 Type RestorePointType `json:"type,omitempty"`
7640
7641 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
7642 }
7643
7644 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
7645 var m map[string]interface{}
7646 err := json.Unmarshal(body, &m)
7647 if err != nil {
7648 return nil, err
7649 }
7650
7651 switch m["objectType"] {
7652 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
7653 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
7654 err := json.Unmarshal(body, &awshpitrp)
7655 return awshpitrp, err
7656 default:
7657 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
7658 err := json.Unmarshal(body, &awpitrp)
7659 return awpitrp, err
7660 }
7661 }
7662 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
7663 var rawMessages []*json.RawMessage
7664 err := json.Unmarshal(body, &rawMessages)
7665 if err != nil {
7666 return nil, err
7667 }
7668
7669 awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages))
7670
7671 for index, rawMessage := range rawMessages {
7672 awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage)
7673 if err != nil {
7674 return nil, err
7675 }
7676 awpitrpArray[index] = awpitrp
7677 }
7678 return awpitrpArray, nil
7679 }
7680
7681
7682 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
7683 awpitrp.ObjectType = ObjectTypeAzureWorkloadPointInTimeRecoveryPoint
7684 objectMap := make(map[string]interface{})
7685 if awpitrp.TimeRanges != nil {
7686 objectMap["timeRanges"] = awpitrp.TimeRanges
7687 }
7688 if awpitrp.ObjectType != "" {
7689 objectMap["objectType"] = awpitrp.ObjectType
7690 }
7691 return json.Marshal(objectMap)
7692 }
7693
7694
7695 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
7696 return nil, false
7697 }
7698
7699
7700 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
7701 return &awpitrp, true
7702 }
7703
7704
7705 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
7706 return &awpitrp, true
7707 }
7708
7709
7710 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
7711 return nil, false
7712 }
7713
7714
7715 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
7716 return &awpitrp, true
7717 }
7718
7719
7720 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
7721 return nil, false
7722 }
7723
7724
7725 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
7726 return nil, false
7727 }
7728
7729
7730 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
7731 return nil, false
7732 }
7733
7734
7735 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
7736 return nil, false
7737 }
7738
7739
7740 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
7741 return nil, false
7742 }
7743
7744
7745 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
7746 return nil, false
7747 }
7748
7749
7750 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
7751 return nil, false
7752 }
7753
7754
7755 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
7756 return nil, false
7757 }
7758
7759
7760 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
7761 return &awpitrp, true
7762 }
7763
7764
7765
7766 type AzureWorkloadPointInTimeRestoreRequest struct {
7767
7768 PointInTime *date.Time `json:"pointInTime,omitempty"`
7769
7770 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
7771
7772 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7773
7774 PropertyBag map[string]*string `json:"propertyBag"`
7775
7776 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
7777
7778 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
7779
7780 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
7781 }
7782
7783
7784 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
7785 awpitrr.ObjectType = ObjectTypeAzureWorkloadPointInTimeRestoreRequest
7786 objectMap := make(map[string]interface{})
7787 if awpitrr.PointInTime != nil {
7788 objectMap["pointInTime"] = awpitrr.PointInTime
7789 }
7790 if awpitrr.RecoveryType != "" {
7791 objectMap["recoveryType"] = awpitrr.RecoveryType
7792 }
7793 if awpitrr.SourceResourceID != nil {
7794 objectMap["sourceResourceId"] = awpitrr.SourceResourceID
7795 }
7796 if awpitrr.PropertyBag != nil {
7797 objectMap["propertyBag"] = awpitrr.PropertyBag
7798 }
7799 if awpitrr.TargetInfo != nil {
7800 objectMap["targetInfo"] = awpitrr.TargetInfo
7801 }
7802 if awpitrr.RecoveryMode != "" {
7803 objectMap["recoveryMode"] = awpitrr.RecoveryMode
7804 }
7805 if awpitrr.ObjectType != "" {
7806 objectMap["objectType"] = awpitrr.ObjectType
7807 }
7808 return json.Marshal(objectMap)
7809 }
7810
7811
7812 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
7813 return nil, false
7814 }
7815
7816
7817 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
7818 return &awpitrr, true
7819 }
7820
7821
7822 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
7823 return nil, false
7824 }
7825
7826
7827 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
7828 return &awpitrr, true
7829 }
7830
7831
7832 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
7833 return nil, false
7834 }
7835
7836
7837 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
7838 return nil, false
7839 }
7840
7841
7842 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
7843 return nil, false
7844 }
7845
7846
7847 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
7848 return nil, false
7849 }
7850
7851
7852 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
7853 return nil, false
7854 }
7855
7856
7857 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
7858 return nil, false
7859 }
7860
7861
7862 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
7863 return nil, false
7864 }
7865
7866
7867 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
7868 return nil, false
7869 }
7870
7871
7872 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
7873 return &awpitrr, true
7874 }
7875
7876
7877 type BasicAzureWorkloadRecoveryPoint interface {
7878 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
7879 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
7880 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
7881 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
7882 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
7883 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
7884 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
7885 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
7886 }
7887
7888
7889
7890 type AzureWorkloadRecoveryPoint struct {
7891
7892 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
7893
7894 Type RestorePointType `json:"type,omitempty"`
7895
7896 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
7897 }
7898
7899 func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) {
7900 var m map[string]interface{}
7901 err := json.Unmarshal(body, &m)
7902 if err != nil {
7903 return nil, err
7904 }
7905
7906 switch m["objectType"] {
7907 case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
7908 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
7909 err := json.Unmarshal(body, &awpitrp)
7910 return awpitrp, err
7911 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
7912 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
7913 err := json.Unmarshal(body, &awshpitrp)
7914 return awshpitrp, err
7915 case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
7916 var awshrp AzureWorkloadSAPHanaRecoveryPoint
7917 err := json.Unmarshal(body, &awshrp)
7918 return awshrp, err
7919 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
7920 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
7921 err := json.Unmarshal(body, &awspitrp)
7922 return awspitrp, err
7923 case string(ObjectTypeAzureWorkloadSQLRecoveryPoint):
7924 var awsrp AzureWorkloadSQLRecoveryPoint
7925 err := json.Unmarshal(body, &awsrp)
7926 return awsrp, err
7927 default:
7928 var awrp AzureWorkloadRecoveryPoint
7929 err := json.Unmarshal(body, &awrp)
7930 return awrp, err
7931 }
7932 }
7933 func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) {
7934 var rawMessages []*json.RawMessage
7935 err := json.Unmarshal(body, &rawMessages)
7936 if err != nil {
7937 return nil, err
7938 }
7939
7940 awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages))
7941
7942 for index, rawMessage := range rawMessages {
7943 awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage)
7944 if err != nil {
7945 return nil, err
7946 }
7947 awrpArray[index] = awrp
7948 }
7949 return awrpArray, nil
7950 }
7951
7952
7953 func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) {
7954 awrp.ObjectType = ObjectTypeAzureWorkloadRecoveryPoint
7955 objectMap := make(map[string]interface{})
7956 if awrp.ObjectType != "" {
7957 objectMap["objectType"] = awrp.ObjectType
7958 }
7959 return json.Marshal(objectMap)
7960 }
7961
7962
7963 func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
7964 return nil, false
7965 }
7966
7967
7968 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
7969 return nil, false
7970 }
7971
7972
7973 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
7974 return nil, false
7975 }
7976
7977
7978 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
7979 return &awrp, true
7980 }
7981
7982
7983 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
7984 return &awrp, true
7985 }
7986
7987
7988 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
7989 return nil, false
7990 }
7991
7992
7993 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
7994 return nil, false
7995 }
7996
7997
7998 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
7999 return nil, false
8000 }
8001
8002
8003 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8004 return nil, false
8005 }
8006
8007
8008 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8009 return nil, false
8010 }
8011
8012
8013 func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8014 return nil, false
8015 }
8016
8017
8018 func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8019 return nil, false
8020 }
8021
8022
8023 func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8024 return nil, false
8025 }
8026
8027
8028 func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8029 return &awrp, true
8030 }
8031
8032
8033 type BasicAzureWorkloadRestoreRequest interface {
8034 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
8035 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8036 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
8037 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
8038 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
8039 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
8040 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
8041 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
8042 }
8043
8044
8045 type AzureWorkloadRestoreRequest struct {
8046
8047 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8048
8049 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8050
8051 PropertyBag map[string]*string `json:"propertyBag"`
8052
8053 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8054
8055 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8056
8057 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8058 }
8059
8060 func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) {
8061 var m map[string]interface{}
8062 err := json.Unmarshal(body, &m)
8063 if err != nil {
8064 return nil, err
8065 }
8066
8067 switch m["objectType"] {
8068 case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest):
8069 var awpitrr AzureWorkloadPointInTimeRestoreRequest
8070 err := json.Unmarshal(body, &awpitrr)
8071 return awpitrr, err
8072 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
8073 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8074 err := json.Unmarshal(body, &awshpitrr)
8075 return awshpitrr, err
8076 case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest):
8077 var awshrr AzureWorkloadSAPHanaRestoreRequest
8078 err := json.Unmarshal(body, &awshrr)
8079 return awshrr, err
8080 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
8081 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
8082 err := json.Unmarshal(body, &awspitrr)
8083 return awspitrr, err
8084 case string(ObjectTypeAzureWorkloadSQLRestoreRequest):
8085 var awsrr AzureWorkloadSQLRestoreRequest
8086 err := json.Unmarshal(body, &awsrr)
8087 return awsrr, err
8088 default:
8089 var awrr AzureWorkloadRestoreRequest
8090 err := json.Unmarshal(body, &awrr)
8091 return awrr, err
8092 }
8093 }
8094 func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) {
8095 var rawMessages []*json.RawMessage
8096 err := json.Unmarshal(body, &rawMessages)
8097 if err != nil {
8098 return nil, err
8099 }
8100
8101 awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages))
8102
8103 for index, rawMessage := range rawMessages {
8104 awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage)
8105 if err != nil {
8106 return nil, err
8107 }
8108 awrrArray[index] = awrr
8109 }
8110 return awrrArray, nil
8111 }
8112
8113
8114 func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) {
8115 awrr.ObjectType = ObjectTypeAzureWorkloadRestoreRequest
8116 objectMap := make(map[string]interface{})
8117 if awrr.RecoveryType != "" {
8118 objectMap["recoveryType"] = awrr.RecoveryType
8119 }
8120 if awrr.SourceResourceID != nil {
8121 objectMap["sourceResourceId"] = awrr.SourceResourceID
8122 }
8123 if awrr.PropertyBag != nil {
8124 objectMap["propertyBag"] = awrr.PropertyBag
8125 }
8126 if awrr.TargetInfo != nil {
8127 objectMap["targetInfo"] = awrr.TargetInfo
8128 }
8129 if awrr.RecoveryMode != "" {
8130 objectMap["recoveryMode"] = awrr.RecoveryMode
8131 }
8132 if awrr.ObjectType != "" {
8133 objectMap["objectType"] = awrr.ObjectType
8134 }
8135 return json.Marshal(objectMap)
8136 }
8137
8138
8139 func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8140 return nil, false
8141 }
8142
8143
8144 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8145 return nil, false
8146 }
8147
8148
8149 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8150 return &awrr, true
8151 }
8152
8153
8154 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8155 return &awrr, true
8156 }
8157
8158
8159 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8160 return nil, false
8161 }
8162
8163
8164 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8165 return nil, false
8166 }
8167
8168
8169 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8170 return nil, false
8171 }
8172
8173
8174 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8175 return nil, false
8176 }
8177
8178
8179 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8180 return nil, false
8181 }
8182
8183
8184 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8185 return nil, false
8186 }
8187
8188
8189 func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8190 return nil, false
8191 }
8192
8193
8194 func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8195 return nil, false
8196 }
8197
8198
8199 func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8200 return &awrr, true
8201 }
8202
8203
8204 type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct {
8205
8206 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
8207
8208 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8209
8210 Type RestorePointType `json:"type,omitempty"`
8211
8212 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8213 }
8214
8215
8216 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
8217 awshpitrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint
8218 objectMap := make(map[string]interface{})
8219 if awshpitrp.TimeRanges != nil {
8220 objectMap["timeRanges"] = awshpitrp.TimeRanges
8221 }
8222 if awshpitrp.ObjectType != "" {
8223 objectMap["objectType"] = awshpitrp.ObjectType
8224 }
8225 return json.Marshal(objectMap)
8226 }
8227
8228
8229 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8230 return nil, false
8231 }
8232
8233
8234 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8235 return nil, false
8236 }
8237
8238
8239 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8240 return &awshpitrp, true
8241 }
8242
8243
8244 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8245 return nil, false
8246 }
8247
8248
8249 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8250 return &awshpitrp, true
8251 }
8252
8253
8254 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8255 return &awshpitrp, true
8256 }
8257
8258
8259 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8260 return nil, false
8261 }
8262
8263
8264 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8265 return nil, false
8266 }
8267
8268
8269 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8270 return nil, false
8271 }
8272
8273
8274 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8275 return nil, false
8276 }
8277
8278
8279 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8280 return nil, false
8281 }
8282
8283
8284 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8285 return nil, false
8286 }
8287
8288
8289 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8290 return nil, false
8291 }
8292
8293
8294 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8295 return &awshpitrp, true
8296 }
8297
8298
8299
8300 type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct {
8301
8302 PointInTime *date.Time `json:"pointInTime,omitempty"`
8303
8304 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8305
8306 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8307
8308 PropertyBag map[string]*string `json:"propertyBag"`
8309
8310 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8311
8312 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8313
8314 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8315 }
8316
8317
8318 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
8319 awshpitrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest
8320 objectMap := make(map[string]interface{})
8321 if awshpitrr.PointInTime != nil {
8322 objectMap["pointInTime"] = awshpitrr.PointInTime
8323 }
8324 if awshpitrr.RecoveryType != "" {
8325 objectMap["recoveryType"] = awshpitrr.RecoveryType
8326 }
8327 if awshpitrr.SourceResourceID != nil {
8328 objectMap["sourceResourceId"] = awshpitrr.SourceResourceID
8329 }
8330 if awshpitrr.PropertyBag != nil {
8331 objectMap["propertyBag"] = awshpitrr.PropertyBag
8332 }
8333 if awshpitrr.TargetInfo != nil {
8334 objectMap["targetInfo"] = awshpitrr.TargetInfo
8335 }
8336 if awshpitrr.RecoveryMode != "" {
8337 objectMap["recoveryMode"] = awshpitrr.RecoveryMode
8338 }
8339 if awshpitrr.ObjectType != "" {
8340 objectMap["objectType"] = awshpitrr.ObjectType
8341 }
8342 return json.Marshal(objectMap)
8343 }
8344
8345
8346 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8347 return nil, false
8348 }
8349
8350
8351 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8352 return nil, false
8353 }
8354
8355
8356 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8357 return nil, false
8358 }
8359
8360
8361 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8362 return &awshpitrr, true
8363 }
8364
8365
8366 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8367 return &awshpitrr, true
8368 }
8369
8370
8371 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8372 return nil, false
8373 }
8374
8375
8376 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8377 return &awshpitrr, true
8378 }
8379
8380
8381 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8382 return nil, false
8383 }
8384
8385
8386 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8387 return nil, false
8388 }
8389
8390
8391 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8392 return nil, false
8393 }
8394
8395
8396 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8397 return nil, false
8398 }
8399
8400
8401 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8402 return nil, false
8403 }
8404
8405
8406 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8407 return &awshpitrr, true
8408 }
8409
8410
8411
8412 type AzureWorkloadSAPHanaRecoveryPoint struct {
8413
8414 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8415
8416 Type RestorePointType `json:"type,omitempty"`
8417
8418 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8419 }
8420
8421
8422 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) {
8423 awshrp.ObjectType = ObjectTypeAzureWorkloadSAPHanaRecoveryPoint
8424 objectMap := make(map[string]interface{})
8425 if awshrp.ObjectType != "" {
8426 objectMap["objectType"] = awshrp.ObjectType
8427 }
8428 return json.Marshal(objectMap)
8429 }
8430
8431
8432 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8433 return nil, false
8434 }
8435
8436
8437 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8438 return nil, false
8439 }
8440
8441
8442 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8443 return nil, false
8444 }
8445
8446
8447 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8448 return nil, false
8449 }
8450
8451
8452 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8453 return &awshrp, true
8454 }
8455
8456
8457 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8458 return nil, false
8459 }
8460
8461
8462 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8463 return &awshrp, true
8464 }
8465
8466
8467 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8468 return nil, false
8469 }
8470
8471
8472 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8473 return nil, false
8474 }
8475
8476
8477 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8478 return nil, false
8479 }
8480
8481
8482 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8483 return nil, false
8484 }
8485
8486
8487 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8488 return nil, false
8489 }
8490
8491
8492 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8493 return nil, false
8494 }
8495
8496
8497 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8498 return &awshrp, true
8499 }
8500
8501
8502 type BasicAzureWorkloadSAPHanaRestoreRequest interface {
8503 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8504 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
8505 }
8506
8507
8508 type AzureWorkloadSAPHanaRestoreRequest struct {
8509
8510 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8511
8512 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8513
8514 PropertyBag map[string]*string `json:"propertyBag"`
8515
8516 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8517
8518 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8519
8520 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8521 }
8522
8523 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) {
8524 var m map[string]interface{}
8525 err := json.Unmarshal(body, &m)
8526 if err != nil {
8527 return nil, err
8528 }
8529
8530 switch m["objectType"] {
8531 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
8532 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8533 err := json.Unmarshal(body, &awshpitrr)
8534 return awshpitrr, err
8535 default:
8536 var awshrr AzureWorkloadSAPHanaRestoreRequest
8537 err := json.Unmarshal(body, &awshrr)
8538 return awshrr, err
8539 }
8540 }
8541 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) {
8542 var rawMessages []*json.RawMessage
8543 err := json.Unmarshal(body, &rawMessages)
8544 if err != nil {
8545 return nil, err
8546 }
8547
8548 awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages))
8549
8550 for index, rawMessage := range rawMessages {
8551 awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage)
8552 if err != nil {
8553 return nil, err
8554 }
8555 awshrrArray[index] = awshrr
8556 }
8557 return awshrrArray, nil
8558 }
8559
8560
8561 func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) {
8562 awshrr.ObjectType = ObjectTypeAzureWorkloadSAPHanaRestoreRequest
8563 objectMap := make(map[string]interface{})
8564 if awshrr.RecoveryType != "" {
8565 objectMap["recoveryType"] = awshrr.RecoveryType
8566 }
8567 if awshrr.SourceResourceID != nil {
8568 objectMap["sourceResourceId"] = awshrr.SourceResourceID
8569 }
8570 if awshrr.PropertyBag != nil {
8571 objectMap["propertyBag"] = awshrr.PropertyBag
8572 }
8573 if awshrr.TargetInfo != nil {
8574 objectMap["targetInfo"] = awshrr.TargetInfo
8575 }
8576 if awshrr.RecoveryMode != "" {
8577 objectMap["recoveryMode"] = awshrr.RecoveryMode
8578 }
8579 if awshrr.ObjectType != "" {
8580 objectMap["objectType"] = awshrr.ObjectType
8581 }
8582 return json.Marshal(objectMap)
8583 }
8584
8585
8586 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8587 return nil, false
8588 }
8589
8590
8591 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8592 return nil, false
8593 }
8594
8595
8596 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8597 return nil, false
8598 }
8599
8600
8601 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8602 return &awshrr, true
8603 }
8604
8605
8606 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8607 return nil, false
8608 }
8609
8610
8611 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8612 return &awshrr, true
8613 }
8614
8615
8616 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8617 return &awshrr, true
8618 }
8619
8620
8621 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8622 return nil, false
8623 }
8624
8625
8626 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8627 return nil, false
8628 }
8629
8630
8631 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8632 return nil, false
8633 }
8634
8635
8636 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8637 return nil, false
8638 }
8639
8640
8641 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8642 return nil, false
8643 }
8644
8645
8646 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8647 return &awshrr, true
8648 }
8649
8650
8651 type AzureWorkloadSQLAutoProtectionIntent struct {
8652
8653 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
8654
8655 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
8656
8657 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8658
8659 ItemID *string `json:"itemId,omitempty"`
8660
8661 PolicyID *string `json:"policyId,omitempty"`
8662
8663 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
8664
8665 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
8666 }
8667
8668
8669 func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) {
8670 awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent
8671 objectMap := make(map[string]interface{})
8672 if awsapi.WorkloadItemType != "" {
8673 objectMap["workloadItemType"] = awsapi.WorkloadItemType
8674 }
8675 if awsapi.BackupManagementType != "" {
8676 objectMap["backupManagementType"] = awsapi.BackupManagementType
8677 }
8678 if awsapi.SourceResourceID != nil {
8679 objectMap["sourceResourceId"] = awsapi.SourceResourceID
8680 }
8681 if awsapi.ItemID != nil {
8682 objectMap["itemId"] = awsapi.ItemID
8683 }
8684 if awsapi.PolicyID != nil {
8685 objectMap["policyId"] = awsapi.PolicyID
8686 }
8687 if awsapi.ProtectionState != "" {
8688 objectMap["protectionState"] = awsapi.ProtectionState
8689 }
8690 if awsapi.ProtectionIntentItemType != "" {
8691 objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType
8692 }
8693 return json.Marshal(objectMap)
8694 }
8695
8696
8697 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
8698 return nil, false
8699 }
8700
8701
8702 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
8703 return &awsapi, true
8704 }
8705
8706
8707 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
8708 return nil, false
8709 }
8710
8711
8712 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
8713 return nil, false
8714 }
8715
8716
8717 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
8718 return &awsapi, true
8719 }
8720
8721
8722 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
8723 return &awsapi, true
8724 }
8725
8726
8727 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
8728 return nil, false
8729 }
8730
8731
8732 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
8733 return &awsapi, true
8734 }
8735
8736
8737 type AzureWorkloadSQLPointInTimeRecoveryPoint struct {
8738
8739 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
8740
8741
8742
8743 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
8744
8745 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8746
8747 Type RestorePointType `json:"type,omitempty"`
8748
8749 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8750 }
8751
8752
8753 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
8754 awspitrp.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint
8755 objectMap := make(map[string]interface{})
8756 if awspitrp.TimeRanges != nil {
8757 objectMap["timeRanges"] = awspitrp.TimeRanges
8758 }
8759 if awspitrp.ExtendedInfo != nil {
8760 objectMap["extendedInfo"] = awspitrp.ExtendedInfo
8761 }
8762 if awspitrp.ObjectType != "" {
8763 objectMap["objectType"] = awspitrp.ObjectType
8764 }
8765 return json.Marshal(objectMap)
8766 }
8767
8768
8769 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8770 return nil, false
8771 }
8772
8773
8774 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8775 return nil, false
8776 }
8777
8778
8779 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8780 return nil, false
8781 }
8782
8783
8784 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8785 return nil, false
8786 }
8787
8788
8789 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8790 return &awspitrp, true
8791 }
8792
8793
8794 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8795 return nil, false
8796 }
8797
8798
8799 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8800 return nil, false
8801 }
8802
8803
8804 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8805 return &awspitrp, true
8806 }
8807
8808
8809 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8810 return nil, false
8811 }
8812
8813
8814 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8815 return &awspitrp, true
8816 }
8817
8818
8819 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8820 return nil, false
8821 }
8822
8823
8824 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8825 return nil, false
8826 }
8827
8828
8829 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8830 return nil, false
8831 }
8832
8833
8834 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8835 return &awspitrp, true
8836 }
8837
8838
8839
8840 type AzureWorkloadSQLPointInTimeRestoreRequest struct {
8841
8842 PointInTime *date.Time `json:"pointInTime,omitempty"`
8843
8844 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
8845
8846 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
8847
8848 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
8849
8850 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8851
8852 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8853
8854 PropertyBag map[string]*string `json:"propertyBag"`
8855
8856 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8857
8858 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8859
8860 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8861 }
8862
8863
8864 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
8865 awspitrr.ObjectType = ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest
8866 objectMap := make(map[string]interface{})
8867 if awspitrr.PointInTime != nil {
8868 objectMap["pointInTime"] = awspitrr.PointInTime
8869 }
8870 if awspitrr.ShouldUseAlternateTargetLocation != nil {
8871 objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation
8872 }
8873 if awspitrr.IsNonRecoverable != nil {
8874 objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable
8875 }
8876 if awspitrr.AlternateDirectoryPaths != nil {
8877 objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths
8878 }
8879 if awspitrr.RecoveryType != "" {
8880 objectMap["recoveryType"] = awspitrr.RecoveryType
8881 }
8882 if awspitrr.SourceResourceID != nil {
8883 objectMap["sourceResourceId"] = awspitrr.SourceResourceID
8884 }
8885 if awspitrr.PropertyBag != nil {
8886 objectMap["propertyBag"] = awspitrr.PropertyBag
8887 }
8888 if awspitrr.TargetInfo != nil {
8889 objectMap["targetInfo"] = awspitrr.TargetInfo
8890 }
8891 if awspitrr.RecoveryMode != "" {
8892 objectMap["recoveryMode"] = awspitrr.RecoveryMode
8893 }
8894 if awspitrr.ObjectType != "" {
8895 objectMap["objectType"] = awspitrr.ObjectType
8896 }
8897 return json.Marshal(objectMap)
8898 }
8899
8900
8901 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8902 return nil, false
8903 }
8904
8905
8906 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8907 return nil, false
8908 }
8909
8910
8911 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8912 return nil, false
8913 }
8914
8915
8916 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8917 return &awspitrr, true
8918 }
8919
8920
8921 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8922 return nil, false
8923 }
8924
8925
8926 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8927 return nil, false
8928 }
8929
8930
8931 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8932 return nil, false
8933 }
8934
8935
8936 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8937 return &awspitrr, true
8938 }
8939
8940
8941 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8942 return nil, false
8943 }
8944
8945
8946 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8947 return &awspitrr, true
8948 }
8949
8950
8951 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8952 return nil, false
8953 }
8954
8955
8956 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8957 return nil, false
8958 }
8959
8960
8961 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8962 return &awspitrr, true
8963 }
8964
8965
8966
8967 type BasicAzureWorkloadSQLRecoveryPoint interface {
8968 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
8969 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
8970 }
8971
8972
8973
8974 type AzureWorkloadSQLRecoveryPoint struct {
8975
8976
8977
8978 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
8979
8980 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8981
8982 Type RestorePointType `json:"type,omitempty"`
8983
8984 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8985 }
8986
8987 func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) {
8988 var m map[string]interface{}
8989 err := json.Unmarshal(body, &m)
8990 if err != nil {
8991 return nil, err
8992 }
8993
8994 switch m["objectType"] {
8995 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
8996 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
8997 err := json.Unmarshal(body, &awspitrp)
8998 return awspitrp, err
8999 default:
9000 var awsrp AzureWorkloadSQLRecoveryPoint
9001 err := json.Unmarshal(body, &awsrp)
9002 return awsrp, err
9003 }
9004 }
9005 func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) {
9006 var rawMessages []*json.RawMessage
9007 err := json.Unmarshal(body, &rawMessages)
9008 if err != nil {
9009 return nil, err
9010 }
9011
9012 awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages))
9013
9014 for index, rawMessage := range rawMessages {
9015 awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage)
9016 if err != nil {
9017 return nil, err
9018 }
9019 awsrpArray[index] = awsrp
9020 }
9021 return awsrpArray, nil
9022 }
9023
9024
9025 func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) {
9026 awsrp.ObjectType = ObjectTypeAzureWorkloadSQLRecoveryPoint
9027 objectMap := make(map[string]interface{})
9028 if awsrp.ExtendedInfo != nil {
9029 objectMap["extendedInfo"] = awsrp.ExtendedInfo
9030 }
9031 if awsrp.ObjectType != "" {
9032 objectMap["objectType"] = awsrp.ObjectType
9033 }
9034 return json.Marshal(objectMap)
9035 }
9036
9037
9038 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
9039 return nil, false
9040 }
9041
9042
9043 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9044 return nil, false
9045 }
9046
9047
9048 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9049 return nil, false
9050 }
9051
9052
9053 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9054 return nil, false
9055 }
9056
9057
9058 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9059 return &awsrp, true
9060 }
9061
9062
9063 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9064 return nil, false
9065 }
9066
9067
9068 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9069 return nil, false
9070 }
9071
9072
9073 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9074 return nil, false
9075 }
9076
9077
9078 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9079 return &awsrp, true
9080 }
9081
9082
9083 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9084 return &awsrp, true
9085 }
9086
9087
9088 func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9089 return nil, false
9090 }
9091
9092
9093 func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9094 return nil, false
9095 }
9096
9097
9098 func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9099 return nil, false
9100 }
9101
9102
9103 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9104 return &awsrp, true
9105 }
9106
9107
9108 type AzureWorkloadSQLRecoveryPointExtendedInfo struct {
9109
9110 DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"`
9111
9112 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
9113 }
9114
9115
9116 func (awsrpei AzureWorkloadSQLRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) {
9117 objectMap := make(map[string]interface{})
9118 return json.Marshal(objectMap)
9119 }
9120
9121
9122 type BasicAzureWorkloadSQLRestoreRequest interface {
9123 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
9124 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
9125 }
9126
9127
9128 type AzureWorkloadSQLRestoreRequest struct {
9129
9130 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
9131
9132 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
9133
9134 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
9135
9136 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9137
9138 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9139
9140 PropertyBag map[string]*string `json:"propertyBag"`
9141
9142 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9143
9144 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9145
9146 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9147 }
9148
9149 func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) {
9150 var m map[string]interface{}
9151 err := json.Unmarshal(body, &m)
9152 if err != nil {
9153 return nil, err
9154 }
9155
9156 switch m["objectType"] {
9157 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
9158 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
9159 err := json.Unmarshal(body, &awspitrr)
9160 return awspitrr, err
9161 default:
9162 var awsrr AzureWorkloadSQLRestoreRequest
9163 err := json.Unmarshal(body, &awsrr)
9164 return awsrr, err
9165 }
9166 }
9167 func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) {
9168 var rawMessages []*json.RawMessage
9169 err := json.Unmarshal(body, &rawMessages)
9170 if err != nil {
9171 return nil, err
9172 }
9173
9174 awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages))
9175
9176 for index, rawMessage := range rawMessages {
9177 awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage)
9178 if err != nil {
9179 return nil, err
9180 }
9181 awsrrArray[index] = awsrr
9182 }
9183 return awsrrArray, nil
9184 }
9185
9186
9187 func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) {
9188 awsrr.ObjectType = ObjectTypeAzureWorkloadSQLRestoreRequest
9189 objectMap := make(map[string]interface{})
9190 if awsrr.ShouldUseAlternateTargetLocation != nil {
9191 objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation
9192 }
9193 if awsrr.IsNonRecoverable != nil {
9194 objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable
9195 }
9196 if awsrr.AlternateDirectoryPaths != nil {
9197 objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths
9198 }
9199 if awsrr.RecoveryType != "" {
9200 objectMap["recoveryType"] = awsrr.RecoveryType
9201 }
9202 if awsrr.SourceResourceID != nil {
9203 objectMap["sourceResourceId"] = awsrr.SourceResourceID
9204 }
9205 if awsrr.PropertyBag != nil {
9206 objectMap["propertyBag"] = awsrr.PropertyBag
9207 }
9208 if awsrr.TargetInfo != nil {
9209 objectMap["targetInfo"] = awsrr.TargetInfo
9210 }
9211 if awsrr.RecoveryMode != "" {
9212 objectMap["recoveryMode"] = awsrr.RecoveryMode
9213 }
9214 if awsrr.ObjectType != "" {
9215 objectMap["objectType"] = awsrr.ObjectType
9216 }
9217 return json.Marshal(objectMap)
9218 }
9219
9220
9221 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9222 return nil, false
9223 }
9224
9225
9226 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9227 return nil, false
9228 }
9229
9230
9231 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9232 return nil, false
9233 }
9234
9235
9236 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9237 return &awsrr, true
9238 }
9239
9240
9241 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9242 return nil, false
9243 }
9244
9245
9246 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9247 return nil, false
9248 }
9249
9250
9251 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9252 return nil, false
9253 }
9254
9255
9256 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9257 return nil, false
9258 }
9259
9260
9261 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9262 return &awsrr, true
9263 }
9264
9265
9266 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9267 return &awsrr, true
9268 }
9269
9270
9271 func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9272 return nil, false
9273 }
9274
9275
9276 func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9277 return nil, false
9278 }
9279
9280
9281 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9282 return &awsrr, true
9283 }
9284
9285
9286 type BEKDetails struct {
9287
9288 SecretURL *string `json:"secretUrl,omitempty"`
9289
9290 SecretVaultID *string `json:"secretVaultId,omitempty"`
9291
9292 SecretData *string `json:"secretData,omitempty"`
9293 }
9294
9295
9296 type BMSBackupEngineQueryObject struct {
9297
9298 Expand *string `json:"expand,omitempty"`
9299 }
9300
9301
9302 type BMSBackupEnginesQueryObject struct {
9303
9304 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9305
9306 FriendlyName *string `json:"friendlyName,omitempty"`
9307
9308 Expand *string `json:"expand,omitempty"`
9309 }
9310
9311
9312 type BMSBackupSummariesQueryObject struct {
9313
9314 Type Type `json:"type,omitempty"`
9315 }
9316
9317
9318 type BMSContainerQueryObject struct {
9319
9320 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9321
9322 ContainerType ContainerType `json:"containerType,omitempty"`
9323
9324 BackupEngineName *string `json:"backupEngineName,omitempty"`
9325
9326 FabricName *string `json:"fabricName,omitempty"`
9327
9328 Status *string `json:"status,omitempty"`
9329
9330 FriendlyName *string `json:"friendlyName,omitempty"`
9331 }
9332
9333
9334 type BMSContainersInquiryQueryObject struct {
9335
9336 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9337
9338 WorkloadType WorkloadType `json:"workloadType,omitempty"`
9339 }
9340
9341
9342 type BMSPOQueryObject struct {
9343
9344 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9345
9346 WorkloadType WorkloadType `json:"workloadType,omitempty"`
9347
9348 ContainerName *string `json:"containerName,omitempty"`
9349
9350 Status *string `json:"status,omitempty"`
9351
9352 FriendlyName *string `json:"friendlyName,omitempty"`
9353 }
9354
9355
9356 type BMSRefreshContainersQueryObject struct {
9357
9358 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9359 }
9360
9361
9362 type BMSRPQueryObject struct {
9363
9364 StartDate *date.Time `json:"startDate,omitempty"`
9365
9366 EndDate *date.Time `json:"endDate,omitempty"`
9367
9368 RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"`
9369
9370 ExtendedInfo *bool `json:"extendedInfo,omitempty"`
9371 }
9372
9373
9374 type BMSWorkloadItemQueryObject struct {
9375
9376 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9377
9378 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
9379
9380 WorkloadType WorkloadType `json:"workloadType,omitempty"`
9381
9382 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
9383 }
9384
9385
9386 type ClientDiscoveryDisplay struct {
9387
9388 Provider *string `json:"provider,omitempty"`
9389
9390 Resource *string `json:"resource,omitempty"`
9391
9392 Operation *string `json:"operation,omitempty"`
9393
9394 Description *string `json:"description,omitempty"`
9395 }
9396
9397
9398
9399 type ClientDiscoveryForLogSpecification struct {
9400
9401 Name *string `json:"name,omitempty"`
9402
9403 DisplayName *string `json:"displayName,omitempty"`
9404
9405 BlobDuration *string `json:"blobDuration,omitempty"`
9406 }
9407
9408
9409 type ClientDiscoveryForProperties struct {
9410
9411 ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"`
9412 }
9413
9414
9415
9416 type ClientDiscoveryForServiceSpecification struct {
9417
9418 LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"`
9419 }
9420
9421
9422 type ClientDiscoveryResponse struct {
9423 autorest.Response `json:"-"`
9424
9425 Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"`
9426
9427 NextLink *string `json:"nextLink,omitempty"`
9428 }
9429
9430
9431
9432 type ClientDiscoveryResponseIterator struct {
9433 i int
9434 page ClientDiscoveryResponsePage
9435 }
9436
9437
9438
9439 func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) {
9440 if tracing.IsEnabled() {
9441 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext")
9442 defer func() {
9443 sc := -1
9444 if iter.Response().Response.Response != nil {
9445 sc = iter.Response().Response.Response.StatusCode
9446 }
9447 tracing.EndSpan(ctx, sc, err)
9448 }()
9449 }
9450 iter.i++
9451 if iter.i < len(iter.page.Values()) {
9452 return nil
9453 }
9454 err = iter.page.NextWithContext(ctx)
9455 if err != nil {
9456 iter.i--
9457 return err
9458 }
9459 iter.i = 0
9460 return nil
9461 }
9462
9463
9464
9465
9466 func (iter *ClientDiscoveryResponseIterator) Next() error {
9467 return iter.NextWithContext(context.Background())
9468 }
9469
9470
9471 func (iter ClientDiscoveryResponseIterator) NotDone() bool {
9472 return iter.page.NotDone() && iter.i < len(iter.page.Values())
9473 }
9474
9475
9476 func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse {
9477 return iter.page.Response()
9478 }
9479
9480
9481
9482 func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI {
9483 if !iter.page.NotDone() {
9484 return ClientDiscoveryValueForSingleAPI{}
9485 }
9486 return iter.page.Values()[iter.i]
9487 }
9488
9489
9490 func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator {
9491 return ClientDiscoveryResponseIterator{page: page}
9492 }
9493
9494
9495 func (cdr ClientDiscoveryResponse) IsEmpty() bool {
9496 return cdr.Value == nil || len(*cdr.Value) == 0
9497 }
9498
9499
9500 func (cdr ClientDiscoveryResponse) hasNextLink() bool {
9501 return cdr.NextLink != nil && len(*cdr.NextLink) != 0
9502 }
9503
9504
9505
9506 func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) {
9507 if !cdr.hasNextLink() {
9508 return nil, nil
9509 }
9510 return autorest.Prepare((&http.Request{}).WithContext(ctx),
9511 autorest.AsJSON(),
9512 autorest.AsGet(),
9513 autorest.WithBaseURL(to.String(cdr.NextLink)))
9514 }
9515
9516
9517 type ClientDiscoveryResponsePage struct {
9518 fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)
9519 cdr ClientDiscoveryResponse
9520 }
9521
9522
9523
9524 func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) {
9525 if tracing.IsEnabled() {
9526 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext")
9527 defer func() {
9528 sc := -1
9529 if page.Response().Response.Response != nil {
9530 sc = page.Response().Response.Response.StatusCode
9531 }
9532 tracing.EndSpan(ctx, sc, err)
9533 }()
9534 }
9535 for {
9536 next, err := page.fn(ctx, page.cdr)
9537 if err != nil {
9538 return err
9539 }
9540 page.cdr = next
9541 if !next.hasNextLink() || !next.IsEmpty() {
9542 break
9543 }
9544 }
9545 return nil
9546 }
9547
9548
9549
9550
9551 func (page *ClientDiscoveryResponsePage) Next() error {
9552 return page.NextWithContext(context.Background())
9553 }
9554
9555
9556 func (page ClientDiscoveryResponsePage) NotDone() bool {
9557 return !page.cdr.IsEmpty()
9558 }
9559
9560
9561 func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse {
9562 return page.cdr
9563 }
9564
9565
9566 func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI {
9567 if page.cdr.IsEmpty() {
9568 return nil
9569 }
9570 return *page.cdr.Value
9571 }
9572
9573
9574 func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage {
9575 return ClientDiscoveryResponsePage{
9576 fn: getNextPage,
9577 cdr: cur,
9578 }
9579 }
9580
9581
9582 type ClientDiscoveryValueForSingleAPI struct {
9583
9584 Name *string `json:"name,omitempty"`
9585
9586 Display *ClientDiscoveryDisplay `json:"display,omitempty"`
9587
9588 Origin *string `json:"origin,omitempty"`
9589
9590 Properties *ClientDiscoveryForProperties `json:"properties,omitempty"`
9591 }
9592
9593
9594 type ClientScriptForConnect struct {
9595
9596 ScriptContent *string `json:"scriptContent,omitempty"`
9597
9598 ScriptExtension *string `json:"scriptExtension,omitempty"`
9599
9600 OsType *string `json:"osType,omitempty"`
9601
9602 URL *string `json:"url,omitempty"`
9603
9604
9605 ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"`
9606 }
9607
9608
9609 type ContainerIdentityInfo struct {
9610
9611 UniqueName *string `json:"uniqueName,omitempty"`
9612
9613 AadTenantID *string `json:"aadTenantId,omitempty"`
9614
9615 ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
9616
9617 Audience *string `json:"audience,omitempty"`
9618 }
9619
9620
9621 type DailyRetentionFormat struct {
9622
9623 DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"`
9624 }
9625
9626
9627 type DailyRetentionSchedule struct {
9628
9629 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
9630
9631 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
9632 }
9633
9634
9635 type Day struct {
9636
9637 Date *int32 `json:"date,omitempty"`
9638
9639 IsLast *bool `json:"isLast,omitempty"`
9640 }
9641
9642
9643 type DiskExclusionProperties struct {
9644
9645 DiskLunList *[]int32 `json:"diskLunList,omitempty"`
9646
9647 IsInclusionList *bool `json:"isInclusionList,omitempty"`
9648 }
9649
9650
9651 type DiskInformation struct {
9652 Lun *int32 `json:"lun,omitempty"`
9653 Name *string `json:"name,omitempty"`
9654 }
9655
9656
9657 type DistributedNodesInfo struct {
9658
9659 NodeName *string `json:"nodeName,omitempty"`
9660
9661
9662 Status *string `json:"status,omitempty"`
9663
9664 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
9665 }
9666
9667
9668 type DpmBackupEngine struct {
9669
9670 FriendlyName *string `json:"friendlyName,omitempty"`
9671
9672 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9673
9674 RegistrationStatus *string `json:"registrationStatus,omitempty"`
9675
9676 BackupEngineState *string `json:"backupEngineState,omitempty"`
9677
9678 HealthStatus *string `json:"healthStatus,omitempty"`
9679
9680 CanReRegister *bool `json:"canReRegister,omitempty"`
9681
9682 BackupEngineID *string `json:"backupEngineId,omitempty"`
9683
9684 DpmVersion *string `json:"dpmVersion,omitempty"`
9685
9686 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
9687
9688 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
9689
9690 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
9691
9692 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
9693
9694 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
9695 }
9696
9697
9698 func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) {
9699 dbe.BackupEngineType = BackupEngineTypeDpmBackupEngine
9700 objectMap := make(map[string]interface{})
9701 if dbe.FriendlyName != nil {
9702 objectMap["friendlyName"] = dbe.FriendlyName
9703 }
9704 if dbe.BackupManagementType != "" {
9705 objectMap["backupManagementType"] = dbe.BackupManagementType
9706 }
9707 if dbe.RegistrationStatus != nil {
9708 objectMap["registrationStatus"] = dbe.RegistrationStatus
9709 }
9710 if dbe.BackupEngineState != nil {
9711 objectMap["backupEngineState"] = dbe.BackupEngineState
9712 }
9713 if dbe.HealthStatus != nil {
9714 objectMap["healthStatus"] = dbe.HealthStatus
9715 }
9716 if dbe.CanReRegister != nil {
9717 objectMap["canReRegister"] = dbe.CanReRegister
9718 }
9719 if dbe.BackupEngineID != nil {
9720 objectMap["backupEngineId"] = dbe.BackupEngineID
9721 }
9722 if dbe.DpmVersion != nil {
9723 objectMap["dpmVersion"] = dbe.DpmVersion
9724 }
9725 if dbe.AzureBackupAgentVersion != nil {
9726 objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion
9727 }
9728 if dbe.IsAzureBackupAgentUpgradeAvailable != nil {
9729 objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable
9730 }
9731 if dbe.IsDpmUpgradeAvailable != nil {
9732 objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable
9733 }
9734 if dbe.ExtendedInfo != nil {
9735 objectMap["extendedInfo"] = dbe.ExtendedInfo
9736 }
9737 if dbe.BackupEngineType != "" {
9738 objectMap["backupEngineType"] = dbe.BackupEngineType
9739 }
9740 return json.Marshal(objectMap)
9741 }
9742
9743
9744 func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
9745 return nil, false
9746 }
9747
9748
9749 func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
9750 return &dbe, true
9751 }
9752
9753
9754 func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) {
9755 return nil, false
9756 }
9757
9758
9759 func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
9760 return &dbe, true
9761 }
9762
9763
9764 type BasicDpmContainer interface {
9765 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
9766 AsDpmContainer() (*DpmContainer, bool)
9767 }
9768
9769
9770 type DpmContainer struct {
9771
9772 CanReRegister *bool `json:"canReRegister,omitempty"`
9773
9774 ContainerID *string `json:"containerId,omitempty"`
9775
9776 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
9777
9778 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
9779
9780 DpmServers *[]string `json:"dpmServers,omitempty"`
9781
9782 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
9783
9784 ProtectionStatus *string `json:"protectionStatus,omitempty"`
9785
9786 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
9787
9788 FriendlyName *string `json:"friendlyName,omitempty"`
9789
9790 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9791
9792 RegistrationStatus *string `json:"registrationStatus,omitempty"`
9793
9794 HealthStatus *string `json:"healthStatus,omitempty"`
9795
9796 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
9797 }
9798
9799 func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) {
9800 var m map[string]interface{}
9801 err := json.Unmarshal(body, &m)
9802 if err != nil {
9803 return nil, err
9804 }
9805
9806 switch m["containerType"] {
9807 case string(ContainerTypeAzureBackupServerContainer1):
9808 var absc AzureBackupServerContainer
9809 err := json.Unmarshal(body, &absc)
9810 return absc, err
9811 default:
9812 var dc DpmContainer
9813 err := json.Unmarshal(body, &dc)
9814 return dc, err
9815 }
9816 }
9817 func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) {
9818 var rawMessages []*json.RawMessage
9819 err := json.Unmarshal(body, &rawMessages)
9820 if err != nil {
9821 return nil, err
9822 }
9823
9824 dcArray := make([]BasicDpmContainer, len(rawMessages))
9825
9826 for index, rawMessage := range rawMessages {
9827 dc, err := unmarshalBasicDpmContainer(*rawMessage)
9828 if err != nil {
9829 return nil, err
9830 }
9831 dcArray[index] = dc
9832 }
9833 return dcArray, nil
9834 }
9835
9836
9837 func (dc DpmContainer) MarshalJSON() ([]byte, error) {
9838 dc.ContainerType = ContainerTypeDPMContainer1
9839 objectMap := make(map[string]interface{})
9840 if dc.CanReRegister != nil {
9841 objectMap["canReRegister"] = dc.CanReRegister
9842 }
9843 if dc.ContainerID != nil {
9844 objectMap["containerId"] = dc.ContainerID
9845 }
9846 if dc.ProtectedItemCount != nil {
9847 objectMap["protectedItemCount"] = dc.ProtectedItemCount
9848 }
9849 if dc.DpmAgentVersion != nil {
9850 objectMap["dpmAgentVersion"] = dc.DpmAgentVersion
9851 }
9852 if dc.DpmServers != nil {
9853 objectMap["dpmServers"] = dc.DpmServers
9854 }
9855 if dc.UpgradeAvailable != nil {
9856 objectMap["upgradeAvailable"] = dc.UpgradeAvailable
9857 }
9858 if dc.ProtectionStatus != nil {
9859 objectMap["protectionStatus"] = dc.ProtectionStatus
9860 }
9861 if dc.ExtendedInfo != nil {
9862 objectMap["extendedInfo"] = dc.ExtendedInfo
9863 }
9864 if dc.FriendlyName != nil {
9865 objectMap["friendlyName"] = dc.FriendlyName
9866 }
9867 if dc.BackupManagementType != "" {
9868 objectMap["backupManagementType"] = dc.BackupManagementType
9869 }
9870 if dc.RegistrationStatus != nil {
9871 objectMap["registrationStatus"] = dc.RegistrationStatus
9872 }
9873 if dc.HealthStatus != nil {
9874 objectMap["healthStatus"] = dc.HealthStatus
9875 }
9876 if dc.ContainerType != "" {
9877 objectMap["containerType"] = dc.ContainerType
9878 }
9879 return json.Marshal(objectMap)
9880 }
9881
9882
9883 func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
9884 return nil, false
9885 }
9886
9887
9888 func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
9889 return nil, false
9890 }
9891
9892
9893 func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
9894 return nil, false
9895 }
9896
9897
9898 func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
9899 return nil, false
9900 }
9901
9902
9903 func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
9904 return nil, false
9905 }
9906
9907
9908 func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
9909 return nil, false
9910 }
9911
9912
9913 func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
9914 return nil, false
9915 }
9916
9917
9918 func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
9919 return nil, false
9920 }
9921
9922
9923 func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
9924 return nil, false
9925 }
9926
9927
9928 func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) {
9929 return &dc, true
9930 }
9931
9932
9933 func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
9934 return &dc, true
9935 }
9936
9937
9938 func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) {
9939 return nil, false
9940 }
9941
9942
9943 func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
9944 return nil, false
9945 }
9946
9947
9948 func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
9949 return nil, false
9950 }
9951
9952
9953 func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) {
9954 return nil, false
9955 }
9956
9957
9958 func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
9959 return nil, false
9960 }
9961
9962
9963 func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
9964 return &dc, true
9965 }
9966
9967
9968 type DPMContainerExtendedInfo struct {
9969
9970 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
9971 }
9972
9973
9974 type DpmErrorInfo struct {
9975
9976 ErrorString *string `json:"errorString,omitempty"`
9977
9978 Recommendations *[]string `json:"recommendations,omitempty"`
9979 }
9980
9981
9982 type DpmJob struct {
9983
9984 Duration *string `json:"duration,omitempty"`
9985
9986 DpmServerName *string `json:"dpmServerName,omitempty"`
9987
9988 ContainerName *string `json:"containerName,omitempty"`
9989
9990 ContainerType *string `json:"containerType,omitempty"`
9991
9992 WorkloadType *string `json:"workloadType,omitempty"`
9993
9994 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
9995
9996 ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"`
9997
9998 ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"`
9999
10000 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
10001
10002 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10003
10004 Operation *string `json:"operation,omitempty"`
10005
10006 Status *string `json:"status,omitempty"`
10007
10008 StartTime *date.Time `json:"startTime,omitempty"`
10009
10010 EndTime *date.Time `json:"endTime,omitempty"`
10011
10012 ActivityID *string `json:"activityId,omitempty"`
10013
10014 JobType JobType `json:"jobType,omitempty"`
10015 }
10016
10017
10018 func (dj DpmJob) MarshalJSON() ([]byte, error) {
10019 dj.JobType = JobTypeDpmJob
10020 objectMap := make(map[string]interface{})
10021 if dj.Duration != nil {
10022 objectMap["duration"] = dj.Duration
10023 }
10024 if dj.DpmServerName != nil {
10025 objectMap["dpmServerName"] = dj.DpmServerName
10026 }
10027 if dj.ContainerName != nil {
10028 objectMap["containerName"] = dj.ContainerName
10029 }
10030 if dj.ContainerType != nil {
10031 objectMap["containerType"] = dj.ContainerType
10032 }
10033 if dj.WorkloadType != nil {
10034 objectMap["workloadType"] = dj.WorkloadType
10035 }
10036 if dj.ActionsInfo != nil {
10037 objectMap["actionsInfo"] = dj.ActionsInfo
10038 }
10039 if dj.ErrorDetails != nil {
10040 objectMap["errorDetails"] = dj.ErrorDetails
10041 }
10042 if dj.ExtendedInfo != nil {
10043 objectMap["extendedInfo"] = dj.ExtendedInfo
10044 }
10045 if dj.EntityFriendlyName != nil {
10046 objectMap["entityFriendlyName"] = dj.EntityFriendlyName
10047 }
10048 if dj.BackupManagementType != "" {
10049 objectMap["backupManagementType"] = dj.BackupManagementType
10050 }
10051 if dj.Operation != nil {
10052 objectMap["operation"] = dj.Operation
10053 }
10054 if dj.Status != nil {
10055 objectMap["status"] = dj.Status
10056 }
10057 if dj.StartTime != nil {
10058 objectMap["startTime"] = dj.StartTime
10059 }
10060 if dj.EndTime != nil {
10061 objectMap["endTime"] = dj.EndTime
10062 }
10063 if dj.ActivityID != nil {
10064 objectMap["activityId"] = dj.ActivityID
10065 }
10066 if dj.JobType != "" {
10067 objectMap["jobType"] = dj.JobType
10068 }
10069 return json.Marshal(objectMap)
10070 }
10071
10072
10073 func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
10074 return nil, false
10075 }
10076
10077
10078 func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
10079 return nil, false
10080 }
10081
10082
10083 func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
10084 return nil, false
10085 }
10086
10087
10088 func (dj DpmJob) AsDpmJob() (*DpmJob, bool) {
10089 return &dj, true
10090 }
10091
10092
10093 func (dj DpmJob) AsMabJob() (*MabJob, bool) {
10094 return nil, false
10095 }
10096
10097
10098 func (dj DpmJob) AsJob() (*Job, bool) {
10099 return nil, false
10100 }
10101
10102
10103 func (dj DpmJob) AsBasicJob() (BasicJob, bool) {
10104 return &dj, true
10105 }
10106
10107
10108 type DpmJobExtendedInfo struct {
10109
10110 TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"`
10111
10112 PropertyBag map[string]*string `json:"propertyBag"`
10113
10114 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
10115 }
10116
10117
10118 func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) {
10119 objectMap := make(map[string]interface{})
10120 if djei.TasksList != nil {
10121 objectMap["tasksList"] = djei.TasksList
10122 }
10123 if djei.PropertyBag != nil {
10124 objectMap["propertyBag"] = djei.PropertyBag
10125 }
10126 if djei.DynamicErrorMessage != nil {
10127 objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage
10128 }
10129 return json.Marshal(objectMap)
10130 }
10131
10132
10133 type DpmJobTaskDetails struct {
10134
10135 TaskID *string `json:"taskId,omitempty"`
10136
10137 StartTime *date.Time `json:"startTime,omitempty"`
10138
10139 EndTime *date.Time `json:"endTime,omitempty"`
10140
10141 Duration *string `json:"duration,omitempty"`
10142
10143 Status *string `json:"status,omitempty"`
10144 }
10145
10146
10147 type DPMProtectedItem struct {
10148
10149 FriendlyName *string `json:"friendlyName,omitempty"`
10150
10151 BackupEngineName *string `json:"backupEngineName,omitempty"`
10152
10153 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
10154
10155 ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
10156
10157 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10158
10159 WorkloadType DataSourceType `json:"workloadType,omitempty"`
10160
10161 ContainerName *string `json:"containerName,omitempty"`
10162
10163 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10164
10165 PolicyID *string `json:"policyId,omitempty"`
10166
10167 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
10168
10169 BackupSetName *string `json:"backupSetName,omitempty"`
10170
10171 CreateMode CreateMode `json:"createMode,omitempty"`
10172
10173 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
10174
10175 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
10176
10177 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
10178
10179 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
10180
10181 IsRehydrate *bool `json:"isRehydrate,omitempty"`
10182
10183 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
10184 }
10185
10186
10187 func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) {
10188 dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem
10189 objectMap := make(map[string]interface{})
10190 if dpi.FriendlyName != nil {
10191 objectMap["friendlyName"] = dpi.FriendlyName
10192 }
10193 if dpi.BackupEngineName != nil {
10194 objectMap["backupEngineName"] = dpi.BackupEngineName
10195 }
10196 if dpi.ProtectionState != "" {
10197 objectMap["protectionState"] = dpi.ProtectionState
10198 }
10199 if dpi.ExtendedInfo != nil {
10200 objectMap["extendedInfo"] = dpi.ExtendedInfo
10201 }
10202 if dpi.BackupManagementType != "" {
10203 objectMap["backupManagementType"] = dpi.BackupManagementType
10204 }
10205 if dpi.WorkloadType != "" {
10206 objectMap["workloadType"] = dpi.WorkloadType
10207 }
10208 if dpi.ContainerName != nil {
10209 objectMap["containerName"] = dpi.ContainerName
10210 }
10211 if dpi.SourceResourceID != nil {
10212 objectMap["sourceResourceId"] = dpi.SourceResourceID
10213 }
10214 if dpi.PolicyID != nil {
10215 objectMap["policyId"] = dpi.PolicyID
10216 }
10217 if dpi.LastRecoveryPoint != nil {
10218 objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint
10219 }
10220 if dpi.BackupSetName != nil {
10221 objectMap["backupSetName"] = dpi.BackupSetName
10222 }
10223 if dpi.CreateMode != "" {
10224 objectMap["createMode"] = dpi.CreateMode
10225 }
10226 if dpi.DeferredDeleteTimeInUTC != nil {
10227 objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC
10228 }
10229 if dpi.IsScheduledForDeferredDelete != nil {
10230 objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete
10231 }
10232 if dpi.DeferredDeleteTimeRemaining != nil {
10233 objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining
10234 }
10235 if dpi.IsDeferredDeleteScheduleUpcoming != nil {
10236 objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming
10237 }
10238 if dpi.IsRehydrate != nil {
10239 objectMap["isRehydrate"] = dpi.IsRehydrate
10240 }
10241 if dpi.ProtectedItemType != "" {
10242 objectMap["protectedItemType"] = dpi.ProtectedItemType
10243 }
10244 return json.Marshal(objectMap)
10245 }
10246
10247
10248 func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
10249 return nil, false
10250 }
10251
10252
10253 func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
10254 return nil, false
10255 }
10256
10257
10258 func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
10259 return nil, false
10260 }
10261
10262
10263 func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
10264 return nil, false
10265 }
10266
10267
10268 func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
10269 return nil, false
10270 }
10271
10272
10273 func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
10274 return nil, false
10275 }
10276
10277
10278 func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
10279 return nil, false
10280 }
10281
10282
10283 func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
10284 return nil, false
10285 }
10286
10287
10288 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
10289 return nil, false
10290 }
10291
10292
10293 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
10294 return nil, false
10295 }
10296
10297
10298 func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
10299 return nil, false
10300 }
10301
10302
10303 func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
10304 return &dpi, true
10305 }
10306
10307
10308 func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
10309 return nil, false
10310 }
10311
10312
10313 func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
10314 return nil, false
10315 }
10316
10317
10318 func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
10319 return nil, false
10320 }
10321
10322
10323 func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
10324 return &dpi, true
10325 }
10326
10327
10328 type DPMProtectedItemExtendedInfo struct {
10329
10330 ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"`
10331
10332 Protected *bool `json:"protected,omitempty"`
10333
10334 IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"`
10335
10336 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
10337
10338 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
10339
10340 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
10341
10342 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
10343
10344 OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"`
10345
10346 OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"`
10347
10348 OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"`
10349
10350 IsCollocated *bool `json:"isCollocated,omitempty"`
10351
10352 ProtectionGroupName *string `json:"protectionGroupName,omitempty"`
10353
10354 DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"`
10355
10356 TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"`
10357 }
10358
10359
10360 func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
10361 objectMap := make(map[string]interface{})
10362 if dpiei.ProtectableObjectLoadPath != nil {
10363 objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath
10364 }
10365 if dpiei.Protected != nil {
10366 objectMap["protected"] = dpiei.Protected
10367 }
10368 if dpiei.IsPresentOnCloud != nil {
10369 objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud
10370 }
10371 if dpiei.LastBackupStatus != nil {
10372 objectMap["lastBackupStatus"] = dpiei.LastBackupStatus
10373 }
10374 if dpiei.LastRefreshedAt != nil {
10375 objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt
10376 }
10377 if dpiei.OldestRecoveryPoint != nil {
10378 objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint
10379 }
10380 if dpiei.RecoveryPointCount != nil {
10381 objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount
10382 }
10383 if dpiei.OnPremiseOldestRecoveryPoint != nil {
10384 objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint
10385 }
10386 if dpiei.OnPremiseLatestRecoveryPoint != nil {
10387 objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint
10388 }
10389 if dpiei.OnPremiseRecoveryPointCount != nil {
10390 objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount
10391 }
10392 if dpiei.IsCollocated != nil {
10393 objectMap["isCollocated"] = dpiei.IsCollocated
10394 }
10395 if dpiei.ProtectionGroupName != nil {
10396 objectMap["protectionGroupName"] = dpiei.ProtectionGroupName
10397 }
10398 if dpiei.DiskStorageUsedInBytes != nil {
10399 objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes
10400 }
10401 if dpiei.TotalDiskStorageSizeInBytes != nil {
10402 objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes
10403 }
10404 return json.Marshal(objectMap)
10405 }
10406
10407
10408 type EncryptionDetails struct {
10409
10410 EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"`
10411
10412 KekURL *string `json:"kekUrl,omitempty"`
10413
10414 SecretKeyURL *string `json:"secretKeyUrl,omitempty"`
10415
10416 KekVaultID *string `json:"kekVaultId,omitempty"`
10417
10418 SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"`
10419 }
10420
10421
10422 type BasicEngineBase interface {
10423 AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool)
10424 AsDpmBackupEngine() (*DpmBackupEngine, bool)
10425 AsEngineBase() (*EngineBase, bool)
10426 }
10427
10428
10429 type EngineBase struct {
10430
10431 FriendlyName *string `json:"friendlyName,omitempty"`
10432
10433 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10434
10435 RegistrationStatus *string `json:"registrationStatus,omitempty"`
10436
10437 BackupEngineState *string `json:"backupEngineState,omitempty"`
10438
10439 HealthStatus *string `json:"healthStatus,omitempty"`
10440
10441 CanReRegister *bool `json:"canReRegister,omitempty"`
10442
10443 BackupEngineID *string `json:"backupEngineId,omitempty"`
10444
10445 DpmVersion *string `json:"dpmVersion,omitempty"`
10446
10447 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
10448
10449 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
10450
10451 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
10452
10453 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
10454
10455 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
10456 }
10457
10458 func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) {
10459 var m map[string]interface{}
10460 err := json.Unmarshal(body, &m)
10461 if err != nil {
10462 return nil, err
10463 }
10464
10465 switch m["backupEngineType"] {
10466 case string(BackupEngineTypeAzureBackupServerEngine):
10467 var abse AzureBackupServerEngine
10468 err := json.Unmarshal(body, &abse)
10469 return abse, err
10470 case string(BackupEngineTypeDpmBackupEngine):
10471 var dbe DpmBackupEngine
10472 err := json.Unmarshal(body, &dbe)
10473 return dbe, err
10474 default:
10475 var eb EngineBase
10476 err := json.Unmarshal(body, &eb)
10477 return eb, err
10478 }
10479 }
10480 func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) {
10481 var rawMessages []*json.RawMessage
10482 err := json.Unmarshal(body, &rawMessages)
10483 if err != nil {
10484 return nil, err
10485 }
10486
10487 ebArray := make([]BasicEngineBase, len(rawMessages))
10488
10489 for index, rawMessage := range rawMessages {
10490 eb, err := unmarshalBasicEngineBase(*rawMessage)
10491 if err != nil {
10492 return nil, err
10493 }
10494 ebArray[index] = eb
10495 }
10496 return ebArray, nil
10497 }
10498
10499
10500 func (eb EngineBase) MarshalJSON() ([]byte, error) {
10501 eb.BackupEngineType = BackupEngineTypeBackupEngineBase
10502 objectMap := make(map[string]interface{})
10503 if eb.FriendlyName != nil {
10504 objectMap["friendlyName"] = eb.FriendlyName
10505 }
10506 if eb.BackupManagementType != "" {
10507 objectMap["backupManagementType"] = eb.BackupManagementType
10508 }
10509 if eb.RegistrationStatus != nil {
10510 objectMap["registrationStatus"] = eb.RegistrationStatus
10511 }
10512 if eb.BackupEngineState != nil {
10513 objectMap["backupEngineState"] = eb.BackupEngineState
10514 }
10515 if eb.HealthStatus != nil {
10516 objectMap["healthStatus"] = eb.HealthStatus
10517 }
10518 if eb.CanReRegister != nil {
10519 objectMap["canReRegister"] = eb.CanReRegister
10520 }
10521 if eb.BackupEngineID != nil {
10522 objectMap["backupEngineId"] = eb.BackupEngineID
10523 }
10524 if eb.DpmVersion != nil {
10525 objectMap["dpmVersion"] = eb.DpmVersion
10526 }
10527 if eb.AzureBackupAgentVersion != nil {
10528 objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion
10529 }
10530 if eb.IsAzureBackupAgentUpgradeAvailable != nil {
10531 objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable
10532 }
10533 if eb.IsDpmUpgradeAvailable != nil {
10534 objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable
10535 }
10536 if eb.ExtendedInfo != nil {
10537 objectMap["extendedInfo"] = eb.ExtendedInfo
10538 }
10539 if eb.BackupEngineType != "" {
10540 objectMap["backupEngineType"] = eb.BackupEngineType
10541 }
10542 return json.Marshal(objectMap)
10543 }
10544
10545
10546 func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
10547 return nil, false
10548 }
10549
10550
10551 func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
10552 return nil, false
10553 }
10554
10555
10556 func (eb EngineBase) AsEngineBase() (*EngineBase, bool) {
10557 return &eb, true
10558 }
10559
10560
10561 func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) {
10562 return &eb, true
10563 }
10564
10565
10566
10567 type EngineBaseResource struct {
10568 autorest.Response `json:"-"`
10569
10570 Properties BasicEngineBase `json:"properties,omitempty"`
10571
10572 ID *string `json:"id,omitempty"`
10573
10574 Name *string `json:"name,omitempty"`
10575
10576 Type *string `json:"type,omitempty"`
10577
10578 Location *string `json:"location,omitempty"`
10579
10580 Tags map[string]*string `json:"tags"`
10581
10582 ETag *string `json:"eTag,omitempty"`
10583 }
10584
10585
10586 func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) {
10587 objectMap := make(map[string]interface{})
10588 objectMap["properties"] = ebr.Properties
10589 if ebr.Location != nil {
10590 objectMap["location"] = ebr.Location
10591 }
10592 if ebr.Tags != nil {
10593 objectMap["tags"] = ebr.Tags
10594 }
10595 if ebr.ETag != nil {
10596 objectMap["eTag"] = ebr.ETag
10597 }
10598 return json.Marshal(objectMap)
10599 }
10600
10601
10602 func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error {
10603 var m map[string]*json.RawMessage
10604 err := json.Unmarshal(body, &m)
10605 if err != nil {
10606 return err
10607 }
10608 for k, v := range m {
10609 switch k {
10610 case "properties":
10611 if v != nil {
10612 properties, err := unmarshalBasicEngineBase(*v)
10613 if err != nil {
10614 return err
10615 }
10616 ebr.Properties = properties
10617 }
10618 case "id":
10619 if v != nil {
10620 var ID string
10621 err = json.Unmarshal(*v, &ID)
10622 if err != nil {
10623 return err
10624 }
10625 ebr.ID = &ID
10626 }
10627 case "name":
10628 if v != nil {
10629 var name string
10630 err = json.Unmarshal(*v, &name)
10631 if err != nil {
10632 return err
10633 }
10634 ebr.Name = &name
10635 }
10636 case "type":
10637 if v != nil {
10638 var typeVar string
10639 err = json.Unmarshal(*v, &typeVar)
10640 if err != nil {
10641 return err
10642 }
10643 ebr.Type = &typeVar
10644 }
10645 case "location":
10646 if v != nil {
10647 var location string
10648 err = json.Unmarshal(*v, &location)
10649 if err != nil {
10650 return err
10651 }
10652 ebr.Location = &location
10653 }
10654 case "tags":
10655 if v != nil {
10656 var tags map[string]*string
10657 err = json.Unmarshal(*v, &tags)
10658 if err != nil {
10659 return err
10660 }
10661 ebr.Tags = tags
10662 }
10663 case "eTag":
10664 if v != nil {
10665 var eTag string
10666 err = json.Unmarshal(*v, &eTag)
10667 if err != nil {
10668 return err
10669 }
10670 ebr.ETag = &eTag
10671 }
10672 }
10673 }
10674
10675 return nil
10676 }
10677
10678
10679 type EngineBaseResourceList struct {
10680 autorest.Response `json:"-"`
10681
10682 Value *[]EngineBaseResource `json:"value,omitempty"`
10683
10684 NextLink *string `json:"nextLink,omitempty"`
10685 }
10686
10687
10688 type EngineBaseResourceListIterator struct {
10689 i int
10690 page EngineBaseResourceListPage
10691 }
10692
10693
10694
10695 func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) {
10696 if tracing.IsEnabled() {
10697 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext")
10698 defer func() {
10699 sc := -1
10700 if iter.Response().Response.Response != nil {
10701 sc = iter.Response().Response.Response.StatusCode
10702 }
10703 tracing.EndSpan(ctx, sc, err)
10704 }()
10705 }
10706 iter.i++
10707 if iter.i < len(iter.page.Values()) {
10708 return nil
10709 }
10710 err = iter.page.NextWithContext(ctx)
10711 if err != nil {
10712 iter.i--
10713 return err
10714 }
10715 iter.i = 0
10716 return nil
10717 }
10718
10719
10720
10721
10722 func (iter *EngineBaseResourceListIterator) Next() error {
10723 return iter.NextWithContext(context.Background())
10724 }
10725
10726
10727 func (iter EngineBaseResourceListIterator) NotDone() bool {
10728 return iter.page.NotDone() && iter.i < len(iter.page.Values())
10729 }
10730
10731
10732 func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList {
10733 return iter.page.Response()
10734 }
10735
10736
10737
10738 func (iter EngineBaseResourceListIterator) Value() EngineBaseResource {
10739 if !iter.page.NotDone() {
10740 return EngineBaseResource{}
10741 }
10742 return iter.page.Values()[iter.i]
10743 }
10744
10745
10746 func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator {
10747 return EngineBaseResourceListIterator{page: page}
10748 }
10749
10750
10751 func (ebrl EngineBaseResourceList) IsEmpty() bool {
10752 return ebrl.Value == nil || len(*ebrl.Value) == 0
10753 }
10754
10755
10756 func (ebrl EngineBaseResourceList) hasNextLink() bool {
10757 return ebrl.NextLink != nil && len(*ebrl.NextLink) != 0
10758 }
10759
10760
10761
10762 func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) {
10763 if !ebrl.hasNextLink() {
10764 return nil, nil
10765 }
10766 return autorest.Prepare((&http.Request{}).WithContext(ctx),
10767 autorest.AsJSON(),
10768 autorest.AsGet(),
10769 autorest.WithBaseURL(to.String(ebrl.NextLink)))
10770 }
10771
10772
10773 type EngineBaseResourceListPage struct {
10774 fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)
10775 ebrl EngineBaseResourceList
10776 }
10777
10778
10779
10780 func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) {
10781 if tracing.IsEnabled() {
10782 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext")
10783 defer func() {
10784 sc := -1
10785 if page.Response().Response.Response != nil {
10786 sc = page.Response().Response.Response.StatusCode
10787 }
10788 tracing.EndSpan(ctx, sc, err)
10789 }()
10790 }
10791 for {
10792 next, err := page.fn(ctx, page.ebrl)
10793 if err != nil {
10794 return err
10795 }
10796 page.ebrl = next
10797 if !next.hasNextLink() || !next.IsEmpty() {
10798 break
10799 }
10800 }
10801 return nil
10802 }
10803
10804
10805
10806
10807 func (page *EngineBaseResourceListPage) Next() error {
10808 return page.NextWithContext(context.Background())
10809 }
10810
10811
10812 func (page EngineBaseResourceListPage) NotDone() bool {
10813 return !page.ebrl.IsEmpty()
10814 }
10815
10816
10817 func (page EngineBaseResourceListPage) Response() EngineBaseResourceList {
10818 return page.ebrl
10819 }
10820
10821
10822 func (page EngineBaseResourceListPage) Values() []EngineBaseResource {
10823 if page.ebrl.IsEmpty() {
10824 return nil
10825 }
10826 return *page.ebrl.Value
10827 }
10828
10829
10830 func NewEngineBaseResourceListPage(cur EngineBaseResourceList, getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage {
10831 return EngineBaseResourceListPage{
10832 fn: getNextPage,
10833 ebrl: cur,
10834 }
10835 }
10836
10837
10838 type EngineExtendedInfo struct {
10839
10840 DatabaseName *string `json:"databaseName,omitempty"`
10841
10842 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
10843
10844 ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"`
10845
10846 DiskCount *int32 `json:"diskCount,omitempty"`
10847
10848 UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"`
10849
10850 AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"`
10851
10852 RefreshedAt *date.Time `json:"refreshedAt,omitempty"`
10853
10854 AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"`
10855 }
10856
10857
10858 type ErrorDetail struct {
10859
10860 Code *string `json:"code,omitempty"`
10861
10862 Message *string `json:"message,omitempty"`
10863
10864 Recommendations *[]string `json:"recommendations,omitempty"`
10865 }
10866
10867
10868 func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
10869 objectMap := make(map[string]interface{})
10870 return json.Marshal(objectMap)
10871 }
10872
10873
10874 type ExportJobsOperationResultInfo struct {
10875
10876 BlobURL *string `json:"blobUrl,omitempty"`
10877
10878 BlobSasKey *string `json:"blobSasKey,omitempty"`
10879
10880 ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"`
10881
10882 ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"`
10883
10884 ObjectType ObjectType `json:"objectType,omitempty"`
10885 }
10886
10887
10888 func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) {
10889 ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo
10890 objectMap := make(map[string]interface{})
10891 if ejori.BlobURL != nil {
10892 objectMap["blobUrl"] = ejori.BlobURL
10893 }
10894 if ejori.BlobSasKey != nil {
10895 objectMap["blobSasKey"] = ejori.BlobSasKey
10896 }
10897 if ejori.ExcelFileBlobURL != nil {
10898 objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL
10899 }
10900 if ejori.ExcelFileBlobSasKey != nil {
10901 objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey
10902 }
10903 if ejori.ObjectType != "" {
10904 objectMap["objectType"] = ejori.ObjectType
10905 }
10906 return json.Marshal(objectMap)
10907 }
10908
10909
10910 func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
10911 return &ejori, true
10912 }
10913
10914
10915 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
10916 return nil, false
10917 }
10918
10919
10920 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
10921 return nil, false
10922 }
10923
10924
10925 func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
10926 return &ejori, true
10927 }
10928
10929
10930 type ExtendedProperties struct {
10931
10932 DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"`
10933 }
10934
10935
10936 type BasicFeatureSupportRequest interface {
10937 AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool)
10938 AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool)
10939 AsFeatureSupportRequest() (*FeatureSupportRequest, bool)
10940 }
10941
10942
10943 type FeatureSupportRequest struct {
10944
10945 FeatureType FeatureType `json:"featureType,omitempty"`
10946 }
10947
10948 func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) {
10949 var m map[string]interface{}
10950 err := json.Unmarshal(body, &m)
10951 if err != nil {
10952 return nil, err
10953 }
10954
10955 switch m["featureType"] {
10956 case string(FeatureTypeAzureBackupGoals):
10957 var abgfsr AzureBackupGoalFeatureSupportRequest
10958 err := json.Unmarshal(body, &abgfsr)
10959 return abgfsr, err
10960 case string(FeatureTypeAzureVMResourceBackup):
10961 var avrfsr AzureVMResourceFeatureSupportRequest
10962 err := json.Unmarshal(body, &avrfsr)
10963 return avrfsr, err
10964 default:
10965 var fsr FeatureSupportRequest
10966 err := json.Unmarshal(body, &fsr)
10967 return fsr, err
10968 }
10969 }
10970 func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) {
10971 var rawMessages []*json.RawMessage
10972 err := json.Unmarshal(body, &rawMessages)
10973 if err != nil {
10974 return nil, err
10975 }
10976
10977 fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages))
10978
10979 for index, rawMessage := range rawMessages {
10980 fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage)
10981 if err != nil {
10982 return nil, err
10983 }
10984 fsrArray[index] = fsr
10985 }
10986 return fsrArray, nil
10987 }
10988
10989
10990 func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) {
10991 fsr.FeatureType = FeatureTypeFeatureSupportRequest
10992 objectMap := make(map[string]interface{})
10993 if fsr.FeatureType != "" {
10994 objectMap["featureType"] = fsr.FeatureType
10995 }
10996 return json.Marshal(objectMap)
10997 }
10998
10999
11000 func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
11001 return nil, false
11002 }
11003
11004
11005 func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
11006 return nil, false
11007 }
11008
11009
11010 func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
11011 return &fsr, true
11012 }
11013
11014
11015 func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
11016 return &fsr, true
11017 }
11018
11019
11020 type GenericContainer struct {
11021
11022 FabricName *string `json:"fabricName,omitempty"`
11023
11024 ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"`
11025
11026 FriendlyName *string `json:"friendlyName,omitempty"`
11027
11028 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11029
11030 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11031
11032 HealthStatus *string `json:"healthStatus,omitempty"`
11033
11034 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
11035 }
11036
11037
11038 func (gc GenericContainer) MarshalJSON() ([]byte, error) {
11039 gc.ContainerType = ContainerTypeGenericContainer1
11040 objectMap := make(map[string]interface{})
11041 if gc.FabricName != nil {
11042 objectMap["fabricName"] = gc.FabricName
11043 }
11044 if gc.ExtendedInformation != nil {
11045 objectMap["extendedInformation"] = gc.ExtendedInformation
11046 }
11047 if gc.FriendlyName != nil {
11048 objectMap["friendlyName"] = gc.FriendlyName
11049 }
11050 if gc.BackupManagementType != "" {
11051 objectMap["backupManagementType"] = gc.BackupManagementType
11052 }
11053 if gc.RegistrationStatus != nil {
11054 objectMap["registrationStatus"] = gc.RegistrationStatus
11055 }
11056 if gc.HealthStatus != nil {
11057 objectMap["healthStatus"] = gc.HealthStatus
11058 }
11059 if gc.ContainerType != "" {
11060 objectMap["containerType"] = gc.ContainerType
11061 }
11062 return json.Marshal(objectMap)
11063 }
11064
11065
11066 func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
11067 return nil, false
11068 }
11069
11070
11071 func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
11072 return nil, false
11073 }
11074
11075
11076 func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
11077 return nil, false
11078 }
11079
11080
11081 func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
11082 return nil, false
11083 }
11084
11085
11086 func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
11087 return nil, false
11088 }
11089
11090
11091 func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
11092 return nil, false
11093 }
11094
11095
11096 func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
11097 return nil, false
11098 }
11099
11100
11101 func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
11102 return nil, false
11103 }
11104
11105
11106 func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
11107 return nil, false
11108 }
11109
11110
11111 func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) {
11112 return nil, false
11113 }
11114
11115
11116 func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
11117 return nil, false
11118 }
11119
11120
11121 func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) {
11122 return &gc, true
11123 }
11124
11125
11126 func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
11127 return nil, false
11128 }
11129
11130
11131 func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
11132 return nil, false
11133 }
11134
11135
11136 func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) {
11137 return nil, false
11138 }
11139
11140
11141 func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
11142 return nil, false
11143 }
11144
11145
11146 func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
11147 return &gc, true
11148 }
11149
11150
11151 type GenericContainerExtendedInfo struct {
11152
11153 RawCertData *string `json:"rawCertData,omitempty"`
11154
11155 ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"`
11156
11157 ServiceEndpoints map[string]*string `json:"serviceEndpoints"`
11158 }
11159
11160
11161 func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) {
11162 objectMap := make(map[string]interface{})
11163 if gcei.RawCertData != nil {
11164 objectMap["rawCertData"] = gcei.RawCertData
11165 }
11166 if gcei.ContainerIdentityInfo != nil {
11167 objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo
11168 }
11169 if gcei.ServiceEndpoints != nil {
11170 objectMap["serviceEndpoints"] = gcei.ServiceEndpoints
11171 }
11172 return json.Marshal(objectMap)
11173 }
11174
11175
11176 type GenericProtectedItem struct {
11177
11178 FriendlyName *string `json:"friendlyName,omitempty"`
11179
11180 PolicyState *string `json:"policyState,omitempty"`
11181
11182 ProtectionState ProtectionState `json:"protectionState,omitempty"`
11183
11184 ProtectedItemID *int64 `json:"protectedItemId,omitempty"`
11185
11186 SourceAssociations map[string]*string `json:"sourceAssociations"`
11187
11188 FabricName *string `json:"fabricName,omitempty"`
11189
11190 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11191
11192 WorkloadType DataSourceType `json:"workloadType,omitempty"`
11193
11194 ContainerName *string `json:"containerName,omitempty"`
11195
11196 SourceResourceID *string `json:"sourceResourceId,omitempty"`
11197
11198 PolicyID *string `json:"policyId,omitempty"`
11199
11200 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
11201
11202 BackupSetName *string `json:"backupSetName,omitempty"`
11203
11204 CreateMode CreateMode `json:"createMode,omitempty"`
11205
11206 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
11207
11208 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
11209
11210 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
11211
11212 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
11213
11214 IsRehydrate *bool `json:"isRehydrate,omitempty"`
11215
11216 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
11217 }
11218
11219
11220 func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) {
11221 gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem
11222 objectMap := make(map[string]interface{})
11223 if gpi.FriendlyName != nil {
11224 objectMap["friendlyName"] = gpi.FriendlyName
11225 }
11226 if gpi.PolicyState != nil {
11227 objectMap["policyState"] = gpi.PolicyState
11228 }
11229 if gpi.ProtectionState != "" {
11230 objectMap["protectionState"] = gpi.ProtectionState
11231 }
11232 if gpi.ProtectedItemID != nil {
11233 objectMap["protectedItemId"] = gpi.ProtectedItemID
11234 }
11235 if gpi.SourceAssociations != nil {
11236 objectMap["sourceAssociations"] = gpi.SourceAssociations
11237 }
11238 if gpi.FabricName != nil {
11239 objectMap["fabricName"] = gpi.FabricName
11240 }
11241 if gpi.BackupManagementType != "" {
11242 objectMap["backupManagementType"] = gpi.BackupManagementType
11243 }
11244 if gpi.WorkloadType != "" {
11245 objectMap["workloadType"] = gpi.WorkloadType
11246 }
11247 if gpi.ContainerName != nil {
11248 objectMap["containerName"] = gpi.ContainerName
11249 }
11250 if gpi.SourceResourceID != nil {
11251 objectMap["sourceResourceId"] = gpi.SourceResourceID
11252 }
11253 if gpi.PolicyID != nil {
11254 objectMap["policyId"] = gpi.PolicyID
11255 }
11256 if gpi.LastRecoveryPoint != nil {
11257 objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint
11258 }
11259 if gpi.BackupSetName != nil {
11260 objectMap["backupSetName"] = gpi.BackupSetName
11261 }
11262 if gpi.CreateMode != "" {
11263 objectMap["createMode"] = gpi.CreateMode
11264 }
11265 if gpi.DeferredDeleteTimeInUTC != nil {
11266 objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC
11267 }
11268 if gpi.IsScheduledForDeferredDelete != nil {
11269 objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete
11270 }
11271 if gpi.DeferredDeleteTimeRemaining != nil {
11272 objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining
11273 }
11274 if gpi.IsDeferredDeleteScheduleUpcoming != nil {
11275 objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming
11276 }
11277 if gpi.IsRehydrate != nil {
11278 objectMap["isRehydrate"] = gpi.IsRehydrate
11279 }
11280 if gpi.ProtectedItemType != "" {
11281 objectMap["protectedItemType"] = gpi.ProtectedItemType
11282 }
11283 return json.Marshal(objectMap)
11284 }
11285
11286
11287 func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
11288 return nil, false
11289 }
11290
11291
11292 func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
11293 return nil, false
11294 }
11295
11296
11297 func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
11298 return nil, false
11299 }
11300
11301
11302 func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
11303 return nil, false
11304 }
11305
11306
11307 func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
11308 return nil, false
11309 }
11310
11311
11312 func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
11313 return nil, false
11314 }
11315
11316
11317 func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
11318 return nil, false
11319 }
11320
11321
11322 func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
11323 return nil, false
11324 }
11325
11326
11327 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
11328 return nil, false
11329 }
11330
11331
11332 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
11333 return nil, false
11334 }
11335
11336
11337 func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
11338 return nil, false
11339 }
11340
11341
11342 func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
11343 return nil, false
11344 }
11345
11346
11347 func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
11348 return &gpi, true
11349 }
11350
11351
11352 func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
11353 return nil, false
11354 }
11355
11356
11357 func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
11358 return nil, false
11359 }
11360
11361
11362 func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
11363 return &gpi, true
11364 }
11365
11366
11367 type GenericProtectionPolicy struct {
11368
11369 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
11370
11371 TimeZone *string `json:"timeZone,omitempty"`
11372
11373 FabricName *string `json:"fabricName,omitempty"`
11374
11375 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
11376
11377 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
11378 }
11379
11380
11381 func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) {
11382 gpp.BackupManagementType = BackupManagementTypeGenericProtectionPolicy
11383 objectMap := make(map[string]interface{})
11384 if gpp.SubProtectionPolicy != nil {
11385 objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy
11386 }
11387 if gpp.TimeZone != nil {
11388 objectMap["timeZone"] = gpp.TimeZone
11389 }
11390 if gpp.FabricName != nil {
11391 objectMap["fabricName"] = gpp.FabricName
11392 }
11393 if gpp.ProtectedItemsCount != nil {
11394 objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount
11395 }
11396 if gpp.BackupManagementType != "" {
11397 objectMap["backupManagementType"] = gpp.BackupManagementType
11398 }
11399 return json.Marshal(objectMap)
11400 }
11401
11402
11403 func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
11404 return nil, false
11405 }
11406
11407
11408 func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
11409 return nil, false
11410 }
11411
11412
11413 func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
11414 return nil, false
11415 }
11416
11417
11418 func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
11419 return nil, false
11420 }
11421
11422
11423 func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
11424 return &gpp, true
11425 }
11426
11427
11428 func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
11429 return nil, false
11430 }
11431
11432
11433 func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
11434 return nil, false
11435 }
11436
11437
11438 func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
11439 return &gpp, true
11440 }
11441
11442
11443 type GenericRecoveryPoint struct {
11444
11445 FriendlyName *string `json:"friendlyName,omitempty"`
11446
11447 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
11448
11449 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
11450
11451 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
11452
11453 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
11454 }
11455
11456
11457 func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) {
11458 grp.ObjectType = ObjectTypeGenericRecoveryPoint
11459 objectMap := make(map[string]interface{})
11460 if grp.FriendlyName != nil {
11461 objectMap["friendlyName"] = grp.FriendlyName
11462 }
11463 if grp.RecoveryPointType != nil {
11464 objectMap["recoveryPointType"] = grp.RecoveryPointType
11465 }
11466 if grp.RecoveryPointTime != nil {
11467 objectMap["recoveryPointTime"] = grp.RecoveryPointTime
11468 }
11469 if grp.RecoveryPointAdditionalInfo != nil {
11470 objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo
11471 }
11472 if grp.ObjectType != "" {
11473 objectMap["objectType"] = grp.ObjectType
11474 }
11475 return json.Marshal(objectMap)
11476 }
11477
11478
11479 func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
11480 return nil, false
11481 }
11482
11483
11484 func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
11485 return nil, false
11486 }
11487
11488
11489 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
11490 return nil, false
11491 }
11492
11493
11494 func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
11495 return nil, false
11496 }
11497
11498
11499 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
11500 return nil, false
11501 }
11502
11503
11504 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
11505 return nil, false
11506 }
11507
11508
11509 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
11510 return nil, false
11511 }
11512
11513
11514 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
11515 return nil, false
11516 }
11517
11518
11519 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
11520 return nil, false
11521 }
11522
11523
11524 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
11525 return nil, false
11526 }
11527
11528
11529 func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
11530 return &grp, true
11531 }
11532
11533
11534 func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
11535 return nil, false
11536 }
11537
11538
11539 func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
11540 return nil, false
11541 }
11542
11543
11544 func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
11545 return &grp, true
11546 }
11547
11548
11549 type GetProtectedItemQueryObject struct {
11550
11551 Expand *string `json:"expand,omitempty"`
11552 }
11553
11554
11555 type IaasVMBackupRequest struct {
11556
11557 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
11558
11559 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
11560 }
11561
11562
11563 func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) {
11564 ivbr.ObjectType = ObjectTypeIaasVMBackupRequest
11565 objectMap := make(map[string]interface{})
11566 if ivbr.RecoveryPointExpiryTimeInUTC != nil {
11567 objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC
11568 }
11569 if ivbr.ObjectType != "" {
11570 objectMap["objectType"] = ivbr.ObjectType
11571 }
11572 return json.Marshal(objectMap)
11573 }
11574
11575
11576 func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
11577 return nil, false
11578 }
11579
11580
11581 func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
11582 return nil, false
11583 }
11584
11585
11586 func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
11587 return &ivbr, true
11588 }
11589
11590
11591 func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) {
11592 return nil, false
11593 }
11594
11595
11596 func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) {
11597 return &ivbr, true
11598 }
11599
11600
11601 type BasicIaaSVMContainer interface {
11602 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
11603 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
11604 AsIaaSVMContainer() (*IaaSVMContainer, bool)
11605 }
11606
11607
11608 type IaaSVMContainer struct {
11609
11610 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
11611
11612 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
11613
11614 ResourceGroup *string `json:"resourceGroup,omitempty"`
11615
11616 FriendlyName *string `json:"friendlyName,omitempty"`
11617
11618 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11619
11620 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11621
11622 HealthStatus *string `json:"healthStatus,omitempty"`
11623
11624 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
11625 }
11626
11627 func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) {
11628 var m map[string]interface{}
11629 err := json.Unmarshal(body, &m)
11630 if err != nil {
11631 return nil, err
11632 }
11633
11634 switch m["containerType"] {
11635 case string(ContainerTypeMicrosoftClassicComputevirtualMachines):
11636 var aisccvc AzureIaaSClassicComputeVMContainer
11637 err := json.Unmarshal(body, &aisccvc)
11638 return aisccvc, err
11639 case string(ContainerTypeMicrosoftComputevirtualMachines):
11640 var aiscvc AzureIaaSComputeVMContainer
11641 err := json.Unmarshal(body, &aiscvc)
11642 return aiscvc, err
11643 default:
11644 var isc IaaSVMContainer
11645 err := json.Unmarshal(body, &isc)
11646 return isc, err
11647 }
11648 }
11649 func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) {
11650 var rawMessages []*json.RawMessage
11651 err := json.Unmarshal(body, &rawMessages)
11652 if err != nil {
11653 return nil, err
11654 }
11655
11656 iscArray := make([]BasicIaaSVMContainer, len(rawMessages))
11657
11658 for index, rawMessage := range rawMessages {
11659 isc, err := unmarshalBasicIaaSVMContainer(*rawMessage)
11660 if err != nil {
11661 return nil, err
11662 }
11663 iscArray[index] = isc
11664 }
11665 return iscArray, nil
11666 }
11667
11668
11669 func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) {
11670 isc.ContainerType = ContainerTypeIaaSVMContainer
11671 objectMap := make(map[string]interface{})
11672 if isc.VirtualMachineID != nil {
11673 objectMap["virtualMachineId"] = isc.VirtualMachineID
11674 }
11675 if isc.VirtualMachineVersion != nil {
11676 objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion
11677 }
11678 if isc.ResourceGroup != nil {
11679 objectMap["resourceGroup"] = isc.ResourceGroup
11680 }
11681 if isc.FriendlyName != nil {
11682 objectMap["friendlyName"] = isc.FriendlyName
11683 }
11684 if isc.BackupManagementType != "" {
11685 objectMap["backupManagementType"] = isc.BackupManagementType
11686 }
11687 if isc.RegistrationStatus != nil {
11688 objectMap["registrationStatus"] = isc.RegistrationStatus
11689 }
11690 if isc.HealthStatus != nil {
11691 objectMap["healthStatus"] = isc.HealthStatus
11692 }
11693 if isc.ContainerType != "" {
11694 objectMap["containerType"] = isc.ContainerType
11695 }
11696 return json.Marshal(objectMap)
11697 }
11698
11699
11700 func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
11701 return nil, false
11702 }
11703
11704
11705 func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
11706 return nil, false
11707 }
11708
11709
11710 func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
11711 return nil, false
11712 }
11713
11714
11715 func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
11716 return nil, false
11717 }
11718
11719
11720 func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
11721 return nil, false
11722 }
11723
11724
11725 func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
11726 return nil, false
11727 }
11728
11729
11730 func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
11731 return nil, false
11732 }
11733
11734
11735 func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
11736 return nil, false
11737 }
11738
11739
11740 func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
11741 return nil, false
11742 }
11743
11744
11745 func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) {
11746 return nil, false
11747 }
11748
11749
11750 func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
11751 return nil, false
11752 }
11753
11754
11755 func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) {
11756 return nil, false
11757 }
11758
11759
11760 func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
11761 return &isc, true
11762 }
11763
11764
11765 func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
11766 return &isc, true
11767 }
11768
11769
11770 func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) {
11771 return nil, false
11772 }
11773
11774
11775 func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
11776 return nil, false
11777 }
11778
11779
11780 func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
11781 return &isc, true
11782 }
11783
11784
11785 type IaasVMILRRegistrationRequest struct {
11786
11787 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
11788
11789 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
11790
11791 InitiatorName *string `json:"initiatorName,omitempty"`
11792
11793 RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"`
11794
11795 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
11796 }
11797
11798
11799 func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) {
11800 ivrr.ObjectType = ObjectTypeIaasVMILRRegistrationRequest
11801 objectMap := make(map[string]interface{})
11802 if ivrr.RecoveryPointID != nil {
11803 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
11804 }
11805 if ivrr.VirtualMachineID != nil {
11806 objectMap["virtualMachineId"] = ivrr.VirtualMachineID
11807 }
11808 if ivrr.InitiatorName != nil {
11809 objectMap["initiatorName"] = ivrr.InitiatorName
11810 }
11811 if ivrr.RenewExistingRegistration != nil {
11812 objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration
11813 }
11814 if ivrr.ObjectType != "" {
11815 objectMap["objectType"] = ivrr.ObjectType
11816 }
11817 return json.Marshal(objectMap)
11818 }
11819
11820
11821 func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
11822 return nil, false
11823 }
11824
11825
11826 func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
11827 return &ivrr, true
11828 }
11829
11830
11831 func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) {
11832 return nil, false
11833 }
11834
11835
11836 func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
11837 return &ivrr, true
11838 }
11839
11840
11841 type BasicIaaSVMProtectableItem interface {
11842 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
11843 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
11844 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
11845 }
11846
11847
11848 type IaaSVMProtectableItem struct {
11849
11850 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
11851
11852 BackupManagementType *string `json:"backupManagementType,omitempty"`
11853
11854 WorkloadType *string `json:"workloadType,omitempty"`
11855
11856 FriendlyName *string `json:"friendlyName,omitempty"`
11857
11858 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
11859
11860 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
11861 }
11862
11863 func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) {
11864 var m map[string]interface{}
11865 err := json.Unmarshal(body, &m)
11866 if err != nil {
11867 return nil, err
11868 }
11869
11870 switch m["protectableItemType"] {
11871 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
11872 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
11873 err := json.Unmarshal(body, &aisccvpi)
11874 return aisccvpi, err
11875 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
11876 var aiscvpi AzureIaaSComputeVMProtectableItem
11877 err := json.Unmarshal(body, &aiscvpi)
11878 return aiscvpi, err
11879 default:
11880 var ispi IaaSVMProtectableItem
11881 err := json.Unmarshal(body, &ispi)
11882 return ispi, err
11883 }
11884 }
11885 func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) {
11886 var rawMessages []*json.RawMessage
11887 err := json.Unmarshal(body, &rawMessages)
11888 if err != nil {
11889 return nil, err
11890 }
11891
11892 ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages))
11893
11894 for index, rawMessage := range rawMessages {
11895 ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage)
11896 if err != nil {
11897 return nil, err
11898 }
11899 ispiArray[index] = ispi
11900 }
11901 return ispiArray, nil
11902 }
11903
11904
11905 func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) {
11906 ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem
11907 objectMap := make(map[string]interface{})
11908 if ispi.VirtualMachineID != nil {
11909 objectMap["virtualMachineId"] = ispi.VirtualMachineID
11910 }
11911 if ispi.BackupManagementType != nil {
11912 objectMap["backupManagementType"] = ispi.BackupManagementType
11913 }
11914 if ispi.WorkloadType != nil {
11915 objectMap["workloadType"] = ispi.WorkloadType
11916 }
11917 if ispi.FriendlyName != nil {
11918 objectMap["friendlyName"] = ispi.FriendlyName
11919 }
11920 if ispi.ProtectionState != "" {
11921 objectMap["protectionState"] = ispi.ProtectionState
11922 }
11923 if ispi.ProtectableItemType != "" {
11924 objectMap["protectableItemType"] = ispi.ProtectableItemType
11925 }
11926 return json.Marshal(objectMap)
11927 }
11928
11929
11930 func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
11931 return nil, false
11932 }
11933
11934
11935 func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
11936 return nil, false
11937 }
11938
11939
11940 func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
11941 return nil, false
11942 }
11943
11944
11945 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
11946 return nil, false
11947 }
11948
11949
11950 func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
11951 return nil, false
11952 }
11953
11954
11955 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
11956 return nil, false
11957 }
11958
11959
11960 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
11961 return nil, false
11962 }
11963
11964
11965 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
11966 return nil, false
11967 }
11968
11969
11970 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
11971 return nil, false
11972 }
11973
11974
11975 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
11976 return nil, false
11977 }
11978
11979
11980 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
11981 return nil, false
11982 }
11983
11984
11985 func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
11986 return &ispi, true
11987 }
11988
11989
11990 func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
11991 return &ispi, true
11992 }
11993
11994
11995 func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
11996 return nil, false
11997 }
11998
11999
12000 func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
12001 return &ispi, true
12002 }
12003
12004
12005 type IaasVMRecoveryPoint struct {
12006
12007 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
12008
12009 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
12010
12011 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
12012
12013 SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"`
12014
12015 IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"`
12016
12017 KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"`
12018
12019 IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"`
12020
12021 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
12022
12023 IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"`
12024
12025 VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
12026
12027 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
12028
12029 OsType *string `json:"osType,omitempty"`
12030
12031 RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"`
12032
12033 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
12034 }
12035
12036
12037 func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) {
12038 ivrp.ObjectType = ObjectTypeIaasVMRecoveryPoint
12039 objectMap := make(map[string]interface{})
12040 if ivrp.KeyAndSecret != nil {
12041 objectMap["keyAndSecret"] = ivrp.KeyAndSecret
12042 }
12043 if ivrp.IsInstantIlrSessionActive != nil {
12044 objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive
12045 }
12046 if ivrp.RecoveryPointTierDetails != nil {
12047 objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails
12048 }
12049 if ivrp.IsManagedVirtualMachine != nil {
12050 objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine
12051 }
12052 if ivrp.VirtualMachineSize != nil {
12053 objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize
12054 }
12055 if ivrp.OriginalStorageAccountOption != nil {
12056 objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption
12057 }
12058 if ivrp.OsType != nil {
12059 objectMap["osType"] = ivrp.OsType
12060 }
12061 if ivrp.RecoveryPointDiskConfiguration != nil {
12062 objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration
12063 }
12064 if ivrp.ObjectType != "" {
12065 objectMap["objectType"] = ivrp.ObjectType
12066 }
12067 return json.Marshal(objectMap)
12068 }
12069
12070
12071 func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
12072 return nil, false
12073 }
12074
12075
12076 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
12077 return nil, false
12078 }
12079
12080
12081 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
12082 return nil, false
12083 }
12084
12085
12086 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
12087 return nil, false
12088 }
12089
12090
12091 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
12092 return nil, false
12093 }
12094
12095
12096 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
12097 return nil, false
12098 }
12099
12100
12101 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
12102 return nil, false
12103 }
12104
12105
12106 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
12107 return nil, false
12108 }
12109
12110
12111 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
12112 return nil, false
12113 }
12114
12115
12116 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
12117 return nil, false
12118 }
12119
12120
12121 func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
12122 return nil, false
12123 }
12124
12125
12126 func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
12127 return &ivrp, true
12128 }
12129
12130
12131 func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
12132 return nil, false
12133 }
12134
12135
12136 func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
12137 return &ivrp, true
12138 }
12139
12140
12141 type IaasVMRestoreRequest struct {
12142
12143 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
12144
12145 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
12146
12147 SourceResourceID *string `json:"sourceResourceId,omitempty"`
12148
12149
12150 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
12151
12152
12153 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
12154
12155 StorageAccountID *string `json:"storageAccountId,omitempty"`
12156
12157
12158 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
12159
12160
12161
12162 SubnetID *string `json:"subnetId,omitempty"`
12163
12164
12165 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
12166
12167 Region *string `json:"region,omitempty"`
12168
12169 AffinityGroup *string `json:"affinityGroup,omitempty"`
12170
12171
12172 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
12173
12174 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
12175
12176 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
12177
12178 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
12179
12180 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
12181 }
12182
12183
12184 func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) {
12185 ivrr.ObjectType = ObjectTypeIaasVMRestoreRequest
12186 objectMap := make(map[string]interface{})
12187 if ivrr.RecoveryPointID != nil {
12188 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
12189 }
12190 if ivrr.RecoveryType != "" {
12191 objectMap["recoveryType"] = ivrr.RecoveryType
12192 }
12193 if ivrr.SourceResourceID != nil {
12194 objectMap["sourceResourceId"] = ivrr.SourceResourceID
12195 }
12196 if ivrr.TargetVirtualMachineID != nil {
12197 objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID
12198 }
12199 if ivrr.TargetResourceGroupID != nil {
12200 objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID
12201 }
12202 if ivrr.StorageAccountID != nil {
12203 objectMap["storageAccountId"] = ivrr.StorageAccountID
12204 }
12205 if ivrr.VirtualNetworkID != nil {
12206 objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID
12207 }
12208 if ivrr.SubnetID != nil {
12209 objectMap["subnetId"] = ivrr.SubnetID
12210 }
12211 if ivrr.TargetDomainNameID != nil {
12212 objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID
12213 }
12214 if ivrr.Region != nil {
12215 objectMap["region"] = ivrr.Region
12216 }
12217 if ivrr.AffinityGroup != nil {
12218 objectMap["affinityGroup"] = ivrr.AffinityGroup
12219 }
12220 if ivrr.CreateNewCloudService != nil {
12221 objectMap["createNewCloudService"] = ivrr.CreateNewCloudService
12222 }
12223 if ivrr.OriginalStorageAccountOption != nil {
12224 objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption
12225 }
12226 if ivrr.EncryptionDetails != nil {
12227 objectMap["encryptionDetails"] = ivrr.EncryptionDetails
12228 }
12229 if ivrr.RestoreDiskLunList != nil {
12230 objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList
12231 }
12232 if ivrr.ObjectType != "" {
12233 objectMap["objectType"] = ivrr.ObjectType
12234 }
12235 return json.Marshal(objectMap)
12236 }
12237
12238
12239 func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
12240 return nil, false
12241 }
12242
12243
12244 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
12245 return nil, false
12246 }
12247
12248
12249 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
12250 return nil, false
12251 }
12252
12253
12254 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
12255 return nil, false
12256 }
12257
12258
12259 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
12260 return nil, false
12261 }
12262
12263
12264 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
12265 return nil, false
12266 }
12267
12268
12269 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
12270 return nil, false
12271 }
12272
12273
12274 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
12275 return nil, false
12276 }
12277
12278
12279 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
12280 return nil, false
12281 }
12282
12283
12284 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
12285 return nil, false
12286 }
12287
12288
12289 func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
12290 return &ivrr, true
12291 }
12292
12293
12294 func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
12295 return nil, false
12296 }
12297
12298
12299 func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
12300 return &ivrr, true
12301 }
12302
12303
12304 type BasicILRRequest interface {
12305 AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool)
12306 AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool)
12307 AsILRRequest() (*ILRRequest, bool)
12308 }
12309
12310
12311 type ILRRequest struct {
12312
12313 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
12314 }
12315
12316 func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) {
12317 var m map[string]interface{}
12318 err := json.Unmarshal(body, &m)
12319 if err != nil {
12320 return nil, err
12321 }
12322
12323 switch m["objectType"] {
12324 case string(ObjectTypeAzureFileShareProvisionILRRequest):
12325 var afspir AzureFileShareProvisionILRRequest
12326 err := json.Unmarshal(body, &afspir)
12327 return afspir, err
12328 case string(ObjectTypeIaasVMILRRegistrationRequest):
12329 var ivrr IaasVMILRRegistrationRequest
12330 err := json.Unmarshal(body, &ivrr)
12331 return ivrr, err
12332 default:
12333 var ir ILRRequest
12334 err := json.Unmarshal(body, &ir)
12335 return ir, err
12336 }
12337 }
12338 func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) {
12339 var rawMessages []*json.RawMessage
12340 err := json.Unmarshal(body, &rawMessages)
12341 if err != nil {
12342 return nil, err
12343 }
12344
12345 irArray := make([]BasicILRRequest, len(rawMessages))
12346
12347 for index, rawMessage := range rawMessages {
12348 ir, err := unmarshalBasicILRRequest(*rawMessage)
12349 if err != nil {
12350 return nil, err
12351 }
12352 irArray[index] = ir
12353 }
12354 return irArray, nil
12355 }
12356
12357
12358 func (ir ILRRequest) MarshalJSON() ([]byte, error) {
12359 ir.ObjectType = ObjectTypeILRRequest
12360 objectMap := make(map[string]interface{})
12361 if ir.ObjectType != "" {
12362 objectMap["objectType"] = ir.ObjectType
12363 }
12364 return json.Marshal(objectMap)
12365 }
12366
12367
12368 func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
12369 return nil, false
12370 }
12371
12372
12373 func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
12374 return nil, false
12375 }
12376
12377
12378 func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) {
12379 return &ir, true
12380 }
12381
12382
12383 func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
12384 return &ir, true
12385 }
12386
12387
12388 type ILRRequestResource struct {
12389
12390 Properties BasicILRRequest `json:"properties,omitempty"`
12391
12392 ID *string `json:"id,omitempty"`
12393
12394 Name *string `json:"name,omitempty"`
12395
12396 Type *string `json:"type,omitempty"`
12397
12398 Location *string `json:"location,omitempty"`
12399
12400 Tags map[string]*string `json:"tags"`
12401
12402 ETag *string `json:"eTag,omitempty"`
12403 }
12404
12405
12406 func (irr ILRRequestResource) MarshalJSON() ([]byte, error) {
12407 objectMap := make(map[string]interface{})
12408 objectMap["properties"] = irr.Properties
12409 if irr.Location != nil {
12410 objectMap["location"] = irr.Location
12411 }
12412 if irr.Tags != nil {
12413 objectMap["tags"] = irr.Tags
12414 }
12415 if irr.ETag != nil {
12416 objectMap["eTag"] = irr.ETag
12417 }
12418 return json.Marshal(objectMap)
12419 }
12420
12421
12422 func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error {
12423 var m map[string]*json.RawMessage
12424 err := json.Unmarshal(body, &m)
12425 if err != nil {
12426 return err
12427 }
12428 for k, v := range m {
12429 switch k {
12430 case "properties":
12431 if v != nil {
12432 properties, err := unmarshalBasicILRRequest(*v)
12433 if err != nil {
12434 return err
12435 }
12436 irr.Properties = properties
12437 }
12438 case "id":
12439 if v != nil {
12440 var ID string
12441 err = json.Unmarshal(*v, &ID)
12442 if err != nil {
12443 return err
12444 }
12445 irr.ID = &ID
12446 }
12447 case "name":
12448 if v != nil {
12449 var name string
12450 err = json.Unmarshal(*v, &name)
12451 if err != nil {
12452 return err
12453 }
12454 irr.Name = &name
12455 }
12456 case "type":
12457 if v != nil {
12458 var typeVar string
12459 err = json.Unmarshal(*v, &typeVar)
12460 if err != nil {
12461 return err
12462 }
12463 irr.Type = &typeVar
12464 }
12465 case "location":
12466 if v != nil {
12467 var location string
12468 err = json.Unmarshal(*v, &location)
12469 if err != nil {
12470 return err
12471 }
12472 irr.Location = &location
12473 }
12474 case "tags":
12475 if v != nil {
12476 var tags map[string]*string
12477 err = json.Unmarshal(*v, &tags)
12478 if err != nil {
12479 return err
12480 }
12481 irr.Tags = tags
12482 }
12483 case "eTag":
12484 if v != nil {
12485 var eTag string
12486 err = json.Unmarshal(*v, &eTag)
12487 if err != nil {
12488 return err
12489 }
12490 irr.ETag = &eTag
12491 }
12492 }
12493 }
12494
12495 return nil
12496 }
12497
12498
12499 type InquiryInfo struct {
12500
12501
12502 Status *string `json:"status,omitempty"`
12503
12504 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
12505
12506
12507 InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"`
12508 }
12509
12510
12511 type InquiryValidation struct {
12512
12513 Status *string `json:"status,omitempty"`
12514
12515 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
12516
12517 AdditionalDetail *string `json:"additionalDetail,omitempty"`
12518 }
12519
12520
12521 func (iv InquiryValidation) MarshalJSON() ([]byte, error) {
12522 objectMap := make(map[string]interface{})
12523 if iv.Status != nil {
12524 objectMap["status"] = iv.Status
12525 }
12526 if iv.ErrorDetail != nil {
12527 objectMap["errorDetail"] = iv.ErrorDetail
12528 }
12529 return json.Marshal(objectMap)
12530 }
12531
12532
12533 type InstantItemRecoveryTarget struct {
12534
12535 ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"`
12536 }
12537
12538
12539 type InstantRPAdditionalDetails struct {
12540 AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"`
12541 AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"`
12542 }
12543
12544
12545 type BasicJob interface {
12546 AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool)
12547 AsAzureStorageJob() (*AzureStorageJob, bool)
12548 AsAzureWorkloadJob() (*AzureWorkloadJob, bool)
12549 AsDpmJob() (*DpmJob, bool)
12550 AsMabJob() (*MabJob, bool)
12551 AsJob() (*Job, bool)
12552 }
12553
12554
12555 type Job struct {
12556
12557 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
12558
12559 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12560
12561 Operation *string `json:"operation,omitempty"`
12562
12563 Status *string `json:"status,omitempty"`
12564
12565 StartTime *date.Time `json:"startTime,omitempty"`
12566
12567 EndTime *date.Time `json:"endTime,omitempty"`
12568
12569 ActivityID *string `json:"activityId,omitempty"`
12570
12571 JobType JobType `json:"jobType,omitempty"`
12572 }
12573
12574 func unmarshalBasicJob(body []byte) (BasicJob, error) {
12575 var m map[string]interface{}
12576 err := json.Unmarshal(body, &m)
12577 if err != nil {
12578 return nil, err
12579 }
12580
12581 switch m["jobType"] {
12582 case string(JobTypeAzureIaaSVMJob):
12583 var aisj AzureIaaSVMJob
12584 err := json.Unmarshal(body, &aisj)
12585 return aisj, err
12586 case string(JobTypeAzureStorageJob):
12587 var asj AzureStorageJob
12588 err := json.Unmarshal(body, &asj)
12589 return asj, err
12590 case string(JobTypeAzureWorkloadJob):
12591 var awj AzureWorkloadJob
12592 err := json.Unmarshal(body, &awj)
12593 return awj, err
12594 case string(JobTypeDpmJob):
12595 var dj DpmJob
12596 err := json.Unmarshal(body, &dj)
12597 return dj, err
12598 case string(JobTypeMabJob):
12599 var mj MabJob
12600 err := json.Unmarshal(body, &mj)
12601 return mj, err
12602 default:
12603 var j Job
12604 err := json.Unmarshal(body, &j)
12605 return j, err
12606 }
12607 }
12608 func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) {
12609 var rawMessages []*json.RawMessage
12610 err := json.Unmarshal(body, &rawMessages)
12611 if err != nil {
12612 return nil, err
12613 }
12614
12615 jArray := make([]BasicJob, len(rawMessages))
12616
12617 for index, rawMessage := range rawMessages {
12618 j, err := unmarshalBasicJob(*rawMessage)
12619 if err != nil {
12620 return nil, err
12621 }
12622 jArray[index] = j
12623 }
12624 return jArray, nil
12625 }
12626
12627
12628 func (j Job) MarshalJSON() ([]byte, error) {
12629 j.JobType = JobTypeJob
12630 objectMap := make(map[string]interface{})
12631 if j.EntityFriendlyName != nil {
12632 objectMap["entityFriendlyName"] = j.EntityFriendlyName
12633 }
12634 if j.BackupManagementType != "" {
12635 objectMap["backupManagementType"] = j.BackupManagementType
12636 }
12637 if j.Operation != nil {
12638 objectMap["operation"] = j.Operation
12639 }
12640 if j.Status != nil {
12641 objectMap["status"] = j.Status
12642 }
12643 if j.StartTime != nil {
12644 objectMap["startTime"] = j.StartTime
12645 }
12646 if j.EndTime != nil {
12647 objectMap["endTime"] = j.EndTime
12648 }
12649 if j.ActivityID != nil {
12650 objectMap["activityId"] = j.ActivityID
12651 }
12652 if j.JobType != "" {
12653 objectMap["jobType"] = j.JobType
12654 }
12655 return json.Marshal(objectMap)
12656 }
12657
12658
12659 func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
12660 return nil, false
12661 }
12662
12663
12664 func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) {
12665 return nil, false
12666 }
12667
12668
12669 func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
12670 return nil, false
12671 }
12672
12673
12674 func (j Job) AsDpmJob() (*DpmJob, bool) {
12675 return nil, false
12676 }
12677
12678
12679 func (j Job) AsMabJob() (*MabJob, bool) {
12680 return nil, false
12681 }
12682
12683
12684 func (j Job) AsJob() (*Job, bool) {
12685 return &j, true
12686 }
12687
12688
12689 func (j Job) AsBasicJob() (BasicJob, bool) {
12690 return &j, true
12691 }
12692
12693
12694 type JobQueryObject struct {
12695
12696 Status JobStatus `json:"status,omitempty"`
12697
12698 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12699
12700 Operation JobOperationType `json:"operation,omitempty"`
12701
12702 JobID *string `json:"jobId,omitempty"`
12703
12704 StartTime *date.Time `json:"startTime,omitempty"`
12705
12706 EndTime *date.Time `json:"endTime,omitempty"`
12707 }
12708
12709
12710 type JobResource struct {
12711 autorest.Response `json:"-"`
12712
12713 Properties BasicJob `json:"properties,omitempty"`
12714
12715 ID *string `json:"id,omitempty"`
12716
12717 Name *string `json:"name,omitempty"`
12718
12719 Type *string `json:"type,omitempty"`
12720
12721 Location *string `json:"location,omitempty"`
12722
12723 Tags map[string]*string `json:"tags"`
12724
12725 ETag *string `json:"eTag,omitempty"`
12726 }
12727
12728
12729 func (jr JobResource) MarshalJSON() ([]byte, error) {
12730 objectMap := make(map[string]interface{})
12731 objectMap["properties"] = jr.Properties
12732 if jr.Location != nil {
12733 objectMap["location"] = jr.Location
12734 }
12735 if jr.Tags != nil {
12736 objectMap["tags"] = jr.Tags
12737 }
12738 if jr.ETag != nil {
12739 objectMap["eTag"] = jr.ETag
12740 }
12741 return json.Marshal(objectMap)
12742 }
12743
12744
12745 func (jr *JobResource) UnmarshalJSON(body []byte) error {
12746 var m map[string]*json.RawMessage
12747 err := json.Unmarshal(body, &m)
12748 if err != nil {
12749 return err
12750 }
12751 for k, v := range m {
12752 switch k {
12753 case "properties":
12754 if v != nil {
12755 properties, err := unmarshalBasicJob(*v)
12756 if err != nil {
12757 return err
12758 }
12759 jr.Properties = properties
12760 }
12761 case "id":
12762 if v != nil {
12763 var ID string
12764 err = json.Unmarshal(*v, &ID)
12765 if err != nil {
12766 return err
12767 }
12768 jr.ID = &ID
12769 }
12770 case "name":
12771 if v != nil {
12772 var name string
12773 err = json.Unmarshal(*v, &name)
12774 if err != nil {
12775 return err
12776 }
12777 jr.Name = &name
12778 }
12779 case "type":
12780 if v != nil {
12781 var typeVar string
12782 err = json.Unmarshal(*v, &typeVar)
12783 if err != nil {
12784 return err
12785 }
12786 jr.Type = &typeVar
12787 }
12788 case "location":
12789 if v != nil {
12790 var location string
12791 err = json.Unmarshal(*v, &location)
12792 if err != nil {
12793 return err
12794 }
12795 jr.Location = &location
12796 }
12797 case "tags":
12798 if v != nil {
12799 var tags map[string]*string
12800 err = json.Unmarshal(*v, &tags)
12801 if err != nil {
12802 return err
12803 }
12804 jr.Tags = tags
12805 }
12806 case "eTag":
12807 if v != nil {
12808 var eTag string
12809 err = json.Unmarshal(*v, &eTag)
12810 if err != nil {
12811 return err
12812 }
12813 jr.ETag = &eTag
12814 }
12815 }
12816 }
12817
12818 return nil
12819 }
12820
12821
12822 type JobResourceList struct {
12823 autorest.Response `json:"-"`
12824
12825 Value *[]JobResource `json:"value,omitempty"`
12826
12827 NextLink *string `json:"nextLink,omitempty"`
12828 }
12829
12830
12831 type JobResourceListIterator struct {
12832 i int
12833 page JobResourceListPage
12834 }
12835
12836
12837
12838 func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) {
12839 if tracing.IsEnabled() {
12840 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext")
12841 defer func() {
12842 sc := -1
12843 if iter.Response().Response.Response != nil {
12844 sc = iter.Response().Response.Response.StatusCode
12845 }
12846 tracing.EndSpan(ctx, sc, err)
12847 }()
12848 }
12849 iter.i++
12850 if iter.i < len(iter.page.Values()) {
12851 return nil
12852 }
12853 err = iter.page.NextWithContext(ctx)
12854 if err != nil {
12855 iter.i--
12856 return err
12857 }
12858 iter.i = 0
12859 return nil
12860 }
12861
12862
12863
12864
12865 func (iter *JobResourceListIterator) Next() error {
12866 return iter.NextWithContext(context.Background())
12867 }
12868
12869
12870 func (iter JobResourceListIterator) NotDone() bool {
12871 return iter.page.NotDone() && iter.i < len(iter.page.Values())
12872 }
12873
12874
12875 func (iter JobResourceListIterator) Response() JobResourceList {
12876 return iter.page.Response()
12877 }
12878
12879
12880
12881 func (iter JobResourceListIterator) Value() JobResource {
12882 if !iter.page.NotDone() {
12883 return JobResource{}
12884 }
12885 return iter.page.Values()[iter.i]
12886 }
12887
12888
12889 func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator {
12890 return JobResourceListIterator{page: page}
12891 }
12892
12893
12894 func (jrl JobResourceList) IsEmpty() bool {
12895 return jrl.Value == nil || len(*jrl.Value) == 0
12896 }
12897
12898
12899 func (jrl JobResourceList) hasNextLink() bool {
12900 return jrl.NextLink != nil && len(*jrl.NextLink) != 0
12901 }
12902
12903
12904
12905 func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) {
12906 if !jrl.hasNextLink() {
12907 return nil, nil
12908 }
12909 return autorest.Prepare((&http.Request{}).WithContext(ctx),
12910 autorest.AsJSON(),
12911 autorest.AsGet(),
12912 autorest.WithBaseURL(to.String(jrl.NextLink)))
12913 }
12914
12915
12916 type JobResourceListPage struct {
12917 fn func(context.Context, JobResourceList) (JobResourceList, error)
12918 jrl JobResourceList
12919 }
12920
12921
12922
12923 func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) {
12924 if tracing.IsEnabled() {
12925 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext")
12926 defer func() {
12927 sc := -1
12928 if page.Response().Response.Response != nil {
12929 sc = page.Response().Response.Response.StatusCode
12930 }
12931 tracing.EndSpan(ctx, sc, err)
12932 }()
12933 }
12934 for {
12935 next, err := page.fn(ctx, page.jrl)
12936 if err != nil {
12937 return err
12938 }
12939 page.jrl = next
12940 if !next.hasNextLink() || !next.IsEmpty() {
12941 break
12942 }
12943 }
12944 return nil
12945 }
12946
12947
12948
12949
12950 func (page *JobResourceListPage) Next() error {
12951 return page.NextWithContext(context.Background())
12952 }
12953
12954
12955 func (page JobResourceListPage) NotDone() bool {
12956 return !page.jrl.IsEmpty()
12957 }
12958
12959
12960 func (page JobResourceListPage) Response() JobResourceList {
12961 return page.jrl
12962 }
12963
12964
12965 func (page JobResourceListPage) Values() []JobResource {
12966 if page.jrl.IsEmpty() {
12967 return nil
12968 }
12969 return *page.jrl.Value
12970 }
12971
12972
12973 func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage {
12974 return JobResourceListPage{
12975 fn: getNextPage,
12976 jrl: cur,
12977 }
12978 }
12979
12980
12981 type KEKDetails struct {
12982
12983 KeyURL *string `json:"keyUrl,omitempty"`
12984
12985 KeyVaultID *string `json:"keyVaultId,omitempty"`
12986
12987 KeyBackupData *string `json:"keyBackupData,omitempty"`
12988 }
12989
12990
12991
12992
12993
12994
12995
12996
12997 type KeyAndSecretDetails struct {
12998
12999 KekDetails *KEKDetails `json:"kekDetails,omitempty"`
13000
13001 BekDetails *BEKDetails `json:"bekDetails,omitempty"`
13002
13003 EncryptionMechanism *string `json:"encryptionMechanism,omitempty"`
13004 }
13005
13006
13007 type LogSchedulePolicy struct {
13008
13009 ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"`
13010
13011 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
13012 }
13013
13014
13015 func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) {
13016 lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy
13017 objectMap := make(map[string]interface{})
13018 if lsp.ScheduleFrequencyInMins != nil {
13019 objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins
13020 }
13021 if lsp.SchedulePolicyType != "" {
13022 objectMap["schedulePolicyType"] = lsp.SchedulePolicyType
13023 }
13024 return json.Marshal(objectMap)
13025 }
13026
13027
13028 func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
13029 return &lsp, true
13030 }
13031
13032
13033 func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
13034 return nil, false
13035 }
13036
13037
13038 func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
13039 return nil, false
13040 }
13041
13042
13043 func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
13044 return nil, false
13045 }
13046
13047
13048 func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
13049 return &lsp, true
13050 }
13051
13052
13053 type LongTermRetentionPolicy struct {
13054
13055 DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"`
13056
13057 WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"`
13058
13059 MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"`
13060
13061 YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"`
13062
13063 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
13064 }
13065
13066
13067 func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) {
13068 ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy
13069 objectMap := make(map[string]interface{})
13070 if ltrp.DailySchedule != nil {
13071 objectMap["dailySchedule"] = ltrp.DailySchedule
13072 }
13073 if ltrp.WeeklySchedule != nil {
13074 objectMap["weeklySchedule"] = ltrp.WeeklySchedule
13075 }
13076 if ltrp.MonthlySchedule != nil {
13077 objectMap["monthlySchedule"] = ltrp.MonthlySchedule
13078 }
13079 if ltrp.YearlySchedule != nil {
13080 objectMap["yearlySchedule"] = ltrp.YearlySchedule
13081 }
13082 if ltrp.RetentionPolicyType != "" {
13083 objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType
13084 }
13085 return json.Marshal(objectMap)
13086 }
13087
13088
13089 func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
13090 return <rp, true
13091 }
13092
13093
13094 func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
13095 return nil, false
13096 }
13097
13098
13099 func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
13100 return nil, false
13101 }
13102
13103
13104 func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
13105 return <rp, true
13106 }
13107
13108
13109 type LongTermSchedulePolicy struct {
13110
13111 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
13112 }
13113
13114
13115 func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) {
13116 ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy
13117 objectMap := make(map[string]interface{})
13118 if ltsp.SchedulePolicyType != "" {
13119 objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType
13120 }
13121 return json.Marshal(objectMap)
13122 }
13123
13124
13125 func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
13126 return nil, false
13127 }
13128
13129
13130 func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
13131 return <sp, true
13132 }
13133
13134
13135 func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
13136 return nil, false
13137 }
13138
13139
13140 func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
13141 return nil, false
13142 }
13143
13144
13145 func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
13146 return <sp, true
13147 }
13148
13149
13150 type MabContainer struct {
13151
13152 CanReRegister *bool `json:"canReRegister,omitempty"`
13153
13154 ContainerID *int64 `json:"containerId,omitempty"`
13155
13156 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
13157
13158 AgentVersion *string `json:"agentVersion,omitempty"`
13159
13160 ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"`
13161
13162 MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"`
13163
13164 ContainerHealthState *string `json:"containerHealthState,omitempty"`
13165
13166 FriendlyName *string `json:"friendlyName,omitempty"`
13167
13168 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13169
13170 RegistrationStatus *string `json:"registrationStatus,omitempty"`
13171
13172 HealthStatus *string `json:"healthStatus,omitempty"`
13173
13174 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
13175 }
13176
13177
13178 func (mc MabContainer) MarshalJSON() ([]byte, error) {
13179 mc.ContainerType = ContainerTypeWindows1
13180 objectMap := make(map[string]interface{})
13181 if mc.CanReRegister != nil {
13182 objectMap["canReRegister"] = mc.CanReRegister
13183 }
13184 if mc.ContainerID != nil {
13185 objectMap["containerId"] = mc.ContainerID
13186 }
13187 if mc.ProtectedItemCount != nil {
13188 objectMap["protectedItemCount"] = mc.ProtectedItemCount
13189 }
13190 if mc.AgentVersion != nil {
13191 objectMap["agentVersion"] = mc.AgentVersion
13192 }
13193 if mc.ExtendedInfo != nil {
13194 objectMap["extendedInfo"] = mc.ExtendedInfo
13195 }
13196 if mc.MabContainerHealthDetails != nil {
13197 objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails
13198 }
13199 if mc.ContainerHealthState != nil {
13200 objectMap["containerHealthState"] = mc.ContainerHealthState
13201 }
13202 if mc.FriendlyName != nil {
13203 objectMap["friendlyName"] = mc.FriendlyName
13204 }
13205 if mc.BackupManagementType != "" {
13206 objectMap["backupManagementType"] = mc.BackupManagementType
13207 }
13208 if mc.RegistrationStatus != nil {
13209 objectMap["registrationStatus"] = mc.RegistrationStatus
13210 }
13211 if mc.HealthStatus != nil {
13212 objectMap["healthStatus"] = mc.HealthStatus
13213 }
13214 if mc.ContainerType != "" {
13215 objectMap["containerType"] = mc.ContainerType
13216 }
13217 return json.Marshal(objectMap)
13218 }
13219
13220
13221 func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
13222 return nil, false
13223 }
13224
13225
13226 func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
13227 return nil, false
13228 }
13229
13230
13231 func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
13232 return nil, false
13233 }
13234
13235
13236 func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
13237 return nil, false
13238 }
13239
13240
13241 func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
13242 return nil, false
13243 }
13244
13245
13246 func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
13247 return nil, false
13248 }
13249
13250
13251 func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
13252 return nil, false
13253 }
13254
13255
13256 func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
13257 return nil, false
13258 }
13259
13260
13261 func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
13262 return nil, false
13263 }
13264
13265
13266 func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) {
13267 return nil, false
13268 }
13269
13270
13271 func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13272 return nil, false
13273 }
13274
13275
13276 func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) {
13277 return nil, false
13278 }
13279
13280
13281 func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13282 return nil, false
13283 }
13284
13285
13286 func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13287 return nil, false
13288 }
13289
13290
13291 func (mc MabContainer) AsMabContainer() (*MabContainer, bool) {
13292 return &mc, true
13293 }
13294
13295
13296 func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13297 return nil, false
13298 }
13299
13300
13301 func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13302 return &mc, true
13303 }
13304
13305
13306 type MabContainerExtendedInfo struct {
13307
13308 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
13309
13310 BackupItemType ItemType `json:"backupItemType,omitempty"`
13311
13312 BackupItems *[]string `json:"backupItems,omitempty"`
13313
13314 PolicyName *string `json:"policyName,omitempty"`
13315
13316 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
13317 }
13318
13319
13320 type MABContainerHealthDetails struct {
13321
13322 Code *int32 `json:"code,omitempty"`
13323
13324 Title *string `json:"title,omitempty"`
13325
13326 Message *string `json:"message,omitempty"`
13327
13328 Recommendations *[]string `json:"recommendations,omitempty"`
13329 }
13330
13331
13332 type MabErrorInfo struct {
13333
13334 ErrorString *string `json:"errorString,omitempty"`
13335
13336 Recommendations *[]string `json:"recommendations,omitempty"`
13337 }
13338
13339
13340 func (mei MabErrorInfo) MarshalJSON() ([]byte, error) {
13341 objectMap := make(map[string]interface{})
13342 return json.Marshal(objectMap)
13343 }
13344
13345
13346 type MabFileFolderProtectedItem struct {
13347
13348 FriendlyName *string `json:"friendlyName,omitempty"`
13349
13350 ComputerName *string `json:"computerName,omitempty"`
13351
13352 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
13353
13354 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
13355
13356 ProtectionState *string `json:"protectionState,omitempty"`
13357
13358 DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"`
13359
13360 ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
13361
13362 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13363
13364 WorkloadType DataSourceType `json:"workloadType,omitempty"`
13365
13366 ContainerName *string `json:"containerName,omitempty"`
13367
13368 SourceResourceID *string `json:"sourceResourceId,omitempty"`
13369
13370 PolicyID *string `json:"policyId,omitempty"`
13371
13372 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
13373
13374 BackupSetName *string `json:"backupSetName,omitempty"`
13375
13376 CreateMode CreateMode `json:"createMode,omitempty"`
13377
13378 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
13379
13380 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
13381
13382 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
13383
13384 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
13385
13386 IsRehydrate *bool `json:"isRehydrate,omitempty"`
13387
13388 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
13389 }
13390
13391
13392 func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) {
13393 mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem
13394 objectMap := make(map[string]interface{})
13395 if mffpi.FriendlyName != nil {
13396 objectMap["friendlyName"] = mffpi.FriendlyName
13397 }
13398 if mffpi.ComputerName != nil {
13399 objectMap["computerName"] = mffpi.ComputerName
13400 }
13401 if mffpi.LastBackupStatus != nil {
13402 objectMap["lastBackupStatus"] = mffpi.LastBackupStatus
13403 }
13404 if mffpi.LastBackupTime != nil {
13405 objectMap["lastBackupTime"] = mffpi.LastBackupTime
13406 }
13407 if mffpi.ProtectionState != nil {
13408 objectMap["protectionState"] = mffpi.ProtectionState
13409 }
13410 if mffpi.DeferredDeleteSyncTimeInUTC != nil {
13411 objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC
13412 }
13413 if mffpi.ExtendedInfo != nil {
13414 objectMap["extendedInfo"] = mffpi.ExtendedInfo
13415 }
13416 if mffpi.BackupManagementType != "" {
13417 objectMap["backupManagementType"] = mffpi.BackupManagementType
13418 }
13419 if mffpi.WorkloadType != "" {
13420 objectMap["workloadType"] = mffpi.WorkloadType
13421 }
13422 if mffpi.ContainerName != nil {
13423 objectMap["containerName"] = mffpi.ContainerName
13424 }
13425 if mffpi.SourceResourceID != nil {
13426 objectMap["sourceResourceId"] = mffpi.SourceResourceID
13427 }
13428 if mffpi.PolicyID != nil {
13429 objectMap["policyId"] = mffpi.PolicyID
13430 }
13431 if mffpi.LastRecoveryPoint != nil {
13432 objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint
13433 }
13434 if mffpi.BackupSetName != nil {
13435 objectMap["backupSetName"] = mffpi.BackupSetName
13436 }
13437 if mffpi.CreateMode != "" {
13438 objectMap["createMode"] = mffpi.CreateMode
13439 }
13440 if mffpi.DeferredDeleteTimeInUTC != nil {
13441 objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC
13442 }
13443 if mffpi.IsScheduledForDeferredDelete != nil {
13444 objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete
13445 }
13446 if mffpi.DeferredDeleteTimeRemaining != nil {
13447 objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining
13448 }
13449 if mffpi.IsDeferredDeleteScheduleUpcoming != nil {
13450 objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming
13451 }
13452 if mffpi.IsRehydrate != nil {
13453 objectMap["isRehydrate"] = mffpi.IsRehydrate
13454 }
13455 if mffpi.ProtectedItemType != "" {
13456 objectMap["protectedItemType"] = mffpi.ProtectedItemType
13457 }
13458 return json.Marshal(objectMap)
13459 }
13460
13461
13462 func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
13463 return nil, false
13464 }
13465
13466
13467 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
13468 return nil, false
13469 }
13470
13471
13472 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
13473 return nil, false
13474 }
13475
13476
13477 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
13478 return nil, false
13479 }
13480
13481
13482 func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
13483 return nil, false
13484 }
13485
13486
13487 func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
13488 return nil, false
13489 }
13490
13491
13492 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
13493 return nil, false
13494 }
13495
13496
13497 func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
13498 return nil, false
13499 }
13500
13501
13502 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
13503 return nil, false
13504 }
13505
13506
13507 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
13508 return nil, false
13509 }
13510
13511
13512 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
13513 return nil, false
13514 }
13515
13516
13517 func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
13518 return nil, false
13519 }
13520
13521
13522 func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
13523 return nil, false
13524 }
13525
13526
13527 func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
13528 return &mffpi, true
13529 }
13530
13531
13532 func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
13533 return nil, false
13534 }
13535
13536
13537 func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
13538 return &mffpi, true
13539 }
13540
13541
13542 type MabFileFolderProtectedItemExtendedInfo struct {
13543
13544 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
13545
13546 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
13547
13548 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
13549 }
13550
13551
13552 type MabJob struct {
13553
13554 Duration *string `json:"duration,omitempty"`
13555
13556 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
13557
13558 MabServerName *string `json:"mabServerName,omitempty"`
13559
13560 MabServerType MabServerType `json:"mabServerType,omitempty"`
13561
13562 WorkloadType WorkloadType `json:"workloadType,omitempty"`
13563
13564 ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"`
13565
13566 ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"`
13567
13568 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
13569
13570 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13571
13572 Operation *string `json:"operation,omitempty"`
13573
13574 Status *string `json:"status,omitempty"`
13575
13576 StartTime *date.Time `json:"startTime,omitempty"`
13577
13578 EndTime *date.Time `json:"endTime,omitempty"`
13579
13580 ActivityID *string `json:"activityId,omitempty"`
13581
13582 JobType JobType `json:"jobType,omitempty"`
13583 }
13584
13585
13586 func (mj MabJob) MarshalJSON() ([]byte, error) {
13587 mj.JobType = JobTypeMabJob
13588 objectMap := make(map[string]interface{})
13589 if mj.Duration != nil {
13590 objectMap["duration"] = mj.Duration
13591 }
13592 if mj.ActionsInfo != nil {
13593 objectMap["actionsInfo"] = mj.ActionsInfo
13594 }
13595 if mj.MabServerName != nil {
13596 objectMap["mabServerName"] = mj.MabServerName
13597 }
13598 if mj.MabServerType != "" {
13599 objectMap["mabServerType"] = mj.MabServerType
13600 }
13601 if mj.WorkloadType != "" {
13602 objectMap["workloadType"] = mj.WorkloadType
13603 }
13604 if mj.ErrorDetails != nil {
13605 objectMap["errorDetails"] = mj.ErrorDetails
13606 }
13607 if mj.ExtendedInfo != nil {
13608 objectMap["extendedInfo"] = mj.ExtendedInfo
13609 }
13610 if mj.EntityFriendlyName != nil {
13611 objectMap["entityFriendlyName"] = mj.EntityFriendlyName
13612 }
13613 if mj.BackupManagementType != "" {
13614 objectMap["backupManagementType"] = mj.BackupManagementType
13615 }
13616 if mj.Operation != nil {
13617 objectMap["operation"] = mj.Operation
13618 }
13619 if mj.Status != nil {
13620 objectMap["status"] = mj.Status
13621 }
13622 if mj.StartTime != nil {
13623 objectMap["startTime"] = mj.StartTime
13624 }
13625 if mj.EndTime != nil {
13626 objectMap["endTime"] = mj.EndTime
13627 }
13628 if mj.ActivityID != nil {
13629 objectMap["activityId"] = mj.ActivityID
13630 }
13631 if mj.JobType != "" {
13632 objectMap["jobType"] = mj.JobType
13633 }
13634 return json.Marshal(objectMap)
13635 }
13636
13637
13638 func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
13639 return nil, false
13640 }
13641
13642
13643 func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
13644 return nil, false
13645 }
13646
13647
13648 func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
13649 return nil, false
13650 }
13651
13652
13653 func (mj MabJob) AsDpmJob() (*DpmJob, bool) {
13654 return nil, false
13655 }
13656
13657
13658 func (mj MabJob) AsMabJob() (*MabJob, bool) {
13659 return &mj, true
13660 }
13661
13662
13663 func (mj MabJob) AsJob() (*Job, bool) {
13664 return nil, false
13665 }
13666
13667
13668 func (mj MabJob) AsBasicJob() (BasicJob, bool) {
13669 return &mj, true
13670 }
13671
13672
13673 type MabJobExtendedInfo struct {
13674
13675 TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"`
13676
13677 PropertyBag map[string]*string `json:"propertyBag"`
13678
13679 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
13680 }
13681
13682
13683 func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) {
13684 objectMap := make(map[string]interface{})
13685 if mjei.TasksList != nil {
13686 objectMap["tasksList"] = mjei.TasksList
13687 }
13688 if mjei.PropertyBag != nil {
13689 objectMap["propertyBag"] = mjei.PropertyBag
13690 }
13691 if mjei.DynamicErrorMessage != nil {
13692 objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage
13693 }
13694 return json.Marshal(objectMap)
13695 }
13696
13697
13698 type MabJobTaskDetails struct {
13699
13700 TaskID *string `json:"taskId,omitempty"`
13701
13702 StartTime *date.Time `json:"startTime,omitempty"`
13703
13704 EndTime *date.Time `json:"endTime,omitempty"`
13705
13706 Duration *string `json:"duration,omitempty"`
13707
13708 Status *string `json:"status,omitempty"`
13709 }
13710
13711
13712 type MabProtectionPolicy struct {
13713
13714 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
13715
13716 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
13717
13718 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
13719
13720 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
13721 }
13722
13723
13724 func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) {
13725 mpp.BackupManagementType = BackupManagementTypeMAB
13726 objectMap := make(map[string]interface{})
13727 objectMap["schedulePolicy"] = mpp.SchedulePolicy
13728 objectMap["retentionPolicy"] = mpp.RetentionPolicy
13729 if mpp.ProtectedItemsCount != nil {
13730 objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount
13731 }
13732 if mpp.BackupManagementType != "" {
13733 objectMap["backupManagementType"] = mpp.BackupManagementType
13734 }
13735 return json.Marshal(objectMap)
13736 }
13737
13738
13739 func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
13740 return nil, false
13741 }
13742
13743
13744 func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
13745 return nil, false
13746 }
13747
13748
13749 func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
13750 return nil, false
13751 }
13752
13753
13754 func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
13755 return nil, false
13756 }
13757
13758
13759 func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
13760 return nil, false
13761 }
13762
13763
13764 func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
13765 return &mpp, true
13766 }
13767
13768
13769 func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
13770 return nil, false
13771 }
13772
13773
13774 func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
13775 return &mpp, true
13776 }
13777
13778
13779 func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error {
13780 var m map[string]*json.RawMessage
13781 err := json.Unmarshal(body, &m)
13782 if err != nil {
13783 return err
13784 }
13785 for k, v := range m {
13786 switch k {
13787 case "schedulePolicy":
13788 if v != nil {
13789 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
13790 if err != nil {
13791 return err
13792 }
13793 mpp.SchedulePolicy = schedulePolicy
13794 }
13795 case "retentionPolicy":
13796 if v != nil {
13797 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
13798 if err != nil {
13799 return err
13800 }
13801 mpp.RetentionPolicy = retentionPolicy
13802 }
13803 case "protectedItemsCount":
13804 if v != nil {
13805 var protectedItemsCount int32
13806 err = json.Unmarshal(*v, &protectedItemsCount)
13807 if err != nil {
13808 return err
13809 }
13810 mpp.ProtectedItemsCount = &protectedItemsCount
13811 }
13812 case "backupManagementType":
13813 if v != nil {
13814 var backupManagementType ManagementTypeBasicProtectionPolicy
13815 err = json.Unmarshal(*v, &backupManagementType)
13816 if err != nil {
13817 return err
13818 }
13819 mpp.BackupManagementType = backupManagementType
13820 }
13821 }
13822 }
13823
13824 return nil
13825 }
13826
13827
13828 type ManagementUsage struct {
13829
13830 Unit UsagesUnit `json:"unit,omitempty"`
13831
13832 QuotaPeriod *string `json:"quotaPeriod,omitempty"`
13833
13834 NextResetTime *date.Time `json:"nextResetTime,omitempty"`
13835
13836 CurrentValue *int64 `json:"currentValue,omitempty"`
13837
13838 Limit *int64 `json:"limit,omitempty"`
13839
13840 Name *NameInfo `json:"name,omitempty"`
13841 }
13842
13843
13844 type ManagementUsageList struct {
13845 autorest.Response `json:"-"`
13846
13847 Value *[]ManagementUsage `json:"value,omitempty"`
13848 }
13849
13850
13851 type MonthlyRetentionSchedule struct {
13852
13853 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
13854
13855 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
13856
13857 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
13858
13859 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
13860
13861 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
13862 }
13863
13864
13865 type NameInfo struct {
13866
13867 Value *string `json:"value,omitempty"`
13868
13869 LocalizedValue *string `json:"localizedValue,omitempty"`
13870 }
13871
13872
13873 type OperationResultInfo struct {
13874
13875 JobList *[]string `json:"jobList,omitempty"`
13876
13877 ObjectType ObjectType `json:"objectType,omitempty"`
13878 }
13879
13880
13881 func (ori OperationResultInfo) MarshalJSON() ([]byte, error) {
13882 ori.ObjectType = ObjectTypeOperationResultInfo
13883 objectMap := make(map[string]interface{})
13884 if ori.JobList != nil {
13885 objectMap["jobList"] = ori.JobList
13886 }
13887 if ori.ObjectType != "" {
13888 objectMap["objectType"] = ori.ObjectType
13889 }
13890 return json.Marshal(objectMap)
13891 }
13892
13893
13894 func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
13895 return nil, false
13896 }
13897
13898
13899 func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
13900 return &ori, true
13901 }
13902
13903
13904 func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
13905 return nil, false
13906 }
13907
13908
13909 func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
13910 return &ori, true
13911 }
13912
13913
13914 type BasicOperationResultInfoBase interface {
13915 AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool)
13916 AsOperationResultInfo() (*OperationResultInfo, bool)
13917 AsOperationResultInfoBase() (*OperationResultInfoBase, bool)
13918 }
13919
13920
13921 type OperationResultInfoBase struct {
13922
13923 ObjectType ObjectType `json:"objectType,omitempty"`
13924 }
13925
13926 func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) {
13927 var m map[string]interface{}
13928 err := json.Unmarshal(body, &m)
13929 if err != nil {
13930 return nil, err
13931 }
13932
13933 switch m["objectType"] {
13934 case string(ObjectTypeExportJobsOperationResultInfo):
13935 var ejori ExportJobsOperationResultInfo
13936 err := json.Unmarshal(body, &ejori)
13937 return ejori, err
13938 case string(ObjectTypeOperationResultInfo):
13939 var ori OperationResultInfo
13940 err := json.Unmarshal(body, &ori)
13941 return ori, err
13942 default:
13943 var orib OperationResultInfoBase
13944 err := json.Unmarshal(body, &orib)
13945 return orib, err
13946 }
13947 }
13948 func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) {
13949 var rawMessages []*json.RawMessage
13950 err := json.Unmarshal(body, &rawMessages)
13951 if err != nil {
13952 return nil, err
13953 }
13954
13955 oribArray := make([]BasicOperationResultInfoBase, len(rawMessages))
13956
13957 for index, rawMessage := range rawMessages {
13958 orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage)
13959 if err != nil {
13960 return nil, err
13961 }
13962 oribArray[index] = orib
13963 }
13964 return oribArray, nil
13965 }
13966
13967
13968 func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) {
13969 orib.ObjectType = ObjectTypeOperationResultInfoBase
13970 objectMap := make(map[string]interface{})
13971 if orib.ObjectType != "" {
13972 objectMap["objectType"] = orib.ObjectType
13973 }
13974 return json.Marshal(objectMap)
13975 }
13976
13977
13978 func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
13979 return nil, false
13980 }
13981
13982
13983 func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) {
13984 return nil, false
13985 }
13986
13987
13988 func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
13989 return &orib, true
13990 }
13991
13992
13993 func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
13994 return &orib, true
13995 }
13996
13997
13998 type OperationResultInfoBaseResource struct {
13999 autorest.Response `json:"-"`
14000
14001 Operation BasicOperationResultInfoBase `json:"operation,omitempty"`
14002
14003 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
14004
14005 Headers map[string][]string `json:"headers"`
14006 }
14007
14008
14009 func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) {
14010 objectMap := make(map[string]interface{})
14011 objectMap["operation"] = oribr.Operation
14012 if oribr.StatusCode != "" {
14013 objectMap["statusCode"] = oribr.StatusCode
14014 }
14015 if oribr.Headers != nil {
14016 objectMap["headers"] = oribr.Headers
14017 }
14018 return json.Marshal(objectMap)
14019 }
14020
14021
14022 func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error {
14023 var m map[string]*json.RawMessage
14024 err := json.Unmarshal(body, &m)
14025 if err != nil {
14026 return err
14027 }
14028 for k, v := range m {
14029 switch k {
14030 case "operation":
14031 if v != nil {
14032 operation, err := unmarshalBasicOperationResultInfoBase(*v)
14033 if err != nil {
14034 return err
14035 }
14036 oribr.Operation = operation
14037 }
14038 case "statusCode":
14039 if v != nil {
14040 var statusCode HTTPStatusCode
14041 err = json.Unmarshal(*v, &statusCode)
14042 if err != nil {
14043 return err
14044 }
14045 oribr.StatusCode = statusCode
14046 }
14047 case "headers":
14048 if v != nil {
14049 var headers map[string][]string
14050 err = json.Unmarshal(*v, &headers)
14051 if err != nil {
14052 return err
14053 }
14054 oribr.Headers = headers
14055 }
14056 }
14057 }
14058
14059 return nil
14060 }
14061
14062
14063 type OperationStatus struct {
14064 autorest.Response `json:"-"`
14065
14066 ID *string `json:"id,omitempty"`
14067
14068 Name *string `json:"name,omitempty"`
14069
14070 Status OperationStatusValues `json:"status,omitempty"`
14071
14072 StartTime *date.Time `json:"startTime,omitempty"`
14073
14074 EndTime *date.Time `json:"endTime,omitempty"`
14075
14076 Error *OperationStatusError `json:"error,omitempty"`
14077
14078 Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"`
14079 }
14080
14081
14082 func (osVar *OperationStatus) UnmarshalJSON(body []byte) error {
14083 var m map[string]*json.RawMessage
14084 err := json.Unmarshal(body, &m)
14085 if err != nil {
14086 return err
14087 }
14088 for k, v := range m {
14089 switch k {
14090 case "id":
14091 if v != nil {
14092 var ID string
14093 err = json.Unmarshal(*v, &ID)
14094 if err != nil {
14095 return err
14096 }
14097 osVar.ID = &ID
14098 }
14099 case "name":
14100 if v != nil {
14101 var name string
14102 err = json.Unmarshal(*v, &name)
14103 if err != nil {
14104 return err
14105 }
14106 osVar.Name = &name
14107 }
14108 case "status":
14109 if v != nil {
14110 var status OperationStatusValues
14111 err = json.Unmarshal(*v, &status)
14112 if err != nil {
14113 return err
14114 }
14115 osVar.Status = status
14116 }
14117 case "startTime":
14118 if v != nil {
14119 var startTime date.Time
14120 err = json.Unmarshal(*v, &startTime)
14121 if err != nil {
14122 return err
14123 }
14124 osVar.StartTime = &startTime
14125 }
14126 case "endTime":
14127 if v != nil {
14128 var endTime date.Time
14129 err = json.Unmarshal(*v, &endTime)
14130 if err != nil {
14131 return err
14132 }
14133 osVar.EndTime = &endTime
14134 }
14135 case "error":
14136 if v != nil {
14137 var errorVar OperationStatusError
14138 err = json.Unmarshal(*v, &errorVar)
14139 if err != nil {
14140 return err
14141 }
14142 osVar.Error = &errorVar
14143 }
14144 case "properties":
14145 if v != nil {
14146 properties, err := unmarshalBasicOperationStatusExtendedInfo(*v)
14147 if err != nil {
14148 return err
14149 }
14150 osVar.Properties = properties
14151 }
14152 }
14153 }
14154
14155 return nil
14156 }
14157
14158
14159 type OperationStatusError struct {
14160
14161 Code *string `json:"code,omitempty"`
14162
14163 Message *string `json:"message,omitempty"`
14164 }
14165
14166
14167 type BasicOperationStatusExtendedInfo interface {
14168 AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool)
14169 AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool)
14170 AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool)
14171 AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool)
14172 }
14173
14174
14175 type OperationStatusExtendedInfo struct {
14176
14177 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
14178 }
14179
14180 func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) {
14181 var m map[string]interface{}
14182 err := json.Unmarshal(body, &m)
14183 if err != nil {
14184 return nil, err
14185 }
14186
14187 switch m["objectType"] {
14188 case string(ObjectTypeOperationStatusJobExtendedInfo):
14189 var osjei OperationStatusJobExtendedInfo
14190 err := json.Unmarshal(body, &osjei)
14191 return osjei, err
14192 case string(ObjectTypeOperationStatusJobsExtendedInfo):
14193 var osjei OperationStatusJobsExtendedInfo
14194 err := json.Unmarshal(body, &osjei)
14195 return osjei, err
14196 case string(ObjectTypeOperationStatusProvisionILRExtendedInfo):
14197 var ospiei OperationStatusProvisionILRExtendedInfo
14198 err := json.Unmarshal(body, &ospiei)
14199 return ospiei, err
14200 default:
14201 var osei OperationStatusExtendedInfo
14202 err := json.Unmarshal(body, &osei)
14203 return osei, err
14204 }
14205 }
14206 func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) {
14207 var rawMessages []*json.RawMessage
14208 err := json.Unmarshal(body, &rawMessages)
14209 if err != nil {
14210 return nil, err
14211 }
14212
14213 oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages))
14214
14215 for index, rawMessage := range rawMessages {
14216 osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage)
14217 if err != nil {
14218 return nil, err
14219 }
14220 oseiArray[index] = osei
14221 }
14222 return oseiArray, nil
14223 }
14224
14225
14226 func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) {
14227 osei.ObjectType = ObjectTypeOperationStatusExtendedInfo
14228 objectMap := make(map[string]interface{})
14229 if osei.ObjectType != "" {
14230 objectMap["objectType"] = osei.ObjectType
14231 }
14232 return json.Marshal(objectMap)
14233 }
14234
14235
14236 func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
14237 return nil, false
14238 }
14239
14240
14241 func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
14242 return nil, false
14243 }
14244
14245
14246 func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
14247 return nil, false
14248 }
14249
14250
14251 func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
14252 return &osei, true
14253 }
14254
14255
14256 func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
14257 return &osei, true
14258 }
14259
14260
14261 type OperationStatusJobExtendedInfo struct {
14262
14263 JobID *string `json:"jobId,omitempty"`
14264
14265 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
14266 }
14267
14268
14269 func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) {
14270 osjei.ObjectType = ObjectTypeOperationStatusJobExtendedInfo
14271 objectMap := make(map[string]interface{})
14272 if osjei.JobID != nil {
14273 objectMap["jobId"] = osjei.JobID
14274 }
14275 if osjei.ObjectType != "" {
14276 objectMap["objectType"] = osjei.ObjectType
14277 }
14278 return json.Marshal(objectMap)
14279 }
14280
14281
14282 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
14283 return &osjei, true
14284 }
14285
14286
14287 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
14288 return nil, false
14289 }
14290
14291
14292 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
14293 return nil, false
14294 }
14295
14296
14297 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
14298 return nil, false
14299 }
14300
14301
14302 func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
14303 return &osjei, true
14304 }
14305
14306
14307 type OperationStatusJobsExtendedInfo struct {
14308
14309 JobIds *[]string `json:"jobIds,omitempty"`
14310
14311 FailedJobsError map[string]*string `json:"failedJobsError"`
14312
14313 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
14314 }
14315
14316
14317 func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) {
14318 osjei.ObjectType = ObjectTypeOperationStatusJobsExtendedInfo
14319 objectMap := make(map[string]interface{})
14320 if osjei.JobIds != nil {
14321 objectMap["jobIds"] = osjei.JobIds
14322 }
14323 if osjei.FailedJobsError != nil {
14324 objectMap["failedJobsError"] = osjei.FailedJobsError
14325 }
14326 if osjei.ObjectType != "" {
14327 objectMap["objectType"] = osjei.ObjectType
14328 }
14329 return json.Marshal(objectMap)
14330 }
14331
14332
14333 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
14334 return nil, false
14335 }
14336
14337
14338 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
14339 return &osjei, true
14340 }
14341
14342
14343 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
14344 return nil, false
14345 }
14346
14347
14348 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
14349 return nil, false
14350 }
14351
14352
14353 func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
14354 return &osjei, true
14355 }
14356
14357
14358 type OperationStatusProvisionILRExtendedInfo struct {
14359
14360 RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"`
14361
14362 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
14363 }
14364
14365
14366 func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) {
14367 ospiei.ObjectType = ObjectTypeOperationStatusProvisionILRExtendedInfo
14368 objectMap := make(map[string]interface{})
14369 if ospiei.RecoveryTarget != nil {
14370 objectMap["recoveryTarget"] = ospiei.RecoveryTarget
14371 }
14372 if ospiei.ObjectType != "" {
14373 objectMap["objectType"] = ospiei.ObjectType
14374 }
14375 return json.Marshal(objectMap)
14376 }
14377
14378
14379 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
14380 return nil, false
14381 }
14382
14383
14384 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
14385 return nil, false
14386 }
14387
14388
14389 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
14390 return &ospiei, true
14391 }
14392
14393
14394 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
14395 return nil, false
14396 }
14397
14398
14399 func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
14400 return &ospiei, true
14401 }
14402
14403
14404 type OperationWorkerResponse struct {
14405
14406 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
14407
14408 Headers map[string][]string `json:"headers"`
14409 }
14410
14411
14412 func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) {
14413 objectMap := make(map[string]interface{})
14414 if owr.StatusCode != "" {
14415 objectMap["statusCode"] = owr.StatusCode
14416 }
14417 if owr.Headers != nil {
14418 objectMap["headers"] = owr.Headers
14419 }
14420 return json.Marshal(objectMap)
14421 }
14422
14423
14424 type PointInTimeRange struct {
14425
14426 StartTime *date.Time `json:"startTime,omitempty"`
14427
14428 EndTime *date.Time `json:"endTime,omitempty"`
14429 }
14430
14431
14432 type PreBackupValidation struct {
14433
14434 Status InquiryStatus `json:"status,omitempty"`
14435
14436 Code *string `json:"code,omitempty"`
14437
14438 Message *string `json:"message,omitempty"`
14439 }
14440
14441
14442
14443
14444
14445
14446
14447 type PreValidateEnableBackupRequest struct {
14448
14449 ResourceType DataSourceType `json:"resourceType,omitempty"`
14450
14451 ResourceID *string `json:"resourceId,omitempty"`
14452
14453 VaultID *string `json:"vaultId,omitempty"`
14454
14455 Properties *string `json:"properties,omitempty"`
14456 }
14457
14458
14459 type PreValidateEnableBackupResponse struct {
14460 autorest.Response `json:"-"`
14461
14462 Status ValidationStatus `json:"status,omitempty"`
14463
14464 ErrorCode *string `json:"errorCode,omitempty"`
14465
14466 ErrorMessage *string `json:"errorMessage,omitempty"`
14467
14468 Recommendation *string `json:"recommendation,omitempty"`
14469
14470
14471 ContainerName *string `json:"containerName,omitempty"`
14472
14473 ProtectedItemName *string `json:"protectedItemName,omitempty"`
14474 }
14475
14476
14477 type BasicProtectableContainer interface {
14478 AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool)
14479 AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool)
14480 AsProtectableContainer() (*ProtectableContainer, bool)
14481 }
14482
14483
14484 type ProtectableContainer struct {
14485
14486 FriendlyName *string `json:"friendlyName,omitempty"`
14487
14488 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
14489
14490 HealthStatus *string `json:"healthStatus,omitempty"`
14491
14492 ContainerID *string `json:"containerId,omitempty"`
14493
14494 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
14495 }
14496
14497 func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) {
14498 var m map[string]interface{}
14499 err := json.Unmarshal(body, &m)
14500 if err != nil {
14501 return nil, err
14502 }
14503
14504 switch m["protectableContainerType"] {
14505 case string(ProtectableContainerTypeStorageContainer):
14506 var aspc AzureStorageProtectableContainer
14507 err := json.Unmarshal(body, &aspc)
14508 return aspc, err
14509 case string(ProtectableContainerTypeVMAppContainer):
14510 var avacpc AzureVMAppContainerProtectableContainer
14511 err := json.Unmarshal(body, &avacpc)
14512 return avacpc, err
14513 default:
14514 var pc ProtectableContainer
14515 err := json.Unmarshal(body, &pc)
14516 return pc, err
14517 }
14518 }
14519 func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) {
14520 var rawMessages []*json.RawMessage
14521 err := json.Unmarshal(body, &rawMessages)
14522 if err != nil {
14523 return nil, err
14524 }
14525
14526 pcArray := make([]BasicProtectableContainer, len(rawMessages))
14527
14528 for index, rawMessage := range rawMessages {
14529 pc, err := unmarshalBasicProtectableContainer(*rawMessage)
14530 if err != nil {
14531 return nil, err
14532 }
14533 pcArray[index] = pc
14534 }
14535 return pcArray, nil
14536 }
14537
14538
14539 func (pc ProtectableContainer) MarshalJSON() ([]byte, error) {
14540 pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer
14541 objectMap := make(map[string]interface{})
14542 if pc.FriendlyName != nil {
14543 objectMap["friendlyName"] = pc.FriendlyName
14544 }
14545 if pc.BackupManagementType != "" {
14546 objectMap["backupManagementType"] = pc.BackupManagementType
14547 }
14548 if pc.HealthStatus != nil {
14549 objectMap["healthStatus"] = pc.HealthStatus
14550 }
14551 if pc.ContainerID != nil {
14552 objectMap["containerId"] = pc.ContainerID
14553 }
14554 if pc.ProtectableContainerType != "" {
14555 objectMap["protectableContainerType"] = pc.ProtectableContainerType
14556 }
14557 return json.Marshal(objectMap)
14558 }
14559
14560
14561 func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
14562 return nil, false
14563 }
14564
14565
14566 func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
14567 return nil, false
14568 }
14569
14570
14571 func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
14572 return &pc, true
14573 }
14574
14575
14576 func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
14577 return &pc, true
14578 }
14579
14580
14581 type ProtectableContainerResource struct {
14582
14583 Properties BasicProtectableContainer `json:"properties,omitempty"`
14584
14585 ID *string `json:"id,omitempty"`
14586
14587 Name *string `json:"name,omitempty"`
14588
14589 Type *string `json:"type,omitempty"`
14590
14591 Location *string `json:"location,omitempty"`
14592
14593 Tags map[string]*string `json:"tags"`
14594
14595 ETag *string `json:"eTag,omitempty"`
14596 }
14597
14598
14599 func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) {
14600 objectMap := make(map[string]interface{})
14601 objectMap["properties"] = pcr.Properties
14602 if pcr.Location != nil {
14603 objectMap["location"] = pcr.Location
14604 }
14605 if pcr.Tags != nil {
14606 objectMap["tags"] = pcr.Tags
14607 }
14608 if pcr.ETag != nil {
14609 objectMap["eTag"] = pcr.ETag
14610 }
14611 return json.Marshal(objectMap)
14612 }
14613
14614
14615 func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error {
14616 var m map[string]*json.RawMessage
14617 err := json.Unmarshal(body, &m)
14618 if err != nil {
14619 return err
14620 }
14621 for k, v := range m {
14622 switch k {
14623 case "properties":
14624 if v != nil {
14625 properties, err := unmarshalBasicProtectableContainer(*v)
14626 if err != nil {
14627 return err
14628 }
14629 pcr.Properties = properties
14630 }
14631 case "id":
14632 if v != nil {
14633 var ID string
14634 err = json.Unmarshal(*v, &ID)
14635 if err != nil {
14636 return err
14637 }
14638 pcr.ID = &ID
14639 }
14640 case "name":
14641 if v != nil {
14642 var name string
14643 err = json.Unmarshal(*v, &name)
14644 if err != nil {
14645 return err
14646 }
14647 pcr.Name = &name
14648 }
14649 case "type":
14650 if v != nil {
14651 var typeVar string
14652 err = json.Unmarshal(*v, &typeVar)
14653 if err != nil {
14654 return err
14655 }
14656 pcr.Type = &typeVar
14657 }
14658 case "location":
14659 if v != nil {
14660 var location string
14661 err = json.Unmarshal(*v, &location)
14662 if err != nil {
14663 return err
14664 }
14665 pcr.Location = &location
14666 }
14667 case "tags":
14668 if v != nil {
14669 var tags map[string]*string
14670 err = json.Unmarshal(*v, &tags)
14671 if err != nil {
14672 return err
14673 }
14674 pcr.Tags = tags
14675 }
14676 case "eTag":
14677 if v != nil {
14678 var eTag string
14679 err = json.Unmarshal(*v, &eTag)
14680 if err != nil {
14681 return err
14682 }
14683 pcr.ETag = &eTag
14684 }
14685 }
14686 }
14687
14688 return nil
14689 }
14690
14691
14692 type ProtectableContainerResourceList struct {
14693 autorest.Response `json:"-"`
14694
14695 Value *[]ProtectableContainerResource `json:"value,omitempty"`
14696
14697 NextLink *string `json:"nextLink,omitempty"`
14698 }
14699
14700
14701
14702 type ProtectableContainerResourceListIterator struct {
14703 i int
14704 page ProtectableContainerResourceListPage
14705 }
14706
14707
14708
14709 func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
14710 if tracing.IsEnabled() {
14711 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext")
14712 defer func() {
14713 sc := -1
14714 if iter.Response().Response.Response != nil {
14715 sc = iter.Response().Response.Response.StatusCode
14716 }
14717 tracing.EndSpan(ctx, sc, err)
14718 }()
14719 }
14720 iter.i++
14721 if iter.i < len(iter.page.Values()) {
14722 return nil
14723 }
14724 err = iter.page.NextWithContext(ctx)
14725 if err != nil {
14726 iter.i--
14727 return err
14728 }
14729 iter.i = 0
14730 return nil
14731 }
14732
14733
14734
14735
14736 func (iter *ProtectableContainerResourceListIterator) Next() error {
14737 return iter.NextWithContext(context.Background())
14738 }
14739
14740
14741 func (iter ProtectableContainerResourceListIterator) NotDone() bool {
14742 return iter.page.NotDone() && iter.i < len(iter.page.Values())
14743 }
14744
14745
14746 func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList {
14747 return iter.page.Response()
14748 }
14749
14750
14751
14752 func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource {
14753 if !iter.page.NotDone() {
14754 return ProtectableContainerResource{}
14755 }
14756 return iter.page.Values()[iter.i]
14757 }
14758
14759
14760 func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator {
14761 return ProtectableContainerResourceListIterator{page: page}
14762 }
14763
14764
14765 func (pcrl ProtectableContainerResourceList) IsEmpty() bool {
14766 return pcrl.Value == nil || len(*pcrl.Value) == 0
14767 }
14768
14769
14770 func (pcrl ProtectableContainerResourceList) hasNextLink() bool {
14771 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
14772 }
14773
14774
14775
14776 func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
14777 if !pcrl.hasNextLink() {
14778 return nil, nil
14779 }
14780 return autorest.Prepare((&http.Request{}).WithContext(ctx),
14781 autorest.AsJSON(),
14782 autorest.AsGet(),
14783 autorest.WithBaseURL(to.String(pcrl.NextLink)))
14784 }
14785
14786
14787 type ProtectableContainerResourceListPage struct {
14788 fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)
14789 pcrl ProtectableContainerResourceList
14790 }
14791
14792
14793
14794 func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
14795 if tracing.IsEnabled() {
14796 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext")
14797 defer func() {
14798 sc := -1
14799 if page.Response().Response.Response != nil {
14800 sc = page.Response().Response.Response.StatusCode
14801 }
14802 tracing.EndSpan(ctx, sc, err)
14803 }()
14804 }
14805 for {
14806 next, err := page.fn(ctx, page.pcrl)
14807 if err != nil {
14808 return err
14809 }
14810 page.pcrl = next
14811 if !next.hasNextLink() || !next.IsEmpty() {
14812 break
14813 }
14814 }
14815 return nil
14816 }
14817
14818
14819
14820
14821 func (page *ProtectableContainerResourceListPage) Next() error {
14822 return page.NextWithContext(context.Background())
14823 }
14824
14825
14826 func (page ProtectableContainerResourceListPage) NotDone() bool {
14827 return !page.pcrl.IsEmpty()
14828 }
14829
14830
14831 func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList {
14832 return page.pcrl
14833 }
14834
14835
14836 func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource {
14837 if page.pcrl.IsEmpty() {
14838 return nil
14839 }
14840 return *page.pcrl.Value
14841 }
14842
14843
14844 func NewProtectableContainerResourceListPage(cur ProtectableContainerResourceList, getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage {
14845 return ProtectableContainerResourceListPage{
14846 fn: getNextPage,
14847 pcrl: cur,
14848 }
14849 }
14850
14851
14852 type BasicProtectedItem interface {
14853 AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool)
14854 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
14855 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
14856 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
14857 AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool)
14858 AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool)
14859 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
14860 AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool)
14861 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
14862 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
14863 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
14864 AsDPMProtectedItem() (*DPMProtectedItem, bool)
14865 AsGenericProtectedItem() (*GenericProtectedItem, bool)
14866 AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool)
14867 AsProtectedItem() (*ProtectedItem, bool)
14868 }
14869
14870
14871 type ProtectedItem struct {
14872
14873 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
14874
14875 WorkloadType DataSourceType `json:"workloadType,omitempty"`
14876
14877 ContainerName *string `json:"containerName,omitempty"`
14878
14879 SourceResourceID *string `json:"sourceResourceId,omitempty"`
14880
14881 PolicyID *string `json:"policyId,omitempty"`
14882
14883 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
14884
14885 BackupSetName *string `json:"backupSetName,omitempty"`
14886
14887 CreateMode CreateMode `json:"createMode,omitempty"`
14888
14889 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
14890
14891 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
14892
14893 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
14894
14895 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
14896
14897 IsRehydrate *bool `json:"isRehydrate,omitempty"`
14898
14899 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
14900 }
14901
14902 func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) {
14903 var m map[string]interface{}
14904 err := json.Unmarshal(body, &m)
14905 if err != nil {
14906 return nil, err
14907 }
14908
14909 switch m["protectedItemType"] {
14910 case string(ProtectedItemTypeAzureFileShareProtectedItem):
14911 var afpi AzureFileshareProtectedItem
14912 err := json.Unmarshal(body, &afpi)
14913 return afpi, err
14914 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
14915 var aisccvpi AzureIaaSClassicComputeVMProtectedItem
14916 err := json.Unmarshal(body, &aisccvpi)
14917 return aisccvpi, err
14918 case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
14919 var aiscvpi AzureIaaSComputeVMProtectedItem
14920 err := json.Unmarshal(body, &aiscvpi)
14921 return aiscvpi, err
14922 case string(ProtectedItemTypeAzureIaaSVMProtectedItem):
14923 var aispi AzureIaaSVMProtectedItem
14924 err := json.Unmarshal(body, &aispi)
14925 return aispi, err
14926 case string(ProtectedItemTypeMicrosoftSqlserversdatabases):
14927 var aspi AzureSQLProtectedItem
14928 err := json.Unmarshal(body, &aspi)
14929 return aspi, err
14930 case string(ProtectedItemTypeAzureVMWorkloadProtectedItem):
14931 var avwpi AzureVMWorkloadProtectedItem
14932 err := json.Unmarshal(body, &avwpi)
14933 return avwpi, err
14934 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
14935 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
14936 err := json.Unmarshal(body, &avwsadpi)
14937 return avwsadpi, err
14938 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
14939 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
14940 err := json.Unmarshal(body, &avwshdpi)
14941 return avwshdpi, err
14942 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
14943 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
14944 err := json.Unmarshal(body, &avwsdpi)
14945 return avwsdpi, err
14946 case string(ProtectedItemTypeDPMProtectedItem):
14947 var dpi DPMProtectedItem
14948 err := json.Unmarshal(body, &dpi)
14949 return dpi, err
14950 case string(ProtectedItemTypeGenericProtectedItem):
14951 var gpi GenericProtectedItem
14952 err := json.Unmarshal(body, &gpi)
14953 return gpi, err
14954 case string(ProtectedItemTypeMabFileFolderProtectedItem):
14955 var mffpi MabFileFolderProtectedItem
14956 err := json.Unmarshal(body, &mffpi)
14957 return mffpi, err
14958 default:
14959 var pi ProtectedItem
14960 err := json.Unmarshal(body, &pi)
14961 return pi, err
14962 }
14963 }
14964 func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) {
14965 var rawMessages []*json.RawMessage
14966 err := json.Unmarshal(body, &rawMessages)
14967 if err != nil {
14968 return nil, err
14969 }
14970
14971 piArray := make([]BasicProtectedItem, len(rawMessages))
14972
14973 for index, rawMessage := range rawMessages {
14974 pi, err := unmarshalBasicProtectedItem(*rawMessage)
14975 if err != nil {
14976 return nil, err
14977 }
14978 piArray[index] = pi
14979 }
14980 return piArray, nil
14981 }
14982
14983
14984 func (pi ProtectedItem) MarshalJSON() ([]byte, error) {
14985 pi.ProtectedItemType = ProtectedItemTypeProtectedItem
14986 objectMap := make(map[string]interface{})
14987 if pi.BackupManagementType != "" {
14988 objectMap["backupManagementType"] = pi.BackupManagementType
14989 }
14990 if pi.WorkloadType != "" {
14991 objectMap["workloadType"] = pi.WorkloadType
14992 }
14993 if pi.ContainerName != nil {
14994 objectMap["containerName"] = pi.ContainerName
14995 }
14996 if pi.SourceResourceID != nil {
14997 objectMap["sourceResourceId"] = pi.SourceResourceID
14998 }
14999 if pi.PolicyID != nil {
15000 objectMap["policyId"] = pi.PolicyID
15001 }
15002 if pi.LastRecoveryPoint != nil {
15003 objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint
15004 }
15005 if pi.BackupSetName != nil {
15006 objectMap["backupSetName"] = pi.BackupSetName
15007 }
15008 if pi.CreateMode != "" {
15009 objectMap["createMode"] = pi.CreateMode
15010 }
15011 if pi.DeferredDeleteTimeInUTC != nil {
15012 objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC
15013 }
15014 if pi.IsScheduledForDeferredDelete != nil {
15015 objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete
15016 }
15017 if pi.DeferredDeleteTimeRemaining != nil {
15018 objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining
15019 }
15020 if pi.IsDeferredDeleteScheduleUpcoming != nil {
15021 objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming
15022 }
15023 if pi.IsRehydrate != nil {
15024 objectMap["isRehydrate"] = pi.IsRehydrate
15025 }
15026 if pi.ProtectedItemType != "" {
15027 objectMap["protectedItemType"] = pi.ProtectedItemType
15028 }
15029 return json.Marshal(objectMap)
15030 }
15031
15032
15033 func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
15034 return nil, false
15035 }
15036
15037
15038 func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
15039 return nil, false
15040 }
15041
15042
15043 func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
15044 return nil, false
15045 }
15046
15047
15048 func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
15049 return nil, false
15050 }
15051
15052
15053 func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
15054 return nil, false
15055 }
15056
15057
15058 func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
15059 return nil, false
15060 }
15061
15062
15063 func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
15064 return nil, false
15065 }
15066
15067
15068 func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
15069 return nil, false
15070 }
15071
15072
15073 func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
15074 return nil, false
15075 }
15076
15077
15078 func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
15079 return nil, false
15080 }
15081
15082
15083 func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
15084 return nil, false
15085 }
15086
15087
15088 func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
15089 return nil, false
15090 }
15091
15092
15093 func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
15094 return nil, false
15095 }
15096
15097
15098 func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
15099 return nil, false
15100 }
15101
15102
15103 func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
15104 return &pi, true
15105 }
15106
15107
15108 func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
15109 return &pi, true
15110 }
15111
15112
15113 type ProtectedItemQueryObject struct {
15114
15115 HealthState HealthState `json:"healthState,omitempty"`
15116
15117 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15118
15119 ItemType DataSourceType `json:"itemType,omitempty"`
15120
15121 PolicyName *string `json:"policyName,omitempty"`
15122
15123 ContainerName *string `json:"containerName,omitempty"`
15124
15125 BackupEngineName *string `json:"backupEngineName,omitempty"`
15126
15127 FriendlyName *string `json:"friendlyName,omitempty"`
15128
15129 FabricName *string `json:"fabricName,omitempty"`
15130
15131 BackupSetName *string `json:"backupSetName,omitempty"`
15132 }
15133
15134
15135 type ProtectedItemResource struct {
15136 autorest.Response `json:"-"`
15137
15138 Properties BasicProtectedItem `json:"properties,omitempty"`
15139
15140 ID *string `json:"id,omitempty"`
15141
15142 Name *string `json:"name,omitempty"`
15143
15144 Type *string `json:"type,omitempty"`
15145
15146 Location *string `json:"location,omitempty"`
15147
15148 Tags map[string]*string `json:"tags"`
15149
15150 ETag *string `json:"eTag,omitempty"`
15151 }
15152
15153
15154 func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) {
15155 objectMap := make(map[string]interface{})
15156 objectMap["properties"] = pir.Properties
15157 if pir.Location != nil {
15158 objectMap["location"] = pir.Location
15159 }
15160 if pir.Tags != nil {
15161 objectMap["tags"] = pir.Tags
15162 }
15163 if pir.ETag != nil {
15164 objectMap["eTag"] = pir.ETag
15165 }
15166 return json.Marshal(objectMap)
15167 }
15168
15169
15170 func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error {
15171 var m map[string]*json.RawMessage
15172 err := json.Unmarshal(body, &m)
15173 if err != nil {
15174 return err
15175 }
15176 for k, v := range m {
15177 switch k {
15178 case "properties":
15179 if v != nil {
15180 properties, err := unmarshalBasicProtectedItem(*v)
15181 if err != nil {
15182 return err
15183 }
15184 pir.Properties = properties
15185 }
15186 case "id":
15187 if v != nil {
15188 var ID string
15189 err = json.Unmarshal(*v, &ID)
15190 if err != nil {
15191 return err
15192 }
15193 pir.ID = &ID
15194 }
15195 case "name":
15196 if v != nil {
15197 var name string
15198 err = json.Unmarshal(*v, &name)
15199 if err != nil {
15200 return err
15201 }
15202 pir.Name = &name
15203 }
15204 case "type":
15205 if v != nil {
15206 var typeVar string
15207 err = json.Unmarshal(*v, &typeVar)
15208 if err != nil {
15209 return err
15210 }
15211 pir.Type = &typeVar
15212 }
15213 case "location":
15214 if v != nil {
15215 var location string
15216 err = json.Unmarshal(*v, &location)
15217 if err != nil {
15218 return err
15219 }
15220 pir.Location = &location
15221 }
15222 case "tags":
15223 if v != nil {
15224 var tags map[string]*string
15225 err = json.Unmarshal(*v, &tags)
15226 if err != nil {
15227 return err
15228 }
15229 pir.Tags = tags
15230 }
15231 case "eTag":
15232 if v != nil {
15233 var eTag string
15234 err = json.Unmarshal(*v, &eTag)
15235 if err != nil {
15236 return err
15237 }
15238 pir.ETag = &eTag
15239 }
15240 }
15241 }
15242
15243 return nil
15244 }
15245
15246
15247 type ProtectedItemResourceList struct {
15248 autorest.Response `json:"-"`
15249
15250 Value *[]ProtectedItemResource `json:"value,omitempty"`
15251
15252 NextLink *string `json:"nextLink,omitempty"`
15253 }
15254
15255
15256 type ProtectedItemResourceListIterator struct {
15257 i int
15258 page ProtectedItemResourceListPage
15259 }
15260
15261
15262
15263 func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
15264 if tracing.IsEnabled() {
15265 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext")
15266 defer func() {
15267 sc := -1
15268 if iter.Response().Response.Response != nil {
15269 sc = iter.Response().Response.Response.StatusCode
15270 }
15271 tracing.EndSpan(ctx, sc, err)
15272 }()
15273 }
15274 iter.i++
15275 if iter.i < len(iter.page.Values()) {
15276 return nil
15277 }
15278 err = iter.page.NextWithContext(ctx)
15279 if err != nil {
15280 iter.i--
15281 return err
15282 }
15283 iter.i = 0
15284 return nil
15285 }
15286
15287
15288
15289
15290 func (iter *ProtectedItemResourceListIterator) Next() error {
15291 return iter.NextWithContext(context.Background())
15292 }
15293
15294
15295 func (iter ProtectedItemResourceListIterator) NotDone() bool {
15296 return iter.page.NotDone() && iter.i < len(iter.page.Values())
15297 }
15298
15299
15300 func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList {
15301 return iter.page.Response()
15302 }
15303
15304
15305
15306 func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource {
15307 if !iter.page.NotDone() {
15308 return ProtectedItemResource{}
15309 }
15310 return iter.page.Values()[iter.i]
15311 }
15312
15313
15314 func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator {
15315 return ProtectedItemResourceListIterator{page: page}
15316 }
15317
15318
15319 func (pirl ProtectedItemResourceList) IsEmpty() bool {
15320 return pirl.Value == nil || len(*pirl.Value) == 0
15321 }
15322
15323
15324 func (pirl ProtectedItemResourceList) hasNextLink() bool {
15325 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
15326 }
15327
15328
15329
15330 func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
15331 if !pirl.hasNextLink() {
15332 return nil, nil
15333 }
15334 return autorest.Prepare((&http.Request{}).WithContext(ctx),
15335 autorest.AsJSON(),
15336 autorest.AsGet(),
15337 autorest.WithBaseURL(to.String(pirl.NextLink)))
15338 }
15339
15340
15341 type ProtectedItemResourceListPage struct {
15342 fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)
15343 pirl ProtectedItemResourceList
15344 }
15345
15346
15347
15348 func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
15349 if tracing.IsEnabled() {
15350 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext")
15351 defer func() {
15352 sc := -1
15353 if page.Response().Response.Response != nil {
15354 sc = page.Response().Response.Response.StatusCode
15355 }
15356 tracing.EndSpan(ctx, sc, err)
15357 }()
15358 }
15359 for {
15360 next, err := page.fn(ctx, page.pirl)
15361 if err != nil {
15362 return err
15363 }
15364 page.pirl = next
15365 if !next.hasNextLink() || !next.IsEmpty() {
15366 break
15367 }
15368 }
15369 return nil
15370 }
15371
15372
15373
15374
15375 func (page *ProtectedItemResourceListPage) Next() error {
15376 return page.NextWithContext(context.Background())
15377 }
15378
15379
15380 func (page ProtectedItemResourceListPage) NotDone() bool {
15381 return !page.pirl.IsEmpty()
15382 }
15383
15384
15385 func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList {
15386 return page.pirl
15387 }
15388
15389
15390 func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource {
15391 if page.pirl.IsEmpty() {
15392 return nil
15393 }
15394 return *page.pirl.Value
15395 }
15396
15397
15398 func NewProtectedItemResourceListPage(cur ProtectedItemResourceList, getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage {
15399 return ProtectedItemResourceListPage{
15400 fn: getNextPage,
15401 pirl: cur,
15402 }
15403 }
15404
15405
15406
15407 type BasicProtectionContainer interface {
15408 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
15409 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
15410 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
15411 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
15412 AsAzureSQLContainer() (*AzureSQLContainer, bool)
15413 AsAzureStorageContainer() (*AzureStorageContainer, bool)
15414 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
15415 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
15416 AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool)
15417 AsDpmContainer() (*DpmContainer, bool)
15418 AsBasicDpmContainer() (BasicDpmContainer, bool)
15419 AsGenericContainer() (*GenericContainer, bool)
15420 AsIaaSVMContainer() (*IaaSVMContainer, bool)
15421 AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool)
15422 AsMabContainer() (*MabContainer, bool)
15423 AsProtectionContainer() (*ProtectionContainer, bool)
15424 }
15425
15426
15427
15428 type ProtectionContainer struct {
15429
15430 FriendlyName *string `json:"friendlyName,omitempty"`
15431
15432 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15433
15434 RegistrationStatus *string `json:"registrationStatus,omitempty"`
15435
15436 HealthStatus *string `json:"healthStatus,omitempty"`
15437
15438 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
15439 }
15440
15441 func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) {
15442 var m map[string]interface{}
15443 err := json.Unmarshal(body, &m)
15444 if err != nil {
15445 return nil, err
15446 }
15447
15448 switch m["containerType"] {
15449 case string(ContainerTypeAzureBackupServerContainer1):
15450 var absc AzureBackupServerContainer
15451 err := json.Unmarshal(body, &absc)
15452 return absc, err
15453 case string(ContainerTypeMicrosoftClassicComputevirtualMachines):
15454 var aisccvc AzureIaaSClassicComputeVMContainer
15455 err := json.Unmarshal(body, &aisccvc)
15456 return aisccvc, err
15457 case string(ContainerTypeMicrosoftComputevirtualMachines):
15458 var aiscvc AzureIaaSComputeVMContainer
15459 err := json.Unmarshal(body, &aiscvc)
15460 return aiscvc, err
15461 case string(ContainerTypeSQLAGWorkLoadContainer1):
15462 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
15463 err := json.Unmarshal(body, &aswcpc)
15464 return aswcpc, err
15465 case string(ContainerTypeAzureSQLContainer1):
15466 var asc AzureSQLContainer
15467 err := json.Unmarshal(body, &asc)
15468 return asc, err
15469 case string(ContainerTypeStorageContainer1):
15470 var asc AzureStorageContainer
15471 err := json.Unmarshal(body, &asc)
15472 return asc, err
15473 case string(ContainerTypeVMAppContainer1):
15474 var avacpc AzureVMAppContainerProtectionContainer
15475 err := json.Unmarshal(body, &avacpc)
15476 return avacpc, err
15477 case string(ContainerTypeAzureWorkloadContainer):
15478 var awc AzureWorkloadContainer
15479 err := json.Unmarshal(body, &awc)
15480 return awc, err
15481 case string(ContainerTypeDPMContainer1):
15482 var dc DpmContainer
15483 err := json.Unmarshal(body, &dc)
15484 return dc, err
15485 case string(ContainerTypeGenericContainer1):
15486 var gc GenericContainer
15487 err := json.Unmarshal(body, &gc)
15488 return gc, err
15489 case string(ContainerTypeIaaSVMContainer):
15490 var isc IaaSVMContainer
15491 err := json.Unmarshal(body, &isc)
15492 return isc, err
15493 case string(ContainerTypeWindows1):
15494 var mc MabContainer
15495 err := json.Unmarshal(body, &mc)
15496 return mc, err
15497 default:
15498 var pc ProtectionContainer
15499 err := json.Unmarshal(body, &pc)
15500 return pc, err
15501 }
15502 }
15503 func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) {
15504 var rawMessages []*json.RawMessage
15505 err := json.Unmarshal(body, &rawMessages)
15506 if err != nil {
15507 return nil, err
15508 }
15509
15510 pcArray := make([]BasicProtectionContainer, len(rawMessages))
15511
15512 for index, rawMessage := range rawMessages {
15513 pc, err := unmarshalBasicProtectionContainer(*rawMessage)
15514 if err != nil {
15515 return nil, err
15516 }
15517 pcArray[index] = pc
15518 }
15519 return pcArray, nil
15520 }
15521
15522
15523 func (pc ProtectionContainer) MarshalJSON() ([]byte, error) {
15524 pc.ContainerType = ContainerTypeProtectionContainer
15525 objectMap := make(map[string]interface{})
15526 if pc.FriendlyName != nil {
15527 objectMap["friendlyName"] = pc.FriendlyName
15528 }
15529 if pc.BackupManagementType != "" {
15530 objectMap["backupManagementType"] = pc.BackupManagementType
15531 }
15532 if pc.RegistrationStatus != nil {
15533 objectMap["registrationStatus"] = pc.RegistrationStatus
15534 }
15535 if pc.HealthStatus != nil {
15536 objectMap["healthStatus"] = pc.HealthStatus
15537 }
15538 if pc.ContainerType != "" {
15539 objectMap["containerType"] = pc.ContainerType
15540 }
15541 return json.Marshal(objectMap)
15542 }
15543
15544
15545 func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
15546 return nil, false
15547 }
15548
15549
15550 func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
15551 return nil, false
15552 }
15553
15554
15555 func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
15556 return nil, false
15557 }
15558
15559
15560 func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
15561 return nil, false
15562 }
15563
15564
15565 func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
15566 return nil, false
15567 }
15568
15569
15570 func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
15571 return nil, false
15572 }
15573
15574
15575 func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
15576 return nil, false
15577 }
15578
15579
15580 func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
15581 return nil, false
15582 }
15583
15584
15585 func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
15586 return nil, false
15587 }
15588
15589
15590 func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
15591 return nil, false
15592 }
15593
15594
15595 func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
15596 return nil, false
15597 }
15598
15599
15600 func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
15601 return nil, false
15602 }
15603
15604
15605 func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
15606 return nil, false
15607 }
15608
15609
15610 func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
15611 return nil, false
15612 }
15613
15614
15615 func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) {
15616 return nil, false
15617 }
15618
15619
15620 func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
15621 return &pc, true
15622 }
15623
15624
15625 func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
15626 return &pc, true
15627 }
15628
15629
15630
15631 type ProtectionContainerResource struct {
15632 autorest.Response `json:"-"`
15633
15634 Properties BasicProtectionContainer `json:"properties,omitempty"`
15635
15636 ID *string `json:"id,omitempty"`
15637
15638 Name *string `json:"name,omitempty"`
15639
15640 Type *string `json:"type,omitempty"`
15641
15642 Location *string `json:"location,omitempty"`
15643
15644 Tags map[string]*string `json:"tags"`
15645
15646 ETag *string `json:"eTag,omitempty"`
15647 }
15648
15649
15650 func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) {
15651 objectMap := make(map[string]interface{})
15652 objectMap["properties"] = pcr.Properties
15653 if pcr.Location != nil {
15654 objectMap["location"] = pcr.Location
15655 }
15656 if pcr.Tags != nil {
15657 objectMap["tags"] = pcr.Tags
15658 }
15659 if pcr.ETag != nil {
15660 objectMap["eTag"] = pcr.ETag
15661 }
15662 return json.Marshal(objectMap)
15663 }
15664
15665
15666 func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error {
15667 var m map[string]*json.RawMessage
15668 err := json.Unmarshal(body, &m)
15669 if err != nil {
15670 return err
15671 }
15672 for k, v := range m {
15673 switch k {
15674 case "properties":
15675 if v != nil {
15676 properties, err := unmarshalBasicProtectionContainer(*v)
15677 if err != nil {
15678 return err
15679 }
15680 pcr.Properties = properties
15681 }
15682 case "id":
15683 if v != nil {
15684 var ID string
15685 err = json.Unmarshal(*v, &ID)
15686 if err != nil {
15687 return err
15688 }
15689 pcr.ID = &ID
15690 }
15691 case "name":
15692 if v != nil {
15693 var name string
15694 err = json.Unmarshal(*v, &name)
15695 if err != nil {
15696 return err
15697 }
15698 pcr.Name = &name
15699 }
15700 case "type":
15701 if v != nil {
15702 var typeVar string
15703 err = json.Unmarshal(*v, &typeVar)
15704 if err != nil {
15705 return err
15706 }
15707 pcr.Type = &typeVar
15708 }
15709 case "location":
15710 if v != nil {
15711 var location string
15712 err = json.Unmarshal(*v, &location)
15713 if err != nil {
15714 return err
15715 }
15716 pcr.Location = &location
15717 }
15718 case "tags":
15719 if v != nil {
15720 var tags map[string]*string
15721 err = json.Unmarshal(*v, &tags)
15722 if err != nil {
15723 return err
15724 }
15725 pcr.Tags = tags
15726 }
15727 case "eTag":
15728 if v != nil {
15729 var eTag string
15730 err = json.Unmarshal(*v, &eTag)
15731 if err != nil {
15732 return err
15733 }
15734 pcr.ETag = &eTag
15735 }
15736 }
15737 }
15738
15739 return nil
15740 }
15741
15742
15743 type ProtectionContainerResourceList struct {
15744 autorest.Response `json:"-"`
15745
15746 Value *[]ProtectionContainerResource `json:"value,omitempty"`
15747
15748 NextLink *string `json:"nextLink,omitempty"`
15749 }
15750
15751
15752
15753 type ProtectionContainerResourceListIterator struct {
15754 i int
15755 page ProtectionContainerResourceListPage
15756 }
15757
15758
15759
15760 func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
15761 if tracing.IsEnabled() {
15762 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext")
15763 defer func() {
15764 sc := -1
15765 if iter.Response().Response.Response != nil {
15766 sc = iter.Response().Response.Response.StatusCode
15767 }
15768 tracing.EndSpan(ctx, sc, err)
15769 }()
15770 }
15771 iter.i++
15772 if iter.i < len(iter.page.Values()) {
15773 return nil
15774 }
15775 err = iter.page.NextWithContext(ctx)
15776 if err != nil {
15777 iter.i--
15778 return err
15779 }
15780 iter.i = 0
15781 return nil
15782 }
15783
15784
15785
15786
15787 func (iter *ProtectionContainerResourceListIterator) Next() error {
15788 return iter.NextWithContext(context.Background())
15789 }
15790
15791
15792 func (iter ProtectionContainerResourceListIterator) NotDone() bool {
15793 return iter.page.NotDone() && iter.i < len(iter.page.Values())
15794 }
15795
15796
15797 func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList {
15798 return iter.page.Response()
15799 }
15800
15801
15802
15803 func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource {
15804 if !iter.page.NotDone() {
15805 return ProtectionContainerResource{}
15806 }
15807 return iter.page.Values()[iter.i]
15808 }
15809
15810
15811 func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator {
15812 return ProtectionContainerResourceListIterator{page: page}
15813 }
15814
15815
15816 func (pcrl ProtectionContainerResourceList) IsEmpty() bool {
15817 return pcrl.Value == nil || len(*pcrl.Value) == 0
15818 }
15819
15820
15821 func (pcrl ProtectionContainerResourceList) hasNextLink() bool {
15822 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
15823 }
15824
15825
15826
15827 func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
15828 if !pcrl.hasNextLink() {
15829 return nil, nil
15830 }
15831 return autorest.Prepare((&http.Request{}).WithContext(ctx),
15832 autorest.AsJSON(),
15833 autorest.AsGet(),
15834 autorest.WithBaseURL(to.String(pcrl.NextLink)))
15835 }
15836
15837
15838 type ProtectionContainerResourceListPage struct {
15839 fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)
15840 pcrl ProtectionContainerResourceList
15841 }
15842
15843
15844
15845 func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
15846 if tracing.IsEnabled() {
15847 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext")
15848 defer func() {
15849 sc := -1
15850 if page.Response().Response.Response != nil {
15851 sc = page.Response().Response.Response.StatusCode
15852 }
15853 tracing.EndSpan(ctx, sc, err)
15854 }()
15855 }
15856 for {
15857 next, err := page.fn(ctx, page.pcrl)
15858 if err != nil {
15859 return err
15860 }
15861 page.pcrl = next
15862 if !next.hasNextLink() || !next.IsEmpty() {
15863 break
15864 }
15865 }
15866 return nil
15867 }
15868
15869
15870
15871
15872 func (page *ProtectionContainerResourceListPage) Next() error {
15873 return page.NextWithContext(context.Background())
15874 }
15875
15876
15877 func (page ProtectionContainerResourceListPage) NotDone() bool {
15878 return !page.pcrl.IsEmpty()
15879 }
15880
15881
15882 func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList {
15883 return page.pcrl
15884 }
15885
15886
15887 func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource {
15888 if page.pcrl.IsEmpty() {
15889 return nil
15890 }
15891 return *page.pcrl.Value
15892 }
15893
15894
15895 func NewProtectionContainerResourceListPage(cur ProtectionContainerResourceList, getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage {
15896 return ProtectionContainerResourceListPage{
15897 fn: getNextPage,
15898 pcrl: cur,
15899 }
15900 }
15901
15902
15903 type BasicProtectionIntent interface {
15904 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
15905 AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool)
15906 AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool)
15907 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
15908 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
15909 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
15910 AsProtectionIntent() (*ProtectionIntent, bool)
15911 }
15912
15913
15914 type ProtectionIntent struct {
15915
15916 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15917
15918 SourceResourceID *string `json:"sourceResourceId,omitempty"`
15919
15920 ItemID *string `json:"itemId,omitempty"`
15921
15922 PolicyID *string `json:"policyId,omitempty"`
15923
15924 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
15925
15926 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
15927 }
15928
15929 func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) {
15930 var m map[string]interface{}
15931 err := json.Unmarshal(body, &m)
15932 if err != nil {
15933 return nil, err
15934 }
15935
15936 switch m["protectionIntentItemType"] {
15937 case string(ProtectionIntentItemTypeRecoveryServiceVaultItem):
15938 var arsvpi AzureRecoveryServiceVaultProtectionIntent
15939 err := json.Unmarshal(body, &arsvpi)
15940 return arsvpi, err
15941 case string(ProtectionIntentItemTypeAzureResourceItem):
15942 var arpi AzureResourceProtectionIntent
15943 err := json.Unmarshal(body, &arpi)
15944 return arpi, err
15945 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
15946 var awapi AzureWorkloadAutoProtectionIntent
15947 err := json.Unmarshal(body, &awapi)
15948 return awapi, err
15949 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
15950 var awsapi AzureWorkloadSQLAutoProtectionIntent
15951 err := json.Unmarshal(body, &awsapi)
15952 return awsapi, err
15953 default:
15954 var pi ProtectionIntent
15955 err := json.Unmarshal(body, &pi)
15956 return pi, err
15957 }
15958 }
15959 func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) {
15960 var rawMessages []*json.RawMessage
15961 err := json.Unmarshal(body, &rawMessages)
15962 if err != nil {
15963 return nil, err
15964 }
15965
15966 piArray := make([]BasicProtectionIntent, len(rawMessages))
15967
15968 for index, rawMessage := range rawMessages {
15969 pi, err := unmarshalBasicProtectionIntent(*rawMessage)
15970 if err != nil {
15971 return nil, err
15972 }
15973 piArray[index] = pi
15974 }
15975 return piArray, nil
15976 }
15977
15978
15979 func (pi ProtectionIntent) MarshalJSON() ([]byte, error) {
15980 pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent
15981 objectMap := make(map[string]interface{})
15982 if pi.BackupManagementType != "" {
15983 objectMap["backupManagementType"] = pi.BackupManagementType
15984 }
15985 if pi.SourceResourceID != nil {
15986 objectMap["sourceResourceId"] = pi.SourceResourceID
15987 }
15988 if pi.ItemID != nil {
15989 objectMap["itemId"] = pi.ItemID
15990 }
15991 if pi.PolicyID != nil {
15992 objectMap["policyId"] = pi.PolicyID
15993 }
15994 if pi.ProtectionState != "" {
15995 objectMap["protectionState"] = pi.ProtectionState
15996 }
15997 if pi.ProtectionIntentItemType != "" {
15998 objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType
15999 }
16000 return json.Marshal(objectMap)
16001 }
16002
16003
16004 func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
16005 return nil, false
16006 }
16007
16008
16009 func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
16010 return nil, false
16011 }
16012
16013
16014 func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
16015 return nil, false
16016 }
16017
16018
16019 func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
16020 return nil, false
16021 }
16022
16023
16024 func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
16025 return nil, false
16026 }
16027
16028
16029 func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
16030 return nil, false
16031 }
16032
16033
16034 func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
16035 return &pi, true
16036 }
16037
16038
16039 func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
16040 return &pi, true
16041 }
16042
16043
16044 type ProtectionIntentQueryObject struct {
16045
16046 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
16047
16048 ItemType IntentItemType `json:"itemType,omitempty"`
16049
16050 ParentName *string `json:"parentName,omitempty"`
16051
16052 ItemName *string `json:"itemName,omitempty"`
16053 }
16054
16055
16056 type ProtectionIntentResource struct {
16057 autorest.Response `json:"-"`
16058
16059 Properties BasicProtectionIntent `json:"properties,omitempty"`
16060
16061 ID *string `json:"id,omitempty"`
16062
16063 Name *string `json:"name,omitempty"`
16064
16065 Type *string `json:"type,omitempty"`
16066
16067 Location *string `json:"location,omitempty"`
16068
16069 Tags map[string]*string `json:"tags"`
16070
16071 ETag *string `json:"eTag,omitempty"`
16072 }
16073
16074
16075 func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) {
16076 objectMap := make(map[string]interface{})
16077 objectMap["properties"] = pir.Properties
16078 if pir.Location != nil {
16079 objectMap["location"] = pir.Location
16080 }
16081 if pir.Tags != nil {
16082 objectMap["tags"] = pir.Tags
16083 }
16084 if pir.ETag != nil {
16085 objectMap["eTag"] = pir.ETag
16086 }
16087 return json.Marshal(objectMap)
16088 }
16089
16090
16091 func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error {
16092 var m map[string]*json.RawMessage
16093 err := json.Unmarshal(body, &m)
16094 if err != nil {
16095 return err
16096 }
16097 for k, v := range m {
16098 switch k {
16099 case "properties":
16100 if v != nil {
16101 properties, err := unmarshalBasicProtectionIntent(*v)
16102 if err != nil {
16103 return err
16104 }
16105 pir.Properties = properties
16106 }
16107 case "id":
16108 if v != nil {
16109 var ID string
16110 err = json.Unmarshal(*v, &ID)
16111 if err != nil {
16112 return err
16113 }
16114 pir.ID = &ID
16115 }
16116 case "name":
16117 if v != nil {
16118 var name string
16119 err = json.Unmarshal(*v, &name)
16120 if err != nil {
16121 return err
16122 }
16123 pir.Name = &name
16124 }
16125 case "type":
16126 if v != nil {
16127 var typeVar string
16128 err = json.Unmarshal(*v, &typeVar)
16129 if err != nil {
16130 return err
16131 }
16132 pir.Type = &typeVar
16133 }
16134 case "location":
16135 if v != nil {
16136 var location string
16137 err = json.Unmarshal(*v, &location)
16138 if err != nil {
16139 return err
16140 }
16141 pir.Location = &location
16142 }
16143 case "tags":
16144 if v != nil {
16145 var tags map[string]*string
16146 err = json.Unmarshal(*v, &tags)
16147 if err != nil {
16148 return err
16149 }
16150 pir.Tags = tags
16151 }
16152 case "eTag":
16153 if v != nil {
16154 var eTag string
16155 err = json.Unmarshal(*v, &eTag)
16156 if err != nil {
16157 return err
16158 }
16159 pir.ETag = &eTag
16160 }
16161 }
16162 }
16163
16164 return nil
16165 }
16166
16167
16168 type ProtectionIntentResourceList struct {
16169 autorest.Response `json:"-"`
16170
16171 Value *[]ProtectionIntentResource `json:"value,omitempty"`
16172
16173 NextLink *string `json:"nextLink,omitempty"`
16174 }
16175
16176
16177
16178 type ProtectionIntentResourceListIterator struct {
16179 i int
16180 page ProtectionIntentResourceListPage
16181 }
16182
16183
16184
16185 func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) {
16186 if tracing.IsEnabled() {
16187 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext")
16188 defer func() {
16189 sc := -1
16190 if iter.Response().Response.Response != nil {
16191 sc = iter.Response().Response.Response.StatusCode
16192 }
16193 tracing.EndSpan(ctx, sc, err)
16194 }()
16195 }
16196 iter.i++
16197 if iter.i < len(iter.page.Values()) {
16198 return nil
16199 }
16200 err = iter.page.NextWithContext(ctx)
16201 if err != nil {
16202 iter.i--
16203 return err
16204 }
16205 iter.i = 0
16206 return nil
16207 }
16208
16209
16210
16211
16212 func (iter *ProtectionIntentResourceListIterator) Next() error {
16213 return iter.NextWithContext(context.Background())
16214 }
16215
16216
16217 func (iter ProtectionIntentResourceListIterator) NotDone() bool {
16218 return iter.page.NotDone() && iter.i < len(iter.page.Values())
16219 }
16220
16221
16222 func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList {
16223 return iter.page.Response()
16224 }
16225
16226
16227
16228 func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource {
16229 if !iter.page.NotDone() {
16230 return ProtectionIntentResource{}
16231 }
16232 return iter.page.Values()[iter.i]
16233 }
16234
16235
16236 func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator {
16237 return ProtectionIntentResourceListIterator{page: page}
16238 }
16239
16240
16241 func (pirl ProtectionIntentResourceList) IsEmpty() bool {
16242 return pirl.Value == nil || len(*pirl.Value) == 0
16243 }
16244
16245
16246 func (pirl ProtectionIntentResourceList) hasNextLink() bool {
16247 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
16248 }
16249
16250
16251
16252 func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) {
16253 if !pirl.hasNextLink() {
16254 return nil, nil
16255 }
16256 return autorest.Prepare((&http.Request{}).WithContext(ctx),
16257 autorest.AsJSON(),
16258 autorest.AsGet(),
16259 autorest.WithBaseURL(to.String(pirl.NextLink)))
16260 }
16261
16262
16263 type ProtectionIntentResourceListPage struct {
16264 fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)
16265 pirl ProtectionIntentResourceList
16266 }
16267
16268
16269
16270 func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) {
16271 if tracing.IsEnabled() {
16272 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext")
16273 defer func() {
16274 sc := -1
16275 if page.Response().Response.Response != nil {
16276 sc = page.Response().Response.Response.StatusCode
16277 }
16278 tracing.EndSpan(ctx, sc, err)
16279 }()
16280 }
16281 for {
16282 next, err := page.fn(ctx, page.pirl)
16283 if err != nil {
16284 return err
16285 }
16286 page.pirl = next
16287 if !next.hasNextLink() || !next.IsEmpty() {
16288 break
16289 }
16290 }
16291 return nil
16292 }
16293
16294
16295
16296
16297 func (page *ProtectionIntentResourceListPage) Next() error {
16298 return page.NextWithContext(context.Background())
16299 }
16300
16301
16302 func (page ProtectionIntentResourceListPage) NotDone() bool {
16303 return !page.pirl.IsEmpty()
16304 }
16305
16306
16307 func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList {
16308 return page.pirl
16309 }
16310
16311
16312 func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource {
16313 if page.pirl.IsEmpty() {
16314 return nil
16315 }
16316 return *page.pirl.Value
16317 }
16318
16319
16320 func NewProtectionIntentResourceListPage(cur ProtectionIntentResourceList, getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage {
16321 return ProtectionIntentResourceListPage{
16322 fn: getNextPage,
16323 pirl: cur,
16324 }
16325 }
16326
16327
16328 type BasicProtectionPolicy interface {
16329 AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool)
16330 AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool)
16331 AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool)
16332 AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool)
16333 AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool)
16334 AsMabProtectionPolicy() (*MabProtectionPolicy, bool)
16335 AsProtectionPolicy() (*ProtectionPolicy, bool)
16336 }
16337
16338
16339
16340 type ProtectionPolicy struct {
16341
16342 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
16343
16344 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
16345 }
16346
16347 func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) {
16348 var m map[string]interface{}
16349 err := json.Unmarshal(body, &m)
16350 if err != nil {
16351 return nil, err
16352 }
16353
16354 switch m["backupManagementType"] {
16355 case string(BackupManagementTypeAzureWorkload):
16356 var avwpp AzureVMWorkloadProtectionPolicy
16357 err := json.Unmarshal(body, &avwpp)
16358 return avwpp, err
16359 case string(BackupManagementTypeAzureStorage):
16360 var afspp AzureFileShareProtectionPolicy
16361 err := json.Unmarshal(body, &afspp)
16362 return afspp, err
16363 case string(BackupManagementTypeAzureIaasVM):
16364 var aispp AzureIaaSVMProtectionPolicy
16365 err := json.Unmarshal(body, &aispp)
16366 return aispp, err
16367 case string(BackupManagementTypeAzureSQL):
16368 var aspp AzureSQLProtectionPolicy
16369 err := json.Unmarshal(body, &aspp)
16370 return aspp, err
16371 case string(BackupManagementTypeGenericProtectionPolicy):
16372 var gpp GenericProtectionPolicy
16373 err := json.Unmarshal(body, &gpp)
16374 return gpp, err
16375 case string(BackupManagementTypeMAB):
16376 var mpp MabProtectionPolicy
16377 err := json.Unmarshal(body, &mpp)
16378 return mpp, err
16379 default:
16380 var pp ProtectionPolicy
16381 err := json.Unmarshal(body, &pp)
16382 return pp, err
16383 }
16384 }
16385 func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) {
16386 var rawMessages []*json.RawMessage
16387 err := json.Unmarshal(body, &rawMessages)
16388 if err != nil {
16389 return nil, err
16390 }
16391
16392 ppArray := make([]BasicProtectionPolicy, len(rawMessages))
16393
16394 for index, rawMessage := range rawMessages {
16395 pp, err := unmarshalBasicProtectionPolicy(*rawMessage)
16396 if err != nil {
16397 return nil, err
16398 }
16399 ppArray[index] = pp
16400 }
16401 return ppArray, nil
16402 }
16403
16404
16405 func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) {
16406 pp.BackupManagementType = BackupManagementTypeProtectionPolicy
16407 objectMap := make(map[string]interface{})
16408 if pp.ProtectedItemsCount != nil {
16409 objectMap["protectedItemsCount"] = pp.ProtectedItemsCount
16410 }
16411 if pp.BackupManagementType != "" {
16412 objectMap["backupManagementType"] = pp.BackupManagementType
16413 }
16414 return json.Marshal(objectMap)
16415 }
16416
16417
16418 func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
16419 return nil, false
16420 }
16421
16422
16423 func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
16424 return nil, false
16425 }
16426
16427
16428 func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
16429 return nil, false
16430 }
16431
16432
16433 func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
16434 return nil, false
16435 }
16436
16437
16438 func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
16439 return nil, false
16440 }
16441
16442
16443 func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
16444 return nil, false
16445 }
16446
16447
16448 func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
16449 return &pp, true
16450 }
16451
16452
16453 func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
16454 return &pp, true
16455 }
16456
16457
16458 type ProtectionPolicyQueryObject struct {
16459
16460 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
16461
16462 FabricName *string `json:"fabricName,omitempty"`
16463
16464 WorkloadType WorkloadType `json:"workloadType,omitempty"`
16465 }
16466
16467
16468
16469 type ProtectionPolicyResource struct {
16470 autorest.Response `json:"-"`
16471
16472 Properties BasicProtectionPolicy `json:"properties,omitempty"`
16473
16474 ID *string `json:"id,omitempty"`
16475
16476 Name *string `json:"name,omitempty"`
16477
16478 Type *string `json:"type,omitempty"`
16479
16480 Location *string `json:"location,omitempty"`
16481
16482 Tags map[string]*string `json:"tags"`
16483
16484 ETag *string `json:"eTag,omitempty"`
16485 }
16486
16487
16488 func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) {
16489 objectMap := make(map[string]interface{})
16490 objectMap["properties"] = ppr.Properties
16491 if ppr.Location != nil {
16492 objectMap["location"] = ppr.Location
16493 }
16494 if ppr.Tags != nil {
16495 objectMap["tags"] = ppr.Tags
16496 }
16497 if ppr.ETag != nil {
16498 objectMap["eTag"] = ppr.ETag
16499 }
16500 return json.Marshal(objectMap)
16501 }
16502
16503
16504 func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error {
16505 var m map[string]*json.RawMessage
16506 err := json.Unmarshal(body, &m)
16507 if err != nil {
16508 return err
16509 }
16510 for k, v := range m {
16511 switch k {
16512 case "properties":
16513 if v != nil {
16514 properties, err := unmarshalBasicProtectionPolicy(*v)
16515 if err != nil {
16516 return err
16517 }
16518 ppr.Properties = properties
16519 }
16520 case "id":
16521 if v != nil {
16522 var ID string
16523 err = json.Unmarshal(*v, &ID)
16524 if err != nil {
16525 return err
16526 }
16527 ppr.ID = &ID
16528 }
16529 case "name":
16530 if v != nil {
16531 var name string
16532 err = json.Unmarshal(*v, &name)
16533 if err != nil {
16534 return err
16535 }
16536 ppr.Name = &name
16537 }
16538 case "type":
16539 if v != nil {
16540 var typeVar string
16541 err = json.Unmarshal(*v, &typeVar)
16542 if err != nil {
16543 return err
16544 }
16545 ppr.Type = &typeVar
16546 }
16547 case "location":
16548 if v != nil {
16549 var location string
16550 err = json.Unmarshal(*v, &location)
16551 if err != nil {
16552 return err
16553 }
16554 ppr.Location = &location
16555 }
16556 case "tags":
16557 if v != nil {
16558 var tags map[string]*string
16559 err = json.Unmarshal(*v, &tags)
16560 if err != nil {
16561 return err
16562 }
16563 ppr.Tags = tags
16564 }
16565 case "eTag":
16566 if v != nil {
16567 var eTag string
16568 err = json.Unmarshal(*v, &eTag)
16569 if err != nil {
16570 return err
16571 }
16572 ppr.ETag = &eTag
16573 }
16574 }
16575 }
16576
16577 return nil
16578 }
16579
16580
16581 type ProtectionPolicyResourceList struct {
16582 autorest.Response `json:"-"`
16583
16584 Value *[]ProtectionPolicyResource `json:"value,omitempty"`
16585
16586 NextLink *string `json:"nextLink,omitempty"`
16587 }
16588
16589
16590
16591 type ProtectionPolicyResourceListIterator struct {
16592 i int
16593 page ProtectionPolicyResourceListPage
16594 }
16595
16596
16597
16598 func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) {
16599 if tracing.IsEnabled() {
16600 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext")
16601 defer func() {
16602 sc := -1
16603 if iter.Response().Response.Response != nil {
16604 sc = iter.Response().Response.Response.StatusCode
16605 }
16606 tracing.EndSpan(ctx, sc, err)
16607 }()
16608 }
16609 iter.i++
16610 if iter.i < len(iter.page.Values()) {
16611 return nil
16612 }
16613 err = iter.page.NextWithContext(ctx)
16614 if err != nil {
16615 iter.i--
16616 return err
16617 }
16618 iter.i = 0
16619 return nil
16620 }
16621
16622
16623
16624
16625 func (iter *ProtectionPolicyResourceListIterator) Next() error {
16626 return iter.NextWithContext(context.Background())
16627 }
16628
16629
16630 func (iter ProtectionPolicyResourceListIterator) NotDone() bool {
16631 return iter.page.NotDone() && iter.i < len(iter.page.Values())
16632 }
16633
16634
16635 func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList {
16636 return iter.page.Response()
16637 }
16638
16639
16640
16641 func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource {
16642 if !iter.page.NotDone() {
16643 return ProtectionPolicyResource{}
16644 }
16645 return iter.page.Values()[iter.i]
16646 }
16647
16648
16649 func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator {
16650 return ProtectionPolicyResourceListIterator{page: page}
16651 }
16652
16653
16654 func (pprl ProtectionPolicyResourceList) IsEmpty() bool {
16655 return pprl.Value == nil || len(*pprl.Value) == 0
16656 }
16657
16658
16659 func (pprl ProtectionPolicyResourceList) hasNextLink() bool {
16660 return pprl.NextLink != nil && len(*pprl.NextLink) != 0
16661 }
16662
16663
16664
16665 func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) {
16666 if !pprl.hasNextLink() {
16667 return nil, nil
16668 }
16669 return autorest.Prepare((&http.Request{}).WithContext(ctx),
16670 autorest.AsJSON(),
16671 autorest.AsGet(),
16672 autorest.WithBaseURL(to.String(pprl.NextLink)))
16673 }
16674
16675
16676 type ProtectionPolicyResourceListPage struct {
16677 fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)
16678 pprl ProtectionPolicyResourceList
16679 }
16680
16681
16682
16683 func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) {
16684 if tracing.IsEnabled() {
16685 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext")
16686 defer func() {
16687 sc := -1
16688 if page.Response().Response.Response != nil {
16689 sc = page.Response().Response.Response.StatusCode
16690 }
16691 tracing.EndSpan(ctx, sc, err)
16692 }()
16693 }
16694 for {
16695 next, err := page.fn(ctx, page.pprl)
16696 if err != nil {
16697 return err
16698 }
16699 page.pprl = next
16700 if !next.hasNextLink() || !next.IsEmpty() {
16701 break
16702 }
16703 }
16704 return nil
16705 }
16706
16707
16708
16709
16710 func (page *ProtectionPolicyResourceListPage) Next() error {
16711 return page.NextWithContext(context.Background())
16712 }
16713
16714
16715 func (page ProtectionPolicyResourceListPage) NotDone() bool {
16716 return !page.pprl.IsEmpty()
16717 }
16718
16719
16720 func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList {
16721 return page.pprl
16722 }
16723
16724
16725 func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource {
16726 if page.pprl.IsEmpty() {
16727 return nil
16728 }
16729 return *page.pprl.Value
16730 }
16731
16732
16733 func NewProtectionPolicyResourceListPage(cur ProtectionPolicyResourceList, getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage {
16734 return ProtectionPolicyResourceListPage{
16735 fn: getNextPage,
16736 pprl: cur,
16737 }
16738 }
16739
16740
16741 type BasicRecoveryPoint interface {
16742 AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool)
16743 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
16744 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
16745 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
16746 AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool)
16747 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
16748 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
16749 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
16750 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
16751 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
16752 AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool)
16753 AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool)
16754 AsRecoveryPoint() (*RecoveryPoint, bool)
16755 }
16756
16757
16758 type RecoveryPoint struct {
16759
16760 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
16761 }
16762
16763 func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) {
16764 var m map[string]interface{}
16765 err := json.Unmarshal(body, &m)
16766 if err != nil {
16767 return nil, err
16768 }
16769
16770 switch m["objectType"] {
16771 case string(ObjectTypeAzureFileShareRecoveryPoint):
16772 var afsrp AzureFileShareRecoveryPoint
16773 err := json.Unmarshal(body, &afsrp)
16774 return afsrp, err
16775 case string(ObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
16776 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
16777 err := json.Unmarshal(body, &awpitrp)
16778 return awpitrp, err
16779 case string(ObjectTypeAzureWorkloadRecoveryPoint):
16780 var awrp AzureWorkloadRecoveryPoint
16781 err := json.Unmarshal(body, &awrp)
16782 return awrp, err
16783 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
16784 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
16785 err := json.Unmarshal(body, &awshpitrp)
16786 return awshpitrp, err
16787 case string(ObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
16788 var awshrp AzureWorkloadSAPHanaRecoveryPoint
16789 err := json.Unmarshal(body, &awshrp)
16790 return awshrp, err
16791 case string(ObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
16792 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
16793 err := json.Unmarshal(body, &awspitrp)
16794 return awspitrp, err
16795 case string(ObjectTypeAzureWorkloadSQLRecoveryPoint):
16796 var awsrp AzureWorkloadSQLRecoveryPoint
16797 err := json.Unmarshal(body, &awsrp)
16798 return awsrp, err
16799 case string(ObjectTypeGenericRecoveryPoint):
16800 var grp GenericRecoveryPoint
16801 err := json.Unmarshal(body, &grp)
16802 return grp, err
16803 case string(ObjectTypeIaasVMRecoveryPoint):
16804 var ivrp IaasVMRecoveryPoint
16805 err := json.Unmarshal(body, &ivrp)
16806 return ivrp, err
16807 default:
16808 var rp RecoveryPoint
16809 err := json.Unmarshal(body, &rp)
16810 return rp, err
16811 }
16812 }
16813 func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) {
16814 var rawMessages []*json.RawMessage
16815 err := json.Unmarshal(body, &rawMessages)
16816 if err != nil {
16817 return nil, err
16818 }
16819
16820 rpArray := make([]BasicRecoveryPoint, len(rawMessages))
16821
16822 for index, rawMessage := range rawMessages {
16823 rp, err := unmarshalBasicRecoveryPoint(*rawMessage)
16824 if err != nil {
16825 return nil, err
16826 }
16827 rpArray[index] = rp
16828 }
16829 return rpArray, nil
16830 }
16831
16832
16833 func (rp RecoveryPoint) MarshalJSON() ([]byte, error) {
16834 rp.ObjectType = ObjectTypeRecoveryPoint
16835 objectMap := make(map[string]interface{})
16836 if rp.ObjectType != "" {
16837 objectMap["objectType"] = rp.ObjectType
16838 }
16839 return json.Marshal(objectMap)
16840 }
16841
16842
16843 func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
16844 return nil, false
16845 }
16846
16847
16848 func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
16849 return nil, false
16850 }
16851
16852
16853 func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
16854 return nil, false
16855 }
16856
16857
16858 func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
16859 return nil, false
16860 }
16861
16862
16863 func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
16864 return nil, false
16865 }
16866
16867
16868 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
16869 return nil, false
16870 }
16871
16872
16873 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
16874 return nil, false
16875 }
16876
16877
16878 func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
16879 return nil, false
16880 }
16881
16882
16883 func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
16884 return nil, false
16885 }
16886
16887
16888 func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
16889 return nil, false
16890 }
16891
16892
16893 func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
16894 return nil, false
16895 }
16896
16897
16898 func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
16899 return nil, false
16900 }
16901
16902
16903 func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
16904 return &rp, true
16905 }
16906
16907
16908 func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
16909 return &rp, true
16910 }
16911
16912
16913 type RecoveryPointDiskConfiguration struct {
16914
16915 NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"`
16916
16917 NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"`
16918
16919 IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"`
16920
16921 ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"`
16922 }
16923
16924
16925
16926 type RecoveryPointResource struct {
16927 autorest.Response `json:"-"`
16928
16929 Properties BasicRecoveryPoint `json:"properties,omitempty"`
16930
16931 ID *string `json:"id,omitempty"`
16932
16933 Name *string `json:"name,omitempty"`
16934
16935 Type *string `json:"type,omitempty"`
16936
16937 Location *string `json:"location,omitempty"`
16938
16939 Tags map[string]*string `json:"tags"`
16940
16941 ETag *string `json:"eTag,omitempty"`
16942 }
16943
16944
16945 func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) {
16946 objectMap := make(map[string]interface{})
16947 objectMap["properties"] = rpr.Properties
16948 if rpr.Location != nil {
16949 objectMap["location"] = rpr.Location
16950 }
16951 if rpr.Tags != nil {
16952 objectMap["tags"] = rpr.Tags
16953 }
16954 if rpr.ETag != nil {
16955 objectMap["eTag"] = rpr.ETag
16956 }
16957 return json.Marshal(objectMap)
16958 }
16959
16960
16961 func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error {
16962 var m map[string]*json.RawMessage
16963 err := json.Unmarshal(body, &m)
16964 if err != nil {
16965 return err
16966 }
16967 for k, v := range m {
16968 switch k {
16969 case "properties":
16970 if v != nil {
16971 properties, err := unmarshalBasicRecoveryPoint(*v)
16972 if err != nil {
16973 return err
16974 }
16975 rpr.Properties = properties
16976 }
16977 case "id":
16978 if v != nil {
16979 var ID string
16980 err = json.Unmarshal(*v, &ID)
16981 if err != nil {
16982 return err
16983 }
16984 rpr.ID = &ID
16985 }
16986 case "name":
16987 if v != nil {
16988 var name string
16989 err = json.Unmarshal(*v, &name)
16990 if err != nil {
16991 return err
16992 }
16993 rpr.Name = &name
16994 }
16995 case "type":
16996 if v != nil {
16997 var typeVar string
16998 err = json.Unmarshal(*v, &typeVar)
16999 if err != nil {
17000 return err
17001 }
17002 rpr.Type = &typeVar
17003 }
17004 case "location":
17005 if v != nil {
17006 var location string
17007 err = json.Unmarshal(*v, &location)
17008 if err != nil {
17009 return err
17010 }
17011 rpr.Location = &location
17012 }
17013 case "tags":
17014 if v != nil {
17015 var tags map[string]*string
17016 err = json.Unmarshal(*v, &tags)
17017 if err != nil {
17018 return err
17019 }
17020 rpr.Tags = tags
17021 }
17022 case "eTag":
17023 if v != nil {
17024 var eTag string
17025 err = json.Unmarshal(*v, &eTag)
17026 if err != nil {
17027 return err
17028 }
17029 rpr.ETag = &eTag
17030 }
17031 }
17032 }
17033
17034 return nil
17035 }
17036
17037
17038 type RecoveryPointResourceList struct {
17039 autorest.Response `json:"-"`
17040
17041 Value *[]RecoveryPointResource `json:"value,omitempty"`
17042
17043 NextLink *string `json:"nextLink,omitempty"`
17044 }
17045
17046
17047 type RecoveryPointResourceListIterator struct {
17048 i int
17049 page RecoveryPointResourceListPage
17050 }
17051
17052
17053
17054 func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) {
17055 if tracing.IsEnabled() {
17056 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext")
17057 defer func() {
17058 sc := -1
17059 if iter.Response().Response.Response != nil {
17060 sc = iter.Response().Response.Response.StatusCode
17061 }
17062 tracing.EndSpan(ctx, sc, err)
17063 }()
17064 }
17065 iter.i++
17066 if iter.i < len(iter.page.Values()) {
17067 return nil
17068 }
17069 err = iter.page.NextWithContext(ctx)
17070 if err != nil {
17071 iter.i--
17072 return err
17073 }
17074 iter.i = 0
17075 return nil
17076 }
17077
17078
17079
17080
17081 func (iter *RecoveryPointResourceListIterator) Next() error {
17082 return iter.NextWithContext(context.Background())
17083 }
17084
17085
17086 func (iter RecoveryPointResourceListIterator) NotDone() bool {
17087 return iter.page.NotDone() && iter.i < len(iter.page.Values())
17088 }
17089
17090
17091 func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList {
17092 return iter.page.Response()
17093 }
17094
17095
17096
17097 func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource {
17098 if !iter.page.NotDone() {
17099 return RecoveryPointResource{}
17100 }
17101 return iter.page.Values()[iter.i]
17102 }
17103
17104
17105 func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator {
17106 return RecoveryPointResourceListIterator{page: page}
17107 }
17108
17109
17110 func (rprl RecoveryPointResourceList) IsEmpty() bool {
17111 return rprl.Value == nil || len(*rprl.Value) == 0
17112 }
17113
17114
17115 func (rprl RecoveryPointResourceList) hasNextLink() bool {
17116 return rprl.NextLink != nil && len(*rprl.NextLink) != 0
17117 }
17118
17119
17120
17121 func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) {
17122 if !rprl.hasNextLink() {
17123 return nil, nil
17124 }
17125 return autorest.Prepare((&http.Request{}).WithContext(ctx),
17126 autorest.AsJSON(),
17127 autorest.AsGet(),
17128 autorest.WithBaseURL(to.String(rprl.NextLink)))
17129 }
17130
17131
17132 type RecoveryPointResourceListPage struct {
17133 fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)
17134 rprl RecoveryPointResourceList
17135 }
17136
17137
17138
17139 func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) {
17140 if tracing.IsEnabled() {
17141 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext")
17142 defer func() {
17143 sc := -1
17144 if page.Response().Response.Response != nil {
17145 sc = page.Response().Response.Response.StatusCode
17146 }
17147 tracing.EndSpan(ctx, sc, err)
17148 }()
17149 }
17150 for {
17151 next, err := page.fn(ctx, page.rprl)
17152 if err != nil {
17153 return err
17154 }
17155 page.rprl = next
17156 if !next.hasNextLink() || !next.IsEmpty() {
17157 break
17158 }
17159 }
17160 return nil
17161 }
17162
17163
17164
17165
17166 func (page *RecoveryPointResourceListPage) Next() error {
17167 return page.NextWithContext(context.Background())
17168 }
17169
17170
17171 func (page RecoveryPointResourceListPage) NotDone() bool {
17172 return !page.rprl.IsEmpty()
17173 }
17174
17175
17176 func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList {
17177 return page.rprl
17178 }
17179
17180
17181 func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource {
17182 if page.rprl.IsEmpty() {
17183 return nil
17184 }
17185 return *page.rprl.Value
17186 }
17187
17188
17189 func NewRecoveryPointResourceListPage(cur RecoveryPointResourceList, getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage {
17190 return RecoveryPointResourceListPage{
17191 fn: getNextPage,
17192 rprl: cur,
17193 }
17194 }
17195
17196
17197 type RecoveryPointTierInformation struct {
17198
17199 Type RecoveryPointTierType `json:"type,omitempty"`
17200
17201 Status RecoveryPointTierStatus `json:"status,omitempty"`
17202 }
17203
17204
17205 type BasicRequest interface {
17206 AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool)
17207 AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool)
17208 AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool)
17209 AsRequest() (*Request, bool)
17210 }
17211
17212
17213 type Request struct {
17214
17215 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
17216 }
17217
17218 func unmarshalBasicRequest(body []byte) (BasicRequest, error) {
17219 var m map[string]interface{}
17220 err := json.Unmarshal(body, &m)
17221 if err != nil {
17222 return nil, err
17223 }
17224
17225 switch m["objectType"] {
17226 case string(ObjectTypeAzureFileShareBackupRequest):
17227 var afsbr AzureFileShareBackupRequest
17228 err := json.Unmarshal(body, &afsbr)
17229 return afsbr, err
17230 case string(ObjectTypeAzureWorkloadBackupRequest):
17231 var awbr AzureWorkloadBackupRequest
17232 err := json.Unmarshal(body, &awbr)
17233 return awbr, err
17234 case string(ObjectTypeIaasVMBackupRequest):
17235 var ivbr IaasVMBackupRequest
17236 err := json.Unmarshal(body, &ivbr)
17237 return ivbr, err
17238 default:
17239 var r Request
17240 err := json.Unmarshal(body, &r)
17241 return r, err
17242 }
17243 }
17244 func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) {
17245 var rawMessages []*json.RawMessage
17246 err := json.Unmarshal(body, &rawMessages)
17247 if err != nil {
17248 return nil, err
17249 }
17250
17251 rArray := make([]BasicRequest, len(rawMessages))
17252
17253 for index, rawMessage := range rawMessages {
17254 r, err := unmarshalBasicRequest(*rawMessage)
17255 if err != nil {
17256 return nil, err
17257 }
17258 rArray[index] = r
17259 }
17260 return rArray, nil
17261 }
17262
17263
17264 func (r Request) MarshalJSON() ([]byte, error) {
17265 r.ObjectType = ObjectTypeBackupRequest
17266 objectMap := make(map[string]interface{})
17267 if r.ObjectType != "" {
17268 objectMap["objectType"] = r.ObjectType
17269 }
17270 return json.Marshal(objectMap)
17271 }
17272
17273
17274 func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
17275 return nil, false
17276 }
17277
17278
17279 func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
17280 return nil, false
17281 }
17282
17283
17284 func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
17285 return nil, false
17286 }
17287
17288
17289 func (r Request) AsRequest() (*Request, bool) {
17290 return &r, true
17291 }
17292
17293
17294 func (r Request) AsBasicRequest() (BasicRequest, bool) {
17295 return &r, true
17296 }
17297
17298
17299
17300 type RequestResource struct {
17301
17302 Properties BasicRequest `json:"properties,omitempty"`
17303
17304 ID *string `json:"id,omitempty"`
17305
17306 Name *string `json:"name,omitempty"`
17307
17308 Type *string `json:"type,omitempty"`
17309
17310 Location *string `json:"location,omitempty"`
17311
17312 Tags map[string]*string `json:"tags"`
17313
17314 ETag *string `json:"eTag,omitempty"`
17315 }
17316
17317
17318 func (rr RequestResource) MarshalJSON() ([]byte, error) {
17319 objectMap := make(map[string]interface{})
17320 objectMap["properties"] = rr.Properties
17321 if rr.Location != nil {
17322 objectMap["location"] = rr.Location
17323 }
17324 if rr.Tags != nil {
17325 objectMap["tags"] = rr.Tags
17326 }
17327 if rr.ETag != nil {
17328 objectMap["eTag"] = rr.ETag
17329 }
17330 return json.Marshal(objectMap)
17331 }
17332
17333
17334 func (rr *RequestResource) UnmarshalJSON(body []byte) error {
17335 var m map[string]*json.RawMessage
17336 err := json.Unmarshal(body, &m)
17337 if err != nil {
17338 return err
17339 }
17340 for k, v := range m {
17341 switch k {
17342 case "properties":
17343 if v != nil {
17344 properties, err := unmarshalBasicRequest(*v)
17345 if err != nil {
17346 return err
17347 }
17348 rr.Properties = properties
17349 }
17350 case "id":
17351 if v != nil {
17352 var ID string
17353 err = json.Unmarshal(*v, &ID)
17354 if err != nil {
17355 return err
17356 }
17357 rr.ID = &ID
17358 }
17359 case "name":
17360 if v != nil {
17361 var name string
17362 err = json.Unmarshal(*v, &name)
17363 if err != nil {
17364 return err
17365 }
17366 rr.Name = &name
17367 }
17368 case "type":
17369 if v != nil {
17370 var typeVar string
17371 err = json.Unmarshal(*v, &typeVar)
17372 if err != nil {
17373 return err
17374 }
17375 rr.Type = &typeVar
17376 }
17377 case "location":
17378 if v != nil {
17379 var location string
17380 err = json.Unmarshal(*v, &location)
17381 if err != nil {
17382 return err
17383 }
17384 rr.Location = &location
17385 }
17386 case "tags":
17387 if v != nil {
17388 var tags map[string]*string
17389 err = json.Unmarshal(*v, &tags)
17390 if err != nil {
17391 return err
17392 }
17393 rr.Tags = tags
17394 }
17395 case "eTag":
17396 if v != nil {
17397 var eTag string
17398 err = json.Unmarshal(*v, &eTag)
17399 if err != nil {
17400 return err
17401 }
17402 rr.ETag = &eTag
17403 }
17404 }
17405 }
17406
17407 return nil
17408 }
17409
17410
17411 type Resource struct {
17412
17413 ID *string `json:"id,omitempty"`
17414
17415 Name *string `json:"name,omitempty"`
17416
17417 Type *string `json:"type,omitempty"`
17418
17419 Location *string `json:"location,omitempty"`
17420
17421 Tags map[string]*string `json:"tags"`
17422
17423 ETag *string `json:"eTag,omitempty"`
17424 }
17425
17426
17427 func (r Resource) MarshalJSON() ([]byte, error) {
17428 objectMap := make(map[string]interface{})
17429 if r.Location != nil {
17430 objectMap["location"] = r.Location
17431 }
17432 if r.Tags != nil {
17433 objectMap["tags"] = r.Tags
17434 }
17435 if r.ETag != nil {
17436 objectMap["eTag"] = r.ETag
17437 }
17438 return json.Marshal(objectMap)
17439 }
17440
17441
17442 type ResourceConfig struct {
17443
17444 StorageModelType StorageType `json:"storageModelType,omitempty"`
17445
17446 StorageType StorageType `json:"storageType,omitempty"`
17447
17448 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
17449 }
17450
17451
17452 type ResourceConfigResource struct {
17453 autorest.Response `json:"-"`
17454
17455 Properties *ResourceConfig `json:"properties,omitempty"`
17456
17457 ID *string `json:"id,omitempty"`
17458
17459 Name *string `json:"name,omitempty"`
17460
17461 Type *string `json:"type,omitempty"`
17462
17463 Location *string `json:"location,omitempty"`
17464
17465 Tags map[string]*string `json:"tags"`
17466
17467 ETag *string `json:"eTag,omitempty"`
17468 }
17469
17470
17471 func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) {
17472 objectMap := make(map[string]interface{})
17473 if rcr.Properties != nil {
17474 objectMap["properties"] = rcr.Properties
17475 }
17476 if rcr.Location != nil {
17477 objectMap["location"] = rcr.Location
17478 }
17479 if rcr.Tags != nil {
17480 objectMap["tags"] = rcr.Tags
17481 }
17482 if rcr.ETag != nil {
17483 objectMap["eTag"] = rcr.ETag
17484 }
17485 return json.Marshal(objectMap)
17486 }
17487
17488
17489 type ResourceList struct {
17490
17491 NextLink *string `json:"nextLink,omitempty"`
17492 }
17493
17494
17495 type ResourceVaultConfig struct {
17496
17497 StorageModelType StorageType `json:"storageModelType,omitempty"`
17498
17499 StorageType StorageType `json:"storageType,omitempty"`
17500
17501 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
17502
17503 EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"`
17504
17505 SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"`
17506 }
17507
17508
17509 type ResourceVaultConfigResource struct {
17510 autorest.Response `json:"-"`
17511
17512 Properties *ResourceVaultConfig `json:"properties,omitempty"`
17513
17514 ID *string `json:"id,omitempty"`
17515
17516 Name *string `json:"name,omitempty"`
17517
17518 Type *string `json:"type,omitempty"`
17519
17520 Location *string `json:"location,omitempty"`
17521
17522 Tags map[string]*string `json:"tags"`
17523
17524 ETag *string `json:"eTag,omitempty"`
17525 }
17526
17527
17528 func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) {
17529 objectMap := make(map[string]interface{})
17530 if rvcr.Properties != nil {
17531 objectMap["properties"] = rvcr.Properties
17532 }
17533 if rvcr.Location != nil {
17534 objectMap["location"] = rvcr.Location
17535 }
17536 if rvcr.Tags != nil {
17537 objectMap["tags"] = rvcr.Tags
17538 }
17539 if rvcr.ETag != nil {
17540 objectMap["eTag"] = rvcr.ETag
17541 }
17542 return json.Marshal(objectMap)
17543 }
17544
17545
17546 type RestoreFileSpecs struct {
17547
17548 Path *string `json:"path,omitempty"`
17549
17550 FileSpecType *string `json:"fileSpecType,omitempty"`
17551
17552 TargetFolderPath *string `json:"targetFolderPath,omitempty"`
17553 }
17554
17555
17556 type BasicRestoreRequest interface {
17557 AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool)
17558 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
17559 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
17560 AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool)
17561 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
17562 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
17563 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
17564 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
17565 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
17566 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
17567 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
17568 AsRestoreRequest() (*RestoreRequest, bool)
17569 }
17570
17571
17572
17573 type RestoreRequest struct {
17574
17575 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
17576 }
17577
17578 func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) {
17579 var m map[string]interface{}
17580 err := json.Unmarshal(body, &m)
17581 if err != nil {
17582 return nil, err
17583 }
17584
17585 switch m["objectType"] {
17586 case string(ObjectTypeAzureFileShareRestoreRequest):
17587 var afsrr AzureFileShareRestoreRequest
17588 err := json.Unmarshal(body, &afsrr)
17589 return afsrr, err
17590 case string(ObjectTypeAzureWorkloadPointInTimeRestoreRequest):
17591 var awpitrr AzureWorkloadPointInTimeRestoreRequest
17592 err := json.Unmarshal(body, &awpitrr)
17593 return awpitrr, err
17594 case string(ObjectTypeAzureWorkloadRestoreRequest):
17595 var awrr AzureWorkloadRestoreRequest
17596 err := json.Unmarshal(body, &awrr)
17597 return awrr, err
17598 case string(ObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
17599 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
17600 err := json.Unmarshal(body, &awshpitrr)
17601 return awshpitrr, err
17602 case string(ObjectTypeAzureWorkloadSAPHanaRestoreRequest):
17603 var awshrr AzureWorkloadSAPHanaRestoreRequest
17604 err := json.Unmarshal(body, &awshrr)
17605 return awshrr, err
17606 case string(ObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
17607 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
17608 err := json.Unmarshal(body, &awspitrr)
17609 return awspitrr, err
17610 case string(ObjectTypeAzureWorkloadSQLRestoreRequest):
17611 var awsrr AzureWorkloadSQLRestoreRequest
17612 err := json.Unmarshal(body, &awsrr)
17613 return awsrr, err
17614 case string(ObjectTypeIaasVMRestoreRequest):
17615 var ivrr IaasVMRestoreRequest
17616 err := json.Unmarshal(body, &ivrr)
17617 return ivrr, err
17618 default:
17619 var rr RestoreRequest
17620 err := json.Unmarshal(body, &rr)
17621 return rr, err
17622 }
17623 }
17624 func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) {
17625 var rawMessages []*json.RawMessage
17626 err := json.Unmarshal(body, &rawMessages)
17627 if err != nil {
17628 return nil, err
17629 }
17630
17631 rrArray := make([]BasicRestoreRequest, len(rawMessages))
17632
17633 for index, rawMessage := range rawMessages {
17634 rr, err := unmarshalBasicRestoreRequest(*rawMessage)
17635 if err != nil {
17636 return nil, err
17637 }
17638 rrArray[index] = rr
17639 }
17640 return rrArray, nil
17641 }
17642
17643
17644 func (rr RestoreRequest) MarshalJSON() ([]byte, error) {
17645 rr.ObjectType = ObjectTypeRestoreRequest
17646 objectMap := make(map[string]interface{})
17647 if rr.ObjectType != "" {
17648 objectMap["objectType"] = rr.ObjectType
17649 }
17650 return json.Marshal(objectMap)
17651 }
17652
17653
17654 func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
17655 return nil, false
17656 }
17657
17658
17659 func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
17660 return nil, false
17661 }
17662
17663
17664 func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
17665 return nil, false
17666 }
17667
17668
17669 func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
17670 return nil, false
17671 }
17672
17673
17674 func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
17675 return nil, false
17676 }
17677
17678
17679 func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
17680 return nil, false
17681 }
17682
17683
17684 func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
17685 return nil, false
17686 }
17687
17688
17689 func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
17690 return nil, false
17691 }
17692
17693
17694 func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
17695 return nil, false
17696 }
17697
17698
17699 func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
17700 return nil, false
17701 }
17702
17703
17704 func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
17705 return nil, false
17706 }
17707
17708
17709 func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
17710 return &rr, true
17711 }
17712
17713
17714 func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
17715 return &rr, true
17716 }
17717
17718
17719
17720 type RestoreRequestResource struct {
17721
17722 Properties BasicRestoreRequest `json:"properties,omitempty"`
17723
17724 ID *string `json:"id,omitempty"`
17725
17726 Name *string `json:"name,omitempty"`
17727
17728 Type *string `json:"type,omitempty"`
17729
17730 Location *string `json:"location,omitempty"`
17731
17732 Tags map[string]*string `json:"tags"`
17733
17734 ETag *string `json:"eTag,omitempty"`
17735 }
17736
17737
17738 func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) {
17739 objectMap := make(map[string]interface{})
17740 objectMap["properties"] = rrr.Properties
17741 if rrr.Location != nil {
17742 objectMap["location"] = rrr.Location
17743 }
17744 if rrr.Tags != nil {
17745 objectMap["tags"] = rrr.Tags
17746 }
17747 if rrr.ETag != nil {
17748 objectMap["eTag"] = rrr.ETag
17749 }
17750 return json.Marshal(objectMap)
17751 }
17752
17753
17754 func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error {
17755 var m map[string]*json.RawMessage
17756 err := json.Unmarshal(body, &m)
17757 if err != nil {
17758 return err
17759 }
17760 for k, v := range m {
17761 switch k {
17762 case "properties":
17763 if v != nil {
17764 properties, err := unmarshalBasicRestoreRequest(*v)
17765 if err != nil {
17766 return err
17767 }
17768 rrr.Properties = properties
17769 }
17770 case "id":
17771 if v != nil {
17772 var ID string
17773 err = json.Unmarshal(*v, &ID)
17774 if err != nil {
17775 return err
17776 }
17777 rrr.ID = &ID
17778 }
17779 case "name":
17780 if v != nil {
17781 var name string
17782 err = json.Unmarshal(*v, &name)
17783 if err != nil {
17784 return err
17785 }
17786 rrr.Name = &name
17787 }
17788 case "type":
17789 if v != nil {
17790 var typeVar string
17791 err = json.Unmarshal(*v, &typeVar)
17792 if err != nil {
17793 return err
17794 }
17795 rrr.Type = &typeVar
17796 }
17797 case "location":
17798 if v != nil {
17799 var location string
17800 err = json.Unmarshal(*v, &location)
17801 if err != nil {
17802 return err
17803 }
17804 rrr.Location = &location
17805 }
17806 case "tags":
17807 if v != nil {
17808 var tags map[string]*string
17809 err = json.Unmarshal(*v, &tags)
17810 if err != nil {
17811 return err
17812 }
17813 rrr.Tags = tags
17814 }
17815 case "eTag":
17816 if v != nil {
17817 var eTag string
17818 err = json.Unmarshal(*v, &eTag)
17819 if err != nil {
17820 return err
17821 }
17822 rrr.ETag = &eTag
17823 }
17824 }
17825 }
17826
17827 return nil
17828 }
17829
17830
17831 type RetentionDuration struct {
17832
17833
17834 Count *int32 `json:"count,omitempty"`
17835
17836 DurationType RetentionDurationType `json:"durationType,omitempty"`
17837 }
17838
17839
17840 type BasicRetentionPolicy interface {
17841 AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool)
17842 AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool)
17843 AsRetentionPolicy() (*RetentionPolicy, bool)
17844 }
17845
17846
17847 type RetentionPolicy struct {
17848
17849 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
17850 }
17851
17852 func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) {
17853 var m map[string]interface{}
17854 err := json.Unmarshal(body, &m)
17855 if err != nil {
17856 return nil, err
17857 }
17858
17859 switch m["retentionPolicyType"] {
17860 case string(RetentionPolicyTypeLongTermRetentionPolicy):
17861 var ltrp LongTermRetentionPolicy
17862 err := json.Unmarshal(body, <rp)
17863 return ltrp, err
17864 case string(RetentionPolicyTypeSimpleRetentionPolicy):
17865 var srp SimpleRetentionPolicy
17866 err := json.Unmarshal(body, &srp)
17867 return srp, err
17868 default:
17869 var rp RetentionPolicy
17870 err := json.Unmarshal(body, &rp)
17871 return rp, err
17872 }
17873 }
17874 func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) {
17875 var rawMessages []*json.RawMessage
17876 err := json.Unmarshal(body, &rawMessages)
17877 if err != nil {
17878 return nil, err
17879 }
17880
17881 rpArray := make([]BasicRetentionPolicy, len(rawMessages))
17882
17883 for index, rawMessage := range rawMessages {
17884 rp, err := unmarshalBasicRetentionPolicy(*rawMessage)
17885 if err != nil {
17886 return nil, err
17887 }
17888 rpArray[index] = rp
17889 }
17890 return rpArray, nil
17891 }
17892
17893
17894 func (rp RetentionPolicy) MarshalJSON() ([]byte, error) {
17895 rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy
17896 objectMap := make(map[string]interface{})
17897 if rp.RetentionPolicyType != "" {
17898 objectMap["retentionPolicyType"] = rp.RetentionPolicyType
17899 }
17900 return json.Marshal(objectMap)
17901 }
17902
17903
17904 func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
17905 return nil, false
17906 }
17907
17908
17909 func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
17910 return nil, false
17911 }
17912
17913
17914 func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
17915 return &rp, true
17916 }
17917
17918
17919 func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
17920 return &rp, true
17921 }
17922
17923
17924 type BasicSchedulePolicy interface {
17925 AsLogSchedulePolicy() (*LogSchedulePolicy, bool)
17926 AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool)
17927 AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool)
17928 AsSchedulePolicy() (*SchedulePolicy, bool)
17929 }
17930
17931
17932 type SchedulePolicy struct {
17933
17934 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
17935 }
17936
17937 func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) {
17938 var m map[string]interface{}
17939 err := json.Unmarshal(body, &m)
17940 if err != nil {
17941 return nil, err
17942 }
17943
17944 switch m["schedulePolicyType"] {
17945 case string(SchedulePolicyTypeLogSchedulePolicy):
17946 var lsp LogSchedulePolicy
17947 err := json.Unmarshal(body, &lsp)
17948 return lsp, err
17949 case string(SchedulePolicyTypeLongTermSchedulePolicy):
17950 var ltsp LongTermSchedulePolicy
17951 err := json.Unmarshal(body, <sp)
17952 return ltsp, err
17953 case string(SchedulePolicyTypeSimpleSchedulePolicy):
17954 var ssp SimpleSchedulePolicy
17955 err := json.Unmarshal(body, &ssp)
17956 return ssp, err
17957 default:
17958 var sp SchedulePolicy
17959 err := json.Unmarshal(body, &sp)
17960 return sp, err
17961 }
17962 }
17963 func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) {
17964 var rawMessages []*json.RawMessage
17965 err := json.Unmarshal(body, &rawMessages)
17966 if err != nil {
17967 return nil, err
17968 }
17969
17970 spArray := make([]BasicSchedulePolicy, len(rawMessages))
17971
17972 for index, rawMessage := range rawMessages {
17973 sp, err := unmarshalBasicSchedulePolicy(*rawMessage)
17974 if err != nil {
17975 return nil, err
17976 }
17977 spArray[index] = sp
17978 }
17979 return spArray, nil
17980 }
17981
17982
17983 func (sp SchedulePolicy) MarshalJSON() ([]byte, error) {
17984 sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy
17985 objectMap := make(map[string]interface{})
17986 if sp.SchedulePolicyType != "" {
17987 objectMap["schedulePolicyType"] = sp.SchedulePolicyType
17988 }
17989 return json.Marshal(objectMap)
17990 }
17991
17992
17993 func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
17994 return nil, false
17995 }
17996
17997
17998 func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
17999 return nil, false
18000 }
18001
18002
18003 func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
18004 return nil, false
18005 }
18006
18007
18008 func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
18009 return &sp, true
18010 }
18011
18012
18013 func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
18014 return &sp, true
18015 }
18016
18017
18018 type Settings struct {
18019
18020 TimeZone *string `json:"timeZone,omitempty"`
18021
18022 Issqlcompression *bool `json:"issqlcompression,omitempty"`
18023
18024
18025 IsCompression *bool `json:"isCompression,omitempty"`
18026 }
18027
18028
18029 type SimpleRetentionPolicy struct {
18030
18031 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
18032
18033 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
18034 }
18035
18036
18037 func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) {
18038 srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy
18039 objectMap := make(map[string]interface{})
18040 if srp.RetentionDuration != nil {
18041 objectMap["retentionDuration"] = srp.RetentionDuration
18042 }
18043 if srp.RetentionPolicyType != "" {
18044 objectMap["retentionPolicyType"] = srp.RetentionPolicyType
18045 }
18046 return json.Marshal(objectMap)
18047 }
18048
18049
18050 func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
18051 return nil, false
18052 }
18053
18054
18055 func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
18056 return &srp, true
18057 }
18058
18059
18060 func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
18061 return nil, false
18062 }
18063
18064
18065 func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
18066 return &srp, true
18067 }
18068
18069
18070 type SimpleSchedulePolicy struct {
18071
18072 ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"`
18073
18074 ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"`
18075
18076 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"`
18077
18078 ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"`
18079
18080 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
18081 }
18082
18083
18084 func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) {
18085 ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy
18086 objectMap := make(map[string]interface{})
18087 if ssp.ScheduleRunFrequency != "" {
18088 objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency
18089 }
18090 if ssp.ScheduleRunDays != nil {
18091 objectMap["scheduleRunDays"] = ssp.ScheduleRunDays
18092 }
18093 if ssp.ScheduleRunTimes != nil {
18094 objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes
18095 }
18096 if ssp.ScheduleWeeklyFrequency != nil {
18097 objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency
18098 }
18099 if ssp.SchedulePolicyType != "" {
18100 objectMap["schedulePolicyType"] = ssp.SchedulePolicyType
18101 }
18102 return json.Marshal(objectMap)
18103 }
18104
18105
18106 func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
18107 return nil, false
18108 }
18109
18110
18111 func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
18112 return nil, false
18113 }
18114
18115
18116 func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
18117 return &ssp, true
18118 }
18119
18120
18121 func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
18122 return nil, false
18123 }
18124
18125
18126 func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
18127 return &ssp, true
18128 }
18129
18130
18131 type SQLDataDirectory struct {
18132
18133 Type SQLDataDirectoryType `json:"type,omitempty"`
18134
18135 Path *string `json:"path,omitempty"`
18136
18137 LogicalName *string `json:"logicalName,omitempty"`
18138 }
18139
18140
18141 type SQLDataDirectoryMapping struct {
18142
18143 MappingType SQLDataDirectoryType `json:"mappingType,omitempty"`
18144
18145 SourceLogicalName *string `json:"sourceLogicalName,omitempty"`
18146
18147 SourcePath *string `json:"sourcePath,omitempty"`
18148
18149 TargetPath *string `json:"targetPath,omitempty"`
18150 }
18151
18152
18153 type StatusRequest struct {
18154
18155 ResourceType DataSourceType `json:"resourceType,omitempty"`
18156
18157 ResourceID *string `json:"resourceId,omitempty"`
18158
18159 PoLogicalName *string `json:"poLogicalName,omitempty"`
18160 }
18161
18162
18163 type StatusResponse struct {
18164 autorest.Response `json:"-"`
18165
18166 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
18167
18168 VaultID *string `json:"vaultId,omitempty"`
18169
18170 FabricName FabricName `json:"fabricName,omitempty"`
18171
18172 ContainerName *string `json:"containerName,omitempty"`
18173
18174 ProtectedItemName *string `json:"protectedItemName,omitempty"`
18175
18176 ErrorCode *string `json:"errorCode,omitempty"`
18177
18178 ErrorMessage *string `json:"errorMessage,omitempty"`
18179
18180 PolicyName *string `json:"policyName,omitempty"`
18181
18182 RegistrationStatus *string `json:"registrationStatus,omitempty"`
18183 }
18184
18185
18186 type SubProtectionPolicy struct {
18187
18188 PolicyType PolicyType `json:"policyType,omitempty"`
18189
18190 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
18191
18192 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
18193 }
18194
18195
18196 func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error {
18197 var m map[string]*json.RawMessage
18198 err := json.Unmarshal(body, &m)
18199 if err != nil {
18200 return err
18201 }
18202 for k, v := range m {
18203 switch k {
18204 case "policyType":
18205 if v != nil {
18206 var policyType PolicyType
18207 err = json.Unmarshal(*v, &policyType)
18208 if err != nil {
18209 return err
18210 }
18211 spp.PolicyType = policyType
18212 }
18213 case "schedulePolicy":
18214 if v != nil {
18215 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
18216 if err != nil {
18217 return err
18218 }
18219 spp.SchedulePolicy = schedulePolicy
18220 }
18221 case "retentionPolicy":
18222 if v != nil {
18223 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
18224 if err != nil {
18225 return err
18226 }
18227 spp.RetentionPolicy = retentionPolicy
18228 }
18229 }
18230 }
18231
18232 return nil
18233 }
18234
18235
18236 type TargetAFSRestoreInfo struct {
18237
18238 Name *string `json:"name,omitempty"`
18239
18240 TargetResourceID *string `json:"targetResourceId,omitempty"`
18241 }
18242
18243
18244 type TargetRestoreInfo struct {
18245
18246 OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"`
18247
18248 ContainerID *string `json:"containerId,omitempty"`
18249
18250 DatabaseName *string `json:"databaseName,omitempty"`
18251 }
18252
18253
18254 type TokenInformation struct {
18255 autorest.Response `json:"-"`
18256
18257 Token *string `json:"token,omitempty"`
18258
18259 ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"`
18260
18261 SecurityPIN *string `json:"securityPIN,omitempty"`
18262 }
18263
18264
18265 type ValidateIaasVMRestoreOperationRequest struct {
18266
18267 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
18268
18269 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
18270 }
18271
18272
18273 func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) {
18274 vivror.ObjectType = ObjectTypeValidateIaasVMRestoreOperationRequest
18275 objectMap := make(map[string]interface{})
18276 objectMap["restoreRequest"] = vivror.RestoreRequest
18277 if vivror.ObjectType != "" {
18278 objectMap["objectType"] = vivror.ObjectType
18279 }
18280 return json.Marshal(objectMap)
18281 }
18282
18283
18284 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
18285 return &vivror, true
18286 }
18287
18288
18289 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
18290 return nil, false
18291 }
18292
18293
18294 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
18295 return &vivror, true
18296 }
18297
18298
18299 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
18300 return nil, false
18301 }
18302
18303
18304 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
18305 return &vivror, true
18306 }
18307
18308
18309 func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error {
18310 var m map[string]*json.RawMessage
18311 err := json.Unmarshal(body, &m)
18312 if err != nil {
18313 return err
18314 }
18315 for k, v := range m {
18316 switch k {
18317 case "restoreRequest":
18318 if v != nil {
18319 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
18320 if err != nil {
18321 return err
18322 }
18323 vivror.RestoreRequest = restoreRequest
18324 }
18325 case "objectType":
18326 if v != nil {
18327 var objectType ObjectTypeBasicValidateOperationRequest
18328 err = json.Unmarshal(*v, &objectType)
18329 if err != nil {
18330 return err
18331 }
18332 vivror.ObjectType = objectType
18333 }
18334 }
18335 }
18336
18337 return nil
18338 }
18339
18340
18341 type BasicValidateOperationRequest interface {
18342 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
18343 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
18344 AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool)
18345 AsValidateOperationRequest() (*ValidateOperationRequest, bool)
18346 }
18347
18348
18349 type ValidateOperationRequest struct {
18350
18351 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
18352 }
18353
18354 func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) {
18355 var m map[string]interface{}
18356 err := json.Unmarshal(body, &m)
18357 if err != nil {
18358 return nil, err
18359 }
18360
18361 switch m["objectType"] {
18362 case string(ObjectTypeValidateIaasVMRestoreOperationRequest):
18363 var vivror ValidateIaasVMRestoreOperationRequest
18364 err := json.Unmarshal(body, &vivror)
18365 return vivror, err
18366 case string(ObjectTypeValidateRestoreOperationRequest):
18367 var vror ValidateRestoreOperationRequest
18368 err := json.Unmarshal(body, &vror)
18369 return vror, err
18370 default:
18371 var vor ValidateOperationRequest
18372 err := json.Unmarshal(body, &vor)
18373 return vor, err
18374 }
18375 }
18376 func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) {
18377 var rawMessages []*json.RawMessage
18378 err := json.Unmarshal(body, &rawMessages)
18379 if err != nil {
18380 return nil, err
18381 }
18382
18383 vorArray := make([]BasicValidateOperationRequest, len(rawMessages))
18384
18385 for index, rawMessage := range rawMessages {
18386 vor, err := unmarshalBasicValidateOperationRequest(*rawMessage)
18387 if err != nil {
18388 return nil, err
18389 }
18390 vorArray[index] = vor
18391 }
18392 return vorArray, nil
18393 }
18394
18395
18396 func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) {
18397 vor.ObjectType = ObjectTypeValidateOperationRequest
18398 objectMap := make(map[string]interface{})
18399 if vor.ObjectType != "" {
18400 objectMap["objectType"] = vor.ObjectType
18401 }
18402 return json.Marshal(objectMap)
18403 }
18404
18405
18406 func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
18407 return nil, false
18408 }
18409
18410
18411 func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
18412 return nil, false
18413 }
18414
18415
18416 func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
18417 return nil, false
18418 }
18419
18420
18421 func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
18422 return &vor, true
18423 }
18424
18425
18426 func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
18427 return &vor, true
18428 }
18429
18430
18431 type ValidateOperationResponse struct {
18432
18433 ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"`
18434 }
18435
18436
18437 type ValidateOperationsResponse struct {
18438 autorest.Response `json:"-"`
18439 ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"`
18440 }
18441
18442
18443 type BasicValidateRestoreOperationRequest interface {
18444 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
18445 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
18446 }
18447
18448
18449 type ValidateRestoreOperationRequest struct {
18450
18451 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
18452
18453 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
18454 }
18455
18456 func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) {
18457 var m map[string]interface{}
18458 err := json.Unmarshal(body, &m)
18459 if err != nil {
18460 return nil, err
18461 }
18462
18463 switch m["objectType"] {
18464 case string(ObjectTypeValidateIaasVMRestoreOperationRequest):
18465 var vivror ValidateIaasVMRestoreOperationRequest
18466 err := json.Unmarshal(body, &vivror)
18467 return vivror, err
18468 default:
18469 var vror ValidateRestoreOperationRequest
18470 err := json.Unmarshal(body, &vror)
18471 return vror, err
18472 }
18473 }
18474 func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) {
18475 var rawMessages []*json.RawMessage
18476 err := json.Unmarshal(body, &rawMessages)
18477 if err != nil {
18478 return nil, err
18479 }
18480
18481 vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages))
18482
18483 for index, rawMessage := range rawMessages {
18484 vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage)
18485 if err != nil {
18486 return nil, err
18487 }
18488 vrorArray[index] = vror
18489 }
18490 return vrorArray, nil
18491 }
18492
18493
18494 func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) {
18495 vror.ObjectType = ObjectTypeValidateRestoreOperationRequest
18496 objectMap := make(map[string]interface{})
18497 objectMap["restoreRequest"] = vror.RestoreRequest
18498 if vror.ObjectType != "" {
18499 objectMap["objectType"] = vror.ObjectType
18500 }
18501 return json.Marshal(objectMap)
18502 }
18503
18504
18505 func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
18506 return nil, false
18507 }
18508
18509
18510 func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
18511 return &vror, true
18512 }
18513
18514
18515 func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
18516 return &vror, true
18517 }
18518
18519
18520 func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
18521 return nil, false
18522 }
18523
18524
18525 func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
18526 return &vror, true
18527 }
18528
18529
18530 func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error {
18531 var m map[string]*json.RawMessage
18532 err := json.Unmarshal(body, &m)
18533 if err != nil {
18534 return err
18535 }
18536 for k, v := range m {
18537 switch k {
18538 case "restoreRequest":
18539 if v != nil {
18540 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
18541 if err != nil {
18542 return err
18543 }
18544 vror.RestoreRequest = restoreRequest
18545 }
18546 case "objectType":
18547 if v != nil {
18548 var objectType ObjectTypeBasicValidateOperationRequest
18549 err = json.Unmarshal(*v, &objectType)
18550 if err != nil {
18551 return err
18552 }
18553 vror.ObjectType = objectType
18554 }
18555 }
18556 }
18557
18558 return nil
18559 }
18560
18561
18562 type WeeklyRetentionFormat struct {
18563
18564 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
18565
18566 WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"`
18567 }
18568
18569
18570 type WeeklyRetentionSchedule struct {
18571
18572 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
18573
18574 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
18575
18576 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
18577 }
18578
18579
18580 type WorkloadInquiryDetails struct {
18581
18582 Type *string `json:"type,omitempty"`
18583
18584 ItemCount *int64 `json:"itemCount,omitempty"`
18585
18586 InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"`
18587 }
18588
18589
18590 type BasicWorkloadItem interface {
18591 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
18592 AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool)
18593 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
18594 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
18595 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
18596 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
18597 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
18598 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
18599 AsWorkloadItem() (*WorkloadItem, bool)
18600 }
18601
18602
18603 type WorkloadItem struct {
18604
18605 BackupManagementType *string `json:"backupManagementType,omitempty"`
18606
18607 WorkloadType *string `json:"workloadType,omitempty"`
18608
18609 FriendlyName *string `json:"friendlyName,omitempty"`
18610
18611 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
18612
18613 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
18614 }
18615
18616 func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) {
18617 var m map[string]interface{}
18618 err := json.Unmarshal(body, &m)
18619 if err != nil {
18620 return nil, err
18621 }
18622
18623 switch m["workloadItemType"] {
18624 case string(WorkloadItemTypeAzureVMWorkloadItem):
18625 var avwi AzureVMWorkloadItem
18626 err := json.Unmarshal(body, &avwi)
18627 return avwi, err
18628 case string(WorkloadItemTypeSAPAseDatabase1):
18629 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
18630 err := json.Unmarshal(body, &avwsadwi)
18631 return avwsadwi, err
18632 case string(WorkloadItemTypeSAPAseSystem1):
18633 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
18634 err := json.Unmarshal(body, &avwsaswi)
18635 return avwsaswi, err
18636 case string(WorkloadItemTypeSAPHanaDatabase1):
18637 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
18638 err := json.Unmarshal(body, &avwshdwi)
18639 return avwshdwi, err
18640 case string(WorkloadItemTypeSAPHanaSystem1):
18641 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
18642 err := json.Unmarshal(body, &avwshswi)
18643 return avwshswi, err
18644 case string(WorkloadItemTypeSQLDataBase1):
18645 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
18646 err := json.Unmarshal(body, &avwsdwi)
18647 return avwsdwi, err
18648 case string(WorkloadItemTypeSQLInstance1):
18649 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
18650 err := json.Unmarshal(body, &avwsiwi)
18651 return avwsiwi, err
18652 default:
18653 var wi WorkloadItem
18654 err := json.Unmarshal(body, &wi)
18655 return wi, err
18656 }
18657 }
18658 func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) {
18659 var rawMessages []*json.RawMessage
18660 err := json.Unmarshal(body, &rawMessages)
18661 if err != nil {
18662 return nil, err
18663 }
18664
18665 wiArray := make([]BasicWorkloadItem, len(rawMessages))
18666
18667 for index, rawMessage := range rawMessages {
18668 wi, err := unmarshalBasicWorkloadItem(*rawMessage)
18669 if err != nil {
18670 return nil, err
18671 }
18672 wiArray[index] = wi
18673 }
18674 return wiArray, nil
18675 }
18676
18677
18678 func (wi WorkloadItem) MarshalJSON() ([]byte, error) {
18679 wi.WorkloadItemType = WorkloadItemTypeWorkloadItem
18680 objectMap := make(map[string]interface{})
18681 if wi.BackupManagementType != nil {
18682 objectMap["backupManagementType"] = wi.BackupManagementType
18683 }
18684 if wi.WorkloadType != nil {
18685 objectMap["workloadType"] = wi.WorkloadType
18686 }
18687 if wi.FriendlyName != nil {
18688 objectMap["friendlyName"] = wi.FriendlyName
18689 }
18690 if wi.ProtectionState != "" {
18691 objectMap["protectionState"] = wi.ProtectionState
18692 }
18693 if wi.WorkloadItemType != "" {
18694 objectMap["workloadItemType"] = wi.WorkloadItemType
18695 }
18696 return json.Marshal(objectMap)
18697 }
18698
18699
18700 func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
18701 return nil, false
18702 }
18703
18704
18705 func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
18706 return nil, false
18707 }
18708
18709
18710 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
18711 return nil, false
18712 }
18713
18714
18715 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
18716 return nil, false
18717 }
18718
18719
18720 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
18721 return nil, false
18722 }
18723
18724
18725 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
18726 return nil, false
18727 }
18728
18729
18730 func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
18731 return nil, false
18732 }
18733
18734
18735 func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
18736 return nil, false
18737 }
18738
18739
18740 func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
18741 return &wi, true
18742 }
18743
18744
18745 func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
18746 return &wi, true
18747 }
18748
18749
18750
18751 type WorkloadItemResource struct {
18752
18753 Properties BasicWorkloadItem `json:"properties,omitempty"`
18754
18755 ID *string `json:"id,omitempty"`
18756
18757 Name *string `json:"name,omitempty"`
18758
18759 Type *string `json:"type,omitempty"`
18760
18761 Location *string `json:"location,omitempty"`
18762
18763 Tags map[string]*string `json:"tags"`
18764
18765 ETag *string `json:"eTag,omitempty"`
18766 }
18767
18768
18769 func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) {
18770 objectMap := make(map[string]interface{})
18771 objectMap["properties"] = wir.Properties
18772 if wir.Location != nil {
18773 objectMap["location"] = wir.Location
18774 }
18775 if wir.Tags != nil {
18776 objectMap["tags"] = wir.Tags
18777 }
18778 if wir.ETag != nil {
18779 objectMap["eTag"] = wir.ETag
18780 }
18781 return json.Marshal(objectMap)
18782 }
18783
18784
18785 func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error {
18786 var m map[string]*json.RawMessage
18787 err := json.Unmarshal(body, &m)
18788 if err != nil {
18789 return err
18790 }
18791 for k, v := range m {
18792 switch k {
18793 case "properties":
18794 if v != nil {
18795 properties, err := unmarshalBasicWorkloadItem(*v)
18796 if err != nil {
18797 return err
18798 }
18799 wir.Properties = properties
18800 }
18801 case "id":
18802 if v != nil {
18803 var ID string
18804 err = json.Unmarshal(*v, &ID)
18805 if err != nil {
18806 return err
18807 }
18808 wir.ID = &ID
18809 }
18810 case "name":
18811 if v != nil {
18812 var name string
18813 err = json.Unmarshal(*v, &name)
18814 if err != nil {
18815 return err
18816 }
18817 wir.Name = &name
18818 }
18819 case "type":
18820 if v != nil {
18821 var typeVar string
18822 err = json.Unmarshal(*v, &typeVar)
18823 if err != nil {
18824 return err
18825 }
18826 wir.Type = &typeVar
18827 }
18828 case "location":
18829 if v != nil {
18830 var location string
18831 err = json.Unmarshal(*v, &location)
18832 if err != nil {
18833 return err
18834 }
18835 wir.Location = &location
18836 }
18837 case "tags":
18838 if v != nil {
18839 var tags map[string]*string
18840 err = json.Unmarshal(*v, &tags)
18841 if err != nil {
18842 return err
18843 }
18844 wir.Tags = tags
18845 }
18846 case "eTag":
18847 if v != nil {
18848 var eTag string
18849 err = json.Unmarshal(*v, &eTag)
18850 if err != nil {
18851 return err
18852 }
18853 wir.ETag = &eTag
18854 }
18855 }
18856 }
18857
18858 return nil
18859 }
18860
18861
18862 type WorkloadItemResourceList struct {
18863 autorest.Response `json:"-"`
18864
18865 Value *[]WorkloadItemResource `json:"value,omitempty"`
18866
18867 NextLink *string `json:"nextLink,omitempty"`
18868 }
18869
18870
18871 type WorkloadItemResourceListIterator struct {
18872 i int
18873 page WorkloadItemResourceListPage
18874 }
18875
18876
18877
18878 func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18879 if tracing.IsEnabled() {
18880 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext")
18881 defer func() {
18882 sc := -1
18883 if iter.Response().Response.Response != nil {
18884 sc = iter.Response().Response.Response.StatusCode
18885 }
18886 tracing.EndSpan(ctx, sc, err)
18887 }()
18888 }
18889 iter.i++
18890 if iter.i < len(iter.page.Values()) {
18891 return nil
18892 }
18893 err = iter.page.NextWithContext(ctx)
18894 if err != nil {
18895 iter.i--
18896 return err
18897 }
18898 iter.i = 0
18899 return nil
18900 }
18901
18902
18903
18904
18905 func (iter *WorkloadItemResourceListIterator) Next() error {
18906 return iter.NextWithContext(context.Background())
18907 }
18908
18909
18910 func (iter WorkloadItemResourceListIterator) NotDone() bool {
18911 return iter.page.NotDone() && iter.i < len(iter.page.Values())
18912 }
18913
18914
18915 func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList {
18916 return iter.page.Response()
18917 }
18918
18919
18920
18921 func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource {
18922 if !iter.page.NotDone() {
18923 return WorkloadItemResource{}
18924 }
18925 return iter.page.Values()[iter.i]
18926 }
18927
18928
18929 func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator {
18930 return WorkloadItemResourceListIterator{page: page}
18931 }
18932
18933
18934 func (wirl WorkloadItemResourceList) IsEmpty() bool {
18935 return wirl.Value == nil || len(*wirl.Value) == 0
18936 }
18937
18938
18939 func (wirl WorkloadItemResourceList) hasNextLink() bool {
18940 return wirl.NextLink != nil && len(*wirl.NextLink) != 0
18941 }
18942
18943
18944
18945 func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
18946 if !wirl.hasNextLink() {
18947 return nil, nil
18948 }
18949 return autorest.Prepare((&http.Request{}).WithContext(ctx),
18950 autorest.AsJSON(),
18951 autorest.AsGet(),
18952 autorest.WithBaseURL(to.String(wirl.NextLink)))
18953 }
18954
18955
18956 type WorkloadItemResourceListPage struct {
18957 fn func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)
18958 wirl WorkloadItemResourceList
18959 }
18960
18961
18962
18963 func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
18964 if tracing.IsEnabled() {
18965 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext")
18966 defer func() {
18967 sc := -1
18968 if page.Response().Response.Response != nil {
18969 sc = page.Response().Response.Response.StatusCode
18970 }
18971 tracing.EndSpan(ctx, sc, err)
18972 }()
18973 }
18974 for {
18975 next, err := page.fn(ctx, page.wirl)
18976 if err != nil {
18977 return err
18978 }
18979 page.wirl = next
18980 if !next.hasNextLink() || !next.IsEmpty() {
18981 break
18982 }
18983 }
18984 return nil
18985 }
18986
18987
18988
18989
18990 func (page *WorkloadItemResourceListPage) Next() error {
18991 return page.NextWithContext(context.Background())
18992 }
18993
18994
18995 func (page WorkloadItemResourceListPage) NotDone() bool {
18996 return !page.wirl.IsEmpty()
18997 }
18998
18999
19000 func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList {
19001 return page.wirl
19002 }
19003
19004
19005 func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource {
19006 if page.wirl.IsEmpty() {
19007 return nil
19008 }
19009 return *page.wirl.Value
19010 }
19011
19012
19013 func NewWorkloadItemResourceListPage(cur WorkloadItemResourceList, getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage {
19014 return WorkloadItemResourceListPage{
19015 fn: getNextPage,
19016 wirl: cur,
19017 }
19018 }
19019
19020
19021 type BasicWorkloadProtectableItem interface {
19022 AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool)
19023 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
19024 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
19025 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
19026 AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool)
19027 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
19028 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
19029 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
19030 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
19031 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
19032 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
19033 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
19034 AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool)
19035 AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool)
19036 }
19037
19038
19039
19040 type WorkloadProtectableItem struct {
19041
19042 BackupManagementType *string `json:"backupManagementType,omitempty"`
19043
19044 WorkloadType *string `json:"workloadType,omitempty"`
19045
19046 FriendlyName *string `json:"friendlyName,omitempty"`
19047
19048 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
19049
19050 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
19051 }
19052
19053 func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) {
19054 var m map[string]interface{}
19055 err := json.Unmarshal(body, &m)
19056 if err != nil {
19057 return nil, err
19058 }
19059
19060 switch m["protectableItemType"] {
19061 case string(ProtectableItemTypeAzureFileShare):
19062 var afspi AzureFileShareProtectableItem
19063 err := json.Unmarshal(body, &afspi)
19064 return afspi, err
19065 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
19066 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
19067 err := json.Unmarshal(body, &aisccvpi)
19068 return aisccvpi, err
19069 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
19070 var aiscvpi AzureIaaSComputeVMProtectableItem
19071 err := json.Unmarshal(body, &aiscvpi)
19072 return aiscvpi, err
19073 case string(ProtectableItemTypeAzureVMWorkloadProtectableItem):
19074 var avwpi AzureVMWorkloadProtectableItem
19075 err := json.Unmarshal(body, &avwpi)
19076 return avwpi, err
19077 case string(ProtectableItemTypeSAPAseSystem):
19078 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
19079 err := json.Unmarshal(body, &avwsaspi)
19080 return avwsaspi, err
19081 case string(ProtectableItemTypeSAPHanaDatabase):
19082 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
19083 err := json.Unmarshal(body, &avwshdpi)
19084 return avwshdpi, err
19085 case string(ProtectableItemTypeSAPHanaSystem):
19086 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
19087 err := json.Unmarshal(body, &avwshspi)
19088 return avwshspi, err
19089 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
19090 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
19091 err := json.Unmarshal(body, &avwsagpi)
19092 return avwsagpi, err
19093 case string(ProtectableItemTypeSQLDataBase):
19094 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
19095 err := json.Unmarshal(body, &avwsdpi)
19096 return avwsdpi, err
19097 case string(ProtectableItemTypeSQLInstance):
19098 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
19099 err := json.Unmarshal(body, &avwsipi)
19100 return avwsipi, err
19101 case string(ProtectableItemTypeIaaSVMProtectableItem):
19102 var ispi IaaSVMProtectableItem
19103 err := json.Unmarshal(body, &ispi)
19104 return ispi, err
19105 default:
19106 var wpi WorkloadProtectableItem
19107 err := json.Unmarshal(body, &wpi)
19108 return wpi, err
19109 }
19110 }
19111 func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) {
19112 var rawMessages []*json.RawMessage
19113 err := json.Unmarshal(body, &rawMessages)
19114 if err != nil {
19115 return nil, err
19116 }
19117
19118 wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages))
19119
19120 for index, rawMessage := range rawMessages {
19121 wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage)
19122 if err != nil {
19123 return nil, err
19124 }
19125 wpiArray[index] = wpi
19126 }
19127 return wpiArray, nil
19128 }
19129
19130
19131 func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) {
19132 wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem
19133 objectMap := make(map[string]interface{})
19134 if wpi.BackupManagementType != nil {
19135 objectMap["backupManagementType"] = wpi.BackupManagementType
19136 }
19137 if wpi.WorkloadType != nil {
19138 objectMap["workloadType"] = wpi.WorkloadType
19139 }
19140 if wpi.FriendlyName != nil {
19141 objectMap["friendlyName"] = wpi.FriendlyName
19142 }
19143 if wpi.ProtectionState != "" {
19144 objectMap["protectionState"] = wpi.ProtectionState
19145 }
19146 if wpi.ProtectableItemType != "" {
19147 objectMap["protectableItemType"] = wpi.ProtectableItemType
19148 }
19149 return json.Marshal(objectMap)
19150 }
19151
19152
19153 func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
19154 return nil, false
19155 }
19156
19157
19158 func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
19159 return nil, false
19160 }
19161
19162
19163 func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
19164 return nil, false
19165 }
19166
19167
19168 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
19169 return nil, false
19170 }
19171
19172
19173 func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
19174 return nil, false
19175 }
19176
19177
19178 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
19179 return nil, false
19180 }
19181
19182
19183 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
19184 return nil, false
19185 }
19186
19187
19188 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
19189 return nil, false
19190 }
19191
19192
19193 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
19194 return nil, false
19195 }
19196
19197
19198 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
19199 return nil, false
19200 }
19201
19202
19203 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
19204 return nil, false
19205 }
19206
19207
19208 func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
19209 return nil, false
19210 }
19211
19212
19213 func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
19214 return nil, false
19215 }
19216
19217
19218 func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
19219 return &wpi, true
19220 }
19221
19222
19223 func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
19224 return &wpi, true
19225 }
19226
19227
19228
19229 type WorkloadProtectableItemResource struct {
19230
19231 Properties BasicWorkloadProtectableItem `json:"properties,omitempty"`
19232
19233 ID *string `json:"id,omitempty"`
19234
19235 Name *string `json:"name,omitempty"`
19236
19237 Type *string `json:"type,omitempty"`
19238
19239 Location *string `json:"location,omitempty"`
19240
19241 Tags map[string]*string `json:"tags"`
19242
19243 ETag *string `json:"eTag,omitempty"`
19244 }
19245
19246
19247 func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) {
19248 objectMap := make(map[string]interface{})
19249 objectMap["properties"] = wpir.Properties
19250 if wpir.Location != nil {
19251 objectMap["location"] = wpir.Location
19252 }
19253 if wpir.Tags != nil {
19254 objectMap["tags"] = wpir.Tags
19255 }
19256 if wpir.ETag != nil {
19257 objectMap["eTag"] = wpir.ETag
19258 }
19259 return json.Marshal(objectMap)
19260 }
19261
19262
19263 func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error {
19264 var m map[string]*json.RawMessage
19265 err := json.Unmarshal(body, &m)
19266 if err != nil {
19267 return err
19268 }
19269 for k, v := range m {
19270 switch k {
19271 case "properties":
19272 if v != nil {
19273 properties, err := unmarshalBasicWorkloadProtectableItem(*v)
19274 if err != nil {
19275 return err
19276 }
19277 wpir.Properties = properties
19278 }
19279 case "id":
19280 if v != nil {
19281 var ID string
19282 err = json.Unmarshal(*v, &ID)
19283 if err != nil {
19284 return err
19285 }
19286 wpir.ID = &ID
19287 }
19288 case "name":
19289 if v != nil {
19290 var name string
19291 err = json.Unmarshal(*v, &name)
19292 if err != nil {
19293 return err
19294 }
19295 wpir.Name = &name
19296 }
19297 case "type":
19298 if v != nil {
19299 var typeVar string
19300 err = json.Unmarshal(*v, &typeVar)
19301 if err != nil {
19302 return err
19303 }
19304 wpir.Type = &typeVar
19305 }
19306 case "location":
19307 if v != nil {
19308 var location string
19309 err = json.Unmarshal(*v, &location)
19310 if err != nil {
19311 return err
19312 }
19313 wpir.Location = &location
19314 }
19315 case "tags":
19316 if v != nil {
19317 var tags map[string]*string
19318 err = json.Unmarshal(*v, &tags)
19319 if err != nil {
19320 return err
19321 }
19322 wpir.Tags = tags
19323 }
19324 case "eTag":
19325 if v != nil {
19326 var eTag string
19327 err = json.Unmarshal(*v, &eTag)
19328 if err != nil {
19329 return err
19330 }
19331 wpir.ETag = &eTag
19332 }
19333 }
19334 }
19335
19336 return nil
19337 }
19338
19339
19340 type WorkloadProtectableItemResourceList struct {
19341 autorest.Response `json:"-"`
19342
19343 Value *[]WorkloadProtectableItemResource `json:"value,omitempty"`
19344
19345 NextLink *string `json:"nextLink,omitempty"`
19346 }
19347
19348
19349
19350 type WorkloadProtectableItemResourceListIterator struct {
19351 i int
19352 page WorkloadProtectableItemResourceListPage
19353 }
19354
19355
19356
19357 func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19358 if tracing.IsEnabled() {
19359 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext")
19360 defer func() {
19361 sc := -1
19362 if iter.Response().Response.Response != nil {
19363 sc = iter.Response().Response.Response.StatusCode
19364 }
19365 tracing.EndSpan(ctx, sc, err)
19366 }()
19367 }
19368 iter.i++
19369 if iter.i < len(iter.page.Values()) {
19370 return nil
19371 }
19372 err = iter.page.NextWithContext(ctx)
19373 if err != nil {
19374 iter.i--
19375 return err
19376 }
19377 iter.i = 0
19378 return nil
19379 }
19380
19381
19382
19383
19384 func (iter *WorkloadProtectableItemResourceListIterator) Next() error {
19385 return iter.NextWithContext(context.Background())
19386 }
19387
19388
19389 func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool {
19390 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19391 }
19392
19393
19394 func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList {
19395 return iter.page.Response()
19396 }
19397
19398
19399
19400 func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource {
19401 if !iter.page.NotDone() {
19402 return WorkloadProtectableItemResource{}
19403 }
19404 return iter.page.Values()[iter.i]
19405 }
19406
19407
19408 func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator {
19409 return WorkloadProtectableItemResourceListIterator{page: page}
19410 }
19411
19412
19413 func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool {
19414 return wpirl.Value == nil || len(*wpirl.Value) == 0
19415 }
19416
19417
19418 func (wpirl WorkloadProtectableItemResourceList) hasNextLink() bool {
19419 return wpirl.NextLink != nil && len(*wpirl.NextLink) != 0
19420 }
19421
19422
19423
19424 func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
19425 if !wpirl.hasNextLink() {
19426 return nil, nil
19427 }
19428 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19429 autorest.AsJSON(),
19430 autorest.AsGet(),
19431 autorest.WithBaseURL(to.String(wpirl.NextLink)))
19432 }
19433
19434
19435 type WorkloadProtectableItemResourceListPage struct {
19436 fn func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)
19437 wpirl WorkloadProtectableItemResourceList
19438 }
19439
19440
19441
19442 func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
19443 if tracing.IsEnabled() {
19444 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext")
19445 defer func() {
19446 sc := -1
19447 if page.Response().Response.Response != nil {
19448 sc = page.Response().Response.Response.StatusCode
19449 }
19450 tracing.EndSpan(ctx, sc, err)
19451 }()
19452 }
19453 for {
19454 next, err := page.fn(ctx, page.wpirl)
19455 if err != nil {
19456 return err
19457 }
19458 page.wpirl = next
19459 if !next.hasNextLink() || !next.IsEmpty() {
19460 break
19461 }
19462 }
19463 return nil
19464 }
19465
19466
19467
19468
19469 func (page *WorkloadProtectableItemResourceListPage) Next() error {
19470 return page.NextWithContext(context.Background())
19471 }
19472
19473
19474 func (page WorkloadProtectableItemResourceListPage) NotDone() bool {
19475 return !page.wpirl.IsEmpty()
19476 }
19477
19478
19479 func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList {
19480 return page.wpirl
19481 }
19482
19483
19484 func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource {
19485 if page.wpirl.IsEmpty() {
19486 return nil
19487 }
19488 return *page.wpirl.Value
19489 }
19490
19491
19492 func NewWorkloadProtectableItemResourceListPage(cur WorkloadProtectableItemResourceList, getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage {
19493 return WorkloadProtectableItemResourceListPage{
19494 fn: getNextPage,
19495 wpirl: cur,
19496 }
19497 }
19498
19499
19500 type YearlyRetentionSchedule struct {
19501
19502 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
19503
19504 MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"`
19505
19506 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
19507
19508 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
19509
19510 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
19511
19512 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
19513 }
19514
View as plain text