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/2021-12-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 OldestRecoveryPointInVault *date.Time `json:"oldestRecoveryPointInVault,omitempty"`
2848
2849 OldestRecoveryPointInArchive *date.Time `json:"oldestRecoveryPointInArchive,omitempty"`
2850
2851 NewestRecoveryPointInArchive *date.Time `json:"newestRecoveryPointInArchive,omitempty"`
2852
2853 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
2854
2855 PolicyInconsistent *bool `json:"policyInconsistent,omitempty"`
2856 }
2857
2858
2859 type AzureIaaSVMProtectionPolicy struct {
2860 InstantRPDetails *InstantRPAdditionalDetails `json:"instantRPDetails,omitempty"`
2861
2862 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
2863
2864 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
2865
2866
2867
2868 TieringPolicy map[string]*TieringPolicy `json:"tieringPolicy"`
2869
2870 InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"`
2871
2872 TimeZone *string `json:"timeZone,omitempty"`
2873
2874 PolicyType IAASVMPolicyType `json:"policyType,omitempty"`
2875
2876 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
2877
2878 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
2879
2880 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
2881 }
2882
2883
2884 func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) {
2885 aispp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM
2886 objectMap := make(map[string]interface{})
2887 if aispp.InstantRPDetails != nil {
2888 objectMap["instantRPDetails"] = aispp.InstantRPDetails
2889 }
2890 objectMap["schedulePolicy"] = aispp.SchedulePolicy
2891 objectMap["retentionPolicy"] = aispp.RetentionPolicy
2892 if aispp.TieringPolicy != nil {
2893 objectMap["tieringPolicy"] = aispp.TieringPolicy
2894 }
2895 if aispp.InstantRpRetentionRangeInDays != nil {
2896 objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays
2897 }
2898 if aispp.TimeZone != nil {
2899 objectMap["timeZone"] = aispp.TimeZone
2900 }
2901 if aispp.PolicyType != "" {
2902 objectMap["policyType"] = aispp.PolicyType
2903 }
2904 if aispp.ProtectedItemsCount != nil {
2905 objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount
2906 }
2907 if aispp.ResourceGuardOperationRequests != nil {
2908 objectMap["resourceGuardOperationRequests"] = aispp.ResourceGuardOperationRequests
2909 }
2910 if aispp.BackupManagementType != "" {
2911 objectMap["backupManagementType"] = aispp.BackupManagementType
2912 }
2913 return json.Marshal(objectMap)
2914 }
2915
2916
2917 func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
2918 return nil, false
2919 }
2920
2921
2922 func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
2923 return nil, false
2924 }
2925
2926
2927 func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
2928 return &aispp, true
2929 }
2930
2931
2932 func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
2933 return nil, false
2934 }
2935
2936
2937 func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
2938 return nil, false
2939 }
2940
2941
2942 func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
2943 return nil, false
2944 }
2945
2946
2947 func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
2948 return nil, false
2949 }
2950
2951
2952 func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
2953 return &aispp, true
2954 }
2955
2956
2957 func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error {
2958 var m map[string]*json.RawMessage
2959 err := json.Unmarshal(body, &m)
2960 if err != nil {
2961 return err
2962 }
2963 for k, v := range m {
2964 switch k {
2965 case "instantRPDetails":
2966 if v != nil {
2967 var instantRPDetails InstantRPAdditionalDetails
2968 err = json.Unmarshal(*v, &instantRPDetails)
2969 if err != nil {
2970 return err
2971 }
2972 aispp.InstantRPDetails = &instantRPDetails
2973 }
2974 case "schedulePolicy":
2975 if v != nil {
2976 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
2977 if err != nil {
2978 return err
2979 }
2980 aispp.SchedulePolicy = schedulePolicy
2981 }
2982 case "retentionPolicy":
2983 if v != nil {
2984 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
2985 if err != nil {
2986 return err
2987 }
2988 aispp.RetentionPolicy = retentionPolicy
2989 }
2990 case "tieringPolicy":
2991 if v != nil {
2992 var tieringPolicy map[string]*TieringPolicy
2993 err = json.Unmarshal(*v, &tieringPolicy)
2994 if err != nil {
2995 return err
2996 }
2997 aispp.TieringPolicy = tieringPolicy
2998 }
2999 case "instantRpRetentionRangeInDays":
3000 if v != nil {
3001 var instantRpRetentionRangeInDays int32
3002 err = json.Unmarshal(*v, &instantRpRetentionRangeInDays)
3003 if err != nil {
3004 return err
3005 }
3006 aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays
3007 }
3008 case "timeZone":
3009 if v != nil {
3010 var timeZone string
3011 err = json.Unmarshal(*v, &timeZone)
3012 if err != nil {
3013 return err
3014 }
3015 aispp.TimeZone = &timeZone
3016 }
3017 case "policyType":
3018 if v != nil {
3019 var policyType IAASVMPolicyType
3020 err = json.Unmarshal(*v, &policyType)
3021 if err != nil {
3022 return err
3023 }
3024 aispp.PolicyType = policyType
3025 }
3026 case "protectedItemsCount":
3027 if v != nil {
3028 var protectedItemsCount int32
3029 err = json.Unmarshal(*v, &protectedItemsCount)
3030 if err != nil {
3031 return err
3032 }
3033 aispp.ProtectedItemsCount = &protectedItemsCount
3034 }
3035 case "resourceGuardOperationRequests":
3036 if v != nil {
3037 var resourceGuardOperationRequests []string
3038 err = json.Unmarshal(*v, &resourceGuardOperationRequests)
3039 if err != nil {
3040 return err
3041 }
3042 aispp.ResourceGuardOperationRequests = &resourceGuardOperationRequests
3043 }
3044 case "backupManagementType":
3045 if v != nil {
3046 var backupManagementType ManagementTypeBasicProtectionPolicy
3047 err = json.Unmarshal(*v, &backupManagementType)
3048 if err != nil {
3049 return err
3050 }
3051 aispp.BackupManagementType = backupManagementType
3052 }
3053 }
3054 }
3055
3056 return nil
3057 }
3058
3059
3060 type BasicAzureRecoveryServiceVaultProtectionIntent interface {
3061 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
3062 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
3063 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
3064 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
3065 }
3066
3067
3068 type AzureRecoveryServiceVaultProtectionIntent struct {
3069
3070 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3071
3072 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3073
3074 ItemID *string `json:"itemId,omitempty"`
3075
3076 PolicyID *string `json:"policyId,omitempty"`
3077
3078 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
3079
3080 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
3081 }
3082
3083 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) {
3084 var m map[string]interface{}
3085 err := json.Unmarshal(body, &m)
3086 if err != nil {
3087 return nil, err
3088 }
3089
3090 switch m["protectionIntentItemType"] {
3091 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
3092 var awapi AzureWorkloadAutoProtectionIntent
3093 err := json.Unmarshal(body, &awapi)
3094 return awapi, err
3095 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
3096 var awsapi AzureWorkloadSQLAutoProtectionIntent
3097 err := json.Unmarshal(body, &awsapi)
3098 return awsapi, err
3099 default:
3100 var arsvpi AzureRecoveryServiceVaultProtectionIntent
3101 err := json.Unmarshal(body, &arsvpi)
3102 return arsvpi, err
3103 }
3104 }
3105 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) {
3106 var rawMessages []*json.RawMessage
3107 err := json.Unmarshal(body, &rawMessages)
3108 if err != nil {
3109 return nil, err
3110 }
3111
3112 arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages))
3113
3114 for index, rawMessage := range rawMessages {
3115 arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage)
3116 if err != nil {
3117 return nil, err
3118 }
3119 arsvpiArray[index] = arsvpi
3120 }
3121 return arsvpiArray, nil
3122 }
3123
3124
3125 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) {
3126 arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem
3127 objectMap := make(map[string]interface{})
3128 if arsvpi.BackupManagementType != "" {
3129 objectMap["backupManagementType"] = arsvpi.BackupManagementType
3130 }
3131 if arsvpi.SourceResourceID != nil {
3132 objectMap["sourceResourceId"] = arsvpi.SourceResourceID
3133 }
3134 if arsvpi.ItemID != nil {
3135 objectMap["itemId"] = arsvpi.ItemID
3136 }
3137 if arsvpi.PolicyID != nil {
3138 objectMap["policyId"] = arsvpi.PolicyID
3139 }
3140 if arsvpi.ProtectionState != "" {
3141 objectMap["protectionState"] = arsvpi.ProtectionState
3142 }
3143 if arsvpi.ProtectionIntentItemType != "" {
3144 objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType
3145 }
3146 return json.Marshal(objectMap)
3147 }
3148
3149
3150 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
3151 return &arsvpi, true
3152 }
3153
3154
3155 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
3156 return &arsvpi, true
3157 }
3158
3159
3160 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
3161 return nil, false
3162 }
3163
3164
3165 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
3166 return nil, false
3167 }
3168
3169
3170 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
3171 return nil, false
3172 }
3173
3174
3175 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
3176 return nil, false
3177 }
3178
3179
3180 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
3181 return nil, false
3182 }
3183
3184
3185 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
3186 return nil, false
3187 }
3188
3189
3190 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
3191 return &arsvpi, true
3192 }
3193
3194
3195 type AzureResourceProtectionIntent struct {
3196
3197 FriendlyName *string `json:"friendlyName,omitempty"`
3198
3199 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3200
3201 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3202
3203 ItemID *string `json:"itemId,omitempty"`
3204
3205 PolicyID *string `json:"policyId,omitempty"`
3206
3207 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
3208
3209 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
3210 }
3211
3212
3213 func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) {
3214 arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem
3215 objectMap := make(map[string]interface{})
3216 if arpi.FriendlyName != nil {
3217 objectMap["friendlyName"] = arpi.FriendlyName
3218 }
3219 if arpi.BackupManagementType != "" {
3220 objectMap["backupManagementType"] = arpi.BackupManagementType
3221 }
3222 if arpi.SourceResourceID != nil {
3223 objectMap["sourceResourceId"] = arpi.SourceResourceID
3224 }
3225 if arpi.ItemID != nil {
3226 objectMap["itemId"] = arpi.ItemID
3227 }
3228 if arpi.PolicyID != nil {
3229 objectMap["policyId"] = arpi.PolicyID
3230 }
3231 if arpi.ProtectionState != "" {
3232 objectMap["protectionState"] = arpi.ProtectionState
3233 }
3234 if arpi.ProtectionIntentItemType != "" {
3235 objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType
3236 }
3237 return json.Marshal(objectMap)
3238 }
3239
3240
3241 func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
3242 return nil, false
3243 }
3244
3245
3246 func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
3247 return nil, false
3248 }
3249
3250
3251 func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
3252 return &arpi, true
3253 }
3254
3255
3256 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
3257 return nil, false
3258 }
3259
3260
3261 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
3262 return nil, false
3263 }
3264
3265
3266 func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
3267 return nil, false
3268 }
3269
3270
3271 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
3272 return nil, false
3273 }
3274
3275
3276 func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
3277 return nil, false
3278 }
3279
3280
3281 func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
3282 return &arpi, true
3283 }
3284
3285
3286 type AzureSQLAGWorkloadContainerProtectionContainer struct {
3287
3288 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3289
3290 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
3291
3292 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
3293
3294 WorkloadType WorkloadType `json:"workloadType,omitempty"`
3295
3296 OperationType OperationType `json:"operationType,omitempty"`
3297
3298 FriendlyName *string `json:"friendlyName,omitempty"`
3299
3300 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3301
3302 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3303
3304 HealthStatus *string `json:"healthStatus,omitempty"`
3305
3306 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
3307
3308 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3309 }
3310
3311
3312 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) {
3313 aswcpc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer
3314 objectMap := make(map[string]interface{})
3315 if aswcpc.SourceResourceID != nil {
3316 objectMap["sourceResourceId"] = aswcpc.SourceResourceID
3317 }
3318 if aswcpc.LastUpdatedTime != nil {
3319 objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime
3320 }
3321 if aswcpc.ExtendedInfo != nil {
3322 objectMap["extendedInfo"] = aswcpc.ExtendedInfo
3323 }
3324 if aswcpc.WorkloadType != "" {
3325 objectMap["workloadType"] = aswcpc.WorkloadType
3326 }
3327 if aswcpc.OperationType != "" {
3328 objectMap["operationType"] = aswcpc.OperationType
3329 }
3330 if aswcpc.FriendlyName != nil {
3331 objectMap["friendlyName"] = aswcpc.FriendlyName
3332 }
3333 if aswcpc.BackupManagementType != "" {
3334 objectMap["backupManagementType"] = aswcpc.BackupManagementType
3335 }
3336 if aswcpc.RegistrationStatus != nil {
3337 objectMap["registrationStatus"] = aswcpc.RegistrationStatus
3338 }
3339 if aswcpc.HealthStatus != nil {
3340 objectMap["healthStatus"] = aswcpc.HealthStatus
3341 }
3342 if aswcpc.ProtectableObjectType != nil {
3343 objectMap["protectableObjectType"] = aswcpc.ProtectableObjectType
3344 }
3345 if aswcpc.ContainerType != "" {
3346 objectMap["containerType"] = aswcpc.ContainerType
3347 }
3348 return json.Marshal(objectMap)
3349 }
3350
3351
3352 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3353 return nil, false
3354 }
3355
3356
3357 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3358 return nil, false
3359 }
3360
3361
3362 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3363 return nil, false
3364 }
3365
3366
3367 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3368 return &aswcpc, true
3369 }
3370
3371
3372 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3373 return nil, false
3374 }
3375
3376
3377 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3378 return nil, false
3379 }
3380
3381
3382 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3383 return nil, false
3384 }
3385
3386
3387 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3388 return nil, false
3389 }
3390
3391
3392 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3393 return &aswcpc, true
3394 }
3395
3396
3397 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
3398 return nil, false
3399 }
3400
3401
3402 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3403 return nil, false
3404 }
3405
3406
3407 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
3408 return nil, false
3409 }
3410
3411
3412 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3413 return nil, false
3414 }
3415
3416
3417 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3418 return nil, false
3419 }
3420
3421
3422 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
3423 return nil, false
3424 }
3425
3426
3427 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3428 return nil, false
3429 }
3430
3431
3432 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3433 return &aswcpc, true
3434 }
3435
3436
3437 type AzureSQLContainer struct {
3438
3439 FriendlyName *string `json:"friendlyName,omitempty"`
3440
3441 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3442
3443 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3444
3445 HealthStatus *string `json:"healthStatus,omitempty"`
3446
3447 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
3448
3449 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3450 }
3451
3452
3453 func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) {
3454 asc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer
3455 objectMap := make(map[string]interface{})
3456 if asc.FriendlyName != nil {
3457 objectMap["friendlyName"] = asc.FriendlyName
3458 }
3459 if asc.BackupManagementType != "" {
3460 objectMap["backupManagementType"] = asc.BackupManagementType
3461 }
3462 if asc.RegistrationStatus != nil {
3463 objectMap["registrationStatus"] = asc.RegistrationStatus
3464 }
3465 if asc.HealthStatus != nil {
3466 objectMap["healthStatus"] = asc.HealthStatus
3467 }
3468 if asc.ProtectableObjectType != nil {
3469 objectMap["protectableObjectType"] = asc.ProtectableObjectType
3470 }
3471 if asc.ContainerType != "" {
3472 objectMap["containerType"] = asc.ContainerType
3473 }
3474 return json.Marshal(objectMap)
3475 }
3476
3477
3478 func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3479 return nil, false
3480 }
3481
3482
3483 func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3484 return nil, false
3485 }
3486
3487
3488 func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3489 return nil, false
3490 }
3491
3492
3493 func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3494 return nil, false
3495 }
3496
3497
3498 func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3499 return &asc, true
3500 }
3501
3502
3503 func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3504 return nil, false
3505 }
3506
3507
3508 func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3509 return nil, false
3510 }
3511
3512
3513 func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3514 return nil, false
3515 }
3516
3517
3518 func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3519 return nil, false
3520 }
3521
3522
3523 func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) {
3524 return nil, false
3525 }
3526
3527
3528 func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3529 return nil, false
3530 }
3531
3532
3533 func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) {
3534 return nil, false
3535 }
3536
3537
3538 func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3539 return nil, false
3540 }
3541
3542
3543 func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3544 return nil, false
3545 }
3546
3547
3548 func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) {
3549 return nil, false
3550 }
3551
3552
3553 func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3554 return nil, false
3555 }
3556
3557
3558 func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3559 return &asc, true
3560 }
3561
3562
3563 type AzureSQLProtectedItem struct {
3564
3565 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
3566
3567 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
3568
3569 ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
3570
3571 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3572
3573 WorkloadType DataSourceType `json:"workloadType,omitempty"`
3574
3575 ContainerName *string `json:"containerName,omitempty"`
3576
3577 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3578
3579 PolicyID *string `json:"policyId,omitempty"`
3580
3581 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
3582
3583 BackupSetName *string `json:"backupSetName,omitempty"`
3584
3585 CreateMode CreateMode `json:"createMode,omitempty"`
3586
3587 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
3588
3589 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
3590
3591 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
3592
3593 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
3594
3595 IsRehydrate *bool `json:"isRehydrate,omitempty"`
3596
3597 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
3598
3599 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
3600
3601 PolicyName *string `json:"policyName,omitempty"`
3602
3603 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
3604 }
3605
3606
3607 func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) {
3608 aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases
3609 objectMap := make(map[string]interface{})
3610 if aspi.ProtectedItemDataID != nil {
3611 objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID
3612 }
3613 if aspi.ProtectionState != "" {
3614 objectMap["protectionState"] = aspi.ProtectionState
3615 }
3616 if aspi.ExtendedInfo != nil {
3617 objectMap["extendedInfo"] = aspi.ExtendedInfo
3618 }
3619 if aspi.BackupManagementType != "" {
3620 objectMap["backupManagementType"] = aspi.BackupManagementType
3621 }
3622 if aspi.WorkloadType != "" {
3623 objectMap["workloadType"] = aspi.WorkloadType
3624 }
3625 if aspi.ContainerName != nil {
3626 objectMap["containerName"] = aspi.ContainerName
3627 }
3628 if aspi.SourceResourceID != nil {
3629 objectMap["sourceResourceId"] = aspi.SourceResourceID
3630 }
3631 if aspi.PolicyID != nil {
3632 objectMap["policyId"] = aspi.PolicyID
3633 }
3634 if aspi.LastRecoveryPoint != nil {
3635 objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint
3636 }
3637 if aspi.BackupSetName != nil {
3638 objectMap["backupSetName"] = aspi.BackupSetName
3639 }
3640 if aspi.CreateMode != "" {
3641 objectMap["createMode"] = aspi.CreateMode
3642 }
3643 if aspi.DeferredDeleteTimeInUTC != nil {
3644 objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC
3645 }
3646 if aspi.IsScheduledForDeferredDelete != nil {
3647 objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete
3648 }
3649 if aspi.DeferredDeleteTimeRemaining != nil {
3650 objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining
3651 }
3652 if aspi.IsDeferredDeleteScheduleUpcoming != nil {
3653 objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming
3654 }
3655 if aspi.IsRehydrate != nil {
3656 objectMap["isRehydrate"] = aspi.IsRehydrate
3657 }
3658 if aspi.ResourceGuardOperationRequests != nil {
3659 objectMap["resourceGuardOperationRequests"] = aspi.ResourceGuardOperationRequests
3660 }
3661 if aspi.IsArchiveEnabled != nil {
3662 objectMap["isArchiveEnabled"] = aspi.IsArchiveEnabled
3663 }
3664 if aspi.PolicyName != nil {
3665 objectMap["policyName"] = aspi.PolicyName
3666 }
3667 if aspi.ProtectedItemType != "" {
3668 objectMap["protectedItemType"] = aspi.ProtectedItemType
3669 }
3670 return json.Marshal(objectMap)
3671 }
3672
3673
3674 func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
3675 return nil, false
3676 }
3677
3678
3679 func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
3680 return nil, false
3681 }
3682
3683
3684 func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
3685 return nil, false
3686 }
3687
3688
3689 func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
3690 return nil, false
3691 }
3692
3693
3694 func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
3695 return nil, false
3696 }
3697
3698
3699 func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
3700 return &aspi, true
3701 }
3702
3703
3704 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
3705 return nil, false
3706 }
3707
3708
3709 func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
3710 return nil, false
3711 }
3712
3713
3714 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
3715 return nil, false
3716 }
3717
3718
3719 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
3720 return nil, false
3721 }
3722
3723
3724 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
3725 return nil, false
3726 }
3727
3728
3729 func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
3730 return nil, false
3731 }
3732
3733
3734 func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
3735 return nil, false
3736 }
3737
3738
3739 func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
3740 return nil, false
3741 }
3742
3743
3744 func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
3745 return nil, false
3746 }
3747
3748
3749 func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
3750 return &aspi, true
3751 }
3752
3753
3754 type AzureSQLProtectedItemExtendedInfo struct {
3755
3756 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
3757
3758 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
3759
3760 PolicyState *string `json:"policyState,omitempty"`
3761 }
3762
3763
3764 type AzureSQLProtectionPolicy struct {
3765
3766 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
3767
3768 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
3769
3770 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
3771
3772 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
3773 }
3774
3775
3776 func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) {
3777 aspp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL
3778 objectMap := make(map[string]interface{})
3779 objectMap["retentionPolicy"] = aspp.RetentionPolicy
3780 if aspp.ProtectedItemsCount != nil {
3781 objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount
3782 }
3783 if aspp.ResourceGuardOperationRequests != nil {
3784 objectMap["resourceGuardOperationRequests"] = aspp.ResourceGuardOperationRequests
3785 }
3786 if aspp.BackupManagementType != "" {
3787 objectMap["backupManagementType"] = aspp.BackupManagementType
3788 }
3789 return json.Marshal(objectMap)
3790 }
3791
3792
3793 func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
3794 return nil, false
3795 }
3796
3797
3798 func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
3799 return nil, false
3800 }
3801
3802
3803 func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
3804 return nil, false
3805 }
3806
3807
3808 func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
3809 return &aspp, true
3810 }
3811
3812
3813 func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
3814 return nil, false
3815 }
3816
3817
3818 func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
3819 return nil, false
3820 }
3821
3822
3823 func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
3824 return nil, false
3825 }
3826
3827
3828 func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
3829 return &aspp, true
3830 }
3831
3832
3833 func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error {
3834 var m map[string]*json.RawMessage
3835 err := json.Unmarshal(body, &m)
3836 if err != nil {
3837 return err
3838 }
3839 for k, v := range m {
3840 switch k {
3841 case "retentionPolicy":
3842 if v != nil {
3843 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
3844 if err != nil {
3845 return err
3846 }
3847 aspp.RetentionPolicy = retentionPolicy
3848 }
3849 case "protectedItemsCount":
3850 if v != nil {
3851 var protectedItemsCount int32
3852 err = json.Unmarshal(*v, &protectedItemsCount)
3853 if err != nil {
3854 return err
3855 }
3856 aspp.ProtectedItemsCount = &protectedItemsCount
3857 }
3858 case "resourceGuardOperationRequests":
3859 if v != nil {
3860 var resourceGuardOperationRequests []string
3861 err = json.Unmarshal(*v, &resourceGuardOperationRequests)
3862 if err != nil {
3863 return err
3864 }
3865 aspp.ResourceGuardOperationRequests = &resourceGuardOperationRequests
3866 }
3867 case "backupManagementType":
3868 if v != nil {
3869 var backupManagementType ManagementTypeBasicProtectionPolicy
3870 err = json.Unmarshal(*v, &backupManagementType)
3871 if err != nil {
3872 return err
3873 }
3874 aspp.BackupManagementType = backupManagementType
3875 }
3876 }
3877 }
3878
3879 return nil
3880 }
3881
3882
3883 type AzureStorageContainer struct {
3884
3885 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3886
3887 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3888
3889 ResourceGroup *string `json:"resourceGroup,omitempty"`
3890
3891 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
3892
3893 AcquireStorageAccountLock AcquireStorageAccountLock `json:"acquireStorageAccountLock,omitempty"`
3894
3895 FriendlyName *string `json:"friendlyName,omitempty"`
3896
3897 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3898
3899 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3900
3901 HealthStatus *string `json:"healthStatus,omitempty"`
3902
3903 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
3904
3905 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3906 }
3907
3908
3909 func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) {
3910 asc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeStorageContainer
3911 objectMap := make(map[string]interface{})
3912 if asc.SourceResourceID != nil {
3913 objectMap["sourceResourceId"] = asc.SourceResourceID
3914 }
3915 if asc.StorageAccountVersion != nil {
3916 objectMap["storageAccountVersion"] = asc.StorageAccountVersion
3917 }
3918 if asc.ResourceGroup != nil {
3919 objectMap["resourceGroup"] = asc.ResourceGroup
3920 }
3921 if asc.ProtectedItemCount != nil {
3922 objectMap["protectedItemCount"] = asc.ProtectedItemCount
3923 }
3924 if asc.AcquireStorageAccountLock != "" {
3925 objectMap["acquireStorageAccountLock"] = asc.AcquireStorageAccountLock
3926 }
3927 if asc.FriendlyName != nil {
3928 objectMap["friendlyName"] = asc.FriendlyName
3929 }
3930 if asc.BackupManagementType != "" {
3931 objectMap["backupManagementType"] = asc.BackupManagementType
3932 }
3933 if asc.RegistrationStatus != nil {
3934 objectMap["registrationStatus"] = asc.RegistrationStatus
3935 }
3936 if asc.HealthStatus != nil {
3937 objectMap["healthStatus"] = asc.HealthStatus
3938 }
3939 if asc.ProtectableObjectType != nil {
3940 objectMap["protectableObjectType"] = asc.ProtectableObjectType
3941 }
3942 if asc.ContainerType != "" {
3943 objectMap["containerType"] = asc.ContainerType
3944 }
3945 return json.Marshal(objectMap)
3946 }
3947
3948
3949 func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3950 return nil, false
3951 }
3952
3953
3954 func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3955 return nil, false
3956 }
3957
3958
3959 func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3960 return nil, false
3961 }
3962
3963
3964 func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3965 return nil, false
3966 }
3967
3968
3969 func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3970 return nil, false
3971 }
3972
3973
3974 func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3975 return &asc, true
3976 }
3977
3978
3979 func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3980 return nil, false
3981 }
3982
3983
3984 func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3985 return nil, false
3986 }
3987
3988
3989 func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3990 return nil, false
3991 }
3992
3993
3994 func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) {
3995 return nil, false
3996 }
3997
3998
3999 func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
4000 return nil, false
4001 }
4002
4003
4004 func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) {
4005 return nil, false
4006 }
4007
4008
4009 func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
4010 return nil, false
4011 }
4012
4013
4014 func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
4015 return nil, false
4016 }
4017
4018
4019 func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) {
4020 return nil, false
4021 }
4022
4023
4024 func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
4025 return nil, false
4026 }
4027
4028
4029 func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
4030 return &asc, true
4031 }
4032
4033
4034 type AzureStorageErrorInfo struct {
4035
4036 ErrorCode *int32 `json:"errorCode,omitempty"`
4037
4038 ErrorString *string `json:"errorString,omitempty"`
4039
4040 Recommendations *[]string `json:"recommendations,omitempty"`
4041 }
4042
4043
4044 type AzureStorageJob struct {
4045
4046 Duration *string `json:"duration,omitempty"`
4047
4048 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
4049
4050 ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"`
4051
4052 StorageAccountName *string `json:"storageAccountName,omitempty"`
4053
4054 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
4055
4056 ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"`
4057
4058 IsUserTriggered *bool `json:"isUserTriggered,omitempty"`
4059
4060 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
4061
4062 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4063
4064 Operation *string `json:"operation,omitempty"`
4065
4066 Status *string `json:"status,omitempty"`
4067
4068 StartTime *date.Time `json:"startTime,omitempty"`
4069
4070 EndTime *date.Time `json:"endTime,omitempty"`
4071
4072 ActivityID *string `json:"activityId,omitempty"`
4073
4074 JobType JobType `json:"jobType,omitempty"`
4075 }
4076
4077
4078 func (asj AzureStorageJob) MarshalJSON() ([]byte, error) {
4079 asj.JobType = JobTypeAzureStorageJob
4080 objectMap := make(map[string]interface{})
4081 if asj.Duration != nil {
4082 objectMap["duration"] = asj.Duration
4083 }
4084 if asj.ActionsInfo != nil {
4085 objectMap["actionsInfo"] = asj.ActionsInfo
4086 }
4087 if asj.ErrorDetails != nil {
4088 objectMap["errorDetails"] = asj.ErrorDetails
4089 }
4090 if asj.StorageAccountName != nil {
4091 objectMap["storageAccountName"] = asj.StorageAccountName
4092 }
4093 if asj.StorageAccountVersion != nil {
4094 objectMap["storageAccountVersion"] = asj.StorageAccountVersion
4095 }
4096 if asj.ExtendedInfo != nil {
4097 objectMap["extendedInfo"] = asj.ExtendedInfo
4098 }
4099 if asj.IsUserTriggered != nil {
4100 objectMap["isUserTriggered"] = asj.IsUserTriggered
4101 }
4102 if asj.EntityFriendlyName != nil {
4103 objectMap["entityFriendlyName"] = asj.EntityFriendlyName
4104 }
4105 if asj.BackupManagementType != "" {
4106 objectMap["backupManagementType"] = asj.BackupManagementType
4107 }
4108 if asj.Operation != nil {
4109 objectMap["operation"] = asj.Operation
4110 }
4111 if asj.Status != nil {
4112 objectMap["status"] = asj.Status
4113 }
4114 if asj.StartTime != nil {
4115 objectMap["startTime"] = asj.StartTime
4116 }
4117 if asj.EndTime != nil {
4118 objectMap["endTime"] = asj.EndTime
4119 }
4120 if asj.ActivityID != nil {
4121 objectMap["activityId"] = asj.ActivityID
4122 }
4123 if asj.JobType != "" {
4124 objectMap["jobType"] = asj.JobType
4125 }
4126 return json.Marshal(objectMap)
4127 }
4128
4129
4130 func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
4131 return nil, false
4132 }
4133
4134
4135 func (asj AzureStorageJob) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
4136 return nil, false
4137 }
4138
4139
4140 func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
4141 return &asj, true
4142 }
4143
4144
4145 func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
4146 return nil, false
4147 }
4148
4149
4150 func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) {
4151 return nil, false
4152 }
4153
4154
4155 func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) {
4156 return nil, false
4157 }
4158
4159
4160 func (asj AzureStorageJob) AsVaultJob() (*VaultJob, bool) {
4161 return nil, false
4162 }
4163
4164
4165 func (asj AzureStorageJob) AsJob() (*Job, bool) {
4166 return nil, false
4167 }
4168
4169
4170 func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) {
4171 return &asj, true
4172 }
4173
4174
4175 type AzureStorageJobExtendedInfo struct {
4176
4177 TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"`
4178
4179 PropertyBag map[string]*string `json:"propertyBag"`
4180
4181 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
4182 }
4183
4184
4185 func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) {
4186 objectMap := make(map[string]interface{})
4187 if asjei.TasksList != nil {
4188 objectMap["tasksList"] = asjei.TasksList
4189 }
4190 if asjei.PropertyBag != nil {
4191 objectMap["propertyBag"] = asjei.PropertyBag
4192 }
4193 if asjei.DynamicErrorMessage != nil {
4194 objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage
4195 }
4196 return json.Marshal(objectMap)
4197 }
4198
4199
4200 type AzureStorageJobTaskDetails struct {
4201
4202 TaskID *string `json:"taskId,omitempty"`
4203
4204 Status *string `json:"status,omitempty"`
4205 }
4206
4207
4208 type AzureStorageProtectableContainer struct {
4209
4210 FriendlyName *string `json:"friendlyName,omitempty"`
4211
4212 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4213
4214 HealthStatus *string `json:"healthStatus,omitempty"`
4215
4216 ContainerID *string `json:"containerId,omitempty"`
4217
4218 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
4219 }
4220
4221
4222 func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) {
4223 aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer
4224 objectMap := make(map[string]interface{})
4225 if aspc.FriendlyName != nil {
4226 objectMap["friendlyName"] = aspc.FriendlyName
4227 }
4228 if aspc.BackupManagementType != "" {
4229 objectMap["backupManagementType"] = aspc.BackupManagementType
4230 }
4231 if aspc.HealthStatus != nil {
4232 objectMap["healthStatus"] = aspc.HealthStatus
4233 }
4234 if aspc.ContainerID != nil {
4235 objectMap["containerId"] = aspc.ContainerID
4236 }
4237 if aspc.ProtectableContainerType != "" {
4238 objectMap["protectableContainerType"] = aspc.ProtectableContainerType
4239 }
4240 return json.Marshal(objectMap)
4241 }
4242
4243
4244 func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
4245 return &aspc, true
4246 }
4247
4248
4249 func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
4250 return nil, false
4251 }
4252
4253
4254 func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
4255 return nil, false
4256 }
4257
4258
4259 func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
4260 return &aspc, true
4261 }
4262
4263
4264 type AzureVMAppContainerProtectableContainer struct {
4265
4266 FriendlyName *string `json:"friendlyName,omitempty"`
4267
4268 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4269
4270 HealthStatus *string `json:"healthStatus,omitempty"`
4271
4272 ContainerID *string `json:"containerId,omitempty"`
4273
4274 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
4275 }
4276
4277
4278 func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) {
4279 avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer
4280 objectMap := make(map[string]interface{})
4281 if avacpc.FriendlyName != nil {
4282 objectMap["friendlyName"] = avacpc.FriendlyName
4283 }
4284 if avacpc.BackupManagementType != "" {
4285 objectMap["backupManagementType"] = avacpc.BackupManagementType
4286 }
4287 if avacpc.HealthStatus != nil {
4288 objectMap["healthStatus"] = avacpc.HealthStatus
4289 }
4290 if avacpc.ContainerID != nil {
4291 objectMap["containerId"] = avacpc.ContainerID
4292 }
4293 if avacpc.ProtectableContainerType != "" {
4294 objectMap["protectableContainerType"] = avacpc.ProtectableContainerType
4295 }
4296 return json.Marshal(objectMap)
4297 }
4298
4299
4300 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
4301 return nil, false
4302 }
4303
4304
4305 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
4306 return &avacpc, true
4307 }
4308
4309
4310 func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
4311 return nil, false
4312 }
4313
4314
4315 func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
4316 return &avacpc, true
4317 }
4318
4319
4320 type AzureVMAppContainerProtectionContainer struct {
4321
4322 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4323
4324 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
4325
4326 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
4327
4328 WorkloadType WorkloadType `json:"workloadType,omitempty"`
4329
4330 OperationType OperationType `json:"operationType,omitempty"`
4331
4332 FriendlyName *string `json:"friendlyName,omitempty"`
4333
4334 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4335
4336 RegistrationStatus *string `json:"registrationStatus,omitempty"`
4337
4338 HealthStatus *string `json:"healthStatus,omitempty"`
4339
4340 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
4341
4342 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
4343 }
4344
4345
4346 func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) {
4347 avacpc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer
4348 objectMap := make(map[string]interface{})
4349 if avacpc.SourceResourceID != nil {
4350 objectMap["sourceResourceId"] = avacpc.SourceResourceID
4351 }
4352 if avacpc.LastUpdatedTime != nil {
4353 objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime
4354 }
4355 if avacpc.ExtendedInfo != nil {
4356 objectMap["extendedInfo"] = avacpc.ExtendedInfo
4357 }
4358 if avacpc.WorkloadType != "" {
4359 objectMap["workloadType"] = avacpc.WorkloadType
4360 }
4361 if avacpc.OperationType != "" {
4362 objectMap["operationType"] = avacpc.OperationType
4363 }
4364 if avacpc.FriendlyName != nil {
4365 objectMap["friendlyName"] = avacpc.FriendlyName
4366 }
4367 if avacpc.BackupManagementType != "" {
4368 objectMap["backupManagementType"] = avacpc.BackupManagementType
4369 }
4370 if avacpc.RegistrationStatus != nil {
4371 objectMap["registrationStatus"] = avacpc.RegistrationStatus
4372 }
4373 if avacpc.HealthStatus != nil {
4374 objectMap["healthStatus"] = avacpc.HealthStatus
4375 }
4376 if avacpc.ProtectableObjectType != nil {
4377 objectMap["protectableObjectType"] = avacpc.ProtectableObjectType
4378 }
4379 if avacpc.ContainerType != "" {
4380 objectMap["containerType"] = avacpc.ContainerType
4381 }
4382 return json.Marshal(objectMap)
4383 }
4384
4385
4386 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
4387 return nil, false
4388 }
4389
4390
4391 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
4392 return nil, false
4393 }
4394
4395
4396 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
4397 return nil, false
4398 }
4399
4400
4401 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
4402 return nil, false
4403 }
4404
4405
4406 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
4407 return nil, false
4408 }
4409
4410
4411 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
4412 return nil, false
4413 }
4414
4415
4416 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
4417 return &avacpc, true
4418 }
4419
4420
4421 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
4422 return nil, false
4423 }
4424
4425
4426 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
4427 return &avacpc, true
4428 }
4429
4430
4431 func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
4432 return nil, false
4433 }
4434
4435
4436 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
4437 return nil, false
4438 }
4439
4440
4441 func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
4442 return nil, false
4443 }
4444
4445
4446 func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
4447 return nil, false
4448 }
4449
4450
4451 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
4452 return nil, false
4453 }
4454
4455
4456 func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
4457 return nil, false
4458 }
4459
4460
4461 func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
4462 return nil, false
4463 }
4464
4465
4466 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
4467 return &avacpc, true
4468 }
4469
4470
4471 type AzureVMResourceFeatureSupportRequest struct {
4472
4473 VMSize *string `json:"vmSize,omitempty"`
4474
4475 VMSku *string `json:"vmSku,omitempty"`
4476
4477 FeatureType FeatureType `json:"featureType,omitempty"`
4478 }
4479
4480
4481 func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) {
4482 avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup
4483 objectMap := make(map[string]interface{})
4484 if avrfsr.VMSize != nil {
4485 objectMap["vmSize"] = avrfsr.VMSize
4486 }
4487 if avrfsr.VMSku != nil {
4488 objectMap["vmSku"] = avrfsr.VMSku
4489 }
4490 if avrfsr.FeatureType != "" {
4491 objectMap["featureType"] = avrfsr.FeatureType
4492 }
4493 return json.Marshal(objectMap)
4494 }
4495
4496
4497 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
4498 return nil, false
4499 }
4500
4501
4502 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
4503 return &avrfsr, true
4504 }
4505
4506
4507 func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
4508 return nil, false
4509 }
4510
4511
4512 func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
4513 return &avrfsr, true
4514 }
4515
4516
4517 type AzureVMResourceFeatureSupportResponse struct {
4518 autorest.Response `json:"-"`
4519
4520 SupportStatus SupportStatus `json:"supportStatus,omitempty"`
4521 }
4522
4523
4524 type BasicAzureVMWorkloadItem interface {
4525 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
4526 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
4527 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
4528 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
4529 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
4530 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
4531 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
4532 }
4533
4534
4535 type AzureVMWorkloadItem struct {
4536
4537 ParentName *string `json:"parentName,omitempty"`
4538
4539 ServerName *string `json:"serverName,omitempty"`
4540
4541 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4542
4543 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4544
4545 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
4546
4547 BackupManagementType *string `json:"backupManagementType,omitempty"`
4548
4549 WorkloadType *string `json:"workloadType,omitempty"`
4550
4551 FriendlyName *string `json:"friendlyName,omitempty"`
4552
4553 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4554
4555 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
4556 }
4557
4558 func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) {
4559 var m map[string]interface{}
4560 err := json.Unmarshal(body, &m)
4561 if err != nil {
4562 return nil, err
4563 }
4564
4565 switch m["workloadItemType"] {
4566 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase):
4567 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
4568 err := json.Unmarshal(body, &avwsadwi)
4569 return avwsadwi, err
4570 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem):
4571 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
4572 err := json.Unmarshal(body, &avwsaswi)
4573 return avwsaswi, err
4574 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase):
4575 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
4576 err := json.Unmarshal(body, &avwshdwi)
4577 return avwshdwi, err
4578 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem):
4579 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
4580 err := json.Unmarshal(body, &avwshswi)
4581 return avwshswi, err
4582 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase):
4583 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
4584 err := json.Unmarshal(body, &avwsdwi)
4585 return avwsdwi, err
4586 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance):
4587 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
4588 err := json.Unmarshal(body, &avwsiwi)
4589 return avwsiwi, err
4590 default:
4591 var avwi AzureVMWorkloadItem
4592 err := json.Unmarshal(body, &avwi)
4593 return avwi, err
4594 }
4595 }
4596 func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) {
4597 var rawMessages []*json.RawMessage
4598 err := json.Unmarshal(body, &rawMessages)
4599 if err != nil {
4600 return nil, err
4601 }
4602
4603 avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages))
4604
4605 for index, rawMessage := range rawMessages {
4606 avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage)
4607 if err != nil {
4608 return nil, err
4609 }
4610 avwiArray[index] = avwi
4611 }
4612 return avwiArray, nil
4613 }
4614
4615
4616 func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) {
4617 avwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem
4618 objectMap := make(map[string]interface{})
4619 if avwi.ParentName != nil {
4620 objectMap["parentName"] = avwi.ParentName
4621 }
4622 if avwi.ServerName != nil {
4623 objectMap["serverName"] = avwi.ServerName
4624 }
4625 if avwi.IsAutoProtectable != nil {
4626 objectMap["isAutoProtectable"] = avwi.IsAutoProtectable
4627 }
4628 if avwi.Subinquireditemcount != nil {
4629 objectMap["subinquireditemcount"] = avwi.Subinquireditemcount
4630 }
4631 if avwi.SubWorkloadItemCount != nil {
4632 objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount
4633 }
4634 if avwi.BackupManagementType != nil {
4635 objectMap["backupManagementType"] = avwi.BackupManagementType
4636 }
4637 if avwi.WorkloadType != nil {
4638 objectMap["workloadType"] = avwi.WorkloadType
4639 }
4640 if avwi.FriendlyName != nil {
4641 objectMap["friendlyName"] = avwi.FriendlyName
4642 }
4643 if avwi.ProtectionState != "" {
4644 objectMap["protectionState"] = avwi.ProtectionState
4645 }
4646 if avwi.WorkloadItemType != "" {
4647 objectMap["workloadItemType"] = avwi.WorkloadItemType
4648 }
4649 return json.Marshal(objectMap)
4650 }
4651
4652
4653 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
4654 return &avwi, true
4655 }
4656
4657
4658 func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
4659 return &avwi, true
4660 }
4661
4662
4663 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
4664 return nil, false
4665 }
4666
4667
4668 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
4669 return nil, false
4670 }
4671
4672
4673 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
4674 return nil, false
4675 }
4676
4677
4678 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
4679 return nil, false
4680 }
4681
4682
4683 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
4684 return nil, false
4685 }
4686
4687
4688 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
4689 return nil, false
4690 }
4691
4692
4693 func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
4694 return nil, false
4695 }
4696
4697
4698 func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
4699 return &avwi, true
4700 }
4701
4702
4703 type BasicAzureVMWorkloadProtectableItem interface {
4704 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
4705 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
4706 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
4707 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
4708 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
4709 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
4710 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
4711 }
4712
4713
4714 type AzureVMWorkloadProtectableItem struct {
4715
4716 ParentName *string `json:"parentName,omitempty"`
4717
4718
4719 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
4720
4721 ServerName *string `json:"serverName,omitempty"`
4722
4723 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4724
4725 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
4726
4727 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4728
4729 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
4730
4731 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
4732
4733 BackupManagementType *string `json:"backupManagementType,omitempty"`
4734
4735 WorkloadType *string `json:"workloadType,omitempty"`
4736
4737 FriendlyName *string `json:"friendlyName,omitempty"`
4738
4739 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4740
4741 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
4742 }
4743
4744 func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) {
4745 var m map[string]interface{}
4746 err := json.Unmarshal(body, &m)
4747 if err != nil {
4748 return nil, err
4749 }
4750
4751 switch m["protectableItemType"] {
4752 case string(ProtectableItemTypeSAPAseSystem):
4753 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
4754 err := json.Unmarshal(body, &avwsaspi)
4755 return avwsaspi, err
4756 case string(ProtectableItemTypeSAPHanaDatabase):
4757 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
4758 err := json.Unmarshal(body, &avwshdpi)
4759 return avwshdpi, err
4760 case string(ProtectableItemTypeSAPHanaSystem):
4761 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
4762 err := json.Unmarshal(body, &avwshspi)
4763 return avwshspi, err
4764 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
4765 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
4766 err := json.Unmarshal(body, &avwsagpi)
4767 return avwsagpi, err
4768 case string(ProtectableItemTypeSQLDataBase):
4769 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
4770 err := json.Unmarshal(body, &avwsdpi)
4771 return avwsdpi, err
4772 case string(ProtectableItemTypeSQLInstance):
4773 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
4774 err := json.Unmarshal(body, &avwsipi)
4775 return avwsipi, err
4776 default:
4777 var avwpi AzureVMWorkloadProtectableItem
4778 err := json.Unmarshal(body, &avwpi)
4779 return avwpi, err
4780 }
4781 }
4782 func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) {
4783 var rawMessages []*json.RawMessage
4784 err := json.Unmarshal(body, &rawMessages)
4785 if err != nil {
4786 return nil, err
4787 }
4788
4789 avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages))
4790
4791 for index, rawMessage := range rawMessages {
4792 avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage)
4793 if err != nil {
4794 return nil, err
4795 }
4796 avwpiArray[index] = avwpi
4797 }
4798 return avwpiArray, nil
4799 }
4800
4801
4802 func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) {
4803 avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem
4804 objectMap := make(map[string]interface{})
4805 if avwpi.ParentName != nil {
4806 objectMap["parentName"] = avwpi.ParentName
4807 }
4808 if avwpi.ParentUniqueName != nil {
4809 objectMap["parentUniqueName"] = avwpi.ParentUniqueName
4810 }
4811 if avwpi.ServerName != nil {
4812 objectMap["serverName"] = avwpi.ServerName
4813 }
4814 if avwpi.IsAutoProtectable != nil {
4815 objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable
4816 }
4817 if avwpi.IsAutoProtected != nil {
4818 objectMap["isAutoProtected"] = avwpi.IsAutoProtected
4819 }
4820 if avwpi.Subinquireditemcount != nil {
4821 objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount
4822 }
4823 if avwpi.Subprotectableitemcount != nil {
4824 objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount
4825 }
4826 if avwpi.Prebackupvalidation != nil {
4827 objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation
4828 }
4829 if avwpi.BackupManagementType != nil {
4830 objectMap["backupManagementType"] = avwpi.BackupManagementType
4831 }
4832 if avwpi.WorkloadType != nil {
4833 objectMap["workloadType"] = avwpi.WorkloadType
4834 }
4835 if avwpi.FriendlyName != nil {
4836 objectMap["friendlyName"] = avwpi.FriendlyName
4837 }
4838 if avwpi.ProtectionState != "" {
4839 objectMap["protectionState"] = avwpi.ProtectionState
4840 }
4841 if avwpi.ProtectableItemType != "" {
4842 objectMap["protectableItemType"] = avwpi.ProtectableItemType
4843 }
4844 return json.Marshal(objectMap)
4845 }
4846
4847
4848 func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
4849 return nil, false
4850 }
4851
4852
4853 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
4854 return nil, false
4855 }
4856
4857
4858 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
4859 return nil, false
4860 }
4861
4862
4863 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
4864 return &avwpi, true
4865 }
4866
4867
4868 func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
4869 return &avwpi, true
4870 }
4871
4872
4873 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
4874 return nil, false
4875 }
4876
4877
4878 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
4879 return nil, false
4880 }
4881
4882
4883 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
4884 return nil, false
4885 }
4886
4887
4888 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
4889 return nil, false
4890 }
4891
4892
4893 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
4894 return nil, false
4895 }
4896
4897
4898 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
4899 return nil, false
4900 }
4901
4902
4903 func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
4904 return nil, false
4905 }
4906
4907
4908 func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
4909 return nil, false
4910 }
4911
4912
4913 func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
4914 return nil, false
4915 }
4916
4917
4918 func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
4919 return &avwpi, true
4920 }
4921
4922
4923 type BasicAzureVMWorkloadProtectedItem interface {
4924 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
4925 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
4926 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
4927 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
4928 }
4929
4930
4931 type AzureVMWorkloadProtectedItem struct {
4932
4933 FriendlyName *string `json:"friendlyName,omitempty"`
4934
4935 ServerName *string `json:"serverName,omitempty"`
4936
4937 ParentName *string `json:"parentName,omitempty"`
4938
4939 ParentType *string `json:"parentType,omitempty"`
4940
4941 ProtectionStatus *string `json:"protectionStatus,omitempty"`
4942
4943 ProtectionState ProtectionState `json:"protectionState,omitempty"`
4944
4945 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
4946
4947 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
4948
4949 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
4950
4951 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
4952
4953 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
4954
4955 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
4956
4957 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
4958
4959 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4960
4961 WorkloadType DataSourceType `json:"workloadType,omitempty"`
4962
4963 ContainerName *string `json:"containerName,omitempty"`
4964
4965 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4966
4967 PolicyID *string `json:"policyId,omitempty"`
4968
4969 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
4970
4971 BackupSetName *string `json:"backupSetName,omitempty"`
4972
4973 CreateMode CreateMode `json:"createMode,omitempty"`
4974
4975 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
4976
4977 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
4978
4979 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
4980
4981 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
4982
4983 IsRehydrate *bool `json:"isRehydrate,omitempty"`
4984
4985 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
4986
4987 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
4988
4989 PolicyName *string `json:"policyName,omitempty"`
4990
4991 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
4992 }
4993
4994 func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) {
4995 var m map[string]interface{}
4996 err := json.Unmarshal(body, &m)
4997 if err != nil {
4998 return nil, err
4999 }
5000
5001 switch m["protectedItemType"] {
5002 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
5003 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
5004 err := json.Unmarshal(body, &avwsadpi)
5005 return avwsadpi, err
5006 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
5007 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
5008 err := json.Unmarshal(body, &avwshdpi)
5009 return avwshdpi, err
5010 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
5011 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
5012 err := json.Unmarshal(body, &avwsdpi)
5013 return avwsdpi, err
5014 default:
5015 var avwpi AzureVMWorkloadProtectedItem
5016 err := json.Unmarshal(body, &avwpi)
5017 return avwpi, err
5018 }
5019 }
5020 func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) {
5021 var rawMessages []*json.RawMessage
5022 err := json.Unmarshal(body, &rawMessages)
5023 if err != nil {
5024 return nil, err
5025 }
5026
5027 avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages))
5028
5029 for index, rawMessage := range rawMessages {
5030 avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage)
5031 if err != nil {
5032 return nil, err
5033 }
5034 avwpiArray[index] = avwpi
5035 }
5036 return avwpiArray, nil
5037 }
5038
5039
5040 func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) {
5041 avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem
5042 objectMap := make(map[string]interface{})
5043 if avwpi.FriendlyName != nil {
5044 objectMap["friendlyName"] = avwpi.FriendlyName
5045 }
5046 if avwpi.ServerName != nil {
5047 objectMap["serverName"] = avwpi.ServerName
5048 }
5049 if avwpi.ParentName != nil {
5050 objectMap["parentName"] = avwpi.ParentName
5051 }
5052 if avwpi.ParentType != nil {
5053 objectMap["parentType"] = avwpi.ParentType
5054 }
5055 if avwpi.ProtectionStatus != nil {
5056 objectMap["protectionStatus"] = avwpi.ProtectionStatus
5057 }
5058 if avwpi.ProtectionState != "" {
5059 objectMap["protectionState"] = avwpi.ProtectionState
5060 }
5061 if avwpi.LastBackupStatus != "" {
5062 objectMap["lastBackupStatus"] = avwpi.LastBackupStatus
5063 }
5064 if avwpi.LastBackupTime != nil {
5065 objectMap["lastBackupTime"] = avwpi.LastBackupTime
5066 }
5067 if avwpi.LastBackupErrorDetail != nil {
5068 objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail
5069 }
5070 if avwpi.ProtectedItemDataSourceID != nil {
5071 objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID
5072 }
5073 if avwpi.ProtectedItemHealthStatus != "" {
5074 objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus
5075 }
5076 if avwpi.ExtendedInfo != nil {
5077 objectMap["extendedInfo"] = avwpi.ExtendedInfo
5078 }
5079 if avwpi.KpisHealths != nil {
5080 objectMap["kpisHealths"] = avwpi.KpisHealths
5081 }
5082 if avwpi.BackupManagementType != "" {
5083 objectMap["backupManagementType"] = avwpi.BackupManagementType
5084 }
5085 if avwpi.WorkloadType != "" {
5086 objectMap["workloadType"] = avwpi.WorkloadType
5087 }
5088 if avwpi.ContainerName != nil {
5089 objectMap["containerName"] = avwpi.ContainerName
5090 }
5091 if avwpi.SourceResourceID != nil {
5092 objectMap["sourceResourceId"] = avwpi.SourceResourceID
5093 }
5094 if avwpi.PolicyID != nil {
5095 objectMap["policyId"] = avwpi.PolicyID
5096 }
5097 if avwpi.LastRecoveryPoint != nil {
5098 objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint
5099 }
5100 if avwpi.BackupSetName != nil {
5101 objectMap["backupSetName"] = avwpi.BackupSetName
5102 }
5103 if avwpi.CreateMode != "" {
5104 objectMap["createMode"] = avwpi.CreateMode
5105 }
5106 if avwpi.DeferredDeleteTimeInUTC != nil {
5107 objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC
5108 }
5109 if avwpi.IsScheduledForDeferredDelete != nil {
5110 objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete
5111 }
5112 if avwpi.DeferredDeleteTimeRemaining != nil {
5113 objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining
5114 }
5115 if avwpi.IsDeferredDeleteScheduleUpcoming != nil {
5116 objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming
5117 }
5118 if avwpi.IsRehydrate != nil {
5119 objectMap["isRehydrate"] = avwpi.IsRehydrate
5120 }
5121 if avwpi.ResourceGuardOperationRequests != nil {
5122 objectMap["resourceGuardOperationRequests"] = avwpi.ResourceGuardOperationRequests
5123 }
5124 if avwpi.IsArchiveEnabled != nil {
5125 objectMap["isArchiveEnabled"] = avwpi.IsArchiveEnabled
5126 }
5127 if avwpi.PolicyName != nil {
5128 objectMap["policyName"] = avwpi.PolicyName
5129 }
5130 if avwpi.ProtectedItemType != "" {
5131 objectMap["protectedItemType"] = avwpi.ProtectedItemType
5132 }
5133 return json.Marshal(objectMap)
5134 }
5135
5136
5137 func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5138 return nil, false
5139 }
5140
5141
5142 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5143 return nil, false
5144 }
5145
5146
5147 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5148 return nil, false
5149 }
5150
5151
5152 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5153 return nil, false
5154 }
5155
5156
5157 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5158 return nil, false
5159 }
5160
5161
5162 func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5163 return nil, false
5164 }
5165
5166
5167 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5168 return &avwpi, true
5169 }
5170
5171
5172 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5173 return &avwpi, true
5174 }
5175
5176
5177 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5178 return nil, false
5179 }
5180
5181
5182 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5183 return nil, false
5184 }
5185
5186
5187 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5188 return nil, false
5189 }
5190
5191
5192 func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5193 return nil, false
5194 }
5195
5196
5197 func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5198 return nil, false
5199 }
5200
5201
5202 func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5203 return nil, false
5204 }
5205
5206
5207 func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5208 return nil, false
5209 }
5210
5211
5212 func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5213 return &avwpi, true
5214 }
5215
5216
5217
5218 type AzureVMWorkloadProtectedItemExtendedInfo struct {
5219
5220 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
5221
5222 OldestRecoveryPointInVault *date.Time `json:"oldestRecoveryPointInVault,omitempty"`
5223
5224 OldestRecoveryPointInArchive *date.Time `json:"oldestRecoveryPointInArchive,omitempty"`
5225
5226 NewestRecoveryPointInArchive *date.Time `json:"newestRecoveryPointInArchive,omitempty"`
5227
5228 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
5229
5230 PolicyState *string `json:"policyState,omitempty"`
5231
5232 RecoveryModel *string `json:"recoveryModel,omitempty"`
5233 }
5234
5235
5236 type AzureVMWorkloadProtectionPolicy struct {
5237
5238 WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
5239
5240 Settings *Settings `json:"settings,omitempty"`
5241
5242 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
5243
5244 MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"`
5245
5246 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
5247
5248 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
5249
5250 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
5251 }
5252
5253
5254 func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) {
5255 avwpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload
5256 objectMap := make(map[string]interface{})
5257 if avwpp.WorkLoadType != "" {
5258 objectMap["workLoadType"] = avwpp.WorkLoadType
5259 }
5260 if avwpp.Settings != nil {
5261 objectMap["settings"] = avwpp.Settings
5262 }
5263 if avwpp.SubProtectionPolicy != nil {
5264 objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy
5265 }
5266 if avwpp.MakePolicyConsistent != nil {
5267 objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent
5268 }
5269 if avwpp.ProtectedItemsCount != nil {
5270 objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount
5271 }
5272 if avwpp.ResourceGuardOperationRequests != nil {
5273 objectMap["resourceGuardOperationRequests"] = avwpp.ResourceGuardOperationRequests
5274 }
5275 if avwpp.BackupManagementType != "" {
5276 objectMap["backupManagementType"] = avwpp.BackupManagementType
5277 }
5278 return json.Marshal(objectMap)
5279 }
5280
5281
5282 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
5283 return &avwpp, true
5284 }
5285
5286
5287 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
5288 return nil, false
5289 }
5290
5291
5292 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
5293 return nil, false
5294 }
5295
5296
5297 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
5298 return nil, false
5299 }
5300
5301
5302 func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
5303 return nil, false
5304 }
5305
5306
5307 func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
5308 return nil, false
5309 }
5310
5311
5312 func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
5313 return nil, false
5314 }
5315
5316
5317 func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
5318 return &avwpp, true
5319 }
5320
5321
5322
5323 type AzureVMWorkloadSAPAseDatabaseProtectedItem struct {
5324
5325 FriendlyName *string `json:"friendlyName,omitempty"`
5326
5327 ServerName *string `json:"serverName,omitempty"`
5328
5329 ParentName *string `json:"parentName,omitempty"`
5330
5331 ParentType *string `json:"parentType,omitempty"`
5332
5333 ProtectionStatus *string `json:"protectionStatus,omitempty"`
5334
5335 ProtectionState ProtectionState `json:"protectionState,omitempty"`
5336
5337 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
5338
5339 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
5340
5341 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
5342
5343 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
5344
5345 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
5346
5347 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
5348
5349 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
5350
5351 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
5352
5353 WorkloadType DataSourceType `json:"workloadType,omitempty"`
5354
5355 ContainerName *string `json:"containerName,omitempty"`
5356
5357 SourceResourceID *string `json:"sourceResourceId,omitempty"`
5358
5359 PolicyID *string `json:"policyId,omitempty"`
5360
5361 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
5362
5363 BackupSetName *string `json:"backupSetName,omitempty"`
5364
5365 CreateMode CreateMode `json:"createMode,omitempty"`
5366
5367 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
5368
5369 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
5370
5371 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
5372
5373 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
5374
5375 IsRehydrate *bool `json:"isRehydrate,omitempty"`
5376
5377 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
5378
5379 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
5380
5381 PolicyName *string `json:"policyName,omitempty"`
5382
5383 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
5384 }
5385
5386
5387 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
5388 avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase
5389 objectMap := make(map[string]interface{})
5390 if avwsadpi.FriendlyName != nil {
5391 objectMap["friendlyName"] = avwsadpi.FriendlyName
5392 }
5393 if avwsadpi.ServerName != nil {
5394 objectMap["serverName"] = avwsadpi.ServerName
5395 }
5396 if avwsadpi.ParentName != nil {
5397 objectMap["parentName"] = avwsadpi.ParentName
5398 }
5399 if avwsadpi.ParentType != nil {
5400 objectMap["parentType"] = avwsadpi.ParentType
5401 }
5402 if avwsadpi.ProtectionStatus != nil {
5403 objectMap["protectionStatus"] = avwsadpi.ProtectionStatus
5404 }
5405 if avwsadpi.ProtectionState != "" {
5406 objectMap["protectionState"] = avwsadpi.ProtectionState
5407 }
5408 if avwsadpi.LastBackupStatus != "" {
5409 objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus
5410 }
5411 if avwsadpi.LastBackupTime != nil {
5412 objectMap["lastBackupTime"] = avwsadpi.LastBackupTime
5413 }
5414 if avwsadpi.LastBackupErrorDetail != nil {
5415 objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail
5416 }
5417 if avwsadpi.ProtectedItemDataSourceID != nil {
5418 objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID
5419 }
5420 if avwsadpi.ProtectedItemHealthStatus != "" {
5421 objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus
5422 }
5423 if avwsadpi.ExtendedInfo != nil {
5424 objectMap["extendedInfo"] = avwsadpi.ExtendedInfo
5425 }
5426 if avwsadpi.KpisHealths != nil {
5427 objectMap["kpisHealths"] = avwsadpi.KpisHealths
5428 }
5429 if avwsadpi.BackupManagementType != "" {
5430 objectMap["backupManagementType"] = avwsadpi.BackupManagementType
5431 }
5432 if avwsadpi.WorkloadType != "" {
5433 objectMap["workloadType"] = avwsadpi.WorkloadType
5434 }
5435 if avwsadpi.ContainerName != nil {
5436 objectMap["containerName"] = avwsadpi.ContainerName
5437 }
5438 if avwsadpi.SourceResourceID != nil {
5439 objectMap["sourceResourceId"] = avwsadpi.SourceResourceID
5440 }
5441 if avwsadpi.PolicyID != nil {
5442 objectMap["policyId"] = avwsadpi.PolicyID
5443 }
5444 if avwsadpi.LastRecoveryPoint != nil {
5445 objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint
5446 }
5447 if avwsadpi.BackupSetName != nil {
5448 objectMap["backupSetName"] = avwsadpi.BackupSetName
5449 }
5450 if avwsadpi.CreateMode != "" {
5451 objectMap["createMode"] = avwsadpi.CreateMode
5452 }
5453 if avwsadpi.DeferredDeleteTimeInUTC != nil {
5454 objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC
5455 }
5456 if avwsadpi.IsScheduledForDeferredDelete != nil {
5457 objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete
5458 }
5459 if avwsadpi.DeferredDeleteTimeRemaining != nil {
5460 objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining
5461 }
5462 if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil {
5463 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming
5464 }
5465 if avwsadpi.IsRehydrate != nil {
5466 objectMap["isRehydrate"] = avwsadpi.IsRehydrate
5467 }
5468 if avwsadpi.ResourceGuardOperationRequests != nil {
5469 objectMap["resourceGuardOperationRequests"] = avwsadpi.ResourceGuardOperationRequests
5470 }
5471 if avwsadpi.IsArchiveEnabled != nil {
5472 objectMap["isArchiveEnabled"] = avwsadpi.IsArchiveEnabled
5473 }
5474 if avwsadpi.PolicyName != nil {
5475 objectMap["policyName"] = avwsadpi.PolicyName
5476 }
5477 if avwsadpi.ProtectedItemType != "" {
5478 objectMap["protectedItemType"] = avwsadpi.ProtectedItemType
5479 }
5480 return json.Marshal(objectMap)
5481 }
5482
5483
5484 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5485 return nil, false
5486 }
5487
5488
5489 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5490 return nil, false
5491 }
5492
5493
5494 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5495 return nil, false
5496 }
5497
5498
5499 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5500 return nil, false
5501 }
5502
5503
5504 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5505 return nil, false
5506 }
5507
5508
5509 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5510 return nil, false
5511 }
5512
5513
5514 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5515 return nil, false
5516 }
5517
5518
5519 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5520 return &avwsadpi, true
5521 }
5522
5523
5524 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5525 return &avwsadpi, true
5526 }
5527
5528
5529 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5530 return nil, false
5531 }
5532
5533
5534 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5535 return nil, false
5536 }
5537
5538
5539 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5540 return nil, false
5541 }
5542
5543
5544 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5545 return nil, false
5546 }
5547
5548
5549 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5550 return nil, false
5551 }
5552
5553
5554 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5555 return nil, false
5556 }
5557
5558
5559 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5560 return &avwsadpi, true
5561 }
5562
5563
5564
5565 type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct {
5566
5567 ParentName *string `json:"parentName,omitempty"`
5568
5569 ServerName *string `json:"serverName,omitempty"`
5570
5571 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5572
5573 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5574
5575 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5576
5577 BackupManagementType *string `json:"backupManagementType,omitempty"`
5578
5579 WorkloadType *string `json:"workloadType,omitempty"`
5580
5581 FriendlyName *string `json:"friendlyName,omitempty"`
5582
5583 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5584
5585 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5586 }
5587
5588
5589 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
5590 avwsadwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase
5591 objectMap := make(map[string]interface{})
5592 if avwsadwi.ParentName != nil {
5593 objectMap["parentName"] = avwsadwi.ParentName
5594 }
5595 if avwsadwi.ServerName != nil {
5596 objectMap["serverName"] = avwsadwi.ServerName
5597 }
5598 if avwsadwi.IsAutoProtectable != nil {
5599 objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable
5600 }
5601 if avwsadwi.Subinquireditemcount != nil {
5602 objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount
5603 }
5604 if avwsadwi.SubWorkloadItemCount != nil {
5605 objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount
5606 }
5607 if avwsadwi.BackupManagementType != nil {
5608 objectMap["backupManagementType"] = avwsadwi.BackupManagementType
5609 }
5610 if avwsadwi.WorkloadType != nil {
5611 objectMap["workloadType"] = avwsadwi.WorkloadType
5612 }
5613 if avwsadwi.FriendlyName != nil {
5614 objectMap["friendlyName"] = avwsadwi.FriendlyName
5615 }
5616 if avwsadwi.ProtectionState != "" {
5617 objectMap["protectionState"] = avwsadwi.ProtectionState
5618 }
5619 if avwsadwi.WorkloadItemType != "" {
5620 objectMap["workloadItemType"] = avwsadwi.WorkloadItemType
5621 }
5622 return json.Marshal(objectMap)
5623 }
5624
5625
5626 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5627 return nil, false
5628 }
5629
5630
5631 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5632 return &avwsadwi, true
5633 }
5634
5635
5636 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5637 return &avwsadwi, true
5638 }
5639
5640
5641 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5642 return nil, false
5643 }
5644
5645
5646 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5647 return nil, false
5648 }
5649
5650
5651 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5652 return nil, false
5653 }
5654
5655
5656 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5657 return nil, false
5658 }
5659
5660
5661 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5662 return nil, false
5663 }
5664
5665
5666 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5667 return nil, false
5668 }
5669
5670
5671 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5672 return &avwsadwi, true
5673 }
5674
5675
5676
5677 type AzureVMWorkloadSAPAseSystemProtectableItem struct {
5678
5679 ParentName *string `json:"parentName,omitempty"`
5680
5681
5682 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5683
5684 ServerName *string `json:"serverName,omitempty"`
5685
5686 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5687
5688 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5689
5690 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5691
5692 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5693
5694 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5695
5696 BackupManagementType *string `json:"backupManagementType,omitempty"`
5697
5698 WorkloadType *string `json:"workloadType,omitempty"`
5699
5700 FriendlyName *string `json:"friendlyName,omitempty"`
5701
5702 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5703
5704 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5705 }
5706
5707
5708 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) {
5709 avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem
5710 objectMap := make(map[string]interface{})
5711 if avwsaspi.ParentName != nil {
5712 objectMap["parentName"] = avwsaspi.ParentName
5713 }
5714 if avwsaspi.ParentUniqueName != nil {
5715 objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName
5716 }
5717 if avwsaspi.ServerName != nil {
5718 objectMap["serverName"] = avwsaspi.ServerName
5719 }
5720 if avwsaspi.IsAutoProtectable != nil {
5721 objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable
5722 }
5723 if avwsaspi.IsAutoProtected != nil {
5724 objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected
5725 }
5726 if avwsaspi.Subinquireditemcount != nil {
5727 objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount
5728 }
5729 if avwsaspi.Subprotectableitemcount != nil {
5730 objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount
5731 }
5732 if avwsaspi.Prebackupvalidation != nil {
5733 objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation
5734 }
5735 if avwsaspi.BackupManagementType != nil {
5736 objectMap["backupManagementType"] = avwsaspi.BackupManagementType
5737 }
5738 if avwsaspi.WorkloadType != nil {
5739 objectMap["workloadType"] = avwsaspi.WorkloadType
5740 }
5741 if avwsaspi.FriendlyName != nil {
5742 objectMap["friendlyName"] = avwsaspi.FriendlyName
5743 }
5744 if avwsaspi.ProtectionState != "" {
5745 objectMap["protectionState"] = avwsaspi.ProtectionState
5746 }
5747 if avwsaspi.ProtectableItemType != "" {
5748 objectMap["protectableItemType"] = avwsaspi.ProtectableItemType
5749 }
5750 return json.Marshal(objectMap)
5751 }
5752
5753
5754 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5755 return nil, false
5756 }
5757
5758
5759 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5760 return nil, false
5761 }
5762
5763
5764 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5765 return nil, false
5766 }
5767
5768
5769 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5770 return nil, false
5771 }
5772
5773
5774 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5775 return &avwsaspi, true
5776 }
5777
5778
5779 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5780 return &avwsaspi, true
5781 }
5782
5783
5784 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5785 return nil, false
5786 }
5787
5788
5789 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5790 return nil, false
5791 }
5792
5793
5794 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5795 return nil, false
5796 }
5797
5798
5799 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5800 return nil, false
5801 }
5802
5803
5804 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5805 return nil, false
5806 }
5807
5808
5809 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5810 return nil, false
5811 }
5812
5813
5814 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5815 return nil, false
5816 }
5817
5818
5819 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5820 return nil, false
5821 }
5822
5823
5824 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5825 return &avwsaspi, true
5826 }
5827
5828
5829
5830 type AzureVMWorkloadSAPAseSystemWorkloadItem struct {
5831
5832 ParentName *string `json:"parentName,omitempty"`
5833
5834 ServerName *string `json:"serverName,omitempty"`
5835
5836 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5837
5838 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5839
5840 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5841
5842 BackupManagementType *string `json:"backupManagementType,omitempty"`
5843
5844 WorkloadType *string `json:"workloadType,omitempty"`
5845
5846 FriendlyName *string `json:"friendlyName,omitempty"`
5847
5848 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5849
5850 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5851 }
5852
5853
5854 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) {
5855 avwsaswi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem
5856 objectMap := make(map[string]interface{})
5857 if avwsaswi.ParentName != nil {
5858 objectMap["parentName"] = avwsaswi.ParentName
5859 }
5860 if avwsaswi.ServerName != nil {
5861 objectMap["serverName"] = avwsaswi.ServerName
5862 }
5863 if avwsaswi.IsAutoProtectable != nil {
5864 objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable
5865 }
5866 if avwsaswi.Subinquireditemcount != nil {
5867 objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount
5868 }
5869 if avwsaswi.SubWorkloadItemCount != nil {
5870 objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount
5871 }
5872 if avwsaswi.BackupManagementType != nil {
5873 objectMap["backupManagementType"] = avwsaswi.BackupManagementType
5874 }
5875 if avwsaswi.WorkloadType != nil {
5876 objectMap["workloadType"] = avwsaswi.WorkloadType
5877 }
5878 if avwsaswi.FriendlyName != nil {
5879 objectMap["friendlyName"] = avwsaswi.FriendlyName
5880 }
5881 if avwsaswi.ProtectionState != "" {
5882 objectMap["protectionState"] = avwsaswi.ProtectionState
5883 }
5884 if avwsaswi.WorkloadItemType != "" {
5885 objectMap["workloadItemType"] = avwsaswi.WorkloadItemType
5886 }
5887 return json.Marshal(objectMap)
5888 }
5889
5890
5891 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5892 return nil, false
5893 }
5894
5895
5896 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5897 return &avwsaswi, true
5898 }
5899
5900
5901 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5902 return nil, false
5903 }
5904
5905
5906 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5907 return &avwsaswi, true
5908 }
5909
5910
5911 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5912 return nil, false
5913 }
5914
5915
5916 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5917 return nil, false
5918 }
5919
5920
5921 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5922 return nil, false
5923 }
5924
5925
5926 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5927 return nil, false
5928 }
5929
5930
5931 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5932 return nil, false
5933 }
5934
5935
5936 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5937 return &avwsaswi, true
5938 }
5939
5940
5941
5942 type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct {
5943
5944 ParentName *string `json:"parentName,omitempty"`
5945
5946
5947 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5948
5949 ServerName *string `json:"serverName,omitempty"`
5950
5951 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5952
5953 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5954
5955 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5956
5957 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5958
5959 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5960
5961 BackupManagementType *string `json:"backupManagementType,omitempty"`
5962
5963 WorkloadType *string `json:"workloadType,omitempty"`
5964
5965 FriendlyName *string `json:"friendlyName,omitempty"`
5966
5967 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5968
5969 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5970 }
5971
5972
5973 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
5974 avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase
5975 objectMap := make(map[string]interface{})
5976 if avwshdpi.ParentName != nil {
5977 objectMap["parentName"] = avwshdpi.ParentName
5978 }
5979 if avwshdpi.ParentUniqueName != nil {
5980 objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName
5981 }
5982 if avwshdpi.ServerName != nil {
5983 objectMap["serverName"] = avwshdpi.ServerName
5984 }
5985 if avwshdpi.IsAutoProtectable != nil {
5986 objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable
5987 }
5988 if avwshdpi.IsAutoProtected != nil {
5989 objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected
5990 }
5991 if avwshdpi.Subinquireditemcount != nil {
5992 objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount
5993 }
5994 if avwshdpi.Subprotectableitemcount != nil {
5995 objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount
5996 }
5997 if avwshdpi.Prebackupvalidation != nil {
5998 objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation
5999 }
6000 if avwshdpi.BackupManagementType != nil {
6001 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
6002 }
6003 if avwshdpi.WorkloadType != nil {
6004 objectMap["workloadType"] = avwshdpi.WorkloadType
6005 }
6006 if avwshdpi.FriendlyName != nil {
6007 objectMap["friendlyName"] = avwshdpi.FriendlyName
6008 }
6009 if avwshdpi.ProtectionState != "" {
6010 objectMap["protectionState"] = avwshdpi.ProtectionState
6011 }
6012 if avwshdpi.ProtectableItemType != "" {
6013 objectMap["protectableItemType"] = avwshdpi.ProtectableItemType
6014 }
6015 return json.Marshal(objectMap)
6016 }
6017
6018
6019 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6020 return nil, false
6021 }
6022
6023
6024 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6025 return nil, false
6026 }
6027
6028
6029 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6030 return nil, false
6031 }
6032
6033
6034 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6035 return nil, false
6036 }
6037
6038
6039 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6040 return &avwshdpi, true
6041 }
6042
6043
6044 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6045 return nil, false
6046 }
6047
6048
6049 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6050 return &avwshdpi, true
6051 }
6052
6053
6054 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6055 return nil, false
6056 }
6057
6058
6059 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6060 return nil, false
6061 }
6062
6063
6064 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6065 return nil, false
6066 }
6067
6068
6069 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6070 return nil, false
6071 }
6072
6073
6074 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6075 return nil, false
6076 }
6077
6078
6079 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6080 return nil, false
6081 }
6082
6083
6084 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6085 return nil, false
6086 }
6087
6088
6089 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6090 return &avwshdpi, true
6091 }
6092
6093
6094
6095 type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct {
6096
6097 FriendlyName *string `json:"friendlyName,omitempty"`
6098
6099 ServerName *string `json:"serverName,omitempty"`
6100
6101 ParentName *string `json:"parentName,omitempty"`
6102
6103 ParentType *string `json:"parentType,omitempty"`
6104
6105 ProtectionStatus *string `json:"protectionStatus,omitempty"`
6106
6107 ProtectionState ProtectionState `json:"protectionState,omitempty"`
6108
6109 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
6110
6111 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
6112
6113 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
6114
6115 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
6116
6117 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
6118
6119 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
6120
6121 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
6122
6123 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
6124
6125 WorkloadType DataSourceType `json:"workloadType,omitempty"`
6126
6127 ContainerName *string `json:"containerName,omitempty"`
6128
6129 SourceResourceID *string `json:"sourceResourceId,omitempty"`
6130
6131 PolicyID *string `json:"policyId,omitempty"`
6132
6133 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
6134
6135 BackupSetName *string `json:"backupSetName,omitempty"`
6136
6137 CreateMode CreateMode `json:"createMode,omitempty"`
6138
6139 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
6140
6141 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
6142
6143 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
6144
6145 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
6146
6147 IsRehydrate *bool `json:"isRehydrate,omitempty"`
6148
6149 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
6150
6151 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
6152
6153 PolicyName *string `json:"policyName,omitempty"`
6154
6155 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
6156 }
6157
6158
6159 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
6160 avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase
6161 objectMap := make(map[string]interface{})
6162 if avwshdpi.FriendlyName != nil {
6163 objectMap["friendlyName"] = avwshdpi.FriendlyName
6164 }
6165 if avwshdpi.ServerName != nil {
6166 objectMap["serverName"] = avwshdpi.ServerName
6167 }
6168 if avwshdpi.ParentName != nil {
6169 objectMap["parentName"] = avwshdpi.ParentName
6170 }
6171 if avwshdpi.ParentType != nil {
6172 objectMap["parentType"] = avwshdpi.ParentType
6173 }
6174 if avwshdpi.ProtectionStatus != nil {
6175 objectMap["protectionStatus"] = avwshdpi.ProtectionStatus
6176 }
6177 if avwshdpi.ProtectionState != "" {
6178 objectMap["protectionState"] = avwshdpi.ProtectionState
6179 }
6180 if avwshdpi.LastBackupStatus != "" {
6181 objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus
6182 }
6183 if avwshdpi.LastBackupTime != nil {
6184 objectMap["lastBackupTime"] = avwshdpi.LastBackupTime
6185 }
6186 if avwshdpi.LastBackupErrorDetail != nil {
6187 objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail
6188 }
6189 if avwshdpi.ProtectedItemDataSourceID != nil {
6190 objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID
6191 }
6192 if avwshdpi.ProtectedItemHealthStatus != "" {
6193 objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus
6194 }
6195 if avwshdpi.ExtendedInfo != nil {
6196 objectMap["extendedInfo"] = avwshdpi.ExtendedInfo
6197 }
6198 if avwshdpi.KpisHealths != nil {
6199 objectMap["kpisHealths"] = avwshdpi.KpisHealths
6200 }
6201 if avwshdpi.BackupManagementType != "" {
6202 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
6203 }
6204 if avwshdpi.WorkloadType != "" {
6205 objectMap["workloadType"] = avwshdpi.WorkloadType
6206 }
6207 if avwshdpi.ContainerName != nil {
6208 objectMap["containerName"] = avwshdpi.ContainerName
6209 }
6210 if avwshdpi.SourceResourceID != nil {
6211 objectMap["sourceResourceId"] = avwshdpi.SourceResourceID
6212 }
6213 if avwshdpi.PolicyID != nil {
6214 objectMap["policyId"] = avwshdpi.PolicyID
6215 }
6216 if avwshdpi.LastRecoveryPoint != nil {
6217 objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint
6218 }
6219 if avwshdpi.BackupSetName != nil {
6220 objectMap["backupSetName"] = avwshdpi.BackupSetName
6221 }
6222 if avwshdpi.CreateMode != "" {
6223 objectMap["createMode"] = avwshdpi.CreateMode
6224 }
6225 if avwshdpi.DeferredDeleteTimeInUTC != nil {
6226 objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC
6227 }
6228 if avwshdpi.IsScheduledForDeferredDelete != nil {
6229 objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete
6230 }
6231 if avwshdpi.DeferredDeleteTimeRemaining != nil {
6232 objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining
6233 }
6234 if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil {
6235 objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming
6236 }
6237 if avwshdpi.IsRehydrate != nil {
6238 objectMap["isRehydrate"] = avwshdpi.IsRehydrate
6239 }
6240 if avwshdpi.ResourceGuardOperationRequests != nil {
6241 objectMap["resourceGuardOperationRequests"] = avwshdpi.ResourceGuardOperationRequests
6242 }
6243 if avwshdpi.IsArchiveEnabled != nil {
6244 objectMap["isArchiveEnabled"] = avwshdpi.IsArchiveEnabled
6245 }
6246 if avwshdpi.PolicyName != nil {
6247 objectMap["policyName"] = avwshdpi.PolicyName
6248 }
6249 if avwshdpi.ProtectedItemType != "" {
6250 objectMap["protectedItemType"] = avwshdpi.ProtectedItemType
6251 }
6252 return json.Marshal(objectMap)
6253 }
6254
6255
6256 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
6257 return nil, false
6258 }
6259
6260
6261 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
6262 return nil, false
6263 }
6264
6265
6266 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
6267 return nil, false
6268 }
6269
6270
6271 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
6272 return nil, false
6273 }
6274
6275
6276 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
6277 return nil, false
6278 }
6279
6280
6281 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
6282 return nil, false
6283 }
6284
6285
6286 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
6287 return nil, false
6288 }
6289
6290
6291 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
6292 return &avwshdpi, true
6293 }
6294
6295
6296 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
6297 return nil, false
6298 }
6299
6300
6301 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
6302 return &avwshdpi, true
6303 }
6304
6305
6306 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
6307 return nil, false
6308 }
6309
6310
6311 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
6312 return nil, false
6313 }
6314
6315
6316 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
6317 return nil, false
6318 }
6319
6320
6321 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
6322 return nil, false
6323 }
6324
6325
6326 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
6327 return nil, false
6328 }
6329
6330
6331 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
6332 return &avwshdpi, true
6333 }
6334
6335
6336
6337 type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct {
6338
6339 ParentName *string `json:"parentName,omitempty"`
6340
6341 ServerName *string `json:"serverName,omitempty"`
6342
6343 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6344
6345 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6346
6347 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6348
6349 BackupManagementType *string `json:"backupManagementType,omitempty"`
6350
6351 WorkloadType *string `json:"workloadType,omitempty"`
6352
6353 FriendlyName *string `json:"friendlyName,omitempty"`
6354
6355 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6356
6357 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6358 }
6359
6360
6361 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
6362 avwshdwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase
6363 objectMap := make(map[string]interface{})
6364 if avwshdwi.ParentName != nil {
6365 objectMap["parentName"] = avwshdwi.ParentName
6366 }
6367 if avwshdwi.ServerName != nil {
6368 objectMap["serverName"] = avwshdwi.ServerName
6369 }
6370 if avwshdwi.IsAutoProtectable != nil {
6371 objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable
6372 }
6373 if avwshdwi.Subinquireditemcount != nil {
6374 objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount
6375 }
6376 if avwshdwi.SubWorkloadItemCount != nil {
6377 objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount
6378 }
6379 if avwshdwi.BackupManagementType != nil {
6380 objectMap["backupManagementType"] = avwshdwi.BackupManagementType
6381 }
6382 if avwshdwi.WorkloadType != nil {
6383 objectMap["workloadType"] = avwshdwi.WorkloadType
6384 }
6385 if avwshdwi.FriendlyName != nil {
6386 objectMap["friendlyName"] = avwshdwi.FriendlyName
6387 }
6388 if avwshdwi.ProtectionState != "" {
6389 objectMap["protectionState"] = avwshdwi.ProtectionState
6390 }
6391 if avwshdwi.WorkloadItemType != "" {
6392 objectMap["workloadItemType"] = avwshdwi.WorkloadItemType
6393 }
6394 return json.Marshal(objectMap)
6395 }
6396
6397
6398 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6399 return nil, false
6400 }
6401
6402
6403 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6404 return &avwshdwi, true
6405 }
6406
6407
6408 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6409 return nil, false
6410 }
6411
6412
6413 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6414 return nil, false
6415 }
6416
6417
6418 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6419 return &avwshdwi, true
6420 }
6421
6422
6423 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6424 return nil, false
6425 }
6426
6427
6428 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6429 return nil, false
6430 }
6431
6432
6433 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6434 return nil, false
6435 }
6436
6437
6438 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6439 return nil, false
6440 }
6441
6442
6443 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6444 return &avwshdwi, true
6445 }
6446
6447
6448
6449 type AzureVMWorkloadSAPHanaSystemProtectableItem struct {
6450
6451 ParentName *string `json:"parentName,omitempty"`
6452
6453
6454 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6455
6456 ServerName *string `json:"serverName,omitempty"`
6457
6458 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6459
6460 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6461
6462 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6463
6464 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6465
6466 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6467
6468 BackupManagementType *string `json:"backupManagementType,omitempty"`
6469
6470 WorkloadType *string `json:"workloadType,omitempty"`
6471
6472 FriendlyName *string `json:"friendlyName,omitempty"`
6473
6474 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6475
6476 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6477 }
6478
6479
6480 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) {
6481 avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem
6482 objectMap := make(map[string]interface{})
6483 if avwshspi.ParentName != nil {
6484 objectMap["parentName"] = avwshspi.ParentName
6485 }
6486 if avwshspi.ParentUniqueName != nil {
6487 objectMap["parentUniqueName"] = avwshspi.ParentUniqueName
6488 }
6489 if avwshspi.ServerName != nil {
6490 objectMap["serverName"] = avwshspi.ServerName
6491 }
6492 if avwshspi.IsAutoProtectable != nil {
6493 objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable
6494 }
6495 if avwshspi.IsAutoProtected != nil {
6496 objectMap["isAutoProtected"] = avwshspi.IsAutoProtected
6497 }
6498 if avwshspi.Subinquireditemcount != nil {
6499 objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount
6500 }
6501 if avwshspi.Subprotectableitemcount != nil {
6502 objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount
6503 }
6504 if avwshspi.Prebackupvalidation != nil {
6505 objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation
6506 }
6507 if avwshspi.BackupManagementType != nil {
6508 objectMap["backupManagementType"] = avwshspi.BackupManagementType
6509 }
6510 if avwshspi.WorkloadType != nil {
6511 objectMap["workloadType"] = avwshspi.WorkloadType
6512 }
6513 if avwshspi.FriendlyName != nil {
6514 objectMap["friendlyName"] = avwshspi.FriendlyName
6515 }
6516 if avwshspi.ProtectionState != "" {
6517 objectMap["protectionState"] = avwshspi.ProtectionState
6518 }
6519 if avwshspi.ProtectableItemType != "" {
6520 objectMap["protectableItemType"] = avwshspi.ProtectableItemType
6521 }
6522 return json.Marshal(objectMap)
6523 }
6524
6525
6526 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6527 return nil, false
6528 }
6529
6530
6531 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6532 return nil, false
6533 }
6534
6535
6536 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6537 return nil, false
6538 }
6539
6540
6541 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6542 return nil, false
6543 }
6544
6545
6546 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6547 return &avwshspi, true
6548 }
6549
6550
6551 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6552 return nil, false
6553 }
6554
6555
6556 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6557 return nil, false
6558 }
6559
6560
6561 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6562 return &avwshspi, true
6563 }
6564
6565
6566 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6567 return nil, false
6568 }
6569
6570
6571 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6572 return nil, false
6573 }
6574
6575
6576 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6577 return nil, false
6578 }
6579
6580
6581 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6582 return nil, false
6583 }
6584
6585
6586 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6587 return nil, false
6588 }
6589
6590
6591 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6592 return nil, false
6593 }
6594
6595
6596 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6597 return &avwshspi, true
6598 }
6599
6600
6601
6602 type AzureVMWorkloadSAPHanaSystemWorkloadItem struct {
6603
6604 ParentName *string `json:"parentName,omitempty"`
6605
6606 ServerName *string `json:"serverName,omitempty"`
6607
6608 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6609
6610 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6611
6612 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6613
6614 BackupManagementType *string `json:"backupManagementType,omitempty"`
6615
6616 WorkloadType *string `json:"workloadType,omitempty"`
6617
6618 FriendlyName *string `json:"friendlyName,omitempty"`
6619
6620 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6621
6622 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6623 }
6624
6625
6626 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) {
6627 avwshswi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem
6628 objectMap := make(map[string]interface{})
6629 if avwshswi.ParentName != nil {
6630 objectMap["parentName"] = avwshswi.ParentName
6631 }
6632 if avwshswi.ServerName != nil {
6633 objectMap["serverName"] = avwshswi.ServerName
6634 }
6635 if avwshswi.IsAutoProtectable != nil {
6636 objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable
6637 }
6638 if avwshswi.Subinquireditemcount != nil {
6639 objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount
6640 }
6641 if avwshswi.SubWorkloadItemCount != nil {
6642 objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount
6643 }
6644 if avwshswi.BackupManagementType != nil {
6645 objectMap["backupManagementType"] = avwshswi.BackupManagementType
6646 }
6647 if avwshswi.WorkloadType != nil {
6648 objectMap["workloadType"] = avwshswi.WorkloadType
6649 }
6650 if avwshswi.FriendlyName != nil {
6651 objectMap["friendlyName"] = avwshswi.FriendlyName
6652 }
6653 if avwshswi.ProtectionState != "" {
6654 objectMap["protectionState"] = avwshswi.ProtectionState
6655 }
6656 if avwshswi.WorkloadItemType != "" {
6657 objectMap["workloadItemType"] = avwshswi.WorkloadItemType
6658 }
6659 return json.Marshal(objectMap)
6660 }
6661
6662
6663 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6664 return nil, false
6665 }
6666
6667
6668 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6669 return &avwshswi, true
6670 }
6671
6672
6673 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6674 return nil, false
6675 }
6676
6677
6678 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6679 return nil, false
6680 }
6681
6682
6683 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6684 return nil, false
6685 }
6686
6687
6688 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6689 return &avwshswi, true
6690 }
6691
6692
6693 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6694 return nil, false
6695 }
6696
6697
6698 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6699 return nil, false
6700 }
6701
6702
6703 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6704 return nil, false
6705 }
6706
6707
6708 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6709 return &avwshswi, true
6710 }
6711
6712
6713
6714 type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct {
6715
6716 ParentName *string `json:"parentName,omitempty"`
6717
6718
6719 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6720
6721 ServerName *string `json:"serverName,omitempty"`
6722
6723 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6724
6725 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6726
6727 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6728
6729 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6730
6731 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6732
6733 BackupManagementType *string `json:"backupManagementType,omitempty"`
6734
6735 WorkloadType *string `json:"workloadType,omitempty"`
6736
6737 FriendlyName *string `json:"friendlyName,omitempty"`
6738
6739 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6740
6741 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6742 }
6743
6744
6745 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) {
6746 avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer
6747 objectMap := make(map[string]interface{})
6748 if avwsagpi.ParentName != nil {
6749 objectMap["parentName"] = avwsagpi.ParentName
6750 }
6751 if avwsagpi.ParentUniqueName != nil {
6752 objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName
6753 }
6754 if avwsagpi.ServerName != nil {
6755 objectMap["serverName"] = avwsagpi.ServerName
6756 }
6757 if avwsagpi.IsAutoProtectable != nil {
6758 objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable
6759 }
6760 if avwsagpi.IsAutoProtected != nil {
6761 objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected
6762 }
6763 if avwsagpi.Subinquireditemcount != nil {
6764 objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount
6765 }
6766 if avwsagpi.Subprotectableitemcount != nil {
6767 objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount
6768 }
6769 if avwsagpi.Prebackupvalidation != nil {
6770 objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation
6771 }
6772 if avwsagpi.BackupManagementType != nil {
6773 objectMap["backupManagementType"] = avwsagpi.BackupManagementType
6774 }
6775 if avwsagpi.WorkloadType != nil {
6776 objectMap["workloadType"] = avwsagpi.WorkloadType
6777 }
6778 if avwsagpi.FriendlyName != nil {
6779 objectMap["friendlyName"] = avwsagpi.FriendlyName
6780 }
6781 if avwsagpi.ProtectionState != "" {
6782 objectMap["protectionState"] = avwsagpi.ProtectionState
6783 }
6784 if avwsagpi.ProtectableItemType != "" {
6785 objectMap["protectableItemType"] = avwsagpi.ProtectableItemType
6786 }
6787 return json.Marshal(objectMap)
6788 }
6789
6790
6791 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6792 return nil, false
6793 }
6794
6795
6796 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6797 return nil, false
6798 }
6799
6800
6801 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6802 return nil, false
6803 }
6804
6805
6806 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6807 return nil, false
6808 }
6809
6810
6811 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6812 return &avwsagpi, true
6813 }
6814
6815
6816 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6817 return nil, false
6818 }
6819
6820
6821 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6822 return nil, false
6823 }
6824
6825
6826 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6827 return nil, false
6828 }
6829
6830
6831 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6832 return &avwsagpi, true
6833 }
6834
6835
6836 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6837 return nil, false
6838 }
6839
6840
6841 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6842 return nil, false
6843 }
6844
6845
6846 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6847 return nil, false
6848 }
6849
6850
6851 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6852 return nil, false
6853 }
6854
6855
6856 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6857 return nil, false
6858 }
6859
6860
6861 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6862 return &avwsagpi, true
6863 }
6864
6865
6866
6867 type AzureVMWorkloadSQLDatabaseProtectableItem struct {
6868
6869 ParentName *string `json:"parentName,omitempty"`
6870
6871
6872 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6873
6874 ServerName *string `json:"serverName,omitempty"`
6875
6876 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6877
6878 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6879
6880 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6881
6882 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6883
6884 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6885
6886 BackupManagementType *string `json:"backupManagementType,omitempty"`
6887
6888 WorkloadType *string `json:"workloadType,omitempty"`
6889
6890 FriendlyName *string `json:"friendlyName,omitempty"`
6891
6892 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6893
6894 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6895 }
6896
6897
6898 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
6899 avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase
6900 objectMap := make(map[string]interface{})
6901 if avwsdpi.ParentName != nil {
6902 objectMap["parentName"] = avwsdpi.ParentName
6903 }
6904 if avwsdpi.ParentUniqueName != nil {
6905 objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName
6906 }
6907 if avwsdpi.ServerName != nil {
6908 objectMap["serverName"] = avwsdpi.ServerName
6909 }
6910 if avwsdpi.IsAutoProtectable != nil {
6911 objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable
6912 }
6913 if avwsdpi.IsAutoProtected != nil {
6914 objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected
6915 }
6916 if avwsdpi.Subinquireditemcount != nil {
6917 objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount
6918 }
6919 if avwsdpi.Subprotectableitemcount != nil {
6920 objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount
6921 }
6922 if avwsdpi.Prebackupvalidation != nil {
6923 objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation
6924 }
6925 if avwsdpi.BackupManagementType != nil {
6926 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6927 }
6928 if avwsdpi.WorkloadType != nil {
6929 objectMap["workloadType"] = avwsdpi.WorkloadType
6930 }
6931 if avwsdpi.FriendlyName != nil {
6932 objectMap["friendlyName"] = avwsdpi.FriendlyName
6933 }
6934 if avwsdpi.ProtectionState != "" {
6935 objectMap["protectionState"] = avwsdpi.ProtectionState
6936 }
6937 if avwsdpi.ProtectableItemType != "" {
6938 objectMap["protectableItemType"] = avwsdpi.ProtectableItemType
6939 }
6940 return json.Marshal(objectMap)
6941 }
6942
6943
6944 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6945 return nil, false
6946 }
6947
6948
6949 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6950 return nil, false
6951 }
6952
6953
6954 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6955 return nil, false
6956 }
6957
6958
6959 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6960 return nil, false
6961 }
6962
6963
6964 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6965 return &avwsdpi, true
6966 }
6967
6968
6969 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6970 return nil, false
6971 }
6972
6973
6974 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6975 return nil, false
6976 }
6977
6978
6979 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6980 return nil, false
6981 }
6982
6983
6984 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6985 return nil, false
6986 }
6987
6988
6989 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6990 return &avwsdpi, true
6991 }
6992
6993
6994 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6995 return nil, false
6996 }
6997
6998
6999 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
7000 return nil, false
7001 }
7002
7003
7004 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
7005 return nil, false
7006 }
7007
7008
7009 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
7010 return nil, false
7011 }
7012
7013
7014 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
7015 return &avwsdpi, true
7016 }
7017
7018
7019
7020 type AzureVMWorkloadSQLDatabaseProtectedItem struct {
7021
7022 FriendlyName *string `json:"friendlyName,omitempty"`
7023
7024 ServerName *string `json:"serverName,omitempty"`
7025
7026 ParentName *string `json:"parentName,omitempty"`
7027
7028 ParentType *string `json:"parentType,omitempty"`
7029
7030 ProtectionStatus *string `json:"protectionStatus,omitempty"`
7031
7032 ProtectionState ProtectionState `json:"protectionState,omitempty"`
7033
7034 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
7035
7036 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
7037
7038 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
7039
7040 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
7041
7042 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
7043
7044 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
7045
7046 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
7047
7048 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7049
7050 WorkloadType DataSourceType `json:"workloadType,omitempty"`
7051
7052 ContainerName *string `json:"containerName,omitempty"`
7053
7054 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7055
7056 PolicyID *string `json:"policyId,omitempty"`
7057
7058 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
7059
7060 BackupSetName *string `json:"backupSetName,omitempty"`
7061
7062 CreateMode CreateMode `json:"createMode,omitempty"`
7063
7064 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
7065
7066 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
7067
7068 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
7069
7070 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
7071
7072 IsRehydrate *bool `json:"isRehydrate,omitempty"`
7073
7074 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
7075
7076 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
7077
7078 PolicyName *string `json:"policyName,omitempty"`
7079
7080 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
7081 }
7082
7083
7084 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
7085 avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase
7086 objectMap := make(map[string]interface{})
7087 if avwsdpi.FriendlyName != nil {
7088 objectMap["friendlyName"] = avwsdpi.FriendlyName
7089 }
7090 if avwsdpi.ServerName != nil {
7091 objectMap["serverName"] = avwsdpi.ServerName
7092 }
7093 if avwsdpi.ParentName != nil {
7094 objectMap["parentName"] = avwsdpi.ParentName
7095 }
7096 if avwsdpi.ParentType != nil {
7097 objectMap["parentType"] = avwsdpi.ParentType
7098 }
7099 if avwsdpi.ProtectionStatus != nil {
7100 objectMap["protectionStatus"] = avwsdpi.ProtectionStatus
7101 }
7102 if avwsdpi.ProtectionState != "" {
7103 objectMap["protectionState"] = avwsdpi.ProtectionState
7104 }
7105 if avwsdpi.LastBackupStatus != "" {
7106 objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus
7107 }
7108 if avwsdpi.LastBackupTime != nil {
7109 objectMap["lastBackupTime"] = avwsdpi.LastBackupTime
7110 }
7111 if avwsdpi.LastBackupErrorDetail != nil {
7112 objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail
7113 }
7114 if avwsdpi.ProtectedItemDataSourceID != nil {
7115 objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID
7116 }
7117 if avwsdpi.ProtectedItemHealthStatus != "" {
7118 objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus
7119 }
7120 if avwsdpi.ExtendedInfo != nil {
7121 objectMap["extendedInfo"] = avwsdpi.ExtendedInfo
7122 }
7123 if avwsdpi.KpisHealths != nil {
7124 objectMap["kpisHealths"] = avwsdpi.KpisHealths
7125 }
7126 if avwsdpi.BackupManagementType != "" {
7127 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
7128 }
7129 if avwsdpi.WorkloadType != "" {
7130 objectMap["workloadType"] = avwsdpi.WorkloadType
7131 }
7132 if avwsdpi.ContainerName != nil {
7133 objectMap["containerName"] = avwsdpi.ContainerName
7134 }
7135 if avwsdpi.SourceResourceID != nil {
7136 objectMap["sourceResourceId"] = avwsdpi.SourceResourceID
7137 }
7138 if avwsdpi.PolicyID != nil {
7139 objectMap["policyId"] = avwsdpi.PolicyID
7140 }
7141 if avwsdpi.LastRecoveryPoint != nil {
7142 objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint
7143 }
7144 if avwsdpi.BackupSetName != nil {
7145 objectMap["backupSetName"] = avwsdpi.BackupSetName
7146 }
7147 if avwsdpi.CreateMode != "" {
7148 objectMap["createMode"] = avwsdpi.CreateMode
7149 }
7150 if avwsdpi.DeferredDeleteTimeInUTC != nil {
7151 objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC
7152 }
7153 if avwsdpi.IsScheduledForDeferredDelete != nil {
7154 objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete
7155 }
7156 if avwsdpi.DeferredDeleteTimeRemaining != nil {
7157 objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining
7158 }
7159 if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil {
7160 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming
7161 }
7162 if avwsdpi.IsRehydrate != nil {
7163 objectMap["isRehydrate"] = avwsdpi.IsRehydrate
7164 }
7165 if avwsdpi.ResourceGuardOperationRequests != nil {
7166 objectMap["resourceGuardOperationRequests"] = avwsdpi.ResourceGuardOperationRequests
7167 }
7168 if avwsdpi.IsArchiveEnabled != nil {
7169 objectMap["isArchiveEnabled"] = avwsdpi.IsArchiveEnabled
7170 }
7171 if avwsdpi.PolicyName != nil {
7172 objectMap["policyName"] = avwsdpi.PolicyName
7173 }
7174 if avwsdpi.ProtectedItemType != "" {
7175 objectMap["protectedItemType"] = avwsdpi.ProtectedItemType
7176 }
7177 return json.Marshal(objectMap)
7178 }
7179
7180
7181 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
7182 return nil, false
7183 }
7184
7185
7186 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
7187 return nil, false
7188 }
7189
7190
7191 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
7192 return nil, false
7193 }
7194
7195
7196 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
7197 return nil, false
7198 }
7199
7200
7201 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
7202 return nil, false
7203 }
7204
7205
7206 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
7207 return nil, false
7208 }
7209
7210
7211 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
7212 return nil, false
7213 }
7214
7215
7216 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
7217 return &avwsdpi, true
7218 }
7219
7220
7221 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
7222 return nil, false
7223 }
7224
7225
7226 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
7227 return nil, false
7228 }
7229
7230
7231 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
7232 return &avwsdpi, true
7233 }
7234
7235
7236 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
7237 return nil, false
7238 }
7239
7240
7241 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
7242 return nil, false
7243 }
7244
7245
7246 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
7247 return nil, false
7248 }
7249
7250
7251 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
7252 return nil, false
7253 }
7254
7255
7256 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
7257 return &avwsdpi, true
7258 }
7259
7260
7261
7262 type AzureVMWorkloadSQLDatabaseWorkloadItem struct {
7263
7264 ParentName *string `json:"parentName,omitempty"`
7265
7266 ServerName *string `json:"serverName,omitempty"`
7267
7268 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
7269
7270 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
7271
7272 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
7273
7274 BackupManagementType *string `json:"backupManagementType,omitempty"`
7275
7276 WorkloadType *string `json:"workloadType,omitempty"`
7277
7278 FriendlyName *string `json:"friendlyName,omitempty"`
7279
7280 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7281
7282 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
7283 }
7284
7285
7286 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
7287 avwsdwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase
7288 objectMap := make(map[string]interface{})
7289 if avwsdwi.ParentName != nil {
7290 objectMap["parentName"] = avwsdwi.ParentName
7291 }
7292 if avwsdwi.ServerName != nil {
7293 objectMap["serverName"] = avwsdwi.ServerName
7294 }
7295 if avwsdwi.IsAutoProtectable != nil {
7296 objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable
7297 }
7298 if avwsdwi.Subinquireditemcount != nil {
7299 objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount
7300 }
7301 if avwsdwi.SubWorkloadItemCount != nil {
7302 objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount
7303 }
7304 if avwsdwi.BackupManagementType != nil {
7305 objectMap["backupManagementType"] = avwsdwi.BackupManagementType
7306 }
7307 if avwsdwi.WorkloadType != nil {
7308 objectMap["workloadType"] = avwsdwi.WorkloadType
7309 }
7310 if avwsdwi.FriendlyName != nil {
7311 objectMap["friendlyName"] = avwsdwi.FriendlyName
7312 }
7313 if avwsdwi.ProtectionState != "" {
7314 objectMap["protectionState"] = avwsdwi.ProtectionState
7315 }
7316 if avwsdwi.WorkloadItemType != "" {
7317 objectMap["workloadItemType"] = avwsdwi.WorkloadItemType
7318 }
7319 return json.Marshal(objectMap)
7320 }
7321
7322
7323 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
7324 return nil, false
7325 }
7326
7327
7328 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
7329 return &avwsdwi, true
7330 }
7331
7332
7333 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
7334 return nil, false
7335 }
7336
7337
7338 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
7339 return nil, false
7340 }
7341
7342
7343 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
7344 return nil, false
7345 }
7346
7347
7348 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
7349 return nil, false
7350 }
7351
7352
7353 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
7354 return &avwsdwi, true
7355 }
7356
7357
7358 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
7359 return nil, false
7360 }
7361
7362
7363 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
7364 return nil, false
7365 }
7366
7367
7368 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
7369 return &avwsdwi, true
7370 }
7371
7372
7373
7374 type AzureVMWorkloadSQLInstanceProtectableItem struct {
7375
7376 ParentName *string `json:"parentName,omitempty"`
7377
7378
7379 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
7380
7381 ServerName *string `json:"serverName,omitempty"`
7382
7383 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
7384
7385 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
7386
7387 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
7388
7389 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
7390
7391 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
7392
7393 BackupManagementType *string `json:"backupManagementType,omitempty"`
7394
7395 WorkloadType *string `json:"workloadType,omitempty"`
7396
7397 FriendlyName *string `json:"friendlyName,omitempty"`
7398
7399 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7400
7401 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
7402 }
7403
7404
7405 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) {
7406 avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance
7407 objectMap := make(map[string]interface{})
7408 if avwsipi.ParentName != nil {
7409 objectMap["parentName"] = avwsipi.ParentName
7410 }
7411 if avwsipi.ParentUniqueName != nil {
7412 objectMap["parentUniqueName"] = avwsipi.ParentUniqueName
7413 }
7414 if avwsipi.ServerName != nil {
7415 objectMap["serverName"] = avwsipi.ServerName
7416 }
7417 if avwsipi.IsAutoProtectable != nil {
7418 objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable
7419 }
7420 if avwsipi.IsAutoProtected != nil {
7421 objectMap["isAutoProtected"] = avwsipi.IsAutoProtected
7422 }
7423 if avwsipi.Subinquireditemcount != nil {
7424 objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount
7425 }
7426 if avwsipi.Subprotectableitemcount != nil {
7427 objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount
7428 }
7429 if avwsipi.Prebackupvalidation != nil {
7430 objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation
7431 }
7432 if avwsipi.BackupManagementType != nil {
7433 objectMap["backupManagementType"] = avwsipi.BackupManagementType
7434 }
7435 if avwsipi.WorkloadType != nil {
7436 objectMap["workloadType"] = avwsipi.WorkloadType
7437 }
7438 if avwsipi.FriendlyName != nil {
7439 objectMap["friendlyName"] = avwsipi.FriendlyName
7440 }
7441 if avwsipi.ProtectionState != "" {
7442 objectMap["protectionState"] = avwsipi.ProtectionState
7443 }
7444 if avwsipi.ProtectableItemType != "" {
7445 objectMap["protectableItemType"] = avwsipi.ProtectableItemType
7446 }
7447 return json.Marshal(objectMap)
7448 }
7449
7450
7451 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
7452 return nil, false
7453 }
7454
7455
7456 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
7457 return nil, false
7458 }
7459
7460
7461 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
7462 return nil, false
7463 }
7464
7465
7466 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
7467 return nil, false
7468 }
7469
7470
7471 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
7472 return &avwsipi, true
7473 }
7474
7475
7476 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
7477 return nil, false
7478 }
7479
7480
7481 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
7482 return nil, false
7483 }
7484
7485
7486 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
7487 return nil, false
7488 }
7489
7490
7491 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
7492 return nil, false
7493 }
7494
7495
7496 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
7497 return nil, false
7498 }
7499
7500
7501 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
7502 return &avwsipi, true
7503 }
7504
7505
7506 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
7507 return nil, false
7508 }
7509
7510
7511 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
7512 return nil, false
7513 }
7514
7515
7516 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
7517 return nil, false
7518 }
7519
7520
7521 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
7522 return &avwsipi, true
7523 }
7524
7525
7526
7527 type AzureVMWorkloadSQLInstanceWorkloadItem struct {
7528
7529 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
7530
7531 ParentName *string `json:"parentName,omitempty"`
7532
7533 ServerName *string `json:"serverName,omitempty"`
7534
7535 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
7536
7537 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
7538
7539 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
7540
7541 BackupManagementType *string `json:"backupManagementType,omitempty"`
7542
7543 WorkloadType *string `json:"workloadType,omitempty"`
7544
7545 FriendlyName *string `json:"friendlyName,omitempty"`
7546
7547 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7548
7549 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
7550 }
7551
7552
7553 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) {
7554 avwsiwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance
7555 objectMap := make(map[string]interface{})
7556 if avwsiwi.DataDirectoryPaths != nil {
7557 objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths
7558 }
7559 if avwsiwi.ParentName != nil {
7560 objectMap["parentName"] = avwsiwi.ParentName
7561 }
7562 if avwsiwi.ServerName != nil {
7563 objectMap["serverName"] = avwsiwi.ServerName
7564 }
7565 if avwsiwi.IsAutoProtectable != nil {
7566 objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable
7567 }
7568 if avwsiwi.Subinquireditemcount != nil {
7569 objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount
7570 }
7571 if avwsiwi.SubWorkloadItemCount != nil {
7572 objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount
7573 }
7574 if avwsiwi.BackupManagementType != nil {
7575 objectMap["backupManagementType"] = avwsiwi.BackupManagementType
7576 }
7577 if avwsiwi.WorkloadType != nil {
7578 objectMap["workloadType"] = avwsiwi.WorkloadType
7579 }
7580 if avwsiwi.FriendlyName != nil {
7581 objectMap["friendlyName"] = avwsiwi.FriendlyName
7582 }
7583 if avwsiwi.ProtectionState != "" {
7584 objectMap["protectionState"] = avwsiwi.ProtectionState
7585 }
7586 if avwsiwi.WorkloadItemType != "" {
7587 objectMap["workloadItemType"] = avwsiwi.WorkloadItemType
7588 }
7589 return json.Marshal(objectMap)
7590 }
7591
7592
7593 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
7594 return nil, false
7595 }
7596
7597
7598 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
7599 return &avwsiwi, true
7600 }
7601
7602
7603 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
7604 return nil, false
7605 }
7606
7607
7608 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
7609 return nil, false
7610 }
7611
7612
7613 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
7614 return nil, false
7615 }
7616
7617
7618 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
7619 return nil, false
7620 }
7621
7622
7623 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
7624 return nil, false
7625 }
7626
7627
7628 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
7629 return &avwsiwi, true
7630 }
7631
7632
7633 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
7634 return nil, false
7635 }
7636
7637
7638 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
7639 return &avwsiwi, true
7640 }
7641
7642
7643 type BasicAzureWorkloadAutoProtectionIntent interface {
7644 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
7645 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
7646 }
7647
7648
7649 type AzureWorkloadAutoProtectionIntent struct {
7650
7651 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7652
7653 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7654
7655 ItemID *string `json:"itemId,omitempty"`
7656
7657 PolicyID *string `json:"policyId,omitempty"`
7658
7659 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7660
7661 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
7662 }
7663
7664 func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) {
7665 var m map[string]interface{}
7666 err := json.Unmarshal(body, &m)
7667 if err != nil {
7668 return nil, err
7669 }
7670
7671 switch m["protectionIntentItemType"] {
7672 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
7673 var awsapi AzureWorkloadSQLAutoProtectionIntent
7674 err := json.Unmarshal(body, &awsapi)
7675 return awsapi, err
7676 default:
7677 var awapi AzureWorkloadAutoProtectionIntent
7678 err := json.Unmarshal(body, &awapi)
7679 return awapi, err
7680 }
7681 }
7682 func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) {
7683 var rawMessages []*json.RawMessage
7684 err := json.Unmarshal(body, &rawMessages)
7685 if err != nil {
7686 return nil, err
7687 }
7688
7689 awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages))
7690
7691 for index, rawMessage := range rawMessages {
7692 awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage)
7693 if err != nil {
7694 return nil, err
7695 }
7696 awapiArray[index] = awapi
7697 }
7698 return awapiArray, nil
7699 }
7700
7701
7702 func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) {
7703 awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent
7704 objectMap := make(map[string]interface{})
7705 if awapi.BackupManagementType != "" {
7706 objectMap["backupManagementType"] = awapi.BackupManagementType
7707 }
7708 if awapi.SourceResourceID != nil {
7709 objectMap["sourceResourceId"] = awapi.SourceResourceID
7710 }
7711 if awapi.ItemID != nil {
7712 objectMap["itemId"] = awapi.ItemID
7713 }
7714 if awapi.PolicyID != nil {
7715 objectMap["policyId"] = awapi.PolicyID
7716 }
7717 if awapi.ProtectionState != "" {
7718 objectMap["protectionState"] = awapi.ProtectionState
7719 }
7720 if awapi.ProtectionIntentItemType != "" {
7721 objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType
7722 }
7723 return json.Marshal(objectMap)
7724 }
7725
7726
7727 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
7728 return nil, false
7729 }
7730
7731
7732 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
7733 return &awapi, true
7734 }
7735
7736
7737 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
7738 return nil, false
7739 }
7740
7741
7742 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
7743 return nil, false
7744 }
7745
7746
7747 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
7748 return &awapi, true
7749 }
7750
7751
7752 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
7753 return &awapi, true
7754 }
7755
7756
7757 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
7758 return nil, false
7759 }
7760
7761
7762 func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
7763 return nil, false
7764 }
7765
7766
7767 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
7768 return &awapi, true
7769 }
7770
7771
7772 type AzureWorkloadBackupRequest struct {
7773
7774 BackupType TypeEnum `json:"backupType,omitempty"`
7775
7776 EnableCompression *bool `json:"enableCompression,omitempty"`
7777
7778 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
7779
7780 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
7781 }
7782
7783
7784 func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) {
7785 awbr.ObjectType = ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest
7786 objectMap := make(map[string]interface{})
7787 if awbr.BackupType != "" {
7788 objectMap["backupType"] = awbr.BackupType
7789 }
7790 if awbr.EnableCompression != nil {
7791 objectMap["enableCompression"] = awbr.EnableCompression
7792 }
7793 if awbr.RecoveryPointExpiryTimeInUTC != nil {
7794 objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC
7795 }
7796 if awbr.ObjectType != "" {
7797 objectMap["objectType"] = awbr.ObjectType
7798 }
7799 return json.Marshal(objectMap)
7800 }
7801
7802
7803 func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
7804 return nil, false
7805 }
7806
7807
7808 func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
7809 return &awbr, true
7810 }
7811
7812
7813 func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
7814 return nil, false
7815 }
7816
7817
7818 func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) {
7819 return nil, false
7820 }
7821
7822
7823 func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) {
7824 return &awbr, true
7825 }
7826
7827
7828 type BasicAzureWorkloadContainer interface {
7829 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
7830 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
7831 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
7832 }
7833
7834
7835 type AzureWorkloadContainer struct {
7836
7837 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7838
7839 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
7840
7841 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
7842
7843 WorkloadType WorkloadType `json:"workloadType,omitempty"`
7844
7845 OperationType OperationType `json:"operationType,omitempty"`
7846
7847 FriendlyName *string `json:"friendlyName,omitempty"`
7848
7849 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7850
7851 RegistrationStatus *string `json:"registrationStatus,omitempty"`
7852
7853 HealthStatus *string `json:"healthStatus,omitempty"`
7854
7855 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
7856
7857 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
7858 }
7859
7860 func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) {
7861 var m map[string]interface{}
7862 err := json.Unmarshal(body, &m)
7863 if err != nil {
7864 return nil, err
7865 }
7866
7867 switch m["containerType"] {
7868 case string(ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer):
7869 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
7870 err := json.Unmarshal(body, &aswcpc)
7871 return aswcpc, err
7872 case string(ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer):
7873 var avacpc AzureVMAppContainerProtectionContainer
7874 err := json.Unmarshal(body, &avacpc)
7875 return avacpc, err
7876 default:
7877 var awc AzureWorkloadContainer
7878 err := json.Unmarshal(body, &awc)
7879 return awc, err
7880 }
7881 }
7882 func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) {
7883 var rawMessages []*json.RawMessage
7884 err := json.Unmarshal(body, &rawMessages)
7885 if err != nil {
7886 return nil, err
7887 }
7888
7889 awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages))
7890
7891 for index, rawMessage := range rawMessages {
7892 awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage)
7893 if err != nil {
7894 return nil, err
7895 }
7896 awcArray[index] = awc
7897 }
7898 return awcArray, nil
7899 }
7900
7901
7902 func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) {
7903 awc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer
7904 objectMap := make(map[string]interface{})
7905 if awc.SourceResourceID != nil {
7906 objectMap["sourceResourceId"] = awc.SourceResourceID
7907 }
7908 if awc.LastUpdatedTime != nil {
7909 objectMap["lastUpdatedTime"] = awc.LastUpdatedTime
7910 }
7911 if awc.ExtendedInfo != nil {
7912 objectMap["extendedInfo"] = awc.ExtendedInfo
7913 }
7914 if awc.WorkloadType != "" {
7915 objectMap["workloadType"] = awc.WorkloadType
7916 }
7917 if awc.OperationType != "" {
7918 objectMap["operationType"] = awc.OperationType
7919 }
7920 if awc.FriendlyName != nil {
7921 objectMap["friendlyName"] = awc.FriendlyName
7922 }
7923 if awc.BackupManagementType != "" {
7924 objectMap["backupManagementType"] = awc.BackupManagementType
7925 }
7926 if awc.RegistrationStatus != nil {
7927 objectMap["registrationStatus"] = awc.RegistrationStatus
7928 }
7929 if awc.HealthStatus != nil {
7930 objectMap["healthStatus"] = awc.HealthStatus
7931 }
7932 if awc.ProtectableObjectType != nil {
7933 objectMap["protectableObjectType"] = awc.ProtectableObjectType
7934 }
7935 if awc.ContainerType != "" {
7936 objectMap["containerType"] = awc.ContainerType
7937 }
7938 return json.Marshal(objectMap)
7939 }
7940
7941
7942 func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
7943 return nil, false
7944 }
7945
7946
7947 func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
7948 return nil, false
7949 }
7950
7951
7952 func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
7953 return nil, false
7954 }
7955
7956
7957 func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
7958 return nil, false
7959 }
7960
7961
7962 func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
7963 return nil, false
7964 }
7965
7966
7967 func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
7968 return nil, false
7969 }
7970
7971
7972 func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
7973 return nil, false
7974 }
7975
7976
7977 func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
7978 return &awc, true
7979 }
7980
7981
7982 func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
7983 return &awc, true
7984 }
7985
7986
7987 func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) {
7988 return nil, false
7989 }
7990
7991
7992 func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
7993 return nil, false
7994 }
7995
7996
7997 func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) {
7998 return nil, false
7999 }
8000
8001
8002 func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
8003 return nil, false
8004 }
8005
8006
8007 func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
8008 return nil, false
8009 }
8010
8011
8012 func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) {
8013 return nil, false
8014 }
8015
8016
8017 func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
8018 return nil, false
8019 }
8020
8021
8022 func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
8023 return &awc, true
8024 }
8025
8026
8027 type AzureWorkloadContainerAutoProtectionIntent struct {
8028
8029 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
8030
8031 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8032
8033 ItemID *string `json:"itemId,omitempty"`
8034
8035 PolicyID *string `json:"policyId,omitempty"`
8036
8037 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
8038
8039 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
8040 }
8041
8042
8043 func (awcapi AzureWorkloadContainerAutoProtectionIntent) MarshalJSON() ([]byte, error) {
8044 awcapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent
8045 objectMap := make(map[string]interface{})
8046 if awcapi.BackupManagementType != "" {
8047 objectMap["backupManagementType"] = awcapi.BackupManagementType
8048 }
8049 if awcapi.SourceResourceID != nil {
8050 objectMap["sourceResourceId"] = awcapi.SourceResourceID
8051 }
8052 if awcapi.ItemID != nil {
8053 objectMap["itemId"] = awcapi.ItemID
8054 }
8055 if awcapi.PolicyID != nil {
8056 objectMap["policyId"] = awcapi.PolicyID
8057 }
8058 if awcapi.ProtectionState != "" {
8059 objectMap["protectionState"] = awcapi.ProtectionState
8060 }
8061 if awcapi.ProtectionIntentItemType != "" {
8062 objectMap["protectionIntentItemType"] = awcapi.ProtectionIntentItemType
8063 }
8064 return json.Marshal(objectMap)
8065 }
8066
8067
8068 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
8069 return nil, false
8070 }
8071
8072
8073 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
8074 return nil, false
8075 }
8076
8077
8078 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
8079 return nil, false
8080 }
8081
8082
8083 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
8084 return &awcapi, true
8085 }
8086
8087
8088 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
8089 return nil, false
8090 }
8091
8092
8093 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
8094 return nil, false
8095 }
8096
8097
8098 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
8099 return nil, false
8100 }
8101
8102
8103 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
8104 return nil, false
8105 }
8106
8107
8108 func (awcapi AzureWorkloadContainerAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
8109 return &awcapi, true
8110 }
8111
8112
8113 type AzureWorkloadContainerExtendedInfo struct {
8114
8115 HostServerName *string `json:"hostServerName,omitempty"`
8116
8117 InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"`
8118
8119 NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"`
8120 }
8121
8122
8123 type AzureWorkloadErrorInfo struct {
8124
8125 ErrorCode *int32 `json:"errorCode,omitempty"`
8126
8127 ErrorString *string `json:"errorString,omitempty"`
8128
8129 ErrorTitle *string `json:"errorTitle,omitempty"`
8130
8131 Recommendations *[]string `json:"recommendations,omitempty"`
8132
8133 AdditionalDetails *string `json:"additionalDetails,omitempty"`
8134 }
8135
8136
8137 type AzureWorkloadJob struct {
8138
8139 WorkloadType *string `json:"workloadType,omitempty"`
8140
8141 Duration *string `json:"duration,omitempty"`
8142
8143 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
8144
8145 ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"`
8146
8147 ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"`
8148
8149 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
8150
8151 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
8152
8153 Operation *string `json:"operation,omitempty"`
8154
8155 Status *string `json:"status,omitempty"`
8156
8157 StartTime *date.Time `json:"startTime,omitempty"`
8158
8159 EndTime *date.Time `json:"endTime,omitempty"`
8160
8161 ActivityID *string `json:"activityId,omitempty"`
8162
8163 JobType JobType `json:"jobType,omitempty"`
8164 }
8165
8166
8167 func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) {
8168 awj.JobType = JobTypeAzureWorkloadJob
8169 objectMap := make(map[string]interface{})
8170 if awj.WorkloadType != nil {
8171 objectMap["workloadType"] = awj.WorkloadType
8172 }
8173 if awj.Duration != nil {
8174 objectMap["duration"] = awj.Duration
8175 }
8176 if awj.ActionsInfo != nil {
8177 objectMap["actionsInfo"] = awj.ActionsInfo
8178 }
8179 if awj.ErrorDetails != nil {
8180 objectMap["errorDetails"] = awj.ErrorDetails
8181 }
8182 if awj.ExtendedInfo != nil {
8183 objectMap["extendedInfo"] = awj.ExtendedInfo
8184 }
8185 if awj.EntityFriendlyName != nil {
8186 objectMap["entityFriendlyName"] = awj.EntityFriendlyName
8187 }
8188 if awj.BackupManagementType != "" {
8189 objectMap["backupManagementType"] = awj.BackupManagementType
8190 }
8191 if awj.Operation != nil {
8192 objectMap["operation"] = awj.Operation
8193 }
8194 if awj.Status != nil {
8195 objectMap["status"] = awj.Status
8196 }
8197 if awj.StartTime != nil {
8198 objectMap["startTime"] = awj.StartTime
8199 }
8200 if awj.EndTime != nil {
8201 objectMap["endTime"] = awj.EndTime
8202 }
8203 if awj.ActivityID != nil {
8204 objectMap["activityId"] = awj.ActivityID
8205 }
8206 if awj.JobType != "" {
8207 objectMap["jobType"] = awj.JobType
8208 }
8209 return json.Marshal(objectMap)
8210 }
8211
8212
8213 func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
8214 return nil, false
8215 }
8216
8217
8218 func (awj AzureWorkloadJob) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
8219 return nil, false
8220 }
8221
8222
8223 func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
8224 return nil, false
8225 }
8226
8227
8228 func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
8229 return &awj, true
8230 }
8231
8232
8233 func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) {
8234 return nil, false
8235 }
8236
8237
8238 func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) {
8239 return nil, false
8240 }
8241
8242
8243 func (awj AzureWorkloadJob) AsVaultJob() (*VaultJob, bool) {
8244 return nil, false
8245 }
8246
8247
8248 func (awj AzureWorkloadJob) AsJob() (*Job, bool) {
8249 return nil, false
8250 }
8251
8252
8253 func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) {
8254 return &awj, true
8255 }
8256
8257
8258 type AzureWorkloadJobExtendedInfo struct {
8259
8260 TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"`
8261
8262 PropertyBag map[string]*string `json:"propertyBag"`
8263
8264 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
8265 }
8266
8267
8268 func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) {
8269 objectMap := make(map[string]interface{})
8270 if awjei.TasksList != nil {
8271 objectMap["tasksList"] = awjei.TasksList
8272 }
8273 if awjei.PropertyBag != nil {
8274 objectMap["propertyBag"] = awjei.PropertyBag
8275 }
8276 if awjei.DynamicErrorMessage != nil {
8277 objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage
8278 }
8279 return json.Marshal(objectMap)
8280 }
8281
8282
8283 type AzureWorkloadJobTaskDetails struct {
8284
8285 TaskID *string `json:"taskId,omitempty"`
8286
8287 Status *string `json:"status,omitempty"`
8288 }
8289
8290
8291 type BasicAzureWorkloadPointInTimeRecoveryPoint interface {
8292 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
8293 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
8294 }
8295
8296
8297 type AzureWorkloadPointInTimeRecoveryPoint struct {
8298
8299 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
8300
8301 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8302
8303 Type RestorePointType `json:"type,omitempty"`
8304
8305 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
8306
8307 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8308
8309 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8310 }
8311
8312 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
8313 var m map[string]interface{}
8314 err := json.Unmarshal(body, &m)
8315 if err != nil {
8316 return nil, err
8317 }
8318
8319 switch m["objectType"] {
8320 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
8321 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
8322 err := json.Unmarshal(body, &awshpitrp)
8323 return awshpitrp, err
8324 default:
8325 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
8326 err := json.Unmarshal(body, &awpitrp)
8327 return awpitrp, err
8328 }
8329 }
8330 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
8331 var rawMessages []*json.RawMessage
8332 err := json.Unmarshal(body, &rawMessages)
8333 if err != nil {
8334 return nil, err
8335 }
8336
8337 awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages))
8338
8339 for index, rawMessage := range rawMessages {
8340 awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage)
8341 if err != nil {
8342 return nil, err
8343 }
8344 awpitrpArray[index] = awpitrp
8345 }
8346 return awpitrpArray, nil
8347 }
8348
8349
8350 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
8351 awpitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint
8352 objectMap := make(map[string]interface{})
8353 if awpitrp.TimeRanges != nil {
8354 objectMap["timeRanges"] = awpitrp.TimeRanges
8355 }
8356 if awpitrp.RecoveryPointTimeInUTC != nil {
8357 objectMap["recoveryPointTimeInUTC"] = awpitrp.RecoveryPointTimeInUTC
8358 }
8359 if awpitrp.Type != "" {
8360 objectMap["type"] = awpitrp.Type
8361 }
8362 if awpitrp.RecoveryPointTierDetails != nil {
8363 objectMap["recoveryPointTierDetails"] = awpitrp.RecoveryPointTierDetails
8364 }
8365 if awpitrp.RecoveryPointMoveReadinessInfo != nil {
8366 objectMap["recoveryPointMoveReadinessInfo"] = awpitrp.RecoveryPointMoveReadinessInfo
8367 }
8368 if awpitrp.ObjectType != "" {
8369 objectMap["objectType"] = awpitrp.ObjectType
8370 }
8371 return json.Marshal(objectMap)
8372 }
8373
8374
8375 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8376 return nil, false
8377 }
8378
8379
8380 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8381 return &awpitrp, true
8382 }
8383
8384
8385 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8386 return &awpitrp, true
8387 }
8388
8389
8390 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8391 return nil, false
8392 }
8393
8394
8395 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8396 return &awpitrp, true
8397 }
8398
8399
8400 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8401 return nil, false
8402 }
8403
8404
8405 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8406 return nil, false
8407 }
8408
8409
8410 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8411 return nil, false
8412 }
8413
8414
8415 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8416 return nil, false
8417 }
8418
8419
8420 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8421 return nil, false
8422 }
8423
8424
8425 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8426 return nil, false
8427 }
8428
8429
8430 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8431 return nil, false
8432 }
8433
8434
8435 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8436 return nil, false
8437 }
8438
8439
8440 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8441 return &awpitrp, true
8442 }
8443
8444
8445
8446 type AzureWorkloadPointInTimeRestoreRequest struct {
8447
8448 PointInTime *date.Time `json:"pointInTime,omitempty"`
8449
8450 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8451
8452 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8453
8454 PropertyBag map[string]*string `json:"propertyBag"`
8455
8456 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8457
8458 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8459
8460
8461 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8462
8463 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8464 }
8465
8466
8467 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
8468 awpitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest
8469 objectMap := make(map[string]interface{})
8470 if awpitrr.PointInTime != nil {
8471 objectMap["pointInTime"] = awpitrr.PointInTime
8472 }
8473 if awpitrr.RecoveryType != "" {
8474 objectMap["recoveryType"] = awpitrr.RecoveryType
8475 }
8476 if awpitrr.SourceResourceID != nil {
8477 objectMap["sourceResourceId"] = awpitrr.SourceResourceID
8478 }
8479 if awpitrr.PropertyBag != nil {
8480 objectMap["propertyBag"] = awpitrr.PropertyBag
8481 }
8482 if awpitrr.TargetInfo != nil {
8483 objectMap["targetInfo"] = awpitrr.TargetInfo
8484 }
8485 if awpitrr.RecoveryMode != "" {
8486 objectMap["recoveryMode"] = awpitrr.RecoveryMode
8487 }
8488 if awpitrr.TargetVirtualMachineID != nil {
8489 objectMap["targetVirtualMachineId"] = awpitrr.TargetVirtualMachineID
8490 }
8491 if awpitrr.ObjectType != "" {
8492 objectMap["objectType"] = awpitrr.ObjectType
8493 }
8494 return json.Marshal(objectMap)
8495 }
8496
8497
8498 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8499 return nil, false
8500 }
8501
8502
8503 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8504 return &awpitrr, true
8505 }
8506
8507
8508 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8509 return nil, false
8510 }
8511
8512
8513 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8514 return &awpitrr, true
8515 }
8516
8517
8518 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8519 return nil, false
8520 }
8521
8522
8523 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8524 return nil, false
8525 }
8526
8527
8528 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8529 return nil, false
8530 }
8531
8532
8533 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8534 return nil, false
8535 }
8536
8537
8538 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8539 return nil, false
8540 }
8541
8542
8543 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8544 return nil, false
8545 }
8546
8547
8548 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8549 return nil, false
8550 }
8551
8552
8553 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8554 return nil, false
8555 }
8556
8557
8558 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8559 return nil, false
8560 }
8561
8562
8563 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8564 return nil, false
8565 }
8566
8567
8568 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8569 return nil, false
8570 }
8571
8572
8573 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8574 return nil, false
8575 }
8576
8577
8578 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8579 return nil, false
8580 }
8581
8582
8583 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8584 return nil, false
8585 }
8586
8587
8588 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8589 return nil, false
8590 }
8591
8592
8593 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8594 return nil, false
8595 }
8596
8597
8598 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8599 return &awpitrr, true
8600 }
8601
8602
8603 type BasicAzureWorkloadRecoveryPoint interface {
8604 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
8605 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
8606 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
8607 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
8608 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
8609 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
8610 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
8611 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
8612 }
8613
8614
8615
8616 type AzureWorkloadRecoveryPoint struct {
8617
8618 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8619
8620 Type RestorePointType `json:"type,omitempty"`
8621
8622 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
8623
8624 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8625
8626 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8627 }
8628
8629 func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) {
8630 var m map[string]interface{}
8631 err := json.Unmarshal(body, &m)
8632 if err != nil {
8633 return nil, err
8634 }
8635
8636 switch m["objectType"] {
8637 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
8638 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
8639 err := json.Unmarshal(body, &awpitrp)
8640 return awpitrp, err
8641 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
8642 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
8643 err := json.Unmarshal(body, &awshpitrp)
8644 return awshpitrp, err
8645 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
8646 var awshrp AzureWorkloadSAPHanaRecoveryPoint
8647 err := json.Unmarshal(body, &awshrp)
8648 return awshrp, err
8649 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
8650 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
8651 err := json.Unmarshal(body, &awspitrp)
8652 return awspitrp, err
8653 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint):
8654 var awsrp AzureWorkloadSQLRecoveryPoint
8655 err := json.Unmarshal(body, &awsrp)
8656 return awsrp, err
8657 default:
8658 var awrp AzureWorkloadRecoveryPoint
8659 err := json.Unmarshal(body, &awrp)
8660 return awrp, err
8661 }
8662 }
8663 func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) {
8664 var rawMessages []*json.RawMessage
8665 err := json.Unmarshal(body, &rawMessages)
8666 if err != nil {
8667 return nil, err
8668 }
8669
8670 awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages))
8671
8672 for index, rawMessage := range rawMessages {
8673 awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage)
8674 if err != nil {
8675 return nil, err
8676 }
8677 awrpArray[index] = awrp
8678 }
8679 return awrpArray, nil
8680 }
8681
8682
8683 func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) {
8684 awrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint
8685 objectMap := make(map[string]interface{})
8686 if awrp.RecoveryPointTimeInUTC != nil {
8687 objectMap["recoveryPointTimeInUTC"] = awrp.RecoveryPointTimeInUTC
8688 }
8689 if awrp.Type != "" {
8690 objectMap["type"] = awrp.Type
8691 }
8692 if awrp.RecoveryPointTierDetails != nil {
8693 objectMap["recoveryPointTierDetails"] = awrp.RecoveryPointTierDetails
8694 }
8695 if awrp.RecoveryPointMoveReadinessInfo != nil {
8696 objectMap["recoveryPointMoveReadinessInfo"] = awrp.RecoveryPointMoveReadinessInfo
8697 }
8698 if awrp.ObjectType != "" {
8699 objectMap["objectType"] = awrp.ObjectType
8700 }
8701 return json.Marshal(objectMap)
8702 }
8703
8704
8705 func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8706 return nil, false
8707 }
8708
8709
8710 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8711 return nil, false
8712 }
8713
8714
8715 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8716 return nil, false
8717 }
8718
8719
8720 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8721 return &awrp, true
8722 }
8723
8724
8725 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8726 return &awrp, true
8727 }
8728
8729
8730 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8731 return nil, false
8732 }
8733
8734
8735 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8736 return nil, false
8737 }
8738
8739
8740 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8741 return nil, false
8742 }
8743
8744
8745 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8746 return nil, false
8747 }
8748
8749
8750 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8751 return nil, false
8752 }
8753
8754
8755 func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8756 return nil, false
8757 }
8758
8759
8760 func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8761 return nil, false
8762 }
8763
8764
8765 func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8766 return nil, false
8767 }
8768
8769
8770 func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8771 return &awrp, true
8772 }
8773
8774
8775 type BasicAzureWorkloadRestoreRequest interface {
8776 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
8777 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8778 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8779 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
8780 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
8781 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
8782 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
8783 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
8784 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
8785 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
8786 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
8787 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
8788 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
8789 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
8790 }
8791
8792
8793 type AzureWorkloadRestoreRequest struct {
8794
8795 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8796
8797 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8798
8799 PropertyBag map[string]*string `json:"propertyBag"`
8800
8801 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8802
8803 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8804
8805
8806 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8807
8808 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8809 }
8810
8811 func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) {
8812 var m map[string]interface{}
8813 err := json.Unmarshal(body, &m)
8814 if err != nil {
8815 return nil, err
8816 }
8817
8818 switch m["objectType"] {
8819 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest):
8820 var awpitrr AzureWorkloadPointInTimeRestoreRequest
8821 err := json.Unmarshal(body, &awpitrr)
8822 return awpitrr, err
8823 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
8824 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8825 err := json.Unmarshal(body, &awshpitrr)
8826 return awshpitrr, err
8827 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest):
8828 var awshrr AzureWorkloadSAPHanaRestoreRequest
8829 err := json.Unmarshal(body, &awshrr)
8830 return awshrr, err
8831 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
8832 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
8833 err := json.Unmarshal(body, &awspitrr)
8834 return awspitrr, err
8835 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest):
8836 var awsrr AzureWorkloadSQLRestoreRequest
8837 err := json.Unmarshal(body, &awsrr)
8838 return awsrr, err
8839 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
8840 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
8841 err := json.Unmarshal(body, &awshpitrwrr)
8842 return awshpitrwrr, err
8843 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
8844 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
8845 err := json.Unmarshal(body, &awshrwrr)
8846 return awshrwrr, err
8847 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
8848 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
8849 err := json.Unmarshal(body, &awspitrwrr)
8850 return awspitrwrr, err
8851 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
8852 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
8853 err := json.Unmarshal(body, &awsrwrr)
8854 return awsrwrr, err
8855 default:
8856 var awrr AzureWorkloadRestoreRequest
8857 err := json.Unmarshal(body, &awrr)
8858 return awrr, err
8859 }
8860 }
8861 func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) {
8862 var rawMessages []*json.RawMessage
8863 err := json.Unmarshal(body, &rawMessages)
8864 if err != nil {
8865 return nil, err
8866 }
8867
8868 awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages))
8869
8870 for index, rawMessage := range rawMessages {
8871 awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage)
8872 if err != nil {
8873 return nil, err
8874 }
8875 awrrArray[index] = awrr
8876 }
8877 return awrrArray, nil
8878 }
8879
8880
8881 func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) {
8882 awrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest
8883 objectMap := make(map[string]interface{})
8884 if awrr.RecoveryType != "" {
8885 objectMap["recoveryType"] = awrr.RecoveryType
8886 }
8887 if awrr.SourceResourceID != nil {
8888 objectMap["sourceResourceId"] = awrr.SourceResourceID
8889 }
8890 if awrr.PropertyBag != nil {
8891 objectMap["propertyBag"] = awrr.PropertyBag
8892 }
8893 if awrr.TargetInfo != nil {
8894 objectMap["targetInfo"] = awrr.TargetInfo
8895 }
8896 if awrr.RecoveryMode != "" {
8897 objectMap["recoveryMode"] = awrr.RecoveryMode
8898 }
8899 if awrr.TargetVirtualMachineID != nil {
8900 objectMap["targetVirtualMachineId"] = awrr.TargetVirtualMachineID
8901 }
8902 if awrr.ObjectType != "" {
8903 objectMap["objectType"] = awrr.ObjectType
8904 }
8905 return json.Marshal(objectMap)
8906 }
8907
8908
8909 func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8910 return nil, false
8911 }
8912
8913
8914 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8915 return nil, false
8916 }
8917
8918
8919 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8920 return &awrr, true
8921 }
8922
8923
8924 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8925 return &awrr, true
8926 }
8927
8928
8929 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8930 return nil, false
8931 }
8932
8933
8934 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8935 return nil, false
8936 }
8937
8938
8939 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8940 return nil, false
8941 }
8942
8943
8944 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8945 return nil, false
8946 }
8947
8948
8949 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8950 return nil, false
8951 }
8952
8953
8954 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8955 return nil, false
8956 }
8957
8958
8959 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8960 return nil, false
8961 }
8962
8963
8964 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8965 return nil, false
8966 }
8967
8968
8969 func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8970 return nil, false
8971 }
8972
8973
8974 func (awrr AzureWorkloadRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8975 return nil, false
8976 }
8977
8978
8979 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8980 return nil, false
8981 }
8982
8983
8984 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8985 return nil, false
8986 }
8987
8988
8989 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8990 return nil, false
8991 }
8992
8993
8994 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8995 return nil, false
8996 }
8997
8998
8999 func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9000 return nil, false
9001 }
9002
9003
9004 func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9005 return nil, false
9006 }
9007
9008
9009 func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9010 return &awrr, true
9011 }
9012
9013
9014 type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct {
9015
9016 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
9017
9018 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
9019
9020 Type RestorePointType `json:"type,omitempty"`
9021
9022 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
9023
9024 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
9025
9026 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
9027 }
9028
9029
9030 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
9031 awshpitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint
9032 objectMap := make(map[string]interface{})
9033 if awshpitrp.TimeRanges != nil {
9034 objectMap["timeRanges"] = awshpitrp.TimeRanges
9035 }
9036 if awshpitrp.RecoveryPointTimeInUTC != nil {
9037 objectMap["recoveryPointTimeInUTC"] = awshpitrp.RecoveryPointTimeInUTC
9038 }
9039 if awshpitrp.Type != "" {
9040 objectMap["type"] = awshpitrp.Type
9041 }
9042 if awshpitrp.RecoveryPointTierDetails != nil {
9043 objectMap["recoveryPointTierDetails"] = awshpitrp.RecoveryPointTierDetails
9044 }
9045 if awshpitrp.RecoveryPointMoveReadinessInfo != nil {
9046 objectMap["recoveryPointMoveReadinessInfo"] = awshpitrp.RecoveryPointMoveReadinessInfo
9047 }
9048 if awshpitrp.ObjectType != "" {
9049 objectMap["objectType"] = awshpitrp.ObjectType
9050 }
9051 return json.Marshal(objectMap)
9052 }
9053
9054
9055 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
9056 return nil, false
9057 }
9058
9059
9060 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9061 return nil, false
9062 }
9063
9064
9065 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9066 return &awshpitrp, true
9067 }
9068
9069
9070 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9071 return nil, false
9072 }
9073
9074
9075 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9076 return &awshpitrp, true
9077 }
9078
9079
9080 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9081 return &awshpitrp, true
9082 }
9083
9084
9085 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9086 return nil, false
9087 }
9088
9089
9090 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9091 return nil, false
9092 }
9093
9094
9095 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9096 return nil, false
9097 }
9098
9099
9100 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9101 return nil, false
9102 }
9103
9104
9105 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9106 return nil, false
9107 }
9108
9109
9110 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9111 return nil, false
9112 }
9113
9114
9115 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9116 return nil, false
9117 }
9118
9119
9120 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9121 return &awshpitrp, true
9122 }
9123
9124
9125
9126 type BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest interface {
9127 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
9128 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9129 }
9130
9131
9132
9133 type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct {
9134
9135 PointInTime *date.Time `json:"pointInTime,omitempty"`
9136
9137 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9138
9139 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9140
9141 PropertyBag map[string]*string `json:"propertyBag"`
9142
9143 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9144
9145 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9146
9147
9148 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9149
9150 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9151 }
9152
9153 func unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, error) {
9154 var m map[string]interface{}
9155 err := json.Unmarshal(body, &m)
9156 if err != nil {
9157 return nil, err
9158 }
9159
9160 switch m["objectType"] {
9161 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
9162 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
9163 err := json.Unmarshal(body, &awshpitrwrr)
9164 return awshpitrwrr, err
9165 default:
9166 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
9167 err := json.Unmarshal(body, &awshpitrr)
9168 return awshpitrr, err
9169 }
9170 }
9171 func unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, error) {
9172 var rawMessages []*json.RawMessage
9173 err := json.Unmarshal(body, &rawMessages)
9174 if err != nil {
9175 return nil, err
9176 }
9177
9178 awshpitrrArray := make([]BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, len(rawMessages))
9179
9180 for index, rawMessage := range rawMessages {
9181 awshpitrr, err := unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest(*rawMessage)
9182 if err != nil {
9183 return nil, err
9184 }
9185 awshpitrrArray[index] = awshpitrr
9186 }
9187 return awshpitrrArray, nil
9188 }
9189
9190
9191 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
9192 awshpitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest
9193 objectMap := make(map[string]interface{})
9194 if awshpitrr.PointInTime != nil {
9195 objectMap["pointInTime"] = awshpitrr.PointInTime
9196 }
9197 if awshpitrr.RecoveryType != "" {
9198 objectMap["recoveryType"] = awshpitrr.RecoveryType
9199 }
9200 if awshpitrr.SourceResourceID != nil {
9201 objectMap["sourceResourceId"] = awshpitrr.SourceResourceID
9202 }
9203 if awshpitrr.PropertyBag != nil {
9204 objectMap["propertyBag"] = awshpitrr.PropertyBag
9205 }
9206 if awshpitrr.TargetInfo != nil {
9207 objectMap["targetInfo"] = awshpitrr.TargetInfo
9208 }
9209 if awshpitrr.RecoveryMode != "" {
9210 objectMap["recoveryMode"] = awshpitrr.RecoveryMode
9211 }
9212 if awshpitrr.TargetVirtualMachineID != nil {
9213 objectMap["targetVirtualMachineId"] = awshpitrr.TargetVirtualMachineID
9214 }
9215 if awshpitrr.ObjectType != "" {
9216 objectMap["objectType"] = awshpitrr.ObjectType
9217 }
9218 return json.Marshal(objectMap)
9219 }
9220
9221
9222 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9223 return nil, false
9224 }
9225
9226
9227 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9228 return nil, false
9229 }
9230
9231
9232 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9233 return nil, false
9234 }
9235
9236
9237 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9238 return &awshpitrr, true
9239 }
9240
9241
9242 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9243 return &awshpitrr, true
9244 }
9245
9246
9247 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9248 return &awshpitrr, true
9249 }
9250
9251
9252 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9253 return nil, false
9254 }
9255
9256
9257 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9258 return &awshpitrr, true
9259 }
9260
9261
9262 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9263 return nil, false
9264 }
9265
9266
9267 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9268 return nil, false
9269 }
9270
9271
9272 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9273 return nil, false
9274 }
9275
9276
9277 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9278 return nil, false
9279 }
9280
9281
9282 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9283 return nil, false
9284 }
9285
9286
9287 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9288 return nil, false
9289 }
9290
9291
9292 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9293 return nil, false
9294 }
9295
9296
9297 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9298 return nil, false
9299 }
9300
9301
9302 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9303 return nil, false
9304 }
9305
9306
9307 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9308 return nil, false
9309 }
9310
9311
9312 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9313 return nil, false
9314 }
9315
9316
9317 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9318 return nil, false
9319 }
9320
9321
9322 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9323 return &awshpitrr, true
9324 }
9325
9326
9327
9328 type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct {
9329
9330 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
9331
9332 PointInTime *date.Time `json:"pointInTime,omitempty"`
9333
9334 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9335
9336 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9337
9338 PropertyBag map[string]*string `json:"propertyBag"`
9339
9340 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9341
9342 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9343
9344
9345 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9346
9347 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9348 }
9349
9350
9351 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
9352 awshpitrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
9353 objectMap := make(map[string]interface{})
9354 if awshpitrwrr.RecoveryPointRehydrationInfo != nil {
9355 objectMap["recoveryPointRehydrationInfo"] = awshpitrwrr.RecoveryPointRehydrationInfo
9356 }
9357 if awshpitrwrr.PointInTime != nil {
9358 objectMap["pointInTime"] = awshpitrwrr.PointInTime
9359 }
9360 if awshpitrwrr.RecoveryType != "" {
9361 objectMap["recoveryType"] = awshpitrwrr.RecoveryType
9362 }
9363 if awshpitrwrr.SourceResourceID != nil {
9364 objectMap["sourceResourceId"] = awshpitrwrr.SourceResourceID
9365 }
9366 if awshpitrwrr.PropertyBag != nil {
9367 objectMap["propertyBag"] = awshpitrwrr.PropertyBag
9368 }
9369 if awshpitrwrr.TargetInfo != nil {
9370 objectMap["targetInfo"] = awshpitrwrr.TargetInfo
9371 }
9372 if awshpitrwrr.RecoveryMode != "" {
9373 objectMap["recoveryMode"] = awshpitrwrr.RecoveryMode
9374 }
9375 if awshpitrwrr.TargetVirtualMachineID != nil {
9376 objectMap["targetVirtualMachineId"] = awshpitrwrr.TargetVirtualMachineID
9377 }
9378 if awshpitrwrr.ObjectType != "" {
9379 objectMap["objectType"] = awshpitrwrr.ObjectType
9380 }
9381 return json.Marshal(objectMap)
9382 }
9383
9384
9385 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9386 return nil, false
9387 }
9388
9389
9390 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9391 return nil, false
9392 }
9393
9394
9395 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9396 return nil, false
9397 }
9398
9399
9400 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9401 return &awshpitrwrr, true
9402 }
9403
9404
9405 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9406 return nil, false
9407 }
9408
9409
9410 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9411 return &awshpitrwrr, true
9412 }
9413
9414
9415 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9416 return nil, false
9417 }
9418
9419
9420 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9421 return &awshpitrwrr, true
9422 }
9423
9424
9425 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9426 return nil, false
9427 }
9428
9429
9430 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9431 return nil, false
9432 }
9433
9434
9435 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9436 return nil, false
9437 }
9438
9439
9440 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9441 return nil, false
9442 }
9443
9444
9445 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9446 return nil, false
9447 }
9448
9449
9450 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9451 return nil, false
9452 }
9453
9454
9455 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9456 return &awshpitrwrr, true
9457 }
9458
9459
9460 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9461 return nil, false
9462 }
9463
9464
9465 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9466 return nil, false
9467 }
9468
9469
9470 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9471 return nil, false
9472 }
9473
9474
9475 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9476 return nil, false
9477 }
9478
9479
9480 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9481 return nil, false
9482 }
9483
9484
9485 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9486 return &awshpitrwrr, true
9487 }
9488
9489
9490
9491 type AzureWorkloadSAPHanaRecoveryPoint struct {
9492
9493 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
9494
9495 Type RestorePointType `json:"type,omitempty"`
9496
9497 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
9498
9499 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
9500
9501 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
9502 }
9503
9504
9505 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) {
9506 awshrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint
9507 objectMap := make(map[string]interface{})
9508 if awshrp.RecoveryPointTimeInUTC != nil {
9509 objectMap["recoveryPointTimeInUTC"] = awshrp.RecoveryPointTimeInUTC
9510 }
9511 if awshrp.Type != "" {
9512 objectMap["type"] = awshrp.Type
9513 }
9514 if awshrp.RecoveryPointTierDetails != nil {
9515 objectMap["recoveryPointTierDetails"] = awshrp.RecoveryPointTierDetails
9516 }
9517 if awshrp.RecoveryPointMoveReadinessInfo != nil {
9518 objectMap["recoveryPointMoveReadinessInfo"] = awshrp.RecoveryPointMoveReadinessInfo
9519 }
9520 if awshrp.ObjectType != "" {
9521 objectMap["objectType"] = awshrp.ObjectType
9522 }
9523 return json.Marshal(objectMap)
9524 }
9525
9526
9527 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
9528 return nil, false
9529 }
9530
9531
9532 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9533 return nil, false
9534 }
9535
9536
9537 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9538 return nil, false
9539 }
9540
9541
9542 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9543 return nil, false
9544 }
9545
9546
9547 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9548 return &awshrp, true
9549 }
9550
9551
9552 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9553 return nil, false
9554 }
9555
9556
9557 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9558 return &awshrp, true
9559 }
9560
9561
9562 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9563 return nil, false
9564 }
9565
9566
9567 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9568 return nil, false
9569 }
9570
9571
9572 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9573 return nil, false
9574 }
9575
9576
9577 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9578 return nil, false
9579 }
9580
9581
9582 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9583 return nil, false
9584 }
9585
9586
9587 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9588 return nil, false
9589 }
9590
9591
9592 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9593 return &awshrp, true
9594 }
9595
9596
9597 type BasicAzureWorkloadSAPHanaRestoreRequest interface {
9598 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9599 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9600 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
9601 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
9602 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
9603 }
9604
9605
9606 type AzureWorkloadSAPHanaRestoreRequest struct {
9607
9608 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9609
9610 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9611
9612 PropertyBag map[string]*string `json:"propertyBag"`
9613
9614 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9615
9616 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9617
9618
9619 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9620
9621 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9622 }
9623
9624 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) {
9625 var m map[string]interface{}
9626 err := json.Unmarshal(body, &m)
9627 if err != nil {
9628 return nil, err
9629 }
9630
9631 switch m["objectType"] {
9632 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
9633 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
9634 err := json.Unmarshal(body, &awshpitrr)
9635 return awshpitrr, err
9636 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
9637 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
9638 err := json.Unmarshal(body, &awshpitrwrr)
9639 return awshpitrwrr, err
9640 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
9641 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
9642 err := json.Unmarshal(body, &awshrwrr)
9643 return awshrwrr, err
9644 default:
9645 var awshrr AzureWorkloadSAPHanaRestoreRequest
9646 err := json.Unmarshal(body, &awshrr)
9647 return awshrr, err
9648 }
9649 }
9650 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) {
9651 var rawMessages []*json.RawMessage
9652 err := json.Unmarshal(body, &rawMessages)
9653 if err != nil {
9654 return nil, err
9655 }
9656
9657 awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages))
9658
9659 for index, rawMessage := range rawMessages {
9660 awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage)
9661 if err != nil {
9662 return nil, err
9663 }
9664 awshrrArray[index] = awshrr
9665 }
9666 return awshrrArray, nil
9667 }
9668
9669
9670 func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) {
9671 awshrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest
9672 objectMap := make(map[string]interface{})
9673 if awshrr.RecoveryType != "" {
9674 objectMap["recoveryType"] = awshrr.RecoveryType
9675 }
9676 if awshrr.SourceResourceID != nil {
9677 objectMap["sourceResourceId"] = awshrr.SourceResourceID
9678 }
9679 if awshrr.PropertyBag != nil {
9680 objectMap["propertyBag"] = awshrr.PropertyBag
9681 }
9682 if awshrr.TargetInfo != nil {
9683 objectMap["targetInfo"] = awshrr.TargetInfo
9684 }
9685 if awshrr.RecoveryMode != "" {
9686 objectMap["recoveryMode"] = awshrr.RecoveryMode
9687 }
9688 if awshrr.TargetVirtualMachineID != nil {
9689 objectMap["targetVirtualMachineId"] = awshrr.TargetVirtualMachineID
9690 }
9691 if awshrr.ObjectType != "" {
9692 objectMap["objectType"] = awshrr.ObjectType
9693 }
9694 return json.Marshal(objectMap)
9695 }
9696
9697
9698 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9699 return nil, false
9700 }
9701
9702
9703 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9704 return nil, false
9705 }
9706
9707
9708 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9709 return nil, false
9710 }
9711
9712
9713 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9714 return &awshrr, true
9715 }
9716
9717
9718 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9719 return nil, false
9720 }
9721
9722
9723 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9724 return nil, false
9725 }
9726
9727
9728 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9729 return &awshrr, true
9730 }
9731
9732
9733 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9734 return &awshrr, true
9735 }
9736
9737
9738 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9739 return nil, false
9740 }
9741
9742
9743 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9744 return nil, false
9745 }
9746
9747
9748 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9749 return nil, false
9750 }
9751
9752
9753 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9754 return nil, false
9755 }
9756
9757
9758 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9759 return nil, false
9760 }
9761
9762
9763 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9764 return nil, false
9765 }
9766
9767
9768 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9769 return nil, false
9770 }
9771
9772
9773 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9774 return nil, false
9775 }
9776
9777
9778 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9779 return nil, false
9780 }
9781
9782
9783 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9784 return nil, false
9785 }
9786
9787
9788 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9789 return nil, false
9790 }
9791
9792
9793 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9794 return nil, false
9795 }
9796
9797
9798 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9799 return &awshrr, true
9800 }
9801
9802
9803
9804 type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct {
9805
9806 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
9807
9808 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9809
9810 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9811
9812 PropertyBag map[string]*string `json:"propertyBag"`
9813
9814 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9815
9816 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9817
9818
9819 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9820
9821 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9822 }
9823
9824
9825 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
9826 awshrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest
9827 objectMap := make(map[string]interface{})
9828 if awshrwrr.RecoveryPointRehydrationInfo != nil {
9829 objectMap["recoveryPointRehydrationInfo"] = awshrwrr.RecoveryPointRehydrationInfo
9830 }
9831 if awshrwrr.RecoveryType != "" {
9832 objectMap["recoveryType"] = awshrwrr.RecoveryType
9833 }
9834 if awshrwrr.SourceResourceID != nil {
9835 objectMap["sourceResourceId"] = awshrwrr.SourceResourceID
9836 }
9837 if awshrwrr.PropertyBag != nil {
9838 objectMap["propertyBag"] = awshrwrr.PropertyBag
9839 }
9840 if awshrwrr.TargetInfo != nil {
9841 objectMap["targetInfo"] = awshrwrr.TargetInfo
9842 }
9843 if awshrwrr.RecoveryMode != "" {
9844 objectMap["recoveryMode"] = awshrwrr.RecoveryMode
9845 }
9846 if awshrwrr.TargetVirtualMachineID != nil {
9847 objectMap["targetVirtualMachineId"] = awshrwrr.TargetVirtualMachineID
9848 }
9849 if awshrwrr.ObjectType != "" {
9850 objectMap["objectType"] = awshrwrr.ObjectType
9851 }
9852 return json.Marshal(objectMap)
9853 }
9854
9855
9856 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9857 return nil, false
9858 }
9859
9860
9861 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9862 return nil, false
9863 }
9864
9865
9866 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9867 return nil, false
9868 }
9869
9870
9871 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9872 return &awshrwrr, true
9873 }
9874
9875
9876 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9877 return nil, false
9878 }
9879
9880
9881 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9882 return nil, false
9883 }
9884
9885
9886 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9887 return nil, false
9888 }
9889
9890
9891 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9892 return &awshrwrr, true
9893 }
9894
9895
9896 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9897 return nil, false
9898 }
9899
9900
9901 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9902 return nil, false
9903 }
9904
9905
9906 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9907 return nil, false
9908 }
9909
9910
9911 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9912 return nil, false
9913 }
9914
9915
9916 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9917 return nil, false
9918 }
9919
9920
9921 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9922 return nil, false
9923 }
9924
9925
9926 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9927 return nil, false
9928 }
9929
9930
9931 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9932 return &awshrwrr, true
9933 }
9934
9935
9936 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9937 return nil, false
9938 }
9939
9940
9941 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9942 return nil, false
9943 }
9944
9945
9946 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9947 return nil, false
9948 }
9949
9950
9951 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9952 return nil, false
9953 }
9954
9955
9956 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9957 return &awshrwrr, true
9958 }
9959
9960
9961 type AzureWorkloadSQLAutoProtectionIntent struct {
9962
9963 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
9964
9965 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9966
9967 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9968
9969 ItemID *string `json:"itemId,omitempty"`
9970
9971 PolicyID *string `json:"policyId,omitempty"`
9972
9973 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
9974
9975 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
9976 }
9977
9978
9979 func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) {
9980 awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent
9981 objectMap := make(map[string]interface{})
9982 if awsapi.WorkloadItemType != "" {
9983 objectMap["workloadItemType"] = awsapi.WorkloadItemType
9984 }
9985 if awsapi.BackupManagementType != "" {
9986 objectMap["backupManagementType"] = awsapi.BackupManagementType
9987 }
9988 if awsapi.SourceResourceID != nil {
9989 objectMap["sourceResourceId"] = awsapi.SourceResourceID
9990 }
9991 if awsapi.ItemID != nil {
9992 objectMap["itemId"] = awsapi.ItemID
9993 }
9994 if awsapi.PolicyID != nil {
9995 objectMap["policyId"] = awsapi.PolicyID
9996 }
9997 if awsapi.ProtectionState != "" {
9998 objectMap["protectionState"] = awsapi.ProtectionState
9999 }
10000 if awsapi.ProtectionIntentItemType != "" {
10001 objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType
10002 }
10003 return json.Marshal(objectMap)
10004 }
10005
10006
10007 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
10008 return nil, false
10009 }
10010
10011
10012 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
10013 return &awsapi, true
10014 }
10015
10016
10017 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
10018 return nil, false
10019 }
10020
10021
10022 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
10023 return nil, false
10024 }
10025
10026
10027 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
10028 return nil, false
10029 }
10030
10031
10032 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
10033 return &awsapi, true
10034 }
10035
10036
10037 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
10038 return &awsapi, true
10039 }
10040
10041
10042 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
10043 return nil, false
10044 }
10045
10046
10047 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
10048 return &awsapi, true
10049 }
10050
10051
10052 type AzureWorkloadSQLPointInTimeRecoveryPoint struct {
10053
10054 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
10055
10056
10057
10058 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
10059
10060 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
10061
10062 Type RestorePointType `json:"type,omitempty"`
10063
10064 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
10065
10066 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
10067
10068 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
10069 }
10070
10071
10072 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
10073 awspitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint
10074 objectMap := make(map[string]interface{})
10075 if awspitrp.TimeRanges != nil {
10076 objectMap["timeRanges"] = awspitrp.TimeRanges
10077 }
10078 if awspitrp.ExtendedInfo != nil {
10079 objectMap["extendedInfo"] = awspitrp.ExtendedInfo
10080 }
10081 if awspitrp.RecoveryPointTimeInUTC != nil {
10082 objectMap["recoveryPointTimeInUTC"] = awspitrp.RecoveryPointTimeInUTC
10083 }
10084 if awspitrp.Type != "" {
10085 objectMap["type"] = awspitrp.Type
10086 }
10087 if awspitrp.RecoveryPointTierDetails != nil {
10088 objectMap["recoveryPointTierDetails"] = awspitrp.RecoveryPointTierDetails
10089 }
10090 if awspitrp.RecoveryPointMoveReadinessInfo != nil {
10091 objectMap["recoveryPointMoveReadinessInfo"] = awspitrp.RecoveryPointMoveReadinessInfo
10092 }
10093 if awspitrp.ObjectType != "" {
10094 objectMap["objectType"] = awspitrp.ObjectType
10095 }
10096 return json.Marshal(objectMap)
10097 }
10098
10099
10100 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
10101 return nil, false
10102 }
10103
10104
10105 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
10106 return nil, false
10107 }
10108
10109
10110 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
10111 return nil, false
10112 }
10113
10114
10115 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
10116 return nil, false
10117 }
10118
10119
10120 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
10121 return &awspitrp, true
10122 }
10123
10124
10125 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
10126 return nil, false
10127 }
10128
10129
10130 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
10131 return nil, false
10132 }
10133
10134
10135 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
10136 return &awspitrp, true
10137 }
10138
10139
10140 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
10141 return nil, false
10142 }
10143
10144
10145 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
10146 return &awspitrp, true
10147 }
10148
10149
10150 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
10151 return nil, false
10152 }
10153
10154
10155 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
10156 return nil, false
10157 }
10158
10159
10160 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
10161 return nil, false
10162 }
10163
10164
10165 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
10166 return &awspitrp, true
10167 }
10168
10169
10170
10171 type BasicAzureWorkloadSQLPointInTimeRestoreRequest interface {
10172 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
10173 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
10174 }
10175
10176
10177
10178 type AzureWorkloadSQLPointInTimeRestoreRequest struct {
10179
10180 PointInTime *date.Time `json:"pointInTime,omitempty"`
10181
10182 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10183
10184 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10185
10186 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10187
10188 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10189
10190 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10191
10192 PropertyBag map[string]*string `json:"propertyBag"`
10193
10194 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10195
10196 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10197
10198
10199 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10200
10201 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10202 }
10203
10204 func unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequest(body []byte) (BasicAzureWorkloadSQLPointInTimeRestoreRequest, error) {
10205 var m map[string]interface{}
10206 err := json.Unmarshal(body, &m)
10207 if err != nil {
10208 return nil, err
10209 }
10210
10211 switch m["objectType"] {
10212 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
10213 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
10214 err := json.Unmarshal(body, &awspitrwrr)
10215 return awspitrwrr, err
10216 default:
10217 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
10218 err := json.Unmarshal(body, &awspitrr)
10219 return awspitrr, err
10220 }
10221 }
10222 func unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLPointInTimeRestoreRequest, error) {
10223 var rawMessages []*json.RawMessage
10224 err := json.Unmarshal(body, &rawMessages)
10225 if err != nil {
10226 return nil, err
10227 }
10228
10229 awspitrrArray := make([]BasicAzureWorkloadSQLPointInTimeRestoreRequest, len(rawMessages))
10230
10231 for index, rawMessage := range rawMessages {
10232 awspitrr, err := unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequest(*rawMessage)
10233 if err != nil {
10234 return nil, err
10235 }
10236 awspitrrArray[index] = awspitrr
10237 }
10238 return awspitrrArray, nil
10239 }
10240
10241
10242 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
10243 awspitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest
10244 objectMap := make(map[string]interface{})
10245 if awspitrr.PointInTime != nil {
10246 objectMap["pointInTime"] = awspitrr.PointInTime
10247 }
10248 if awspitrr.ShouldUseAlternateTargetLocation != nil {
10249 objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation
10250 }
10251 if awspitrr.IsNonRecoverable != nil {
10252 objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable
10253 }
10254 if awspitrr.AlternateDirectoryPaths != nil {
10255 objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths
10256 }
10257 if awspitrr.RecoveryType != "" {
10258 objectMap["recoveryType"] = awspitrr.RecoveryType
10259 }
10260 if awspitrr.SourceResourceID != nil {
10261 objectMap["sourceResourceId"] = awspitrr.SourceResourceID
10262 }
10263 if awspitrr.PropertyBag != nil {
10264 objectMap["propertyBag"] = awspitrr.PropertyBag
10265 }
10266 if awspitrr.TargetInfo != nil {
10267 objectMap["targetInfo"] = awspitrr.TargetInfo
10268 }
10269 if awspitrr.RecoveryMode != "" {
10270 objectMap["recoveryMode"] = awspitrr.RecoveryMode
10271 }
10272 if awspitrr.TargetVirtualMachineID != nil {
10273 objectMap["targetVirtualMachineId"] = awspitrr.TargetVirtualMachineID
10274 }
10275 if awspitrr.ObjectType != "" {
10276 objectMap["objectType"] = awspitrr.ObjectType
10277 }
10278 return json.Marshal(objectMap)
10279 }
10280
10281
10282 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10283 return nil, false
10284 }
10285
10286
10287 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10288 return nil, false
10289 }
10290
10291
10292 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10293 return nil, false
10294 }
10295
10296
10297 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10298 return &awspitrr, true
10299 }
10300
10301
10302 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10303 return nil, false
10304 }
10305
10306
10307 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10308 return nil, false
10309 }
10310
10311
10312 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10313 return nil, false
10314 }
10315
10316
10317 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10318 return nil, false
10319 }
10320
10321
10322 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10323 return &awspitrr, true
10324 }
10325
10326
10327 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10328 return &awspitrr, true
10329 }
10330
10331
10332 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10333 return nil, false
10334 }
10335
10336
10337 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10338 return &awspitrr, true
10339 }
10340
10341
10342 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10343 return nil, false
10344 }
10345
10346
10347 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10348 return nil, false
10349 }
10350
10351
10352 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10353 return nil, false
10354 }
10355
10356
10357 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10358 return nil, false
10359 }
10360
10361
10362 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10363 return nil, false
10364 }
10365
10366
10367 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10368 return nil, false
10369 }
10370
10371
10372 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10373 return nil, false
10374 }
10375
10376
10377 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10378 return nil, false
10379 }
10380
10381
10382 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10383 return &awspitrr, true
10384 }
10385
10386
10387
10388 type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct {
10389
10390 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
10391
10392 PointInTime *date.Time `json:"pointInTime,omitempty"`
10393
10394 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10395
10396 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10397
10398 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10399
10400 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10401
10402 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10403
10404 PropertyBag map[string]*string `json:"propertyBag"`
10405
10406 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10407
10408 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10409
10410
10411 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10412
10413 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10414 }
10415
10416
10417 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
10418 awspitrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
10419 objectMap := make(map[string]interface{})
10420 if awspitrwrr.RecoveryPointRehydrationInfo != nil {
10421 objectMap["recoveryPointRehydrationInfo"] = awspitrwrr.RecoveryPointRehydrationInfo
10422 }
10423 if awspitrwrr.PointInTime != nil {
10424 objectMap["pointInTime"] = awspitrwrr.PointInTime
10425 }
10426 if awspitrwrr.ShouldUseAlternateTargetLocation != nil {
10427 objectMap["shouldUseAlternateTargetLocation"] = awspitrwrr.ShouldUseAlternateTargetLocation
10428 }
10429 if awspitrwrr.IsNonRecoverable != nil {
10430 objectMap["isNonRecoverable"] = awspitrwrr.IsNonRecoverable
10431 }
10432 if awspitrwrr.AlternateDirectoryPaths != nil {
10433 objectMap["alternateDirectoryPaths"] = awspitrwrr.AlternateDirectoryPaths
10434 }
10435 if awspitrwrr.RecoveryType != "" {
10436 objectMap["recoveryType"] = awspitrwrr.RecoveryType
10437 }
10438 if awspitrwrr.SourceResourceID != nil {
10439 objectMap["sourceResourceId"] = awspitrwrr.SourceResourceID
10440 }
10441 if awspitrwrr.PropertyBag != nil {
10442 objectMap["propertyBag"] = awspitrwrr.PropertyBag
10443 }
10444 if awspitrwrr.TargetInfo != nil {
10445 objectMap["targetInfo"] = awspitrwrr.TargetInfo
10446 }
10447 if awspitrwrr.RecoveryMode != "" {
10448 objectMap["recoveryMode"] = awspitrwrr.RecoveryMode
10449 }
10450 if awspitrwrr.TargetVirtualMachineID != nil {
10451 objectMap["targetVirtualMachineId"] = awspitrwrr.TargetVirtualMachineID
10452 }
10453 if awspitrwrr.ObjectType != "" {
10454 objectMap["objectType"] = awspitrwrr.ObjectType
10455 }
10456 return json.Marshal(objectMap)
10457 }
10458
10459
10460 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10461 return nil, false
10462 }
10463
10464
10465 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10466 return nil, false
10467 }
10468
10469
10470 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10471 return nil, false
10472 }
10473
10474
10475 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10476 return &awspitrwrr, true
10477 }
10478
10479
10480 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10481 return nil, false
10482 }
10483
10484
10485 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10486 return nil, false
10487 }
10488
10489
10490 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10491 return nil, false
10492 }
10493
10494
10495 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10496 return nil, false
10497 }
10498
10499
10500 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10501 return nil, false
10502 }
10503
10504
10505 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10506 return &awspitrwrr, true
10507 }
10508
10509
10510 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10511 return nil, false
10512 }
10513
10514
10515 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10516 return &awspitrwrr, true
10517 }
10518
10519
10520 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10521 return nil, false
10522 }
10523
10524
10525 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10526 return nil, false
10527 }
10528
10529
10530 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10531 return nil, false
10532 }
10533
10534
10535 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10536 return nil, false
10537 }
10538
10539
10540 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10541 return &awspitrwrr, true
10542 }
10543
10544
10545 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10546 return nil, false
10547 }
10548
10549
10550 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10551 return nil, false
10552 }
10553
10554
10555 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10556 return nil, false
10557 }
10558
10559
10560 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10561 return &awspitrwrr, true
10562 }
10563
10564
10565
10566 type BasicAzureWorkloadSQLRecoveryPoint interface {
10567 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
10568 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
10569 }
10570
10571
10572
10573 type AzureWorkloadSQLRecoveryPoint struct {
10574
10575
10576
10577 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
10578
10579 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
10580
10581 Type RestorePointType `json:"type,omitempty"`
10582
10583 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
10584
10585 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
10586
10587 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
10588 }
10589
10590 func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) {
10591 var m map[string]interface{}
10592 err := json.Unmarshal(body, &m)
10593 if err != nil {
10594 return nil, err
10595 }
10596
10597 switch m["objectType"] {
10598 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
10599 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
10600 err := json.Unmarshal(body, &awspitrp)
10601 return awspitrp, err
10602 default:
10603 var awsrp AzureWorkloadSQLRecoveryPoint
10604 err := json.Unmarshal(body, &awsrp)
10605 return awsrp, err
10606 }
10607 }
10608 func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) {
10609 var rawMessages []*json.RawMessage
10610 err := json.Unmarshal(body, &rawMessages)
10611 if err != nil {
10612 return nil, err
10613 }
10614
10615 awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages))
10616
10617 for index, rawMessage := range rawMessages {
10618 awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage)
10619 if err != nil {
10620 return nil, err
10621 }
10622 awsrpArray[index] = awsrp
10623 }
10624 return awsrpArray, nil
10625 }
10626
10627
10628 func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) {
10629 awsrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint
10630 objectMap := make(map[string]interface{})
10631 if awsrp.ExtendedInfo != nil {
10632 objectMap["extendedInfo"] = awsrp.ExtendedInfo
10633 }
10634 if awsrp.RecoveryPointTimeInUTC != nil {
10635 objectMap["recoveryPointTimeInUTC"] = awsrp.RecoveryPointTimeInUTC
10636 }
10637 if awsrp.Type != "" {
10638 objectMap["type"] = awsrp.Type
10639 }
10640 if awsrp.RecoveryPointTierDetails != nil {
10641 objectMap["recoveryPointTierDetails"] = awsrp.RecoveryPointTierDetails
10642 }
10643 if awsrp.RecoveryPointMoveReadinessInfo != nil {
10644 objectMap["recoveryPointMoveReadinessInfo"] = awsrp.RecoveryPointMoveReadinessInfo
10645 }
10646 if awsrp.ObjectType != "" {
10647 objectMap["objectType"] = awsrp.ObjectType
10648 }
10649 return json.Marshal(objectMap)
10650 }
10651
10652
10653 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
10654 return nil, false
10655 }
10656
10657
10658 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
10659 return nil, false
10660 }
10661
10662
10663 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
10664 return nil, false
10665 }
10666
10667
10668 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
10669 return nil, false
10670 }
10671
10672
10673 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
10674 return &awsrp, true
10675 }
10676
10677
10678 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
10679 return nil, false
10680 }
10681
10682
10683 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
10684 return nil, false
10685 }
10686
10687
10688 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
10689 return nil, false
10690 }
10691
10692
10693 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
10694 return &awsrp, true
10695 }
10696
10697
10698 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
10699 return &awsrp, true
10700 }
10701
10702
10703 func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
10704 return nil, false
10705 }
10706
10707
10708 func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
10709 return nil, false
10710 }
10711
10712
10713 func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
10714 return nil, false
10715 }
10716
10717
10718 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
10719 return &awsrp, true
10720 }
10721
10722
10723 type AzureWorkloadSQLRecoveryPointExtendedInfo struct {
10724
10725 DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"`
10726
10727 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
10728 }
10729
10730
10731 type BasicAzureWorkloadSQLRestoreRequest interface {
10732 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
10733 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
10734 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
10735 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
10736 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
10737 }
10738
10739
10740 type AzureWorkloadSQLRestoreRequest struct {
10741
10742 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10743
10744 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10745
10746 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10747
10748 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10749
10750 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10751
10752 PropertyBag map[string]*string `json:"propertyBag"`
10753
10754 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10755
10756 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10757
10758
10759 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10760
10761 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10762 }
10763
10764 func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) {
10765 var m map[string]interface{}
10766 err := json.Unmarshal(body, &m)
10767 if err != nil {
10768 return nil, err
10769 }
10770
10771 switch m["objectType"] {
10772 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
10773 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
10774 err := json.Unmarshal(body, &awspitrr)
10775 return awspitrr, err
10776 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
10777 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
10778 err := json.Unmarshal(body, &awspitrwrr)
10779 return awspitrwrr, err
10780 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
10781 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
10782 err := json.Unmarshal(body, &awsrwrr)
10783 return awsrwrr, err
10784 default:
10785 var awsrr AzureWorkloadSQLRestoreRequest
10786 err := json.Unmarshal(body, &awsrr)
10787 return awsrr, err
10788 }
10789 }
10790 func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) {
10791 var rawMessages []*json.RawMessage
10792 err := json.Unmarshal(body, &rawMessages)
10793 if err != nil {
10794 return nil, err
10795 }
10796
10797 awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages))
10798
10799 for index, rawMessage := range rawMessages {
10800 awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage)
10801 if err != nil {
10802 return nil, err
10803 }
10804 awsrrArray[index] = awsrr
10805 }
10806 return awsrrArray, nil
10807 }
10808
10809
10810 func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) {
10811 awsrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest
10812 objectMap := make(map[string]interface{})
10813 if awsrr.ShouldUseAlternateTargetLocation != nil {
10814 objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation
10815 }
10816 if awsrr.IsNonRecoverable != nil {
10817 objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable
10818 }
10819 if awsrr.AlternateDirectoryPaths != nil {
10820 objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths
10821 }
10822 if awsrr.RecoveryType != "" {
10823 objectMap["recoveryType"] = awsrr.RecoveryType
10824 }
10825 if awsrr.SourceResourceID != nil {
10826 objectMap["sourceResourceId"] = awsrr.SourceResourceID
10827 }
10828 if awsrr.PropertyBag != nil {
10829 objectMap["propertyBag"] = awsrr.PropertyBag
10830 }
10831 if awsrr.TargetInfo != nil {
10832 objectMap["targetInfo"] = awsrr.TargetInfo
10833 }
10834 if awsrr.RecoveryMode != "" {
10835 objectMap["recoveryMode"] = awsrr.RecoveryMode
10836 }
10837 if awsrr.TargetVirtualMachineID != nil {
10838 objectMap["targetVirtualMachineId"] = awsrr.TargetVirtualMachineID
10839 }
10840 if awsrr.ObjectType != "" {
10841 objectMap["objectType"] = awsrr.ObjectType
10842 }
10843 return json.Marshal(objectMap)
10844 }
10845
10846
10847 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10848 return nil, false
10849 }
10850
10851
10852 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10853 return nil, false
10854 }
10855
10856
10857 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10858 return nil, false
10859 }
10860
10861
10862 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10863 return &awsrr, true
10864 }
10865
10866
10867 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10868 return nil, false
10869 }
10870
10871
10872 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10873 return nil, false
10874 }
10875
10876
10877 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10878 return nil, false
10879 }
10880
10881
10882 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10883 return nil, false
10884 }
10885
10886
10887 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10888 return nil, false
10889 }
10890
10891
10892 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10893 return nil, false
10894 }
10895
10896
10897 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10898 return &awsrr, true
10899 }
10900
10901
10902 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10903 return &awsrr, true
10904 }
10905
10906
10907 func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10908 return nil, false
10909 }
10910
10911
10912 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10913 return nil, false
10914 }
10915
10916
10917 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10918 return nil, false
10919 }
10920
10921
10922 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10923 return nil, false
10924 }
10925
10926
10927 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10928 return nil, false
10929 }
10930
10931
10932 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10933 return nil, false
10934 }
10935
10936
10937 func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10938 return nil, false
10939 }
10940
10941
10942 func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10943 return nil, false
10944 }
10945
10946
10947 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10948 return &awsrr, true
10949 }
10950
10951
10952
10953 type AzureWorkloadSQLRestoreWithRehydrateRequest struct {
10954
10955 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
10956
10957 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10958
10959 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10960
10961 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10962
10963 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10964
10965 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10966
10967 PropertyBag map[string]*string `json:"propertyBag"`
10968
10969 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10970
10971 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10972
10973
10974 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10975
10976 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10977 }
10978
10979
10980 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
10981 awsrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest
10982 objectMap := make(map[string]interface{})
10983 if awsrwrr.RecoveryPointRehydrationInfo != nil {
10984 objectMap["recoveryPointRehydrationInfo"] = awsrwrr.RecoveryPointRehydrationInfo
10985 }
10986 if awsrwrr.ShouldUseAlternateTargetLocation != nil {
10987 objectMap["shouldUseAlternateTargetLocation"] = awsrwrr.ShouldUseAlternateTargetLocation
10988 }
10989 if awsrwrr.IsNonRecoverable != nil {
10990 objectMap["isNonRecoverable"] = awsrwrr.IsNonRecoverable
10991 }
10992 if awsrwrr.AlternateDirectoryPaths != nil {
10993 objectMap["alternateDirectoryPaths"] = awsrwrr.AlternateDirectoryPaths
10994 }
10995 if awsrwrr.RecoveryType != "" {
10996 objectMap["recoveryType"] = awsrwrr.RecoveryType
10997 }
10998 if awsrwrr.SourceResourceID != nil {
10999 objectMap["sourceResourceId"] = awsrwrr.SourceResourceID
11000 }
11001 if awsrwrr.PropertyBag != nil {
11002 objectMap["propertyBag"] = awsrwrr.PropertyBag
11003 }
11004 if awsrwrr.TargetInfo != nil {
11005 objectMap["targetInfo"] = awsrwrr.TargetInfo
11006 }
11007 if awsrwrr.RecoveryMode != "" {
11008 objectMap["recoveryMode"] = awsrwrr.RecoveryMode
11009 }
11010 if awsrwrr.TargetVirtualMachineID != nil {
11011 objectMap["targetVirtualMachineId"] = awsrwrr.TargetVirtualMachineID
11012 }
11013 if awsrwrr.ObjectType != "" {
11014 objectMap["objectType"] = awsrwrr.ObjectType
11015 }
11016 return json.Marshal(objectMap)
11017 }
11018
11019
11020 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
11021 return nil, false
11022 }
11023
11024
11025 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
11026 return nil, false
11027 }
11028
11029
11030 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
11031 return nil, false
11032 }
11033
11034
11035 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
11036 return &awsrwrr, true
11037 }
11038
11039
11040 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
11041 return nil, false
11042 }
11043
11044
11045 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
11046 return nil, false
11047 }
11048
11049
11050 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
11051 return nil, false
11052 }
11053
11054
11055 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
11056 return nil, false
11057 }
11058
11059
11060 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
11061 return nil, false
11062 }
11063
11064
11065 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
11066 return nil, false
11067 }
11068
11069
11070 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
11071 return nil, false
11072 }
11073
11074
11075 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
11076 return &awsrwrr, true
11077 }
11078
11079
11080 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
11081 return nil, false
11082 }
11083
11084
11085 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
11086 return nil, false
11087 }
11088
11089
11090 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
11091 return nil, false
11092 }
11093
11094
11095 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
11096 return nil, false
11097 }
11098
11099
11100 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
11101 return nil, false
11102 }
11103
11104
11105 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
11106 return &awsrwrr, true
11107 }
11108
11109
11110 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
11111 return nil, false
11112 }
11113
11114
11115 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
11116 return nil, false
11117 }
11118
11119
11120 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
11121 return &awsrwrr, true
11122 }
11123
11124
11125 type BEKDetails struct {
11126
11127 SecretURL *string `json:"secretUrl,omitempty"`
11128
11129 SecretVaultID *string `json:"secretVaultId,omitempty"`
11130
11131 SecretData *string `json:"secretData,omitempty"`
11132 }
11133
11134
11135 type BMSBackupEngineQueryObject struct {
11136
11137 Expand *string `json:"expand,omitempty"`
11138 }
11139
11140
11141 type BMSBackupEnginesQueryObject struct {
11142
11143 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11144
11145 FriendlyName *string `json:"friendlyName,omitempty"`
11146
11147 Expand *string `json:"expand,omitempty"`
11148 }
11149
11150
11151 type BMSBackupSummariesQueryObject struct {
11152
11153 Type Type `json:"type,omitempty"`
11154 }
11155
11156
11157 type BMSContainerQueryObject struct {
11158
11159 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11160
11161 ContainerType ContainerType `json:"containerType,omitempty"`
11162
11163 BackupEngineName *string `json:"backupEngineName,omitempty"`
11164
11165 FabricName *string `json:"fabricName,omitempty"`
11166
11167 Status *string `json:"status,omitempty"`
11168
11169 FriendlyName *string `json:"friendlyName,omitempty"`
11170 }
11171
11172
11173 type BMSContainersInquiryQueryObject struct {
11174
11175 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11176
11177 WorkloadType WorkloadType `json:"workloadType,omitempty"`
11178 }
11179
11180
11181 type BMSPOQueryObject struct {
11182
11183 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11184
11185 WorkloadType WorkloadType `json:"workloadType,omitempty"`
11186
11187 ContainerName *string `json:"containerName,omitempty"`
11188
11189 Status *string `json:"status,omitempty"`
11190
11191 FriendlyName *string `json:"friendlyName,omitempty"`
11192 }
11193
11194
11195
11196 type BMSPrepareDataMoveFuture struct {
11197 azure.FutureAPI
11198
11199
11200 Result func(BaseClient) (autorest.Response, error)
11201 }
11202
11203
11204 func (future *BMSPrepareDataMoveFuture) UnmarshalJSON(body []byte) error {
11205 var azFuture azure.Future
11206 if err := json.Unmarshal(body, &azFuture); err != nil {
11207 return err
11208 }
11209 future.FutureAPI = &azFuture
11210 future.Result = future.result
11211 return nil
11212 }
11213
11214
11215 func (future *BMSPrepareDataMoveFuture) result(client BaseClient) (ar autorest.Response, err error) {
11216 var done bool
11217 done, err = future.DoneWithContext(context.Background(), client)
11218 if err != nil {
11219 err = autorest.NewErrorWithError(err, "backup.BMSPrepareDataMoveFuture", "Result", future.Response(), "Polling failure")
11220 return
11221 }
11222 if !done {
11223 ar.Response = future.Response()
11224 err = azure.NewAsyncOpIncompleteError("backup.BMSPrepareDataMoveFuture")
11225 return
11226 }
11227 ar.Response = future.Response()
11228 return
11229 }
11230
11231
11232 type BMSRefreshContainersQueryObject struct {
11233
11234 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11235 }
11236
11237
11238 type BMSRPQueryObject struct {
11239
11240 StartDate *date.Time `json:"startDate,omitempty"`
11241
11242 EndDate *date.Time `json:"endDate,omitempty"`
11243
11244 RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"`
11245
11246 ExtendedInfo *bool `json:"extendedInfo,omitempty"`
11247
11248 MoveReadyRPOnly *bool `json:"moveReadyRPOnly,omitempty"`
11249 }
11250
11251
11252
11253 type BMSTriggerDataMoveFuture struct {
11254 azure.FutureAPI
11255
11256
11257 Result func(BaseClient) (autorest.Response, error)
11258 }
11259
11260
11261 func (future *BMSTriggerDataMoveFuture) UnmarshalJSON(body []byte) error {
11262 var azFuture azure.Future
11263 if err := json.Unmarshal(body, &azFuture); err != nil {
11264 return err
11265 }
11266 future.FutureAPI = &azFuture
11267 future.Result = future.result
11268 return nil
11269 }
11270
11271
11272 func (future *BMSTriggerDataMoveFuture) result(client BaseClient) (ar autorest.Response, err error) {
11273 var done bool
11274 done, err = future.DoneWithContext(context.Background(), client)
11275 if err != nil {
11276 err = autorest.NewErrorWithError(err, "backup.BMSTriggerDataMoveFuture", "Result", future.Response(), "Polling failure")
11277 return
11278 }
11279 if !done {
11280 ar.Response = future.Response()
11281 err = azure.NewAsyncOpIncompleteError("backup.BMSTriggerDataMoveFuture")
11282 return
11283 }
11284 ar.Response = future.Response()
11285 return
11286 }
11287
11288
11289 type BMSWorkloadItemQueryObject struct {
11290
11291 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11292
11293 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
11294
11295 WorkloadType WorkloadType `json:"workloadType,omitempty"`
11296
11297 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
11298 }
11299
11300
11301 type ClientDiscoveryDisplay struct {
11302
11303 Provider *string `json:"provider,omitempty"`
11304
11305 Resource *string `json:"resource,omitempty"`
11306
11307 Operation *string `json:"operation,omitempty"`
11308
11309 Description *string `json:"description,omitempty"`
11310 }
11311
11312
11313
11314 type ClientDiscoveryForLogSpecification struct {
11315
11316 Name *string `json:"name,omitempty"`
11317
11318 DisplayName *string `json:"displayName,omitempty"`
11319
11320 BlobDuration *string `json:"blobDuration,omitempty"`
11321 }
11322
11323
11324 type ClientDiscoveryForProperties struct {
11325
11326 ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"`
11327 }
11328
11329
11330
11331 type ClientDiscoveryForServiceSpecification struct {
11332
11333 LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"`
11334 }
11335
11336
11337 type ClientDiscoveryResponse struct {
11338 autorest.Response `json:"-"`
11339
11340 Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"`
11341
11342 NextLink *string `json:"nextLink,omitempty"`
11343 }
11344
11345
11346
11347 type ClientDiscoveryResponseIterator struct {
11348 i int
11349 page ClientDiscoveryResponsePage
11350 }
11351
11352
11353
11354 func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) {
11355 if tracing.IsEnabled() {
11356 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext")
11357 defer func() {
11358 sc := -1
11359 if iter.Response().Response.Response != nil {
11360 sc = iter.Response().Response.Response.StatusCode
11361 }
11362 tracing.EndSpan(ctx, sc, err)
11363 }()
11364 }
11365 iter.i++
11366 if iter.i < len(iter.page.Values()) {
11367 return nil
11368 }
11369 err = iter.page.NextWithContext(ctx)
11370 if err != nil {
11371 iter.i--
11372 return err
11373 }
11374 iter.i = 0
11375 return nil
11376 }
11377
11378
11379
11380
11381 func (iter *ClientDiscoveryResponseIterator) Next() error {
11382 return iter.NextWithContext(context.Background())
11383 }
11384
11385
11386 func (iter ClientDiscoveryResponseIterator) NotDone() bool {
11387 return iter.page.NotDone() && iter.i < len(iter.page.Values())
11388 }
11389
11390
11391 func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse {
11392 return iter.page.Response()
11393 }
11394
11395
11396
11397 func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI {
11398 if !iter.page.NotDone() {
11399 return ClientDiscoveryValueForSingleAPI{}
11400 }
11401 return iter.page.Values()[iter.i]
11402 }
11403
11404
11405 func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator {
11406 return ClientDiscoveryResponseIterator{page: page}
11407 }
11408
11409
11410 func (cdr ClientDiscoveryResponse) IsEmpty() bool {
11411 return cdr.Value == nil || len(*cdr.Value) == 0
11412 }
11413
11414
11415 func (cdr ClientDiscoveryResponse) hasNextLink() bool {
11416 return cdr.NextLink != nil && len(*cdr.NextLink) != 0
11417 }
11418
11419
11420
11421 func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) {
11422 if !cdr.hasNextLink() {
11423 return nil, nil
11424 }
11425 return autorest.Prepare((&http.Request{}).WithContext(ctx),
11426 autorest.AsJSON(),
11427 autorest.AsGet(),
11428 autorest.WithBaseURL(to.String(cdr.NextLink)))
11429 }
11430
11431
11432 type ClientDiscoveryResponsePage struct {
11433 fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)
11434 cdr ClientDiscoveryResponse
11435 }
11436
11437
11438
11439 func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) {
11440 if tracing.IsEnabled() {
11441 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext")
11442 defer func() {
11443 sc := -1
11444 if page.Response().Response.Response != nil {
11445 sc = page.Response().Response.Response.StatusCode
11446 }
11447 tracing.EndSpan(ctx, sc, err)
11448 }()
11449 }
11450 for {
11451 next, err := page.fn(ctx, page.cdr)
11452 if err != nil {
11453 return err
11454 }
11455 page.cdr = next
11456 if !next.hasNextLink() || !next.IsEmpty() {
11457 break
11458 }
11459 }
11460 return nil
11461 }
11462
11463
11464
11465
11466 func (page *ClientDiscoveryResponsePage) Next() error {
11467 return page.NextWithContext(context.Background())
11468 }
11469
11470
11471 func (page ClientDiscoveryResponsePage) NotDone() bool {
11472 return !page.cdr.IsEmpty()
11473 }
11474
11475
11476 func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse {
11477 return page.cdr
11478 }
11479
11480
11481 func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI {
11482 if page.cdr.IsEmpty() {
11483 return nil
11484 }
11485 return *page.cdr.Value
11486 }
11487
11488
11489 func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage {
11490 return ClientDiscoveryResponsePage{
11491 fn: getNextPage,
11492 cdr: cur,
11493 }
11494 }
11495
11496
11497 type ClientDiscoveryValueForSingleAPI struct {
11498
11499 Name *string `json:"name,omitempty"`
11500
11501 Display *ClientDiscoveryDisplay `json:"display,omitempty"`
11502
11503 Origin *string `json:"origin,omitempty"`
11504
11505 Properties *ClientDiscoveryForProperties `json:"properties,omitempty"`
11506 }
11507
11508
11509 type ClientScriptForConnect struct {
11510
11511 ScriptContent *string `json:"scriptContent,omitempty"`
11512
11513 ScriptExtension *string `json:"scriptExtension,omitempty"`
11514
11515 OsType *string `json:"osType,omitempty"`
11516
11517 URL *string `json:"url,omitempty"`
11518
11519
11520 ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"`
11521 }
11522
11523
11524 type CloudError struct {
11525
11526 Error *CloudErrorBody `json:"error,omitempty"`
11527 }
11528
11529
11530 type CloudErrorBody struct {
11531
11532 Code *string `json:"code,omitempty"`
11533
11534 Message *string `json:"message,omitempty"`
11535
11536 Target *string `json:"target,omitempty"`
11537
11538 Details *[]CloudErrorBody `json:"details,omitempty"`
11539
11540 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
11541 }
11542
11543
11544 func (ceb CloudErrorBody) MarshalJSON() ([]byte, error) {
11545 objectMap := make(map[string]interface{})
11546 return json.Marshal(objectMap)
11547 }
11548
11549
11550 type ContainerIdentityInfo struct {
11551
11552 UniqueName *string `json:"uniqueName,omitempty"`
11553
11554 AadTenantID *string `json:"aadTenantId,omitempty"`
11555
11556 ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
11557
11558 Audience *string `json:"audience,omitempty"`
11559 }
11560
11561
11562 type DailyRetentionFormat struct {
11563
11564 DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"`
11565 }
11566
11567
11568 type DailyRetentionSchedule struct {
11569
11570 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
11571
11572 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
11573 }
11574
11575
11576 type DailySchedule struct {
11577
11578 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"`
11579 }
11580
11581
11582 type Day struct {
11583
11584 Date *int32 `json:"date,omitempty"`
11585
11586 IsLast *bool `json:"isLast,omitempty"`
11587 }
11588
11589
11590 type DiskExclusionProperties struct {
11591
11592 DiskLunList *[]int32 `json:"diskLunList,omitempty"`
11593
11594 IsInclusionList *bool `json:"isInclusionList,omitempty"`
11595 }
11596
11597
11598 type DiskInformation struct {
11599 Lun *int32 `json:"lun,omitempty"`
11600 Name *string `json:"name,omitempty"`
11601 }
11602
11603
11604 type DistributedNodesInfo struct {
11605
11606 NodeName *string `json:"nodeName,omitempty"`
11607
11608
11609 Status *string `json:"status,omitempty"`
11610
11611 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
11612 }
11613
11614
11615 type DpmBackupEngine struct {
11616
11617 FriendlyName *string `json:"friendlyName,omitempty"`
11618
11619 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11620
11621 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11622
11623 BackupEngineState *string `json:"backupEngineState,omitempty"`
11624
11625 HealthStatus *string `json:"healthStatus,omitempty"`
11626
11627 CanReRegister *bool `json:"canReRegister,omitempty"`
11628
11629 BackupEngineID *string `json:"backupEngineId,omitempty"`
11630
11631 DpmVersion *string `json:"dpmVersion,omitempty"`
11632
11633 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
11634
11635 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
11636
11637 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
11638
11639 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
11640
11641 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
11642 }
11643
11644
11645 func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) {
11646 dbe.BackupEngineType = EngineTypeBackupEngineTypeDpmBackupEngine
11647 objectMap := make(map[string]interface{})
11648 if dbe.FriendlyName != nil {
11649 objectMap["friendlyName"] = dbe.FriendlyName
11650 }
11651 if dbe.BackupManagementType != "" {
11652 objectMap["backupManagementType"] = dbe.BackupManagementType
11653 }
11654 if dbe.RegistrationStatus != nil {
11655 objectMap["registrationStatus"] = dbe.RegistrationStatus
11656 }
11657 if dbe.BackupEngineState != nil {
11658 objectMap["backupEngineState"] = dbe.BackupEngineState
11659 }
11660 if dbe.HealthStatus != nil {
11661 objectMap["healthStatus"] = dbe.HealthStatus
11662 }
11663 if dbe.CanReRegister != nil {
11664 objectMap["canReRegister"] = dbe.CanReRegister
11665 }
11666 if dbe.BackupEngineID != nil {
11667 objectMap["backupEngineId"] = dbe.BackupEngineID
11668 }
11669 if dbe.DpmVersion != nil {
11670 objectMap["dpmVersion"] = dbe.DpmVersion
11671 }
11672 if dbe.AzureBackupAgentVersion != nil {
11673 objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion
11674 }
11675 if dbe.IsAzureBackupAgentUpgradeAvailable != nil {
11676 objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable
11677 }
11678 if dbe.IsDpmUpgradeAvailable != nil {
11679 objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable
11680 }
11681 if dbe.ExtendedInfo != nil {
11682 objectMap["extendedInfo"] = dbe.ExtendedInfo
11683 }
11684 if dbe.BackupEngineType != "" {
11685 objectMap["backupEngineType"] = dbe.BackupEngineType
11686 }
11687 return json.Marshal(objectMap)
11688 }
11689
11690
11691 func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
11692 return nil, false
11693 }
11694
11695
11696 func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
11697 return &dbe, true
11698 }
11699
11700
11701 func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) {
11702 return nil, false
11703 }
11704
11705
11706 func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
11707 return &dbe, true
11708 }
11709
11710
11711 type BasicDpmContainer interface {
11712 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
11713 AsDpmContainer() (*DpmContainer, bool)
11714 }
11715
11716
11717 type DpmContainer struct {
11718
11719 CanReRegister *bool `json:"canReRegister,omitempty"`
11720
11721 ContainerID *string `json:"containerId,omitempty"`
11722
11723 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
11724
11725 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
11726
11727 DpmServers *[]string `json:"dpmServers,omitempty"`
11728
11729 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
11730
11731 ProtectionStatus *string `json:"protectionStatus,omitempty"`
11732
11733 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
11734
11735 FriendlyName *string `json:"friendlyName,omitempty"`
11736
11737 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11738
11739 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11740
11741 HealthStatus *string `json:"healthStatus,omitempty"`
11742
11743 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
11744
11745 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
11746 }
11747
11748 func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) {
11749 var m map[string]interface{}
11750 err := json.Unmarshal(body, &m)
11751 if err != nil {
11752 return nil, err
11753 }
11754
11755 switch m["containerType"] {
11756 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer):
11757 var absc AzureBackupServerContainer
11758 err := json.Unmarshal(body, &absc)
11759 return absc, err
11760 default:
11761 var dc DpmContainer
11762 err := json.Unmarshal(body, &dc)
11763 return dc, err
11764 }
11765 }
11766 func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) {
11767 var rawMessages []*json.RawMessage
11768 err := json.Unmarshal(body, &rawMessages)
11769 if err != nil {
11770 return nil, err
11771 }
11772
11773 dcArray := make([]BasicDpmContainer, len(rawMessages))
11774
11775 for index, rawMessage := range rawMessages {
11776 dc, err := unmarshalBasicDpmContainer(*rawMessage)
11777 if err != nil {
11778 return nil, err
11779 }
11780 dcArray[index] = dc
11781 }
11782 return dcArray, nil
11783 }
11784
11785
11786 func (dc DpmContainer) MarshalJSON() ([]byte, error) {
11787 dc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeDPMContainer
11788 objectMap := make(map[string]interface{})
11789 if dc.CanReRegister != nil {
11790 objectMap["canReRegister"] = dc.CanReRegister
11791 }
11792 if dc.ContainerID != nil {
11793 objectMap["containerId"] = dc.ContainerID
11794 }
11795 if dc.ProtectedItemCount != nil {
11796 objectMap["protectedItemCount"] = dc.ProtectedItemCount
11797 }
11798 if dc.DpmAgentVersion != nil {
11799 objectMap["dpmAgentVersion"] = dc.DpmAgentVersion
11800 }
11801 if dc.DpmServers != nil {
11802 objectMap["dpmServers"] = dc.DpmServers
11803 }
11804 if dc.UpgradeAvailable != nil {
11805 objectMap["upgradeAvailable"] = dc.UpgradeAvailable
11806 }
11807 if dc.ProtectionStatus != nil {
11808 objectMap["protectionStatus"] = dc.ProtectionStatus
11809 }
11810 if dc.ExtendedInfo != nil {
11811 objectMap["extendedInfo"] = dc.ExtendedInfo
11812 }
11813 if dc.FriendlyName != nil {
11814 objectMap["friendlyName"] = dc.FriendlyName
11815 }
11816 if dc.BackupManagementType != "" {
11817 objectMap["backupManagementType"] = dc.BackupManagementType
11818 }
11819 if dc.RegistrationStatus != nil {
11820 objectMap["registrationStatus"] = dc.RegistrationStatus
11821 }
11822 if dc.HealthStatus != nil {
11823 objectMap["healthStatus"] = dc.HealthStatus
11824 }
11825 if dc.ProtectableObjectType != nil {
11826 objectMap["protectableObjectType"] = dc.ProtectableObjectType
11827 }
11828 if dc.ContainerType != "" {
11829 objectMap["containerType"] = dc.ContainerType
11830 }
11831 return json.Marshal(objectMap)
11832 }
11833
11834
11835 func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
11836 return nil, false
11837 }
11838
11839
11840 func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
11841 return nil, false
11842 }
11843
11844
11845 func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
11846 return nil, false
11847 }
11848
11849
11850 func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
11851 return nil, false
11852 }
11853
11854
11855 func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
11856 return nil, false
11857 }
11858
11859
11860 func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
11861 return nil, false
11862 }
11863
11864
11865 func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
11866 return nil, false
11867 }
11868
11869
11870 func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
11871 return nil, false
11872 }
11873
11874
11875 func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
11876 return nil, false
11877 }
11878
11879
11880 func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) {
11881 return &dc, true
11882 }
11883
11884
11885 func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
11886 return &dc, true
11887 }
11888
11889
11890 func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) {
11891 return nil, false
11892 }
11893
11894
11895 func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
11896 return nil, false
11897 }
11898
11899
11900 func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
11901 return nil, false
11902 }
11903
11904
11905 func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) {
11906 return nil, false
11907 }
11908
11909
11910 func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
11911 return nil, false
11912 }
11913
11914
11915 func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
11916 return &dc, true
11917 }
11918
11919
11920 type DPMContainerExtendedInfo struct {
11921
11922 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
11923 }
11924
11925
11926 type DpmErrorInfo struct {
11927
11928 ErrorString *string `json:"errorString,omitempty"`
11929
11930 Recommendations *[]string `json:"recommendations,omitempty"`
11931 }
11932
11933
11934 type DpmJob struct {
11935
11936 Duration *string `json:"duration,omitempty"`
11937
11938 DpmServerName *string `json:"dpmServerName,omitempty"`
11939
11940 ContainerName *string `json:"containerName,omitempty"`
11941
11942 ContainerType *string `json:"containerType,omitempty"`
11943
11944 WorkloadType *string `json:"workloadType,omitempty"`
11945
11946 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
11947
11948 ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"`
11949
11950 ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"`
11951
11952 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
11953
11954 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11955
11956 Operation *string `json:"operation,omitempty"`
11957
11958 Status *string `json:"status,omitempty"`
11959
11960 StartTime *date.Time `json:"startTime,omitempty"`
11961
11962 EndTime *date.Time `json:"endTime,omitempty"`
11963
11964 ActivityID *string `json:"activityId,omitempty"`
11965
11966 JobType JobType `json:"jobType,omitempty"`
11967 }
11968
11969
11970 func (dj DpmJob) MarshalJSON() ([]byte, error) {
11971 dj.JobType = JobTypeDpmJob
11972 objectMap := make(map[string]interface{})
11973 if dj.Duration != nil {
11974 objectMap["duration"] = dj.Duration
11975 }
11976 if dj.DpmServerName != nil {
11977 objectMap["dpmServerName"] = dj.DpmServerName
11978 }
11979 if dj.ContainerName != nil {
11980 objectMap["containerName"] = dj.ContainerName
11981 }
11982 if dj.ContainerType != nil {
11983 objectMap["containerType"] = dj.ContainerType
11984 }
11985 if dj.WorkloadType != nil {
11986 objectMap["workloadType"] = dj.WorkloadType
11987 }
11988 if dj.ActionsInfo != nil {
11989 objectMap["actionsInfo"] = dj.ActionsInfo
11990 }
11991 if dj.ErrorDetails != nil {
11992 objectMap["errorDetails"] = dj.ErrorDetails
11993 }
11994 if dj.ExtendedInfo != nil {
11995 objectMap["extendedInfo"] = dj.ExtendedInfo
11996 }
11997 if dj.EntityFriendlyName != nil {
11998 objectMap["entityFriendlyName"] = dj.EntityFriendlyName
11999 }
12000 if dj.BackupManagementType != "" {
12001 objectMap["backupManagementType"] = dj.BackupManagementType
12002 }
12003 if dj.Operation != nil {
12004 objectMap["operation"] = dj.Operation
12005 }
12006 if dj.Status != nil {
12007 objectMap["status"] = dj.Status
12008 }
12009 if dj.StartTime != nil {
12010 objectMap["startTime"] = dj.StartTime
12011 }
12012 if dj.EndTime != nil {
12013 objectMap["endTime"] = dj.EndTime
12014 }
12015 if dj.ActivityID != nil {
12016 objectMap["activityId"] = dj.ActivityID
12017 }
12018 if dj.JobType != "" {
12019 objectMap["jobType"] = dj.JobType
12020 }
12021 return json.Marshal(objectMap)
12022 }
12023
12024
12025 func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
12026 return nil, false
12027 }
12028
12029
12030 func (dj DpmJob) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
12031 return nil, false
12032 }
12033
12034
12035 func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
12036 return nil, false
12037 }
12038
12039
12040 func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
12041 return nil, false
12042 }
12043
12044
12045 func (dj DpmJob) AsDpmJob() (*DpmJob, bool) {
12046 return &dj, true
12047 }
12048
12049
12050 func (dj DpmJob) AsMabJob() (*MabJob, bool) {
12051 return nil, false
12052 }
12053
12054
12055 func (dj DpmJob) AsVaultJob() (*VaultJob, bool) {
12056 return nil, false
12057 }
12058
12059
12060 func (dj DpmJob) AsJob() (*Job, bool) {
12061 return nil, false
12062 }
12063
12064
12065 func (dj DpmJob) AsBasicJob() (BasicJob, bool) {
12066 return &dj, true
12067 }
12068
12069
12070 type DpmJobExtendedInfo struct {
12071
12072 TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"`
12073
12074 PropertyBag map[string]*string `json:"propertyBag"`
12075
12076 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
12077 }
12078
12079
12080 func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) {
12081 objectMap := make(map[string]interface{})
12082 if djei.TasksList != nil {
12083 objectMap["tasksList"] = djei.TasksList
12084 }
12085 if djei.PropertyBag != nil {
12086 objectMap["propertyBag"] = djei.PropertyBag
12087 }
12088 if djei.DynamicErrorMessage != nil {
12089 objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage
12090 }
12091 return json.Marshal(objectMap)
12092 }
12093
12094
12095 type DpmJobTaskDetails struct {
12096
12097 TaskID *string `json:"taskId,omitempty"`
12098
12099 StartTime *date.Time `json:"startTime,omitempty"`
12100
12101 EndTime *date.Time `json:"endTime,omitempty"`
12102
12103 Duration *string `json:"duration,omitempty"`
12104
12105 Status *string `json:"status,omitempty"`
12106 }
12107
12108
12109 type DPMProtectedItem struct {
12110
12111 FriendlyName *string `json:"friendlyName,omitempty"`
12112
12113 BackupEngineName *string `json:"backupEngineName,omitempty"`
12114
12115 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
12116
12117 ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
12118
12119 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12120
12121 WorkloadType DataSourceType `json:"workloadType,omitempty"`
12122
12123 ContainerName *string `json:"containerName,omitempty"`
12124
12125 SourceResourceID *string `json:"sourceResourceId,omitempty"`
12126
12127 PolicyID *string `json:"policyId,omitempty"`
12128
12129 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
12130
12131 BackupSetName *string `json:"backupSetName,omitempty"`
12132
12133 CreateMode CreateMode `json:"createMode,omitempty"`
12134
12135 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
12136
12137 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
12138
12139 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
12140
12141 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
12142
12143 IsRehydrate *bool `json:"isRehydrate,omitempty"`
12144
12145 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
12146
12147 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
12148
12149 PolicyName *string `json:"policyName,omitempty"`
12150
12151 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
12152 }
12153
12154
12155 func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) {
12156 dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem
12157 objectMap := make(map[string]interface{})
12158 if dpi.FriendlyName != nil {
12159 objectMap["friendlyName"] = dpi.FriendlyName
12160 }
12161 if dpi.BackupEngineName != nil {
12162 objectMap["backupEngineName"] = dpi.BackupEngineName
12163 }
12164 if dpi.ProtectionState != "" {
12165 objectMap["protectionState"] = dpi.ProtectionState
12166 }
12167 if dpi.ExtendedInfo != nil {
12168 objectMap["extendedInfo"] = dpi.ExtendedInfo
12169 }
12170 if dpi.BackupManagementType != "" {
12171 objectMap["backupManagementType"] = dpi.BackupManagementType
12172 }
12173 if dpi.WorkloadType != "" {
12174 objectMap["workloadType"] = dpi.WorkloadType
12175 }
12176 if dpi.ContainerName != nil {
12177 objectMap["containerName"] = dpi.ContainerName
12178 }
12179 if dpi.SourceResourceID != nil {
12180 objectMap["sourceResourceId"] = dpi.SourceResourceID
12181 }
12182 if dpi.PolicyID != nil {
12183 objectMap["policyId"] = dpi.PolicyID
12184 }
12185 if dpi.LastRecoveryPoint != nil {
12186 objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint
12187 }
12188 if dpi.BackupSetName != nil {
12189 objectMap["backupSetName"] = dpi.BackupSetName
12190 }
12191 if dpi.CreateMode != "" {
12192 objectMap["createMode"] = dpi.CreateMode
12193 }
12194 if dpi.DeferredDeleteTimeInUTC != nil {
12195 objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC
12196 }
12197 if dpi.IsScheduledForDeferredDelete != nil {
12198 objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete
12199 }
12200 if dpi.DeferredDeleteTimeRemaining != nil {
12201 objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining
12202 }
12203 if dpi.IsDeferredDeleteScheduleUpcoming != nil {
12204 objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming
12205 }
12206 if dpi.IsRehydrate != nil {
12207 objectMap["isRehydrate"] = dpi.IsRehydrate
12208 }
12209 if dpi.ResourceGuardOperationRequests != nil {
12210 objectMap["resourceGuardOperationRequests"] = dpi.ResourceGuardOperationRequests
12211 }
12212 if dpi.IsArchiveEnabled != nil {
12213 objectMap["isArchiveEnabled"] = dpi.IsArchiveEnabled
12214 }
12215 if dpi.PolicyName != nil {
12216 objectMap["policyName"] = dpi.PolicyName
12217 }
12218 if dpi.ProtectedItemType != "" {
12219 objectMap["protectedItemType"] = dpi.ProtectedItemType
12220 }
12221 return json.Marshal(objectMap)
12222 }
12223
12224
12225 func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
12226 return nil, false
12227 }
12228
12229
12230 func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
12231 return nil, false
12232 }
12233
12234
12235 func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
12236 return nil, false
12237 }
12238
12239
12240 func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
12241 return nil, false
12242 }
12243
12244
12245 func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
12246 return nil, false
12247 }
12248
12249
12250 func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
12251 return nil, false
12252 }
12253
12254
12255 func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
12256 return nil, false
12257 }
12258
12259
12260 func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
12261 return nil, false
12262 }
12263
12264
12265 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
12266 return nil, false
12267 }
12268
12269
12270 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
12271 return nil, false
12272 }
12273
12274
12275 func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
12276 return nil, false
12277 }
12278
12279
12280 func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
12281 return &dpi, true
12282 }
12283
12284
12285 func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
12286 return nil, false
12287 }
12288
12289
12290 func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
12291 return nil, false
12292 }
12293
12294
12295 func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
12296 return nil, false
12297 }
12298
12299
12300 func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
12301 return &dpi, true
12302 }
12303
12304
12305 type DPMProtectedItemExtendedInfo struct {
12306
12307 ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"`
12308
12309 Protected *bool `json:"protected,omitempty"`
12310
12311 IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"`
12312
12313 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
12314
12315 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
12316
12317 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
12318
12319 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
12320
12321 OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"`
12322
12323 OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"`
12324
12325 OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"`
12326
12327 IsCollocated *bool `json:"isCollocated,omitempty"`
12328
12329 ProtectionGroupName *string `json:"protectionGroupName,omitempty"`
12330
12331 DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"`
12332
12333 TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"`
12334 }
12335
12336
12337 func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
12338 objectMap := make(map[string]interface{})
12339 if dpiei.ProtectableObjectLoadPath != nil {
12340 objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath
12341 }
12342 if dpiei.Protected != nil {
12343 objectMap["protected"] = dpiei.Protected
12344 }
12345 if dpiei.IsPresentOnCloud != nil {
12346 objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud
12347 }
12348 if dpiei.LastBackupStatus != nil {
12349 objectMap["lastBackupStatus"] = dpiei.LastBackupStatus
12350 }
12351 if dpiei.LastRefreshedAt != nil {
12352 objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt
12353 }
12354 if dpiei.OldestRecoveryPoint != nil {
12355 objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint
12356 }
12357 if dpiei.RecoveryPointCount != nil {
12358 objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount
12359 }
12360 if dpiei.OnPremiseOldestRecoveryPoint != nil {
12361 objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint
12362 }
12363 if dpiei.OnPremiseLatestRecoveryPoint != nil {
12364 objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint
12365 }
12366 if dpiei.OnPremiseRecoveryPointCount != nil {
12367 objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount
12368 }
12369 if dpiei.IsCollocated != nil {
12370 objectMap["isCollocated"] = dpiei.IsCollocated
12371 }
12372 if dpiei.ProtectionGroupName != nil {
12373 objectMap["protectionGroupName"] = dpiei.ProtectionGroupName
12374 }
12375 if dpiei.DiskStorageUsedInBytes != nil {
12376 objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes
12377 }
12378 if dpiei.TotalDiskStorageSizeInBytes != nil {
12379 objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes
12380 }
12381 return json.Marshal(objectMap)
12382 }
12383
12384
12385 type EncryptionDetails struct {
12386
12387 EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"`
12388
12389 KekURL *string `json:"kekUrl,omitempty"`
12390
12391 SecretKeyURL *string `json:"secretKeyUrl,omitempty"`
12392
12393 KekVaultID *string `json:"kekVaultId,omitempty"`
12394
12395 SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"`
12396 }
12397
12398
12399 type BasicEngineBase interface {
12400 AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool)
12401 AsDpmBackupEngine() (*DpmBackupEngine, bool)
12402 AsEngineBase() (*EngineBase, bool)
12403 }
12404
12405
12406 type EngineBase struct {
12407
12408 FriendlyName *string `json:"friendlyName,omitempty"`
12409
12410 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12411
12412 RegistrationStatus *string `json:"registrationStatus,omitempty"`
12413
12414 BackupEngineState *string `json:"backupEngineState,omitempty"`
12415
12416 HealthStatus *string `json:"healthStatus,omitempty"`
12417
12418 CanReRegister *bool `json:"canReRegister,omitempty"`
12419
12420 BackupEngineID *string `json:"backupEngineId,omitempty"`
12421
12422 DpmVersion *string `json:"dpmVersion,omitempty"`
12423
12424 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
12425
12426 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
12427
12428 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
12429
12430 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
12431
12432 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
12433 }
12434
12435 func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) {
12436 var m map[string]interface{}
12437 err := json.Unmarshal(body, &m)
12438 if err != nil {
12439 return nil, err
12440 }
12441
12442 switch m["backupEngineType"] {
12443 case string(EngineTypeBackupEngineTypeAzureBackupServerEngine):
12444 var abse AzureBackupServerEngine
12445 err := json.Unmarshal(body, &abse)
12446 return abse, err
12447 case string(EngineTypeBackupEngineTypeDpmBackupEngine):
12448 var dbe DpmBackupEngine
12449 err := json.Unmarshal(body, &dbe)
12450 return dbe, err
12451 default:
12452 var eb EngineBase
12453 err := json.Unmarshal(body, &eb)
12454 return eb, err
12455 }
12456 }
12457 func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) {
12458 var rawMessages []*json.RawMessage
12459 err := json.Unmarshal(body, &rawMessages)
12460 if err != nil {
12461 return nil, err
12462 }
12463
12464 ebArray := make([]BasicEngineBase, len(rawMessages))
12465
12466 for index, rawMessage := range rawMessages {
12467 eb, err := unmarshalBasicEngineBase(*rawMessage)
12468 if err != nil {
12469 return nil, err
12470 }
12471 ebArray[index] = eb
12472 }
12473 return ebArray, nil
12474 }
12475
12476
12477 func (eb EngineBase) MarshalJSON() ([]byte, error) {
12478 eb.BackupEngineType = EngineTypeBackupEngineTypeBackupEngineBase
12479 objectMap := make(map[string]interface{})
12480 if eb.FriendlyName != nil {
12481 objectMap["friendlyName"] = eb.FriendlyName
12482 }
12483 if eb.BackupManagementType != "" {
12484 objectMap["backupManagementType"] = eb.BackupManagementType
12485 }
12486 if eb.RegistrationStatus != nil {
12487 objectMap["registrationStatus"] = eb.RegistrationStatus
12488 }
12489 if eb.BackupEngineState != nil {
12490 objectMap["backupEngineState"] = eb.BackupEngineState
12491 }
12492 if eb.HealthStatus != nil {
12493 objectMap["healthStatus"] = eb.HealthStatus
12494 }
12495 if eb.CanReRegister != nil {
12496 objectMap["canReRegister"] = eb.CanReRegister
12497 }
12498 if eb.BackupEngineID != nil {
12499 objectMap["backupEngineId"] = eb.BackupEngineID
12500 }
12501 if eb.DpmVersion != nil {
12502 objectMap["dpmVersion"] = eb.DpmVersion
12503 }
12504 if eb.AzureBackupAgentVersion != nil {
12505 objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion
12506 }
12507 if eb.IsAzureBackupAgentUpgradeAvailable != nil {
12508 objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable
12509 }
12510 if eb.IsDpmUpgradeAvailable != nil {
12511 objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable
12512 }
12513 if eb.ExtendedInfo != nil {
12514 objectMap["extendedInfo"] = eb.ExtendedInfo
12515 }
12516 if eb.BackupEngineType != "" {
12517 objectMap["backupEngineType"] = eb.BackupEngineType
12518 }
12519 return json.Marshal(objectMap)
12520 }
12521
12522
12523 func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
12524 return nil, false
12525 }
12526
12527
12528 func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
12529 return nil, false
12530 }
12531
12532
12533 func (eb EngineBase) AsEngineBase() (*EngineBase, bool) {
12534 return &eb, true
12535 }
12536
12537
12538 func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) {
12539 return &eb, true
12540 }
12541
12542
12543
12544 type EngineBaseResource struct {
12545 autorest.Response `json:"-"`
12546
12547 Properties BasicEngineBase `json:"properties,omitempty"`
12548
12549 ID *string `json:"id,omitempty"`
12550
12551 Name *string `json:"name,omitempty"`
12552
12553 Type *string `json:"type,omitempty"`
12554
12555 Location *string `json:"location,omitempty"`
12556
12557 Tags map[string]*string `json:"tags"`
12558
12559 ETag *string `json:"eTag,omitempty"`
12560 }
12561
12562
12563 func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) {
12564 objectMap := make(map[string]interface{})
12565 objectMap["properties"] = ebr.Properties
12566 if ebr.Location != nil {
12567 objectMap["location"] = ebr.Location
12568 }
12569 if ebr.Tags != nil {
12570 objectMap["tags"] = ebr.Tags
12571 }
12572 if ebr.ETag != nil {
12573 objectMap["eTag"] = ebr.ETag
12574 }
12575 return json.Marshal(objectMap)
12576 }
12577
12578
12579 func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error {
12580 var m map[string]*json.RawMessage
12581 err := json.Unmarshal(body, &m)
12582 if err != nil {
12583 return err
12584 }
12585 for k, v := range m {
12586 switch k {
12587 case "properties":
12588 if v != nil {
12589 properties, err := unmarshalBasicEngineBase(*v)
12590 if err != nil {
12591 return err
12592 }
12593 ebr.Properties = properties
12594 }
12595 case "id":
12596 if v != nil {
12597 var ID string
12598 err = json.Unmarshal(*v, &ID)
12599 if err != nil {
12600 return err
12601 }
12602 ebr.ID = &ID
12603 }
12604 case "name":
12605 if v != nil {
12606 var name string
12607 err = json.Unmarshal(*v, &name)
12608 if err != nil {
12609 return err
12610 }
12611 ebr.Name = &name
12612 }
12613 case "type":
12614 if v != nil {
12615 var typeVar string
12616 err = json.Unmarshal(*v, &typeVar)
12617 if err != nil {
12618 return err
12619 }
12620 ebr.Type = &typeVar
12621 }
12622 case "location":
12623 if v != nil {
12624 var location string
12625 err = json.Unmarshal(*v, &location)
12626 if err != nil {
12627 return err
12628 }
12629 ebr.Location = &location
12630 }
12631 case "tags":
12632 if v != nil {
12633 var tags map[string]*string
12634 err = json.Unmarshal(*v, &tags)
12635 if err != nil {
12636 return err
12637 }
12638 ebr.Tags = tags
12639 }
12640 case "eTag":
12641 if v != nil {
12642 var eTag string
12643 err = json.Unmarshal(*v, &eTag)
12644 if err != nil {
12645 return err
12646 }
12647 ebr.ETag = &eTag
12648 }
12649 }
12650 }
12651
12652 return nil
12653 }
12654
12655
12656 type EngineBaseResourceList struct {
12657 autorest.Response `json:"-"`
12658
12659 Value *[]EngineBaseResource `json:"value,omitempty"`
12660
12661 NextLink *string `json:"nextLink,omitempty"`
12662 }
12663
12664
12665 type EngineBaseResourceListIterator struct {
12666 i int
12667 page EngineBaseResourceListPage
12668 }
12669
12670
12671
12672 func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) {
12673 if tracing.IsEnabled() {
12674 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext")
12675 defer func() {
12676 sc := -1
12677 if iter.Response().Response.Response != nil {
12678 sc = iter.Response().Response.Response.StatusCode
12679 }
12680 tracing.EndSpan(ctx, sc, err)
12681 }()
12682 }
12683 iter.i++
12684 if iter.i < len(iter.page.Values()) {
12685 return nil
12686 }
12687 err = iter.page.NextWithContext(ctx)
12688 if err != nil {
12689 iter.i--
12690 return err
12691 }
12692 iter.i = 0
12693 return nil
12694 }
12695
12696
12697
12698
12699 func (iter *EngineBaseResourceListIterator) Next() error {
12700 return iter.NextWithContext(context.Background())
12701 }
12702
12703
12704 func (iter EngineBaseResourceListIterator) NotDone() bool {
12705 return iter.page.NotDone() && iter.i < len(iter.page.Values())
12706 }
12707
12708
12709 func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList {
12710 return iter.page.Response()
12711 }
12712
12713
12714
12715 func (iter EngineBaseResourceListIterator) Value() EngineBaseResource {
12716 if !iter.page.NotDone() {
12717 return EngineBaseResource{}
12718 }
12719 return iter.page.Values()[iter.i]
12720 }
12721
12722
12723 func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator {
12724 return EngineBaseResourceListIterator{page: page}
12725 }
12726
12727
12728 func (ebrl EngineBaseResourceList) IsEmpty() bool {
12729 return ebrl.Value == nil || len(*ebrl.Value) == 0
12730 }
12731
12732
12733 func (ebrl EngineBaseResourceList) hasNextLink() bool {
12734 return ebrl.NextLink != nil && len(*ebrl.NextLink) != 0
12735 }
12736
12737
12738
12739 func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) {
12740 if !ebrl.hasNextLink() {
12741 return nil, nil
12742 }
12743 return autorest.Prepare((&http.Request{}).WithContext(ctx),
12744 autorest.AsJSON(),
12745 autorest.AsGet(),
12746 autorest.WithBaseURL(to.String(ebrl.NextLink)))
12747 }
12748
12749
12750 type EngineBaseResourceListPage struct {
12751 fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)
12752 ebrl EngineBaseResourceList
12753 }
12754
12755
12756
12757 func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) {
12758 if tracing.IsEnabled() {
12759 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext")
12760 defer func() {
12761 sc := -1
12762 if page.Response().Response.Response != nil {
12763 sc = page.Response().Response.Response.StatusCode
12764 }
12765 tracing.EndSpan(ctx, sc, err)
12766 }()
12767 }
12768 for {
12769 next, err := page.fn(ctx, page.ebrl)
12770 if err != nil {
12771 return err
12772 }
12773 page.ebrl = next
12774 if !next.hasNextLink() || !next.IsEmpty() {
12775 break
12776 }
12777 }
12778 return nil
12779 }
12780
12781
12782
12783
12784 func (page *EngineBaseResourceListPage) Next() error {
12785 return page.NextWithContext(context.Background())
12786 }
12787
12788
12789 func (page EngineBaseResourceListPage) NotDone() bool {
12790 return !page.ebrl.IsEmpty()
12791 }
12792
12793
12794 func (page EngineBaseResourceListPage) Response() EngineBaseResourceList {
12795 return page.ebrl
12796 }
12797
12798
12799 func (page EngineBaseResourceListPage) Values() []EngineBaseResource {
12800 if page.ebrl.IsEmpty() {
12801 return nil
12802 }
12803 return *page.ebrl.Value
12804 }
12805
12806
12807 func NewEngineBaseResourceListPage(cur EngineBaseResourceList, getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage {
12808 return EngineBaseResourceListPage{
12809 fn: getNextPage,
12810 ebrl: cur,
12811 }
12812 }
12813
12814
12815 type EngineExtendedInfo struct {
12816
12817 DatabaseName *string `json:"databaseName,omitempty"`
12818
12819 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
12820
12821 ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"`
12822
12823 DiskCount *int32 `json:"diskCount,omitempty"`
12824
12825 UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"`
12826
12827 AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"`
12828
12829 RefreshedAt *date.Time `json:"refreshedAt,omitempty"`
12830
12831 AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"`
12832 }
12833
12834
12835 type ErrorAdditionalInfo struct {
12836
12837 Type *string `json:"type,omitempty"`
12838
12839 Info interface{} `json:"info,omitempty"`
12840 }
12841
12842
12843 func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
12844 objectMap := make(map[string]interface{})
12845 return json.Marshal(objectMap)
12846 }
12847
12848
12849 type ErrorDetail struct {
12850
12851 Code *string `json:"code,omitempty"`
12852
12853 Message *string `json:"message,omitempty"`
12854
12855 Recommendations *[]string `json:"recommendations,omitempty"`
12856 }
12857
12858
12859 func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
12860 objectMap := make(map[string]interface{})
12861 return json.Marshal(objectMap)
12862 }
12863
12864
12865 type ExportJobsOperationResultInfo struct {
12866
12867 BlobURL *string `json:"blobUrl,omitempty"`
12868
12869 BlobSasKey *string `json:"blobSasKey,omitempty"`
12870
12871 ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"`
12872
12873 ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"`
12874
12875 ObjectType ObjectType `json:"objectType,omitempty"`
12876 }
12877
12878
12879 func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) {
12880 ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo
12881 objectMap := make(map[string]interface{})
12882 if ejori.BlobURL != nil {
12883 objectMap["blobUrl"] = ejori.BlobURL
12884 }
12885 if ejori.BlobSasKey != nil {
12886 objectMap["blobSasKey"] = ejori.BlobSasKey
12887 }
12888 if ejori.ExcelFileBlobURL != nil {
12889 objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL
12890 }
12891 if ejori.ExcelFileBlobSasKey != nil {
12892 objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey
12893 }
12894 if ejori.ObjectType != "" {
12895 objectMap["objectType"] = ejori.ObjectType
12896 }
12897 return json.Marshal(objectMap)
12898 }
12899
12900
12901 func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
12902 return &ejori, true
12903 }
12904
12905
12906 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
12907 return nil, false
12908 }
12909
12910
12911 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
12912 return nil, false
12913 }
12914
12915
12916 func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
12917 return &ejori, true
12918 }
12919
12920
12921 type ExtendedProperties struct {
12922
12923 DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"`
12924
12925 LinuxVMApplicationName *string `json:"linuxVmApplicationName,omitempty"`
12926 }
12927
12928
12929 type BasicFeatureSupportRequest interface {
12930 AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool)
12931 AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool)
12932 AsFeatureSupportRequest() (*FeatureSupportRequest, bool)
12933 }
12934
12935
12936 type FeatureSupportRequest struct {
12937
12938 FeatureType FeatureType `json:"featureType,omitempty"`
12939 }
12940
12941 func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) {
12942 var m map[string]interface{}
12943 err := json.Unmarshal(body, &m)
12944 if err != nil {
12945 return nil, err
12946 }
12947
12948 switch m["featureType"] {
12949 case string(FeatureTypeAzureBackupGoals):
12950 var abgfsr AzureBackupGoalFeatureSupportRequest
12951 err := json.Unmarshal(body, &abgfsr)
12952 return abgfsr, err
12953 case string(FeatureTypeAzureVMResourceBackup):
12954 var avrfsr AzureVMResourceFeatureSupportRequest
12955 err := json.Unmarshal(body, &avrfsr)
12956 return avrfsr, err
12957 default:
12958 var fsr FeatureSupportRequest
12959 err := json.Unmarshal(body, &fsr)
12960 return fsr, err
12961 }
12962 }
12963 func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) {
12964 var rawMessages []*json.RawMessage
12965 err := json.Unmarshal(body, &rawMessages)
12966 if err != nil {
12967 return nil, err
12968 }
12969
12970 fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages))
12971
12972 for index, rawMessage := range rawMessages {
12973 fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage)
12974 if err != nil {
12975 return nil, err
12976 }
12977 fsrArray[index] = fsr
12978 }
12979 return fsrArray, nil
12980 }
12981
12982
12983 func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) {
12984 fsr.FeatureType = FeatureTypeFeatureSupportRequest
12985 objectMap := make(map[string]interface{})
12986 if fsr.FeatureType != "" {
12987 objectMap["featureType"] = fsr.FeatureType
12988 }
12989 return json.Marshal(objectMap)
12990 }
12991
12992
12993 func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
12994 return nil, false
12995 }
12996
12997
12998 func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
12999 return nil, false
13000 }
13001
13002
13003 func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
13004 return &fsr, true
13005 }
13006
13007
13008 func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
13009 return &fsr, true
13010 }
13011
13012
13013 type GenericContainer struct {
13014
13015 FabricName *string `json:"fabricName,omitempty"`
13016
13017 ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"`
13018
13019 FriendlyName *string `json:"friendlyName,omitempty"`
13020
13021 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13022
13023 RegistrationStatus *string `json:"registrationStatus,omitempty"`
13024
13025 HealthStatus *string `json:"healthStatus,omitempty"`
13026
13027 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
13028
13029 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
13030 }
13031
13032
13033 func (gc GenericContainer) MarshalJSON() ([]byte, error) {
13034 gc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeGenericContainer
13035 objectMap := make(map[string]interface{})
13036 if gc.FabricName != nil {
13037 objectMap["fabricName"] = gc.FabricName
13038 }
13039 if gc.ExtendedInformation != nil {
13040 objectMap["extendedInformation"] = gc.ExtendedInformation
13041 }
13042 if gc.FriendlyName != nil {
13043 objectMap["friendlyName"] = gc.FriendlyName
13044 }
13045 if gc.BackupManagementType != "" {
13046 objectMap["backupManagementType"] = gc.BackupManagementType
13047 }
13048 if gc.RegistrationStatus != nil {
13049 objectMap["registrationStatus"] = gc.RegistrationStatus
13050 }
13051 if gc.HealthStatus != nil {
13052 objectMap["healthStatus"] = gc.HealthStatus
13053 }
13054 if gc.ProtectableObjectType != nil {
13055 objectMap["protectableObjectType"] = gc.ProtectableObjectType
13056 }
13057 if gc.ContainerType != "" {
13058 objectMap["containerType"] = gc.ContainerType
13059 }
13060 return json.Marshal(objectMap)
13061 }
13062
13063
13064 func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
13065 return nil, false
13066 }
13067
13068
13069 func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
13070 return nil, false
13071 }
13072
13073
13074 func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
13075 return nil, false
13076 }
13077
13078
13079 func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
13080 return nil, false
13081 }
13082
13083
13084 func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
13085 return nil, false
13086 }
13087
13088
13089 func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
13090 return nil, false
13091 }
13092
13093
13094 func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
13095 return nil, false
13096 }
13097
13098
13099 func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
13100 return nil, false
13101 }
13102
13103
13104 func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
13105 return nil, false
13106 }
13107
13108
13109 func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) {
13110 return nil, false
13111 }
13112
13113
13114 func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13115 return nil, false
13116 }
13117
13118
13119 func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) {
13120 return &gc, true
13121 }
13122
13123
13124 func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13125 return nil, false
13126 }
13127
13128
13129 func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13130 return nil, false
13131 }
13132
13133
13134 func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) {
13135 return nil, false
13136 }
13137
13138
13139 func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13140 return nil, false
13141 }
13142
13143
13144 func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13145 return &gc, true
13146 }
13147
13148
13149 type GenericContainerExtendedInfo struct {
13150
13151 RawCertData *string `json:"rawCertData,omitempty"`
13152
13153 ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"`
13154
13155 ServiceEndpoints map[string]*string `json:"serviceEndpoints"`
13156 }
13157
13158
13159 func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) {
13160 objectMap := make(map[string]interface{})
13161 if gcei.RawCertData != nil {
13162 objectMap["rawCertData"] = gcei.RawCertData
13163 }
13164 if gcei.ContainerIdentityInfo != nil {
13165 objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo
13166 }
13167 if gcei.ServiceEndpoints != nil {
13168 objectMap["serviceEndpoints"] = gcei.ServiceEndpoints
13169 }
13170 return json.Marshal(objectMap)
13171 }
13172
13173
13174 type GenericProtectedItem struct {
13175
13176 FriendlyName *string `json:"friendlyName,omitempty"`
13177
13178 PolicyState *string `json:"policyState,omitempty"`
13179
13180 ProtectionState ProtectionState `json:"protectionState,omitempty"`
13181
13182 ProtectedItemID *int64 `json:"protectedItemId,omitempty"`
13183
13184 SourceAssociations map[string]*string `json:"sourceAssociations"`
13185
13186 FabricName *string `json:"fabricName,omitempty"`
13187
13188 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13189
13190 WorkloadType DataSourceType `json:"workloadType,omitempty"`
13191
13192 ContainerName *string `json:"containerName,omitempty"`
13193
13194 SourceResourceID *string `json:"sourceResourceId,omitempty"`
13195
13196 PolicyID *string `json:"policyId,omitempty"`
13197
13198 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
13199
13200 BackupSetName *string `json:"backupSetName,omitempty"`
13201
13202 CreateMode CreateMode `json:"createMode,omitempty"`
13203
13204 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
13205
13206 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
13207
13208 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
13209
13210 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
13211
13212 IsRehydrate *bool `json:"isRehydrate,omitempty"`
13213
13214 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
13215
13216 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
13217
13218 PolicyName *string `json:"policyName,omitempty"`
13219
13220 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
13221 }
13222
13223
13224 func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) {
13225 gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem
13226 objectMap := make(map[string]interface{})
13227 if gpi.FriendlyName != nil {
13228 objectMap["friendlyName"] = gpi.FriendlyName
13229 }
13230 if gpi.PolicyState != nil {
13231 objectMap["policyState"] = gpi.PolicyState
13232 }
13233 if gpi.ProtectionState != "" {
13234 objectMap["protectionState"] = gpi.ProtectionState
13235 }
13236 if gpi.ProtectedItemID != nil {
13237 objectMap["protectedItemId"] = gpi.ProtectedItemID
13238 }
13239 if gpi.SourceAssociations != nil {
13240 objectMap["sourceAssociations"] = gpi.SourceAssociations
13241 }
13242 if gpi.FabricName != nil {
13243 objectMap["fabricName"] = gpi.FabricName
13244 }
13245 if gpi.BackupManagementType != "" {
13246 objectMap["backupManagementType"] = gpi.BackupManagementType
13247 }
13248 if gpi.WorkloadType != "" {
13249 objectMap["workloadType"] = gpi.WorkloadType
13250 }
13251 if gpi.ContainerName != nil {
13252 objectMap["containerName"] = gpi.ContainerName
13253 }
13254 if gpi.SourceResourceID != nil {
13255 objectMap["sourceResourceId"] = gpi.SourceResourceID
13256 }
13257 if gpi.PolicyID != nil {
13258 objectMap["policyId"] = gpi.PolicyID
13259 }
13260 if gpi.LastRecoveryPoint != nil {
13261 objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint
13262 }
13263 if gpi.BackupSetName != nil {
13264 objectMap["backupSetName"] = gpi.BackupSetName
13265 }
13266 if gpi.CreateMode != "" {
13267 objectMap["createMode"] = gpi.CreateMode
13268 }
13269 if gpi.DeferredDeleteTimeInUTC != nil {
13270 objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC
13271 }
13272 if gpi.IsScheduledForDeferredDelete != nil {
13273 objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete
13274 }
13275 if gpi.DeferredDeleteTimeRemaining != nil {
13276 objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining
13277 }
13278 if gpi.IsDeferredDeleteScheduleUpcoming != nil {
13279 objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming
13280 }
13281 if gpi.IsRehydrate != nil {
13282 objectMap["isRehydrate"] = gpi.IsRehydrate
13283 }
13284 if gpi.ResourceGuardOperationRequests != nil {
13285 objectMap["resourceGuardOperationRequests"] = gpi.ResourceGuardOperationRequests
13286 }
13287 if gpi.IsArchiveEnabled != nil {
13288 objectMap["isArchiveEnabled"] = gpi.IsArchiveEnabled
13289 }
13290 if gpi.PolicyName != nil {
13291 objectMap["policyName"] = gpi.PolicyName
13292 }
13293 if gpi.ProtectedItemType != "" {
13294 objectMap["protectedItemType"] = gpi.ProtectedItemType
13295 }
13296 return json.Marshal(objectMap)
13297 }
13298
13299
13300 func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
13301 return nil, false
13302 }
13303
13304
13305 func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
13306 return nil, false
13307 }
13308
13309
13310 func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
13311 return nil, false
13312 }
13313
13314
13315 func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
13316 return nil, false
13317 }
13318
13319
13320 func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
13321 return nil, false
13322 }
13323
13324
13325 func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
13326 return nil, false
13327 }
13328
13329
13330 func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
13331 return nil, false
13332 }
13333
13334
13335 func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
13336 return nil, false
13337 }
13338
13339
13340 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
13341 return nil, false
13342 }
13343
13344
13345 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
13346 return nil, false
13347 }
13348
13349
13350 func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
13351 return nil, false
13352 }
13353
13354
13355 func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
13356 return nil, false
13357 }
13358
13359
13360 func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
13361 return &gpi, true
13362 }
13363
13364
13365 func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
13366 return nil, false
13367 }
13368
13369
13370 func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
13371 return nil, false
13372 }
13373
13374
13375 func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
13376 return &gpi, true
13377 }
13378
13379
13380 type GenericProtectionPolicy struct {
13381
13382 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
13383
13384 TimeZone *string `json:"timeZone,omitempty"`
13385
13386 FabricName *string `json:"fabricName,omitempty"`
13387
13388 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
13389
13390 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
13391
13392 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
13393 }
13394
13395
13396 func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) {
13397 gpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy
13398 objectMap := make(map[string]interface{})
13399 if gpp.SubProtectionPolicy != nil {
13400 objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy
13401 }
13402 if gpp.TimeZone != nil {
13403 objectMap["timeZone"] = gpp.TimeZone
13404 }
13405 if gpp.FabricName != nil {
13406 objectMap["fabricName"] = gpp.FabricName
13407 }
13408 if gpp.ProtectedItemsCount != nil {
13409 objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount
13410 }
13411 if gpp.ResourceGuardOperationRequests != nil {
13412 objectMap["resourceGuardOperationRequests"] = gpp.ResourceGuardOperationRequests
13413 }
13414 if gpp.BackupManagementType != "" {
13415 objectMap["backupManagementType"] = gpp.BackupManagementType
13416 }
13417 return json.Marshal(objectMap)
13418 }
13419
13420
13421 func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
13422 return nil, false
13423 }
13424
13425
13426 func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
13427 return nil, false
13428 }
13429
13430
13431 func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
13432 return nil, false
13433 }
13434
13435
13436 func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
13437 return nil, false
13438 }
13439
13440
13441 func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
13442 return &gpp, true
13443 }
13444
13445
13446 func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
13447 return nil, false
13448 }
13449
13450
13451 func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
13452 return nil, false
13453 }
13454
13455
13456 func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
13457 return &gpp, true
13458 }
13459
13460
13461 type GenericRecoveryPoint struct {
13462
13463 FriendlyName *string `json:"friendlyName,omitempty"`
13464
13465 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
13466
13467 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
13468
13469 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
13470
13471 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
13472 }
13473
13474
13475 func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) {
13476 grp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint
13477 objectMap := make(map[string]interface{})
13478 if grp.FriendlyName != nil {
13479 objectMap["friendlyName"] = grp.FriendlyName
13480 }
13481 if grp.RecoveryPointType != nil {
13482 objectMap["recoveryPointType"] = grp.RecoveryPointType
13483 }
13484 if grp.RecoveryPointTime != nil {
13485 objectMap["recoveryPointTime"] = grp.RecoveryPointTime
13486 }
13487 if grp.RecoveryPointAdditionalInfo != nil {
13488 objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo
13489 }
13490 if grp.ObjectType != "" {
13491 objectMap["objectType"] = grp.ObjectType
13492 }
13493 return json.Marshal(objectMap)
13494 }
13495
13496
13497 func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
13498 return nil, false
13499 }
13500
13501
13502 func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
13503 return nil, false
13504 }
13505
13506
13507 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
13508 return nil, false
13509 }
13510
13511
13512 func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
13513 return nil, false
13514 }
13515
13516
13517 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
13518 return nil, false
13519 }
13520
13521
13522 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
13523 return nil, false
13524 }
13525
13526
13527 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
13528 return nil, false
13529 }
13530
13531
13532 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
13533 return nil, false
13534 }
13535
13536
13537 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
13538 return nil, false
13539 }
13540
13541
13542 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
13543 return nil, false
13544 }
13545
13546
13547 func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
13548 return &grp, true
13549 }
13550
13551
13552 func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
13553 return nil, false
13554 }
13555
13556
13557 func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
13558 return nil, false
13559 }
13560
13561
13562 func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
13563 return &grp, true
13564 }
13565
13566
13567 type GetProtectedItemQueryObject struct {
13568
13569 Expand *string `json:"expand,omitempty"`
13570 }
13571
13572
13573 type HourlySchedule struct {
13574
13575
13576 Interval *int32 `json:"interval,omitempty"`
13577
13578 ScheduleWindowStartTime *date.Time `json:"scheduleWindowStartTime,omitempty"`
13579
13580 ScheduleWindowDuration *int32 `json:"scheduleWindowDuration,omitempty"`
13581 }
13582
13583
13584 type IaasVMBackupRequest struct {
13585
13586 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
13587
13588 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
13589 }
13590
13591
13592 func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) {
13593 ivbr.ObjectType = ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest
13594 objectMap := make(map[string]interface{})
13595 if ivbr.RecoveryPointExpiryTimeInUTC != nil {
13596 objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC
13597 }
13598 if ivbr.ObjectType != "" {
13599 objectMap["objectType"] = ivbr.ObjectType
13600 }
13601 return json.Marshal(objectMap)
13602 }
13603
13604
13605 func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
13606 return nil, false
13607 }
13608
13609
13610 func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
13611 return nil, false
13612 }
13613
13614
13615 func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
13616 return &ivbr, true
13617 }
13618
13619
13620 func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) {
13621 return nil, false
13622 }
13623
13624
13625 func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) {
13626 return &ivbr, true
13627 }
13628
13629
13630 type BasicIaaSVMContainer interface {
13631 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
13632 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
13633 AsIaaSVMContainer() (*IaaSVMContainer, bool)
13634 }
13635
13636
13637 type IaaSVMContainer struct {
13638
13639 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13640
13641 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
13642
13643 ResourceGroup *string `json:"resourceGroup,omitempty"`
13644
13645 FriendlyName *string `json:"friendlyName,omitempty"`
13646
13647 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13648
13649 RegistrationStatus *string `json:"registrationStatus,omitempty"`
13650
13651 HealthStatus *string `json:"healthStatus,omitempty"`
13652
13653 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
13654
13655 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
13656 }
13657
13658 func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) {
13659 var m map[string]interface{}
13660 err := json.Unmarshal(body, &m)
13661 if err != nil {
13662 return nil, err
13663 }
13664
13665 switch m["containerType"] {
13666 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines):
13667 var aisccvc AzureIaaSClassicComputeVMContainer
13668 err := json.Unmarshal(body, &aisccvc)
13669 return aisccvc, err
13670 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines):
13671 var aiscvc AzureIaaSComputeVMContainer
13672 err := json.Unmarshal(body, &aiscvc)
13673 return aiscvc, err
13674 default:
13675 var isc IaaSVMContainer
13676 err := json.Unmarshal(body, &isc)
13677 return isc, err
13678 }
13679 }
13680 func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) {
13681 var rawMessages []*json.RawMessage
13682 err := json.Unmarshal(body, &rawMessages)
13683 if err != nil {
13684 return nil, err
13685 }
13686
13687 iscArray := make([]BasicIaaSVMContainer, len(rawMessages))
13688
13689 for index, rawMessage := range rawMessages {
13690 isc, err := unmarshalBasicIaaSVMContainer(*rawMessage)
13691 if err != nil {
13692 return nil, err
13693 }
13694 iscArray[index] = isc
13695 }
13696 return iscArray, nil
13697 }
13698
13699
13700 func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) {
13701 isc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeIaasVMContainer
13702 objectMap := make(map[string]interface{})
13703 if isc.VirtualMachineID != nil {
13704 objectMap["virtualMachineId"] = isc.VirtualMachineID
13705 }
13706 if isc.VirtualMachineVersion != nil {
13707 objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion
13708 }
13709 if isc.ResourceGroup != nil {
13710 objectMap["resourceGroup"] = isc.ResourceGroup
13711 }
13712 if isc.FriendlyName != nil {
13713 objectMap["friendlyName"] = isc.FriendlyName
13714 }
13715 if isc.BackupManagementType != "" {
13716 objectMap["backupManagementType"] = isc.BackupManagementType
13717 }
13718 if isc.RegistrationStatus != nil {
13719 objectMap["registrationStatus"] = isc.RegistrationStatus
13720 }
13721 if isc.HealthStatus != nil {
13722 objectMap["healthStatus"] = isc.HealthStatus
13723 }
13724 if isc.ProtectableObjectType != nil {
13725 objectMap["protectableObjectType"] = isc.ProtectableObjectType
13726 }
13727 if isc.ContainerType != "" {
13728 objectMap["containerType"] = isc.ContainerType
13729 }
13730 return json.Marshal(objectMap)
13731 }
13732
13733
13734 func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
13735 return nil, false
13736 }
13737
13738
13739 func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
13740 return nil, false
13741 }
13742
13743
13744 func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
13745 return nil, false
13746 }
13747
13748
13749 func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
13750 return nil, false
13751 }
13752
13753
13754 func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
13755 return nil, false
13756 }
13757
13758
13759 func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
13760 return nil, false
13761 }
13762
13763
13764 func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
13765 return nil, false
13766 }
13767
13768
13769 func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
13770 return nil, false
13771 }
13772
13773
13774 func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
13775 return nil, false
13776 }
13777
13778
13779 func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) {
13780 return nil, false
13781 }
13782
13783
13784 func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13785 return nil, false
13786 }
13787
13788
13789 func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) {
13790 return nil, false
13791 }
13792
13793
13794 func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13795 return &isc, true
13796 }
13797
13798
13799 func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13800 return &isc, true
13801 }
13802
13803
13804 func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) {
13805 return nil, false
13806 }
13807
13808
13809 func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13810 return nil, false
13811 }
13812
13813
13814 func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13815 return &isc, true
13816 }
13817
13818
13819 type IaasVMILRRegistrationRequest struct {
13820
13821 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
13822
13823 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13824
13825 InitiatorName *string `json:"initiatorName,omitempty"`
13826
13827 RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"`
13828
13829 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
13830 }
13831
13832
13833 func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) {
13834 ivrr.ObjectType = ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest
13835 objectMap := make(map[string]interface{})
13836 if ivrr.RecoveryPointID != nil {
13837 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
13838 }
13839 if ivrr.VirtualMachineID != nil {
13840 objectMap["virtualMachineId"] = ivrr.VirtualMachineID
13841 }
13842 if ivrr.InitiatorName != nil {
13843 objectMap["initiatorName"] = ivrr.InitiatorName
13844 }
13845 if ivrr.RenewExistingRegistration != nil {
13846 objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration
13847 }
13848 if ivrr.ObjectType != "" {
13849 objectMap["objectType"] = ivrr.ObjectType
13850 }
13851 return json.Marshal(objectMap)
13852 }
13853
13854
13855 func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
13856 return nil, false
13857 }
13858
13859
13860 func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
13861 return &ivrr, true
13862 }
13863
13864
13865 func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) {
13866 return nil, false
13867 }
13868
13869
13870 func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
13871 return &ivrr, true
13872 }
13873
13874
13875 type BasicIaaSVMProtectableItem interface {
13876 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
13877 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
13878 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
13879 }
13880
13881
13882 type IaaSVMProtectableItem struct {
13883
13884 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13885
13886 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
13887
13888 ResourceGroup *string `json:"resourceGroup,omitempty"`
13889
13890 BackupManagementType *string `json:"backupManagementType,omitempty"`
13891
13892 WorkloadType *string `json:"workloadType,omitempty"`
13893
13894 FriendlyName *string `json:"friendlyName,omitempty"`
13895
13896 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
13897
13898 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
13899 }
13900
13901 func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) {
13902 var m map[string]interface{}
13903 err := json.Unmarshal(body, &m)
13904 if err != nil {
13905 return nil, err
13906 }
13907
13908 switch m["protectableItemType"] {
13909 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
13910 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
13911 err := json.Unmarshal(body, &aisccvpi)
13912 return aisccvpi, err
13913 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
13914 var aiscvpi AzureIaaSComputeVMProtectableItem
13915 err := json.Unmarshal(body, &aiscvpi)
13916 return aiscvpi, err
13917 default:
13918 var ispi IaaSVMProtectableItem
13919 err := json.Unmarshal(body, &ispi)
13920 return ispi, err
13921 }
13922 }
13923 func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) {
13924 var rawMessages []*json.RawMessage
13925 err := json.Unmarshal(body, &rawMessages)
13926 if err != nil {
13927 return nil, err
13928 }
13929
13930 ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages))
13931
13932 for index, rawMessage := range rawMessages {
13933 ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage)
13934 if err != nil {
13935 return nil, err
13936 }
13937 ispiArray[index] = ispi
13938 }
13939 return ispiArray, nil
13940 }
13941
13942
13943 func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) {
13944 ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem
13945 objectMap := make(map[string]interface{})
13946 if ispi.VirtualMachineID != nil {
13947 objectMap["virtualMachineId"] = ispi.VirtualMachineID
13948 }
13949 if ispi.VirtualMachineVersion != nil {
13950 objectMap["virtualMachineVersion"] = ispi.VirtualMachineVersion
13951 }
13952 if ispi.ResourceGroup != nil {
13953 objectMap["resourceGroup"] = ispi.ResourceGroup
13954 }
13955 if ispi.BackupManagementType != nil {
13956 objectMap["backupManagementType"] = ispi.BackupManagementType
13957 }
13958 if ispi.WorkloadType != nil {
13959 objectMap["workloadType"] = ispi.WorkloadType
13960 }
13961 if ispi.FriendlyName != nil {
13962 objectMap["friendlyName"] = ispi.FriendlyName
13963 }
13964 if ispi.ProtectionState != "" {
13965 objectMap["protectionState"] = ispi.ProtectionState
13966 }
13967 if ispi.ProtectableItemType != "" {
13968 objectMap["protectableItemType"] = ispi.ProtectableItemType
13969 }
13970 return json.Marshal(objectMap)
13971 }
13972
13973
13974 func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
13975 return nil, false
13976 }
13977
13978
13979 func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
13980 return nil, false
13981 }
13982
13983
13984 func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
13985 return nil, false
13986 }
13987
13988
13989 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
13990 return nil, false
13991 }
13992
13993
13994 func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
13995 return nil, false
13996 }
13997
13998
13999 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
14000 return nil, false
14001 }
14002
14003
14004 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
14005 return nil, false
14006 }
14007
14008
14009 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
14010 return nil, false
14011 }
14012
14013
14014 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
14015 return nil, false
14016 }
14017
14018
14019 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
14020 return nil, false
14021 }
14022
14023
14024 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
14025 return nil, false
14026 }
14027
14028
14029 func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
14030 return &ispi, true
14031 }
14032
14033
14034 func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
14035 return &ispi, true
14036 }
14037
14038
14039 func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
14040 return nil, false
14041 }
14042
14043
14044 func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
14045 return &ispi, true
14046 }
14047
14048
14049 type IaasVMRecoveryPoint struct {
14050
14051 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
14052
14053 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
14054
14055 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
14056
14057 SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"`
14058
14059 IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"`
14060
14061 KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"`
14062
14063 IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"`
14064
14065 RecoveryPointTierDetails *[]RecoveryPointTierInformationV2 `json:"recoveryPointTierDetails,omitempty"`
14066
14067 IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"`
14068
14069 VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
14070
14071 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14072
14073 OsType *string `json:"osType,omitempty"`
14074
14075 RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"`
14076
14077 Zones *[]string `json:"zones,omitempty"`
14078
14079 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
14080
14081 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
14082 }
14083
14084
14085 func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) {
14086 ivrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint
14087 objectMap := make(map[string]interface{})
14088 if ivrp.RecoveryPointType != nil {
14089 objectMap["recoveryPointType"] = ivrp.RecoveryPointType
14090 }
14091 if ivrp.RecoveryPointTime != nil {
14092 objectMap["recoveryPointTime"] = ivrp.RecoveryPointTime
14093 }
14094 if ivrp.RecoveryPointAdditionalInfo != nil {
14095 objectMap["recoveryPointAdditionalInfo"] = ivrp.RecoveryPointAdditionalInfo
14096 }
14097 if ivrp.SourceVMStorageType != nil {
14098 objectMap["sourceVMStorageType"] = ivrp.SourceVMStorageType
14099 }
14100 if ivrp.IsSourceVMEncrypted != nil {
14101 objectMap["isSourceVMEncrypted"] = ivrp.IsSourceVMEncrypted
14102 }
14103 if ivrp.KeyAndSecret != nil {
14104 objectMap["keyAndSecret"] = ivrp.KeyAndSecret
14105 }
14106 if ivrp.IsInstantIlrSessionActive != nil {
14107 objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive
14108 }
14109 if ivrp.RecoveryPointTierDetails != nil {
14110 objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails
14111 }
14112 if ivrp.IsManagedVirtualMachine != nil {
14113 objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine
14114 }
14115 if ivrp.VirtualMachineSize != nil {
14116 objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize
14117 }
14118 if ivrp.OriginalStorageAccountOption != nil {
14119 objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption
14120 }
14121 if ivrp.OsType != nil {
14122 objectMap["osType"] = ivrp.OsType
14123 }
14124 if ivrp.RecoveryPointDiskConfiguration != nil {
14125 objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration
14126 }
14127 if ivrp.Zones != nil {
14128 objectMap["zones"] = ivrp.Zones
14129 }
14130 if ivrp.RecoveryPointMoveReadinessInfo != nil {
14131 objectMap["recoveryPointMoveReadinessInfo"] = ivrp.RecoveryPointMoveReadinessInfo
14132 }
14133 if ivrp.ObjectType != "" {
14134 objectMap["objectType"] = ivrp.ObjectType
14135 }
14136 return json.Marshal(objectMap)
14137 }
14138
14139
14140 func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
14141 return nil, false
14142 }
14143
14144
14145 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
14146 return nil, false
14147 }
14148
14149
14150 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
14151 return nil, false
14152 }
14153
14154
14155 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
14156 return nil, false
14157 }
14158
14159
14160 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
14161 return nil, false
14162 }
14163
14164
14165 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
14166 return nil, false
14167 }
14168
14169
14170 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
14171 return nil, false
14172 }
14173
14174
14175 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
14176 return nil, false
14177 }
14178
14179
14180 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
14181 return nil, false
14182 }
14183
14184
14185 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
14186 return nil, false
14187 }
14188
14189
14190 func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
14191 return nil, false
14192 }
14193
14194
14195 func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
14196 return &ivrp, true
14197 }
14198
14199
14200 func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
14201 return nil, false
14202 }
14203
14204
14205 func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
14206 return &ivrp, true
14207 }
14208
14209
14210 type BasicIaasVMRestoreRequest interface {
14211 AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool)
14212 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
14213 }
14214
14215
14216 type IaasVMRestoreRequest struct {
14217
14218 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
14219
14220 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
14221
14222 SourceResourceID *string `json:"sourceResourceId,omitempty"`
14223
14224
14225 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
14226
14227
14228 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
14229
14230 StorageAccountID *string `json:"storageAccountId,omitempty"`
14231
14232
14233 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
14234
14235
14236
14237 SubnetID *string `json:"subnetId,omitempty"`
14238
14239
14240 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
14241
14242 Region *string `json:"region,omitempty"`
14243
14244 AffinityGroup *string `json:"affinityGroup,omitempty"`
14245
14246
14247 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
14248
14249 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14250
14251 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
14252
14253 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
14254
14255 RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"`
14256
14257 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
14258
14259 Zones *[]string `json:"zones,omitempty"`
14260
14261 IdentityInfo *IdentityInfo `json:"identityInfo,omitempty"`
14262
14263 IdentityBasedRestoreDetails *IdentityBasedRestoreDetails `json:"identityBasedRestoreDetails,omitempty"`
14264
14265 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
14266 }
14267
14268 func unmarshalBasicIaasVMRestoreRequest(body []byte) (BasicIaasVMRestoreRequest, error) {
14269 var m map[string]interface{}
14270 err := json.Unmarshal(body, &m)
14271 if err != nil {
14272 return nil, err
14273 }
14274
14275 switch m["objectType"] {
14276 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest):
14277 var ivrwrr IaasVMRestoreWithRehydrationRequest
14278 err := json.Unmarshal(body, &ivrwrr)
14279 return ivrwrr, err
14280 default:
14281 var ivrr IaasVMRestoreRequest
14282 err := json.Unmarshal(body, &ivrr)
14283 return ivrr, err
14284 }
14285 }
14286 func unmarshalBasicIaasVMRestoreRequestArray(body []byte) ([]BasicIaasVMRestoreRequest, error) {
14287 var rawMessages []*json.RawMessage
14288 err := json.Unmarshal(body, &rawMessages)
14289 if err != nil {
14290 return nil, err
14291 }
14292
14293 ivrrArray := make([]BasicIaasVMRestoreRequest, len(rawMessages))
14294
14295 for index, rawMessage := range rawMessages {
14296 ivrr, err := unmarshalBasicIaasVMRestoreRequest(*rawMessage)
14297 if err != nil {
14298 return nil, err
14299 }
14300 ivrrArray[index] = ivrr
14301 }
14302 return ivrrArray, nil
14303 }
14304
14305
14306 func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) {
14307 ivrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest
14308 objectMap := make(map[string]interface{})
14309 if ivrr.RecoveryPointID != nil {
14310 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
14311 }
14312 if ivrr.RecoveryType != "" {
14313 objectMap["recoveryType"] = ivrr.RecoveryType
14314 }
14315 if ivrr.SourceResourceID != nil {
14316 objectMap["sourceResourceId"] = ivrr.SourceResourceID
14317 }
14318 if ivrr.TargetVirtualMachineID != nil {
14319 objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID
14320 }
14321 if ivrr.TargetResourceGroupID != nil {
14322 objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID
14323 }
14324 if ivrr.StorageAccountID != nil {
14325 objectMap["storageAccountId"] = ivrr.StorageAccountID
14326 }
14327 if ivrr.VirtualNetworkID != nil {
14328 objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID
14329 }
14330 if ivrr.SubnetID != nil {
14331 objectMap["subnetId"] = ivrr.SubnetID
14332 }
14333 if ivrr.TargetDomainNameID != nil {
14334 objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID
14335 }
14336 if ivrr.Region != nil {
14337 objectMap["region"] = ivrr.Region
14338 }
14339 if ivrr.AffinityGroup != nil {
14340 objectMap["affinityGroup"] = ivrr.AffinityGroup
14341 }
14342 if ivrr.CreateNewCloudService != nil {
14343 objectMap["createNewCloudService"] = ivrr.CreateNewCloudService
14344 }
14345 if ivrr.OriginalStorageAccountOption != nil {
14346 objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption
14347 }
14348 if ivrr.EncryptionDetails != nil {
14349 objectMap["encryptionDetails"] = ivrr.EncryptionDetails
14350 }
14351 if ivrr.RestoreDiskLunList != nil {
14352 objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList
14353 }
14354 if ivrr.RestoreWithManagedDisks != nil {
14355 objectMap["restoreWithManagedDisks"] = ivrr.RestoreWithManagedDisks
14356 }
14357 if ivrr.DiskEncryptionSetID != nil {
14358 objectMap["diskEncryptionSetId"] = ivrr.DiskEncryptionSetID
14359 }
14360 if ivrr.Zones != nil {
14361 objectMap["zones"] = ivrr.Zones
14362 }
14363 if ivrr.IdentityInfo != nil {
14364 objectMap["identityInfo"] = ivrr.IdentityInfo
14365 }
14366 if ivrr.IdentityBasedRestoreDetails != nil {
14367 objectMap["identityBasedRestoreDetails"] = ivrr.IdentityBasedRestoreDetails
14368 }
14369 if ivrr.ObjectType != "" {
14370 objectMap["objectType"] = ivrr.ObjectType
14371 }
14372 return json.Marshal(objectMap)
14373 }
14374
14375
14376 func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
14377 return nil, false
14378 }
14379
14380
14381 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
14382 return nil, false
14383 }
14384
14385
14386 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
14387 return nil, false
14388 }
14389
14390
14391 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
14392 return nil, false
14393 }
14394
14395
14396 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14397 return nil, false
14398 }
14399
14400
14401 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14402 return nil, false
14403 }
14404
14405
14406 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
14407 return nil, false
14408 }
14409
14410
14411 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
14412 return nil, false
14413 }
14414
14415
14416 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14417 return nil, false
14418 }
14419
14420
14421 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14422 return nil, false
14423 }
14424
14425
14426 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
14427 return nil, false
14428 }
14429
14430
14431 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
14432 return nil, false
14433 }
14434
14435
14436 func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
14437 return &ivrr, true
14438 }
14439
14440
14441 func (ivrr IaasVMRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
14442 return &ivrr, true
14443 }
14444
14445
14446 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
14447 return nil, false
14448 }
14449
14450
14451 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
14452 return nil, false
14453 }
14454
14455
14456 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
14457 return nil, false
14458 }
14459
14460
14461 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
14462 return nil, false
14463 }
14464
14465
14466 func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
14467 return nil, false
14468 }
14469
14470
14471 func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
14472 return nil, false
14473 }
14474
14475
14476 func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
14477 return &ivrr, true
14478 }
14479
14480
14481
14482 type IaasVMRestoreWithRehydrationRequest struct {
14483
14484 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
14485
14486 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
14487
14488 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
14489
14490 SourceResourceID *string `json:"sourceResourceId,omitempty"`
14491
14492
14493 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
14494
14495
14496 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
14497
14498 StorageAccountID *string `json:"storageAccountId,omitempty"`
14499
14500
14501 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
14502
14503
14504
14505 SubnetID *string `json:"subnetId,omitempty"`
14506
14507
14508 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
14509
14510 Region *string `json:"region,omitempty"`
14511
14512 AffinityGroup *string `json:"affinityGroup,omitempty"`
14513
14514
14515 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
14516
14517 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14518
14519 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
14520
14521 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
14522
14523 RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"`
14524
14525 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
14526
14527 Zones *[]string `json:"zones,omitempty"`
14528
14529 IdentityInfo *IdentityInfo `json:"identityInfo,omitempty"`
14530
14531 IdentityBasedRestoreDetails *IdentityBasedRestoreDetails `json:"identityBasedRestoreDetails,omitempty"`
14532
14533 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
14534 }
14535
14536
14537 func (ivrwrr IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) {
14538 ivrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest
14539 objectMap := make(map[string]interface{})
14540 if ivrwrr.RecoveryPointRehydrationInfo != nil {
14541 objectMap["recoveryPointRehydrationInfo"] = ivrwrr.RecoveryPointRehydrationInfo
14542 }
14543 if ivrwrr.RecoveryPointID != nil {
14544 objectMap["recoveryPointId"] = ivrwrr.RecoveryPointID
14545 }
14546 if ivrwrr.RecoveryType != "" {
14547 objectMap["recoveryType"] = ivrwrr.RecoveryType
14548 }
14549 if ivrwrr.SourceResourceID != nil {
14550 objectMap["sourceResourceId"] = ivrwrr.SourceResourceID
14551 }
14552 if ivrwrr.TargetVirtualMachineID != nil {
14553 objectMap["targetVirtualMachineId"] = ivrwrr.TargetVirtualMachineID
14554 }
14555 if ivrwrr.TargetResourceGroupID != nil {
14556 objectMap["targetResourceGroupId"] = ivrwrr.TargetResourceGroupID
14557 }
14558 if ivrwrr.StorageAccountID != nil {
14559 objectMap["storageAccountId"] = ivrwrr.StorageAccountID
14560 }
14561 if ivrwrr.VirtualNetworkID != nil {
14562 objectMap["virtualNetworkId"] = ivrwrr.VirtualNetworkID
14563 }
14564 if ivrwrr.SubnetID != nil {
14565 objectMap["subnetId"] = ivrwrr.SubnetID
14566 }
14567 if ivrwrr.TargetDomainNameID != nil {
14568 objectMap["targetDomainNameId"] = ivrwrr.TargetDomainNameID
14569 }
14570 if ivrwrr.Region != nil {
14571 objectMap["region"] = ivrwrr.Region
14572 }
14573 if ivrwrr.AffinityGroup != nil {
14574 objectMap["affinityGroup"] = ivrwrr.AffinityGroup
14575 }
14576 if ivrwrr.CreateNewCloudService != nil {
14577 objectMap["createNewCloudService"] = ivrwrr.CreateNewCloudService
14578 }
14579 if ivrwrr.OriginalStorageAccountOption != nil {
14580 objectMap["originalStorageAccountOption"] = ivrwrr.OriginalStorageAccountOption
14581 }
14582 if ivrwrr.EncryptionDetails != nil {
14583 objectMap["encryptionDetails"] = ivrwrr.EncryptionDetails
14584 }
14585 if ivrwrr.RestoreDiskLunList != nil {
14586 objectMap["restoreDiskLunList"] = ivrwrr.RestoreDiskLunList
14587 }
14588 if ivrwrr.RestoreWithManagedDisks != nil {
14589 objectMap["restoreWithManagedDisks"] = ivrwrr.RestoreWithManagedDisks
14590 }
14591 if ivrwrr.DiskEncryptionSetID != nil {
14592 objectMap["diskEncryptionSetId"] = ivrwrr.DiskEncryptionSetID
14593 }
14594 if ivrwrr.Zones != nil {
14595 objectMap["zones"] = ivrwrr.Zones
14596 }
14597 if ivrwrr.IdentityInfo != nil {
14598 objectMap["identityInfo"] = ivrwrr.IdentityInfo
14599 }
14600 if ivrwrr.IdentityBasedRestoreDetails != nil {
14601 objectMap["identityBasedRestoreDetails"] = ivrwrr.IdentityBasedRestoreDetails
14602 }
14603 if ivrwrr.ObjectType != "" {
14604 objectMap["objectType"] = ivrwrr.ObjectType
14605 }
14606 return json.Marshal(objectMap)
14607 }
14608
14609
14610 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
14611 return nil, false
14612 }
14613
14614
14615 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
14616 return nil, false
14617 }
14618
14619
14620 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
14621 return nil, false
14622 }
14623
14624
14625 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
14626 return nil, false
14627 }
14628
14629
14630 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14631 return nil, false
14632 }
14633
14634
14635 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14636 return nil, false
14637 }
14638
14639
14640 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
14641 return nil, false
14642 }
14643
14644
14645 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
14646 return nil, false
14647 }
14648
14649
14650 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14651 return nil, false
14652 }
14653
14654
14655 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14656 return nil, false
14657 }
14658
14659
14660 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
14661 return nil, false
14662 }
14663
14664
14665 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
14666 return nil, false
14667 }
14668
14669
14670 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
14671 return nil, false
14672 }
14673
14674
14675 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
14676 return &ivrwrr, true
14677 }
14678
14679
14680 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
14681 return nil, false
14682 }
14683
14684
14685 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
14686 return nil, false
14687 }
14688
14689
14690 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
14691 return nil, false
14692 }
14693
14694
14695 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
14696 return nil, false
14697 }
14698
14699
14700 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
14701 return &ivrwrr, true
14702 }
14703
14704
14705 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsRestoreRequest() (*RestoreRequest, bool) {
14706 return nil, false
14707 }
14708
14709
14710 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
14711 return &ivrwrr, true
14712 }
14713
14714
14715
14716 type IdentityBasedRestoreDetails struct {
14717
14718 ObjectType *string `json:"objectType,omitempty"`
14719
14720 TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"`
14721 }
14722
14723
14724 type IdentityInfo struct {
14725
14726 IsSystemAssignedIdentity *bool `json:"isSystemAssignedIdentity,omitempty"`
14727
14728
14729 ManagedIdentityResourceID *string `json:"managedIdentityResourceId,omitempty"`
14730 }
14731
14732
14733 type BasicILRRequest interface {
14734 AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool)
14735 AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool)
14736 AsILRRequest() (*ILRRequest, bool)
14737 }
14738
14739
14740 type ILRRequest struct {
14741
14742 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
14743 }
14744
14745 func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) {
14746 var m map[string]interface{}
14747 err := json.Unmarshal(body, &m)
14748 if err != nil {
14749 return nil, err
14750 }
14751
14752 switch m["objectType"] {
14753 case string(ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest):
14754 var afspir AzureFileShareProvisionILRRequest
14755 err := json.Unmarshal(body, &afspir)
14756 return afspir, err
14757 case string(ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest):
14758 var ivrr IaasVMILRRegistrationRequest
14759 err := json.Unmarshal(body, &ivrr)
14760 return ivrr, err
14761 default:
14762 var ir ILRRequest
14763 err := json.Unmarshal(body, &ir)
14764 return ir, err
14765 }
14766 }
14767 func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) {
14768 var rawMessages []*json.RawMessage
14769 err := json.Unmarshal(body, &rawMessages)
14770 if err != nil {
14771 return nil, err
14772 }
14773
14774 irArray := make([]BasicILRRequest, len(rawMessages))
14775
14776 for index, rawMessage := range rawMessages {
14777 ir, err := unmarshalBasicILRRequest(*rawMessage)
14778 if err != nil {
14779 return nil, err
14780 }
14781 irArray[index] = ir
14782 }
14783 return irArray, nil
14784 }
14785
14786
14787 func (ir ILRRequest) MarshalJSON() ([]byte, error) {
14788 ir.ObjectType = ObjectTypeBasicILRRequestObjectTypeILRRequest
14789 objectMap := make(map[string]interface{})
14790 if ir.ObjectType != "" {
14791 objectMap["objectType"] = ir.ObjectType
14792 }
14793 return json.Marshal(objectMap)
14794 }
14795
14796
14797 func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
14798 return nil, false
14799 }
14800
14801
14802 func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
14803 return nil, false
14804 }
14805
14806
14807 func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) {
14808 return &ir, true
14809 }
14810
14811
14812 func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
14813 return &ir, true
14814 }
14815
14816
14817 type ILRRequestResource struct {
14818
14819 Properties BasicILRRequest `json:"properties,omitempty"`
14820
14821 ID *string `json:"id,omitempty"`
14822
14823 Name *string `json:"name,omitempty"`
14824
14825 Type *string `json:"type,omitempty"`
14826
14827 Location *string `json:"location,omitempty"`
14828
14829 Tags map[string]*string `json:"tags"`
14830
14831 ETag *string `json:"eTag,omitempty"`
14832 }
14833
14834
14835 func (irr ILRRequestResource) MarshalJSON() ([]byte, error) {
14836 objectMap := make(map[string]interface{})
14837 objectMap["properties"] = irr.Properties
14838 if irr.Location != nil {
14839 objectMap["location"] = irr.Location
14840 }
14841 if irr.Tags != nil {
14842 objectMap["tags"] = irr.Tags
14843 }
14844 if irr.ETag != nil {
14845 objectMap["eTag"] = irr.ETag
14846 }
14847 return json.Marshal(objectMap)
14848 }
14849
14850
14851 func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error {
14852 var m map[string]*json.RawMessage
14853 err := json.Unmarshal(body, &m)
14854 if err != nil {
14855 return err
14856 }
14857 for k, v := range m {
14858 switch k {
14859 case "properties":
14860 if v != nil {
14861 properties, err := unmarshalBasicILRRequest(*v)
14862 if err != nil {
14863 return err
14864 }
14865 irr.Properties = properties
14866 }
14867 case "id":
14868 if v != nil {
14869 var ID string
14870 err = json.Unmarshal(*v, &ID)
14871 if err != nil {
14872 return err
14873 }
14874 irr.ID = &ID
14875 }
14876 case "name":
14877 if v != nil {
14878 var name string
14879 err = json.Unmarshal(*v, &name)
14880 if err != nil {
14881 return err
14882 }
14883 irr.Name = &name
14884 }
14885 case "type":
14886 if v != nil {
14887 var typeVar string
14888 err = json.Unmarshal(*v, &typeVar)
14889 if err != nil {
14890 return err
14891 }
14892 irr.Type = &typeVar
14893 }
14894 case "location":
14895 if v != nil {
14896 var location string
14897 err = json.Unmarshal(*v, &location)
14898 if err != nil {
14899 return err
14900 }
14901 irr.Location = &location
14902 }
14903 case "tags":
14904 if v != nil {
14905 var tags map[string]*string
14906 err = json.Unmarshal(*v, &tags)
14907 if err != nil {
14908 return err
14909 }
14910 irr.Tags = tags
14911 }
14912 case "eTag":
14913 if v != nil {
14914 var eTag string
14915 err = json.Unmarshal(*v, &eTag)
14916 if err != nil {
14917 return err
14918 }
14919 irr.ETag = &eTag
14920 }
14921 }
14922 }
14923
14924 return nil
14925 }
14926
14927
14928 type InquiryInfo struct {
14929
14930
14931 Status *string `json:"status,omitempty"`
14932
14933 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
14934
14935
14936 InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"`
14937 }
14938
14939
14940 type InquiryValidation struct {
14941
14942 Status *string `json:"status,omitempty"`
14943
14944 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
14945
14946 AdditionalDetail *string `json:"additionalDetail,omitempty"`
14947 }
14948
14949
14950 func (iv InquiryValidation) MarshalJSON() ([]byte, error) {
14951 objectMap := make(map[string]interface{})
14952 if iv.Status != nil {
14953 objectMap["status"] = iv.Status
14954 }
14955 if iv.ErrorDetail != nil {
14956 objectMap["errorDetail"] = iv.ErrorDetail
14957 }
14958 return json.Marshal(objectMap)
14959 }
14960
14961
14962 type InstantItemRecoveryTarget struct {
14963
14964 ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"`
14965 }
14966
14967
14968 type InstantRPAdditionalDetails struct {
14969 AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"`
14970 AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"`
14971 }
14972
14973
14974 type BasicJob interface {
14975 AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool)
14976 AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool)
14977 AsAzureStorageJob() (*AzureStorageJob, bool)
14978 AsAzureWorkloadJob() (*AzureWorkloadJob, bool)
14979 AsDpmJob() (*DpmJob, bool)
14980 AsMabJob() (*MabJob, bool)
14981 AsVaultJob() (*VaultJob, bool)
14982 AsJob() (*Job, bool)
14983 }
14984
14985
14986 type Job struct {
14987
14988 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
14989
14990 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
14991
14992 Operation *string `json:"operation,omitempty"`
14993
14994 Status *string `json:"status,omitempty"`
14995
14996 StartTime *date.Time `json:"startTime,omitempty"`
14997
14998 EndTime *date.Time `json:"endTime,omitempty"`
14999
15000 ActivityID *string `json:"activityId,omitempty"`
15001
15002 JobType JobType `json:"jobType,omitempty"`
15003 }
15004
15005 func unmarshalBasicJob(body []byte) (BasicJob, error) {
15006 var m map[string]interface{}
15007 err := json.Unmarshal(body, &m)
15008 if err != nil {
15009 return nil, err
15010 }
15011
15012 switch m["jobType"] {
15013 case string(JobTypeAzureIaaSVMJob):
15014 var aisj AzureIaaSVMJob
15015 err := json.Unmarshal(body, &aisj)
15016 return aisj, err
15017 case string(JobTypeAzureIaaSVMJobV2):
15018 var aisjv AzureIaaSVMJobV2
15019 err := json.Unmarshal(body, &aisjv)
15020 return aisjv, err
15021 case string(JobTypeAzureStorageJob):
15022 var asj AzureStorageJob
15023 err := json.Unmarshal(body, &asj)
15024 return asj, err
15025 case string(JobTypeAzureWorkloadJob):
15026 var awj AzureWorkloadJob
15027 err := json.Unmarshal(body, &awj)
15028 return awj, err
15029 case string(JobTypeDpmJob):
15030 var dj DpmJob
15031 err := json.Unmarshal(body, &dj)
15032 return dj, err
15033 case string(JobTypeMabJob):
15034 var mj MabJob
15035 err := json.Unmarshal(body, &mj)
15036 return mj, err
15037 case string(JobTypeVaultJob):
15038 var vj VaultJob
15039 err := json.Unmarshal(body, &vj)
15040 return vj, err
15041 default:
15042 var j Job
15043 err := json.Unmarshal(body, &j)
15044 return j, err
15045 }
15046 }
15047 func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) {
15048 var rawMessages []*json.RawMessage
15049 err := json.Unmarshal(body, &rawMessages)
15050 if err != nil {
15051 return nil, err
15052 }
15053
15054 jArray := make([]BasicJob, len(rawMessages))
15055
15056 for index, rawMessage := range rawMessages {
15057 j, err := unmarshalBasicJob(*rawMessage)
15058 if err != nil {
15059 return nil, err
15060 }
15061 jArray[index] = j
15062 }
15063 return jArray, nil
15064 }
15065
15066
15067 func (j Job) MarshalJSON() ([]byte, error) {
15068 j.JobType = JobTypeJob
15069 objectMap := make(map[string]interface{})
15070 if j.EntityFriendlyName != nil {
15071 objectMap["entityFriendlyName"] = j.EntityFriendlyName
15072 }
15073 if j.BackupManagementType != "" {
15074 objectMap["backupManagementType"] = j.BackupManagementType
15075 }
15076 if j.Operation != nil {
15077 objectMap["operation"] = j.Operation
15078 }
15079 if j.Status != nil {
15080 objectMap["status"] = j.Status
15081 }
15082 if j.StartTime != nil {
15083 objectMap["startTime"] = j.StartTime
15084 }
15085 if j.EndTime != nil {
15086 objectMap["endTime"] = j.EndTime
15087 }
15088 if j.ActivityID != nil {
15089 objectMap["activityId"] = j.ActivityID
15090 }
15091 if j.JobType != "" {
15092 objectMap["jobType"] = j.JobType
15093 }
15094 return json.Marshal(objectMap)
15095 }
15096
15097
15098 func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
15099 return nil, false
15100 }
15101
15102
15103 func (j Job) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
15104 return nil, false
15105 }
15106
15107
15108 func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) {
15109 return nil, false
15110 }
15111
15112
15113 func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
15114 return nil, false
15115 }
15116
15117
15118 func (j Job) AsDpmJob() (*DpmJob, bool) {
15119 return nil, false
15120 }
15121
15122
15123 func (j Job) AsMabJob() (*MabJob, bool) {
15124 return nil, false
15125 }
15126
15127
15128 func (j Job) AsVaultJob() (*VaultJob, bool) {
15129 return nil, false
15130 }
15131
15132
15133 func (j Job) AsJob() (*Job, bool) {
15134 return &j, true
15135 }
15136
15137
15138 func (j Job) AsBasicJob() (BasicJob, bool) {
15139 return &j, true
15140 }
15141
15142
15143 type JobQueryObject struct {
15144
15145 Status JobStatus `json:"status,omitempty"`
15146
15147 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15148
15149 Operation JobOperationType `json:"operation,omitempty"`
15150
15151 JobID *string `json:"jobId,omitempty"`
15152
15153 StartTime *date.Time `json:"startTime,omitempty"`
15154
15155 EndTime *date.Time `json:"endTime,omitempty"`
15156 }
15157
15158
15159 type JobResource struct {
15160 autorest.Response `json:"-"`
15161
15162 Properties BasicJob `json:"properties,omitempty"`
15163
15164 ID *string `json:"id,omitempty"`
15165
15166 Name *string `json:"name,omitempty"`
15167
15168 Type *string `json:"type,omitempty"`
15169
15170 Location *string `json:"location,omitempty"`
15171
15172 Tags map[string]*string `json:"tags"`
15173
15174 ETag *string `json:"eTag,omitempty"`
15175 }
15176
15177
15178 func (jr JobResource) MarshalJSON() ([]byte, error) {
15179 objectMap := make(map[string]interface{})
15180 objectMap["properties"] = jr.Properties
15181 if jr.Location != nil {
15182 objectMap["location"] = jr.Location
15183 }
15184 if jr.Tags != nil {
15185 objectMap["tags"] = jr.Tags
15186 }
15187 if jr.ETag != nil {
15188 objectMap["eTag"] = jr.ETag
15189 }
15190 return json.Marshal(objectMap)
15191 }
15192
15193
15194 func (jr *JobResource) UnmarshalJSON(body []byte) error {
15195 var m map[string]*json.RawMessage
15196 err := json.Unmarshal(body, &m)
15197 if err != nil {
15198 return err
15199 }
15200 for k, v := range m {
15201 switch k {
15202 case "properties":
15203 if v != nil {
15204 properties, err := unmarshalBasicJob(*v)
15205 if err != nil {
15206 return err
15207 }
15208 jr.Properties = properties
15209 }
15210 case "id":
15211 if v != nil {
15212 var ID string
15213 err = json.Unmarshal(*v, &ID)
15214 if err != nil {
15215 return err
15216 }
15217 jr.ID = &ID
15218 }
15219 case "name":
15220 if v != nil {
15221 var name string
15222 err = json.Unmarshal(*v, &name)
15223 if err != nil {
15224 return err
15225 }
15226 jr.Name = &name
15227 }
15228 case "type":
15229 if v != nil {
15230 var typeVar string
15231 err = json.Unmarshal(*v, &typeVar)
15232 if err != nil {
15233 return err
15234 }
15235 jr.Type = &typeVar
15236 }
15237 case "location":
15238 if v != nil {
15239 var location string
15240 err = json.Unmarshal(*v, &location)
15241 if err != nil {
15242 return err
15243 }
15244 jr.Location = &location
15245 }
15246 case "tags":
15247 if v != nil {
15248 var tags map[string]*string
15249 err = json.Unmarshal(*v, &tags)
15250 if err != nil {
15251 return err
15252 }
15253 jr.Tags = tags
15254 }
15255 case "eTag":
15256 if v != nil {
15257 var eTag string
15258 err = json.Unmarshal(*v, &eTag)
15259 if err != nil {
15260 return err
15261 }
15262 jr.ETag = &eTag
15263 }
15264 }
15265 }
15266
15267 return nil
15268 }
15269
15270
15271 type JobResourceList struct {
15272 autorest.Response `json:"-"`
15273
15274 Value *[]JobResource `json:"value,omitempty"`
15275
15276 NextLink *string `json:"nextLink,omitempty"`
15277 }
15278
15279
15280 type JobResourceListIterator struct {
15281 i int
15282 page JobResourceListPage
15283 }
15284
15285
15286
15287 func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) {
15288 if tracing.IsEnabled() {
15289 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext")
15290 defer func() {
15291 sc := -1
15292 if iter.Response().Response.Response != nil {
15293 sc = iter.Response().Response.Response.StatusCode
15294 }
15295 tracing.EndSpan(ctx, sc, err)
15296 }()
15297 }
15298 iter.i++
15299 if iter.i < len(iter.page.Values()) {
15300 return nil
15301 }
15302 err = iter.page.NextWithContext(ctx)
15303 if err != nil {
15304 iter.i--
15305 return err
15306 }
15307 iter.i = 0
15308 return nil
15309 }
15310
15311
15312
15313
15314 func (iter *JobResourceListIterator) Next() error {
15315 return iter.NextWithContext(context.Background())
15316 }
15317
15318
15319 func (iter JobResourceListIterator) NotDone() bool {
15320 return iter.page.NotDone() && iter.i < len(iter.page.Values())
15321 }
15322
15323
15324 func (iter JobResourceListIterator) Response() JobResourceList {
15325 return iter.page.Response()
15326 }
15327
15328
15329
15330 func (iter JobResourceListIterator) Value() JobResource {
15331 if !iter.page.NotDone() {
15332 return JobResource{}
15333 }
15334 return iter.page.Values()[iter.i]
15335 }
15336
15337
15338 func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator {
15339 return JobResourceListIterator{page: page}
15340 }
15341
15342
15343 func (jrl JobResourceList) IsEmpty() bool {
15344 return jrl.Value == nil || len(*jrl.Value) == 0
15345 }
15346
15347
15348 func (jrl JobResourceList) hasNextLink() bool {
15349 return jrl.NextLink != nil && len(*jrl.NextLink) != 0
15350 }
15351
15352
15353
15354 func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) {
15355 if !jrl.hasNextLink() {
15356 return nil, nil
15357 }
15358 return autorest.Prepare((&http.Request{}).WithContext(ctx),
15359 autorest.AsJSON(),
15360 autorest.AsGet(),
15361 autorest.WithBaseURL(to.String(jrl.NextLink)))
15362 }
15363
15364
15365 type JobResourceListPage struct {
15366 fn func(context.Context, JobResourceList) (JobResourceList, error)
15367 jrl JobResourceList
15368 }
15369
15370
15371
15372 func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) {
15373 if tracing.IsEnabled() {
15374 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext")
15375 defer func() {
15376 sc := -1
15377 if page.Response().Response.Response != nil {
15378 sc = page.Response().Response.Response.StatusCode
15379 }
15380 tracing.EndSpan(ctx, sc, err)
15381 }()
15382 }
15383 for {
15384 next, err := page.fn(ctx, page.jrl)
15385 if err != nil {
15386 return err
15387 }
15388 page.jrl = next
15389 if !next.hasNextLink() || !next.IsEmpty() {
15390 break
15391 }
15392 }
15393 return nil
15394 }
15395
15396
15397
15398
15399 func (page *JobResourceListPage) Next() error {
15400 return page.NextWithContext(context.Background())
15401 }
15402
15403
15404 func (page JobResourceListPage) NotDone() bool {
15405 return !page.jrl.IsEmpty()
15406 }
15407
15408
15409 func (page JobResourceListPage) Response() JobResourceList {
15410 return page.jrl
15411 }
15412
15413
15414 func (page JobResourceListPage) Values() []JobResource {
15415 if page.jrl.IsEmpty() {
15416 return nil
15417 }
15418 return *page.jrl.Value
15419 }
15420
15421
15422 func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage {
15423 return JobResourceListPage{
15424 fn: getNextPage,
15425 jrl: cur,
15426 }
15427 }
15428
15429
15430 type KEKDetails struct {
15431
15432 KeyURL *string `json:"keyUrl,omitempty"`
15433
15434 KeyVaultID *string `json:"keyVaultId,omitempty"`
15435
15436 KeyBackupData *string `json:"keyBackupData,omitempty"`
15437 }
15438
15439
15440
15441
15442
15443
15444
15445
15446 type KeyAndSecretDetails struct {
15447
15448 KekDetails *KEKDetails `json:"kekDetails,omitempty"`
15449
15450 BekDetails *BEKDetails `json:"bekDetails,omitempty"`
15451
15452 EncryptionMechanism *string `json:"encryptionMechanism,omitempty"`
15453 }
15454
15455
15456 type KPIResourceHealthDetails struct {
15457
15458 ResourceHealthStatus ResourceHealthStatus `json:"resourceHealthStatus,omitempty"`
15459
15460 ResourceHealthDetails *[]ResourceHealthDetails `json:"resourceHealthDetails,omitempty"`
15461 }
15462
15463
15464 type ListRecoveryPointsRecommendedForMoveRequest struct {
15465
15466 ObjectType *string `json:"objectType,omitempty"`
15467
15468 ExcludedRPList *[]string `json:"excludedRPList,omitempty"`
15469 }
15470
15471
15472 type LogSchedulePolicy struct {
15473
15474 ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"`
15475
15476 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
15477 }
15478
15479
15480 func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) {
15481 lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy
15482 objectMap := make(map[string]interface{})
15483 if lsp.ScheduleFrequencyInMins != nil {
15484 objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins
15485 }
15486 if lsp.SchedulePolicyType != "" {
15487 objectMap["schedulePolicyType"] = lsp.SchedulePolicyType
15488 }
15489 return json.Marshal(objectMap)
15490 }
15491
15492
15493 func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
15494 return &lsp, true
15495 }
15496
15497
15498 func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
15499 return nil, false
15500 }
15501
15502
15503 func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
15504 return nil, false
15505 }
15506
15507
15508 func (lsp LogSchedulePolicy) AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool) {
15509 return nil, false
15510 }
15511
15512
15513 func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
15514 return nil, false
15515 }
15516
15517
15518 func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
15519 return &lsp, true
15520 }
15521
15522
15523 type LongTermRetentionPolicy struct {
15524
15525 DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"`
15526
15527 WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"`
15528
15529 MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"`
15530
15531 YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"`
15532
15533 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
15534 }
15535
15536
15537 func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) {
15538 ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy
15539 objectMap := make(map[string]interface{})
15540 if ltrp.DailySchedule != nil {
15541 objectMap["dailySchedule"] = ltrp.DailySchedule
15542 }
15543 if ltrp.WeeklySchedule != nil {
15544 objectMap["weeklySchedule"] = ltrp.WeeklySchedule
15545 }
15546 if ltrp.MonthlySchedule != nil {
15547 objectMap["monthlySchedule"] = ltrp.MonthlySchedule
15548 }
15549 if ltrp.YearlySchedule != nil {
15550 objectMap["yearlySchedule"] = ltrp.YearlySchedule
15551 }
15552 if ltrp.RetentionPolicyType != "" {
15553 objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType
15554 }
15555 return json.Marshal(objectMap)
15556 }
15557
15558
15559 func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
15560 return <rp, true
15561 }
15562
15563
15564 func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
15565 return nil, false
15566 }
15567
15568
15569 func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
15570 return nil, false
15571 }
15572
15573
15574 func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
15575 return <rp, true
15576 }
15577
15578
15579 type LongTermSchedulePolicy struct {
15580
15581 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
15582 }
15583
15584
15585 func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) {
15586 ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy
15587 objectMap := make(map[string]interface{})
15588 if ltsp.SchedulePolicyType != "" {
15589 objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType
15590 }
15591 return json.Marshal(objectMap)
15592 }
15593
15594
15595 func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
15596 return nil, false
15597 }
15598
15599
15600 func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
15601 return <sp, true
15602 }
15603
15604
15605 func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
15606 return nil, false
15607 }
15608
15609
15610 func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool) {
15611 return nil, false
15612 }
15613
15614
15615 func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
15616 return nil, false
15617 }
15618
15619
15620 func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
15621 return <sp, true
15622 }
15623
15624
15625 type MabContainer struct {
15626
15627 CanReRegister *bool `json:"canReRegister,omitempty"`
15628
15629 ContainerID *int64 `json:"containerId,omitempty"`
15630
15631 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
15632
15633 AgentVersion *string `json:"agentVersion,omitempty"`
15634
15635 ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"`
15636
15637 MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"`
15638
15639 ContainerHealthState *string `json:"containerHealthState,omitempty"`
15640
15641 FriendlyName *string `json:"friendlyName,omitempty"`
15642
15643 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15644
15645 RegistrationStatus *string `json:"registrationStatus,omitempty"`
15646
15647 HealthStatus *string `json:"healthStatus,omitempty"`
15648
15649 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
15650
15651 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
15652 }
15653
15654
15655 func (mc MabContainer) MarshalJSON() ([]byte, error) {
15656 mc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeWindows
15657 objectMap := make(map[string]interface{})
15658 if mc.CanReRegister != nil {
15659 objectMap["canReRegister"] = mc.CanReRegister
15660 }
15661 if mc.ContainerID != nil {
15662 objectMap["containerId"] = mc.ContainerID
15663 }
15664 if mc.ProtectedItemCount != nil {
15665 objectMap["protectedItemCount"] = mc.ProtectedItemCount
15666 }
15667 if mc.AgentVersion != nil {
15668 objectMap["agentVersion"] = mc.AgentVersion
15669 }
15670 if mc.ExtendedInfo != nil {
15671 objectMap["extendedInfo"] = mc.ExtendedInfo
15672 }
15673 if mc.MabContainerHealthDetails != nil {
15674 objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails
15675 }
15676 if mc.ContainerHealthState != nil {
15677 objectMap["containerHealthState"] = mc.ContainerHealthState
15678 }
15679 if mc.FriendlyName != nil {
15680 objectMap["friendlyName"] = mc.FriendlyName
15681 }
15682 if mc.BackupManagementType != "" {
15683 objectMap["backupManagementType"] = mc.BackupManagementType
15684 }
15685 if mc.RegistrationStatus != nil {
15686 objectMap["registrationStatus"] = mc.RegistrationStatus
15687 }
15688 if mc.HealthStatus != nil {
15689 objectMap["healthStatus"] = mc.HealthStatus
15690 }
15691 if mc.ProtectableObjectType != nil {
15692 objectMap["protectableObjectType"] = mc.ProtectableObjectType
15693 }
15694 if mc.ContainerType != "" {
15695 objectMap["containerType"] = mc.ContainerType
15696 }
15697 return json.Marshal(objectMap)
15698 }
15699
15700
15701 func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
15702 return nil, false
15703 }
15704
15705
15706 func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
15707 return nil, false
15708 }
15709
15710
15711 func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
15712 return nil, false
15713 }
15714
15715
15716 func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
15717 return nil, false
15718 }
15719
15720
15721 func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
15722 return nil, false
15723 }
15724
15725
15726 func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
15727 return nil, false
15728 }
15729
15730
15731 func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
15732 return nil, false
15733 }
15734
15735
15736 func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
15737 return nil, false
15738 }
15739
15740
15741 func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
15742 return nil, false
15743 }
15744
15745
15746 func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) {
15747 return nil, false
15748 }
15749
15750
15751 func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
15752 return nil, false
15753 }
15754
15755
15756 func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) {
15757 return nil, false
15758 }
15759
15760
15761 func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
15762 return nil, false
15763 }
15764
15765
15766 func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
15767 return nil, false
15768 }
15769
15770
15771 func (mc MabContainer) AsMabContainer() (*MabContainer, bool) {
15772 return &mc, true
15773 }
15774
15775
15776 func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
15777 return nil, false
15778 }
15779
15780
15781 func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
15782 return &mc, true
15783 }
15784
15785
15786 type MabContainerExtendedInfo struct {
15787
15788 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
15789
15790 BackupItemType ItemType `json:"backupItemType,omitempty"`
15791
15792 BackupItems *[]string `json:"backupItems,omitempty"`
15793
15794 PolicyName *string `json:"policyName,omitempty"`
15795
15796 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
15797 }
15798
15799
15800 type MABContainerHealthDetails struct {
15801
15802 Code *int32 `json:"code,omitempty"`
15803
15804 Title *string `json:"title,omitempty"`
15805
15806 Message *string `json:"message,omitempty"`
15807
15808 Recommendations *[]string `json:"recommendations,omitempty"`
15809 }
15810
15811
15812 type MabErrorInfo struct {
15813
15814 ErrorString *string `json:"errorString,omitempty"`
15815
15816 Recommendations *[]string `json:"recommendations,omitempty"`
15817 }
15818
15819
15820 func (mei MabErrorInfo) MarshalJSON() ([]byte, error) {
15821 objectMap := make(map[string]interface{})
15822 return json.Marshal(objectMap)
15823 }
15824
15825
15826 type MabFileFolderProtectedItem struct {
15827
15828 FriendlyName *string `json:"friendlyName,omitempty"`
15829
15830 ComputerName *string `json:"computerName,omitempty"`
15831
15832 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
15833
15834 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
15835
15836 ProtectionState *string `json:"protectionState,omitempty"`
15837
15838 DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"`
15839
15840 ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
15841
15842 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15843
15844 WorkloadType DataSourceType `json:"workloadType,omitempty"`
15845
15846 ContainerName *string `json:"containerName,omitempty"`
15847
15848 SourceResourceID *string `json:"sourceResourceId,omitempty"`
15849
15850 PolicyID *string `json:"policyId,omitempty"`
15851
15852 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
15853
15854 BackupSetName *string `json:"backupSetName,omitempty"`
15855
15856 CreateMode CreateMode `json:"createMode,omitempty"`
15857
15858 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
15859
15860 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
15861
15862 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
15863
15864 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
15865
15866 IsRehydrate *bool `json:"isRehydrate,omitempty"`
15867
15868 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
15869
15870 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
15871
15872 PolicyName *string `json:"policyName,omitempty"`
15873
15874 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
15875 }
15876
15877
15878 func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) {
15879 mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem
15880 objectMap := make(map[string]interface{})
15881 if mffpi.FriendlyName != nil {
15882 objectMap["friendlyName"] = mffpi.FriendlyName
15883 }
15884 if mffpi.ComputerName != nil {
15885 objectMap["computerName"] = mffpi.ComputerName
15886 }
15887 if mffpi.LastBackupStatus != nil {
15888 objectMap["lastBackupStatus"] = mffpi.LastBackupStatus
15889 }
15890 if mffpi.LastBackupTime != nil {
15891 objectMap["lastBackupTime"] = mffpi.LastBackupTime
15892 }
15893 if mffpi.ProtectionState != nil {
15894 objectMap["protectionState"] = mffpi.ProtectionState
15895 }
15896 if mffpi.DeferredDeleteSyncTimeInUTC != nil {
15897 objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC
15898 }
15899 if mffpi.ExtendedInfo != nil {
15900 objectMap["extendedInfo"] = mffpi.ExtendedInfo
15901 }
15902 if mffpi.BackupManagementType != "" {
15903 objectMap["backupManagementType"] = mffpi.BackupManagementType
15904 }
15905 if mffpi.WorkloadType != "" {
15906 objectMap["workloadType"] = mffpi.WorkloadType
15907 }
15908 if mffpi.ContainerName != nil {
15909 objectMap["containerName"] = mffpi.ContainerName
15910 }
15911 if mffpi.SourceResourceID != nil {
15912 objectMap["sourceResourceId"] = mffpi.SourceResourceID
15913 }
15914 if mffpi.PolicyID != nil {
15915 objectMap["policyId"] = mffpi.PolicyID
15916 }
15917 if mffpi.LastRecoveryPoint != nil {
15918 objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint
15919 }
15920 if mffpi.BackupSetName != nil {
15921 objectMap["backupSetName"] = mffpi.BackupSetName
15922 }
15923 if mffpi.CreateMode != "" {
15924 objectMap["createMode"] = mffpi.CreateMode
15925 }
15926 if mffpi.DeferredDeleteTimeInUTC != nil {
15927 objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC
15928 }
15929 if mffpi.IsScheduledForDeferredDelete != nil {
15930 objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete
15931 }
15932 if mffpi.DeferredDeleteTimeRemaining != nil {
15933 objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining
15934 }
15935 if mffpi.IsDeferredDeleteScheduleUpcoming != nil {
15936 objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming
15937 }
15938 if mffpi.IsRehydrate != nil {
15939 objectMap["isRehydrate"] = mffpi.IsRehydrate
15940 }
15941 if mffpi.ResourceGuardOperationRequests != nil {
15942 objectMap["resourceGuardOperationRequests"] = mffpi.ResourceGuardOperationRequests
15943 }
15944 if mffpi.IsArchiveEnabled != nil {
15945 objectMap["isArchiveEnabled"] = mffpi.IsArchiveEnabled
15946 }
15947 if mffpi.PolicyName != nil {
15948 objectMap["policyName"] = mffpi.PolicyName
15949 }
15950 if mffpi.ProtectedItemType != "" {
15951 objectMap["protectedItemType"] = mffpi.ProtectedItemType
15952 }
15953 return json.Marshal(objectMap)
15954 }
15955
15956
15957 func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
15958 return nil, false
15959 }
15960
15961
15962 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
15963 return nil, false
15964 }
15965
15966
15967 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
15968 return nil, false
15969 }
15970
15971
15972 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
15973 return nil, false
15974 }
15975
15976
15977 func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
15978 return nil, false
15979 }
15980
15981
15982 func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
15983 return nil, false
15984 }
15985
15986
15987 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
15988 return nil, false
15989 }
15990
15991
15992 func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
15993 return nil, false
15994 }
15995
15996
15997 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
15998 return nil, false
15999 }
16000
16001
16002 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
16003 return nil, false
16004 }
16005
16006
16007 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
16008 return nil, false
16009 }
16010
16011
16012 func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
16013 return nil, false
16014 }
16015
16016
16017 func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
16018 return nil, false
16019 }
16020
16021
16022 func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
16023 return &mffpi, true
16024 }
16025
16026
16027 func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
16028 return nil, false
16029 }
16030
16031
16032 func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
16033 return &mffpi, true
16034 }
16035
16036
16037 type MabFileFolderProtectedItemExtendedInfo struct {
16038
16039 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
16040
16041 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
16042
16043 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
16044 }
16045
16046
16047 type MabJob struct {
16048
16049 Duration *string `json:"duration,omitempty"`
16050
16051 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
16052
16053 MabServerName *string `json:"mabServerName,omitempty"`
16054
16055 MabServerType MabServerType `json:"mabServerType,omitempty"`
16056
16057 WorkloadType WorkloadType `json:"workloadType,omitempty"`
16058
16059 ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"`
16060
16061 ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"`
16062
16063 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
16064
16065 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
16066
16067 Operation *string `json:"operation,omitempty"`
16068
16069 Status *string `json:"status,omitempty"`
16070
16071 StartTime *date.Time `json:"startTime,omitempty"`
16072
16073 EndTime *date.Time `json:"endTime,omitempty"`
16074
16075 ActivityID *string `json:"activityId,omitempty"`
16076
16077 JobType JobType `json:"jobType,omitempty"`
16078 }
16079
16080
16081 func (mj MabJob) MarshalJSON() ([]byte, error) {
16082 mj.JobType = JobTypeMabJob
16083 objectMap := make(map[string]interface{})
16084 if mj.Duration != nil {
16085 objectMap["duration"] = mj.Duration
16086 }
16087 if mj.ActionsInfo != nil {
16088 objectMap["actionsInfo"] = mj.ActionsInfo
16089 }
16090 if mj.MabServerName != nil {
16091 objectMap["mabServerName"] = mj.MabServerName
16092 }
16093 if mj.MabServerType != "" {
16094 objectMap["mabServerType"] = mj.MabServerType
16095 }
16096 if mj.WorkloadType != "" {
16097 objectMap["workloadType"] = mj.WorkloadType
16098 }
16099 if mj.ErrorDetails != nil {
16100 objectMap["errorDetails"] = mj.ErrorDetails
16101 }
16102 if mj.ExtendedInfo != nil {
16103 objectMap["extendedInfo"] = mj.ExtendedInfo
16104 }
16105 if mj.EntityFriendlyName != nil {
16106 objectMap["entityFriendlyName"] = mj.EntityFriendlyName
16107 }
16108 if mj.BackupManagementType != "" {
16109 objectMap["backupManagementType"] = mj.BackupManagementType
16110 }
16111 if mj.Operation != nil {
16112 objectMap["operation"] = mj.Operation
16113 }
16114 if mj.Status != nil {
16115 objectMap["status"] = mj.Status
16116 }
16117 if mj.StartTime != nil {
16118 objectMap["startTime"] = mj.StartTime
16119 }
16120 if mj.EndTime != nil {
16121 objectMap["endTime"] = mj.EndTime
16122 }
16123 if mj.ActivityID != nil {
16124 objectMap["activityId"] = mj.ActivityID
16125 }
16126 if mj.JobType != "" {
16127 objectMap["jobType"] = mj.JobType
16128 }
16129 return json.Marshal(objectMap)
16130 }
16131
16132
16133 func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
16134 return nil, false
16135 }
16136
16137
16138 func (mj MabJob) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
16139 return nil, false
16140 }
16141
16142
16143 func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
16144 return nil, false
16145 }
16146
16147
16148 func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
16149 return nil, false
16150 }
16151
16152
16153 func (mj MabJob) AsDpmJob() (*DpmJob, bool) {
16154 return nil, false
16155 }
16156
16157
16158 func (mj MabJob) AsMabJob() (*MabJob, bool) {
16159 return &mj, true
16160 }
16161
16162
16163 func (mj MabJob) AsVaultJob() (*VaultJob, bool) {
16164 return nil, false
16165 }
16166
16167
16168 func (mj MabJob) AsJob() (*Job, bool) {
16169 return nil, false
16170 }
16171
16172
16173 func (mj MabJob) AsBasicJob() (BasicJob, bool) {
16174 return &mj, true
16175 }
16176
16177
16178 type MabJobExtendedInfo struct {
16179
16180 TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"`
16181
16182 PropertyBag map[string]*string `json:"propertyBag"`
16183
16184 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
16185 }
16186
16187
16188 func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) {
16189 objectMap := make(map[string]interface{})
16190 if mjei.TasksList != nil {
16191 objectMap["tasksList"] = mjei.TasksList
16192 }
16193 if mjei.PropertyBag != nil {
16194 objectMap["propertyBag"] = mjei.PropertyBag
16195 }
16196 if mjei.DynamicErrorMessage != nil {
16197 objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage
16198 }
16199 return json.Marshal(objectMap)
16200 }
16201
16202
16203 type MabJobTaskDetails struct {
16204
16205 TaskID *string `json:"taskId,omitempty"`
16206
16207 StartTime *date.Time `json:"startTime,omitempty"`
16208
16209 EndTime *date.Time `json:"endTime,omitempty"`
16210
16211 Duration *string `json:"duration,omitempty"`
16212
16213 Status *string `json:"status,omitempty"`
16214 }
16215
16216
16217 type MabProtectionPolicy struct {
16218
16219 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
16220
16221 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
16222
16223 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
16224
16225 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
16226
16227 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
16228 }
16229
16230
16231 func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) {
16232 mpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB
16233 objectMap := make(map[string]interface{})
16234 objectMap["schedulePolicy"] = mpp.SchedulePolicy
16235 objectMap["retentionPolicy"] = mpp.RetentionPolicy
16236 if mpp.ProtectedItemsCount != nil {
16237 objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount
16238 }
16239 if mpp.ResourceGuardOperationRequests != nil {
16240 objectMap["resourceGuardOperationRequests"] = mpp.ResourceGuardOperationRequests
16241 }
16242 if mpp.BackupManagementType != "" {
16243 objectMap["backupManagementType"] = mpp.BackupManagementType
16244 }
16245 return json.Marshal(objectMap)
16246 }
16247
16248
16249 func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
16250 return nil, false
16251 }
16252
16253
16254 func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
16255 return nil, false
16256 }
16257
16258
16259 func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
16260 return nil, false
16261 }
16262
16263
16264 func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
16265 return nil, false
16266 }
16267
16268
16269 func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
16270 return nil, false
16271 }
16272
16273
16274 func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
16275 return &mpp, true
16276 }
16277
16278
16279 func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
16280 return nil, false
16281 }
16282
16283
16284 func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
16285 return &mpp, true
16286 }
16287
16288
16289 func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error {
16290 var m map[string]*json.RawMessage
16291 err := json.Unmarshal(body, &m)
16292 if err != nil {
16293 return err
16294 }
16295 for k, v := range m {
16296 switch k {
16297 case "schedulePolicy":
16298 if v != nil {
16299 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
16300 if err != nil {
16301 return err
16302 }
16303 mpp.SchedulePolicy = schedulePolicy
16304 }
16305 case "retentionPolicy":
16306 if v != nil {
16307 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
16308 if err != nil {
16309 return err
16310 }
16311 mpp.RetentionPolicy = retentionPolicy
16312 }
16313 case "protectedItemsCount":
16314 if v != nil {
16315 var protectedItemsCount int32
16316 err = json.Unmarshal(*v, &protectedItemsCount)
16317 if err != nil {
16318 return err
16319 }
16320 mpp.ProtectedItemsCount = &protectedItemsCount
16321 }
16322 case "resourceGuardOperationRequests":
16323 if v != nil {
16324 var resourceGuardOperationRequests []string
16325 err = json.Unmarshal(*v, &resourceGuardOperationRequests)
16326 if err != nil {
16327 return err
16328 }
16329 mpp.ResourceGuardOperationRequests = &resourceGuardOperationRequests
16330 }
16331 case "backupManagementType":
16332 if v != nil {
16333 var backupManagementType ManagementTypeBasicProtectionPolicy
16334 err = json.Unmarshal(*v, &backupManagementType)
16335 if err != nil {
16336 return err
16337 }
16338 mpp.BackupManagementType = backupManagementType
16339 }
16340 }
16341 }
16342
16343 return nil
16344 }
16345
16346
16347 type ManagementUsage struct {
16348
16349 Unit UsagesUnit `json:"unit,omitempty"`
16350
16351 QuotaPeriod *string `json:"quotaPeriod,omitempty"`
16352
16353 NextResetTime *date.Time `json:"nextResetTime,omitempty"`
16354
16355 CurrentValue *int64 `json:"currentValue,omitempty"`
16356
16357 Limit *int64 `json:"limit,omitempty"`
16358
16359 Name *NameInfo `json:"name,omitempty"`
16360 }
16361
16362
16363 type ManagementUsageList struct {
16364 autorest.Response `json:"-"`
16365
16366 Value *[]ManagementUsage `json:"value,omitempty"`
16367 }
16368
16369
16370 type MonthlyRetentionSchedule struct {
16371
16372 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
16373
16374 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
16375
16376 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
16377
16378 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
16379
16380 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
16381 }
16382
16383
16384
16385 type MoveRecoveryPointFuture struct {
16386 azure.FutureAPI
16387
16388
16389 Result func(BaseClient) (autorest.Response, error)
16390 }
16391
16392
16393 func (future *MoveRecoveryPointFuture) UnmarshalJSON(body []byte) error {
16394 var azFuture azure.Future
16395 if err := json.Unmarshal(body, &azFuture); err != nil {
16396 return err
16397 }
16398 future.FutureAPI = &azFuture
16399 future.Result = future.result
16400 return nil
16401 }
16402
16403
16404 func (future *MoveRecoveryPointFuture) result(client BaseClient) (ar autorest.Response, err error) {
16405 var done bool
16406 done, err = future.DoneWithContext(context.Background(), client)
16407 if err != nil {
16408 err = autorest.NewErrorWithError(err, "backup.MoveRecoveryPointFuture", "Result", future.Response(), "Polling failure")
16409 return
16410 }
16411 if !done {
16412 ar.Response = future.Response()
16413 err = azure.NewAsyncOpIncompleteError("backup.MoveRecoveryPointFuture")
16414 return
16415 }
16416 ar.Response = future.Response()
16417 return
16418 }
16419
16420
16421 type MoveRPAcrossTiersRequest struct {
16422
16423 ObjectType *string `json:"objectType,omitempty"`
16424
16425 SourceTierType RecoveryPointTierType `json:"sourceTierType,omitempty"`
16426
16427 TargetTierType RecoveryPointTierType `json:"targetTierType,omitempty"`
16428 }
16429
16430
16431 type NameInfo struct {
16432
16433 Value *string `json:"value,omitempty"`
16434
16435 LocalizedValue *string `json:"localizedValue,omitempty"`
16436 }
16437
16438
16439 type NewErrorResponse struct {
16440
16441 Error *NewErrorResponseError `json:"error,omitempty"`
16442 }
16443
16444
16445 type NewErrorResponseError struct {
16446
16447 Code *string `json:"code,omitempty"`
16448
16449 Message *string `json:"message,omitempty"`
16450
16451 Target *string `json:"target,omitempty"`
16452
16453 Details *[]NewErrorResponse `json:"details,omitempty"`
16454
16455 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
16456 }
16457
16458
16459 func (ner NewErrorResponseError) MarshalJSON() ([]byte, error) {
16460 objectMap := make(map[string]interface{})
16461 return json.Marshal(objectMap)
16462 }
16463
16464
16465 type OperationResultInfo struct {
16466
16467 JobList *[]string `json:"jobList,omitempty"`
16468
16469 ObjectType ObjectType `json:"objectType,omitempty"`
16470 }
16471
16472
16473 func (ori OperationResultInfo) MarshalJSON() ([]byte, error) {
16474 ori.ObjectType = ObjectTypeOperationResultInfo
16475 objectMap := make(map[string]interface{})
16476 if ori.JobList != nil {
16477 objectMap["jobList"] = ori.JobList
16478 }
16479 if ori.ObjectType != "" {
16480 objectMap["objectType"] = ori.ObjectType
16481 }
16482 return json.Marshal(objectMap)
16483 }
16484
16485
16486 func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
16487 return nil, false
16488 }
16489
16490
16491 func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
16492 return &ori, true
16493 }
16494
16495
16496 func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
16497 return nil, false
16498 }
16499
16500
16501 func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
16502 return &ori, true
16503 }
16504
16505
16506 type BasicOperationResultInfoBase interface {
16507 AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool)
16508 AsOperationResultInfo() (*OperationResultInfo, bool)
16509 AsOperationResultInfoBase() (*OperationResultInfoBase, bool)
16510 }
16511
16512
16513 type OperationResultInfoBase struct {
16514
16515 ObjectType ObjectType `json:"objectType,omitempty"`
16516 }
16517
16518 func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) {
16519 var m map[string]interface{}
16520 err := json.Unmarshal(body, &m)
16521 if err != nil {
16522 return nil, err
16523 }
16524
16525 switch m["objectType"] {
16526 case string(ObjectTypeExportJobsOperationResultInfo):
16527 var ejori ExportJobsOperationResultInfo
16528 err := json.Unmarshal(body, &ejori)
16529 return ejori, err
16530 case string(ObjectTypeOperationResultInfo):
16531 var ori OperationResultInfo
16532 err := json.Unmarshal(body, &ori)
16533 return ori, err
16534 default:
16535 var orib OperationResultInfoBase
16536 err := json.Unmarshal(body, &orib)
16537 return orib, err
16538 }
16539 }
16540 func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) {
16541 var rawMessages []*json.RawMessage
16542 err := json.Unmarshal(body, &rawMessages)
16543 if err != nil {
16544 return nil, err
16545 }
16546
16547 oribArray := make([]BasicOperationResultInfoBase, len(rawMessages))
16548
16549 for index, rawMessage := range rawMessages {
16550 orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage)
16551 if err != nil {
16552 return nil, err
16553 }
16554 oribArray[index] = orib
16555 }
16556 return oribArray, nil
16557 }
16558
16559
16560 func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) {
16561 orib.ObjectType = ObjectTypeOperationResultInfoBase
16562 objectMap := make(map[string]interface{})
16563 if orib.ObjectType != "" {
16564 objectMap["objectType"] = orib.ObjectType
16565 }
16566 return json.Marshal(objectMap)
16567 }
16568
16569
16570 func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
16571 return nil, false
16572 }
16573
16574
16575 func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) {
16576 return nil, false
16577 }
16578
16579
16580 func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
16581 return &orib, true
16582 }
16583
16584
16585 func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
16586 return &orib, true
16587 }
16588
16589
16590 type OperationResultInfoBaseResource struct {
16591 autorest.Response `json:"-"`
16592
16593 Operation BasicOperationResultInfoBase `json:"operation,omitempty"`
16594
16595 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
16596
16597 Headers map[string][]string `json:"headers"`
16598 }
16599
16600
16601 func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) {
16602 objectMap := make(map[string]interface{})
16603 objectMap["operation"] = oribr.Operation
16604 if oribr.StatusCode != "" {
16605 objectMap["statusCode"] = oribr.StatusCode
16606 }
16607 if oribr.Headers != nil {
16608 objectMap["headers"] = oribr.Headers
16609 }
16610 return json.Marshal(objectMap)
16611 }
16612
16613
16614 func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error {
16615 var m map[string]*json.RawMessage
16616 err := json.Unmarshal(body, &m)
16617 if err != nil {
16618 return err
16619 }
16620 for k, v := range m {
16621 switch k {
16622 case "operation":
16623 if v != nil {
16624 operation, err := unmarshalBasicOperationResultInfoBase(*v)
16625 if err != nil {
16626 return err
16627 }
16628 oribr.Operation = operation
16629 }
16630 case "statusCode":
16631 if v != nil {
16632 var statusCode HTTPStatusCode
16633 err = json.Unmarshal(*v, &statusCode)
16634 if err != nil {
16635 return err
16636 }
16637 oribr.StatusCode = statusCode
16638 }
16639 case "headers":
16640 if v != nil {
16641 var headers map[string][]string
16642 err = json.Unmarshal(*v, &headers)
16643 if err != nil {
16644 return err
16645 }
16646 oribr.Headers = headers
16647 }
16648 }
16649 }
16650
16651 return nil
16652 }
16653
16654
16655 type OperationStatus struct {
16656 autorest.Response `json:"-"`
16657
16658 ID *string `json:"id,omitempty"`
16659
16660 Name *string `json:"name,omitempty"`
16661
16662 Status OperationStatusValues `json:"status,omitempty"`
16663
16664 StartTime *date.Time `json:"startTime,omitempty"`
16665
16666 EndTime *date.Time `json:"endTime,omitempty"`
16667
16668 Error *OperationStatusError `json:"error,omitempty"`
16669
16670 Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"`
16671 }
16672
16673
16674 func (osVar *OperationStatus) UnmarshalJSON(body []byte) error {
16675 var m map[string]*json.RawMessage
16676 err := json.Unmarshal(body, &m)
16677 if err != nil {
16678 return err
16679 }
16680 for k, v := range m {
16681 switch k {
16682 case "id":
16683 if v != nil {
16684 var ID string
16685 err = json.Unmarshal(*v, &ID)
16686 if err != nil {
16687 return err
16688 }
16689 osVar.ID = &ID
16690 }
16691 case "name":
16692 if v != nil {
16693 var name string
16694 err = json.Unmarshal(*v, &name)
16695 if err != nil {
16696 return err
16697 }
16698 osVar.Name = &name
16699 }
16700 case "status":
16701 if v != nil {
16702 var status OperationStatusValues
16703 err = json.Unmarshal(*v, &status)
16704 if err != nil {
16705 return err
16706 }
16707 osVar.Status = status
16708 }
16709 case "startTime":
16710 if v != nil {
16711 var startTime date.Time
16712 err = json.Unmarshal(*v, &startTime)
16713 if err != nil {
16714 return err
16715 }
16716 osVar.StartTime = &startTime
16717 }
16718 case "endTime":
16719 if v != nil {
16720 var endTime date.Time
16721 err = json.Unmarshal(*v, &endTime)
16722 if err != nil {
16723 return err
16724 }
16725 osVar.EndTime = &endTime
16726 }
16727 case "error":
16728 if v != nil {
16729 var errorVar OperationStatusError
16730 err = json.Unmarshal(*v, &errorVar)
16731 if err != nil {
16732 return err
16733 }
16734 osVar.Error = &errorVar
16735 }
16736 case "properties":
16737 if v != nil {
16738 properties, err := unmarshalBasicOperationStatusExtendedInfo(*v)
16739 if err != nil {
16740 return err
16741 }
16742 osVar.Properties = properties
16743 }
16744 }
16745 }
16746
16747 return nil
16748 }
16749
16750
16751 type OperationStatusError struct {
16752
16753 Code *string `json:"code,omitempty"`
16754
16755 Message *string `json:"message,omitempty"`
16756 }
16757
16758
16759 type BasicOperationStatusExtendedInfo interface {
16760 AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool)
16761 AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool)
16762 AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool)
16763 AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool)
16764 AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool)
16765 }
16766
16767
16768 type OperationStatusExtendedInfo struct {
16769
16770 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16771 }
16772
16773 func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) {
16774 var m map[string]interface{}
16775 err := json.Unmarshal(body, &m)
16776 if err != nil {
16777 return nil, err
16778 }
16779
16780 switch m["objectType"] {
16781 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo):
16782 var osjei OperationStatusJobExtendedInfo
16783 err := json.Unmarshal(body, &osjei)
16784 return osjei, err
16785 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo):
16786 var osjei OperationStatusJobsExtendedInfo
16787 err := json.Unmarshal(body, &osjei)
16788 return osjei, err
16789 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo):
16790 var ospiei OperationStatusProvisionILRExtendedInfo
16791 err := json.Unmarshal(body, &ospiei)
16792 return ospiei, err
16793 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusValidateOperationExtendedInfo):
16794 var osvoei OperationStatusValidateOperationExtendedInfo
16795 err := json.Unmarshal(body, &osvoei)
16796 return osvoei, err
16797 default:
16798 var osei OperationStatusExtendedInfo
16799 err := json.Unmarshal(body, &osei)
16800 return osei, err
16801 }
16802 }
16803 func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) {
16804 var rawMessages []*json.RawMessage
16805 err := json.Unmarshal(body, &rawMessages)
16806 if err != nil {
16807 return nil, err
16808 }
16809
16810 oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages))
16811
16812 for index, rawMessage := range rawMessages {
16813 osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage)
16814 if err != nil {
16815 return nil, err
16816 }
16817 oseiArray[index] = osei
16818 }
16819 return oseiArray, nil
16820 }
16821
16822
16823 func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) {
16824 osei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusExtendedInfo
16825 objectMap := make(map[string]interface{})
16826 if osei.ObjectType != "" {
16827 objectMap["objectType"] = osei.ObjectType
16828 }
16829 return json.Marshal(objectMap)
16830 }
16831
16832
16833 func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16834 return nil, false
16835 }
16836
16837
16838 func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16839 return nil, false
16840 }
16841
16842
16843 func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16844 return nil, false
16845 }
16846
16847
16848 func (osei OperationStatusExtendedInfo) AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool) {
16849 return nil, false
16850 }
16851
16852
16853 func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16854 return &osei, true
16855 }
16856
16857
16858 func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16859 return &osei, true
16860 }
16861
16862
16863 type OperationStatusJobExtendedInfo struct {
16864
16865 JobID *string `json:"jobId,omitempty"`
16866
16867 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16868 }
16869
16870
16871 func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) {
16872 osjei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo
16873 objectMap := make(map[string]interface{})
16874 if osjei.JobID != nil {
16875 objectMap["jobId"] = osjei.JobID
16876 }
16877 if osjei.ObjectType != "" {
16878 objectMap["objectType"] = osjei.ObjectType
16879 }
16880 return json.Marshal(objectMap)
16881 }
16882
16883
16884 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16885 return &osjei, true
16886 }
16887
16888
16889 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16890 return nil, false
16891 }
16892
16893
16894 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16895 return nil, false
16896 }
16897
16898
16899 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool) {
16900 return nil, false
16901 }
16902
16903
16904 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16905 return nil, false
16906 }
16907
16908
16909 func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16910 return &osjei, true
16911 }
16912
16913
16914 type OperationStatusJobsExtendedInfo struct {
16915
16916 JobIds *[]string `json:"jobIds,omitempty"`
16917
16918 FailedJobsError map[string]*string `json:"failedJobsError"`
16919
16920 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16921 }
16922
16923
16924 func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) {
16925 osjei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo
16926 objectMap := make(map[string]interface{})
16927 if osjei.JobIds != nil {
16928 objectMap["jobIds"] = osjei.JobIds
16929 }
16930 if osjei.FailedJobsError != nil {
16931 objectMap["failedJobsError"] = osjei.FailedJobsError
16932 }
16933 if osjei.ObjectType != "" {
16934 objectMap["objectType"] = osjei.ObjectType
16935 }
16936 return json.Marshal(objectMap)
16937 }
16938
16939
16940 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16941 return nil, false
16942 }
16943
16944
16945 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16946 return &osjei, true
16947 }
16948
16949
16950 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16951 return nil, false
16952 }
16953
16954
16955 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool) {
16956 return nil, false
16957 }
16958
16959
16960 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16961 return nil, false
16962 }
16963
16964
16965 func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16966 return &osjei, true
16967 }
16968
16969
16970 type OperationStatusProvisionILRExtendedInfo struct {
16971
16972 RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"`
16973
16974 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16975 }
16976
16977
16978 func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) {
16979 ospiei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo
16980 objectMap := make(map[string]interface{})
16981 if ospiei.RecoveryTarget != nil {
16982 objectMap["recoveryTarget"] = ospiei.RecoveryTarget
16983 }
16984 if ospiei.ObjectType != "" {
16985 objectMap["objectType"] = ospiei.ObjectType
16986 }
16987 return json.Marshal(objectMap)
16988 }
16989
16990
16991 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16992 return nil, false
16993 }
16994
16995
16996 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16997 return nil, false
16998 }
16999
17000
17001 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
17002 return &ospiei, true
17003 }
17004
17005
17006 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool) {
17007 return nil, false
17008 }
17009
17010
17011 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
17012 return nil, false
17013 }
17014
17015
17016 func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
17017 return &ospiei, true
17018 }
17019
17020
17021
17022 type OperationStatusValidateOperationExtendedInfo struct {
17023
17024 ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"`
17025
17026 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
17027 }
17028
17029
17030 func (osvoei OperationStatusValidateOperationExtendedInfo) MarshalJSON() ([]byte, error) {
17031 osvoei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusValidateOperationExtendedInfo
17032 objectMap := make(map[string]interface{})
17033 if osvoei.ValidateOperationResponse != nil {
17034 objectMap["validateOperationResponse"] = osvoei.ValidateOperationResponse
17035 }
17036 if osvoei.ObjectType != "" {
17037 objectMap["objectType"] = osvoei.ObjectType
17038 }
17039 return json.Marshal(objectMap)
17040 }
17041
17042
17043 func (osvoei OperationStatusValidateOperationExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
17044 return nil, false
17045 }
17046
17047
17048 func (osvoei OperationStatusValidateOperationExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
17049 return nil, false
17050 }
17051
17052
17053 func (osvoei OperationStatusValidateOperationExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
17054 return nil, false
17055 }
17056
17057
17058 func (osvoei OperationStatusValidateOperationExtendedInfo) AsOperationStatusValidateOperationExtendedInfo() (*OperationStatusValidateOperationExtendedInfo, bool) {
17059 return &osvoei, true
17060 }
17061
17062
17063 func (osvoei OperationStatusValidateOperationExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
17064 return nil, false
17065 }
17066
17067
17068 func (osvoei OperationStatusValidateOperationExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
17069 return &osvoei, true
17070 }
17071
17072
17073 type OperationWorkerResponse struct {
17074
17075 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
17076
17077 Headers map[string][]string `json:"headers"`
17078 }
17079
17080
17081 func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) {
17082 objectMap := make(map[string]interface{})
17083 if owr.StatusCode != "" {
17084 objectMap["statusCode"] = owr.StatusCode
17085 }
17086 if owr.Headers != nil {
17087 objectMap["headers"] = owr.Headers
17088 }
17089 return json.Marshal(objectMap)
17090 }
17091
17092
17093 type PointInTimeRange struct {
17094
17095 StartTime *date.Time `json:"startTime,omitempty"`
17096
17097 EndTime *date.Time `json:"endTime,omitempty"`
17098 }
17099
17100
17101 type PreBackupValidation struct {
17102
17103 Status InquiryStatus `json:"status,omitempty"`
17104
17105 Code *string `json:"code,omitempty"`
17106
17107 Message *string `json:"message,omitempty"`
17108 }
17109
17110
17111 type PrepareDataMoveRequest struct {
17112
17113 TargetResourceID *string `json:"targetResourceId,omitempty"`
17114
17115 TargetRegion *string `json:"targetRegion,omitempty"`
17116
17117 DataMoveLevel DataMoveLevel `json:"dataMoveLevel,omitempty"`
17118
17119
17120 SourceContainerArmIds *[]string `json:"sourceContainerArmIds,omitempty"`
17121
17122 IgnoreMoved *bool `json:"ignoreMoved,omitempty"`
17123 }
17124
17125
17126 type PrepareDataMoveResponse struct {
17127
17128 CorrelationID *string `json:"correlationId,omitempty"`
17129
17130 SourceVaultProperties map[string]*string `json:"sourceVaultProperties"`
17131
17132 ObjectType ObjectTypeBasicVaultStorageConfigOperationResultResponse `json:"objectType,omitempty"`
17133 }
17134
17135
17136 func (pdmr PrepareDataMoveResponse) MarshalJSON() ([]byte, error) {
17137 pdmr.ObjectType = ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse
17138 objectMap := make(map[string]interface{})
17139 if pdmr.CorrelationID != nil {
17140 objectMap["correlationId"] = pdmr.CorrelationID
17141 }
17142 if pdmr.SourceVaultProperties != nil {
17143 objectMap["sourceVaultProperties"] = pdmr.SourceVaultProperties
17144 }
17145 if pdmr.ObjectType != "" {
17146 objectMap["objectType"] = pdmr.ObjectType
17147 }
17148 return json.Marshal(objectMap)
17149 }
17150
17151
17152 func (pdmr PrepareDataMoveResponse) AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool) {
17153 return &pdmr, true
17154 }
17155
17156
17157 func (pdmr PrepareDataMoveResponse) AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool) {
17158 return nil, false
17159 }
17160
17161
17162 func (pdmr PrepareDataMoveResponse) AsBasicVaultStorageConfigOperationResultResponse() (BasicVaultStorageConfigOperationResultResponse, bool) {
17163 return &pdmr, true
17164 }
17165
17166
17167
17168
17169
17170
17171
17172 type PreValidateEnableBackupRequest struct {
17173
17174 ResourceType DataSourceType `json:"resourceType,omitempty"`
17175
17176 ResourceID *string `json:"resourceId,omitempty"`
17177
17178 VaultID *string `json:"vaultId,omitempty"`
17179
17180 Properties *string `json:"properties,omitempty"`
17181 }
17182
17183
17184 type PreValidateEnableBackupResponse struct {
17185 autorest.Response `json:"-"`
17186
17187 Status ValidationStatus `json:"status,omitempty"`
17188
17189 ErrorCode *string `json:"errorCode,omitempty"`
17190
17191 ErrorMessage *string `json:"errorMessage,omitempty"`
17192
17193 Recommendation *string `json:"recommendation,omitempty"`
17194
17195
17196 ContainerName *string `json:"containerName,omitempty"`
17197
17198 ProtectedItemName *string `json:"protectedItemName,omitempty"`
17199 }
17200
17201
17202 type PrivateEndpoint struct {
17203
17204 ID *string `json:"id,omitempty"`
17205 }
17206
17207
17208 type PrivateEndpointConnection struct {
17209
17210 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17211
17212 PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
17213
17214 PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
17215 }
17216
17217
17218
17219 type PrivateEndpointConnectionDeleteFuture struct {
17220 azure.FutureAPI
17221
17222
17223 Result func(PrivateEndpointConnectionClient) (autorest.Response, error)
17224 }
17225
17226
17227 func (future *PrivateEndpointConnectionDeleteFuture) UnmarshalJSON(body []byte) error {
17228 var azFuture azure.Future
17229 if err := json.Unmarshal(body, &azFuture); err != nil {
17230 return err
17231 }
17232 future.FutureAPI = &azFuture
17233 future.Result = future.result
17234 return nil
17235 }
17236
17237
17238 func (future *PrivateEndpointConnectionDeleteFuture) result(client PrivateEndpointConnectionClient) (ar autorest.Response, err error) {
17239 var done bool
17240 done, err = future.DoneWithContext(context.Background(), client)
17241 if err != nil {
17242 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionDeleteFuture", "Result", future.Response(), "Polling failure")
17243 return
17244 }
17245 if !done {
17246 ar.Response = future.Response()
17247 err = azure.NewAsyncOpIncompleteError("backup.PrivateEndpointConnectionDeleteFuture")
17248 return
17249 }
17250 ar.Response = future.Response()
17251 return
17252 }
17253
17254
17255
17256 type PrivateEndpointConnectionPutFuture struct {
17257 azure.FutureAPI
17258
17259
17260 Result func(PrivateEndpointConnectionClient) (PrivateEndpointConnectionResource, error)
17261 }
17262
17263
17264 func (future *PrivateEndpointConnectionPutFuture) UnmarshalJSON(body []byte) error {
17265 var azFuture azure.Future
17266 if err := json.Unmarshal(body, &azFuture); err != nil {
17267 return err
17268 }
17269 future.FutureAPI = &azFuture
17270 future.Result = future.result
17271 return nil
17272 }
17273
17274
17275 func (future *PrivateEndpointConnectionPutFuture) result(client PrivateEndpointConnectionClient) (pecr PrivateEndpointConnectionResource, err error) {
17276 var done bool
17277 done, err = future.DoneWithContext(context.Background(), client)
17278 if err != nil {
17279 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionPutFuture", "Result", future.Response(), "Polling failure")
17280 return
17281 }
17282 if !done {
17283 pecr.Response.Response = future.Response()
17284 err = azure.NewAsyncOpIncompleteError("backup.PrivateEndpointConnectionPutFuture")
17285 return
17286 }
17287 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17288 if pecr.Response.Response, err = future.GetResult(sender); err == nil && pecr.Response.Response.StatusCode != http.StatusNoContent {
17289 pecr, err = client.PutResponder(pecr.Response.Response)
17290 if err != nil {
17291 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionPutFuture", "Result", pecr.Response.Response, "Failure responding to request")
17292 }
17293 }
17294 return
17295 }
17296
17297
17298 type PrivateEndpointConnectionResource struct {
17299 autorest.Response `json:"-"`
17300
17301 Properties *PrivateEndpointConnection `json:"properties,omitempty"`
17302
17303 ID *string `json:"id,omitempty"`
17304
17305 Name *string `json:"name,omitempty"`
17306
17307 Type *string `json:"type,omitempty"`
17308
17309 Location *string `json:"location,omitempty"`
17310
17311 Tags map[string]*string `json:"tags"`
17312
17313 ETag *string `json:"eTag,omitempty"`
17314 }
17315
17316
17317 func (pecr PrivateEndpointConnectionResource) MarshalJSON() ([]byte, error) {
17318 objectMap := make(map[string]interface{})
17319 if pecr.Properties != nil {
17320 objectMap["properties"] = pecr.Properties
17321 }
17322 if pecr.Location != nil {
17323 objectMap["location"] = pecr.Location
17324 }
17325 if pecr.Tags != nil {
17326 objectMap["tags"] = pecr.Tags
17327 }
17328 if pecr.ETag != nil {
17329 objectMap["eTag"] = pecr.ETag
17330 }
17331 return json.Marshal(objectMap)
17332 }
17333
17334
17335 type PrivateLinkServiceConnectionState struct {
17336
17337 Status PrivateEndpointConnectionStatus `json:"status,omitempty"`
17338
17339 Description *string `json:"description,omitempty"`
17340
17341 ActionRequired *string `json:"actionRequired,omitempty"`
17342 }
17343
17344
17345 type BasicProtectableContainer interface {
17346 AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool)
17347 AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool)
17348 AsProtectableContainer() (*ProtectableContainer, bool)
17349 }
17350
17351
17352 type ProtectableContainer struct {
17353
17354 FriendlyName *string `json:"friendlyName,omitempty"`
17355
17356 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17357
17358 HealthStatus *string `json:"healthStatus,omitempty"`
17359
17360 ContainerID *string `json:"containerId,omitempty"`
17361
17362 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
17363 }
17364
17365 func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) {
17366 var m map[string]interface{}
17367 err := json.Unmarshal(body, &m)
17368 if err != nil {
17369 return nil, err
17370 }
17371
17372 switch m["protectableContainerType"] {
17373 case string(ProtectableContainerTypeStorageContainer):
17374 var aspc AzureStorageProtectableContainer
17375 err := json.Unmarshal(body, &aspc)
17376 return aspc, err
17377 case string(ProtectableContainerTypeVMAppContainer):
17378 var avacpc AzureVMAppContainerProtectableContainer
17379 err := json.Unmarshal(body, &avacpc)
17380 return avacpc, err
17381 default:
17382 var pc ProtectableContainer
17383 err := json.Unmarshal(body, &pc)
17384 return pc, err
17385 }
17386 }
17387 func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) {
17388 var rawMessages []*json.RawMessage
17389 err := json.Unmarshal(body, &rawMessages)
17390 if err != nil {
17391 return nil, err
17392 }
17393
17394 pcArray := make([]BasicProtectableContainer, len(rawMessages))
17395
17396 for index, rawMessage := range rawMessages {
17397 pc, err := unmarshalBasicProtectableContainer(*rawMessage)
17398 if err != nil {
17399 return nil, err
17400 }
17401 pcArray[index] = pc
17402 }
17403 return pcArray, nil
17404 }
17405
17406
17407 func (pc ProtectableContainer) MarshalJSON() ([]byte, error) {
17408 pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer
17409 objectMap := make(map[string]interface{})
17410 if pc.FriendlyName != nil {
17411 objectMap["friendlyName"] = pc.FriendlyName
17412 }
17413 if pc.BackupManagementType != "" {
17414 objectMap["backupManagementType"] = pc.BackupManagementType
17415 }
17416 if pc.HealthStatus != nil {
17417 objectMap["healthStatus"] = pc.HealthStatus
17418 }
17419 if pc.ContainerID != nil {
17420 objectMap["containerId"] = pc.ContainerID
17421 }
17422 if pc.ProtectableContainerType != "" {
17423 objectMap["protectableContainerType"] = pc.ProtectableContainerType
17424 }
17425 return json.Marshal(objectMap)
17426 }
17427
17428
17429 func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
17430 return nil, false
17431 }
17432
17433
17434 func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
17435 return nil, false
17436 }
17437
17438
17439 func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
17440 return &pc, true
17441 }
17442
17443
17444 func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
17445 return &pc, true
17446 }
17447
17448
17449 type ProtectableContainerResource struct {
17450
17451 Properties BasicProtectableContainer `json:"properties,omitempty"`
17452
17453 ID *string `json:"id,omitempty"`
17454
17455 Name *string `json:"name,omitempty"`
17456
17457 Type *string `json:"type,omitempty"`
17458
17459 Location *string `json:"location,omitempty"`
17460
17461 Tags map[string]*string `json:"tags"`
17462
17463 ETag *string `json:"eTag,omitempty"`
17464 }
17465
17466
17467 func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) {
17468 objectMap := make(map[string]interface{})
17469 objectMap["properties"] = pcr.Properties
17470 if pcr.Location != nil {
17471 objectMap["location"] = pcr.Location
17472 }
17473 if pcr.Tags != nil {
17474 objectMap["tags"] = pcr.Tags
17475 }
17476 if pcr.ETag != nil {
17477 objectMap["eTag"] = pcr.ETag
17478 }
17479 return json.Marshal(objectMap)
17480 }
17481
17482
17483 func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error {
17484 var m map[string]*json.RawMessage
17485 err := json.Unmarshal(body, &m)
17486 if err != nil {
17487 return err
17488 }
17489 for k, v := range m {
17490 switch k {
17491 case "properties":
17492 if v != nil {
17493 properties, err := unmarshalBasicProtectableContainer(*v)
17494 if err != nil {
17495 return err
17496 }
17497 pcr.Properties = properties
17498 }
17499 case "id":
17500 if v != nil {
17501 var ID string
17502 err = json.Unmarshal(*v, &ID)
17503 if err != nil {
17504 return err
17505 }
17506 pcr.ID = &ID
17507 }
17508 case "name":
17509 if v != nil {
17510 var name string
17511 err = json.Unmarshal(*v, &name)
17512 if err != nil {
17513 return err
17514 }
17515 pcr.Name = &name
17516 }
17517 case "type":
17518 if v != nil {
17519 var typeVar string
17520 err = json.Unmarshal(*v, &typeVar)
17521 if err != nil {
17522 return err
17523 }
17524 pcr.Type = &typeVar
17525 }
17526 case "location":
17527 if v != nil {
17528 var location string
17529 err = json.Unmarshal(*v, &location)
17530 if err != nil {
17531 return err
17532 }
17533 pcr.Location = &location
17534 }
17535 case "tags":
17536 if v != nil {
17537 var tags map[string]*string
17538 err = json.Unmarshal(*v, &tags)
17539 if err != nil {
17540 return err
17541 }
17542 pcr.Tags = tags
17543 }
17544 case "eTag":
17545 if v != nil {
17546 var eTag string
17547 err = json.Unmarshal(*v, &eTag)
17548 if err != nil {
17549 return err
17550 }
17551 pcr.ETag = &eTag
17552 }
17553 }
17554 }
17555
17556 return nil
17557 }
17558
17559
17560 type ProtectableContainerResourceList struct {
17561 autorest.Response `json:"-"`
17562
17563 Value *[]ProtectableContainerResource `json:"value,omitempty"`
17564
17565 NextLink *string `json:"nextLink,omitempty"`
17566 }
17567
17568
17569
17570 type ProtectableContainerResourceListIterator struct {
17571 i int
17572 page ProtectableContainerResourceListPage
17573 }
17574
17575
17576
17577 func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
17578 if tracing.IsEnabled() {
17579 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext")
17580 defer func() {
17581 sc := -1
17582 if iter.Response().Response.Response != nil {
17583 sc = iter.Response().Response.Response.StatusCode
17584 }
17585 tracing.EndSpan(ctx, sc, err)
17586 }()
17587 }
17588 iter.i++
17589 if iter.i < len(iter.page.Values()) {
17590 return nil
17591 }
17592 err = iter.page.NextWithContext(ctx)
17593 if err != nil {
17594 iter.i--
17595 return err
17596 }
17597 iter.i = 0
17598 return nil
17599 }
17600
17601
17602
17603
17604 func (iter *ProtectableContainerResourceListIterator) Next() error {
17605 return iter.NextWithContext(context.Background())
17606 }
17607
17608
17609 func (iter ProtectableContainerResourceListIterator) NotDone() bool {
17610 return iter.page.NotDone() && iter.i < len(iter.page.Values())
17611 }
17612
17613
17614 func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList {
17615 return iter.page.Response()
17616 }
17617
17618
17619
17620 func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource {
17621 if !iter.page.NotDone() {
17622 return ProtectableContainerResource{}
17623 }
17624 return iter.page.Values()[iter.i]
17625 }
17626
17627
17628 func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator {
17629 return ProtectableContainerResourceListIterator{page: page}
17630 }
17631
17632
17633 func (pcrl ProtectableContainerResourceList) IsEmpty() bool {
17634 return pcrl.Value == nil || len(*pcrl.Value) == 0
17635 }
17636
17637
17638 func (pcrl ProtectableContainerResourceList) hasNextLink() bool {
17639 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
17640 }
17641
17642
17643
17644 func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
17645 if !pcrl.hasNextLink() {
17646 return nil, nil
17647 }
17648 return autorest.Prepare((&http.Request{}).WithContext(ctx),
17649 autorest.AsJSON(),
17650 autorest.AsGet(),
17651 autorest.WithBaseURL(to.String(pcrl.NextLink)))
17652 }
17653
17654
17655 type ProtectableContainerResourceListPage struct {
17656 fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)
17657 pcrl ProtectableContainerResourceList
17658 }
17659
17660
17661
17662 func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
17663 if tracing.IsEnabled() {
17664 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext")
17665 defer func() {
17666 sc := -1
17667 if page.Response().Response.Response != nil {
17668 sc = page.Response().Response.Response.StatusCode
17669 }
17670 tracing.EndSpan(ctx, sc, err)
17671 }()
17672 }
17673 for {
17674 next, err := page.fn(ctx, page.pcrl)
17675 if err != nil {
17676 return err
17677 }
17678 page.pcrl = next
17679 if !next.hasNextLink() || !next.IsEmpty() {
17680 break
17681 }
17682 }
17683 return nil
17684 }
17685
17686
17687
17688
17689 func (page *ProtectableContainerResourceListPage) Next() error {
17690 return page.NextWithContext(context.Background())
17691 }
17692
17693
17694 func (page ProtectableContainerResourceListPage) NotDone() bool {
17695 return !page.pcrl.IsEmpty()
17696 }
17697
17698
17699 func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList {
17700 return page.pcrl
17701 }
17702
17703
17704 func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource {
17705 if page.pcrl.IsEmpty() {
17706 return nil
17707 }
17708 return *page.pcrl.Value
17709 }
17710
17711
17712 func NewProtectableContainerResourceListPage(cur ProtectableContainerResourceList, getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage {
17713 return ProtectableContainerResourceListPage{
17714 fn: getNextPage,
17715 pcrl: cur,
17716 }
17717 }
17718
17719
17720 type BasicProtectedItem interface {
17721 AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool)
17722 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
17723 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
17724 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
17725 AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool)
17726 AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool)
17727 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
17728 AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool)
17729 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
17730 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
17731 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
17732 AsDPMProtectedItem() (*DPMProtectedItem, bool)
17733 AsGenericProtectedItem() (*GenericProtectedItem, bool)
17734 AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool)
17735 AsProtectedItem() (*ProtectedItem, bool)
17736 }
17737
17738
17739 type ProtectedItem struct {
17740
17741 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17742
17743 WorkloadType DataSourceType `json:"workloadType,omitempty"`
17744
17745 ContainerName *string `json:"containerName,omitempty"`
17746
17747 SourceResourceID *string `json:"sourceResourceId,omitempty"`
17748
17749 PolicyID *string `json:"policyId,omitempty"`
17750
17751 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
17752
17753 BackupSetName *string `json:"backupSetName,omitempty"`
17754
17755 CreateMode CreateMode `json:"createMode,omitempty"`
17756
17757 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
17758
17759 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
17760
17761 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
17762
17763 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
17764
17765 IsRehydrate *bool `json:"isRehydrate,omitempty"`
17766
17767 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
17768
17769 IsArchiveEnabled *bool `json:"isArchiveEnabled,omitempty"`
17770
17771 PolicyName *string `json:"policyName,omitempty"`
17772
17773 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
17774 }
17775
17776 func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) {
17777 var m map[string]interface{}
17778 err := json.Unmarshal(body, &m)
17779 if err != nil {
17780 return nil, err
17781 }
17782
17783 switch m["protectedItemType"] {
17784 case string(ProtectedItemTypeAzureFileShareProtectedItem):
17785 var afpi AzureFileshareProtectedItem
17786 err := json.Unmarshal(body, &afpi)
17787 return afpi, err
17788 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
17789 var aisccvpi AzureIaaSClassicComputeVMProtectedItem
17790 err := json.Unmarshal(body, &aisccvpi)
17791 return aisccvpi, err
17792 case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
17793 var aiscvpi AzureIaaSComputeVMProtectedItem
17794 err := json.Unmarshal(body, &aiscvpi)
17795 return aiscvpi, err
17796 case string(ProtectedItemTypeAzureIaaSVMProtectedItem):
17797 var aispi AzureIaaSVMProtectedItem
17798 err := json.Unmarshal(body, &aispi)
17799 return aispi, err
17800 case string(ProtectedItemTypeMicrosoftSqlserversdatabases):
17801 var aspi AzureSQLProtectedItem
17802 err := json.Unmarshal(body, &aspi)
17803 return aspi, err
17804 case string(ProtectedItemTypeAzureVMWorkloadProtectedItem):
17805 var avwpi AzureVMWorkloadProtectedItem
17806 err := json.Unmarshal(body, &avwpi)
17807 return avwpi, err
17808 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
17809 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
17810 err := json.Unmarshal(body, &avwsadpi)
17811 return avwsadpi, err
17812 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
17813 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
17814 err := json.Unmarshal(body, &avwshdpi)
17815 return avwshdpi, err
17816 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
17817 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
17818 err := json.Unmarshal(body, &avwsdpi)
17819 return avwsdpi, err
17820 case string(ProtectedItemTypeDPMProtectedItem):
17821 var dpi DPMProtectedItem
17822 err := json.Unmarshal(body, &dpi)
17823 return dpi, err
17824 case string(ProtectedItemTypeGenericProtectedItem):
17825 var gpi GenericProtectedItem
17826 err := json.Unmarshal(body, &gpi)
17827 return gpi, err
17828 case string(ProtectedItemTypeMabFileFolderProtectedItem):
17829 var mffpi MabFileFolderProtectedItem
17830 err := json.Unmarshal(body, &mffpi)
17831 return mffpi, err
17832 default:
17833 var pi ProtectedItem
17834 err := json.Unmarshal(body, &pi)
17835 return pi, err
17836 }
17837 }
17838 func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) {
17839 var rawMessages []*json.RawMessage
17840 err := json.Unmarshal(body, &rawMessages)
17841 if err != nil {
17842 return nil, err
17843 }
17844
17845 piArray := make([]BasicProtectedItem, len(rawMessages))
17846
17847 for index, rawMessage := range rawMessages {
17848 pi, err := unmarshalBasicProtectedItem(*rawMessage)
17849 if err != nil {
17850 return nil, err
17851 }
17852 piArray[index] = pi
17853 }
17854 return piArray, nil
17855 }
17856
17857
17858 func (pi ProtectedItem) MarshalJSON() ([]byte, error) {
17859 pi.ProtectedItemType = ProtectedItemTypeProtectedItem
17860 objectMap := make(map[string]interface{})
17861 if pi.BackupManagementType != "" {
17862 objectMap["backupManagementType"] = pi.BackupManagementType
17863 }
17864 if pi.WorkloadType != "" {
17865 objectMap["workloadType"] = pi.WorkloadType
17866 }
17867 if pi.ContainerName != nil {
17868 objectMap["containerName"] = pi.ContainerName
17869 }
17870 if pi.SourceResourceID != nil {
17871 objectMap["sourceResourceId"] = pi.SourceResourceID
17872 }
17873 if pi.PolicyID != nil {
17874 objectMap["policyId"] = pi.PolicyID
17875 }
17876 if pi.LastRecoveryPoint != nil {
17877 objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint
17878 }
17879 if pi.BackupSetName != nil {
17880 objectMap["backupSetName"] = pi.BackupSetName
17881 }
17882 if pi.CreateMode != "" {
17883 objectMap["createMode"] = pi.CreateMode
17884 }
17885 if pi.DeferredDeleteTimeInUTC != nil {
17886 objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC
17887 }
17888 if pi.IsScheduledForDeferredDelete != nil {
17889 objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete
17890 }
17891 if pi.DeferredDeleteTimeRemaining != nil {
17892 objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining
17893 }
17894 if pi.IsDeferredDeleteScheduleUpcoming != nil {
17895 objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming
17896 }
17897 if pi.IsRehydrate != nil {
17898 objectMap["isRehydrate"] = pi.IsRehydrate
17899 }
17900 if pi.ResourceGuardOperationRequests != nil {
17901 objectMap["resourceGuardOperationRequests"] = pi.ResourceGuardOperationRequests
17902 }
17903 if pi.IsArchiveEnabled != nil {
17904 objectMap["isArchiveEnabled"] = pi.IsArchiveEnabled
17905 }
17906 if pi.PolicyName != nil {
17907 objectMap["policyName"] = pi.PolicyName
17908 }
17909 if pi.ProtectedItemType != "" {
17910 objectMap["protectedItemType"] = pi.ProtectedItemType
17911 }
17912 return json.Marshal(objectMap)
17913 }
17914
17915
17916 func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
17917 return nil, false
17918 }
17919
17920
17921 func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
17922 return nil, false
17923 }
17924
17925
17926 func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
17927 return nil, false
17928 }
17929
17930
17931 func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
17932 return nil, false
17933 }
17934
17935
17936 func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
17937 return nil, false
17938 }
17939
17940
17941 func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
17942 return nil, false
17943 }
17944
17945
17946 func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
17947 return nil, false
17948 }
17949
17950
17951 func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
17952 return nil, false
17953 }
17954
17955
17956 func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
17957 return nil, false
17958 }
17959
17960
17961 func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
17962 return nil, false
17963 }
17964
17965
17966 func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
17967 return nil, false
17968 }
17969
17970
17971 func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
17972 return nil, false
17973 }
17974
17975
17976 func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
17977 return nil, false
17978 }
17979
17980
17981 func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
17982 return nil, false
17983 }
17984
17985
17986 func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
17987 return &pi, true
17988 }
17989
17990
17991 func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
17992 return &pi, true
17993 }
17994
17995
17996 type ProtectedItemQueryObject struct {
17997
17998 HealthState HealthState `json:"healthState,omitempty"`
17999
18000 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18001
18002 ItemType DataSourceType `json:"itemType,omitempty"`
18003
18004 PolicyName *string `json:"policyName,omitempty"`
18005
18006 ContainerName *string `json:"containerName,omitempty"`
18007
18008 BackupEngineName *string `json:"backupEngineName,omitempty"`
18009
18010 FriendlyName *string `json:"friendlyName,omitempty"`
18011
18012 FabricName *string `json:"fabricName,omitempty"`
18013
18014 BackupSetName *string `json:"backupSetName,omitempty"`
18015 }
18016
18017
18018 type ProtectedItemResource struct {
18019 autorest.Response `json:"-"`
18020
18021 Properties BasicProtectedItem `json:"properties,omitempty"`
18022
18023 ID *string `json:"id,omitempty"`
18024
18025 Name *string `json:"name,omitempty"`
18026
18027 Type *string `json:"type,omitempty"`
18028
18029 Location *string `json:"location,omitempty"`
18030
18031 Tags map[string]*string `json:"tags"`
18032
18033 ETag *string `json:"eTag,omitempty"`
18034 }
18035
18036
18037 func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) {
18038 objectMap := make(map[string]interface{})
18039 objectMap["properties"] = pir.Properties
18040 if pir.Location != nil {
18041 objectMap["location"] = pir.Location
18042 }
18043 if pir.Tags != nil {
18044 objectMap["tags"] = pir.Tags
18045 }
18046 if pir.ETag != nil {
18047 objectMap["eTag"] = pir.ETag
18048 }
18049 return json.Marshal(objectMap)
18050 }
18051
18052
18053 func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error {
18054 var m map[string]*json.RawMessage
18055 err := json.Unmarshal(body, &m)
18056 if err != nil {
18057 return err
18058 }
18059 for k, v := range m {
18060 switch k {
18061 case "properties":
18062 if v != nil {
18063 properties, err := unmarshalBasicProtectedItem(*v)
18064 if err != nil {
18065 return err
18066 }
18067 pir.Properties = properties
18068 }
18069 case "id":
18070 if v != nil {
18071 var ID string
18072 err = json.Unmarshal(*v, &ID)
18073 if err != nil {
18074 return err
18075 }
18076 pir.ID = &ID
18077 }
18078 case "name":
18079 if v != nil {
18080 var name string
18081 err = json.Unmarshal(*v, &name)
18082 if err != nil {
18083 return err
18084 }
18085 pir.Name = &name
18086 }
18087 case "type":
18088 if v != nil {
18089 var typeVar string
18090 err = json.Unmarshal(*v, &typeVar)
18091 if err != nil {
18092 return err
18093 }
18094 pir.Type = &typeVar
18095 }
18096 case "location":
18097 if v != nil {
18098 var location string
18099 err = json.Unmarshal(*v, &location)
18100 if err != nil {
18101 return err
18102 }
18103 pir.Location = &location
18104 }
18105 case "tags":
18106 if v != nil {
18107 var tags map[string]*string
18108 err = json.Unmarshal(*v, &tags)
18109 if err != nil {
18110 return err
18111 }
18112 pir.Tags = tags
18113 }
18114 case "eTag":
18115 if v != nil {
18116 var eTag string
18117 err = json.Unmarshal(*v, &eTag)
18118 if err != nil {
18119 return err
18120 }
18121 pir.ETag = &eTag
18122 }
18123 }
18124 }
18125
18126 return nil
18127 }
18128
18129
18130 type ProtectedItemResourceList struct {
18131 autorest.Response `json:"-"`
18132
18133 Value *[]ProtectedItemResource `json:"value,omitempty"`
18134
18135 NextLink *string `json:"nextLink,omitempty"`
18136 }
18137
18138
18139 type ProtectedItemResourceListIterator struct {
18140 i int
18141 page ProtectedItemResourceListPage
18142 }
18143
18144
18145
18146 func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18147 if tracing.IsEnabled() {
18148 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext")
18149 defer func() {
18150 sc := -1
18151 if iter.Response().Response.Response != nil {
18152 sc = iter.Response().Response.Response.StatusCode
18153 }
18154 tracing.EndSpan(ctx, sc, err)
18155 }()
18156 }
18157 iter.i++
18158 if iter.i < len(iter.page.Values()) {
18159 return nil
18160 }
18161 err = iter.page.NextWithContext(ctx)
18162 if err != nil {
18163 iter.i--
18164 return err
18165 }
18166 iter.i = 0
18167 return nil
18168 }
18169
18170
18171
18172
18173 func (iter *ProtectedItemResourceListIterator) Next() error {
18174 return iter.NextWithContext(context.Background())
18175 }
18176
18177
18178 func (iter ProtectedItemResourceListIterator) NotDone() bool {
18179 return iter.page.NotDone() && iter.i < len(iter.page.Values())
18180 }
18181
18182
18183 func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList {
18184 return iter.page.Response()
18185 }
18186
18187
18188
18189 func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource {
18190 if !iter.page.NotDone() {
18191 return ProtectedItemResource{}
18192 }
18193 return iter.page.Values()[iter.i]
18194 }
18195
18196
18197 func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator {
18198 return ProtectedItemResourceListIterator{page: page}
18199 }
18200
18201
18202 func (pirl ProtectedItemResourceList) IsEmpty() bool {
18203 return pirl.Value == nil || len(*pirl.Value) == 0
18204 }
18205
18206
18207 func (pirl ProtectedItemResourceList) hasNextLink() bool {
18208 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
18209 }
18210
18211
18212
18213 func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
18214 if !pirl.hasNextLink() {
18215 return nil, nil
18216 }
18217 return autorest.Prepare((&http.Request{}).WithContext(ctx),
18218 autorest.AsJSON(),
18219 autorest.AsGet(),
18220 autorest.WithBaseURL(to.String(pirl.NextLink)))
18221 }
18222
18223
18224 type ProtectedItemResourceListPage struct {
18225 fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)
18226 pirl ProtectedItemResourceList
18227 }
18228
18229
18230
18231 func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
18232 if tracing.IsEnabled() {
18233 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext")
18234 defer func() {
18235 sc := -1
18236 if page.Response().Response.Response != nil {
18237 sc = page.Response().Response.Response.StatusCode
18238 }
18239 tracing.EndSpan(ctx, sc, err)
18240 }()
18241 }
18242 for {
18243 next, err := page.fn(ctx, page.pirl)
18244 if err != nil {
18245 return err
18246 }
18247 page.pirl = next
18248 if !next.hasNextLink() || !next.IsEmpty() {
18249 break
18250 }
18251 }
18252 return nil
18253 }
18254
18255
18256
18257
18258 func (page *ProtectedItemResourceListPage) Next() error {
18259 return page.NextWithContext(context.Background())
18260 }
18261
18262
18263 func (page ProtectedItemResourceListPage) NotDone() bool {
18264 return !page.pirl.IsEmpty()
18265 }
18266
18267
18268 func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList {
18269 return page.pirl
18270 }
18271
18272
18273 func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource {
18274 if page.pirl.IsEmpty() {
18275 return nil
18276 }
18277 return *page.pirl.Value
18278 }
18279
18280
18281 func NewProtectedItemResourceListPage(cur ProtectedItemResourceList, getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage {
18282 return ProtectedItemResourceListPage{
18283 fn: getNextPage,
18284 pirl: cur,
18285 }
18286 }
18287
18288
18289
18290 type BasicProtectionContainer interface {
18291 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
18292 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
18293 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
18294 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
18295 AsAzureSQLContainer() (*AzureSQLContainer, bool)
18296 AsAzureStorageContainer() (*AzureStorageContainer, bool)
18297 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
18298 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
18299 AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool)
18300 AsDpmContainer() (*DpmContainer, bool)
18301 AsBasicDpmContainer() (BasicDpmContainer, bool)
18302 AsGenericContainer() (*GenericContainer, bool)
18303 AsIaaSVMContainer() (*IaaSVMContainer, bool)
18304 AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool)
18305 AsMabContainer() (*MabContainer, bool)
18306 AsProtectionContainer() (*ProtectionContainer, bool)
18307 }
18308
18309
18310
18311 type ProtectionContainer struct {
18312
18313 FriendlyName *string `json:"friendlyName,omitempty"`
18314
18315 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18316
18317 RegistrationStatus *string `json:"registrationStatus,omitempty"`
18318
18319 HealthStatus *string `json:"healthStatus,omitempty"`
18320
18321 ProtectableObjectType *string `json:"protectableObjectType,omitempty"`
18322
18323 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
18324 }
18325
18326 func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) {
18327 var m map[string]interface{}
18328 err := json.Unmarshal(body, &m)
18329 if err != nil {
18330 return nil, err
18331 }
18332
18333 switch m["containerType"] {
18334 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer):
18335 var absc AzureBackupServerContainer
18336 err := json.Unmarshal(body, &absc)
18337 return absc, err
18338 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines):
18339 var aisccvc AzureIaaSClassicComputeVMContainer
18340 err := json.Unmarshal(body, &aisccvc)
18341 return aisccvc, err
18342 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines):
18343 var aiscvc AzureIaaSComputeVMContainer
18344 err := json.Unmarshal(body, &aiscvc)
18345 return aiscvc, err
18346 case string(ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer):
18347 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
18348 err := json.Unmarshal(body, &aswcpc)
18349 return aswcpc, err
18350 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer):
18351 var asc AzureSQLContainer
18352 err := json.Unmarshal(body, &asc)
18353 return asc, err
18354 case string(ContainerTypeBasicProtectionContainerContainerTypeStorageContainer):
18355 var asc AzureStorageContainer
18356 err := json.Unmarshal(body, &asc)
18357 return asc, err
18358 case string(ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer):
18359 var avacpc AzureVMAppContainerProtectionContainer
18360 err := json.Unmarshal(body, &avacpc)
18361 return avacpc, err
18362 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer):
18363 var awc AzureWorkloadContainer
18364 err := json.Unmarshal(body, &awc)
18365 return awc, err
18366 case string(ContainerTypeBasicProtectionContainerContainerTypeDPMContainer):
18367 var dc DpmContainer
18368 err := json.Unmarshal(body, &dc)
18369 return dc, err
18370 case string(ContainerTypeBasicProtectionContainerContainerTypeGenericContainer):
18371 var gc GenericContainer
18372 err := json.Unmarshal(body, &gc)
18373 return gc, err
18374 case string(ContainerTypeBasicProtectionContainerContainerTypeIaasVMContainer):
18375 var isc IaaSVMContainer
18376 err := json.Unmarshal(body, &isc)
18377 return isc, err
18378 case string(ContainerTypeBasicProtectionContainerContainerTypeWindows):
18379 var mc MabContainer
18380 err := json.Unmarshal(body, &mc)
18381 return mc, err
18382 default:
18383 var pc ProtectionContainer
18384 err := json.Unmarshal(body, &pc)
18385 return pc, err
18386 }
18387 }
18388 func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) {
18389 var rawMessages []*json.RawMessage
18390 err := json.Unmarshal(body, &rawMessages)
18391 if err != nil {
18392 return nil, err
18393 }
18394
18395 pcArray := make([]BasicProtectionContainer, len(rawMessages))
18396
18397 for index, rawMessage := range rawMessages {
18398 pc, err := unmarshalBasicProtectionContainer(*rawMessage)
18399 if err != nil {
18400 return nil, err
18401 }
18402 pcArray[index] = pc
18403 }
18404 return pcArray, nil
18405 }
18406
18407
18408 func (pc ProtectionContainer) MarshalJSON() ([]byte, error) {
18409 pc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer
18410 objectMap := make(map[string]interface{})
18411 if pc.FriendlyName != nil {
18412 objectMap["friendlyName"] = pc.FriendlyName
18413 }
18414 if pc.BackupManagementType != "" {
18415 objectMap["backupManagementType"] = pc.BackupManagementType
18416 }
18417 if pc.RegistrationStatus != nil {
18418 objectMap["registrationStatus"] = pc.RegistrationStatus
18419 }
18420 if pc.HealthStatus != nil {
18421 objectMap["healthStatus"] = pc.HealthStatus
18422 }
18423 if pc.ProtectableObjectType != nil {
18424 objectMap["protectableObjectType"] = pc.ProtectableObjectType
18425 }
18426 if pc.ContainerType != "" {
18427 objectMap["containerType"] = pc.ContainerType
18428 }
18429 return json.Marshal(objectMap)
18430 }
18431
18432
18433 func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
18434 return nil, false
18435 }
18436
18437
18438 func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
18439 return nil, false
18440 }
18441
18442
18443 func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
18444 return nil, false
18445 }
18446
18447
18448 func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
18449 return nil, false
18450 }
18451
18452
18453 func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
18454 return nil, false
18455 }
18456
18457
18458 func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
18459 return nil, false
18460 }
18461
18462
18463 func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
18464 return nil, false
18465 }
18466
18467
18468 func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
18469 return nil, false
18470 }
18471
18472
18473 func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
18474 return nil, false
18475 }
18476
18477
18478 func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
18479 return nil, false
18480 }
18481
18482
18483 func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
18484 return nil, false
18485 }
18486
18487
18488 func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
18489 return nil, false
18490 }
18491
18492
18493 func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
18494 return nil, false
18495 }
18496
18497
18498 func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
18499 return nil, false
18500 }
18501
18502
18503 func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) {
18504 return nil, false
18505 }
18506
18507
18508 func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
18509 return &pc, true
18510 }
18511
18512
18513 func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
18514 return &pc, true
18515 }
18516
18517
18518
18519 type ProtectionContainerResource struct {
18520 autorest.Response `json:"-"`
18521
18522 Properties BasicProtectionContainer `json:"properties,omitempty"`
18523
18524 ID *string `json:"id,omitempty"`
18525
18526 Name *string `json:"name,omitempty"`
18527
18528 Type *string `json:"type,omitempty"`
18529
18530 Location *string `json:"location,omitempty"`
18531
18532 Tags map[string]*string `json:"tags"`
18533
18534 ETag *string `json:"eTag,omitempty"`
18535 }
18536
18537
18538 func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) {
18539 objectMap := make(map[string]interface{})
18540 objectMap["properties"] = pcr.Properties
18541 if pcr.Location != nil {
18542 objectMap["location"] = pcr.Location
18543 }
18544 if pcr.Tags != nil {
18545 objectMap["tags"] = pcr.Tags
18546 }
18547 if pcr.ETag != nil {
18548 objectMap["eTag"] = pcr.ETag
18549 }
18550 return json.Marshal(objectMap)
18551 }
18552
18553
18554 func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error {
18555 var m map[string]*json.RawMessage
18556 err := json.Unmarshal(body, &m)
18557 if err != nil {
18558 return err
18559 }
18560 for k, v := range m {
18561 switch k {
18562 case "properties":
18563 if v != nil {
18564 properties, err := unmarshalBasicProtectionContainer(*v)
18565 if err != nil {
18566 return err
18567 }
18568 pcr.Properties = properties
18569 }
18570 case "id":
18571 if v != nil {
18572 var ID string
18573 err = json.Unmarshal(*v, &ID)
18574 if err != nil {
18575 return err
18576 }
18577 pcr.ID = &ID
18578 }
18579 case "name":
18580 if v != nil {
18581 var name string
18582 err = json.Unmarshal(*v, &name)
18583 if err != nil {
18584 return err
18585 }
18586 pcr.Name = &name
18587 }
18588 case "type":
18589 if v != nil {
18590 var typeVar string
18591 err = json.Unmarshal(*v, &typeVar)
18592 if err != nil {
18593 return err
18594 }
18595 pcr.Type = &typeVar
18596 }
18597 case "location":
18598 if v != nil {
18599 var location string
18600 err = json.Unmarshal(*v, &location)
18601 if err != nil {
18602 return err
18603 }
18604 pcr.Location = &location
18605 }
18606 case "tags":
18607 if v != nil {
18608 var tags map[string]*string
18609 err = json.Unmarshal(*v, &tags)
18610 if err != nil {
18611 return err
18612 }
18613 pcr.Tags = tags
18614 }
18615 case "eTag":
18616 if v != nil {
18617 var eTag string
18618 err = json.Unmarshal(*v, &eTag)
18619 if err != nil {
18620 return err
18621 }
18622 pcr.ETag = &eTag
18623 }
18624 }
18625 }
18626
18627 return nil
18628 }
18629
18630
18631 type ProtectionContainerResourceList struct {
18632 autorest.Response `json:"-"`
18633
18634 Value *[]ProtectionContainerResource `json:"value,omitempty"`
18635
18636 NextLink *string `json:"nextLink,omitempty"`
18637 }
18638
18639
18640
18641 type ProtectionContainerResourceListIterator struct {
18642 i int
18643 page ProtectionContainerResourceListPage
18644 }
18645
18646
18647
18648 func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18649 if tracing.IsEnabled() {
18650 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext")
18651 defer func() {
18652 sc := -1
18653 if iter.Response().Response.Response != nil {
18654 sc = iter.Response().Response.Response.StatusCode
18655 }
18656 tracing.EndSpan(ctx, sc, err)
18657 }()
18658 }
18659 iter.i++
18660 if iter.i < len(iter.page.Values()) {
18661 return nil
18662 }
18663 err = iter.page.NextWithContext(ctx)
18664 if err != nil {
18665 iter.i--
18666 return err
18667 }
18668 iter.i = 0
18669 return nil
18670 }
18671
18672
18673
18674
18675 func (iter *ProtectionContainerResourceListIterator) Next() error {
18676 return iter.NextWithContext(context.Background())
18677 }
18678
18679
18680 func (iter ProtectionContainerResourceListIterator) NotDone() bool {
18681 return iter.page.NotDone() && iter.i < len(iter.page.Values())
18682 }
18683
18684
18685 func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList {
18686 return iter.page.Response()
18687 }
18688
18689
18690
18691 func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource {
18692 if !iter.page.NotDone() {
18693 return ProtectionContainerResource{}
18694 }
18695 return iter.page.Values()[iter.i]
18696 }
18697
18698
18699 func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator {
18700 return ProtectionContainerResourceListIterator{page: page}
18701 }
18702
18703
18704 func (pcrl ProtectionContainerResourceList) IsEmpty() bool {
18705 return pcrl.Value == nil || len(*pcrl.Value) == 0
18706 }
18707
18708
18709 func (pcrl ProtectionContainerResourceList) hasNextLink() bool {
18710 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
18711 }
18712
18713
18714
18715 func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
18716 if !pcrl.hasNextLink() {
18717 return nil, nil
18718 }
18719 return autorest.Prepare((&http.Request{}).WithContext(ctx),
18720 autorest.AsJSON(),
18721 autorest.AsGet(),
18722 autorest.WithBaseURL(to.String(pcrl.NextLink)))
18723 }
18724
18725
18726 type ProtectionContainerResourceListPage struct {
18727 fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)
18728 pcrl ProtectionContainerResourceList
18729 }
18730
18731
18732
18733 func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
18734 if tracing.IsEnabled() {
18735 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext")
18736 defer func() {
18737 sc := -1
18738 if page.Response().Response.Response != nil {
18739 sc = page.Response().Response.Response.StatusCode
18740 }
18741 tracing.EndSpan(ctx, sc, err)
18742 }()
18743 }
18744 for {
18745 next, err := page.fn(ctx, page.pcrl)
18746 if err != nil {
18747 return err
18748 }
18749 page.pcrl = next
18750 if !next.hasNextLink() || !next.IsEmpty() {
18751 break
18752 }
18753 }
18754 return nil
18755 }
18756
18757
18758
18759
18760 func (page *ProtectionContainerResourceListPage) Next() error {
18761 return page.NextWithContext(context.Background())
18762 }
18763
18764
18765 func (page ProtectionContainerResourceListPage) NotDone() bool {
18766 return !page.pcrl.IsEmpty()
18767 }
18768
18769
18770 func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList {
18771 return page.pcrl
18772 }
18773
18774
18775 func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource {
18776 if page.pcrl.IsEmpty() {
18777 return nil
18778 }
18779 return *page.pcrl.Value
18780 }
18781
18782
18783 func NewProtectionContainerResourceListPage(cur ProtectionContainerResourceList, getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage {
18784 return ProtectionContainerResourceListPage{
18785 fn: getNextPage,
18786 pcrl: cur,
18787 }
18788 }
18789
18790
18791 type BasicProtectionIntent interface {
18792 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
18793 AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool)
18794 AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool)
18795 AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool)
18796 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
18797 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
18798 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
18799 AsProtectionIntent() (*ProtectionIntent, bool)
18800 }
18801
18802
18803 type ProtectionIntent struct {
18804
18805 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18806
18807 SourceResourceID *string `json:"sourceResourceId,omitempty"`
18808
18809 ItemID *string `json:"itemId,omitempty"`
18810
18811 PolicyID *string `json:"policyId,omitempty"`
18812
18813 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
18814
18815 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
18816 }
18817
18818 func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) {
18819 var m map[string]interface{}
18820 err := json.Unmarshal(body, &m)
18821 if err != nil {
18822 return nil, err
18823 }
18824
18825 switch m["protectionIntentItemType"] {
18826 case string(ProtectionIntentItemTypeRecoveryServiceVaultItem):
18827 var arsvpi AzureRecoveryServiceVaultProtectionIntent
18828 err := json.Unmarshal(body, &arsvpi)
18829 return arsvpi, err
18830 case string(ProtectionIntentItemTypeAzureResourceItem):
18831 var arpi AzureResourceProtectionIntent
18832 err := json.Unmarshal(body, &arpi)
18833 return arpi, err
18834 case string(ProtectionIntentItemTypeAzureWorkloadContainerAutoProtectionIntent):
18835 var awcapi AzureWorkloadContainerAutoProtectionIntent
18836 err := json.Unmarshal(body, &awcapi)
18837 return awcapi, err
18838 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
18839 var awapi AzureWorkloadAutoProtectionIntent
18840 err := json.Unmarshal(body, &awapi)
18841 return awapi, err
18842 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
18843 var awsapi AzureWorkloadSQLAutoProtectionIntent
18844 err := json.Unmarshal(body, &awsapi)
18845 return awsapi, err
18846 default:
18847 var pi ProtectionIntent
18848 err := json.Unmarshal(body, &pi)
18849 return pi, err
18850 }
18851 }
18852 func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) {
18853 var rawMessages []*json.RawMessage
18854 err := json.Unmarshal(body, &rawMessages)
18855 if err != nil {
18856 return nil, err
18857 }
18858
18859 piArray := make([]BasicProtectionIntent, len(rawMessages))
18860
18861 for index, rawMessage := range rawMessages {
18862 pi, err := unmarshalBasicProtectionIntent(*rawMessage)
18863 if err != nil {
18864 return nil, err
18865 }
18866 piArray[index] = pi
18867 }
18868 return piArray, nil
18869 }
18870
18871
18872 func (pi ProtectionIntent) MarshalJSON() ([]byte, error) {
18873 pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent
18874 objectMap := make(map[string]interface{})
18875 if pi.BackupManagementType != "" {
18876 objectMap["backupManagementType"] = pi.BackupManagementType
18877 }
18878 if pi.SourceResourceID != nil {
18879 objectMap["sourceResourceId"] = pi.SourceResourceID
18880 }
18881 if pi.ItemID != nil {
18882 objectMap["itemId"] = pi.ItemID
18883 }
18884 if pi.PolicyID != nil {
18885 objectMap["policyId"] = pi.PolicyID
18886 }
18887 if pi.ProtectionState != "" {
18888 objectMap["protectionState"] = pi.ProtectionState
18889 }
18890 if pi.ProtectionIntentItemType != "" {
18891 objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType
18892 }
18893 return json.Marshal(objectMap)
18894 }
18895
18896
18897 func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
18898 return nil, false
18899 }
18900
18901
18902 func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
18903 return nil, false
18904 }
18905
18906
18907 func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
18908 return nil, false
18909 }
18910
18911
18912 func (pi ProtectionIntent) AsAzureWorkloadContainerAutoProtectionIntent() (*AzureWorkloadContainerAutoProtectionIntent, bool) {
18913 return nil, false
18914 }
18915
18916
18917 func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
18918 return nil, false
18919 }
18920
18921
18922 func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
18923 return nil, false
18924 }
18925
18926
18927 func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
18928 return nil, false
18929 }
18930
18931
18932 func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
18933 return &pi, true
18934 }
18935
18936
18937 func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
18938 return &pi, true
18939 }
18940
18941
18942 type ProtectionIntentQueryObject struct {
18943
18944 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18945
18946 ItemType IntentItemType `json:"itemType,omitempty"`
18947
18948 ParentName *string `json:"parentName,omitempty"`
18949
18950 ItemName *string `json:"itemName,omitempty"`
18951 }
18952
18953
18954 type ProtectionIntentResource struct {
18955 autorest.Response `json:"-"`
18956
18957 Properties BasicProtectionIntent `json:"properties,omitempty"`
18958
18959 ID *string `json:"id,omitempty"`
18960
18961 Name *string `json:"name,omitempty"`
18962
18963 Type *string `json:"type,omitempty"`
18964
18965 Location *string `json:"location,omitempty"`
18966
18967 Tags map[string]*string `json:"tags"`
18968
18969 ETag *string `json:"eTag,omitempty"`
18970 }
18971
18972
18973 func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) {
18974 objectMap := make(map[string]interface{})
18975 objectMap["properties"] = pir.Properties
18976 if pir.Location != nil {
18977 objectMap["location"] = pir.Location
18978 }
18979 if pir.Tags != nil {
18980 objectMap["tags"] = pir.Tags
18981 }
18982 if pir.ETag != nil {
18983 objectMap["eTag"] = pir.ETag
18984 }
18985 return json.Marshal(objectMap)
18986 }
18987
18988
18989 func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error {
18990 var m map[string]*json.RawMessage
18991 err := json.Unmarshal(body, &m)
18992 if err != nil {
18993 return err
18994 }
18995 for k, v := range m {
18996 switch k {
18997 case "properties":
18998 if v != nil {
18999 properties, err := unmarshalBasicProtectionIntent(*v)
19000 if err != nil {
19001 return err
19002 }
19003 pir.Properties = properties
19004 }
19005 case "id":
19006 if v != nil {
19007 var ID string
19008 err = json.Unmarshal(*v, &ID)
19009 if err != nil {
19010 return err
19011 }
19012 pir.ID = &ID
19013 }
19014 case "name":
19015 if v != nil {
19016 var name string
19017 err = json.Unmarshal(*v, &name)
19018 if err != nil {
19019 return err
19020 }
19021 pir.Name = &name
19022 }
19023 case "type":
19024 if v != nil {
19025 var typeVar string
19026 err = json.Unmarshal(*v, &typeVar)
19027 if err != nil {
19028 return err
19029 }
19030 pir.Type = &typeVar
19031 }
19032 case "location":
19033 if v != nil {
19034 var location string
19035 err = json.Unmarshal(*v, &location)
19036 if err != nil {
19037 return err
19038 }
19039 pir.Location = &location
19040 }
19041 case "tags":
19042 if v != nil {
19043 var tags map[string]*string
19044 err = json.Unmarshal(*v, &tags)
19045 if err != nil {
19046 return err
19047 }
19048 pir.Tags = tags
19049 }
19050 case "eTag":
19051 if v != nil {
19052 var eTag string
19053 err = json.Unmarshal(*v, &eTag)
19054 if err != nil {
19055 return err
19056 }
19057 pir.ETag = &eTag
19058 }
19059 }
19060 }
19061
19062 return nil
19063 }
19064
19065
19066 type ProtectionIntentResourceList struct {
19067 autorest.Response `json:"-"`
19068
19069 Value *[]ProtectionIntentResource `json:"value,omitempty"`
19070
19071 NextLink *string `json:"nextLink,omitempty"`
19072 }
19073
19074
19075
19076 type ProtectionIntentResourceListIterator struct {
19077 i int
19078 page ProtectionIntentResourceListPage
19079 }
19080
19081
19082
19083 func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19084 if tracing.IsEnabled() {
19085 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext")
19086 defer func() {
19087 sc := -1
19088 if iter.Response().Response.Response != nil {
19089 sc = iter.Response().Response.Response.StatusCode
19090 }
19091 tracing.EndSpan(ctx, sc, err)
19092 }()
19093 }
19094 iter.i++
19095 if iter.i < len(iter.page.Values()) {
19096 return nil
19097 }
19098 err = iter.page.NextWithContext(ctx)
19099 if err != nil {
19100 iter.i--
19101 return err
19102 }
19103 iter.i = 0
19104 return nil
19105 }
19106
19107
19108
19109
19110 func (iter *ProtectionIntentResourceListIterator) Next() error {
19111 return iter.NextWithContext(context.Background())
19112 }
19113
19114
19115 func (iter ProtectionIntentResourceListIterator) NotDone() bool {
19116 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19117 }
19118
19119
19120 func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList {
19121 return iter.page.Response()
19122 }
19123
19124
19125
19126 func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource {
19127 if !iter.page.NotDone() {
19128 return ProtectionIntentResource{}
19129 }
19130 return iter.page.Values()[iter.i]
19131 }
19132
19133
19134 func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator {
19135 return ProtectionIntentResourceListIterator{page: page}
19136 }
19137
19138
19139 func (pirl ProtectionIntentResourceList) IsEmpty() bool {
19140 return pirl.Value == nil || len(*pirl.Value) == 0
19141 }
19142
19143
19144 func (pirl ProtectionIntentResourceList) hasNextLink() bool {
19145 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
19146 }
19147
19148
19149
19150 func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) {
19151 if !pirl.hasNextLink() {
19152 return nil, nil
19153 }
19154 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19155 autorest.AsJSON(),
19156 autorest.AsGet(),
19157 autorest.WithBaseURL(to.String(pirl.NextLink)))
19158 }
19159
19160
19161 type ProtectionIntentResourceListPage struct {
19162 fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)
19163 pirl ProtectionIntentResourceList
19164 }
19165
19166
19167
19168 func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) {
19169 if tracing.IsEnabled() {
19170 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext")
19171 defer func() {
19172 sc := -1
19173 if page.Response().Response.Response != nil {
19174 sc = page.Response().Response.Response.StatusCode
19175 }
19176 tracing.EndSpan(ctx, sc, err)
19177 }()
19178 }
19179 for {
19180 next, err := page.fn(ctx, page.pirl)
19181 if err != nil {
19182 return err
19183 }
19184 page.pirl = next
19185 if !next.hasNextLink() || !next.IsEmpty() {
19186 break
19187 }
19188 }
19189 return nil
19190 }
19191
19192
19193
19194
19195 func (page *ProtectionIntentResourceListPage) Next() error {
19196 return page.NextWithContext(context.Background())
19197 }
19198
19199
19200 func (page ProtectionIntentResourceListPage) NotDone() bool {
19201 return !page.pirl.IsEmpty()
19202 }
19203
19204
19205 func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList {
19206 return page.pirl
19207 }
19208
19209
19210 func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource {
19211 if page.pirl.IsEmpty() {
19212 return nil
19213 }
19214 return *page.pirl.Value
19215 }
19216
19217
19218 func NewProtectionIntentResourceListPage(cur ProtectionIntentResourceList, getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage {
19219 return ProtectionIntentResourceListPage{
19220 fn: getNextPage,
19221 pirl: cur,
19222 }
19223 }
19224
19225
19226
19227 type ProtectionPoliciesDeleteFuture struct {
19228 azure.FutureAPI
19229
19230
19231 Result func(ProtectionPoliciesClient) (autorest.Response, error)
19232 }
19233
19234
19235 func (future *ProtectionPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
19236 var azFuture azure.Future
19237 if err := json.Unmarshal(body, &azFuture); err != nil {
19238 return err
19239 }
19240 future.FutureAPI = &azFuture
19241 future.Result = future.result
19242 return nil
19243 }
19244
19245
19246 func (future *ProtectionPoliciesDeleteFuture) result(client ProtectionPoliciesClient) (ar autorest.Response, err error) {
19247 var done bool
19248 done, err = future.DoneWithContext(context.Background(), client)
19249 if err != nil {
19250 err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
19251 return
19252 }
19253 if !done {
19254 ar.Response = future.Response()
19255 err = azure.NewAsyncOpIncompleteError("backup.ProtectionPoliciesDeleteFuture")
19256 return
19257 }
19258 ar.Response = future.Response()
19259 return
19260 }
19261
19262
19263 type BasicProtectionPolicy interface {
19264 AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool)
19265 AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool)
19266 AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool)
19267 AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool)
19268 AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool)
19269 AsMabProtectionPolicy() (*MabProtectionPolicy, bool)
19270 AsProtectionPolicy() (*ProtectionPolicy, bool)
19271 }
19272
19273
19274
19275 type ProtectionPolicy struct {
19276
19277 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
19278
19279 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
19280
19281 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
19282 }
19283
19284 func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) {
19285 var m map[string]interface{}
19286 err := json.Unmarshal(body, &m)
19287 if err != nil {
19288 return nil, err
19289 }
19290
19291 switch m["backupManagementType"] {
19292 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload):
19293 var avwpp AzureVMWorkloadProtectionPolicy
19294 err := json.Unmarshal(body, &avwpp)
19295 return avwpp, err
19296 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage):
19297 var afspp AzureFileShareProtectionPolicy
19298 err := json.Unmarshal(body, &afspp)
19299 return afspp, err
19300 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM):
19301 var aispp AzureIaaSVMProtectionPolicy
19302 err := json.Unmarshal(body, &aispp)
19303 return aispp, err
19304 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL):
19305 var aspp AzureSQLProtectionPolicy
19306 err := json.Unmarshal(body, &aspp)
19307 return aspp, err
19308 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy):
19309 var gpp GenericProtectionPolicy
19310 err := json.Unmarshal(body, &gpp)
19311 return gpp, err
19312 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB):
19313 var mpp MabProtectionPolicy
19314 err := json.Unmarshal(body, &mpp)
19315 return mpp, err
19316 default:
19317 var pp ProtectionPolicy
19318 err := json.Unmarshal(body, &pp)
19319 return pp, err
19320 }
19321 }
19322 func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) {
19323 var rawMessages []*json.RawMessage
19324 err := json.Unmarshal(body, &rawMessages)
19325 if err != nil {
19326 return nil, err
19327 }
19328
19329 ppArray := make([]BasicProtectionPolicy, len(rawMessages))
19330
19331 for index, rawMessage := range rawMessages {
19332 pp, err := unmarshalBasicProtectionPolicy(*rawMessage)
19333 if err != nil {
19334 return nil, err
19335 }
19336 ppArray[index] = pp
19337 }
19338 return ppArray, nil
19339 }
19340
19341
19342 func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) {
19343 pp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy
19344 objectMap := make(map[string]interface{})
19345 if pp.ProtectedItemsCount != nil {
19346 objectMap["protectedItemsCount"] = pp.ProtectedItemsCount
19347 }
19348 if pp.ResourceGuardOperationRequests != nil {
19349 objectMap["resourceGuardOperationRequests"] = pp.ResourceGuardOperationRequests
19350 }
19351 if pp.BackupManagementType != "" {
19352 objectMap["backupManagementType"] = pp.BackupManagementType
19353 }
19354 return json.Marshal(objectMap)
19355 }
19356
19357
19358 func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
19359 return nil, false
19360 }
19361
19362
19363 func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
19364 return nil, false
19365 }
19366
19367
19368 func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
19369 return nil, false
19370 }
19371
19372
19373 func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
19374 return nil, false
19375 }
19376
19377
19378 func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
19379 return nil, false
19380 }
19381
19382
19383 func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
19384 return nil, false
19385 }
19386
19387
19388 func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
19389 return &pp, true
19390 }
19391
19392
19393 func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
19394 return &pp, true
19395 }
19396
19397
19398 type ProtectionPolicyQueryObject struct {
19399
19400 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
19401
19402 FabricName *string `json:"fabricName,omitempty"`
19403
19404 WorkloadType WorkloadType `json:"workloadType,omitempty"`
19405 }
19406
19407
19408
19409 type ProtectionPolicyResource struct {
19410 autorest.Response `json:"-"`
19411
19412 Properties BasicProtectionPolicy `json:"properties,omitempty"`
19413
19414 ID *string `json:"id,omitempty"`
19415
19416 Name *string `json:"name,omitempty"`
19417
19418 Type *string `json:"type,omitempty"`
19419
19420 Location *string `json:"location,omitempty"`
19421
19422 Tags map[string]*string `json:"tags"`
19423
19424 ETag *string `json:"eTag,omitempty"`
19425 }
19426
19427
19428 func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) {
19429 objectMap := make(map[string]interface{})
19430 objectMap["properties"] = ppr.Properties
19431 if ppr.Location != nil {
19432 objectMap["location"] = ppr.Location
19433 }
19434 if ppr.Tags != nil {
19435 objectMap["tags"] = ppr.Tags
19436 }
19437 if ppr.ETag != nil {
19438 objectMap["eTag"] = ppr.ETag
19439 }
19440 return json.Marshal(objectMap)
19441 }
19442
19443
19444 func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error {
19445 var m map[string]*json.RawMessage
19446 err := json.Unmarshal(body, &m)
19447 if err != nil {
19448 return err
19449 }
19450 for k, v := range m {
19451 switch k {
19452 case "properties":
19453 if v != nil {
19454 properties, err := unmarshalBasicProtectionPolicy(*v)
19455 if err != nil {
19456 return err
19457 }
19458 ppr.Properties = properties
19459 }
19460 case "id":
19461 if v != nil {
19462 var ID string
19463 err = json.Unmarshal(*v, &ID)
19464 if err != nil {
19465 return err
19466 }
19467 ppr.ID = &ID
19468 }
19469 case "name":
19470 if v != nil {
19471 var name string
19472 err = json.Unmarshal(*v, &name)
19473 if err != nil {
19474 return err
19475 }
19476 ppr.Name = &name
19477 }
19478 case "type":
19479 if v != nil {
19480 var typeVar string
19481 err = json.Unmarshal(*v, &typeVar)
19482 if err != nil {
19483 return err
19484 }
19485 ppr.Type = &typeVar
19486 }
19487 case "location":
19488 if v != nil {
19489 var location string
19490 err = json.Unmarshal(*v, &location)
19491 if err != nil {
19492 return err
19493 }
19494 ppr.Location = &location
19495 }
19496 case "tags":
19497 if v != nil {
19498 var tags map[string]*string
19499 err = json.Unmarshal(*v, &tags)
19500 if err != nil {
19501 return err
19502 }
19503 ppr.Tags = tags
19504 }
19505 case "eTag":
19506 if v != nil {
19507 var eTag string
19508 err = json.Unmarshal(*v, &eTag)
19509 if err != nil {
19510 return err
19511 }
19512 ppr.ETag = &eTag
19513 }
19514 }
19515 }
19516
19517 return nil
19518 }
19519
19520
19521 type ProtectionPolicyResourceList struct {
19522 autorest.Response `json:"-"`
19523
19524 Value *[]ProtectionPolicyResource `json:"value,omitempty"`
19525
19526 NextLink *string `json:"nextLink,omitempty"`
19527 }
19528
19529
19530
19531 type ProtectionPolicyResourceListIterator struct {
19532 i int
19533 page ProtectionPolicyResourceListPage
19534 }
19535
19536
19537
19538 func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19539 if tracing.IsEnabled() {
19540 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext")
19541 defer func() {
19542 sc := -1
19543 if iter.Response().Response.Response != nil {
19544 sc = iter.Response().Response.Response.StatusCode
19545 }
19546 tracing.EndSpan(ctx, sc, err)
19547 }()
19548 }
19549 iter.i++
19550 if iter.i < len(iter.page.Values()) {
19551 return nil
19552 }
19553 err = iter.page.NextWithContext(ctx)
19554 if err != nil {
19555 iter.i--
19556 return err
19557 }
19558 iter.i = 0
19559 return nil
19560 }
19561
19562
19563
19564
19565 func (iter *ProtectionPolicyResourceListIterator) Next() error {
19566 return iter.NextWithContext(context.Background())
19567 }
19568
19569
19570 func (iter ProtectionPolicyResourceListIterator) NotDone() bool {
19571 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19572 }
19573
19574
19575 func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList {
19576 return iter.page.Response()
19577 }
19578
19579
19580
19581 func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource {
19582 if !iter.page.NotDone() {
19583 return ProtectionPolicyResource{}
19584 }
19585 return iter.page.Values()[iter.i]
19586 }
19587
19588
19589 func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator {
19590 return ProtectionPolicyResourceListIterator{page: page}
19591 }
19592
19593
19594 func (pprl ProtectionPolicyResourceList) IsEmpty() bool {
19595 return pprl.Value == nil || len(*pprl.Value) == 0
19596 }
19597
19598
19599 func (pprl ProtectionPolicyResourceList) hasNextLink() bool {
19600 return pprl.NextLink != nil && len(*pprl.NextLink) != 0
19601 }
19602
19603
19604
19605 func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) {
19606 if !pprl.hasNextLink() {
19607 return nil, nil
19608 }
19609 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19610 autorest.AsJSON(),
19611 autorest.AsGet(),
19612 autorest.WithBaseURL(to.String(pprl.NextLink)))
19613 }
19614
19615
19616 type ProtectionPolicyResourceListPage struct {
19617 fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)
19618 pprl ProtectionPolicyResourceList
19619 }
19620
19621
19622
19623 func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) {
19624 if tracing.IsEnabled() {
19625 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext")
19626 defer func() {
19627 sc := -1
19628 if page.Response().Response.Response != nil {
19629 sc = page.Response().Response.Response.StatusCode
19630 }
19631 tracing.EndSpan(ctx, sc, err)
19632 }()
19633 }
19634 for {
19635 next, err := page.fn(ctx, page.pprl)
19636 if err != nil {
19637 return err
19638 }
19639 page.pprl = next
19640 if !next.hasNextLink() || !next.IsEmpty() {
19641 break
19642 }
19643 }
19644 return nil
19645 }
19646
19647
19648
19649
19650 func (page *ProtectionPolicyResourceListPage) Next() error {
19651 return page.NextWithContext(context.Background())
19652 }
19653
19654
19655 func (page ProtectionPolicyResourceListPage) NotDone() bool {
19656 return !page.pprl.IsEmpty()
19657 }
19658
19659
19660 func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList {
19661 return page.pprl
19662 }
19663
19664
19665 func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource {
19666 if page.pprl.IsEmpty() {
19667 return nil
19668 }
19669 return *page.pprl.Value
19670 }
19671
19672
19673 func NewProtectionPolicyResourceListPage(cur ProtectionPolicyResourceList, getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage {
19674 return ProtectionPolicyResourceListPage{
19675 fn: getNextPage,
19676 pprl: cur,
19677 }
19678 }
19679
19680
19681 type BasicRecoveryPoint interface {
19682 AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool)
19683 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
19684 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
19685 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
19686 AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool)
19687 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
19688 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
19689 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
19690 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
19691 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
19692 AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool)
19693 AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool)
19694 AsRecoveryPoint() (*RecoveryPoint, bool)
19695 }
19696
19697
19698 type RecoveryPoint struct {
19699
19700 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
19701 }
19702
19703 func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) {
19704 var m map[string]interface{}
19705 err := json.Unmarshal(body, &m)
19706 if err != nil {
19707 return nil, err
19708 }
19709
19710 switch m["objectType"] {
19711 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint):
19712 var afsrp AzureFileShareRecoveryPoint
19713 err := json.Unmarshal(body, &afsrp)
19714 return afsrp, err
19715 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
19716 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
19717 err := json.Unmarshal(body, &awpitrp)
19718 return awpitrp, err
19719 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint):
19720 var awrp AzureWorkloadRecoveryPoint
19721 err := json.Unmarshal(body, &awrp)
19722 return awrp, err
19723 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
19724 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
19725 err := json.Unmarshal(body, &awshpitrp)
19726 return awshpitrp, err
19727 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
19728 var awshrp AzureWorkloadSAPHanaRecoveryPoint
19729 err := json.Unmarshal(body, &awshrp)
19730 return awshrp, err
19731 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
19732 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
19733 err := json.Unmarshal(body, &awspitrp)
19734 return awspitrp, err
19735 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint):
19736 var awsrp AzureWorkloadSQLRecoveryPoint
19737 err := json.Unmarshal(body, &awsrp)
19738 return awsrp, err
19739 case string(ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint):
19740 var grp GenericRecoveryPoint
19741 err := json.Unmarshal(body, &grp)
19742 return grp, err
19743 case string(ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint):
19744 var ivrp IaasVMRecoveryPoint
19745 err := json.Unmarshal(body, &ivrp)
19746 return ivrp, err
19747 default:
19748 var rp RecoveryPoint
19749 err := json.Unmarshal(body, &rp)
19750 return rp, err
19751 }
19752 }
19753 func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) {
19754 var rawMessages []*json.RawMessage
19755 err := json.Unmarshal(body, &rawMessages)
19756 if err != nil {
19757 return nil, err
19758 }
19759
19760 rpArray := make([]BasicRecoveryPoint, len(rawMessages))
19761
19762 for index, rawMessage := range rawMessages {
19763 rp, err := unmarshalBasicRecoveryPoint(*rawMessage)
19764 if err != nil {
19765 return nil, err
19766 }
19767 rpArray[index] = rp
19768 }
19769 return rpArray, nil
19770 }
19771
19772
19773 func (rp RecoveryPoint) MarshalJSON() ([]byte, error) {
19774 rp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint
19775 objectMap := make(map[string]interface{})
19776 if rp.ObjectType != "" {
19777 objectMap["objectType"] = rp.ObjectType
19778 }
19779 return json.Marshal(objectMap)
19780 }
19781
19782
19783 func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
19784 return nil, false
19785 }
19786
19787
19788 func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
19789 return nil, false
19790 }
19791
19792
19793 func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
19794 return nil, false
19795 }
19796
19797
19798 func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
19799 return nil, false
19800 }
19801
19802
19803 func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
19804 return nil, false
19805 }
19806
19807
19808 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
19809 return nil, false
19810 }
19811
19812
19813 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
19814 return nil, false
19815 }
19816
19817
19818 func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
19819 return nil, false
19820 }
19821
19822
19823 func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
19824 return nil, false
19825 }
19826
19827
19828 func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
19829 return nil, false
19830 }
19831
19832
19833 func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
19834 return nil, false
19835 }
19836
19837
19838 func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
19839 return nil, false
19840 }
19841
19842
19843 func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
19844 return &rp, true
19845 }
19846
19847
19848 func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
19849 return &rp, true
19850 }
19851
19852
19853 type RecoveryPointDiskConfiguration struct {
19854
19855 NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"`
19856
19857 NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"`
19858
19859 IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"`
19860
19861 ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"`
19862 }
19863
19864
19865 type RecoveryPointMoveReadinessInfo struct {
19866 IsReadyForMove *bool `json:"isReadyForMove,omitempty"`
19867 AdditionalInfo *string `json:"additionalInfo,omitempty"`
19868 }
19869
19870
19871 type RecoveryPointRehydrationInfo struct {
19872
19873
19874 RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"`
19875
19876 RehydrationPriority RehydrationPriority `json:"rehydrationPriority,omitempty"`
19877 }
19878
19879
19880
19881 type RecoveryPointResource struct {
19882 autorest.Response `json:"-"`
19883
19884 Properties BasicRecoveryPoint `json:"properties,omitempty"`
19885
19886 ID *string `json:"id,omitempty"`
19887
19888 Name *string `json:"name,omitempty"`
19889
19890 Type *string `json:"type,omitempty"`
19891
19892 Location *string `json:"location,omitempty"`
19893
19894 Tags map[string]*string `json:"tags"`
19895
19896 ETag *string `json:"eTag,omitempty"`
19897 }
19898
19899
19900 func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) {
19901 objectMap := make(map[string]interface{})
19902 objectMap["properties"] = rpr.Properties
19903 if rpr.Location != nil {
19904 objectMap["location"] = rpr.Location
19905 }
19906 if rpr.Tags != nil {
19907 objectMap["tags"] = rpr.Tags
19908 }
19909 if rpr.ETag != nil {
19910 objectMap["eTag"] = rpr.ETag
19911 }
19912 return json.Marshal(objectMap)
19913 }
19914
19915
19916 func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error {
19917 var m map[string]*json.RawMessage
19918 err := json.Unmarshal(body, &m)
19919 if err != nil {
19920 return err
19921 }
19922 for k, v := range m {
19923 switch k {
19924 case "properties":
19925 if v != nil {
19926 properties, err := unmarshalBasicRecoveryPoint(*v)
19927 if err != nil {
19928 return err
19929 }
19930 rpr.Properties = properties
19931 }
19932 case "id":
19933 if v != nil {
19934 var ID string
19935 err = json.Unmarshal(*v, &ID)
19936 if err != nil {
19937 return err
19938 }
19939 rpr.ID = &ID
19940 }
19941 case "name":
19942 if v != nil {
19943 var name string
19944 err = json.Unmarshal(*v, &name)
19945 if err != nil {
19946 return err
19947 }
19948 rpr.Name = &name
19949 }
19950 case "type":
19951 if v != nil {
19952 var typeVar string
19953 err = json.Unmarshal(*v, &typeVar)
19954 if err != nil {
19955 return err
19956 }
19957 rpr.Type = &typeVar
19958 }
19959 case "location":
19960 if v != nil {
19961 var location string
19962 err = json.Unmarshal(*v, &location)
19963 if err != nil {
19964 return err
19965 }
19966 rpr.Location = &location
19967 }
19968 case "tags":
19969 if v != nil {
19970 var tags map[string]*string
19971 err = json.Unmarshal(*v, &tags)
19972 if err != nil {
19973 return err
19974 }
19975 rpr.Tags = tags
19976 }
19977 case "eTag":
19978 if v != nil {
19979 var eTag string
19980 err = json.Unmarshal(*v, &eTag)
19981 if err != nil {
19982 return err
19983 }
19984 rpr.ETag = &eTag
19985 }
19986 }
19987 }
19988
19989 return nil
19990 }
19991
19992
19993 type RecoveryPointResourceList struct {
19994 autorest.Response `json:"-"`
19995
19996 Value *[]RecoveryPointResource `json:"value,omitempty"`
19997
19998 NextLink *string `json:"nextLink,omitempty"`
19999 }
20000
20001
20002 type RecoveryPointResourceListIterator struct {
20003 i int
20004 page RecoveryPointResourceListPage
20005 }
20006
20007
20008
20009 func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) {
20010 if tracing.IsEnabled() {
20011 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext")
20012 defer func() {
20013 sc := -1
20014 if iter.Response().Response.Response != nil {
20015 sc = iter.Response().Response.Response.StatusCode
20016 }
20017 tracing.EndSpan(ctx, sc, err)
20018 }()
20019 }
20020 iter.i++
20021 if iter.i < len(iter.page.Values()) {
20022 return nil
20023 }
20024 err = iter.page.NextWithContext(ctx)
20025 if err != nil {
20026 iter.i--
20027 return err
20028 }
20029 iter.i = 0
20030 return nil
20031 }
20032
20033
20034
20035
20036 func (iter *RecoveryPointResourceListIterator) Next() error {
20037 return iter.NextWithContext(context.Background())
20038 }
20039
20040
20041 func (iter RecoveryPointResourceListIterator) NotDone() bool {
20042 return iter.page.NotDone() && iter.i < len(iter.page.Values())
20043 }
20044
20045
20046 func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList {
20047 return iter.page.Response()
20048 }
20049
20050
20051
20052 func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource {
20053 if !iter.page.NotDone() {
20054 return RecoveryPointResource{}
20055 }
20056 return iter.page.Values()[iter.i]
20057 }
20058
20059
20060 func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator {
20061 return RecoveryPointResourceListIterator{page: page}
20062 }
20063
20064
20065 func (rprl RecoveryPointResourceList) IsEmpty() bool {
20066 return rprl.Value == nil || len(*rprl.Value) == 0
20067 }
20068
20069
20070 func (rprl RecoveryPointResourceList) hasNextLink() bool {
20071 return rprl.NextLink != nil && len(*rprl.NextLink) != 0
20072 }
20073
20074
20075
20076 func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) {
20077 if !rprl.hasNextLink() {
20078 return nil, nil
20079 }
20080 return autorest.Prepare((&http.Request{}).WithContext(ctx),
20081 autorest.AsJSON(),
20082 autorest.AsGet(),
20083 autorest.WithBaseURL(to.String(rprl.NextLink)))
20084 }
20085
20086
20087 type RecoveryPointResourceListPage struct {
20088 fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)
20089 rprl RecoveryPointResourceList
20090 }
20091
20092
20093
20094 func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) {
20095 if tracing.IsEnabled() {
20096 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext")
20097 defer func() {
20098 sc := -1
20099 if page.Response().Response.Response != nil {
20100 sc = page.Response().Response.Response.StatusCode
20101 }
20102 tracing.EndSpan(ctx, sc, err)
20103 }()
20104 }
20105 for {
20106 next, err := page.fn(ctx, page.rprl)
20107 if err != nil {
20108 return err
20109 }
20110 page.rprl = next
20111 if !next.hasNextLink() || !next.IsEmpty() {
20112 break
20113 }
20114 }
20115 return nil
20116 }
20117
20118
20119
20120
20121 func (page *RecoveryPointResourceListPage) Next() error {
20122 return page.NextWithContext(context.Background())
20123 }
20124
20125
20126 func (page RecoveryPointResourceListPage) NotDone() bool {
20127 return !page.rprl.IsEmpty()
20128 }
20129
20130
20131 func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList {
20132 return page.rprl
20133 }
20134
20135
20136 func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource {
20137 if page.rprl.IsEmpty() {
20138 return nil
20139 }
20140 return *page.rprl.Value
20141 }
20142
20143
20144 func NewRecoveryPointResourceListPage(cur RecoveryPointResourceList, getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage {
20145 return RecoveryPointResourceListPage{
20146 fn: getNextPage,
20147 rprl: cur,
20148 }
20149 }
20150
20151
20152 type RecoveryPointTierInformation struct {
20153
20154 Type RecoveryPointTierType `json:"type,omitempty"`
20155
20156 Status RecoveryPointTierStatus `json:"status,omitempty"`
20157
20158 ExtendedInfo map[string]*string `json:"extendedInfo"`
20159 }
20160
20161
20162 func (rpti RecoveryPointTierInformation) MarshalJSON() ([]byte, error) {
20163 objectMap := make(map[string]interface{})
20164 if rpti.Type != "" {
20165 objectMap["type"] = rpti.Type
20166 }
20167 if rpti.Status != "" {
20168 objectMap["status"] = rpti.Status
20169 }
20170 if rpti.ExtendedInfo != nil {
20171 objectMap["extendedInfo"] = rpti.ExtendedInfo
20172 }
20173 return json.Marshal(objectMap)
20174 }
20175
20176
20177 type RecoveryPointTierInformationV2 struct {
20178
20179 Type RecoveryPointTierType `json:"type,omitempty"`
20180
20181 Status RecoveryPointTierStatus `json:"status,omitempty"`
20182
20183 ExtendedInfo map[string]*string `json:"extendedInfo"`
20184 }
20185
20186
20187 func (rptiv RecoveryPointTierInformationV2) MarshalJSON() ([]byte, error) {
20188 objectMap := make(map[string]interface{})
20189 if rptiv.Type != "" {
20190 objectMap["type"] = rptiv.Type
20191 }
20192 if rptiv.Status != "" {
20193 objectMap["status"] = rptiv.Status
20194 }
20195 if rptiv.ExtendedInfo != nil {
20196 objectMap["extendedInfo"] = rptiv.ExtendedInfo
20197 }
20198 return json.Marshal(objectMap)
20199 }
20200
20201
20202 type BasicRequest interface {
20203 AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool)
20204 AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool)
20205 AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool)
20206 AsRequest() (*Request, bool)
20207 }
20208
20209
20210 type Request struct {
20211
20212 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
20213 }
20214
20215 func unmarshalBasicRequest(body []byte) (BasicRequest, error) {
20216 var m map[string]interface{}
20217 err := json.Unmarshal(body, &m)
20218 if err != nil {
20219 return nil, err
20220 }
20221
20222 switch m["objectType"] {
20223 case string(ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest):
20224 var afsbr AzureFileShareBackupRequest
20225 err := json.Unmarshal(body, &afsbr)
20226 return afsbr, err
20227 case string(ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest):
20228 var awbr AzureWorkloadBackupRequest
20229 err := json.Unmarshal(body, &awbr)
20230 return awbr, err
20231 case string(ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest):
20232 var ivbr IaasVMBackupRequest
20233 err := json.Unmarshal(body, &ivbr)
20234 return ivbr, err
20235 default:
20236 var r Request
20237 err := json.Unmarshal(body, &r)
20238 return r, err
20239 }
20240 }
20241 func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) {
20242 var rawMessages []*json.RawMessage
20243 err := json.Unmarshal(body, &rawMessages)
20244 if err != nil {
20245 return nil, err
20246 }
20247
20248 rArray := make([]BasicRequest, len(rawMessages))
20249
20250 for index, rawMessage := range rawMessages {
20251 r, err := unmarshalBasicRequest(*rawMessage)
20252 if err != nil {
20253 return nil, err
20254 }
20255 rArray[index] = r
20256 }
20257 return rArray, nil
20258 }
20259
20260
20261 func (r Request) MarshalJSON() ([]byte, error) {
20262 r.ObjectType = ObjectTypeBasicRequestObjectTypeBackupRequest
20263 objectMap := make(map[string]interface{})
20264 if r.ObjectType != "" {
20265 objectMap["objectType"] = r.ObjectType
20266 }
20267 return json.Marshal(objectMap)
20268 }
20269
20270
20271 func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
20272 return nil, false
20273 }
20274
20275
20276 func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
20277 return nil, false
20278 }
20279
20280
20281 func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
20282 return nil, false
20283 }
20284
20285
20286 func (r Request) AsRequest() (*Request, bool) {
20287 return &r, true
20288 }
20289
20290
20291 func (r Request) AsBasicRequest() (BasicRequest, bool) {
20292 return &r, true
20293 }
20294
20295
20296
20297 type RequestResource struct {
20298
20299 Properties BasicRequest `json:"properties,omitempty"`
20300
20301 ID *string `json:"id,omitempty"`
20302
20303 Name *string `json:"name,omitempty"`
20304
20305 Type *string `json:"type,omitempty"`
20306
20307 Location *string `json:"location,omitempty"`
20308
20309 Tags map[string]*string `json:"tags"`
20310
20311 ETag *string `json:"eTag,omitempty"`
20312 }
20313
20314
20315 func (rr RequestResource) MarshalJSON() ([]byte, error) {
20316 objectMap := make(map[string]interface{})
20317 objectMap["properties"] = rr.Properties
20318 if rr.Location != nil {
20319 objectMap["location"] = rr.Location
20320 }
20321 if rr.Tags != nil {
20322 objectMap["tags"] = rr.Tags
20323 }
20324 if rr.ETag != nil {
20325 objectMap["eTag"] = rr.ETag
20326 }
20327 return json.Marshal(objectMap)
20328 }
20329
20330
20331 func (rr *RequestResource) UnmarshalJSON(body []byte) error {
20332 var m map[string]*json.RawMessage
20333 err := json.Unmarshal(body, &m)
20334 if err != nil {
20335 return err
20336 }
20337 for k, v := range m {
20338 switch k {
20339 case "properties":
20340 if v != nil {
20341 properties, err := unmarshalBasicRequest(*v)
20342 if err != nil {
20343 return err
20344 }
20345 rr.Properties = properties
20346 }
20347 case "id":
20348 if v != nil {
20349 var ID string
20350 err = json.Unmarshal(*v, &ID)
20351 if err != nil {
20352 return err
20353 }
20354 rr.ID = &ID
20355 }
20356 case "name":
20357 if v != nil {
20358 var name string
20359 err = json.Unmarshal(*v, &name)
20360 if err != nil {
20361 return err
20362 }
20363 rr.Name = &name
20364 }
20365 case "type":
20366 if v != nil {
20367 var typeVar string
20368 err = json.Unmarshal(*v, &typeVar)
20369 if err != nil {
20370 return err
20371 }
20372 rr.Type = &typeVar
20373 }
20374 case "location":
20375 if v != nil {
20376 var location string
20377 err = json.Unmarshal(*v, &location)
20378 if err != nil {
20379 return err
20380 }
20381 rr.Location = &location
20382 }
20383 case "tags":
20384 if v != nil {
20385 var tags map[string]*string
20386 err = json.Unmarshal(*v, &tags)
20387 if err != nil {
20388 return err
20389 }
20390 rr.Tags = tags
20391 }
20392 case "eTag":
20393 if v != nil {
20394 var eTag string
20395 err = json.Unmarshal(*v, &eTag)
20396 if err != nil {
20397 return err
20398 }
20399 rr.ETag = &eTag
20400 }
20401 }
20402 }
20403
20404 return nil
20405 }
20406
20407
20408 type Resource struct {
20409
20410 ID *string `json:"id,omitempty"`
20411
20412 Name *string `json:"name,omitempty"`
20413
20414 Type *string `json:"type,omitempty"`
20415
20416 Location *string `json:"location,omitempty"`
20417
20418 Tags map[string]*string `json:"tags"`
20419
20420 ETag *string `json:"eTag,omitempty"`
20421 }
20422
20423
20424 func (r Resource) MarshalJSON() ([]byte, error) {
20425 objectMap := make(map[string]interface{})
20426 if r.Location != nil {
20427 objectMap["location"] = r.Location
20428 }
20429 if r.Tags != nil {
20430 objectMap["tags"] = r.Tags
20431 }
20432 if r.ETag != nil {
20433 objectMap["eTag"] = r.ETag
20434 }
20435 return json.Marshal(objectMap)
20436 }
20437
20438
20439 type ResourceConfig struct {
20440
20441 StorageModelType StorageType `json:"storageModelType,omitempty"`
20442
20443 StorageType StorageType `json:"storageType,omitempty"`
20444
20445 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
20446
20447 CrossRegionRestoreFlag *bool `json:"crossRegionRestoreFlag,omitempty"`
20448
20449 DedupState DedupState `json:"dedupState,omitempty"`
20450
20451 XcoolState XcoolState `json:"xcoolState,omitempty"`
20452 }
20453
20454
20455 type ResourceConfigResource struct {
20456 autorest.Response `json:"-"`
20457
20458 Properties *ResourceConfig `json:"properties,omitempty"`
20459
20460 ID *string `json:"id,omitempty"`
20461
20462 Name *string `json:"name,omitempty"`
20463
20464 Type *string `json:"type,omitempty"`
20465
20466 Location *string `json:"location,omitempty"`
20467
20468 Tags map[string]*string `json:"tags"`
20469
20470 ETag *string `json:"eTag,omitempty"`
20471 }
20472
20473
20474 func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) {
20475 objectMap := make(map[string]interface{})
20476 if rcr.Properties != nil {
20477 objectMap["properties"] = rcr.Properties
20478 }
20479 if rcr.Location != nil {
20480 objectMap["location"] = rcr.Location
20481 }
20482 if rcr.Tags != nil {
20483 objectMap["tags"] = rcr.Tags
20484 }
20485 if rcr.ETag != nil {
20486 objectMap["eTag"] = rcr.ETag
20487 }
20488 return json.Marshal(objectMap)
20489 }
20490
20491
20492 type ResourceEncryptionConfig struct {
20493
20494 EncryptionAtRestType EncryptionAtRestType `json:"encryptionAtRestType,omitempty"`
20495
20496 KeyURI *string `json:"keyUri,omitempty"`
20497
20498 SubscriptionID *string `json:"subscriptionId,omitempty"`
20499
20500 LastUpdateStatus LastUpdateStatus `json:"lastUpdateStatus,omitempty"`
20501
20502 InfrastructureEncryptionState InfrastructureEncryptionState `json:"infrastructureEncryptionState,omitempty"`
20503 }
20504
20505
20506 type ResourceEncryptionConfigExtended struct {
20507
20508 UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"`
20509
20510 UseSystemAssignedIdentity *bool `json:"useSystemAssignedIdentity,omitempty"`
20511
20512 EncryptionAtRestType EncryptionAtRestType `json:"encryptionAtRestType,omitempty"`
20513
20514 KeyURI *string `json:"keyUri,omitempty"`
20515
20516 SubscriptionID *string `json:"subscriptionId,omitempty"`
20517
20518 LastUpdateStatus LastUpdateStatus `json:"lastUpdateStatus,omitempty"`
20519
20520 InfrastructureEncryptionState InfrastructureEncryptionState `json:"infrastructureEncryptionState,omitempty"`
20521 }
20522
20523
20524 type ResourceEncryptionConfigExtendedResource struct {
20525 autorest.Response `json:"-"`
20526
20527 Properties *ResourceEncryptionConfigExtended `json:"properties,omitempty"`
20528
20529 ID *string `json:"id,omitempty"`
20530
20531 Name *string `json:"name,omitempty"`
20532
20533 Type *string `json:"type,omitempty"`
20534
20535 Location *string `json:"location,omitempty"`
20536
20537 Tags map[string]*string `json:"tags"`
20538
20539 ETag *string `json:"eTag,omitempty"`
20540 }
20541
20542
20543 func (recer ResourceEncryptionConfigExtendedResource) MarshalJSON() ([]byte, error) {
20544 objectMap := make(map[string]interface{})
20545 if recer.Properties != nil {
20546 objectMap["properties"] = recer.Properties
20547 }
20548 if recer.Location != nil {
20549 objectMap["location"] = recer.Location
20550 }
20551 if recer.Tags != nil {
20552 objectMap["tags"] = recer.Tags
20553 }
20554 if recer.ETag != nil {
20555 objectMap["eTag"] = recer.ETag
20556 }
20557 return json.Marshal(objectMap)
20558 }
20559
20560
20561 type ResourceEncryptionConfigResource struct {
20562
20563 Properties *ResourceEncryptionConfig `json:"properties,omitempty"`
20564
20565 ID *string `json:"id,omitempty"`
20566
20567 Name *string `json:"name,omitempty"`
20568
20569 Type *string `json:"type,omitempty"`
20570
20571 Location *string `json:"location,omitempty"`
20572
20573 Tags map[string]*string `json:"tags"`
20574
20575 ETag *string `json:"eTag,omitempty"`
20576 }
20577
20578
20579 func (recr ResourceEncryptionConfigResource) MarshalJSON() ([]byte, error) {
20580 objectMap := make(map[string]interface{})
20581 if recr.Properties != nil {
20582 objectMap["properties"] = recr.Properties
20583 }
20584 if recr.Location != nil {
20585 objectMap["location"] = recr.Location
20586 }
20587 if recr.Tags != nil {
20588 objectMap["tags"] = recr.Tags
20589 }
20590 if recr.ETag != nil {
20591 objectMap["eTag"] = recr.ETag
20592 }
20593 return json.Marshal(objectMap)
20594 }
20595
20596
20597 type ResourceGuardOperationDetail struct {
20598 VaultCriticalOperation *string `json:"vaultCriticalOperation,omitempty"`
20599 DefaultResourceRequest *string `json:"defaultResourceRequest,omitempty"`
20600 }
20601
20602
20603 type ResourceGuardProxyBase struct {
20604 ResourceGuardResourceID *string `json:"resourceGuardResourceId,omitempty"`
20605 ResourceGuardOperationDetails *[]ResourceGuardOperationDetail `json:"resourceGuardOperationDetails,omitempty"`
20606 LastUpdatedTime *string `json:"lastUpdatedTime,omitempty"`
20607 Description *string `json:"description,omitempty"`
20608 }
20609
20610
20611 type ResourceGuardProxyBaseResource struct {
20612 autorest.Response `json:"-"`
20613
20614 Properties *ResourceGuardProxyBase `json:"properties,omitempty"`
20615
20616 ID *string `json:"id,omitempty"`
20617
20618 Name *string `json:"name,omitempty"`
20619
20620 Type *string `json:"type,omitempty"`
20621
20622 Location *string `json:"location,omitempty"`
20623
20624 Tags map[string]*string `json:"tags"`
20625
20626 ETag *string `json:"eTag,omitempty"`
20627 }
20628
20629
20630 func (rgpbr ResourceGuardProxyBaseResource) MarshalJSON() ([]byte, error) {
20631 objectMap := make(map[string]interface{})
20632 if rgpbr.Properties != nil {
20633 objectMap["properties"] = rgpbr.Properties
20634 }
20635 if rgpbr.Location != nil {
20636 objectMap["location"] = rgpbr.Location
20637 }
20638 if rgpbr.Tags != nil {
20639 objectMap["tags"] = rgpbr.Tags
20640 }
20641 if rgpbr.ETag != nil {
20642 objectMap["eTag"] = rgpbr.ETag
20643 }
20644 return json.Marshal(objectMap)
20645 }
20646
20647
20648 type ResourceGuardProxyBaseResourceList struct {
20649 autorest.Response `json:"-"`
20650
20651 Value *[]ResourceGuardProxyBaseResource `json:"value,omitempty"`
20652
20653 NextLink *string `json:"nextLink,omitempty"`
20654 }
20655
20656
20657
20658 type ResourceGuardProxyBaseResourceListIterator struct {
20659 i int
20660 page ResourceGuardProxyBaseResourceListPage
20661 }
20662
20663
20664
20665 func (iter *ResourceGuardProxyBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) {
20666 if tracing.IsEnabled() {
20667 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardProxyBaseResourceListIterator.NextWithContext")
20668 defer func() {
20669 sc := -1
20670 if iter.Response().Response.Response != nil {
20671 sc = iter.Response().Response.Response.StatusCode
20672 }
20673 tracing.EndSpan(ctx, sc, err)
20674 }()
20675 }
20676 iter.i++
20677 if iter.i < len(iter.page.Values()) {
20678 return nil
20679 }
20680 err = iter.page.NextWithContext(ctx)
20681 if err != nil {
20682 iter.i--
20683 return err
20684 }
20685 iter.i = 0
20686 return nil
20687 }
20688
20689
20690
20691
20692 func (iter *ResourceGuardProxyBaseResourceListIterator) Next() error {
20693 return iter.NextWithContext(context.Background())
20694 }
20695
20696
20697 func (iter ResourceGuardProxyBaseResourceListIterator) NotDone() bool {
20698 return iter.page.NotDone() && iter.i < len(iter.page.Values())
20699 }
20700
20701
20702 func (iter ResourceGuardProxyBaseResourceListIterator) Response() ResourceGuardProxyBaseResourceList {
20703 return iter.page.Response()
20704 }
20705
20706
20707
20708 func (iter ResourceGuardProxyBaseResourceListIterator) Value() ResourceGuardProxyBaseResource {
20709 if !iter.page.NotDone() {
20710 return ResourceGuardProxyBaseResource{}
20711 }
20712 return iter.page.Values()[iter.i]
20713 }
20714
20715
20716 func NewResourceGuardProxyBaseResourceListIterator(page ResourceGuardProxyBaseResourceListPage) ResourceGuardProxyBaseResourceListIterator {
20717 return ResourceGuardProxyBaseResourceListIterator{page: page}
20718 }
20719
20720
20721 func (rgpbrl ResourceGuardProxyBaseResourceList) IsEmpty() bool {
20722 return rgpbrl.Value == nil || len(*rgpbrl.Value) == 0
20723 }
20724
20725
20726 func (rgpbrl ResourceGuardProxyBaseResourceList) hasNextLink() bool {
20727 return rgpbrl.NextLink != nil && len(*rgpbrl.NextLink) != 0
20728 }
20729
20730
20731
20732 func (rgpbrl ResourceGuardProxyBaseResourceList) resourceGuardProxyBaseResourceListPreparer(ctx context.Context) (*http.Request, error) {
20733 if !rgpbrl.hasNextLink() {
20734 return nil, nil
20735 }
20736 return autorest.Prepare((&http.Request{}).WithContext(ctx),
20737 autorest.AsJSON(),
20738 autorest.AsGet(),
20739 autorest.WithBaseURL(to.String(rgpbrl.NextLink)))
20740 }
20741
20742
20743 type ResourceGuardProxyBaseResourceListPage struct {
20744 fn func(context.Context, ResourceGuardProxyBaseResourceList) (ResourceGuardProxyBaseResourceList, error)
20745 rgpbrl ResourceGuardProxyBaseResourceList
20746 }
20747
20748
20749
20750 func (page *ResourceGuardProxyBaseResourceListPage) NextWithContext(ctx context.Context) (err error) {
20751 if tracing.IsEnabled() {
20752 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardProxyBaseResourceListPage.NextWithContext")
20753 defer func() {
20754 sc := -1
20755 if page.Response().Response.Response != nil {
20756 sc = page.Response().Response.Response.StatusCode
20757 }
20758 tracing.EndSpan(ctx, sc, err)
20759 }()
20760 }
20761 for {
20762 next, err := page.fn(ctx, page.rgpbrl)
20763 if err != nil {
20764 return err
20765 }
20766 page.rgpbrl = next
20767 if !next.hasNextLink() || !next.IsEmpty() {
20768 break
20769 }
20770 }
20771 return nil
20772 }
20773
20774
20775
20776
20777 func (page *ResourceGuardProxyBaseResourceListPage) Next() error {
20778 return page.NextWithContext(context.Background())
20779 }
20780
20781
20782 func (page ResourceGuardProxyBaseResourceListPage) NotDone() bool {
20783 return !page.rgpbrl.IsEmpty()
20784 }
20785
20786
20787 func (page ResourceGuardProxyBaseResourceListPage) Response() ResourceGuardProxyBaseResourceList {
20788 return page.rgpbrl
20789 }
20790
20791
20792 func (page ResourceGuardProxyBaseResourceListPage) Values() []ResourceGuardProxyBaseResource {
20793 if page.rgpbrl.IsEmpty() {
20794 return nil
20795 }
20796 return *page.rgpbrl.Value
20797 }
20798
20799
20800 func NewResourceGuardProxyBaseResourceListPage(cur ResourceGuardProxyBaseResourceList, getNextPage func(context.Context, ResourceGuardProxyBaseResourceList) (ResourceGuardProxyBaseResourceList, error)) ResourceGuardProxyBaseResourceListPage {
20801 return ResourceGuardProxyBaseResourceListPage{
20802 fn: getNextPage,
20803 rgpbrl: cur,
20804 }
20805 }
20806
20807
20808 type ResourceHealthDetails struct {
20809
20810 Code *int32 `json:"code,omitempty"`
20811
20812 Title *string `json:"title,omitempty"`
20813
20814 Message *string `json:"message,omitempty"`
20815
20816 Recommendations *[]string `json:"recommendations,omitempty"`
20817 }
20818
20819
20820 func (rhd ResourceHealthDetails) MarshalJSON() ([]byte, error) {
20821 objectMap := make(map[string]interface{})
20822 return json.Marshal(objectMap)
20823 }
20824
20825
20826 type ResourceList struct {
20827
20828 NextLink *string `json:"nextLink,omitempty"`
20829 }
20830
20831
20832 type ResourceVaultConfig struct {
20833
20834 StorageModelType StorageType `json:"storageModelType,omitempty"`
20835
20836 StorageType StorageType `json:"storageType,omitempty"`
20837
20838 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
20839
20840 EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"`
20841
20842 SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"`
20843
20844 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
20845
20846 IsSoftDeleteFeatureStateEditable *bool `json:"isSoftDeleteFeatureStateEditable,omitempty"`
20847 }
20848
20849
20850 type ResourceVaultConfigResource struct {
20851 autorest.Response `json:"-"`
20852
20853 Properties *ResourceVaultConfig `json:"properties,omitempty"`
20854
20855 ID *string `json:"id,omitempty"`
20856
20857 Name *string `json:"name,omitempty"`
20858
20859 Type *string `json:"type,omitempty"`
20860
20861 Location *string `json:"location,omitempty"`
20862
20863 Tags map[string]*string `json:"tags"`
20864
20865 ETag *string `json:"eTag,omitempty"`
20866 }
20867
20868
20869 func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) {
20870 objectMap := make(map[string]interface{})
20871 if rvcr.Properties != nil {
20872 objectMap["properties"] = rvcr.Properties
20873 }
20874 if rvcr.Location != nil {
20875 objectMap["location"] = rvcr.Location
20876 }
20877 if rvcr.Tags != nil {
20878 objectMap["tags"] = rvcr.Tags
20879 }
20880 if rvcr.ETag != nil {
20881 objectMap["eTag"] = rvcr.ETag
20882 }
20883 return json.Marshal(objectMap)
20884 }
20885
20886
20887 type RestoreFileSpecs struct {
20888
20889 Path *string `json:"path,omitempty"`
20890
20891 FileSpecType *string `json:"fileSpecType,omitempty"`
20892
20893 TargetFolderPath *string `json:"targetFolderPath,omitempty"`
20894 }
20895
20896
20897 type BasicRestoreRequest interface {
20898 AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool)
20899 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
20900 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
20901 AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool)
20902 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
20903 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
20904 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
20905 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
20906 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
20907 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
20908 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
20909 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
20910 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
20911 AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool)
20912 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
20913 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
20914 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
20915 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
20916 AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool)
20917 AsRestoreRequest() (*RestoreRequest, bool)
20918 }
20919
20920
20921
20922 type RestoreRequest struct {
20923
20924 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
20925 }
20926
20927 func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) {
20928 var m map[string]interface{}
20929 err := json.Unmarshal(body, &m)
20930 if err != nil {
20931 return nil, err
20932 }
20933
20934 switch m["objectType"] {
20935 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest):
20936 var afsrr AzureFileShareRestoreRequest
20937 err := json.Unmarshal(body, &afsrr)
20938 return afsrr, err
20939 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest):
20940 var awpitrr AzureWorkloadPointInTimeRestoreRequest
20941 err := json.Unmarshal(body, &awpitrr)
20942 return awpitrr, err
20943 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest):
20944 var awrr AzureWorkloadRestoreRequest
20945 err := json.Unmarshal(body, &awrr)
20946 return awrr, err
20947 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
20948 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
20949 err := json.Unmarshal(body, &awshpitrr)
20950 return awshpitrr, err
20951 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest):
20952 var awshrr AzureWorkloadSAPHanaRestoreRequest
20953 err := json.Unmarshal(body, &awshrr)
20954 return awshrr, err
20955 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
20956 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
20957 err := json.Unmarshal(body, &awspitrr)
20958 return awspitrr, err
20959 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest):
20960 var awsrr AzureWorkloadSQLRestoreRequest
20961 err := json.Unmarshal(body, &awsrr)
20962 return awsrr, err
20963 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest):
20964 var ivrr IaasVMRestoreRequest
20965 err := json.Unmarshal(body, &ivrr)
20966 return ivrr, err
20967 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
20968 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
20969 err := json.Unmarshal(body, &awshpitrwrr)
20970 return awshpitrwrr, err
20971 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
20972 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
20973 err := json.Unmarshal(body, &awshrwrr)
20974 return awshrwrr, err
20975 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
20976 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
20977 err := json.Unmarshal(body, &awspitrwrr)
20978 return awspitrwrr, err
20979 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
20980 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
20981 err := json.Unmarshal(body, &awsrwrr)
20982 return awsrwrr, err
20983 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest):
20984 var ivrwrr IaasVMRestoreWithRehydrationRequest
20985 err := json.Unmarshal(body, &ivrwrr)
20986 return ivrwrr, err
20987 default:
20988 var rr RestoreRequest
20989 err := json.Unmarshal(body, &rr)
20990 return rr, err
20991 }
20992 }
20993 func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) {
20994 var rawMessages []*json.RawMessage
20995 err := json.Unmarshal(body, &rawMessages)
20996 if err != nil {
20997 return nil, err
20998 }
20999
21000 rrArray := make([]BasicRestoreRequest, len(rawMessages))
21001
21002 for index, rawMessage := range rawMessages {
21003 rr, err := unmarshalBasicRestoreRequest(*rawMessage)
21004 if err != nil {
21005 return nil, err
21006 }
21007 rrArray[index] = rr
21008 }
21009 return rrArray, nil
21010 }
21011
21012
21013 func (rr RestoreRequest) MarshalJSON() ([]byte, error) {
21014 rr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest
21015 objectMap := make(map[string]interface{})
21016 if rr.ObjectType != "" {
21017 objectMap["objectType"] = rr.ObjectType
21018 }
21019 return json.Marshal(objectMap)
21020 }
21021
21022
21023 func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
21024 return nil, false
21025 }
21026
21027
21028 func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
21029 return nil, false
21030 }
21031
21032
21033 func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
21034 return nil, false
21035 }
21036
21037
21038 func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
21039 return nil, false
21040 }
21041
21042
21043 func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
21044 return nil, false
21045 }
21046
21047
21048 func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
21049 return nil, false
21050 }
21051
21052
21053 func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
21054 return nil, false
21055 }
21056
21057
21058 func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
21059 return nil, false
21060 }
21061
21062
21063 func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
21064 return nil, false
21065 }
21066
21067
21068 func (rr RestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
21069 return nil, false
21070 }
21071
21072
21073 func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
21074 return nil, false
21075 }
21076
21077
21078 func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
21079 return nil, false
21080 }
21081
21082
21083 func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
21084 return nil, false
21085 }
21086
21087
21088 func (rr RestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
21089 return nil, false
21090 }
21091
21092
21093 func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
21094 return nil, false
21095 }
21096
21097
21098 func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
21099 return nil, false
21100 }
21101
21102
21103 func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
21104 return nil, false
21105 }
21106
21107
21108 func (rr RestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
21109 return nil, false
21110 }
21111
21112
21113 func (rr RestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
21114 return nil, false
21115 }
21116
21117
21118 func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
21119 return &rr, true
21120 }
21121
21122
21123 func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
21124 return &rr, true
21125 }
21126
21127
21128
21129 type RestoreRequestResource struct {
21130
21131 Properties BasicRestoreRequest `json:"properties,omitempty"`
21132
21133 ID *string `json:"id,omitempty"`
21134
21135 Name *string `json:"name,omitempty"`
21136
21137 Type *string `json:"type,omitempty"`
21138
21139 Location *string `json:"location,omitempty"`
21140
21141 Tags map[string]*string `json:"tags"`
21142
21143 ETag *string `json:"eTag,omitempty"`
21144 }
21145
21146
21147 func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) {
21148 objectMap := make(map[string]interface{})
21149 objectMap["properties"] = rrr.Properties
21150 if rrr.Location != nil {
21151 objectMap["location"] = rrr.Location
21152 }
21153 if rrr.Tags != nil {
21154 objectMap["tags"] = rrr.Tags
21155 }
21156 if rrr.ETag != nil {
21157 objectMap["eTag"] = rrr.ETag
21158 }
21159 return json.Marshal(objectMap)
21160 }
21161
21162
21163 func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error {
21164 var m map[string]*json.RawMessage
21165 err := json.Unmarshal(body, &m)
21166 if err != nil {
21167 return err
21168 }
21169 for k, v := range m {
21170 switch k {
21171 case "properties":
21172 if v != nil {
21173 properties, err := unmarshalBasicRestoreRequest(*v)
21174 if err != nil {
21175 return err
21176 }
21177 rrr.Properties = properties
21178 }
21179 case "id":
21180 if v != nil {
21181 var ID string
21182 err = json.Unmarshal(*v, &ID)
21183 if err != nil {
21184 return err
21185 }
21186 rrr.ID = &ID
21187 }
21188 case "name":
21189 if v != nil {
21190 var name string
21191 err = json.Unmarshal(*v, &name)
21192 if err != nil {
21193 return err
21194 }
21195 rrr.Name = &name
21196 }
21197 case "type":
21198 if v != nil {
21199 var typeVar string
21200 err = json.Unmarshal(*v, &typeVar)
21201 if err != nil {
21202 return err
21203 }
21204 rrr.Type = &typeVar
21205 }
21206 case "location":
21207 if v != nil {
21208 var location string
21209 err = json.Unmarshal(*v, &location)
21210 if err != nil {
21211 return err
21212 }
21213 rrr.Location = &location
21214 }
21215 case "tags":
21216 if v != nil {
21217 var tags map[string]*string
21218 err = json.Unmarshal(*v, &tags)
21219 if err != nil {
21220 return err
21221 }
21222 rrr.Tags = tags
21223 }
21224 case "eTag":
21225 if v != nil {
21226 var eTag string
21227 err = json.Unmarshal(*v, &eTag)
21228 if err != nil {
21229 return err
21230 }
21231 rrr.ETag = &eTag
21232 }
21233 }
21234 }
21235
21236 return nil
21237 }
21238
21239
21240
21241 type RestoresTriggerFuture struct {
21242 azure.FutureAPI
21243
21244
21245 Result func(RestoresClient) (autorest.Response, error)
21246 }
21247
21248
21249 func (future *RestoresTriggerFuture) UnmarshalJSON(body []byte) error {
21250 var azFuture azure.Future
21251 if err := json.Unmarshal(body, &azFuture); err != nil {
21252 return err
21253 }
21254 future.FutureAPI = &azFuture
21255 future.Result = future.result
21256 return nil
21257 }
21258
21259
21260 func (future *RestoresTriggerFuture) result(client RestoresClient) (ar autorest.Response, err error) {
21261 var done bool
21262 done, err = future.DoneWithContext(context.Background(), client)
21263 if err != nil {
21264 err = autorest.NewErrorWithError(err, "backup.RestoresTriggerFuture", "Result", future.Response(), "Polling failure")
21265 return
21266 }
21267 if !done {
21268 ar.Response = future.Response()
21269 err = azure.NewAsyncOpIncompleteError("backup.RestoresTriggerFuture")
21270 return
21271 }
21272 ar.Response = future.Response()
21273 return
21274 }
21275
21276
21277 type RetentionDuration struct {
21278
21279
21280 Count *int32 `json:"count,omitempty"`
21281
21282 DurationType RetentionDurationType `json:"durationType,omitempty"`
21283 }
21284
21285
21286 type BasicRetentionPolicy interface {
21287 AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool)
21288 AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool)
21289 AsRetentionPolicy() (*RetentionPolicy, bool)
21290 }
21291
21292
21293 type RetentionPolicy struct {
21294
21295 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
21296 }
21297
21298 func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) {
21299 var m map[string]interface{}
21300 err := json.Unmarshal(body, &m)
21301 if err != nil {
21302 return nil, err
21303 }
21304
21305 switch m["retentionPolicyType"] {
21306 case string(RetentionPolicyTypeLongTermRetentionPolicy):
21307 var ltrp LongTermRetentionPolicy
21308 err := json.Unmarshal(body, <rp)
21309 return ltrp, err
21310 case string(RetentionPolicyTypeSimpleRetentionPolicy):
21311 var srp SimpleRetentionPolicy
21312 err := json.Unmarshal(body, &srp)
21313 return srp, err
21314 default:
21315 var rp RetentionPolicy
21316 err := json.Unmarshal(body, &rp)
21317 return rp, err
21318 }
21319 }
21320 func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) {
21321 var rawMessages []*json.RawMessage
21322 err := json.Unmarshal(body, &rawMessages)
21323 if err != nil {
21324 return nil, err
21325 }
21326
21327 rpArray := make([]BasicRetentionPolicy, len(rawMessages))
21328
21329 for index, rawMessage := range rawMessages {
21330 rp, err := unmarshalBasicRetentionPolicy(*rawMessage)
21331 if err != nil {
21332 return nil, err
21333 }
21334 rpArray[index] = rp
21335 }
21336 return rpArray, nil
21337 }
21338
21339
21340 func (rp RetentionPolicy) MarshalJSON() ([]byte, error) {
21341 rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy
21342 objectMap := make(map[string]interface{})
21343 if rp.RetentionPolicyType != "" {
21344 objectMap["retentionPolicyType"] = rp.RetentionPolicyType
21345 }
21346 return json.Marshal(objectMap)
21347 }
21348
21349
21350 func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
21351 return nil, false
21352 }
21353
21354
21355 func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
21356 return nil, false
21357 }
21358
21359
21360 func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
21361 return &rp, true
21362 }
21363
21364
21365 func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
21366 return &rp, true
21367 }
21368
21369
21370 type BasicSchedulePolicy interface {
21371 AsLogSchedulePolicy() (*LogSchedulePolicy, bool)
21372 AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool)
21373 AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool)
21374 AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool)
21375 AsSchedulePolicy() (*SchedulePolicy, bool)
21376 }
21377
21378
21379 type SchedulePolicy struct {
21380
21381 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
21382 }
21383
21384 func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) {
21385 var m map[string]interface{}
21386 err := json.Unmarshal(body, &m)
21387 if err != nil {
21388 return nil, err
21389 }
21390
21391 switch m["schedulePolicyType"] {
21392 case string(SchedulePolicyTypeLogSchedulePolicy):
21393 var lsp LogSchedulePolicy
21394 err := json.Unmarshal(body, &lsp)
21395 return lsp, err
21396 case string(SchedulePolicyTypeLongTermSchedulePolicy):
21397 var ltsp LongTermSchedulePolicy
21398 err := json.Unmarshal(body, <sp)
21399 return ltsp, err
21400 case string(SchedulePolicyTypeSimpleSchedulePolicy):
21401 var ssp SimpleSchedulePolicy
21402 err := json.Unmarshal(body, &ssp)
21403 return ssp, err
21404 case string(SchedulePolicyTypeSimpleSchedulePolicyV2):
21405 var sspv SimpleSchedulePolicyV2
21406 err := json.Unmarshal(body, &sspv)
21407 return sspv, err
21408 default:
21409 var sp SchedulePolicy
21410 err := json.Unmarshal(body, &sp)
21411 return sp, err
21412 }
21413 }
21414 func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) {
21415 var rawMessages []*json.RawMessage
21416 err := json.Unmarshal(body, &rawMessages)
21417 if err != nil {
21418 return nil, err
21419 }
21420
21421 spArray := make([]BasicSchedulePolicy, len(rawMessages))
21422
21423 for index, rawMessage := range rawMessages {
21424 sp, err := unmarshalBasicSchedulePolicy(*rawMessage)
21425 if err != nil {
21426 return nil, err
21427 }
21428 spArray[index] = sp
21429 }
21430 return spArray, nil
21431 }
21432
21433
21434 func (sp SchedulePolicy) MarshalJSON() ([]byte, error) {
21435 sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy
21436 objectMap := make(map[string]interface{})
21437 if sp.SchedulePolicyType != "" {
21438 objectMap["schedulePolicyType"] = sp.SchedulePolicyType
21439 }
21440 return json.Marshal(objectMap)
21441 }
21442
21443
21444 func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
21445 return nil, false
21446 }
21447
21448
21449 func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
21450 return nil, false
21451 }
21452
21453
21454 func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
21455 return nil, false
21456 }
21457
21458
21459 func (sp SchedulePolicy) AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool) {
21460 return nil, false
21461 }
21462
21463
21464 func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
21465 return &sp, true
21466 }
21467
21468
21469 func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
21470 return &sp, true
21471 }
21472
21473
21474 type SecurityPinBase struct {
21475
21476 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
21477 }
21478
21479
21480 type Settings struct {
21481
21482 TimeZone *string `json:"timeZone,omitempty"`
21483
21484 Issqlcompression *bool `json:"issqlcompression,omitempty"`
21485
21486
21487 IsCompression *bool `json:"isCompression,omitempty"`
21488 }
21489
21490
21491 type SimpleRetentionPolicy struct {
21492
21493 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
21494
21495 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
21496 }
21497
21498
21499 func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) {
21500 srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy
21501 objectMap := make(map[string]interface{})
21502 if srp.RetentionDuration != nil {
21503 objectMap["retentionDuration"] = srp.RetentionDuration
21504 }
21505 if srp.RetentionPolicyType != "" {
21506 objectMap["retentionPolicyType"] = srp.RetentionPolicyType
21507 }
21508 return json.Marshal(objectMap)
21509 }
21510
21511
21512 func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
21513 return nil, false
21514 }
21515
21516
21517 func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
21518 return &srp, true
21519 }
21520
21521
21522 func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
21523 return nil, false
21524 }
21525
21526
21527 func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
21528 return &srp, true
21529 }
21530
21531
21532 type SimpleSchedulePolicy struct {
21533
21534 ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"`
21535
21536 ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"`
21537
21538 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"`
21539
21540 HourlySchedule *HourlySchedule `json:"hourlySchedule,omitempty"`
21541
21542 ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"`
21543
21544 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
21545 }
21546
21547
21548 func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) {
21549 ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy
21550 objectMap := make(map[string]interface{})
21551 if ssp.ScheduleRunFrequency != "" {
21552 objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency
21553 }
21554 if ssp.ScheduleRunDays != nil {
21555 objectMap["scheduleRunDays"] = ssp.ScheduleRunDays
21556 }
21557 if ssp.ScheduleRunTimes != nil {
21558 objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes
21559 }
21560 if ssp.HourlySchedule != nil {
21561 objectMap["hourlySchedule"] = ssp.HourlySchedule
21562 }
21563 if ssp.ScheduleWeeklyFrequency != nil {
21564 objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency
21565 }
21566 if ssp.SchedulePolicyType != "" {
21567 objectMap["schedulePolicyType"] = ssp.SchedulePolicyType
21568 }
21569 return json.Marshal(objectMap)
21570 }
21571
21572
21573 func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
21574 return nil, false
21575 }
21576
21577
21578 func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
21579 return nil, false
21580 }
21581
21582
21583 func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
21584 return &ssp, true
21585 }
21586
21587
21588 func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool) {
21589 return nil, false
21590 }
21591
21592
21593 func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
21594 return nil, false
21595 }
21596
21597
21598 func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
21599 return &ssp, true
21600 }
21601
21602
21603 type SimpleSchedulePolicyV2 struct {
21604
21605 ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"`
21606
21607 HourlySchedule *HourlySchedule `json:"hourlySchedule,omitempty"`
21608
21609 DailySchedule *DailySchedule `json:"dailySchedule,omitempty"`
21610
21611 WeeklySchedule *WeeklySchedule `json:"weeklySchedule,omitempty"`
21612
21613 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
21614 }
21615
21616
21617 func (sspv SimpleSchedulePolicyV2) MarshalJSON() ([]byte, error) {
21618 sspv.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicyV2
21619 objectMap := make(map[string]interface{})
21620 if sspv.ScheduleRunFrequency != "" {
21621 objectMap["scheduleRunFrequency"] = sspv.ScheduleRunFrequency
21622 }
21623 if sspv.HourlySchedule != nil {
21624 objectMap["hourlySchedule"] = sspv.HourlySchedule
21625 }
21626 if sspv.DailySchedule != nil {
21627 objectMap["dailySchedule"] = sspv.DailySchedule
21628 }
21629 if sspv.WeeklySchedule != nil {
21630 objectMap["weeklySchedule"] = sspv.WeeklySchedule
21631 }
21632 if sspv.SchedulePolicyType != "" {
21633 objectMap["schedulePolicyType"] = sspv.SchedulePolicyType
21634 }
21635 return json.Marshal(objectMap)
21636 }
21637
21638
21639 func (sspv SimpleSchedulePolicyV2) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
21640 return nil, false
21641 }
21642
21643
21644 func (sspv SimpleSchedulePolicyV2) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
21645 return nil, false
21646 }
21647
21648
21649 func (sspv SimpleSchedulePolicyV2) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
21650 return nil, false
21651 }
21652
21653
21654 func (sspv SimpleSchedulePolicyV2) AsSimpleSchedulePolicyV2() (*SimpleSchedulePolicyV2, bool) {
21655 return &sspv, true
21656 }
21657
21658
21659 func (sspv SimpleSchedulePolicyV2) AsSchedulePolicy() (*SchedulePolicy, bool) {
21660 return nil, false
21661 }
21662
21663
21664 func (sspv SimpleSchedulePolicyV2) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
21665 return &sspv, true
21666 }
21667
21668
21669 type SQLDataDirectory struct {
21670
21671 Type SQLDataDirectoryType `json:"type,omitempty"`
21672
21673 Path *string `json:"path,omitempty"`
21674
21675 LogicalName *string `json:"logicalName,omitempty"`
21676 }
21677
21678
21679 type SQLDataDirectoryMapping struct {
21680
21681 MappingType SQLDataDirectoryType `json:"mappingType,omitempty"`
21682
21683 SourceLogicalName *string `json:"sourceLogicalName,omitempty"`
21684
21685 SourcePath *string `json:"sourcePath,omitempty"`
21686
21687 TargetPath *string `json:"targetPath,omitempty"`
21688 }
21689
21690
21691 type StatusRequest struct {
21692
21693 ResourceType DataSourceType `json:"resourceType,omitempty"`
21694
21695 ResourceID *string `json:"resourceId,omitempty"`
21696
21697 PoLogicalName *string `json:"poLogicalName,omitempty"`
21698 }
21699
21700
21701 type StatusResponse struct {
21702 autorest.Response `json:"-"`
21703
21704 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
21705
21706 VaultID *string `json:"vaultId,omitempty"`
21707
21708 FabricName FabricName `json:"fabricName,omitempty"`
21709
21710 ContainerName *string `json:"containerName,omitempty"`
21711
21712 ProtectedItemName *string `json:"protectedItemName,omitempty"`
21713
21714 ErrorCode *string `json:"errorCode,omitempty"`
21715
21716 ErrorMessage *string `json:"errorMessage,omitempty"`
21717
21718 PolicyName *string `json:"policyName,omitempty"`
21719
21720 RegistrationStatus *string `json:"registrationStatus,omitempty"`
21721 }
21722
21723
21724 type SubProtectionPolicy struct {
21725
21726 PolicyType PolicyType `json:"policyType,omitempty"`
21727
21728 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
21729
21730 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
21731
21732
21733
21734 TieringPolicy map[string]*TieringPolicy `json:"tieringPolicy"`
21735 }
21736
21737
21738 func (spp SubProtectionPolicy) MarshalJSON() ([]byte, error) {
21739 objectMap := make(map[string]interface{})
21740 if spp.PolicyType != "" {
21741 objectMap["policyType"] = spp.PolicyType
21742 }
21743 objectMap["schedulePolicy"] = spp.SchedulePolicy
21744 objectMap["retentionPolicy"] = spp.RetentionPolicy
21745 if spp.TieringPolicy != nil {
21746 objectMap["tieringPolicy"] = spp.TieringPolicy
21747 }
21748 return json.Marshal(objectMap)
21749 }
21750
21751
21752 func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error {
21753 var m map[string]*json.RawMessage
21754 err := json.Unmarshal(body, &m)
21755 if err != nil {
21756 return err
21757 }
21758 for k, v := range m {
21759 switch k {
21760 case "policyType":
21761 if v != nil {
21762 var policyType PolicyType
21763 err = json.Unmarshal(*v, &policyType)
21764 if err != nil {
21765 return err
21766 }
21767 spp.PolicyType = policyType
21768 }
21769 case "schedulePolicy":
21770 if v != nil {
21771 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
21772 if err != nil {
21773 return err
21774 }
21775 spp.SchedulePolicy = schedulePolicy
21776 }
21777 case "retentionPolicy":
21778 if v != nil {
21779 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
21780 if err != nil {
21781 return err
21782 }
21783 spp.RetentionPolicy = retentionPolicy
21784 }
21785 case "tieringPolicy":
21786 if v != nil {
21787 var tieringPolicy map[string]*TieringPolicy
21788 err = json.Unmarshal(*v, &tieringPolicy)
21789 if err != nil {
21790 return err
21791 }
21792 spp.TieringPolicy = tieringPolicy
21793 }
21794 }
21795 }
21796
21797 return nil
21798 }
21799
21800
21801 type TargetAFSRestoreInfo struct {
21802
21803 Name *string `json:"name,omitempty"`
21804
21805 TargetResourceID *string `json:"targetResourceId,omitempty"`
21806 }
21807
21808
21809 type TargetRestoreInfo struct {
21810
21811 OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"`
21812
21813 ContainerID *string `json:"containerId,omitempty"`
21814
21815 DatabaseName *string `json:"databaseName,omitempty"`
21816
21817 TargetDirectoryForFileRestore *string `json:"targetDirectoryForFileRestore,omitempty"`
21818 }
21819
21820
21821
21822
21823 type TieringPolicy struct {
21824
21825
21826
21827
21828 TieringMode TieringMode `json:"tieringMode,omitempty"`
21829
21830
21831 Duration *int32 `json:"duration,omitempty"`
21832
21833
21834 DurationType RetentionDurationType `json:"durationType,omitempty"`
21835 }
21836
21837
21838 type TokenInformation struct {
21839 autorest.Response `json:"-"`
21840
21841 Token *string `json:"token,omitempty"`
21842
21843 ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"`
21844
21845 SecurityPIN *string `json:"securityPIN,omitempty"`
21846 }
21847
21848
21849 type TriggerDataMoveRequest struct {
21850
21851 SourceResourceID *string `json:"sourceResourceId,omitempty"`
21852
21853 SourceRegion *string `json:"sourceRegion,omitempty"`
21854
21855 DataMoveLevel DataMoveLevel `json:"dataMoveLevel,omitempty"`
21856
21857 CorrelationID *string `json:"correlationId,omitempty"`
21858
21859 SourceContainerArmIds *[]string `json:"sourceContainerArmIds,omitempty"`
21860
21861 PauseGC *bool `json:"pauseGC,omitempty"`
21862 }
21863
21864
21865 type UnlockDeleteRequest struct {
21866 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
21867 ResourceToBeDeleted *string `json:"resourceToBeDeleted,omitempty"`
21868 }
21869
21870
21871 type UnlockDeleteResponse struct {
21872 autorest.Response `json:"-"`
21873
21874 UnlockDeleteExpiryTime *string `json:"unlockDeleteExpiryTime,omitempty"`
21875 }
21876
21877
21878 type ValidateIaasVMRestoreOperationRequest struct {
21879
21880 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
21881
21882 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21883 }
21884
21885
21886 func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) {
21887 vivror.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest
21888 objectMap := make(map[string]interface{})
21889 objectMap["restoreRequest"] = vivror.RestoreRequest
21890 if vivror.ObjectType != "" {
21891 objectMap["objectType"] = vivror.ObjectType
21892 }
21893 return json.Marshal(objectMap)
21894 }
21895
21896
21897 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21898 return &vivror, true
21899 }
21900
21901
21902 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21903 return nil, false
21904 }
21905
21906
21907 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21908 return &vivror, true
21909 }
21910
21911
21912 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21913 return nil, false
21914 }
21915
21916
21917 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21918 return &vivror, true
21919 }
21920
21921
21922 func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error {
21923 var m map[string]*json.RawMessage
21924 err := json.Unmarshal(body, &m)
21925 if err != nil {
21926 return err
21927 }
21928 for k, v := range m {
21929 switch k {
21930 case "restoreRequest":
21931 if v != nil {
21932 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
21933 if err != nil {
21934 return err
21935 }
21936 vivror.RestoreRequest = restoreRequest
21937 }
21938 case "objectType":
21939 if v != nil {
21940 var objectType ObjectTypeBasicValidateOperationRequest
21941 err = json.Unmarshal(*v, &objectType)
21942 if err != nil {
21943 return err
21944 }
21945 vivror.ObjectType = objectType
21946 }
21947 }
21948 }
21949
21950 return nil
21951 }
21952
21953
21954 type BasicValidateOperationRequest interface {
21955 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
21956 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
21957 AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool)
21958 AsValidateOperationRequest() (*ValidateOperationRequest, bool)
21959 }
21960
21961
21962 type ValidateOperationRequest struct {
21963
21964 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21965 }
21966
21967 func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) {
21968 var m map[string]interface{}
21969 err := json.Unmarshal(body, &m)
21970 if err != nil {
21971 return nil, err
21972 }
21973
21974 switch m["objectType"] {
21975 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest):
21976 var vivror ValidateIaasVMRestoreOperationRequest
21977 err := json.Unmarshal(body, &vivror)
21978 return vivror, err
21979 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest):
21980 var vror ValidateRestoreOperationRequest
21981 err := json.Unmarshal(body, &vror)
21982 return vror, err
21983 default:
21984 var vor ValidateOperationRequest
21985 err := json.Unmarshal(body, &vor)
21986 return vor, err
21987 }
21988 }
21989 func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) {
21990 var rawMessages []*json.RawMessage
21991 err := json.Unmarshal(body, &rawMessages)
21992 if err != nil {
21993 return nil, err
21994 }
21995
21996 vorArray := make([]BasicValidateOperationRequest, len(rawMessages))
21997
21998 for index, rawMessage := range rawMessages {
21999 vor, err := unmarshalBasicValidateOperationRequest(*rawMessage)
22000 if err != nil {
22001 return nil, err
22002 }
22003 vorArray[index] = vor
22004 }
22005 return vorArray, nil
22006 }
22007
22008
22009 func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) {
22010 vor.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateOperationRequest
22011 objectMap := make(map[string]interface{})
22012 if vor.ObjectType != "" {
22013 objectMap["objectType"] = vor.ObjectType
22014 }
22015 return json.Marshal(objectMap)
22016 }
22017
22018
22019 func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
22020 return nil, false
22021 }
22022
22023
22024 func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
22025 return nil, false
22026 }
22027
22028
22029 func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
22030 return nil, false
22031 }
22032
22033
22034 func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
22035 return &vor, true
22036 }
22037
22038
22039 func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
22040 return &vor, true
22041 }
22042
22043
22044 type ValidateOperationResponse struct {
22045
22046 ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"`
22047 }
22048
22049
22050 type ValidateOperationsResponse struct {
22051 autorest.Response `json:"-"`
22052 ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"`
22053 }
22054
22055
22056
22057 type ValidateOperationTriggerFuture struct {
22058 azure.FutureAPI
22059
22060
22061 Result func(ValidateOperationClient) (autorest.Response, error)
22062 }
22063
22064
22065 func (future *ValidateOperationTriggerFuture) UnmarshalJSON(body []byte) error {
22066 var azFuture azure.Future
22067 if err := json.Unmarshal(body, &azFuture); err != nil {
22068 return err
22069 }
22070 future.FutureAPI = &azFuture
22071 future.Result = future.result
22072 return nil
22073 }
22074
22075
22076 func (future *ValidateOperationTriggerFuture) result(client ValidateOperationClient) (ar autorest.Response, err error) {
22077 var done bool
22078 done, err = future.DoneWithContext(context.Background(), client)
22079 if err != nil {
22080 err = autorest.NewErrorWithError(err, "backup.ValidateOperationTriggerFuture", "Result", future.Response(), "Polling failure")
22081 return
22082 }
22083 if !done {
22084 ar.Response = future.Response()
22085 err = azure.NewAsyncOpIncompleteError("backup.ValidateOperationTriggerFuture")
22086 return
22087 }
22088 ar.Response = future.Response()
22089 return
22090 }
22091
22092
22093 type BasicValidateRestoreOperationRequest interface {
22094 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
22095 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
22096 }
22097
22098
22099 type ValidateRestoreOperationRequest struct {
22100
22101 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
22102
22103 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
22104 }
22105
22106 func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) {
22107 var m map[string]interface{}
22108 err := json.Unmarshal(body, &m)
22109 if err != nil {
22110 return nil, err
22111 }
22112
22113 switch m["objectType"] {
22114 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest):
22115 var vivror ValidateIaasVMRestoreOperationRequest
22116 err := json.Unmarshal(body, &vivror)
22117 return vivror, err
22118 default:
22119 var vror ValidateRestoreOperationRequest
22120 err := json.Unmarshal(body, &vror)
22121 return vror, err
22122 }
22123 }
22124 func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) {
22125 var rawMessages []*json.RawMessage
22126 err := json.Unmarshal(body, &rawMessages)
22127 if err != nil {
22128 return nil, err
22129 }
22130
22131 vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages))
22132
22133 for index, rawMessage := range rawMessages {
22134 vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage)
22135 if err != nil {
22136 return nil, err
22137 }
22138 vrorArray[index] = vror
22139 }
22140 return vrorArray, nil
22141 }
22142
22143
22144 func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) {
22145 vror.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest
22146 objectMap := make(map[string]interface{})
22147 objectMap["restoreRequest"] = vror.RestoreRequest
22148 if vror.ObjectType != "" {
22149 objectMap["objectType"] = vror.ObjectType
22150 }
22151 return json.Marshal(objectMap)
22152 }
22153
22154
22155 func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
22156 return nil, false
22157 }
22158
22159
22160 func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
22161 return &vror, true
22162 }
22163
22164
22165 func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
22166 return &vror, true
22167 }
22168
22169
22170 func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
22171 return nil, false
22172 }
22173
22174
22175 func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
22176 return &vror, true
22177 }
22178
22179
22180 func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error {
22181 var m map[string]*json.RawMessage
22182 err := json.Unmarshal(body, &m)
22183 if err != nil {
22184 return err
22185 }
22186 for k, v := range m {
22187 switch k {
22188 case "restoreRequest":
22189 if v != nil {
22190 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
22191 if err != nil {
22192 return err
22193 }
22194 vror.RestoreRequest = restoreRequest
22195 }
22196 case "objectType":
22197 if v != nil {
22198 var objectType ObjectTypeBasicValidateOperationRequest
22199 err = json.Unmarshal(*v, &objectType)
22200 if err != nil {
22201 return err
22202 }
22203 vror.ObjectType = objectType
22204 }
22205 }
22206 }
22207
22208 return nil
22209 }
22210
22211
22212 type VaultJob struct {
22213
22214 Duration *string `json:"duration,omitempty"`
22215
22216 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
22217
22218 ErrorDetails *[]VaultJobErrorInfo `json:"errorDetails,omitempty"`
22219
22220 ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"`
22221
22222 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
22223
22224 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
22225
22226 Operation *string `json:"operation,omitempty"`
22227
22228 Status *string `json:"status,omitempty"`
22229
22230 StartTime *date.Time `json:"startTime,omitempty"`
22231
22232 EndTime *date.Time `json:"endTime,omitempty"`
22233
22234 ActivityID *string `json:"activityId,omitempty"`
22235
22236 JobType JobType `json:"jobType,omitempty"`
22237 }
22238
22239
22240 func (vj VaultJob) MarshalJSON() ([]byte, error) {
22241 vj.JobType = JobTypeVaultJob
22242 objectMap := make(map[string]interface{})
22243 if vj.Duration != nil {
22244 objectMap["duration"] = vj.Duration
22245 }
22246 if vj.ActionsInfo != nil {
22247 objectMap["actionsInfo"] = vj.ActionsInfo
22248 }
22249 if vj.ErrorDetails != nil {
22250 objectMap["errorDetails"] = vj.ErrorDetails
22251 }
22252 if vj.ExtendedInfo != nil {
22253 objectMap["extendedInfo"] = vj.ExtendedInfo
22254 }
22255 if vj.EntityFriendlyName != nil {
22256 objectMap["entityFriendlyName"] = vj.EntityFriendlyName
22257 }
22258 if vj.BackupManagementType != "" {
22259 objectMap["backupManagementType"] = vj.BackupManagementType
22260 }
22261 if vj.Operation != nil {
22262 objectMap["operation"] = vj.Operation
22263 }
22264 if vj.Status != nil {
22265 objectMap["status"] = vj.Status
22266 }
22267 if vj.StartTime != nil {
22268 objectMap["startTime"] = vj.StartTime
22269 }
22270 if vj.EndTime != nil {
22271 objectMap["endTime"] = vj.EndTime
22272 }
22273 if vj.ActivityID != nil {
22274 objectMap["activityId"] = vj.ActivityID
22275 }
22276 if vj.JobType != "" {
22277 objectMap["jobType"] = vj.JobType
22278 }
22279 return json.Marshal(objectMap)
22280 }
22281
22282
22283 func (vj VaultJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
22284 return nil, false
22285 }
22286
22287
22288 func (vj VaultJob) AsAzureIaaSVMJobV2() (*AzureIaaSVMJobV2, bool) {
22289 return nil, false
22290 }
22291
22292
22293 func (vj VaultJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
22294 return nil, false
22295 }
22296
22297
22298 func (vj VaultJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
22299 return nil, false
22300 }
22301
22302
22303 func (vj VaultJob) AsDpmJob() (*DpmJob, bool) {
22304 return nil, false
22305 }
22306
22307
22308 func (vj VaultJob) AsMabJob() (*MabJob, bool) {
22309 return nil, false
22310 }
22311
22312
22313 func (vj VaultJob) AsVaultJob() (*VaultJob, bool) {
22314 return &vj, true
22315 }
22316
22317
22318 func (vj VaultJob) AsJob() (*Job, bool) {
22319 return nil, false
22320 }
22321
22322
22323 func (vj VaultJob) AsBasicJob() (BasicJob, bool) {
22324 return &vj, true
22325 }
22326
22327
22328 type VaultJobErrorInfo struct {
22329
22330 ErrorCode *int32 `json:"errorCode,omitempty"`
22331
22332 ErrorString *string `json:"errorString,omitempty"`
22333
22334 Recommendations *[]string `json:"recommendations,omitempty"`
22335 }
22336
22337
22338 type VaultJobExtendedInfo struct {
22339
22340 PropertyBag map[string]*string `json:"propertyBag"`
22341 }
22342
22343
22344 func (vjei VaultJobExtendedInfo) MarshalJSON() ([]byte, error) {
22345 objectMap := make(map[string]interface{})
22346 if vjei.PropertyBag != nil {
22347 objectMap["propertyBag"] = vjei.PropertyBag
22348 }
22349 return json.Marshal(objectMap)
22350 }
22351
22352
22353 type BasicVaultStorageConfigOperationResultResponse interface {
22354 AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool)
22355 AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool)
22356 }
22357
22358
22359 type VaultStorageConfigOperationResultResponse struct {
22360 autorest.Response `json:"-"`
22361
22362 ObjectType ObjectTypeBasicVaultStorageConfigOperationResultResponse `json:"objectType,omitempty"`
22363 }
22364
22365 func unmarshalBasicVaultStorageConfigOperationResultResponse(body []byte) (BasicVaultStorageConfigOperationResultResponse, error) {
22366 var m map[string]interface{}
22367 err := json.Unmarshal(body, &m)
22368 if err != nil {
22369 return nil, err
22370 }
22371
22372 switch m["objectType"] {
22373 case string(ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse):
22374 var pdmr PrepareDataMoveResponse
22375 err := json.Unmarshal(body, &pdmr)
22376 return pdmr, err
22377 default:
22378 var vscorr VaultStorageConfigOperationResultResponse
22379 err := json.Unmarshal(body, &vscorr)
22380 return vscorr, err
22381 }
22382 }
22383 func unmarshalBasicVaultStorageConfigOperationResultResponseArray(body []byte) ([]BasicVaultStorageConfigOperationResultResponse, error) {
22384 var rawMessages []*json.RawMessage
22385 err := json.Unmarshal(body, &rawMessages)
22386 if err != nil {
22387 return nil, err
22388 }
22389
22390 vscorrArray := make([]BasicVaultStorageConfigOperationResultResponse, len(rawMessages))
22391
22392 for index, rawMessage := range rawMessages {
22393 vscorr, err := unmarshalBasicVaultStorageConfigOperationResultResponse(*rawMessage)
22394 if err != nil {
22395 return nil, err
22396 }
22397 vscorrArray[index] = vscorr
22398 }
22399 return vscorrArray, nil
22400 }
22401
22402
22403 func (vscorr VaultStorageConfigOperationResultResponse) MarshalJSON() ([]byte, error) {
22404 vscorr.ObjectType = ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypeVaultStorageConfigOperationResultResponse
22405 objectMap := make(map[string]interface{})
22406 if vscorr.ObjectType != "" {
22407 objectMap["objectType"] = vscorr.ObjectType
22408 }
22409 return json.Marshal(objectMap)
22410 }
22411
22412
22413 func (vscorr VaultStorageConfigOperationResultResponse) AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool) {
22414 return nil, false
22415 }
22416
22417
22418 func (vscorr VaultStorageConfigOperationResultResponse) AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool) {
22419 return &vscorr, true
22420 }
22421
22422
22423 func (vscorr VaultStorageConfigOperationResultResponse) AsBasicVaultStorageConfigOperationResultResponse() (BasicVaultStorageConfigOperationResultResponse, bool) {
22424 return &vscorr, true
22425 }
22426
22427
22428 type VaultStorageConfigOperationResultResponseModel struct {
22429 autorest.Response `json:"-"`
22430 Value BasicVaultStorageConfigOperationResultResponse `json:"value,omitempty"`
22431 }
22432
22433
22434 func (vscorrm *VaultStorageConfigOperationResultResponseModel) UnmarshalJSON(body []byte) error {
22435 vscorr, err := unmarshalBasicVaultStorageConfigOperationResultResponse(body)
22436 if err != nil {
22437 return err
22438 }
22439 vscorrm.Value = vscorr
22440
22441 return nil
22442 }
22443
22444
22445 type WeeklyRetentionFormat struct {
22446
22447 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
22448
22449 WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"`
22450 }
22451
22452
22453 type WeeklyRetentionSchedule struct {
22454
22455 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
22456
22457 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
22458
22459 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
22460 }
22461
22462
22463 type WeeklySchedule struct {
22464 ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"`
22465
22466 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"`
22467 }
22468
22469
22470 type WorkloadInquiryDetails struct {
22471
22472 Type *string `json:"type,omitempty"`
22473
22474 ItemCount *int64 `json:"itemCount,omitempty"`
22475
22476 InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"`
22477 }
22478
22479
22480 type BasicWorkloadItem interface {
22481 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
22482 AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool)
22483 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
22484 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
22485 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
22486 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
22487 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
22488 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
22489 AsWorkloadItem() (*WorkloadItem, bool)
22490 }
22491
22492
22493 type WorkloadItem struct {
22494
22495 BackupManagementType *string `json:"backupManagementType,omitempty"`
22496
22497 WorkloadType *string `json:"workloadType,omitempty"`
22498
22499 FriendlyName *string `json:"friendlyName,omitempty"`
22500
22501 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
22502
22503 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
22504 }
22505
22506 func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) {
22507 var m map[string]interface{}
22508 err := json.Unmarshal(body, &m)
22509 if err != nil {
22510 return nil, err
22511 }
22512
22513 switch m["workloadItemType"] {
22514 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem):
22515 var avwi AzureVMWorkloadItem
22516 err := json.Unmarshal(body, &avwi)
22517 return avwi, err
22518 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase):
22519 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
22520 err := json.Unmarshal(body, &avwsadwi)
22521 return avwsadwi, err
22522 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem):
22523 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
22524 err := json.Unmarshal(body, &avwsaswi)
22525 return avwsaswi, err
22526 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase):
22527 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
22528 err := json.Unmarshal(body, &avwshdwi)
22529 return avwshdwi, err
22530 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem):
22531 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
22532 err := json.Unmarshal(body, &avwshswi)
22533 return avwshswi, err
22534 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase):
22535 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
22536 err := json.Unmarshal(body, &avwsdwi)
22537 return avwsdwi, err
22538 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance):
22539 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
22540 err := json.Unmarshal(body, &avwsiwi)
22541 return avwsiwi, err
22542 default:
22543 var wi WorkloadItem
22544 err := json.Unmarshal(body, &wi)
22545 return wi, err
22546 }
22547 }
22548 func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) {
22549 var rawMessages []*json.RawMessage
22550 err := json.Unmarshal(body, &rawMessages)
22551 if err != nil {
22552 return nil, err
22553 }
22554
22555 wiArray := make([]BasicWorkloadItem, len(rawMessages))
22556
22557 for index, rawMessage := range rawMessages {
22558 wi, err := unmarshalBasicWorkloadItem(*rawMessage)
22559 if err != nil {
22560 return nil, err
22561 }
22562 wiArray[index] = wi
22563 }
22564 return wiArray, nil
22565 }
22566
22567
22568 func (wi WorkloadItem) MarshalJSON() ([]byte, error) {
22569 wi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem
22570 objectMap := make(map[string]interface{})
22571 if wi.BackupManagementType != nil {
22572 objectMap["backupManagementType"] = wi.BackupManagementType
22573 }
22574 if wi.WorkloadType != nil {
22575 objectMap["workloadType"] = wi.WorkloadType
22576 }
22577 if wi.FriendlyName != nil {
22578 objectMap["friendlyName"] = wi.FriendlyName
22579 }
22580 if wi.ProtectionState != "" {
22581 objectMap["protectionState"] = wi.ProtectionState
22582 }
22583 if wi.WorkloadItemType != "" {
22584 objectMap["workloadItemType"] = wi.WorkloadItemType
22585 }
22586 return json.Marshal(objectMap)
22587 }
22588
22589
22590 func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
22591 return nil, false
22592 }
22593
22594
22595 func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
22596 return nil, false
22597 }
22598
22599
22600 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
22601 return nil, false
22602 }
22603
22604
22605 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
22606 return nil, false
22607 }
22608
22609
22610 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
22611 return nil, false
22612 }
22613
22614
22615 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
22616 return nil, false
22617 }
22618
22619
22620 func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
22621 return nil, false
22622 }
22623
22624
22625 func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
22626 return nil, false
22627 }
22628
22629
22630 func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
22631 return &wi, true
22632 }
22633
22634
22635 func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
22636 return &wi, true
22637 }
22638
22639
22640
22641 type WorkloadItemResource struct {
22642
22643 Properties BasicWorkloadItem `json:"properties,omitempty"`
22644
22645 ID *string `json:"id,omitempty"`
22646
22647 Name *string `json:"name,omitempty"`
22648
22649 Type *string `json:"type,omitempty"`
22650
22651 Location *string `json:"location,omitempty"`
22652
22653 Tags map[string]*string `json:"tags"`
22654
22655 ETag *string `json:"eTag,omitempty"`
22656 }
22657
22658
22659 func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) {
22660 objectMap := make(map[string]interface{})
22661 objectMap["properties"] = wir.Properties
22662 if wir.Location != nil {
22663 objectMap["location"] = wir.Location
22664 }
22665 if wir.Tags != nil {
22666 objectMap["tags"] = wir.Tags
22667 }
22668 if wir.ETag != nil {
22669 objectMap["eTag"] = wir.ETag
22670 }
22671 return json.Marshal(objectMap)
22672 }
22673
22674
22675 func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error {
22676 var m map[string]*json.RawMessage
22677 err := json.Unmarshal(body, &m)
22678 if err != nil {
22679 return err
22680 }
22681 for k, v := range m {
22682 switch k {
22683 case "properties":
22684 if v != nil {
22685 properties, err := unmarshalBasicWorkloadItem(*v)
22686 if err != nil {
22687 return err
22688 }
22689 wir.Properties = properties
22690 }
22691 case "id":
22692 if v != nil {
22693 var ID string
22694 err = json.Unmarshal(*v, &ID)
22695 if err != nil {
22696 return err
22697 }
22698 wir.ID = &ID
22699 }
22700 case "name":
22701 if v != nil {
22702 var name string
22703 err = json.Unmarshal(*v, &name)
22704 if err != nil {
22705 return err
22706 }
22707 wir.Name = &name
22708 }
22709 case "type":
22710 if v != nil {
22711 var typeVar string
22712 err = json.Unmarshal(*v, &typeVar)
22713 if err != nil {
22714 return err
22715 }
22716 wir.Type = &typeVar
22717 }
22718 case "location":
22719 if v != nil {
22720 var location string
22721 err = json.Unmarshal(*v, &location)
22722 if err != nil {
22723 return err
22724 }
22725 wir.Location = &location
22726 }
22727 case "tags":
22728 if v != nil {
22729 var tags map[string]*string
22730 err = json.Unmarshal(*v, &tags)
22731 if err != nil {
22732 return err
22733 }
22734 wir.Tags = tags
22735 }
22736 case "eTag":
22737 if v != nil {
22738 var eTag string
22739 err = json.Unmarshal(*v, &eTag)
22740 if err != nil {
22741 return err
22742 }
22743 wir.ETag = &eTag
22744 }
22745 }
22746 }
22747
22748 return nil
22749 }
22750
22751
22752 type WorkloadItemResourceList struct {
22753 autorest.Response `json:"-"`
22754
22755 Value *[]WorkloadItemResource `json:"value,omitempty"`
22756
22757 NextLink *string `json:"nextLink,omitempty"`
22758 }
22759
22760
22761 type WorkloadItemResourceListIterator struct {
22762 i int
22763 page WorkloadItemResourceListPage
22764 }
22765
22766
22767
22768 func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
22769 if tracing.IsEnabled() {
22770 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext")
22771 defer func() {
22772 sc := -1
22773 if iter.Response().Response.Response != nil {
22774 sc = iter.Response().Response.Response.StatusCode
22775 }
22776 tracing.EndSpan(ctx, sc, err)
22777 }()
22778 }
22779 iter.i++
22780 if iter.i < len(iter.page.Values()) {
22781 return nil
22782 }
22783 err = iter.page.NextWithContext(ctx)
22784 if err != nil {
22785 iter.i--
22786 return err
22787 }
22788 iter.i = 0
22789 return nil
22790 }
22791
22792
22793
22794
22795 func (iter *WorkloadItemResourceListIterator) Next() error {
22796 return iter.NextWithContext(context.Background())
22797 }
22798
22799
22800 func (iter WorkloadItemResourceListIterator) NotDone() bool {
22801 return iter.page.NotDone() && iter.i < len(iter.page.Values())
22802 }
22803
22804
22805 func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList {
22806 return iter.page.Response()
22807 }
22808
22809
22810
22811 func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource {
22812 if !iter.page.NotDone() {
22813 return WorkloadItemResource{}
22814 }
22815 return iter.page.Values()[iter.i]
22816 }
22817
22818
22819 func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator {
22820 return WorkloadItemResourceListIterator{page: page}
22821 }
22822
22823
22824 func (wirl WorkloadItemResourceList) IsEmpty() bool {
22825 return wirl.Value == nil || len(*wirl.Value) == 0
22826 }
22827
22828
22829 func (wirl WorkloadItemResourceList) hasNextLink() bool {
22830 return wirl.NextLink != nil && len(*wirl.NextLink) != 0
22831 }
22832
22833
22834
22835 func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
22836 if !wirl.hasNextLink() {
22837 return nil, nil
22838 }
22839 return autorest.Prepare((&http.Request{}).WithContext(ctx),
22840 autorest.AsJSON(),
22841 autorest.AsGet(),
22842 autorest.WithBaseURL(to.String(wirl.NextLink)))
22843 }
22844
22845
22846 type WorkloadItemResourceListPage struct {
22847 fn func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)
22848 wirl WorkloadItemResourceList
22849 }
22850
22851
22852
22853 func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
22854 if tracing.IsEnabled() {
22855 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext")
22856 defer func() {
22857 sc := -1
22858 if page.Response().Response.Response != nil {
22859 sc = page.Response().Response.Response.StatusCode
22860 }
22861 tracing.EndSpan(ctx, sc, err)
22862 }()
22863 }
22864 for {
22865 next, err := page.fn(ctx, page.wirl)
22866 if err != nil {
22867 return err
22868 }
22869 page.wirl = next
22870 if !next.hasNextLink() || !next.IsEmpty() {
22871 break
22872 }
22873 }
22874 return nil
22875 }
22876
22877
22878
22879
22880 func (page *WorkloadItemResourceListPage) Next() error {
22881 return page.NextWithContext(context.Background())
22882 }
22883
22884
22885 func (page WorkloadItemResourceListPage) NotDone() bool {
22886 return !page.wirl.IsEmpty()
22887 }
22888
22889
22890 func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList {
22891 return page.wirl
22892 }
22893
22894
22895 func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource {
22896 if page.wirl.IsEmpty() {
22897 return nil
22898 }
22899 return *page.wirl.Value
22900 }
22901
22902
22903 func NewWorkloadItemResourceListPage(cur WorkloadItemResourceList, getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage {
22904 return WorkloadItemResourceListPage{
22905 fn: getNextPage,
22906 wirl: cur,
22907 }
22908 }
22909
22910
22911 type BasicWorkloadProtectableItem interface {
22912 AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool)
22913 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
22914 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
22915 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
22916 AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool)
22917 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
22918 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
22919 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
22920 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
22921 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
22922 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
22923 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
22924 AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool)
22925 AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool)
22926 }
22927
22928
22929
22930 type WorkloadProtectableItem struct {
22931
22932 BackupManagementType *string `json:"backupManagementType,omitempty"`
22933
22934 WorkloadType *string `json:"workloadType,omitempty"`
22935
22936 FriendlyName *string `json:"friendlyName,omitempty"`
22937
22938 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
22939
22940 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
22941 }
22942
22943 func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) {
22944 var m map[string]interface{}
22945 err := json.Unmarshal(body, &m)
22946 if err != nil {
22947 return nil, err
22948 }
22949
22950 switch m["protectableItemType"] {
22951 case string(ProtectableItemTypeAzureFileShare):
22952 var afspi AzureFileShareProtectableItem
22953 err := json.Unmarshal(body, &afspi)
22954 return afspi, err
22955 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
22956 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
22957 err := json.Unmarshal(body, &aisccvpi)
22958 return aisccvpi, err
22959 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
22960 var aiscvpi AzureIaaSComputeVMProtectableItem
22961 err := json.Unmarshal(body, &aiscvpi)
22962 return aiscvpi, err
22963 case string(ProtectableItemTypeAzureVMWorkloadProtectableItem):
22964 var avwpi AzureVMWorkloadProtectableItem
22965 err := json.Unmarshal(body, &avwpi)
22966 return avwpi, err
22967 case string(ProtectableItemTypeSAPAseSystem):
22968 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
22969 err := json.Unmarshal(body, &avwsaspi)
22970 return avwsaspi, err
22971 case string(ProtectableItemTypeSAPHanaDatabase):
22972 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
22973 err := json.Unmarshal(body, &avwshdpi)
22974 return avwshdpi, err
22975 case string(ProtectableItemTypeSAPHanaSystem):
22976 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
22977 err := json.Unmarshal(body, &avwshspi)
22978 return avwshspi, err
22979 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
22980 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
22981 err := json.Unmarshal(body, &avwsagpi)
22982 return avwsagpi, err
22983 case string(ProtectableItemTypeSQLDataBase):
22984 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
22985 err := json.Unmarshal(body, &avwsdpi)
22986 return avwsdpi, err
22987 case string(ProtectableItemTypeSQLInstance):
22988 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
22989 err := json.Unmarshal(body, &avwsipi)
22990 return avwsipi, err
22991 case string(ProtectableItemTypeIaaSVMProtectableItem):
22992 var ispi IaaSVMProtectableItem
22993 err := json.Unmarshal(body, &ispi)
22994 return ispi, err
22995 default:
22996 var wpi WorkloadProtectableItem
22997 err := json.Unmarshal(body, &wpi)
22998 return wpi, err
22999 }
23000 }
23001 func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) {
23002 var rawMessages []*json.RawMessage
23003 err := json.Unmarshal(body, &rawMessages)
23004 if err != nil {
23005 return nil, err
23006 }
23007
23008 wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages))
23009
23010 for index, rawMessage := range rawMessages {
23011 wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage)
23012 if err != nil {
23013 return nil, err
23014 }
23015 wpiArray[index] = wpi
23016 }
23017 return wpiArray, nil
23018 }
23019
23020
23021 func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) {
23022 wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem
23023 objectMap := make(map[string]interface{})
23024 if wpi.BackupManagementType != nil {
23025 objectMap["backupManagementType"] = wpi.BackupManagementType
23026 }
23027 if wpi.WorkloadType != nil {
23028 objectMap["workloadType"] = wpi.WorkloadType
23029 }
23030 if wpi.FriendlyName != nil {
23031 objectMap["friendlyName"] = wpi.FriendlyName
23032 }
23033 if wpi.ProtectionState != "" {
23034 objectMap["protectionState"] = wpi.ProtectionState
23035 }
23036 if wpi.ProtectableItemType != "" {
23037 objectMap["protectableItemType"] = wpi.ProtectableItemType
23038 }
23039 return json.Marshal(objectMap)
23040 }
23041
23042
23043 func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
23044 return nil, false
23045 }
23046
23047
23048 func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
23049 return nil, false
23050 }
23051
23052
23053 func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
23054 return nil, false
23055 }
23056
23057
23058 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
23059 return nil, false
23060 }
23061
23062
23063 func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
23064 return nil, false
23065 }
23066
23067
23068 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
23069 return nil, false
23070 }
23071
23072
23073 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
23074 return nil, false
23075 }
23076
23077
23078 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
23079 return nil, false
23080 }
23081
23082
23083 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
23084 return nil, false
23085 }
23086
23087
23088 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
23089 return nil, false
23090 }
23091
23092
23093 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
23094 return nil, false
23095 }
23096
23097
23098 func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
23099 return nil, false
23100 }
23101
23102
23103 func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
23104 return nil, false
23105 }
23106
23107
23108 func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
23109 return &wpi, true
23110 }
23111
23112
23113 func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
23114 return &wpi, true
23115 }
23116
23117
23118
23119 type WorkloadProtectableItemResource struct {
23120
23121 Properties BasicWorkloadProtectableItem `json:"properties,omitempty"`
23122
23123 ID *string `json:"id,omitempty"`
23124
23125 Name *string `json:"name,omitempty"`
23126
23127 Type *string `json:"type,omitempty"`
23128
23129 Location *string `json:"location,omitempty"`
23130
23131 Tags map[string]*string `json:"tags"`
23132
23133 ETag *string `json:"eTag,omitempty"`
23134 }
23135
23136
23137 func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) {
23138 objectMap := make(map[string]interface{})
23139 objectMap["properties"] = wpir.Properties
23140 if wpir.Location != nil {
23141 objectMap["location"] = wpir.Location
23142 }
23143 if wpir.Tags != nil {
23144 objectMap["tags"] = wpir.Tags
23145 }
23146 if wpir.ETag != nil {
23147 objectMap["eTag"] = wpir.ETag
23148 }
23149 return json.Marshal(objectMap)
23150 }
23151
23152
23153 func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error {
23154 var m map[string]*json.RawMessage
23155 err := json.Unmarshal(body, &m)
23156 if err != nil {
23157 return err
23158 }
23159 for k, v := range m {
23160 switch k {
23161 case "properties":
23162 if v != nil {
23163 properties, err := unmarshalBasicWorkloadProtectableItem(*v)
23164 if err != nil {
23165 return err
23166 }
23167 wpir.Properties = properties
23168 }
23169 case "id":
23170 if v != nil {
23171 var ID string
23172 err = json.Unmarshal(*v, &ID)
23173 if err != nil {
23174 return err
23175 }
23176 wpir.ID = &ID
23177 }
23178 case "name":
23179 if v != nil {
23180 var name string
23181 err = json.Unmarshal(*v, &name)
23182 if err != nil {
23183 return err
23184 }
23185 wpir.Name = &name
23186 }
23187 case "type":
23188 if v != nil {
23189 var typeVar string
23190 err = json.Unmarshal(*v, &typeVar)
23191 if err != nil {
23192 return err
23193 }
23194 wpir.Type = &typeVar
23195 }
23196 case "location":
23197 if v != nil {
23198 var location string
23199 err = json.Unmarshal(*v, &location)
23200 if err != nil {
23201 return err
23202 }
23203 wpir.Location = &location
23204 }
23205 case "tags":
23206 if v != nil {
23207 var tags map[string]*string
23208 err = json.Unmarshal(*v, &tags)
23209 if err != nil {
23210 return err
23211 }
23212 wpir.Tags = tags
23213 }
23214 case "eTag":
23215 if v != nil {
23216 var eTag string
23217 err = json.Unmarshal(*v, &eTag)
23218 if err != nil {
23219 return err
23220 }
23221 wpir.ETag = &eTag
23222 }
23223 }
23224 }
23225
23226 return nil
23227 }
23228
23229
23230 type WorkloadProtectableItemResourceList struct {
23231 autorest.Response `json:"-"`
23232
23233 Value *[]WorkloadProtectableItemResource `json:"value,omitempty"`
23234
23235 NextLink *string `json:"nextLink,omitempty"`
23236 }
23237
23238
23239
23240 type WorkloadProtectableItemResourceListIterator struct {
23241 i int
23242 page WorkloadProtectableItemResourceListPage
23243 }
23244
23245
23246
23247 func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
23248 if tracing.IsEnabled() {
23249 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext")
23250 defer func() {
23251 sc := -1
23252 if iter.Response().Response.Response != nil {
23253 sc = iter.Response().Response.Response.StatusCode
23254 }
23255 tracing.EndSpan(ctx, sc, err)
23256 }()
23257 }
23258 iter.i++
23259 if iter.i < len(iter.page.Values()) {
23260 return nil
23261 }
23262 err = iter.page.NextWithContext(ctx)
23263 if err != nil {
23264 iter.i--
23265 return err
23266 }
23267 iter.i = 0
23268 return nil
23269 }
23270
23271
23272
23273
23274 func (iter *WorkloadProtectableItemResourceListIterator) Next() error {
23275 return iter.NextWithContext(context.Background())
23276 }
23277
23278
23279 func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool {
23280 return iter.page.NotDone() && iter.i < len(iter.page.Values())
23281 }
23282
23283
23284 func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList {
23285 return iter.page.Response()
23286 }
23287
23288
23289
23290 func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource {
23291 if !iter.page.NotDone() {
23292 return WorkloadProtectableItemResource{}
23293 }
23294 return iter.page.Values()[iter.i]
23295 }
23296
23297
23298 func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator {
23299 return WorkloadProtectableItemResourceListIterator{page: page}
23300 }
23301
23302
23303 func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool {
23304 return wpirl.Value == nil || len(*wpirl.Value) == 0
23305 }
23306
23307
23308 func (wpirl WorkloadProtectableItemResourceList) hasNextLink() bool {
23309 return wpirl.NextLink != nil && len(*wpirl.NextLink) != 0
23310 }
23311
23312
23313
23314 func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
23315 if !wpirl.hasNextLink() {
23316 return nil, nil
23317 }
23318 return autorest.Prepare((&http.Request{}).WithContext(ctx),
23319 autorest.AsJSON(),
23320 autorest.AsGet(),
23321 autorest.WithBaseURL(to.String(wpirl.NextLink)))
23322 }
23323
23324
23325 type WorkloadProtectableItemResourceListPage struct {
23326 fn func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)
23327 wpirl WorkloadProtectableItemResourceList
23328 }
23329
23330
23331
23332 func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
23333 if tracing.IsEnabled() {
23334 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext")
23335 defer func() {
23336 sc := -1
23337 if page.Response().Response.Response != nil {
23338 sc = page.Response().Response.Response.StatusCode
23339 }
23340 tracing.EndSpan(ctx, sc, err)
23341 }()
23342 }
23343 for {
23344 next, err := page.fn(ctx, page.wpirl)
23345 if err != nil {
23346 return err
23347 }
23348 page.wpirl = next
23349 if !next.hasNextLink() || !next.IsEmpty() {
23350 break
23351 }
23352 }
23353 return nil
23354 }
23355
23356
23357
23358
23359 func (page *WorkloadProtectableItemResourceListPage) Next() error {
23360 return page.NextWithContext(context.Background())
23361 }
23362
23363
23364 func (page WorkloadProtectableItemResourceListPage) NotDone() bool {
23365 return !page.wpirl.IsEmpty()
23366 }
23367
23368
23369 func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList {
23370 return page.wpirl
23371 }
23372
23373
23374 func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource {
23375 if page.wpirl.IsEmpty() {
23376 return nil
23377 }
23378 return *page.wpirl.Value
23379 }
23380
23381
23382 func NewWorkloadProtectableItemResourceListPage(cur WorkloadProtectableItemResourceList, getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage {
23383 return WorkloadProtectableItemResourceListPage{
23384 fn: getNextPage,
23385 wpirl: cur,
23386 }
23387 }
23388
23389
23390 type YearlyRetentionSchedule struct {
23391
23392 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
23393
23394 MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"`
23395
23396 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
23397
23398 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
23399
23400 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
23401
23402 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
23403 }
23404
View as plain text