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/azure"
14 "github.com/Azure/go-autorest/autorest/date"
15 "github.com/Azure/go-autorest/autorest/to"
16 "github.com/Azure/go-autorest/tracing"
17 "net/http"
18 )
19
20
21 const fqdn = "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2022-03-01/backup"
22
23
24 type AzureBackupGoalFeatureSupportRequest struct {
25
26 FeatureType FeatureType `json:"featureType,omitempty"`
27 }
28
29
30 func (abgfsr AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) {
31 abgfsr.FeatureType = FeatureTypeAzureBackupGoals
32 objectMap := make(map[string]interface{})
33 if abgfsr.FeatureType != "" {
34 objectMap["featureType"] = abgfsr.FeatureType
35 }
36 return json.Marshal(objectMap)
37 }
38
39
40 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
41 return &abgfsr, true
42 }
43
44
45 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
46 return nil, false
47 }
48
49
50 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
51 return nil, false
52 }
53
54
55 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
56 return &abgfsr, true
57 }
58
59
60 type AzureBackupServerContainer struct {
61
62 CanReRegister *bool `json:"canReRegister,omitempty"`
63
64 ContainerID *string `json:"containerId,omitempty"`
65
66 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
67
68 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
69
70 DpmServers *[]string `json:"dpmServers,omitempty"`
71
72 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
73
74 ProtectionStatus *string `json:"protectionStatus,omitempty"`
75
76 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
77
78 FriendlyName *string `json:"friendlyName,omitempty"`
79
80 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
81
82 RegistrationStatus *string `json:"registrationStatus,omitempty"`
83
84 HealthStatus *string `json:"healthStatus,omitempty"`
85
86 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
87
88 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
89 }
90
91
92 func (absc AzureBackupServerContainer) MarshalJSON() ([]byte, error) {
93 absc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer
94 objectMap := make(map[string]interface{})
95 if absc.CanReRegister != nil {
96 objectMap["canReRegister"] = absc.CanReRegister
97 }
98 if absc.ContainerID != nil {
99 objectMap["containerId"] = absc.ContainerID
100 }
101 if absc.ProtectedItemCount != nil {
102 objectMap["protectedItemCount"] = absc.ProtectedItemCount
103 }
104 if absc.DpmAgentVersion != nil {
105 objectMap["dpmAgentVersion"] = absc.DpmAgentVersion
106 }
107 if absc.DpmServers != nil {
108 objectMap["dpmServers"] = absc.DpmServers
109 }
110 if absc.UpgradeAvailable != nil {
111 objectMap["upgradeAvailable"] = absc.UpgradeAvailable
112 }
113 if absc.ProtectionStatus != nil {
114 objectMap["protectionStatus"] = absc.ProtectionStatus
115 }
116 if absc.ExtendedInfo != nil {
117 objectMap["extendedInfo"] = absc.ExtendedInfo
118 }
119 if absc.FriendlyName != nil {
120 objectMap["friendlyName"] = absc.FriendlyName
121 }
122 if absc.BackupManagementType != "" {
123 objectMap["backupManagementType"] = absc.BackupManagementType
124 }
125 if absc.RegistrationStatus != nil {
126 objectMap["registrationStatus"] = absc.RegistrationStatus
127 }
128 if absc.HealthStatus != nil {
129 objectMap["healthStatus"] = absc.HealthStatus
130 }
131 if absc.ProtectableObjectType != nil {
132 objectMap["protectableObjectType"] = absc.ProtectableObjectType
133 }
134 if absc.ContainerType != "" {
135 objectMap["containerType"] = absc.ContainerType
136 }
137 return json.Marshal(objectMap)
138 }
139
140
141 func (absc AzureBackupServerContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
142 return &absc, true
143 }
144
145
146 func (absc AzureBackupServerContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
147 return nil, false
148 }
149
150
151 func (absc AzureBackupServerContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
152 return nil, false
153 }
154
155
156 func (absc AzureBackupServerContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
157 return nil, false
158 }
159
160
161 func (absc AzureBackupServerContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
162 return nil, false
163 }
164
165
166 func (absc AzureBackupServerContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
167 return nil, false
168 }
169
170
171 func (absc AzureBackupServerContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
172 return nil, false
173 }
174
175
176 func (absc AzureBackupServerContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
177 return nil, false
178 }
179
180
181 func (absc AzureBackupServerContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
182 return nil, false
183 }
184
185
186 func (absc AzureBackupServerContainer) AsDpmContainer() (*DpmContainer, bool) {
187 return nil, false
188 }
189
190
191 func (absc AzureBackupServerContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
192 return &absc, true
193 }
194
195
196 func (absc AzureBackupServerContainer) AsGenericContainer() (*GenericContainer, bool) {
197 return nil, false
198 }
199
200
201 func (absc AzureBackupServerContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
202 return nil, false
203 }
204
205
206 func (absc AzureBackupServerContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
207 return nil, false
208 }
209
210
211 func (absc AzureBackupServerContainer) AsMabContainer() (*MabContainer, bool) {
212 return nil, false
213 }
214
215
216 func (absc AzureBackupServerContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
217 return nil, false
218 }
219
220
221 func (absc AzureBackupServerContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
222 return &absc, true
223 }
224
225
226 type AzureBackupServerEngine struct {
227
228 FriendlyName *string `json:"friendlyName,omitempty"`
229
230 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
231
232 RegistrationStatus *string `json:"registrationStatus,omitempty"`
233
234 BackupEngineState *string `json:"backupEngineState,omitempty"`
235
236 HealthStatus *string `json:"healthStatus,omitempty"`
237
238 CanReRegister *bool `json:"canReRegister,omitempty"`
239
240 BackupEngineID *string `json:"backupEngineId,omitempty"`
241
242 DpmVersion *string `json:"dpmVersion,omitempty"`
243
244 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
245
246 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
247
248 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
249
250 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
251
252 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
253 }
254
255
256 func (abse AzureBackupServerEngine) MarshalJSON() ([]byte, error) {
257 abse.BackupEngineType = EngineTypeBackupEngineTypeAzureBackupServerEngine
258 objectMap := make(map[string]interface{})
259 if abse.FriendlyName != nil {
260 objectMap["friendlyName"] = abse.FriendlyName
261 }
262 if abse.BackupManagementType != "" {
263 objectMap["backupManagementType"] = abse.BackupManagementType
264 }
265 if abse.RegistrationStatus != nil {
266 objectMap["registrationStatus"] = abse.RegistrationStatus
267 }
268 if abse.BackupEngineState != nil {
269 objectMap["backupEngineState"] = abse.BackupEngineState
270 }
271 if abse.HealthStatus != nil {
272 objectMap["healthStatus"] = abse.HealthStatus
273 }
274 if abse.CanReRegister != nil {
275 objectMap["canReRegister"] = abse.CanReRegister
276 }
277 if abse.BackupEngineID != nil {
278 objectMap["backupEngineId"] = abse.BackupEngineID
279 }
280 if abse.DpmVersion != nil {
281 objectMap["dpmVersion"] = abse.DpmVersion
282 }
283 if abse.AzureBackupAgentVersion != nil {
284 objectMap["azureBackupAgentVersion"] = abse.AzureBackupAgentVersion
285 }
286 if abse.IsAzureBackupAgentUpgradeAvailable != nil {
287 objectMap["isAzureBackupAgentUpgradeAvailable"] = abse.IsAzureBackupAgentUpgradeAvailable
288 }
289 if abse.IsDpmUpgradeAvailable != nil {
290 objectMap["isDpmUpgradeAvailable"] = abse.IsDpmUpgradeAvailable
291 }
292 if abse.ExtendedInfo != nil {
293 objectMap["extendedInfo"] = abse.ExtendedInfo
294 }
295 if abse.BackupEngineType != "" {
296 objectMap["backupEngineType"] = abse.BackupEngineType
297 }
298 return json.Marshal(objectMap)
299 }
300
301
302 func (abse AzureBackupServerEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
303 return &abse, true
304 }
305
306
307 func (abse AzureBackupServerEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
308 return nil, false
309 }
310
311
312 func (abse AzureBackupServerEngine) AsEngineBase() (*EngineBase, bool) {
313 return nil, false
314 }
315
316
317 func (abse AzureBackupServerEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
318 return &abse, true
319 }
320
321
322 type AzureFileShareBackupRequest struct {
323
324 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
325
326 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
327 }
328
329
330 func (afsbr AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) {
331 afsbr.ObjectType = ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest
332 objectMap := make(map[string]interface{})
333 if afsbr.RecoveryPointExpiryTimeInUTC != nil {
334 objectMap["recoveryPointExpiryTimeInUTC"] = afsbr.RecoveryPointExpiryTimeInUTC
335 }
336 if afsbr.ObjectType != "" {
337 objectMap["objectType"] = afsbr.ObjectType
338 }
339 return json.Marshal(objectMap)
340 }
341
342
343 func (afsbr AzureFileShareBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
344 return &afsbr, true
345 }
346
347
348 func (afsbr AzureFileShareBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
349 return nil, false
350 }
351
352
353 func (afsbr AzureFileShareBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
354 return nil, false
355 }
356
357
358 func (afsbr AzureFileShareBackupRequest) AsRequest() (*Request, bool) {
359 return nil, false
360 }
361
362
363 func (afsbr AzureFileShareBackupRequest) AsBasicRequest() (BasicRequest, bool) {
364 return &afsbr, true
365 }
366
367
368 type AzureFileShareProtectableItem struct {
369
370 ParentContainerFabricID *string `json:"parentContainerFabricId,omitempty"`
371
372 ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"`
373
374 AzureFileShareType AzureFileShareType `json:"azureFileShareType,omitempty"`
375
376 BackupManagementType *string `json:"backupManagementType,omitempty"`
377
378 WorkloadType *string `json:"workloadType,omitempty"`
379
380 FriendlyName *string `json:"friendlyName,omitempty"`
381
382 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
383
384 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
385 }
386
387
388 func (afspi AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) {
389 afspi.ProtectableItemType = ProtectableItemTypeAzureFileShare
390 objectMap := make(map[string]interface{})
391 if afspi.ParentContainerFabricID != nil {
392 objectMap["parentContainerFabricId"] = afspi.ParentContainerFabricID
393 }
394 if afspi.ParentContainerFriendlyName != nil {
395 objectMap["parentContainerFriendlyName"] = afspi.ParentContainerFriendlyName
396 }
397 if afspi.AzureFileShareType != "" {
398 objectMap["azureFileShareType"] = afspi.AzureFileShareType
399 }
400 if afspi.BackupManagementType != nil {
401 objectMap["backupManagementType"] = afspi.BackupManagementType
402 }
403 if afspi.WorkloadType != nil {
404 objectMap["workloadType"] = afspi.WorkloadType
405 }
406 if afspi.FriendlyName != nil {
407 objectMap["friendlyName"] = afspi.FriendlyName
408 }
409 if afspi.ProtectionState != "" {
410 objectMap["protectionState"] = afspi.ProtectionState
411 }
412 if afspi.ProtectableItemType != "" {
413 objectMap["protectableItemType"] = afspi.ProtectableItemType
414 }
415 return json.Marshal(objectMap)
416 }
417
418
419 func (afspi AzureFileShareProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
420 return &afspi, true
421 }
422
423
424 func (afspi AzureFileShareProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
425 return nil, false
426 }
427
428
429 func (afspi AzureFileShareProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
430 return nil, false
431 }
432
433
434 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
435 return nil, false
436 }
437
438
439 func (afspi AzureFileShareProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
440 return nil, false
441 }
442
443
444 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
445 return nil, false
446 }
447
448
449 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
450 return nil, false
451 }
452
453
454 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
455 return nil, false
456 }
457
458
459 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
460 return nil, false
461 }
462
463
464 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
465 return nil, false
466 }
467
468
469 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
470 return nil, false
471 }
472
473
474 func (afspi AzureFileShareProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
475 return nil, false
476 }
477
478
479 func (afspi AzureFileShareProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
480 return nil, false
481 }
482
483
484 func (afspi AzureFileShareProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
485 return nil, false
486 }
487
488
489 func (afspi AzureFileShareProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
490 return &afspi, true
491 }
492
493
494 type AzureFileshareProtectedItem struct {
495
496 FriendlyName *string `json:"friendlyName,omitempty"`
497
498 ProtectionStatus *string `json:"protectionStatus,omitempty"`
499
500 ProtectionState ProtectionState `json:"protectionState,omitempty"`
501
502 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
503
504 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
505
506 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
507
508 ExtendedInfo *AzureFileshareProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
509
510 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
511
512 WorkloadType DataSourceType `json:"workloadType,omitempty"`
513
514 ContainerName *string `json:"containerName,omitempty"`
515
516 SourceResourceID *string `json:"sourceResourceId,omitempty"`
517
518 PolicyID *string `json:"policyId,omitempty"`
519
520 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
521
522 BackupSetName *string `json:"backupSetName,omitempty"`
523
524 CreateMode CreateMode `json:"createMode,omitempty"`
525
526 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
527
528 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
529
530 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
531
532 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
533
534 IsRehydrate *bool `json:"isRehydrate,omitempty"`
535
536 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
537
538 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
539
540 PolicyName *string `json:"policyName,omitempty"`
541
542 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
543 }
544
545
546 func (afpi AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) {
547 afpi.ProtectedItemType = ProtectedItemTypeAzureFileShareProtectedItem
548 objectMap := make(map[string]interface{})
549 if afpi.FriendlyName != nil {
550 objectMap["friendlyName"] = afpi.FriendlyName
551 }
552 if afpi.ProtectionStatus != nil {
553 objectMap["protectionStatus"] = afpi.ProtectionStatus
554 }
555 if afpi.ProtectionState != "" {
556 objectMap["protectionState"] = afpi.ProtectionState
557 }
558 if afpi.LastBackupStatus != nil {
559 objectMap["lastBackupStatus"] = afpi.LastBackupStatus
560 }
561 if afpi.LastBackupTime != nil {
562 objectMap["lastBackupTime"] = afpi.LastBackupTime
563 }
564 if afpi.KpisHealths != nil {
565 objectMap["kpisHealths"] = afpi.KpisHealths
566 }
567 if afpi.ExtendedInfo != nil {
568 objectMap["extendedInfo"] = afpi.ExtendedInfo
569 }
570 if afpi.BackupManagementType != "" {
571 objectMap["backupManagementType"] = afpi.BackupManagementType
572 }
573 if afpi.WorkloadType != "" {
574 objectMap["workloadType"] = afpi.WorkloadType
575 }
576 if afpi.ContainerName != nil {
577 objectMap["containerName"] = afpi.ContainerName
578 }
579 if afpi.SourceResourceID != nil {
580 objectMap["sourceResourceId"] = afpi.SourceResourceID
581 }
582 if afpi.PolicyID != nil {
583 objectMap["policyId"] = afpi.PolicyID
584 }
585 if afpi.LastRecoveryPoint != nil {
586 objectMap["lastRecoveryPoint"] = afpi.LastRecoveryPoint
587 }
588 if afpi.BackupSetName != nil {
589 objectMap["backupSetName"] = afpi.BackupSetName
590 }
591 if afpi.CreateMode != "" {
592 objectMap["createMode"] = afpi.CreateMode
593 }
594 if afpi.DeferredDeleteTimeInUTC != nil {
595 objectMap["deferredDeleteTimeInUTC"] = afpi.DeferredDeleteTimeInUTC
596 }
597 if afpi.IsScheduledForDeferredDelete != nil {
598 objectMap["isScheduledForDeferredDelete"] = afpi.IsScheduledForDeferredDelete
599 }
600 if afpi.DeferredDeleteTimeRemaining != nil {
601 objectMap["deferredDeleteTimeRemaining"] = afpi.DeferredDeleteTimeRemaining
602 }
603 if afpi.IsDeferredDeleteScheduleUpcoming != nil {
604 objectMap["isDeferredDeleteScheduleUpcoming"] = afpi.IsDeferredDeleteScheduleUpcoming
605 }
606 if afpi.IsRehydrate != nil {
607 objectMap["isRehydrate"] = afpi.IsRehydrate
608 }
609 if afpi.ResourceGuardOperationRequests != nil {
610 objectMap["resourceGuardOperationRequests"] = afpi.ResourceGuardOperationRequests
611 }
612 if afpi.IsArchiveEnabled != nil {
613 objectMap["isArchiveEnabled"] = afpi.IsArchiveEnabled
614 }
615 if afpi.PolicyName != nil {
616 objectMap["policyName"] = afpi.PolicyName
617 }
618 if afpi.ProtectedItemType != "" {
619 objectMap["protectedItemType"] = afpi.ProtectedItemType
620 }
621 return json.Marshal(objectMap)
622 }
623
624
625 func (afpi AzureFileshareProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
626 return &afpi, true
627 }
628
629
630 func (afpi AzureFileshareProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
631 return nil, false
632 }
633
634
635 func (afpi AzureFileshareProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
636 return nil, false
637 }
638
639
640 func (afpi AzureFileshareProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
641 return nil, false
642 }
643
644
645 func (afpi AzureFileshareProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
646 return nil, false
647 }
648
649
650 func (afpi AzureFileshareProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
651 return nil, false
652 }
653
654
655 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
656 return nil, false
657 }
658
659
660 func (afpi AzureFileshareProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
661 return nil, false
662 }
663
664
665 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
666 return nil, false
667 }
668
669
670 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
671 return nil, false
672 }
673
674
675 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
676 return nil, false
677 }
678
679
680 func (afpi AzureFileshareProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
681 return nil, false
682 }
683
684
685 func (afpi AzureFileshareProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
686 return nil, false
687 }
688
689
690 func (afpi AzureFileshareProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
691 return nil, false
692 }
693
694
695 func (afpi AzureFileshareProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
696 return nil, false
697 }
698
699
700 func (afpi AzureFileshareProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
701 return &afpi, true
702 }
703
704
705 type AzureFileshareProtectedItemExtendedInfo struct {
706
707 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
708
709 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
710
711 PolicyState *string `json:"policyState,omitempty"`
712
713 ResourceState *string `json:"resourceState,omitempty"`
714
715 ResourceStateSyncTime *date.Time `json:"resourceStateSyncTime,omitempty"`
716 }
717
718
719 func (afpiei AzureFileshareProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
720 objectMap := make(map[string]interface{})
721 if afpiei.OldestRecoveryPoint != nil {
722 objectMap["oldestRecoveryPoint"] = afpiei.OldestRecoveryPoint
723 }
724 if afpiei.RecoveryPointCount != nil {
725 objectMap["recoveryPointCount"] = afpiei.RecoveryPointCount
726 }
727 if afpiei.PolicyState != nil {
728 objectMap["policyState"] = afpiei.PolicyState
729 }
730 return json.Marshal(objectMap)
731 }
732
733
734 type AzureFileShareProtectionPolicy struct {
735
736 WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
737
738 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
739
740 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
741
742 TimeZone *string `json:"timeZone,omitempty"`
743
744 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
745
746 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
747
748 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
749 }
750
751
752 func (afspp AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) {
753 afspp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage
754 objectMap := make(map[string]interface{})
755 if afspp.WorkLoadType != "" {
756 objectMap["workLoadType"] = afspp.WorkLoadType
757 }
758 objectMap["schedulePolicy"] = afspp.SchedulePolicy
759 objectMap["retentionPolicy"] = afspp.RetentionPolicy
760 if afspp.TimeZone != nil {
761 objectMap["timeZone"] = afspp.TimeZone
762 }
763 if afspp.ProtectedItemsCount != nil {
764 objectMap["protectedItemsCount"] = afspp.ProtectedItemsCount
765 }
766 if afspp.ResourceGuardOperationRequests != nil {
767 objectMap["resourceGuardOperationRequests"] = afspp.ResourceGuardOperationRequests
768 }
769 if afspp.BackupManagementType != "" {
770 objectMap["backupManagementType"] = afspp.BackupManagementType
771 }
772 return json.Marshal(objectMap)
773 }
774
775
776 func (afspp AzureFileShareProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
777 return nil, false
778 }
779
780
781 func (afspp AzureFileShareProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
782 return &afspp, true
783 }
784
785
786 func (afspp AzureFileShareProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
787 return nil, false
788 }
789
790
791 func (afspp AzureFileShareProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
792 return nil, false
793 }
794
795
796 func (afspp AzureFileShareProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
797 return nil, false
798 }
799
800
801 func (afspp AzureFileShareProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
802 return nil, false
803 }
804
805
806 func (afspp AzureFileShareProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
807 return nil, false
808 }
809
810
811 func (afspp AzureFileShareProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
812 return &afspp, true
813 }
814
815
816 func (afspp *AzureFileShareProtectionPolicy) UnmarshalJSON(body []byte) error {
817 var m map[string]*json.RawMessage
818 err := json.Unmarshal(body, &m)
819 if err != nil {
820 return err
821 }
822 for k, v := range m {
823 switch k {
824 case "workLoadType":
825 if v != nil {
826 var workLoadType WorkloadType
827 err = json.Unmarshal(*v, &workLoadType)
828 if err != nil {
829 return err
830 }
831 afspp.WorkLoadType = workLoadType
832 }
833 case "schedulePolicy":
834 if v != nil {
835 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
836 if err != nil {
837 return err
838 }
839 afspp.SchedulePolicy = schedulePolicy
840 }
841 case "retentionPolicy":
842 if v != nil {
843 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
844 if err != nil {
845 return err
846 }
847 afspp.RetentionPolicy = retentionPolicy
848 }
849 case "timeZone":
850 if v != nil {
851 var timeZone string
852 err = json.Unmarshal(*v, &timeZone)
853 if err != nil {
854 return err
855 }
856 afspp.TimeZone = &timeZone
857 }
858 case "protectedItemsCount":
859 if v != nil {
860 var protectedItemsCount int32
861 err = json.Unmarshal(*v, &protectedItemsCount)
862 if err != nil {
863 return err
864 }
865 afspp.ProtectedItemsCount = &protectedItemsCount
866 }
867 case "resourceGuardOperationRequests":
868 if v != nil {
869 var resourceGuardOperationRequests []string
870 err = json.Unmarshal(*v, &resourceGuardOperationRequests)
871 if err != nil {
872 return err
873 }
874 afspp.ResourceGuardOperationRequests = &resourceGuardOperationRequests
875 }
876 case "backupManagementType":
877 if v != nil {
878 var backupManagementType ManagementTypeBasicProtectionPolicy
879 err = json.Unmarshal(*v, &backupManagementType)
880 if err != nil {
881 return err
882 }
883 afspp.BackupManagementType = backupManagementType
884 }
885 }
886 }
887
888 return nil
889 }
890
891
892
893 type AzureFileShareProvisionILRRequest struct {
894
895 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
896
897 SourceResourceID *string `json:"sourceResourceId,omitempty"`
898
899 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
900 }
901
902
903 func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) {
904 afspir.ObjectType = ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest
905 objectMap := make(map[string]interface{})
906 if afspir.RecoveryPointID != nil {
907 objectMap["recoveryPointId"] = afspir.RecoveryPointID
908 }
909 if afspir.SourceResourceID != nil {
910 objectMap["sourceResourceId"] = afspir.SourceResourceID
911 }
912 if afspir.ObjectType != "" {
913 objectMap["objectType"] = afspir.ObjectType
914 }
915 return json.Marshal(objectMap)
916 }
917
918
919 func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
920 return &afspir, true
921 }
922
923
924 func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
925 return nil, false
926 }
927
928
929 func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) {
930 return nil, false
931 }
932
933
934 func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
935 return &afspir, true
936 }
937
938
939 type AzureFileShareRecoveryPoint struct {
940
941 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
942
943 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
944
945 FileShareSnapshotURI *string `json:"fileShareSnapshotUri,omitempty"`
946
947 RecoveryPointSizeInGB *int32 `json:"recoveryPointSizeInGB,omitempty"`
948
949 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
950 }
951
952
953 func (afsrp AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) {
954 afsrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint
955 objectMap := make(map[string]interface{})
956 if afsrp.RecoveryPointType != nil {
957 objectMap["recoveryPointType"] = afsrp.RecoveryPointType
958 }
959 if afsrp.RecoveryPointTime != nil {
960 objectMap["recoveryPointTime"] = afsrp.RecoveryPointTime
961 }
962 if afsrp.FileShareSnapshotURI != nil {
963 objectMap["fileShareSnapshotUri"] = afsrp.FileShareSnapshotURI
964 }
965 if afsrp.RecoveryPointSizeInGB != nil {
966 objectMap["recoveryPointSizeInGB"] = afsrp.RecoveryPointSizeInGB
967 }
968 if afsrp.ObjectType != "" {
969 objectMap["objectType"] = afsrp.ObjectType
970 }
971 return json.Marshal(objectMap)
972 }
973
974
975 func (afsrp AzureFileShareRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
976 return &afsrp, true
977 }
978
979
980 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
981 return nil, false
982 }
983
984
985 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
986 return nil, false
987 }
988
989
990 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
991 return nil, false
992 }
993
994
995 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
996 return nil, false
997 }
998
999
1000 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
1001 return nil, false
1002 }
1003
1004
1005 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
1006 return nil, false
1007 }
1008
1009
1010 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
1011 return nil, false
1012 }
1013
1014
1015 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
1016 return nil, false
1017 }
1018
1019
1020 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
1021 return nil, false
1022 }
1023
1024
1025 func (afsrp AzureFileShareRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
1026 return nil, false
1027 }
1028
1029
1030 func (afsrp AzureFileShareRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
1031 return nil, false
1032 }
1033
1034
1035 func (afsrp AzureFileShareRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
1036 return nil, false
1037 }
1038
1039
1040 func (afsrp AzureFileShareRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
1041 return &afsrp, true
1042 }
1043
1044
1045 type AzureFileShareRestoreRequest struct {
1046
1047 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
1048
1049 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1050
1051 CopyOptions CopyOptions `json:"copyOptions,omitempty"`
1052
1053 RestoreRequestType RestoreRequestType `json:"restoreRequestType,omitempty"`
1054
1055 RestoreFileSpecs *[]RestoreFileSpecs `json:"restoreFileSpecs,omitempty"`
1056
1057 TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"`
1058
1059 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
1060 }
1061
1062
1063 func (afsrr AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) {
1064 afsrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest
1065 objectMap := make(map[string]interface{})
1066 if afsrr.RecoveryType != "" {
1067 objectMap["recoveryType"] = afsrr.RecoveryType
1068 }
1069 if afsrr.SourceResourceID != nil {
1070 objectMap["sourceResourceId"] = afsrr.SourceResourceID
1071 }
1072 if afsrr.CopyOptions != "" {
1073 objectMap["copyOptions"] = afsrr.CopyOptions
1074 }
1075 if afsrr.RestoreRequestType != "" {
1076 objectMap["restoreRequestType"] = afsrr.RestoreRequestType
1077 }
1078 if afsrr.RestoreFileSpecs != nil {
1079 objectMap["restoreFileSpecs"] = afsrr.RestoreFileSpecs
1080 }
1081 if afsrr.TargetDetails != nil {
1082 objectMap["targetDetails"] = afsrr.TargetDetails
1083 }
1084 if afsrr.ObjectType != "" {
1085 objectMap["objectType"] = afsrr.ObjectType
1086 }
1087 return json.Marshal(objectMap)
1088 }
1089
1090
1091 func (afsrr AzureFileShareRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
1092 return &afsrr, true
1093 }
1094
1095
1096 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
1097 return nil, false
1098 }
1099
1100
1101 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
1102 return nil, false
1103 }
1104
1105
1106 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
1107 return nil, false
1108 }
1109
1110
1111 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
1112 return nil, false
1113 }
1114
1115
1116 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
1117 return nil, false
1118 }
1119
1120
1121 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
1122 return nil, false
1123 }
1124
1125
1126 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
1127 return nil, false
1128 }
1129
1130
1131 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
1132 return nil, false
1133 }
1134
1135
1136 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
1137 return nil, false
1138 }
1139
1140
1141 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
1142 return nil, false
1143 }
1144
1145
1146 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
1147 return nil, false
1148 }
1149
1150
1151 func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
1152 return nil, false
1153 }
1154
1155
1156 func (afsrr AzureFileShareRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
1157 return nil, false
1158 }
1159
1160
1161 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
1162 return nil, false
1163 }
1164
1165
1166 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
1167 return nil, false
1168 }
1169
1170
1171 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
1172 return nil, false
1173 }
1174
1175
1176 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
1177 return nil, false
1178 }
1179
1180
1181 func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
1182 return nil, false
1183 }
1184
1185
1186 func (afsrr AzureFileShareRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
1187 return nil, false
1188 }
1189
1190
1191 func (afsrr AzureFileShareRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
1192 return &afsrr, true
1193 }
1194
1195
1196
1197 type AzureIaaSClassicComputeVMContainer struct {
1198
1199 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1200
1201 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1202
1203 ResourceGroup *string `json:"resourceGroup,omitempty"`
1204
1205 FriendlyName *string `json:"friendlyName,omitempty"`
1206
1207 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1208
1209 RegistrationStatus *string `json:"registrationStatus,omitempty"`
1210
1211 HealthStatus *string `json:"healthStatus,omitempty"`
1212
1213 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
1214
1215 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
1216 }
1217
1218
1219 func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) {
1220 aisccvc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines
1221 objectMap := make(map[string]interface{})
1222 if aisccvc.VirtualMachineID != nil {
1223 objectMap["virtualMachineId"] = aisccvc.VirtualMachineID
1224 }
1225 if aisccvc.VirtualMachineVersion != nil {
1226 objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion
1227 }
1228 if aisccvc.ResourceGroup != nil {
1229 objectMap["resourceGroup"] = aisccvc.ResourceGroup
1230 }
1231 if aisccvc.FriendlyName != nil {
1232 objectMap["friendlyName"] = aisccvc.FriendlyName
1233 }
1234 if aisccvc.BackupManagementType != "" {
1235 objectMap["backupManagementType"] = aisccvc.BackupManagementType
1236 }
1237 if aisccvc.RegistrationStatus != nil {
1238 objectMap["registrationStatus"] = aisccvc.RegistrationStatus
1239 }
1240 if aisccvc.HealthStatus != nil {
1241 objectMap["healthStatus"] = aisccvc.HealthStatus
1242 }
1243 if aisccvc.ProtectableObjectType != nil {
1244 objectMap["protectableObjectType"] = aisccvc.ProtectableObjectType
1245 }
1246 if aisccvc.ContainerType != "" {
1247 objectMap["containerType"] = aisccvc.ContainerType
1248 }
1249 return json.Marshal(objectMap)
1250 }
1251
1252
1253 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
1254 return nil, false
1255 }
1256
1257
1258 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
1259 return &aisccvc, true
1260 }
1261
1262
1263 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
1264 return nil, false
1265 }
1266
1267
1268 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
1269 return nil, false
1270 }
1271
1272
1273 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
1274 return nil, false
1275 }
1276
1277
1278 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
1279 return nil, false
1280 }
1281
1282
1283 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
1284 return nil, false
1285 }
1286
1287
1288 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
1289 return nil, false
1290 }
1291
1292
1293 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
1294 return nil, false
1295 }
1296
1297
1298 func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
1299 return nil, false
1300 }
1301
1302
1303 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
1304 return nil, false
1305 }
1306
1307
1308 func (aisccvc AzureIaaSClassicComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
1309 return nil, false
1310 }
1311
1312
1313 func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
1314 return nil, false
1315 }
1316
1317
1318 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
1319 return &aisccvc, true
1320 }
1321
1322
1323 func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
1324 return nil, false
1325 }
1326
1327
1328 func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
1329 return nil, false
1330 }
1331
1332
1333 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
1334 return &aisccvc, true
1335 }
1336
1337
1338
1339 type AzureIaaSClassicComputeVMProtectableItem struct {
1340
1341 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1342
1343 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1344
1345 ResourceGroup *string `json:"resourceGroup,omitempty"`
1346
1347 BackupManagementType *string `json:"backupManagementType,omitempty"`
1348
1349 WorkloadType *string `json:"workloadType,omitempty"`
1350
1351 FriendlyName *string `json:"friendlyName,omitempty"`
1352
1353 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
1354
1355 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
1356 }
1357
1358
1359 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
1360 aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines
1361 objectMap := make(map[string]interface{})
1362 if aisccvpi.VirtualMachineID != nil {
1363 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
1364 }
1365 if aisccvpi.VirtualMachineVersion != nil {
1366 objectMap["virtualMachineVersion"] = aisccvpi.VirtualMachineVersion
1367 }
1368 if aisccvpi.ResourceGroup != nil {
1369 objectMap["resourceGroup"] = aisccvpi.ResourceGroup
1370 }
1371 if aisccvpi.BackupManagementType != nil {
1372 objectMap["backupManagementType"] = aisccvpi.BackupManagementType
1373 }
1374 if aisccvpi.WorkloadType != nil {
1375 objectMap["workloadType"] = aisccvpi.WorkloadType
1376 }
1377 if aisccvpi.FriendlyName != nil {
1378 objectMap["friendlyName"] = aisccvpi.FriendlyName
1379 }
1380 if aisccvpi.ProtectionState != "" {
1381 objectMap["protectionState"] = aisccvpi.ProtectionState
1382 }
1383 if aisccvpi.ProtectableItemType != "" {
1384 objectMap["protectableItemType"] = aisccvpi.ProtectableItemType
1385 }
1386 return json.Marshal(objectMap)
1387 }
1388
1389
1390 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
1391 return nil, false
1392 }
1393
1394
1395 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
1396 return &aisccvpi, true
1397 }
1398
1399
1400 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
1401 return nil, false
1402 }
1403
1404
1405 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
1406 return nil, false
1407 }
1408
1409
1410 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
1411 return nil, false
1412 }
1413
1414
1415 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
1416 return nil, false
1417 }
1418
1419
1420 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
1421 return nil, false
1422 }
1423
1424
1425 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
1426 return nil, false
1427 }
1428
1429
1430 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
1431 return nil, false
1432 }
1433
1434
1435 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
1436 return nil, false
1437 }
1438
1439
1440 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
1441 return nil, false
1442 }
1443
1444
1445 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
1446 return nil, false
1447 }
1448
1449
1450 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
1451 return &aisccvpi, true
1452 }
1453
1454
1455 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
1456 return nil, false
1457 }
1458
1459
1460 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
1461 return &aisccvpi, true
1462 }
1463
1464
1465
1466 type AzureIaaSClassicComputeVMProtectedItem struct {
1467
1468 FriendlyName *string `json:"friendlyName,omitempty"`
1469
1470 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1471
1472 ProtectionStatus *string `json:"protectionStatus,omitempty"`
1473
1474 ProtectionState ProtectionState `json:"protectionState,omitempty"`
1475
1476 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
1477
1478 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
1479
1480 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
1481
1482 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1483
1484 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1485
1486 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1487
1488 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1489 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
1490
1491 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1492
1493 WorkloadType DataSourceType `json:"workloadType,omitempty"`
1494
1495 ContainerName *string `json:"containerName,omitempty"`
1496
1497 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1498
1499 PolicyID *string `json:"policyId,omitempty"`
1500
1501 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
1502
1503 BackupSetName *string `json:"backupSetName,omitempty"`
1504
1505 CreateMode CreateMode `json:"createMode,omitempty"`
1506
1507 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
1508
1509 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
1510
1511 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
1512
1513 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
1514
1515 IsRehydrate *bool `json:"isRehydrate,omitempty"`
1516
1517 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
1518
1519 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
1520
1521 PolicyName *string `json:"policyName,omitempty"`
1522
1523 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
1524 }
1525
1526
1527 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
1528 aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines
1529 objectMap := make(map[string]interface{})
1530 if aisccvpi.FriendlyName != nil {
1531 objectMap["friendlyName"] = aisccvpi.FriendlyName
1532 }
1533 if aisccvpi.VirtualMachineID != nil {
1534 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
1535 }
1536 if aisccvpi.ProtectionStatus != nil {
1537 objectMap["protectionStatus"] = aisccvpi.ProtectionStatus
1538 }
1539 if aisccvpi.ProtectionState != "" {
1540 objectMap["protectionState"] = aisccvpi.ProtectionState
1541 }
1542 if aisccvpi.HealthStatus != "" {
1543 objectMap["healthStatus"] = aisccvpi.HealthStatus
1544 }
1545 if aisccvpi.HealthDetails != nil {
1546 objectMap["healthDetails"] = aisccvpi.HealthDetails
1547 }
1548 if aisccvpi.KpisHealths != nil {
1549 objectMap["kpisHealths"] = aisccvpi.KpisHealths
1550 }
1551 if aisccvpi.LastBackupStatus != nil {
1552 objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus
1553 }
1554 if aisccvpi.LastBackupTime != nil {
1555 objectMap["lastBackupTime"] = aisccvpi.LastBackupTime
1556 }
1557 if aisccvpi.ProtectedItemDataID != nil {
1558 objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID
1559 }
1560 if aisccvpi.ExtendedInfo != nil {
1561 objectMap["extendedInfo"] = aisccvpi.ExtendedInfo
1562 }
1563 if aisccvpi.ExtendedProperties != nil {
1564 objectMap["extendedProperties"] = aisccvpi.ExtendedProperties
1565 }
1566 if aisccvpi.BackupManagementType != "" {
1567 objectMap["backupManagementType"] = aisccvpi.BackupManagementType
1568 }
1569 if aisccvpi.WorkloadType != "" {
1570 objectMap["workloadType"] = aisccvpi.WorkloadType
1571 }
1572 if aisccvpi.ContainerName != nil {
1573 objectMap["containerName"] = aisccvpi.ContainerName
1574 }
1575 if aisccvpi.SourceResourceID != nil {
1576 objectMap["sourceResourceId"] = aisccvpi.SourceResourceID
1577 }
1578 if aisccvpi.PolicyID != nil {
1579 objectMap["policyId"] = aisccvpi.PolicyID
1580 }
1581 if aisccvpi.LastRecoveryPoint != nil {
1582 objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint
1583 }
1584 if aisccvpi.BackupSetName != nil {
1585 objectMap["backupSetName"] = aisccvpi.BackupSetName
1586 }
1587 if aisccvpi.CreateMode != "" {
1588 objectMap["createMode"] = aisccvpi.CreateMode
1589 }
1590 if aisccvpi.DeferredDeleteTimeInUTC != nil {
1591 objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC
1592 }
1593 if aisccvpi.IsScheduledForDeferredDelete != nil {
1594 objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete
1595 }
1596 if aisccvpi.DeferredDeleteTimeRemaining != nil {
1597 objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining
1598 }
1599 if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil {
1600 objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming
1601 }
1602 if aisccvpi.IsRehydrate != nil {
1603 objectMap["isRehydrate"] = aisccvpi.IsRehydrate
1604 }
1605 if aisccvpi.ResourceGuardOperationRequests != nil {
1606 objectMap["resourceGuardOperationRequests"] = aisccvpi.ResourceGuardOperationRequests
1607 }
1608 if aisccvpi.IsArchiveEnabled != nil {
1609 objectMap["isArchiveEnabled"] = aisccvpi.IsArchiveEnabled
1610 }
1611 if aisccvpi.PolicyName != nil {
1612 objectMap["policyName"] = aisccvpi.PolicyName
1613 }
1614 if aisccvpi.ProtectedItemType != "" {
1615 objectMap["protectedItemType"] = aisccvpi.ProtectedItemType
1616 }
1617 return json.Marshal(objectMap)
1618 }
1619
1620
1621 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
1622 return nil, false
1623 }
1624
1625
1626 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
1627 return &aisccvpi, true
1628 }
1629
1630
1631 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
1632 return nil, false
1633 }
1634
1635
1636 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
1637 return nil, false
1638 }
1639
1640
1641 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
1642 return &aisccvpi, true
1643 }
1644
1645
1646 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
1647 return nil, false
1648 }
1649
1650
1651 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
1652 return nil, false
1653 }
1654
1655
1656 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
1657 return nil, false
1658 }
1659
1660
1661 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
1662 return nil, false
1663 }
1664
1665
1666 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
1667 return nil, false
1668 }
1669
1670
1671 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
1672 return nil, false
1673 }
1674
1675
1676 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
1677 return nil, false
1678 }
1679
1680
1681 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
1682 return nil, false
1683 }
1684
1685
1686 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
1687 return nil, false
1688 }
1689
1690
1691 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
1692 return nil, false
1693 }
1694
1695
1696 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
1697 return &aisccvpi, true
1698 }
1699
1700
1701
1702 type AzureIaaSComputeVMContainer struct {
1703
1704 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1705
1706 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1707
1708 ResourceGroup *string `json:"resourceGroup,omitempty"`
1709
1710 FriendlyName *string `json:"friendlyName,omitempty"`
1711
1712 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1713
1714 RegistrationStatus *string `json:"registrationStatus,omitempty"`
1715
1716 HealthStatus *string `json:"healthStatus,omitempty"`
1717
1718 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
1719
1720 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
1721 }
1722
1723
1724 func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) {
1725 aiscvc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines
1726 objectMap := make(map[string]interface{})
1727 if aiscvc.VirtualMachineID != nil {
1728 objectMap["virtualMachineId"] = aiscvc.VirtualMachineID
1729 }
1730 if aiscvc.VirtualMachineVersion != nil {
1731 objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion
1732 }
1733 if aiscvc.ResourceGroup != nil {
1734 objectMap["resourceGroup"] = aiscvc.ResourceGroup
1735 }
1736 if aiscvc.FriendlyName != nil {
1737 objectMap["friendlyName"] = aiscvc.FriendlyName
1738 }
1739 if aiscvc.BackupManagementType != "" {
1740 objectMap["backupManagementType"] = aiscvc.BackupManagementType
1741 }
1742 if aiscvc.RegistrationStatus != nil {
1743 objectMap["registrationStatus"] = aiscvc.RegistrationStatus
1744 }
1745 if aiscvc.HealthStatus != nil {
1746 objectMap["healthStatus"] = aiscvc.HealthStatus
1747 }
1748 if aiscvc.ProtectableObjectType != nil {
1749 objectMap["protectableObjectType"] = aiscvc.ProtectableObjectType
1750 }
1751 if aiscvc.ContainerType != "" {
1752 objectMap["containerType"] = aiscvc.ContainerType
1753 }
1754 return json.Marshal(objectMap)
1755 }
1756
1757
1758 func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
1759 return nil, false
1760 }
1761
1762
1763 func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
1764 return nil, false
1765 }
1766
1767
1768 func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
1769 return &aiscvc, true
1770 }
1771
1772
1773 func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
1774 return nil, false
1775 }
1776
1777
1778 func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
1779 return nil, false
1780 }
1781
1782
1783 func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
1784 return nil, false
1785 }
1786
1787
1788 func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
1789 return nil, false
1790 }
1791
1792
1793 func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
1794 return nil, false
1795 }
1796
1797
1798 func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
1799 return nil, false
1800 }
1801
1802
1803 func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
1804 return nil, false
1805 }
1806
1807
1808 func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
1809 return nil, false
1810 }
1811
1812
1813 func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
1814 return nil, false
1815 }
1816
1817
1818 func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
1819 return nil, false
1820 }
1821
1822
1823 func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
1824 return &aiscvc, true
1825 }
1826
1827
1828 func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
1829 return nil, false
1830 }
1831
1832
1833 func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
1834 return nil, false
1835 }
1836
1837
1838 func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
1839 return &aiscvc, true
1840 }
1841
1842
1843
1844 type AzureIaaSComputeVMProtectableItem struct {
1845
1846 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1847
1848 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1849
1850 ResourceGroup *string `json:"resourceGroup,omitempty"`
1851
1852 BackupManagementType *string `json:"backupManagementType,omitempty"`
1853
1854 WorkloadType *string `json:"workloadType,omitempty"`
1855
1856 FriendlyName *string `json:"friendlyName,omitempty"`
1857
1858 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
1859
1860 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
1861 }
1862
1863
1864 func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
1865 aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines
1866 objectMap := make(map[string]interface{})
1867 if aiscvpi.VirtualMachineID != nil {
1868 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
1869 }
1870 if aiscvpi.VirtualMachineVersion != nil {
1871 objectMap["virtualMachineVersion"] = aiscvpi.VirtualMachineVersion
1872 }
1873 if aiscvpi.ResourceGroup != nil {
1874 objectMap["resourceGroup"] = aiscvpi.ResourceGroup
1875 }
1876 if aiscvpi.BackupManagementType != nil {
1877 objectMap["backupManagementType"] = aiscvpi.BackupManagementType
1878 }
1879 if aiscvpi.WorkloadType != nil {
1880 objectMap["workloadType"] = aiscvpi.WorkloadType
1881 }
1882 if aiscvpi.FriendlyName != nil {
1883 objectMap["friendlyName"] = aiscvpi.FriendlyName
1884 }
1885 if aiscvpi.ProtectionState != "" {
1886 objectMap["protectionState"] = aiscvpi.ProtectionState
1887 }
1888 if aiscvpi.ProtectableItemType != "" {
1889 objectMap["protectableItemType"] = aiscvpi.ProtectableItemType
1890 }
1891 return json.Marshal(objectMap)
1892 }
1893
1894
1895 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
1896 return nil, false
1897 }
1898
1899
1900 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
1901 return nil, false
1902 }
1903
1904
1905 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
1906 return &aiscvpi, true
1907 }
1908
1909
1910 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
1911 return nil, false
1912 }
1913
1914
1915 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
1916 return nil, false
1917 }
1918
1919
1920 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
1921 return nil, false
1922 }
1923
1924
1925 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
1926 return nil, false
1927 }
1928
1929
1930 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
1931 return nil, false
1932 }
1933
1934
1935 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
1936 return nil, false
1937 }
1938
1939
1940 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
1941 return nil, false
1942 }
1943
1944
1945 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
1946 return nil, false
1947 }
1948
1949
1950 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
1951 return nil, false
1952 }
1953
1954
1955 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
1956 return &aiscvpi, true
1957 }
1958
1959
1960 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
1961 return nil, false
1962 }
1963
1964
1965 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
1966 return &aiscvpi, true
1967 }
1968
1969
1970
1971 type AzureIaaSComputeVMProtectedItem struct {
1972
1973 FriendlyName *string `json:"friendlyName,omitempty"`
1974
1975 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1976
1977 ProtectionStatus *string `json:"protectionStatus,omitempty"`
1978
1979 ProtectionState ProtectionState `json:"protectionState,omitempty"`
1980
1981 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
1982
1983 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
1984
1985 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
1986
1987 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1988
1989 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1990
1991 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1992
1993 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1994 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
1995
1996 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1997
1998 WorkloadType DataSourceType `json:"workloadType,omitempty"`
1999
2000 ContainerName *string `json:"containerName,omitempty"`
2001
2002 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2003
2004 PolicyID *string `json:"policyId,omitempty"`
2005
2006 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
2007
2008 BackupSetName *string `json:"backupSetName,omitempty"`
2009
2010 CreateMode CreateMode `json:"createMode,omitempty"`
2011
2012 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
2013
2014 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
2015
2016 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
2017
2018 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
2019
2020 IsRehydrate *bool `json:"isRehydrate,omitempty"`
2021
2022 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
2023
2024 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
2025
2026 PolicyName *string `json:"policyName,omitempty"`
2027
2028 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
2029 }
2030
2031
2032 func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
2033 aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines
2034 objectMap := make(map[string]interface{})
2035 if aiscvpi.FriendlyName != nil {
2036 objectMap["friendlyName"] = aiscvpi.FriendlyName
2037 }
2038 if aiscvpi.VirtualMachineID != nil {
2039 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
2040 }
2041 if aiscvpi.ProtectionStatus != nil {
2042 objectMap["protectionStatus"] = aiscvpi.ProtectionStatus
2043 }
2044 if aiscvpi.ProtectionState != "" {
2045 objectMap["protectionState"] = aiscvpi.ProtectionState
2046 }
2047 if aiscvpi.HealthStatus != "" {
2048 objectMap["healthStatus"] = aiscvpi.HealthStatus
2049 }
2050 if aiscvpi.HealthDetails != nil {
2051 objectMap["healthDetails"] = aiscvpi.HealthDetails
2052 }
2053 if aiscvpi.KpisHealths != nil {
2054 objectMap["kpisHealths"] = aiscvpi.KpisHealths
2055 }
2056 if aiscvpi.LastBackupStatus != nil {
2057 objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus
2058 }
2059 if aiscvpi.LastBackupTime != nil {
2060 objectMap["lastBackupTime"] = aiscvpi.LastBackupTime
2061 }
2062 if aiscvpi.ProtectedItemDataID != nil {
2063 objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID
2064 }
2065 if aiscvpi.ExtendedInfo != nil {
2066 objectMap["extendedInfo"] = aiscvpi.ExtendedInfo
2067 }
2068 if aiscvpi.ExtendedProperties != nil {
2069 objectMap["extendedProperties"] = aiscvpi.ExtendedProperties
2070 }
2071 if aiscvpi.BackupManagementType != "" {
2072 objectMap["backupManagementType"] = aiscvpi.BackupManagementType
2073 }
2074 if aiscvpi.WorkloadType != "" {
2075 objectMap["workloadType"] = aiscvpi.WorkloadType
2076 }
2077 if aiscvpi.ContainerName != nil {
2078 objectMap["containerName"] = aiscvpi.ContainerName
2079 }
2080 if aiscvpi.SourceResourceID != nil {
2081 objectMap["sourceResourceId"] = aiscvpi.SourceResourceID
2082 }
2083 if aiscvpi.PolicyID != nil {
2084 objectMap["policyId"] = aiscvpi.PolicyID
2085 }
2086 if aiscvpi.LastRecoveryPoint != nil {
2087 objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint
2088 }
2089 if aiscvpi.BackupSetName != nil {
2090 objectMap["backupSetName"] = aiscvpi.BackupSetName
2091 }
2092 if aiscvpi.CreateMode != "" {
2093 objectMap["createMode"] = aiscvpi.CreateMode
2094 }
2095 if aiscvpi.DeferredDeleteTimeInUTC != nil {
2096 objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC
2097 }
2098 if aiscvpi.IsScheduledForDeferredDelete != nil {
2099 objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete
2100 }
2101 if aiscvpi.DeferredDeleteTimeRemaining != nil {
2102 objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining
2103 }
2104 if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil {
2105 objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming
2106 }
2107 if aiscvpi.IsRehydrate != nil {
2108 objectMap["isRehydrate"] = aiscvpi.IsRehydrate
2109 }
2110 if aiscvpi.ResourceGuardOperationRequests != nil {
2111 objectMap["resourceGuardOperationRequests"] = aiscvpi.ResourceGuardOperationRequests
2112 }
2113 if aiscvpi.IsArchiveEnabled != nil {
2114 objectMap["isArchiveEnabled"] = aiscvpi.IsArchiveEnabled
2115 }
2116 if aiscvpi.PolicyName != nil {
2117 objectMap["policyName"] = aiscvpi.PolicyName
2118 }
2119 if aiscvpi.ProtectedItemType != "" {
2120 objectMap["protectedItemType"] = aiscvpi.ProtectedItemType
2121 }
2122 return json.Marshal(objectMap)
2123 }
2124
2125
2126 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
2127 return nil, false
2128 }
2129
2130
2131 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
2132 return nil, false
2133 }
2134
2135
2136 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
2137 return &aiscvpi, true
2138 }
2139
2140
2141 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
2142 return nil, false
2143 }
2144
2145
2146 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
2147 return &aiscvpi, true
2148 }
2149
2150
2151 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
2152 return nil, false
2153 }
2154
2155
2156 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2157 return nil, false
2158 }
2159
2160
2161 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2162 return nil, false
2163 }
2164
2165
2166 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2167 return nil, false
2168 }
2169
2170
2171 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2172 return nil, false
2173 }
2174
2175
2176 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2177 return nil, false
2178 }
2179
2180
2181 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2182 return nil, false
2183 }
2184
2185
2186 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2187 return nil, false
2188 }
2189
2190
2191 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2192 return nil, false
2193 }
2194
2195
2196 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2197 return nil, false
2198 }
2199
2200
2201 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2202 return &aiscvpi, true
2203 }
2204
2205
2206 type AzureIaaSVMErrorInfo struct {
2207
2208 ErrorCode *int32 `json:"errorCode,omitempty"`
2209
2210 ErrorTitle *string `json:"errorTitle,omitempty"`
2211
2212 ErrorString *string `json:"errorString,omitempty"`
2213
2214 Recommendations *[]string `json:"recommendations,omitempty"`
2215 }
2216
2217
2218 func (aisei AzureIaaSVMErrorInfo) MarshalJSON() ([]byte, error) {
2219 objectMap := make(map[string]interface{})
2220 return json.Marshal(objectMap)
2221 }
2222
2223
2224 type AzureIaaSVMHealthDetails struct {
2225
2226 Code *int32 `json:"code,omitempty"`
2227
2228 Title *string `json:"title,omitempty"`
2229
2230 Message *string `json:"message,omitempty"`
2231
2232 Recommendations *[]string `json:"recommendations,omitempty"`
2233 }
2234
2235
2236 func (aishd AzureIaaSVMHealthDetails) MarshalJSON() ([]byte, error) {
2237 objectMap := make(map[string]interface{})
2238 return json.Marshal(objectMap)
2239 }
2240
2241
2242 type AzureIaaSVMJob struct {
2243
2244 Duration *string `json:"duration,omitempty"`
2245
2246 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
2247
2248 ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"`
2249
2250 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
2251
2252 ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"`
2253
2254 ContainerName *string `json:"containerName,omitempty"`
2255
2256 IsUserTriggered *bool `json:"isUserTriggered,omitempty"`
2257
2258 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
2259
2260 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2261
2262 Operation *string `json:"operation,omitempty"`
2263
2264 Status *string `json:"status,omitempty"`
2265
2266 StartTime *date.Time `json:"startTime,omitempty"`
2267
2268 EndTime *date.Time `json:"endTime,omitempty"`
2269
2270 ActivityID *string `json:"activityId,omitempty"`
2271
2272 JobType JobType `json:"jobType,omitempty"`
2273 }
2274
2275
2276 func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) {
2277 aisj.JobType = JobTypeAzureIaaSVMJob
2278 objectMap := make(map[string]interface{})
2279 if aisj.Duration != nil {
2280 objectMap["duration"] = aisj.Duration
2281 }
2282 if aisj.ActionsInfo != nil {
2283 objectMap["actionsInfo"] = aisj.ActionsInfo
2284 }
2285 if aisj.ErrorDetails != nil {
2286 objectMap["errorDetails"] = aisj.ErrorDetails
2287 }
2288 if aisj.VirtualMachineVersion != nil {
2289 objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion
2290 }
2291 if aisj.ExtendedInfo != nil {
2292 objectMap["extendedInfo"] = aisj.ExtendedInfo
2293 }
2294 if aisj.ContainerName != nil {
2295 objectMap["containerName"] = aisj.ContainerName
2296 }
2297 if aisj.IsUserTriggered != nil {
2298 objectMap["isUserTriggered"] = aisj.IsUserTriggered
2299 }
2300 if aisj.EntityFriendlyName != nil {
2301 objectMap["entityFriendlyName"] = aisj.EntityFriendlyName
2302 }
2303 if aisj.BackupManagementType != "" {
2304 objectMap["backupManagementType"] = aisj.BackupManagementType
2305 }
2306 if aisj.Operation != nil {
2307 objectMap["operation"] = aisj.Operation
2308 }
2309 if aisj.Status != nil {
2310 objectMap["status"] = aisj.Status
2311 }
2312 if aisj.StartTime != nil {
2313 objectMap["startTime"] = aisj.StartTime
2314 }
2315 if aisj.EndTime != nil {
2316 objectMap["endTime"] = aisj.EndTime
2317 }
2318 if aisj.ActivityID != nil {
2319 objectMap["activityId"] = aisj.ActivityID
2320 }
2321 if aisj.JobType != "" {
2322 objectMap["jobType"] = aisj.JobType
2323 }
2324 return json.Marshal(objectMap)
2325 }
2326
2327
2328 func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
2329 return &aisj, true
2330 }
2331
2332
2333 func (aisj AzureIaaSVMJob) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
2334 return nil, false
2335 }
2336
2337
2338 func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
2339 return nil, false
2340 }
2341
2342
2343 func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
2344 return nil, false
2345 }
2346
2347
2348 func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) {
2349 return nil, false
2350 }
2351
2352
2353 func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) {
2354 return nil, false
2355 }
2356
2357
2358 func (aisj AzureIaaSVMJob) AsVaultJob() (*VaultJob, bool) {
2359 return nil, false
2360 }
2361
2362
2363 func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) {
2364 return nil, false
2365 }
2366
2367
2368 func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) {
2369 return &aisj, true
2370 }
2371
2372
2373 type AzureIaaSVMJobExtendedInfo struct {
2374
2375 TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"`
2376
2377 PropertyBag map[string]*string `json:"propertyBag"`
2378
2379 InternalPropertyBag map[string]*string `json:"internalPropertyBag"`
2380
2381 ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2382
2383 EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"`
2384
2385 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
2386 }
2387
2388
2389 func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) {
2390 objectMap := make(map[string]interface{})
2391 if aisjei.TasksList != nil {
2392 objectMap["tasksList"] = aisjei.TasksList
2393 }
2394 if aisjei.PropertyBag != nil {
2395 objectMap["propertyBag"] = aisjei.PropertyBag
2396 }
2397 if aisjei.InternalPropertyBag != nil {
2398 objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag
2399 }
2400 if aisjei.ProgressPercentage != nil {
2401 objectMap["progressPercentage"] = aisjei.ProgressPercentage
2402 }
2403 if aisjei.EstimatedRemainingDuration != nil {
2404 objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration
2405 }
2406 if aisjei.DynamicErrorMessage != nil {
2407 objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage
2408 }
2409 return json.Marshal(objectMap)
2410 }
2411
2412
2413 type AzureIaaSVMJobTaskDetails struct {
2414
2415 TaskID *string `json:"taskId,omitempty"`
2416
2417 StartTime *date.Time `json:"startTime,omitempty"`
2418
2419 EndTime *date.Time `json:"endTime,omitempty"`
2420
2421 InstanceID *string `json:"instanceId,omitempty"`
2422
2423 Duration *string `json:"duration,omitempty"`
2424
2425 Status *string `json:"status,omitempty"`
2426
2427 ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2428
2429
2430 TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"`
2431 }
2432
2433
2434 type AzureIaaSVMJobV2 struct {
2435
2436 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
2437
2438 ContainerName *string `json:"containerName,omitempty"`
2439
2440 Duration *string `json:"duration,omitempty"`
2441
2442 ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"`
2443
2444 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
2445
2446 ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"`
2447
2448 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
2449
2450 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2451
2452 Operation *string `json:"operation,omitempty"`
2453
2454 Status *string `json:"status,omitempty"`
2455
2456 StartTime *date.Time `json:"startTime,omitempty"`
2457
2458 EndTime *date.Time `json:"endTime,omitempty"`
2459
2460 ActivityID *string `json:"activityId,omitempty"`
2461
2462 JobType JobType `json:"jobType,omitempty"`
2463 }
2464
2465
2466 func (aisjv AzureIaaSVMJobV2) MarshalJSON() ([]byte, error) {
2467 aisjv.JobType = JobTypeAzureIaaSVMJobV2
2468 objectMap := make(map[string]interface{})
2469 if aisjv.ActionsInfo != nil {
2470 objectMap["actionsInfo"] = aisjv.ActionsInfo
2471 }
2472 if aisjv.ContainerName != nil {
2473 objectMap["containerName"] = aisjv.ContainerName
2474 }
2475 if aisjv.Duration != nil {
2476 objectMap["duration"] = aisjv.Duration
2477 }
2478 if aisjv.ErrorDetails != nil {
2479 objectMap["errorDetails"] = aisjv.ErrorDetails
2480 }
2481 if aisjv.VirtualMachineVersion != nil {
2482 objectMap["virtualMachineVersion"] = aisjv.VirtualMachineVersion
2483 }
2484 if aisjv.ExtendedInfo != nil {
2485 objectMap["extendedInfo"] = aisjv.ExtendedInfo
2486 }
2487 if aisjv.EntityFriendlyName != nil {
2488 objectMap["entityFriendlyName"] = aisjv.EntityFriendlyName
2489 }
2490 if aisjv.BackupManagementType != "" {
2491 objectMap["backupManagementType"] = aisjv.BackupManagementType
2492 }
2493 if aisjv.Operation != nil {
2494 objectMap["operation"] = aisjv.Operation
2495 }
2496 if aisjv.Status != nil {
2497 objectMap["status"] = aisjv.Status
2498 }
2499 if aisjv.StartTime != nil {
2500 objectMap["startTime"] = aisjv.StartTime
2501 }
2502 if aisjv.EndTime != nil {
2503 objectMap["endTime"] = aisjv.EndTime
2504 }
2505 if aisjv.ActivityID != nil {
2506 objectMap["activityId"] = aisjv.ActivityID
2507 }
2508 if aisjv.JobType != "" {
2509 objectMap["jobType"] = aisjv.JobType
2510 }
2511 return json.Marshal(objectMap)
2512 }
2513
2514
2515 func (aisjv AzureIaaSVMJobV2) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
2516 return nil, false
2517 }
2518
2519
2520 func (aisjv AzureIaaSVMJobV2) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
2521 return &aisjv, true
2522 }
2523
2524
2525 func (aisjv AzureIaaSVMJobV2) AsAzureStorageJob() (*AzureStorageJob, bool) {
2526 return nil, false
2527 }
2528
2529
2530 func (aisjv AzureIaaSVMJobV2) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
2531 return nil, false
2532 }
2533
2534
2535 func (aisjv AzureIaaSVMJobV2) AsDpmJob() (*DpmJob, bool) {
2536 return nil, false
2537 }
2538
2539
2540 func (aisjv AzureIaaSVMJobV2) AsMabJob() (*MabJob, bool) {
2541 return nil, false
2542 }
2543
2544
2545 func (aisjv AzureIaaSVMJobV2) AsVaultJob() (*VaultJob, bool) {
2546 return nil, false
2547 }
2548
2549
2550 func (aisjv AzureIaaSVMJobV2) AsJob() (*Job, bool) {
2551 return nil, false
2552 }
2553
2554
2555 func (aisjv AzureIaaSVMJobV2) AsBasicJob() (BasicJob, bool) {
2556 return &aisjv, true
2557 }
2558
2559
2560 type BasicAzureIaaSVMProtectedItem interface {
2561 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
2562 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
2563 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
2564 }
2565
2566
2567 type AzureIaaSVMProtectedItem struct {
2568
2569 FriendlyName *string `json:"friendlyName,omitempty"`
2570
2571 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
2572
2573 ProtectionStatus *string `json:"protectionStatus,omitempty"`
2574
2575 ProtectionState ProtectionState `json:"protectionState,omitempty"`
2576
2577 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
2578
2579 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
2580
2581 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
2582
2583 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
2584
2585 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
2586
2587 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
2588
2589 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
2590 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
2591
2592 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2593
2594 WorkloadType DataSourceType `json:"workloadType,omitempty"`
2595
2596 ContainerName *string `json:"containerName,omitempty"`
2597
2598 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2599
2600 PolicyID *string `json:"policyId,omitempty"`
2601
2602 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
2603
2604 BackupSetName *string `json:"backupSetName,omitempty"`
2605
2606 CreateMode CreateMode `json:"createMode,omitempty"`
2607
2608 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
2609
2610 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
2611
2612 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
2613
2614 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
2615
2616 IsRehydrate *bool `json:"isRehydrate,omitempty"`
2617
2618 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
2619
2620 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
2621
2622 PolicyName *string `json:"policyName,omitempty"`
2623
2624 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
2625 }
2626
2627 func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) {
2628 var m map[string]interface{}
2629 err := json.Unmarshal(body, &m)
2630 if err != nil {
2631 return nil, err
2632 }
2633
2634 switch m["protectedItemType"] {
2635 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
2636 var aisccvpi AzureIaaSClassicComputeVMProtectedItem
2637 err := json.Unmarshal(body, &aisccvpi)
2638 return aisccvpi, err
2639 case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
2640 var aiscvpi AzureIaaSComputeVMProtectedItem
2641 err := json.Unmarshal(body, &aiscvpi)
2642 return aiscvpi, err
2643 default:
2644 var aispi AzureIaaSVMProtectedItem
2645 err := json.Unmarshal(body, &aispi)
2646 return aispi, err
2647 }
2648 }
2649 func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) {
2650 var rawMessages []*json.RawMessage
2651 err := json.Unmarshal(body, &rawMessages)
2652 if err != nil {
2653 return nil, err
2654 }
2655
2656 aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages))
2657
2658 for index, rawMessage := range rawMessages {
2659 aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage)
2660 if err != nil {
2661 return nil, err
2662 }
2663 aispiArray[index] = aispi
2664 }
2665 return aispiArray, nil
2666 }
2667
2668
2669 func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) {
2670 aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem
2671 objectMap := make(map[string]interface{})
2672 if aispi.FriendlyName != nil {
2673 objectMap["friendlyName"] = aispi.FriendlyName
2674 }
2675 if aispi.VirtualMachineID != nil {
2676 objectMap["virtualMachineId"] = aispi.VirtualMachineID
2677 }
2678 if aispi.ProtectionStatus != nil {
2679 objectMap["protectionStatus"] = aispi.ProtectionStatus
2680 }
2681 if aispi.ProtectionState != "" {
2682 objectMap["protectionState"] = aispi.ProtectionState
2683 }
2684 if aispi.HealthStatus != "" {
2685 objectMap["healthStatus"] = aispi.HealthStatus
2686 }
2687 if aispi.HealthDetails != nil {
2688 objectMap["healthDetails"] = aispi.HealthDetails
2689 }
2690 if aispi.KpisHealths != nil {
2691 objectMap["kpisHealths"] = aispi.KpisHealths
2692 }
2693 if aispi.LastBackupStatus != nil {
2694 objectMap["lastBackupStatus"] = aispi.LastBackupStatus
2695 }
2696 if aispi.LastBackupTime != nil {
2697 objectMap["lastBackupTime"] = aispi.LastBackupTime
2698 }
2699 if aispi.ProtectedItemDataID != nil {
2700 objectMap["protectedItemDataId"] = aispi.ProtectedItemDataID
2701 }
2702 if aispi.ExtendedInfo != nil {
2703 objectMap["extendedInfo"] = aispi.ExtendedInfo
2704 }
2705 if aispi.ExtendedProperties != nil {
2706 objectMap["extendedProperties"] = aispi.ExtendedProperties
2707 }
2708 if aispi.BackupManagementType != "" {
2709 objectMap["backupManagementType"] = aispi.BackupManagementType
2710 }
2711 if aispi.WorkloadType != "" {
2712 objectMap["workloadType"] = aispi.WorkloadType
2713 }
2714 if aispi.ContainerName != nil {
2715 objectMap["containerName"] = aispi.ContainerName
2716 }
2717 if aispi.SourceResourceID != nil {
2718 objectMap["sourceResourceId"] = aispi.SourceResourceID
2719 }
2720 if aispi.PolicyID != nil {
2721 objectMap["policyId"] = aispi.PolicyID
2722 }
2723 if aispi.LastRecoveryPoint != nil {
2724 objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint
2725 }
2726 if aispi.BackupSetName != nil {
2727 objectMap["backupSetName"] = aispi.BackupSetName
2728 }
2729 if aispi.CreateMode != "" {
2730 objectMap["createMode"] = aispi.CreateMode
2731 }
2732 if aispi.DeferredDeleteTimeInUTC != nil {
2733 objectMap["deferredDeleteTimeInUTC"] = aispi.DeferredDeleteTimeInUTC
2734 }
2735 if aispi.IsScheduledForDeferredDelete != nil {
2736 objectMap["isScheduledForDeferredDelete"] = aispi.IsScheduledForDeferredDelete
2737 }
2738 if aispi.DeferredDeleteTimeRemaining != nil {
2739 objectMap["deferredDeleteTimeRemaining"] = aispi.DeferredDeleteTimeRemaining
2740 }
2741 if aispi.IsDeferredDeleteScheduleUpcoming != nil {
2742 objectMap["isDeferredDeleteScheduleUpcoming"] = aispi.IsDeferredDeleteScheduleUpcoming
2743 }
2744 if aispi.IsRehydrate != nil {
2745 objectMap["isRehydrate"] = aispi.IsRehydrate
2746 }
2747 if aispi.ResourceGuardOperationRequests != nil {
2748 objectMap["resourceGuardOperationRequests"] = aispi.ResourceGuardOperationRequests
2749 }
2750 if aispi.IsArchiveEnabled != nil {
2751 objectMap["isArchiveEnabled"] = aispi.IsArchiveEnabled
2752 }
2753 if aispi.PolicyName != nil {
2754 objectMap["policyName"] = aispi.PolicyName
2755 }
2756 if aispi.ProtectedItemType != "" {
2757 objectMap["protectedItemType"] = aispi.ProtectedItemType
2758 }
2759 return json.Marshal(objectMap)
2760 }
2761
2762
2763 func (aispi AzureIaaSVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
2764 return nil, false
2765 }
2766
2767
2768 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
2769 return nil, false
2770 }
2771
2772
2773 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
2774 return nil, false
2775 }
2776
2777
2778 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
2779 return &aispi, true
2780 }
2781
2782
2783 func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
2784 return &aispi, true
2785 }
2786
2787
2788 func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
2789 return nil, false
2790 }
2791
2792
2793 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2794 return nil, false
2795 }
2796
2797
2798 func (aispi AzureIaaSVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2799 return nil, false
2800 }
2801
2802
2803 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2804 return nil, false
2805 }
2806
2807
2808 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2809 return nil, false
2810 }
2811
2812
2813 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2814 return nil, false
2815 }
2816
2817
2818 func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2819 return nil, false
2820 }
2821
2822
2823 func (aispi AzureIaaSVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2824 return nil, false
2825 }
2826
2827
2828 func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2829 return nil, false
2830 }
2831
2832
2833 func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2834 return nil, false
2835 }
2836
2837
2838 func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2839 return &aispi, true
2840 }
2841
2842
2843 type AzureIaaSVMProtectedItemExtendedInfo struct {
2844
2845 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
2846
2847 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
2848
2849 PolicyInconsistent *bool `json:"policyInconsistent,omitempty"`
2850 }
2851
2852
2853 type AzureIaaSVMProtectionPolicy struct {
2854 InstantRPDetails *InstantRPAdditionalDetails `json:"instantRPDetails,omitempty"`
2855
2856 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
2857
2858 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
2859
2860 InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"`
2861
2862 TimeZone *string `json:"timeZone,omitempty"`
2863
2864 PolicyType IAASVMPolicyType `json:"policyType,omitempty"`
2865
2866 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
2867
2868 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
2869
2870 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
2871 }
2872
2873
2874 func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) {
2875 aispp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM
2876 objectMap := make(map[string]interface{})
2877 if aispp.InstantRPDetails != nil {
2878 objectMap["instantRPDetails"] = aispp.InstantRPDetails
2879 }
2880 objectMap["schedulePolicy"] = aispp.SchedulePolicy
2881 objectMap["retentionPolicy"] = aispp.RetentionPolicy
2882 if aispp.InstantRpRetentionRangeInDays != nil {
2883 objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays
2884 }
2885 if aispp.TimeZone != nil {
2886 objectMap["timeZone"] = aispp.TimeZone
2887 }
2888 if aispp.PolicyType != "" {
2889 objectMap["policyType"] = aispp.PolicyType
2890 }
2891 if aispp.ProtectedItemsCount != nil {
2892 objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount
2893 }
2894 if aispp.ResourceGuardOperationRequests != nil {
2895 objectMap["resourceGuardOperationRequests"] = aispp.ResourceGuardOperationRequests
2896 }
2897 if aispp.BackupManagementType != "" {
2898 objectMap["backupManagementType"] = aispp.BackupManagementType
2899 }
2900 return json.Marshal(objectMap)
2901 }
2902
2903
2904 func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
2905 return nil, false
2906 }
2907
2908
2909 func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
2910 return nil, false
2911 }
2912
2913
2914 func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
2915 return &aispp, true
2916 }
2917
2918
2919 func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
2920 return nil, false
2921 }
2922
2923
2924 func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
2925 return nil, false
2926 }
2927
2928
2929 func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
2930 return nil, false
2931 }
2932
2933
2934 func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
2935 return nil, false
2936 }
2937
2938
2939 func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
2940 return &aispp, true
2941 }
2942
2943
2944 func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error {
2945 var m map[string]*json.RawMessage
2946 err := json.Unmarshal(body, &m)
2947 if err != nil {
2948 return err
2949 }
2950 for k, v := range m {
2951 switch k {
2952 case "instantRPDetails":
2953 if v != nil {
2954 var instantRPDetails InstantRPAdditionalDetails
2955 err = json.Unmarshal(*v, &instantRPDetails)
2956 if err != nil {
2957 return err
2958 }
2959 aispp.InstantRPDetails = &instantRPDetails
2960 }
2961 case "schedulePolicy":
2962 if v != nil {
2963 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
2964 if err != nil {
2965 return err
2966 }
2967 aispp.SchedulePolicy = schedulePolicy
2968 }
2969 case "retentionPolicy":
2970 if v != nil {
2971 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
2972 if err != nil {
2973 return err
2974 }
2975 aispp.RetentionPolicy = retentionPolicy
2976 }
2977 case "instantRpRetentionRangeInDays":
2978 if v != nil {
2979 var instantRpRetentionRangeInDays int32
2980 err = json.Unmarshal(*v, &instantRpRetentionRangeInDays)
2981 if err != nil {
2982 return err
2983 }
2984 aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays
2985 }
2986 case "timeZone":
2987 if v != nil {
2988 var timeZone string
2989 err = json.Unmarshal(*v, &timeZone)
2990 if err != nil {
2991 return err
2992 }
2993 aispp.TimeZone = &timeZone
2994 }
2995 case "policyType":
2996 if v != nil {
2997 var policyType IAASVMPolicyType
2998 err = json.Unmarshal(*v, &policyType)
2999 if err != nil {
3000 return err
3001 }
3002 aispp.PolicyType = policyType
3003 }
3004 case "protectedItemsCount":
3005 if v != nil {
3006 var protectedItemsCount int32
3007 err = json.Unmarshal(*v, &protectedItemsCount)
3008 if err != nil {
3009 return err
3010 }
3011 aispp.ProtectedItemsCount = &protectedItemsCount
3012 }
3013 case "resourceGuardOperationRequests":
3014 if v != nil {
3015 var resourceGuardOperationRequests []string
3016 err = json.Unmarshal(*v, &resourceGuardOperationRequests)
3017 if err != nil {
3018 return err
3019 }
3020 aispp.ResourceGuardOperationRequests = &resourceGuardOperationRequests
3021 }
3022 case "backupManagementType":
3023 if v != nil {
3024 var backupManagementType ManagementTypeBasicProtectionPolicy
3025 err = json.Unmarshal(*v, &backupManagementType)
3026 if err != nil {
3027 return err
3028 }
3029 aispp.BackupManagementType = backupManagementType
3030 }
3031 }
3032 }
3033
3034 return nil
3035 }
3036
3037
3038 type BasicAzureRecoveryServiceVaultProtectionIntent interface {
3039 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
3040 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
3041 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
3042 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
3043 }
3044
3045
3046 type AzureRecoveryServiceVaultProtectionIntent struct {
3047
3048 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3049
3050 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3051
3052 ItemID *string `json:"itemId,omitempty"`
3053
3054 PolicyID *string `json:"policyId,omitempty"`
3055
3056 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
3057
3058 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
3059 }
3060
3061 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) {
3062 var m map[string]interface{}
3063 err := json.Unmarshal(body, &m)
3064 if err != nil {
3065 return nil, err
3066 }
3067
3068 switch m["protectionIntentItemType"] {
3069 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
3070 var awapi AzureWorkloadAutoProtectionIntent
3071 err := json.Unmarshal(body, &awapi)
3072 return awapi, err
3073 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
3074 var awsapi AzureWorkloadSQLAutoProtectionIntent
3075 err := json.Unmarshal(body, &awsapi)
3076 return awsapi, err
3077 default:
3078 var arsvpi AzureRecoveryServiceVaultProtectionIntent
3079 err := json.Unmarshal(body, &arsvpi)
3080 return arsvpi, err
3081 }
3082 }
3083 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) {
3084 var rawMessages []*json.RawMessage
3085 err := json.Unmarshal(body, &rawMessages)
3086 if err != nil {
3087 return nil, err
3088 }
3089
3090 arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages))
3091
3092 for index, rawMessage := range rawMessages {
3093 arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage)
3094 if err != nil {
3095 return nil, err
3096 }
3097 arsvpiArray[index] = arsvpi
3098 }
3099 return arsvpiArray, nil
3100 }
3101
3102
3103 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) {
3104 arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem
3105 objectMap := make(map[string]interface{})
3106 if arsvpi.BackupManagementType != "" {
3107 objectMap["backupManagementType"] = arsvpi.BackupManagementType
3108 }
3109 if arsvpi.SourceResourceID != nil {
3110 objectMap["sourceResourceId"] = arsvpi.SourceResourceID
3111 }
3112 if arsvpi.ItemID != nil {
3113 objectMap["itemId"] = arsvpi.ItemID
3114 }
3115 if arsvpi.PolicyID != nil {
3116 objectMap["policyId"] = arsvpi.PolicyID
3117 }
3118 if arsvpi.ProtectionState != "" {
3119 objectMap["protectionState"] = arsvpi.ProtectionState
3120 }
3121 if arsvpi.ProtectionIntentItemType != "" {
3122 objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType
3123 }
3124 return json.Marshal(objectMap)
3125 }
3126
3127
3128 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
3129 return &arsvpi, true
3130 }
3131
3132
3133 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
3134 return &arsvpi, true
3135 }
3136
3137
3138 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
3139 return nil, false
3140 }
3141
3142
3143 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
3144 return nil, false
3145 }
3146
3147
3148 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
3149 return nil, false
3150 }
3151
3152
3153 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
3154 return nil, false
3155 }
3156
3157
3158 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
3159 return nil, false
3160 }
3161
3162
3163 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
3164 return nil, false
3165 }
3166
3167
3168 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
3169 return &arsvpi, true
3170 }
3171
3172
3173 type AzureResourceProtectionIntent struct {
3174
3175 FriendlyName *string `json:"friendlyName,omitempty"`
3176
3177 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3178
3179 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3180
3181 ItemID *string `json:"itemId,omitempty"`
3182
3183 PolicyID *string `json:"policyId,omitempty"`
3184
3185 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
3186
3187 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
3188 }
3189
3190
3191 func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) {
3192 arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem
3193 objectMap := make(map[string]interface{})
3194 if arpi.FriendlyName != nil {
3195 objectMap["friendlyName"] = arpi.FriendlyName
3196 }
3197 if arpi.BackupManagementType != "" {
3198 objectMap["backupManagementType"] = arpi.BackupManagementType
3199 }
3200 if arpi.SourceResourceID != nil {
3201 objectMap["sourceResourceId"] = arpi.SourceResourceID
3202 }
3203 if arpi.ItemID != nil {
3204 objectMap["itemId"] = arpi.ItemID
3205 }
3206 if arpi.PolicyID != nil {
3207 objectMap["policyId"] = arpi.PolicyID
3208 }
3209 if arpi.ProtectionState != "" {
3210 objectMap["protectionState"] = arpi.ProtectionState
3211 }
3212 if arpi.ProtectionIntentItemType != "" {
3213 objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType
3214 }
3215 return json.Marshal(objectMap)
3216 }
3217
3218
3219 func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
3220 return nil, false
3221 }
3222
3223
3224 func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
3225 return nil, false
3226 }
3227
3228
3229 func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
3230 return &arpi, true
3231 }
3232
3233
3234 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
3235 return nil, false
3236 }
3237
3238
3239 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
3240 return nil, false
3241 }
3242
3243
3244 func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
3245 return nil, false
3246 }
3247
3248
3249 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
3250 return nil, false
3251 }
3252
3253
3254 func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
3255 return nil, false
3256 }
3257
3258
3259 func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
3260 return &arpi, true
3261 }
3262
3263
3264 type AzureSQLAGWorkloadContainerProtectionContainer struct {
3265
3266 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3267
3268 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
3269
3270 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
3271
3272 WorkloadType WorkloadType `json:"workloadType,omitempty"`
3273
3274 OperationType OperationType `json:"operationType,omitempty"`
3275
3276 FriendlyName *string `json:"friendlyName,omitempty"`
3277
3278 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3279
3280 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3281
3282 HealthStatus *string `json:"healthStatus,omitempty"`
3283
3284 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
3285
3286 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3287 }
3288
3289
3290 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) {
3291 aswcpc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer
3292 objectMap := make(map[string]interface{})
3293 if aswcpc.SourceResourceID != nil {
3294 objectMap["sourceResourceId"] = aswcpc.SourceResourceID
3295 }
3296 if aswcpc.LastUpdatedTime != nil {
3297 objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime
3298 }
3299 if aswcpc.ExtendedInfo != nil {
3300 objectMap["extendedInfo"] = aswcpc.ExtendedInfo
3301 }
3302 if aswcpc.WorkloadType != "" {
3303 objectMap["workloadType"] = aswcpc.WorkloadType
3304 }
3305 if aswcpc.OperationType != "" {
3306 objectMap["operationType"] = aswcpc.OperationType
3307 }
3308 if aswcpc.FriendlyName != nil {
3309 objectMap["friendlyName"] = aswcpc.FriendlyName
3310 }
3311 if aswcpc.BackupManagementType != "" {
3312 objectMap["backupManagementType"] = aswcpc.BackupManagementType
3313 }
3314 if aswcpc.RegistrationStatus != nil {
3315 objectMap["registrationStatus"] = aswcpc.RegistrationStatus
3316 }
3317 if aswcpc.HealthStatus != nil {
3318 objectMap["healthStatus"] = aswcpc.HealthStatus
3319 }
3320 if aswcpc.ProtectableObjectType != nil {
3321 objectMap["protectableObjectType"] = aswcpc.ProtectableObjectType
3322 }
3323 if aswcpc.ContainerType != "" {
3324 objectMap["containerType"] = aswcpc.ContainerType
3325 }
3326 return json.Marshal(objectMap)
3327 }
3328
3329
3330 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3331 return nil, false
3332 }
3333
3334
3335 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3336 return nil, false
3337 }
3338
3339
3340 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3341 return nil, false
3342 }
3343
3344
3345 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3346 return &aswcpc, true
3347 }
3348
3349
3350 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3351 return nil, false
3352 }
3353
3354
3355 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3356 return nil, false
3357 }
3358
3359
3360 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3361 return nil, false
3362 }
3363
3364
3365 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3366 return nil, false
3367 }
3368
3369
3370 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3371 return &aswcpc, true
3372 }
3373
3374
3375 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
3376 return nil, false
3377 }
3378
3379
3380 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3381 return nil, false
3382 }
3383
3384
3385 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
3386 return nil, false
3387 }
3388
3389
3390 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3391 return nil, false
3392 }
3393
3394
3395 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3396 return nil, false
3397 }
3398
3399
3400 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
3401 return nil, false
3402 }
3403
3404
3405 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3406 return nil, false
3407 }
3408
3409
3410 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3411 return &aswcpc, true
3412 }
3413
3414
3415 type AzureSQLContainer struct {
3416
3417 FriendlyName *string `json:"friendlyName,omitempty"`
3418
3419 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3420
3421 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3422
3423 HealthStatus *string `json:"healthStatus,omitempty"`
3424
3425 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
3426
3427 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3428 }
3429
3430
3431 func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) {
3432 asc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer
3433 objectMap := make(map[string]interface{})
3434 if asc.FriendlyName != nil {
3435 objectMap["friendlyName"] = asc.FriendlyName
3436 }
3437 if asc.BackupManagementType != "" {
3438 objectMap["backupManagementType"] = asc.BackupManagementType
3439 }
3440 if asc.RegistrationStatus != nil {
3441 objectMap["registrationStatus"] = asc.RegistrationStatus
3442 }
3443 if asc.HealthStatus != nil {
3444 objectMap["healthStatus"] = asc.HealthStatus
3445 }
3446 if asc.ProtectableObjectType != nil {
3447 objectMap["protectableObjectType"] = asc.ProtectableObjectType
3448 }
3449 if asc.ContainerType != "" {
3450 objectMap["containerType"] = asc.ContainerType
3451 }
3452 return json.Marshal(objectMap)
3453 }
3454
3455
3456 func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3457 return nil, false
3458 }
3459
3460
3461 func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3462 return nil, false
3463 }
3464
3465
3466 func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3467 return nil, false
3468 }
3469
3470
3471 func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3472 return nil, false
3473 }
3474
3475
3476 func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3477 return &asc, true
3478 }
3479
3480
3481 func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3482 return nil, false
3483 }
3484
3485
3486 func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3487 return nil, false
3488 }
3489
3490
3491 func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3492 return nil, false
3493 }
3494
3495
3496 func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3497 return nil, false
3498 }
3499
3500
3501 func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) {
3502 return nil, false
3503 }
3504
3505
3506 func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3507 return nil, false
3508 }
3509
3510
3511 func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) {
3512 return nil, false
3513 }
3514
3515
3516 func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3517 return nil, false
3518 }
3519
3520
3521 func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3522 return nil, false
3523 }
3524
3525
3526 func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) {
3527 return nil, false
3528 }
3529
3530
3531 func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3532 return nil, false
3533 }
3534
3535
3536 func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3537 return &asc, true
3538 }
3539
3540
3541 type AzureSQLProtectedItem struct {
3542
3543 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
3544
3545 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
3546
3547 ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
3548
3549 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3550
3551 WorkloadType DataSourceType `json:"workloadType,omitempty"`
3552
3553 ContainerName *string `json:"containerName,omitempty"`
3554
3555 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3556
3557 PolicyID *string `json:"policyId,omitempty"`
3558
3559 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
3560
3561 BackupSetName *string `json:"backupSetName,omitempty"`
3562
3563 CreateMode CreateMode `json:"createMode,omitempty"`
3564
3565 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
3566
3567 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
3568
3569 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
3570
3571 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
3572
3573 IsRehydrate *bool `json:"isRehydrate,omitempty"`
3574
3575 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
3576
3577 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
3578
3579 PolicyName *string `json:"policyName,omitempty"`
3580
3581 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
3582 }
3583
3584
3585 func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) {
3586 aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases
3587 objectMap := make(map[string]interface{})
3588 if aspi.ProtectedItemDataID != nil {
3589 objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID
3590 }
3591 if aspi.ProtectionState != "" {
3592 objectMap["protectionState"] = aspi.ProtectionState
3593 }
3594 if aspi.ExtendedInfo != nil {
3595 objectMap["extendedInfo"] = aspi.ExtendedInfo
3596 }
3597 if aspi.BackupManagementType != "" {
3598 objectMap["backupManagementType"] = aspi.BackupManagementType
3599 }
3600 if aspi.WorkloadType != "" {
3601 objectMap["workloadType"] = aspi.WorkloadType
3602 }
3603 if aspi.ContainerName != nil {
3604 objectMap["containerName"] = aspi.ContainerName
3605 }
3606 if aspi.SourceResourceID != nil {
3607 objectMap["sourceResourceId"] = aspi.SourceResourceID
3608 }
3609 if aspi.PolicyID != nil {
3610 objectMap["policyId"] = aspi.PolicyID
3611 }
3612 if aspi.LastRecoveryPoint != nil {
3613 objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint
3614 }
3615 if aspi.BackupSetName != nil {
3616 objectMap["backupSetName"] = aspi.BackupSetName
3617 }
3618 if aspi.CreateMode != "" {
3619 objectMap["createMode"] = aspi.CreateMode
3620 }
3621 if aspi.DeferredDeleteTimeInUTC != nil {
3622 objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC
3623 }
3624 if aspi.IsScheduledForDeferredDelete != nil {
3625 objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete
3626 }
3627 if aspi.DeferredDeleteTimeRemaining != nil {
3628 objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining
3629 }
3630 if aspi.IsDeferredDeleteScheduleUpcoming != nil {
3631 objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming
3632 }
3633 if aspi.IsRehydrate != nil {
3634 objectMap["isRehydrate"] = aspi.IsRehydrate
3635 }
3636 if aspi.ResourceGuardOperationRequests != nil {
3637 objectMap["resourceGuardOperationRequests"] = aspi.ResourceGuardOperationRequests
3638 }
3639 if aspi.IsArchiveEnabled != nil {
3640 objectMap["isArchiveEnabled"] = aspi.IsArchiveEnabled
3641 }
3642 if aspi.PolicyName != nil {
3643 objectMap["policyName"] = aspi.PolicyName
3644 }
3645 if aspi.ProtectedItemType != "" {
3646 objectMap["protectedItemType"] = aspi.ProtectedItemType
3647 }
3648 return json.Marshal(objectMap)
3649 }
3650
3651
3652 func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
3653 return nil, false
3654 }
3655
3656
3657 func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
3658 return nil, false
3659 }
3660
3661
3662 func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
3663 return nil, false
3664 }
3665
3666
3667 func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
3668 return nil, false
3669 }
3670
3671
3672 func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
3673 return nil, false
3674 }
3675
3676
3677 func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
3678 return &aspi, true
3679 }
3680
3681
3682 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
3683 return nil, false
3684 }
3685
3686
3687 func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
3688 return nil, false
3689 }
3690
3691
3692 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
3693 return nil, false
3694 }
3695
3696
3697 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
3698 return nil, false
3699 }
3700
3701
3702 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
3703 return nil, false
3704 }
3705
3706
3707 func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
3708 return nil, false
3709 }
3710
3711
3712 func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
3713 return nil, false
3714 }
3715
3716
3717 func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
3718 return nil, false
3719 }
3720
3721
3722 func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
3723 return nil, false
3724 }
3725
3726
3727 func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
3728 return &aspi, true
3729 }
3730
3731
3732 type AzureSQLProtectedItemExtendedInfo struct {
3733
3734 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
3735
3736 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
3737
3738 PolicyState *string `json:"policyState,omitempty"`
3739 }
3740
3741
3742 type AzureSQLProtectionPolicy struct {
3743
3744 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
3745
3746 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
3747
3748 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
3749
3750 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
3751 }
3752
3753
3754 func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) {
3755 aspp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL
3756 objectMap := make(map[string]interface{})
3757 objectMap["retentionPolicy"] = aspp.RetentionPolicy
3758 if aspp.ProtectedItemsCount != nil {
3759 objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount
3760 }
3761 if aspp.ResourceGuardOperationRequests != nil {
3762 objectMap["resourceGuardOperationRequests"] = aspp.ResourceGuardOperationRequests
3763 }
3764 if aspp.BackupManagementType != "" {
3765 objectMap["backupManagementType"] = aspp.BackupManagementType
3766 }
3767 return json.Marshal(objectMap)
3768 }
3769
3770
3771 func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
3772 return nil, false
3773 }
3774
3775
3776 func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
3777 return nil, false
3778 }
3779
3780
3781 func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
3782 return nil, false
3783 }
3784
3785
3786 func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
3787 return &aspp, true
3788 }
3789
3790
3791 func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
3792 return nil, false
3793 }
3794
3795
3796 func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
3797 return nil, false
3798 }
3799
3800
3801 func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
3802 return nil, false
3803 }
3804
3805
3806 func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
3807 return &aspp, true
3808 }
3809
3810
3811 func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error {
3812 var m map[string]*json.RawMessage
3813 err := json.Unmarshal(body, &m)
3814 if err != nil {
3815 return err
3816 }
3817 for k, v := range m {
3818 switch k {
3819 case "retentionPolicy":
3820 if v != nil {
3821 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
3822 if err != nil {
3823 return err
3824 }
3825 aspp.RetentionPolicy = retentionPolicy
3826 }
3827 case "protectedItemsCount":
3828 if v != nil {
3829 var protectedItemsCount int32
3830 err = json.Unmarshal(*v, &protectedItemsCount)
3831 if err != nil {
3832 return err
3833 }
3834 aspp.ProtectedItemsCount = &protectedItemsCount
3835 }
3836 case "resourceGuardOperationRequests":
3837 if v != nil {
3838 var resourceGuardOperationRequests []string
3839 err = json.Unmarshal(*v, &resourceGuardOperationRequests)
3840 if err != nil {
3841 return err
3842 }
3843 aspp.ResourceGuardOperationRequests = &resourceGuardOperationRequests
3844 }
3845 case "backupManagementType":
3846 if v != nil {
3847 var backupManagementType ManagementTypeBasicProtectionPolicy
3848 err = json.Unmarshal(*v, &backupManagementType)
3849 if err != nil {
3850 return err
3851 }
3852 aspp.BackupManagementType = backupManagementType
3853 }
3854 }
3855 }
3856
3857 return nil
3858 }
3859
3860
3861 type AzureStorageContainer struct {
3862
3863 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3864
3865 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3866
3867 ResourceGroup *string `json:"resourceGroup,omitempty"`
3868
3869 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
3870
3871 AcquireStorageAccountLock AcquireStorageAccountLock `json:"acquireStorageAccountLock,omitempty"`
3872
3873 FriendlyName *string `json:"friendlyName,omitempty"`
3874
3875 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3876
3877 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3878
3879 HealthStatus *string `json:"healthStatus,omitempty"`
3880
3881 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
3882
3883 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3884 }
3885
3886
3887 func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) {
3888 asc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeStorageContainer
3889 objectMap := make(map[string]interface{})
3890 if asc.SourceResourceID != nil {
3891 objectMap["sourceResourceId"] = asc.SourceResourceID
3892 }
3893 if asc.StorageAccountVersion != nil {
3894 objectMap["storageAccountVersion"] = asc.StorageAccountVersion
3895 }
3896 if asc.ResourceGroup != nil {
3897 objectMap["resourceGroup"] = asc.ResourceGroup
3898 }
3899 if asc.ProtectedItemCount != nil {
3900 objectMap["protectedItemCount"] = asc.ProtectedItemCount
3901 }
3902 if asc.AcquireStorageAccountLock != "" {
3903 objectMap["acquireStorageAccountLock"] = asc.AcquireStorageAccountLock
3904 }
3905 if asc.FriendlyName != nil {
3906 objectMap["friendlyName"] = asc.FriendlyName
3907 }
3908 if asc.BackupManagementType != "" {
3909 objectMap["backupManagementType"] = asc.BackupManagementType
3910 }
3911 if asc.RegistrationStatus != nil {
3912 objectMap["registrationStatus"] = asc.RegistrationStatus
3913 }
3914 if asc.HealthStatus != nil {
3915 objectMap["healthStatus"] = asc.HealthStatus
3916 }
3917 if asc.ProtectableObjectType != nil {
3918 objectMap["protectableObjectType"] = asc.ProtectableObjectType
3919 }
3920 if asc.ContainerType != "" {
3921 objectMap["containerType"] = asc.ContainerType
3922 }
3923 return json.Marshal(objectMap)
3924 }
3925
3926
3927 func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3928 return nil, false
3929 }
3930
3931
3932 func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3933 return nil, false
3934 }
3935
3936
3937 func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3938 return nil, false
3939 }
3940
3941
3942 func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3943 return nil, false
3944 }
3945
3946
3947 func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3948 return nil, false
3949 }
3950
3951
3952 func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3953 return &asc, true
3954 }
3955
3956
3957 func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3958 return nil, false
3959 }
3960
3961
3962 func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3963 return nil, false
3964 }
3965
3966
3967 func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3968 return nil, false
3969 }
3970
3971
3972 func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) {
3973 return nil, false
3974 }
3975
3976
3977 func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3978 return nil, false
3979 }
3980
3981
3982 func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) {
3983 return nil, false
3984 }
3985
3986
3987 func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3988 return nil, false
3989 }
3990
3991
3992 func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3993 return nil, false
3994 }
3995
3996
3997 func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) {
3998 return nil, false
3999 }
4000
4001
4002 func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
4003 return nil, false
4004 }
4005
4006
4007 func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
4008 return &asc, true
4009 }
4010
4011
4012 type AzureStorageErrorInfo struct {
4013
4014 ErrorCode *int32 `json:"errorCode,omitempty"`
4015
4016 ErrorString *string `json:"errorString,omitempty"`
4017
4018 Recommendations *[]string `json:"recommendations,omitempty"`
4019 }
4020
4021
4022 type AzureStorageJob struct {
4023
4024 Duration *string `json:"duration,omitempty"`
4025
4026 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
4027
4028 ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"`
4029
4030 StorageAccountName *string `json:"storageAccountName,omitempty"`
4031
4032 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
4033
4034 ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"`
4035
4036 IsUserTriggered *bool `json:"isUserTriggered,omitempty"`
4037
4038 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
4039
4040 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4041
4042 Operation *string `json:"operation,omitempty"`
4043
4044 Status *string `json:"status,omitempty"`
4045
4046 StartTime *date.Time `json:"startTime,omitempty"`
4047
4048 EndTime *date.Time `json:"endTime,omitempty"`
4049
4050 ActivityID *string `json:"activityId,omitempty"`
4051
4052 JobType JobType `json:"jobType,omitempty"`
4053 }
4054
4055
4056 func (asj AzureStorageJob) MarshalJSON() ([]byte, error) {
4057 asj.JobType = JobTypeAzureStorageJob
4058 objectMap := make(map[string]interface{})
4059 if asj.Duration != nil {
4060 objectMap["duration"] = asj.Duration
4061 }
4062 if asj.ActionsInfo != nil {
4063 objectMap["actionsInfo"] = asj.ActionsInfo
4064 }
4065 if asj.ErrorDetails != nil {
4066 objectMap["errorDetails"] = asj.ErrorDetails
4067 }
4068 if asj.StorageAccountName != nil {
4069 objectMap["storageAccountName"] = asj.StorageAccountName
4070 }
4071 if asj.StorageAccountVersion != nil {
4072 objectMap["storageAccountVersion"] = asj.StorageAccountVersion
4073 }
4074 if asj.ExtendedInfo != nil {
4075 objectMap["extendedInfo"] = asj.ExtendedInfo
4076 }
4077 if asj.IsUserTriggered != nil {
4078 objectMap["isUserTriggered"] = asj.IsUserTriggered
4079 }
4080 if asj.EntityFriendlyName != nil {
4081 objectMap["entityFriendlyName"] = asj.EntityFriendlyName
4082 }
4083 if asj.BackupManagementType != "" {
4084 objectMap["backupManagementType"] = asj.BackupManagementType
4085 }
4086 if asj.Operation != nil {
4087 objectMap["operation"] = asj.Operation
4088 }
4089 if asj.Status != nil {
4090 objectMap["status"] = asj.Status
4091 }
4092 if asj.StartTime != nil {
4093 objectMap["startTime"] = asj.StartTime
4094 }
4095 if asj.EndTime != nil {
4096 objectMap["endTime"] = asj.EndTime
4097 }
4098 if asj.ActivityID != nil {
4099 objectMap["activityId"] = asj.ActivityID
4100 }
4101 if asj.JobType != "" {
4102 objectMap["jobType"] = asj.JobType
4103 }
4104 return json.Marshal(objectMap)
4105 }
4106
4107
4108 func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
4109 return nil, false
4110 }
4111
4112
4113 func (asj AzureStorageJob) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
4114 return nil, false
4115 }
4116
4117
4118 func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
4119 return &asj, true
4120 }
4121
4122
4123 func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
4124 return nil, false
4125 }
4126
4127
4128 func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) {
4129 return nil, false
4130 }
4131
4132
4133 func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) {
4134 return nil, false
4135 }
4136
4137
4138 func (asj AzureStorageJob) AsVaultJob() (*VaultJob, bool) {
4139 return nil, false
4140 }
4141
4142
4143 func (asj AzureStorageJob) AsJob() (*Job, bool) {
4144 return nil, false
4145 }
4146
4147
4148 func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) {
4149 return &asj, true
4150 }
4151
4152
4153 type AzureStorageJobExtendedInfo struct {
4154
4155 TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"`
4156
4157 PropertyBag map[string]*string `json:"propertyBag"`
4158
4159 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
4160 }
4161
4162
4163 func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) {
4164 objectMap := make(map[string]interface{})
4165 if asjei.TasksList != nil {
4166 objectMap["tasksList"] = asjei.TasksList
4167 }
4168 if asjei.PropertyBag != nil {
4169 objectMap["propertyBag"] = asjei.PropertyBag
4170 }
4171 if asjei.DynamicErrorMessage != nil {
4172 objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage
4173 }
4174 return json.Marshal(objectMap)
4175 }
4176
4177
4178 type AzureStorageJobTaskDetails struct {
4179
4180 TaskID *string `json:"taskId,omitempty"`
4181
4182 Status *string `json:"status,omitempty"`
4183 }
4184
4185
4186 type AzureStorageProtectableContainer struct {
4187
4188 FriendlyName *string `json:"friendlyName,omitempty"`
4189
4190 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4191
4192 HealthStatus *string `json:"healthStatus,omitempty"`
4193
4194 ContainerID *string `json:"containerId,omitempty"`
4195
4196 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
4197 }
4198
4199
4200 func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) {
4201 aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer
4202 objectMap := make(map[string]interface{})
4203 if aspc.FriendlyName != nil {
4204 objectMap["friendlyName"] = aspc.FriendlyName
4205 }
4206 if aspc.BackupManagementType != "" {
4207 objectMap["backupManagementType"] = aspc.BackupManagementType
4208 }
4209 if aspc.HealthStatus != nil {
4210 objectMap["healthStatus"] = aspc.HealthStatus
4211 }
4212 if aspc.ContainerID != nil {
4213 objectMap["containerId"] = aspc.ContainerID
4214 }
4215 if aspc.ProtectableContainerType != "" {
4216 objectMap["protectableContainerType"] = aspc.ProtectableContainerType
4217 }
4218 return json.Marshal(objectMap)
4219 }
4220
4221
4222 func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
4223 return &aspc, true
4224 }
4225
4226
4227 func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
4228 return nil, false
4229 }
4230
4231
4232 func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
4233 return nil, false
4234 }
4235
4236
4237 func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
4238 return &aspc, true
4239 }
4240
4241
4242 type AzureVMAppContainerProtectableContainer struct {
4243
4244 FriendlyName *string `json:"friendlyName,omitempty"`
4245
4246 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4247
4248 HealthStatus *string `json:"healthStatus,omitempty"`
4249
4250 ContainerID *string `json:"containerId,omitempty"`
4251
4252 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
4253 }
4254
4255
4256 func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) {
4257 avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer
4258 objectMap := make(map[string]interface{})
4259 if avacpc.FriendlyName != nil {
4260 objectMap["friendlyName"] = avacpc.FriendlyName
4261 }
4262 if avacpc.BackupManagementType != "" {
4263 objectMap["backupManagementType"] = avacpc.BackupManagementType
4264 }
4265 if avacpc.HealthStatus != nil {
4266 objectMap["healthStatus"] = avacpc.HealthStatus
4267 }
4268 if avacpc.ContainerID != nil {
4269 objectMap["containerId"] = avacpc.ContainerID
4270 }
4271 if avacpc.ProtectableContainerType != "" {
4272 objectMap["protectableContainerType"] = avacpc.ProtectableContainerType
4273 }
4274 return json.Marshal(objectMap)
4275 }
4276
4277
4278 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
4279 return nil, false
4280 }
4281
4282
4283 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
4284 return &avacpc, true
4285 }
4286
4287
4288 func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
4289 return nil, false
4290 }
4291
4292
4293 func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
4294 return &avacpc, true
4295 }
4296
4297
4298 type AzureVMAppContainerProtectionContainer struct {
4299
4300 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4301
4302 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
4303
4304 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
4305
4306 WorkloadType WorkloadType `json:"workloadType,omitempty"`
4307
4308 OperationType OperationType `json:"operationType,omitempty"`
4309
4310 FriendlyName *string `json:"friendlyName,omitempty"`
4311
4312 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4313
4314 RegistrationStatus *string `json:"registrationStatus,omitempty"`
4315
4316 HealthStatus *string `json:"healthStatus,omitempty"`
4317
4318 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
4319
4320 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
4321 }
4322
4323
4324 func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) {
4325 avacpc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer
4326 objectMap := make(map[string]interface{})
4327 if avacpc.SourceResourceID != nil {
4328 objectMap["sourceResourceId"] = avacpc.SourceResourceID
4329 }
4330 if avacpc.LastUpdatedTime != nil {
4331 objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime
4332 }
4333 if avacpc.ExtendedInfo != nil {
4334 objectMap["extendedInfo"] = avacpc.ExtendedInfo
4335 }
4336 if avacpc.WorkloadType != "" {
4337 objectMap["workloadType"] = avacpc.WorkloadType
4338 }
4339 if avacpc.OperationType != "" {
4340 objectMap["operationType"] = avacpc.OperationType
4341 }
4342 if avacpc.FriendlyName != nil {
4343 objectMap["friendlyName"] = avacpc.FriendlyName
4344 }
4345 if avacpc.BackupManagementType != "" {
4346 objectMap["backupManagementType"] = avacpc.BackupManagementType
4347 }
4348 if avacpc.RegistrationStatus != nil {
4349 objectMap["registrationStatus"] = avacpc.RegistrationStatus
4350 }
4351 if avacpc.HealthStatus != nil {
4352 objectMap["healthStatus"] = avacpc.HealthStatus
4353 }
4354 if avacpc.ProtectableObjectType != nil {
4355 objectMap["protectableObjectType"] = avacpc.ProtectableObjectType
4356 }
4357 if avacpc.ContainerType != "" {
4358 objectMap["containerType"] = avacpc.ContainerType
4359 }
4360 return json.Marshal(objectMap)
4361 }
4362
4363
4364 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
4365 return nil, false
4366 }
4367
4368
4369 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
4370 return nil, false
4371 }
4372
4373
4374 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
4375 return nil, false
4376 }
4377
4378
4379 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
4380 return nil, false
4381 }
4382
4383
4384 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
4385 return nil, false
4386 }
4387
4388
4389 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
4390 return nil, false
4391 }
4392
4393
4394 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
4395 return &avacpc, true
4396 }
4397
4398
4399 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
4400 return nil, false
4401 }
4402
4403
4404 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
4405 return &avacpc, true
4406 }
4407
4408
4409 func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
4410 return nil, false
4411 }
4412
4413
4414 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
4415 return nil, false
4416 }
4417
4418
4419 func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
4420 return nil, false
4421 }
4422
4423
4424 func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
4425 return nil, false
4426 }
4427
4428
4429 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
4430 return nil, false
4431 }
4432
4433
4434 func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
4435 return nil, false
4436 }
4437
4438
4439 func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
4440 return nil, false
4441 }
4442
4443
4444 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
4445 return &avacpc, true
4446 }
4447
4448
4449 type AzureVMResourceFeatureSupportRequest struct {
4450
4451 VMSize *string `json:"vmSize,omitempty"`
4452
4453 VMSku *string `json:"vmSku,omitempty"`
4454
4455 FeatureType FeatureType `json:"featureType,omitempty"`
4456 }
4457
4458
4459 func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) {
4460 avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup
4461 objectMap := make(map[string]interface{})
4462 if avrfsr.VMSize != nil {
4463 objectMap["vmSize"] = avrfsr.VMSize
4464 }
4465 if avrfsr.VMSku != nil {
4466 objectMap["vmSku"] = avrfsr.VMSku
4467 }
4468 if avrfsr.FeatureType != "" {
4469 objectMap["featureType"] = avrfsr.FeatureType
4470 }
4471 return json.Marshal(objectMap)
4472 }
4473
4474
4475 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
4476 return nil, false
4477 }
4478
4479
4480 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
4481 return &avrfsr, true
4482 }
4483
4484
4485 func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
4486 return nil, false
4487 }
4488
4489
4490 func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
4491 return &avrfsr, true
4492 }
4493
4494
4495 type AzureVMResourceFeatureSupportResponse struct {
4496 autorest.Response `json:"-"`
4497
4498 SupportStatus SupportStatus `json:"supportStatus,omitempty"`
4499 }
4500
4501
4502 type BasicAzureVMWorkloadItem interface {
4503 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
4504 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
4505 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
4506 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
4507 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
4508 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
4509 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
4510 }
4511
4512
4513 type AzureVMWorkloadItem struct {
4514
4515 ParentName *string `json:"parentName,omitempty"`
4516
4517 ServerName *string `json:"serverName,omitempty"`
4518
4519 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4520
4521 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4522
4523 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
4524
4525 BackupManagementType *string `json:"backupManagementType,omitempty"`
4526
4527 WorkloadType *string `json:"workloadType,omitempty"`
4528
4529 FriendlyName *string `json:"friendlyName,omitempty"`
4530
4531 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4532
4533 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
4534 }
4535
4536 func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) {
4537 var m map[string]interface{}
4538 err := json.Unmarshal(body, &m)
4539 if err != nil {
4540 return nil, err
4541 }
4542
4543 switch m["workloadItemType"] {
4544 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase):
4545 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
4546 err := json.Unmarshal(body, &avwsadwi)
4547 return avwsadwi, err
4548 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem):
4549 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
4550 err := json.Unmarshal(body, &avwsaswi)
4551 return avwsaswi, err
4552 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase):
4553 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
4554 err := json.Unmarshal(body, &avwshdwi)
4555 return avwshdwi, err
4556 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem):
4557 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
4558 err := json.Unmarshal(body, &avwshswi)
4559 return avwshswi, err
4560 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase):
4561 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
4562 err := json.Unmarshal(body, &avwsdwi)
4563 return avwsdwi, err
4564 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance):
4565 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
4566 err := json.Unmarshal(body, &avwsiwi)
4567 return avwsiwi, err
4568 default:
4569 var avwi AzureVMWorkloadItem
4570 err := json.Unmarshal(body, &avwi)
4571 return avwi, err
4572 }
4573 }
4574 func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) {
4575 var rawMessages []*json.RawMessage
4576 err := json.Unmarshal(body, &rawMessages)
4577 if err != nil {
4578 return nil, err
4579 }
4580
4581 avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages))
4582
4583 for index, rawMessage := range rawMessages {
4584 avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage)
4585 if err != nil {
4586 return nil, err
4587 }
4588 avwiArray[index] = avwi
4589 }
4590 return avwiArray, nil
4591 }
4592
4593
4594 func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) {
4595 avwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem
4596 objectMap := make(map[string]interface{})
4597 if avwi.ParentName != nil {
4598 objectMap["parentName"] = avwi.ParentName
4599 }
4600 if avwi.ServerName != nil {
4601 objectMap["serverName"] = avwi.ServerName
4602 }
4603 if avwi.IsAutoProtectable != nil {
4604 objectMap["isAutoProtectable"] = avwi.IsAutoProtectable
4605 }
4606 if avwi.Subinquireditemcount != nil {
4607 objectMap["subinquireditemcount"] = avwi.Subinquireditemcount
4608 }
4609 if avwi.SubWorkloadItemCount != nil {
4610 objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount
4611 }
4612 if avwi.BackupManagementType != nil {
4613 objectMap["backupManagementType"] = avwi.BackupManagementType
4614 }
4615 if avwi.WorkloadType != nil {
4616 objectMap["workloadType"] = avwi.WorkloadType
4617 }
4618 if avwi.FriendlyName != nil {
4619 objectMap["friendlyName"] = avwi.FriendlyName
4620 }
4621 if avwi.ProtectionState != "" {
4622 objectMap["protectionState"] = avwi.ProtectionState
4623 }
4624 if avwi.WorkloadItemType != "" {
4625 objectMap["workloadItemType"] = avwi.WorkloadItemType
4626 }
4627 return json.Marshal(objectMap)
4628 }
4629
4630
4631 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
4632 return &avwi, true
4633 }
4634
4635
4636 func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
4637 return &avwi, true
4638 }
4639
4640
4641 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
4642 return nil, false
4643 }
4644
4645
4646 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
4647 return nil, false
4648 }
4649
4650
4651 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
4652 return nil, false
4653 }
4654
4655
4656 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
4657 return nil, false
4658 }
4659
4660
4661 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
4662 return nil, false
4663 }
4664
4665
4666 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
4667 return nil, false
4668 }
4669
4670
4671 func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
4672 return nil, false
4673 }
4674
4675
4676 func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
4677 return &avwi, true
4678 }
4679
4680
4681 type BasicAzureVMWorkloadProtectableItem interface {
4682 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
4683 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
4684 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
4685 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
4686 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
4687 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
4688 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
4689 }
4690
4691
4692 type AzureVMWorkloadProtectableItem struct {
4693
4694 ParentName *string `json:"parentName,omitempty"`
4695
4696
4697 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
4698
4699 ServerName *string `json:"serverName,omitempty"`
4700
4701 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4702
4703 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
4704
4705 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4706
4707 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
4708
4709 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
4710
4711 BackupManagementType *string `json:"backupManagementType,omitempty"`
4712
4713 WorkloadType *string `json:"workloadType,omitempty"`
4714
4715 FriendlyName *string `json:"friendlyName,omitempty"`
4716
4717 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4718
4719 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
4720 }
4721
4722 func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) {
4723 var m map[string]interface{}
4724 err := json.Unmarshal(body, &m)
4725 if err != nil {
4726 return nil, err
4727 }
4728
4729 switch m["protectableItemType"] {
4730 case string(ProtectableItemTypeSAPAseSystem):
4731 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
4732 err := json.Unmarshal(body, &avwsaspi)
4733 return avwsaspi, err
4734 case string(ProtectableItemTypeSAPHanaDatabase):
4735 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
4736 err := json.Unmarshal(body, &avwshdpi)
4737 return avwshdpi, err
4738 case string(ProtectableItemTypeSAPHanaSystem):
4739 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
4740 err := json.Unmarshal(body, &avwshspi)
4741 return avwshspi, err
4742 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
4743 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
4744 err := json.Unmarshal(body, &avwsagpi)
4745 return avwsagpi, err
4746 case string(ProtectableItemTypeSQLDataBase):
4747 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
4748 err := json.Unmarshal(body, &avwsdpi)
4749 return avwsdpi, err
4750 case string(ProtectableItemTypeSQLInstance):
4751 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
4752 err := json.Unmarshal(body, &avwsipi)
4753 return avwsipi, err
4754 default:
4755 var avwpi AzureVMWorkloadProtectableItem
4756 err := json.Unmarshal(body, &avwpi)
4757 return avwpi, err
4758 }
4759 }
4760 func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) {
4761 var rawMessages []*json.RawMessage
4762 err := json.Unmarshal(body, &rawMessages)
4763 if err != nil {
4764 return nil, err
4765 }
4766
4767 avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages))
4768
4769 for index, rawMessage := range rawMessages {
4770 avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage)
4771 if err != nil {
4772 return nil, err
4773 }
4774 avwpiArray[index] = avwpi
4775 }
4776 return avwpiArray, nil
4777 }
4778
4779
4780 func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) {
4781 avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem
4782 objectMap := make(map[string]interface{})
4783 if avwpi.ParentName != nil {
4784 objectMap["parentName"] = avwpi.ParentName
4785 }
4786 if avwpi.ParentUniqueName != nil {
4787 objectMap["parentUniqueName"] = avwpi.ParentUniqueName
4788 }
4789 if avwpi.ServerName != nil {
4790 objectMap["serverName"] = avwpi.ServerName
4791 }
4792 if avwpi.IsAutoProtectable != nil {
4793 objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable
4794 }
4795 if avwpi.IsAutoProtected != nil {
4796 objectMap["isAutoProtected"] = avwpi.IsAutoProtected
4797 }
4798 if avwpi.Subinquireditemcount != nil {
4799 objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount
4800 }
4801 if avwpi.Subprotectableitemcount != nil {
4802 objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount
4803 }
4804 if avwpi.Prebackupvalidation != nil {
4805 objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation
4806 }
4807 if avwpi.BackupManagementType != nil {
4808 objectMap["backupManagementType"] = avwpi.BackupManagementType
4809 }
4810 if avwpi.WorkloadType != nil {
4811 objectMap["workloadType"] = avwpi.WorkloadType
4812 }
4813 if avwpi.FriendlyName != nil {
4814 objectMap["friendlyName"] = avwpi.FriendlyName
4815 }
4816 if avwpi.ProtectionState != "" {
4817 objectMap["protectionState"] = avwpi.ProtectionState
4818 }
4819 if avwpi.ProtectableItemType != "" {
4820 objectMap["protectableItemType"] = avwpi.ProtectableItemType
4821 }
4822 return json.Marshal(objectMap)
4823 }
4824
4825
4826 func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
4827 return nil, false
4828 }
4829
4830
4831 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
4832 return nil, false
4833 }
4834
4835
4836 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
4837 return nil, false
4838 }
4839
4840
4841 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
4842 return &avwpi, true
4843 }
4844
4845
4846 func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
4847 return &avwpi, true
4848 }
4849
4850
4851 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
4852 return nil, false
4853 }
4854
4855
4856 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
4857 return nil, false
4858 }
4859
4860
4861 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
4862 return nil, false
4863 }
4864
4865
4866 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
4867 return nil, false
4868 }
4869
4870
4871 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
4872 return nil, false
4873 }
4874
4875
4876 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
4877 return nil, false
4878 }
4879
4880
4881 func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
4882 return nil, false
4883 }
4884
4885
4886 func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
4887 return nil, false
4888 }
4889
4890
4891 func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
4892 return nil, false
4893 }
4894
4895
4896 func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
4897 return &avwpi, true
4898 }
4899
4900
4901 type BasicAzureVMWorkloadProtectedItem interface {
4902 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
4903 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
4904 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
4905 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
4906 }
4907
4908
4909 type AzureVMWorkloadProtectedItem struct {
4910
4911 FriendlyName *string `json:"friendlyName,omitempty"`
4912
4913 ServerName *string `json:"serverName,omitempty"`
4914
4915 ParentName *string `json:"parentName,omitempty"`
4916
4917 ParentType *string `json:"parentType,omitempty"`
4918
4919 ProtectionStatus *string `json:"protectionStatus,omitempty"`
4920
4921 ProtectionState ProtectionState `json:"protectionState,omitempty"`
4922
4923 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
4924
4925 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
4926
4927 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
4928
4929 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
4930
4931 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
4932
4933 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
4934
4935 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
4936
4937 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4938
4939 WorkloadType DataSourceType `json:"workloadType,omitempty"`
4940
4941 ContainerName *string `json:"containerName,omitempty"`
4942
4943 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4944
4945 PolicyID *string `json:"policyId,omitempty"`
4946
4947 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
4948
4949 BackupSetName *string `json:"backupSetName,omitempty"`
4950
4951 CreateMode CreateMode `json:"createMode,omitempty"`
4952
4953 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
4954
4955 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
4956
4957 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
4958
4959 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
4960
4961 IsRehydrate *bool `json:"isRehydrate,omitempty"`
4962
4963 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
4964
4965 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
4966
4967 PolicyName *string `json:"policyName,omitempty"`
4968
4969 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
4970 }
4971
4972 func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) {
4973 var m map[string]interface{}
4974 err := json.Unmarshal(body, &m)
4975 if err != nil {
4976 return nil, err
4977 }
4978
4979 switch m["protectedItemType"] {
4980 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
4981 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
4982 err := json.Unmarshal(body, &avwsadpi)
4983 return avwsadpi, err
4984 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
4985 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
4986 err := json.Unmarshal(body, &avwshdpi)
4987 return avwshdpi, err
4988 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
4989 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
4990 err := json.Unmarshal(body, &avwsdpi)
4991 return avwsdpi, err
4992 default:
4993 var avwpi AzureVMWorkloadProtectedItem
4994 err := json.Unmarshal(body, &avwpi)
4995 return avwpi, err
4996 }
4997 }
4998 func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) {
4999 var rawMessages []*json.RawMessage
5000 err := json.Unmarshal(body, &rawMessages)
5001 if err != nil {
5002 return nil, err
5003 }
5004
5005 avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages))
5006
5007 for index, rawMessage := range rawMessages {
5008 avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage)
5009 if err != nil {
5010 return nil, err
5011 }
5012 avwpiArray[index] = avwpi
5013 }
5014 return avwpiArray, nil
5015 }
5016
5017
5018 func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) {
5019 avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem
5020 objectMap := make(map[string]interface{})
5021 if avwpi.FriendlyName != nil {
5022 objectMap["friendlyName"] = avwpi.FriendlyName
5023 }
5024 if avwpi.ServerName != nil {
5025 objectMap["serverName"] = avwpi.ServerName
5026 }
5027 if avwpi.ParentName != nil {
5028 objectMap["parentName"] = avwpi.ParentName
5029 }
5030 if avwpi.ParentType != nil {
5031 objectMap["parentType"] = avwpi.ParentType
5032 }
5033 if avwpi.ProtectionStatus != nil {
5034 objectMap["protectionStatus"] = avwpi.ProtectionStatus
5035 }
5036 if avwpi.ProtectionState != "" {
5037 objectMap["protectionState"] = avwpi.ProtectionState
5038 }
5039 if avwpi.LastBackupStatus != "" {
5040 objectMap["lastBackupStatus"] = avwpi.LastBackupStatus
5041 }
5042 if avwpi.LastBackupTime != nil {
5043 objectMap["lastBackupTime"] = avwpi.LastBackupTime
5044 }
5045 if avwpi.LastBackupErrorDetail != nil {
5046 objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail
5047 }
5048 if avwpi.ProtectedItemDataSourceID != nil {
5049 objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID
5050 }
5051 if avwpi.ProtectedItemHealthStatus != "" {
5052 objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus
5053 }
5054 if avwpi.ExtendedInfo != nil {
5055 objectMap["extendedInfo"] = avwpi.ExtendedInfo
5056 }
5057 if avwpi.KpisHealths != nil {
5058 objectMap["kpisHealths"] = avwpi.KpisHealths
5059 }
5060 if avwpi.BackupManagementType != "" {
5061 objectMap["backupManagementType"] = avwpi.BackupManagementType
5062 }
5063 if avwpi.WorkloadType != "" {
5064 objectMap["workloadType"] = avwpi.WorkloadType
5065 }
5066 if avwpi.ContainerName != nil {
5067 objectMap["containerName"] = avwpi.ContainerName
5068 }
5069 if avwpi.SourceResourceID != nil {
5070 objectMap["sourceResourceId"] = avwpi.SourceResourceID
5071 }
5072 if avwpi.PolicyID != nil {
5073 objectMap["policyId"] = avwpi.PolicyID
5074 }
5075 if avwpi.LastRecoveryPoint != nil {
5076 objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint
5077 }
5078 if avwpi.BackupSetName != nil {
5079 objectMap["backupSetName"] = avwpi.BackupSetName
5080 }
5081 if avwpi.CreateMode != "" {
5082 objectMap["createMode"] = avwpi.CreateMode
5083 }
5084 if avwpi.DeferredDeleteTimeInUTC != nil {
5085 objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC
5086 }
5087 if avwpi.IsScheduledForDeferredDelete != nil {
5088 objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete
5089 }
5090 if avwpi.DeferredDeleteTimeRemaining != nil {
5091 objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining
5092 }
5093 if avwpi.IsDeferredDeleteScheduleUpcoming != nil {
5094 objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming
5095 }
5096 if avwpi.IsRehydrate != nil {
5097 objectMap["isRehydrate"] = avwpi.IsRehydrate
5098 }
5099 if avwpi.ResourceGuardOperationRequests != nil {
5100 objectMap["resourceGuardOperationRequests"] = avwpi.ResourceGuardOperationRequests
5101 }
5102 if avwpi.IsArchiveEnabled != nil {
5103 objectMap["isArchiveEnabled"] = avwpi.IsArchiveEnabled
5104 }
5105 if avwpi.PolicyName != nil {
5106 objectMap["policyName"] = avwpi.PolicyName
5107 }
5108 if avwpi.ProtectedItemType != "" {
5109 objectMap["protectedItemType"] = avwpi.ProtectedItemType
5110 }
5111 return json.Marshal(objectMap)
5112 }
5113
5114
5115 func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5116 return nil, false
5117 }
5118
5119
5120 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5121 return nil, false
5122 }
5123
5124
5125 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5126 return nil, false
5127 }
5128
5129
5130 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5131 return nil, false
5132 }
5133
5134
5135 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5136 return nil, false
5137 }
5138
5139
5140 func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5141 return nil, false
5142 }
5143
5144
5145 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5146 return &avwpi, true
5147 }
5148
5149
5150 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5151 return &avwpi, true
5152 }
5153
5154
5155 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5156 return nil, false
5157 }
5158
5159
5160 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5161 return nil, false
5162 }
5163
5164
5165 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5166 return nil, false
5167 }
5168
5169
5170 func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5171 return nil, false
5172 }
5173
5174
5175 func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5176 return nil, false
5177 }
5178
5179
5180 func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5181 return nil, false
5182 }
5183
5184
5185 func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5186 return nil, false
5187 }
5188
5189
5190 func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5191 return &avwpi, true
5192 }
5193
5194
5195
5196 type AzureVMWorkloadProtectedItemExtendedInfo struct {
5197
5198 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
5199
5200 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
5201
5202 PolicyState *string `json:"policyState,omitempty"`
5203
5204 RecoveryModel *string `json:"recoveryModel,omitempty"`
5205 }
5206
5207
5208 type AzureVMWorkloadProtectionPolicy struct {
5209
5210 WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
5211
5212 Settings *Settings `json:"settings,omitempty"`
5213
5214 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
5215
5216 MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"`
5217
5218 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
5219
5220 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
5221
5222 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
5223 }
5224
5225
5226 func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) {
5227 avwpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload
5228 objectMap := make(map[string]interface{})
5229 if avwpp.WorkLoadType != "" {
5230 objectMap["workLoadType"] = avwpp.WorkLoadType
5231 }
5232 if avwpp.Settings != nil {
5233 objectMap["settings"] = avwpp.Settings
5234 }
5235 if avwpp.SubProtectionPolicy != nil {
5236 objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy
5237 }
5238 if avwpp.MakePolicyConsistent != nil {
5239 objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent
5240 }
5241 if avwpp.ProtectedItemsCount != nil {
5242 objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount
5243 }
5244 if avwpp.ResourceGuardOperationRequests != nil {
5245 objectMap["resourceGuardOperationRequests"] = avwpp.ResourceGuardOperationRequests
5246 }
5247 if avwpp.BackupManagementType != "" {
5248 objectMap["backupManagementType"] = avwpp.BackupManagementType
5249 }
5250 return json.Marshal(objectMap)
5251 }
5252
5253
5254 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
5255 return &avwpp, true
5256 }
5257
5258
5259 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
5260 return nil, false
5261 }
5262
5263
5264 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
5265 return nil, false
5266 }
5267
5268
5269 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
5270 return nil, false
5271 }
5272
5273
5274 func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
5275 return nil, false
5276 }
5277
5278
5279 func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
5280 return nil, false
5281 }
5282
5283
5284 func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
5285 return nil, false
5286 }
5287
5288
5289 func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
5290 return &avwpp, true
5291 }
5292
5293
5294
5295 type AzureVMWorkloadSAPAseDatabaseProtectedItem struct {
5296
5297 FriendlyName *string `json:"friendlyName,omitempty"`
5298
5299 ServerName *string `json:"serverName,omitempty"`
5300
5301 ParentName *string `json:"parentName,omitempty"`
5302
5303 ParentType *string `json:"parentType,omitempty"`
5304
5305 ProtectionStatus *string `json:"protectionStatus,omitempty"`
5306
5307 ProtectionState ProtectionState `json:"protectionState,omitempty"`
5308
5309 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
5310
5311 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
5312
5313 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
5314
5315 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
5316
5317 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
5318
5319 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
5320
5321 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
5322
5323 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
5324
5325 WorkloadType DataSourceType `json:"workloadType,omitempty"`
5326
5327 ContainerName *string `json:"containerName,omitempty"`
5328
5329 SourceResourceID *string `json:"sourceResourceId,omitempty"`
5330
5331 PolicyID *string `json:"policyId,omitempty"`
5332
5333 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
5334
5335 BackupSetName *string `json:"backupSetName,omitempty"`
5336
5337 CreateMode CreateMode `json:"createMode,omitempty"`
5338
5339 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
5340
5341 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
5342
5343 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
5344
5345 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
5346
5347 IsRehydrate *bool `json:"isRehydrate,omitempty"`
5348
5349 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
5350
5351 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
5352
5353 PolicyName *string `json:"policyName,omitempty"`
5354
5355 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
5356 }
5357
5358
5359 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
5360 avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase
5361 objectMap := make(map[string]interface{})
5362 if avwsadpi.FriendlyName != nil {
5363 objectMap["friendlyName"] = avwsadpi.FriendlyName
5364 }
5365 if avwsadpi.ServerName != nil {
5366 objectMap["serverName"] = avwsadpi.ServerName
5367 }
5368 if avwsadpi.ParentName != nil {
5369 objectMap["parentName"] = avwsadpi.ParentName
5370 }
5371 if avwsadpi.ParentType != nil {
5372 objectMap["parentType"] = avwsadpi.ParentType
5373 }
5374 if avwsadpi.ProtectionStatus != nil {
5375 objectMap["protectionStatus"] = avwsadpi.ProtectionStatus
5376 }
5377 if avwsadpi.ProtectionState != "" {
5378 objectMap["protectionState"] = avwsadpi.ProtectionState
5379 }
5380 if avwsadpi.LastBackupStatus != "" {
5381 objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus
5382 }
5383 if avwsadpi.LastBackupTime != nil {
5384 objectMap["lastBackupTime"] = avwsadpi.LastBackupTime
5385 }
5386 if avwsadpi.LastBackupErrorDetail != nil {
5387 objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail
5388 }
5389 if avwsadpi.ProtectedItemDataSourceID != nil {
5390 objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID
5391 }
5392 if avwsadpi.ProtectedItemHealthStatus != "" {
5393 objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus
5394 }
5395 if avwsadpi.ExtendedInfo != nil {
5396 objectMap["extendedInfo"] = avwsadpi.ExtendedInfo
5397 }
5398 if avwsadpi.KpisHealths != nil {
5399 objectMap["kpisHealths"] = avwsadpi.KpisHealths
5400 }
5401 if avwsadpi.BackupManagementType != "" {
5402 objectMap["backupManagementType"] = avwsadpi.BackupManagementType
5403 }
5404 if avwsadpi.WorkloadType != "" {
5405 objectMap["workloadType"] = avwsadpi.WorkloadType
5406 }
5407 if avwsadpi.ContainerName != nil {
5408 objectMap["containerName"] = avwsadpi.ContainerName
5409 }
5410 if avwsadpi.SourceResourceID != nil {
5411 objectMap["sourceResourceId"] = avwsadpi.SourceResourceID
5412 }
5413 if avwsadpi.PolicyID != nil {
5414 objectMap["policyId"] = avwsadpi.PolicyID
5415 }
5416 if avwsadpi.LastRecoveryPoint != nil {
5417 objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint
5418 }
5419 if avwsadpi.BackupSetName != nil {
5420 objectMap["backupSetName"] = avwsadpi.BackupSetName
5421 }
5422 if avwsadpi.CreateMode != "" {
5423 objectMap["createMode"] = avwsadpi.CreateMode
5424 }
5425 if avwsadpi.DeferredDeleteTimeInUTC != nil {
5426 objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC
5427 }
5428 if avwsadpi.IsScheduledForDeferredDelete != nil {
5429 objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete
5430 }
5431 if avwsadpi.DeferredDeleteTimeRemaining != nil {
5432 objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining
5433 }
5434 if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil {
5435 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming
5436 }
5437 if avwsadpi.IsRehydrate != nil {
5438 objectMap["isRehydrate"] = avwsadpi.IsRehydrate
5439 }
5440 if avwsadpi.ResourceGuardOperationRequests != nil {
5441 objectMap["resourceGuardOperationRequests"] = avwsadpi.ResourceGuardOperationRequests
5442 }
5443 if avwsadpi.IsArchiveEnabled != nil {
5444 objectMap["isArchiveEnabled"] = avwsadpi.IsArchiveEnabled
5445 }
5446 if avwsadpi.PolicyName != nil {
5447 objectMap["policyName"] = avwsadpi.PolicyName
5448 }
5449 if avwsadpi.ProtectedItemType != "" {
5450 objectMap["protectedItemType"] = avwsadpi.ProtectedItemType
5451 }
5452 return json.Marshal(objectMap)
5453 }
5454
5455
5456 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5457 return nil, false
5458 }
5459
5460
5461 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5462 return nil, false
5463 }
5464
5465
5466 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5467 return nil, false
5468 }
5469
5470
5471 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5472 return nil, false
5473 }
5474
5475
5476 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5477 return nil, false
5478 }
5479
5480
5481 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5482 return nil, false
5483 }
5484
5485
5486 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5487 return nil, false
5488 }
5489
5490
5491 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5492 return &avwsadpi, true
5493 }
5494
5495
5496 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5497 return &avwsadpi, true
5498 }
5499
5500
5501 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5502 return nil, false
5503 }
5504
5505
5506 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5507 return nil, false
5508 }
5509
5510
5511 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5512 return nil, false
5513 }
5514
5515
5516 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5517 return nil, false
5518 }
5519
5520
5521 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5522 return nil, false
5523 }
5524
5525
5526 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5527 return nil, false
5528 }
5529
5530
5531 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5532 return &avwsadpi, true
5533 }
5534
5535
5536
5537 type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct {
5538
5539 ParentName *string `json:"parentName,omitempty"`
5540
5541 ServerName *string `json:"serverName,omitempty"`
5542
5543 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5544
5545 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5546
5547 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5548
5549 BackupManagementType *string `json:"backupManagementType,omitempty"`
5550
5551 WorkloadType *string `json:"workloadType,omitempty"`
5552
5553 FriendlyName *string `json:"friendlyName,omitempty"`
5554
5555 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5556
5557 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5558 }
5559
5560
5561 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
5562 avwsadwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase
5563 objectMap := make(map[string]interface{})
5564 if avwsadwi.ParentName != nil {
5565 objectMap["parentName"] = avwsadwi.ParentName
5566 }
5567 if avwsadwi.ServerName != nil {
5568 objectMap["serverName"] = avwsadwi.ServerName
5569 }
5570 if avwsadwi.IsAutoProtectable != nil {
5571 objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable
5572 }
5573 if avwsadwi.Subinquireditemcount != nil {
5574 objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount
5575 }
5576 if avwsadwi.SubWorkloadItemCount != nil {
5577 objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount
5578 }
5579 if avwsadwi.BackupManagementType != nil {
5580 objectMap["backupManagementType"] = avwsadwi.BackupManagementType
5581 }
5582 if avwsadwi.WorkloadType != nil {
5583 objectMap["workloadType"] = avwsadwi.WorkloadType
5584 }
5585 if avwsadwi.FriendlyName != nil {
5586 objectMap["friendlyName"] = avwsadwi.FriendlyName
5587 }
5588 if avwsadwi.ProtectionState != "" {
5589 objectMap["protectionState"] = avwsadwi.ProtectionState
5590 }
5591 if avwsadwi.WorkloadItemType != "" {
5592 objectMap["workloadItemType"] = avwsadwi.WorkloadItemType
5593 }
5594 return json.Marshal(objectMap)
5595 }
5596
5597
5598 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5599 return nil, false
5600 }
5601
5602
5603 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5604 return &avwsadwi, true
5605 }
5606
5607
5608 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5609 return &avwsadwi, true
5610 }
5611
5612
5613 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5614 return nil, false
5615 }
5616
5617
5618 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5619 return nil, false
5620 }
5621
5622
5623 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5624 return nil, false
5625 }
5626
5627
5628 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5629 return nil, false
5630 }
5631
5632
5633 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5634 return nil, false
5635 }
5636
5637
5638 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5639 return nil, false
5640 }
5641
5642
5643 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5644 return &avwsadwi, true
5645 }
5646
5647
5648
5649 type AzureVMWorkloadSAPAseSystemProtectableItem struct {
5650
5651 ParentName *string `json:"parentName,omitempty"`
5652
5653
5654 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5655
5656 ServerName *string `json:"serverName,omitempty"`
5657
5658 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5659
5660 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5661
5662 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5663
5664 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5665
5666 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5667
5668 BackupManagementType *string `json:"backupManagementType,omitempty"`
5669
5670 WorkloadType *string `json:"workloadType,omitempty"`
5671
5672 FriendlyName *string `json:"friendlyName,omitempty"`
5673
5674 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5675
5676 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5677 }
5678
5679
5680 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) {
5681 avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem
5682 objectMap := make(map[string]interface{})
5683 if avwsaspi.ParentName != nil {
5684 objectMap["parentName"] = avwsaspi.ParentName
5685 }
5686 if avwsaspi.ParentUniqueName != nil {
5687 objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName
5688 }
5689 if avwsaspi.ServerName != nil {
5690 objectMap["serverName"] = avwsaspi.ServerName
5691 }
5692 if avwsaspi.IsAutoProtectable != nil {
5693 objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable
5694 }
5695 if avwsaspi.IsAutoProtected != nil {
5696 objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected
5697 }
5698 if avwsaspi.Subinquireditemcount != nil {
5699 objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount
5700 }
5701 if avwsaspi.Subprotectableitemcount != nil {
5702 objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount
5703 }
5704 if avwsaspi.Prebackupvalidation != nil {
5705 objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation
5706 }
5707 if avwsaspi.BackupManagementType != nil {
5708 objectMap["backupManagementType"] = avwsaspi.BackupManagementType
5709 }
5710 if avwsaspi.WorkloadType != nil {
5711 objectMap["workloadType"] = avwsaspi.WorkloadType
5712 }
5713 if avwsaspi.FriendlyName != nil {
5714 objectMap["friendlyName"] = avwsaspi.FriendlyName
5715 }
5716 if avwsaspi.ProtectionState != "" {
5717 objectMap["protectionState"] = avwsaspi.ProtectionState
5718 }
5719 if avwsaspi.ProtectableItemType != "" {
5720 objectMap["protectableItemType"] = avwsaspi.ProtectableItemType
5721 }
5722 return json.Marshal(objectMap)
5723 }
5724
5725
5726 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5727 return nil, false
5728 }
5729
5730
5731 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5732 return nil, false
5733 }
5734
5735
5736 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5737 return nil, false
5738 }
5739
5740
5741 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5742 return nil, false
5743 }
5744
5745
5746 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5747 return &avwsaspi, true
5748 }
5749
5750
5751 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5752 return &avwsaspi, true
5753 }
5754
5755
5756 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5757 return nil, false
5758 }
5759
5760
5761 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5762 return nil, false
5763 }
5764
5765
5766 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5767 return nil, false
5768 }
5769
5770
5771 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5772 return nil, false
5773 }
5774
5775
5776 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5777 return nil, false
5778 }
5779
5780
5781 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5782 return nil, false
5783 }
5784
5785
5786 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5787 return nil, false
5788 }
5789
5790
5791 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5792 return nil, false
5793 }
5794
5795
5796 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5797 return &avwsaspi, true
5798 }
5799
5800
5801
5802 type AzureVMWorkloadSAPAseSystemWorkloadItem struct {
5803
5804 ParentName *string `json:"parentName,omitempty"`
5805
5806 ServerName *string `json:"serverName,omitempty"`
5807
5808 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5809
5810 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5811
5812 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5813
5814 BackupManagementType *string `json:"backupManagementType,omitempty"`
5815
5816 WorkloadType *string `json:"workloadType,omitempty"`
5817
5818 FriendlyName *string `json:"friendlyName,omitempty"`
5819
5820 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5821
5822 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5823 }
5824
5825
5826 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) {
5827 avwsaswi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem
5828 objectMap := make(map[string]interface{})
5829 if avwsaswi.ParentName != nil {
5830 objectMap["parentName"] = avwsaswi.ParentName
5831 }
5832 if avwsaswi.ServerName != nil {
5833 objectMap["serverName"] = avwsaswi.ServerName
5834 }
5835 if avwsaswi.IsAutoProtectable != nil {
5836 objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable
5837 }
5838 if avwsaswi.Subinquireditemcount != nil {
5839 objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount
5840 }
5841 if avwsaswi.SubWorkloadItemCount != nil {
5842 objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount
5843 }
5844 if avwsaswi.BackupManagementType != nil {
5845 objectMap["backupManagementType"] = avwsaswi.BackupManagementType
5846 }
5847 if avwsaswi.WorkloadType != nil {
5848 objectMap["workloadType"] = avwsaswi.WorkloadType
5849 }
5850 if avwsaswi.FriendlyName != nil {
5851 objectMap["friendlyName"] = avwsaswi.FriendlyName
5852 }
5853 if avwsaswi.ProtectionState != "" {
5854 objectMap["protectionState"] = avwsaswi.ProtectionState
5855 }
5856 if avwsaswi.WorkloadItemType != "" {
5857 objectMap["workloadItemType"] = avwsaswi.WorkloadItemType
5858 }
5859 return json.Marshal(objectMap)
5860 }
5861
5862
5863 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5864 return nil, false
5865 }
5866
5867
5868 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5869 return &avwsaswi, true
5870 }
5871
5872
5873 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5874 return nil, false
5875 }
5876
5877
5878 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5879 return &avwsaswi, true
5880 }
5881
5882
5883 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5884 return nil, false
5885 }
5886
5887
5888 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5889 return nil, false
5890 }
5891
5892
5893 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5894 return nil, false
5895 }
5896
5897
5898 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5899 return nil, false
5900 }
5901
5902
5903 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5904 return nil, false
5905 }
5906
5907
5908 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5909 return &avwsaswi, true
5910 }
5911
5912
5913
5914 type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct {
5915
5916 ParentName *string `json:"parentName,omitempty"`
5917
5918
5919 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5920
5921 ServerName *string `json:"serverName,omitempty"`
5922
5923 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5924
5925 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5926
5927 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5928
5929 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5930
5931 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5932
5933 BackupManagementType *string `json:"backupManagementType,omitempty"`
5934
5935 WorkloadType *string `json:"workloadType,omitempty"`
5936
5937 FriendlyName *string `json:"friendlyName,omitempty"`
5938
5939 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5940
5941 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5942 }
5943
5944
5945 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
5946 avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase
5947 objectMap := make(map[string]interface{})
5948 if avwshdpi.ParentName != nil {
5949 objectMap["parentName"] = avwshdpi.ParentName
5950 }
5951 if avwshdpi.ParentUniqueName != nil {
5952 objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName
5953 }
5954 if avwshdpi.ServerName != nil {
5955 objectMap["serverName"] = avwshdpi.ServerName
5956 }
5957 if avwshdpi.IsAutoProtectable != nil {
5958 objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable
5959 }
5960 if avwshdpi.IsAutoProtected != nil {
5961 objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected
5962 }
5963 if avwshdpi.Subinquireditemcount != nil {
5964 objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount
5965 }
5966 if avwshdpi.Subprotectableitemcount != nil {
5967 objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount
5968 }
5969 if avwshdpi.Prebackupvalidation != nil {
5970 objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation
5971 }
5972 if avwshdpi.BackupManagementType != nil {
5973 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
5974 }
5975 if avwshdpi.WorkloadType != nil {
5976 objectMap["workloadType"] = avwshdpi.WorkloadType
5977 }
5978 if avwshdpi.FriendlyName != nil {
5979 objectMap["friendlyName"] = avwshdpi.FriendlyName
5980 }
5981 if avwshdpi.ProtectionState != "" {
5982 objectMap["protectionState"] = avwshdpi.ProtectionState
5983 }
5984 if avwshdpi.ProtectableItemType != "" {
5985 objectMap["protectableItemType"] = avwshdpi.ProtectableItemType
5986 }
5987 return json.Marshal(objectMap)
5988 }
5989
5990
5991 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5992 return nil, false
5993 }
5994
5995
5996 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5997 return nil, false
5998 }
5999
6000
6001 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6002 return nil, false
6003 }
6004
6005
6006 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6007 return nil, false
6008 }
6009
6010
6011 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6012 return &avwshdpi, true
6013 }
6014
6015
6016 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6017 return nil, false
6018 }
6019
6020
6021 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6022 return &avwshdpi, true
6023 }
6024
6025
6026 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6027 return nil, false
6028 }
6029
6030
6031 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6032 return nil, false
6033 }
6034
6035
6036 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6037 return nil, false
6038 }
6039
6040
6041 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6042 return nil, false
6043 }
6044
6045
6046 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6047 return nil, false
6048 }
6049
6050
6051 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6052 return nil, false
6053 }
6054
6055
6056 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6057 return nil, false
6058 }
6059
6060
6061 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6062 return &avwshdpi, true
6063 }
6064
6065
6066
6067 type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct {
6068
6069 FriendlyName *string `json:"friendlyName,omitempty"`
6070
6071 ServerName *string `json:"serverName,omitempty"`
6072
6073 ParentName *string `json:"parentName,omitempty"`
6074
6075 ParentType *string `json:"parentType,omitempty"`
6076
6077 ProtectionStatus *string `json:"protectionStatus,omitempty"`
6078
6079 ProtectionState ProtectionState `json:"protectionState,omitempty"`
6080
6081 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
6082
6083 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
6084
6085 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
6086
6087 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
6088
6089 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
6090
6091 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
6092
6093 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
6094
6095 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
6096
6097 WorkloadType DataSourceType `json:"workloadType,omitempty"`
6098
6099 ContainerName *string `json:"containerName,omitempty"`
6100
6101 SourceResourceID *string `json:"sourceResourceId,omitempty"`
6102
6103 PolicyID *string `json:"policyId,omitempty"`
6104
6105 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
6106
6107 BackupSetName *string `json:"backupSetName,omitempty"`
6108
6109 CreateMode CreateMode `json:"createMode,omitempty"`
6110
6111 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
6112
6113 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
6114
6115 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
6116
6117 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
6118
6119 IsRehydrate *bool `json:"isRehydrate,omitempty"`
6120
6121 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
6122
6123 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
6124
6125 PolicyName *string `json:"policyName,omitempty"`
6126
6127 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
6128 }
6129
6130
6131 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
6132 avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase
6133 objectMap := make(map[string]interface{})
6134 if avwshdpi.FriendlyName != nil {
6135 objectMap["friendlyName"] = avwshdpi.FriendlyName
6136 }
6137 if avwshdpi.ServerName != nil {
6138 objectMap["serverName"] = avwshdpi.ServerName
6139 }
6140 if avwshdpi.ParentName != nil {
6141 objectMap["parentName"] = avwshdpi.ParentName
6142 }
6143 if avwshdpi.ParentType != nil {
6144 objectMap["parentType"] = avwshdpi.ParentType
6145 }
6146 if avwshdpi.ProtectionStatus != nil {
6147 objectMap["protectionStatus"] = avwshdpi.ProtectionStatus
6148 }
6149 if avwshdpi.ProtectionState != "" {
6150 objectMap["protectionState"] = avwshdpi.ProtectionState
6151 }
6152 if avwshdpi.LastBackupStatus != "" {
6153 objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus
6154 }
6155 if avwshdpi.LastBackupTime != nil {
6156 objectMap["lastBackupTime"] = avwshdpi.LastBackupTime
6157 }
6158 if avwshdpi.LastBackupErrorDetail != nil {
6159 objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail
6160 }
6161 if avwshdpi.ProtectedItemDataSourceID != nil {
6162 objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID
6163 }
6164 if avwshdpi.ProtectedItemHealthStatus != "" {
6165 objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus
6166 }
6167 if avwshdpi.ExtendedInfo != nil {
6168 objectMap["extendedInfo"] = avwshdpi.ExtendedInfo
6169 }
6170 if avwshdpi.KpisHealths != nil {
6171 objectMap["kpisHealths"] = avwshdpi.KpisHealths
6172 }
6173 if avwshdpi.BackupManagementType != "" {
6174 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
6175 }
6176 if avwshdpi.WorkloadType != "" {
6177 objectMap["workloadType"] = avwshdpi.WorkloadType
6178 }
6179 if avwshdpi.ContainerName != nil {
6180 objectMap["containerName"] = avwshdpi.ContainerName
6181 }
6182 if avwshdpi.SourceResourceID != nil {
6183 objectMap["sourceResourceId"] = avwshdpi.SourceResourceID
6184 }
6185 if avwshdpi.PolicyID != nil {
6186 objectMap["policyId"] = avwshdpi.PolicyID
6187 }
6188 if avwshdpi.LastRecoveryPoint != nil {
6189 objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint
6190 }
6191 if avwshdpi.BackupSetName != nil {
6192 objectMap["backupSetName"] = avwshdpi.BackupSetName
6193 }
6194 if avwshdpi.CreateMode != "" {
6195 objectMap["createMode"] = avwshdpi.CreateMode
6196 }
6197 if avwshdpi.DeferredDeleteTimeInUTC != nil {
6198 objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC
6199 }
6200 if avwshdpi.IsScheduledForDeferredDelete != nil {
6201 objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete
6202 }
6203 if avwshdpi.DeferredDeleteTimeRemaining != nil {
6204 objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining
6205 }
6206 if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil {
6207 objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming
6208 }
6209 if avwshdpi.IsRehydrate != nil {
6210 objectMap["isRehydrate"] = avwshdpi.IsRehydrate
6211 }
6212 if avwshdpi.ResourceGuardOperationRequests != nil {
6213 objectMap["resourceGuardOperationRequests"] = avwshdpi.ResourceGuardOperationRequests
6214 }
6215 if avwshdpi.IsArchiveEnabled != nil {
6216 objectMap["isArchiveEnabled"] = avwshdpi.IsArchiveEnabled
6217 }
6218 if avwshdpi.PolicyName != nil {
6219 objectMap["policyName"] = avwshdpi.PolicyName
6220 }
6221 if avwshdpi.ProtectedItemType != "" {
6222 objectMap["protectedItemType"] = avwshdpi.ProtectedItemType
6223 }
6224 return json.Marshal(objectMap)
6225 }
6226
6227
6228 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
6229 return nil, false
6230 }
6231
6232
6233 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
6234 return nil, false
6235 }
6236
6237
6238 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
6239 return nil, false
6240 }
6241
6242
6243 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
6244 return nil, false
6245 }
6246
6247
6248 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
6249 return nil, false
6250 }
6251
6252
6253 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
6254 return nil, false
6255 }
6256
6257
6258 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
6259 return nil, false
6260 }
6261
6262
6263 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
6264 return &avwshdpi, true
6265 }
6266
6267
6268 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
6269 return nil, false
6270 }
6271
6272
6273 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
6274 return &avwshdpi, true
6275 }
6276
6277
6278 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
6279 return nil, false
6280 }
6281
6282
6283 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
6284 return nil, false
6285 }
6286
6287
6288 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
6289 return nil, false
6290 }
6291
6292
6293 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
6294 return nil, false
6295 }
6296
6297
6298 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
6299 return nil, false
6300 }
6301
6302
6303 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
6304 return &avwshdpi, true
6305 }
6306
6307
6308
6309 type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct {
6310
6311 ParentName *string `json:"parentName,omitempty"`
6312
6313 ServerName *string `json:"serverName,omitempty"`
6314
6315 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6316
6317 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6318
6319 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6320
6321 BackupManagementType *string `json:"backupManagementType,omitempty"`
6322
6323 WorkloadType *string `json:"workloadType,omitempty"`
6324
6325 FriendlyName *string `json:"friendlyName,omitempty"`
6326
6327 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6328
6329 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6330 }
6331
6332
6333 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
6334 avwshdwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase
6335 objectMap := make(map[string]interface{})
6336 if avwshdwi.ParentName != nil {
6337 objectMap["parentName"] = avwshdwi.ParentName
6338 }
6339 if avwshdwi.ServerName != nil {
6340 objectMap["serverName"] = avwshdwi.ServerName
6341 }
6342 if avwshdwi.IsAutoProtectable != nil {
6343 objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable
6344 }
6345 if avwshdwi.Subinquireditemcount != nil {
6346 objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount
6347 }
6348 if avwshdwi.SubWorkloadItemCount != nil {
6349 objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount
6350 }
6351 if avwshdwi.BackupManagementType != nil {
6352 objectMap["backupManagementType"] = avwshdwi.BackupManagementType
6353 }
6354 if avwshdwi.WorkloadType != nil {
6355 objectMap["workloadType"] = avwshdwi.WorkloadType
6356 }
6357 if avwshdwi.FriendlyName != nil {
6358 objectMap["friendlyName"] = avwshdwi.FriendlyName
6359 }
6360 if avwshdwi.ProtectionState != "" {
6361 objectMap["protectionState"] = avwshdwi.ProtectionState
6362 }
6363 if avwshdwi.WorkloadItemType != "" {
6364 objectMap["workloadItemType"] = avwshdwi.WorkloadItemType
6365 }
6366 return json.Marshal(objectMap)
6367 }
6368
6369
6370 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6371 return nil, false
6372 }
6373
6374
6375 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6376 return &avwshdwi, true
6377 }
6378
6379
6380 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6381 return nil, false
6382 }
6383
6384
6385 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6386 return nil, false
6387 }
6388
6389
6390 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6391 return &avwshdwi, true
6392 }
6393
6394
6395 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6396 return nil, false
6397 }
6398
6399
6400 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6401 return nil, false
6402 }
6403
6404
6405 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6406 return nil, false
6407 }
6408
6409
6410 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6411 return nil, false
6412 }
6413
6414
6415 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6416 return &avwshdwi, true
6417 }
6418
6419
6420
6421 type AzureVMWorkloadSAPHanaSystemProtectableItem struct {
6422
6423 ParentName *string `json:"parentName,omitempty"`
6424
6425
6426 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6427
6428 ServerName *string `json:"serverName,omitempty"`
6429
6430 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6431
6432 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6433
6434 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6435
6436 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6437
6438 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6439
6440 BackupManagementType *string `json:"backupManagementType,omitempty"`
6441
6442 WorkloadType *string `json:"workloadType,omitempty"`
6443
6444 FriendlyName *string `json:"friendlyName,omitempty"`
6445
6446 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6447
6448 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6449 }
6450
6451
6452 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) {
6453 avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem
6454 objectMap := make(map[string]interface{})
6455 if avwshspi.ParentName != nil {
6456 objectMap["parentName"] = avwshspi.ParentName
6457 }
6458 if avwshspi.ParentUniqueName != nil {
6459 objectMap["parentUniqueName"] = avwshspi.ParentUniqueName
6460 }
6461 if avwshspi.ServerName != nil {
6462 objectMap["serverName"] = avwshspi.ServerName
6463 }
6464 if avwshspi.IsAutoProtectable != nil {
6465 objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable
6466 }
6467 if avwshspi.IsAutoProtected != nil {
6468 objectMap["isAutoProtected"] = avwshspi.IsAutoProtected
6469 }
6470 if avwshspi.Subinquireditemcount != nil {
6471 objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount
6472 }
6473 if avwshspi.Subprotectableitemcount != nil {
6474 objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount
6475 }
6476 if avwshspi.Prebackupvalidation != nil {
6477 objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation
6478 }
6479 if avwshspi.BackupManagementType != nil {
6480 objectMap["backupManagementType"] = avwshspi.BackupManagementType
6481 }
6482 if avwshspi.WorkloadType != nil {
6483 objectMap["workloadType"] = avwshspi.WorkloadType
6484 }
6485 if avwshspi.FriendlyName != nil {
6486 objectMap["friendlyName"] = avwshspi.FriendlyName
6487 }
6488 if avwshspi.ProtectionState != "" {
6489 objectMap["protectionState"] = avwshspi.ProtectionState
6490 }
6491 if avwshspi.ProtectableItemType != "" {
6492 objectMap["protectableItemType"] = avwshspi.ProtectableItemType
6493 }
6494 return json.Marshal(objectMap)
6495 }
6496
6497
6498 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6499 return nil, false
6500 }
6501
6502
6503 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6504 return nil, false
6505 }
6506
6507
6508 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6509 return nil, false
6510 }
6511
6512
6513 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6514 return nil, false
6515 }
6516
6517
6518 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6519 return &avwshspi, true
6520 }
6521
6522
6523 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6524 return nil, false
6525 }
6526
6527
6528 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6529 return nil, false
6530 }
6531
6532
6533 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6534 return &avwshspi, true
6535 }
6536
6537
6538 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6539 return nil, false
6540 }
6541
6542
6543 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6544 return nil, false
6545 }
6546
6547
6548 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6549 return nil, false
6550 }
6551
6552
6553 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6554 return nil, false
6555 }
6556
6557
6558 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6559 return nil, false
6560 }
6561
6562
6563 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6564 return nil, false
6565 }
6566
6567
6568 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6569 return &avwshspi, true
6570 }
6571
6572
6573
6574 type AzureVMWorkloadSAPHanaSystemWorkloadItem struct {
6575
6576 ParentName *string `json:"parentName,omitempty"`
6577
6578 ServerName *string `json:"serverName,omitempty"`
6579
6580 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6581
6582 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6583
6584 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6585
6586 BackupManagementType *string `json:"backupManagementType,omitempty"`
6587
6588 WorkloadType *string `json:"workloadType,omitempty"`
6589
6590 FriendlyName *string `json:"friendlyName,omitempty"`
6591
6592 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6593
6594 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6595 }
6596
6597
6598 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) {
6599 avwshswi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem
6600 objectMap := make(map[string]interface{})
6601 if avwshswi.ParentName != nil {
6602 objectMap["parentName"] = avwshswi.ParentName
6603 }
6604 if avwshswi.ServerName != nil {
6605 objectMap["serverName"] = avwshswi.ServerName
6606 }
6607 if avwshswi.IsAutoProtectable != nil {
6608 objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable
6609 }
6610 if avwshswi.Subinquireditemcount != nil {
6611 objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount
6612 }
6613 if avwshswi.SubWorkloadItemCount != nil {
6614 objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount
6615 }
6616 if avwshswi.BackupManagementType != nil {
6617 objectMap["backupManagementType"] = avwshswi.BackupManagementType
6618 }
6619 if avwshswi.WorkloadType != nil {
6620 objectMap["workloadType"] = avwshswi.WorkloadType
6621 }
6622 if avwshswi.FriendlyName != nil {
6623 objectMap["friendlyName"] = avwshswi.FriendlyName
6624 }
6625 if avwshswi.ProtectionState != "" {
6626 objectMap["protectionState"] = avwshswi.ProtectionState
6627 }
6628 if avwshswi.WorkloadItemType != "" {
6629 objectMap["workloadItemType"] = avwshswi.WorkloadItemType
6630 }
6631 return json.Marshal(objectMap)
6632 }
6633
6634
6635 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6636 return nil, false
6637 }
6638
6639
6640 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6641 return &avwshswi, true
6642 }
6643
6644
6645 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6646 return nil, false
6647 }
6648
6649
6650 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6651 return nil, false
6652 }
6653
6654
6655 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6656 return nil, false
6657 }
6658
6659
6660 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6661 return &avwshswi, true
6662 }
6663
6664
6665 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6666 return nil, false
6667 }
6668
6669
6670 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6671 return nil, false
6672 }
6673
6674
6675 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6676 return nil, false
6677 }
6678
6679
6680 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6681 return &avwshswi, true
6682 }
6683
6684
6685
6686 type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct {
6687
6688 ParentName *string `json:"parentName,omitempty"`
6689
6690
6691 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6692
6693 ServerName *string `json:"serverName,omitempty"`
6694
6695 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6696
6697 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6698
6699 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6700
6701 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6702
6703 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6704
6705 BackupManagementType *string `json:"backupManagementType,omitempty"`
6706
6707 WorkloadType *string `json:"workloadType,omitempty"`
6708
6709 FriendlyName *string `json:"friendlyName,omitempty"`
6710
6711 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6712
6713 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6714 }
6715
6716
6717 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) {
6718 avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer
6719 objectMap := make(map[string]interface{})
6720 if avwsagpi.ParentName != nil {
6721 objectMap["parentName"] = avwsagpi.ParentName
6722 }
6723 if avwsagpi.ParentUniqueName != nil {
6724 objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName
6725 }
6726 if avwsagpi.ServerName != nil {
6727 objectMap["serverName"] = avwsagpi.ServerName
6728 }
6729 if avwsagpi.IsAutoProtectable != nil {
6730 objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable
6731 }
6732 if avwsagpi.IsAutoProtected != nil {
6733 objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected
6734 }
6735 if avwsagpi.Subinquireditemcount != nil {
6736 objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount
6737 }
6738 if avwsagpi.Subprotectableitemcount != nil {
6739 objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount
6740 }
6741 if avwsagpi.Prebackupvalidation != nil {
6742 objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation
6743 }
6744 if avwsagpi.BackupManagementType != nil {
6745 objectMap["backupManagementType"] = avwsagpi.BackupManagementType
6746 }
6747 if avwsagpi.WorkloadType != nil {
6748 objectMap["workloadType"] = avwsagpi.WorkloadType
6749 }
6750 if avwsagpi.FriendlyName != nil {
6751 objectMap["friendlyName"] = avwsagpi.FriendlyName
6752 }
6753 if avwsagpi.ProtectionState != "" {
6754 objectMap["protectionState"] = avwsagpi.ProtectionState
6755 }
6756 if avwsagpi.ProtectableItemType != "" {
6757 objectMap["protectableItemType"] = avwsagpi.ProtectableItemType
6758 }
6759 return json.Marshal(objectMap)
6760 }
6761
6762
6763 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6764 return nil, false
6765 }
6766
6767
6768 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6769 return nil, false
6770 }
6771
6772
6773 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6774 return nil, false
6775 }
6776
6777
6778 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6779 return nil, false
6780 }
6781
6782
6783 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6784 return &avwsagpi, true
6785 }
6786
6787
6788 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6789 return nil, false
6790 }
6791
6792
6793 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6794 return nil, false
6795 }
6796
6797
6798 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6799 return nil, false
6800 }
6801
6802
6803 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6804 return &avwsagpi, true
6805 }
6806
6807
6808 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6809 return nil, false
6810 }
6811
6812
6813 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6814 return nil, false
6815 }
6816
6817
6818 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6819 return nil, false
6820 }
6821
6822
6823 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6824 return nil, false
6825 }
6826
6827
6828 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6829 return nil, false
6830 }
6831
6832
6833 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6834 return &avwsagpi, true
6835 }
6836
6837
6838
6839 type AzureVMWorkloadSQLDatabaseProtectableItem struct {
6840
6841 ParentName *string `json:"parentName,omitempty"`
6842
6843
6844 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6845
6846 ServerName *string `json:"serverName,omitempty"`
6847
6848 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6849
6850 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6851
6852 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6853
6854 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6855
6856 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6857
6858 BackupManagementType *string `json:"backupManagementType,omitempty"`
6859
6860 WorkloadType *string `json:"workloadType,omitempty"`
6861
6862 FriendlyName *string `json:"friendlyName,omitempty"`
6863
6864 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6865
6866 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6867 }
6868
6869
6870 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
6871 avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase
6872 objectMap := make(map[string]interface{})
6873 if avwsdpi.ParentName != nil {
6874 objectMap["parentName"] = avwsdpi.ParentName
6875 }
6876 if avwsdpi.ParentUniqueName != nil {
6877 objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName
6878 }
6879 if avwsdpi.ServerName != nil {
6880 objectMap["serverName"] = avwsdpi.ServerName
6881 }
6882 if avwsdpi.IsAutoProtectable != nil {
6883 objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable
6884 }
6885 if avwsdpi.IsAutoProtected != nil {
6886 objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected
6887 }
6888 if avwsdpi.Subinquireditemcount != nil {
6889 objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount
6890 }
6891 if avwsdpi.Subprotectableitemcount != nil {
6892 objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount
6893 }
6894 if avwsdpi.Prebackupvalidation != nil {
6895 objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation
6896 }
6897 if avwsdpi.BackupManagementType != nil {
6898 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6899 }
6900 if avwsdpi.WorkloadType != nil {
6901 objectMap["workloadType"] = avwsdpi.WorkloadType
6902 }
6903 if avwsdpi.FriendlyName != nil {
6904 objectMap["friendlyName"] = avwsdpi.FriendlyName
6905 }
6906 if avwsdpi.ProtectionState != "" {
6907 objectMap["protectionState"] = avwsdpi.ProtectionState
6908 }
6909 if avwsdpi.ProtectableItemType != "" {
6910 objectMap["protectableItemType"] = avwsdpi.ProtectableItemType
6911 }
6912 return json.Marshal(objectMap)
6913 }
6914
6915
6916 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6917 return nil, false
6918 }
6919
6920
6921 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6922 return nil, false
6923 }
6924
6925
6926 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6927 return nil, false
6928 }
6929
6930
6931 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6932 return nil, false
6933 }
6934
6935
6936 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6937 return &avwsdpi, true
6938 }
6939
6940
6941 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6942 return nil, false
6943 }
6944
6945
6946 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6947 return nil, false
6948 }
6949
6950
6951 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6952 return nil, false
6953 }
6954
6955
6956 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6957 return nil, false
6958 }
6959
6960
6961 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6962 return &avwsdpi, true
6963 }
6964
6965
6966 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6967 return nil, false
6968 }
6969
6970
6971 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6972 return nil, false
6973 }
6974
6975
6976 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6977 return nil, false
6978 }
6979
6980
6981 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6982 return nil, false
6983 }
6984
6985
6986 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6987 return &avwsdpi, true
6988 }
6989
6990
6991
6992 type AzureVMWorkloadSQLDatabaseProtectedItem struct {
6993
6994 FriendlyName *string `json:"friendlyName,omitempty"`
6995
6996 ServerName *string `json:"serverName,omitempty"`
6997
6998 ParentName *string `json:"parentName,omitempty"`
6999
7000 ParentType *string `json:"parentType,omitempty"`
7001
7002 ProtectionStatus *string `json:"protectionStatus,omitempty"`
7003
7004 ProtectionState ProtectionState `json:"protectionState,omitempty"`
7005
7006 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
7007
7008 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
7009
7010 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
7011
7012 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
7013
7014 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
7015
7016 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
7017
7018 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
7019
7020 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7021
7022 WorkloadType DataSourceType `json:"workloadType,omitempty"`
7023
7024 ContainerName *string `json:"containerName,omitempty"`
7025
7026 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7027
7028 PolicyID *string `json:"policyId,omitempty"`
7029
7030 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
7031
7032 BackupSetName *string `json:"backupSetName,omitempty"`
7033
7034 CreateMode CreateMode `json:"createMode,omitempty"`
7035
7036 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
7037
7038 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
7039
7040 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
7041
7042 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
7043
7044 IsRehydrate *bool `json:"isRehydrate,omitempty"`
7045
7046 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
7047
7048 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
7049
7050 PolicyName *string `json:"policyName,omitempty"`
7051
7052 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
7053 }
7054
7055
7056 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
7057 avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase
7058 objectMap := make(map[string]interface{})
7059 if avwsdpi.FriendlyName != nil {
7060 objectMap["friendlyName"] = avwsdpi.FriendlyName
7061 }
7062 if avwsdpi.ServerName != nil {
7063 objectMap["serverName"] = avwsdpi.ServerName
7064 }
7065 if avwsdpi.ParentName != nil {
7066 objectMap["parentName"] = avwsdpi.ParentName
7067 }
7068 if avwsdpi.ParentType != nil {
7069 objectMap["parentType"] = avwsdpi.ParentType
7070 }
7071 if avwsdpi.ProtectionStatus != nil {
7072 objectMap["protectionStatus"] = avwsdpi.ProtectionStatus
7073 }
7074 if avwsdpi.ProtectionState != "" {
7075 objectMap["protectionState"] = avwsdpi.ProtectionState
7076 }
7077 if avwsdpi.LastBackupStatus != "" {
7078 objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus
7079 }
7080 if avwsdpi.LastBackupTime != nil {
7081 objectMap["lastBackupTime"] = avwsdpi.LastBackupTime
7082 }
7083 if avwsdpi.LastBackupErrorDetail != nil {
7084 objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail
7085 }
7086 if avwsdpi.ProtectedItemDataSourceID != nil {
7087 objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID
7088 }
7089 if avwsdpi.ProtectedItemHealthStatus != "" {
7090 objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus
7091 }
7092 if avwsdpi.ExtendedInfo != nil {
7093 objectMap["extendedInfo"] = avwsdpi.ExtendedInfo
7094 }
7095 if avwsdpi.KpisHealths != nil {
7096 objectMap["kpisHealths"] = avwsdpi.KpisHealths
7097 }
7098 if avwsdpi.BackupManagementType != "" {
7099 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
7100 }
7101 if avwsdpi.WorkloadType != "" {
7102 objectMap["workloadType"] = avwsdpi.WorkloadType
7103 }
7104 if avwsdpi.ContainerName != nil {
7105 objectMap["containerName"] = avwsdpi.ContainerName
7106 }
7107 if avwsdpi.SourceResourceID != nil {
7108 objectMap["sourceResourceId"] = avwsdpi.SourceResourceID
7109 }
7110 if avwsdpi.PolicyID != nil {
7111 objectMap["policyId"] = avwsdpi.PolicyID
7112 }
7113 if avwsdpi.LastRecoveryPoint != nil {
7114 objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint
7115 }
7116 if avwsdpi.BackupSetName != nil {
7117 objectMap["backupSetName"] = avwsdpi.BackupSetName
7118 }
7119 if avwsdpi.CreateMode != "" {
7120 objectMap["createMode"] = avwsdpi.CreateMode
7121 }
7122 if avwsdpi.DeferredDeleteTimeInUTC != nil {
7123 objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC
7124 }
7125 if avwsdpi.IsScheduledForDeferredDelete != nil {
7126 objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete
7127 }
7128 if avwsdpi.DeferredDeleteTimeRemaining != nil {
7129 objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining
7130 }
7131 if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil {
7132 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming
7133 }
7134 if avwsdpi.IsRehydrate != nil {
7135 objectMap["isRehydrate"] = avwsdpi.IsRehydrate
7136 }
7137 if avwsdpi.ResourceGuardOperationRequests != nil {
7138 objectMap["resourceGuardOperationRequests"] = avwsdpi.ResourceGuardOperationRequests
7139 }
7140 if avwsdpi.IsArchiveEnabled != nil {
7141 objectMap["isArchiveEnabled"] = avwsdpi.IsArchiveEnabled
7142 }
7143 if avwsdpi.PolicyName != nil {
7144 objectMap["policyName"] = avwsdpi.PolicyName
7145 }
7146 if avwsdpi.ProtectedItemType != "" {
7147 objectMap["protectedItemType"] = avwsdpi.ProtectedItemType
7148 }
7149 return json.Marshal(objectMap)
7150 }
7151
7152
7153 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
7154 return nil, false
7155 }
7156
7157
7158 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
7159 return nil, false
7160 }
7161
7162
7163 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
7164 return nil, false
7165 }
7166
7167
7168 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
7169 return nil, false
7170 }
7171
7172
7173 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
7174 return nil, false
7175 }
7176
7177
7178 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
7179 return nil, false
7180 }
7181
7182
7183 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
7184 return nil, false
7185 }
7186
7187
7188 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
7189 return &avwsdpi, true
7190 }
7191
7192
7193 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
7194 return nil, false
7195 }
7196
7197
7198 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
7199 return nil, false
7200 }
7201
7202
7203 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
7204 return &avwsdpi, true
7205 }
7206
7207
7208 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
7209 return nil, false
7210 }
7211
7212
7213 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
7214 return nil, false
7215 }
7216
7217
7218 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
7219 return nil, false
7220 }
7221
7222
7223 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
7224 return nil, false
7225 }
7226
7227
7228 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
7229 return &avwsdpi, true
7230 }
7231
7232
7233
7234 type AzureVMWorkloadSQLDatabaseWorkloadItem struct {
7235
7236 ParentName *string `json:"parentName,omitempty"`
7237
7238 ServerName *string `json:"serverName,omitempty"`
7239
7240 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
7241
7242 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
7243
7244 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
7245
7246 BackupManagementType *string `json:"backupManagementType,omitempty"`
7247
7248 WorkloadType *string `json:"workloadType,omitempty"`
7249
7250 FriendlyName *string `json:"friendlyName,omitempty"`
7251
7252 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7253
7254 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
7255 }
7256
7257
7258 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
7259 avwsdwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase
7260 objectMap := make(map[string]interface{})
7261 if avwsdwi.ParentName != nil {
7262 objectMap["parentName"] = avwsdwi.ParentName
7263 }
7264 if avwsdwi.ServerName != nil {
7265 objectMap["serverName"] = avwsdwi.ServerName
7266 }
7267 if avwsdwi.IsAutoProtectable != nil {
7268 objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable
7269 }
7270 if avwsdwi.Subinquireditemcount != nil {
7271 objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount
7272 }
7273 if avwsdwi.SubWorkloadItemCount != nil {
7274 objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount
7275 }
7276 if avwsdwi.BackupManagementType != nil {
7277 objectMap["backupManagementType"] = avwsdwi.BackupManagementType
7278 }
7279 if avwsdwi.WorkloadType != nil {
7280 objectMap["workloadType"] = avwsdwi.WorkloadType
7281 }
7282 if avwsdwi.FriendlyName != nil {
7283 objectMap["friendlyName"] = avwsdwi.FriendlyName
7284 }
7285 if avwsdwi.ProtectionState != "" {
7286 objectMap["protectionState"] = avwsdwi.ProtectionState
7287 }
7288 if avwsdwi.WorkloadItemType != "" {
7289 objectMap["workloadItemType"] = avwsdwi.WorkloadItemType
7290 }
7291 return json.Marshal(objectMap)
7292 }
7293
7294
7295 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
7296 return nil, false
7297 }
7298
7299
7300 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
7301 return &avwsdwi, true
7302 }
7303
7304
7305 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
7306 return nil, false
7307 }
7308
7309
7310 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
7311 return nil, false
7312 }
7313
7314
7315 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
7316 return nil, false
7317 }
7318
7319
7320 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
7321 return nil, false
7322 }
7323
7324
7325 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
7326 return &avwsdwi, true
7327 }
7328
7329
7330 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
7331 return nil, false
7332 }
7333
7334
7335 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
7336 return nil, false
7337 }
7338
7339
7340 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
7341 return &avwsdwi, true
7342 }
7343
7344
7345
7346 type AzureVMWorkloadSQLInstanceProtectableItem struct {
7347
7348 ParentName *string `json:"parentName,omitempty"`
7349
7350
7351 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
7352
7353 ServerName *string `json:"serverName,omitempty"`
7354
7355 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
7356
7357 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
7358
7359 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
7360
7361 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
7362
7363 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
7364
7365 BackupManagementType *string `json:"backupManagementType,omitempty"`
7366
7367 WorkloadType *string `json:"workloadType,omitempty"`
7368
7369 FriendlyName *string `json:"friendlyName,omitempty"`
7370
7371 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7372
7373 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
7374 }
7375
7376
7377 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) {
7378 avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance
7379 objectMap := make(map[string]interface{})
7380 if avwsipi.ParentName != nil {
7381 objectMap["parentName"] = avwsipi.ParentName
7382 }
7383 if avwsipi.ParentUniqueName != nil {
7384 objectMap["parentUniqueName"] = avwsipi.ParentUniqueName
7385 }
7386 if avwsipi.ServerName != nil {
7387 objectMap["serverName"] = avwsipi.ServerName
7388 }
7389 if avwsipi.IsAutoProtectable != nil {
7390 objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable
7391 }
7392 if avwsipi.IsAutoProtected != nil {
7393 objectMap["isAutoProtected"] = avwsipi.IsAutoProtected
7394 }
7395 if avwsipi.Subinquireditemcount != nil {
7396 objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount
7397 }
7398 if avwsipi.Subprotectableitemcount != nil {
7399 objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount
7400 }
7401 if avwsipi.Prebackupvalidation != nil {
7402 objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation
7403 }
7404 if avwsipi.BackupManagementType != nil {
7405 objectMap["backupManagementType"] = avwsipi.BackupManagementType
7406 }
7407 if avwsipi.WorkloadType != nil {
7408 objectMap["workloadType"] = avwsipi.WorkloadType
7409 }
7410 if avwsipi.FriendlyName != nil {
7411 objectMap["friendlyName"] = avwsipi.FriendlyName
7412 }
7413 if avwsipi.ProtectionState != "" {
7414 objectMap["protectionState"] = avwsipi.ProtectionState
7415 }
7416 if avwsipi.ProtectableItemType != "" {
7417 objectMap["protectableItemType"] = avwsipi.ProtectableItemType
7418 }
7419 return json.Marshal(objectMap)
7420 }
7421
7422
7423 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
7424 return nil, false
7425 }
7426
7427
7428 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
7429 return nil, false
7430 }
7431
7432
7433 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
7434 return nil, false
7435 }
7436
7437
7438 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
7439 return nil, false
7440 }
7441
7442
7443 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
7444 return &avwsipi, true
7445 }
7446
7447
7448 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
7449 return nil, false
7450 }
7451
7452
7453 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
7454 return nil, false
7455 }
7456
7457
7458 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
7459 return nil, false
7460 }
7461
7462
7463 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
7464 return nil, false
7465 }
7466
7467
7468 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
7469 return nil, false
7470 }
7471
7472
7473 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
7474 return &avwsipi, true
7475 }
7476
7477
7478 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
7479 return nil, false
7480 }
7481
7482
7483 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
7484 return nil, false
7485 }
7486
7487
7488 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
7489 return nil, false
7490 }
7491
7492
7493 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
7494 return &avwsipi, true
7495 }
7496
7497
7498
7499 type AzureVMWorkloadSQLInstanceWorkloadItem struct {
7500
7501 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
7502
7503 ParentName *string `json:"parentName,omitempty"`
7504
7505 ServerName *string `json:"serverName,omitempty"`
7506
7507 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
7508
7509 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
7510
7511 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
7512
7513 BackupManagementType *string `json:"backupManagementType,omitempty"`
7514
7515 WorkloadType *string `json:"workloadType,omitempty"`
7516
7517 FriendlyName *string `json:"friendlyName,omitempty"`
7518
7519 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7520
7521 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
7522 }
7523
7524
7525 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) {
7526 avwsiwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance
7527 objectMap := make(map[string]interface{})
7528 if avwsiwi.DataDirectoryPaths != nil {
7529 objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths
7530 }
7531 if avwsiwi.ParentName != nil {
7532 objectMap["parentName"] = avwsiwi.ParentName
7533 }
7534 if avwsiwi.ServerName != nil {
7535 objectMap["serverName"] = avwsiwi.ServerName
7536 }
7537 if avwsiwi.IsAutoProtectable != nil {
7538 objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable
7539 }
7540 if avwsiwi.Subinquireditemcount != nil {
7541 objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount
7542 }
7543 if avwsiwi.SubWorkloadItemCount != nil {
7544 objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount
7545 }
7546 if avwsiwi.BackupManagementType != nil {
7547 objectMap["backupManagementType"] = avwsiwi.BackupManagementType
7548 }
7549 if avwsiwi.WorkloadType != nil {
7550 objectMap["workloadType"] = avwsiwi.WorkloadType
7551 }
7552 if avwsiwi.FriendlyName != nil {
7553 objectMap["friendlyName"] = avwsiwi.FriendlyName
7554 }
7555 if avwsiwi.ProtectionState != "" {
7556 objectMap["protectionState"] = avwsiwi.ProtectionState
7557 }
7558 if avwsiwi.WorkloadItemType != "" {
7559 objectMap["workloadItemType"] = avwsiwi.WorkloadItemType
7560 }
7561 return json.Marshal(objectMap)
7562 }
7563
7564
7565 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
7566 return nil, false
7567 }
7568
7569
7570 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
7571 return &avwsiwi, true
7572 }
7573
7574
7575 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
7576 return nil, false
7577 }
7578
7579
7580 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
7581 return nil, false
7582 }
7583
7584
7585 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
7586 return nil, false
7587 }
7588
7589
7590 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
7591 return nil, false
7592 }
7593
7594
7595 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
7596 return nil, false
7597 }
7598
7599
7600 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
7601 return &avwsiwi, true
7602 }
7603
7604
7605 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
7606 return nil, false
7607 }
7608
7609
7610 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
7611 return &avwsiwi, true
7612 }
7613
7614
7615 type BasicAzureWorkloadAutoProtectionIntent interface {
7616 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
7617 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
7618 }
7619
7620
7621 type AzureWorkloadAutoProtectionIntent struct {
7622
7623 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7624
7625 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7626
7627 ItemID *string `json:"itemId,omitempty"`
7628
7629 PolicyID *string `json:"policyId,omitempty"`
7630
7631 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7632
7633 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
7634 }
7635
7636 func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) {
7637 var m map[string]interface{}
7638 err := json.Unmarshal(body, &m)
7639 if err != nil {
7640 return nil, err
7641 }
7642
7643 switch m["protectionIntentItemType"] {
7644 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
7645 var awsapi AzureWorkloadSQLAutoProtectionIntent
7646 err := json.Unmarshal(body, &awsapi)
7647 return awsapi, err
7648 default:
7649 var awapi AzureWorkloadAutoProtectionIntent
7650 err := json.Unmarshal(body, &awapi)
7651 return awapi, err
7652 }
7653 }
7654 func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) {
7655 var rawMessages []*json.RawMessage
7656 err := json.Unmarshal(body, &rawMessages)
7657 if err != nil {
7658 return nil, err
7659 }
7660
7661 awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages))
7662
7663 for index, rawMessage := range rawMessages {
7664 awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage)
7665 if err != nil {
7666 return nil, err
7667 }
7668 awapiArray[index] = awapi
7669 }
7670 return awapiArray, nil
7671 }
7672
7673
7674 func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) {
7675 awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent
7676 objectMap := make(map[string]interface{})
7677 if awapi.BackupManagementType != "" {
7678 objectMap["backupManagementType"] = awapi.BackupManagementType
7679 }
7680 if awapi.SourceResourceID != nil {
7681 objectMap["sourceResourceId"] = awapi.SourceResourceID
7682 }
7683 if awapi.ItemID != nil {
7684 objectMap["itemId"] = awapi.ItemID
7685 }
7686 if awapi.PolicyID != nil {
7687 objectMap["policyId"] = awapi.PolicyID
7688 }
7689 if awapi.ProtectionState != "" {
7690 objectMap["protectionState"] = awapi.ProtectionState
7691 }
7692 if awapi.ProtectionIntentItemType != "" {
7693 objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType
7694 }
7695 return json.Marshal(objectMap)
7696 }
7697
7698
7699 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
7700 return nil, false
7701 }
7702
7703
7704 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
7705 return &awapi, true
7706 }
7707
7708
7709 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
7710 return nil, false
7711 }
7712
7713
7714 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
7715 return nil, false
7716 }
7717
7718
7719 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
7720 return &awapi, true
7721 }
7722
7723
7724 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
7725 return &awapi, true
7726 }
7727
7728
7729 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
7730 return nil, false
7731 }
7732
7733
7734 func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
7735 return nil, false
7736 }
7737
7738
7739 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
7740 return &awapi, true
7741 }
7742
7743
7744 type AzureWorkloadBackupRequest struct {
7745
7746 BackupType TypeEnum `json:"backupType,omitempty"`
7747
7748 EnableCompression *bool `json:"enableCompression,omitempty"`
7749
7750 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
7751
7752 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
7753 }
7754
7755
7756 func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) {
7757 awbr.ObjectType = ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest
7758 objectMap := make(map[string]interface{})
7759 if awbr.BackupType != "" {
7760 objectMap["backupType"] = awbr.BackupType
7761 }
7762 if awbr.EnableCompression != nil {
7763 objectMap["enableCompression"] = awbr.EnableCompression
7764 }
7765 if awbr.RecoveryPointExpiryTimeInUTC != nil {
7766 objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC
7767 }
7768 if awbr.ObjectType != "" {
7769 objectMap["objectType"] = awbr.ObjectType
7770 }
7771 return json.Marshal(objectMap)
7772 }
7773
7774
7775 func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
7776 return nil, false
7777 }
7778
7779
7780 func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
7781 return &awbr, true
7782 }
7783
7784
7785 func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
7786 return nil, false
7787 }
7788
7789
7790 func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) {
7791 return nil, false
7792 }
7793
7794
7795 func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) {
7796 return &awbr, true
7797 }
7798
7799
7800 type BasicAzureWorkloadContainer interface {
7801 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
7802 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
7803 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
7804 }
7805
7806
7807 type AzureWorkloadContainer struct {
7808
7809 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7810
7811 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
7812
7813 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
7814
7815 WorkloadType WorkloadType `json:"workloadType,omitempty"`
7816
7817 OperationType OperationType `json:"operationType,omitempty"`
7818
7819 FriendlyName *string `json:"friendlyName,omitempty"`
7820
7821 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7822
7823 RegistrationStatus *string `json:"registrationStatus,omitempty"`
7824
7825 HealthStatus *string `json:"healthStatus,omitempty"`
7826
7827 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
7828
7829 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
7830 }
7831
7832 func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) {
7833 var m map[string]interface{}
7834 err := json.Unmarshal(body, &m)
7835 if err != nil {
7836 return nil, err
7837 }
7838
7839 switch m["containerType"] {
7840 case string(ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer):
7841 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
7842 err := json.Unmarshal(body, &aswcpc)
7843 return aswcpc, err
7844 case string(ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer):
7845 var avacpc AzureVMAppContainerProtectionContainer
7846 err := json.Unmarshal(body, &avacpc)
7847 return avacpc, err
7848 default:
7849 var awc AzureWorkloadContainer
7850 err := json.Unmarshal(body, &awc)
7851 return awc, err
7852 }
7853 }
7854 func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) {
7855 var rawMessages []*json.RawMessage
7856 err := json.Unmarshal(body, &rawMessages)
7857 if err != nil {
7858 return nil, err
7859 }
7860
7861 awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages))
7862
7863 for index, rawMessage := range rawMessages {
7864 awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage)
7865 if err != nil {
7866 return nil, err
7867 }
7868 awcArray[index] = awc
7869 }
7870 return awcArray, nil
7871 }
7872
7873
7874 func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) {
7875 awc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer
7876 objectMap := make(map[string]interface{})
7877 if awc.SourceResourceID != nil {
7878 objectMap["sourceResourceId"] = awc.SourceResourceID
7879 }
7880 if awc.LastUpdatedTime != nil {
7881 objectMap["lastUpdatedTime"] = awc.LastUpdatedTime
7882 }
7883 if awc.ExtendedInfo != nil {
7884 objectMap["extendedInfo"] = awc.ExtendedInfo
7885 }
7886 if awc.WorkloadType != "" {
7887 objectMap["workloadType"] = awc.WorkloadType
7888 }
7889 if awc.OperationType != "" {
7890 objectMap["operationType"] = awc.OperationType
7891 }
7892 if awc.FriendlyName != nil {
7893 objectMap["friendlyName"] = awc.FriendlyName
7894 }
7895 if awc.BackupManagementType != "" {
7896 objectMap["backupManagementType"] = awc.BackupManagementType
7897 }
7898 if awc.RegistrationStatus != nil {
7899 objectMap["registrationStatus"] = awc.RegistrationStatus
7900 }
7901 if awc.HealthStatus != nil {
7902 objectMap["healthStatus"] = awc.HealthStatus
7903 }
7904 if awc.ProtectableObjectType != nil {
7905 objectMap["protectableObjectType"] = awc.ProtectableObjectType
7906 }
7907 if awc.ContainerType != "" {
7908 objectMap["containerType"] = awc.ContainerType
7909 }
7910 return json.Marshal(objectMap)
7911 }
7912
7913
7914 func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
7915 return nil, false
7916 }
7917
7918
7919 func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
7920 return nil, false
7921 }
7922
7923
7924 func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
7925 return nil, false
7926 }
7927
7928
7929 func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
7930 return nil, false
7931 }
7932
7933
7934 func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
7935 return nil, false
7936 }
7937
7938
7939 func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
7940 return nil, false
7941 }
7942
7943
7944 func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
7945 return nil, false
7946 }
7947
7948
7949 func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
7950 return &awc, true
7951 }
7952
7953
7954 func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
7955 return &awc, true
7956 }
7957
7958
7959 func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) {
7960 return nil, false
7961 }
7962
7963
7964 func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
7965 return nil, false
7966 }
7967
7968
7969 func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) {
7970 return nil, false
7971 }
7972
7973
7974 func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
7975 return nil, false
7976 }
7977
7978
7979 func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
7980 return nil, false
7981 }
7982
7983
7984 func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) {
7985 return nil, false
7986 }
7987
7988
7989 func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
7990 return nil, false
7991 }
7992
7993
7994 func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
7995 return &awc, true
7996 }
7997
7998
7999 type AzureWorkloadContainerAutoProtectionIntent struct {
8000
8001 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
8002
8003 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8004
8005 ItemID *string `json:"itemId,omitempty"`
8006
8007 PolicyID *string `json:"policyId,omitempty"`
8008
8009 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
8010
8011 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
8012 }
8013
8014
8015 func (awcapi AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error) {
8016 awcapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent
8017 objectMap := make(map[string]interface{})
8018 if awcapi.BackupManagementType != "" {
8019 objectMap["backupManagementType"] = awcapi.BackupManagementType
8020 }
8021 if awcapi.SourceResourceID != nil {
8022 objectMap["sourceResourceId"] = awcapi.SourceResourceID
8023 }
8024 if awcapi.ItemID != nil {
8025 objectMap["itemId"] = awcapi.ItemID
8026 }
8027 if awcapi.PolicyID != nil {
8028 objectMap["policyId"] = awcapi.PolicyID
8029 }
8030 if awcapi.ProtectionState != "" {
8031 objectMap["protectionState"] = awcapi.ProtectionState
8032 }
8033 if awcapi.ProtectionIntentItemType != "" {
8034 objectMap["protectionIntentItemType"] = awcapi.ProtectionIntentItemType
8035 }
8036 return json.Marshal(objectMap)
8037 }
8038
8039
8040 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
8041 return nil, false
8042 }
8043
8044
8045 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
8046 return nil, false
8047 }
8048
8049
8050 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
8051 return nil, false
8052 }
8053
8054
8055 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
8056 return &awcapi, true
8057 }
8058
8059
8060 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
8061 return nil, false
8062 }
8063
8064
8065 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
8066 return nil, false
8067 }
8068
8069
8070 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
8071 return nil, false
8072 }
8073
8074
8075 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
8076 return nil, false
8077 }
8078
8079
8080 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
8081 return &awcapi, true
8082 }
8083
8084
8085 type AzureWorkloadContainerExtendedInfo struct {
8086
8087 HostServerName *string `json:"hostServerName,omitempty"`
8088
8089 InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"`
8090
8091 NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"`
8092 }
8093
8094
8095 type AzureWorkloadErrorInfo struct {
8096
8097 ErrorCode *int32 `json:"errorCode,omitempty"`
8098
8099 ErrorString *string `json:"errorString,omitempty"`
8100
8101 ErrorTitle *string `json:"errorTitle,omitempty"`
8102
8103 Recommendations *[]string `json:"recommendations,omitempty"`
8104
8105 AdditionalDetails *string `json:"additionalDetails,omitempty"`
8106 }
8107
8108
8109 type AzureWorkloadJob struct {
8110
8111 WorkloadType *string `json:"workloadType,omitempty"`
8112
8113 Duration *string `json:"duration,omitempty"`
8114
8115 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
8116
8117 ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"`
8118
8119 ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"`
8120
8121 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
8122
8123 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
8124
8125 Operation *string `json:"operation,omitempty"`
8126
8127 Status *string `json:"status,omitempty"`
8128
8129 StartTime *date.Time `json:"startTime,omitempty"`
8130
8131 EndTime *date.Time `json:"endTime,omitempty"`
8132
8133 ActivityID *string `json:"activityId,omitempty"`
8134
8135 JobType JobType `json:"jobType,omitempty"`
8136 }
8137
8138
8139 func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) {
8140 awj.JobType = JobTypeAzureWorkloadJob
8141 objectMap := make(map[string]interface{})
8142 if awj.WorkloadType != nil {
8143 objectMap["workloadType"] = awj.WorkloadType
8144 }
8145 if awj.Duration != nil {
8146 objectMap["duration"] = awj.Duration
8147 }
8148 if awj.ActionsInfo != nil {
8149 objectMap["actionsInfo"] = awj.ActionsInfo
8150 }
8151 if awj.ErrorDetails != nil {
8152 objectMap["errorDetails"] = awj.ErrorDetails
8153 }
8154 if awj.ExtendedInfo != nil {
8155 objectMap["extendedInfo"] = awj.ExtendedInfo
8156 }
8157 if awj.EntityFriendlyName != nil {
8158 objectMap["entityFriendlyName"] = awj.EntityFriendlyName
8159 }
8160 if awj.BackupManagementType != "" {
8161 objectMap["backupManagementType"] = awj.BackupManagementType
8162 }
8163 if awj.Operation != nil {
8164 objectMap["operation"] = awj.Operation
8165 }
8166 if awj.Status != nil {
8167 objectMap["status"] = awj.Status
8168 }
8169 if awj.StartTime != nil {
8170 objectMap["startTime"] = awj.StartTime
8171 }
8172 if awj.EndTime != nil {
8173 objectMap["endTime"] = awj.EndTime
8174 }
8175 if awj.ActivityID != nil {
8176 objectMap["activityId"] = awj.ActivityID
8177 }
8178 if awj.JobType != "" {
8179 objectMap["jobType"] = awj.JobType
8180 }
8181 return json.Marshal(objectMap)
8182 }
8183
8184
8185 func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
8186 return nil, false
8187 }
8188
8189
8190 func (awj AzureWorkloadJob) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
8191 return nil, false
8192 }
8193
8194
8195 func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
8196 return nil, false
8197 }
8198
8199
8200 func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
8201 return &awj, true
8202 }
8203
8204
8205 func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) {
8206 return nil, false
8207 }
8208
8209
8210 func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) {
8211 return nil, false
8212 }
8213
8214
8215 func (awj AzureWorkloadJob) AsVaultJob() (*VaultJob, bool) {
8216 return nil, false
8217 }
8218
8219
8220 func (awj AzureWorkloadJob) AsJob() (*Job, bool) {
8221 return nil, false
8222 }
8223
8224
8225 func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) {
8226 return &awj, true
8227 }
8228
8229
8230 type AzureWorkloadJobExtendedInfo struct {
8231
8232 TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"`
8233
8234 PropertyBag map[string]*string `json:"propertyBag"`
8235
8236 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
8237 }
8238
8239
8240 func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) {
8241 objectMap := make(map[string]interface{})
8242 if awjei.TasksList != nil {
8243 objectMap["tasksList"] = awjei.TasksList
8244 }
8245 if awjei.PropertyBag != nil {
8246 objectMap["propertyBag"] = awjei.PropertyBag
8247 }
8248 if awjei.DynamicErrorMessage != nil {
8249 objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage
8250 }
8251 return json.Marshal(objectMap)
8252 }
8253
8254
8255 type AzureWorkloadJobTaskDetails struct {
8256
8257 TaskID *string `json:"taskId,omitempty"`
8258
8259 Status *string `json:"status,omitempty"`
8260 }
8261
8262
8263 type BasicAzureWorkloadPointInTimeRecoveryPoint interface {
8264 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
8265 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
8266 }
8267
8268
8269 type AzureWorkloadPointInTimeRecoveryPoint struct {
8270
8271 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
8272
8273 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8274
8275 Type RestorePointType `json:"type,omitempty"`
8276
8277 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
8278
8279 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8280
8281 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8282 }
8283
8284 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
8285 var m map[string]interface{}
8286 err := json.Unmarshal(body, &m)
8287 if err != nil {
8288 return nil, err
8289 }
8290
8291 switch m["objectType"] {
8292 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
8293 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
8294 err := json.Unmarshal(body, &awshpitrp)
8295 return awshpitrp, err
8296 default:
8297 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
8298 err := json.Unmarshal(body, &awpitrp)
8299 return awpitrp, err
8300 }
8301 }
8302 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
8303 var rawMessages []*json.RawMessage
8304 err := json.Unmarshal(body, &rawMessages)
8305 if err != nil {
8306 return nil, err
8307 }
8308
8309 awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages))
8310
8311 for index, rawMessage := range rawMessages {
8312 awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage)
8313 if err != nil {
8314 return nil, err
8315 }
8316 awpitrpArray[index] = awpitrp
8317 }
8318 return awpitrpArray, nil
8319 }
8320
8321
8322 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
8323 awpitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint
8324 objectMap := make(map[string]interface{})
8325 if awpitrp.TimeRanges != nil {
8326 objectMap["timeRanges"] = awpitrp.TimeRanges
8327 }
8328 if awpitrp.RecoveryPointTimeInUTC != nil {
8329 objectMap["recoveryPointTimeInUTC"] = awpitrp.RecoveryPointTimeInUTC
8330 }
8331 if awpitrp.Type != "" {
8332 objectMap["type"] = awpitrp.Type
8333 }
8334 if awpitrp.RecoveryPointTierDetails != nil {
8335 objectMap["recoveryPointTierDetails"] = awpitrp.RecoveryPointTierDetails
8336 }
8337 if awpitrp.RecoveryPointMoveReadinessInfo != nil {
8338 objectMap["recoveryPointMoveReadinessInfo"] = awpitrp.RecoveryPointMoveReadinessInfo
8339 }
8340 if awpitrp.ObjectType != "" {
8341 objectMap["objectType"] = awpitrp.ObjectType
8342 }
8343 return json.Marshal(objectMap)
8344 }
8345
8346
8347 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8348 return nil, false
8349 }
8350
8351
8352 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8353 return &awpitrp, true
8354 }
8355
8356
8357 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8358 return &awpitrp, true
8359 }
8360
8361
8362 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8363 return nil, false
8364 }
8365
8366
8367 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8368 return &awpitrp, true
8369 }
8370
8371
8372 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8373 return nil, false
8374 }
8375
8376
8377 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8378 return nil, false
8379 }
8380
8381
8382 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8383 return nil, false
8384 }
8385
8386
8387 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8388 return nil, false
8389 }
8390
8391
8392 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8393 return nil, false
8394 }
8395
8396
8397 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8398 return nil, false
8399 }
8400
8401
8402 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8403 return nil, false
8404 }
8405
8406
8407 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8408 return nil, false
8409 }
8410
8411
8412 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8413 return &awpitrp, true
8414 }
8415
8416
8417
8418 type AzureWorkloadPointInTimeRestoreRequest struct {
8419
8420 PointInTime *date.Time `json:"pointInTime,omitempty"`
8421
8422 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8423
8424 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8425
8426 PropertyBag map[string]*string `json:"propertyBag"`
8427
8428 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8429
8430 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8431
8432
8433 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8434
8435 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8436 }
8437
8438
8439 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
8440 awpitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest
8441 objectMap := make(map[string]interface{})
8442 if awpitrr.PointInTime != nil {
8443 objectMap["pointInTime"] = awpitrr.PointInTime
8444 }
8445 if awpitrr.RecoveryType != "" {
8446 objectMap["recoveryType"] = awpitrr.RecoveryType
8447 }
8448 if awpitrr.SourceResourceID != nil {
8449 objectMap["sourceResourceId"] = awpitrr.SourceResourceID
8450 }
8451 if awpitrr.PropertyBag != nil {
8452 objectMap["propertyBag"] = awpitrr.PropertyBag
8453 }
8454 if awpitrr.TargetInfo != nil {
8455 objectMap["targetInfo"] = awpitrr.TargetInfo
8456 }
8457 if awpitrr.RecoveryMode != "" {
8458 objectMap["recoveryMode"] = awpitrr.RecoveryMode
8459 }
8460 if awpitrr.TargetVirtualMachineID != nil {
8461 objectMap["targetVirtualMachineId"] = awpitrr.TargetVirtualMachineID
8462 }
8463 if awpitrr.ObjectType != "" {
8464 objectMap["objectType"] = awpitrr.ObjectType
8465 }
8466 return json.Marshal(objectMap)
8467 }
8468
8469
8470 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8471 return nil, false
8472 }
8473
8474
8475 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8476 return &awpitrr, true
8477 }
8478
8479
8480 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8481 return nil, false
8482 }
8483
8484
8485 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8486 return &awpitrr, true
8487 }
8488
8489
8490 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8491 return nil, false
8492 }
8493
8494
8495 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8496 return nil, false
8497 }
8498
8499
8500 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8501 return nil, false
8502 }
8503
8504
8505 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8506 return nil, false
8507 }
8508
8509
8510 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8511 return nil, false
8512 }
8513
8514
8515 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8516 return nil, false
8517 }
8518
8519
8520 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8521 return nil, false
8522 }
8523
8524
8525 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8526 return nil, false
8527 }
8528
8529
8530 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8531 return nil, false
8532 }
8533
8534
8535 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8536 return nil, false
8537 }
8538
8539
8540 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8541 return nil, false
8542 }
8543
8544
8545 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8546 return nil, false
8547 }
8548
8549
8550 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8551 return nil, false
8552 }
8553
8554
8555 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8556 return nil, false
8557 }
8558
8559
8560 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8561 return nil, false
8562 }
8563
8564
8565 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8566 return nil, false
8567 }
8568
8569
8570 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8571 return &awpitrr, true
8572 }
8573
8574
8575 type BasicAzureWorkloadRecoveryPoint interface {
8576 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
8577 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
8578 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
8579 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
8580 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
8581 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
8582 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
8583 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
8584 }
8585
8586
8587
8588 type AzureWorkloadRecoveryPoint struct {
8589
8590 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8591
8592 Type RestorePointType `json:"type,omitempty"`
8593
8594 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
8595
8596 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8597
8598 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8599 }
8600
8601 func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) {
8602 var m map[string]interface{}
8603 err := json.Unmarshal(body, &m)
8604 if err != nil {
8605 return nil, err
8606 }
8607
8608 switch m["objectType"] {
8609 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
8610 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
8611 err := json.Unmarshal(body, &awpitrp)
8612 return awpitrp, err
8613 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
8614 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
8615 err := json.Unmarshal(body, &awshpitrp)
8616 return awshpitrp, err
8617 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
8618 var awshrp AzureWorkloadSAPHanaRecoveryPoint
8619 err := json.Unmarshal(body, &awshrp)
8620 return awshrp, err
8621 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
8622 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
8623 err := json.Unmarshal(body, &awspitrp)
8624 return awspitrp, err
8625 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint):
8626 var awsrp AzureWorkloadSQLRecoveryPoint
8627 err := json.Unmarshal(body, &awsrp)
8628 return awsrp, err
8629 default:
8630 var awrp AzureWorkloadRecoveryPoint
8631 err := json.Unmarshal(body, &awrp)
8632 return awrp, err
8633 }
8634 }
8635 func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) {
8636 var rawMessages []*json.RawMessage
8637 err := json.Unmarshal(body, &rawMessages)
8638 if err != nil {
8639 return nil, err
8640 }
8641
8642 awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages))
8643
8644 for index, rawMessage := range rawMessages {
8645 awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage)
8646 if err != nil {
8647 return nil, err
8648 }
8649 awrpArray[index] = awrp
8650 }
8651 return awrpArray, nil
8652 }
8653
8654
8655 func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) {
8656 awrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint
8657 objectMap := make(map[string]interface{})
8658 if awrp.RecoveryPointTimeInUTC != nil {
8659 objectMap["recoveryPointTimeInUTC"] = awrp.RecoveryPointTimeInUTC
8660 }
8661 if awrp.Type != "" {
8662 objectMap["type"] = awrp.Type
8663 }
8664 if awrp.RecoveryPointTierDetails != nil {
8665 objectMap["recoveryPointTierDetails"] = awrp.RecoveryPointTierDetails
8666 }
8667 if awrp.RecoveryPointMoveReadinessInfo != nil {
8668 objectMap["recoveryPointMoveReadinessInfo"] = awrp.RecoveryPointMoveReadinessInfo
8669 }
8670 if awrp.ObjectType != "" {
8671 objectMap["objectType"] = awrp.ObjectType
8672 }
8673 return json.Marshal(objectMap)
8674 }
8675
8676
8677 func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8678 return nil, false
8679 }
8680
8681
8682 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8683 return nil, false
8684 }
8685
8686
8687 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8688 return nil, false
8689 }
8690
8691
8692 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8693 return &awrp, true
8694 }
8695
8696
8697 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8698 return &awrp, true
8699 }
8700
8701
8702 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8703 return nil, false
8704 }
8705
8706
8707 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8708 return nil, false
8709 }
8710
8711
8712 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8713 return nil, false
8714 }
8715
8716
8717 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8718 return nil, false
8719 }
8720
8721
8722 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8723 return nil, false
8724 }
8725
8726
8727 func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8728 return nil, false
8729 }
8730
8731
8732 func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8733 return nil, false
8734 }
8735
8736
8737 func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8738 return nil, false
8739 }
8740
8741
8742 func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8743 return &awrp, true
8744 }
8745
8746
8747 type BasicAzureWorkloadRestoreRequest interface {
8748 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
8749 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8750 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8751 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
8752 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
8753 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
8754 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
8755 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
8756 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
8757 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
8758 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
8759 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
8760 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
8761 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
8762 }
8763
8764
8765 type AzureWorkloadRestoreRequest struct {
8766
8767 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8768
8769 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8770
8771 PropertyBag map[string]*string `json:"propertyBag"`
8772
8773 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8774
8775 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8776
8777
8778 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8779
8780 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8781 }
8782
8783 func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) {
8784 var m map[string]interface{}
8785 err := json.Unmarshal(body, &m)
8786 if err != nil {
8787 return nil, err
8788 }
8789
8790 switch m["objectType"] {
8791 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest):
8792 var awpitrr AzureWorkloadPointInTimeRestoreRequest
8793 err := json.Unmarshal(body, &awpitrr)
8794 return awpitrr, err
8795 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
8796 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8797 err := json.Unmarshal(body, &awshpitrr)
8798 return awshpitrr, err
8799 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest):
8800 var awshrr AzureWorkloadSAPHanaRestoreRequest
8801 err := json.Unmarshal(body, &awshrr)
8802 return awshrr, err
8803 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
8804 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
8805 err := json.Unmarshal(body, &awspitrr)
8806 return awspitrr, err
8807 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest):
8808 var awsrr AzureWorkloadSQLRestoreRequest
8809 err := json.Unmarshal(body, &awsrr)
8810 return awsrr, err
8811 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
8812 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
8813 err := json.Unmarshal(body, &awshpitrwrr)
8814 return awshpitrwrr, err
8815 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
8816 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
8817 err := json.Unmarshal(body, &awshrwrr)
8818 return awshrwrr, err
8819 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
8820 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
8821 err := json.Unmarshal(body, &awspitrwrr)
8822 return awspitrwrr, err
8823 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
8824 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
8825 err := json.Unmarshal(body, &awsrwrr)
8826 return awsrwrr, err
8827 default:
8828 var awrr AzureWorkloadRestoreRequest
8829 err := json.Unmarshal(body, &awrr)
8830 return awrr, err
8831 }
8832 }
8833 func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) {
8834 var rawMessages []*json.RawMessage
8835 err := json.Unmarshal(body, &rawMessages)
8836 if err != nil {
8837 return nil, err
8838 }
8839
8840 awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages))
8841
8842 for index, rawMessage := range rawMessages {
8843 awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage)
8844 if err != nil {
8845 return nil, err
8846 }
8847 awrrArray[index] = awrr
8848 }
8849 return awrrArray, nil
8850 }
8851
8852
8853 func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) {
8854 awrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest
8855 objectMap := make(map[string]interface{})
8856 if awrr.RecoveryType != "" {
8857 objectMap["recoveryType"] = awrr.RecoveryType
8858 }
8859 if awrr.SourceResourceID != nil {
8860 objectMap["sourceResourceId"] = awrr.SourceResourceID
8861 }
8862 if awrr.PropertyBag != nil {
8863 objectMap["propertyBag"] = awrr.PropertyBag
8864 }
8865 if awrr.TargetInfo != nil {
8866 objectMap["targetInfo"] = awrr.TargetInfo
8867 }
8868 if awrr.RecoveryMode != "" {
8869 objectMap["recoveryMode"] = awrr.RecoveryMode
8870 }
8871 if awrr.TargetVirtualMachineID != nil {
8872 objectMap["targetVirtualMachineId"] = awrr.TargetVirtualMachineID
8873 }
8874 if awrr.ObjectType != "" {
8875 objectMap["objectType"] = awrr.ObjectType
8876 }
8877 return json.Marshal(objectMap)
8878 }
8879
8880
8881 func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8882 return nil, false
8883 }
8884
8885
8886 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8887 return nil, false
8888 }
8889
8890
8891 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8892 return &awrr, true
8893 }
8894
8895
8896 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8897 return &awrr, true
8898 }
8899
8900
8901 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8902 return nil, false
8903 }
8904
8905
8906 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8907 return nil, false
8908 }
8909
8910
8911 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8912 return nil, false
8913 }
8914
8915
8916 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8917 return nil, false
8918 }
8919
8920
8921 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8922 return nil, false
8923 }
8924
8925
8926 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8927 return nil, false
8928 }
8929
8930
8931 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8932 return nil, false
8933 }
8934
8935
8936 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8937 return nil, false
8938 }
8939
8940
8941 func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8942 return nil, false
8943 }
8944
8945
8946 func (awrr AzureWorkloadRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8947 return nil, false
8948 }
8949
8950
8951 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8952 return nil, false
8953 }
8954
8955
8956 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8957 return nil, false
8958 }
8959
8960
8961 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8962 return nil, false
8963 }
8964
8965
8966 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8967 return nil, false
8968 }
8969
8970
8971 func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8972 return nil, false
8973 }
8974
8975
8976 func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8977 return nil, false
8978 }
8979
8980
8981 func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8982 return &awrr, true
8983 }
8984
8985
8986 type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct {
8987
8988 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
8989
8990 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8991
8992 Type RestorePointType `json:"type,omitempty"`
8993
8994 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
8995
8996 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8997
8998 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8999 }
9000
9001
9002 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
9003 awshpitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint
9004 objectMap := make(map[string]interface{})
9005 if awshpitrp.TimeRanges != nil {
9006 objectMap["timeRanges"] = awshpitrp.TimeRanges
9007 }
9008 if awshpitrp.RecoveryPointTimeInUTC != nil {
9009 objectMap["recoveryPointTimeInUTC"] = awshpitrp.RecoveryPointTimeInUTC
9010 }
9011 if awshpitrp.Type != "" {
9012 objectMap["type"] = awshpitrp.Type
9013 }
9014 if awshpitrp.RecoveryPointTierDetails != nil {
9015 objectMap["recoveryPointTierDetails"] = awshpitrp.RecoveryPointTierDetails
9016 }
9017 if awshpitrp.RecoveryPointMoveReadinessInfo != nil {
9018 objectMap["recoveryPointMoveReadinessInfo"] = awshpitrp.RecoveryPointMoveReadinessInfo
9019 }
9020 if awshpitrp.ObjectType != "" {
9021 objectMap["objectType"] = awshpitrp.ObjectType
9022 }
9023 return json.Marshal(objectMap)
9024 }
9025
9026
9027 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
9028 return nil, false
9029 }
9030
9031
9032 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9033 return nil, false
9034 }
9035
9036
9037 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9038 return &awshpitrp, true
9039 }
9040
9041
9042 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9043 return nil, false
9044 }
9045
9046
9047 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9048 return &awshpitrp, true
9049 }
9050
9051
9052 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9053 return &awshpitrp, true
9054 }
9055
9056
9057 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9058 return nil, false
9059 }
9060
9061
9062 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9063 return nil, false
9064 }
9065
9066
9067 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9068 return nil, false
9069 }
9070
9071
9072 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9073 return nil, false
9074 }
9075
9076
9077 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9078 return nil, false
9079 }
9080
9081
9082 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9083 return nil, false
9084 }
9085
9086
9087 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9088 return nil, false
9089 }
9090
9091
9092 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9093 return &awshpitrp, true
9094 }
9095
9096
9097
9098 type BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest interface {
9099 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
9100 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9101 }
9102
9103
9104
9105 type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct {
9106
9107 PointInTime *date.Time `json:"pointInTime,omitempty"`
9108
9109 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9110
9111 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9112
9113 PropertyBag map[string]*string `json:"propertyBag"`
9114
9115 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9116
9117 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9118
9119
9120 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9121
9122 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9123 }
9124
9125 func unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, error) {
9126 var m map[string]interface{}
9127 err := json.Unmarshal(body, &m)
9128 if err != nil {
9129 return nil, err
9130 }
9131
9132 switch m["objectType"] {
9133 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
9134 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
9135 err := json.Unmarshal(body, &awshpitrwrr)
9136 return awshpitrwrr, err
9137 default:
9138 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
9139 err := json.Unmarshal(body, &awshpitrr)
9140 return awshpitrr, err
9141 }
9142 }
9143 func unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, error) {
9144 var rawMessages []*json.RawMessage
9145 err := json.Unmarshal(body, &rawMessages)
9146 if err != nil {
9147 return nil, err
9148 }
9149
9150 awshpitrrArray := make([]BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, len(rawMessages))
9151
9152 for index, rawMessage := range rawMessages {
9153 awshpitrr, err := unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest(*rawMessage)
9154 if err != nil {
9155 return nil, err
9156 }
9157 awshpitrrArray[index] = awshpitrr
9158 }
9159 return awshpitrrArray, nil
9160 }
9161
9162
9163 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
9164 awshpitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest
9165 objectMap := make(map[string]interface{})
9166 if awshpitrr.PointInTime != nil {
9167 objectMap["pointInTime"] = awshpitrr.PointInTime
9168 }
9169 if awshpitrr.RecoveryType != "" {
9170 objectMap["recoveryType"] = awshpitrr.RecoveryType
9171 }
9172 if awshpitrr.SourceResourceID != nil {
9173 objectMap["sourceResourceId"] = awshpitrr.SourceResourceID
9174 }
9175 if awshpitrr.PropertyBag != nil {
9176 objectMap["propertyBag"] = awshpitrr.PropertyBag
9177 }
9178 if awshpitrr.TargetInfo != nil {
9179 objectMap["targetInfo"] = awshpitrr.TargetInfo
9180 }
9181 if awshpitrr.RecoveryMode != "" {
9182 objectMap["recoveryMode"] = awshpitrr.RecoveryMode
9183 }
9184 if awshpitrr.TargetVirtualMachineID != nil {
9185 objectMap["targetVirtualMachineId"] = awshpitrr.TargetVirtualMachineID
9186 }
9187 if awshpitrr.ObjectType != "" {
9188 objectMap["objectType"] = awshpitrr.ObjectType
9189 }
9190 return json.Marshal(objectMap)
9191 }
9192
9193
9194 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9195 return nil, false
9196 }
9197
9198
9199 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9200 return nil, false
9201 }
9202
9203
9204 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9205 return nil, false
9206 }
9207
9208
9209 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9210 return &awshpitrr, true
9211 }
9212
9213
9214 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9215 return &awshpitrr, true
9216 }
9217
9218
9219 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9220 return &awshpitrr, true
9221 }
9222
9223
9224 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9225 return nil, false
9226 }
9227
9228
9229 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9230 return &awshpitrr, true
9231 }
9232
9233
9234 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9235 return nil, false
9236 }
9237
9238
9239 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9240 return nil, false
9241 }
9242
9243
9244 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9245 return nil, false
9246 }
9247
9248
9249 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9250 return nil, false
9251 }
9252
9253
9254 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9255 return nil, false
9256 }
9257
9258
9259 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9260 return nil, false
9261 }
9262
9263
9264 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9265 return nil, false
9266 }
9267
9268
9269 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9270 return nil, false
9271 }
9272
9273
9274 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9275 return nil, false
9276 }
9277
9278
9279 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9280 return nil, false
9281 }
9282
9283
9284 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9285 return nil, false
9286 }
9287
9288
9289 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9290 return nil, false
9291 }
9292
9293
9294 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9295 return &awshpitrr, true
9296 }
9297
9298
9299
9300 type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct {
9301
9302 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
9303
9304 PointInTime *date.Time `json:"pointInTime,omitempty"`
9305
9306 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9307
9308 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9309
9310 PropertyBag map[string]*string `json:"propertyBag"`
9311
9312 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9313
9314 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9315
9316
9317 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9318
9319 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9320 }
9321
9322
9323 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
9324 awshpitrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
9325 objectMap := make(map[string]interface{})
9326 if awshpitrwrr.RecoveryPointRehydrationInfo != nil {
9327 objectMap["recoveryPointRehydrationInfo"] = awshpitrwrr.RecoveryPointRehydrationInfo
9328 }
9329 if awshpitrwrr.PointInTime != nil {
9330 objectMap["pointInTime"] = awshpitrwrr.PointInTime
9331 }
9332 if awshpitrwrr.RecoveryType != "" {
9333 objectMap["recoveryType"] = awshpitrwrr.RecoveryType
9334 }
9335 if awshpitrwrr.SourceResourceID != nil {
9336 objectMap["sourceResourceId"] = awshpitrwrr.SourceResourceID
9337 }
9338 if awshpitrwrr.PropertyBag != nil {
9339 objectMap["propertyBag"] = awshpitrwrr.PropertyBag
9340 }
9341 if awshpitrwrr.TargetInfo != nil {
9342 objectMap["targetInfo"] = awshpitrwrr.TargetInfo
9343 }
9344 if awshpitrwrr.RecoveryMode != "" {
9345 objectMap["recoveryMode"] = awshpitrwrr.RecoveryMode
9346 }
9347 if awshpitrwrr.TargetVirtualMachineID != nil {
9348 objectMap["targetVirtualMachineId"] = awshpitrwrr.TargetVirtualMachineID
9349 }
9350 if awshpitrwrr.ObjectType != "" {
9351 objectMap["objectType"] = awshpitrwrr.ObjectType
9352 }
9353 return json.Marshal(objectMap)
9354 }
9355
9356
9357 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9358 return nil, false
9359 }
9360
9361
9362 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9363 return nil, false
9364 }
9365
9366
9367 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9368 return nil, false
9369 }
9370
9371
9372 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9373 return &awshpitrwrr, true
9374 }
9375
9376
9377 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9378 return nil, false
9379 }
9380
9381
9382 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9383 return &awshpitrwrr, true
9384 }
9385
9386
9387 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9388 return nil, false
9389 }
9390
9391
9392 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9393 return &awshpitrwrr, true
9394 }
9395
9396
9397 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9398 return nil, false
9399 }
9400
9401
9402 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9403 return nil, false
9404 }
9405
9406
9407 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9408 return nil, false
9409 }
9410
9411
9412 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9413 return nil, false
9414 }
9415
9416
9417 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9418 return nil, false
9419 }
9420
9421
9422 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9423 return nil, false
9424 }
9425
9426
9427 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9428 return &awshpitrwrr, true
9429 }
9430
9431
9432 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9433 return nil, false
9434 }
9435
9436
9437 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9438 return nil, false
9439 }
9440
9441
9442 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9443 return nil, false
9444 }
9445
9446
9447 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9448 return nil, false
9449 }
9450
9451
9452 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9453 return nil, false
9454 }
9455
9456
9457 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9458 return &awshpitrwrr, true
9459 }
9460
9461
9462
9463 type AzureWorkloadSAPHanaRecoveryPoint struct {
9464
9465 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
9466
9467 Type RestorePointType `json:"type,omitempty"`
9468
9469 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
9470
9471 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
9472
9473 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
9474 }
9475
9476
9477 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) {
9478 awshrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint
9479 objectMap := make(map[string]interface{})
9480 if awshrp.RecoveryPointTimeInUTC != nil {
9481 objectMap["recoveryPointTimeInUTC"] = awshrp.RecoveryPointTimeInUTC
9482 }
9483 if awshrp.Type != "" {
9484 objectMap["type"] = awshrp.Type
9485 }
9486 if awshrp.RecoveryPointTierDetails != nil {
9487 objectMap["recoveryPointTierDetails"] = awshrp.RecoveryPointTierDetails
9488 }
9489 if awshrp.RecoveryPointMoveReadinessInfo != nil {
9490 objectMap["recoveryPointMoveReadinessInfo"] = awshrp.RecoveryPointMoveReadinessInfo
9491 }
9492 if awshrp.ObjectType != "" {
9493 objectMap["objectType"] = awshrp.ObjectType
9494 }
9495 return json.Marshal(objectMap)
9496 }
9497
9498
9499 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
9500 return nil, false
9501 }
9502
9503
9504 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9505 return nil, false
9506 }
9507
9508
9509 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9510 return nil, false
9511 }
9512
9513
9514 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9515 return nil, false
9516 }
9517
9518
9519 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9520 return &awshrp, true
9521 }
9522
9523
9524 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9525 return nil, false
9526 }
9527
9528
9529 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9530 return &awshrp, true
9531 }
9532
9533
9534 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9535 return nil, false
9536 }
9537
9538
9539 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9540 return nil, false
9541 }
9542
9543
9544 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9545 return nil, false
9546 }
9547
9548
9549 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9550 return nil, false
9551 }
9552
9553
9554 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9555 return nil, false
9556 }
9557
9558
9559 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9560 return nil, false
9561 }
9562
9563
9564 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9565 return &awshrp, true
9566 }
9567
9568
9569 type BasicAzureWorkloadSAPHanaRestoreRequest interface {
9570 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9571 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9572 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
9573 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
9574 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
9575 }
9576
9577
9578 type AzureWorkloadSAPHanaRestoreRequest struct {
9579
9580 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9581
9582 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9583
9584 PropertyBag map[string]*string `json:"propertyBag"`
9585
9586 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9587
9588 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9589
9590
9591 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9592
9593 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9594 }
9595
9596 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) {
9597 var m map[string]interface{}
9598 err := json.Unmarshal(body, &m)
9599 if err != nil {
9600 return nil, err
9601 }
9602
9603 switch m["objectType"] {
9604 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
9605 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
9606 err := json.Unmarshal(body, &awshpitrr)
9607 return awshpitrr, err
9608 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
9609 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
9610 err := json.Unmarshal(body, &awshpitrwrr)
9611 return awshpitrwrr, err
9612 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
9613 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
9614 err := json.Unmarshal(body, &awshrwrr)
9615 return awshrwrr, err
9616 default:
9617 var awshrr AzureWorkloadSAPHanaRestoreRequest
9618 err := json.Unmarshal(body, &awshrr)
9619 return awshrr, err
9620 }
9621 }
9622 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) {
9623 var rawMessages []*json.RawMessage
9624 err := json.Unmarshal(body, &rawMessages)
9625 if err != nil {
9626 return nil, err
9627 }
9628
9629 awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages))
9630
9631 for index, rawMessage := range rawMessages {
9632 awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage)
9633 if err != nil {
9634 return nil, err
9635 }
9636 awshrrArray[index] = awshrr
9637 }
9638 return awshrrArray, nil
9639 }
9640
9641
9642 func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) {
9643 awshrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest
9644 objectMap := make(map[string]interface{})
9645 if awshrr.RecoveryType != "" {
9646 objectMap["recoveryType"] = awshrr.RecoveryType
9647 }
9648 if awshrr.SourceResourceID != nil {
9649 objectMap["sourceResourceId"] = awshrr.SourceResourceID
9650 }
9651 if awshrr.PropertyBag != nil {
9652 objectMap["propertyBag"] = awshrr.PropertyBag
9653 }
9654 if awshrr.TargetInfo != nil {
9655 objectMap["targetInfo"] = awshrr.TargetInfo
9656 }
9657 if awshrr.RecoveryMode != "" {
9658 objectMap["recoveryMode"] = awshrr.RecoveryMode
9659 }
9660 if awshrr.TargetVirtualMachineID != nil {
9661 objectMap["targetVirtualMachineId"] = awshrr.TargetVirtualMachineID
9662 }
9663 if awshrr.ObjectType != "" {
9664 objectMap["objectType"] = awshrr.ObjectType
9665 }
9666 return json.Marshal(objectMap)
9667 }
9668
9669
9670 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9671 return nil, false
9672 }
9673
9674
9675 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9676 return nil, false
9677 }
9678
9679
9680 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9681 return nil, false
9682 }
9683
9684
9685 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9686 return &awshrr, true
9687 }
9688
9689
9690 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9691 return nil, false
9692 }
9693
9694
9695 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9696 return nil, false
9697 }
9698
9699
9700 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9701 return &awshrr, true
9702 }
9703
9704
9705 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9706 return &awshrr, true
9707 }
9708
9709
9710 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9711 return nil, false
9712 }
9713
9714
9715 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9716 return nil, false
9717 }
9718
9719
9720 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9721 return nil, false
9722 }
9723
9724
9725 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9726 return nil, false
9727 }
9728
9729
9730 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9731 return nil, false
9732 }
9733
9734
9735 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9736 return nil, false
9737 }
9738
9739
9740 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9741 return nil, false
9742 }
9743
9744
9745 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9746 return nil, false
9747 }
9748
9749
9750 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9751 return nil, false
9752 }
9753
9754
9755 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9756 return nil, false
9757 }
9758
9759
9760 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9761 return nil, false
9762 }
9763
9764
9765 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9766 return nil, false
9767 }
9768
9769
9770 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9771 return &awshrr, true
9772 }
9773
9774
9775
9776 type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct {
9777
9778 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
9779
9780 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9781
9782 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9783
9784 PropertyBag map[string]*string `json:"propertyBag"`
9785
9786 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9787
9788 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9789
9790
9791 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9792
9793 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9794 }
9795
9796
9797 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
9798 awshrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest
9799 objectMap := make(map[string]interface{})
9800 if awshrwrr.RecoveryPointRehydrationInfo != nil {
9801 objectMap["recoveryPointRehydrationInfo"] = awshrwrr.RecoveryPointRehydrationInfo
9802 }
9803 if awshrwrr.RecoveryType != "" {
9804 objectMap["recoveryType"] = awshrwrr.RecoveryType
9805 }
9806 if awshrwrr.SourceResourceID != nil {
9807 objectMap["sourceResourceId"] = awshrwrr.SourceResourceID
9808 }
9809 if awshrwrr.PropertyBag != nil {
9810 objectMap["propertyBag"] = awshrwrr.PropertyBag
9811 }
9812 if awshrwrr.TargetInfo != nil {
9813 objectMap["targetInfo"] = awshrwrr.TargetInfo
9814 }
9815 if awshrwrr.RecoveryMode != "" {
9816 objectMap["recoveryMode"] = awshrwrr.RecoveryMode
9817 }
9818 if awshrwrr.TargetVirtualMachineID != nil {
9819 objectMap["targetVirtualMachineId"] = awshrwrr.TargetVirtualMachineID
9820 }
9821 if awshrwrr.ObjectType != "" {
9822 objectMap["objectType"] = awshrwrr.ObjectType
9823 }
9824 return json.Marshal(objectMap)
9825 }
9826
9827
9828 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9829 return nil, false
9830 }
9831
9832
9833 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9834 return nil, false
9835 }
9836
9837
9838 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9839 return nil, false
9840 }
9841
9842
9843 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9844 return &awshrwrr, true
9845 }
9846
9847
9848 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9849 return nil, false
9850 }
9851
9852
9853 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9854 return nil, false
9855 }
9856
9857
9858 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9859 return nil, false
9860 }
9861
9862
9863 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9864 return &awshrwrr, true
9865 }
9866
9867
9868 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9869 return nil, false
9870 }
9871
9872
9873 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9874 return nil, false
9875 }
9876
9877
9878 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9879 return nil, false
9880 }
9881
9882
9883 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9884 return nil, false
9885 }
9886
9887
9888 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9889 return nil, false
9890 }
9891
9892
9893 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9894 return nil, false
9895 }
9896
9897
9898 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9899 return nil, false
9900 }
9901
9902
9903 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9904 return &awshrwrr, true
9905 }
9906
9907
9908 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9909 return nil, false
9910 }
9911
9912
9913 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9914 return nil, false
9915 }
9916
9917
9918 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9919 return nil, false
9920 }
9921
9922
9923 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9924 return nil, false
9925 }
9926
9927
9928 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9929 return &awshrwrr, true
9930 }
9931
9932
9933 type AzureWorkloadSQLAutoProtectionIntent struct {
9934
9935 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
9936
9937 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9938
9939 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9940
9941 ItemID *string `json:"itemId,omitempty"`
9942
9943 PolicyID *string `json:"policyId,omitempty"`
9944
9945 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
9946
9947 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
9948 }
9949
9950
9951 func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) {
9952 awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent
9953 objectMap := make(map[string]interface{})
9954 if awsapi.WorkloadItemType != "" {
9955 objectMap["workloadItemType"] = awsapi.WorkloadItemType
9956 }
9957 if awsapi.BackupManagementType != "" {
9958 objectMap["backupManagementType"] = awsapi.BackupManagementType
9959 }
9960 if awsapi.SourceResourceID != nil {
9961 objectMap["sourceResourceId"] = awsapi.SourceResourceID
9962 }
9963 if awsapi.ItemID != nil {
9964 objectMap["itemId"] = awsapi.ItemID
9965 }
9966 if awsapi.PolicyID != nil {
9967 objectMap["policyId"] = awsapi.PolicyID
9968 }
9969 if awsapi.ProtectionState != "" {
9970 objectMap["protectionState"] = awsapi.ProtectionState
9971 }
9972 if awsapi.ProtectionIntentItemType != "" {
9973 objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType
9974 }
9975 return json.Marshal(objectMap)
9976 }
9977
9978
9979 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
9980 return nil, false
9981 }
9982
9983
9984 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
9985 return &awsapi, true
9986 }
9987
9988
9989 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
9990 return nil, false
9991 }
9992
9993
9994 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
9995 return nil, false
9996 }
9997
9998
9999 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
10000 return nil, false
10001 }
10002
10003
10004 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
10005 return &awsapi, true
10006 }
10007
10008
10009 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
10010 return &awsapi, true
10011 }
10012
10013
10014 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
10015 return nil, false
10016 }
10017
10018
10019 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
10020 return &awsapi, true
10021 }
10022
10023
10024 type AzureWorkloadSQLPointInTimeRecoveryPoint struct {
10025
10026 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
10027
10028
10029
10030 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
10031
10032 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
10033
10034 Type RestorePointType `json:"type,omitempty"`
10035
10036 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
10037
10038 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
10039
10040 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
10041 }
10042
10043
10044 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
10045 awspitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint
10046 objectMap := make(map[string]interface{})
10047 if awspitrp.TimeRanges != nil {
10048 objectMap["timeRanges"] = awspitrp.TimeRanges
10049 }
10050 if awspitrp.ExtendedInfo != nil {
10051 objectMap["extendedInfo"] = awspitrp.ExtendedInfo
10052 }
10053 if awspitrp.RecoveryPointTimeInUTC != nil {
10054 objectMap["recoveryPointTimeInUTC"] = awspitrp.RecoveryPointTimeInUTC
10055 }
10056 if awspitrp.Type != "" {
10057 objectMap["type"] = awspitrp.Type
10058 }
10059 if awspitrp.RecoveryPointTierDetails != nil {
10060 objectMap["recoveryPointTierDetails"] = awspitrp.RecoveryPointTierDetails
10061 }
10062 if awspitrp.RecoveryPointMoveReadinessInfo != nil {
10063 objectMap["recoveryPointMoveReadinessInfo"] = awspitrp.RecoveryPointMoveReadinessInfo
10064 }
10065 if awspitrp.ObjectType != "" {
10066 objectMap["objectType"] = awspitrp.ObjectType
10067 }
10068 return json.Marshal(objectMap)
10069 }
10070
10071
10072 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
10073 return nil, false
10074 }
10075
10076
10077 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
10078 return nil, false
10079 }
10080
10081
10082 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
10083 return nil, false
10084 }
10085
10086
10087 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
10088 return nil, false
10089 }
10090
10091
10092 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
10093 return &awspitrp, true
10094 }
10095
10096
10097 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
10098 return nil, false
10099 }
10100
10101
10102 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
10103 return nil, false
10104 }
10105
10106
10107 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
10108 return &awspitrp, true
10109 }
10110
10111
10112 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
10113 return nil, false
10114 }
10115
10116
10117 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
10118 return &awspitrp, true
10119 }
10120
10121
10122 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
10123 return nil, false
10124 }
10125
10126
10127 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
10128 return nil, false
10129 }
10130
10131
10132 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
10133 return nil, false
10134 }
10135
10136
10137 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
10138 return &awspitrp, true
10139 }
10140
10141
10142
10143 type BasicAzureWorkloadSQLPointInTimeRestoreRequest interface {
10144 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
10145 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
10146 }
10147
10148
10149
10150 type AzureWorkloadSQLPointInTimeRestoreRequest struct {
10151
10152 PointInTime *date.Time `json:"pointInTime,omitempty"`
10153
10154 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10155
10156 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10157
10158 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10159
10160 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10161
10162 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10163
10164 PropertyBag map[string]*string `json:"propertyBag"`
10165
10166 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10167
10168 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10169
10170
10171 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10172
10173 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10174 }
10175
10176 func unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequest(body []byte) (BasicAzureWorkloadSQLPointInTimeRestoreRequest, error) {
10177 var m map[string]interface{}
10178 err := json.Unmarshal(body, &m)
10179 if err != nil {
10180 return nil, err
10181 }
10182
10183 switch m["objectType"] {
10184 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
10185 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
10186 err := json.Unmarshal(body, &awspitrwrr)
10187 return awspitrwrr, err
10188 default:
10189 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
10190 err := json.Unmarshal(body, &awspitrr)
10191 return awspitrr, err
10192 }
10193 }
10194 func unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLPointInTimeRestoreRequest, error) {
10195 var rawMessages []*json.RawMessage
10196 err := json.Unmarshal(body, &rawMessages)
10197 if err != nil {
10198 return nil, err
10199 }
10200
10201 awspitrrArray := make([]BasicAzureWorkloadSQLPointInTimeRestoreRequest, len(rawMessages))
10202
10203 for index, rawMessage := range rawMessages {
10204 awspitrr, err := unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequest(*rawMessage)
10205 if err != nil {
10206 return nil, err
10207 }
10208 awspitrrArray[index] = awspitrr
10209 }
10210 return awspitrrArray, nil
10211 }
10212
10213
10214 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
10215 awspitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest
10216 objectMap := make(map[string]interface{})
10217 if awspitrr.PointInTime != nil {
10218 objectMap["pointInTime"] = awspitrr.PointInTime
10219 }
10220 if awspitrr.ShouldUseAlternateTargetLocation != nil {
10221 objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation
10222 }
10223 if awspitrr.IsNonRecoverable != nil {
10224 objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable
10225 }
10226 if awspitrr.AlternateDirectoryPaths != nil {
10227 objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths
10228 }
10229 if awspitrr.RecoveryType != "" {
10230 objectMap["recoveryType"] = awspitrr.RecoveryType
10231 }
10232 if awspitrr.SourceResourceID != nil {
10233 objectMap["sourceResourceId"] = awspitrr.SourceResourceID
10234 }
10235 if awspitrr.PropertyBag != nil {
10236 objectMap["propertyBag"] = awspitrr.PropertyBag
10237 }
10238 if awspitrr.TargetInfo != nil {
10239 objectMap["targetInfo"] = awspitrr.TargetInfo
10240 }
10241 if awspitrr.RecoveryMode != "" {
10242 objectMap["recoveryMode"] = awspitrr.RecoveryMode
10243 }
10244 if awspitrr.TargetVirtualMachineID != nil {
10245 objectMap["targetVirtualMachineId"] = awspitrr.TargetVirtualMachineID
10246 }
10247 if awspitrr.ObjectType != "" {
10248 objectMap["objectType"] = awspitrr.ObjectType
10249 }
10250 return json.Marshal(objectMap)
10251 }
10252
10253
10254 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10255 return nil, false
10256 }
10257
10258
10259 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10260 return nil, false
10261 }
10262
10263
10264 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10265 return nil, false
10266 }
10267
10268
10269 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10270 return &awspitrr, true
10271 }
10272
10273
10274 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10275 return nil, false
10276 }
10277
10278
10279 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10280 return nil, false
10281 }
10282
10283
10284 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10285 return nil, false
10286 }
10287
10288
10289 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10290 return nil, false
10291 }
10292
10293
10294 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10295 return &awspitrr, true
10296 }
10297
10298
10299 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10300 return &awspitrr, true
10301 }
10302
10303
10304 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10305 return nil, false
10306 }
10307
10308
10309 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10310 return &awspitrr, true
10311 }
10312
10313
10314 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10315 return nil, false
10316 }
10317
10318
10319 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10320 return nil, false
10321 }
10322
10323
10324 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10325 return nil, false
10326 }
10327
10328
10329 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10330 return nil, false
10331 }
10332
10333
10334 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10335 return nil, false
10336 }
10337
10338
10339 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10340 return nil, false
10341 }
10342
10343
10344 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10345 return nil, false
10346 }
10347
10348
10349 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10350 return nil, false
10351 }
10352
10353
10354 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10355 return &awspitrr, true
10356 }
10357
10358
10359
10360 type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct {
10361
10362 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
10363
10364 PointInTime *date.Time `json:"pointInTime,omitempty"`
10365
10366 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10367
10368 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10369
10370 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10371
10372 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10373
10374 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10375
10376 PropertyBag map[string]*string `json:"propertyBag"`
10377
10378 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10379
10380 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10381
10382
10383 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10384
10385 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10386 }
10387
10388
10389 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
10390 awspitrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
10391 objectMap := make(map[string]interface{})
10392 if awspitrwrr.RecoveryPointRehydrationInfo != nil {
10393 objectMap["recoveryPointRehydrationInfo"] = awspitrwrr.RecoveryPointRehydrationInfo
10394 }
10395 if awspitrwrr.PointInTime != nil {
10396 objectMap["pointInTime"] = awspitrwrr.PointInTime
10397 }
10398 if awspitrwrr.ShouldUseAlternateTargetLocation != nil {
10399 objectMap["shouldUseAlternateTargetLocation"] = awspitrwrr.ShouldUseAlternateTargetLocation
10400 }
10401 if awspitrwrr.IsNonRecoverable != nil {
10402 objectMap["isNonRecoverable"] = awspitrwrr.IsNonRecoverable
10403 }
10404 if awspitrwrr.AlternateDirectoryPaths != nil {
10405 objectMap["alternateDirectoryPaths"] = awspitrwrr.AlternateDirectoryPaths
10406 }
10407 if awspitrwrr.RecoveryType != "" {
10408 objectMap["recoveryType"] = awspitrwrr.RecoveryType
10409 }
10410 if awspitrwrr.SourceResourceID != nil {
10411 objectMap["sourceResourceId"] = awspitrwrr.SourceResourceID
10412 }
10413 if awspitrwrr.PropertyBag != nil {
10414 objectMap["propertyBag"] = awspitrwrr.PropertyBag
10415 }
10416 if awspitrwrr.TargetInfo != nil {
10417 objectMap["targetInfo"] = awspitrwrr.TargetInfo
10418 }
10419 if awspitrwrr.RecoveryMode != "" {
10420 objectMap["recoveryMode"] = awspitrwrr.RecoveryMode
10421 }
10422 if awspitrwrr.TargetVirtualMachineID != nil {
10423 objectMap["targetVirtualMachineId"] = awspitrwrr.TargetVirtualMachineID
10424 }
10425 if awspitrwrr.ObjectType != "" {
10426 objectMap["objectType"] = awspitrwrr.ObjectType
10427 }
10428 return json.Marshal(objectMap)
10429 }
10430
10431
10432 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10433 return nil, false
10434 }
10435
10436
10437 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10438 return nil, false
10439 }
10440
10441
10442 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10443 return nil, false
10444 }
10445
10446
10447 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10448 return &awspitrwrr, true
10449 }
10450
10451
10452 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10453 return nil, false
10454 }
10455
10456
10457 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10458 return nil, false
10459 }
10460
10461
10462 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10463 return nil, false
10464 }
10465
10466
10467 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10468 return nil, false
10469 }
10470
10471
10472 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10473 return nil, false
10474 }
10475
10476
10477 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10478 return &awspitrwrr, true
10479 }
10480
10481
10482 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10483 return nil, false
10484 }
10485
10486
10487 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10488 return &awspitrwrr, true
10489 }
10490
10491
10492 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10493 return nil, false
10494 }
10495
10496
10497 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10498 return nil, false
10499 }
10500
10501
10502 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10503 return nil, false
10504 }
10505
10506
10507 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10508 return nil, false
10509 }
10510
10511
10512 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10513 return &awspitrwrr, true
10514 }
10515
10516
10517 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10518 return nil, false
10519 }
10520
10521
10522 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10523 return nil, false
10524 }
10525
10526
10527 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10528 return nil, false
10529 }
10530
10531
10532 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10533 return &awspitrwrr, true
10534 }
10535
10536
10537
10538 type BasicAzureWorkloadSQLRecoveryPoint interface {
10539 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
10540 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
10541 }
10542
10543
10544
10545 type AzureWorkloadSQLRecoveryPoint struct {
10546
10547
10548
10549 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
10550
10551 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
10552
10553 Type RestorePointType `json:"type,omitempty"`
10554
10555 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
10556
10557 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
10558
10559 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
10560 }
10561
10562 func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) {
10563 var m map[string]interface{}
10564 err := json.Unmarshal(body, &m)
10565 if err != nil {
10566 return nil, err
10567 }
10568
10569 switch m["objectType"] {
10570 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
10571 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
10572 err := json.Unmarshal(body, &awspitrp)
10573 return awspitrp, err
10574 default:
10575 var awsrp AzureWorkloadSQLRecoveryPoint
10576 err := json.Unmarshal(body, &awsrp)
10577 return awsrp, err
10578 }
10579 }
10580 func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) {
10581 var rawMessages []*json.RawMessage
10582 err := json.Unmarshal(body, &rawMessages)
10583 if err != nil {
10584 return nil, err
10585 }
10586
10587 awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages))
10588
10589 for index, rawMessage := range rawMessages {
10590 awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage)
10591 if err != nil {
10592 return nil, err
10593 }
10594 awsrpArray[index] = awsrp
10595 }
10596 return awsrpArray, nil
10597 }
10598
10599
10600 func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) {
10601 awsrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint
10602 objectMap := make(map[string]interface{})
10603 if awsrp.ExtendedInfo != nil {
10604 objectMap["extendedInfo"] = awsrp.ExtendedInfo
10605 }
10606 if awsrp.RecoveryPointTimeInUTC != nil {
10607 objectMap["recoveryPointTimeInUTC"] = awsrp.RecoveryPointTimeInUTC
10608 }
10609 if awsrp.Type != "" {
10610 objectMap["type"] = awsrp.Type
10611 }
10612 if awsrp.RecoveryPointTierDetails != nil {
10613 objectMap["recoveryPointTierDetails"] = awsrp.RecoveryPointTierDetails
10614 }
10615 if awsrp.RecoveryPointMoveReadinessInfo != nil {
10616 objectMap["recoveryPointMoveReadinessInfo"] = awsrp.RecoveryPointMoveReadinessInfo
10617 }
10618 if awsrp.ObjectType != "" {
10619 objectMap["objectType"] = awsrp.ObjectType
10620 }
10621 return json.Marshal(objectMap)
10622 }
10623
10624
10625 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
10626 return nil, false
10627 }
10628
10629
10630 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
10631 return nil, false
10632 }
10633
10634
10635 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
10636 return nil, false
10637 }
10638
10639
10640 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
10641 return nil, false
10642 }
10643
10644
10645 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
10646 return &awsrp, true
10647 }
10648
10649
10650 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
10651 return nil, false
10652 }
10653
10654
10655 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
10656 return nil, false
10657 }
10658
10659
10660 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
10661 return nil, false
10662 }
10663
10664
10665 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
10666 return &awsrp, true
10667 }
10668
10669
10670 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
10671 return &awsrp, true
10672 }
10673
10674
10675 func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
10676 return nil, false
10677 }
10678
10679
10680 func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
10681 return nil, false
10682 }
10683
10684
10685 func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
10686 return nil, false
10687 }
10688
10689
10690 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
10691 return &awsrp, true
10692 }
10693
10694
10695 type AzureWorkloadSQLRecoveryPointExtendedInfo struct {
10696
10697 DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"`
10698
10699 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
10700 }
10701
10702
10703 type BasicAzureWorkloadSQLRestoreRequest interface {
10704 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
10705 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
10706 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
10707 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
10708 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
10709 }
10710
10711
10712 type AzureWorkloadSQLRestoreRequest struct {
10713
10714 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10715
10716 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10717
10718 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10719
10720 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10721
10722 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10723
10724 PropertyBag map[string]*string `json:"propertyBag"`
10725
10726 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10727
10728 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10729
10730
10731 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10732
10733 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10734 }
10735
10736 func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) {
10737 var m map[string]interface{}
10738 err := json.Unmarshal(body, &m)
10739 if err != nil {
10740 return nil, err
10741 }
10742
10743 switch m["objectType"] {
10744 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
10745 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
10746 err := json.Unmarshal(body, &awspitrr)
10747 return awspitrr, err
10748 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
10749 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
10750 err := json.Unmarshal(body, &awspitrwrr)
10751 return awspitrwrr, err
10752 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
10753 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
10754 err := json.Unmarshal(body, &awsrwrr)
10755 return awsrwrr, err
10756 default:
10757 var awsrr AzureWorkloadSQLRestoreRequest
10758 err := json.Unmarshal(body, &awsrr)
10759 return awsrr, err
10760 }
10761 }
10762 func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) {
10763 var rawMessages []*json.RawMessage
10764 err := json.Unmarshal(body, &rawMessages)
10765 if err != nil {
10766 return nil, err
10767 }
10768
10769 awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages))
10770
10771 for index, rawMessage := range rawMessages {
10772 awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage)
10773 if err != nil {
10774 return nil, err
10775 }
10776 awsrrArray[index] = awsrr
10777 }
10778 return awsrrArray, nil
10779 }
10780
10781
10782 func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) {
10783 awsrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest
10784 objectMap := make(map[string]interface{})
10785 if awsrr.ShouldUseAlternateTargetLocation != nil {
10786 objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation
10787 }
10788 if awsrr.IsNonRecoverable != nil {
10789 objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable
10790 }
10791 if awsrr.AlternateDirectoryPaths != nil {
10792 objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths
10793 }
10794 if awsrr.RecoveryType != "" {
10795 objectMap["recoveryType"] = awsrr.RecoveryType
10796 }
10797 if awsrr.SourceResourceID != nil {
10798 objectMap["sourceResourceId"] = awsrr.SourceResourceID
10799 }
10800 if awsrr.PropertyBag != nil {
10801 objectMap["propertyBag"] = awsrr.PropertyBag
10802 }
10803 if awsrr.TargetInfo != nil {
10804 objectMap["targetInfo"] = awsrr.TargetInfo
10805 }
10806 if awsrr.RecoveryMode != "" {
10807 objectMap["recoveryMode"] = awsrr.RecoveryMode
10808 }
10809 if awsrr.TargetVirtualMachineID != nil {
10810 objectMap["targetVirtualMachineId"] = awsrr.TargetVirtualMachineID
10811 }
10812 if awsrr.ObjectType != "" {
10813 objectMap["objectType"] = awsrr.ObjectType
10814 }
10815 return json.Marshal(objectMap)
10816 }
10817
10818
10819 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10820 return nil, false
10821 }
10822
10823
10824 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10825 return nil, false
10826 }
10827
10828
10829 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10830 return nil, false
10831 }
10832
10833
10834 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10835 return &awsrr, true
10836 }
10837
10838
10839 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10840 return nil, false
10841 }
10842
10843
10844 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10845 return nil, false
10846 }
10847
10848
10849 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10850 return nil, false
10851 }
10852
10853
10854 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10855 return nil, false
10856 }
10857
10858
10859 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10860 return nil, false
10861 }
10862
10863
10864 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10865 return nil, false
10866 }
10867
10868
10869 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10870 return &awsrr, true
10871 }
10872
10873
10874 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10875 return &awsrr, true
10876 }
10877
10878
10879 func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10880 return nil, false
10881 }
10882
10883
10884 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10885 return nil, false
10886 }
10887
10888
10889 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10890 return nil, false
10891 }
10892
10893
10894 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10895 return nil, false
10896 }
10897
10898
10899 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10900 return nil, false
10901 }
10902
10903
10904 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10905 return nil, false
10906 }
10907
10908
10909 func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10910 return nil, false
10911 }
10912
10913
10914 func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10915 return nil, false
10916 }
10917
10918
10919 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10920 return &awsrr, true
10921 }
10922
10923
10924
10925 type AzureWorkloadSQLRestoreWithRehydrateRequest struct {
10926
10927 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
10928
10929 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10930
10931 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10932
10933 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10934
10935 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10936
10937 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10938
10939 PropertyBag map[string]*string `json:"propertyBag"`
10940
10941 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10942
10943 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10944
10945
10946 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10947
10948 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10949 }
10950
10951
10952 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
10953 awsrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest
10954 objectMap := make(map[string]interface{})
10955 if awsrwrr.RecoveryPointRehydrationInfo != nil {
10956 objectMap["recoveryPointRehydrationInfo"] = awsrwrr.RecoveryPointRehydrationInfo
10957 }
10958 if awsrwrr.ShouldUseAlternateTargetLocation != nil {
10959 objectMap["shouldUseAlternateTargetLocation"] = awsrwrr.ShouldUseAlternateTargetLocation
10960 }
10961 if awsrwrr.IsNonRecoverable != nil {
10962 objectMap["isNonRecoverable"] = awsrwrr.IsNonRecoverable
10963 }
10964 if awsrwrr.AlternateDirectoryPaths != nil {
10965 objectMap["alternateDirectoryPaths"] = awsrwrr.AlternateDirectoryPaths
10966 }
10967 if awsrwrr.RecoveryType != "" {
10968 objectMap["recoveryType"] = awsrwrr.RecoveryType
10969 }
10970 if awsrwrr.SourceResourceID != nil {
10971 objectMap["sourceResourceId"] = awsrwrr.SourceResourceID
10972 }
10973 if awsrwrr.PropertyBag != nil {
10974 objectMap["propertyBag"] = awsrwrr.PropertyBag
10975 }
10976 if awsrwrr.TargetInfo != nil {
10977 objectMap["targetInfo"] = awsrwrr.TargetInfo
10978 }
10979 if awsrwrr.RecoveryMode != "" {
10980 objectMap["recoveryMode"] = awsrwrr.RecoveryMode
10981 }
10982 if awsrwrr.TargetVirtualMachineID != nil {
10983 objectMap["targetVirtualMachineId"] = awsrwrr.TargetVirtualMachineID
10984 }
10985 if awsrwrr.ObjectType != "" {
10986 objectMap["objectType"] = awsrwrr.ObjectType
10987 }
10988 return json.Marshal(objectMap)
10989 }
10990
10991
10992 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10993 return nil, false
10994 }
10995
10996
10997 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10998 return nil, false
10999 }
11000
11001
11002 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
11003 return nil, false
11004 }
11005
11006
11007 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
11008 return &awsrwrr, true
11009 }
11010
11011
11012 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
11013 return nil, false
11014 }
11015
11016
11017 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
11018 return nil, false
11019 }
11020
11021
11022 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
11023 return nil, false
11024 }
11025
11026
11027 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
11028 return nil, false
11029 }
11030
11031
11032 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
11033 return nil, false
11034 }
11035
11036
11037 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
11038 return nil, false
11039 }
11040
11041
11042 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
11043 return nil, false
11044 }
11045
11046
11047 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
11048 return &awsrwrr, true
11049 }
11050
11051
11052 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
11053 return nil, false
11054 }
11055
11056
11057 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
11058 return nil, false
11059 }
11060
11061
11062 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
11063 return nil, false
11064 }
11065
11066
11067 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
11068 return nil, false
11069 }
11070
11071
11072 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
11073 return nil, false
11074 }
11075
11076
11077 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
11078 return &awsrwrr, true
11079 }
11080
11081
11082 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
11083 return nil, false
11084 }
11085
11086
11087 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
11088 return nil, false
11089 }
11090
11091
11092 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
11093 return &awsrwrr, true
11094 }
11095
11096
11097 type BEKDetails struct {
11098
11099 SecretURL *string `json:"secretUrl,omitempty"`
11100
11101 SecretVaultID *string `json:"secretVaultId,omitempty"`
11102
11103 SecretData *string `json:"secretData,omitempty"`
11104 }
11105
11106
11107 type BMSBackupEngineQueryObject struct {
11108
11109 Expand *string `json:"expand,omitempty"`
11110 }
11111
11112
11113 type BMSBackupEnginesQueryObject struct {
11114
11115 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11116
11117 FriendlyName *string `json:"friendlyName,omitempty"`
11118
11119 Expand *string `json:"expand,omitempty"`
11120 }
11121
11122
11123 type BMSBackupSummariesQueryObject struct {
11124
11125 Type Type `json:"type,omitempty"`
11126 }
11127
11128
11129 type BMSContainerQueryObject struct {
11130
11131 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11132
11133 ContainerType ContainerType `json:"containerType,omitempty"`
11134
11135 BackupEngineName *string `json:"backupEngineName,omitempty"`
11136
11137 FabricName *string `json:"fabricName,omitempty"`
11138
11139 Status *string `json:"status,omitempty"`
11140
11141 FriendlyName *string `json:"friendlyName,omitempty"`
11142 }
11143
11144
11145 type BMSContainersInquiryQueryObject struct {
11146
11147 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11148
11149 WorkloadType WorkloadType `json:"workloadType,omitempty"`
11150 }
11151
11152
11153 type BMSPOQueryObject struct {
11154
11155 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11156
11157 WorkloadType WorkloadType `json:"workloadType,omitempty"`
11158
11159 ContainerName *string `json:"containerName,omitempty"`
11160
11161 Status *string `json:"status,omitempty"`
11162
11163 FriendlyName *string `json:"friendlyName,omitempty"`
11164 }
11165
11166
11167
11168 type BMSPrepareDataMoveFuture struct {
11169 azure.FutureAPI
11170
11171
11172 Result func(BaseClient) (autorest.Response, error)
11173 }
11174
11175
11176 func (future *BMSPrepareDataMoveFuture) UnmarshalJSON(body []byte) error {
11177 var azFuture azure.Future
11178 if err := json.Unmarshal(body, &azFuture); err != nil {
11179 return err
11180 }
11181 future.FutureAPI = &azFuture
11182 future.Result = future.result
11183 return nil
11184 }
11185
11186
11187 func (future *BMSPrepareDataMoveFuture) result(client BaseClient) (ar autorest.Response, err error) {
11188 var done bool
11189 done, err = future.DoneWithContext(context.Background(), client)
11190 if err != nil {
11191 err = autorest.NewErrorWithError(err, "backup.BMSPrepareDataMoveFuture", "Result", future.Response(), "Polling failure")
11192 return
11193 }
11194 if !done {
11195 ar.Response = future.Response()
11196 err = azure.NewAsyncOpIncompleteError("backup.BMSPrepareDataMoveFuture")
11197 return
11198 }
11199 ar.Response = future.Response()
11200 return
11201 }
11202
11203
11204 type BMSRefreshContainersQueryObject struct {
11205
11206 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11207 }
11208
11209
11210 type BMSRPQueryObject struct {
11211
11212 StartDate *date.Time `json:"startDate,omitempty"`
11213
11214 EndDate *date.Time `json:"endDate,omitempty"`
11215
11216 RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"`
11217
11218 ExtendedInfo *bool `json:"extendedInfo,omitempty"`
11219
11220 MoveReadyRPOnly *bool `json:"moveReadyRPOnly,omitempty"`
11221 }
11222
11223
11224
11225 type BMSTriggerDataMoveFuture struct {
11226 azure.FutureAPI
11227
11228
11229 Result func(BaseClient) (autorest.Response, error)
11230 }
11231
11232
11233 func (future *BMSTriggerDataMoveFuture) UnmarshalJSON(body []byte) error {
11234 var azFuture azure.Future
11235 if err := json.Unmarshal(body, &azFuture); err != nil {
11236 return err
11237 }
11238 future.FutureAPI = &azFuture
11239 future.Result = future.result
11240 return nil
11241 }
11242
11243
11244 func (future *BMSTriggerDataMoveFuture) result(client BaseClient) (ar autorest.Response, err error) {
11245 var done bool
11246 done, err = future.DoneWithContext(context.Background(), client)
11247 if err != nil {
11248 err = autorest.NewErrorWithError(err, "backup.BMSTriggerDataMoveFuture", "Result", future.Response(), "Polling failure")
11249 return
11250 }
11251 if !done {
11252 ar.Response = future.Response()
11253 err = azure.NewAsyncOpIncompleteError("backup.BMSTriggerDataMoveFuture")
11254 return
11255 }
11256 ar.Response = future.Response()
11257 return
11258 }
11259
11260
11261 type BMSWorkloadItemQueryObject struct {
11262
11263 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11264
11265 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
11266
11267 WorkloadType WorkloadType `json:"workloadType,omitempty"`
11268
11269 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
11270 }
11271
11272
11273 type ClientDiscoveryDisplay struct {
11274
11275 Provider *string `json:"provider,omitempty"`
11276
11277 Resource *string `json:"resource,omitempty"`
11278
11279 Operation *string `json:"operation,omitempty"`
11280
11281 Description *string `json:"description,omitempty"`
11282 }
11283
11284
11285
11286 type ClientDiscoveryForLogSpecification struct {
11287
11288 Name *string `json:"name,omitempty"`
11289
11290 DisplayName *string `json:"displayName,omitempty"`
11291
11292 BlobDuration *string `json:"blobDuration,omitempty"`
11293 }
11294
11295
11296 type ClientDiscoveryForProperties struct {
11297
11298 ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"`
11299 }
11300
11301
11302
11303 type ClientDiscoveryForServiceSpecification struct {
11304
11305 LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"`
11306 }
11307
11308
11309 type ClientDiscoveryResponse struct {
11310 autorest.Response `json:"-"`
11311
11312 Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"`
11313
11314 NextLink *string `json:"nextLink,omitempty"`
11315 }
11316
11317
11318
11319 type ClientDiscoveryResponseIterator struct {
11320 i int
11321 page ClientDiscoveryResponsePage
11322 }
11323
11324
11325
11326 func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) {
11327 if tracing.IsEnabled() {
11328 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext")
11329 defer func() {
11330 sc := -1
11331 if iter.Response().Response.Response != nil {
11332 sc = iter.Response().Response.Response.StatusCode
11333 }
11334 tracing.EndSpan(ctx, sc, err)
11335 }()
11336 }
11337 iter.i++
11338 if iter.i < len(iter.page.Values()) {
11339 return nil
11340 }
11341 err = iter.page.NextWithContext(ctx)
11342 if err != nil {
11343 iter.i--
11344 return err
11345 }
11346 iter.i = 0
11347 return nil
11348 }
11349
11350
11351
11352
11353 func (iter *ClientDiscoveryResponseIterator) Next() error {
11354 return iter.NextWithContext(context.Background())
11355 }
11356
11357
11358 func (iter ClientDiscoveryResponseIterator) NotDone() bool {
11359 return iter.page.NotDone() && iter.i < len(iter.page.Values())
11360 }
11361
11362
11363 func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse {
11364 return iter.page.Response()
11365 }
11366
11367
11368
11369 func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI {
11370 if !iter.page.NotDone() {
11371 return ClientDiscoveryValueForSingleAPI{}
11372 }
11373 return iter.page.Values()[iter.i]
11374 }
11375
11376
11377 func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator {
11378 return ClientDiscoveryResponseIterator{page: page}
11379 }
11380
11381
11382 func (cdr ClientDiscoveryResponse) IsEmpty() bool {
11383 return cdr.Value == nil || len(*cdr.Value) == 0
11384 }
11385
11386
11387 func (cdr ClientDiscoveryResponse) hasNextLink() bool {
11388 return cdr.NextLink != nil && len(*cdr.NextLink) != 0
11389 }
11390
11391
11392
11393 func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) {
11394 if !cdr.hasNextLink() {
11395 return nil, nil
11396 }
11397 return autorest.Prepare((&http.Request{}).WithContext(ctx),
11398 autorest.AsJSON(),
11399 autorest.AsGet(),
11400 autorest.WithBaseURL(to.String(cdr.NextLink)))
11401 }
11402
11403
11404 type ClientDiscoveryResponsePage struct {
11405 fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)
11406 cdr ClientDiscoveryResponse
11407 }
11408
11409
11410
11411 func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) {
11412 if tracing.IsEnabled() {
11413 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext")
11414 defer func() {
11415 sc := -1
11416 if page.Response().Response.Response != nil {
11417 sc = page.Response().Response.Response.StatusCode
11418 }
11419 tracing.EndSpan(ctx, sc, err)
11420 }()
11421 }
11422 for {
11423 next, err := page.fn(ctx, page.cdr)
11424 if err != nil {
11425 return err
11426 }
11427 page.cdr = next
11428 if !next.hasNextLink() || !next.IsEmpty() {
11429 break
11430 }
11431 }
11432 return nil
11433 }
11434
11435
11436
11437
11438 func (page *ClientDiscoveryResponsePage) Next() error {
11439 return page.NextWithContext(context.Background())
11440 }
11441
11442
11443 func (page ClientDiscoveryResponsePage) NotDone() bool {
11444 return !page.cdr.IsEmpty()
11445 }
11446
11447
11448 func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse {
11449 return page.cdr
11450 }
11451
11452
11453 func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI {
11454 if page.cdr.IsEmpty() {
11455 return nil
11456 }
11457 return *page.cdr.Value
11458 }
11459
11460
11461 func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage {
11462 return ClientDiscoveryResponsePage{
11463 fn: getNextPage,
11464 cdr: cur,
11465 }
11466 }
11467
11468
11469 type ClientDiscoveryValueForSingleAPI struct {
11470
11471 Name *string `json:"name,omitempty"`
11472
11473 Display *ClientDiscoveryDisplay `json:"display,omitempty"`
11474
11475 Origin *string `json:"origin,omitempty"`
11476
11477 Properties *ClientDiscoveryForProperties `json:"properties,omitempty"`
11478 }
11479
11480
11481 type ClientScriptForConnect struct {
11482
11483 ScriptContent *string `json:"scriptContent,omitempty"`
11484
11485 ScriptExtension *string `json:"scriptExtension,omitempty"`
11486
11487 OsType *string `json:"osType,omitempty"`
11488
11489 URL *string `json:"url,omitempty"`
11490
11491
11492 ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"`
11493 }
11494
11495
11496 type CloudError struct {
11497
11498 Error *CloudErrorBody `json:"error,omitempty"`
11499 }
11500
11501
11502 type CloudErrorBody struct {
11503
11504 Code *string `json:"code,omitempty"`
11505
11506 Message *string `json:"message,omitempty"`
11507
11508 Target *string `json:"target,omitempty"`
11509
11510 Details *[]CloudErrorBody `json:"details,omitempty"`
11511
11512 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
11513 }
11514
11515
11516 func (ceb CloudErrorBody) MarshalJSON() ([]byte, error) {
11517 objectMap := make(map[string]interface{})
11518 return json.Marshal(objectMap)
11519 }
11520
11521
11522 type ContainerIdentityInfo struct {
11523
11524 UniqueName *string `json:"uniqueName,omitempty"`
11525
11526 AadTenantID *string `json:"aadTenantId,omitempty"`
11527
11528 ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
11529
11530 Audience *string `json:"audience,omitempty"`
11531 }
11532
11533
11534 type DailyRetentionFormat struct {
11535
11536 DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"`
11537 }
11538
11539
11540 type DailyRetentionSchedule struct {
11541
11542 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
11543
11544 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
11545 }
11546
11547
11548 type DailySchedule struct {
11549
11550 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"`
11551 }
11552
11553
11554 type Day struct {
11555
11556 Date *int32 `json:"date,omitempty"`
11557
11558 IsLast *bool `json:"isLast,omitempty"`
11559 }
11560
11561
11562 type DiskExclusionProperties struct {
11563
11564 DiskLunList *[]int32 `json:"diskLunList,omitempty"`
11565
11566 IsInclusionList *bool `json:"isInclusionList,omitempty"`
11567 }
11568
11569
11570 type DiskInformation struct {
11571 Lun *int32 `json:"lun,omitempty"`
11572 Name *string `json:"name,omitempty"`
11573 }
11574
11575
11576 type DistributedNodesInfo struct {
11577
11578 NodeName *string `json:"nodeName,omitempty"`
11579
11580
11581 Status *string `json:"status,omitempty"`
11582
11583 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
11584 }
11585
11586
11587 type DpmBackupEngine struct {
11588
11589 FriendlyName *string `json:"friendlyName,omitempty"`
11590
11591 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11592
11593 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11594
11595 BackupEngineState *string `json:"backupEngineState,omitempty"`
11596
11597 HealthStatus *string `json:"healthStatus,omitempty"`
11598
11599 CanReRegister *bool `json:"canReRegister,omitempty"`
11600
11601 BackupEngineID *string `json:"backupEngineId,omitempty"`
11602
11603 DpmVersion *string `json:"dpmVersion,omitempty"`
11604
11605 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
11606
11607 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
11608
11609 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
11610
11611 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
11612
11613 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
11614 }
11615
11616
11617 func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) {
11618 dbe.BackupEngineType = EngineTypeBackupEngineTypeDpmBackupEngine
11619 objectMap := make(map[string]interface{})
11620 if dbe.FriendlyName != nil {
11621 objectMap["friendlyName"] = dbe.FriendlyName
11622 }
11623 if dbe.BackupManagementType != "" {
11624 objectMap["backupManagementType"] = dbe.BackupManagementType
11625 }
11626 if dbe.RegistrationStatus != nil {
11627 objectMap["registrationStatus"] = dbe.RegistrationStatus
11628 }
11629 if dbe.BackupEngineState != nil {
11630 objectMap["backupEngineState"] = dbe.BackupEngineState
11631 }
11632 if dbe.HealthStatus != nil {
11633 objectMap["healthStatus"] = dbe.HealthStatus
11634 }
11635 if dbe.CanReRegister != nil {
11636 objectMap["canReRegister"] = dbe.CanReRegister
11637 }
11638 if dbe.BackupEngineID != nil {
11639 objectMap["backupEngineId"] = dbe.BackupEngineID
11640 }
11641 if dbe.DpmVersion != nil {
11642 objectMap["dpmVersion"] = dbe.DpmVersion
11643 }
11644 if dbe.AzureBackupAgentVersion != nil {
11645 objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion
11646 }
11647 if dbe.IsAzureBackupAgentUpgradeAvailable != nil {
11648 objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable
11649 }
11650 if dbe.IsDpmUpgradeAvailable != nil {
11651 objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable
11652 }
11653 if dbe.ExtendedInfo != nil {
11654 objectMap["extendedInfo"] = dbe.ExtendedInfo
11655 }
11656 if dbe.BackupEngineType != "" {
11657 objectMap["backupEngineType"] = dbe.BackupEngineType
11658 }
11659 return json.Marshal(objectMap)
11660 }
11661
11662
11663 func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
11664 return nil, false
11665 }
11666
11667
11668 func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
11669 return &dbe, true
11670 }
11671
11672
11673 func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) {
11674 return nil, false
11675 }
11676
11677
11678 func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
11679 return &dbe, true
11680 }
11681
11682
11683 type BasicDpmContainer interface {
11684 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
11685 AsDpmContainer() (*DpmContainer, bool)
11686 }
11687
11688
11689 type DpmContainer struct {
11690
11691 CanReRegister *bool `json:"canReRegister,omitempty"`
11692
11693 ContainerID *string `json:"containerId,omitempty"`
11694
11695 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
11696
11697 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
11698
11699 DpmServers *[]string `json:"dpmServers,omitempty"`
11700
11701 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
11702
11703 ProtectionStatus *string `json:"protectionStatus,omitempty"`
11704
11705 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
11706
11707 FriendlyName *string `json:"friendlyName,omitempty"`
11708
11709 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11710
11711 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11712
11713 HealthStatus *string `json:"healthStatus,omitempty"`
11714
11715 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
11716
11717 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
11718 }
11719
11720 func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) {
11721 var m map[string]interface{}
11722 err := json.Unmarshal(body, &m)
11723 if err != nil {
11724 return nil, err
11725 }
11726
11727 switch m["containerType"] {
11728 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer):
11729 var absc AzureBackupServerContainer
11730 err := json.Unmarshal(body, &absc)
11731 return absc, err
11732 default:
11733 var dc DpmContainer
11734 err := json.Unmarshal(body, &dc)
11735 return dc, err
11736 }
11737 }
11738 func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) {
11739 var rawMessages []*json.RawMessage
11740 err := json.Unmarshal(body, &rawMessages)
11741 if err != nil {
11742 return nil, err
11743 }
11744
11745 dcArray := make([]BasicDpmContainer, len(rawMessages))
11746
11747 for index, rawMessage := range rawMessages {
11748 dc, err := unmarshalBasicDpmContainer(*rawMessage)
11749 if err != nil {
11750 return nil, err
11751 }
11752 dcArray[index] = dc
11753 }
11754 return dcArray, nil
11755 }
11756
11757
11758 func (dc DpmContainer) MarshalJSON() ([]byte, error) {
11759 dc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeDPMContainer
11760 objectMap := make(map[string]interface{})
11761 if dc.CanReRegister != nil {
11762 objectMap["canReRegister"] = dc.CanReRegister
11763 }
11764 if dc.ContainerID != nil {
11765 objectMap["containerId"] = dc.ContainerID
11766 }
11767 if dc.ProtectedItemCount != nil {
11768 objectMap["protectedItemCount"] = dc.ProtectedItemCount
11769 }
11770 if dc.DpmAgentVersion != nil {
11771 objectMap["dpmAgentVersion"] = dc.DpmAgentVersion
11772 }
11773 if dc.DpmServers != nil {
11774 objectMap["dpmServers"] = dc.DpmServers
11775 }
11776 if dc.UpgradeAvailable != nil {
11777 objectMap["upgradeAvailable"] = dc.UpgradeAvailable
11778 }
11779 if dc.ProtectionStatus != nil {
11780 objectMap["protectionStatus"] = dc.ProtectionStatus
11781 }
11782 if dc.ExtendedInfo != nil {
11783 objectMap["extendedInfo"] = dc.ExtendedInfo
11784 }
11785 if dc.FriendlyName != nil {
11786 objectMap["friendlyName"] = dc.FriendlyName
11787 }
11788 if dc.BackupManagementType != "" {
11789 objectMap["backupManagementType"] = dc.BackupManagementType
11790 }
11791 if dc.RegistrationStatus != nil {
11792 objectMap["registrationStatus"] = dc.RegistrationStatus
11793 }
11794 if dc.HealthStatus != nil {
11795 objectMap["healthStatus"] = dc.HealthStatus
11796 }
11797 if dc.ProtectableObjectType != nil {
11798 objectMap["protectableObjectType"] = dc.ProtectableObjectType
11799 }
11800 if dc.ContainerType != "" {
11801 objectMap["containerType"] = dc.ContainerType
11802 }
11803 return json.Marshal(objectMap)
11804 }
11805
11806
11807 func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
11808 return nil, false
11809 }
11810
11811
11812 func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
11813 return nil, false
11814 }
11815
11816
11817 func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
11818 return nil, false
11819 }
11820
11821
11822 func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
11823 return nil, false
11824 }
11825
11826
11827 func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
11828 return nil, false
11829 }
11830
11831
11832 func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
11833 return nil, false
11834 }
11835
11836
11837 func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
11838 return nil, false
11839 }
11840
11841
11842 func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
11843 return nil, false
11844 }
11845
11846
11847 func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
11848 return nil, false
11849 }
11850
11851
11852 func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) {
11853 return &dc, true
11854 }
11855
11856
11857 func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
11858 return &dc, true
11859 }
11860
11861
11862 func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) {
11863 return nil, false
11864 }
11865
11866
11867 func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
11868 return nil, false
11869 }
11870
11871
11872 func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
11873 return nil, false
11874 }
11875
11876
11877 func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) {
11878 return nil, false
11879 }
11880
11881
11882 func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
11883 return nil, false
11884 }
11885
11886
11887 func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
11888 return &dc, true
11889 }
11890
11891
11892 type DPMContainerExtendedInfo struct {
11893
11894 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
11895 }
11896
11897
11898 type DpmErrorInfo struct {
11899
11900 ErrorString *string `json:"errorString,omitempty"`
11901
11902 Recommendations *[]string `json:"recommendations,omitempty"`
11903 }
11904
11905
11906 type DpmJob struct {
11907
11908 Duration *string `json:"duration,omitempty"`
11909
11910 DpmServerName *string `json:"dpmServerName,omitempty"`
11911
11912 ContainerName *string `json:"containerName,omitempty"`
11913
11914 ContainerType *string `json:"containerType,omitempty"`
11915
11916 WorkloadType *string `json:"workloadType,omitempty"`
11917
11918 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
11919
11920 ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"`
11921
11922 ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"`
11923
11924 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
11925
11926 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11927
11928 Operation *string `json:"operation,omitempty"`
11929
11930 Status *string `json:"status,omitempty"`
11931
11932 StartTime *date.Time `json:"startTime,omitempty"`
11933
11934 EndTime *date.Time `json:"endTime,omitempty"`
11935
11936 ActivityID *string `json:"activityId,omitempty"`
11937
11938 JobType JobType `json:"jobType,omitempty"`
11939 }
11940
11941
11942 func (dj DpmJob) MarshalJSON() ([]byte, error) {
11943 dj.JobType = JobTypeDpmJob
11944 objectMap := make(map[string]interface{})
11945 if dj.Duration != nil {
11946 objectMap["duration"] = dj.Duration
11947 }
11948 if dj.DpmServerName != nil {
11949 objectMap["dpmServerName"] = dj.DpmServerName
11950 }
11951 if dj.ContainerName != nil {
11952 objectMap["containerName"] = dj.ContainerName
11953 }
11954 if dj.ContainerType != nil {
11955 objectMap["containerType"] = dj.ContainerType
11956 }
11957 if dj.WorkloadType != nil {
11958 objectMap["workloadType"] = dj.WorkloadType
11959 }
11960 if dj.ActionsInfo != nil {
11961 objectMap["actionsInfo"] = dj.ActionsInfo
11962 }
11963 if dj.ErrorDetails != nil {
11964 objectMap["errorDetails"] = dj.ErrorDetails
11965 }
11966 if dj.ExtendedInfo != nil {
11967 objectMap["extendedInfo"] = dj.ExtendedInfo
11968 }
11969 if dj.EntityFriendlyName != nil {
11970 objectMap["entityFriendlyName"] = dj.EntityFriendlyName
11971 }
11972 if dj.BackupManagementType != "" {
11973 objectMap["backupManagementType"] = dj.BackupManagementType
11974 }
11975 if dj.Operation != nil {
11976 objectMap["operation"] = dj.Operation
11977 }
11978 if dj.Status != nil {
11979 objectMap["status"] = dj.Status
11980 }
11981 if dj.StartTime != nil {
11982 objectMap["startTime"] = dj.StartTime
11983 }
11984 if dj.EndTime != nil {
11985 objectMap["endTime"] = dj.EndTime
11986 }
11987 if dj.ActivityID != nil {
11988 objectMap["activityId"] = dj.ActivityID
11989 }
11990 if dj.JobType != "" {
11991 objectMap["jobType"] = dj.JobType
11992 }
11993 return json.Marshal(objectMap)
11994 }
11995
11996
11997 func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
11998 return nil, false
11999 }
12000
12001
12002 func (dj DpmJob) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
12003 return nil, false
12004 }
12005
12006
12007 func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
12008 return nil, false
12009 }
12010
12011
12012 func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
12013 return nil, false
12014 }
12015
12016
12017 func (dj DpmJob) AsDpmJob() (*DpmJob, bool) {
12018 return &dj, true
12019 }
12020
12021
12022 func (dj DpmJob) AsMabJob() (*MabJob, bool) {
12023 return nil, false
12024 }
12025
12026
12027 func (dj DpmJob) AsVaultJob() (*VaultJob, bool) {
12028 return nil, false
12029 }
12030
12031
12032 func (dj DpmJob) AsJob() (*Job, bool) {
12033 return nil, false
12034 }
12035
12036
12037 func (dj DpmJob) AsBasicJob() (BasicJob, bool) {
12038 return &dj, true
12039 }
12040
12041
12042 type DpmJobExtendedInfo struct {
12043
12044 TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"`
12045
12046 PropertyBag map[string]*string `json:"propertyBag"`
12047
12048 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
12049 }
12050
12051
12052 func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) {
12053 objectMap := make(map[string]interface{})
12054 if djei.TasksList != nil {
12055 objectMap["tasksList"] = djei.TasksList
12056 }
12057 if djei.PropertyBag != nil {
12058 objectMap["propertyBag"] = djei.PropertyBag
12059 }
12060 if djei.DynamicErrorMessage != nil {
12061 objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage
12062 }
12063 return json.Marshal(objectMap)
12064 }
12065
12066
12067 type DpmJobTaskDetails struct {
12068
12069 TaskID *string `json:"taskId,omitempty"`
12070
12071 StartTime *date.Time `json:"startTime,omitempty"`
12072
12073 EndTime *date.Time `json:"endTime,omitempty"`
12074
12075 Duration *string `json:"duration,omitempty"`
12076
12077 Status *string `json:"status,omitempty"`
12078 }
12079
12080
12081 type DPMProtectedItem struct {
12082
12083 FriendlyName *string `json:"friendlyName,omitempty"`
12084
12085 BackupEngineName *string `json:"backupEngineName,omitempty"`
12086
12087 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
12088
12089 ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
12090
12091 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12092
12093 WorkloadType DataSourceType `json:"workloadType,omitempty"`
12094
12095 ContainerName *string `json:"containerName,omitempty"`
12096
12097 SourceResourceID *string `json:"sourceResourceId,omitempty"`
12098
12099 PolicyID *string `json:"policyId,omitempty"`
12100
12101 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
12102
12103 BackupSetName *string `json:"backupSetName,omitempty"`
12104
12105 CreateMode CreateMode `json:"createMode,omitempty"`
12106
12107 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
12108
12109 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
12110
12111 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
12112
12113 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
12114
12115 IsRehydrate *bool `json:"isRehydrate,omitempty"`
12116
12117 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
12118
12119 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
12120
12121 PolicyName *string `json:"policyName,omitempty"`
12122
12123 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
12124 }
12125
12126
12127 func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) {
12128 dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem
12129 objectMap := make(map[string]interface{})
12130 if dpi.FriendlyName != nil {
12131 objectMap["friendlyName"] = dpi.FriendlyName
12132 }
12133 if dpi.BackupEngineName != nil {
12134 objectMap["backupEngineName"] = dpi.BackupEngineName
12135 }
12136 if dpi.ProtectionState != "" {
12137 objectMap["protectionState"] = dpi.ProtectionState
12138 }
12139 if dpi.ExtendedInfo != nil {
12140 objectMap["extendedInfo"] = dpi.ExtendedInfo
12141 }
12142 if dpi.BackupManagementType != "" {
12143 objectMap["backupManagementType"] = dpi.BackupManagementType
12144 }
12145 if dpi.WorkloadType != "" {
12146 objectMap["workloadType"] = dpi.WorkloadType
12147 }
12148 if dpi.ContainerName != nil {
12149 objectMap["containerName"] = dpi.ContainerName
12150 }
12151 if dpi.SourceResourceID != nil {
12152 objectMap["sourceResourceId"] = dpi.SourceResourceID
12153 }
12154 if dpi.PolicyID != nil {
12155 objectMap["policyId"] = dpi.PolicyID
12156 }
12157 if dpi.LastRecoveryPoint != nil {
12158 objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint
12159 }
12160 if dpi.BackupSetName != nil {
12161 objectMap["backupSetName"] = dpi.BackupSetName
12162 }
12163 if dpi.CreateMode != "" {
12164 objectMap["createMode"] = dpi.CreateMode
12165 }
12166 if dpi.DeferredDeleteTimeInUTC != nil {
12167 objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC
12168 }
12169 if dpi.IsScheduledForDeferredDelete != nil {
12170 objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete
12171 }
12172 if dpi.DeferredDeleteTimeRemaining != nil {
12173 objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining
12174 }
12175 if dpi.IsDeferredDeleteScheduleUpcoming != nil {
12176 objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming
12177 }
12178 if dpi.IsRehydrate != nil {
12179 objectMap["isRehydrate"] = dpi.IsRehydrate
12180 }
12181 if dpi.ResourceGuardOperationRequests != nil {
12182 objectMap["resourceGuardOperationRequests"] = dpi.ResourceGuardOperationRequests
12183 }
12184 if dpi.IsArchiveEnabled != nil {
12185 objectMap["isArchiveEnabled"] = dpi.IsArchiveEnabled
12186 }
12187 if dpi.PolicyName != nil {
12188 objectMap["policyName"] = dpi.PolicyName
12189 }
12190 if dpi.ProtectedItemType != "" {
12191 objectMap["protectedItemType"] = dpi.ProtectedItemType
12192 }
12193 return json.Marshal(objectMap)
12194 }
12195
12196
12197 func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
12198 return nil, false
12199 }
12200
12201
12202 func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
12203 return nil, false
12204 }
12205
12206
12207 func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
12208 return nil, false
12209 }
12210
12211
12212 func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
12213 return nil, false
12214 }
12215
12216
12217 func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
12218 return nil, false
12219 }
12220
12221
12222 func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
12223 return nil, false
12224 }
12225
12226
12227 func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
12228 return nil, false
12229 }
12230
12231
12232 func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
12233 return nil, false
12234 }
12235
12236
12237 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
12238 return nil, false
12239 }
12240
12241
12242 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
12243 return nil, false
12244 }
12245
12246
12247 func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
12248 return nil, false
12249 }
12250
12251
12252 func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
12253 return &dpi, true
12254 }
12255
12256
12257 func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
12258 return nil, false
12259 }
12260
12261
12262 func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
12263 return nil, false
12264 }
12265
12266
12267 func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
12268 return nil, false
12269 }
12270
12271
12272 func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
12273 return &dpi, true
12274 }
12275
12276
12277 type DPMProtectedItemExtendedInfo struct {
12278
12279 ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"`
12280
12281 Protected *bool `json:"protected,omitempty"`
12282
12283 IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"`
12284
12285 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
12286
12287 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
12288
12289 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
12290
12291 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
12292
12293 OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"`
12294
12295 OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"`
12296
12297 OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"`
12298
12299 IsCollocated *bool `json:"isCollocated,omitempty"`
12300
12301 ProtectionGroupName *string `json:"protectionGroupName,omitempty"`
12302
12303 DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"`
12304
12305 TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"`
12306 }
12307
12308
12309 func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
12310 objectMap := make(map[string]interface{})
12311 if dpiei.ProtectableObjectLoadPath != nil {
12312 objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath
12313 }
12314 if dpiei.Protected != nil {
12315 objectMap["protected"] = dpiei.Protected
12316 }
12317 if dpiei.IsPresentOnCloud != nil {
12318 objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud
12319 }
12320 if dpiei.LastBackupStatus != nil {
12321 objectMap["lastBackupStatus"] = dpiei.LastBackupStatus
12322 }
12323 if dpiei.LastRefreshedAt != nil {
12324 objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt
12325 }
12326 if dpiei.OldestRecoveryPoint != nil {
12327 objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint
12328 }
12329 if dpiei.RecoveryPointCount != nil {
12330 objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount
12331 }
12332 if dpiei.OnPremiseOldestRecoveryPoint != nil {
12333 objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint
12334 }
12335 if dpiei.OnPremiseLatestRecoveryPoint != nil {
12336 objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint
12337 }
12338 if dpiei.OnPremiseRecoveryPointCount != nil {
12339 objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount
12340 }
12341 if dpiei.IsCollocated != nil {
12342 objectMap["isCollocated"] = dpiei.IsCollocated
12343 }
12344 if dpiei.ProtectionGroupName != nil {
12345 objectMap["protectionGroupName"] = dpiei.ProtectionGroupName
12346 }
12347 if dpiei.DiskStorageUsedInBytes != nil {
12348 objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes
12349 }
12350 if dpiei.TotalDiskStorageSizeInBytes != nil {
12351 objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes
12352 }
12353 return json.Marshal(objectMap)
12354 }
12355
12356
12357 type EncryptionDetails struct {
12358
12359 EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"`
12360
12361 KekURL *string `json:"kekUrl,omitempty"`
12362
12363 SecretKeyURL *string `json:"secretKeyUrl,omitempty"`
12364
12365 KekVaultID *string `json:"kekVaultId,omitempty"`
12366
12367 SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"`
12368 }
12369
12370
12371 type BasicEngineBase interface {
12372 AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool)
12373 AsDpmBackupEngine() (*DpmBackupEngine, bool)
12374 AsEngineBase() (*EngineBase, bool)
12375 }
12376
12377
12378 type EngineBase struct {
12379
12380 FriendlyName *string `json:"friendlyName,omitempty"`
12381
12382 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12383
12384 RegistrationStatus *string `json:"registrationStatus,omitempty"`
12385
12386 BackupEngineState *string `json:"backupEngineState,omitempty"`
12387
12388 HealthStatus *string `json:"healthStatus,omitempty"`
12389
12390 CanReRegister *bool `json:"canReRegister,omitempty"`
12391
12392 BackupEngineID *string `json:"backupEngineId,omitempty"`
12393
12394 DpmVersion *string `json:"dpmVersion,omitempty"`
12395
12396 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
12397
12398 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
12399
12400 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
12401
12402 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
12403
12404 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
12405 }
12406
12407 func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) {
12408 var m map[string]interface{}
12409 err := json.Unmarshal(body, &m)
12410 if err != nil {
12411 return nil, err
12412 }
12413
12414 switch m["backupEngineType"] {
12415 case string(EngineTypeBackupEngineTypeAzureBackupServerEngine):
12416 var abse AzureBackupServerEngine
12417 err := json.Unmarshal(body, &abse)
12418 return abse, err
12419 case string(EngineTypeBackupEngineTypeDpmBackupEngine):
12420 var dbe DpmBackupEngine
12421 err := json.Unmarshal(body, &dbe)
12422 return dbe, err
12423 default:
12424 var eb EngineBase
12425 err := json.Unmarshal(body, &eb)
12426 return eb, err
12427 }
12428 }
12429 func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) {
12430 var rawMessages []*json.RawMessage
12431 err := json.Unmarshal(body, &rawMessages)
12432 if err != nil {
12433 return nil, err
12434 }
12435
12436 ebArray := make([]BasicEngineBase, len(rawMessages))
12437
12438 for index, rawMessage := range rawMessages {
12439 eb, err := unmarshalBasicEngineBase(*rawMessage)
12440 if err != nil {
12441 return nil, err
12442 }
12443 ebArray[index] = eb
12444 }
12445 return ebArray, nil
12446 }
12447
12448
12449 func (eb EngineBase) MarshalJSON() ([]byte, error) {
12450 eb.BackupEngineType = EngineTypeBackupEngineTypeBackupEngineBase
12451 objectMap := make(map[string]interface{})
12452 if eb.FriendlyName != nil {
12453 objectMap["friendlyName"] = eb.FriendlyName
12454 }
12455 if eb.BackupManagementType != "" {
12456 objectMap["backupManagementType"] = eb.BackupManagementType
12457 }
12458 if eb.RegistrationStatus != nil {
12459 objectMap["registrationStatus"] = eb.RegistrationStatus
12460 }
12461 if eb.BackupEngineState != nil {
12462 objectMap["backupEngineState"] = eb.BackupEngineState
12463 }
12464 if eb.HealthStatus != nil {
12465 objectMap["healthStatus"] = eb.HealthStatus
12466 }
12467 if eb.CanReRegister != nil {
12468 objectMap["canReRegister"] = eb.CanReRegister
12469 }
12470 if eb.BackupEngineID != nil {
12471 objectMap["backupEngineId"] = eb.BackupEngineID
12472 }
12473 if eb.DpmVersion != nil {
12474 objectMap["dpmVersion"] = eb.DpmVersion
12475 }
12476 if eb.AzureBackupAgentVersion != nil {
12477 objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion
12478 }
12479 if eb.IsAzureBackupAgentUpgradeAvailable != nil {
12480 objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable
12481 }
12482 if eb.IsDpmUpgradeAvailable != nil {
12483 objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable
12484 }
12485 if eb.ExtendedInfo != nil {
12486 objectMap["extendedInfo"] = eb.ExtendedInfo
12487 }
12488 if eb.BackupEngineType != "" {
12489 objectMap["backupEngineType"] = eb.BackupEngineType
12490 }
12491 return json.Marshal(objectMap)
12492 }
12493
12494
12495 func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
12496 return nil, false
12497 }
12498
12499
12500 func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
12501 return nil, false
12502 }
12503
12504
12505 func (eb EngineBase) AsEngineBase() (*EngineBase, bool) {
12506 return &eb, true
12507 }
12508
12509
12510 func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) {
12511 return &eb, true
12512 }
12513
12514
12515
12516 type EngineBaseResource struct {
12517 autorest.Response `json:"-"`
12518
12519 Properties BasicEngineBase `json:"properties,omitempty"`
12520
12521 ID *string `json:"id,omitempty"`
12522
12523 Name *string `json:"name,omitempty"`
12524
12525 Type *string `json:"type,omitempty"`
12526
12527 Location *string `json:"location,omitempty"`
12528
12529 Tags map[string]*string `json:"tags"`
12530
12531 ETag *string `json:"eTag,omitempty"`
12532 }
12533
12534
12535 func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) {
12536 objectMap := make(map[string]interface{})
12537 objectMap["properties"] = ebr.Properties
12538 if ebr.Location != nil {
12539 objectMap["location"] = ebr.Location
12540 }
12541 if ebr.Tags != nil {
12542 objectMap["tags"] = ebr.Tags
12543 }
12544 if ebr.ETag != nil {
12545 objectMap["eTag"] = ebr.ETag
12546 }
12547 return json.Marshal(objectMap)
12548 }
12549
12550
12551 func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error {
12552 var m map[string]*json.RawMessage
12553 err := json.Unmarshal(body, &m)
12554 if err != nil {
12555 return err
12556 }
12557 for k, v := range m {
12558 switch k {
12559 case "properties":
12560 if v != nil {
12561 properties, err := unmarshalBasicEngineBase(*v)
12562 if err != nil {
12563 return err
12564 }
12565 ebr.Properties = properties
12566 }
12567 case "id":
12568 if v != nil {
12569 var ID string
12570 err = json.Unmarshal(*v, &ID)
12571 if err != nil {
12572 return err
12573 }
12574 ebr.ID = &ID
12575 }
12576 case "name":
12577 if v != nil {
12578 var name string
12579 err = json.Unmarshal(*v, &name)
12580 if err != nil {
12581 return err
12582 }
12583 ebr.Name = &name
12584 }
12585 case "type":
12586 if v != nil {
12587 var typeVar string
12588 err = json.Unmarshal(*v, &typeVar)
12589 if err != nil {
12590 return err
12591 }
12592 ebr.Type = &typeVar
12593 }
12594 case "location":
12595 if v != nil {
12596 var location string
12597 err = json.Unmarshal(*v, &location)
12598 if err != nil {
12599 return err
12600 }
12601 ebr.Location = &location
12602 }
12603 case "tags":
12604 if v != nil {
12605 var tags map[string]*string
12606 err = json.Unmarshal(*v, &tags)
12607 if err != nil {
12608 return err
12609 }
12610 ebr.Tags = tags
12611 }
12612 case "eTag":
12613 if v != nil {
12614 var eTag string
12615 err = json.Unmarshal(*v, &eTag)
12616 if err != nil {
12617 return err
12618 }
12619 ebr.ETag = &eTag
12620 }
12621 }
12622 }
12623
12624 return nil
12625 }
12626
12627
12628 type EngineBaseResourceList struct {
12629 autorest.Response `json:"-"`
12630
12631 Value *[]EngineBaseResource `json:"value,omitempty"`
12632
12633 NextLink *string `json:"nextLink,omitempty"`
12634 }
12635
12636
12637 type EngineBaseResourceListIterator struct {
12638 i int
12639 page EngineBaseResourceListPage
12640 }
12641
12642
12643
12644 func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) {
12645 if tracing.IsEnabled() {
12646 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext")
12647 defer func() {
12648 sc := -1
12649 if iter.Response().Response.Response != nil {
12650 sc = iter.Response().Response.Response.StatusCode
12651 }
12652 tracing.EndSpan(ctx, sc, err)
12653 }()
12654 }
12655 iter.i++
12656 if iter.i < len(iter.page.Values()) {
12657 return nil
12658 }
12659 err = iter.page.NextWithContext(ctx)
12660 if err != nil {
12661 iter.i--
12662 return err
12663 }
12664 iter.i = 0
12665 return nil
12666 }
12667
12668
12669
12670
12671 func (iter *EngineBaseResourceListIterator) Next() error {
12672 return iter.NextWithContext(context.Background())
12673 }
12674
12675
12676 func (iter EngineBaseResourceListIterator) NotDone() bool {
12677 return iter.page.NotDone() && iter.i < len(iter.page.Values())
12678 }
12679
12680
12681 func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList {
12682 return iter.page.Response()
12683 }
12684
12685
12686
12687 func (iter EngineBaseResourceListIterator) Value() EngineBaseResource {
12688 if !iter.page.NotDone() {
12689 return EngineBaseResource{}
12690 }
12691 return iter.page.Values()[iter.i]
12692 }
12693
12694
12695 func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator {
12696 return EngineBaseResourceListIterator{page: page}
12697 }
12698
12699
12700 func (ebrl EngineBaseResourceList) IsEmpty() bool {
12701 return ebrl.Value == nil || len(*ebrl.Value) == 0
12702 }
12703
12704
12705 func (ebrl EngineBaseResourceList) hasNextLink() bool {
12706 return ebrl.NextLink != nil && len(*ebrl.NextLink) != 0
12707 }
12708
12709
12710
12711 func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) {
12712 if !ebrl.hasNextLink() {
12713 return nil, nil
12714 }
12715 return autorest.Prepare((&http.Request{}).WithContext(ctx),
12716 autorest.AsJSON(),
12717 autorest.AsGet(),
12718 autorest.WithBaseURL(to.String(ebrl.NextLink)))
12719 }
12720
12721
12722 type EngineBaseResourceListPage struct {
12723 fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)
12724 ebrl EngineBaseResourceList
12725 }
12726
12727
12728
12729 func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) {
12730 if tracing.IsEnabled() {
12731 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext")
12732 defer func() {
12733 sc := -1
12734 if page.Response().Response.Response != nil {
12735 sc = page.Response().Response.Response.StatusCode
12736 }
12737 tracing.EndSpan(ctx, sc, err)
12738 }()
12739 }
12740 for {
12741 next, err := page.fn(ctx, page.ebrl)
12742 if err != nil {
12743 return err
12744 }
12745 page.ebrl = next
12746 if !next.hasNextLink() || !next.IsEmpty() {
12747 break
12748 }
12749 }
12750 return nil
12751 }
12752
12753
12754
12755
12756 func (page *EngineBaseResourceListPage) Next() error {
12757 return page.NextWithContext(context.Background())
12758 }
12759
12760
12761 func (page EngineBaseResourceListPage) NotDone() bool {
12762 return !page.ebrl.IsEmpty()
12763 }
12764
12765
12766 func (page EngineBaseResourceListPage) Response() EngineBaseResourceList {
12767 return page.ebrl
12768 }
12769
12770
12771 func (page EngineBaseResourceListPage) Values() []EngineBaseResource {
12772 if page.ebrl.IsEmpty() {
12773 return nil
12774 }
12775 return *page.ebrl.Value
12776 }
12777
12778
12779 func NewEngineBaseResourceListPage(cur EngineBaseResourceList, getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage {
12780 return EngineBaseResourceListPage{
12781 fn: getNextPage,
12782 ebrl: cur,
12783 }
12784 }
12785
12786
12787 type EngineExtendedInfo struct {
12788
12789 DatabaseName *string `json:"databaseName,omitempty"`
12790
12791 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
12792
12793 ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"`
12794
12795 DiskCount *int32 `json:"diskCount,omitempty"`
12796
12797 UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"`
12798
12799 AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"`
12800
12801 RefreshedAt *date.Time `json:"refreshedAt,omitempty"`
12802
12803 AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"`
12804 }
12805
12806
12807 type ErrorAdditionalInfo struct {
12808
12809 Type *string `json:"type,omitempty"`
12810
12811 Info interface{} `json:"info,omitempty"`
12812 }
12813
12814
12815 func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
12816 objectMap := make(map[string]interface{})
12817 return json.Marshal(objectMap)
12818 }
12819
12820
12821 type ErrorDetail struct {
12822
12823 Code *string `json:"code,omitempty"`
12824
12825 Message *string `json:"message,omitempty"`
12826
12827 Recommendations *[]string `json:"recommendations,omitempty"`
12828 }
12829
12830
12831 func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
12832 objectMap := make(map[string]interface{})
12833 return json.Marshal(objectMap)
12834 }
12835
12836
12837 type ExportJobsOperationResultInfo struct {
12838
12839 BlobURL *string `json:"blobUrl,omitempty"`
12840
12841 BlobSasKey *string `json:"blobSasKey,omitempty"`
12842
12843 ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"`
12844
12845 ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"`
12846
12847 ObjectType ObjectType `json:"objectType,omitempty"`
12848 }
12849
12850
12851 func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) {
12852 ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo
12853 objectMap := make(map[string]interface{})
12854 if ejori.BlobURL != nil {
12855 objectMap["blobUrl"] = ejori.BlobURL
12856 }
12857 if ejori.BlobSasKey != nil {
12858 objectMap["blobSasKey"] = ejori.BlobSasKey
12859 }
12860 if ejori.ExcelFileBlobURL != nil {
12861 objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL
12862 }
12863 if ejori.ExcelFileBlobSasKey != nil {
12864 objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey
12865 }
12866 if ejori.ObjectType != "" {
12867 objectMap["objectType"] = ejori.ObjectType
12868 }
12869 return json.Marshal(objectMap)
12870 }
12871
12872
12873 func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
12874 return &ejori, true
12875 }
12876
12877
12878 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
12879 return nil, false
12880 }
12881
12882
12883 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
12884 return nil, false
12885 }
12886
12887
12888 func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
12889 return &ejori, true
12890 }
12891
12892
12893 type ExtendedProperties struct {
12894
12895 DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"`
12896
12897 LinuxVMApplicationName *string `json:"linuxVmApplicationName,omitempty"`
12898 }
12899
12900
12901 type BasicFeatureSupportRequest interface {
12902 AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool)
12903 AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool)
12904 AsFeatureSupportRequest() (*FeatureSupportRequest, bool)
12905 }
12906
12907
12908 type FeatureSupportRequest struct {
12909
12910 FeatureType FeatureType `json:"featureType,omitempty"`
12911 }
12912
12913 func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) {
12914 var m map[string]interface{}
12915 err := json.Unmarshal(body, &m)
12916 if err != nil {
12917 return nil, err
12918 }
12919
12920 switch m["featureType"] {
12921 case string(FeatureTypeAzureBackupGoals):
12922 var abgfsr AzureBackupGoalFeatureSupportRequest
12923 err := json.Unmarshal(body, &abgfsr)
12924 return abgfsr, err
12925 case string(FeatureTypeAzureVMResourceBackup):
12926 var avrfsr AzureVMResourceFeatureSupportRequest
12927 err := json.Unmarshal(body, &avrfsr)
12928 return avrfsr, err
12929 default:
12930 var fsr FeatureSupportRequest
12931 err := json.Unmarshal(body, &fsr)
12932 return fsr, err
12933 }
12934 }
12935 func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) {
12936 var rawMessages []*json.RawMessage
12937 err := json.Unmarshal(body, &rawMessages)
12938 if err != nil {
12939 return nil, err
12940 }
12941
12942 fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages))
12943
12944 for index, rawMessage := range rawMessages {
12945 fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage)
12946 if err != nil {
12947 return nil, err
12948 }
12949 fsrArray[index] = fsr
12950 }
12951 return fsrArray, nil
12952 }
12953
12954
12955 func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) {
12956 fsr.FeatureType = FeatureTypeFeatureSupportRequest
12957 objectMap := make(map[string]interface{})
12958 if fsr.FeatureType != "" {
12959 objectMap["featureType"] = fsr.FeatureType
12960 }
12961 return json.Marshal(objectMap)
12962 }
12963
12964
12965 func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
12966 return nil, false
12967 }
12968
12969
12970 func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
12971 return nil, false
12972 }
12973
12974
12975 func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
12976 return &fsr, true
12977 }
12978
12979
12980 func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
12981 return &fsr, true
12982 }
12983
12984
12985 type GenericContainer struct {
12986
12987 FabricName *string `json:"fabricName,omitempty"`
12988
12989 ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"`
12990
12991 FriendlyName *string `json:"friendlyName,omitempty"`
12992
12993 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12994
12995 RegistrationStatus *string `json:"registrationStatus,omitempty"`
12996
12997 HealthStatus *string `json:"healthStatus,omitempty"`
12998
12999 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
13000
13001 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
13002 }
13003
13004
13005 func (gc GenericContainer) MarshalJSON() ([]byte, error) {
13006 gc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeGenericContainer
13007 objectMap := make(map[string]interface{})
13008 if gc.FabricName != nil {
13009 objectMap["fabricName"] = gc.FabricName
13010 }
13011 if gc.ExtendedInformation != nil {
13012 objectMap["extendedInformation"] = gc.ExtendedInformation
13013 }
13014 if gc.FriendlyName != nil {
13015 objectMap["friendlyName"] = gc.FriendlyName
13016 }
13017 if gc.BackupManagementType != "" {
13018 objectMap["backupManagementType"] = gc.BackupManagementType
13019 }
13020 if gc.RegistrationStatus != nil {
13021 objectMap["registrationStatus"] = gc.RegistrationStatus
13022 }
13023 if gc.HealthStatus != nil {
13024 objectMap["healthStatus"] = gc.HealthStatus
13025 }
13026 if gc.ProtectableObjectType != nil {
13027 objectMap["protectableObjectType"] = gc.ProtectableObjectType
13028 }
13029 if gc.ContainerType != "" {
13030 objectMap["containerType"] = gc.ContainerType
13031 }
13032 return json.Marshal(objectMap)
13033 }
13034
13035
13036 func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
13037 return nil, false
13038 }
13039
13040
13041 func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
13042 return nil, false
13043 }
13044
13045
13046 func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
13047 return nil, false
13048 }
13049
13050
13051 func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
13052 return nil, false
13053 }
13054
13055
13056 func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
13057 return nil, false
13058 }
13059
13060
13061 func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
13062 return nil, false
13063 }
13064
13065
13066 func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
13067 return nil, false
13068 }
13069
13070
13071 func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
13072 return nil, false
13073 }
13074
13075
13076 func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
13077 return nil, false
13078 }
13079
13080
13081 func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) {
13082 return nil, false
13083 }
13084
13085
13086 func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13087 return nil, false
13088 }
13089
13090
13091 func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) {
13092 return &gc, true
13093 }
13094
13095
13096 func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13097 return nil, false
13098 }
13099
13100
13101 func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13102 return nil, false
13103 }
13104
13105
13106 func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) {
13107 return nil, false
13108 }
13109
13110
13111 func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13112 return nil, false
13113 }
13114
13115
13116 func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13117 return &gc, true
13118 }
13119
13120
13121 type GenericContainerExtendedInfo struct {
13122
13123 RawCertData *string `json:"rawCertData,omitempty"`
13124
13125 ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"`
13126
13127 ServiceEndpoints map[string]*string `json:"serviceEndpoints"`
13128 }
13129
13130
13131 func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) {
13132 objectMap := make(map[string]interface{})
13133 if gcei.RawCertData != nil {
13134 objectMap["rawCertData"] = gcei.RawCertData
13135 }
13136 if gcei.ContainerIdentityInfo != nil {
13137 objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo
13138 }
13139 if gcei.ServiceEndpoints != nil {
13140 objectMap["serviceEndpoints"] = gcei.ServiceEndpoints
13141 }
13142 return json.Marshal(objectMap)
13143 }
13144
13145
13146 type GenericProtectedItem struct {
13147
13148 FriendlyName *string `json:"friendlyName,omitempty"`
13149
13150 PolicyState *string `json:"policyState,omitempty"`
13151
13152 ProtectionState ProtectionState `json:"protectionState,omitempty"`
13153
13154 ProtectedItemID *int64 `json:"protectedItemId,omitempty"`
13155
13156 SourceAssociations map[string]*string `json:"sourceAssociations"`
13157
13158 FabricName *string `json:"fabricName,omitempty"`
13159
13160 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13161
13162 WorkloadType DataSourceType `json:"workloadType,omitempty"`
13163
13164 ContainerName *string `json:"containerName,omitempty"`
13165
13166 SourceResourceID *string `json:"sourceResourceId,omitempty"`
13167
13168 PolicyID *string `json:"policyId,omitempty"`
13169
13170 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
13171
13172 BackupSetName *string `json:"backupSetName,omitempty"`
13173
13174 CreateMode CreateMode `json:"createMode,omitempty"`
13175
13176 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
13177
13178 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
13179
13180 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
13181
13182 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
13183
13184 IsRehydrate *bool `json:"isRehydrate,omitempty"`
13185
13186 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
13187
13188 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
13189
13190 PolicyName *string `json:"policyName,omitempty"`
13191
13192 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
13193 }
13194
13195
13196 func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) {
13197 gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem
13198 objectMap := make(map[string]interface{})
13199 if gpi.FriendlyName != nil {
13200 objectMap["friendlyName"] = gpi.FriendlyName
13201 }
13202 if gpi.PolicyState != nil {
13203 objectMap["policyState"] = gpi.PolicyState
13204 }
13205 if gpi.ProtectionState != "" {
13206 objectMap["protectionState"] = gpi.ProtectionState
13207 }
13208 if gpi.ProtectedItemID != nil {
13209 objectMap["protectedItemId"] = gpi.ProtectedItemID
13210 }
13211 if gpi.SourceAssociations != nil {
13212 objectMap["sourceAssociations"] = gpi.SourceAssociations
13213 }
13214 if gpi.FabricName != nil {
13215 objectMap["fabricName"] = gpi.FabricName
13216 }
13217 if gpi.BackupManagementType != "" {
13218 objectMap["backupManagementType"] = gpi.BackupManagementType
13219 }
13220 if gpi.WorkloadType != "" {
13221 objectMap["workloadType"] = gpi.WorkloadType
13222 }
13223 if gpi.ContainerName != nil {
13224 objectMap["containerName"] = gpi.ContainerName
13225 }
13226 if gpi.SourceResourceID != nil {
13227 objectMap["sourceResourceId"] = gpi.SourceResourceID
13228 }
13229 if gpi.PolicyID != nil {
13230 objectMap["policyId"] = gpi.PolicyID
13231 }
13232 if gpi.LastRecoveryPoint != nil {
13233 objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint
13234 }
13235 if gpi.BackupSetName != nil {
13236 objectMap["backupSetName"] = gpi.BackupSetName
13237 }
13238 if gpi.CreateMode != "" {
13239 objectMap["createMode"] = gpi.CreateMode
13240 }
13241 if gpi.DeferredDeleteTimeInUTC != nil {
13242 objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC
13243 }
13244 if gpi.IsScheduledForDeferredDelete != nil {
13245 objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete
13246 }
13247 if gpi.DeferredDeleteTimeRemaining != nil {
13248 objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining
13249 }
13250 if gpi.IsDeferredDeleteScheduleUpcoming != nil {
13251 objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming
13252 }
13253 if gpi.IsRehydrate != nil {
13254 objectMap["isRehydrate"] = gpi.IsRehydrate
13255 }
13256 if gpi.ResourceGuardOperationRequests != nil {
13257 objectMap["resourceGuardOperationRequests"] = gpi.ResourceGuardOperationRequests
13258 }
13259 if gpi.IsArchiveEnabled != nil {
13260 objectMap["isArchiveEnabled"] = gpi.IsArchiveEnabled
13261 }
13262 if gpi.PolicyName != nil {
13263 objectMap["policyName"] = gpi.PolicyName
13264 }
13265 if gpi.ProtectedItemType != "" {
13266 objectMap["protectedItemType"] = gpi.ProtectedItemType
13267 }
13268 return json.Marshal(objectMap)
13269 }
13270
13271
13272 func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
13273 return nil, false
13274 }
13275
13276
13277 func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
13278 return nil, false
13279 }
13280
13281
13282 func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
13283 return nil, false
13284 }
13285
13286
13287 func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
13288 return nil, false
13289 }
13290
13291
13292 func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
13293 return nil, false
13294 }
13295
13296
13297 func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
13298 return nil, false
13299 }
13300
13301
13302 func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
13303 return nil, false
13304 }
13305
13306
13307 func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
13308 return nil, false
13309 }
13310
13311
13312 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
13313 return nil, false
13314 }
13315
13316
13317 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
13318 return nil, false
13319 }
13320
13321
13322 func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
13323 return nil, false
13324 }
13325
13326
13327 func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
13328 return nil, false
13329 }
13330
13331
13332 func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
13333 return &gpi, true
13334 }
13335
13336
13337 func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
13338 return nil, false
13339 }
13340
13341
13342 func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
13343 return nil, false
13344 }
13345
13346
13347 func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
13348 return &gpi, true
13349 }
13350
13351
13352 type GenericProtectionPolicy struct {
13353
13354 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
13355
13356 TimeZone *string `json:"timeZone,omitempty"`
13357
13358 FabricName *string `json:"fabricName,omitempty"`
13359
13360 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
13361
13362 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
13363
13364 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
13365 }
13366
13367
13368 func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) {
13369 gpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy
13370 objectMap := make(map[string]interface{})
13371 if gpp.SubProtectionPolicy != nil {
13372 objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy
13373 }
13374 if gpp.TimeZone != nil {
13375 objectMap["timeZone"] = gpp.TimeZone
13376 }
13377 if gpp.FabricName != nil {
13378 objectMap["fabricName"] = gpp.FabricName
13379 }
13380 if gpp.ProtectedItemsCount != nil {
13381 objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount
13382 }
13383 if gpp.ResourceGuardOperationRequests != nil {
13384 objectMap["resourceGuardOperationRequests"] = gpp.ResourceGuardOperationRequests
13385 }
13386 if gpp.BackupManagementType != "" {
13387 objectMap["backupManagementType"] = gpp.BackupManagementType
13388 }
13389 return json.Marshal(objectMap)
13390 }
13391
13392
13393 func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
13394 return nil, false
13395 }
13396
13397
13398 func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
13399 return nil, false
13400 }
13401
13402
13403 func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
13404 return nil, false
13405 }
13406
13407
13408 func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
13409 return nil, false
13410 }
13411
13412
13413 func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
13414 return &gpp, true
13415 }
13416
13417
13418 func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
13419 return nil, false
13420 }
13421
13422
13423 func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
13424 return nil, false
13425 }
13426
13427
13428 func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
13429 return &gpp, true
13430 }
13431
13432
13433 type GenericRecoveryPoint struct {
13434
13435 FriendlyName *string `json:"friendlyName,omitempty"`
13436
13437 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
13438
13439 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
13440
13441 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
13442
13443 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
13444 }
13445
13446
13447 func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) {
13448 grp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint
13449 objectMap := make(map[string]interface{})
13450 if grp.FriendlyName != nil {
13451 objectMap["friendlyName"] = grp.FriendlyName
13452 }
13453 if grp.RecoveryPointType != nil {
13454 objectMap["recoveryPointType"] = grp.RecoveryPointType
13455 }
13456 if grp.RecoveryPointTime != nil {
13457 objectMap["recoveryPointTime"] = grp.RecoveryPointTime
13458 }
13459 if grp.RecoveryPointAdditionalInfo != nil {
13460 objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo
13461 }
13462 if grp.ObjectType != "" {
13463 objectMap["objectType"] = grp.ObjectType
13464 }
13465 return json.Marshal(objectMap)
13466 }
13467
13468
13469 func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
13470 return nil, false
13471 }
13472
13473
13474 func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
13475 return nil, false
13476 }
13477
13478
13479 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
13480 return nil, false
13481 }
13482
13483
13484 func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
13485 return nil, false
13486 }
13487
13488
13489 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
13490 return nil, false
13491 }
13492
13493
13494 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
13495 return nil, false
13496 }
13497
13498
13499 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
13500 return nil, false
13501 }
13502
13503
13504 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
13505 return nil, false
13506 }
13507
13508
13509 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
13510 return nil, false
13511 }
13512
13513
13514 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
13515 return nil, false
13516 }
13517
13518
13519 func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
13520 return &grp, true
13521 }
13522
13523
13524 func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
13525 return nil, false
13526 }
13527
13528
13529 func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
13530 return nil, false
13531 }
13532
13533
13534 func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
13535 return &grp, true
13536 }
13537
13538
13539 type GetProtectedItemQueryObject struct {
13540
13541 Expand *string `json:"expand,omitempty"`
13542 }
13543
13544
13545 type HourlySchedule struct {
13546
13547
13548 Interval *int32 `json:"interval,omitempty"`
13549
13550 ScheduleWindowStartTime *date.Time `json:"scheduleWindowStartTime,omitempty"`
13551
13552 ScheduleWindowDuration *int32 `json:"scheduleWindowDuration,omitempty"`
13553 }
13554
13555
13556 type IaasVMBackupRequest struct {
13557
13558 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
13559
13560 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
13561 }
13562
13563
13564 func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) {
13565 ivbr.ObjectType = ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest
13566 objectMap := make(map[string]interface{})
13567 if ivbr.RecoveryPointExpiryTimeInUTC != nil {
13568 objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC
13569 }
13570 if ivbr.ObjectType != "" {
13571 objectMap["objectType"] = ivbr.ObjectType
13572 }
13573 return json.Marshal(objectMap)
13574 }
13575
13576
13577 func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
13578 return nil, false
13579 }
13580
13581
13582 func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
13583 return nil, false
13584 }
13585
13586
13587 func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
13588 return &ivbr, true
13589 }
13590
13591
13592 func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) {
13593 return nil, false
13594 }
13595
13596
13597 func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) {
13598 return &ivbr, true
13599 }
13600
13601
13602 type BasicIaaSVMContainer interface {
13603 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
13604 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
13605 AsIaaSVMContainer() (*IaaSVMContainer, bool)
13606 }
13607
13608
13609 type IaaSVMContainer struct {
13610
13611 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13612
13613 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
13614
13615 ResourceGroup *string `json:"resourceGroup,omitempty"`
13616
13617 FriendlyName *string `json:"friendlyName,omitempty"`
13618
13619 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13620
13621 RegistrationStatus *string `json:"registrationStatus,omitempty"`
13622
13623 HealthStatus *string `json:"healthStatus,omitempty"`
13624
13625 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
13626
13627 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
13628 }
13629
13630 func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) {
13631 var m map[string]interface{}
13632 err := json.Unmarshal(body, &m)
13633 if err != nil {
13634 return nil, err
13635 }
13636
13637 switch m["containerType"] {
13638 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines):
13639 var aisccvc AzureIaaSClassicComputeVMContainer
13640 err := json.Unmarshal(body, &aisccvc)
13641 return aisccvc, err
13642 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines):
13643 var aiscvc AzureIaaSComputeVMContainer
13644 err := json.Unmarshal(body, &aiscvc)
13645 return aiscvc, err
13646 default:
13647 var isc IaaSVMContainer
13648 err := json.Unmarshal(body, &isc)
13649 return isc, err
13650 }
13651 }
13652 func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) {
13653 var rawMessages []*json.RawMessage
13654 err := json.Unmarshal(body, &rawMessages)
13655 if err != nil {
13656 return nil, err
13657 }
13658
13659 iscArray := make([]BasicIaaSVMContainer, len(rawMessages))
13660
13661 for index, rawMessage := range rawMessages {
13662 isc, err := unmarshalBasicIaaSVMContainer(*rawMessage)
13663 if err != nil {
13664 return nil, err
13665 }
13666 iscArray[index] = isc
13667 }
13668 return iscArray, nil
13669 }
13670
13671
13672 func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) {
13673 isc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeIaasVMContainer
13674 objectMap := make(map[string]interface{})
13675 if isc.VirtualMachineID != nil {
13676 objectMap["virtualMachineId"] = isc.VirtualMachineID
13677 }
13678 if isc.VirtualMachineVersion != nil {
13679 objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion
13680 }
13681 if isc.ResourceGroup != nil {
13682 objectMap["resourceGroup"] = isc.ResourceGroup
13683 }
13684 if isc.FriendlyName != nil {
13685 objectMap["friendlyName"] = isc.FriendlyName
13686 }
13687 if isc.BackupManagementType != "" {
13688 objectMap["backupManagementType"] = isc.BackupManagementType
13689 }
13690 if isc.RegistrationStatus != nil {
13691 objectMap["registrationStatus"] = isc.RegistrationStatus
13692 }
13693 if isc.HealthStatus != nil {
13694 objectMap["healthStatus"] = isc.HealthStatus
13695 }
13696 if isc.ProtectableObjectType != nil {
13697 objectMap["protectableObjectType"] = isc.ProtectableObjectType
13698 }
13699 if isc.ContainerType != "" {
13700 objectMap["containerType"] = isc.ContainerType
13701 }
13702 return json.Marshal(objectMap)
13703 }
13704
13705
13706 func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
13707 return nil, false
13708 }
13709
13710
13711 func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
13712 return nil, false
13713 }
13714
13715
13716 func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
13717 return nil, false
13718 }
13719
13720
13721 func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
13722 return nil, false
13723 }
13724
13725
13726 func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
13727 return nil, false
13728 }
13729
13730
13731 func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
13732 return nil, false
13733 }
13734
13735
13736 func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
13737 return nil, false
13738 }
13739
13740
13741 func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
13742 return nil, false
13743 }
13744
13745
13746 func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
13747 return nil, false
13748 }
13749
13750
13751 func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) {
13752 return nil, false
13753 }
13754
13755
13756 func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13757 return nil, false
13758 }
13759
13760
13761 func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) {
13762 return nil, false
13763 }
13764
13765
13766 func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13767 return &isc, true
13768 }
13769
13770
13771 func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13772 return &isc, true
13773 }
13774
13775
13776 func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) {
13777 return nil, false
13778 }
13779
13780
13781 func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13782 return nil, false
13783 }
13784
13785
13786 func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13787 return &isc, true
13788 }
13789
13790
13791 type IaasVMILRRegistrationRequest struct {
13792
13793 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
13794
13795 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13796
13797 InitiatorName *string `json:"initiatorName,omitempty"`
13798
13799 RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"`
13800
13801 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
13802 }
13803
13804
13805 func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) {
13806 ivrr.ObjectType = ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest
13807 objectMap := make(map[string]interface{})
13808 if ivrr.RecoveryPointID != nil {
13809 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
13810 }
13811 if ivrr.VirtualMachineID != nil {
13812 objectMap["virtualMachineId"] = ivrr.VirtualMachineID
13813 }
13814 if ivrr.InitiatorName != nil {
13815 objectMap["initiatorName"] = ivrr.InitiatorName
13816 }
13817 if ivrr.RenewExistingRegistration != nil {
13818 objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration
13819 }
13820 if ivrr.ObjectType != "" {
13821 objectMap["objectType"] = ivrr.ObjectType
13822 }
13823 return json.Marshal(objectMap)
13824 }
13825
13826
13827 func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
13828 return nil, false
13829 }
13830
13831
13832 func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
13833 return &ivrr, true
13834 }
13835
13836
13837 func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) {
13838 return nil, false
13839 }
13840
13841
13842 func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
13843 return &ivrr, true
13844 }
13845
13846
13847 type BasicIaaSVMProtectableItem interface {
13848 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
13849 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
13850 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
13851 }
13852
13853
13854 type IaaSVMProtectableItem struct {
13855
13856 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13857
13858 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
13859
13860 ResourceGroup *string `json:"resourceGroup,omitempty"`
13861
13862 BackupManagementType *string `json:"backupManagementType,omitempty"`
13863
13864 WorkloadType *string `json:"workloadType,omitempty"`
13865
13866 FriendlyName *string `json:"friendlyName,omitempty"`
13867
13868 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
13869
13870 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
13871 }
13872
13873 func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) {
13874 var m map[string]interface{}
13875 err := json.Unmarshal(body, &m)
13876 if err != nil {
13877 return nil, err
13878 }
13879
13880 switch m["protectableItemType"] {
13881 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
13882 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
13883 err := json.Unmarshal(body, &aisccvpi)
13884 return aisccvpi, err
13885 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
13886 var aiscvpi AzureIaaSComputeVMProtectableItem
13887 err := json.Unmarshal(body, &aiscvpi)
13888 return aiscvpi, err
13889 default:
13890 var ispi IaaSVMProtectableItem
13891 err := json.Unmarshal(body, &ispi)
13892 return ispi, err
13893 }
13894 }
13895 func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) {
13896 var rawMessages []*json.RawMessage
13897 err := json.Unmarshal(body, &rawMessages)
13898 if err != nil {
13899 return nil, err
13900 }
13901
13902 ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages))
13903
13904 for index, rawMessage := range rawMessages {
13905 ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage)
13906 if err != nil {
13907 return nil, err
13908 }
13909 ispiArray[index] = ispi
13910 }
13911 return ispiArray, nil
13912 }
13913
13914
13915 func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) {
13916 ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem
13917 objectMap := make(map[string]interface{})
13918 if ispi.VirtualMachineID != nil {
13919 objectMap["virtualMachineId"] = ispi.VirtualMachineID
13920 }
13921 if ispi.VirtualMachineVersion != nil {
13922 objectMap["virtualMachineVersion"] = ispi.VirtualMachineVersion
13923 }
13924 if ispi.ResourceGroup != nil {
13925 objectMap["resourceGroup"] = ispi.ResourceGroup
13926 }
13927 if ispi.BackupManagementType != nil {
13928 objectMap["backupManagementType"] = ispi.BackupManagementType
13929 }
13930 if ispi.WorkloadType != nil {
13931 objectMap["workloadType"] = ispi.WorkloadType
13932 }
13933 if ispi.FriendlyName != nil {
13934 objectMap["friendlyName"] = ispi.FriendlyName
13935 }
13936 if ispi.ProtectionState != "" {
13937 objectMap["protectionState"] = ispi.ProtectionState
13938 }
13939 if ispi.ProtectableItemType != "" {
13940 objectMap["protectableItemType"] = ispi.ProtectableItemType
13941 }
13942 return json.Marshal(objectMap)
13943 }
13944
13945
13946 func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
13947 return nil, false
13948 }
13949
13950
13951 func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
13952 return nil, false
13953 }
13954
13955
13956 func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
13957 return nil, false
13958 }
13959
13960
13961 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
13962 return nil, false
13963 }
13964
13965
13966 func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
13967 return nil, false
13968 }
13969
13970
13971 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
13972 return nil, false
13973 }
13974
13975
13976 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
13977 return nil, false
13978 }
13979
13980
13981 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
13982 return nil, false
13983 }
13984
13985
13986 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
13987 return nil, false
13988 }
13989
13990
13991 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
13992 return nil, false
13993 }
13994
13995
13996 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
13997 return nil, false
13998 }
13999
14000
14001 func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
14002 return &ispi, true
14003 }
14004
14005
14006 func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
14007 return &ispi, true
14008 }
14009
14010
14011 func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
14012 return nil, false
14013 }
14014
14015
14016 func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
14017 return &ispi, true
14018 }
14019
14020
14021 type IaasVMRecoveryPoint struct {
14022
14023 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
14024
14025 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
14026
14027 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
14028
14029 SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"`
14030
14031 IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"`
14032
14033 KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"`
14034
14035 IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"`
14036
14037 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
14038
14039 IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"`
14040
14041 VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
14042
14043 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14044
14045 OsType *string `json:"osType,omitempty"`
14046
14047 RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"`
14048
14049 Zones *[]string `json:"zones,omitempty"`
14050
14051 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
14052
14053 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
14054 }
14055
14056
14057 func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) {
14058 ivrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint
14059 objectMap := make(map[string]interface{})
14060 if ivrp.RecoveryPointType != nil {
14061 objectMap["recoveryPointType"] = ivrp.RecoveryPointType
14062 }
14063 if ivrp.RecoveryPointTime != nil {
14064 objectMap["recoveryPointTime"] = ivrp.RecoveryPointTime
14065 }
14066 if ivrp.RecoveryPointAdditionalInfo != nil {
14067 objectMap["recoveryPointAdditionalInfo"] = ivrp.RecoveryPointAdditionalInfo
14068 }
14069 if ivrp.SourceVMStorageType != nil {
14070 objectMap["sourceVMStorageType"] = ivrp.SourceVMStorageType
14071 }
14072 if ivrp.IsSourceVMEncrypted != nil {
14073 objectMap["isSourceVMEncrypted"] = ivrp.IsSourceVMEncrypted
14074 }
14075 if ivrp.KeyAndSecret != nil {
14076 objectMap["keyAndSecret"] = ivrp.KeyAndSecret
14077 }
14078 if ivrp.IsInstantIlrSessionActive != nil {
14079 objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive
14080 }
14081 if ivrp.RecoveryPointTierDetails != nil {
14082 objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails
14083 }
14084 if ivrp.IsManagedVirtualMachine != nil {
14085 objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine
14086 }
14087 if ivrp.VirtualMachineSize != nil {
14088 objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize
14089 }
14090 if ivrp.OriginalStorageAccountOption != nil {
14091 objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption
14092 }
14093 if ivrp.OsType != nil {
14094 objectMap["osType"] = ivrp.OsType
14095 }
14096 if ivrp.RecoveryPointDiskConfiguration != nil {
14097 objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration
14098 }
14099 if ivrp.Zones != nil {
14100 objectMap["zones"] = ivrp.Zones
14101 }
14102 if ivrp.RecoveryPointMoveReadinessInfo != nil {
14103 objectMap["recoveryPointMoveReadinessInfo"] = ivrp.RecoveryPointMoveReadinessInfo
14104 }
14105 if ivrp.ObjectType != "" {
14106 objectMap["objectType"] = ivrp.ObjectType
14107 }
14108 return json.Marshal(objectMap)
14109 }
14110
14111
14112 func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
14113 return nil, false
14114 }
14115
14116
14117 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
14118 return nil, false
14119 }
14120
14121
14122 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
14123 return nil, false
14124 }
14125
14126
14127 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
14128 return nil, false
14129 }
14130
14131
14132 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
14133 return nil, false
14134 }
14135
14136
14137 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
14138 return nil, false
14139 }
14140
14141
14142 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
14143 return nil, false
14144 }
14145
14146
14147 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
14148 return nil, false
14149 }
14150
14151
14152 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
14153 return nil, false
14154 }
14155
14156
14157 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
14158 return nil, false
14159 }
14160
14161
14162 func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
14163 return nil, false
14164 }
14165
14166
14167 func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
14168 return &ivrp, true
14169 }
14170
14171
14172 func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
14173 return nil, false
14174 }
14175
14176
14177 func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
14178 return &ivrp, true
14179 }
14180
14181
14182 type BasicIaasVMRestoreRequest interface {
14183 AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool)
14184 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
14185 }
14186
14187
14188 type IaasVMRestoreRequest struct {
14189
14190 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
14191
14192 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
14193
14194 SourceResourceID *string `json:"sourceResourceId,omitempty"`
14195
14196
14197 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
14198
14199
14200 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
14201
14202 StorageAccountID *string `json:"storageAccountId,omitempty"`
14203
14204
14205 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
14206
14207
14208
14209 SubnetID *string `json:"subnetId,omitempty"`
14210
14211
14212 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
14213
14214 Region *string `json:"region,omitempty"`
14215
14216 AffinityGroup *string `json:"affinityGroup,omitempty"`
14217
14218
14219 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
14220
14221 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14222
14223 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
14224
14225 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
14226
14227 RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"`
14228
14229 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
14230
14231 Zones *[]string `json:"zones,omitempty"`
14232
14233 IdentityInfo *IdentityInfo `json:"identityInfo,omitempty"`
14234
14235 IdentityBasedRestoreDetails *IdentityBasedRestoreDetails `json:"identityBasedRestoreDetails,omitempty"`
14236
14237 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
14238 }
14239
14240 func unmarshalBasicIaasVMRestoreRequest(body []byte) (BasicIaasVMRestoreRequest, error) {
14241 var m map[string]interface{}
14242 err := json.Unmarshal(body, &m)
14243 if err != nil {
14244 return nil, err
14245 }
14246
14247 switch m["objectType"] {
14248 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest):
14249 var ivrwrr IaasVMRestoreWithRehydrationRequest
14250 err := json.Unmarshal(body, &ivrwrr)
14251 return ivrwrr, err
14252 default:
14253 var ivrr IaasVMRestoreRequest
14254 err := json.Unmarshal(body, &ivrr)
14255 return ivrr, err
14256 }
14257 }
14258 func unmarshalBasicIaasVMRestoreRequestArray(body []byte) ([]BasicIaasVMRestoreRequest, error) {
14259 var rawMessages []*json.RawMessage
14260 err := json.Unmarshal(body, &rawMessages)
14261 if err != nil {
14262 return nil, err
14263 }
14264
14265 ivrrArray := make([]BasicIaasVMRestoreRequest, len(rawMessages))
14266
14267 for index, rawMessage := range rawMessages {
14268 ivrr, err := unmarshalBasicIaasVMRestoreRequest(*rawMessage)
14269 if err != nil {
14270 return nil, err
14271 }
14272 ivrrArray[index] = ivrr
14273 }
14274 return ivrrArray, nil
14275 }
14276
14277
14278 func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) {
14279 ivrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest
14280 objectMap := make(map[string]interface{})
14281 if ivrr.RecoveryPointID != nil {
14282 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
14283 }
14284 if ivrr.RecoveryType != "" {
14285 objectMap["recoveryType"] = ivrr.RecoveryType
14286 }
14287 if ivrr.SourceResourceID != nil {
14288 objectMap["sourceResourceId"] = ivrr.SourceResourceID
14289 }
14290 if ivrr.TargetVirtualMachineID != nil {
14291 objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID
14292 }
14293 if ivrr.TargetResourceGroupID != nil {
14294 objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID
14295 }
14296 if ivrr.StorageAccountID != nil {
14297 objectMap["storageAccountId"] = ivrr.StorageAccountID
14298 }
14299 if ivrr.VirtualNetworkID != nil {
14300 objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID
14301 }
14302 if ivrr.SubnetID != nil {
14303 objectMap["subnetId"] = ivrr.SubnetID
14304 }
14305 if ivrr.TargetDomainNameID != nil {
14306 objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID
14307 }
14308 if ivrr.Region != nil {
14309 objectMap["region"] = ivrr.Region
14310 }
14311 if ivrr.AffinityGroup != nil {
14312 objectMap["affinityGroup"] = ivrr.AffinityGroup
14313 }
14314 if ivrr.CreateNewCloudService != nil {
14315 objectMap["createNewCloudService"] = ivrr.CreateNewCloudService
14316 }
14317 if ivrr.OriginalStorageAccountOption != nil {
14318 objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption
14319 }
14320 if ivrr.EncryptionDetails != nil {
14321 objectMap["encryptionDetails"] = ivrr.EncryptionDetails
14322 }
14323 if ivrr.RestoreDiskLunList != nil {
14324 objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList
14325 }
14326 if ivrr.RestoreWithManagedDisks != nil {
14327 objectMap["restoreWithManagedDisks"] = ivrr.RestoreWithManagedDisks
14328 }
14329 if ivrr.DiskEncryptionSetID != nil {
14330 objectMap["diskEncryptionSetId"] = ivrr.DiskEncryptionSetID
14331 }
14332 if ivrr.Zones != nil {
14333 objectMap["zones"] = ivrr.Zones
14334 }
14335 if ivrr.IdentityInfo != nil {
14336 objectMap["identityInfo"] = ivrr.IdentityInfo
14337 }
14338 if ivrr.IdentityBasedRestoreDetails != nil {
14339 objectMap["identityBasedRestoreDetails"] = ivrr.IdentityBasedRestoreDetails
14340 }
14341 if ivrr.ObjectType != "" {
14342 objectMap["objectType"] = ivrr.ObjectType
14343 }
14344 return json.Marshal(objectMap)
14345 }
14346
14347
14348 func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
14349 return nil, false
14350 }
14351
14352
14353 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
14354 return nil, false
14355 }
14356
14357
14358 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
14359 return nil, false
14360 }
14361
14362
14363 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
14364 return nil, false
14365 }
14366
14367
14368 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14369 return nil, false
14370 }
14371
14372
14373 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14374 return nil, false
14375 }
14376
14377
14378 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
14379 return nil, false
14380 }
14381
14382
14383 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
14384 return nil, false
14385 }
14386
14387
14388 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14389 return nil, false
14390 }
14391
14392
14393 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14394 return nil, false
14395 }
14396
14397
14398 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
14399 return nil, false
14400 }
14401
14402
14403 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
14404 return nil, false
14405 }
14406
14407
14408 func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
14409 return &ivrr, true
14410 }
14411
14412
14413 func (ivrr IaasVMRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
14414 return &ivrr, true
14415 }
14416
14417
14418 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
14419 return nil, false
14420 }
14421
14422
14423 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
14424 return nil, false
14425 }
14426
14427
14428 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
14429 return nil, false
14430 }
14431
14432
14433 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
14434 return nil, false
14435 }
14436
14437
14438 func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
14439 return nil, false
14440 }
14441
14442
14443 func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
14444 return nil, false
14445 }
14446
14447
14448 func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
14449 return &ivrr, true
14450 }
14451
14452
14453
14454 type IaasVMRestoreWithRehydrationRequest struct {
14455
14456 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
14457
14458 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
14459
14460 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
14461
14462 SourceResourceID *string `json:"sourceResourceId,omitempty"`
14463
14464
14465 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
14466
14467
14468 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
14469
14470 StorageAccountID *string `json:"storageAccountId,omitempty"`
14471
14472
14473 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
14474
14475
14476
14477 SubnetID *string `json:"subnetId,omitempty"`
14478
14479
14480 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
14481
14482 Region *string `json:"region,omitempty"`
14483
14484 AffinityGroup *string `json:"affinityGroup,omitempty"`
14485
14486
14487 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
14488
14489 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14490
14491 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
14492
14493 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
14494
14495 RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"`
14496
14497 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
14498
14499 Zones *[]string `json:"zones,omitempty"`
14500
14501 IdentityInfo *IdentityInfo `json:"identityInfo,omitempty"`
14502
14503 IdentityBasedRestoreDetails *IdentityBasedRestoreDetails `json:"identityBasedRestoreDetails,omitempty"`
14504
14505 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
14506 }
14507
14508
14509 func (ivrwrr IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) {
14510 ivrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest
14511 objectMap := make(map[string]interface{})
14512 if ivrwrr.RecoveryPointRehydrationInfo != nil {
14513 objectMap["recoveryPointRehydrationInfo"] = ivrwrr.RecoveryPointRehydrationInfo
14514 }
14515 if ivrwrr.RecoveryPointID != nil {
14516 objectMap["recoveryPointId"] = ivrwrr.RecoveryPointID
14517 }
14518 if ivrwrr.RecoveryType != "" {
14519 objectMap["recoveryType"] = ivrwrr.RecoveryType
14520 }
14521 if ivrwrr.SourceResourceID != nil {
14522 objectMap["sourceResourceId"] = ivrwrr.SourceResourceID
14523 }
14524 if ivrwrr.TargetVirtualMachineID != nil {
14525 objectMap["targetVirtualMachineId"] = ivrwrr.TargetVirtualMachineID
14526 }
14527 if ivrwrr.TargetResourceGroupID != nil {
14528 objectMap["targetResourceGroupId"] = ivrwrr.TargetResourceGroupID
14529 }
14530 if ivrwrr.StorageAccountID != nil {
14531 objectMap["storageAccountId"] = ivrwrr.StorageAccountID
14532 }
14533 if ivrwrr.VirtualNetworkID != nil {
14534 objectMap["virtualNetworkId"] = ivrwrr.VirtualNetworkID
14535 }
14536 if ivrwrr.SubnetID != nil {
14537 objectMap["subnetId"] = ivrwrr.SubnetID
14538 }
14539 if ivrwrr.TargetDomainNameID != nil {
14540 objectMap["targetDomainNameId"] = ivrwrr.TargetDomainNameID
14541 }
14542 if ivrwrr.Region != nil {
14543 objectMap["region"] = ivrwrr.Region
14544 }
14545 if ivrwrr.AffinityGroup != nil {
14546 objectMap["affinityGroup"] = ivrwrr.AffinityGroup
14547 }
14548 if ivrwrr.CreateNewCloudService != nil {
14549 objectMap["createNewCloudService"] = ivrwrr.CreateNewCloudService
14550 }
14551 if ivrwrr.OriginalStorageAccountOption != nil {
14552 objectMap["originalStorageAccountOption"] = ivrwrr.OriginalStorageAccountOption
14553 }
14554 if ivrwrr.EncryptionDetails != nil {
14555 objectMap["encryptionDetails"] = ivrwrr.EncryptionDetails
14556 }
14557 if ivrwrr.RestoreDiskLunList != nil {
14558 objectMap["restoreDiskLunList"] = ivrwrr.RestoreDiskLunList
14559 }
14560 if ivrwrr.RestoreWithManagedDisks != nil {
14561 objectMap["restoreWithManagedDisks"] = ivrwrr.RestoreWithManagedDisks
14562 }
14563 if ivrwrr.DiskEncryptionSetID != nil {
14564 objectMap["diskEncryptionSetId"] = ivrwrr.DiskEncryptionSetID
14565 }
14566 if ivrwrr.Zones != nil {
14567 objectMap["zones"] = ivrwrr.Zones
14568 }
14569 if ivrwrr.IdentityInfo != nil {
14570 objectMap["identityInfo"] = ivrwrr.IdentityInfo
14571 }
14572 if ivrwrr.IdentityBasedRestoreDetails != nil {
14573 objectMap["identityBasedRestoreDetails"] = ivrwrr.IdentityBasedRestoreDetails
14574 }
14575 if ivrwrr.ObjectType != "" {
14576 objectMap["objectType"] = ivrwrr.ObjectType
14577 }
14578 return json.Marshal(objectMap)
14579 }
14580
14581
14582 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
14583 return nil, false
14584 }
14585
14586
14587 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
14588 return nil, false
14589 }
14590
14591
14592 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
14593 return nil, false
14594 }
14595
14596
14597 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
14598 return nil, false
14599 }
14600
14601
14602 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14603 return nil, false
14604 }
14605
14606
14607 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14608 return nil, false
14609 }
14610
14611
14612 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
14613 return nil, false
14614 }
14615
14616
14617 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
14618 return nil, false
14619 }
14620
14621
14622 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14623 return nil, false
14624 }
14625
14626
14627 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14628 return nil, false
14629 }
14630
14631
14632 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
14633 return nil, false
14634 }
14635
14636
14637 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
14638 return nil, false
14639 }
14640
14641
14642 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
14643 return nil, false
14644 }
14645
14646
14647 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
14648 return &ivrwrr, true
14649 }
14650
14651
14652 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
14653 return nil, false
14654 }
14655
14656
14657 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
14658 return nil, false
14659 }
14660
14661
14662 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
14663 return nil, false
14664 }
14665
14666
14667 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
14668 return nil, false
14669 }
14670
14671
14672 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
14673 return &ivrwrr, true
14674 }
14675
14676
14677 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsRestoreRequest() (*RestoreRequest, bool) {
14678 return nil, false
14679 }
14680
14681
14682 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
14683 return &ivrwrr, true
14684 }
14685
14686
14687
14688 type IdentityBasedRestoreDetails struct {
14689
14690 ObjectType *string `json:"objectType,omitempty"`
14691
14692 TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"`
14693 }
14694
14695
14696 type IdentityInfo struct {
14697
14698 IsSystemAssignedIdentity *bool `json:"isSystemAssignedIdentity,omitempty"`
14699
14700
14701 ManagedIdentityResourceID *string `json:"managedIdentityResourceId,omitempty"`
14702 }
14703
14704
14705 type BasicILRRequest interface {
14706 AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool)
14707 AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool)
14708 AsILRRequest() (*ILRRequest, bool)
14709 }
14710
14711
14712 type ILRRequest struct {
14713
14714 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
14715 }
14716
14717 func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) {
14718 var m map[string]interface{}
14719 err := json.Unmarshal(body, &m)
14720 if err != nil {
14721 return nil, err
14722 }
14723
14724 switch m["objectType"] {
14725 case string(ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest):
14726 var afspir AzureFileShareProvisionILRRequest
14727 err := json.Unmarshal(body, &afspir)
14728 return afspir, err
14729 case string(ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest):
14730 var ivrr IaasVMILRRegistrationRequest
14731 err := json.Unmarshal(body, &ivrr)
14732 return ivrr, err
14733 default:
14734 var ir ILRRequest
14735 err := json.Unmarshal(body, &ir)
14736 return ir, err
14737 }
14738 }
14739 func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) {
14740 var rawMessages []*json.RawMessage
14741 err := json.Unmarshal(body, &rawMessages)
14742 if err != nil {
14743 return nil, err
14744 }
14745
14746 irArray := make([]BasicILRRequest, len(rawMessages))
14747
14748 for index, rawMessage := range rawMessages {
14749 ir, err := unmarshalBasicILRRequest(*rawMessage)
14750 if err != nil {
14751 return nil, err
14752 }
14753 irArray[index] = ir
14754 }
14755 return irArray, nil
14756 }
14757
14758
14759 func (ir ILRRequest) MarshalJSON() ([]byte, error) {
14760 ir.ObjectType = ObjectTypeBasicILRRequestObjectTypeILRRequest
14761 objectMap := make(map[string]interface{})
14762 if ir.ObjectType != "" {
14763 objectMap["objectType"] = ir.ObjectType
14764 }
14765 return json.Marshal(objectMap)
14766 }
14767
14768
14769 func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
14770 return nil, false
14771 }
14772
14773
14774 func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
14775 return nil, false
14776 }
14777
14778
14779 func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) {
14780 return &ir, true
14781 }
14782
14783
14784 func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
14785 return &ir, true
14786 }
14787
14788
14789 type ILRRequestResource struct {
14790
14791 Properties BasicILRRequest `json:"properties,omitempty"`
14792
14793 ID *string `json:"id,omitempty"`
14794
14795 Name *string `json:"name,omitempty"`
14796
14797 Type *string `json:"type,omitempty"`
14798
14799 Location *string `json:"location,omitempty"`
14800
14801 Tags map[string]*string `json:"tags"`
14802
14803 ETag *string `json:"eTag,omitempty"`
14804 }
14805
14806
14807 func (irr ILRRequestResource) MarshalJSON() ([]byte, error) {
14808 objectMap := make(map[string]interface{})
14809 objectMap["properties"] = irr.Properties
14810 if irr.Location != nil {
14811 objectMap["location"] = irr.Location
14812 }
14813 if irr.Tags != nil {
14814 objectMap["tags"] = irr.Tags
14815 }
14816 if irr.ETag != nil {
14817 objectMap["eTag"] = irr.ETag
14818 }
14819 return json.Marshal(objectMap)
14820 }
14821
14822
14823 func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error {
14824 var m map[string]*json.RawMessage
14825 err := json.Unmarshal(body, &m)
14826 if err != nil {
14827 return err
14828 }
14829 for k, v := range m {
14830 switch k {
14831 case "properties":
14832 if v != nil {
14833 properties, err := unmarshalBasicILRRequest(*v)
14834 if err != nil {
14835 return err
14836 }
14837 irr.Properties = properties
14838 }
14839 case "id":
14840 if v != nil {
14841 var ID string
14842 err = json.Unmarshal(*v, &ID)
14843 if err != nil {
14844 return err
14845 }
14846 irr.ID = &ID
14847 }
14848 case "name":
14849 if v != nil {
14850 var name string
14851 err = json.Unmarshal(*v, &name)
14852 if err != nil {
14853 return err
14854 }
14855 irr.Name = &name
14856 }
14857 case "type":
14858 if v != nil {
14859 var typeVar string
14860 err = json.Unmarshal(*v, &typeVar)
14861 if err != nil {
14862 return err
14863 }
14864 irr.Type = &typeVar
14865 }
14866 case "location":
14867 if v != nil {
14868 var location string
14869 err = json.Unmarshal(*v, &location)
14870 if err != nil {
14871 return err
14872 }
14873 irr.Location = &location
14874 }
14875 case "tags":
14876 if v != nil {
14877 var tags map[string]*string
14878 err = json.Unmarshal(*v, &tags)
14879 if err != nil {
14880 return err
14881 }
14882 irr.Tags = tags
14883 }
14884 case "eTag":
14885 if v != nil {
14886 var eTag string
14887 err = json.Unmarshal(*v, &eTag)
14888 if err != nil {
14889 return err
14890 }
14891 irr.ETag = &eTag
14892 }
14893 }
14894 }
14895
14896 return nil
14897 }
14898
14899
14900 type InquiryInfo struct {
14901
14902
14903 Status *string `json:"status,omitempty"`
14904
14905 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
14906
14907
14908 InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"`
14909 }
14910
14911
14912 type InquiryValidation struct {
14913
14914 Status *string `json:"status,omitempty"`
14915
14916 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
14917
14918 AdditionalDetail *string `json:"additionalDetail,omitempty"`
14919 }
14920
14921
14922 func (iv InquiryValidation) MarshalJSON() ([]byte, error) {
14923 objectMap := make(map[string]interface{})
14924 if iv.Status != nil {
14925 objectMap["status"] = iv.Status
14926 }
14927 if iv.ErrorDetail != nil {
14928 objectMap["errorDetail"] = iv.ErrorDetail
14929 }
14930 return json.Marshal(objectMap)
14931 }
14932
14933
14934 type InstantItemRecoveryTarget struct {
14935
14936 ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"`
14937 }
14938
14939
14940 type InstantRPAdditionalDetails struct {
14941 AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"`
14942 AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"`
14943 }
14944
14945
14946 type BasicJob interface {
14947 AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool)
14948 AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool)
14949 AsAzureStorageJob() (*AzureStorageJob, bool)
14950 AsAzureWorkloadJob() (*AzureWorkloadJob, bool)
14951 AsDpmJob() (*DpmJob, bool)
14952 AsMabJob() (*MabJob, bool)
14953 AsVaultJob() (*VaultJob, bool)
14954 AsJob() (*Job, bool)
14955 }
14956
14957
14958 type Job struct {
14959
14960 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
14961
14962 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
14963
14964 Operation *string `json:"operation,omitempty"`
14965
14966 Status *string `json:"status,omitempty"`
14967
14968 StartTime *date.Time `json:"startTime,omitempty"`
14969
14970 EndTime *date.Time `json:"endTime,omitempty"`
14971
14972 ActivityID *string `json:"activityId,omitempty"`
14973
14974 JobType JobType `json:"jobType,omitempty"`
14975 }
14976
14977 func unmarshalBasicJob(body []byte) (BasicJob, error) {
14978 var m map[string]interface{}
14979 err := json.Unmarshal(body, &m)
14980 if err != nil {
14981 return nil, err
14982 }
14983
14984 switch m["jobType"] {
14985 case string(JobTypeAzureIaaSVMJob):
14986 var aisj AzureIaaSVMJob
14987 err := json.Unmarshal(body, &aisj)
14988 return aisj, err
14989 case string(JobTypeAzureIaaSVMJobV2):
14990 var aisjv AzureIaaSVMJobV2
14991 err := json.Unmarshal(body, &aisjv)
14992 return aisjv, err
14993 case string(JobTypeAzureStorageJob):
14994 var asj AzureStorageJob
14995 err := json.Unmarshal(body, &asj)
14996 return asj, err
14997 case string(JobTypeAzureWorkloadJob):
14998 var awj AzureWorkloadJob
14999 err := json.Unmarshal(body, &awj)
15000 return awj, err
15001 case string(JobTypeDpmJob):
15002 var dj DpmJob
15003 err := json.Unmarshal(body, &dj)
15004 return dj, err
15005 case string(JobTypeMabJob):
15006 var mj MabJob
15007 err := json.Unmarshal(body, &mj)
15008 return mj, err
15009 case string(JobTypeVaultJob):
15010 var vj VaultJob
15011 err := json.Unmarshal(body, &vj)
15012 return vj, err
15013 default:
15014 var j Job
15015 err := json.Unmarshal(body, &j)
15016 return j, err
15017 }
15018 }
15019 func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) {
15020 var rawMessages []*json.RawMessage
15021 err := json.Unmarshal(body, &rawMessages)
15022 if err != nil {
15023 return nil, err
15024 }
15025
15026 jArray := make([]BasicJob, len(rawMessages))
15027
15028 for index, rawMessage := range rawMessages {
15029 j, err := unmarshalBasicJob(*rawMessage)
15030 if err != nil {
15031 return nil, err
15032 }
15033 jArray[index] = j
15034 }
15035 return jArray, nil
15036 }
15037
15038
15039 func (j Job) MarshalJSON() ([]byte, error) {
15040 j.JobType = JobTypeJob
15041 objectMap := make(map[string]interface{})
15042 if j.EntityFriendlyName != nil {
15043 objectMap["entityFriendlyName"] = j.EntityFriendlyName
15044 }
15045 if j.BackupManagementType != "" {
15046 objectMap["backupManagementType"] = j.BackupManagementType
15047 }
15048 if j.Operation != nil {
15049 objectMap["operation"] = j.Operation
15050 }
15051 if j.Status != nil {
15052 objectMap["status"] = j.Status
15053 }
15054 if j.StartTime != nil {
15055 objectMap["startTime"] = j.StartTime
15056 }
15057 if j.EndTime != nil {
15058 objectMap["endTime"] = j.EndTime
15059 }
15060 if j.ActivityID != nil {
15061 objectMap["activityId"] = j.ActivityID
15062 }
15063 if j.JobType != "" {
15064 objectMap["jobType"] = j.JobType
15065 }
15066 return json.Marshal(objectMap)
15067 }
15068
15069
15070 func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
15071 return nil, false
15072 }
15073
15074
15075 func (j Job) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
15076 return nil, false
15077 }
15078
15079
15080 func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) {
15081 return nil, false
15082 }
15083
15084
15085 func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
15086 return nil, false
15087 }
15088
15089
15090 func (j Job) AsDpmJob() (*DpmJob, bool) {
15091 return nil, false
15092 }
15093
15094
15095 func (j Job) AsMabJob() (*MabJob, bool) {
15096 return nil, false
15097 }
15098
15099
15100 func (j Job) AsVaultJob() (*VaultJob, bool) {
15101 return nil, false
15102 }
15103
15104
15105 func (j Job) AsJob() (*Job, bool) {
15106 return &j, true
15107 }
15108
15109
15110 func (j Job) AsBasicJob() (BasicJob, bool) {
15111 return &j, true
15112 }
15113
15114
15115 type JobQueryObject struct {
15116
15117 Status JobStatus `json:"status,omitempty"`
15118
15119 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15120
15121 Operation JobOperationType `json:"operation,omitempty"`
15122
15123 JobID *string `json:"jobId,omitempty"`
15124
15125 StartTime *date.Time `json:"startTime,omitempty"`
15126
15127 EndTime *date.Time `json:"endTime,omitempty"`
15128 }
15129
15130
15131 type JobResource struct {
15132 autorest.Response `json:"-"`
15133
15134 Properties BasicJob `json:"properties,omitempty"`
15135
15136 ID *string `json:"id,omitempty"`
15137
15138 Name *string `json:"name,omitempty"`
15139
15140 Type *string `json:"type,omitempty"`
15141
15142 Location *string `json:"location,omitempty"`
15143
15144 Tags map[string]*string `json:"tags"`
15145
15146 ETag *string `json:"eTag,omitempty"`
15147 }
15148
15149
15150 func (jr JobResource) MarshalJSON() ([]byte, error) {
15151 objectMap := make(map[string]interface{})
15152 objectMap["properties"] = jr.Properties
15153 if jr.Location != nil {
15154 objectMap["location"] = jr.Location
15155 }
15156 if jr.Tags != nil {
15157 objectMap["tags"] = jr.Tags
15158 }
15159 if jr.ETag != nil {
15160 objectMap["eTag"] = jr.ETag
15161 }
15162 return json.Marshal(objectMap)
15163 }
15164
15165
15166 func (jr *JobResource) UnmarshalJSON(body []byte) error {
15167 var m map[string]*json.RawMessage
15168 err := json.Unmarshal(body, &m)
15169 if err != nil {
15170 return err
15171 }
15172 for k, v := range m {
15173 switch k {
15174 case "properties":
15175 if v != nil {
15176 properties, err := unmarshalBasicJob(*v)
15177 if err != nil {
15178 return err
15179 }
15180 jr.Properties = properties
15181 }
15182 case "id":
15183 if v != nil {
15184 var ID string
15185 err = json.Unmarshal(*v, &ID)
15186 if err != nil {
15187 return err
15188 }
15189 jr.ID = &ID
15190 }
15191 case "name":
15192 if v != nil {
15193 var name string
15194 err = json.Unmarshal(*v, &name)
15195 if err != nil {
15196 return err
15197 }
15198 jr.Name = &name
15199 }
15200 case "type":
15201 if v != nil {
15202 var typeVar string
15203 err = json.Unmarshal(*v, &typeVar)
15204 if err != nil {
15205 return err
15206 }
15207 jr.Type = &typeVar
15208 }
15209 case "location":
15210 if v != nil {
15211 var location string
15212 err = json.Unmarshal(*v, &location)
15213 if err != nil {
15214 return err
15215 }
15216 jr.Location = &location
15217 }
15218 case "tags":
15219 if v != nil {
15220 var tags map[string]*string
15221 err = json.Unmarshal(*v, &tags)
15222 if err != nil {
15223 return err
15224 }
15225 jr.Tags = tags
15226 }
15227 case "eTag":
15228 if v != nil {
15229 var eTag string
15230 err = json.Unmarshal(*v, &eTag)
15231 if err != nil {
15232 return err
15233 }
15234 jr.ETag = &eTag
15235 }
15236 }
15237 }
15238
15239 return nil
15240 }
15241
15242
15243 type JobResourceList struct {
15244 autorest.Response `json:"-"`
15245
15246 Value *[]JobResource `json:"value,omitempty"`
15247
15248 NextLink *string `json:"nextLink,omitempty"`
15249 }
15250
15251
15252 type JobResourceListIterator struct {
15253 i int
15254 page JobResourceListPage
15255 }
15256
15257
15258
15259 func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) {
15260 if tracing.IsEnabled() {
15261 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext")
15262 defer func() {
15263 sc := -1
15264 if iter.Response().Response.Response != nil {
15265 sc = iter.Response().Response.Response.StatusCode
15266 }
15267 tracing.EndSpan(ctx, sc, err)
15268 }()
15269 }
15270 iter.i++
15271 if iter.i < len(iter.page.Values()) {
15272 return nil
15273 }
15274 err = iter.page.NextWithContext(ctx)
15275 if err != nil {
15276 iter.i--
15277 return err
15278 }
15279 iter.i = 0
15280 return nil
15281 }
15282
15283
15284
15285
15286 func (iter *JobResourceListIterator) Next() error {
15287 return iter.NextWithContext(context.Background())
15288 }
15289
15290
15291 func (iter JobResourceListIterator) NotDone() bool {
15292 return iter.page.NotDone() && iter.i < len(iter.page.Values())
15293 }
15294
15295
15296 func (iter JobResourceListIterator) Response() JobResourceList {
15297 return iter.page.Response()
15298 }
15299
15300
15301
15302 func (iter JobResourceListIterator) Value() JobResource {
15303 if !iter.page.NotDone() {
15304 return JobResource{}
15305 }
15306 return iter.page.Values()[iter.i]
15307 }
15308
15309
15310 func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator {
15311 return JobResourceListIterator{page: page}
15312 }
15313
15314
15315 func (jrl JobResourceList) IsEmpty() bool {
15316 return jrl.Value == nil || len(*jrl.Value) == 0
15317 }
15318
15319
15320 func (jrl JobResourceList) hasNextLink() bool {
15321 return jrl.NextLink != nil && len(*jrl.NextLink) != 0
15322 }
15323
15324
15325
15326 func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) {
15327 if !jrl.hasNextLink() {
15328 return nil, nil
15329 }
15330 return autorest.Prepare((&http.Request{}).WithContext(ctx),
15331 autorest.AsJSON(),
15332 autorest.AsGet(),
15333 autorest.WithBaseURL(to.String(jrl.NextLink)))
15334 }
15335
15336
15337 type JobResourceListPage struct {
15338 fn func(context.Context, JobResourceList) (JobResourceList, error)
15339 jrl JobResourceList
15340 }
15341
15342
15343
15344 func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) {
15345 if tracing.IsEnabled() {
15346 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext")
15347 defer func() {
15348 sc := -1
15349 if page.Response().Response.Response != nil {
15350 sc = page.Response().Response.Response.StatusCode
15351 }
15352 tracing.EndSpan(ctx, sc, err)
15353 }()
15354 }
15355 for {
15356 next, err := page.fn(ctx, page.jrl)
15357 if err != nil {
15358 return err
15359 }
15360 page.jrl = next
15361 if !next.hasNextLink() || !next.IsEmpty() {
15362 break
15363 }
15364 }
15365 return nil
15366 }
15367
15368
15369
15370
15371 func (page *JobResourceListPage) Next() error {
15372 return page.NextWithContext(context.Background())
15373 }
15374
15375
15376 func (page JobResourceListPage) NotDone() bool {
15377 return !page.jrl.IsEmpty()
15378 }
15379
15380
15381 func (page JobResourceListPage) Response() JobResourceList {
15382 return page.jrl
15383 }
15384
15385
15386 func (page JobResourceListPage) Values() []JobResource {
15387 if page.jrl.IsEmpty() {
15388 return nil
15389 }
15390 return *page.jrl.Value
15391 }
15392
15393
15394 func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage {
15395 return JobResourceListPage{
15396 fn: getNextPage,
15397 jrl: cur,
15398 }
15399 }
15400
15401
15402 type KEKDetails struct {
15403
15404 KeyURL *string `json:"keyUrl,omitempty"`
15405
15406 KeyVaultID *string `json:"keyVaultId,omitempty"`
15407
15408 KeyBackupData *string `json:"keyBackupData,omitempty"`
15409 }
15410
15411
15412
15413
15414
15415
15416
15417
15418 type KeyAndSecretDetails struct {
15419
15420 KekDetails *KEKDetails `json:"kekDetails,omitempty"`
15421
15422 BekDetails *BEKDetails `json:"bekDetails,omitempty"`
15423
15424 EncryptionMechanism *string `json:"encryptionMechanism,omitempty"`
15425 }
15426
15427
15428 type KPIResourceHealthDetails struct {
15429
15430 ResourceHealthStatus ResourceHealthStatus `json:"resourceHealthStatus,omitempty"`
15431
15432 ResourceHealthDetails *[]ResourceHealthDetails `json:"resourceHealthDetails,omitempty"`
15433 }
15434
15435
15436 type ListRecoveryPointsRecommendedForMoveRequest struct {
15437
15438 ObjectType *string `json:"objectType,omitempty"`
15439
15440 ExcludedRPList *[]string `json:"excludedRPList,omitempty"`
15441 }
15442
15443
15444 type LogSchedulePolicy struct {
15445
15446 ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"`
15447
15448 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
15449 }
15450
15451
15452 func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) {
15453 lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy
15454 objectMap := make(map[string]interface{})
15455 if lsp.ScheduleFrequencyInMins != nil {
15456 objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins
15457 }
15458 if lsp.SchedulePolicyType != "" {
15459 objectMap["schedulePolicyType"] = lsp.SchedulePolicyType
15460 }
15461 return json.Marshal(objectMap)
15462 }
15463
15464
15465 func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
15466 return &lsp, true
15467 }
15468
15469
15470 func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
15471 return nil, false
15472 }
15473
15474
15475 func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
15476 return nil, false
15477 }
15478
15479
15480 func (lsp LogSchedulePolicy) AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool) {
15481 return nil, false
15482 }
15483
15484
15485 func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
15486 return nil, false
15487 }
15488
15489
15490 func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
15491 return &lsp, true
15492 }
15493
15494
15495 type LongTermRetentionPolicy struct {
15496
15497 DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"`
15498
15499 WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"`
15500
15501 MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"`
15502
15503 YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"`
15504
15505 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
15506 }
15507
15508
15509 func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) {
15510 ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy
15511 objectMap := make(map[string]interface{})
15512 if ltrp.DailySchedule != nil {
15513 objectMap["dailySchedule"] = ltrp.DailySchedule
15514 }
15515 if ltrp.WeeklySchedule != nil {
15516 objectMap["weeklySchedule"] = ltrp.WeeklySchedule
15517 }
15518 if ltrp.MonthlySchedule != nil {
15519 objectMap["monthlySchedule"] = ltrp.MonthlySchedule
15520 }
15521 if ltrp.YearlySchedule != nil {
15522 objectMap["yearlySchedule"] = ltrp.YearlySchedule
15523 }
15524 if ltrp.RetentionPolicyType != "" {
15525 objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType
15526 }
15527 return json.Marshal(objectMap)
15528 }
15529
15530
15531 func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
15532 return <rp, true
15533 }
15534
15535
15536 func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
15537 return nil, false
15538 }
15539
15540
15541 func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
15542 return nil, false
15543 }
15544
15545
15546 func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
15547 return <rp, true
15548 }
15549
15550
15551 type LongTermSchedulePolicy struct {
15552
15553 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
15554 }
15555
15556
15557 func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) {
15558 ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy
15559 objectMap := make(map[string]interface{})
15560 if ltsp.SchedulePolicyType != "" {
15561 objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType
15562 }
15563 return json.Marshal(objectMap)
15564 }
15565
15566
15567 func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
15568 return nil, false
15569 }
15570
15571
15572 func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
15573 return <sp, true
15574 }
15575
15576
15577 func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
15578 return nil, false
15579 }
15580
15581
15582 func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool) {
15583 return nil, false
15584 }
15585
15586
15587 func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
15588 return nil, false
15589 }
15590
15591
15592 func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
15593 return <sp, true
15594 }
15595
15596
15597 type MabContainer struct {
15598
15599 CanReRegister *bool `json:"canReRegister,omitempty"`
15600
15601 ContainerID *int64 `json:"containerId,omitempty"`
15602
15603 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
15604
15605 AgentVersion *string `json:"agentVersion,omitempty"`
15606
15607 ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"`
15608
15609 MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"`
15610
15611 ContainerHealthState *string `json:"containerHealthState,omitempty"`
15612
15613 FriendlyName *string `json:"friendlyName,omitempty"`
15614
15615 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15616
15617 RegistrationStatus *string `json:"registrationStatus,omitempty"`
15618
15619 HealthStatus *string `json:"healthStatus,omitempty"`
15620
15621 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
15622
15623 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
15624 }
15625
15626
15627 func (mc MabContainer) MarshalJSON() ([]byte, error) {
15628 mc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeWindows
15629 objectMap := make(map[string]interface{})
15630 if mc.CanReRegister != nil {
15631 objectMap["canReRegister"] = mc.CanReRegister
15632 }
15633 if mc.ContainerID != nil {
15634 objectMap["containerId"] = mc.ContainerID
15635 }
15636 if mc.ProtectedItemCount != nil {
15637 objectMap["protectedItemCount"] = mc.ProtectedItemCount
15638 }
15639 if mc.AgentVersion != nil {
15640 objectMap["agentVersion"] = mc.AgentVersion
15641 }
15642 if mc.ExtendedInfo != nil {
15643 objectMap["extendedInfo"] = mc.ExtendedInfo
15644 }
15645 if mc.MabContainerHealthDetails != nil {
15646 objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails
15647 }
15648 if mc.ContainerHealthState != nil {
15649 objectMap["containerHealthState"] = mc.ContainerHealthState
15650 }
15651 if mc.FriendlyName != nil {
15652 objectMap["friendlyName"] = mc.FriendlyName
15653 }
15654 if mc.BackupManagementType != "" {
15655 objectMap["backupManagementType"] = mc.BackupManagementType
15656 }
15657 if mc.RegistrationStatus != nil {
15658 objectMap["registrationStatus"] = mc.RegistrationStatus
15659 }
15660 if mc.HealthStatus != nil {
15661 objectMap["healthStatus"] = mc.HealthStatus
15662 }
15663 if mc.ProtectableObjectType != nil {
15664 objectMap["protectableObjectType"] = mc.ProtectableObjectType
15665 }
15666 if mc.ContainerType != "" {
15667 objectMap["containerType"] = mc.ContainerType
15668 }
15669 return json.Marshal(objectMap)
15670 }
15671
15672
15673 func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
15674 return nil, false
15675 }
15676
15677
15678 func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
15679 return nil, false
15680 }
15681
15682
15683 func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
15684 return nil, false
15685 }
15686
15687
15688 func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
15689 return nil, false
15690 }
15691
15692
15693 func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
15694 return nil, false
15695 }
15696
15697
15698 func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
15699 return nil, false
15700 }
15701
15702
15703 func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
15704 return nil, false
15705 }
15706
15707
15708 func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
15709 return nil, false
15710 }
15711
15712
15713 func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
15714 return nil, false
15715 }
15716
15717
15718 func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) {
15719 return nil, false
15720 }
15721
15722
15723 func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
15724 return nil, false
15725 }
15726
15727
15728 func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) {
15729 return nil, false
15730 }
15731
15732
15733 func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
15734 return nil, false
15735 }
15736
15737
15738 func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
15739 return nil, false
15740 }
15741
15742
15743 func (mc MabContainer) AsMabContainer() (*MabContainer, bool) {
15744 return &mc, true
15745 }
15746
15747
15748 func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
15749 return nil, false
15750 }
15751
15752
15753 func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
15754 return &mc, true
15755 }
15756
15757
15758 type MabContainerExtendedInfo struct {
15759
15760 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
15761
15762 BackupItemType ItemType `json:"backupItemType,omitempty"`
15763
15764 BackupItems *[]string `json:"backupItems,omitempty"`
15765
15766 PolicyName *string `json:"policyName,omitempty"`
15767
15768 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
15769 }
15770
15771
15772 type MABContainerHealthDetails struct {
15773
15774 Code *int32 `json:"code,omitempty"`
15775
15776 Title *string `json:"title,omitempty"`
15777
15778 Message *string `json:"message,omitempty"`
15779
15780 Recommendations *[]string `json:"recommendations,omitempty"`
15781 }
15782
15783
15784 type MabErrorInfo struct {
15785
15786 ErrorString *string `json:"errorString,omitempty"`
15787
15788 Recommendations *[]string `json:"recommendations,omitempty"`
15789 }
15790
15791
15792 func (mei MabErrorInfo) MarshalJSON() ([]byte, error) {
15793 objectMap := make(map[string]interface{})
15794 return json.Marshal(objectMap)
15795 }
15796
15797
15798 type MabFileFolderProtectedItem struct {
15799
15800 FriendlyName *string `json:"friendlyName,omitempty"`
15801
15802 ComputerName *string `json:"computerName,omitempty"`
15803
15804 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
15805
15806 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
15807
15808 ProtectionState *string `json:"protectionState,omitempty"`
15809
15810 DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"`
15811
15812 ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
15813
15814 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15815
15816 WorkloadType DataSourceType `json:"workloadType,omitempty"`
15817
15818 ContainerName *string `json:"containerName,omitempty"`
15819
15820 SourceResourceID *string `json:"sourceResourceId,omitempty"`
15821
15822 PolicyID *string `json:"policyId,omitempty"`
15823
15824 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
15825
15826 BackupSetName *string `json:"backupSetName,omitempty"`
15827
15828 CreateMode CreateMode `json:"createMode,omitempty"`
15829
15830 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
15831
15832 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
15833
15834 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
15835
15836 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
15837
15838 IsRehydrate *bool `json:"isRehydrate,omitempty"`
15839
15840 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
15841
15842 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
15843
15844 PolicyName *string `json:"policyName,omitempty"`
15845
15846 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
15847 }
15848
15849
15850 func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) {
15851 mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem
15852 objectMap := make(map[string]interface{})
15853 if mffpi.FriendlyName != nil {
15854 objectMap["friendlyName"] = mffpi.FriendlyName
15855 }
15856 if mffpi.ComputerName != nil {
15857 objectMap["computerName"] = mffpi.ComputerName
15858 }
15859 if mffpi.LastBackupStatus != nil {
15860 objectMap["lastBackupStatus"] = mffpi.LastBackupStatus
15861 }
15862 if mffpi.LastBackupTime != nil {
15863 objectMap["lastBackupTime"] = mffpi.LastBackupTime
15864 }
15865 if mffpi.ProtectionState != nil {
15866 objectMap["protectionState"] = mffpi.ProtectionState
15867 }
15868 if mffpi.DeferredDeleteSyncTimeInUTC != nil {
15869 objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC
15870 }
15871 if mffpi.ExtendedInfo != nil {
15872 objectMap["extendedInfo"] = mffpi.ExtendedInfo
15873 }
15874 if mffpi.BackupManagementType != "" {
15875 objectMap["backupManagementType"] = mffpi.BackupManagementType
15876 }
15877 if mffpi.WorkloadType != "" {
15878 objectMap["workloadType"] = mffpi.WorkloadType
15879 }
15880 if mffpi.ContainerName != nil {
15881 objectMap["containerName"] = mffpi.ContainerName
15882 }
15883 if mffpi.SourceResourceID != nil {
15884 objectMap["sourceResourceId"] = mffpi.SourceResourceID
15885 }
15886 if mffpi.PolicyID != nil {
15887 objectMap["policyId"] = mffpi.PolicyID
15888 }
15889 if mffpi.LastRecoveryPoint != nil {
15890 objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint
15891 }
15892 if mffpi.BackupSetName != nil {
15893 objectMap["backupSetName"] = mffpi.BackupSetName
15894 }
15895 if mffpi.CreateMode != "" {
15896 objectMap["createMode"] = mffpi.CreateMode
15897 }
15898 if mffpi.DeferredDeleteTimeInUTC != nil {
15899 objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC
15900 }
15901 if mffpi.IsScheduledForDeferredDelete != nil {
15902 objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete
15903 }
15904 if mffpi.DeferredDeleteTimeRemaining != nil {
15905 objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining
15906 }
15907 if mffpi.IsDeferredDeleteScheduleUpcoming != nil {
15908 objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming
15909 }
15910 if mffpi.IsRehydrate != nil {
15911 objectMap["isRehydrate"] = mffpi.IsRehydrate
15912 }
15913 if mffpi.ResourceGuardOperationRequests != nil {
15914 objectMap["resourceGuardOperationRequests"] = mffpi.ResourceGuardOperationRequests
15915 }
15916 if mffpi.IsArchiveEnabled != nil {
15917 objectMap["isArchiveEnabled"] = mffpi.IsArchiveEnabled
15918 }
15919 if mffpi.PolicyName != nil {
15920 objectMap["policyName"] = mffpi.PolicyName
15921 }
15922 if mffpi.ProtectedItemType != "" {
15923 objectMap["protectedItemType"] = mffpi.ProtectedItemType
15924 }
15925 return json.Marshal(objectMap)
15926 }
15927
15928
15929 func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
15930 return nil, false
15931 }
15932
15933
15934 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
15935 return nil, false
15936 }
15937
15938
15939 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
15940 return nil, false
15941 }
15942
15943
15944 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
15945 return nil, false
15946 }
15947
15948
15949 func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
15950 return nil, false
15951 }
15952
15953
15954 func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
15955 return nil, false
15956 }
15957
15958
15959 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
15960 return nil, false
15961 }
15962
15963
15964 func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
15965 return nil, false
15966 }
15967
15968
15969 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
15970 return nil, false
15971 }
15972
15973
15974 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
15975 return nil, false
15976 }
15977
15978
15979 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
15980 return nil, false
15981 }
15982
15983
15984 func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
15985 return nil, false
15986 }
15987
15988
15989 func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
15990 return nil, false
15991 }
15992
15993
15994 func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
15995 return &mffpi, true
15996 }
15997
15998
15999 func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
16000 return nil, false
16001 }
16002
16003
16004 func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
16005 return &mffpi, true
16006 }
16007
16008
16009 type MabFileFolderProtectedItemExtendedInfo struct {
16010
16011 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
16012
16013 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
16014
16015 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
16016 }
16017
16018
16019 type MabJob struct {
16020
16021 Duration *string `json:"duration,omitempty"`
16022
16023 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
16024
16025 MabServerName *string `json:"mabServerName,omitempty"`
16026
16027 MabServerType MabServerType `json:"mabServerType,omitempty"`
16028
16029 WorkloadType WorkloadType `json:"workloadType,omitempty"`
16030
16031 ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"`
16032
16033 ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"`
16034
16035 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
16036
16037 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
16038
16039 Operation *string `json:"operation,omitempty"`
16040
16041 Status *string `json:"status,omitempty"`
16042
16043 StartTime *date.Time `json:"startTime,omitempty"`
16044
16045 EndTime *date.Time `json:"endTime,omitempty"`
16046
16047 ActivityID *string `json:"activityId,omitempty"`
16048
16049 JobType JobType `json:"jobType,omitempty"`
16050 }
16051
16052
16053 func (mj MabJob) MarshalJSON() ([]byte, error) {
16054 mj.JobType = JobTypeMabJob
16055 objectMap := make(map[string]interface{})
16056 if mj.Duration != nil {
16057 objectMap["duration"] = mj.Duration
16058 }
16059 if mj.ActionsInfo != nil {
16060 objectMap["actionsInfo"] = mj.ActionsInfo
16061 }
16062 if mj.MabServerName != nil {
16063 objectMap["mabServerName"] = mj.MabServerName
16064 }
16065 if mj.MabServerType != "" {
16066 objectMap["mabServerType"] = mj.MabServerType
16067 }
16068 if mj.WorkloadType != "" {
16069 objectMap["workloadType"] = mj.WorkloadType
16070 }
16071 if mj.ErrorDetails != nil {
16072 objectMap["errorDetails"] = mj.ErrorDetails
16073 }
16074 if mj.ExtendedInfo != nil {
16075 objectMap["extendedInfo"] = mj.ExtendedInfo
16076 }
16077 if mj.EntityFriendlyName != nil {
16078 objectMap["entityFriendlyName"] = mj.EntityFriendlyName
16079 }
16080 if mj.BackupManagementType != "" {
16081 objectMap["backupManagementType"] = mj.BackupManagementType
16082 }
16083 if mj.Operation != nil {
16084 objectMap["operation"] = mj.Operation
16085 }
16086 if mj.Status != nil {
16087 objectMap["status"] = mj.Status
16088 }
16089 if mj.StartTime != nil {
16090 objectMap["startTime"] = mj.StartTime
16091 }
16092 if mj.EndTime != nil {
16093 objectMap["endTime"] = mj.EndTime
16094 }
16095 if mj.ActivityID != nil {
16096 objectMap["activityId"] = mj.ActivityID
16097 }
16098 if mj.JobType != "" {
16099 objectMap["jobType"] = mj.JobType
16100 }
16101 return json.Marshal(objectMap)
16102 }
16103
16104
16105 func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
16106 return nil, false
16107 }
16108
16109
16110 func (mj MabJob) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
16111 return nil, false
16112 }
16113
16114
16115 func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
16116 return nil, false
16117 }
16118
16119
16120 func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
16121 return nil, false
16122 }
16123
16124
16125 func (mj MabJob) AsDpmJob() (*DpmJob, bool) {
16126 return nil, false
16127 }
16128
16129
16130 func (mj MabJob) AsMabJob() (*MabJob, bool) {
16131 return &mj, true
16132 }
16133
16134
16135 func (mj MabJob) AsVaultJob() (*VaultJob, bool) {
16136 return nil, false
16137 }
16138
16139
16140 func (mj MabJob) AsJob() (*Job, bool) {
16141 return nil, false
16142 }
16143
16144
16145 func (mj MabJob) AsBasicJob() (BasicJob, bool) {
16146 return &mj, true
16147 }
16148
16149
16150 type MabJobExtendedInfo struct {
16151
16152 TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"`
16153
16154 PropertyBag map[string]*string `json:"propertyBag"`
16155
16156 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
16157 }
16158
16159
16160 func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) {
16161 objectMap := make(map[string]interface{})
16162 if mjei.TasksList != nil {
16163 objectMap["tasksList"] = mjei.TasksList
16164 }
16165 if mjei.PropertyBag != nil {
16166 objectMap["propertyBag"] = mjei.PropertyBag
16167 }
16168 if mjei.DynamicErrorMessage != nil {
16169 objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage
16170 }
16171 return json.Marshal(objectMap)
16172 }
16173
16174
16175 type MabJobTaskDetails struct {
16176
16177 TaskID *string `json:"taskId,omitempty"`
16178
16179 StartTime *date.Time `json:"startTime,omitempty"`
16180
16181 EndTime *date.Time `json:"endTime,omitempty"`
16182
16183 Duration *string `json:"duration,omitempty"`
16184
16185 Status *string `json:"status,omitempty"`
16186 }
16187
16188
16189 type MabProtectionPolicy struct {
16190
16191 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
16192
16193 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
16194
16195 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
16196
16197 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
16198
16199 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
16200 }
16201
16202
16203 func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) {
16204 mpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB
16205 objectMap := make(map[string]interface{})
16206 objectMap["schedulePolicy"] = mpp.SchedulePolicy
16207 objectMap["retentionPolicy"] = mpp.RetentionPolicy
16208 if mpp.ProtectedItemsCount != nil {
16209 objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount
16210 }
16211 if mpp.ResourceGuardOperationRequests != nil {
16212 objectMap["resourceGuardOperationRequests"] = mpp.ResourceGuardOperationRequests
16213 }
16214 if mpp.BackupManagementType != "" {
16215 objectMap["backupManagementType"] = mpp.BackupManagementType
16216 }
16217 return json.Marshal(objectMap)
16218 }
16219
16220
16221 func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
16222 return nil, false
16223 }
16224
16225
16226 func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
16227 return nil, false
16228 }
16229
16230
16231 func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
16232 return nil, false
16233 }
16234
16235
16236 func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
16237 return nil, false
16238 }
16239
16240
16241 func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
16242 return nil, false
16243 }
16244
16245
16246 func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
16247 return &mpp, true
16248 }
16249
16250
16251 func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
16252 return nil, false
16253 }
16254
16255
16256 func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
16257 return &mpp, true
16258 }
16259
16260
16261 func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error {
16262 var m map[string]*json.RawMessage
16263 err := json.Unmarshal(body, &m)
16264 if err != nil {
16265 return err
16266 }
16267 for k, v := range m {
16268 switch k {
16269 case "schedulePolicy":
16270 if v != nil {
16271 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
16272 if err != nil {
16273 return err
16274 }
16275 mpp.SchedulePolicy = schedulePolicy
16276 }
16277 case "retentionPolicy":
16278 if v != nil {
16279 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
16280 if err != nil {
16281 return err
16282 }
16283 mpp.RetentionPolicy = retentionPolicy
16284 }
16285 case "protectedItemsCount":
16286 if v != nil {
16287 var protectedItemsCount int32
16288 err = json.Unmarshal(*v, &protectedItemsCount)
16289 if err != nil {
16290 return err
16291 }
16292 mpp.ProtectedItemsCount = &protectedItemsCount
16293 }
16294 case "resourceGuardOperationRequests":
16295 if v != nil {
16296 var resourceGuardOperationRequests []string
16297 err = json.Unmarshal(*v, &resourceGuardOperationRequests)
16298 if err != nil {
16299 return err
16300 }
16301 mpp.ResourceGuardOperationRequests = &resourceGuardOperationRequests
16302 }
16303 case "backupManagementType":
16304 if v != nil {
16305 var backupManagementType ManagementTypeBasicProtectionPolicy
16306 err = json.Unmarshal(*v, &backupManagementType)
16307 if err != nil {
16308 return err
16309 }
16310 mpp.BackupManagementType = backupManagementType
16311 }
16312 }
16313 }
16314
16315 return nil
16316 }
16317
16318
16319 type ManagementUsage struct {
16320
16321 Unit UsagesUnit `json:"unit,omitempty"`
16322
16323 QuotaPeriod *string `json:"quotaPeriod,omitempty"`
16324
16325 NextResetTime *date.Time `json:"nextResetTime,omitempty"`
16326
16327 CurrentValue *int64 `json:"currentValue,omitempty"`
16328
16329 Limit *int64 `json:"limit,omitempty"`
16330
16331 Name *NameInfo `json:"name,omitempty"`
16332 }
16333
16334
16335 type ManagementUsageList struct {
16336 autorest.Response `json:"-"`
16337
16338 Value *[]ManagementUsage `json:"value,omitempty"`
16339 }
16340
16341
16342 type MonthlyRetentionSchedule struct {
16343
16344 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
16345
16346 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
16347
16348 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
16349
16350 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
16351
16352 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
16353 }
16354
16355
16356
16357 type MoveRecoveryPointFuture struct {
16358 azure.FutureAPI
16359
16360
16361 Result func(BaseClient) (autorest.Response, error)
16362 }
16363
16364
16365 func (future *MoveRecoveryPointFuture) UnmarshalJSON(body []byte) error {
16366 var azFuture azure.Future
16367 if err := json.Unmarshal(body, &azFuture); err != nil {
16368 return err
16369 }
16370 future.FutureAPI = &azFuture
16371 future.Result = future.result
16372 return nil
16373 }
16374
16375
16376 func (future *MoveRecoveryPointFuture) result(client BaseClient) (ar autorest.Response, err error) {
16377 var done bool
16378 done, err = future.DoneWithContext(context.Background(), client)
16379 if err != nil {
16380 err = autorest.NewErrorWithError(err, "backup.MoveRecoveryPointFuture", "Result", future.Response(), "Polling failure")
16381 return
16382 }
16383 if !done {
16384 ar.Response = future.Response()
16385 err = azure.NewAsyncOpIncompleteError("backup.MoveRecoveryPointFuture")
16386 return
16387 }
16388 ar.Response = future.Response()
16389 return
16390 }
16391
16392
16393 type MoveRPAcrossTiersRequest struct {
16394
16395 ObjectType *string `json:"objectType,omitempty"`
16396
16397 SourceTierType RecoveryPointTierType `json:"sourceTierType,omitempty"`
16398
16399 TargetTierType RecoveryPointTierType `json:"targetTierType,omitempty"`
16400 }
16401
16402
16403 type NameInfo struct {
16404
16405 Value *string `json:"value,omitempty"`
16406
16407 LocalizedValue *string `json:"localizedValue,omitempty"`
16408 }
16409
16410
16411 type NewErrorResponse struct {
16412
16413 Error *NewErrorResponseError `json:"error,omitempty"`
16414 }
16415
16416
16417 type NewErrorResponseError struct {
16418
16419 Code *string `json:"code,omitempty"`
16420
16421 Message *string `json:"message,omitempty"`
16422
16423 Target *string `json:"target,omitempty"`
16424
16425 Details *[]NewErrorResponse `json:"details,omitempty"`
16426
16427 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
16428 }
16429
16430
16431 func (ner NewErrorResponseError) MarshalJSON() ([]byte, error) {
16432 objectMap := make(map[string]interface{})
16433 return json.Marshal(objectMap)
16434 }
16435
16436
16437 type OperationResultInfo struct {
16438
16439 JobList *[]string `json:"jobList,omitempty"`
16440
16441 ObjectType ObjectType `json:"objectType,omitempty"`
16442 }
16443
16444
16445 func (ori OperationResultInfo) MarshalJSON() ([]byte, error) {
16446 ori.ObjectType = ObjectTypeOperationResultInfo
16447 objectMap := make(map[string]interface{})
16448 if ori.JobList != nil {
16449 objectMap["jobList"] = ori.JobList
16450 }
16451 if ori.ObjectType != "" {
16452 objectMap["objectType"] = ori.ObjectType
16453 }
16454 return json.Marshal(objectMap)
16455 }
16456
16457
16458 func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
16459 return nil, false
16460 }
16461
16462
16463 func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
16464 return &ori, true
16465 }
16466
16467
16468 func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
16469 return nil, false
16470 }
16471
16472
16473 func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
16474 return &ori, true
16475 }
16476
16477
16478 type BasicOperationResultInfoBase interface {
16479 AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool)
16480 AsOperationResultInfo() (*OperationResultInfo, bool)
16481 AsOperationResultInfoBase() (*OperationResultInfoBase, bool)
16482 }
16483
16484
16485 type OperationResultInfoBase struct {
16486
16487 ObjectType ObjectType `json:"objectType,omitempty"`
16488 }
16489
16490 func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) {
16491 var m map[string]interface{}
16492 err := json.Unmarshal(body, &m)
16493 if err != nil {
16494 return nil, err
16495 }
16496
16497 switch m["objectType"] {
16498 case string(ObjectTypeExportJobsOperationResultInfo):
16499 var ejori ExportJobsOperationResultInfo
16500 err := json.Unmarshal(body, &ejori)
16501 return ejori, err
16502 case string(ObjectTypeOperationResultInfo):
16503 var ori OperationResultInfo
16504 err := json.Unmarshal(body, &ori)
16505 return ori, err
16506 default:
16507 var orib OperationResultInfoBase
16508 err := json.Unmarshal(body, &orib)
16509 return orib, err
16510 }
16511 }
16512 func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) {
16513 var rawMessages []*json.RawMessage
16514 err := json.Unmarshal(body, &rawMessages)
16515 if err != nil {
16516 return nil, err
16517 }
16518
16519 oribArray := make([]BasicOperationResultInfoBase, len(rawMessages))
16520
16521 for index, rawMessage := range rawMessages {
16522 orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage)
16523 if err != nil {
16524 return nil, err
16525 }
16526 oribArray[index] = orib
16527 }
16528 return oribArray, nil
16529 }
16530
16531
16532 func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) {
16533 orib.ObjectType = ObjectTypeOperationResultInfoBase
16534 objectMap := make(map[string]interface{})
16535 if orib.ObjectType != "" {
16536 objectMap["objectType"] = orib.ObjectType
16537 }
16538 return json.Marshal(objectMap)
16539 }
16540
16541
16542 func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
16543 return nil, false
16544 }
16545
16546
16547 func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) {
16548 return nil, false
16549 }
16550
16551
16552 func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
16553 return &orib, true
16554 }
16555
16556
16557 func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
16558 return &orib, true
16559 }
16560
16561
16562 type OperationResultInfoBaseResource struct {
16563 autorest.Response `json:"-"`
16564
16565 Operation BasicOperationResultInfoBase `json:"operation,omitempty"`
16566
16567 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
16568
16569 Headers map[string][]string `json:"headers"`
16570 }
16571
16572
16573 func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) {
16574 objectMap := make(map[string]interface{})
16575 objectMap["operation"] = oribr.Operation
16576 if oribr.StatusCode != "" {
16577 objectMap["statusCode"] = oribr.StatusCode
16578 }
16579 if oribr.Headers != nil {
16580 objectMap["headers"] = oribr.Headers
16581 }
16582 return json.Marshal(objectMap)
16583 }
16584
16585
16586 func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error {
16587 var m map[string]*json.RawMessage
16588 err := json.Unmarshal(body, &m)
16589 if err != nil {
16590 return err
16591 }
16592 for k, v := range m {
16593 switch k {
16594 case "operation":
16595 if v != nil {
16596 operation, err := unmarshalBasicOperationResultInfoBase(*v)
16597 if err != nil {
16598 return err
16599 }
16600 oribr.Operation = operation
16601 }
16602 case "statusCode":
16603 if v != nil {
16604 var statusCode HTTPStatusCode
16605 err = json.Unmarshal(*v, &statusCode)
16606 if err != nil {
16607 return err
16608 }
16609 oribr.StatusCode = statusCode
16610 }
16611 case "headers":
16612 if v != nil {
16613 var headers map[string][]string
16614 err = json.Unmarshal(*v, &headers)
16615 if err != nil {
16616 return err
16617 }
16618 oribr.Headers = headers
16619 }
16620 }
16621 }
16622
16623 return nil
16624 }
16625
16626
16627 type OperationStatus struct {
16628 autorest.Response `json:"-"`
16629
16630 ID *string `json:"id,omitempty"`
16631
16632 Name *string `json:"name,omitempty"`
16633
16634 Status OperationStatusValues `json:"status,omitempty"`
16635
16636 StartTime *date.Time `json:"startTime,omitempty"`
16637
16638 EndTime *date.Time `json:"endTime,omitempty"`
16639
16640 Error *OperationStatusError `json:"error,omitempty"`
16641
16642 Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"`
16643 }
16644
16645
16646 func (osVar *OperationStatus) UnmarshalJSON(body []byte) error {
16647 var m map[string]*json.RawMessage
16648 err := json.Unmarshal(body, &m)
16649 if err != nil {
16650 return err
16651 }
16652 for k, v := range m {
16653 switch k {
16654 case "id":
16655 if v != nil {
16656 var ID string
16657 err = json.Unmarshal(*v, &ID)
16658 if err != nil {
16659 return err
16660 }
16661 osVar.ID = &ID
16662 }
16663 case "name":
16664 if v != nil {
16665 var name string
16666 err = json.Unmarshal(*v, &name)
16667 if err != nil {
16668 return err
16669 }
16670 osVar.Name = &name
16671 }
16672 case "status":
16673 if v != nil {
16674 var status OperationStatusValues
16675 err = json.Unmarshal(*v, &status)
16676 if err != nil {
16677 return err
16678 }
16679 osVar.Status = status
16680 }
16681 case "startTime":
16682 if v != nil {
16683 var startTime date.Time
16684 err = json.Unmarshal(*v, &startTime)
16685 if err != nil {
16686 return err
16687 }
16688 osVar.StartTime = &startTime
16689 }
16690 case "endTime":
16691 if v != nil {
16692 var endTime date.Time
16693 err = json.Unmarshal(*v, &endTime)
16694 if err != nil {
16695 return err
16696 }
16697 osVar.EndTime = &endTime
16698 }
16699 case "error":
16700 if v != nil {
16701 var errorVar OperationStatusError
16702 err = json.Unmarshal(*v, &errorVar)
16703 if err != nil {
16704 return err
16705 }
16706 osVar.Error = &errorVar
16707 }
16708 case "properties":
16709 if v != nil {
16710 properties, err := unmarshalBasicOperationStatusExtendedInfo(*v)
16711 if err != nil {
16712 return err
16713 }
16714 osVar.Properties = properties
16715 }
16716 }
16717 }
16718
16719 return nil
16720 }
16721
16722
16723 type OperationStatusError struct {
16724
16725 Code *string `json:"code,omitempty"`
16726
16727 Message *string `json:"message,omitempty"`
16728 }
16729
16730
16731 type BasicOperationStatusExtendedInfo interface {
16732 AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool)
16733 AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool)
16734 AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool)
16735 AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool)
16736 AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool)
16737 }
16738
16739
16740 type OperationStatusExtendedInfo struct {
16741
16742 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16743 }
16744
16745 func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) {
16746 var m map[string]interface{}
16747 err := json.Unmarshal(body, &m)
16748 if err != nil {
16749 return nil, err
16750 }
16751
16752 switch m["objectType"] {
16753 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo):
16754 var osjei OperationStatusJobExtendedInfo
16755 err := json.Unmarshal(body, &osjei)
16756 return osjei, err
16757 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo):
16758 var osjei OperationStatusJobsExtendedInfo
16759 err := json.Unmarshal(body, &osjei)
16760 return osjei, err
16761 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo):
16762 var ospiei OperationStatusProvisionILRExtendedInfo
16763 err := json.Unmarshal(body, &ospiei)
16764 return ospiei, err
16765 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusValidateOperationExtendedInfo):
16766 var osvoei OperationStatusValidateOperationExtendedInfo
16767 err := json.Unmarshal(body, &osvoei)
16768 return osvoei, err
16769 default:
16770 var osei OperationStatusExtendedInfo
16771 err := json.Unmarshal(body, &osei)
16772 return osei, err
16773 }
16774 }
16775 func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) {
16776 var rawMessages []*json.RawMessage
16777 err := json.Unmarshal(body, &rawMessages)
16778 if err != nil {
16779 return nil, err
16780 }
16781
16782 oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages))
16783
16784 for index, rawMessage := range rawMessages {
16785 osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage)
16786 if err != nil {
16787 return nil, err
16788 }
16789 oseiArray[index] = osei
16790 }
16791 return oseiArray, nil
16792 }
16793
16794
16795 func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) {
16796 osei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusExtendedInfo
16797 objectMap := make(map[string]interface{})
16798 if osei.ObjectType != "" {
16799 objectMap["objectType"] = osei.ObjectType
16800 }
16801 return json.Marshal(objectMap)
16802 }
16803
16804
16805 func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16806 return nil, false
16807 }
16808
16809
16810 func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16811 return nil, false
16812 }
16813
16814
16815 func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16816 return nil, false
16817 }
16818
16819
16820 func (osei OperationStatusExtendedInfo) AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool) {
16821 return nil, false
16822 }
16823
16824
16825 func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16826 return &osei, true
16827 }
16828
16829
16830 func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16831 return &osei, true
16832 }
16833
16834
16835 type OperationStatusJobExtendedInfo struct {
16836
16837 JobID *string `json:"jobId,omitempty"`
16838
16839 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16840 }
16841
16842
16843 func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) {
16844 osjei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo
16845 objectMap := make(map[string]interface{})
16846 if osjei.JobID != nil {
16847 objectMap["jobId"] = osjei.JobID
16848 }
16849 if osjei.ObjectType != "" {
16850 objectMap["objectType"] = osjei.ObjectType
16851 }
16852 return json.Marshal(objectMap)
16853 }
16854
16855
16856 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16857 return &osjei, true
16858 }
16859
16860
16861 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16862 return nil, false
16863 }
16864
16865
16866 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16867 return nil, false
16868 }
16869
16870
16871 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool) {
16872 return nil, false
16873 }
16874
16875
16876 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16877 return nil, false
16878 }
16879
16880
16881 func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16882 return &osjei, true
16883 }
16884
16885
16886 type OperationStatusJobsExtendedInfo struct {
16887
16888 JobIds *[]string `json:"jobIds,omitempty"`
16889
16890 FailedJobsError map[string]*string `json:"failedJobsError"`
16891
16892 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16893 }
16894
16895
16896 func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) {
16897 osjei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo
16898 objectMap := make(map[string]interface{})
16899 if osjei.JobIds != nil {
16900 objectMap["jobIds"] = osjei.JobIds
16901 }
16902 if osjei.FailedJobsError != nil {
16903 objectMap["failedJobsError"] = osjei.FailedJobsError
16904 }
16905 if osjei.ObjectType != "" {
16906 objectMap["objectType"] = osjei.ObjectType
16907 }
16908 return json.Marshal(objectMap)
16909 }
16910
16911
16912 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16913 return nil, false
16914 }
16915
16916
16917 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16918 return &osjei, true
16919 }
16920
16921
16922 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16923 return nil, false
16924 }
16925
16926
16927 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool) {
16928 return nil, false
16929 }
16930
16931
16932 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16933 return nil, false
16934 }
16935
16936
16937 func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16938 return &osjei, true
16939 }
16940
16941
16942 type OperationStatusProvisionILRExtendedInfo struct {
16943
16944 RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"`
16945
16946 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16947 }
16948
16949
16950 func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) {
16951 ospiei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo
16952 objectMap := make(map[string]interface{})
16953 if ospiei.RecoveryTarget != nil {
16954 objectMap["recoveryTarget"] = ospiei.RecoveryTarget
16955 }
16956 if ospiei.ObjectType != "" {
16957 objectMap["objectType"] = ospiei.ObjectType
16958 }
16959 return json.Marshal(objectMap)
16960 }
16961
16962
16963 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16964 return nil, false
16965 }
16966
16967
16968 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16969 return nil, false
16970 }
16971
16972
16973 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16974 return &ospiei, true
16975 }
16976
16977
16978 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool) {
16979 return nil, false
16980 }
16981
16982
16983 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16984 return nil, false
16985 }
16986
16987
16988 func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16989 return &ospiei, true
16990 }
16991
16992
16993
16994 type OperationStatusValidateOperationExtendedInfo struct {
16995
16996 ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"`
16997
16998 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16999 }
17000
17001
17002 func (osvoei OperationStatusValidateOperationExtendedInfo) MarshalJSON() ([]byte, error) {
17003 osvoei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusValidateOperationExtendedInfo
17004 objectMap := make(map[string]interface{})
17005 if osvoei.ValidateOperationResponse != nil {
17006 objectMap["validateOperationResponse"] = osvoei.ValidateOperationResponse
17007 }
17008 if osvoei.ObjectType != "" {
17009 objectMap["objectType"] = osvoei.ObjectType
17010 }
17011 return json.Marshal(objectMap)
17012 }
17013
17014
17015 func (osvoei OperationStatusValidateOperationExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
17016 return nil, false
17017 }
17018
17019
17020 func (osvoei OperationStatusValidateOperationExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
17021 return nil, false
17022 }
17023
17024
17025 func (osvoei OperationStatusValidateOperationExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
17026 return nil, false
17027 }
17028
17029
17030 func (osvoei OperationStatusValidateOperationExtendedInfo) AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool) {
17031 return &osvoei, true
17032 }
17033
17034
17035 func (osvoei OperationStatusValidateOperationExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
17036 return nil, false
17037 }
17038
17039
17040 func (osvoei OperationStatusValidateOperationExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
17041 return &osvoei, true
17042 }
17043
17044
17045 type OperationWorkerResponse struct {
17046
17047 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
17048
17049 Headers map[string][]string `json:"headers"`
17050 }
17051
17052
17053 func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) {
17054 objectMap := make(map[string]interface{})
17055 if owr.StatusCode != "" {
17056 objectMap["statusCode"] = owr.StatusCode
17057 }
17058 if owr.Headers != nil {
17059 objectMap["headers"] = owr.Headers
17060 }
17061 return json.Marshal(objectMap)
17062 }
17063
17064
17065 type PointInTimeRange struct {
17066
17067 StartTime *date.Time `json:"startTime,omitempty"`
17068
17069 EndTime *date.Time `json:"endTime,omitempty"`
17070 }
17071
17072
17073 type PreBackupValidation struct {
17074
17075 Status InquiryStatus `json:"status,omitempty"`
17076
17077 Code *string `json:"code,omitempty"`
17078
17079 Message *string `json:"message,omitempty"`
17080 }
17081
17082
17083 type PrepareDataMoveRequest struct {
17084
17085 TargetResourceID *string `json:"targetResourceId,omitempty"`
17086
17087 TargetRegion *string `json:"targetRegion,omitempty"`
17088
17089 DataMoveLevel DataMoveLevel `json:"dataMoveLevel,omitempty"`
17090
17091
17092 SourceContainerArmIds *[]string `json:"sourceContainerArmIds,omitempty"`
17093
17094 IgnoreMoved *bool `json:"ignoreMoved,omitempty"`
17095 }
17096
17097
17098 type PrepareDataMoveResponse struct {
17099
17100 CorrelationID *string `json:"correlationId,omitempty"`
17101
17102 SourceVaultProperties map[string]*string `json:"sourceVaultProperties"`
17103
17104 ObjectType ObjectTypeBasicVaultStorageConfigOperationResultResponse `json:"objectType,omitempty"`
17105 }
17106
17107
17108 func (pdmr PrepareDataMoveResponse) MarshalJSON() ([]byte, error) {
17109 pdmr.ObjectType = ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse
17110 objectMap := make(map[string]interface{})
17111 if pdmr.CorrelationID != nil {
17112 objectMap["correlationId"] = pdmr.CorrelationID
17113 }
17114 if pdmr.SourceVaultProperties != nil {
17115 objectMap["sourceVaultProperties"] = pdmr.SourceVaultProperties
17116 }
17117 if pdmr.ObjectType != "" {
17118 objectMap["objectType"] = pdmr.ObjectType
17119 }
17120 return json.Marshal(objectMap)
17121 }
17122
17123
17124 func (pdmr PrepareDataMoveResponse) AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool) {
17125 return &pdmr, true
17126 }
17127
17128
17129 func (pdmr PrepareDataMoveResponse) AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool) {
17130 return nil, false
17131 }
17132
17133
17134 func (pdmr PrepareDataMoveResponse) AsBasicVaultStorageConfigOperationResultResponse() (BasicVaultStorageConfigOperationResultResponse, bool) {
17135 return &pdmr, true
17136 }
17137
17138
17139
17140
17141
17142
17143
17144 type PreValidateEnableBackupRequest struct {
17145
17146 ResourceType DataSourceType `json:"resourceType,omitempty"`
17147
17148 ResourceID *string `json:"resourceId,omitempty"`
17149
17150 VaultID *string `json:"vaultId,omitempty"`
17151
17152 Properties *string `json:"properties,omitempty"`
17153 }
17154
17155
17156 type PreValidateEnableBackupResponse struct {
17157 autorest.Response `json:"-"`
17158
17159 Status ValidationStatus `json:"status,omitempty"`
17160
17161 ErrorCode *string `json:"errorCode,omitempty"`
17162
17163 ErrorMessage *string `json:"errorMessage,omitempty"`
17164
17165 Recommendation *string `json:"recommendation,omitempty"`
17166
17167
17168 ContainerName *string `json:"containerName,omitempty"`
17169
17170 ProtectedItemName *string `json:"protectedItemName,omitempty"`
17171 }
17172
17173
17174 type PrivateEndpoint struct {
17175
17176 ID *string `json:"id,omitempty"`
17177 }
17178
17179
17180 type PrivateEndpointConnection struct {
17181
17182 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17183
17184 PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
17185
17186 PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
17187 }
17188
17189
17190
17191 type PrivateEndpointConnectionDeleteFuture struct {
17192 azure.FutureAPI
17193
17194
17195 Result func(PrivateEndpointConnectionClient) (autorest.Response, error)
17196 }
17197
17198
17199 func (future *PrivateEndpointConnectionDeleteFuture) UnmarshalJSON(body []byte) error {
17200 var azFuture azure.Future
17201 if err := json.Unmarshal(body, &azFuture); err != nil {
17202 return err
17203 }
17204 future.FutureAPI = &azFuture
17205 future.Result = future.result
17206 return nil
17207 }
17208
17209
17210 func (future *PrivateEndpointConnectionDeleteFuture) result(client PrivateEndpointConnectionClient) (ar autorest.Response, err error) {
17211 var done bool
17212 done, err = future.DoneWithContext(context.Background(), client)
17213 if err != nil {
17214 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionDeleteFuture", "Result", future.Response(), "Polling failure")
17215 return
17216 }
17217 if !done {
17218 ar.Response = future.Response()
17219 err = azure.NewAsyncOpIncompleteError("backup.PrivateEndpointConnectionDeleteFuture")
17220 return
17221 }
17222 ar.Response = future.Response()
17223 return
17224 }
17225
17226
17227
17228 type PrivateEndpointConnectionPutFuture struct {
17229 azure.FutureAPI
17230
17231
17232 Result func(PrivateEndpointConnectionClient) (PrivateEndpointConnectionResource, error)
17233 }
17234
17235
17236 func (future *PrivateEndpointConnectionPutFuture) UnmarshalJSON(body []byte) error {
17237 var azFuture azure.Future
17238 if err := json.Unmarshal(body, &azFuture); err != nil {
17239 return err
17240 }
17241 future.FutureAPI = &azFuture
17242 future.Result = future.result
17243 return nil
17244 }
17245
17246
17247 func (future *PrivateEndpointConnectionPutFuture) result(client PrivateEndpointConnectionClient) (pecr PrivateEndpointConnectionResource, err error) {
17248 var done bool
17249 done, err = future.DoneWithContext(context.Background(), client)
17250 if err != nil {
17251 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionPutFuture", "Result", future.Response(), "Polling failure")
17252 return
17253 }
17254 if !done {
17255 pecr.Response.Response = future.Response()
17256 err = azure.NewAsyncOpIncompleteError("backup.PrivateEndpointConnectionPutFuture")
17257 return
17258 }
17259 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17260 if pecr.Response.Response, err = future.GetResult(sender); err == nil && pecr.Response.Response.StatusCode != http.StatusNoContent {
17261 pecr, err = client.PutResponder(pecr.Response.Response)
17262 if err != nil {
17263 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionPutFuture", "Result", pecr.Response.Response, "Failure responding to request")
17264 }
17265 }
17266 return
17267 }
17268
17269
17270 type PrivateEndpointConnectionResource struct {
17271 autorest.Response `json:"-"`
17272
17273 Properties *PrivateEndpointConnection `json:"properties,omitempty"`
17274
17275 ID *string `json:"id,omitempty"`
17276
17277 Name *string `json:"name,omitempty"`
17278
17279 Type *string `json:"type,omitempty"`
17280
17281 Location *string `json:"location,omitempty"`
17282
17283 Tags map[string]*string `json:"tags"`
17284
17285 ETag *string `json:"eTag,omitempty"`
17286 }
17287
17288
17289 func (pecr PrivateEndpointConnectionResource) MarshalJSON() ([]byte, error) {
17290 objectMap := make(map[string]interface{})
17291 if pecr.Properties != nil {
17292 objectMap["properties"] = pecr.Properties
17293 }
17294 if pecr.Location != nil {
17295 objectMap["location"] = pecr.Location
17296 }
17297 if pecr.Tags != nil {
17298 objectMap["tags"] = pecr.Tags
17299 }
17300 if pecr.ETag != nil {
17301 objectMap["eTag"] = pecr.ETag
17302 }
17303 return json.Marshal(objectMap)
17304 }
17305
17306
17307 type PrivateLinkServiceConnectionState struct {
17308
17309 Status PrivateEndpointConnectionStatus `json:"status,omitempty"`
17310
17311 Description *string `json:"description,omitempty"`
17312
17313 ActionRequired *string `json:"actionRequired,omitempty"`
17314 }
17315
17316
17317 type BasicProtectableContainer interface {
17318 AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool)
17319 AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool)
17320 AsProtectableContainer() (*ProtectableContainer, bool)
17321 }
17322
17323
17324 type ProtectableContainer struct {
17325
17326 FriendlyName *string `json:"friendlyName,omitempty"`
17327
17328 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17329
17330 HealthStatus *string `json:"healthStatus,omitempty"`
17331
17332 ContainerID *string `json:"containerId,omitempty"`
17333
17334 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
17335 }
17336
17337 func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) {
17338 var m map[string]interface{}
17339 err := json.Unmarshal(body, &m)
17340 if err != nil {
17341 return nil, err
17342 }
17343
17344 switch m["protectableContainerType"] {
17345 case string(ProtectableContainerTypeStorageContainer):
17346 var aspc AzureStorageProtectableContainer
17347 err := json.Unmarshal(body, &aspc)
17348 return aspc, err
17349 case string(ProtectableContainerTypeVMAppContainer):
17350 var avacpc AzureVMAppContainerProtectableContainer
17351 err := json.Unmarshal(body, &avacpc)
17352 return avacpc, err
17353 default:
17354 var pc ProtectableContainer
17355 err := json.Unmarshal(body, &pc)
17356 return pc, err
17357 }
17358 }
17359 func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) {
17360 var rawMessages []*json.RawMessage
17361 err := json.Unmarshal(body, &rawMessages)
17362 if err != nil {
17363 return nil, err
17364 }
17365
17366 pcArray := make([]BasicProtectableContainer, len(rawMessages))
17367
17368 for index, rawMessage := range rawMessages {
17369 pc, err := unmarshalBasicProtectableContainer(*rawMessage)
17370 if err != nil {
17371 return nil, err
17372 }
17373 pcArray[index] = pc
17374 }
17375 return pcArray, nil
17376 }
17377
17378
17379 func (pc ProtectableContainer) MarshalJSON() ([]byte, error) {
17380 pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer
17381 objectMap := make(map[string]interface{})
17382 if pc.FriendlyName != nil {
17383 objectMap["friendlyName"] = pc.FriendlyName
17384 }
17385 if pc.BackupManagementType != "" {
17386 objectMap["backupManagementType"] = pc.BackupManagementType
17387 }
17388 if pc.HealthStatus != nil {
17389 objectMap["healthStatus"] = pc.HealthStatus
17390 }
17391 if pc.ContainerID != nil {
17392 objectMap["containerId"] = pc.ContainerID
17393 }
17394 if pc.ProtectableContainerType != "" {
17395 objectMap["protectableContainerType"] = pc.ProtectableContainerType
17396 }
17397 return json.Marshal(objectMap)
17398 }
17399
17400
17401 func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
17402 return nil, false
17403 }
17404
17405
17406 func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
17407 return nil, false
17408 }
17409
17410
17411 func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
17412 return &pc, true
17413 }
17414
17415
17416 func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
17417 return &pc, true
17418 }
17419
17420
17421 type ProtectableContainerResource struct {
17422
17423 Properties BasicProtectableContainer `json:"properties,omitempty"`
17424
17425 ID *string `json:"id,omitempty"`
17426
17427 Name *string `json:"name,omitempty"`
17428
17429 Type *string `json:"type,omitempty"`
17430
17431 Location *string `json:"location,omitempty"`
17432
17433 Tags map[string]*string `json:"tags"`
17434
17435 ETag *string `json:"eTag,omitempty"`
17436 }
17437
17438
17439 func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) {
17440 objectMap := make(map[string]interface{})
17441 objectMap["properties"] = pcr.Properties
17442 if pcr.Location != nil {
17443 objectMap["location"] = pcr.Location
17444 }
17445 if pcr.Tags != nil {
17446 objectMap["tags"] = pcr.Tags
17447 }
17448 if pcr.ETag != nil {
17449 objectMap["eTag"] = pcr.ETag
17450 }
17451 return json.Marshal(objectMap)
17452 }
17453
17454
17455 func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error {
17456 var m map[string]*json.RawMessage
17457 err := json.Unmarshal(body, &m)
17458 if err != nil {
17459 return err
17460 }
17461 for k, v := range m {
17462 switch k {
17463 case "properties":
17464 if v != nil {
17465 properties, err := unmarshalBasicProtectableContainer(*v)
17466 if err != nil {
17467 return err
17468 }
17469 pcr.Properties = properties
17470 }
17471 case "id":
17472 if v != nil {
17473 var ID string
17474 err = json.Unmarshal(*v, &ID)
17475 if err != nil {
17476 return err
17477 }
17478 pcr.ID = &ID
17479 }
17480 case "name":
17481 if v != nil {
17482 var name string
17483 err = json.Unmarshal(*v, &name)
17484 if err != nil {
17485 return err
17486 }
17487 pcr.Name = &name
17488 }
17489 case "type":
17490 if v != nil {
17491 var typeVar string
17492 err = json.Unmarshal(*v, &typeVar)
17493 if err != nil {
17494 return err
17495 }
17496 pcr.Type = &typeVar
17497 }
17498 case "location":
17499 if v != nil {
17500 var location string
17501 err = json.Unmarshal(*v, &location)
17502 if err != nil {
17503 return err
17504 }
17505 pcr.Location = &location
17506 }
17507 case "tags":
17508 if v != nil {
17509 var tags map[string]*string
17510 err = json.Unmarshal(*v, &tags)
17511 if err != nil {
17512 return err
17513 }
17514 pcr.Tags = tags
17515 }
17516 case "eTag":
17517 if v != nil {
17518 var eTag string
17519 err = json.Unmarshal(*v, &eTag)
17520 if err != nil {
17521 return err
17522 }
17523 pcr.ETag = &eTag
17524 }
17525 }
17526 }
17527
17528 return nil
17529 }
17530
17531
17532 type ProtectableContainerResourceList struct {
17533 autorest.Response `json:"-"`
17534
17535 Value *[]ProtectableContainerResource `json:"value,omitempty"`
17536
17537 NextLink *string `json:"nextLink,omitempty"`
17538 }
17539
17540
17541
17542 type ProtectableContainerResourceListIterator struct {
17543 i int
17544 page ProtectableContainerResourceListPage
17545 }
17546
17547
17548
17549 func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
17550 if tracing.IsEnabled() {
17551 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext")
17552 defer func() {
17553 sc := -1
17554 if iter.Response().Response.Response != nil {
17555 sc = iter.Response().Response.Response.StatusCode
17556 }
17557 tracing.EndSpan(ctx, sc, err)
17558 }()
17559 }
17560 iter.i++
17561 if iter.i < len(iter.page.Values()) {
17562 return nil
17563 }
17564 err = iter.page.NextWithContext(ctx)
17565 if err != nil {
17566 iter.i--
17567 return err
17568 }
17569 iter.i = 0
17570 return nil
17571 }
17572
17573
17574
17575
17576 func (iter *ProtectableContainerResourceListIterator) Next() error {
17577 return iter.NextWithContext(context.Background())
17578 }
17579
17580
17581 func (iter ProtectableContainerResourceListIterator) NotDone() bool {
17582 return iter.page.NotDone() && iter.i < len(iter.page.Values())
17583 }
17584
17585
17586 func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList {
17587 return iter.page.Response()
17588 }
17589
17590
17591
17592 func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource {
17593 if !iter.page.NotDone() {
17594 return ProtectableContainerResource{}
17595 }
17596 return iter.page.Values()[iter.i]
17597 }
17598
17599
17600 func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator {
17601 return ProtectableContainerResourceListIterator{page: page}
17602 }
17603
17604
17605 func (pcrl ProtectableContainerResourceList) IsEmpty() bool {
17606 return pcrl.Value == nil || len(*pcrl.Value) == 0
17607 }
17608
17609
17610 func (pcrl ProtectableContainerResourceList) hasNextLink() bool {
17611 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
17612 }
17613
17614
17615
17616 func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
17617 if !pcrl.hasNextLink() {
17618 return nil, nil
17619 }
17620 return autorest.Prepare((&http.Request{}).WithContext(ctx),
17621 autorest.AsJSON(),
17622 autorest.AsGet(),
17623 autorest.WithBaseURL(to.String(pcrl.NextLink)))
17624 }
17625
17626
17627 type ProtectableContainerResourceListPage struct {
17628 fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)
17629 pcrl ProtectableContainerResourceList
17630 }
17631
17632
17633
17634 func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
17635 if tracing.IsEnabled() {
17636 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext")
17637 defer func() {
17638 sc := -1
17639 if page.Response().Response.Response != nil {
17640 sc = page.Response().Response.Response.StatusCode
17641 }
17642 tracing.EndSpan(ctx, sc, err)
17643 }()
17644 }
17645 for {
17646 next, err := page.fn(ctx, page.pcrl)
17647 if err != nil {
17648 return err
17649 }
17650 page.pcrl = next
17651 if !next.hasNextLink() || !next.IsEmpty() {
17652 break
17653 }
17654 }
17655 return nil
17656 }
17657
17658
17659
17660
17661 func (page *ProtectableContainerResourceListPage) Next() error {
17662 return page.NextWithContext(context.Background())
17663 }
17664
17665
17666 func (page ProtectableContainerResourceListPage) NotDone() bool {
17667 return !page.pcrl.IsEmpty()
17668 }
17669
17670
17671 func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList {
17672 return page.pcrl
17673 }
17674
17675
17676 func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource {
17677 if page.pcrl.IsEmpty() {
17678 return nil
17679 }
17680 return *page.pcrl.Value
17681 }
17682
17683
17684 func NewProtectableContainerResourceListPage(cur ProtectableContainerResourceList, getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage {
17685 return ProtectableContainerResourceListPage{
17686 fn: getNextPage,
17687 pcrl: cur,
17688 }
17689 }
17690
17691
17692 type BasicProtectedItem interface {
17693 AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool)
17694 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
17695 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
17696 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
17697 AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool)
17698 AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool)
17699 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
17700 AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool)
17701 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
17702 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
17703 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
17704 AsDPMProtectedItem() (*DPMProtectedItem, bool)
17705 AsGenericProtectedItem() (*GenericProtectedItem, bool)
17706 AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool)
17707 AsProtectedItem() (*ProtectedItem, bool)
17708 }
17709
17710
17711 type ProtectedItem struct {
17712
17713 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17714
17715 WorkloadType DataSourceType `json:"workloadType,omitempty"`
17716
17717 ContainerName *string `json:"containerName,omitempty"`
17718
17719 SourceResourceID *string `json:"sourceResourceId,omitempty"`
17720
17721 PolicyID *string `json:"policyId,omitempty"`
17722
17723 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
17724
17725 BackupSetName *string `json:"backupSetName,omitempty"`
17726
17727 CreateMode CreateMode `json:"createMode,omitempty"`
17728
17729 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
17730
17731 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
17732
17733 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
17734
17735 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
17736
17737 IsRehydrate *bool `json:"isRehydrate,omitempty"`
17738
17739 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
17740
17741 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
17742
17743 PolicyName *string `json:"policyName,omitempty"`
17744
17745 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
17746 }
17747
17748 func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) {
17749 var m map[string]interface{}
17750 err := json.Unmarshal(body, &m)
17751 if err != nil {
17752 return nil, err
17753 }
17754
17755 switch m["protectedItemType"] {
17756 case string(ProtectedItemTypeAzureFileShareProtectedItem):
17757 var afpi AzureFileshareProtectedItem
17758 err := json.Unmarshal(body, &afpi)
17759 return afpi, err
17760 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
17761 var aisccvpi AzureIaaSClassicComputeVMProtectedItem
17762 err := json.Unmarshal(body, &aisccvpi)
17763 return aisccvpi, err
17764 case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
17765 var aiscvpi AzureIaaSComputeVMProtectedItem
17766 err := json.Unmarshal(body, &aiscvpi)
17767 return aiscvpi, err
17768 case string(ProtectedItemTypeAzureIaaSVMProtectedItem):
17769 var aispi AzureIaaSVMProtectedItem
17770 err := json.Unmarshal(body, &aispi)
17771 return aispi, err
17772 case string(ProtectedItemTypeMicrosoftSqlserversdatabases):
17773 var aspi AzureSQLProtectedItem
17774 err := json.Unmarshal(body, &aspi)
17775 return aspi, err
17776 case string(ProtectedItemTypeAzureVMWorkloadProtectedItem):
17777 var avwpi AzureVMWorkloadProtectedItem
17778 err := json.Unmarshal(body, &avwpi)
17779 return avwpi, err
17780 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
17781 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
17782 err := json.Unmarshal(body, &avwsadpi)
17783 return avwsadpi, err
17784 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
17785 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
17786 err := json.Unmarshal(body, &avwshdpi)
17787 return avwshdpi, err
17788 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
17789 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
17790 err := json.Unmarshal(body, &avwsdpi)
17791 return avwsdpi, err
17792 case string(ProtectedItemTypeDPMProtectedItem):
17793 var dpi DPMProtectedItem
17794 err := json.Unmarshal(body, &dpi)
17795 return dpi, err
17796 case string(ProtectedItemTypeGenericProtectedItem):
17797 var gpi GenericProtectedItem
17798 err := json.Unmarshal(body, &gpi)
17799 return gpi, err
17800 case string(ProtectedItemTypeMabFileFolderProtectedItem):
17801 var mffpi MabFileFolderProtectedItem
17802 err := json.Unmarshal(body, &mffpi)
17803 return mffpi, err
17804 default:
17805 var pi ProtectedItem
17806 err := json.Unmarshal(body, &pi)
17807 return pi, err
17808 }
17809 }
17810 func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) {
17811 var rawMessages []*json.RawMessage
17812 err := json.Unmarshal(body, &rawMessages)
17813 if err != nil {
17814 return nil, err
17815 }
17816
17817 piArray := make([]BasicProtectedItem, len(rawMessages))
17818
17819 for index, rawMessage := range rawMessages {
17820 pi, err := unmarshalBasicProtectedItem(*rawMessage)
17821 if err != nil {
17822 return nil, err
17823 }
17824 piArray[index] = pi
17825 }
17826 return piArray, nil
17827 }
17828
17829
17830 func (pi ProtectedItem) MarshalJSON() ([]byte, error) {
17831 pi.ProtectedItemType = ProtectedItemTypeProtectedItem
17832 objectMap := make(map[string]interface{})
17833 if pi.BackupManagementType != "" {
17834 objectMap["backupManagementType"] = pi.BackupManagementType
17835 }
17836 if pi.WorkloadType != "" {
17837 objectMap["workloadType"] = pi.WorkloadType
17838 }
17839 if pi.ContainerName != nil {
17840 objectMap["containerName"] = pi.ContainerName
17841 }
17842 if pi.SourceResourceID != nil {
17843 objectMap["sourceResourceId"] = pi.SourceResourceID
17844 }
17845 if pi.PolicyID != nil {
17846 objectMap["policyId"] = pi.PolicyID
17847 }
17848 if pi.LastRecoveryPoint != nil {
17849 objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint
17850 }
17851 if pi.BackupSetName != nil {
17852 objectMap["backupSetName"] = pi.BackupSetName
17853 }
17854 if pi.CreateMode != "" {
17855 objectMap["createMode"] = pi.CreateMode
17856 }
17857 if pi.DeferredDeleteTimeInUTC != nil {
17858 objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC
17859 }
17860 if pi.IsScheduledForDeferredDelete != nil {
17861 objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete
17862 }
17863 if pi.DeferredDeleteTimeRemaining != nil {
17864 objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining
17865 }
17866 if pi.IsDeferredDeleteScheduleUpcoming != nil {
17867 objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming
17868 }
17869 if pi.IsRehydrate != nil {
17870 objectMap["isRehydrate"] = pi.IsRehydrate
17871 }
17872 if pi.ResourceGuardOperationRequests != nil {
17873 objectMap["resourceGuardOperationRequests"] = pi.ResourceGuardOperationRequests
17874 }
17875 if pi.IsArchiveEnabled != nil {
17876 objectMap["isArchiveEnabled"] = pi.IsArchiveEnabled
17877 }
17878 if pi.PolicyName != nil {
17879 objectMap["policyName"] = pi.PolicyName
17880 }
17881 if pi.ProtectedItemType != "" {
17882 objectMap["protectedItemType"] = pi.ProtectedItemType
17883 }
17884 return json.Marshal(objectMap)
17885 }
17886
17887
17888 func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
17889 return nil, false
17890 }
17891
17892
17893 func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
17894 return nil, false
17895 }
17896
17897
17898 func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
17899 return nil, false
17900 }
17901
17902
17903 func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
17904 return nil, false
17905 }
17906
17907
17908 func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
17909 return nil, false
17910 }
17911
17912
17913 func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
17914 return nil, false
17915 }
17916
17917
17918 func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
17919 return nil, false
17920 }
17921
17922
17923 func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
17924 return nil, false
17925 }
17926
17927
17928 func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
17929 return nil, false
17930 }
17931
17932
17933 func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
17934 return nil, false
17935 }
17936
17937
17938 func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
17939 return nil, false
17940 }
17941
17942
17943 func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
17944 return nil, false
17945 }
17946
17947
17948 func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
17949 return nil, false
17950 }
17951
17952
17953 func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
17954 return nil, false
17955 }
17956
17957
17958 func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
17959 return &pi, true
17960 }
17961
17962
17963 func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
17964 return &pi, true
17965 }
17966
17967
17968 type ProtectedItemQueryObject struct {
17969
17970 HealthState HealthState `json:"healthState,omitempty"`
17971
17972 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17973
17974 ItemType DataSourceType `json:"itemType,omitempty"`
17975
17976 PolicyName *string `json:"policyName,omitempty"`
17977
17978 ContainerName *string `json:"containerName,omitempty"`
17979
17980 BackupEngineName *string `json:"backupEngineName,omitempty"`
17981
17982 FriendlyName *string `json:"friendlyName,omitempty"`
17983
17984 FabricName *string `json:"fabricName,omitempty"`
17985
17986 BackupSetName *string `json:"backupSetName,omitempty"`
17987 }
17988
17989
17990 type ProtectedItemResource struct {
17991 autorest.Response `json:"-"`
17992
17993 Properties BasicProtectedItem `json:"properties,omitempty"`
17994
17995 ID *string `json:"id,omitempty"`
17996
17997 Name *string `json:"name,omitempty"`
17998
17999 Type *string `json:"type,omitempty"`
18000
18001 Location *string `json:"location,omitempty"`
18002
18003 Tags map[string]*string `json:"tags"`
18004
18005 ETag *string `json:"eTag,omitempty"`
18006 }
18007
18008
18009 func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) {
18010 objectMap := make(map[string]interface{})
18011 objectMap["properties"] = pir.Properties
18012 if pir.Location != nil {
18013 objectMap["location"] = pir.Location
18014 }
18015 if pir.Tags != nil {
18016 objectMap["tags"] = pir.Tags
18017 }
18018 if pir.ETag != nil {
18019 objectMap["eTag"] = pir.ETag
18020 }
18021 return json.Marshal(objectMap)
18022 }
18023
18024
18025 func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error {
18026 var m map[string]*json.RawMessage
18027 err := json.Unmarshal(body, &m)
18028 if err != nil {
18029 return err
18030 }
18031 for k, v := range m {
18032 switch k {
18033 case "properties":
18034 if v != nil {
18035 properties, err := unmarshalBasicProtectedItem(*v)
18036 if err != nil {
18037 return err
18038 }
18039 pir.Properties = properties
18040 }
18041 case "id":
18042 if v != nil {
18043 var ID string
18044 err = json.Unmarshal(*v, &ID)
18045 if err != nil {
18046 return err
18047 }
18048 pir.ID = &ID
18049 }
18050 case "name":
18051 if v != nil {
18052 var name string
18053 err = json.Unmarshal(*v, &name)
18054 if err != nil {
18055 return err
18056 }
18057 pir.Name = &name
18058 }
18059 case "type":
18060 if v != nil {
18061 var typeVar string
18062 err = json.Unmarshal(*v, &typeVar)
18063 if err != nil {
18064 return err
18065 }
18066 pir.Type = &typeVar
18067 }
18068 case "location":
18069 if v != nil {
18070 var location string
18071 err = json.Unmarshal(*v, &location)
18072 if err != nil {
18073 return err
18074 }
18075 pir.Location = &location
18076 }
18077 case "tags":
18078 if v != nil {
18079 var tags map[string]*string
18080 err = json.Unmarshal(*v, &tags)
18081 if err != nil {
18082 return err
18083 }
18084 pir.Tags = tags
18085 }
18086 case "eTag":
18087 if v != nil {
18088 var eTag string
18089 err = json.Unmarshal(*v, &eTag)
18090 if err != nil {
18091 return err
18092 }
18093 pir.ETag = &eTag
18094 }
18095 }
18096 }
18097
18098 return nil
18099 }
18100
18101
18102 type ProtectedItemResourceList struct {
18103 autorest.Response `json:"-"`
18104
18105 Value *[]ProtectedItemResource `json:"value,omitempty"`
18106
18107 NextLink *string `json:"nextLink,omitempty"`
18108 }
18109
18110
18111 type ProtectedItemResourceListIterator struct {
18112 i int
18113 page ProtectedItemResourceListPage
18114 }
18115
18116
18117
18118 func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18119 if tracing.IsEnabled() {
18120 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext")
18121 defer func() {
18122 sc := -1
18123 if iter.Response().Response.Response != nil {
18124 sc = iter.Response().Response.Response.StatusCode
18125 }
18126 tracing.EndSpan(ctx, sc, err)
18127 }()
18128 }
18129 iter.i++
18130 if iter.i < len(iter.page.Values()) {
18131 return nil
18132 }
18133 err = iter.page.NextWithContext(ctx)
18134 if err != nil {
18135 iter.i--
18136 return err
18137 }
18138 iter.i = 0
18139 return nil
18140 }
18141
18142
18143
18144
18145 func (iter *ProtectedItemResourceListIterator) Next() error {
18146 return iter.NextWithContext(context.Background())
18147 }
18148
18149
18150 func (iter ProtectedItemResourceListIterator) NotDone() bool {
18151 return iter.page.NotDone() && iter.i < len(iter.page.Values())
18152 }
18153
18154
18155 func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList {
18156 return iter.page.Response()
18157 }
18158
18159
18160
18161 func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource {
18162 if !iter.page.NotDone() {
18163 return ProtectedItemResource{}
18164 }
18165 return iter.page.Values()[iter.i]
18166 }
18167
18168
18169 func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator {
18170 return ProtectedItemResourceListIterator{page: page}
18171 }
18172
18173
18174 func (pirl ProtectedItemResourceList) IsEmpty() bool {
18175 return pirl.Value == nil || len(*pirl.Value) == 0
18176 }
18177
18178
18179 func (pirl ProtectedItemResourceList) hasNextLink() bool {
18180 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
18181 }
18182
18183
18184
18185 func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
18186 if !pirl.hasNextLink() {
18187 return nil, nil
18188 }
18189 return autorest.Prepare((&http.Request{}).WithContext(ctx),
18190 autorest.AsJSON(),
18191 autorest.AsGet(),
18192 autorest.WithBaseURL(to.String(pirl.NextLink)))
18193 }
18194
18195
18196 type ProtectedItemResourceListPage struct {
18197 fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)
18198 pirl ProtectedItemResourceList
18199 }
18200
18201
18202
18203 func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
18204 if tracing.IsEnabled() {
18205 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext")
18206 defer func() {
18207 sc := -1
18208 if page.Response().Response.Response != nil {
18209 sc = page.Response().Response.Response.StatusCode
18210 }
18211 tracing.EndSpan(ctx, sc, err)
18212 }()
18213 }
18214 for {
18215 next, err := page.fn(ctx, page.pirl)
18216 if err != nil {
18217 return err
18218 }
18219 page.pirl = next
18220 if !next.hasNextLink() || !next.IsEmpty() {
18221 break
18222 }
18223 }
18224 return nil
18225 }
18226
18227
18228
18229
18230 func (page *ProtectedItemResourceListPage) Next() error {
18231 return page.NextWithContext(context.Background())
18232 }
18233
18234
18235 func (page ProtectedItemResourceListPage) NotDone() bool {
18236 return !page.pirl.IsEmpty()
18237 }
18238
18239
18240 func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList {
18241 return page.pirl
18242 }
18243
18244
18245 func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource {
18246 if page.pirl.IsEmpty() {
18247 return nil
18248 }
18249 return *page.pirl.Value
18250 }
18251
18252
18253 func NewProtectedItemResourceListPage(cur ProtectedItemResourceList, getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage {
18254 return ProtectedItemResourceListPage{
18255 fn: getNextPage,
18256 pirl: cur,
18257 }
18258 }
18259
18260
18261
18262 type BasicProtectionContainer interface {
18263 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
18264 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
18265 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
18266 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
18267 AsAzureSQLContainer() (*AzureSQLContainer, bool)
18268 AsAzureStorageContainer() (*AzureStorageContainer, bool)
18269 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
18270 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
18271 AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool)
18272 AsDpmContainer() (*DpmContainer, bool)
18273 AsBasicDpmContainer() (BasicDpmContainer, bool)
18274 AsGenericContainer() (*GenericContainer, bool)
18275 AsIaaSVMContainer() (*IaaSVMContainer, bool)
18276 AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool)
18277 AsMabContainer() (*MabContainer, bool)
18278 AsProtectionContainer() (*ProtectionContainer, bool)
18279 }
18280
18281
18282
18283 type ProtectionContainer struct {
18284
18285 FriendlyName *string `json:"friendlyName,omitempty"`
18286
18287 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18288
18289 RegistrationStatus *string `json:"registrationStatus,omitempty"`
18290
18291 HealthStatus *string `json:"healthStatus,omitempty"`
18292
18293 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
18294
18295 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
18296 }
18297
18298 func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) {
18299 var m map[string]interface{}
18300 err := json.Unmarshal(body, &m)
18301 if err != nil {
18302 return nil, err
18303 }
18304
18305 switch m["containerType"] {
18306 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer):
18307 var absc AzureBackupServerContainer
18308 err := json.Unmarshal(body, &absc)
18309 return absc, err
18310 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines):
18311 var aisccvc AzureIaaSClassicComputeVMContainer
18312 err := json.Unmarshal(body, &aisccvc)
18313 return aisccvc, err
18314 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines):
18315 var aiscvc AzureIaaSComputeVMContainer
18316 err := json.Unmarshal(body, &aiscvc)
18317 return aiscvc, err
18318 case string(ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer):
18319 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
18320 err := json.Unmarshal(body, &aswcpc)
18321 return aswcpc, err
18322 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer):
18323 var asc AzureSQLContainer
18324 err := json.Unmarshal(body, &asc)
18325 return asc, err
18326 case string(ContainerTypeBasicProtectionContainerContainerTypeStorageContainer):
18327 var asc AzureStorageContainer
18328 err := json.Unmarshal(body, &asc)
18329 return asc, err
18330 case string(ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer):
18331 var avacpc AzureVMAppContainerProtectionContainer
18332 err := json.Unmarshal(body, &avacpc)
18333 return avacpc, err
18334 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer):
18335 var awc AzureWorkloadContainer
18336 err := json.Unmarshal(body, &awc)
18337 return awc, err
18338 case string(ContainerTypeBasicProtectionContainerContainerTypeDPMContainer):
18339 var dc DpmContainer
18340 err := json.Unmarshal(body, &dc)
18341 return dc, err
18342 case string(ContainerTypeBasicProtectionContainerContainerTypeGenericContainer):
18343 var gc GenericContainer
18344 err := json.Unmarshal(body, &gc)
18345 return gc, err
18346 case string(ContainerTypeBasicProtectionContainerContainerTypeIaasVMContainer):
18347 var isc IaaSVMContainer
18348 err := json.Unmarshal(body, &isc)
18349 return isc, err
18350 case string(ContainerTypeBasicProtectionContainerContainerTypeWindows):
18351 var mc MabContainer
18352 err := json.Unmarshal(body, &mc)
18353 return mc, err
18354 default:
18355 var pc ProtectionContainer
18356 err := json.Unmarshal(body, &pc)
18357 return pc, err
18358 }
18359 }
18360 func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) {
18361 var rawMessages []*json.RawMessage
18362 err := json.Unmarshal(body, &rawMessages)
18363 if err != nil {
18364 return nil, err
18365 }
18366
18367 pcArray := make([]BasicProtectionContainer, len(rawMessages))
18368
18369 for index, rawMessage := range rawMessages {
18370 pc, err := unmarshalBasicProtectionContainer(*rawMessage)
18371 if err != nil {
18372 return nil, err
18373 }
18374 pcArray[index] = pc
18375 }
18376 return pcArray, nil
18377 }
18378
18379
18380 func (pc ProtectionContainer) MarshalJSON() ([]byte, error) {
18381 pc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer
18382 objectMap := make(map[string]interface{})
18383 if pc.FriendlyName != nil {
18384 objectMap["friendlyName"] = pc.FriendlyName
18385 }
18386 if pc.BackupManagementType != "" {
18387 objectMap["backupManagementType"] = pc.BackupManagementType
18388 }
18389 if pc.RegistrationStatus != nil {
18390 objectMap["registrationStatus"] = pc.RegistrationStatus
18391 }
18392 if pc.HealthStatus != nil {
18393 objectMap["healthStatus"] = pc.HealthStatus
18394 }
18395 if pc.ProtectableObjectType != nil {
18396 objectMap["protectableObjectType"] = pc.ProtectableObjectType
18397 }
18398 if pc.ContainerType != "" {
18399 objectMap["containerType"] = pc.ContainerType
18400 }
18401 return json.Marshal(objectMap)
18402 }
18403
18404
18405 func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
18406 return nil, false
18407 }
18408
18409
18410 func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
18411 return nil, false
18412 }
18413
18414
18415 func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
18416 return nil, false
18417 }
18418
18419
18420 func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
18421 return nil, false
18422 }
18423
18424
18425 func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
18426 return nil, false
18427 }
18428
18429
18430 func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
18431 return nil, false
18432 }
18433
18434
18435 func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
18436 return nil, false
18437 }
18438
18439
18440 func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
18441 return nil, false
18442 }
18443
18444
18445 func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
18446 return nil, false
18447 }
18448
18449
18450 func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
18451 return nil, false
18452 }
18453
18454
18455 func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
18456 return nil, false
18457 }
18458
18459
18460 func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
18461 return nil, false
18462 }
18463
18464
18465 func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
18466 return nil, false
18467 }
18468
18469
18470 func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
18471 return nil, false
18472 }
18473
18474
18475 func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) {
18476 return nil, false
18477 }
18478
18479
18480 func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
18481 return &pc, true
18482 }
18483
18484
18485 func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
18486 return &pc, true
18487 }
18488
18489
18490
18491 type ProtectionContainerResource struct {
18492 autorest.Response `json:"-"`
18493
18494 Properties BasicProtectionContainer `json:"properties,omitempty"`
18495
18496 ID *string `json:"id,omitempty"`
18497
18498 Name *string `json:"name,omitempty"`
18499
18500 Type *string `json:"type,omitempty"`
18501
18502 Location *string `json:"location,omitempty"`
18503
18504 Tags map[string]*string `json:"tags"`
18505
18506 ETag *string `json:"eTag,omitempty"`
18507 }
18508
18509
18510 func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) {
18511 objectMap := make(map[string]interface{})
18512 objectMap["properties"] = pcr.Properties
18513 if pcr.Location != nil {
18514 objectMap["location"] = pcr.Location
18515 }
18516 if pcr.Tags != nil {
18517 objectMap["tags"] = pcr.Tags
18518 }
18519 if pcr.ETag != nil {
18520 objectMap["eTag"] = pcr.ETag
18521 }
18522 return json.Marshal(objectMap)
18523 }
18524
18525
18526 func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error {
18527 var m map[string]*json.RawMessage
18528 err := json.Unmarshal(body, &m)
18529 if err != nil {
18530 return err
18531 }
18532 for k, v := range m {
18533 switch k {
18534 case "properties":
18535 if v != nil {
18536 properties, err := unmarshalBasicProtectionContainer(*v)
18537 if err != nil {
18538 return err
18539 }
18540 pcr.Properties = properties
18541 }
18542 case "id":
18543 if v != nil {
18544 var ID string
18545 err = json.Unmarshal(*v, &ID)
18546 if err != nil {
18547 return err
18548 }
18549 pcr.ID = &ID
18550 }
18551 case "name":
18552 if v != nil {
18553 var name string
18554 err = json.Unmarshal(*v, &name)
18555 if err != nil {
18556 return err
18557 }
18558 pcr.Name = &name
18559 }
18560 case "type":
18561 if v != nil {
18562 var typeVar string
18563 err = json.Unmarshal(*v, &typeVar)
18564 if err != nil {
18565 return err
18566 }
18567 pcr.Type = &typeVar
18568 }
18569 case "location":
18570 if v != nil {
18571 var location string
18572 err = json.Unmarshal(*v, &location)
18573 if err != nil {
18574 return err
18575 }
18576 pcr.Location = &location
18577 }
18578 case "tags":
18579 if v != nil {
18580 var tags map[string]*string
18581 err = json.Unmarshal(*v, &tags)
18582 if err != nil {
18583 return err
18584 }
18585 pcr.Tags = tags
18586 }
18587 case "eTag":
18588 if v != nil {
18589 var eTag string
18590 err = json.Unmarshal(*v, &eTag)
18591 if err != nil {
18592 return err
18593 }
18594 pcr.ETag = &eTag
18595 }
18596 }
18597 }
18598
18599 return nil
18600 }
18601
18602
18603 type ProtectionContainerResourceList struct {
18604 autorest.Response `json:"-"`
18605
18606 Value *[]ProtectionContainerResource `json:"value,omitempty"`
18607
18608 NextLink *string `json:"nextLink,omitempty"`
18609 }
18610
18611
18612
18613 type ProtectionContainerResourceListIterator struct {
18614 i int
18615 page ProtectionContainerResourceListPage
18616 }
18617
18618
18619
18620 func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18621 if tracing.IsEnabled() {
18622 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext")
18623 defer func() {
18624 sc := -1
18625 if iter.Response().Response.Response != nil {
18626 sc = iter.Response().Response.Response.StatusCode
18627 }
18628 tracing.EndSpan(ctx, sc, err)
18629 }()
18630 }
18631 iter.i++
18632 if iter.i < len(iter.page.Values()) {
18633 return nil
18634 }
18635 err = iter.page.NextWithContext(ctx)
18636 if err != nil {
18637 iter.i--
18638 return err
18639 }
18640 iter.i = 0
18641 return nil
18642 }
18643
18644
18645
18646
18647 func (iter *ProtectionContainerResourceListIterator) Next() error {
18648 return iter.NextWithContext(context.Background())
18649 }
18650
18651
18652 func (iter ProtectionContainerResourceListIterator) NotDone() bool {
18653 return iter.page.NotDone() && iter.i < len(iter.page.Values())
18654 }
18655
18656
18657 func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList {
18658 return iter.page.Response()
18659 }
18660
18661
18662
18663 func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource {
18664 if !iter.page.NotDone() {
18665 return ProtectionContainerResource{}
18666 }
18667 return iter.page.Values()[iter.i]
18668 }
18669
18670
18671 func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator {
18672 return ProtectionContainerResourceListIterator{page: page}
18673 }
18674
18675
18676 func (pcrl ProtectionContainerResourceList) IsEmpty() bool {
18677 return pcrl.Value == nil || len(*pcrl.Value) == 0
18678 }
18679
18680
18681 func (pcrl ProtectionContainerResourceList) hasNextLink() bool {
18682 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
18683 }
18684
18685
18686
18687 func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
18688 if !pcrl.hasNextLink() {
18689 return nil, nil
18690 }
18691 return autorest.Prepare((&http.Request{}).WithContext(ctx),
18692 autorest.AsJSON(),
18693 autorest.AsGet(),
18694 autorest.WithBaseURL(to.String(pcrl.NextLink)))
18695 }
18696
18697
18698 type ProtectionContainerResourceListPage struct {
18699 fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)
18700 pcrl ProtectionContainerResourceList
18701 }
18702
18703
18704
18705 func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
18706 if tracing.IsEnabled() {
18707 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext")
18708 defer func() {
18709 sc := -1
18710 if page.Response().Response.Response != nil {
18711 sc = page.Response().Response.Response.StatusCode
18712 }
18713 tracing.EndSpan(ctx, sc, err)
18714 }()
18715 }
18716 for {
18717 next, err := page.fn(ctx, page.pcrl)
18718 if err != nil {
18719 return err
18720 }
18721 page.pcrl = next
18722 if !next.hasNextLink() || !next.IsEmpty() {
18723 break
18724 }
18725 }
18726 return nil
18727 }
18728
18729
18730
18731
18732 func (page *ProtectionContainerResourceListPage) Next() error {
18733 return page.NextWithContext(context.Background())
18734 }
18735
18736
18737 func (page ProtectionContainerResourceListPage) NotDone() bool {
18738 return !page.pcrl.IsEmpty()
18739 }
18740
18741
18742 func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList {
18743 return page.pcrl
18744 }
18745
18746
18747 func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource {
18748 if page.pcrl.IsEmpty() {
18749 return nil
18750 }
18751 return *page.pcrl.Value
18752 }
18753
18754
18755 func NewProtectionContainerResourceListPage(cur ProtectionContainerResourceList, getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage {
18756 return ProtectionContainerResourceListPage{
18757 fn: getNextPage,
18758 pcrl: cur,
18759 }
18760 }
18761
18762
18763 type BasicProtectionIntent interface {
18764 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
18765 AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool)
18766 AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool)
18767 AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool)
18768 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
18769 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
18770 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
18771 AsProtectionIntent() (*ProtectionIntent, bool)
18772 }
18773
18774
18775 type ProtectionIntent struct {
18776
18777 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18778
18779 SourceResourceID *string `json:"sourceResourceId,omitempty"`
18780
18781 ItemID *string `json:"itemId,omitempty"`
18782
18783 PolicyID *string `json:"policyId,omitempty"`
18784
18785 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
18786
18787 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
18788 }
18789
18790 func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) {
18791 var m map[string]interface{}
18792 err := json.Unmarshal(body, &m)
18793 if err != nil {
18794 return nil, err
18795 }
18796
18797 switch m["protectionIntentItemType"] {
18798 case string(ProtectionIntentItemTypeRecoveryServiceVaultItem):
18799 var arsvpi AzureRecoveryServiceVaultProtectionIntent
18800 err := json.Unmarshal(body, &arsvpi)
18801 return arsvpi, err
18802 case string(ProtectionIntentItemTypeAzureResourceItem):
18803 var arpi AzureResourceProtectionIntent
18804 err := json.Unmarshal(body, &arpi)
18805 return arpi, err
18806 case string(ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent):
18807 var awcapi AzureWorkloadContainerAutoProtectionIntent
18808 err := json.Unmarshal(body, &awcapi)
18809 return awcapi, err
18810 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
18811 var awapi AzureWorkloadAutoProtectionIntent
18812 err := json.Unmarshal(body, &awapi)
18813 return awapi, err
18814 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
18815 var awsapi AzureWorkloadSQLAutoProtectionIntent
18816 err := json.Unmarshal(body, &awsapi)
18817 return awsapi, err
18818 default:
18819 var pi ProtectionIntent
18820 err := json.Unmarshal(body, &pi)
18821 return pi, err
18822 }
18823 }
18824 func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) {
18825 var rawMessages []*json.RawMessage
18826 err := json.Unmarshal(body, &rawMessages)
18827 if err != nil {
18828 return nil, err
18829 }
18830
18831 piArray := make([]BasicProtectionIntent, len(rawMessages))
18832
18833 for index, rawMessage := range rawMessages {
18834 pi, err := unmarshalBasicProtectionIntent(*rawMessage)
18835 if err != nil {
18836 return nil, err
18837 }
18838 piArray[index] = pi
18839 }
18840 return piArray, nil
18841 }
18842
18843
18844 func (pi ProtectionIntent) MarshalJSON() ([]byte, error) {
18845 pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent
18846 objectMap := make(map[string]interface{})
18847 if pi.BackupManagementType != "" {
18848 objectMap["backupManagementType"] = pi.BackupManagementType
18849 }
18850 if pi.SourceResourceID != nil {
18851 objectMap["sourceResourceId"] = pi.SourceResourceID
18852 }
18853 if pi.ItemID != nil {
18854 objectMap["itemId"] = pi.ItemID
18855 }
18856 if pi.PolicyID != nil {
18857 objectMap["policyId"] = pi.PolicyID
18858 }
18859 if pi.ProtectionState != "" {
18860 objectMap["protectionState"] = pi.ProtectionState
18861 }
18862 if pi.ProtectionIntentItemType != "" {
18863 objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType
18864 }
18865 return json.Marshal(objectMap)
18866 }
18867
18868
18869 func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
18870 return nil, false
18871 }
18872
18873
18874 func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
18875 return nil, false
18876 }
18877
18878
18879 func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
18880 return nil, false
18881 }
18882
18883
18884 func (pi ProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
18885 return nil, false
18886 }
18887
18888
18889 func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
18890 return nil, false
18891 }
18892
18893
18894 func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
18895 return nil, false
18896 }
18897
18898
18899 func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
18900 return nil, false
18901 }
18902
18903
18904 func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
18905 return &pi, true
18906 }
18907
18908
18909 func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
18910 return &pi, true
18911 }
18912
18913
18914 type ProtectionIntentQueryObject struct {
18915
18916 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18917
18918 ItemType IntentItemType `json:"itemType,omitempty"`
18919
18920 ParentName *string `json:"parentName,omitempty"`
18921
18922 ItemName *string `json:"itemName,omitempty"`
18923 }
18924
18925
18926 type ProtectionIntentResource struct {
18927 autorest.Response `json:"-"`
18928
18929 Properties BasicProtectionIntent `json:"properties,omitempty"`
18930
18931 ID *string `json:"id,omitempty"`
18932
18933 Name *string `json:"name,omitempty"`
18934
18935 Type *string `json:"type,omitempty"`
18936
18937 Location *string `json:"location,omitempty"`
18938
18939 Tags map[string]*string `json:"tags"`
18940
18941 ETag *string `json:"eTag,omitempty"`
18942 }
18943
18944
18945 func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) {
18946 objectMap := make(map[string]interface{})
18947 objectMap["properties"] = pir.Properties
18948 if pir.Location != nil {
18949 objectMap["location"] = pir.Location
18950 }
18951 if pir.Tags != nil {
18952 objectMap["tags"] = pir.Tags
18953 }
18954 if pir.ETag != nil {
18955 objectMap["eTag"] = pir.ETag
18956 }
18957 return json.Marshal(objectMap)
18958 }
18959
18960
18961 func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error {
18962 var m map[string]*json.RawMessage
18963 err := json.Unmarshal(body, &m)
18964 if err != nil {
18965 return err
18966 }
18967 for k, v := range m {
18968 switch k {
18969 case "properties":
18970 if v != nil {
18971 properties, err := unmarshalBasicProtectionIntent(*v)
18972 if err != nil {
18973 return err
18974 }
18975 pir.Properties = properties
18976 }
18977 case "id":
18978 if v != nil {
18979 var ID string
18980 err = json.Unmarshal(*v, &ID)
18981 if err != nil {
18982 return err
18983 }
18984 pir.ID = &ID
18985 }
18986 case "name":
18987 if v != nil {
18988 var name string
18989 err = json.Unmarshal(*v, &name)
18990 if err != nil {
18991 return err
18992 }
18993 pir.Name = &name
18994 }
18995 case "type":
18996 if v != nil {
18997 var typeVar string
18998 err = json.Unmarshal(*v, &typeVar)
18999 if err != nil {
19000 return err
19001 }
19002 pir.Type = &typeVar
19003 }
19004 case "location":
19005 if v != nil {
19006 var location string
19007 err = json.Unmarshal(*v, &location)
19008 if err != nil {
19009 return err
19010 }
19011 pir.Location = &location
19012 }
19013 case "tags":
19014 if v != nil {
19015 var tags map[string]*string
19016 err = json.Unmarshal(*v, &tags)
19017 if err != nil {
19018 return err
19019 }
19020 pir.Tags = tags
19021 }
19022 case "eTag":
19023 if v != nil {
19024 var eTag string
19025 err = json.Unmarshal(*v, &eTag)
19026 if err != nil {
19027 return err
19028 }
19029 pir.ETag = &eTag
19030 }
19031 }
19032 }
19033
19034 return nil
19035 }
19036
19037
19038 type ProtectionIntentResourceList struct {
19039 autorest.Response `json:"-"`
19040
19041 Value *[]ProtectionIntentResource `json:"value,omitempty"`
19042
19043 NextLink *string `json:"nextLink,omitempty"`
19044 }
19045
19046
19047
19048 type ProtectionIntentResourceListIterator struct {
19049 i int
19050 page ProtectionIntentResourceListPage
19051 }
19052
19053
19054
19055 func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19056 if tracing.IsEnabled() {
19057 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext")
19058 defer func() {
19059 sc := -1
19060 if iter.Response().Response.Response != nil {
19061 sc = iter.Response().Response.Response.StatusCode
19062 }
19063 tracing.EndSpan(ctx, sc, err)
19064 }()
19065 }
19066 iter.i++
19067 if iter.i < len(iter.page.Values()) {
19068 return nil
19069 }
19070 err = iter.page.NextWithContext(ctx)
19071 if err != nil {
19072 iter.i--
19073 return err
19074 }
19075 iter.i = 0
19076 return nil
19077 }
19078
19079
19080
19081
19082 func (iter *ProtectionIntentResourceListIterator) Next() error {
19083 return iter.NextWithContext(context.Background())
19084 }
19085
19086
19087 func (iter ProtectionIntentResourceListIterator) NotDone() bool {
19088 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19089 }
19090
19091
19092 func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList {
19093 return iter.page.Response()
19094 }
19095
19096
19097
19098 func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource {
19099 if !iter.page.NotDone() {
19100 return ProtectionIntentResource{}
19101 }
19102 return iter.page.Values()[iter.i]
19103 }
19104
19105
19106 func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator {
19107 return ProtectionIntentResourceListIterator{page: page}
19108 }
19109
19110
19111 func (pirl ProtectionIntentResourceList) IsEmpty() bool {
19112 return pirl.Value == nil || len(*pirl.Value) == 0
19113 }
19114
19115
19116 func (pirl ProtectionIntentResourceList) hasNextLink() bool {
19117 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
19118 }
19119
19120
19121
19122 func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) {
19123 if !pirl.hasNextLink() {
19124 return nil, nil
19125 }
19126 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19127 autorest.AsJSON(),
19128 autorest.AsGet(),
19129 autorest.WithBaseURL(to.String(pirl.NextLink)))
19130 }
19131
19132
19133 type ProtectionIntentResourceListPage struct {
19134 fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)
19135 pirl ProtectionIntentResourceList
19136 }
19137
19138
19139
19140 func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) {
19141 if tracing.IsEnabled() {
19142 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext")
19143 defer func() {
19144 sc := -1
19145 if page.Response().Response.Response != nil {
19146 sc = page.Response().Response.Response.StatusCode
19147 }
19148 tracing.EndSpan(ctx, sc, err)
19149 }()
19150 }
19151 for {
19152 next, err := page.fn(ctx, page.pirl)
19153 if err != nil {
19154 return err
19155 }
19156 page.pirl = next
19157 if !next.hasNextLink() || !next.IsEmpty() {
19158 break
19159 }
19160 }
19161 return nil
19162 }
19163
19164
19165
19166
19167 func (page *ProtectionIntentResourceListPage) Next() error {
19168 return page.NextWithContext(context.Background())
19169 }
19170
19171
19172 func (page ProtectionIntentResourceListPage) NotDone() bool {
19173 return !page.pirl.IsEmpty()
19174 }
19175
19176
19177 func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList {
19178 return page.pirl
19179 }
19180
19181
19182 func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource {
19183 if page.pirl.IsEmpty() {
19184 return nil
19185 }
19186 return *page.pirl.Value
19187 }
19188
19189
19190 func NewProtectionIntentResourceListPage(cur ProtectionIntentResourceList, getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage {
19191 return ProtectionIntentResourceListPage{
19192 fn: getNextPage,
19193 pirl: cur,
19194 }
19195 }
19196
19197
19198
19199 type ProtectionPoliciesDeleteFuture struct {
19200 azure.FutureAPI
19201
19202
19203 Result func(ProtectionPoliciesClient) (autorest.Response, error)
19204 }
19205
19206
19207 func (future *ProtectionPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
19208 var azFuture azure.Future
19209 if err := json.Unmarshal(body, &azFuture); err != nil {
19210 return err
19211 }
19212 future.FutureAPI = &azFuture
19213 future.Result = future.result
19214 return nil
19215 }
19216
19217
19218 func (future *ProtectionPoliciesDeleteFuture) result(client ProtectionPoliciesClient) (ar autorest.Response, err error) {
19219 var done bool
19220 done, err = future.DoneWithContext(context.Background(), client)
19221 if err != nil {
19222 err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
19223 return
19224 }
19225 if !done {
19226 ar.Response = future.Response()
19227 err = azure.NewAsyncOpIncompleteError("backup.ProtectionPoliciesDeleteFuture")
19228 return
19229 }
19230 ar.Response = future.Response()
19231 return
19232 }
19233
19234
19235 type BasicProtectionPolicy interface {
19236 AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool)
19237 AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool)
19238 AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool)
19239 AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool)
19240 AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool)
19241 AsMabProtectionPolicy() (*MabProtectionPolicy, bool)
19242 AsProtectionPolicy() (*ProtectionPolicy, bool)
19243 }
19244
19245
19246
19247 type ProtectionPolicy struct {
19248
19249 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
19250
19251 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
19252
19253 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
19254 }
19255
19256 func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) {
19257 var m map[string]interface{}
19258 err := json.Unmarshal(body, &m)
19259 if err != nil {
19260 return nil, err
19261 }
19262
19263 switch m["backupManagementType"] {
19264 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload):
19265 var avwpp AzureVMWorkloadProtectionPolicy
19266 err := json.Unmarshal(body, &avwpp)
19267 return avwpp, err
19268 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage):
19269 var afspp AzureFileShareProtectionPolicy
19270 err := json.Unmarshal(body, &afspp)
19271 return afspp, err
19272 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM):
19273 var aispp AzureIaaSVMProtectionPolicy
19274 err := json.Unmarshal(body, &aispp)
19275 return aispp, err
19276 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL):
19277 var aspp AzureSQLProtectionPolicy
19278 err := json.Unmarshal(body, &aspp)
19279 return aspp, err
19280 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy):
19281 var gpp GenericProtectionPolicy
19282 err := json.Unmarshal(body, &gpp)
19283 return gpp, err
19284 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB):
19285 var mpp MabProtectionPolicy
19286 err := json.Unmarshal(body, &mpp)
19287 return mpp, err
19288 default:
19289 var pp ProtectionPolicy
19290 err := json.Unmarshal(body, &pp)
19291 return pp, err
19292 }
19293 }
19294 func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) {
19295 var rawMessages []*json.RawMessage
19296 err := json.Unmarshal(body, &rawMessages)
19297 if err != nil {
19298 return nil, err
19299 }
19300
19301 ppArray := make([]BasicProtectionPolicy, len(rawMessages))
19302
19303 for index, rawMessage := range rawMessages {
19304 pp, err := unmarshalBasicProtectionPolicy(*rawMessage)
19305 if err != nil {
19306 return nil, err
19307 }
19308 ppArray[index] = pp
19309 }
19310 return ppArray, nil
19311 }
19312
19313
19314 func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) {
19315 pp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy
19316 objectMap := make(map[string]interface{})
19317 if pp.ProtectedItemsCount != nil {
19318 objectMap["protectedItemsCount"] = pp.ProtectedItemsCount
19319 }
19320 if pp.ResourceGuardOperationRequests != nil {
19321 objectMap["resourceGuardOperationRequests"] = pp.ResourceGuardOperationRequests
19322 }
19323 if pp.BackupManagementType != "" {
19324 objectMap["backupManagementType"] = pp.BackupManagementType
19325 }
19326 return json.Marshal(objectMap)
19327 }
19328
19329
19330 func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
19331 return nil, false
19332 }
19333
19334
19335 func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
19336 return nil, false
19337 }
19338
19339
19340 func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
19341 return nil, false
19342 }
19343
19344
19345 func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
19346 return nil, false
19347 }
19348
19349
19350 func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
19351 return nil, false
19352 }
19353
19354
19355 func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
19356 return nil, false
19357 }
19358
19359
19360 func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
19361 return &pp, true
19362 }
19363
19364
19365 func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
19366 return &pp, true
19367 }
19368
19369
19370 type ProtectionPolicyQueryObject struct {
19371
19372 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
19373
19374 FabricName *string `json:"fabricName,omitempty"`
19375
19376 WorkloadType WorkloadType `json:"workloadType,omitempty"`
19377 }
19378
19379
19380
19381 type ProtectionPolicyResource struct {
19382 autorest.Response `json:"-"`
19383
19384 Properties BasicProtectionPolicy `json:"properties,omitempty"`
19385
19386 ID *string `json:"id,omitempty"`
19387
19388 Name *string `json:"name,omitempty"`
19389
19390 Type *string `json:"type,omitempty"`
19391
19392 Location *string `json:"location,omitempty"`
19393
19394 Tags map[string]*string `json:"tags"`
19395
19396 ETag *string `json:"eTag,omitempty"`
19397 }
19398
19399
19400 func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) {
19401 objectMap := make(map[string]interface{})
19402 objectMap["properties"] = ppr.Properties
19403 if ppr.Location != nil {
19404 objectMap["location"] = ppr.Location
19405 }
19406 if ppr.Tags != nil {
19407 objectMap["tags"] = ppr.Tags
19408 }
19409 if ppr.ETag != nil {
19410 objectMap["eTag"] = ppr.ETag
19411 }
19412 return json.Marshal(objectMap)
19413 }
19414
19415
19416 func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error {
19417 var m map[string]*json.RawMessage
19418 err := json.Unmarshal(body, &m)
19419 if err != nil {
19420 return err
19421 }
19422 for k, v := range m {
19423 switch k {
19424 case "properties":
19425 if v != nil {
19426 properties, err := unmarshalBasicProtectionPolicy(*v)
19427 if err != nil {
19428 return err
19429 }
19430 ppr.Properties = properties
19431 }
19432 case "id":
19433 if v != nil {
19434 var ID string
19435 err = json.Unmarshal(*v, &ID)
19436 if err != nil {
19437 return err
19438 }
19439 ppr.ID = &ID
19440 }
19441 case "name":
19442 if v != nil {
19443 var name string
19444 err = json.Unmarshal(*v, &name)
19445 if err != nil {
19446 return err
19447 }
19448 ppr.Name = &name
19449 }
19450 case "type":
19451 if v != nil {
19452 var typeVar string
19453 err = json.Unmarshal(*v, &typeVar)
19454 if err != nil {
19455 return err
19456 }
19457 ppr.Type = &typeVar
19458 }
19459 case "location":
19460 if v != nil {
19461 var location string
19462 err = json.Unmarshal(*v, &location)
19463 if err != nil {
19464 return err
19465 }
19466 ppr.Location = &location
19467 }
19468 case "tags":
19469 if v != nil {
19470 var tags map[string]*string
19471 err = json.Unmarshal(*v, &tags)
19472 if err != nil {
19473 return err
19474 }
19475 ppr.Tags = tags
19476 }
19477 case "eTag":
19478 if v != nil {
19479 var eTag string
19480 err = json.Unmarshal(*v, &eTag)
19481 if err != nil {
19482 return err
19483 }
19484 ppr.ETag = &eTag
19485 }
19486 }
19487 }
19488
19489 return nil
19490 }
19491
19492
19493 type ProtectionPolicyResourceList struct {
19494 autorest.Response `json:"-"`
19495
19496 Value *[]ProtectionPolicyResource `json:"value,omitempty"`
19497
19498 NextLink *string `json:"nextLink,omitempty"`
19499 }
19500
19501
19502
19503 type ProtectionPolicyResourceListIterator struct {
19504 i int
19505 page ProtectionPolicyResourceListPage
19506 }
19507
19508
19509
19510 func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19511 if tracing.IsEnabled() {
19512 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext")
19513 defer func() {
19514 sc := -1
19515 if iter.Response().Response.Response != nil {
19516 sc = iter.Response().Response.Response.StatusCode
19517 }
19518 tracing.EndSpan(ctx, sc, err)
19519 }()
19520 }
19521 iter.i++
19522 if iter.i < len(iter.page.Values()) {
19523 return nil
19524 }
19525 err = iter.page.NextWithContext(ctx)
19526 if err != nil {
19527 iter.i--
19528 return err
19529 }
19530 iter.i = 0
19531 return nil
19532 }
19533
19534
19535
19536
19537 func (iter *ProtectionPolicyResourceListIterator) Next() error {
19538 return iter.NextWithContext(context.Background())
19539 }
19540
19541
19542 func (iter ProtectionPolicyResourceListIterator) NotDone() bool {
19543 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19544 }
19545
19546
19547 func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList {
19548 return iter.page.Response()
19549 }
19550
19551
19552
19553 func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource {
19554 if !iter.page.NotDone() {
19555 return ProtectionPolicyResource{}
19556 }
19557 return iter.page.Values()[iter.i]
19558 }
19559
19560
19561 func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator {
19562 return ProtectionPolicyResourceListIterator{page: page}
19563 }
19564
19565
19566 func (pprl ProtectionPolicyResourceList) IsEmpty() bool {
19567 return pprl.Value == nil || len(*pprl.Value) == 0
19568 }
19569
19570
19571 func (pprl ProtectionPolicyResourceList) hasNextLink() bool {
19572 return pprl.NextLink != nil && len(*pprl.NextLink) != 0
19573 }
19574
19575
19576
19577 func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) {
19578 if !pprl.hasNextLink() {
19579 return nil, nil
19580 }
19581 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19582 autorest.AsJSON(),
19583 autorest.AsGet(),
19584 autorest.WithBaseURL(to.String(pprl.NextLink)))
19585 }
19586
19587
19588 type ProtectionPolicyResourceListPage struct {
19589 fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)
19590 pprl ProtectionPolicyResourceList
19591 }
19592
19593
19594
19595 func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) {
19596 if tracing.IsEnabled() {
19597 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext")
19598 defer func() {
19599 sc := -1
19600 if page.Response().Response.Response != nil {
19601 sc = page.Response().Response.Response.StatusCode
19602 }
19603 tracing.EndSpan(ctx, sc, err)
19604 }()
19605 }
19606 for {
19607 next, err := page.fn(ctx, page.pprl)
19608 if err != nil {
19609 return err
19610 }
19611 page.pprl = next
19612 if !next.hasNextLink() || !next.IsEmpty() {
19613 break
19614 }
19615 }
19616 return nil
19617 }
19618
19619
19620
19621
19622 func (page *ProtectionPolicyResourceListPage) Next() error {
19623 return page.NextWithContext(context.Background())
19624 }
19625
19626
19627 func (page ProtectionPolicyResourceListPage) NotDone() bool {
19628 return !page.pprl.IsEmpty()
19629 }
19630
19631
19632 func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList {
19633 return page.pprl
19634 }
19635
19636
19637 func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource {
19638 if page.pprl.IsEmpty() {
19639 return nil
19640 }
19641 return *page.pprl.Value
19642 }
19643
19644
19645 func NewProtectionPolicyResourceListPage(cur ProtectionPolicyResourceList, getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage {
19646 return ProtectionPolicyResourceListPage{
19647 fn: getNextPage,
19648 pprl: cur,
19649 }
19650 }
19651
19652
19653 type BasicRecoveryPoint interface {
19654 AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool)
19655 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
19656 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
19657 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
19658 AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool)
19659 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
19660 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
19661 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
19662 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
19663 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
19664 AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool)
19665 AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool)
19666 AsRecoveryPoint() (*RecoveryPoint, bool)
19667 }
19668
19669
19670 type RecoveryPoint struct {
19671
19672 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
19673 }
19674
19675 func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) {
19676 var m map[string]interface{}
19677 err := json.Unmarshal(body, &m)
19678 if err != nil {
19679 return nil, err
19680 }
19681
19682 switch m["objectType"] {
19683 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint):
19684 var afsrp AzureFileShareRecoveryPoint
19685 err := json.Unmarshal(body, &afsrp)
19686 return afsrp, err
19687 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
19688 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
19689 err := json.Unmarshal(body, &awpitrp)
19690 return awpitrp, err
19691 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint):
19692 var awrp AzureWorkloadRecoveryPoint
19693 err := json.Unmarshal(body, &awrp)
19694 return awrp, err
19695 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
19696 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
19697 err := json.Unmarshal(body, &awshpitrp)
19698 return awshpitrp, err
19699 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
19700 var awshrp AzureWorkloadSAPHanaRecoveryPoint
19701 err := json.Unmarshal(body, &awshrp)
19702 return awshrp, err
19703 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
19704 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
19705 err := json.Unmarshal(body, &awspitrp)
19706 return awspitrp, err
19707 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint):
19708 var awsrp AzureWorkloadSQLRecoveryPoint
19709 err := json.Unmarshal(body, &awsrp)
19710 return awsrp, err
19711 case string(ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint):
19712 var grp GenericRecoveryPoint
19713 err := json.Unmarshal(body, &grp)
19714 return grp, err
19715 case string(ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint):
19716 var ivrp IaasVMRecoveryPoint
19717 err := json.Unmarshal(body, &ivrp)
19718 return ivrp, err
19719 default:
19720 var rp RecoveryPoint
19721 err := json.Unmarshal(body, &rp)
19722 return rp, err
19723 }
19724 }
19725 func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) {
19726 var rawMessages []*json.RawMessage
19727 err := json.Unmarshal(body, &rawMessages)
19728 if err != nil {
19729 return nil, err
19730 }
19731
19732 rpArray := make([]BasicRecoveryPoint, len(rawMessages))
19733
19734 for index, rawMessage := range rawMessages {
19735 rp, err := unmarshalBasicRecoveryPoint(*rawMessage)
19736 if err != nil {
19737 return nil, err
19738 }
19739 rpArray[index] = rp
19740 }
19741 return rpArray, nil
19742 }
19743
19744
19745 func (rp RecoveryPoint) MarshalJSON() ([]byte, error) {
19746 rp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint
19747 objectMap := make(map[string]interface{})
19748 if rp.ObjectType != "" {
19749 objectMap["objectType"] = rp.ObjectType
19750 }
19751 return json.Marshal(objectMap)
19752 }
19753
19754
19755 func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
19756 return nil, false
19757 }
19758
19759
19760 func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
19761 return nil, false
19762 }
19763
19764
19765 func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
19766 return nil, false
19767 }
19768
19769
19770 func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
19771 return nil, false
19772 }
19773
19774
19775 func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
19776 return nil, false
19777 }
19778
19779
19780 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
19781 return nil, false
19782 }
19783
19784
19785 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
19786 return nil, false
19787 }
19788
19789
19790 func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
19791 return nil, false
19792 }
19793
19794
19795 func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
19796 return nil, false
19797 }
19798
19799
19800 func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
19801 return nil, false
19802 }
19803
19804
19805 func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
19806 return nil, false
19807 }
19808
19809
19810 func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
19811 return nil, false
19812 }
19813
19814
19815 func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
19816 return &rp, true
19817 }
19818
19819
19820 func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
19821 return &rp, true
19822 }
19823
19824
19825 type RecoveryPointDiskConfiguration struct {
19826
19827 NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"`
19828
19829 NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"`
19830
19831 IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"`
19832
19833 ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"`
19834 }
19835
19836
19837 type RecoveryPointMoveReadinessInfo struct {
19838 IsReadyForMove *bool `json:"isReadyForMove,omitempty"`
19839 AdditionalInfo *string `json:"additionalInfo,omitempty"`
19840 }
19841
19842
19843 type RecoveryPointRehydrationInfo struct {
19844
19845
19846 RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"`
19847
19848 RehydrationPriority RehydrationPriority `json:"rehydrationPriority,omitempty"`
19849 }
19850
19851
19852
19853 type RecoveryPointResource struct {
19854 autorest.Response `json:"-"`
19855
19856 Properties BasicRecoveryPoint `json:"properties,omitempty"`
19857
19858 ID *string `json:"id,omitempty"`
19859
19860 Name *string `json:"name,omitempty"`
19861
19862 Type *string `json:"type,omitempty"`
19863
19864 Location *string `json:"location,omitempty"`
19865
19866 Tags map[string]*string `json:"tags"`
19867
19868 ETag *string `json:"eTag,omitempty"`
19869 }
19870
19871
19872 func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) {
19873 objectMap := make(map[string]interface{})
19874 objectMap["properties"] = rpr.Properties
19875 if rpr.Location != nil {
19876 objectMap["location"] = rpr.Location
19877 }
19878 if rpr.Tags != nil {
19879 objectMap["tags"] = rpr.Tags
19880 }
19881 if rpr.ETag != nil {
19882 objectMap["eTag"] = rpr.ETag
19883 }
19884 return json.Marshal(objectMap)
19885 }
19886
19887
19888 func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error {
19889 var m map[string]*json.RawMessage
19890 err := json.Unmarshal(body, &m)
19891 if err != nil {
19892 return err
19893 }
19894 for k, v := range m {
19895 switch k {
19896 case "properties":
19897 if v != nil {
19898 properties, err := unmarshalBasicRecoveryPoint(*v)
19899 if err != nil {
19900 return err
19901 }
19902 rpr.Properties = properties
19903 }
19904 case "id":
19905 if v != nil {
19906 var ID string
19907 err = json.Unmarshal(*v, &ID)
19908 if err != nil {
19909 return err
19910 }
19911 rpr.ID = &ID
19912 }
19913 case "name":
19914 if v != nil {
19915 var name string
19916 err = json.Unmarshal(*v, &name)
19917 if err != nil {
19918 return err
19919 }
19920 rpr.Name = &name
19921 }
19922 case "type":
19923 if v != nil {
19924 var typeVar string
19925 err = json.Unmarshal(*v, &typeVar)
19926 if err != nil {
19927 return err
19928 }
19929 rpr.Type = &typeVar
19930 }
19931 case "location":
19932 if v != nil {
19933 var location string
19934 err = json.Unmarshal(*v, &location)
19935 if err != nil {
19936 return err
19937 }
19938 rpr.Location = &location
19939 }
19940 case "tags":
19941 if v != nil {
19942 var tags map[string]*string
19943 err = json.Unmarshal(*v, &tags)
19944 if err != nil {
19945 return err
19946 }
19947 rpr.Tags = tags
19948 }
19949 case "eTag":
19950 if v != nil {
19951 var eTag string
19952 err = json.Unmarshal(*v, &eTag)
19953 if err != nil {
19954 return err
19955 }
19956 rpr.ETag = &eTag
19957 }
19958 }
19959 }
19960
19961 return nil
19962 }
19963
19964
19965 type RecoveryPointResourceList struct {
19966 autorest.Response `json:"-"`
19967
19968 Value *[]RecoveryPointResource `json:"value,omitempty"`
19969
19970 NextLink *string `json:"nextLink,omitempty"`
19971 }
19972
19973
19974 type RecoveryPointResourceListIterator struct {
19975 i int
19976 page RecoveryPointResourceListPage
19977 }
19978
19979
19980
19981 func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19982 if tracing.IsEnabled() {
19983 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext")
19984 defer func() {
19985 sc := -1
19986 if iter.Response().Response.Response != nil {
19987 sc = iter.Response().Response.Response.StatusCode
19988 }
19989 tracing.EndSpan(ctx, sc, err)
19990 }()
19991 }
19992 iter.i++
19993 if iter.i < len(iter.page.Values()) {
19994 return nil
19995 }
19996 err = iter.page.NextWithContext(ctx)
19997 if err != nil {
19998 iter.i--
19999 return err
20000 }
20001 iter.i = 0
20002 return nil
20003 }
20004
20005
20006
20007
20008 func (iter *RecoveryPointResourceListIterator) Next() error {
20009 return iter.NextWithContext(context.Background())
20010 }
20011
20012
20013 func (iter RecoveryPointResourceListIterator) NotDone() bool {
20014 return iter.page.NotDone() && iter.i < len(iter.page.Values())
20015 }
20016
20017
20018 func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList {
20019 return iter.page.Response()
20020 }
20021
20022
20023
20024 func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource {
20025 if !iter.page.NotDone() {
20026 return RecoveryPointResource{}
20027 }
20028 return iter.page.Values()[iter.i]
20029 }
20030
20031
20032 func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator {
20033 return RecoveryPointResourceListIterator{page: page}
20034 }
20035
20036
20037 func (rprl RecoveryPointResourceList) IsEmpty() bool {
20038 return rprl.Value == nil || len(*rprl.Value) == 0
20039 }
20040
20041
20042 func (rprl RecoveryPointResourceList) hasNextLink() bool {
20043 return rprl.NextLink != nil && len(*rprl.NextLink) != 0
20044 }
20045
20046
20047
20048 func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) {
20049 if !rprl.hasNextLink() {
20050 return nil, nil
20051 }
20052 return autorest.Prepare((&http.Request{}).WithContext(ctx),
20053 autorest.AsJSON(),
20054 autorest.AsGet(),
20055 autorest.WithBaseURL(to.String(rprl.NextLink)))
20056 }
20057
20058
20059 type RecoveryPointResourceListPage struct {
20060 fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)
20061 rprl RecoveryPointResourceList
20062 }
20063
20064
20065
20066 func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) {
20067 if tracing.IsEnabled() {
20068 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext")
20069 defer func() {
20070 sc := -1
20071 if page.Response().Response.Response != nil {
20072 sc = page.Response().Response.Response.StatusCode
20073 }
20074 tracing.EndSpan(ctx, sc, err)
20075 }()
20076 }
20077 for {
20078 next, err := page.fn(ctx, page.rprl)
20079 if err != nil {
20080 return err
20081 }
20082 page.rprl = next
20083 if !next.hasNextLink() || !next.IsEmpty() {
20084 break
20085 }
20086 }
20087 return nil
20088 }
20089
20090
20091
20092
20093 func (page *RecoveryPointResourceListPage) Next() error {
20094 return page.NextWithContext(context.Background())
20095 }
20096
20097
20098 func (page RecoveryPointResourceListPage) NotDone() bool {
20099 return !page.rprl.IsEmpty()
20100 }
20101
20102
20103 func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList {
20104 return page.rprl
20105 }
20106
20107
20108 func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource {
20109 if page.rprl.IsEmpty() {
20110 return nil
20111 }
20112 return *page.rprl.Value
20113 }
20114
20115
20116 func NewRecoveryPointResourceListPage(cur RecoveryPointResourceList, getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage {
20117 return RecoveryPointResourceListPage{
20118 fn: getNextPage,
20119 rprl: cur,
20120 }
20121 }
20122
20123
20124 type RecoveryPointTierInformation struct {
20125
20126 Type RecoveryPointTierType `json:"type,omitempty"`
20127
20128 Status RecoveryPointTierStatus `json:"status,omitempty"`
20129
20130 ExtendedInfo map[string]*string `json:"extendedInfo"`
20131 }
20132
20133
20134 func (rpti RecoveryPointTierInformation) MarshalJSON() ([]byte, error) {
20135 objectMap := make(map[string]interface{})
20136 if rpti.Type != "" {
20137 objectMap["type"] = rpti.Type
20138 }
20139 if rpti.Status != "" {
20140 objectMap["status"] = rpti.Status
20141 }
20142 if rpti.ExtendedInfo != nil {
20143 objectMap["extendedInfo"] = rpti.ExtendedInfo
20144 }
20145 return json.Marshal(objectMap)
20146 }
20147
20148
20149 type RecoveryPointTierInformationV2 struct {
20150
20151 Type RecoveryPointTierType `json:"type,omitempty"`
20152
20153 Status RecoveryPointTierStatus `json:"status,omitempty"`
20154
20155 ExtendedInfo map[string]*string `json:"extendedInfo"`
20156 }
20157
20158
20159 func (rptiv RecoveryPointTierInformationV2) MarshalJSON() ([]byte, error) {
20160 objectMap := make(map[string]interface{})
20161 if rptiv.Type != "" {
20162 objectMap["type"] = rptiv.Type
20163 }
20164 if rptiv.Status != "" {
20165 objectMap["status"] = rptiv.Status
20166 }
20167 if rptiv.ExtendedInfo != nil {
20168 objectMap["extendedInfo"] = rptiv.ExtendedInfo
20169 }
20170 return json.Marshal(objectMap)
20171 }
20172
20173
20174 type BasicRequest interface {
20175 AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool)
20176 AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool)
20177 AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool)
20178 AsRequest() (*Request, bool)
20179 }
20180
20181
20182 type Request struct {
20183
20184 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
20185 }
20186
20187 func unmarshalBasicRequest(body []byte) (BasicRequest, error) {
20188 var m map[string]interface{}
20189 err := json.Unmarshal(body, &m)
20190 if err != nil {
20191 return nil, err
20192 }
20193
20194 switch m["objectType"] {
20195 case string(ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest):
20196 var afsbr AzureFileShareBackupRequest
20197 err := json.Unmarshal(body, &afsbr)
20198 return afsbr, err
20199 case string(ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest):
20200 var awbr AzureWorkloadBackupRequest
20201 err := json.Unmarshal(body, &awbr)
20202 return awbr, err
20203 case string(ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest):
20204 var ivbr IaasVMBackupRequest
20205 err := json.Unmarshal(body, &ivbr)
20206 return ivbr, err
20207 default:
20208 var r Request
20209 err := json.Unmarshal(body, &r)
20210 return r, err
20211 }
20212 }
20213 func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) {
20214 var rawMessages []*json.RawMessage
20215 err := json.Unmarshal(body, &rawMessages)
20216 if err != nil {
20217 return nil, err
20218 }
20219
20220 rArray := make([]BasicRequest, len(rawMessages))
20221
20222 for index, rawMessage := range rawMessages {
20223 r, err := unmarshalBasicRequest(*rawMessage)
20224 if err != nil {
20225 return nil, err
20226 }
20227 rArray[index] = r
20228 }
20229 return rArray, nil
20230 }
20231
20232
20233 func (r Request) MarshalJSON() ([]byte, error) {
20234 r.ObjectType = ObjectTypeBasicRequestObjectTypeBackupRequest
20235 objectMap := make(map[string]interface{})
20236 if r.ObjectType != "" {
20237 objectMap["objectType"] = r.ObjectType
20238 }
20239 return json.Marshal(objectMap)
20240 }
20241
20242
20243 func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
20244 return nil, false
20245 }
20246
20247
20248 func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
20249 return nil, false
20250 }
20251
20252
20253 func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
20254 return nil, false
20255 }
20256
20257
20258 func (r Request) AsRequest() (*Request, bool) {
20259 return &r, true
20260 }
20261
20262
20263 func (r Request) AsBasicRequest() (BasicRequest, bool) {
20264 return &r, true
20265 }
20266
20267
20268
20269 type RequestResource struct {
20270
20271 Properties BasicRequest `json:"properties,omitempty"`
20272
20273 ID *string `json:"id,omitempty"`
20274
20275 Name *string `json:"name,omitempty"`
20276
20277 Type *string `json:"type,omitempty"`
20278
20279 Location *string `json:"location,omitempty"`
20280
20281 Tags map[string]*string `json:"tags"`
20282
20283 ETag *string `json:"eTag,omitempty"`
20284 }
20285
20286
20287 func (rr RequestResource) MarshalJSON() ([]byte, error) {
20288 objectMap := make(map[string]interface{})
20289 objectMap["properties"] = rr.Properties
20290 if rr.Location != nil {
20291 objectMap["location"] = rr.Location
20292 }
20293 if rr.Tags != nil {
20294 objectMap["tags"] = rr.Tags
20295 }
20296 if rr.ETag != nil {
20297 objectMap["eTag"] = rr.ETag
20298 }
20299 return json.Marshal(objectMap)
20300 }
20301
20302
20303 func (rr *RequestResource) UnmarshalJSON(body []byte) error {
20304 var m map[string]*json.RawMessage
20305 err := json.Unmarshal(body, &m)
20306 if err != nil {
20307 return err
20308 }
20309 for k, v := range m {
20310 switch k {
20311 case "properties":
20312 if v != nil {
20313 properties, err := unmarshalBasicRequest(*v)
20314 if err != nil {
20315 return err
20316 }
20317 rr.Properties = properties
20318 }
20319 case "id":
20320 if v != nil {
20321 var ID string
20322 err = json.Unmarshal(*v, &ID)
20323 if err != nil {
20324 return err
20325 }
20326 rr.ID = &ID
20327 }
20328 case "name":
20329 if v != nil {
20330 var name string
20331 err = json.Unmarshal(*v, &name)
20332 if err != nil {
20333 return err
20334 }
20335 rr.Name = &name
20336 }
20337 case "type":
20338 if v != nil {
20339 var typeVar string
20340 err = json.Unmarshal(*v, &typeVar)
20341 if err != nil {
20342 return err
20343 }
20344 rr.Type = &typeVar
20345 }
20346 case "location":
20347 if v != nil {
20348 var location string
20349 err = json.Unmarshal(*v, &location)
20350 if err != nil {
20351 return err
20352 }
20353 rr.Location = &location
20354 }
20355 case "tags":
20356 if v != nil {
20357 var tags map[string]*string
20358 err = json.Unmarshal(*v, &tags)
20359 if err != nil {
20360 return err
20361 }
20362 rr.Tags = tags
20363 }
20364 case "eTag":
20365 if v != nil {
20366 var eTag string
20367 err = json.Unmarshal(*v, &eTag)
20368 if err != nil {
20369 return err
20370 }
20371 rr.ETag = &eTag
20372 }
20373 }
20374 }
20375
20376 return nil
20377 }
20378
20379
20380 type Resource struct {
20381
20382 ID *string `json:"id,omitempty"`
20383
20384 Name *string `json:"name,omitempty"`
20385
20386 Type *string `json:"type,omitempty"`
20387
20388 Location *string `json:"location,omitempty"`
20389
20390 Tags map[string]*string `json:"tags"`
20391
20392 ETag *string `json:"eTag,omitempty"`
20393 }
20394
20395
20396 func (r Resource) MarshalJSON() ([]byte, error) {
20397 objectMap := make(map[string]interface{})
20398 if r.Location != nil {
20399 objectMap["location"] = r.Location
20400 }
20401 if r.Tags != nil {
20402 objectMap["tags"] = r.Tags
20403 }
20404 if r.ETag != nil {
20405 objectMap["eTag"] = r.ETag
20406 }
20407 return json.Marshal(objectMap)
20408 }
20409
20410
20411 type ResourceConfig struct {
20412
20413 StorageModelType StorageType `json:"storageModelType,omitempty"`
20414
20415 StorageType StorageType `json:"storageType,omitempty"`
20416
20417 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
20418
20419 CrossRegionRestoreFlag *bool `json:"crossRegionRestoreFlag,omitempty"`
20420
20421 DedupState DedupState `json:"dedupState,omitempty"`
20422
20423 XcoolState XcoolState `json:"xcoolState,omitempty"`
20424 }
20425
20426
20427 type ResourceConfigResource struct {
20428 autorest.Response `json:"-"`
20429
20430 Properties *ResourceConfig `json:"properties,omitempty"`
20431
20432 ID *string `json:"id,omitempty"`
20433
20434 Name *string `json:"name,omitempty"`
20435
20436 Type *string `json:"type,omitempty"`
20437
20438 Location *string `json:"location,omitempty"`
20439
20440 Tags map[string]*string `json:"tags"`
20441
20442 ETag *string `json:"eTag,omitempty"`
20443 }
20444
20445
20446 func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) {
20447 objectMap := make(map[string]interface{})
20448 if rcr.Properties != nil {
20449 objectMap["properties"] = rcr.Properties
20450 }
20451 if rcr.Location != nil {
20452 objectMap["location"] = rcr.Location
20453 }
20454 if rcr.Tags != nil {
20455 objectMap["tags"] = rcr.Tags
20456 }
20457 if rcr.ETag != nil {
20458 objectMap["eTag"] = rcr.ETag
20459 }
20460 return json.Marshal(objectMap)
20461 }
20462
20463
20464 type ResourceEncryptionConfig struct {
20465
20466 EncryptionAtRestType EncryptionAtRestType `json:"encryptionAtRestType,omitempty"`
20467
20468 KeyURI *string `json:"keyUri,omitempty"`
20469
20470 SubscriptionID *string `json:"subscriptionId,omitempty"`
20471
20472 LastUpdateStatus LastUpdateStatus `json:"lastUpdateStatus,omitempty"`
20473
20474 InfrastructureEncryptionState InfrastructureEncryptionState `json:"infrastructureEncryptionState,omitempty"`
20475 }
20476
20477
20478 type ResourceEncryptionConfigExtended struct {
20479
20480 UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"`
20481
20482 UseSystemAssignedIdentity *bool `json:"useSystemAssignedIdentity,omitempty"`
20483
20484 EncryptionAtRestType EncryptionAtRestType `json:"encryptionAtRestType,omitempty"`
20485
20486 KeyURI *string `json:"keyUri,omitempty"`
20487
20488 SubscriptionID *string `json:"subscriptionId,omitempty"`
20489
20490 LastUpdateStatus LastUpdateStatus `json:"lastUpdateStatus,omitempty"`
20491
20492 InfrastructureEncryptionState InfrastructureEncryptionState `json:"infrastructureEncryptionState,omitempty"`
20493 }
20494
20495
20496 type ResourceEncryptionConfigExtendedResource struct {
20497 autorest.Response `json:"-"`
20498
20499 Properties *ResourceEncryptionConfigExtended `json:"properties,omitempty"`
20500
20501 ID *string `json:"id,omitempty"`
20502
20503 Name *string `json:"name,omitempty"`
20504
20505 Type *string `json:"type,omitempty"`
20506
20507 Location *string `json:"location,omitempty"`
20508
20509 Tags map[string]*string `json:"tags"`
20510
20511 ETag *string `json:"eTag,omitempty"`
20512 }
20513
20514
20515 func (recer ResourceEncryptionConfigExtendedResource) MarshalJSON() ([]byte, error) {
20516 objectMap := make(map[string]interface{})
20517 if recer.Properties != nil {
20518 objectMap["properties"] = recer.Properties
20519 }
20520 if recer.Location != nil {
20521 objectMap["location"] = recer.Location
20522 }
20523 if recer.Tags != nil {
20524 objectMap["tags"] = recer.Tags
20525 }
20526 if recer.ETag != nil {
20527 objectMap["eTag"] = recer.ETag
20528 }
20529 return json.Marshal(objectMap)
20530 }
20531
20532
20533 type ResourceEncryptionConfigResource struct {
20534
20535 Properties *ResourceEncryptionConfig `json:"properties,omitempty"`
20536
20537 ID *string `json:"id,omitempty"`
20538
20539 Name *string `json:"name,omitempty"`
20540
20541 Type *string `json:"type,omitempty"`
20542
20543 Location *string `json:"location,omitempty"`
20544
20545 Tags map[string]*string `json:"tags"`
20546
20547 ETag *string `json:"eTag,omitempty"`
20548 }
20549
20550
20551 func (recr ResourceEncryptionConfigResource) MarshalJSON() ([]byte, error) {
20552 objectMap := make(map[string]interface{})
20553 if recr.Properties != nil {
20554 objectMap["properties"] = recr.Properties
20555 }
20556 if recr.Location != nil {
20557 objectMap["location"] = recr.Location
20558 }
20559 if recr.Tags != nil {
20560 objectMap["tags"] = recr.Tags
20561 }
20562 if recr.ETag != nil {
20563 objectMap["eTag"] = recr.ETag
20564 }
20565 return json.Marshal(objectMap)
20566 }
20567
20568
20569 type ResourceGuardOperationDetail struct {
20570 VaultCriticalOperation *string `json:"vaultCriticalOperation,omitempty"`
20571 DefaultResourceRequest *string `json:"defaultResourceRequest,omitempty"`
20572 }
20573
20574
20575 type ResourceGuardProxyBase struct {
20576 ResourceGuardResourceID *string `json:"resourceGuardResourceId,omitempty"`
20577 ResourceGuardOperationDetails *[]ResourceGuardOperationDetail `json:"resourceGuardOperationDetails,omitempty"`
20578 LastUpdatedTime *string `json:"lastUpdatedTime,omitempty"`
20579 Description *string `json:"description,omitempty"`
20580 }
20581
20582
20583 type ResourceGuardProxyBaseResource struct {
20584 autorest.Response `json:"-"`
20585
20586 Properties *ResourceGuardProxyBase `json:"properties,omitempty"`
20587
20588 ID *string `json:"id,omitempty"`
20589
20590 Name *string `json:"name,omitempty"`
20591
20592 Type *string `json:"type,omitempty"`
20593
20594 Location *string `json:"location,omitempty"`
20595
20596 Tags map[string]*string `json:"tags"`
20597
20598 ETag *string `json:"eTag,omitempty"`
20599 }
20600
20601
20602 func (rgpbr ResourceGuardProxyBaseResource) MarshalJSON() ([]byte, error) {
20603 objectMap := make(map[string]interface{})
20604 if rgpbr.Properties != nil {
20605 objectMap["properties"] = rgpbr.Properties
20606 }
20607 if rgpbr.Location != nil {
20608 objectMap["location"] = rgpbr.Location
20609 }
20610 if rgpbr.Tags != nil {
20611 objectMap["tags"] = rgpbr.Tags
20612 }
20613 if rgpbr.ETag != nil {
20614 objectMap["eTag"] = rgpbr.ETag
20615 }
20616 return json.Marshal(objectMap)
20617 }
20618
20619
20620 type ResourceGuardProxyBaseResourceList struct {
20621 autorest.Response `json:"-"`
20622
20623 Value *[]ResourceGuardProxyBaseResource `json:"value,omitempty"`
20624
20625 NextLink *string `json:"nextLink,omitempty"`
20626 }
20627
20628
20629
20630 type ResourceGuardProxyBaseResourceListIterator struct {
20631 i int
20632 page ResourceGuardProxyBaseResourceListPage
20633 }
20634
20635
20636
20637 func (iter *ResourceGuardProxyBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) {
20638 if tracing.IsEnabled() {
20639 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardProxyBaseResourceListIterator.NextWithContext")
20640 defer func() {
20641 sc := -1
20642 if iter.Response().Response.Response != nil {
20643 sc = iter.Response().Response.Response.StatusCode
20644 }
20645 tracing.EndSpan(ctx, sc, err)
20646 }()
20647 }
20648 iter.i++
20649 if iter.i < len(iter.page.Values()) {
20650 return nil
20651 }
20652 err = iter.page.NextWithContext(ctx)
20653 if err != nil {
20654 iter.i--
20655 return err
20656 }
20657 iter.i = 0
20658 return nil
20659 }
20660
20661
20662
20663
20664 func (iter *ResourceGuardProxyBaseResourceListIterator) Next() error {
20665 return iter.NextWithContext(context.Background())
20666 }
20667
20668
20669 func (iter ResourceGuardProxyBaseResourceListIterator) NotDone() bool {
20670 return iter.page.NotDone() && iter.i < len(iter.page.Values())
20671 }
20672
20673
20674 func (iter ResourceGuardProxyBaseResourceListIterator) Response() ResourceGuardProxyBaseResourceList {
20675 return iter.page.Response()
20676 }
20677
20678
20679
20680 func (iter ResourceGuardProxyBaseResourceListIterator) Value() ResourceGuardProxyBaseResource {
20681 if !iter.page.NotDone() {
20682 return ResourceGuardProxyBaseResource{}
20683 }
20684 return iter.page.Values()[iter.i]
20685 }
20686
20687
20688 func NewResourceGuardProxyBaseResourceListIterator(page ResourceGuardProxyBaseResourceListPage) ResourceGuardProxyBaseResourceListIterator {
20689 return ResourceGuardProxyBaseResourceListIterator{page: page}
20690 }
20691
20692
20693 func (rgpbrl ResourceGuardProxyBaseResourceList) IsEmpty() bool {
20694 return rgpbrl.Value == nil || len(*rgpbrl.Value) == 0
20695 }
20696
20697
20698 func (rgpbrl ResourceGuardProxyBaseResourceList) hasNextLink() bool {
20699 return rgpbrl.NextLink != nil && len(*rgpbrl.NextLink) != 0
20700 }
20701
20702
20703
20704 func (rgpbrl ResourceGuardProxyBaseResourceList) resourceGuardProxyBaseResourceListPreparer(ctx context.Context) (*http.Request, error) {
20705 if !rgpbrl.hasNextLink() {
20706 return nil, nil
20707 }
20708 return autorest.Prepare((&http.Request{}).WithContext(ctx),
20709 autorest.AsJSON(),
20710 autorest.AsGet(),
20711 autorest.WithBaseURL(to.String(rgpbrl.NextLink)))
20712 }
20713
20714
20715 type ResourceGuardProxyBaseResourceListPage struct {
20716 fn func(context.Context, ResourceGuardProxyBaseResourceList) (ResourceGuardProxyBaseResourceList, error)
20717 rgpbrl ResourceGuardProxyBaseResourceList
20718 }
20719
20720
20721
20722 func (page *ResourceGuardProxyBaseResourceListPage) NextWithContext(ctx context.Context) (err error) {
20723 if tracing.IsEnabled() {
20724 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardProxyBaseResourceListPage.NextWithContext")
20725 defer func() {
20726 sc := -1
20727 if page.Response().Response.Response != nil {
20728 sc = page.Response().Response.Response.StatusCode
20729 }
20730 tracing.EndSpan(ctx, sc, err)
20731 }()
20732 }
20733 for {
20734 next, err := page.fn(ctx, page.rgpbrl)
20735 if err != nil {
20736 return err
20737 }
20738 page.rgpbrl = next
20739 if !next.hasNextLink() || !next.IsEmpty() {
20740 break
20741 }
20742 }
20743 return nil
20744 }
20745
20746
20747
20748
20749 func (page *ResourceGuardProxyBaseResourceListPage) Next() error {
20750 return page.NextWithContext(context.Background())
20751 }
20752
20753
20754 func (page ResourceGuardProxyBaseResourceListPage) NotDone() bool {
20755 return !page.rgpbrl.IsEmpty()
20756 }
20757
20758
20759 func (page ResourceGuardProxyBaseResourceListPage) Response() ResourceGuardProxyBaseResourceList {
20760 return page.rgpbrl
20761 }
20762
20763
20764 func (page ResourceGuardProxyBaseResourceListPage) Values() []ResourceGuardProxyBaseResource {
20765 if page.rgpbrl.IsEmpty() {
20766 return nil
20767 }
20768 return *page.rgpbrl.Value
20769 }
20770
20771
20772 func NewResourceGuardProxyBaseResourceListPage(cur ResourceGuardProxyBaseResourceList, getNextPage func(context.Context, ResourceGuardProxyBaseResourceList) (ResourceGuardProxyBaseResourceList, error)) ResourceGuardProxyBaseResourceListPage {
20773 return ResourceGuardProxyBaseResourceListPage{
20774 fn: getNextPage,
20775 rgpbrl: cur,
20776 }
20777 }
20778
20779
20780 type ResourceHealthDetails struct {
20781
20782 Code *int32 `json:"code,omitempty"`
20783
20784 Title *string `json:"title,omitempty"`
20785
20786 Message *string `json:"message,omitempty"`
20787
20788 Recommendations *[]string `json:"recommendations,omitempty"`
20789 }
20790
20791
20792 func (rhd ResourceHealthDetails) MarshalJSON() ([]byte, error) {
20793 objectMap := make(map[string]interface{})
20794 return json.Marshal(objectMap)
20795 }
20796
20797
20798 type ResourceList struct {
20799
20800 NextLink *string `json:"nextLink,omitempty"`
20801 }
20802
20803
20804 type ResourceVaultConfig struct {
20805
20806 StorageModelType StorageType `json:"storageModelType,omitempty"`
20807
20808 StorageType StorageType `json:"storageType,omitempty"`
20809
20810 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
20811
20812 EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"`
20813
20814 SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"`
20815
20816 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
20817
20818 IsSoftDeleteFeatureStateEditable *bool `json:"isSoftDeleteFeatureStateEditable,omitempty"`
20819 }
20820
20821
20822 type ResourceVaultConfigResource struct {
20823 autorest.Response `json:"-"`
20824
20825 Properties *ResourceVaultConfig `json:"properties,omitempty"`
20826
20827 ID *string `json:"id,omitempty"`
20828
20829 Name *string `json:"name,omitempty"`
20830
20831 Type *string `json:"type,omitempty"`
20832
20833 Location *string `json:"location,omitempty"`
20834
20835 Tags map[string]*string `json:"tags"`
20836
20837 ETag *string `json:"eTag,omitempty"`
20838 }
20839
20840
20841 func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) {
20842 objectMap := make(map[string]interface{})
20843 if rvcr.Properties != nil {
20844 objectMap["properties"] = rvcr.Properties
20845 }
20846 if rvcr.Location != nil {
20847 objectMap["location"] = rvcr.Location
20848 }
20849 if rvcr.Tags != nil {
20850 objectMap["tags"] = rvcr.Tags
20851 }
20852 if rvcr.ETag != nil {
20853 objectMap["eTag"] = rvcr.ETag
20854 }
20855 return json.Marshal(objectMap)
20856 }
20857
20858
20859 type RestoreFileSpecs struct {
20860
20861 Path *string `json:"path,omitempty"`
20862
20863 FileSpecType *string `json:"fileSpecType,omitempty"`
20864
20865 TargetFolderPath *string `json:"targetFolderPath,omitempty"`
20866 }
20867
20868
20869 type BasicRestoreRequest interface {
20870 AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool)
20871 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
20872 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
20873 AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool)
20874 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
20875 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
20876 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
20877 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
20878 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
20879 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
20880 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
20881 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
20882 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
20883 AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool)
20884 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
20885 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
20886 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
20887 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
20888 AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool)
20889 AsRestoreRequest() (*RestoreRequest, bool)
20890 }
20891
20892
20893
20894 type RestoreRequest struct {
20895
20896 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
20897 }
20898
20899 func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) {
20900 var m map[string]interface{}
20901 err := json.Unmarshal(body, &m)
20902 if err != nil {
20903 return nil, err
20904 }
20905
20906 switch m["objectType"] {
20907 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest):
20908 var afsrr AzureFileShareRestoreRequest
20909 err := json.Unmarshal(body, &afsrr)
20910 return afsrr, err
20911 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest):
20912 var awpitrr AzureWorkloadPointInTimeRestoreRequest
20913 err := json.Unmarshal(body, &awpitrr)
20914 return awpitrr, err
20915 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest):
20916 var awrr AzureWorkloadRestoreRequest
20917 err := json.Unmarshal(body, &awrr)
20918 return awrr, err
20919 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
20920 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
20921 err := json.Unmarshal(body, &awshpitrr)
20922 return awshpitrr, err
20923 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest):
20924 var awshrr AzureWorkloadSAPHanaRestoreRequest
20925 err := json.Unmarshal(body, &awshrr)
20926 return awshrr, err
20927 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
20928 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
20929 err := json.Unmarshal(body, &awspitrr)
20930 return awspitrr, err
20931 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest):
20932 var awsrr AzureWorkloadSQLRestoreRequest
20933 err := json.Unmarshal(body, &awsrr)
20934 return awsrr, err
20935 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest):
20936 var ivrr IaasVMRestoreRequest
20937 err := json.Unmarshal(body, &ivrr)
20938 return ivrr, err
20939 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
20940 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
20941 err := json.Unmarshal(body, &awshpitrwrr)
20942 return awshpitrwrr, err
20943 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
20944 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
20945 err := json.Unmarshal(body, &awshrwrr)
20946 return awshrwrr, err
20947 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
20948 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
20949 err := json.Unmarshal(body, &awspitrwrr)
20950 return awspitrwrr, err
20951 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
20952 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
20953 err := json.Unmarshal(body, &awsrwrr)
20954 return awsrwrr, err
20955 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest):
20956 var ivrwrr IaasVMRestoreWithRehydrationRequest
20957 err := json.Unmarshal(body, &ivrwrr)
20958 return ivrwrr, err
20959 default:
20960 var rr RestoreRequest
20961 err := json.Unmarshal(body, &rr)
20962 return rr, err
20963 }
20964 }
20965 func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) {
20966 var rawMessages []*json.RawMessage
20967 err := json.Unmarshal(body, &rawMessages)
20968 if err != nil {
20969 return nil, err
20970 }
20971
20972 rrArray := make([]BasicRestoreRequest, len(rawMessages))
20973
20974 for index, rawMessage := range rawMessages {
20975 rr, err := unmarshalBasicRestoreRequest(*rawMessage)
20976 if err != nil {
20977 return nil, err
20978 }
20979 rrArray[index] = rr
20980 }
20981 return rrArray, nil
20982 }
20983
20984
20985 func (rr RestoreRequest) MarshalJSON() ([]byte, error) {
20986 rr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest
20987 objectMap := make(map[string]interface{})
20988 if rr.ObjectType != "" {
20989 objectMap["objectType"] = rr.ObjectType
20990 }
20991 return json.Marshal(objectMap)
20992 }
20993
20994
20995 func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
20996 return nil, false
20997 }
20998
20999
21000 func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
21001 return nil, false
21002 }
21003
21004
21005 func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
21006 return nil, false
21007 }
21008
21009
21010 func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
21011 return nil, false
21012 }
21013
21014
21015 func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
21016 return nil, false
21017 }
21018
21019
21020 func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
21021 return nil, false
21022 }
21023
21024
21025 func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
21026 return nil, false
21027 }
21028
21029
21030 func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
21031 return nil, false
21032 }
21033
21034
21035 func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
21036 return nil, false
21037 }
21038
21039
21040 func (rr RestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
21041 return nil, false
21042 }
21043
21044
21045 func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
21046 return nil, false
21047 }
21048
21049
21050 func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
21051 return nil, false
21052 }
21053
21054
21055 func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
21056 return nil, false
21057 }
21058
21059
21060 func (rr RestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
21061 return nil, false
21062 }
21063
21064
21065 func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
21066 return nil, false
21067 }
21068
21069
21070 func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
21071 return nil, false
21072 }
21073
21074
21075 func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
21076 return nil, false
21077 }
21078
21079
21080 func (rr RestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
21081 return nil, false
21082 }
21083
21084
21085 func (rr RestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
21086 return nil, false
21087 }
21088
21089
21090 func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
21091 return &rr, true
21092 }
21093
21094
21095 func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
21096 return &rr, true
21097 }
21098
21099
21100
21101 type RestoreRequestResource struct {
21102
21103 Properties BasicRestoreRequest `json:"properties,omitempty"`
21104
21105 ID *string `json:"id,omitempty"`
21106
21107 Name *string `json:"name,omitempty"`
21108
21109 Type *string `json:"type,omitempty"`
21110
21111 Location *string `json:"location,omitempty"`
21112
21113 Tags map[string]*string `json:"tags"`
21114
21115 ETag *string `json:"eTag,omitempty"`
21116 }
21117
21118
21119 func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) {
21120 objectMap := make(map[string]interface{})
21121 objectMap["properties"] = rrr.Properties
21122 if rrr.Location != nil {
21123 objectMap["location"] = rrr.Location
21124 }
21125 if rrr.Tags != nil {
21126 objectMap["tags"] = rrr.Tags
21127 }
21128 if rrr.ETag != nil {
21129 objectMap["eTag"] = rrr.ETag
21130 }
21131 return json.Marshal(objectMap)
21132 }
21133
21134
21135 func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error {
21136 var m map[string]*json.RawMessage
21137 err := json.Unmarshal(body, &m)
21138 if err != nil {
21139 return err
21140 }
21141 for k, v := range m {
21142 switch k {
21143 case "properties":
21144 if v != nil {
21145 properties, err := unmarshalBasicRestoreRequest(*v)
21146 if err != nil {
21147 return err
21148 }
21149 rrr.Properties = properties
21150 }
21151 case "id":
21152 if v != nil {
21153 var ID string
21154 err = json.Unmarshal(*v, &ID)
21155 if err != nil {
21156 return err
21157 }
21158 rrr.ID = &ID
21159 }
21160 case "name":
21161 if v != nil {
21162 var name string
21163 err = json.Unmarshal(*v, &name)
21164 if err != nil {
21165 return err
21166 }
21167 rrr.Name = &name
21168 }
21169 case "type":
21170 if v != nil {
21171 var typeVar string
21172 err = json.Unmarshal(*v, &typeVar)
21173 if err != nil {
21174 return err
21175 }
21176 rrr.Type = &typeVar
21177 }
21178 case "location":
21179 if v != nil {
21180 var location string
21181 err = json.Unmarshal(*v, &location)
21182 if err != nil {
21183 return err
21184 }
21185 rrr.Location = &location
21186 }
21187 case "tags":
21188 if v != nil {
21189 var tags map[string]*string
21190 err = json.Unmarshal(*v, &tags)
21191 if err != nil {
21192 return err
21193 }
21194 rrr.Tags = tags
21195 }
21196 case "eTag":
21197 if v != nil {
21198 var eTag string
21199 err = json.Unmarshal(*v, &eTag)
21200 if err != nil {
21201 return err
21202 }
21203 rrr.ETag = &eTag
21204 }
21205 }
21206 }
21207
21208 return nil
21209 }
21210
21211
21212
21213 type RestoresTriggerFuture struct {
21214 azure.FutureAPI
21215
21216
21217 Result func(RestoresClient) (autorest.Response, error)
21218 }
21219
21220
21221 func (future *RestoresTriggerFuture) UnmarshalJSON(body []byte) error {
21222 var azFuture azure.Future
21223 if err := json.Unmarshal(body, &azFuture); err != nil {
21224 return err
21225 }
21226 future.FutureAPI = &azFuture
21227 future.Result = future.result
21228 return nil
21229 }
21230
21231
21232 func (future *RestoresTriggerFuture) result(client RestoresClient) (ar autorest.Response, err error) {
21233 var done bool
21234 done, err = future.DoneWithContext(context.Background(), client)
21235 if err != nil {
21236 err = autorest.NewErrorWithError(err, "backup.RestoresTriggerFuture", "Result", future.Response(), "Polling failure")
21237 return
21238 }
21239 if !done {
21240 ar.Response = future.Response()
21241 err = azure.NewAsyncOpIncompleteError("backup.RestoresTriggerFuture")
21242 return
21243 }
21244 ar.Response = future.Response()
21245 return
21246 }
21247
21248
21249 type RetentionDuration struct {
21250
21251
21252 Count *int32 `json:"count,omitempty"`
21253
21254 DurationType RetentionDurationType `json:"durationType,omitempty"`
21255 }
21256
21257
21258 type BasicRetentionPolicy interface {
21259 AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool)
21260 AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool)
21261 AsRetentionPolicy() (*RetentionPolicy, bool)
21262 }
21263
21264
21265 type RetentionPolicy struct {
21266
21267 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
21268 }
21269
21270 func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) {
21271 var m map[string]interface{}
21272 err := json.Unmarshal(body, &m)
21273 if err != nil {
21274 return nil, err
21275 }
21276
21277 switch m["retentionPolicyType"] {
21278 case string(RetentionPolicyTypeLongTermRetentionPolicy):
21279 var ltrp LongTermRetentionPolicy
21280 err := json.Unmarshal(body, <rp)
21281 return ltrp, err
21282 case string(RetentionPolicyTypeSimpleRetentionPolicy):
21283 var srp SimpleRetentionPolicy
21284 err := json.Unmarshal(body, &srp)
21285 return srp, err
21286 default:
21287 var rp RetentionPolicy
21288 err := json.Unmarshal(body, &rp)
21289 return rp, err
21290 }
21291 }
21292 func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) {
21293 var rawMessages []*json.RawMessage
21294 err := json.Unmarshal(body, &rawMessages)
21295 if err != nil {
21296 return nil, err
21297 }
21298
21299 rpArray := make([]BasicRetentionPolicy, len(rawMessages))
21300
21301 for index, rawMessage := range rawMessages {
21302 rp, err := unmarshalBasicRetentionPolicy(*rawMessage)
21303 if err != nil {
21304 return nil, err
21305 }
21306 rpArray[index] = rp
21307 }
21308 return rpArray, nil
21309 }
21310
21311
21312 func (rp RetentionPolicy) MarshalJSON() ([]byte, error) {
21313 rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy
21314 objectMap := make(map[string]interface{})
21315 if rp.RetentionPolicyType != "" {
21316 objectMap["retentionPolicyType"] = rp.RetentionPolicyType
21317 }
21318 return json.Marshal(objectMap)
21319 }
21320
21321
21322 func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
21323 return nil, false
21324 }
21325
21326
21327 func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
21328 return nil, false
21329 }
21330
21331
21332 func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
21333 return &rp, true
21334 }
21335
21336
21337 func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
21338 return &rp, true
21339 }
21340
21341
21342 type BasicSchedulePolicy interface {
21343 AsLogSchedulePolicy() (*LogSchedulePolicy, bool)
21344 AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool)
21345 AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool)
21346 AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool)
21347 AsSchedulePolicy() (*SchedulePolicy, bool)
21348 }
21349
21350
21351 type SchedulePolicy struct {
21352
21353 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
21354 }
21355
21356 func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) {
21357 var m map[string]interface{}
21358 err := json.Unmarshal(body, &m)
21359 if err != nil {
21360 return nil, err
21361 }
21362
21363 switch m["schedulePolicyType"] {
21364 case string(SchedulePolicyTypeLogSchedulePolicy):
21365 var lsp LogSchedulePolicy
21366 err := json.Unmarshal(body, &lsp)
21367 return lsp, err
21368 case string(SchedulePolicyTypeLongTermSchedulePolicy):
21369 var ltsp LongTermSchedulePolicy
21370 err := json.Unmarshal(body, <sp)
21371 return ltsp, err
21372 case string(SchedulePolicyTypeSimpleSchedulePolicy):
21373 var ssp SimpleSchedulePolicy
21374 err := json.Unmarshal(body, &ssp)
21375 return ssp, err
21376 case string(SchedulePolicyTypeSimpleSchedulePolicyV2):
21377 var sspv SimpleSchedulePolicyV2
21378 err := json.Unmarshal(body, &sspv)
21379 return sspv, err
21380 default:
21381 var sp SchedulePolicy
21382 err := json.Unmarshal(body, &sp)
21383 return sp, err
21384 }
21385 }
21386 func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) {
21387 var rawMessages []*json.RawMessage
21388 err := json.Unmarshal(body, &rawMessages)
21389 if err != nil {
21390 return nil, err
21391 }
21392
21393 spArray := make([]BasicSchedulePolicy, len(rawMessages))
21394
21395 for index, rawMessage := range rawMessages {
21396 sp, err := unmarshalBasicSchedulePolicy(*rawMessage)
21397 if err != nil {
21398 return nil, err
21399 }
21400 spArray[index] = sp
21401 }
21402 return spArray, nil
21403 }
21404
21405
21406 func (sp SchedulePolicy) MarshalJSON() ([]byte, error) {
21407 sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy
21408 objectMap := make(map[string]interface{})
21409 if sp.SchedulePolicyType != "" {
21410 objectMap["schedulePolicyType"] = sp.SchedulePolicyType
21411 }
21412 return json.Marshal(objectMap)
21413 }
21414
21415
21416 func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
21417 return nil, false
21418 }
21419
21420
21421 func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
21422 return nil, false
21423 }
21424
21425
21426 func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
21427 return nil, false
21428 }
21429
21430
21431 func (sp SchedulePolicy) AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool) {
21432 return nil, false
21433 }
21434
21435
21436 func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
21437 return &sp, true
21438 }
21439
21440
21441 func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
21442 return &sp, true
21443 }
21444
21445
21446 type SecurityPinBase struct {
21447
21448 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
21449 }
21450
21451
21452 type Settings struct {
21453
21454 TimeZone *string `json:"timeZone,omitempty"`
21455
21456 Issqlcompression *bool `json:"issqlcompression,omitempty"`
21457
21458
21459 IsCompression *bool `json:"isCompression,omitempty"`
21460 }
21461
21462
21463 type SimpleRetentionPolicy struct {
21464
21465 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
21466
21467 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
21468 }
21469
21470
21471 func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) {
21472 srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy
21473 objectMap := make(map[string]interface{})
21474 if srp.RetentionDuration != nil {
21475 objectMap["retentionDuration"] = srp.RetentionDuration
21476 }
21477 if srp.RetentionPolicyType != "" {
21478 objectMap["retentionPolicyType"] = srp.RetentionPolicyType
21479 }
21480 return json.Marshal(objectMap)
21481 }
21482
21483
21484 func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
21485 return nil, false
21486 }
21487
21488
21489 func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
21490 return &srp, true
21491 }
21492
21493
21494 func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
21495 return nil, false
21496 }
21497
21498
21499 func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
21500 return &srp, true
21501 }
21502
21503
21504 type SimpleSchedulePolicy struct {
21505
21506 ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"`
21507
21508 ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"`
21509
21510 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"`
21511
21512 HourlySchedule *HourlySchedule `json:"hourlySchedule,omitempty"`
21513
21514 ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"`
21515
21516 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
21517 }
21518
21519
21520 func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) {
21521 ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy
21522 objectMap := make(map[string]interface{})
21523 if ssp.ScheduleRunFrequency != "" {
21524 objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency
21525 }
21526 if ssp.ScheduleRunDays != nil {
21527 objectMap["scheduleRunDays"] = ssp.ScheduleRunDays
21528 }
21529 if ssp.ScheduleRunTimes != nil {
21530 objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes
21531 }
21532 if ssp.HourlySchedule != nil {
21533 objectMap["hourlySchedule"] = ssp.HourlySchedule
21534 }
21535 if ssp.ScheduleWeeklyFrequency != nil {
21536 objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency
21537 }
21538 if ssp.SchedulePolicyType != "" {
21539 objectMap["schedulePolicyType"] = ssp.SchedulePolicyType
21540 }
21541 return json.Marshal(objectMap)
21542 }
21543
21544
21545 func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
21546 return nil, false
21547 }
21548
21549
21550 func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
21551 return nil, false
21552 }
21553
21554
21555 func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
21556 return &ssp, true
21557 }
21558
21559
21560 func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool) {
21561 return nil, false
21562 }
21563
21564
21565 func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
21566 return nil, false
21567 }
21568
21569
21570 func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
21571 return &ssp, true
21572 }
21573
21574
21575 type SimpleSchedulePolicyV2 struct {
21576
21577 ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"`
21578
21579 HourlySchedule *HourlySchedule `json:"hourlySchedule,omitempty"`
21580
21581 DailySchedule *DailySchedule `json:"dailySchedule,omitempty"`
21582
21583 WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"`
21584
21585 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
21586 }
21587
21588
21589 func (sspv SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) {
21590 sspv.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicyV2
21591 objectMap := make(map[string]interface{})
21592 if sspv.ScheduleRunFrequency != "" {
21593 objectMap["scheduleRunFrequency"] = sspv.ScheduleRunFrequency
21594 }
21595 if sspv.HourlySchedule != nil {
21596 objectMap["hourlySchedule"] = sspv.HourlySchedule
21597 }
21598 if sspv.DailySchedule != nil {
21599 objectMap["dailySchedule"] = sspv.DailySchedule
21600 }
21601 if sspv.WeeklySchedule != nil {
21602 objectMap["weeklySchedule"] = sspv.WeeklySchedule
21603 }
21604 if sspv.SchedulePolicyType != "" {
21605 objectMap["schedulePolicyType"] = sspv.SchedulePolicyType
21606 }
21607 return json.Marshal(objectMap)
21608 }
21609
21610
21611 func (sspv SimpleSchedulePolicyV2) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
21612 return nil, false
21613 }
21614
21615
21616 func (sspv SimpleSchedulePolicyV2) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
21617 return nil, false
21618 }
21619
21620
21621 func (sspv SimpleSchedulePolicyV2) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
21622 return nil, false
21623 }
21624
21625
21626 func (sspv SimpleSchedulePolicyV2) AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool) {
21627 return &sspv, true
21628 }
21629
21630
21631 func (sspv SimpleSchedulePolicyV2) AsSchedulePolicy() (*SchedulePolicy, bool) {
21632 return nil, false
21633 }
21634
21635
21636 func (sspv SimpleSchedulePolicyV2) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
21637 return &sspv, true
21638 }
21639
21640
21641 type SQLDataDirectory struct {
21642
21643 Type SQLDataDirectoryType `json:"type,omitempty"`
21644
21645 Path *string `json:"path,omitempty"`
21646
21647 LogicalName *string `json:"logicalName,omitempty"`
21648 }
21649
21650
21651 type SQLDataDirectoryMapping struct {
21652
21653 MappingType SQLDataDirectoryType `json:"mappingType,omitempty"`
21654
21655 SourceLogicalName *string `json:"sourceLogicalName,omitempty"`
21656
21657 SourcePath *string `json:"sourcePath,omitempty"`
21658
21659 TargetPath *string `json:"targetPath,omitempty"`
21660 }
21661
21662
21663 type StatusRequest struct {
21664
21665 ResourceType DataSourceType `json:"resourceType,omitempty"`
21666
21667 ResourceID *string `json:"resourceId,omitempty"`
21668
21669 PoLogicalName *string `json:"poLogicalName,omitempty"`
21670 }
21671
21672
21673 type StatusResponse struct {
21674 autorest.Response `json:"-"`
21675
21676 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
21677
21678 VaultID *string `json:"vaultId,omitempty"`
21679
21680 FabricName FabricName `json:"fabricName,omitempty"`
21681
21682 ContainerName *string `json:"containerName,omitempty"`
21683
21684 ProtectedItemName *string `json:"protectedItemName,omitempty"`
21685
21686 ErrorCode *string `json:"errorCode,omitempty"`
21687
21688 ErrorMessage *string `json:"errorMessage,omitempty"`
21689
21690 PolicyName *string `json:"policyName,omitempty"`
21691
21692 RegistrationStatus *string `json:"registrationStatus,omitempty"`
21693 }
21694
21695
21696 type SubProtectionPolicy struct {
21697
21698 PolicyType PolicyType `json:"policyType,omitempty"`
21699
21700 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
21701
21702 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
21703 }
21704
21705
21706 func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error {
21707 var m map[string]*json.RawMessage
21708 err := json.Unmarshal(body, &m)
21709 if err != nil {
21710 return err
21711 }
21712 for k, v := range m {
21713 switch k {
21714 case "policyType":
21715 if v != nil {
21716 var policyType PolicyType
21717 err = json.Unmarshal(*v, &policyType)
21718 if err != nil {
21719 return err
21720 }
21721 spp.PolicyType = policyType
21722 }
21723 case "schedulePolicy":
21724 if v != nil {
21725 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
21726 if err != nil {
21727 return err
21728 }
21729 spp.SchedulePolicy = schedulePolicy
21730 }
21731 case "retentionPolicy":
21732 if v != nil {
21733 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
21734 if err != nil {
21735 return err
21736 }
21737 spp.RetentionPolicy = retentionPolicy
21738 }
21739 }
21740 }
21741
21742 return nil
21743 }
21744
21745
21746 type TargetAFSRestoreInfo struct {
21747
21748 Name *string `json:"name,omitempty"`
21749
21750 TargetResourceID *string `json:"targetResourceId,omitempty"`
21751 }
21752
21753
21754 type TargetRestoreInfo struct {
21755
21756 OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"`
21757
21758 ContainerID *string `json:"containerId,omitempty"`
21759
21760 DatabaseName *string `json:"databaseName,omitempty"`
21761
21762 TargetDirectoryForFileRestore *string `json:"targetDirectoryForFileRestore,omitempty"`
21763 }
21764
21765
21766 type TokenInformation struct {
21767 autorest.Response `json:"-"`
21768
21769 Token *string `json:"token,omitempty"`
21770
21771 ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"`
21772
21773 SecurityPIN *string `json:"securityPIN,omitempty"`
21774 }
21775
21776
21777 type TriggerDataMoveRequest struct {
21778
21779 SourceResourceID *string `json:"sourceResourceId,omitempty"`
21780
21781 SourceRegion *string `json:"sourceRegion,omitempty"`
21782
21783 DataMoveLevel DataMoveLevel `json:"dataMoveLevel,omitempty"`
21784
21785 CorrelationID *string `json:"correlationId,omitempty"`
21786
21787 SourceContainerArmIds *[]string `json:"sourceContainerArmIds,omitempty"`
21788
21789 PauseGC *bool `json:"pauseGC,omitempty"`
21790 }
21791
21792
21793 type UnlockDeleteRequest struct {
21794 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
21795 ResourceToBeDeleted *string `json:"resourceToBeDeleted,omitempty"`
21796 }
21797
21798
21799 type UnlockDeleteResponse struct {
21800 autorest.Response `json:"-"`
21801
21802 UnlockDeleteExpiryTime *string `json:"unlockDeleteExpiryTime,omitempty"`
21803 }
21804
21805
21806 type ValidateIaasVMRestoreOperationRequest struct {
21807
21808 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
21809
21810 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21811 }
21812
21813
21814 func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) {
21815 vivror.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest
21816 objectMap := make(map[string]interface{})
21817 objectMap["restoreRequest"] = vivror.RestoreRequest
21818 if vivror.ObjectType != "" {
21819 objectMap["objectType"] = vivror.ObjectType
21820 }
21821 return json.Marshal(objectMap)
21822 }
21823
21824
21825 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21826 return &vivror, true
21827 }
21828
21829
21830 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21831 return nil, false
21832 }
21833
21834
21835 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21836 return &vivror, true
21837 }
21838
21839
21840 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21841 return nil, false
21842 }
21843
21844
21845 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21846 return &vivror, true
21847 }
21848
21849
21850 func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error {
21851 var m map[string]*json.RawMessage
21852 err := json.Unmarshal(body, &m)
21853 if err != nil {
21854 return err
21855 }
21856 for k, v := range m {
21857 switch k {
21858 case "restoreRequest":
21859 if v != nil {
21860 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
21861 if err != nil {
21862 return err
21863 }
21864 vivror.RestoreRequest = restoreRequest
21865 }
21866 case "objectType":
21867 if v != nil {
21868 var objectType ObjectTypeBasicValidateOperationRequest
21869 err = json.Unmarshal(*v, &objectType)
21870 if err != nil {
21871 return err
21872 }
21873 vivror.ObjectType = objectType
21874 }
21875 }
21876 }
21877
21878 return nil
21879 }
21880
21881
21882 type BasicValidateOperationRequest interface {
21883 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
21884 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
21885 AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool)
21886 AsValidateOperationRequest() (*ValidateOperationRequest, bool)
21887 }
21888
21889
21890 type ValidateOperationRequest struct {
21891
21892 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21893 }
21894
21895 func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) {
21896 var m map[string]interface{}
21897 err := json.Unmarshal(body, &m)
21898 if err != nil {
21899 return nil, err
21900 }
21901
21902 switch m["objectType"] {
21903 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest):
21904 var vivror ValidateIaasVMRestoreOperationRequest
21905 err := json.Unmarshal(body, &vivror)
21906 return vivror, err
21907 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest):
21908 var vror ValidateRestoreOperationRequest
21909 err := json.Unmarshal(body, &vror)
21910 return vror, err
21911 default:
21912 var vor ValidateOperationRequest
21913 err := json.Unmarshal(body, &vor)
21914 return vor, err
21915 }
21916 }
21917 func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) {
21918 var rawMessages []*json.RawMessage
21919 err := json.Unmarshal(body, &rawMessages)
21920 if err != nil {
21921 return nil, err
21922 }
21923
21924 vorArray := make([]BasicValidateOperationRequest, len(rawMessages))
21925
21926 for index, rawMessage := range rawMessages {
21927 vor, err := unmarshalBasicValidateOperationRequest(*rawMessage)
21928 if err != nil {
21929 return nil, err
21930 }
21931 vorArray[index] = vor
21932 }
21933 return vorArray, nil
21934 }
21935
21936
21937 func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) {
21938 vor.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateOperationRequest
21939 objectMap := make(map[string]interface{})
21940 if vor.ObjectType != "" {
21941 objectMap["objectType"] = vor.ObjectType
21942 }
21943 return json.Marshal(objectMap)
21944 }
21945
21946
21947 func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21948 return nil, false
21949 }
21950
21951
21952 func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21953 return nil, false
21954 }
21955
21956
21957 func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21958 return nil, false
21959 }
21960
21961
21962 func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21963 return &vor, true
21964 }
21965
21966
21967 func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21968 return &vor, true
21969 }
21970
21971
21972 type ValidateOperationResponse struct {
21973
21974 ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"`
21975 }
21976
21977
21978 type ValidateOperationsResponse struct {
21979 autorest.Response `json:"-"`
21980 ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"`
21981 }
21982
21983
21984
21985 type ValidateOperationTriggerFuture struct {
21986 azure.FutureAPI
21987
21988
21989 Result func(ValidateOperationClient) (autorest.Response, error)
21990 }
21991
21992
21993 func (future *ValidateOperationTriggerFuture) UnmarshalJSON(body []byte) error {
21994 var azFuture azure.Future
21995 if err := json.Unmarshal(body, &azFuture); err != nil {
21996 return err
21997 }
21998 future.FutureAPI = &azFuture
21999 future.Result = future.result
22000 return nil
22001 }
22002
22003
22004 func (future *ValidateOperationTriggerFuture) result(client ValidateOperationClient) (ar autorest.Response, err error) {
22005 var done bool
22006 done, err = future.DoneWithContext(context.Background(), client)
22007 if err != nil {
22008 err = autorest.NewErrorWithError(err, "backup.ValidateOperationTriggerFuture", "Result", future.Response(), "Polling failure")
22009 return
22010 }
22011 if !done {
22012 ar.Response = future.Response()
22013 err = azure.NewAsyncOpIncompleteError("backup.ValidateOperationTriggerFuture")
22014 return
22015 }
22016 ar.Response = future.Response()
22017 return
22018 }
22019
22020
22021 type BasicValidateRestoreOperationRequest interface {
22022 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
22023 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
22024 }
22025
22026
22027 type ValidateRestoreOperationRequest struct {
22028
22029 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
22030
22031 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
22032 }
22033
22034 func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) {
22035 var m map[string]interface{}
22036 err := json.Unmarshal(body, &m)
22037 if err != nil {
22038 return nil, err
22039 }
22040
22041 switch m["objectType"] {
22042 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest):
22043 var vivror ValidateIaasVMRestoreOperationRequest
22044 err := json.Unmarshal(body, &vivror)
22045 return vivror, err
22046 default:
22047 var vror ValidateRestoreOperationRequest
22048 err := json.Unmarshal(body, &vror)
22049 return vror, err
22050 }
22051 }
22052 func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) {
22053 var rawMessages []*json.RawMessage
22054 err := json.Unmarshal(body, &rawMessages)
22055 if err != nil {
22056 return nil, err
22057 }
22058
22059 vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages))
22060
22061 for index, rawMessage := range rawMessages {
22062 vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage)
22063 if err != nil {
22064 return nil, err
22065 }
22066 vrorArray[index] = vror
22067 }
22068 return vrorArray, nil
22069 }
22070
22071
22072 func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) {
22073 vror.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest
22074 objectMap := make(map[string]interface{})
22075 objectMap["restoreRequest"] = vror.RestoreRequest
22076 if vror.ObjectType != "" {
22077 objectMap["objectType"] = vror.ObjectType
22078 }
22079 return json.Marshal(objectMap)
22080 }
22081
22082
22083 func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
22084 return nil, false
22085 }
22086
22087
22088 func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
22089 return &vror, true
22090 }
22091
22092
22093 func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
22094 return &vror, true
22095 }
22096
22097
22098 func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
22099 return nil, false
22100 }
22101
22102
22103 func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
22104 return &vror, true
22105 }
22106
22107
22108 func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error {
22109 var m map[string]*json.RawMessage
22110 err := json.Unmarshal(body, &m)
22111 if err != nil {
22112 return err
22113 }
22114 for k, v := range m {
22115 switch k {
22116 case "restoreRequest":
22117 if v != nil {
22118 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
22119 if err != nil {
22120 return err
22121 }
22122 vror.RestoreRequest = restoreRequest
22123 }
22124 case "objectType":
22125 if v != nil {
22126 var objectType ObjectTypeBasicValidateOperationRequest
22127 err = json.Unmarshal(*v, &objectType)
22128 if err != nil {
22129 return err
22130 }
22131 vror.ObjectType = objectType
22132 }
22133 }
22134 }
22135
22136 return nil
22137 }
22138
22139
22140 type VaultJob struct {
22141
22142 Duration *string `json:"duration,omitempty"`
22143
22144 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
22145
22146 ErrorDetails *[]VaultJobErrorInfo `json:"errorDetails,omitempty"`
22147
22148 ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"`
22149
22150 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
22151
22152 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
22153
22154 Operation *string `json:"operation,omitempty"`
22155
22156 Status *string `json:"status,omitempty"`
22157
22158 StartTime *date.Time `json:"startTime,omitempty"`
22159
22160 EndTime *date.Time `json:"endTime,omitempty"`
22161
22162 ActivityID *string `json:"activityId,omitempty"`
22163
22164 JobType JobType `json:"jobType,omitempty"`
22165 }
22166
22167
22168 func (vj VaultJob) MarshalJSON() ([]byte, error) {
22169 vj.JobType = JobTypeVaultJob
22170 objectMap := make(map[string]interface{})
22171 if vj.Duration != nil {
22172 objectMap["duration"] = vj.Duration
22173 }
22174 if vj.ActionsInfo != nil {
22175 objectMap["actionsInfo"] = vj.ActionsInfo
22176 }
22177 if vj.ErrorDetails != nil {
22178 objectMap["errorDetails"] = vj.ErrorDetails
22179 }
22180 if vj.ExtendedInfo != nil {
22181 objectMap["extendedInfo"] = vj.ExtendedInfo
22182 }
22183 if vj.EntityFriendlyName != nil {
22184 objectMap["entityFriendlyName"] = vj.EntityFriendlyName
22185 }
22186 if vj.BackupManagementType != "" {
22187 objectMap["backupManagementType"] = vj.BackupManagementType
22188 }
22189 if vj.Operation != nil {
22190 objectMap["operation"] = vj.Operation
22191 }
22192 if vj.Status != nil {
22193 objectMap["status"] = vj.Status
22194 }
22195 if vj.StartTime != nil {
22196 objectMap["startTime"] = vj.StartTime
22197 }
22198 if vj.EndTime != nil {
22199 objectMap["endTime"] = vj.EndTime
22200 }
22201 if vj.ActivityID != nil {
22202 objectMap["activityId"] = vj.ActivityID
22203 }
22204 if vj.JobType != "" {
22205 objectMap["jobType"] = vj.JobType
22206 }
22207 return json.Marshal(objectMap)
22208 }
22209
22210
22211 func (vj VaultJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
22212 return nil, false
22213 }
22214
22215
22216 func (vj VaultJob) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
22217 return nil, false
22218 }
22219
22220
22221 func (vj VaultJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
22222 return nil, false
22223 }
22224
22225
22226 func (vj VaultJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
22227 return nil, false
22228 }
22229
22230
22231 func (vj VaultJob) AsDpmJob() (*DpmJob, bool) {
22232 return nil, false
22233 }
22234
22235
22236 func (vj VaultJob) AsMabJob() (*MabJob, bool) {
22237 return nil, false
22238 }
22239
22240
22241 func (vj VaultJob) AsVaultJob() (*VaultJob, bool) {
22242 return &vj, true
22243 }
22244
22245
22246 func (vj VaultJob) AsJob() (*Job, bool) {
22247 return nil, false
22248 }
22249
22250
22251 func (vj VaultJob) AsBasicJob() (BasicJob, bool) {
22252 return &vj, true
22253 }
22254
22255
22256 type VaultJobErrorInfo struct {
22257
22258 ErrorCode *int32 `json:"errorCode,omitempty"`
22259
22260 ErrorString *string `json:"errorString,omitempty"`
22261
22262 Recommendations *[]string `json:"recommendations,omitempty"`
22263 }
22264
22265
22266 type VaultJobExtendedInfo struct {
22267
22268 PropertyBag map[string]*string `json:"propertyBag"`
22269 }
22270
22271
22272 func (vjei VaultJobExtendedInfo) MarshalJSON() ([]byte, error) {
22273 objectMap := make(map[string]interface{})
22274 if vjei.PropertyBag != nil {
22275 objectMap["propertyBag"] = vjei.PropertyBag
22276 }
22277 return json.Marshal(objectMap)
22278 }
22279
22280
22281 type BasicVaultStorageConfigOperationResultResponse interface {
22282 AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool)
22283 AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool)
22284 }
22285
22286
22287 type VaultStorageConfigOperationResultResponse struct {
22288 autorest.Response `json:"-"`
22289
22290 ObjectType ObjectTypeBasicVaultStorageConfigOperationResultResponse `json:"objectType,omitempty"`
22291 }
22292
22293 func unmarshalBasicVaultStorageConfigOperationResultResponse(body []byte) (BasicVaultStorageConfigOperationResultResponse, error) {
22294 var m map[string]interface{}
22295 err := json.Unmarshal(body, &m)
22296 if err != nil {
22297 return nil, err
22298 }
22299
22300 switch m["objectType"] {
22301 case string(ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse):
22302 var pdmr PrepareDataMoveResponse
22303 err := json.Unmarshal(body, &pdmr)
22304 return pdmr, err
22305 default:
22306 var vscorr VaultStorageConfigOperationResultResponse
22307 err := json.Unmarshal(body, &vscorr)
22308 return vscorr, err
22309 }
22310 }
22311 func unmarshalBasicVaultStorageConfigOperationResultResponseArray(body []byte) ([]BasicVaultStorageConfigOperationResultResponse, error) {
22312 var rawMessages []*json.RawMessage
22313 err := json.Unmarshal(body, &rawMessages)
22314 if err != nil {
22315 return nil, err
22316 }
22317
22318 vscorrArray := make([]BasicVaultStorageConfigOperationResultResponse, len(rawMessages))
22319
22320 for index, rawMessage := range rawMessages {
22321 vscorr, err := unmarshalBasicVaultStorageConfigOperationResultResponse(*rawMessage)
22322 if err != nil {
22323 return nil, err
22324 }
22325 vscorrArray[index] = vscorr
22326 }
22327 return vscorrArray, nil
22328 }
22329
22330
22331 func (vscorr VaultStorageConfigOperationResultResponse) MarshalJSON() ([]byte, error) {
22332 vscorr.ObjectType = ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypeVaultStorageConfigOperationResultResponse
22333 objectMap := make(map[string]interface{})
22334 if vscorr.ObjectType != "" {
22335 objectMap["objectType"] = vscorr.ObjectType
22336 }
22337 return json.Marshal(objectMap)
22338 }
22339
22340
22341 func (vscorr VaultStorageConfigOperationResultResponse) AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool) {
22342 return nil, false
22343 }
22344
22345
22346 func (vscorr VaultStorageConfigOperationResultResponse) AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool) {
22347 return &vscorr, true
22348 }
22349
22350
22351 func (vscorr VaultStorageConfigOperationResultResponse) AsBasicVaultStorageConfigOperationResultResponse() (BasicVaultStorageConfigOperationResultResponse, bool) {
22352 return &vscorr, true
22353 }
22354
22355
22356 type VaultStorageConfigOperationResultResponseModel struct {
22357 autorest.Response `json:"-"`
22358 Value BasicVaultStorageConfigOperationResultResponse `json:"value,omitempty"`
22359 }
22360
22361
22362 func (vscorrm *VaultStorageConfigOperationResultResponseModel) UnmarshalJSON(body []byte) error {
22363 vscorr, err := unmarshalBasicVaultStorageConfigOperationResultResponse(body)
22364 if err != nil {
22365 return err
22366 }
22367 vscorrm.Value = vscorr
22368
22369 return nil
22370 }
22371
22372
22373 type WeeklyRetentionFormat struct {
22374
22375 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
22376
22377 WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"`
22378 }
22379
22380
22381 type WeeklyRetentionSchedule struct {
22382
22383 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
22384
22385 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
22386
22387 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
22388 }
22389
22390
22391 type WeeklySchedule struct {
22392 ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"`
22393
22394 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"`
22395 }
22396
22397
22398 type WorkloadInquiryDetails struct {
22399
22400 Type *string `json:"type,omitempty"`
22401
22402 ItemCount *int64 `json:"itemCount,omitempty"`
22403
22404 InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"`
22405 }
22406
22407
22408 type BasicWorkloadItem interface {
22409 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
22410 AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool)
22411 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
22412 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
22413 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
22414 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
22415 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
22416 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
22417 AsWorkloadItem() (*WorkloadItem, bool)
22418 }
22419
22420
22421 type WorkloadItem struct {
22422
22423 BackupManagementType *string `json:"backupManagementType,omitempty"`
22424
22425 WorkloadType *string `json:"workloadType,omitempty"`
22426
22427 FriendlyName *string `json:"friendlyName,omitempty"`
22428
22429 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
22430
22431 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
22432 }
22433
22434 func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) {
22435 var m map[string]interface{}
22436 err := json.Unmarshal(body, &m)
22437 if err != nil {
22438 return nil, err
22439 }
22440
22441 switch m["workloadItemType"] {
22442 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem):
22443 var avwi AzureVMWorkloadItem
22444 err := json.Unmarshal(body, &avwi)
22445 return avwi, err
22446 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase):
22447 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
22448 err := json.Unmarshal(body, &avwsadwi)
22449 return avwsadwi, err
22450 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem):
22451 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
22452 err := json.Unmarshal(body, &avwsaswi)
22453 return avwsaswi, err
22454 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase):
22455 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
22456 err := json.Unmarshal(body, &avwshdwi)
22457 return avwshdwi, err
22458 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem):
22459 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
22460 err := json.Unmarshal(body, &avwshswi)
22461 return avwshswi, err
22462 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase):
22463 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
22464 err := json.Unmarshal(body, &avwsdwi)
22465 return avwsdwi, err
22466 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance):
22467 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
22468 err := json.Unmarshal(body, &avwsiwi)
22469 return avwsiwi, err
22470 default:
22471 var wi WorkloadItem
22472 err := json.Unmarshal(body, &wi)
22473 return wi, err
22474 }
22475 }
22476 func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) {
22477 var rawMessages []*json.RawMessage
22478 err := json.Unmarshal(body, &rawMessages)
22479 if err != nil {
22480 return nil, err
22481 }
22482
22483 wiArray := make([]BasicWorkloadItem, len(rawMessages))
22484
22485 for index, rawMessage := range rawMessages {
22486 wi, err := unmarshalBasicWorkloadItem(*rawMessage)
22487 if err != nil {
22488 return nil, err
22489 }
22490 wiArray[index] = wi
22491 }
22492 return wiArray, nil
22493 }
22494
22495
22496 func (wi WorkloadItem) MarshalJSON() ([]byte, error) {
22497 wi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem
22498 objectMap := make(map[string]interface{})
22499 if wi.BackupManagementType != nil {
22500 objectMap["backupManagementType"] = wi.BackupManagementType
22501 }
22502 if wi.WorkloadType != nil {
22503 objectMap["workloadType"] = wi.WorkloadType
22504 }
22505 if wi.FriendlyName != nil {
22506 objectMap["friendlyName"] = wi.FriendlyName
22507 }
22508 if wi.ProtectionState != "" {
22509 objectMap["protectionState"] = wi.ProtectionState
22510 }
22511 if wi.WorkloadItemType != "" {
22512 objectMap["workloadItemType"] = wi.WorkloadItemType
22513 }
22514 return json.Marshal(objectMap)
22515 }
22516
22517
22518 func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
22519 return nil, false
22520 }
22521
22522
22523 func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
22524 return nil, false
22525 }
22526
22527
22528 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
22529 return nil, false
22530 }
22531
22532
22533 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
22534 return nil, false
22535 }
22536
22537
22538 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
22539 return nil, false
22540 }
22541
22542
22543 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
22544 return nil, false
22545 }
22546
22547
22548 func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
22549 return nil, false
22550 }
22551
22552
22553 func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
22554 return nil, false
22555 }
22556
22557
22558 func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
22559 return &wi, true
22560 }
22561
22562
22563 func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
22564 return &wi, true
22565 }
22566
22567
22568
22569 type WorkloadItemResource struct {
22570
22571 Properties BasicWorkloadItem `json:"properties,omitempty"`
22572
22573 ID *string `json:"id,omitempty"`
22574
22575 Name *string `json:"name,omitempty"`
22576
22577 Type *string `json:"type,omitempty"`
22578
22579 Location *string `json:"location,omitempty"`
22580
22581 Tags map[string]*string `json:"tags"`
22582
22583 ETag *string `json:"eTag,omitempty"`
22584 }
22585
22586
22587 func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) {
22588 objectMap := make(map[string]interface{})
22589 objectMap["properties"] = wir.Properties
22590 if wir.Location != nil {
22591 objectMap["location"] = wir.Location
22592 }
22593 if wir.Tags != nil {
22594 objectMap["tags"] = wir.Tags
22595 }
22596 if wir.ETag != nil {
22597 objectMap["eTag"] = wir.ETag
22598 }
22599 return json.Marshal(objectMap)
22600 }
22601
22602
22603 func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error {
22604 var m map[string]*json.RawMessage
22605 err := json.Unmarshal(body, &m)
22606 if err != nil {
22607 return err
22608 }
22609 for k, v := range m {
22610 switch k {
22611 case "properties":
22612 if v != nil {
22613 properties, err := unmarshalBasicWorkloadItem(*v)
22614 if err != nil {
22615 return err
22616 }
22617 wir.Properties = properties
22618 }
22619 case "id":
22620 if v != nil {
22621 var ID string
22622 err = json.Unmarshal(*v, &ID)
22623 if err != nil {
22624 return err
22625 }
22626 wir.ID = &ID
22627 }
22628 case "name":
22629 if v != nil {
22630 var name string
22631 err = json.Unmarshal(*v, &name)
22632 if err != nil {
22633 return err
22634 }
22635 wir.Name = &name
22636 }
22637 case "type":
22638 if v != nil {
22639 var typeVar string
22640 err = json.Unmarshal(*v, &typeVar)
22641 if err != nil {
22642 return err
22643 }
22644 wir.Type = &typeVar
22645 }
22646 case "location":
22647 if v != nil {
22648 var location string
22649 err = json.Unmarshal(*v, &location)
22650 if err != nil {
22651 return err
22652 }
22653 wir.Location = &location
22654 }
22655 case "tags":
22656 if v != nil {
22657 var tags map[string]*string
22658 err = json.Unmarshal(*v, &tags)
22659 if err != nil {
22660 return err
22661 }
22662 wir.Tags = tags
22663 }
22664 case "eTag":
22665 if v != nil {
22666 var eTag string
22667 err = json.Unmarshal(*v, &eTag)
22668 if err != nil {
22669 return err
22670 }
22671 wir.ETag = &eTag
22672 }
22673 }
22674 }
22675
22676 return nil
22677 }
22678
22679
22680 type WorkloadItemResourceList struct {
22681 autorest.Response `json:"-"`
22682
22683 Value *[]WorkloadItemResource `json:"value,omitempty"`
22684
22685 NextLink *string `json:"nextLink,omitempty"`
22686 }
22687
22688
22689 type WorkloadItemResourceListIterator struct {
22690 i int
22691 page WorkloadItemResourceListPage
22692 }
22693
22694
22695
22696 func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
22697 if tracing.IsEnabled() {
22698 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext")
22699 defer func() {
22700 sc := -1
22701 if iter.Response().Response.Response != nil {
22702 sc = iter.Response().Response.Response.StatusCode
22703 }
22704 tracing.EndSpan(ctx, sc, err)
22705 }()
22706 }
22707 iter.i++
22708 if iter.i < len(iter.page.Values()) {
22709 return nil
22710 }
22711 err = iter.page.NextWithContext(ctx)
22712 if err != nil {
22713 iter.i--
22714 return err
22715 }
22716 iter.i = 0
22717 return nil
22718 }
22719
22720
22721
22722
22723 func (iter *WorkloadItemResourceListIterator) Next() error {
22724 return iter.NextWithContext(context.Background())
22725 }
22726
22727
22728 func (iter WorkloadItemResourceListIterator) NotDone() bool {
22729 return iter.page.NotDone() && iter.i < len(iter.page.Values())
22730 }
22731
22732
22733 func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList {
22734 return iter.page.Response()
22735 }
22736
22737
22738
22739 func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource {
22740 if !iter.page.NotDone() {
22741 return WorkloadItemResource{}
22742 }
22743 return iter.page.Values()[iter.i]
22744 }
22745
22746
22747 func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator {
22748 return WorkloadItemResourceListIterator{page: page}
22749 }
22750
22751
22752 func (wirl WorkloadItemResourceList) IsEmpty() bool {
22753 return wirl.Value == nil || len(*wirl.Value) == 0
22754 }
22755
22756
22757 func (wirl WorkloadItemResourceList) hasNextLink() bool {
22758 return wirl.NextLink != nil && len(*wirl.NextLink) != 0
22759 }
22760
22761
22762
22763 func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
22764 if !wirl.hasNextLink() {
22765 return nil, nil
22766 }
22767 return autorest.Prepare((&http.Request{}).WithContext(ctx),
22768 autorest.AsJSON(),
22769 autorest.AsGet(),
22770 autorest.WithBaseURL(to.String(wirl.NextLink)))
22771 }
22772
22773
22774 type WorkloadItemResourceListPage struct {
22775 fn func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)
22776 wirl WorkloadItemResourceList
22777 }
22778
22779
22780
22781 func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
22782 if tracing.IsEnabled() {
22783 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext")
22784 defer func() {
22785 sc := -1
22786 if page.Response().Response.Response != nil {
22787 sc = page.Response().Response.Response.StatusCode
22788 }
22789 tracing.EndSpan(ctx, sc, err)
22790 }()
22791 }
22792 for {
22793 next, err := page.fn(ctx, page.wirl)
22794 if err != nil {
22795 return err
22796 }
22797 page.wirl = next
22798 if !next.hasNextLink() || !next.IsEmpty() {
22799 break
22800 }
22801 }
22802 return nil
22803 }
22804
22805
22806
22807
22808 func (page *WorkloadItemResourceListPage) Next() error {
22809 return page.NextWithContext(context.Background())
22810 }
22811
22812
22813 func (page WorkloadItemResourceListPage) NotDone() bool {
22814 return !page.wirl.IsEmpty()
22815 }
22816
22817
22818 func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList {
22819 return page.wirl
22820 }
22821
22822
22823 func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource {
22824 if page.wirl.IsEmpty() {
22825 return nil
22826 }
22827 return *page.wirl.Value
22828 }
22829
22830
22831 func NewWorkloadItemResourceListPage(cur WorkloadItemResourceList, getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage {
22832 return WorkloadItemResourceListPage{
22833 fn: getNextPage,
22834 wirl: cur,
22835 }
22836 }
22837
22838
22839 type BasicWorkloadProtectableItem interface {
22840 AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool)
22841 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
22842 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
22843 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
22844 AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool)
22845 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
22846 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
22847 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
22848 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
22849 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
22850 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
22851 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
22852 AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool)
22853 AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool)
22854 }
22855
22856
22857
22858 type WorkloadProtectableItem struct {
22859
22860 BackupManagementType *string `json:"backupManagementType,omitempty"`
22861
22862 WorkloadType *string `json:"workloadType,omitempty"`
22863
22864 FriendlyName *string `json:"friendlyName,omitempty"`
22865
22866 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
22867
22868 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
22869 }
22870
22871 func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) {
22872 var m map[string]interface{}
22873 err := json.Unmarshal(body, &m)
22874 if err != nil {
22875 return nil, err
22876 }
22877
22878 switch m["protectableItemType"] {
22879 case string(ProtectableItemTypeAzureFileShare):
22880 var afspi AzureFileShareProtectableItem
22881 err := json.Unmarshal(body, &afspi)
22882 return afspi, err
22883 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
22884 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
22885 err := json.Unmarshal(body, &aisccvpi)
22886 return aisccvpi, err
22887 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
22888 var aiscvpi AzureIaaSComputeVMProtectableItem
22889 err := json.Unmarshal(body, &aiscvpi)
22890 return aiscvpi, err
22891 case string(ProtectableItemTypeAzureVMWorkloadProtectableItem):
22892 var avwpi AzureVMWorkloadProtectableItem
22893 err := json.Unmarshal(body, &avwpi)
22894 return avwpi, err
22895 case string(ProtectableItemTypeSAPAseSystem):
22896 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
22897 err := json.Unmarshal(body, &avwsaspi)
22898 return avwsaspi, err
22899 case string(ProtectableItemTypeSAPHanaDatabase):
22900 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
22901 err := json.Unmarshal(body, &avwshdpi)
22902 return avwshdpi, err
22903 case string(ProtectableItemTypeSAPHanaSystem):
22904 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
22905 err := json.Unmarshal(body, &avwshspi)
22906 return avwshspi, err
22907 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
22908 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
22909 err := json.Unmarshal(body, &avwsagpi)
22910 return avwsagpi, err
22911 case string(ProtectableItemTypeSQLDataBase):
22912 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
22913 err := json.Unmarshal(body, &avwsdpi)
22914 return avwsdpi, err
22915 case string(ProtectableItemTypeSQLInstance):
22916 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
22917 err := json.Unmarshal(body, &avwsipi)
22918 return avwsipi, err
22919 case string(ProtectableItemTypeIaaSVMProtectableItem):
22920 var ispi IaaSVMProtectableItem
22921 err := json.Unmarshal(body, &ispi)
22922 return ispi, err
22923 default:
22924 var wpi WorkloadProtectableItem
22925 err := json.Unmarshal(body, &wpi)
22926 return wpi, err
22927 }
22928 }
22929 func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) {
22930 var rawMessages []*json.RawMessage
22931 err := json.Unmarshal(body, &rawMessages)
22932 if err != nil {
22933 return nil, err
22934 }
22935
22936 wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages))
22937
22938 for index, rawMessage := range rawMessages {
22939 wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage)
22940 if err != nil {
22941 return nil, err
22942 }
22943 wpiArray[index] = wpi
22944 }
22945 return wpiArray, nil
22946 }
22947
22948
22949 func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) {
22950 wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem
22951 objectMap := make(map[string]interface{})
22952 if wpi.BackupManagementType != nil {
22953 objectMap["backupManagementType"] = wpi.BackupManagementType
22954 }
22955 if wpi.WorkloadType != nil {
22956 objectMap["workloadType"] = wpi.WorkloadType
22957 }
22958 if wpi.FriendlyName != nil {
22959 objectMap["friendlyName"] = wpi.FriendlyName
22960 }
22961 if wpi.ProtectionState != "" {
22962 objectMap["protectionState"] = wpi.ProtectionState
22963 }
22964 if wpi.ProtectableItemType != "" {
22965 objectMap["protectableItemType"] = wpi.ProtectableItemType
22966 }
22967 return json.Marshal(objectMap)
22968 }
22969
22970
22971 func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
22972 return nil, false
22973 }
22974
22975
22976 func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
22977 return nil, false
22978 }
22979
22980
22981 func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
22982 return nil, false
22983 }
22984
22985
22986 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
22987 return nil, false
22988 }
22989
22990
22991 func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
22992 return nil, false
22993 }
22994
22995
22996 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
22997 return nil, false
22998 }
22999
23000
23001 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
23002 return nil, false
23003 }
23004
23005
23006 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
23007 return nil, false
23008 }
23009
23010
23011 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
23012 return nil, false
23013 }
23014
23015
23016 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
23017 return nil, false
23018 }
23019
23020
23021 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
23022 return nil, false
23023 }
23024
23025
23026 func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
23027 return nil, false
23028 }
23029
23030
23031 func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
23032 return nil, false
23033 }
23034
23035
23036 func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
23037 return &wpi, true
23038 }
23039
23040
23041 func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
23042 return &wpi, true
23043 }
23044
23045
23046
23047 type WorkloadProtectableItemResource struct {
23048
23049 Properties BasicWorkloadProtectableItem `json:"properties,omitempty"`
23050
23051 ID *string `json:"id,omitempty"`
23052
23053 Name *string `json:"name,omitempty"`
23054
23055 Type *string `json:"type,omitempty"`
23056
23057 Location *string `json:"location,omitempty"`
23058
23059 Tags map[string]*string `json:"tags"`
23060
23061 ETag *string `json:"eTag,omitempty"`
23062 }
23063
23064
23065 func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) {
23066 objectMap := make(map[string]interface{})
23067 objectMap["properties"] = wpir.Properties
23068 if wpir.Location != nil {
23069 objectMap["location"] = wpir.Location
23070 }
23071 if wpir.Tags != nil {
23072 objectMap["tags"] = wpir.Tags
23073 }
23074 if wpir.ETag != nil {
23075 objectMap["eTag"] = wpir.ETag
23076 }
23077 return json.Marshal(objectMap)
23078 }
23079
23080
23081 func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error {
23082 var m map[string]*json.RawMessage
23083 err := json.Unmarshal(body, &m)
23084 if err != nil {
23085 return err
23086 }
23087 for k, v := range m {
23088 switch k {
23089 case "properties":
23090 if v != nil {
23091 properties, err := unmarshalBasicWorkloadProtectableItem(*v)
23092 if err != nil {
23093 return err
23094 }
23095 wpir.Properties = properties
23096 }
23097 case "id":
23098 if v != nil {
23099 var ID string
23100 err = json.Unmarshal(*v, &ID)
23101 if err != nil {
23102 return err
23103 }
23104 wpir.ID = &ID
23105 }
23106 case "name":
23107 if v != nil {
23108 var name string
23109 err = json.Unmarshal(*v, &name)
23110 if err != nil {
23111 return err
23112 }
23113 wpir.Name = &name
23114 }
23115 case "type":
23116 if v != nil {
23117 var typeVar string
23118 err = json.Unmarshal(*v, &typeVar)
23119 if err != nil {
23120 return err
23121 }
23122 wpir.Type = &typeVar
23123 }
23124 case "location":
23125 if v != nil {
23126 var location string
23127 err = json.Unmarshal(*v, &location)
23128 if err != nil {
23129 return err
23130 }
23131 wpir.Location = &location
23132 }
23133 case "tags":
23134 if v != nil {
23135 var tags map[string]*string
23136 err = json.Unmarshal(*v, &tags)
23137 if err != nil {
23138 return err
23139 }
23140 wpir.Tags = tags
23141 }
23142 case "eTag":
23143 if v != nil {
23144 var eTag string
23145 err = json.Unmarshal(*v, &eTag)
23146 if err != nil {
23147 return err
23148 }
23149 wpir.ETag = &eTag
23150 }
23151 }
23152 }
23153
23154 return nil
23155 }
23156
23157
23158 type WorkloadProtectableItemResourceList struct {
23159 autorest.Response `json:"-"`
23160
23161 Value *[]WorkloadProtectableItemResource `json:"value,omitempty"`
23162
23163 NextLink *string `json:"nextLink,omitempty"`
23164 }
23165
23166
23167
23168 type WorkloadProtectableItemResourceListIterator struct {
23169 i int
23170 page WorkloadProtectableItemResourceListPage
23171 }
23172
23173
23174
23175 func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
23176 if tracing.IsEnabled() {
23177 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext")
23178 defer func() {
23179 sc := -1
23180 if iter.Response().Response.Response != nil {
23181 sc = iter.Response().Response.Response.StatusCode
23182 }
23183 tracing.EndSpan(ctx, sc, err)
23184 }()
23185 }
23186 iter.i++
23187 if iter.i < len(iter.page.Values()) {
23188 return nil
23189 }
23190 err = iter.page.NextWithContext(ctx)
23191 if err != nil {
23192 iter.i--
23193 return err
23194 }
23195 iter.i = 0
23196 return nil
23197 }
23198
23199
23200
23201
23202 func (iter *WorkloadProtectableItemResourceListIterator) Next() error {
23203 return iter.NextWithContext(context.Background())
23204 }
23205
23206
23207 func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool {
23208 return iter.page.NotDone() && iter.i < len(iter.page.Values())
23209 }
23210
23211
23212 func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList {
23213 return iter.page.Response()
23214 }
23215
23216
23217
23218 func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource {
23219 if !iter.page.NotDone() {
23220 return WorkloadProtectableItemResource{}
23221 }
23222 return iter.page.Values()[iter.i]
23223 }
23224
23225
23226 func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator {
23227 return WorkloadProtectableItemResourceListIterator{page: page}
23228 }
23229
23230
23231 func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool {
23232 return wpirl.Value == nil || len(*wpirl.Value) == 0
23233 }
23234
23235
23236 func (wpirl WorkloadProtectableItemResourceList) hasNextLink() bool {
23237 return wpirl.NextLink != nil && len(*wpirl.NextLink) != 0
23238 }
23239
23240
23241
23242 func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
23243 if !wpirl.hasNextLink() {
23244 return nil, nil
23245 }
23246 return autorest.Prepare((&http.Request{}).WithContext(ctx),
23247 autorest.AsJSON(),
23248 autorest.AsGet(),
23249 autorest.WithBaseURL(to.String(wpirl.NextLink)))
23250 }
23251
23252
23253 type WorkloadProtectableItemResourceListPage struct {
23254 fn func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)
23255 wpirl WorkloadProtectableItemResourceList
23256 }
23257
23258
23259
23260 func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
23261 if tracing.IsEnabled() {
23262 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext")
23263 defer func() {
23264 sc := -1
23265 if page.Response().Response.Response != nil {
23266 sc = page.Response().Response.Response.StatusCode
23267 }
23268 tracing.EndSpan(ctx, sc, err)
23269 }()
23270 }
23271 for {
23272 next, err := page.fn(ctx, page.wpirl)
23273 if err != nil {
23274 return err
23275 }
23276 page.wpirl = next
23277 if !next.hasNextLink() || !next.IsEmpty() {
23278 break
23279 }
23280 }
23281 return nil
23282 }
23283
23284
23285
23286
23287 func (page *WorkloadProtectableItemResourceListPage) Next() error {
23288 return page.NextWithContext(context.Background())
23289 }
23290
23291
23292 func (page WorkloadProtectableItemResourceListPage) NotDone() bool {
23293 return !page.wpirl.IsEmpty()
23294 }
23295
23296
23297 func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList {
23298 return page.wpirl
23299 }
23300
23301
23302 func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource {
23303 if page.wpirl.IsEmpty() {
23304 return nil
23305 }
23306 return *page.wpirl.Value
23307 }
23308
23309
23310 func NewWorkloadProtectableItemResourceListPage(cur WorkloadProtectableItemResourceList, getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage {
23311 return WorkloadProtectableItemResourceListPage{
23312 fn: getNextPage,
23313 wpirl: cur,
23314 }
23315 }
23316
23317
23318 type YearlyRetentionSchedule struct {
23319
23320 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
23321
23322 MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"`
23323
23324 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
23325
23326 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
23327
23328 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
23329
23330 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
23331 }
23332
View as plain text