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-01-01/backup"
22
23
24 type AADProperties struct {
25 ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
26 TenantID *string `json:"tenantId,omitempty"`
27 Authority *string `json:"authority,omitempty"`
28 Audience *string `json:"audience,omitempty"`
29 ServicePrincipalObjectID *string `json:"servicePrincipalObjectId,omitempty"`
30 }
31
32
33 type AADPropertiesResource struct {
34 autorest.Response `json:"-"`
35
36 Properties *AADProperties `json:"properties,omitempty"`
37
38 ID *string `json:"id,omitempty"`
39
40 Name *string `json:"name,omitempty"`
41
42 Type *string `json:"type,omitempty"`
43
44 Location *string `json:"location,omitempty"`
45
46 Tags map[string]*string `json:"tags"`
47
48 ETag *string `json:"eTag,omitempty"`
49 }
50
51
52 func (apr AADPropertiesResource) MarshalJSON() ([]byte, error) {
53 objectMap := make(map[string]interface{})
54 if apr.Properties != nil {
55 objectMap["properties"] = apr.Properties
56 }
57 if apr.Location != nil {
58 objectMap["location"] = apr.Location
59 }
60 if apr.Tags != nil {
61 objectMap["tags"] = apr.Tags
62 }
63 if apr.ETag != nil {
64 objectMap["eTag"] = apr.ETag
65 }
66 return json.Marshal(objectMap)
67 }
68
69
70 type AzureBackupGoalFeatureSupportRequest struct {
71
72 FeatureType FeatureType `json:"featureType,omitempty"`
73 }
74
75
76 func (abgfsr AzureBackupGoalFeatureSupportRequest) MarshalJSON() ([]byte, error) {
77 abgfsr.FeatureType = FeatureTypeAzureBackupGoals
78 objectMap := make(map[string]interface{})
79 if abgfsr.FeatureType != "" {
80 objectMap["featureType"] = abgfsr.FeatureType
81 }
82 return json.Marshal(objectMap)
83 }
84
85
86 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
87 return &abgfsr, true
88 }
89
90
91 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
92 return nil, false
93 }
94
95
96 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
97 return nil, false
98 }
99
100
101 func (abgfsr AzureBackupGoalFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
102 return &abgfsr, true
103 }
104
105
106 type AzureBackupServerContainer struct {
107
108 CanReRegister *bool `json:"canReRegister,omitempty"`
109
110 ContainerID *string `json:"containerId,omitempty"`
111
112 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
113
114 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
115
116 DpmServers *[]string `json:"dpmServers,omitempty"`
117
118 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
119
120 ProtectionStatus *string `json:"protectionStatus,omitempty"`
121
122 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
123
124 FriendlyName *string `json:"friendlyName,omitempty"`
125
126 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
127
128 RegistrationStatus *string `json:"registrationStatus,omitempty"`
129
130 HealthStatus *string `json:"healthStatus,omitempty"`
131
132 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
133 }
134
135
136 func (absc AzureBackupServerContainer) MarshalJSON() ([]byte, error) {
137 absc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer
138 objectMap := make(map[string]interface{})
139 if absc.CanReRegister != nil {
140 objectMap["canReRegister"] = absc.CanReRegister
141 }
142 if absc.ContainerID != nil {
143 objectMap["containerId"] = absc.ContainerID
144 }
145 if absc.ProtectedItemCount != nil {
146 objectMap["protectedItemCount"] = absc.ProtectedItemCount
147 }
148 if absc.DpmAgentVersion != nil {
149 objectMap["dpmAgentVersion"] = absc.DpmAgentVersion
150 }
151 if absc.DpmServers != nil {
152 objectMap["dpmServers"] = absc.DpmServers
153 }
154 if absc.UpgradeAvailable != nil {
155 objectMap["upgradeAvailable"] = absc.UpgradeAvailable
156 }
157 if absc.ProtectionStatus != nil {
158 objectMap["protectionStatus"] = absc.ProtectionStatus
159 }
160 if absc.ExtendedInfo != nil {
161 objectMap["extendedInfo"] = absc.ExtendedInfo
162 }
163 if absc.FriendlyName != nil {
164 objectMap["friendlyName"] = absc.FriendlyName
165 }
166 if absc.BackupManagementType != "" {
167 objectMap["backupManagementType"] = absc.BackupManagementType
168 }
169 if absc.RegistrationStatus != nil {
170 objectMap["registrationStatus"] = absc.RegistrationStatus
171 }
172 if absc.HealthStatus != nil {
173 objectMap["healthStatus"] = absc.HealthStatus
174 }
175 if absc.ContainerType != "" {
176 objectMap["containerType"] = absc.ContainerType
177 }
178 return json.Marshal(objectMap)
179 }
180
181
182 func (absc AzureBackupServerContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
183 return &absc, true
184 }
185
186
187 func (absc AzureBackupServerContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
188 return nil, false
189 }
190
191
192 func (absc AzureBackupServerContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
193 return nil, false
194 }
195
196
197 func (absc AzureBackupServerContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
198 return nil, false
199 }
200
201
202 func (absc AzureBackupServerContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
203 return nil, false
204 }
205
206
207 func (absc AzureBackupServerContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
208 return nil, false
209 }
210
211
212 func (absc AzureBackupServerContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
213 return nil, false
214 }
215
216
217 func (absc AzureBackupServerContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
218 return nil, false
219 }
220
221
222 func (absc AzureBackupServerContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
223 return nil, false
224 }
225
226
227 func (absc AzureBackupServerContainer) AsDpmContainer() (*DpmContainer, bool) {
228 return nil, false
229 }
230
231
232 func (absc AzureBackupServerContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
233 return &absc, true
234 }
235
236
237 func (absc AzureBackupServerContainer) AsGenericContainer() (*GenericContainer, bool) {
238 return nil, false
239 }
240
241
242 func (absc AzureBackupServerContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
243 return nil, false
244 }
245
246
247 func (absc AzureBackupServerContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
248 return nil, false
249 }
250
251
252 func (absc AzureBackupServerContainer) AsMabContainer() (*MabContainer, bool) {
253 return nil, false
254 }
255
256
257 func (absc AzureBackupServerContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
258 return nil, false
259 }
260
261
262 func (absc AzureBackupServerContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
263 return &absc, true
264 }
265
266
267 type AzureBackupServerEngine struct {
268
269 FriendlyName *string `json:"friendlyName,omitempty"`
270
271 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
272
273 RegistrationStatus *string `json:"registrationStatus,omitempty"`
274
275 BackupEngineState *string `json:"backupEngineState,omitempty"`
276
277 HealthStatus *string `json:"healthStatus,omitempty"`
278
279 CanReRegister *bool `json:"canReRegister,omitempty"`
280
281 BackupEngineID *string `json:"backupEngineId,omitempty"`
282
283 DpmVersion *string `json:"dpmVersion,omitempty"`
284
285 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
286
287 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
288
289 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
290
291 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
292
293 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
294 }
295
296
297 func (abse AzureBackupServerEngine) MarshalJSON() ([]byte, error) {
298 abse.BackupEngineType = EngineTypeBackupEngineTypeAzureBackupServerEngine
299 objectMap := make(map[string]interface{})
300 if abse.FriendlyName != nil {
301 objectMap["friendlyName"] = abse.FriendlyName
302 }
303 if abse.BackupManagementType != "" {
304 objectMap["backupManagementType"] = abse.BackupManagementType
305 }
306 if abse.RegistrationStatus != nil {
307 objectMap["registrationStatus"] = abse.RegistrationStatus
308 }
309 if abse.BackupEngineState != nil {
310 objectMap["backupEngineState"] = abse.BackupEngineState
311 }
312 if abse.HealthStatus != nil {
313 objectMap["healthStatus"] = abse.HealthStatus
314 }
315 if abse.CanReRegister != nil {
316 objectMap["canReRegister"] = abse.CanReRegister
317 }
318 if abse.BackupEngineID != nil {
319 objectMap["backupEngineId"] = abse.BackupEngineID
320 }
321 if abse.DpmVersion != nil {
322 objectMap["dpmVersion"] = abse.DpmVersion
323 }
324 if abse.AzureBackupAgentVersion != nil {
325 objectMap["azureBackupAgentVersion"] = abse.AzureBackupAgentVersion
326 }
327 if abse.IsAzureBackupAgentUpgradeAvailable != nil {
328 objectMap["isAzureBackupAgentUpgradeAvailable"] = abse.IsAzureBackupAgentUpgradeAvailable
329 }
330 if abse.IsDpmUpgradeAvailable != nil {
331 objectMap["isDpmUpgradeAvailable"] = abse.IsDpmUpgradeAvailable
332 }
333 if abse.ExtendedInfo != nil {
334 objectMap["extendedInfo"] = abse.ExtendedInfo
335 }
336 if abse.BackupEngineType != "" {
337 objectMap["backupEngineType"] = abse.BackupEngineType
338 }
339 return json.Marshal(objectMap)
340 }
341
342
343 func (abse AzureBackupServerEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
344 return &abse, true
345 }
346
347
348 func (abse AzureBackupServerEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
349 return nil, false
350 }
351
352
353 func (abse AzureBackupServerEngine) AsEngineBase() (*EngineBase, bool) {
354 return nil, false
355 }
356
357
358 func (abse AzureBackupServerEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
359 return &abse, true
360 }
361
362
363 type AzureFileShareBackupRequest struct {
364
365 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
366
367 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
368 }
369
370
371 func (afsbr AzureFileShareBackupRequest) MarshalJSON() ([]byte, error) {
372 afsbr.ObjectType = ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest
373 objectMap := make(map[string]interface{})
374 if afsbr.RecoveryPointExpiryTimeInUTC != nil {
375 objectMap["recoveryPointExpiryTimeInUTC"] = afsbr.RecoveryPointExpiryTimeInUTC
376 }
377 if afsbr.ObjectType != "" {
378 objectMap["objectType"] = afsbr.ObjectType
379 }
380 return json.Marshal(objectMap)
381 }
382
383
384 func (afsbr AzureFileShareBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
385 return &afsbr, true
386 }
387
388
389 func (afsbr AzureFileShareBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
390 return nil, false
391 }
392
393
394 func (afsbr AzureFileShareBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
395 return nil, false
396 }
397
398
399 func (afsbr AzureFileShareBackupRequest) AsRequest() (*Request, bool) {
400 return nil, false
401 }
402
403
404 func (afsbr AzureFileShareBackupRequest) AsBasicRequest() (BasicRequest, bool) {
405 return &afsbr, true
406 }
407
408
409 type AzureFileShareProtectableItem struct {
410
411 ParentContainerFabricID *string `json:"parentContainerFabricId,omitempty"`
412
413 ParentContainerFriendlyName *string `json:"parentContainerFriendlyName,omitempty"`
414
415 AzureFileShareType AzureFileShareType `json:"azureFileShareType,omitempty"`
416
417 BackupManagementType *string `json:"backupManagementType,omitempty"`
418
419 WorkloadType *string `json:"workloadType,omitempty"`
420
421 FriendlyName *string `json:"friendlyName,omitempty"`
422
423 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
424
425 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
426 }
427
428
429 func (afspi AzureFileShareProtectableItem) MarshalJSON() ([]byte, error) {
430 afspi.ProtectableItemType = ProtectableItemTypeAzureFileShare
431 objectMap := make(map[string]interface{})
432 if afspi.ParentContainerFabricID != nil {
433 objectMap["parentContainerFabricId"] = afspi.ParentContainerFabricID
434 }
435 if afspi.ParentContainerFriendlyName != nil {
436 objectMap["parentContainerFriendlyName"] = afspi.ParentContainerFriendlyName
437 }
438 if afspi.AzureFileShareType != "" {
439 objectMap["azureFileShareType"] = afspi.AzureFileShareType
440 }
441 if afspi.BackupManagementType != nil {
442 objectMap["backupManagementType"] = afspi.BackupManagementType
443 }
444 if afspi.WorkloadType != nil {
445 objectMap["workloadType"] = afspi.WorkloadType
446 }
447 if afspi.FriendlyName != nil {
448 objectMap["friendlyName"] = afspi.FriendlyName
449 }
450 if afspi.ProtectionState != "" {
451 objectMap["protectionState"] = afspi.ProtectionState
452 }
453 if afspi.ProtectableItemType != "" {
454 objectMap["protectableItemType"] = afspi.ProtectableItemType
455 }
456 return json.Marshal(objectMap)
457 }
458
459
460 func (afspi AzureFileShareProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
461 return &afspi, true
462 }
463
464
465 func (afspi AzureFileShareProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
466 return nil, false
467 }
468
469
470 func (afspi AzureFileShareProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
471 return nil, false
472 }
473
474
475 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
476 return nil, false
477 }
478
479
480 func (afspi AzureFileShareProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
481 return nil, false
482 }
483
484
485 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
486 return nil, false
487 }
488
489
490 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
491 return nil, false
492 }
493
494
495 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
496 return nil, false
497 }
498
499
500 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
501 return nil, false
502 }
503
504
505 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
506 return nil, false
507 }
508
509
510 func (afspi AzureFileShareProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
511 return nil, false
512 }
513
514
515 func (afspi AzureFileShareProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
516 return nil, false
517 }
518
519
520 func (afspi AzureFileShareProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
521 return nil, false
522 }
523
524
525 func (afspi AzureFileShareProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
526 return nil, false
527 }
528
529
530 func (afspi AzureFileShareProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
531 return &afspi, true
532 }
533
534
535 type AzureFileshareProtectedItem struct {
536
537 FriendlyName *string `json:"friendlyName,omitempty"`
538
539 ProtectionStatus *string `json:"protectionStatus,omitempty"`
540
541 ProtectionState ProtectionState `json:"protectionState,omitempty"`
542
543 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
544
545 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
546
547 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
548
549 ExtendedInfo *AzureFileshareProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
550
551 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
552
553 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
554
555 WorkloadType DataSourceType `json:"workloadType,omitempty"`
556
557 ContainerName *string `json:"containerName,omitempty"`
558
559 SourceResourceID *string `json:"sourceResourceId,omitempty"`
560
561 PolicyID *string `json:"policyId,omitempty"`
562
563 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
564
565 BackupSetName *string `json:"backupSetName,omitempty"`
566
567 CreateMode CreateMode `json:"createMode,omitempty"`
568
569 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
570
571 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
572
573 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
574
575 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
576
577 IsRehydrate *bool `json:"isRehydrate,omitempty"`
578
579 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
580 }
581
582
583 func (afpi AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) {
584 afpi.ProtectedItemType = ProtectedItemTypeAzureFileShareProtectedItem
585 objectMap := make(map[string]interface{})
586 if afpi.FriendlyName != nil {
587 objectMap["friendlyName"] = afpi.FriendlyName
588 }
589 if afpi.ProtectionStatus != nil {
590 objectMap["protectionStatus"] = afpi.ProtectionStatus
591 }
592 if afpi.ProtectionState != "" {
593 objectMap["protectionState"] = afpi.ProtectionState
594 }
595 if afpi.LastBackupStatus != nil {
596 objectMap["lastBackupStatus"] = afpi.LastBackupStatus
597 }
598 if afpi.LastBackupTime != nil {
599 objectMap["lastBackupTime"] = afpi.LastBackupTime
600 }
601 if afpi.KpisHealths != nil {
602 objectMap["kpisHealths"] = afpi.KpisHealths
603 }
604 if afpi.ExtendedInfo != nil {
605 objectMap["extendedInfo"] = afpi.ExtendedInfo
606 }
607 if afpi.HealthStatus != "" {
608 objectMap["healthStatus"] = afpi.HealthStatus
609 }
610 if afpi.BackupManagementType != "" {
611 objectMap["backupManagementType"] = afpi.BackupManagementType
612 }
613 if afpi.WorkloadType != "" {
614 objectMap["workloadType"] = afpi.WorkloadType
615 }
616 if afpi.ContainerName != nil {
617 objectMap["containerName"] = afpi.ContainerName
618 }
619 if afpi.SourceResourceID != nil {
620 objectMap["sourceResourceId"] = afpi.SourceResourceID
621 }
622 if afpi.PolicyID != nil {
623 objectMap["policyId"] = afpi.PolicyID
624 }
625 if afpi.LastRecoveryPoint != nil {
626 objectMap["lastRecoveryPoint"] = afpi.LastRecoveryPoint
627 }
628 if afpi.BackupSetName != nil {
629 objectMap["backupSetName"] = afpi.BackupSetName
630 }
631 if afpi.CreateMode != "" {
632 objectMap["createMode"] = afpi.CreateMode
633 }
634 if afpi.DeferredDeleteTimeInUTC != nil {
635 objectMap["deferredDeleteTimeInUTC"] = afpi.DeferredDeleteTimeInUTC
636 }
637 if afpi.IsScheduledForDeferredDelete != nil {
638 objectMap["isScheduledForDeferredDelete"] = afpi.IsScheduledForDeferredDelete
639 }
640 if afpi.DeferredDeleteTimeRemaining != nil {
641 objectMap["deferredDeleteTimeRemaining"] = afpi.DeferredDeleteTimeRemaining
642 }
643 if afpi.IsDeferredDeleteScheduleUpcoming != nil {
644 objectMap["isDeferredDeleteScheduleUpcoming"] = afpi.IsDeferredDeleteScheduleUpcoming
645 }
646 if afpi.IsRehydrate != nil {
647 objectMap["isRehydrate"] = afpi.IsRehydrate
648 }
649 if afpi.ProtectedItemType != "" {
650 objectMap["protectedItemType"] = afpi.ProtectedItemType
651 }
652 return json.Marshal(objectMap)
653 }
654
655
656 func (afpi AzureFileshareProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
657 return &afpi, true
658 }
659
660
661 func (afpi AzureFileshareProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
662 return nil, false
663 }
664
665
666 func (afpi AzureFileshareProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
667 return nil, false
668 }
669
670
671 func (afpi AzureFileshareProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
672 return nil, false
673 }
674
675
676 func (afpi AzureFileshareProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
677 return nil, false
678 }
679
680
681 func (afpi AzureFileshareProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
682 return nil, false
683 }
684
685
686 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
687 return nil, false
688 }
689
690
691 func (afpi AzureFileshareProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
692 return nil, false
693 }
694
695
696 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
697 return nil, false
698 }
699
700
701 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
702 return nil, false
703 }
704
705
706 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
707 return nil, false
708 }
709
710
711 func (afpi AzureFileshareProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
712 return nil, false
713 }
714
715
716 func (afpi AzureFileshareProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
717 return nil, false
718 }
719
720
721 func (afpi AzureFileshareProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
722 return nil, false
723 }
724
725
726 func (afpi AzureFileshareProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
727 return nil, false
728 }
729
730
731 func (afpi AzureFileshareProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
732 return &afpi, true
733 }
734
735
736 type AzureFileshareProtectedItemExtendedInfo struct {
737
738 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
739
740 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
741
742 PolicyState *string `json:"policyState,omitempty"`
743
744 ResourceState *string `json:"resourceState,omitempty"`
745
746 ResourceStateSyncTime *date.Time `json:"resourceStateSyncTime,omitempty"`
747 }
748
749
750 func (afpiei AzureFileshareProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
751 objectMap := make(map[string]interface{})
752 if afpiei.OldestRecoveryPoint != nil {
753 objectMap["oldestRecoveryPoint"] = afpiei.OldestRecoveryPoint
754 }
755 if afpiei.RecoveryPointCount != nil {
756 objectMap["recoveryPointCount"] = afpiei.RecoveryPointCount
757 }
758 if afpiei.PolicyState != nil {
759 objectMap["policyState"] = afpiei.PolicyState
760 }
761 return json.Marshal(objectMap)
762 }
763
764
765 type AzureFileShareProtectionPolicy struct {
766
767 WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
768
769 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
770
771 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
772
773 TimeZone *string `json:"timeZone,omitempty"`
774
775 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
776
777 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
778 }
779
780
781 func (afspp AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) {
782 afspp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage
783 objectMap := make(map[string]interface{})
784 if afspp.WorkLoadType != "" {
785 objectMap["workLoadType"] = afspp.WorkLoadType
786 }
787 objectMap["schedulePolicy"] = afspp.SchedulePolicy
788 objectMap["retentionPolicy"] = afspp.RetentionPolicy
789 if afspp.TimeZone != nil {
790 objectMap["timeZone"] = afspp.TimeZone
791 }
792 if afspp.ProtectedItemsCount != nil {
793 objectMap["protectedItemsCount"] = afspp.ProtectedItemsCount
794 }
795 if afspp.BackupManagementType != "" {
796 objectMap["backupManagementType"] = afspp.BackupManagementType
797 }
798 return json.Marshal(objectMap)
799 }
800
801
802 func (afspp AzureFileShareProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
803 return nil, false
804 }
805
806
807 func (afspp AzureFileShareProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
808 return &afspp, true
809 }
810
811
812 func (afspp AzureFileShareProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
813 return nil, false
814 }
815
816
817 func (afspp AzureFileShareProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
818 return nil, false
819 }
820
821
822 func (afspp AzureFileShareProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
823 return nil, false
824 }
825
826
827 func (afspp AzureFileShareProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
828 return nil, false
829 }
830
831
832 func (afspp AzureFileShareProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
833 return nil, false
834 }
835
836
837 func (afspp AzureFileShareProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
838 return &afspp, true
839 }
840
841
842 func (afspp *AzureFileShareProtectionPolicy) UnmarshalJSON(body []byte) error {
843 var m map[string]*json.RawMessage
844 err := json.Unmarshal(body, &m)
845 if err != nil {
846 return err
847 }
848 for k, v := range m {
849 switch k {
850 case "workLoadType":
851 if v != nil {
852 var workLoadType WorkloadType
853 err = json.Unmarshal(*v, &workLoadType)
854 if err != nil {
855 return err
856 }
857 afspp.WorkLoadType = workLoadType
858 }
859 case "schedulePolicy":
860 if v != nil {
861 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
862 if err != nil {
863 return err
864 }
865 afspp.SchedulePolicy = schedulePolicy
866 }
867 case "retentionPolicy":
868 if v != nil {
869 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
870 if err != nil {
871 return err
872 }
873 afspp.RetentionPolicy = retentionPolicy
874 }
875 case "timeZone":
876 if v != nil {
877 var timeZone string
878 err = json.Unmarshal(*v, &timeZone)
879 if err != nil {
880 return err
881 }
882 afspp.TimeZone = &timeZone
883 }
884 case "protectedItemsCount":
885 if v != nil {
886 var protectedItemsCount int32
887 err = json.Unmarshal(*v, &protectedItemsCount)
888 if err != nil {
889 return err
890 }
891 afspp.ProtectedItemsCount = &protectedItemsCount
892 }
893 case "backupManagementType":
894 if v != nil {
895 var backupManagementType ManagementTypeBasicProtectionPolicy
896 err = json.Unmarshal(*v, &backupManagementType)
897 if err != nil {
898 return err
899 }
900 afspp.BackupManagementType = backupManagementType
901 }
902 }
903 }
904
905 return nil
906 }
907
908
909
910 type AzureFileShareProvisionILRRequest struct {
911
912 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
913
914 SourceResourceID *string `json:"sourceResourceId,omitempty"`
915
916 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
917 }
918
919
920 func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) {
921 afspir.ObjectType = ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest
922 objectMap := make(map[string]interface{})
923 if afspir.RecoveryPointID != nil {
924 objectMap["recoveryPointId"] = afspir.RecoveryPointID
925 }
926 if afspir.SourceResourceID != nil {
927 objectMap["sourceResourceId"] = afspir.SourceResourceID
928 }
929 if afspir.ObjectType != "" {
930 objectMap["objectType"] = afspir.ObjectType
931 }
932 return json.Marshal(objectMap)
933 }
934
935
936 func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
937 return &afspir, true
938 }
939
940
941 func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
942 return nil, false
943 }
944
945
946 func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) {
947 return nil, false
948 }
949
950
951 func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
952 return &afspir, true
953 }
954
955
956 type AzureFileShareRecoveryPoint struct {
957
958 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
959
960 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
961
962 FileShareSnapshotURI *string `json:"fileShareSnapshotUri,omitempty"`
963
964 RecoveryPointSizeInGB *int32 `json:"recoveryPointSizeInGB,omitempty"`
965
966 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
967 }
968
969
970 func (afsrp AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) {
971 afsrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint
972 objectMap := make(map[string]interface{})
973 if afsrp.ObjectType != "" {
974 objectMap["objectType"] = afsrp.ObjectType
975 }
976 return json.Marshal(objectMap)
977 }
978
979
980 func (afsrp AzureFileShareRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
981 return &afsrp, true
982 }
983
984
985 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
986 return nil, false
987 }
988
989
990 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
991 return nil, false
992 }
993
994
995 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
996 return nil, false
997 }
998
999
1000 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
1001 return nil, false
1002 }
1003
1004
1005 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
1006 return nil, false
1007 }
1008
1009
1010 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
1011 return nil, false
1012 }
1013
1014
1015 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
1016 return nil, false
1017 }
1018
1019
1020 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
1021 return nil, false
1022 }
1023
1024
1025 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
1026 return nil, false
1027 }
1028
1029
1030 func (afsrp AzureFileShareRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
1031 return nil, false
1032 }
1033
1034
1035 func (afsrp AzureFileShareRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
1036 return nil, false
1037 }
1038
1039
1040 func (afsrp AzureFileShareRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
1041 return nil, false
1042 }
1043
1044
1045 func (afsrp AzureFileShareRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
1046 return &afsrp, true
1047 }
1048
1049
1050 type AzureFileShareRestoreRequest struct {
1051
1052 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
1053
1054 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1055
1056 CopyOptions CopyOptions `json:"copyOptions,omitempty"`
1057
1058 RestoreRequestType RestoreRequestType `json:"restoreRequestType,omitempty"`
1059
1060 RestoreFileSpecs *[]RestoreFileSpecs `json:"restoreFileSpecs,omitempty"`
1061
1062 TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"`
1063
1064 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
1065 }
1066
1067
1068 func (afsrr AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) {
1069 afsrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest
1070 objectMap := make(map[string]interface{})
1071 if afsrr.RecoveryType != "" {
1072 objectMap["recoveryType"] = afsrr.RecoveryType
1073 }
1074 if afsrr.SourceResourceID != nil {
1075 objectMap["sourceResourceId"] = afsrr.SourceResourceID
1076 }
1077 if afsrr.CopyOptions != "" {
1078 objectMap["copyOptions"] = afsrr.CopyOptions
1079 }
1080 if afsrr.RestoreRequestType != "" {
1081 objectMap["restoreRequestType"] = afsrr.RestoreRequestType
1082 }
1083 if afsrr.RestoreFileSpecs != nil {
1084 objectMap["restoreFileSpecs"] = afsrr.RestoreFileSpecs
1085 }
1086 if afsrr.TargetDetails != nil {
1087 objectMap["targetDetails"] = afsrr.TargetDetails
1088 }
1089 if afsrr.ObjectType != "" {
1090 objectMap["objectType"] = afsrr.ObjectType
1091 }
1092 return json.Marshal(objectMap)
1093 }
1094
1095
1096 func (afsrr AzureFileShareRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
1097 return &afsrr, true
1098 }
1099
1100
1101 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
1102 return nil, false
1103 }
1104
1105
1106 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
1107 return nil, false
1108 }
1109
1110
1111 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
1112 return nil, false
1113 }
1114
1115
1116 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
1117 return nil, false
1118 }
1119
1120
1121 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
1122 return nil, false
1123 }
1124
1125
1126 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
1127 return nil, false
1128 }
1129
1130
1131 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
1132 return nil, false
1133 }
1134
1135
1136 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
1137 return nil, false
1138 }
1139
1140
1141 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
1142 return nil, false
1143 }
1144
1145
1146 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
1147 return nil, false
1148 }
1149
1150
1151 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
1152 return nil, false
1153 }
1154
1155
1156 func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
1157 return nil, false
1158 }
1159
1160
1161 func (afsrr AzureFileShareRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
1162 return nil, false
1163 }
1164
1165
1166 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
1167 return nil, false
1168 }
1169
1170
1171 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
1172 return nil, false
1173 }
1174
1175
1176 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
1177 return nil, false
1178 }
1179
1180
1181 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
1182 return nil, false
1183 }
1184
1185
1186 func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
1187 return nil, false
1188 }
1189
1190
1191 func (afsrr AzureFileShareRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
1192 return nil, false
1193 }
1194
1195
1196 func (afsrr AzureFileShareRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
1197 return &afsrr, true
1198 }
1199
1200
1201
1202 type AzureIaaSClassicComputeVMContainer struct {
1203
1204 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1205
1206 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1207
1208 ResourceGroup *string `json:"resourceGroup,omitempty"`
1209
1210 FriendlyName *string `json:"friendlyName,omitempty"`
1211
1212 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1213
1214 RegistrationStatus *string `json:"registrationStatus,omitempty"`
1215
1216 HealthStatus *string `json:"healthStatus,omitempty"`
1217
1218 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
1219 }
1220
1221
1222 func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) {
1223 aisccvc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines
1224 objectMap := make(map[string]interface{})
1225 if aisccvc.VirtualMachineID != nil {
1226 objectMap["virtualMachineId"] = aisccvc.VirtualMachineID
1227 }
1228 if aisccvc.VirtualMachineVersion != nil {
1229 objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion
1230 }
1231 if aisccvc.ResourceGroup != nil {
1232 objectMap["resourceGroup"] = aisccvc.ResourceGroup
1233 }
1234 if aisccvc.FriendlyName != nil {
1235 objectMap["friendlyName"] = aisccvc.FriendlyName
1236 }
1237 if aisccvc.BackupManagementType != "" {
1238 objectMap["backupManagementType"] = aisccvc.BackupManagementType
1239 }
1240 if aisccvc.RegistrationStatus != nil {
1241 objectMap["registrationStatus"] = aisccvc.RegistrationStatus
1242 }
1243 if aisccvc.HealthStatus != nil {
1244 objectMap["healthStatus"] = aisccvc.HealthStatus
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 BackupManagementType *string `json:"backupManagementType,omitempty"`
1344
1345 WorkloadType *string `json:"workloadType,omitempty"`
1346
1347 FriendlyName *string `json:"friendlyName,omitempty"`
1348
1349 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
1350
1351 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
1352 }
1353
1354
1355 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
1356 aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines
1357 objectMap := make(map[string]interface{})
1358 if aisccvpi.VirtualMachineID != nil {
1359 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
1360 }
1361 if aisccvpi.BackupManagementType != nil {
1362 objectMap["backupManagementType"] = aisccvpi.BackupManagementType
1363 }
1364 if aisccvpi.WorkloadType != nil {
1365 objectMap["workloadType"] = aisccvpi.WorkloadType
1366 }
1367 if aisccvpi.FriendlyName != nil {
1368 objectMap["friendlyName"] = aisccvpi.FriendlyName
1369 }
1370 if aisccvpi.ProtectionState != "" {
1371 objectMap["protectionState"] = aisccvpi.ProtectionState
1372 }
1373 if aisccvpi.ProtectableItemType != "" {
1374 objectMap["protectableItemType"] = aisccvpi.ProtectableItemType
1375 }
1376 return json.Marshal(objectMap)
1377 }
1378
1379
1380 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
1381 return nil, false
1382 }
1383
1384
1385 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
1386 return &aisccvpi, true
1387 }
1388
1389
1390 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
1391 return nil, false
1392 }
1393
1394
1395 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
1396 return nil, false
1397 }
1398
1399
1400 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
1401 return nil, false
1402 }
1403
1404
1405 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
1406 return nil, false
1407 }
1408
1409
1410 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
1411 return nil, false
1412 }
1413
1414
1415 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
1416 return nil, false
1417 }
1418
1419
1420 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
1421 return nil, false
1422 }
1423
1424
1425 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
1426 return nil, false
1427 }
1428
1429
1430 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
1431 return nil, false
1432 }
1433
1434
1435 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
1436 return nil, false
1437 }
1438
1439
1440 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
1441 return &aisccvpi, true
1442 }
1443
1444
1445 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
1446 return nil, false
1447 }
1448
1449
1450 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
1451 return &aisccvpi, true
1452 }
1453
1454
1455
1456 type AzureIaaSClassicComputeVMProtectedItem struct {
1457
1458 FriendlyName *string `json:"friendlyName,omitempty"`
1459
1460 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1461
1462 ProtectionStatus *string `json:"protectionStatus,omitempty"`
1463
1464 ProtectionState ProtectionState `json:"protectionState,omitempty"`
1465
1466 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
1467
1468 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
1469
1470 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
1471
1472 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1473
1474 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1475
1476 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1477
1478 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1479 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
1480
1481 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1482
1483 WorkloadType DataSourceType `json:"workloadType,omitempty"`
1484
1485 ContainerName *string `json:"containerName,omitempty"`
1486
1487 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1488
1489 PolicyID *string `json:"policyId,omitempty"`
1490
1491 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
1492
1493 BackupSetName *string `json:"backupSetName,omitempty"`
1494
1495 CreateMode CreateMode `json:"createMode,omitempty"`
1496
1497 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
1498
1499 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
1500
1501 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
1502
1503 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
1504
1505 IsRehydrate *bool `json:"isRehydrate,omitempty"`
1506
1507 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
1508 }
1509
1510
1511 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
1512 aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines
1513 objectMap := make(map[string]interface{})
1514 if aisccvpi.FriendlyName != nil {
1515 objectMap["friendlyName"] = aisccvpi.FriendlyName
1516 }
1517 if aisccvpi.VirtualMachineID != nil {
1518 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
1519 }
1520 if aisccvpi.ProtectionStatus != nil {
1521 objectMap["protectionStatus"] = aisccvpi.ProtectionStatus
1522 }
1523 if aisccvpi.ProtectionState != "" {
1524 objectMap["protectionState"] = aisccvpi.ProtectionState
1525 }
1526 if aisccvpi.HealthStatus != "" {
1527 objectMap["healthStatus"] = aisccvpi.HealthStatus
1528 }
1529 if aisccvpi.HealthDetails != nil {
1530 objectMap["healthDetails"] = aisccvpi.HealthDetails
1531 }
1532 if aisccvpi.KpisHealths != nil {
1533 objectMap["kpisHealths"] = aisccvpi.KpisHealths
1534 }
1535 if aisccvpi.LastBackupStatus != nil {
1536 objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus
1537 }
1538 if aisccvpi.LastBackupTime != nil {
1539 objectMap["lastBackupTime"] = aisccvpi.LastBackupTime
1540 }
1541 if aisccvpi.ProtectedItemDataID != nil {
1542 objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID
1543 }
1544 if aisccvpi.ExtendedInfo != nil {
1545 objectMap["extendedInfo"] = aisccvpi.ExtendedInfo
1546 }
1547 if aisccvpi.ExtendedProperties != nil {
1548 objectMap["extendedProperties"] = aisccvpi.ExtendedProperties
1549 }
1550 if aisccvpi.BackupManagementType != "" {
1551 objectMap["backupManagementType"] = aisccvpi.BackupManagementType
1552 }
1553 if aisccvpi.WorkloadType != "" {
1554 objectMap["workloadType"] = aisccvpi.WorkloadType
1555 }
1556 if aisccvpi.ContainerName != nil {
1557 objectMap["containerName"] = aisccvpi.ContainerName
1558 }
1559 if aisccvpi.SourceResourceID != nil {
1560 objectMap["sourceResourceId"] = aisccvpi.SourceResourceID
1561 }
1562 if aisccvpi.PolicyID != nil {
1563 objectMap["policyId"] = aisccvpi.PolicyID
1564 }
1565 if aisccvpi.LastRecoveryPoint != nil {
1566 objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint
1567 }
1568 if aisccvpi.BackupSetName != nil {
1569 objectMap["backupSetName"] = aisccvpi.BackupSetName
1570 }
1571 if aisccvpi.CreateMode != "" {
1572 objectMap["createMode"] = aisccvpi.CreateMode
1573 }
1574 if aisccvpi.DeferredDeleteTimeInUTC != nil {
1575 objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC
1576 }
1577 if aisccvpi.IsScheduledForDeferredDelete != nil {
1578 objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete
1579 }
1580 if aisccvpi.DeferredDeleteTimeRemaining != nil {
1581 objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining
1582 }
1583 if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil {
1584 objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming
1585 }
1586 if aisccvpi.IsRehydrate != nil {
1587 objectMap["isRehydrate"] = aisccvpi.IsRehydrate
1588 }
1589 if aisccvpi.ProtectedItemType != "" {
1590 objectMap["protectedItemType"] = aisccvpi.ProtectedItemType
1591 }
1592 return json.Marshal(objectMap)
1593 }
1594
1595
1596 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
1597 return nil, false
1598 }
1599
1600
1601 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
1602 return &aisccvpi, true
1603 }
1604
1605
1606 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
1607 return nil, false
1608 }
1609
1610
1611 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
1612 return nil, false
1613 }
1614
1615
1616 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
1617 return &aisccvpi, true
1618 }
1619
1620
1621 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
1622 return nil, false
1623 }
1624
1625
1626 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
1627 return nil, false
1628 }
1629
1630
1631 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
1632 return nil, false
1633 }
1634
1635
1636 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
1637 return nil, false
1638 }
1639
1640
1641 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
1642 return nil, false
1643 }
1644
1645
1646 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
1647 return nil, false
1648 }
1649
1650
1651 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
1652 return nil, false
1653 }
1654
1655
1656 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
1657 return nil, false
1658 }
1659
1660
1661 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
1662 return nil, false
1663 }
1664
1665
1666 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
1667 return nil, false
1668 }
1669
1670
1671 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
1672 return &aisccvpi, true
1673 }
1674
1675
1676
1677 type AzureIaaSComputeVMContainer struct {
1678
1679 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1680
1681 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1682
1683 ResourceGroup *string `json:"resourceGroup,omitempty"`
1684
1685 FriendlyName *string `json:"friendlyName,omitempty"`
1686
1687 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1688
1689 RegistrationStatus *string `json:"registrationStatus,omitempty"`
1690
1691 HealthStatus *string `json:"healthStatus,omitempty"`
1692
1693 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
1694 }
1695
1696
1697 func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) {
1698 aiscvc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines
1699 objectMap := make(map[string]interface{})
1700 if aiscvc.VirtualMachineID != nil {
1701 objectMap["virtualMachineId"] = aiscvc.VirtualMachineID
1702 }
1703 if aiscvc.VirtualMachineVersion != nil {
1704 objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion
1705 }
1706 if aiscvc.ResourceGroup != nil {
1707 objectMap["resourceGroup"] = aiscvc.ResourceGroup
1708 }
1709 if aiscvc.FriendlyName != nil {
1710 objectMap["friendlyName"] = aiscvc.FriendlyName
1711 }
1712 if aiscvc.BackupManagementType != "" {
1713 objectMap["backupManagementType"] = aiscvc.BackupManagementType
1714 }
1715 if aiscvc.RegistrationStatus != nil {
1716 objectMap["registrationStatus"] = aiscvc.RegistrationStatus
1717 }
1718 if aiscvc.HealthStatus != nil {
1719 objectMap["healthStatus"] = aiscvc.HealthStatus
1720 }
1721 if aiscvc.ContainerType != "" {
1722 objectMap["containerType"] = aiscvc.ContainerType
1723 }
1724 return json.Marshal(objectMap)
1725 }
1726
1727
1728 func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
1729 return nil, false
1730 }
1731
1732
1733 func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
1734 return nil, false
1735 }
1736
1737
1738 func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
1739 return &aiscvc, true
1740 }
1741
1742
1743 func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
1744 return nil, false
1745 }
1746
1747
1748 func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
1749 return nil, false
1750 }
1751
1752
1753 func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
1754 return nil, false
1755 }
1756
1757
1758 func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
1759 return nil, false
1760 }
1761
1762
1763 func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
1764 return nil, false
1765 }
1766
1767
1768 func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
1769 return nil, false
1770 }
1771
1772
1773 func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
1774 return nil, false
1775 }
1776
1777
1778 func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
1779 return nil, false
1780 }
1781
1782
1783 func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
1784 return nil, false
1785 }
1786
1787
1788 func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
1789 return nil, false
1790 }
1791
1792
1793 func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
1794 return &aiscvc, true
1795 }
1796
1797
1798 func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
1799 return nil, false
1800 }
1801
1802
1803 func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
1804 return nil, false
1805 }
1806
1807
1808 func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
1809 return &aiscvc, true
1810 }
1811
1812
1813
1814 type AzureIaaSComputeVMProtectableItem struct {
1815
1816 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1817
1818 BackupManagementType *string `json:"backupManagementType,omitempty"`
1819
1820 WorkloadType *string `json:"workloadType,omitempty"`
1821
1822 FriendlyName *string `json:"friendlyName,omitempty"`
1823
1824 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
1825
1826 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
1827 }
1828
1829
1830 func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
1831 aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines
1832 objectMap := make(map[string]interface{})
1833 if aiscvpi.VirtualMachineID != nil {
1834 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
1835 }
1836 if aiscvpi.BackupManagementType != nil {
1837 objectMap["backupManagementType"] = aiscvpi.BackupManagementType
1838 }
1839 if aiscvpi.WorkloadType != nil {
1840 objectMap["workloadType"] = aiscvpi.WorkloadType
1841 }
1842 if aiscvpi.FriendlyName != nil {
1843 objectMap["friendlyName"] = aiscvpi.FriendlyName
1844 }
1845 if aiscvpi.ProtectionState != "" {
1846 objectMap["protectionState"] = aiscvpi.ProtectionState
1847 }
1848 if aiscvpi.ProtectableItemType != "" {
1849 objectMap["protectableItemType"] = aiscvpi.ProtectableItemType
1850 }
1851 return json.Marshal(objectMap)
1852 }
1853
1854
1855 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
1856 return nil, false
1857 }
1858
1859
1860 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
1861 return nil, false
1862 }
1863
1864
1865 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
1866 return &aiscvpi, true
1867 }
1868
1869
1870 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
1871 return nil, false
1872 }
1873
1874
1875 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
1876 return nil, false
1877 }
1878
1879
1880 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
1881 return nil, false
1882 }
1883
1884
1885 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
1886 return nil, false
1887 }
1888
1889
1890 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
1891 return nil, false
1892 }
1893
1894
1895 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
1896 return nil, false
1897 }
1898
1899
1900 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
1901 return nil, false
1902 }
1903
1904
1905 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
1906 return nil, false
1907 }
1908
1909
1910 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
1911 return nil, false
1912 }
1913
1914
1915 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
1916 return &aiscvpi, true
1917 }
1918
1919
1920 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
1921 return nil, false
1922 }
1923
1924
1925 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
1926 return &aiscvpi, true
1927 }
1928
1929
1930
1931 type AzureIaaSComputeVMProtectedItem struct {
1932
1933 FriendlyName *string `json:"friendlyName,omitempty"`
1934
1935 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1936
1937 ProtectionStatus *string `json:"protectionStatus,omitempty"`
1938
1939 ProtectionState ProtectionState `json:"protectionState,omitempty"`
1940
1941 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
1942
1943 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
1944
1945 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
1946
1947 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1948
1949 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1950
1951 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1952
1953 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1954 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
1955
1956 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1957
1958 WorkloadType DataSourceType `json:"workloadType,omitempty"`
1959
1960 ContainerName *string `json:"containerName,omitempty"`
1961
1962 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1963
1964 PolicyID *string `json:"policyId,omitempty"`
1965
1966 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
1967
1968 BackupSetName *string `json:"backupSetName,omitempty"`
1969
1970 CreateMode CreateMode `json:"createMode,omitempty"`
1971
1972 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
1973
1974 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
1975
1976 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
1977
1978 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
1979
1980 IsRehydrate *bool `json:"isRehydrate,omitempty"`
1981
1982 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
1983 }
1984
1985
1986 func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
1987 aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines
1988 objectMap := make(map[string]interface{})
1989 if aiscvpi.FriendlyName != nil {
1990 objectMap["friendlyName"] = aiscvpi.FriendlyName
1991 }
1992 if aiscvpi.VirtualMachineID != nil {
1993 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
1994 }
1995 if aiscvpi.ProtectionStatus != nil {
1996 objectMap["protectionStatus"] = aiscvpi.ProtectionStatus
1997 }
1998 if aiscvpi.ProtectionState != "" {
1999 objectMap["protectionState"] = aiscvpi.ProtectionState
2000 }
2001 if aiscvpi.HealthStatus != "" {
2002 objectMap["healthStatus"] = aiscvpi.HealthStatus
2003 }
2004 if aiscvpi.HealthDetails != nil {
2005 objectMap["healthDetails"] = aiscvpi.HealthDetails
2006 }
2007 if aiscvpi.KpisHealths != nil {
2008 objectMap["kpisHealths"] = aiscvpi.KpisHealths
2009 }
2010 if aiscvpi.LastBackupStatus != nil {
2011 objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus
2012 }
2013 if aiscvpi.LastBackupTime != nil {
2014 objectMap["lastBackupTime"] = aiscvpi.LastBackupTime
2015 }
2016 if aiscvpi.ProtectedItemDataID != nil {
2017 objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID
2018 }
2019 if aiscvpi.ExtendedInfo != nil {
2020 objectMap["extendedInfo"] = aiscvpi.ExtendedInfo
2021 }
2022 if aiscvpi.ExtendedProperties != nil {
2023 objectMap["extendedProperties"] = aiscvpi.ExtendedProperties
2024 }
2025 if aiscvpi.BackupManagementType != "" {
2026 objectMap["backupManagementType"] = aiscvpi.BackupManagementType
2027 }
2028 if aiscvpi.WorkloadType != "" {
2029 objectMap["workloadType"] = aiscvpi.WorkloadType
2030 }
2031 if aiscvpi.ContainerName != nil {
2032 objectMap["containerName"] = aiscvpi.ContainerName
2033 }
2034 if aiscvpi.SourceResourceID != nil {
2035 objectMap["sourceResourceId"] = aiscvpi.SourceResourceID
2036 }
2037 if aiscvpi.PolicyID != nil {
2038 objectMap["policyId"] = aiscvpi.PolicyID
2039 }
2040 if aiscvpi.LastRecoveryPoint != nil {
2041 objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint
2042 }
2043 if aiscvpi.BackupSetName != nil {
2044 objectMap["backupSetName"] = aiscvpi.BackupSetName
2045 }
2046 if aiscvpi.CreateMode != "" {
2047 objectMap["createMode"] = aiscvpi.CreateMode
2048 }
2049 if aiscvpi.DeferredDeleteTimeInUTC != nil {
2050 objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC
2051 }
2052 if aiscvpi.IsScheduledForDeferredDelete != nil {
2053 objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete
2054 }
2055 if aiscvpi.DeferredDeleteTimeRemaining != nil {
2056 objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining
2057 }
2058 if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil {
2059 objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming
2060 }
2061 if aiscvpi.IsRehydrate != nil {
2062 objectMap["isRehydrate"] = aiscvpi.IsRehydrate
2063 }
2064 if aiscvpi.ProtectedItemType != "" {
2065 objectMap["protectedItemType"] = aiscvpi.ProtectedItemType
2066 }
2067 return json.Marshal(objectMap)
2068 }
2069
2070
2071 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
2072 return nil, false
2073 }
2074
2075
2076 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
2077 return nil, false
2078 }
2079
2080
2081 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
2082 return &aiscvpi, true
2083 }
2084
2085
2086 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
2087 return nil, false
2088 }
2089
2090
2091 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
2092 return &aiscvpi, true
2093 }
2094
2095
2096 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
2097 return nil, false
2098 }
2099
2100
2101 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2102 return nil, false
2103 }
2104
2105
2106 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2107 return nil, false
2108 }
2109
2110
2111 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2112 return nil, false
2113 }
2114
2115
2116 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2117 return nil, false
2118 }
2119
2120
2121 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2122 return nil, false
2123 }
2124
2125
2126 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2127 return nil, false
2128 }
2129
2130
2131 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2132 return nil, false
2133 }
2134
2135
2136 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2137 return nil, false
2138 }
2139
2140
2141 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2142 return nil, false
2143 }
2144
2145
2146 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2147 return &aiscvpi, true
2148 }
2149
2150
2151 type AzureIaaSVMErrorInfo struct {
2152
2153 ErrorCode *int32 `json:"errorCode,omitempty"`
2154
2155 ErrorTitle *string `json:"errorTitle,omitempty"`
2156
2157 ErrorString *string `json:"errorString,omitempty"`
2158
2159 Recommendations *[]string `json:"recommendations,omitempty"`
2160 }
2161
2162
2163 func (aisei AzureIaaSVMErrorInfo) MarshalJSON() ([]byte, error) {
2164 objectMap := make(map[string]interface{})
2165 return json.Marshal(objectMap)
2166 }
2167
2168
2169 type AzureIaaSVMHealthDetails struct {
2170
2171 Code *int32 `json:"code,omitempty"`
2172
2173 Title *string `json:"title,omitempty"`
2174
2175 Message *string `json:"message,omitempty"`
2176
2177 Recommendations *[]string `json:"recommendations,omitempty"`
2178 }
2179
2180
2181 func (aishd AzureIaaSVMHealthDetails) MarshalJSON() ([]byte, error) {
2182 objectMap := make(map[string]interface{})
2183 return json.Marshal(objectMap)
2184 }
2185
2186
2187 type AzureIaaSVMJob struct {
2188
2189 Duration *string `json:"duration,omitempty"`
2190
2191 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
2192
2193 ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"`
2194
2195 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
2196
2197 ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"`
2198
2199 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
2200
2201 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2202
2203 Operation *string `json:"operation,omitempty"`
2204
2205 Status *string `json:"status,omitempty"`
2206
2207 StartTime *date.Time `json:"startTime,omitempty"`
2208
2209 EndTime *date.Time `json:"endTime,omitempty"`
2210
2211 ActivityID *string `json:"activityId,omitempty"`
2212
2213 JobType JobType `json:"jobType,omitempty"`
2214 }
2215
2216
2217 func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) {
2218 aisj.JobType = JobTypeAzureIaaSVMJob
2219 objectMap := make(map[string]interface{})
2220 if aisj.Duration != nil {
2221 objectMap["duration"] = aisj.Duration
2222 }
2223 if aisj.ActionsInfo != nil {
2224 objectMap["actionsInfo"] = aisj.ActionsInfo
2225 }
2226 if aisj.ErrorDetails != nil {
2227 objectMap["errorDetails"] = aisj.ErrorDetails
2228 }
2229 if aisj.VirtualMachineVersion != nil {
2230 objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion
2231 }
2232 if aisj.ExtendedInfo != nil {
2233 objectMap["extendedInfo"] = aisj.ExtendedInfo
2234 }
2235 if aisj.EntityFriendlyName != nil {
2236 objectMap["entityFriendlyName"] = aisj.EntityFriendlyName
2237 }
2238 if aisj.BackupManagementType != "" {
2239 objectMap["backupManagementType"] = aisj.BackupManagementType
2240 }
2241 if aisj.Operation != nil {
2242 objectMap["operation"] = aisj.Operation
2243 }
2244 if aisj.Status != nil {
2245 objectMap["status"] = aisj.Status
2246 }
2247 if aisj.StartTime != nil {
2248 objectMap["startTime"] = aisj.StartTime
2249 }
2250 if aisj.EndTime != nil {
2251 objectMap["endTime"] = aisj.EndTime
2252 }
2253 if aisj.ActivityID != nil {
2254 objectMap["activityId"] = aisj.ActivityID
2255 }
2256 if aisj.JobType != "" {
2257 objectMap["jobType"] = aisj.JobType
2258 }
2259 return json.Marshal(objectMap)
2260 }
2261
2262
2263 func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
2264 return &aisj, true
2265 }
2266
2267
2268 func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
2269 return nil, false
2270 }
2271
2272
2273 func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
2274 return nil, false
2275 }
2276
2277
2278 func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) {
2279 return nil, false
2280 }
2281
2282
2283 func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) {
2284 return nil, false
2285 }
2286
2287
2288 func (aisj AzureIaaSVMJob) AsVaultJob() (*VaultJob, bool) {
2289 return nil, false
2290 }
2291
2292
2293 func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) {
2294 return nil, false
2295 }
2296
2297
2298 func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) {
2299 return &aisj, true
2300 }
2301
2302
2303 type AzureIaaSVMJobExtendedInfo struct {
2304
2305 TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"`
2306
2307 PropertyBag map[string]*string `json:"propertyBag"`
2308
2309 InternalPropertyBag map[string]*string `json:"internalPropertyBag"`
2310
2311 ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2312
2313 EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"`
2314
2315 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
2316 }
2317
2318
2319 func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) {
2320 objectMap := make(map[string]interface{})
2321 if aisjei.TasksList != nil {
2322 objectMap["tasksList"] = aisjei.TasksList
2323 }
2324 if aisjei.PropertyBag != nil {
2325 objectMap["propertyBag"] = aisjei.PropertyBag
2326 }
2327 if aisjei.InternalPropertyBag != nil {
2328 objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag
2329 }
2330 if aisjei.ProgressPercentage != nil {
2331 objectMap["progressPercentage"] = aisjei.ProgressPercentage
2332 }
2333 if aisjei.EstimatedRemainingDuration != nil {
2334 objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration
2335 }
2336 if aisjei.DynamicErrorMessage != nil {
2337 objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage
2338 }
2339 return json.Marshal(objectMap)
2340 }
2341
2342
2343 type AzureIaaSVMJobTaskDetails struct {
2344
2345 TaskID *string `json:"taskId,omitempty"`
2346
2347 StartTime *date.Time `json:"startTime,omitempty"`
2348
2349 EndTime *date.Time `json:"endTime,omitempty"`
2350
2351 InstanceID *string `json:"instanceId,omitempty"`
2352
2353 Duration *string `json:"duration,omitempty"`
2354
2355 Status *string `json:"status,omitempty"`
2356
2357 ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2358
2359
2360 TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"`
2361 }
2362
2363
2364 type BasicAzureIaaSVMProtectedItem interface {
2365 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
2366 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
2367 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
2368 }
2369
2370
2371 type AzureIaaSVMProtectedItem struct {
2372
2373 FriendlyName *string `json:"friendlyName,omitempty"`
2374
2375 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
2376
2377 ProtectionStatus *string `json:"protectionStatus,omitempty"`
2378
2379 ProtectionState ProtectionState `json:"protectionState,omitempty"`
2380
2381 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
2382
2383 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
2384
2385 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
2386
2387 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
2388
2389 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
2390
2391 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
2392
2393 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
2394 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
2395
2396 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2397
2398 WorkloadType DataSourceType `json:"workloadType,omitempty"`
2399
2400 ContainerName *string `json:"containerName,omitempty"`
2401
2402 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2403
2404 PolicyID *string `json:"policyId,omitempty"`
2405
2406 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
2407
2408 BackupSetName *string `json:"backupSetName,omitempty"`
2409
2410 CreateMode CreateMode `json:"createMode,omitempty"`
2411
2412 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
2413
2414 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
2415
2416 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
2417
2418 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
2419
2420 IsRehydrate *bool `json:"isRehydrate,omitempty"`
2421
2422 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
2423 }
2424
2425 func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) {
2426 var m map[string]interface{}
2427 err := json.Unmarshal(body, &m)
2428 if err != nil {
2429 return nil, err
2430 }
2431
2432 switch m["protectedItemType"] {
2433 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
2434 var aisccvpi AzureIaaSClassicComputeVMProtectedItem
2435 err := json.Unmarshal(body, &aisccvpi)
2436 return aisccvpi, err
2437 case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
2438 var aiscvpi AzureIaaSComputeVMProtectedItem
2439 err := json.Unmarshal(body, &aiscvpi)
2440 return aiscvpi, err
2441 default:
2442 var aispi AzureIaaSVMProtectedItem
2443 err := json.Unmarshal(body, &aispi)
2444 return aispi, err
2445 }
2446 }
2447 func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) {
2448 var rawMessages []*json.RawMessage
2449 err := json.Unmarshal(body, &rawMessages)
2450 if err != nil {
2451 return nil, err
2452 }
2453
2454 aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages))
2455
2456 for index, rawMessage := range rawMessages {
2457 aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage)
2458 if err != nil {
2459 return nil, err
2460 }
2461 aispiArray[index] = aispi
2462 }
2463 return aispiArray, nil
2464 }
2465
2466
2467 func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) {
2468 aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem
2469 objectMap := make(map[string]interface{})
2470 if aispi.FriendlyName != nil {
2471 objectMap["friendlyName"] = aispi.FriendlyName
2472 }
2473 if aispi.VirtualMachineID != nil {
2474 objectMap["virtualMachineId"] = aispi.VirtualMachineID
2475 }
2476 if aispi.ProtectionStatus != nil {
2477 objectMap["protectionStatus"] = aispi.ProtectionStatus
2478 }
2479 if aispi.ProtectionState != "" {
2480 objectMap["protectionState"] = aispi.ProtectionState
2481 }
2482 if aispi.HealthStatus != "" {
2483 objectMap["healthStatus"] = aispi.HealthStatus
2484 }
2485 if aispi.HealthDetails != nil {
2486 objectMap["healthDetails"] = aispi.HealthDetails
2487 }
2488 if aispi.KpisHealths != nil {
2489 objectMap["kpisHealths"] = aispi.KpisHealths
2490 }
2491 if aispi.LastBackupStatus != nil {
2492 objectMap["lastBackupStatus"] = aispi.LastBackupStatus
2493 }
2494 if aispi.LastBackupTime != nil {
2495 objectMap["lastBackupTime"] = aispi.LastBackupTime
2496 }
2497 if aispi.ProtectedItemDataID != nil {
2498 objectMap["protectedItemDataId"] = aispi.ProtectedItemDataID
2499 }
2500 if aispi.ExtendedInfo != nil {
2501 objectMap["extendedInfo"] = aispi.ExtendedInfo
2502 }
2503 if aispi.ExtendedProperties != nil {
2504 objectMap["extendedProperties"] = aispi.ExtendedProperties
2505 }
2506 if aispi.BackupManagementType != "" {
2507 objectMap["backupManagementType"] = aispi.BackupManagementType
2508 }
2509 if aispi.WorkloadType != "" {
2510 objectMap["workloadType"] = aispi.WorkloadType
2511 }
2512 if aispi.ContainerName != nil {
2513 objectMap["containerName"] = aispi.ContainerName
2514 }
2515 if aispi.SourceResourceID != nil {
2516 objectMap["sourceResourceId"] = aispi.SourceResourceID
2517 }
2518 if aispi.PolicyID != nil {
2519 objectMap["policyId"] = aispi.PolicyID
2520 }
2521 if aispi.LastRecoveryPoint != nil {
2522 objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint
2523 }
2524 if aispi.BackupSetName != nil {
2525 objectMap["backupSetName"] = aispi.BackupSetName
2526 }
2527 if aispi.CreateMode != "" {
2528 objectMap["createMode"] = aispi.CreateMode
2529 }
2530 if aispi.DeferredDeleteTimeInUTC != nil {
2531 objectMap["deferredDeleteTimeInUTC"] = aispi.DeferredDeleteTimeInUTC
2532 }
2533 if aispi.IsScheduledForDeferredDelete != nil {
2534 objectMap["isScheduledForDeferredDelete"] = aispi.IsScheduledForDeferredDelete
2535 }
2536 if aispi.DeferredDeleteTimeRemaining != nil {
2537 objectMap["deferredDeleteTimeRemaining"] = aispi.DeferredDeleteTimeRemaining
2538 }
2539 if aispi.IsDeferredDeleteScheduleUpcoming != nil {
2540 objectMap["isDeferredDeleteScheduleUpcoming"] = aispi.IsDeferredDeleteScheduleUpcoming
2541 }
2542 if aispi.IsRehydrate != nil {
2543 objectMap["isRehydrate"] = aispi.IsRehydrate
2544 }
2545 if aispi.ProtectedItemType != "" {
2546 objectMap["protectedItemType"] = aispi.ProtectedItemType
2547 }
2548 return json.Marshal(objectMap)
2549 }
2550
2551
2552 func (aispi AzureIaaSVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
2553 return nil, false
2554 }
2555
2556
2557 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
2558 return nil, false
2559 }
2560
2561
2562 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
2563 return nil, false
2564 }
2565
2566
2567 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
2568 return &aispi, true
2569 }
2570
2571
2572 func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
2573 return &aispi, true
2574 }
2575
2576
2577 func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
2578 return nil, false
2579 }
2580
2581
2582 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2583 return nil, false
2584 }
2585
2586
2587 func (aispi AzureIaaSVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2588 return nil, false
2589 }
2590
2591
2592 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2593 return nil, false
2594 }
2595
2596
2597 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2598 return nil, false
2599 }
2600
2601
2602 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2603 return nil, false
2604 }
2605
2606
2607 func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2608 return nil, false
2609 }
2610
2611
2612 func (aispi AzureIaaSVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2613 return nil, false
2614 }
2615
2616
2617 func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2618 return nil, false
2619 }
2620
2621
2622 func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2623 return nil, false
2624 }
2625
2626
2627 func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2628 return &aispi, true
2629 }
2630
2631
2632 type AzureIaaSVMProtectedItemExtendedInfo struct {
2633
2634 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
2635
2636 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
2637
2638 PolicyInconsistent *bool `json:"policyInconsistent,omitempty"`
2639 }
2640
2641
2642 type AzureIaaSVMProtectionPolicy struct {
2643 InstantRPDetails *InstantRPAdditionalDetails `json:"instantRPDetails,omitempty"`
2644
2645 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
2646
2647 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
2648
2649 InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"`
2650
2651 TimeZone *string `json:"timeZone,omitempty"`
2652
2653 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
2654
2655 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
2656 }
2657
2658
2659 func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) {
2660 aispp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM
2661 objectMap := make(map[string]interface{})
2662 if aispp.InstantRPDetails != nil {
2663 objectMap["instantRPDetails"] = aispp.InstantRPDetails
2664 }
2665 objectMap["schedulePolicy"] = aispp.SchedulePolicy
2666 objectMap["retentionPolicy"] = aispp.RetentionPolicy
2667 if aispp.InstantRpRetentionRangeInDays != nil {
2668 objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays
2669 }
2670 if aispp.TimeZone != nil {
2671 objectMap["timeZone"] = aispp.TimeZone
2672 }
2673 if aispp.ProtectedItemsCount != nil {
2674 objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount
2675 }
2676 if aispp.BackupManagementType != "" {
2677 objectMap["backupManagementType"] = aispp.BackupManagementType
2678 }
2679 return json.Marshal(objectMap)
2680 }
2681
2682
2683 func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
2684 return nil, false
2685 }
2686
2687
2688 func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
2689 return nil, false
2690 }
2691
2692
2693 func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
2694 return &aispp, true
2695 }
2696
2697
2698 func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
2699 return nil, false
2700 }
2701
2702
2703 func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
2704 return nil, false
2705 }
2706
2707
2708 func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
2709 return nil, false
2710 }
2711
2712
2713 func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
2714 return nil, false
2715 }
2716
2717
2718 func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
2719 return &aispp, true
2720 }
2721
2722
2723 func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error {
2724 var m map[string]*json.RawMessage
2725 err := json.Unmarshal(body, &m)
2726 if err != nil {
2727 return err
2728 }
2729 for k, v := range m {
2730 switch k {
2731 case "instantRPDetails":
2732 if v != nil {
2733 var instantRPDetails InstantRPAdditionalDetails
2734 err = json.Unmarshal(*v, &instantRPDetails)
2735 if err != nil {
2736 return err
2737 }
2738 aispp.InstantRPDetails = &instantRPDetails
2739 }
2740 case "schedulePolicy":
2741 if v != nil {
2742 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
2743 if err != nil {
2744 return err
2745 }
2746 aispp.SchedulePolicy = schedulePolicy
2747 }
2748 case "retentionPolicy":
2749 if v != nil {
2750 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
2751 if err != nil {
2752 return err
2753 }
2754 aispp.RetentionPolicy = retentionPolicy
2755 }
2756 case "instantRpRetentionRangeInDays":
2757 if v != nil {
2758 var instantRpRetentionRangeInDays int32
2759 err = json.Unmarshal(*v, &instantRpRetentionRangeInDays)
2760 if err != nil {
2761 return err
2762 }
2763 aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays
2764 }
2765 case "timeZone":
2766 if v != nil {
2767 var timeZone string
2768 err = json.Unmarshal(*v, &timeZone)
2769 if err != nil {
2770 return err
2771 }
2772 aispp.TimeZone = &timeZone
2773 }
2774 case "protectedItemsCount":
2775 if v != nil {
2776 var protectedItemsCount int32
2777 err = json.Unmarshal(*v, &protectedItemsCount)
2778 if err != nil {
2779 return err
2780 }
2781 aispp.ProtectedItemsCount = &protectedItemsCount
2782 }
2783 case "backupManagementType":
2784 if v != nil {
2785 var backupManagementType ManagementTypeBasicProtectionPolicy
2786 err = json.Unmarshal(*v, &backupManagementType)
2787 if err != nil {
2788 return err
2789 }
2790 aispp.BackupManagementType = backupManagementType
2791 }
2792 }
2793 }
2794
2795 return nil
2796 }
2797
2798
2799 type BasicAzureRecoveryServiceVaultProtectionIntent interface {
2800 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
2801 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
2802 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
2803 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
2804 }
2805
2806
2807 type AzureRecoveryServiceVaultProtectionIntent struct {
2808
2809 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2810
2811 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2812
2813 ItemID *string `json:"itemId,omitempty"`
2814
2815 PolicyID *string `json:"policyId,omitempty"`
2816
2817 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
2818
2819 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
2820 }
2821
2822 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) {
2823 var m map[string]interface{}
2824 err := json.Unmarshal(body, &m)
2825 if err != nil {
2826 return nil, err
2827 }
2828
2829 switch m["protectionIntentItemType"] {
2830 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
2831 var awapi AzureWorkloadAutoProtectionIntent
2832 err := json.Unmarshal(body, &awapi)
2833 return awapi, err
2834 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
2835 var awsapi AzureWorkloadSQLAutoProtectionIntent
2836 err := json.Unmarshal(body, &awsapi)
2837 return awsapi, err
2838 default:
2839 var arsvpi AzureRecoveryServiceVaultProtectionIntent
2840 err := json.Unmarshal(body, &arsvpi)
2841 return arsvpi, err
2842 }
2843 }
2844 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) {
2845 var rawMessages []*json.RawMessage
2846 err := json.Unmarshal(body, &rawMessages)
2847 if err != nil {
2848 return nil, err
2849 }
2850
2851 arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages))
2852
2853 for index, rawMessage := range rawMessages {
2854 arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage)
2855 if err != nil {
2856 return nil, err
2857 }
2858 arsvpiArray[index] = arsvpi
2859 }
2860 return arsvpiArray, nil
2861 }
2862
2863
2864 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) {
2865 arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem
2866 objectMap := make(map[string]interface{})
2867 if arsvpi.BackupManagementType != "" {
2868 objectMap["backupManagementType"] = arsvpi.BackupManagementType
2869 }
2870 if arsvpi.SourceResourceID != nil {
2871 objectMap["sourceResourceId"] = arsvpi.SourceResourceID
2872 }
2873 if arsvpi.ItemID != nil {
2874 objectMap["itemId"] = arsvpi.ItemID
2875 }
2876 if arsvpi.PolicyID != nil {
2877 objectMap["policyId"] = arsvpi.PolicyID
2878 }
2879 if arsvpi.ProtectionState != "" {
2880 objectMap["protectionState"] = arsvpi.ProtectionState
2881 }
2882 if arsvpi.ProtectionIntentItemType != "" {
2883 objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType
2884 }
2885 return json.Marshal(objectMap)
2886 }
2887
2888
2889 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
2890 return &arsvpi, true
2891 }
2892
2893
2894 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
2895 return &arsvpi, true
2896 }
2897
2898
2899 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
2900 return nil, false
2901 }
2902
2903
2904 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
2905 return nil, false
2906 }
2907
2908
2909 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
2910 return nil, false
2911 }
2912
2913
2914 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
2915 return nil, false
2916 }
2917
2918
2919 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
2920 return nil, false
2921 }
2922
2923
2924 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
2925 return &arsvpi, true
2926 }
2927
2928
2929 type AzureResourceProtectionIntent struct {
2930
2931 FriendlyName *string `json:"friendlyName,omitempty"`
2932
2933 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2934
2935 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2936
2937 ItemID *string `json:"itemId,omitempty"`
2938
2939 PolicyID *string `json:"policyId,omitempty"`
2940
2941 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
2942
2943 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
2944 }
2945
2946
2947 func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) {
2948 arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem
2949 objectMap := make(map[string]interface{})
2950 if arpi.FriendlyName != nil {
2951 objectMap["friendlyName"] = arpi.FriendlyName
2952 }
2953 if arpi.BackupManagementType != "" {
2954 objectMap["backupManagementType"] = arpi.BackupManagementType
2955 }
2956 if arpi.SourceResourceID != nil {
2957 objectMap["sourceResourceId"] = arpi.SourceResourceID
2958 }
2959 if arpi.ItemID != nil {
2960 objectMap["itemId"] = arpi.ItemID
2961 }
2962 if arpi.PolicyID != nil {
2963 objectMap["policyId"] = arpi.PolicyID
2964 }
2965 if arpi.ProtectionState != "" {
2966 objectMap["protectionState"] = arpi.ProtectionState
2967 }
2968 if arpi.ProtectionIntentItemType != "" {
2969 objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType
2970 }
2971 return json.Marshal(objectMap)
2972 }
2973
2974
2975 func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
2976 return nil, false
2977 }
2978
2979
2980 func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
2981 return nil, false
2982 }
2983
2984
2985 func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
2986 return &arpi, true
2987 }
2988
2989
2990 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
2991 return nil, false
2992 }
2993
2994
2995 func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
2996 return nil, false
2997 }
2998
2999
3000 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
3001 return nil, false
3002 }
3003
3004
3005 func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
3006 return nil, false
3007 }
3008
3009
3010 func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
3011 return &arpi, true
3012 }
3013
3014
3015 type AzureSQLAGWorkloadContainerProtectionContainer struct {
3016
3017 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3018
3019 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
3020
3021 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
3022
3023 WorkloadType WorkloadType `json:"workloadType,omitempty"`
3024
3025 OperationType OperationType `json:"operationType,omitempty"`
3026
3027 FriendlyName *string `json:"friendlyName,omitempty"`
3028
3029 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3030
3031 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3032
3033 HealthStatus *string `json:"healthStatus,omitempty"`
3034
3035 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3036 }
3037
3038
3039 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) {
3040 aswcpc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer
3041 objectMap := make(map[string]interface{})
3042 if aswcpc.SourceResourceID != nil {
3043 objectMap["sourceResourceId"] = aswcpc.SourceResourceID
3044 }
3045 if aswcpc.LastUpdatedTime != nil {
3046 objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime
3047 }
3048 if aswcpc.ExtendedInfo != nil {
3049 objectMap["extendedInfo"] = aswcpc.ExtendedInfo
3050 }
3051 if aswcpc.WorkloadType != "" {
3052 objectMap["workloadType"] = aswcpc.WorkloadType
3053 }
3054 if aswcpc.OperationType != "" {
3055 objectMap["operationType"] = aswcpc.OperationType
3056 }
3057 if aswcpc.FriendlyName != nil {
3058 objectMap["friendlyName"] = aswcpc.FriendlyName
3059 }
3060 if aswcpc.BackupManagementType != "" {
3061 objectMap["backupManagementType"] = aswcpc.BackupManagementType
3062 }
3063 if aswcpc.RegistrationStatus != nil {
3064 objectMap["registrationStatus"] = aswcpc.RegistrationStatus
3065 }
3066 if aswcpc.HealthStatus != nil {
3067 objectMap["healthStatus"] = aswcpc.HealthStatus
3068 }
3069 if aswcpc.ContainerType != "" {
3070 objectMap["containerType"] = aswcpc.ContainerType
3071 }
3072 return json.Marshal(objectMap)
3073 }
3074
3075
3076 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3077 return nil, false
3078 }
3079
3080
3081 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3082 return nil, false
3083 }
3084
3085
3086 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3087 return nil, false
3088 }
3089
3090
3091 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3092 return &aswcpc, true
3093 }
3094
3095
3096 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3097 return nil, false
3098 }
3099
3100
3101 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3102 return nil, false
3103 }
3104
3105
3106 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3107 return nil, false
3108 }
3109
3110
3111 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3112 return nil, false
3113 }
3114
3115
3116 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3117 return &aswcpc, true
3118 }
3119
3120
3121 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
3122 return nil, false
3123 }
3124
3125
3126 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3127 return nil, false
3128 }
3129
3130
3131 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
3132 return nil, false
3133 }
3134
3135
3136 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3137 return nil, false
3138 }
3139
3140
3141 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3142 return nil, false
3143 }
3144
3145
3146 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
3147 return nil, false
3148 }
3149
3150
3151 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3152 return nil, false
3153 }
3154
3155
3156 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3157 return &aswcpc, true
3158 }
3159
3160
3161 type AzureSQLContainer struct {
3162
3163 FriendlyName *string `json:"friendlyName,omitempty"`
3164
3165 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3166
3167 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3168
3169 HealthStatus *string `json:"healthStatus,omitempty"`
3170
3171 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3172 }
3173
3174
3175 func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) {
3176 asc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer
3177 objectMap := make(map[string]interface{})
3178 if asc.FriendlyName != nil {
3179 objectMap["friendlyName"] = asc.FriendlyName
3180 }
3181 if asc.BackupManagementType != "" {
3182 objectMap["backupManagementType"] = asc.BackupManagementType
3183 }
3184 if asc.RegistrationStatus != nil {
3185 objectMap["registrationStatus"] = asc.RegistrationStatus
3186 }
3187 if asc.HealthStatus != nil {
3188 objectMap["healthStatus"] = asc.HealthStatus
3189 }
3190 if asc.ContainerType != "" {
3191 objectMap["containerType"] = asc.ContainerType
3192 }
3193 return json.Marshal(objectMap)
3194 }
3195
3196
3197 func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3198 return nil, false
3199 }
3200
3201
3202 func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3203 return nil, false
3204 }
3205
3206
3207 func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3208 return nil, false
3209 }
3210
3211
3212 func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3213 return nil, false
3214 }
3215
3216
3217 func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3218 return &asc, true
3219 }
3220
3221
3222 func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3223 return nil, false
3224 }
3225
3226
3227 func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3228 return nil, false
3229 }
3230
3231
3232 func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3233 return nil, false
3234 }
3235
3236
3237 func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3238 return nil, false
3239 }
3240
3241
3242 func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) {
3243 return nil, false
3244 }
3245
3246
3247 func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3248 return nil, false
3249 }
3250
3251
3252 func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) {
3253 return nil, false
3254 }
3255
3256
3257 func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3258 return nil, false
3259 }
3260
3261
3262 func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3263 return nil, false
3264 }
3265
3266
3267 func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) {
3268 return nil, false
3269 }
3270
3271
3272 func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3273 return nil, false
3274 }
3275
3276
3277 func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3278 return &asc, true
3279 }
3280
3281
3282 type AzureSQLProtectedItem struct {
3283
3284 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
3285
3286 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
3287
3288 ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
3289
3290 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3291
3292 WorkloadType DataSourceType `json:"workloadType,omitempty"`
3293
3294 ContainerName *string `json:"containerName,omitempty"`
3295
3296 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3297
3298 PolicyID *string `json:"policyId,omitempty"`
3299
3300 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
3301
3302 BackupSetName *string `json:"backupSetName,omitempty"`
3303
3304 CreateMode CreateMode `json:"createMode,omitempty"`
3305
3306 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
3307
3308 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
3309
3310 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
3311
3312 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
3313
3314 IsRehydrate *bool `json:"isRehydrate,omitempty"`
3315
3316 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
3317 }
3318
3319
3320 func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) {
3321 aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases
3322 objectMap := make(map[string]interface{})
3323 if aspi.ProtectedItemDataID != nil {
3324 objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID
3325 }
3326 if aspi.ProtectionState != "" {
3327 objectMap["protectionState"] = aspi.ProtectionState
3328 }
3329 if aspi.ExtendedInfo != nil {
3330 objectMap["extendedInfo"] = aspi.ExtendedInfo
3331 }
3332 if aspi.BackupManagementType != "" {
3333 objectMap["backupManagementType"] = aspi.BackupManagementType
3334 }
3335 if aspi.WorkloadType != "" {
3336 objectMap["workloadType"] = aspi.WorkloadType
3337 }
3338 if aspi.ContainerName != nil {
3339 objectMap["containerName"] = aspi.ContainerName
3340 }
3341 if aspi.SourceResourceID != nil {
3342 objectMap["sourceResourceId"] = aspi.SourceResourceID
3343 }
3344 if aspi.PolicyID != nil {
3345 objectMap["policyId"] = aspi.PolicyID
3346 }
3347 if aspi.LastRecoveryPoint != nil {
3348 objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint
3349 }
3350 if aspi.BackupSetName != nil {
3351 objectMap["backupSetName"] = aspi.BackupSetName
3352 }
3353 if aspi.CreateMode != "" {
3354 objectMap["createMode"] = aspi.CreateMode
3355 }
3356 if aspi.DeferredDeleteTimeInUTC != nil {
3357 objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC
3358 }
3359 if aspi.IsScheduledForDeferredDelete != nil {
3360 objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete
3361 }
3362 if aspi.DeferredDeleteTimeRemaining != nil {
3363 objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining
3364 }
3365 if aspi.IsDeferredDeleteScheduleUpcoming != nil {
3366 objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming
3367 }
3368 if aspi.IsRehydrate != nil {
3369 objectMap["isRehydrate"] = aspi.IsRehydrate
3370 }
3371 if aspi.ProtectedItemType != "" {
3372 objectMap["protectedItemType"] = aspi.ProtectedItemType
3373 }
3374 return json.Marshal(objectMap)
3375 }
3376
3377
3378 func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
3379 return nil, false
3380 }
3381
3382
3383 func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
3384 return nil, false
3385 }
3386
3387
3388 func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
3389 return nil, false
3390 }
3391
3392
3393 func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
3394 return nil, false
3395 }
3396
3397
3398 func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
3399 return nil, false
3400 }
3401
3402
3403 func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
3404 return &aspi, true
3405 }
3406
3407
3408 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
3409 return nil, false
3410 }
3411
3412
3413 func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
3414 return nil, false
3415 }
3416
3417
3418 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
3419 return nil, false
3420 }
3421
3422
3423 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
3424 return nil, false
3425 }
3426
3427
3428 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
3429 return nil, false
3430 }
3431
3432
3433 func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
3434 return nil, false
3435 }
3436
3437
3438 func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
3439 return nil, false
3440 }
3441
3442
3443 func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
3444 return nil, false
3445 }
3446
3447
3448 func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
3449 return nil, false
3450 }
3451
3452
3453 func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
3454 return &aspi, true
3455 }
3456
3457
3458 type AzureSQLProtectedItemExtendedInfo struct {
3459
3460 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
3461
3462 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
3463
3464 PolicyState *string `json:"policyState,omitempty"`
3465 }
3466
3467
3468 type AzureSQLProtectionPolicy struct {
3469
3470 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
3471
3472 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
3473
3474 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
3475 }
3476
3477
3478 func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) {
3479 aspp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL
3480 objectMap := make(map[string]interface{})
3481 objectMap["retentionPolicy"] = aspp.RetentionPolicy
3482 if aspp.ProtectedItemsCount != nil {
3483 objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount
3484 }
3485 if aspp.BackupManagementType != "" {
3486 objectMap["backupManagementType"] = aspp.BackupManagementType
3487 }
3488 return json.Marshal(objectMap)
3489 }
3490
3491
3492 func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
3493 return nil, false
3494 }
3495
3496
3497 func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
3498 return nil, false
3499 }
3500
3501
3502 func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
3503 return nil, false
3504 }
3505
3506
3507 func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
3508 return &aspp, true
3509 }
3510
3511
3512 func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
3513 return nil, false
3514 }
3515
3516
3517 func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
3518 return nil, false
3519 }
3520
3521
3522 func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
3523 return nil, false
3524 }
3525
3526
3527 func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
3528 return &aspp, true
3529 }
3530
3531
3532 func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error {
3533 var m map[string]*json.RawMessage
3534 err := json.Unmarshal(body, &m)
3535 if err != nil {
3536 return err
3537 }
3538 for k, v := range m {
3539 switch k {
3540 case "retentionPolicy":
3541 if v != nil {
3542 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
3543 if err != nil {
3544 return err
3545 }
3546 aspp.RetentionPolicy = retentionPolicy
3547 }
3548 case "protectedItemsCount":
3549 if v != nil {
3550 var protectedItemsCount int32
3551 err = json.Unmarshal(*v, &protectedItemsCount)
3552 if err != nil {
3553 return err
3554 }
3555 aspp.ProtectedItemsCount = &protectedItemsCount
3556 }
3557 case "backupManagementType":
3558 if v != nil {
3559 var backupManagementType ManagementTypeBasicProtectionPolicy
3560 err = json.Unmarshal(*v, &backupManagementType)
3561 if err != nil {
3562 return err
3563 }
3564 aspp.BackupManagementType = backupManagementType
3565 }
3566 }
3567 }
3568
3569 return nil
3570 }
3571
3572
3573 type AzureStorageContainer struct {
3574
3575 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3576
3577 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3578
3579 ResourceGroup *string `json:"resourceGroup,omitempty"`
3580
3581 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
3582
3583 FriendlyName *string `json:"friendlyName,omitempty"`
3584
3585 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3586
3587 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3588
3589 HealthStatus *string `json:"healthStatus,omitempty"`
3590
3591 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3592 }
3593
3594
3595 func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) {
3596 asc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeStorageContainer
3597 objectMap := make(map[string]interface{})
3598 if asc.SourceResourceID != nil {
3599 objectMap["sourceResourceId"] = asc.SourceResourceID
3600 }
3601 if asc.StorageAccountVersion != nil {
3602 objectMap["storageAccountVersion"] = asc.StorageAccountVersion
3603 }
3604 if asc.ResourceGroup != nil {
3605 objectMap["resourceGroup"] = asc.ResourceGroup
3606 }
3607 if asc.ProtectedItemCount != nil {
3608 objectMap["protectedItemCount"] = asc.ProtectedItemCount
3609 }
3610 if asc.FriendlyName != nil {
3611 objectMap["friendlyName"] = asc.FriendlyName
3612 }
3613 if asc.BackupManagementType != "" {
3614 objectMap["backupManagementType"] = asc.BackupManagementType
3615 }
3616 if asc.RegistrationStatus != nil {
3617 objectMap["registrationStatus"] = asc.RegistrationStatus
3618 }
3619 if asc.HealthStatus != nil {
3620 objectMap["healthStatus"] = asc.HealthStatus
3621 }
3622 if asc.ContainerType != "" {
3623 objectMap["containerType"] = asc.ContainerType
3624 }
3625 return json.Marshal(objectMap)
3626 }
3627
3628
3629 func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3630 return nil, false
3631 }
3632
3633
3634 func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3635 return nil, false
3636 }
3637
3638
3639 func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3640 return nil, false
3641 }
3642
3643
3644 func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3645 return nil, false
3646 }
3647
3648
3649 func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3650 return nil, false
3651 }
3652
3653
3654 func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3655 return &asc, true
3656 }
3657
3658
3659 func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3660 return nil, false
3661 }
3662
3663
3664 func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3665 return nil, false
3666 }
3667
3668
3669 func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3670 return nil, false
3671 }
3672
3673
3674 func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) {
3675 return nil, false
3676 }
3677
3678
3679 func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3680 return nil, false
3681 }
3682
3683
3684 func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) {
3685 return nil, false
3686 }
3687
3688
3689 func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3690 return nil, false
3691 }
3692
3693
3694 func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3695 return nil, false
3696 }
3697
3698
3699 func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) {
3700 return nil, false
3701 }
3702
3703
3704 func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3705 return nil, false
3706 }
3707
3708
3709 func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3710 return &asc, true
3711 }
3712
3713
3714 type AzureStorageErrorInfo struct {
3715
3716 ErrorCode *int32 `json:"errorCode,omitempty"`
3717
3718 ErrorString *string `json:"errorString,omitempty"`
3719
3720 Recommendations *[]string `json:"recommendations,omitempty"`
3721 }
3722
3723
3724 type AzureStorageJob struct {
3725
3726 Duration *string `json:"duration,omitempty"`
3727
3728 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
3729
3730 ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"`
3731
3732 StorageAccountName *string `json:"storageAccountName,omitempty"`
3733
3734 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3735
3736 ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"`
3737
3738 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
3739
3740 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3741
3742 Operation *string `json:"operation,omitempty"`
3743
3744 Status *string `json:"status,omitempty"`
3745
3746 StartTime *date.Time `json:"startTime,omitempty"`
3747
3748 EndTime *date.Time `json:"endTime,omitempty"`
3749
3750 ActivityID *string `json:"activityId,omitempty"`
3751
3752 JobType JobType `json:"jobType,omitempty"`
3753 }
3754
3755
3756 func (asj AzureStorageJob) MarshalJSON() ([]byte, error) {
3757 asj.JobType = JobTypeAzureStorageJob
3758 objectMap := make(map[string]interface{})
3759 if asj.Duration != nil {
3760 objectMap["duration"] = asj.Duration
3761 }
3762 if asj.ActionsInfo != nil {
3763 objectMap["actionsInfo"] = asj.ActionsInfo
3764 }
3765 if asj.ErrorDetails != nil {
3766 objectMap["errorDetails"] = asj.ErrorDetails
3767 }
3768 if asj.StorageAccountName != nil {
3769 objectMap["storageAccountName"] = asj.StorageAccountName
3770 }
3771 if asj.StorageAccountVersion != nil {
3772 objectMap["storageAccountVersion"] = asj.StorageAccountVersion
3773 }
3774 if asj.ExtendedInfo != nil {
3775 objectMap["extendedInfo"] = asj.ExtendedInfo
3776 }
3777 if asj.EntityFriendlyName != nil {
3778 objectMap["entityFriendlyName"] = asj.EntityFriendlyName
3779 }
3780 if asj.BackupManagementType != "" {
3781 objectMap["backupManagementType"] = asj.BackupManagementType
3782 }
3783 if asj.Operation != nil {
3784 objectMap["operation"] = asj.Operation
3785 }
3786 if asj.Status != nil {
3787 objectMap["status"] = asj.Status
3788 }
3789 if asj.StartTime != nil {
3790 objectMap["startTime"] = asj.StartTime
3791 }
3792 if asj.EndTime != nil {
3793 objectMap["endTime"] = asj.EndTime
3794 }
3795 if asj.ActivityID != nil {
3796 objectMap["activityId"] = asj.ActivityID
3797 }
3798 if asj.JobType != "" {
3799 objectMap["jobType"] = asj.JobType
3800 }
3801 return json.Marshal(objectMap)
3802 }
3803
3804
3805 func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
3806 return nil, false
3807 }
3808
3809
3810 func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
3811 return &asj, true
3812 }
3813
3814
3815 func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
3816 return nil, false
3817 }
3818
3819
3820 func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) {
3821 return nil, false
3822 }
3823
3824
3825 func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) {
3826 return nil, false
3827 }
3828
3829
3830 func (asj AzureStorageJob) AsVaultJob() (*VaultJob, bool) {
3831 return nil, false
3832 }
3833
3834
3835 func (asj AzureStorageJob) AsJob() (*Job, bool) {
3836 return nil, false
3837 }
3838
3839
3840 func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) {
3841 return &asj, true
3842 }
3843
3844
3845 type AzureStorageJobExtendedInfo struct {
3846
3847 TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"`
3848
3849 PropertyBag map[string]*string `json:"propertyBag"`
3850
3851 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
3852 }
3853
3854
3855 func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) {
3856 objectMap := make(map[string]interface{})
3857 if asjei.TasksList != nil {
3858 objectMap["tasksList"] = asjei.TasksList
3859 }
3860 if asjei.PropertyBag != nil {
3861 objectMap["propertyBag"] = asjei.PropertyBag
3862 }
3863 if asjei.DynamicErrorMessage != nil {
3864 objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage
3865 }
3866 return json.Marshal(objectMap)
3867 }
3868
3869
3870 type AzureStorageJobTaskDetails struct {
3871
3872 TaskID *string `json:"taskId,omitempty"`
3873
3874 Status *string `json:"status,omitempty"`
3875 }
3876
3877
3878 type AzureStorageProtectableContainer struct {
3879
3880 FriendlyName *string `json:"friendlyName,omitempty"`
3881
3882 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3883
3884 HealthStatus *string `json:"healthStatus,omitempty"`
3885
3886 ContainerID *string `json:"containerId,omitempty"`
3887
3888 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
3889 }
3890
3891
3892 func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) {
3893 aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer
3894 objectMap := make(map[string]interface{})
3895 if aspc.FriendlyName != nil {
3896 objectMap["friendlyName"] = aspc.FriendlyName
3897 }
3898 if aspc.BackupManagementType != "" {
3899 objectMap["backupManagementType"] = aspc.BackupManagementType
3900 }
3901 if aspc.HealthStatus != nil {
3902 objectMap["healthStatus"] = aspc.HealthStatus
3903 }
3904 if aspc.ContainerID != nil {
3905 objectMap["containerId"] = aspc.ContainerID
3906 }
3907 if aspc.ProtectableContainerType != "" {
3908 objectMap["protectableContainerType"] = aspc.ProtectableContainerType
3909 }
3910 return json.Marshal(objectMap)
3911 }
3912
3913
3914 func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
3915 return &aspc, true
3916 }
3917
3918
3919 func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
3920 return nil, false
3921 }
3922
3923
3924 func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
3925 return nil, false
3926 }
3927
3928
3929 func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
3930 return &aspc, true
3931 }
3932
3933
3934 type AzureVMAppContainerProtectableContainer struct {
3935
3936 FriendlyName *string `json:"friendlyName,omitempty"`
3937
3938 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3939
3940 HealthStatus *string `json:"healthStatus,omitempty"`
3941
3942 ContainerID *string `json:"containerId,omitempty"`
3943
3944 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
3945 }
3946
3947
3948 func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) {
3949 avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer
3950 objectMap := make(map[string]interface{})
3951 if avacpc.FriendlyName != nil {
3952 objectMap["friendlyName"] = avacpc.FriendlyName
3953 }
3954 if avacpc.BackupManagementType != "" {
3955 objectMap["backupManagementType"] = avacpc.BackupManagementType
3956 }
3957 if avacpc.HealthStatus != nil {
3958 objectMap["healthStatus"] = avacpc.HealthStatus
3959 }
3960 if avacpc.ContainerID != nil {
3961 objectMap["containerId"] = avacpc.ContainerID
3962 }
3963 if avacpc.ProtectableContainerType != "" {
3964 objectMap["protectableContainerType"] = avacpc.ProtectableContainerType
3965 }
3966 return json.Marshal(objectMap)
3967 }
3968
3969
3970 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
3971 return nil, false
3972 }
3973
3974
3975 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
3976 return &avacpc, true
3977 }
3978
3979
3980 func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
3981 return nil, false
3982 }
3983
3984
3985 func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
3986 return &avacpc, true
3987 }
3988
3989
3990 type AzureVMAppContainerProtectionContainer struct {
3991
3992 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3993
3994 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
3995
3996 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
3997
3998 WorkloadType WorkloadType `json:"workloadType,omitempty"`
3999
4000 OperationType OperationType `json:"operationType,omitempty"`
4001
4002 FriendlyName *string `json:"friendlyName,omitempty"`
4003
4004 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4005
4006 RegistrationStatus *string `json:"registrationStatus,omitempty"`
4007
4008 HealthStatus *string `json:"healthStatus,omitempty"`
4009
4010 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
4011 }
4012
4013
4014 func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) {
4015 avacpc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer
4016 objectMap := make(map[string]interface{})
4017 if avacpc.SourceResourceID != nil {
4018 objectMap["sourceResourceId"] = avacpc.SourceResourceID
4019 }
4020 if avacpc.LastUpdatedTime != nil {
4021 objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime
4022 }
4023 if avacpc.ExtendedInfo != nil {
4024 objectMap["extendedInfo"] = avacpc.ExtendedInfo
4025 }
4026 if avacpc.WorkloadType != "" {
4027 objectMap["workloadType"] = avacpc.WorkloadType
4028 }
4029 if avacpc.OperationType != "" {
4030 objectMap["operationType"] = avacpc.OperationType
4031 }
4032 if avacpc.FriendlyName != nil {
4033 objectMap["friendlyName"] = avacpc.FriendlyName
4034 }
4035 if avacpc.BackupManagementType != "" {
4036 objectMap["backupManagementType"] = avacpc.BackupManagementType
4037 }
4038 if avacpc.RegistrationStatus != nil {
4039 objectMap["registrationStatus"] = avacpc.RegistrationStatus
4040 }
4041 if avacpc.HealthStatus != nil {
4042 objectMap["healthStatus"] = avacpc.HealthStatus
4043 }
4044 if avacpc.ContainerType != "" {
4045 objectMap["containerType"] = avacpc.ContainerType
4046 }
4047 return json.Marshal(objectMap)
4048 }
4049
4050
4051 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
4052 return nil, false
4053 }
4054
4055
4056 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
4057 return nil, false
4058 }
4059
4060
4061 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
4062 return nil, false
4063 }
4064
4065
4066 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
4067 return nil, false
4068 }
4069
4070
4071 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
4072 return nil, false
4073 }
4074
4075
4076 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
4077 return nil, false
4078 }
4079
4080
4081 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
4082 return &avacpc, true
4083 }
4084
4085
4086 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
4087 return nil, false
4088 }
4089
4090
4091 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
4092 return &avacpc, true
4093 }
4094
4095
4096 func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
4097 return nil, false
4098 }
4099
4100
4101 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
4102 return nil, false
4103 }
4104
4105
4106 func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
4107 return nil, false
4108 }
4109
4110
4111 func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
4112 return nil, false
4113 }
4114
4115
4116 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
4117 return nil, false
4118 }
4119
4120
4121 func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
4122 return nil, false
4123 }
4124
4125
4126 func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
4127 return nil, false
4128 }
4129
4130
4131 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
4132 return &avacpc, true
4133 }
4134
4135
4136 type AzureVMResourceFeatureSupportRequest struct {
4137
4138 VMSize *string `json:"vmSize,omitempty"`
4139
4140 VMSku *string `json:"vmSku,omitempty"`
4141
4142 FeatureType FeatureType `json:"featureType,omitempty"`
4143 }
4144
4145
4146 func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) {
4147 avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup
4148 objectMap := make(map[string]interface{})
4149 if avrfsr.VMSize != nil {
4150 objectMap["vmSize"] = avrfsr.VMSize
4151 }
4152 if avrfsr.VMSku != nil {
4153 objectMap["vmSku"] = avrfsr.VMSku
4154 }
4155 if avrfsr.FeatureType != "" {
4156 objectMap["featureType"] = avrfsr.FeatureType
4157 }
4158 return json.Marshal(objectMap)
4159 }
4160
4161
4162 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
4163 return nil, false
4164 }
4165
4166
4167 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
4168 return &avrfsr, true
4169 }
4170
4171
4172 func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
4173 return nil, false
4174 }
4175
4176
4177 func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
4178 return &avrfsr, true
4179 }
4180
4181
4182 type AzureVMResourceFeatureSupportResponse struct {
4183 autorest.Response `json:"-"`
4184
4185 SupportStatus SupportStatus `json:"supportStatus,omitempty"`
4186 }
4187
4188
4189 type BasicAzureVMWorkloadItem interface {
4190 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
4191 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
4192 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
4193 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
4194 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
4195 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
4196 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
4197 }
4198
4199
4200 type AzureVMWorkloadItem struct {
4201
4202 ParentName *string `json:"parentName,omitempty"`
4203
4204 ServerName *string `json:"serverName,omitempty"`
4205
4206 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4207
4208 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4209
4210 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
4211
4212 BackupManagementType *string `json:"backupManagementType,omitempty"`
4213
4214 WorkloadType *string `json:"workloadType,omitempty"`
4215
4216 FriendlyName *string `json:"friendlyName,omitempty"`
4217
4218 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4219
4220 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
4221 }
4222
4223 func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) {
4224 var m map[string]interface{}
4225 err := json.Unmarshal(body, &m)
4226 if err != nil {
4227 return nil, err
4228 }
4229
4230 switch m["workloadItemType"] {
4231 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase):
4232 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
4233 err := json.Unmarshal(body, &avwsadwi)
4234 return avwsadwi, err
4235 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem):
4236 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
4237 err := json.Unmarshal(body, &avwsaswi)
4238 return avwsaswi, err
4239 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase):
4240 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
4241 err := json.Unmarshal(body, &avwshdwi)
4242 return avwshdwi, err
4243 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem):
4244 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
4245 err := json.Unmarshal(body, &avwshswi)
4246 return avwshswi, err
4247 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase):
4248 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
4249 err := json.Unmarshal(body, &avwsdwi)
4250 return avwsdwi, err
4251 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance):
4252 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
4253 err := json.Unmarshal(body, &avwsiwi)
4254 return avwsiwi, err
4255 default:
4256 var avwi AzureVMWorkloadItem
4257 err := json.Unmarshal(body, &avwi)
4258 return avwi, err
4259 }
4260 }
4261 func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) {
4262 var rawMessages []*json.RawMessage
4263 err := json.Unmarshal(body, &rawMessages)
4264 if err != nil {
4265 return nil, err
4266 }
4267
4268 avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages))
4269
4270 for index, rawMessage := range rawMessages {
4271 avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage)
4272 if err != nil {
4273 return nil, err
4274 }
4275 avwiArray[index] = avwi
4276 }
4277 return avwiArray, nil
4278 }
4279
4280
4281 func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) {
4282 avwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem
4283 objectMap := make(map[string]interface{})
4284 if avwi.ParentName != nil {
4285 objectMap["parentName"] = avwi.ParentName
4286 }
4287 if avwi.ServerName != nil {
4288 objectMap["serverName"] = avwi.ServerName
4289 }
4290 if avwi.IsAutoProtectable != nil {
4291 objectMap["isAutoProtectable"] = avwi.IsAutoProtectable
4292 }
4293 if avwi.Subinquireditemcount != nil {
4294 objectMap["subinquireditemcount"] = avwi.Subinquireditemcount
4295 }
4296 if avwi.SubWorkloadItemCount != nil {
4297 objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount
4298 }
4299 if avwi.BackupManagementType != nil {
4300 objectMap["backupManagementType"] = avwi.BackupManagementType
4301 }
4302 if avwi.WorkloadType != nil {
4303 objectMap["workloadType"] = avwi.WorkloadType
4304 }
4305 if avwi.FriendlyName != nil {
4306 objectMap["friendlyName"] = avwi.FriendlyName
4307 }
4308 if avwi.ProtectionState != "" {
4309 objectMap["protectionState"] = avwi.ProtectionState
4310 }
4311 if avwi.WorkloadItemType != "" {
4312 objectMap["workloadItemType"] = avwi.WorkloadItemType
4313 }
4314 return json.Marshal(objectMap)
4315 }
4316
4317
4318 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
4319 return &avwi, true
4320 }
4321
4322
4323 func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
4324 return &avwi, true
4325 }
4326
4327
4328 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
4329 return nil, false
4330 }
4331
4332
4333 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
4334 return nil, false
4335 }
4336
4337
4338 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
4339 return nil, false
4340 }
4341
4342
4343 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
4344 return nil, false
4345 }
4346
4347
4348 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
4349 return nil, false
4350 }
4351
4352
4353 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
4354 return nil, false
4355 }
4356
4357
4358 func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
4359 return nil, false
4360 }
4361
4362
4363 func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
4364 return &avwi, true
4365 }
4366
4367
4368 type BasicAzureVMWorkloadProtectableItem interface {
4369 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
4370 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
4371 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
4372 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
4373 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
4374 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
4375 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
4376 }
4377
4378
4379 type AzureVMWorkloadProtectableItem struct {
4380
4381 ParentName *string `json:"parentName,omitempty"`
4382
4383
4384 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
4385
4386 ServerName *string `json:"serverName,omitempty"`
4387
4388 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4389
4390 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
4391
4392 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4393
4394 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
4395
4396 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
4397
4398 BackupManagementType *string `json:"backupManagementType,omitempty"`
4399
4400 WorkloadType *string `json:"workloadType,omitempty"`
4401
4402 FriendlyName *string `json:"friendlyName,omitempty"`
4403
4404 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4405
4406 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
4407 }
4408
4409 func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) {
4410 var m map[string]interface{}
4411 err := json.Unmarshal(body, &m)
4412 if err != nil {
4413 return nil, err
4414 }
4415
4416 switch m["protectableItemType"] {
4417 case string(ProtectableItemTypeSAPAseSystem):
4418 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
4419 err := json.Unmarshal(body, &avwsaspi)
4420 return avwsaspi, err
4421 case string(ProtectableItemTypeSAPHanaDatabase):
4422 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
4423 err := json.Unmarshal(body, &avwshdpi)
4424 return avwshdpi, err
4425 case string(ProtectableItemTypeSAPHanaSystem):
4426 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
4427 err := json.Unmarshal(body, &avwshspi)
4428 return avwshspi, err
4429 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
4430 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
4431 err := json.Unmarshal(body, &avwsagpi)
4432 return avwsagpi, err
4433 case string(ProtectableItemTypeSQLDataBase):
4434 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
4435 err := json.Unmarshal(body, &avwsdpi)
4436 return avwsdpi, err
4437 case string(ProtectableItemTypeSQLInstance):
4438 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
4439 err := json.Unmarshal(body, &avwsipi)
4440 return avwsipi, err
4441 default:
4442 var avwpi AzureVMWorkloadProtectableItem
4443 err := json.Unmarshal(body, &avwpi)
4444 return avwpi, err
4445 }
4446 }
4447 func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) {
4448 var rawMessages []*json.RawMessage
4449 err := json.Unmarshal(body, &rawMessages)
4450 if err != nil {
4451 return nil, err
4452 }
4453
4454 avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages))
4455
4456 for index, rawMessage := range rawMessages {
4457 avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage)
4458 if err != nil {
4459 return nil, err
4460 }
4461 avwpiArray[index] = avwpi
4462 }
4463 return avwpiArray, nil
4464 }
4465
4466
4467 func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) {
4468 avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem
4469 objectMap := make(map[string]interface{})
4470 if avwpi.ParentName != nil {
4471 objectMap["parentName"] = avwpi.ParentName
4472 }
4473 if avwpi.ParentUniqueName != nil {
4474 objectMap["parentUniqueName"] = avwpi.ParentUniqueName
4475 }
4476 if avwpi.ServerName != nil {
4477 objectMap["serverName"] = avwpi.ServerName
4478 }
4479 if avwpi.IsAutoProtectable != nil {
4480 objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable
4481 }
4482 if avwpi.IsAutoProtected != nil {
4483 objectMap["isAutoProtected"] = avwpi.IsAutoProtected
4484 }
4485 if avwpi.Subinquireditemcount != nil {
4486 objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount
4487 }
4488 if avwpi.Subprotectableitemcount != nil {
4489 objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount
4490 }
4491 if avwpi.Prebackupvalidation != nil {
4492 objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation
4493 }
4494 if avwpi.BackupManagementType != nil {
4495 objectMap["backupManagementType"] = avwpi.BackupManagementType
4496 }
4497 if avwpi.WorkloadType != nil {
4498 objectMap["workloadType"] = avwpi.WorkloadType
4499 }
4500 if avwpi.FriendlyName != nil {
4501 objectMap["friendlyName"] = avwpi.FriendlyName
4502 }
4503 if avwpi.ProtectionState != "" {
4504 objectMap["protectionState"] = avwpi.ProtectionState
4505 }
4506 if avwpi.ProtectableItemType != "" {
4507 objectMap["protectableItemType"] = avwpi.ProtectableItemType
4508 }
4509 return json.Marshal(objectMap)
4510 }
4511
4512
4513 func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
4514 return nil, false
4515 }
4516
4517
4518 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
4519 return nil, false
4520 }
4521
4522
4523 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
4524 return nil, false
4525 }
4526
4527
4528 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
4529 return &avwpi, true
4530 }
4531
4532
4533 func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
4534 return &avwpi, true
4535 }
4536
4537
4538 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
4539 return nil, false
4540 }
4541
4542
4543 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
4544 return nil, false
4545 }
4546
4547
4548 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
4549 return nil, false
4550 }
4551
4552
4553 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
4554 return nil, false
4555 }
4556
4557
4558 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
4559 return nil, false
4560 }
4561
4562
4563 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
4564 return nil, false
4565 }
4566
4567
4568 func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
4569 return nil, false
4570 }
4571
4572
4573 func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
4574 return nil, false
4575 }
4576
4577
4578 func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
4579 return nil, false
4580 }
4581
4582
4583 func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
4584 return &avwpi, true
4585 }
4586
4587
4588 type BasicAzureVMWorkloadProtectedItem interface {
4589 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
4590 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
4591 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
4592 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
4593 }
4594
4595
4596 type AzureVMWorkloadProtectedItem struct {
4597
4598 FriendlyName *string `json:"friendlyName,omitempty"`
4599
4600 ServerName *string `json:"serverName,omitempty"`
4601
4602 ParentName *string `json:"parentName,omitempty"`
4603
4604 ParentType *string `json:"parentType,omitempty"`
4605
4606 ProtectionStatus *string `json:"protectionStatus,omitempty"`
4607
4608 ProtectionState ProtectionState `json:"protectionState,omitempty"`
4609
4610 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
4611
4612 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
4613
4614 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
4615
4616 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
4617
4618 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
4619
4620 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
4621
4622 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
4623
4624 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4625
4626 WorkloadType DataSourceType `json:"workloadType,omitempty"`
4627
4628 ContainerName *string `json:"containerName,omitempty"`
4629
4630 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4631
4632 PolicyID *string `json:"policyId,omitempty"`
4633
4634 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
4635
4636 BackupSetName *string `json:"backupSetName,omitempty"`
4637
4638 CreateMode CreateMode `json:"createMode,omitempty"`
4639
4640 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
4641
4642 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
4643
4644 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
4645
4646 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
4647
4648 IsRehydrate *bool `json:"isRehydrate,omitempty"`
4649
4650 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
4651 }
4652
4653 func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) {
4654 var m map[string]interface{}
4655 err := json.Unmarshal(body, &m)
4656 if err != nil {
4657 return nil, err
4658 }
4659
4660 switch m["protectedItemType"] {
4661 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
4662 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
4663 err := json.Unmarshal(body, &avwsadpi)
4664 return avwsadpi, err
4665 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
4666 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
4667 err := json.Unmarshal(body, &avwshdpi)
4668 return avwshdpi, err
4669 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
4670 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
4671 err := json.Unmarshal(body, &avwsdpi)
4672 return avwsdpi, err
4673 default:
4674 var avwpi AzureVMWorkloadProtectedItem
4675 err := json.Unmarshal(body, &avwpi)
4676 return avwpi, err
4677 }
4678 }
4679 func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) {
4680 var rawMessages []*json.RawMessage
4681 err := json.Unmarshal(body, &rawMessages)
4682 if err != nil {
4683 return nil, err
4684 }
4685
4686 avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages))
4687
4688 for index, rawMessage := range rawMessages {
4689 avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage)
4690 if err != nil {
4691 return nil, err
4692 }
4693 avwpiArray[index] = avwpi
4694 }
4695 return avwpiArray, nil
4696 }
4697
4698
4699 func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) {
4700 avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem
4701 objectMap := make(map[string]interface{})
4702 if avwpi.FriendlyName != nil {
4703 objectMap["friendlyName"] = avwpi.FriendlyName
4704 }
4705 if avwpi.ServerName != nil {
4706 objectMap["serverName"] = avwpi.ServerName
4707 }
4708 if avwpi.ParentName != nil {
4709 objectMap["parentName"] = avwpi.ParentName
4710 }
4711 if avwpi.ParentType != nil {
4712 objectMap["parentType"] = avwpi.ParentType
4713 }
4714 if avwpi.ProtectionStatus != nil {
4715 objectMap["protectionStatus"] = avwpi.ProtectionStatus
4716 }
4717 if avwpi.ProtectionState != "" {
4718 objectMap["protectionState"] = avwpi.ProtectionState
4719 }
4720 if avwpi.LastBackupStatus != "" {
4721 objectMap["lastBackupStatus"] = avwpi.LastBackupStatus
4722 }
4723 if avwpi.LastBackupTime != nil {
4724 objectMap["lastBackupTime"] = avwpi.LastBackupTime
4725 }
4726 if avwpi.LastBackupErrorDetail != nil {
4727 objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail
4728 }
4729 if avwpi.ProtectedItemDataSourceID != nil {
4730 objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID
4731 }
4732 if avwpi.ProtectedItemHealthStatus != "" {
4733 objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus
4734 }
4735 if avwpi.ExtendedInfo != nil {
4736 objectMap["extendedInfo"] = avwpi.ExtendedInfo
4737 }
4738 if avwpi.KpisHealths != nil {
4739 objectMap["kpisHealths"] = avwpi.KpisHealths
4740 }
4741 if avwpi.BackupManagementType != "" {
4742 objectMap["backupManagementType"] = avwpi.BackupManagementType
4743 }
4744 if avwpi.WorkloadType != "" {
4745 objectMap["workloadType"] = avwpi.WorkloadType
4746 }
4747 if avwpi.ContainerName != nil {
4748 objectMap["containerName"] = avwpi.ContainerName
4749 }
4750 if avwpi.SourceResourceID != nil {
4751 objectMap["sourceResourceId"] = avwpi.SourceResourceID
4752 }
4753 if avwpi.PolicyID != nil {
4754 objectMap["policyId"] = avwpi.PolicyID
4755 }
4756 if avwpi.LastRecoveryPoint != nil {
4757 objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint
4758 }
4759 if avwpi.BackupSetName != nil {
4760 objectMap["backupSetName"] = avwpi.BackupSetName
4761 }
4762 if avwpi.CreateMode != "" {
4763 objectMap["createMode"] = avwpi.CreateMode
4764 }
4765 if avwpi.DeferredDeleteTimeInUTC != nil {
4766 objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC
4767 }
4768 if avwpi.IsScheduledForDeferredDelete != nil {
4769 objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete
4770 }
4771 if avwpi.DeferredDeleteTimeRemaining != nil {
4772 objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining
4773 }
4774 if avwpi.IsDeferredDeleteScheduleUpcoming != nil {
4775 objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming
4776 }
4777 if avwpi.IsRehydrate != nil {
4778 objectMap["isRehydrate"] = avwpi.IsRehydrate
4779 }
4780 if avwpi.ProtectedItemType != "" {
4781 objectMap["protectedItemType"] = avwpi.ProtectedItemType
4782 }
4783 return json.Marshal(objectMap)
4784 }
4785
4786
4787 func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
4788 return nil, false
4789 }
4790
4791
4792 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
4793 return nil, false
4794 }
4795
4796
4797 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
4798 return nil, false
4799 }
4800
4801
4802 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
4803 return nil, false
4804 }
4805
4806
4807 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
4808 return nil, false
4809 }
4810
4811
4812 func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
4813 return nil, false
4814 }
4815
4816
4817 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
4818 return &avwpi, true
4819 }
4820
4821
4822 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
4823 return &avwpi, true
4824 }
4825
4826
4827 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
4828 return nil, false
4829 }
4830
4831
4832 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
4833 return nil, false
4834 }
4835
4836
4837 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
4838 return nil, false
4839 }
4840
4841
4842 func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
4843 return nil, false
4844 }
4845
4846
4847 func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
4848 return nil, false
4849 }
4850
4851
4852 func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
4853 return nil, false
4854 }
4855
4856
4857 func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
4858 return nil, false
4859 }
4860
4861
4862 func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
4863 return &avwpi, true
4864 }
4865
4866
4867
4868 type AzureVMWorkloadProtectedItemExtendedInfo struct {
4869
4870 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
4871
4872 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
4873
4874 PolicyState *string `json:"policyState,omitempty"`
4875 }
4876
4877
4878 type AzureVMWorkloadProtectionPolicy struct {
4879
4880 WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
4881
4882 Settings *Settings `json:"settings,omitempty"`
4883
4884 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
4885
4886 MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"`
4887
4888 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
4889
4890 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
4891 }
4892
4893
4894 func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) {
4895 avwpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload
4896 objectMap := make(map[string]interface{})
4897 if avwpp.WorkLoadType != "" {
4898 objectMap["workLoadType"] = avwpp.WorkLoadType
4899 }
4900 if avwpp.Settings != nil {
4901 objectMap["settings"] = avwpp.Settings
4902 }
4903 if avwpp.SubProtectionPolicy != nil {
4904 objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy
4905 }
4906 if avwpp.MakePolicyConsistent != nil {
4907 objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent
4908 }
4909 if avwpp.ProtectedItemsCount != nil {
4910 objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount
4911 }
4912 if avwpp.BackupManagementType != "" {
4913 objectMap["backupManagementType"] = avwpp.BackupManagementType
4914 }
4915 return json.Marshal(objectMap)
4916 }
4917
4918
4919 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
4920 return &avwpp, true
4921 }
4922
4923
4924 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
4925 return nil, false
4926 }
4927
4928
4929 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
4930 return nil, false
4931 }
4932
4933
4934 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
4935 return nil, false
4936 }
4937
4938
4939 func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
4940 return nil, false
4941 }
4942
4943
4944 func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
4945 return nil, false
4946 }
4947
4948
4949 func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
4950 return nil, false
4951 }
4952
4953
4954 func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
4955 return &avwpp, true
4956 }
4957
4958
4959
4960 type AzureVMWorkloadSAPAseDatabaseProtectedItem struct {
4961
4962 FriendlyName *string `json:"friendlyName,omitempty"`
4963
4964 ServerName *string `json:"serverName,omitempty"`
4965
4966 ParentName *string `json:"parentName,omitempty"`
4967
4968 ParentType *string `json:"parentType,omitempty"`
4969
4970 ProtectionStatus *string `json:"protectionStatus,omitempty"`
4971
4972 ProtectionState ProtectionState `json:"protectionState,omitempty"`
4973
4974 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
4975
4976 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
4977
4978 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
4979
4980 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
4981
4982 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
4983
4984 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
4985
4986 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
4987
4988 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4989
4990 WorkloadType DataSourceType `json:"workloadType,omitempty"`
4991
4992 ContainerName *string `json:"containerName,omitempty"`
4993
4994 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4995
4996 PolicyID *string `json:"policyId,omitempty"`
4997
4998 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
4999
5000 BackupSetName *string `json:"backupSetName,omitempty"`
5001
5002 CreateMode CreateMode `json:"createMode,omitempty"`
5003
5004 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
5005
5006 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
5007
5008 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
5009
5010 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
5011
5012 IsRehydrate *bool `json:"isRehydrate,omitempty"`
5013
5014 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
5015 }
5016
5017
5018 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
5019 avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase
5020 objectMap := make(map[string]interface{})
5021 if avwsadpi.FriendlyName != nil {
5022 objectMap["friendlyName"] = avwsadpi.FriendlyName
5023 }
5024 if avwsadpi.ServerName != nil {
5025 objectMap["serverName"] = avwsadpi.ServerName
5026 }
5027 if avwsadpi.ParentName != nil {
5028 objectMap["parentName"] = avwsadpi.ParentName
5029 }
5030 if avwsadpi.ParentType != nil {
5031 objectMap["parentType"] = avwsadpi.ParentType
5032 }
5033 if avwsadpi.ProtectionStatus != nil {
5034 objectMap["protectionStatus"] = avwsadpi.ProtectionStatus
5035 }
5036 if avwsadpi.ProtectionState != "" {
5037 objectMap["protectionState"] = avwsadpi.ProtectionState
5038 }
5039 if avwsadpi.LastBackupStatus != "" {
5040 objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus
5041 }
5042 if avwsadpi.LastBackupTime != nil {
5043 objectMap["lastBackupTime"] = avwsadpi.LastBackupTime
5044 }
5045 if avwsadpi.LastBackupErrorDetail != nil {
5046 objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail
5047 }
5048 if avwsadpi.ProtectedItemDataSourceID != nil {
5049 objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID
5050 }
5051 if avwsadpi.ProtectedItemHealthStatus != "" {
5052 objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus
5053 }
5054 if avwsadpi.ExtendedInfo != nil {
5055 objectMap["extendedInfo"] = avwsadpi.ExtendedInfo
5056 }
5057 if avwsadpi.KpisHealths != nil {
5058 objectMap["kpisHealths"] = avwsadpi.KpisHealths
5059 }
5060 if avwsadpi.BackupManagementType != "" {
5061 objectMap["backupManagementType"] = avwsadpi.BackupManagementType
5062 }
5063 if avwsadpi.WorkloadType != "" {
5064 objectMap["workloadType"] = avwsadpi.WorkloadType
5065 }
5066 if avwsadpi.ContainerName != nil {
5067 objectMap["containerName"] = avwsadpi.ContainerName
5068 }
5069 if avwsadpi.SourceResourceID != nil {
5070 objectMap["sourceResourceId"] = avwsadpi.SourceResourceID
5071 }
5072 if avwsadpi.PolicyID != nil {
5073 objectMap["policyId"] = avwsadpi.PolicyID
5074 }
5075 if avwsadpi.LastRecoveryPoint != nil {
5076 objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint
5077 }
5078 if avwsadpi.BackupSetName != nil {
5079 objectMap["backupSetName"] = avwsadpi.BackupSetName
5080 }
5081 if avwsadpi.CreateMode != "" {
5082 objectMap["createMode"] = avwsadpi.CreateMode
5083 }
5084 if avwsadpi.DeferredDeleteTimeInUTC != nil {
5085 objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC
5086 }
5087 if avwsadpi.IsScheduledForDeferredDelete != nil {
5088 objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete
5089 }
5090 if avwsadpi.DeferredDeleteTimeRemaining != nil {
5091 objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining
5092 }
5093 if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil {
5094 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming
5095 }
5096 if avwsadpi.IsRehydrate != nil {
5097 objectMap["isRehydrate"] = avwsadpi.IsRehydrate
5098 }
5099 if avwsadpi.ProtectedItemType != "" {
5100 objectMap["protectedItemType"] = avwsadpi.ProtectedItemType
5101 }
5102 return json.Marshal(objectMap)
5103 }
5104
5105
5106 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5107 return nil, false
5108 }
5109
5110
5111 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5112 return nil, false
5113 }
5114
5115
5116 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5117 return nil, false
5118 }
5119
5120
5121 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5122 return nil, false
5123 }
5124
5125
5126 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5127 return nil, false
5128 }
5129
5130
5131 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5132 return nil, false
5133 }
5134
5135
5136 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5137 return nil, false
5138 }
5139
5140
5141 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5142 return &avwsadpi, true
5143 }
5144
5145
5146 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5147 return &avwsadpi, true
5148 }
5149
5150
5151 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5152 return nil, false
5153 }
5154
5155
5156 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5157 return nil, false
5158 }
5159
5160
5161 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5162 return nil, false
5163 }
5164
5165
5166 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5167 return nil, false
5168 }
5169
5170
5171 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5172 return nil, false
5173 }
5174
5175
5176 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5177 return nil, false
5178 }
5179
5180
5181 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5182 return &avwsadpi, true
5183 }
5184
5185
5186
5187 type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct {
5188
5189 ParentName *string `json:"parentName,omitempty"`
5190
5191 ServerName *string `json:"serverName,omitempty"`
5192
5193 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5194
5195 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5196
5197 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5198
5199 BackupManagementType *string `json:"backupManagementType,omitempty"`
5200
5201 WorkloadType *string `json:"workloadType,omitempty"`
5202
5203 FriendlyName *string `json:"friendlyName,omitempty"`
5204
5205 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5206
5207 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5208 }
5209
5210
5211 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
5212 avwsadwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase
5213 objectMap := make(map[string]interface{})
5214 if avwsadwi.ParentName != nil {
5215 objectMap["parentName"] = avwsadwi.ParentName
5216 }
5217 if avwsadwi.ServerName != nil {
5218 objectMap["serverName"] = avwsadwi.ServerName
5219 }
5220 if avwsadwi.IsAutoProtectable != nil {
5221 objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable
5222 }
5223 if avwsadwi.Subinquireditemcount != nil {
5224 objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount
5225 }
5226 if avwsadwi.SubWorkloadItemCount != nil {
5227 objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount
5228 }
5229 if avwsadwi.BackupManagementType != nil {
5230 objectMap["backupManagementType"] = avwsadwi.BackupManagementType
5231 }
5232 if avwsadwi.WorkloadType != nil {
5233 objectMap["workloadType"] = avwsadwi.WorkloadType
5234 }
5235 if avwsadwi.FriendlyName != nil {
5236 objectMap["friendlyName"] = avwsadwi.FriendlyName
5237 }
5238 if avwsadwi.ProtectionState != "" {
5239 objectMap["protectionState"] = avwsadwi.ProtectionState
5240 }
5241 if avwsadwi.WorkloadItemType != "" {
5242 objectMap["workloadItemType"] = avwsadwi.WorkloadItemType
5243 }
5244 return json.Marshal(objectMap)
5245 }
5246
5247
5248 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5249 return nil, false
5250 }
5251
5252
5253 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5254 return &avwsadwi, true
5255 }
5256
5257
5258 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5259 return &avwsadwi, true
5260 }
5261
5262
5263 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5264 return nil, false
5265 }
5266
5267
5268 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5269 return nil, false
5270 }
5271
5272
5273 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5274 return nil, false
5275 }
5276
5277
5278 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5279 return nil, false
5280 }
5281
5282
5283 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5284 return nil, false
5285 }
5286
5287
5288 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5289 return nil, false
5290 }
5291
5292
5293 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5294 return &avwsadwi, true
5295 }
5296
5297
5298
5299 type AzureVMWorkloadSAPAseSystemProtectableItem struct {
5300
5301 ParentName *string `json:"parentName,omitempty"`
5302
5303
5304 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5305
5306 ServerName *string `json:"serverName,omitempty"`
5307
5308 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5309
5310 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5311
5312 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5313
5314 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5315
5316 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5317
5318 BackupManagementType *string `json:"backupManagementType,omitempty"`
5319
5320 WorkloadType *string `json:"workloadType,omitempty"`
5321
5322 FriendlyName *string `json:"friendlyName,omitempty"`
5323
5324 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5325
5326 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5327 }
5328
5329
5330 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) {
5331 avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem
5332 objectMap := make(map[string]interface{})
5333 if avwsaspi.ParentName != nil {
5334 objectMap["parentName"] = avwsaspi.ParentName
5335 }
5336 if avwsaspi.ParentUniqueName != nil {
5337 objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName
5338 }
5339 if avwsaspi.ServerName != nil {
5340 objectMap["serverName"] = avwsaspi.ServerName
5341 }
5342 if avwsaspi.IsAutoProtectable != nil {
5343 objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable
5344 }
5345 if avwsaspi.IsAutoProtected != nil {
5346 objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected
5347 }
5348 if avwsaspi.Subinquireditemcount != nil {
5349 objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount
5350 }
5351 if avwsaspi.Subprotectableitemcount != nil {
5352 objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount
5353 }
5354 if avwsaspi.Prebackupvalidation != nil {
5355 objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation
5356 }
5357 if avwsaspi.BackupManagementType != nil {
5358 objectMap["backupManagementType"] = avwsaspi.BackupManagementType
5359 }
5360 if avwsaspi.WorkloadType != nil {
5361 objectMap["workloadType"] = avwsaspi.WorkloadType
5362 }
5363 if avwsaspi.FriendlyName != nil {
5364 objectMap["friendlyName"] = avwsaspi.FriendlyName
5365 }
5366 if avwsaspi.ProtectionState != "" {
5367 objectMap["protectionState"] = avwsaspi.ProtectionState
5368 }
5369 if avwsaspi.ProtectableItemType != "" {
5370 objectMap["protectableItemType"] = avwsaspi.ProtectableItemType
5371 }
5372 return json.Marshal(objectMap)
5373 }
5374
5375
5376 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5377 return nil, false
5378 }
5379
5380
5381 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5382 return nil, false
5383 }
5384
5385
5386 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5387 return nil, false
5388 }
5389
5390
5391 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5392 return nil, false
5393 }
5394
5395
5396 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5397 return &avwsaspi, true
5398 }
5399
5400
5401 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5402 return &avwsaspi, true
5403 }
5404
5405
5406 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5407 return nil, false
5408 }
5409
5410
5411 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5412 return nil, false
5413 }
5414
5415
5416 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5417 return nil, false
5418 }
5419
5420
5421 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5422 return nil, false
5423 }
5424
5425
5426 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5427 return nil, false
5428 }
5429
5430
5431 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5432 return nil, false
5433 }
5434
5435
5436 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5437 return nil, false
5438 }
5439
5440
5441 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5442 return nil, false
5443 }
5444
5445
5446 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5447 return &avwsaspi, true
5448 }
5449
5450
5451
5452 type AzureVMWorkloadSAPAseSystemWorkloadItem struct {
5453
5454 ParentName *string `json:"parentName,omitempty"`
5455
5456 ServerName *string `json:"serverName,omitempty"`
5457
5458 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5459
5460 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5461
5462 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5463
5464 BackupManagementType *string `json:"backupManagementType,omitempty"`
5465
5466 WorkloadType *string `json:"workloadType,omitempty"`
5467
5468 FriendlyName *string `json:"friendlyName,omitempty"`
5469
5470 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5471
5472 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5473 }
5474
5475
5476 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) {
5477 avwsaswi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem
5478 objectMap := make(map[string]interface{})
5479 if avwsaswi.ParentName != nil {
5480 objectMap["parentName"] = avwsaswi.ParentName
5481 }
5482 if avwsaswi.ServerName != nil {
5483 objectMap["serverName"] = avwsaswi.ServerName
5484 }
5485 if avwsaswi.IsAutoProtectable != nil {
5486 objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable
5487 }
5488 if avwsaswi.Subinquireditemcount != nil {
5489 objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount
5490 }
5491 if avwsaswi.SubWorkloadItemCount != nil {
5492 objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount
5493 }
5494 if avwsaswi.BackupManagementType != nil {
5495 objectMap["backupManagementType"] = avwsaswi.BackupManagementType
5496 }
5497 if avwsaswi.WorkloadType != nil {
5498 objectMap["workloadType"] = avwsaswi.WorkloadType
5499 }
5500 if avwsaswi.FriendlyName != nil {
5501 objectMap["friendlyName"] = avwsaswi.FriendlyName
5502 }
5503 if avwsaswi.ProtectionState != "" {
5504 objectMap["protectionState"] = avwsaswi.ProtectionState
5505 }
5506 if avwsaswi.WorkloadItemType != "" {
5507 objectMap["workloadItemType"] = avwsaswi.WorkloadItemType
5508 }
5509 return json.Marshal(objectMap)
5510 }
5511
5512
5513 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5514 return nil, false
5515 }
5516
5517
5518 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5519 return &avwsaswi, true
5520 }
5521
5522
5523 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5524 return nil, false
5525 }
5526
5527
5528 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5529 return &avwsaswi, true
5530 }
5531
5532
5533 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5534 return nil, false
5535 }
5536
5537
5538 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5539 return nil, false
5540 }
5541
5542
5543 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5544 return nil, false
5545 }
5546
5547
5548 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5549 return nil, false
5550 }
5551
5552
5553 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5554 return nil, false
5555 }
5556
5557
5558 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5559 return &avwsaswi, true
5560 }
5561
5562
5563
5564 type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct {
5565
5566 ParentName *string `json:"parentName,omitempty"`
5567
5568
5569 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5570
5571 ServerName *string `json:"serverName,omitempty"`
5572
5573 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5574
5575 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5576
5577 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5578
5579 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5580
5581 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5582
5583 BackupManagementType *string `json:"backupManagementType,omitempty"`
5584
5585 WorkloadType *string `json:"workloadType,omitempty"`
5586
5587 FriendlyName *string `json:"friendlyName,omitempty"`
5588
5589 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5590
5591 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5592 }
5593
5594
5595 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
5596 avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase
5597 objectMap := make(map[string]interface{})
5598 if avwshdpi.ParentName != nil {
5599 objectMap["parentName"] = avwshdpi.ParentName
5600 }
5601 if avwshdpi.ParentUniqueName != nil {
5602 objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName
5603 }
5604 if avwshdpi.ServerName != nil {
5605 objectMap["serverName"] = avwshdpi.ServerName
5606 }
5607 if avwshdpi.IsAutoProtectable != nil {
5608 objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable
5609 }
5610 if avwshdpi.IsAutoProtected != nil {
5611 objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected
5612 }
5613 if avwshdpi.Subinquireditemcount != nil {
5614 objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount
5615 }
5616 if avwshdpi.Subprotectableitemcount != nil {
5617 objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount
5618 }
5619 if avwshdpi.Prebackupvalidation != nil {
5620 objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation
5621 }
5622 if avwshdpi.BackupManagementType != nil {
5623 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
5624 }
5625 if avwshdpi.WorkloadType != nil {
5626 objectMap["workloadType"] = avwshdpi.WorkloadType
5627 }
5628 if avwshdpi.FriendlyName != nil {
5629 objectMap["friendlyName"] = avwshdpi.FriendlyName
5630 }
5631 if avwshdpi.ProtectionState != "" {
5632 objectMap["protectionState"] = avwshdpi.ProtectionState
5633 }
5634 if avwshdpi.ProtectableItemType != "" {
5635 objectMap["protectableItemType"] = avwshdpi.ProtectableItemType
5636 }
5637 return json.Marshal(objectMap)
5638 }
5639
5640
5641 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5642 return nil, false
5643 }
5644
5645
5646 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5647 return nil, false
5648 }
5649
5650
5651 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5652 return nil, false
5653 }
5654
5655
5656 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5657 return nil, false
5658 }
5659
5660
5661 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5662 return &avwshdpi, true
5663 }
5664
5665
5666 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5667 return nil, false
5668 }
5669
5670
5671 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5672 return &avwshdpi, true
5673 }
5674
5675
5676 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5677 return nil, false
5678 }
5679
5680
5681 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5682 return nil, false
5683 }
5684
5685
5686 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5687 return nil, false
5688 }
5689
5690
5691 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5692 return nil, false
5693 }
5694
5695
5696 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5697 return nil, false
5698 }
5699
5700
5701 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5702 return nil, false
5703 }
5704
5705
5706 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5707 return nil, false
5708 }
5709
5710
5711 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5712 return &avwshdpi, true
5713 }
5714
5715
5716
5717 type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct {
5718
5719 FriendlyName *string `json:"friendlyName,omitempty"`
5720
5721 ServerName *string `json:"serverName,omitempty"`
5722
5723 ParentName *string `json:"parentName,omitempty"`
5724
5725 ParentType *string `json:"parentType,omitempty"`
5726
5727 ProtectionStatus *string `json:"protectionStatus,omitempty"`
5728
5729 ProtectionState ProtectionState `json:"protectionState,omitempty"`
5730
5731 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
5732
5733 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
5734
5735 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
5736
5737 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
5738
5739 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
5740
5741 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
5742
5743 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
5744
5745 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
5746
5747 WorkloadType DataSourceType `json:"workloadType,omitempty"`
5748
5749 ContainerName *string `json:"containerName,omitempty"`
5750
5751 SourceResourceID *string `json:"sourceResourceId,omitempty"`
5752
5753 PolicyID *string `json:"policyId,omitempty"`
5754
5755 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
5756
5757 BackupSetName *string `json:"backupSetName,omitempty"`
5758
5759 CreateMode CreateMode `json:"createMode,omitempty"`
5760
5761 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
5762
5763 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
5764
5765 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
5766
5767 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
5768
5769 IsRehydrate *bool `json:"isRehydrate,omitempty"`
5770
5771 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
5772 }
5773
5774
5775 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
5776 avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase
5777 objectMap := make(map[string]interface{})
5778 if avwshdpi.FriendlyName != nil {
5779 objectMap["friendlyName"] = avwshdpi.FriendlyName
5780 }
5781 if avwshdpi.ServerName != nil {
5782 objectMap["serverName"] = avwshdpi.ServerName
5783 }
5784 if avwshdpi.ParentName != nil {
5785 objectMap["parentName"] = avwshdpi.ParentName
5786 }
5787 if avwshdpi.ParentType != nil {
5788 objectMap["parentType"] = avwshdpi.ParentType
5789 }
5790 if avwshdpi.ProtectionStatus != nil {
5791 objectMap["protectionStatus"] = avwshdpi.ProtectionStatus
5792 }
5793 if avwshdpi.ProtectionState != "" {
5794 objectMap["protectionState"] = avwshdpi.ProtectionState
5795 }
5796 if avwshdpi.LastBackupStatus != "" {
5797 objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus
5798 }
5799 if avwshdpi.LastBackupTime != nil {
5800 objectMap["lastBackupTime"] = avwshdpi.LastBackupTime
5801 }
5802 if avwshdpi.LastBackupErrorDetail != nil {
5803 objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail
5804 }
5805 if avwshdpi.ProtectedItemDataSourceID != nil {
5806 objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID
5807 }
5808 if avwshdpi.ProtectedItemHealthStatus != "" {
5809 objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus
5810 }
5811 if avwshdpi.ExtendedInfo != nil {
5812 objectMap["extendedInfo"] = avwshdpi.ExtendedInfo
5813 }
5814 if avwshdpi.KpisHealths != nil {
5815 objectMap["kpisHealths"] = avwshdpi.KpisHealths
5816 }
5817 if avwshdpi.BackupManagementType != "" {
5818 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
5819 }
5820 if avwshdpi.WorkloadType != "" {
5821 objectMap["workloadType"] = avwshdpi.WorkloadType
5822 }
5823 if avwshdpi.ContainerName != nil {
5824 objectMap["containerName"] = avwshdpi.ContainerName
5825 }
5826 if avwshdpi.SourceResourceID != nil {
5827 objectMap["sourceResourceId"] = avwshdpi.SourceResourceID
5828 }
5829 if avwshdpi.PolicyID != nil {
5830 objectMap["policyId"] = avwshdpi.PolicyID
5831 }
5832 if avwshdpi.LastRecoveryPoint != nil {
5833 objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint
5834 }
5835 if avwshdpi.BackupSetName != nil {
5836 objectMap["backupSetName"] = avwshdpi.BackupSetName
5837 }
5838 if avwshdpi.CreateMode != "" {
5839 objectMap["createMode"] = avwshdpi.CreateMode
5840 }
5841 if avwshdpi.DeferredDeleteTimeInUTC != nil {
5842 objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC
5843 }
5844 if avwshdpi.IsScheduledForDeferredDelete != nil {
5845 objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete
5846 }
5847 if avwshdpi.DeferredDeleteTimeRemaining != nil {
5848 objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining
5849 }
5850 if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil {
5851 objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming
5852 }
5853 if avwshdpi.IsRehydrate != nil {
5854 objectMap["isRehydrate"] = avwshdpi.IsRehydrate
5855 }
5856 if avwshdpi.ProtectedItemType != "" {
5857 objectMap["protectedItemType"] = avwshdpi.ProtectedItemType
5858 }
5859 return json.Marshal(objectMap)
5860 }
5861
5862
5863 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5864 return nil, false
5865 }
5866
5867
5868 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5869 return nil, false
5870 }
5871
5872
5873 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5874 return nil, false
5875 }
5876
5877
5878 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5879 return nil, false
5880 }
5881
5882
5883 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5884 return nil, false
5885 }
5886
5887
5888 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5889 return nil, false
5890 }
5891
5892
5893 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5894 return nil, false
5895 }
5896
5897
5898 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5899 return &avwshdpi, true
5900 }
5901
5902
5903 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5904 return nil, false
5905 }
5906
5907
5908 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5909 return &avwshdpi, true
5910 }
5911
5912
5913 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5914 return nil, false
5915 }
5916
5917
5918 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5919 return nil, false
5920 }
5921
5922
5923 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5924 return nil, false
5925 }
5926
5927
5928 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5929 return nil, false
5930 }
5931
5932
5933 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5934 return nil, false
5935 }
5936
5937
5938 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5939 return &avwshdpi, true
5940 }
5941
5942
5943
5944 type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct {
5945
5946 ParentName *string `json:"parentName,omitempty"`
5947
5948 ServerName *string `json:"serverName,omitempty"`
5949
5950 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5951
5952 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5953
5954 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5955
5956 BackupManagementType *string `json:"backupManagementType,omitempty"`
5957
5958 WorkloadType *string `json:"workloadType,omitempty"`
5959
5960 FriendlyName *string `json:"friendlyName,omitempty"`
5961
5962 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5963
5964 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5965 }
5966
5967
5968 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
5969 avwshdwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase
5970 objectMap := make(map[string]interface{})
5971 if avwshdwi.ParentName != nil {
5972 objectMap["parentName"] = avwshdwi.ParentName
5973 }
5974 if avwshdwi.ServerName != nil {
5975 objectMap["serverName"] = avwshdwi.ServerName
5976 }
5977 if avwshdwi.IsAutoProtectable != nil {
5978 objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable
5979 }
5980 if avwshdwi.Subinquireditemcount != nil {
5981 objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount
5982 }
5983 if avwshdwi.SubWorkloadItemCount != nil {
5984 objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount
5985 }
5986 if avwshdwi.BackupManagementType != nil {
5987 objectMap["backupManagementType"] = avwshdwi.BackupManagementType
5988 }
5989 if avwshdwi.WorkloadType != nil {
5990 objectMap["workloadType"] = avwshdwi.WorkloadType
5991 }
5992 if avwshdwi.FriendlyName != nil {
5993 objectMap["friendlyName"] = avwshdwi.FriendlyName
5994 }
5995 if avwshdwi.ProtectionState != "" {
5996 objectMap["protectionState"] = avwshdwi.ProtectionState
5997 }
5998 if avwshdwi.WorkloadItemType != "" {
5999 objectMap["workloadItemType"] = avwshdwi.WorkloadItemType
6000 }
6001 return json.Marshal(objectMap)
6002 }
6003
6004
6005 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6006 return nil, false
6007 }
6008
6009
6010 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6011 return &avwshdwi, true
6012 }
6013
6014
6015 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6016 return nil, false
6017 }
6018
6019
6020 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6021 return nil, false
6022 }
6023
6024
6025 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6026 return &avwshdwi, true
6027 }
6028
6029
6030 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6031 return nil, false
6032 }
6033
6034
6035 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6036 return nil, false
6037 }
6038
6039
6040 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6041 return nil, false
6042 }
6043
6044
6045 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6046 return nil, false
6047 }
6048
6049
6050 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6051 return &avwshdwi, true
6052 }
6053
6054
6055
6056 type AzureVMWorkloadSAPHanaSystemProtectableItem struct {
6057
6058 ParentName *string `json:"parentName,omitempty"`
6059
6060
6061 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6062
6063 ServerName *string `json:"serverName,omitempty"`
6064
6065 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6066
6067 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6068
6069 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6070
6071 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6072
6073 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6074
6075 BackupManagementType *string `json:"backupManagementType,omitempty"`
6076
6077 WorkloadType *string `json:"workloadType,omitempty"`
6078
6079 FriendlyName *string `json:"friendlyName,omitempty"`
6080
6081 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6082
6083 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6084 }
6085
6086
6087 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) {
6088 avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem
6089 objectMap := make(map[string]interface{})
6090 if avwshspi.ParentName != nil {
6091 objectMap["parentName"] = avwshspi.ParentName
6092 }
6093 if avwshspi.ParentUniqueName != nil {
6094 objectMap["parentUniqueName"] = avwshspi.ParentUniqueName
6095 }
6096 if avwshspi.ServerName != nil {
6097 objectMap["serverName"] = avwshspi.ServerName
6098 }
6099 if avwshspi.IsAutoProtectable != nil {
6100 objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable
6101 }
6102 if avwshspi.IsAutoProtected != nil {
6103 objectMap["isAutoProtected"] = avwshspi.IsAutoProtected
6104 }
6105 if avwshspi.Subinquireditemcount != nil {
6106 objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount
6107 }
6108 if avwshspi.Subprotectableitemcount != nil {
6109 objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount
6110 }
6111 if avwshspi.Prebackupvalidation != nil {
6112 objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation
6113 }
6114 if avwshspi.BackupManagementType != nil {
6115 objectMap["backupManagementType"] = avwshspi.BackupManagementType
6116 }
6117 if avwshspi.WorkloadType != nil {
6118 objectMap["workloadType"] = avwshspi.WorkloadType
6119 }
6120 if avwshspi.FriendlyName != nil {
6121 objectMap["friendlyName"] = avwshspi.FriendlyName
6122 }
6123 if avwshspi.ProtectionState != "" {
6124 objectMap["protectionState"] = avwshspi.ProtectionState
6125 }
6126 if avwshspi.ProtectableItemType != "" {
6127 objectMap["protectableItemType"] = avwshspi.ProtectableItemType
6128 }
6129 return json.Marshal(objectMap)
6130 }
6131
6132
6133 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6134 return nil, false
6135 }
6136
6137
6138 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6139 return nil, false
6140 }
6141
6142
6143 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6144 return nil, false
6145 }
6146
6147
6148 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6149 return nil, false
6150 }
6151
6152
6153 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6154 return &avwshspi, true
6155 }
6156
6157
6158 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6159 return nil, false
6160 }
6161
6162
6163 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6164 return nil, false
6165 }
6166
6167
6168 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6169 return &avwshspi, true
6170 }
6171
6172
6173 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6174 return nil, false
6175 }
6176
6177
6178 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6179 return nil, false
6180 }
6181
6182
6183 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6184 return nil, false
6185 }
6186
6187
6188 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6189 return nil, false
6190 }
6191
6192
6193 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6194 return nil, false
6195 }
6196
6197
6198 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6199 return nil, false
6200 }
6201
6202
6203 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6204 return &avwshspi, true
6205 }
6206
6207
6208
6209 type AzureVMWorkloadSAPHanaSystemWorkloadItem struct {
6210
6211 ParentName *string `json:"parentName,omitempty"`
6212
6213 ServerName *string `json:"serverName,omitempty"`
6214
6215 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6216
6217 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6218
6219 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6220
6221 BackupManagementType *string `json:"backupManagementType,omitempty"`
6222
6223 WorkloadType *string `json:"workloadType,omitempty"`
6224
6225 FriendlyName *string `json:"friendlyName,omitempty"`
6226
6227 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6228
6229 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6230 }
6231
6232
6233 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) {
6234 avwshswi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem
6235 objectMap := make(map[string]interface{})
6236 if avwshswi.ParentName != nil {
6237 objectMap["parentName"] = avwshswi.ParentName
6238 }
6239 if avwshswi.ServerName != nil {
6240 objectMap["serverName"] = avwshswi.ServerName
6241 }
6242 if avwshswi.IsAutoProtectable != nil {
6243 objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable
6244 }
6245 if avwshswi.Subinquireditemcount != nil {
6246 objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount
6247 }
6248 if avwshswi.SubWorkloadItemCount != nil {
6249 objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount
6250 }
6251 if avwshswi.BackupManagementType != nil {
6252 objectMap["backupManagementType"] = avwshswi.BackupManagementType
6253 }
6254 if avwshswi.WorkloadType != nil {
6255 objectMap["workloadType"] = avwshswi.WorkloadType
6256 }
6257 if avwshswi.FriendlyName != nil {
6258 objectMap["friendlyName"] = avwshswi.FriendlyName
6259 }
6260 if avwshswi.ProtectionState != "" {
6261 objectMap["protectionState"] = avwshswi.ProtectionState
6262 }
6263 if avwshswi.WorkloadItemType != "" {
6264 objectMap["workloadItemType"] = avwshswi.WorkloadItemType
6265 }
6266 return json.Marshal(objectMap)
6267 }
6268
6269
6270 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6271 return nil, false
6272 }
6273
6274
6275 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6276 return &avwshswi, true
6277 }
6278
6279
6280 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6281 return nil, false
6282 }
6283
6284
6285 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6286 return nil, false
6287 }
6288
6289
6290 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6291 return nil, false
6292 }
6293
6294
6295 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6296 return &avwshswi, true
6297 }
6298
6299
6300 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6301 return nil, false
6302 }
6303
6304
6305 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6306 return nil, false
6307 }
6308
6309
6310 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6311 return nil, false
6312 }
6313
6314
6315 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6316 return &avwshswi, true
6317 }
6318
6319
6320
6321 type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct {
6322
6323 ParentName *string `json:"parentName,omitempty"`
6324
6325
6326 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6327
6328 ServerName *string `json:"serverName,omitempty"`
6329
6330 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6331
6332 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6333
6334 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6335
6336 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6337
6338 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6339
6340 BackupManagementType *string `json:"backupManagementType,omitempty"`
6341
6342 WorkloadType *string `json:"workloadType,omitempty"`
6343
6344 FriendlyName *string `json:"friendlyName,omitempty"`
6345
6346 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6347
6348 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6349 }
6350
6351
6352 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) {
6353 avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer
6354 objectMap := make(map[string]interface{})
6355 if avwsagpi.ParentName != nil {
6356 objectMap["parentName"] = avwsagpi.ParentName
6357 }
6358 if avwsagpi.ParentUniqueName != nil {
6359 objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName
6360 }
6361 if avwsagpi.ServerName != nil {
6362 objectMap["serverName"] = avwsagpi.ServerName
6363 }
6364 if avwsagpi.IsAutoProtectable != nil {
6365 objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable
6366 }
6367 if avwsagpi.IsAutoProtected != nil {
6368 objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected
6369 }
6370 if avwsagpi.Subinquireditemcount != nil {
6371 objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount
6372 }
6373 if avwsagpi.Subprotectableitemcount != nil {
6374 objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount
6375 }
6376 if avwsagpi.Prebackupvalidation != nil {
6377 objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation
6378 }
6379 if avwsagpi.BackupManagementType != nil {
6380 objectMap["backupManagementType"] = avwsagpi.BackupManagementType
6381 }
6382 if avwsagpi.WorkloadType != nil {
6383 objectMap["workloadType"] = avwsagpi.WorkloadType
6384 }
6385 if avwsagpi.FriendlyName != nil {
6386 objectMap["friendlyName"] = avwsagpi.FriendlyName
6387 }
6388 if avwsagpi.ProtectionState != "" {
6389 objectMap["protectionState"] = avwsagpi.ProtectionState
6390 }
6391 if avwsagpi.ProtectableItemType != "" {
6392 objectMap["protectableItemType"] = avwsagpi.ProtectableItemType
6393 }
6394 return json.Marshal(objectMap)
6395 }
6396
6397
6398 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6399 return nil, false
6400 }
6401
6402
6403 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6404 return nil, false
6405 }
6406
6407
6408 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6409 return nil, false
6410 }
6411
6412
6413 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6414 return nil, false
6415 }
6416
6417
6418 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6419 return &avwsagpi, true
6420 }
6421
6422
6423 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6424 return nil, false
6425 }
6426
6427
6428 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6429 return nil, false
6430 }
6431
6432
6433 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6434 return nil, false
6435 }
6436
6437
6438 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6439 return &avwsagpi, true
6440 }
6441
6442
6443 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6444 return nil, false
6445 }
6446
6447
6448 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6449 return nil, false
6450 }
6451
6452
6453 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6454 return nil, false
6455 }
6456
6457
6458 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6459 return nil, false
6460 }
6461
6462
6463 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6464 return nil, false
6465 }
6466
6467
6468 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6469 return &avwsagpi, true
6470 }
6471
6472
6473
6474 type AzureVMWorkloadSQLDatabaseProtectableItem struct {
6475
6476 ParentName *string `json:"parentName,omitempty"`
6477
6478
6479 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6480
6481 ServerName *string `json:"serverName,omitempty"`
6482
6483 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6484
6485 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6486
6487 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6488
6489 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6490
6491 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6492
6493 BackupManagementType *string `json:"backupManagementType,omitempty"`
6494
6495 WorkloadType *string `json:"workloadType,omitempty"`
6496
6497 FriendlyName *string `json:"friendlyName,omitempty"`
6498
6499 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6500
6501 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6502 }
6503
6504
6505 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
6506 avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase
6507 objectMap := make(map[string]interface{})
6508 if avwsdpi.ParentName != nil {
6509 objectMap["parentName"] = avwsdpi.ParentName
6510 }
6511 if avwsdpi.ParentUniqueName != nil {
6512 objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName
6513 }
6514 if avwsdpi.ServerName != nil {
6515 objectMap["serverName"] = avwsdpi.ServerName
6516 }
6517 if avwsdpi.IsAutoProtectable != nil {
6518 objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable
6519 }
6520 if avwsdpi.IsAutoProtected != nil {
6521 objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected
6522 }
6523 if avwsdpi.Subinquireditemcount != nil {
6524 objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount
6525 }
6526 if avwsdpi.Subprotectableitemcount != nil {
6527 objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount
6528 }
6529 if avwsdpi.Prebackupvalidation != nil {
6530 objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation
6531 }
6532 if avwsdpi.BackupManagementType != nil {
6533 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6534 }
6535 if avwsdpi.WorkloadType != nil {
6536 objectMap["workloadType"] = avwsdpi.WorkloadType
6537 }
6538 if avwsdpi.FriendlyName != nil {
6539 objectMap["friendlyName"] = avwsdpi.FriendlyName
6540 }
6541 if avwsdpi.ProtectionState != "" {
6542 objectMap["protectionState"] = avwsdpi.ProtectionState
6543 }
6544 if avwsdpi.ProtectableItemType != "" {
6545 objectMap["protectableItemType"] = avwsdpi.ProtectableItemType
6546 }
6547 return json.Marshal(objectMap)
6548 }
6549
6550
6551 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6552 return nil, false
6553 }
6554
6555
6556 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6557 return nil, false
6558 }
6559
6560
6561 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6562 return nil, false
6563 }
6564
6565
6566 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6567 return nil, false
6568 }
6569
6570
6571 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6572 return &avwsdpi, true
6573 }
6574
6575
6576 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6577 return nil, false
6578 }
6579
6580
6581 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6582 return nil, false
6583 }
6584
6585
6586 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6587 return nil, false
6588 }
6589
6590
6591 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6592 return nil, false
6593 }
6594
6595
6596 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6597 return &avwsdpi, true
6598 }
6599
6600
6601 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6602 return nil, false
6603 }
6604
6605
6606 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6607 return nil, false
6608 }
6609
6610
6611 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6612 return nil, false
6613 }
6614
6615
6616 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6617 return nil, false
6618 }
6619
6620
6621 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6622 return &avwsdpi, true
6623 }
6624
6625
6626
6627 type AzureVMWorkloadSQLDatabaseProtectedItem struct {
6628
6629 FriendlyName *string `json:"friendlyName,omitempty"`
6630
6631 ServerName *string `json:"serverName,omitempty"`
6632
6633 ParentName *string `json:"parentName,omitempty"`
6634
6635 ParentType *string `json:"parentType,omitempty"`
6636
6637 ProtectionStatus *string `json:"protectionStatus,omitempty"`
6638
6639 ProtectionState ProtectionState `json:"protectionState,omitempty"`
6640
6641 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
6642
6643 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
6644
6645 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
6646
6647 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
6648
6649 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
6650
6651 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
6652
6653 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
6654
6655 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
6656
6657 WorkloadType DataSourceType `json:"workloadType,omitempty"`
6658
6659 ContainerName *string `json:"containerName,omitempty"`
6660
6661 SourceResourceID *string `json:"sourceResourceId,omitempty"`
6662
6663 PolicyID *string `json:"policyId,omitempty"`
6664
6665 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
6666
6667 BackupSetName *string `json:"backupSetName,omitempty"`
6668
6669 CreateMode CreateMode `json:"createMode,omitempty"`
6670
6671 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
6672
6673 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
6674
6675 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
6676
6677 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
6678
6679 IsRehydrate *bool `json:"isRehydrate,omitempty"`
6680
6681 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
6682 }
6683
6684
6685 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
6686 avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase
6687 objectMap := make(map[string]interface{})
6688 if avwsdpi.FriendlyName != nil {
6689 objectMap["friendlyName"] = avwsdpi.FriendlyName
6690 }
6691 if avwsdpi.ServerName != nil {
6692 objectMap["serverName"] = avwsdpi.ServerName
6693 }
6694 if avwsdpi.ParentName != nil {
6695 objectMap["parentName"] = avwsdpi.ParentName
6696 }
6697 if avwsdpi.ParentType != nil {
6698 objectMap["parentType"] = avwsdpi.ParentType
6699 }
6700 if avwsdpi.ProtectionStatus != nil {
6701 objectMap["protectionStatus"] = avwsdpi.ProtectionStatus
6702 }
6703 if avwsdpi.ProtectionState != "" {
6704 objectMap["protectionState"] = avwsdpi.ProtectionState
6705 }
6706 if avwsdpi.LastBackupStatus != "" {
6707 objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus
6708 }
6709 if avwsdpi.LastBackupTime != nil {
6710 objectMap["lastBackupTime"] = avwsdpi.LastBackupTime
6711 }
6712 if avwsdpi.LastBackupErrorDetail != nil {
6713 objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail
6714 }
6715 if avwsdpi.ProtectedItemDataSourceID != nil {
6716 objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID
6717 }
6718 if avwsdpi.ProtectedItemHealthStatus != "" {
6719 objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus
6720 }
6721 if avwsdpi.ExtendedInfo != nil {
6722 objectMap["extendedInfo"] = avwsdpi.ExtendedInfo
6723 }
6724 if avwsdpi.KpisHealths != nil {
6725 objectMap["kpisHealths"] = avwsdpi.KpisHealths
6726 }
6727 if avwsdpi.BackupManagementType != "" {
6728 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6729 }
6730 if avwsdpi.WorkloadType != "" {
6731 objectMap["workloadType"] = avwsdpi.WorkloadType
6732 }
6733 if avwsdpi.ContainerName != nil {
6734 objectMap["containerName"] = avwsdpi.ContainerName
6735 }
6736 if avwsdpi.SourceResourceID != nil {
6737 objectMap["sourceResourceId"] = avwsdpi.SourceResourceID
6738 }
6739 if avwsdpi.PolicyID != nil {
6740 objectMap["policyId"] = avwsdpi.PolicyID
6741 }
6742 if avwsdpi.LastRecoveryPoint != nil {
6743 objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint
6744 }
6745 if avwsdpi.BackupSetName != nil {
6746 objectMap["backupSetName"] = avwsdpi.BackupSetName
6747 }
6748 if avwsdpi.CreateMode != "" {
6749 objectMap["createMode"] = avwsdpi.CreateMode
6750 }
6751 if avwsdpi.DeferredDeleteTimeInUTC != nil {
6752 objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC
6753 }
6754 if avwsdpi.IsScheduledForDeferredDelete != nil {
6755 objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete
6756 }
6757 if avwsdpi.DeferredDeleteTimeRemaining != nil {
6758 objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining
6759 }
6760 if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil {
6761 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming
6762 }
6763 if avwsdpi.IsRehydrate != nil {
6764 objectMap["isRehydrate"] = avwsdpi.IsRehydrate
6765 }
6766 if avwsdpi.ProtectedItemType != "" {
6767 objectMap["protectedItemType"] = avwsdpi.ProtectedItemType
6768 }
6769 return json.Marshal(objectMap)
6770 }
6771
6772
6773 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
6774 return nil, false
6775 }
6776
6777
6778 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
6779 return nil, false
6780 }
6781
6782
6783 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
6784 return nil, false
6785 }
6786
6787
6788 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
6789 return nil, false
6790 }
6791
6792
6793 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
6794 return nil, false
6795 }
6796
6797
6798 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
6799 return nil, false
6800 }
6801
6802
6803 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
6804 return nil, false
6805 }
6806
6807
6808 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
6809 return &avwsdpi, true
6810 }
6811
6812
6813 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
6814 return nil, false
6815 }
6816
6817
6818 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
6819 return nil, false
6820 }
6821
6822
6823 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
6824 return &avwsdpi, true
6825 }
6826
6827
6828 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
6829 return nil, false
6830 }
6831
6832
6833 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
6834 return nil, false
6835 }
6836
6837
6838 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
6839 return nil, false
6840 }
6841
6842
6843 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
6844 return nil, false
6845 }
6846
6847
6848 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
6849 return &avwsdpi, true
6850 }
6851
6852
6853
6854 type AzureVMWorkloadSQLDatabaseWorkloadItem struct {
6855
6856 ParentName *string `json:"parentName,omitempty"`
6857
6858 ServerName *string `json:"serverName,omitempty"`
6859
6860 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6861
6862 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6863
6864 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6865
6866 BackupManagementType *string `json:"backupManagementType,omitempty"`
6867
6868 WorkloadType *string `json:"workloadType,omitempty"`
6869
6870 FriendlyName *string `json:"friendlyName,omitempty"`
6871
6872 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6873
6874 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6875 }
6876
6877
6878 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
6879 avwsdwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase
6880 objectMap := make(map[string]interface{})
6881 if avwsdwi.ParentName != nil {
6882 objectMap["parentName"] = avwsdwi.ParentName
6883 }
6884 if avwsdwi.ServerName != nil {
6885 objectMap["serverName"] = avwsdwi.ServerName
6886 }
6887 if avwsdwi.IsAutoProtectable != nil {
6888 objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable
6889 }
6890 if avwsdwi.Subinquireditemcount != nil {
6891 objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount
6892 }
6893 if avwsdwi.SubWorkloadItemCount != nil {
6894 objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount
6895 }
6896 if avwsdwi.BackupManagementType != nil {
6897 objectMap["backupManagementType"] = avwsdwi.BackupManagementType
6898 }
6899 if avwsdwi.WorkloadType != nil {
6900 objectMap["workloadType"] = avwsdwi.WorkloadType
6901 }
6902 if avwsdwi.FriendlyName != nil {
6903 objectMap["friendlyName"] = avwsdwi.FriendlyName
6904 }
6905 if avwsdwi.ProtectionState != "" {
6906 objectMap["protectionState"] = avwsdwi.ProtectionState
6907 }
6908 if avwsdwi.WorkloadItemType != "" {
6909 objectMap["workloadItemType"] = avwsdwi.WorkloadItemType
6910 }
6911 return json.Marshal(objectMap)
6912 }
6913
6914
6915 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6916 return nil, false
6917 }
6918
6919
6920 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6921 return &avwsdwi, true
6922 }
6923
6924
6925 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6926 return nil, false
6927 }
6928
6929
6930 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6931 return nil, false
6932 }
6933
6934
6935 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6936 return nil, false
6937 }
6938
6939
6940 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6941 return nil, false
6942 }
6943
6944
6945 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6946 return &avwsdwi, true
6947 }
6948
6949
6950 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6951 return nil, false
6952 }
6953
6954
6955 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6956 return nil, false
6957 }
6958
6959
6960 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6961 return &avwsdwi, true
6962 }
6963
6964
6965
6966 type AzureVMWorkloadSQLInstanceProtectableItem struct {
6967
6968 ParentName *string `json:"parentName,omitempty"`
6969
6970
6971 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6972
6973 ServerName *string `json:"serverName,omitempty"`
6974
6975 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6976
6977 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6978
6979 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6980
6981 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6982
6983 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6984
6985 BackupManagementType *string `json:"backupManagementType,omitempty"`
6986
6987 WorkloadType *string `json:"workloadType,omitempty"`
6988
6989 FriendlyName *string `json:"friendlyName,omitempty"`
6990
6991 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6992
6993 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6994 }
6995
6996
6997 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) {
6998 avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance
6999 objectMap := make(map[string]interface{})
7000 if avwsipi.ParentName != nil {
7001 objectMap["parentName"] = avwsipi.ParentName
7002 }
7003 if avwsipi.ParentUniqueName != nil {
7004 objectMap["parentUniqueName"] = avwsipi.ParentUniqueName
7005 }
7006 if avwsipi.ServerName != nil {
7007 objectMap["serverName"] = avwsipi.ServerName
7008 }
7009 if avwsipi.IsAutoProtectable != nil {
7010 objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable
7011 }
7012 if avwsipi.IsAutoProtected != nil {
7013 objectMap["isAutoProtected"] = avwsipi.IsAutoProtected
7014 }
7015 if avwsipi.Subinquireditemcount != nil {
7016 objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount
7017 }
7018 if avwsipi.Subprotectableitemcount != nil {
7019 objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount
7020 }
7021 if avwsipi.Prebackupvalidation != nil {
7022 objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation
7023 }
7024 if avwsipi.BackupManagementType != nil {
7025 objectMap["backupManagementType"] = avwsipi.BackupManagementType
7026 }
7027 if avwsipi.WorkloadType != nil {
7028 objectMap["workloadType"] = avwsipi.WorkloadType
7029 }
7030 if avwsipi.FriendlyName != nil {
7031 objectMap["friendlyName"] = avwsipi.FriendlyName
7032 }
7033 if avwsipi.ProtectionState != "" {
7034 objectMap["protectionState"] = avwsipi.ProtectionState
7035 }
7036 if avwsipi.ProtectableItemType != "" {
7037 objectMap["protectableItemType"] = avwsipi.ProtectableItemType
7038 }
7039 return json.Marshal(objectMap)
7040 }
7041
7042
7043 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
7044 return nil, false
7045 }
7046
7047
7048 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
7049 return nil, false
7050 }
7051
7052
7053 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
7054 return nil, false
7055 }
7056
7057
7058 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
7059 return nil, false
7060 }
7061
7062
7063 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
7064 return &avwsipi, true
7065 }
7066
7067
7068 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
7069 return nil, false
7070 }
7071
7072
7073 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
7074 return nil, false
7075 }
7076
7077
7078 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
7079 return nil, false
7080 }
7081
7082
7083 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
7084 return nil, false
7085 }
7086
7087
7088 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
7089 return nil, false
7090 }
7091
7092
7093 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
7094 return &avwsipi, true
7095 }
7096
7097
7098 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
7099 return nil, false
7100 }
7101
7102
7103 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
7104 return nil, false
7105 }
7106
7107
7108 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
7109 return nil, false
7110 }
7111
7112
7113 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
7114 return &avwsipi, true
7115 }
7116
7117
7118
7119 type AzureVMWorkloadSQLInstanceWorkloadItem struct {
7120
7121 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
7122
7123 ParentName *string `json:"parentName,omitempty"`
7124
7125 ServerName *string `json:"serverName,omitempty"`
7126
7127 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
7128
7129 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
7130
7131 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
7132
7133 BackupManagementType *string `json:"backupManagementType,omitempty"`
7134
7135 WorkloadType *string `json:"workloadType,omitempty"`
7136
7137 FriendlyName *string `json:"friendlyName,omitempty"`
7138
7139 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7140
7141 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
7142 }
7143
7144
7145 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) {
7146 avwsiwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance
7147 objectMap := make(map[string]interface{})
7148 if avwsiwi.DataDirectoryPaths != nil {
7149 objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths
7150 }
7151 if avwsiwi.ParentName != nil {
7152 objectMap["parentName"] = avwsiwi.ParentName
7153 }
7154 if avwsiwi.ServerName != nil {
7155 objectMap["serverName"] = avwsiwi.ServerName
7156 }
7157 if avwsiwi.IsAutoProtectable != nil {
7158 objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable
7159 }
7160 if avwsiwi.Subinquireditemcount != nil {
7161 objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount
7162 }
7163 if avwsiwi.SubWorkloadItemCount != nil {
7164 objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount
7165 }
7166 if avwsiwi.BackupManagementType != nil {
7167 objectMap["backupManagementType"] = avwsiwi.BackupManagementType
7168 }
7169 if avwsiwi.WorkloadType != nil {
7170 objectMap["workloadType"] = avwsiwi.WorkloadType
7171 }
7172 if avwsiwi.FriendlyName != nil {
7173 objectMap["friendlyName"] = avwsiwi.FriendlyName
7174 }
7175 if avwsiwi.ProtectionState != "" {
7176 objectMap["protectionState"] = avwsiwi.ProtectionState
7177 }
7178 if avwsiwi.WorkloadItemType != "" {
7179 objectMap["workloadItemType"] = avwsiwi.WorkloadItemType
7180 }
7181 return json.Marshal(objectMap)
7182 }
7183
7184
7185 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
7186 return nil, false
7187 }
7188
7189
7190 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
7191 return &avwsiwi, true
7192 }
7193
7194
7195 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
7196 return nil, false
7197 }
7198
7199
7200 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
7201 return nil, false
7202 }
7203
7204
7205 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
7206 return nil, false
7207 }
7208
7209
7210 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
7211 return nil, false
7212 }
7213
7214
7215 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
7216 return nil, false
7217 }
7218
7219
7220 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
7221 return &avwsiwi, true
7222 }
7223
7224
7225 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
7226 return nil, false
7227 }
7228
7229
7230 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
7231 return &avwsiwi, true
7232 }
7233
7234
7235 type BasicAzureWorkloadAutoProtectionIntent interface {
7236 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
7237 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
7238 }
7239
7240
7241 type AzureWorkloadAutoProtectionIntent struct {
7242
7243 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7244
7245 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7246
7247 ItemID *string `json:"itemId,omitempty"`
7248
7249 PolicyID *string `json:"policyId,omitempty"`
7250
7251 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7252
7253 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
7254 }
7255
7256 func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) {
7257 var m map[string]interface{}
7258 err := json.Unmarshal(body, &m)
7259 if err != nil {
7260 return nil, err
7261 }
7262
7263 switch m["protectionIntentItemType"] {
7264 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
7265 var awsapi AzureWorkloadSQLAutoProtectionIntent
7266 err := json.Unmarshal(body, &awsapi)
7267 return awsapi, err
7268 default:
7269 var awapi AzureWorkloadAutoProtectionIntent
7270 err := json.Unmarshal(body, &awapi)
7271 return awapi, err
7272 }
7273 }
7274 func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) {
7275 var rawMessages []*json.RawMessage
7276 err := json.Unmarshal(body, &rawMessages)
7277 if err != nil {
7278 return nil, err
7279 }
7280
7281 awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages))
7282
7283 for index, rawMessage := range rawMessages {
7284 awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage)
7285 if err != nil {
7286 return nil, err
7287 }
7288 awapiArray[index] = awapi
7289 }
7290 return awapiArray, nil
7291 }
7292
7293
7294 func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) {
7295 awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent
7296 objectMap := make(map[string]interface{})
7297 if awapi.BackupManagementType != "" {
7298 objectMap["backupManagementType"] = awapi.BackupManagementType
7299 }
7300 if awapi.SourceResourceID != nil {
7301 objectMap["sourceResourceId"] = awapi.SourceResourceID
7302 }
7303 if awapi.ItemID != nil {
7304 objectMap["itemId"] = awapi.ItemID
7305 }
7306 if awapi.PolicyID != nil {
7307 objectMap["policyId"] = awapi.PolicyID
7308 }
7309 if awapi.ProtectionState != "" {
7310 objectMap["protectionState"] = awapi.ProtectionState
7311 }
7312 if awapi.ProtectionIntentItemType != "" {
7313 objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType
7314 }
7315 return json.Marshal(objectMap)
7316 }
7317
7318
7319 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
7320 return nil, false
7321 }
7322
7323
7324 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
7325 return &awapi, true
7326 }
7327
7328
7329 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
7330 return nil, false
7331 }
7332
7333
7334 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
7335 return &awapi, true
7336 }
7337
7338
7339 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
7340 return &awapi, true
7341 }
7342
7343
7344 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
7345 return nil, false
7346 }
7347
7348
7349 func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
7350 return nil, false
7351 }
7352
7353
7354 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
7355 return &awapi, true
7356 }
7357
7358
7359 type AzureWorkloadBackupRequest struct {
7360
7361 BackupType TypeEnum `json:"backupType,omitempty"`
7362
7363 EnableCompression *bool `json:"enableCompression,omitempty"`
7364
7365 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
7366
7367 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
7368 }
7369
7370
7371 func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) {
7372 awbr.ObjectType = ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest
7373 objectMap := make(map[string]interface{})
7374 if awbr.BackupType != "" {
7375 objectMap["backupType"] = awbr.BackupType
7376 }
7377 if awbr.EnableCompression != nil {
7378 objectMap["enableCompression"] = awbr.EnableCompression
7379 }
7380 if awbr.RecoveryPointExpiryTimeInUTC != nil {
7381 objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC
7382 }
7383 if awbr.ObjectType != "" {
7384 objectMap["objectType"] = awbr.ObjectType
7385 }
7386 return json.Marshal(objectMap)
7387 }
7388
7389
7390 func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
7391 return nil, false
7392 }
7393
7394
7395 func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
7396 return &awbr, true
7397 }
7398
7399
7400 func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
7401 return nil, false
7402 }
7403
7404
7405 func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) {
7406 return nil, false
7407 }
7408
7409
7410 func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) {
7411 return &awbr, true
7412 }
7413
7414
7415 type BasicAzureWorkloadContainer interface {
7416 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
7417 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
7418 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
7419 }
7420
7421
7422 type AzureWorkloadContainer struct {
7423
7424 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7425
7426 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
7427
7428 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
7429
7430 WorkloadType WorkloadType `json:"workloadType,omitempty"`
7431
7432 OperationType OperationType `json:"operationType,omitempty"`
7433
7434 FriendlyName *string `json:"friendlyName,omitempty"`
7435
7436 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7437
7438 RegistrationStatus *string `json:"registrationStatus,omitempty"`
7439
7440 HealthStatus *string `json:"healthStatus,omitempty"`
7441
7442 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
7443 }
7444
7445 func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) {
7446 var m map[string]interface{}
7447 err := json.Unmarshal(body, &m)
7448 if err != nil {
7449 return nil, err
7450 }
7451
7452 switch m["containerType"] {
7453 case string(ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer):
7454 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
7455 err := json.Unmarshal(body, &aswcpc)
7456 return aswcpc, err
7457 case string(ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer):
7458 var avacpc AzureVMAppContainerProtectionContainer
7459 err := json.Unmarshal(body, &avacpc)
7460 return avacpc, err
7461 default:
7462 var awc AzureWorkloadContainer
7463 err := json.Unmarshal(body, &awc)
7464 return awc, err
7465 }
7466 }
7467 func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) {
7468 var rawMessages []*json.RawMessage
7469 err := json.Unmarshal(body, &rawMessages)
7470 if err != nil {
7471 return nil, err
7472 }
7473
7474 awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages))
7475
7476 for index, rawMessage := range rawMessages {
7477 awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage)
7478 if err != nil {
7479 return nil, err
7480 }
7481 awcArray[index] = awc
7482 }
7483 return awcArray, nil
7484 }
7485
7486
7487 func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) {
7488 awc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer
7489 objectMap := make(map[string]interface{})
7490 if awc.SourceResourceID != nil {
7491 objectMap["sourceResourceId"] = awc.SourceResourceID
7492 }
7493 if awc.LastUpdatedTime != nil {
7494 objectMap["lastUpdatedTime"] = awc.LastUpdatedTime
7495 }
7496 if awc.ExtendedInfo != nil {
7497 objectMap["extendedInfo"] = awc.ExtendedInfo
7498 }
7499 if awc.WorkloadType != "" {
7500 objectMap["workloadType"] = awc.WorkloadType
7501 }
7502 if awc.OperationType != "" {
7503 objectMap["operationType"] = awc.OperationType
7504 }
7505 if awc.FriendlyName != nil {
7506 objectMap["friendlyName"] = awc.FriendlyName
7507 }
7508 if awc.BackupManagementType != "" {
7509 objectMap["backupManagementType"] = awc.BackupManagementType
7510 }
7511 if awc.RegistrationStatus != nil {
7512 objectMap["registrationStatus"] = awc.RegistrationStatus
7513 }
7514 if awc.HealthStatus != nil {
7515 objectMap["healthStatus"] = awc.HealthStatus
7516 }
7517 if awc.ContainerType != "" {
7518 objectMap["containerType"] = awc.ContainerType
7519 }
7520 return json.Marshal(objectMap)
7521 }
7522
7523
7524 func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
7525 return nil, false
7526 }
7527
7528
7529 func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
7530 return nil, false
7531 }
7532
7533
7534 func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
7535 return nil, false
7536 }
7537
7538
7539 func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
7540 return nil, false
7541 }
7542
7543
7544 func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
7545 return nil, false
7546 }
7547
7548
7549 func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
7550 return nil, false
7551 }
7552
7553
7554 func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
7555 return nil, false
7556 }
7557
7558
7559 func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
7560 return &awc, true
7561 }
7562
7563
7564 func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
7565 return &awc, true
7566 }
7567
7568
7569 func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) {
7570 return nil, false
7571 }
7572
7573
7574 func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
7575 return nil, false
7576 }
7577
7578
7579 func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) {
7580 return nil, false
7581 }
7582
7583
7584 func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
7585 return nil, false
7586 }
7587
7588
7589 func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
7590 return nil, false
7591 }
7592
7593
7594 func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) {
7595 return nil, false
7596 }
7597
7598
7599 func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
7600 return nil, false
7601 }
7602
7603
7604 func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
7605 return &awc, true
7606 }
7607
7608
7609 type AzureWorkloadContainerExtendedInfo struct {
7610
7611 HostServerName *string `json:"hostServerName,omitempty"`
7612
7613 InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"`
7614
7615 NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"`
7616 }
7617
7618
7619 type AzureWorkloadErrorInfo struct {
7620
7621 ErrorCode *int32 `json:"errorCode,omitempty"`
7622
7623 ErrorString *string `json:"errorString,omitempty"`
7624
7625 ErrorTitle *string `json:"errorTitle,omitempty"`
7626
7627 Recommendations *[]string `json:"recommendations,omitempty"`
7628
7629 AdditionalDetails *string `json:"additionalDetails,omitempty"`
7630 }
7631
7632
7633 type AzureWorkloadJob struct {
7634
7635 WorkloadType *string `json:"workloadType,omitempty"`
7636
7637 Duration *string `json:"duration,omitempty"`
7638
7639 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
7640
7641 ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"`
7642
7643 ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"`
7644
7645 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
7646
7647 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7648
7649 Operation *string `json:"operation,omitempty"`
7650
7651 Status *string `json:"status,omitempty"`
7652
7653 StartTime *date.Time `json:"startTime,omitempty"`
7654
7655 EndTime *date.Time `json:"endTime,omitempty"`
7656
7657 ActivityID *string `json:"activityId,omitempty"`
7658
7659 JobType JobType `json:"jobType,omitempty"`
7660 }
7661
7662
7663 func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) {
7664 awj.JobType = JobTypeAzureWorkloadJob
7665 objectMap := make(map[string]interface{})
7666 if awj.WorkloadType != nil {
7667 objectMap["workloadType"] = awj.WorkloadType
7668 }
7669 if awj.Duration != nil {
7670 objectMap["duration"] = awj.Duration
7671 }
7672 if awj.ActionsInfo != nil {
7673 objectMap["actionsInfo"] = awj.ActionsInfo
7674 }
7675 if awj.ErrorDetails != nil {
7676 objectMap["errorDetails"] = awj.ErrorDetails
7677 }
7678 if awj.ExtendedInfo != nil {
7679 objectMap["extendedInfo"] = awj.ExtendedInfo
7680 }
7681 if awj.EntityFriendlyName != nil {
7682 objectMap["entityFriendlyName"] = awj.EntityFriendlyName
7683 }
7684 if awj.BackupManagementType != "" {
7685 objectMap["backupManagementType"] = awj.BackupManagementType
7686 }
7687 if awj.Operation != nil {
7688 objectMap["operation"] = awj.Operation
7689 }
7690 if awj.Status != nil {
7691 objectMap["status"] = awj.Status
7692 }
7693 if awj.StartTime != nil {
7694 objectMap["startTime"] = awj.StartTime
7695 }
7696 if awj.EndTime != nil {
7697 objectMap["endTime"] = awj.EndTime
7698 }
7699 if awj.ActivityID != nil {
7700 objectMap["activityId"] = awj.ActivityID
7701 }
7702 if awj.JobType != "" {
7703 objectMap["jobType"] = awj.JobType
7704 }
7705 return json.Marshal(objectMap)
7706 }
7707
7708
7709 func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
7710 return nil, false
7711 }
7712
7713
7714 func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
7715 return nil, false
7716 }
7717
7718
7719 func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
7720 return &awj, true
7721 }
7722
7723
7724 func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) {
7725 return nil, false
7726 }
7727
7728
7729 func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) {
7730 return nil, false
7731 }
7732
7733
7734 func (awj AzureWorkloadJob) AsVaultJob() (*VaultJob, bool) {
7735 return nil, false
7736 }
7737
7738
7739 func (awj AzureWorkloadJob) AsJob() (*Job, bool) {
7740 return nil, false
7741 }
7742
7743
7744 func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) {
7745 return &awj, true
7746 }
7747
7748
7749 type AzureWorkloadJobExtendedInfo struct {
7750
7751 TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"`
7752
7753 PropertyBag map[string]*string `json:"propertyBag"`
7754
7755 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
7756 }
7757
7758
7759 func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) {
7760 objectMap := make(map[string]interface{})
7761 if awjei.TasksList != nil {
7762 objectMap["tasksList"] = awjei.TasksList
7763 }
7764 if awjei.PropertyBag != nil {
7765 objectMap["propertyBag"] = awjei.PropertyBag
7766 }
7767 if awjei.DynamicErrorMessage != nil {
7768 objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage
7769 }
7770 return json.Marshal(objectMap)
7771 }
7772
7773
7774 type AzureWorkloadJobTaskDetails struct {
7775
7776 TaskID *string `json:"taskId,omitempty"`
7777
7778 Status *string `json:"status,omitempty"`
7779 }
7780
7781
7782 type BasicAzureWorkloadPointInTimeRecoveryPoint interface {
7783 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
7784 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
7785 }
7786
7787
7788 type AzureWorkloadPointInTimeRecoveryPoint struct {
7789
7790 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
7791
7792 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
7793
7794 Type RestorePointType `json:"type,omitempty"`
7795
7796 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
7797
7798 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
7799
7800 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
7801 }
7802
7803 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
7804 var m map[string]interface{}
7805 err := json.Unmarshal(body, &m)
7806 if err != nil {
7807 return nil, err
7808 }
7809
7810 switch m["objectType"] {
7811 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
7812 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
7813 err := json.Unmarshal(body, &awshpitrp)
7814 return awshpitrp, err
7815 default:
7816 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
7817 err := json.Unmarshal(body, &awpitrp)
7818 return awpitrp, err
7819 }
7820 }
7821 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
7822 var rawMessages []*json.RawMessage
7823 err := json.Unmarshal(body, &rawMessages)
7824 if err != nil {
7825 return nil, err
7826 }
7827
7828 awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages))
7829
7830 for index, rawMessage := range rawMessages {
7831 awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage)
7832 if err != nil {
7833 return nil, err
7834 }
7835 awpitrpArray[index] = awpitrp
7836 }
7837 return awpitrpArray, nil
7838 }
7839
7840
7841 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
7842 awpitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint
7843 objectMap := make(map[string]interface{})
7844 if awpitrp.TimeRanges != nil {
7845 objectMap["timeRanges"] = awpitrp.TimeRanges
7846 }
7847 if awpitrp.RecoveryPointTierDetails != nil {
7848 objectMap["recoveryPointTierDetails"] = awpitrp.RecoveryPointTierDetails
7849 }
7850 if awpitrp.RecoveryPointMoveReadinessInfo != nil {
7851 objectMap["recoveryPointMoveReadinessInfo"] = awpitrp.RecoveryPointMoveReadinessInfo
7852 }
7853 if awpitrp.ObjectType != "" {
7854 objectMap["objectType"] = awpitrp.ObjectType
7855 }
7856 return json.Marshal(objectMap)
7857 }
7858
7859
7860 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
7861 return nil, false
7862 }
7863
7864
7865 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
7866 return &awpitrp, true
7867 }
7868
7869
7870 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
7871 return &awpitrp, true
7872 }
7873
7874
7875 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
7876 return nil, false
7877 }
7878
7879
7880 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
7881 return &awpitrp, true
7882 }
7883
7884
7885 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
7886 return nil, false
7887 }
7888
7889
7890 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
7891 return nil, false
7892 }
7893
7894
7895 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
7896 return nil, false
7897 }
7898
7899
7900 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
7901 return nil, false
7902 }
7903
7904
7905 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
7906 return nil, false
7907 }
7908
7909
7910 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
7911 return nil, false
7912 }
7913
7914
7915 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
7916 return nil, false
7917 }
7918
7919
7920 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
7921 return nil, false
7922 }
7923
7924
7925 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
7926 return &awpitrp, true
7927 }
7928
7929
7930
7931 type AzureWorkloadPointInTimeRestoreRequest struct {
7932
7933 PointInTime *date.Time `json:"pointInTime,omitempty"`
7934
7935 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
7936
7937 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7938
7939 PropertyBag map[string]*string `json:"propertyBag"`
7940
7941 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
7942
7943 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
7944
7945
7946 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
7947
7948 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
7949 }
7950
7951
7952 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
7953 awpitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest
7954 objectMap := make(map[string]interface{})
7955 if awpitrr.PointInTime != nil {
7956 objectMap["pointInTime"] = awpitrr.PointInTime
7957 }
7958 if awpitrr.RecoveryType != "" {
7959 objectMap["recoveryType"] = awpitrr.RecoveryType
7960 }
7961 if awpitrr.SourceResourceID != nil {
7962 objectMap["sourceResourceId"] = awpitrr.SourceResourceID
7963 }
7964 if awpitrr.PropertyBag != nil {
7965 objectMap["propertyBag"] = awpitrr.PropertyBag
7966 }
7967 if awpitrr.TargetInfo != nil {
7968 objectMap["targetInfo"] = awpitrr.TargetInfo
7969 }
7970 if awpitrr.RecoveryMode != "" {
7971 objectMap["recoveryMode"] = awpitrr.RecoveryMode
7972 }
7973 if awpitrr.TargetVirtualMachineID != nil {
7974 objectMap["targetVirtualMachineId"] = awpitrr.TargetVirtualMachineID
7975 }
7976 if awpitrr.ObjectType != "" {
7977 objectMap["objectType"] = awpitrr.ObjectType
7978 }
7979 return json.Marshal(objectMap)
7980 }
7981
7982
7983 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
7984 return nil, false
7985 }
7986
7987
7988 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
7989 return &awpitrr, true
7990 }
7991
7992
7993 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
7994 return nil, false
7995 }
7996
7997
7998 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
7999 return &awpitrr, true
8000 }
8001
8002
8003 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8004 return nil, false
8005 }
8006
8007
8008 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8009 return nil, false
8010 }
8011
8012
8013 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8014 return nil, false
8015 }
8016
8017
8018 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8019 return nil, false
8020 }
8021
8022
8023 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8024 return nil, false
8025 }
8026
8027
8028 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8029 return nil, false
8030 }
8031
8032
8033 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8034 return nil, false
8035 }
8036
8037
8038 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8039 return nil, false
8040 }
8041
8042
8043 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8044 return nil, false
8045 }
8046
8047
8048 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8049 return nil, false
8050 }
8051
8052
8053 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8054 return nil, false
8055 }
8056
8057
8058 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8059 return nil, false
8060 }
8061
8062
8063 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8064 return nil, false
8065 }
8066
8067
8068 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8069 return nil, false
8070 }
8071
8072
8073 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8074 return nil, false
8075 }
8076
8077
8078 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8079 return nil, false
8080 }
8081
8082
8083 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8084 return &awpitrr, true
8085 }
8086
8087
8088 type BasicAzureWorkloadRecoveryPoint interface {
8089 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
8090 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
8091 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
8092 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
8093 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
8094 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
8095 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
8096 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
8097 }
8098
8099
8100
8101 type AzureWorkloadRecoveryPoint struct {
8102
8103 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8104
8105 Type RestorePointType `json:"type,omitempty"`
8106
8107 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
8108
8109 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8110
8111 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8112 }
8113
8114 func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) {
8115 var m map[string]interface{}
8116 err := json.Unmarshal(body, &m)
8117 if err != nil {
8118 return nil, err
8119 }
8120
8121 switch m["objectType"] {
8122 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
8123 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
8124 err := json.Unmarshal(body, &awpitrp)
8125 return awpitrp, err
8126 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
8127 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
8128 err := json.Unmarshal(body, &awshpitrp)
8129 return awshpitrp, err
8130 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
8131 var awshrp AzureWorkloadSAPHanaRecoveryPoint
8132 err := json.Unmarshal(body, &awshrp)
8133 return awshrp, err
8134 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
8135 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
8136 err := json.Unmarshal(body, &awspitrp)
8137 return awspitrp, err
8138 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint):
8139 var awsrp AzureWorkloadSQLRecoveryPoint
8140 err := json.Unmarshal(body, &awsrp)
8141 return awsrp, err
8142 default:
8143 var awrp AzureWorkloadRecoveryPoint
8144 err := json.Unmarshal(body, &awrp)
8145 return awrp, err
8146 }
8147 }
8148 func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) {
8149 var rawMessages []*json.RawMessage
8150 err := json.Unmarshal(body, &rawMessages)
8151 if err != nil {
8152 return nil, err
8153 }
8154
8155 awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages))
8156
8157 for index, rawMessage := range rawMessages {
8158 awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage)
8159 if err != nil {
8160 return nil, err
8161 }
8162 awrpArray[index] = awrp
8163 }
8164 return awrpArray, nil
8165 }
8166
8167
8168 func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) {
8169 awrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint
8170 objectMap := make(map[string]interface{})
8171 if awrp.RecoveryPointTierDetails != nil {
8172 objectMap["recoveryPointTierDetails"] = awrp.RecoveryPointTierDetails
8173 }
8174 if awrp.RecoveryPointMoveReadinessInfo != nil {
8175 objectMap["recoveryPointMoveReadinessInfo"] = awrp.RecoveryPointMoveReadinessInfo
8176 }
8177 if awrp.ObjectType != "" {
8178 objectMap["objectType"] = awrp.ObjectType
8179 }
8180 return json.Marshal(objectMap)
8181 }
8182
8183
8184 func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8185 return nil, false
8186 }
8187
8188
8189 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8190 return nil, false
8191 }
8192
8193
8194 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8195 return nil, false
8196 }
8197
8198
8199 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8200 return &awrp, true
8201 }
8202
8203
8204 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8205 return &awrp, true
8206 }
8207
8208
8209 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8210 return nil, false
8211 }
8212
8213
8214 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8215 return nil, false
8216 }
8217
8218
8219 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8220 return nil, false
8221 }
8222
8223
8224 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8225 return nil, false
8226 }
8227
8228
8229 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8230 return nil, false
8231 }
8232
8233
8234 func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8235 return nil, false
8236 }
8237
8238
8239 func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8240 return nil, false
8241 }
8242
8243
8244 func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8245 return nil, false
8246 }
8247
8248
8249 func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8250 return &awrp, true
8251 }
8252
8253
8254 type BasicAzureWorkloadRestoreRequest interface {
8255 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
8256 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8257 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8258 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
8259 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
8260 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
8261 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
8262 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
8263 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
8264 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
8265 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
8266 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
8267 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
8268 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
8269 }
8270
8271
8272 type AzureWorkloadRestoreRequest struct {
8273
8274 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8275
8276 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8277
8278 PropertyBag map[string]*string `json:"propertyBag"`
8279
8280 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8281
8282 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8283
8284
8285 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8286
8287 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8288 }
8289
8290 func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) {
8291 var m map[string]interface{}
8292 err := json.Unmarshal(body, &m)
8293 if err != nil {
8294 return nil, err
8295 }
8296
8297 switch m["objectType"] {
8298 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest):
8299 var awpitrr AzureWorkloadPointInTimeRestoreRequest
8300 err := json.Unmarshal(body, &awpitrr)
8301 return awpitrr, err
8302 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
8303 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8304 err := json.Unmarshal(body, &awshpitrr)
8305 return awshpitrr, err
8306 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest):
8307 var awshrr AzureWorkloadSAPHanaRestoreRequest
8308 err := json.Unmarshal(body, &awshrr)
8309 return awshrr, err
8310 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
8311 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
8312 err := json.Unmarshal(body, &awspitrr)
8313 return awspitrr, err
8314 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest):
8315 var awsrr AzureWorkloadSQLRestoreRequest
8316 err := json.Unmarshal(body, &awsrr)
8317 return awsrr, err
8318 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
8319 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
8320 err := json.Unmarshal(body, &awshpitrwrr)
8321 return awshpitrwrr, err
8322 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
8323 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
8324 err := json.Unmarshal(body, &awshrwrr)
8325 return awshrwrr, err
8326 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
8327 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
8328 err := json.Unmarshal(body, &awspitrwrr)
8329 return awspitrwrr, err
8330 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
8331 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
8332 err := json.Unmarshal(body, &awsrwrr)
8333 return awsrwrr, err
8334 default:
8335 var awrr AzureWorkloadRestoreRequest
8336 err := json.Unmarshal(body, &awrr)
8337 return awrr, err
8338 }
8339 }
8340 func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) {
8341 var rawMessages []*json.RawMessage
8342 err := json.Unmarshal(body, &rawMessages)
8343 if err != nil {
8344 return nil, err
8345 }
8346
8347 awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages))
8348
8349 for index, rawMessage := range rawMessages {
8350 awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage)
8351 if err != nil {
8352 return nil, err
8353 }
8354 awrrArray[index] = awrr
8355 }
8356 return awrrArray, nil
8357 }
8358
8359
8360 func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) {
8361 awrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest
8362 objectMap := make(map[string]interface{})
8363 if awrr.RecoveryType != "" {
8364 objectMap["recoveryType"] = awrr.RecoveryType
8365 }
8366 if awrr.SourceResourceID != nil {
8367 objectMap["sourceResourceId"] = awrr.SourceResourceID
8368 }
8369 if awrr.PropertyBag != nil {
8370 objectMap["propertyBag"] = awrr.PropertyBag
8371 }
8372 if awrr.TargetInfo != nil {
8373 objectMap["targetInfo"] = awrr.TargetInfo
8374 }
8375 if awrr.RecoveryMode != "" {
8376 objectMap["recoveryMode"] = awrr.RecoveryMode
8377 }
8378 if awrr.TargetVirtualMachineID != nil {
8379 objectMap["targetVirtualMachineId"] = awrr.TargetVirtualMachineID
8380 }
8381 if awrr.ObjectType != "" {
8382 objectMap["objectType"] = awrr.ObjectType
8383 }
8384 return json.Marshal(objectMap)
8385 }
8386
8387
8388 func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8389 return nil, false
8390 }
8391
8392
8393 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8394 return nil, false
8395 }
8396
8397
8398 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8399 return &awrr, true
8400 }
8401
8402
8403 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8404 return &awrr, true
8405 }
8406
8407
8408 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8409 return nil, false
8410 }
8411
8412
8413 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8414 return nil, false
8415 }
8416
8417
8418 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8419 return nil, false
8420 }
8421
8422
8423 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8424 return nil, false
8425 }
8426
8427
8428 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8429 return nil, false
8430 }
8431
8432
8433 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8434 return nil, false
8435 }
8436
8437
8438 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8439 return nil, false
8440 }
8441
8442
8443 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8444 return nil, false
8445 }
8446
8447
8448 func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8449 return nil, false
8450 }
8451
8452
8453 func (awrr AzureWorkloadRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8454 return nil, false
8455 }
8456
8457
8458 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8459 return nil, false
8460 }
8461
8462
8463 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8464 return nil, false
8465 }
8466
8467
8468 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8469 return nil, false
8470 }
8471
8472
8473 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8474 return nil, false
8475 }
8476
8477
8478 func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8479 return nil, false
8480 }
8481
8482
8483 func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8484 return nil, false
8485 }
8486
8487
8488 func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8489 return &awrr, true
8490 }
8491
8492
8493 type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct {
8494
8495 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
8496
8497 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8498
8499 Type RestorePointType `json:"type,omitempty"`
8500
8501 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
8502
8503 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8504
8505 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8506 }
8507
8508
8509 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
8510 awshpitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint
8511 objectMap := make(map[string]interface{})
8512 if awshpitrp.TimeRanges != nil {
8513 objectMap["timeRanges"] = awshpitrp.TimeRanges
8514 }
8515 if awshpitrp.RecoveryPointTierDetails != nil {
8516 objectMap["recoveryPointTierDetails"] = awshpitrp.RecoveryPointTierDetails
8517 }
8518 if awshpitrp.RecoveryPointMoveReadinessInfo != nil {
8519 objectMap["recoveryPointMoveReadinessInfo"] = awshpitrp.RecoveryPointMoveReadinessInfo
8520 }
8521 if awshpitrp.ObjectType != "" {
8522 objectMap["objectType"] = awshpitrp.ObjectType
8523 }
8524 return json.Marshal(objectMap)
8525 }
8526
8527
8528 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8529 return nil, false
8530 }
8531
8532
8533 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8534 return nil, false
8535 }
8536
8537
8538 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8539 return &awshpitrp, true
8540 }
8541
8542
8543 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8544 return nil, false
8545 }
8546
8547
8548 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8549 return &awshpitrp, true
8550 }
8551
8552
8553 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8554 return &awshpitrp, true
8555 }
8556
8557
8558 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8559 return nil, false
8560 }
8561
8562
8563 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8564 return nil, false
8565 }
8566
8567
8568 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8569 return nil, false
8570 }
8571
8572
8573 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8574 return nil, false
8575 }
8576
8577
8578 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8579 return nil, false
8580 }
8581
8582
8583 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8584 return nil, false
8585 }
8586
8587
8588 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8589 return nil, false
8590 }
8591
8592
8593 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8594 return &awshpitrp, true
8595 }
8596
8597
8598
8599 type BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest interface {
8600 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
8601 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8602 }
8603
8604
8605
8606 type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct {
8607
8608 PointInTime *date.Time `json:"pointInTime,omitempty"`
8609
8610 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8611
8612 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8613
8614 PropertyBag map[string]*string `json:"propertyBag"`
8615
8616 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8617
8618 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8619
8620
8621 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8622
8623 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8624 }
8625
8626 func unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, error) {
8627 var m map[string]interface{}
8628 err := json.Unmarshal(body, &m)
8629 if err != nil {
8630 return nil, err
8631 }
8632
8633 switch m["objectType"] {
8634 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
8635 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
8636 err := json.Unmarshal(body, &awshpitrwrr)
8637 return awshpitrwrr, err
8638 default:
8639 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8640 err := json.Unmarshal(body, &awshpitrr)
8641 return awshpitrr, err
8642 }
8643 }
8644 func unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, error) {
8645 var rawMessages []*json.RawMessage
8646 err := json.Unmarshal(body, &rawMessages)
8647 if err != nil {
8648 return nil, err
8649 }
8650
8651 awshpitrrArray := make([]BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, len(rawMessages))
8652
8653 for index, rawMessage := range rawMessages {
8654 awshpitrr, err := unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest(*rawMessage)
8655 if err != nil {
8656 return nil, err
8657 }
8658 awshpitrrArray[index] = awshpitrr
8659 }
8660 return awshpitrrArray, nil
8661 }
8662
8663
8664 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
8665 awshpitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest
8666 objectMap := make(map[string]interface{})
8667 if awshpitrr.PointInTime != nil {
8668 objectMap["pointInTime"] = awshpitrr.PointInTime
8669 }
8670 if awshpitrr.RecoveryType != "" {
8671 objectMap["recoveryType"] = awshpitrr.RecoveryType
8672 }
8673 if awshpitrr.SourceResourceID != nil {
8674 objectMap["sourceResourceId"] = awshpitrr.SourceResourceID
8675 }
8676 if awshpitrr.PropertyBag != nil {
8677 objectMap["propertyBag"] = awshpitrr.PropertyBag
8678 }
8679 if awshpitrr.TargetInfo != nil {
8680 objectMap["targetInfo"] = awshpitrr.TargetInfo
8681 }
8682 if awshpitrr.RecoveryMode != "" {
8683 objectMap["recoveryMode"] = awshpitrr.RecoveryMode
8684 }
8685 if awshpitrr.TargetVirtualMachineID != nil {
8686 objectMap["targetVirtualMachineId"] = awshpitrr.TargetVirtualMachineID
8687 }
8688 if awshpitrr.ObjectType != "" {
8689 objectMap["objectType"] = awshpitrr.ObjectType
8690 }
8691 return json.Marshal(objectMap)
8692 }
8693
8694
8695 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8696 return nil, false
8697 }
8698
8699
8700 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8701 return nil, false
8702 }
8703
8704
8705 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8706 return nil, false
8707 }
8708
8709
8710 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8711 return &awshpitrr, true
8712 }
8713
8714
8715 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8716 return &awshpitrr, true
8717 }
8718
8719
8720 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8721 return &awshpitrr, true
8722 }
8723
8724
8725 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8726 return nil, false
8727 }
8728
8729
8730 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8731 return &awshpitrr, true
8732 }
8733
8734
8735 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8736 return nil, false
8737 }
8738
8739
8740 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8741 return nil, false
8742 }
8743
8744
8745 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8746 return nil, false
8747 }
8748
8749
8750 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8751 return nil, false
8752 }
8753
8754
8755 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8756 return nil, false
8757 }
8758
8759
8760 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8761 return nil, false
8762 }
8763
8764
8765 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8766 return nil, false
8767 }
8768
8769
8770 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8771 return nil, false
8772 }
8773
8774
8775 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8776 return nil, false
8777 }
8778
8779
8780 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8781 return nil, false
8782 }
8783
8784
8785 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8786 return nil, false
8787 }
8788
8789
8790 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8791 return nil, false
8792 }
8793
8794
8795 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8796 return &awshpitrr, true
8797 }
8798
8799
8800
8801 type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct {
8802
8803 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
8804
8805 PointInTime *date.Time `json:"pointInTime,omitempty"`
8806
8807 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8808
8809 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8810
8811 PropertyBag map[string]*string `json:"propertyBag"`
8812
8813 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8814
8815 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8816
8817
8818 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8819
8820 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8821 }
8822
8823
8824 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
8825 awshpitrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
8826 objectMap := make(map[string]interface{})
8827 if awshpitrwrr.RecoveryPointRehydrationInfo != nil {
8828 objectMap["recoveryPointRehydrationInfo"] = awshpitrwrr.RecoveryPointRehydrationInfo
8829 }
8830 if awshpitrwrr.PointInTime != nil {
8831 objectMap["pointInTime"] = awshpitrwrr.PointInTime
8832 }
8833 if awshpitrwrr.RecoveryType != "" {
8834 objectMap["recoveryType"] = awshpitrwrr.RecoveryType
8835 }
8836 if awshpitrwrr.SourceResourceID != nil {
8837 objectMap["sourceResourceId"] = awshpitrwrr.SourceResourceID
8838 }
8839 if awshpitrwrr.PropertyBag != nil {
8840 objectMap["propertyBag"] = awshpitrwrr.PropertyBag
8841 }
8842 if awshpitrwrr.TargetInfo != nil {
8843 objectMap["targetInfo"] = awshpitrwrr.TargetInfo
8844 }
8845 if awshpitrwrr.RecoveryMode != "" {
8846 objectMap["recoveryMode"] = awshpitrwrr.RecoveryMode
8847 }
8848 if awshpitrwrr.TargetVirtualMachineID != nil {
8849 objectMap["targetVirtualMachineId"] = awshpitrwrr.TargetVirtualMachineID
8850 }
8851 if awshpitrwrr.ObjectType != "" {
8852 objectMap["objectType"] = awshpitrwrr.ObjectType
8853 }
8854 return json.Marshal(objectMap)
8855 }
8856
8857
8858 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8859 return nil, false
8860 }
8861
8862
8863 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8864 return nil, false
8865 }
8866
8867
8868 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8869 return nil, false
8870 }
8871
8872
8873 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8874 return &awshpitrwrr, true
8875 }
8876
8877
8878 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8879 return nil, false
8880 }
8881
8882
8883 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8884 return &awshpitrwrr, true
8885 }
8886
8887
8888 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8889 return nil, false
8890 }
8891
8892
8893 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8894 return &awshpitrwrr, true
8895 }
8896
8897
8898 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8899 return nil, false
8900 }
8901
8902
8903 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8904 return nil, false
8905 }
8906
8907
8908 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8909 return nil, false
8910 }
8911
8912
8913 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8914 return nil, false
8915 }
8916
8917
8918 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8919 return nil, false
8920 }
8921
8922
8923 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8924 return nil, false
8925 }
8926
8927
8928 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8929 return &awshpitrwrr, true
8930 }
8931
8932
8933 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8934 return nil, false
8935 }
8936
8937
8938 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8939 return nil, false
8940 }
8941
8942
8943 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8944 return nil, false
8945 }
8946
8947
8948 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8949 return nil, false
8950 }
8951
8952
8953 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8954 return nil, false
8955 }
8956
8957
8958 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8959 return &awshpitrwrr, true
8960 }
8961
8962
8963
8964 type AzureWorkloadSAPHanaRecoveryPoint struct {
8965
8966 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8967
8968 Type RestorePointType `json:"type,omitempty"`
8969
8970 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
8971
8972 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8973
8974 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8975 }
8976
8977
8978 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) {
8979 awshrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint
8980 objectMap := make(map[string]interface{})
8981 if awshrp.RecoveryPointTierDetails != nil {
8982 objectMap["recoveryPointTierDetails"] = awshrp.RecoveryPointTierDetails
8983 }
8984 if awshrp.RecoveryPointMoveReadinessInfo != nil {
8985 objectMap["recoveryPointMoveReadinessInfo"] = awshrp.RecoveryPointMoveReadinessInfo
8986 }
8987 if awshrp.ObjectType != "" {
8988 objectMap["objectType"] = awshrp.ObjectType
8989 }
8990 return json.Marshal(objectMap)
8991 }
8992
8993
8994 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8995 return nil, false
8996 }
8997
8998
8999 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9000 return nil, false
9001 }
9002
9003
9004 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9005 return nil, false
9006 }
9007
9008
9009 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9010 return nil, false
9011 }
9012
9013
9014 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9015 return &awshrp, true
9016 }
9017
9018
9019 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9020 return nil, false
9021 }
9022
9023
9024 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9025 return &awshrp, true
9026 }
9027
9028
9029 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9030 return nil, false
9031 }
9032
9033
9034 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9035 return nil, false
9036 }
9037
9038
9039 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9040 return nil, false
9041 }
9042
9043
9044 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9045 return nil, false
9046 }
9047
9048
9049 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9050 return nil, false
9051 }
9052
9053
9054 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9055 return nil, false
9056 }
9057
9058
9059 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9060 return &awshrp, true
9061 }
9062
9063
9064 type BasicAzureWorkloadSAPHanaRestoreRequest interface {
9065 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9066 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9067 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
9068 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
9069 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
9070 }
9071
9072
9073 type AzureWorkloadSAPHanaRestoreRequest struct {
9074
9075 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9076
9077 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9078
9079 PropertyBag map[string]*string `json:"propertyBag"`
9080
9081 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9082
9083 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9084
9085
9086 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9087
9088 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9089 }
9090
9091 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) {
9092 var m map[string]interface{}
9093 err := json.Unmarshal(body, &m)
9094 if err != nil {
9095 return nil, err
9096 }
9097
9098 switch m["objectType"] {
9099 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
9100 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
9101 err := json.Unmarshal(body, &awshpitrr)
9102 return awshpitrr, err
9103 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
9104 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
9105 err := json.Unmarshal(body, &awshpitrwrr)
9106 return awshpitrwrr, err
9107 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
9108 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
9109 err := json.Unmarshal(body, &awshrwrr)
9110 return awshrwrr, err
9111 default:
9112 var awshrr AzureWorkloadSAPHanaRestoreRequest
9113 err := json.Unmarshal(body, &awshrr)
9114 return awshrr, err
9115 }
9116 }
9117 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) {
9118 var rawMessages []*json.RawMessage
9119 err := json.Unmarshal(body, &rawMessages)
9120 if err != nil {
9121 return nil, err
9122 }
9123
9124 awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages))
9125
9126 for index, rawMessage := range rawMessages {
9127 awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage)
9128 if err != nil {
9129 return nil, err
9130 }
9131 awshrrArray[index] = awshrr
9132 }
9133 return awshrrArray, nil
9134 }
9135
9136
9137 func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) {
9138 awshrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest
9139 objectMap := make(map[string]interface{})
9140 if awshrr.RecoveryType != "" {
9141 objectMap["recoveryType"] = awshrr.RecoveryType
9142 }
9143 if awshrr.SourceResourceID != nil {
9144 objectMap["sourceResourceId"] = awshrr.SourceResourceID
9145 }
9146 if awshrr.PropertyBag != nil {
9147 objectMap["propertyBag"] = awshrr.PropertyBag
9148 }
9149 if awshrr.TargetInfo != nil {
9150 objectMap["targetInfo"] = awshrr.TargetInfo
9151 }
9152 if awshrr.RecoveryMode != "" {
9153 objectMap["recoveryMode"] = awshrr.RecoveryMode
9154 }
9155 if awshrr.TargetVirtualMachineID != nil {
9156 objectMap["targetVirtualMachineId"] = awshrr.TargetVirtualMachineID
9157 }
9158 if awshrr.ObjectType != "" {
9159 objectMap["objectType"] = awshrr.ObjectType
9160 }
9161 return json.Marshal(objectMap)
9162 }
9163
9164
9165 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9166 return nil, false
9167 }
9168
9169
9170 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9171 return nil, false
9172 }
9173
9174
9175 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9176 return nil, false
9177 }
9178
9179
9180 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9181 return &awshrr, true
9182 }
9183
9184
9185 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9186 return nil, false
9187 }
9188
9189
9190 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9191 return nil, false
9192 }
9193
9194
9195 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9196 return &awshrr, true
9197 }
9198
9199
9200 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9201 return &awshrr, true
9202 }
9203
9204
9205 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9206 return nil, false
9207 }
9208
9209
9210 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9211 return nil, false
9212 }
9213
9214
9215 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9216 return nil, false
9217 }
9218
9219
9220 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9221 return nil, false
9222 }
9223
9224
9225 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9226 return nil, false
9227 }
9228
9229
9230 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9231 return nil, false
9232 }
9233
9234
9235 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9236 return nil, false
9237 }
9238
9239
9240 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9241 return nil, false
9242 }
9243
9244
9245 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9246 return nil, false
9247 }
9248
9249
9250 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9251 return nil, false
9252 }
9253
9254
9255 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9256 return nil, false
9257 }
9258
9259
9260 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9261 return nil, false
9262 }
9263
9264
9265 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9266 return &awshrr, true
9267 }
9268
9269
9270
9271 type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct {
9272
9273 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
9274
9275 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9276
9277 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9278
9279 PropertyBag map[string]*string `json:"propertyBag"`
9280
9281 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9282
9283 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9284
9285
9286 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9287
9288 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9289 }
9290
9291
9292 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
9293 awshrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest
9294 objectMap := make(map[string]interface{})
9295 if awshrwrr.RecoveryPointRehydrationInfo != nil {
9296 objectMap["recoveryPointRehydrationInfo"] = awshrwrr.RecoveryPointRehydrationInfo
9297 }
9298 if awshrwrr.RecoveryType != "" {
9299 objectMap["recoveryType"] = awshrwrr.RecoveryType
9300 }
9301 if awshrwrr.SourceResourceID != nil {
9302 objectMap["sourceResourceId"] = awshrwrr.SourceResourceID
9303 }
9304 if awshrwrr.PropertyBag != nil {
9305 objectMap["propertyBag"] = awshrwrr.PropertyBag
9306 }
9307 if awshrwrr.TargetInfo != nil {
9308 objectMap["targetInfo"] = awshrwrr.TargetInfo
9309 }
9310 if awshrwrr.RecoveryMode != "" {
9311 objectMap["recoveryMode"] = awshrwrr.RecoveryMode
9312 }
9313 if awshrwrr.TargetVirtualMachineID != nil {
9314 objectMap["targetVirtualMachineId"] = awshrwrr.TargetVirtualMachineID
9315 }
9316 if awshrwrr.ObjectType != "" {
9317 objectMap["objectType"] = awshrwrr.ObjectType
9318 }
9319 return json.Marshal(objectMap)
9320 }
9321
9322
9323 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9324 return nil, false
9325 }
9326
9327
9328 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9329 return nil, false
9330 }
9331
9332
9333 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9334 return nil, false
9335 }
9336
9337
9338 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9339 return &awshrwrr, true
9340 }
9341
9342
9343 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9344 return nil, false
9345 }
9346
9347
9348 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9349 return nil, false
9350 }
9351
9352
9353 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9354 return nil, false
9355 }
9356
9357
9358 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9359 return &awshrwrr, true
9360 }
9361
9362
9363 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9364 return nil, false
9365 }
9366
9367
9368 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9369 return nil, false
9370 }
9371
9372
9373 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9374 return nil, false
9375 }
9376
9377
9378 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9379 return nil, false
9380 }
9381
9382
9383 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9384 return nil, false
9385 }
9386
9387
9388 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9389 return nil, false
9390 }
9391
9392
9393 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9394 return nil, false
9395 }
9396
9397
9398 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9399 return &awshrwrr, true
9400 }
9401
9402
9403 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9404 return nil, false
9405 }
9406
9407
9408 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9409 return nil, false
9410 }
9411
9412
9413 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9414 return nil, false
9415 }
9416
9417
9418 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9419 return nil, false
9420 }
9421
9422
9423 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9424 return &awshrwrr, true
9425 }
9426
9427
9428 type AzureWorkloadSQLAutoProtectionIntent struct {
9429
9430 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
9431
9432 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9433
9434 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9435
9436 ItemID *string `json:"itemId,omitempty"`
9437
9438 PolicyID *string `json:"policyId,omitempty"`
9439
9440 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
9441
9442 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
9443 }
9444
9445
9446 func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) {
9447 awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent
9448 objectMap := make(map[string]interface{})
9449 if awsapi.WorkloadItemType != "" {
9450 objectMap["workloadItemType"] = awsapi.WorkloadItemType
9451 }
9452 if awsapi.BackupManagementType != "" {
9453 objectMap["backupManagementType"] = awsapi.BackupManagementType
9454 }
9455 if awsapi.SourceResourceID != nil {
9456 objectMap["sourceResourceId"] = awsapi.SourceResourceID
9457 }
9458 if awsapi.ItemID != nil {
9459 objectMap["itemId"] = awsapi.ItemID
9460 }
9461 if awsapi.PolicyID != nil {
9462 objectMap["policyId"] = awsapi.PolicyID
9463 }
9464 if awsapi.ProtectionState != "" {
9465 objectMap["protectionState"] = awsapi.ProtectionState
9466 }
9467 if awsapi.ProtectionIntentItemType != "" {
9468 objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType
9469 }
9470 return json.Marshal(objectMap)
9471 }
9472
9473
9474 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
9475 return nil, false
9476 }
9477
9478
9479 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
9480 return &awsapi, true
9481 }
9482
9483
9484 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
9485 return nil, false
9486 }
9487
9488
9489 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
9490 return nil, false
9491 }
9492
9493
9494 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
9495 return &awsapi, true
9496 }
9497
9498
9499 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
9500 return &awsapi, true
9501 }
9502
9503
9504 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
9505 return nil, false
9506 }
9507
9508
9509 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
9510 return &awsapi, true
9511 }
9512
9513
9514 type AzureWorkloadSQLPointInTimeRecoveryPoint struct {
9515
9516 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
9517
9518
9519
9520 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
9521
9522 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
9523
9524 Type RestorePointType `json:"type,omitempty"`
9525
9526 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
9527
9528 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
9529
9530 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
9531 }
9532
9533
9534 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
9535 awspitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint
9536 objectMap := make(map[string]interface{})
9537 if awspitrp.TimeRanges != nil {
9538 objectMap["timeRanges"] = awspitrp.TimeRanges
9539 }
9540 if awspitrp.ExtendedInfo != nil {
9541 objectMap["extendedInfo"] = awspitrp.ExtendedInfo
9542 }
9543 if awspitrp.RecoveryPointTierDetails != nil {
9544 objectMap["recoveryPointTierDetails"] = awspitrp.RecoveryPointTierDetails
9545 }
9546 if awspitrp.RecoveryPointMoveReadinessInfo != nil {
9547 objectMap["recoveryPointMoveReadinessInfo"] = awspitrp.RecoveryPointMoveReadinessInfo
9548 }
9549 if awspitrp.ObjectType != "" {
9550 objectMap["objectType"] = awspitrp.ObjectType
9551 }
9552 return json.Marshal(objectMap)
9553 }
9554
9555
9556 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
9557 return nil, false
9558 }
9559
9560
9561 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9562 return nil, false
9563 }
9564
9565
9566 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9567 return nil, false
9568 }
9569
9570
9571 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9572 return nil, false
9573 }
9574
9575
9576 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9577 return &awspitrp, true
9578 }
9579
9580
9581 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9582 return nil, false
9583 }
9584
9585
9586 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9587 return nil, false
9588 }
9589
9590
9591 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9592 return &awspitrp, true
9593 }
9594
9595
9596 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9597 return nil, false
9598 }
9599
9600
9601 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9602 return &awspitrp, true
9603 }
9604
9605
9606 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9607 return nil, false
9608 }
9609
9610
9611 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9612 return nil, false
9613 }
9614
9615
9616 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9617 return nil, false
9618 }
9619
9620
9621 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9622 return &awspitrp, true
9623 }
9624
9625
9626
9627 type BasicAzureWorkloadSQLPointInTimeRestoreRequest interface {
9628 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
9629 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
9630 }
9631
9632
9633
9634 type AzureWorkloadSQLPointInTimeRestoreRequest struct {
9635
9636 PointInTime *date.Time `json:"pointInTime,omitempty"`
9637
9638 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
9639
9640 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
9641
9642 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
9643
9644 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9645
9646 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9647
9648 PropertyBag map[string]*string `json:"propertyBag"`
9649
9650 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9651
9652 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9653
9654
9655 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9656
9657 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9658 }
9659
9660 func unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequest(body []byte) (BasicAzureWorkloadSQLPointInTimeRestoreRequest, error) {
9661 var m map[string]interface{}
9662 err := json.Unmarshal(body, &m)
9663 if err != nil {
9664 return nil, err
9665 }
9666
9667 switch m["objectType"] {
9668 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
9669 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
9670 err := json.Unmarshal(body, &awspitrwrr)
9671 return awspitrwrr, err
9672 default:
9673 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
9674 err := json.Unmarshal(body, &awspitrr)
9675 return awspitrr, err
9676 }
9677 }
9678 func unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLPointInTimeRestoreRequest, error) {
9679 var rawMessages []*json.RawMessage
9680 err := json.Unmarshal(body, &rawMessages)
9681 if err != nil {
9682 return nil, err
9683 }
9684
9685 awspitrrArray := make([]BasicAzureWorkloadSQLPointInTimeRestoreRequest, len(rawMessages))
9686
9687 for index, rawMessage := range rawMessages {
9688 awspitrr, err := unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequest(*rawMessage)
9689 if err != nil {
9690 return nil, err
9691 }
9692 awspitrrArray[index] = awspitrr
9693 }
9694 return awspitrrArray, nil
9695 }
9696
9697
9698 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
9699 awspitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest
9700 objectMap := make(map[string]interface{})
9701 if awspitrr.PointInTime != nil {
9702 objectMap["pointInTime"] = awspitrr.PointInTime
9703 }
9704 if awspitrr.ShouldUseAlternateTargetLocation != nil {
9705 objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation
9706 }
9707 if awspitrr.IsNonRecoverable != nil {
9708 objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable
9709 }
9710 if awspitrr.AlternateDirectoryPaths != nil {
9711 objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths
9712 }
9713 if awspitrr.RecoveryType != "" {
9714 objectMap["recoveryType"] = awspitrr.RecoveryType
9715 }
9716 if awspitrr.SourceResourceID != nil {
9717 objectMap["sourceResourceId"] = awspitrr.SourceResourceID
9718 }
9719 if awspitrr.PropertyBag != nil {
9720 objectMap["propertyBag"] = awspitrr.PropertyBag
9721 }
9722 if awspitrr.TargetInfo != nil {
9723 objectMap["targetInfo"] = awspitrr.TargetInfo
9724 }
9725 if awspitrr.RecoveryMode != "" {
9726 objectMap["recoveryMode"] = awspitrr.RecoveryMode
9727 }
9728 if awspitrr.TargetVirtualMachineID != nil {
9729 objectMap["targetVirtualMachineId"] = awspitrr.TargetVirtualMachineID
9730 }
9731 if awspitrr.ObjectType != "" {
9732 objectMap["objectType"] = awspitrr.ObjectType
9733 }
9734 return json.Marshal(objectMap)
9735 }
9736
9737
9738 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9739 return nil, false
9740 }
9741
9742
9743 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9744 return nil, false
9745 }
9746
9747
9748 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9749 return nil, false
9750 }
9751
9752
9753 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9754 return &awspitrr, true
9755 }
9756
9757
9758 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9759 return nil, false
9760 }
9761
9762
9763 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9764 return nil, false
9765 }
9766
9767
9768 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9769 return nil, false
9770 }
9771
9772
9773 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9774 return nil, false
9775 }
9776
9777
9778 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9779 return &awspitrr, true
9780 }
9781
9782
9783 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9784 return &awspitrr, true
9785 }
9786
9787
9788 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9789 return nil, false
9790 }
9791
9792
9793 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9794 return &awspitrr, true
9795 }
9796
9797
9798 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9799 return nil, false
9800 }
9801
9802
9803 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9804 return nil, false
9805 }
9806
9807
9808 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9809 return nil, false
9810 }
9811
9812
9813 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9814 return nil, false
9815 }
9816
9817
9818 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9819 return nil, false
9820 }
9821
9822
9823 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9824 return nil, false
9825 }
9826
9827
9828 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9829 return nil, false
9830 }
9831
9832
9833 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9834 return nil, false
9835 }
9836
9837
9838 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9839 return &awspitrr, true
9840 }
9841
9842
9843
9844 type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct {
9845
9846 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
9847
9848 PointInTime *date.Time `json:"pointInTime,omitempty"`
9849
9850 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
9851
9852 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
9853
9854 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
9855
9856 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9857
9858 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9859
9860 PropertyBag map[string]*string `json:"propertyBag"`
9861
9862 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9863
9864 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9865
9866
9867 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9868
9869 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9870 }
9871
9872
9873 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
9874 awspitrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
9875 objectMap := make(map[string]interface{})
9876 if awspitrwrr.RecoveryPointRehydrationInfo != nil {
9877 objectMap["recoveryPointRehydrationInfo"] = awspitrwrr.RecoveryPointRehydrationInfo
9878 }
9879 if awspitrwrr.PointInTime != nil {
9880 objectMap["pointInTime"] = awspitrwrr.PointInTime
9881 }
9882 if awspitrwrr.ShouldUseAlternateTargetLocation != nil {
9883 objectMap["shouldUseAlternateTargetLocation"] = awspitrwrr.ShouldUseAlternateTargetLocation
9884 }
9885 if awspitrwrr.IsNonRecoverable != nil {
9886 objectMap["isNonRecoverable"] = awspitrwrr.IsNonRecoverable
9887 }
9888 if awspitrwrr.AlternateDirectoryPaths != nil {
9889 objectMap["alternateDirectoryPaths"] = awspitrwrr.AlternateDirectoryPaths
9890 }
9891 if awspitrwrr.RecoveryType != "" {
9892 objectMap["recoveryType"] = awspitrwrr.RecoveryType
9893 }
9894 if awspitrwrr.SourceResourceID != nil {
9895 objectMap["sourceResourceId"] = awspitrwrr.SourceResourceID
9896 }
9897 if awspitrwrr.PropertyBag != nil {
9898 objectMap["propertyBag"] = awspitrwrr.PropertyBag
9899 }
9900 if awspitrwrr.TargetInfo != nil {
9901 objectMap["targetInfo"] = awspitrwrr.TargetInfo
9902 }
9903 if awspitrwrr.RecoveryMode != "" {
9904 objectMap["recoveryMode"] = awspitrwrr.RecoveryMode
9905 }
9906 if awspitrwrr.TargetVirtualMachineID != nil {
9907 objectMap["targetVirtualMachineId"] = awspitrwrr.TargetVirtualMachineID
9908 }
9909 if awspitrwrr.ObjectType != "" {
9910 objectMap["objectType"] = awspitrwrr.ObjectType
9911 }
9912 return json.Marshal(objectMap)
9913 }
9914
9915
9916 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9917 return nil, false
9918 }
9919
9920
9921 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9922 return nil, false
9923 }
9924
9925
9926 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9927 return nil, false
9928 }
9929
9930
9931 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9932 return &awspitrwrr, true
9933 }
9934
9935
9936 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9937 return nil, false
9938 }
9939
9940
9941 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9942 return nil, false
9943 }
9944
9945
9946 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9947 return nil, false
9948 }
9949
9950
9951 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9952 return nil, false
9953 }
9954
9955
9956 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9957 return nil, false
9958 }
9959
9960
9961 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9962 return &awspitrwrr, true
9963 }
9964
9965
9966 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9967 return nil, false
9968 }
9969
9970
9971 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9972 return &awspitrwrr, true
9973 }
9974
9975
9976 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9977 return nil, false
9978 }
9979
9980
9981 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9982 return nil, false
9983 }
9984
9985
9986 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9987 return nil, false
9988 }
9989
9990
9991 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9992 return nil, false
9993 }
9994
9995
9996 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9997 return &awspitrwrr, true
9998 }
9999
10000
10001 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10002 return nil, false
10003 }
10004
10005
10006 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10007 return nil, false
10008 }
10009
10010
10011 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10012 return nil, false
10013 }
10014
10015
10016 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10017 return &awspitrwrr, true
10018 }
10019
10020
10021
10022 type BasicAzureWorkloadSQLRecoveryPoint interface {
10023 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
10024 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
10025 }
10026
10027
10028
10029 type AzureWorkloadSQLRecoveryPoint struct {
10030
10031
10032
10033 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
10034
10035 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
10036
10037 Type RestorePointType `json:"type,omitempty"`
10038
10039 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
10040
10041 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
10042
10043 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
10044 }
10045
10046 func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) {
10047 var m map[string]interface{}
10048 err := json.Unmarshal(body, &m)
10049 if err != nil {
10050 return nil, err
10051 }
10052
10053 switch m["objectType"] {
10054 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
10055 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
10056 err := json.Unmarshal(body, &awspitrp)
10057 return awspitrp, err
10058 default:
10059 var awsrp AzureWorkloadSQLRecoveryPoint
10060 err := json.Unmarshal(body, &awsrp)
10061 return awsrp, err
10062 }
10063 }
10064 func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) {
10065 var rawMessages []*json.RawMessage
10066 err := json.Unmarshal(body, &rawMessages)
10067 if err != nil {
10068 return nil, err
10069 }
10070
10071 awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages))
10072
10073 for index, rawMessage := range rawMessages {
10074 awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage)
10075 if err != nil {
10076 return nil, err
10077 }
10078 awsrpArray[index] = awsrp
10079 }
10080 return awsrpArray, nil
10081 }
10082
10083
10084 func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) {
10085 awsrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint
10086 objectMap := make(map[string]interface{})
10087 if awsrp.ExtendedInfo != nil {
10088 objectMap["extendedInfo"] = awsrp.ExtendedInfo
10089 }
10090 if awsrp.RecoveryPointTierDetails != nil {
10091 objectMap["recoveryPointTierDetails"] = awsrp.RecoveryPointTierDetails
10092 }
10093 if awsrp.RecoveryPointMoveReadinessInfo != nil {
10094 objectMap["recoveryPointMoveReadinessInfo"] = awsrp.RecoveryPointMoveReadinessInfo
10095 }
10096 if awsrp.ObjectType != "" {
10097 objectMap["objectType"] = awsrp.ObjectType
10098 }
10099 return json.Marshal(objectMap)
10100 }
10101
10102
10103 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
10104 return nil, false
10105 }
10106
10107
10108 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
10109 return nil, false
10110 }
10111
10112
10113 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
10114 return nil, false
10115 }
10116
10117
10118 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
10119 return nil, false
10120 }
10121
10122
10123 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
10124 return &awsrp, true
10125 }
10126
10127
10128 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
10129 return nil, false
10130 }
10131
10132
10133 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
10134 return nil, false
10135 }
10136
10137
10138 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
10139 return nil, false
10140 }
10141
10142
10143 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
10144 return &awsrp, true
10145 }
10146
10147
10148 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
10149 return &awsrp, true
10150 }
10151
10152
10153 func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
10154 return nil, false
10155 }
10156
10157
10158 func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
10159 return nil, false
10160 }
10161
10162
10163 func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
10164 return nil, false
10165 }
10166
10167
10168 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
10169 return &awsrp, true
10170 }
10171
10172
10173 type AzureWorkloadSQLRecoveryPointExtendedInfo struct {
10174
10175 DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"`
10176
10177 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
10178 }
10179
10180
10181 func (awsrpei AzureWorkloadSQLRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) {
10182 objectMap := make(map[string]interface{})
10183 return json.Marshal(objectMap)
10184 }
10185
10186
10187 type BasicAzureWorkloadSQLRestoreRequest interface {
10188 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
10189 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
10190 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
10191 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
10192 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
10193 }
10194
10195
10196 type AzureWorkloadSQLRestoreRequest struct {
10197
10198 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10199
10200 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10201
10202 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10203
10204 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10205
10206 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10207
10208 PropertyBag map[string]*string `json:"propertyBag"`
10209
10210 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10211
10212 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10213
10214
10215 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10216
10217 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10218 }
10219
10220 func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) {
10221 var m map[string]interface{}
10222 err := json.Unmarshal(body, &m)
10223 if err != nil {
10224 return nil, err
10225 }
10226
10227 switch m["objectType"] {
10228 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
10229 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
10230 err := json.Unmarshal(body, &awspitrr)
10231 return awspitrr, err
10232 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
10233 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
10234 err := json.Unmarshal(body, &awspitrwrr)
10235 return awspitrwrr, err
10236 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
10237 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
10238 err := json.Unmarshal(body, &awsrwrr)
10239 return awsrwrr, err
10240 default:
10241 var awsrr AzureWorkloadSQLRestoreRequest
10242 err := json.Unmarshal(body, &awsrr)
10243 return awsrr, err
10244 }
10245 }
10246 func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) {
10247 var rawMessages []*json.RawMessage
10248 err := json.Unmarshal(body, &rawMessages)
10249 if err != nil {
10250 return nil, err
10251 }
10252
10253 awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages))
10254
10255 for index, rawMessage := range rawMessages {
10256 awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage)
10257 if err != nil {
10258 return nil, err
10259 }
10260 awsrrArray[index] = awsrr
10261 }
10262 return awsrrArray, nil
10263 }
10264
10265
10266 func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) {
10267 awsrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest
10268 objectMap := make(map[string]interface{})
10269 if awsrr.ShouldUseAlternateTargetLocation != nil {
10270 objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation
10271 }
10272 if awsrr.IsNonRecoverable != nil {
10273 objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable
10274 }
10275 if awsrr.AlternateDirectoryPaths != nil {
10276 objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths
10277 }
10278 if awsrr.RecoveryType != "" {
10279 objectMap["recoveryType"] = awsrr.RecoveryType
10280 }
10281 if awsrr.SourceResourceID != nil {
10282 objectMap["sourceResourceId"] = awsrr.SourceResourceID
10283 }
10284 if awsrr.PropertyBag != nil {
10285 objectMap["propertyBag"] = awsrr.PropertyBag
10286 }
10287 if awsrr.TargetInfo != nil {
10288 objectMap["targetInfo"] = awsrr.TargetInfo
10289 }
10290 if awsrr.RecoveryMode != "" {
10291 objectMap["recoveryMode"] = awsrr.RecoveryMode
10292 }
10293 if awsrr.TargetVirtualMachineID != nil {
10294 objectMap["targetVirtualMachineId"] = awsrr.TargetVirtualMachineID
10295 }
10296 if awsrr.ObjectType != "" {
10297 objectMap["objectType"] = awsrr.ObjectType
10298 }
10299 return json.Marshal(objectMap)
10300 }
10301
10302
10303 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10304 return nil, false
10305 }
10306
10307
10308 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10309 return nil, false
10310 }
10311
10312
10313 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10314 return nil, false
10315 }
10316
10317
10318 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10319 return &awsrr, true
10320 }
10321
10322
10323 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10324 return nil, false
10325 }
10326
10327
10328 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10329 return nil, false
10330 }
10331
10332
10333 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10334 return nil, false
10335 }
10336
10337
10338 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10339 return nil, false
10340 }
10341
10342
10343 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10344 return nil, false
10345 }
10346
10347
10348 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10349 return nil, false
10350 }
10351
10352
10353 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10354 return &awsrr, true
10355 }
10356
10357
10358 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10359 return &awsrr, true
10360 }
10361
10362
10363 func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10364 return nil, false
10365 }
10366
10367
10368 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10369 return nil, false
10370 }
10371
10372
10373 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10374 return nil, false
10375 }
10376
10377
10378 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10379 return nil, false
10380 }
10381
10382
10383 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10384 return nil, false
10385 }
10386
10387
10388 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10389 return nil, false
10390 }
10391
10392
10393 func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10394 return nil, false
10395 }
10396
10397
10398 func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10399 return nil, false
10400 }
10401
10402
10403 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10404 return &awsrr, true
10405 }
10406
10407
10408
10409 type AzureWorkloadSQLRestoreWithRehydrateRequest struct {
10410
10411 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
10412
10413 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10414
10415 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10416
10417 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10418
10419 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10420
10421 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10422
10423 PropertyBag map[string]*string `json:"propertyBag"`
10424
10425 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10426
10427 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10428
10429
10430 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10431
10432 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10433 }
10434
10435
10436 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
10437 awsrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest
10438 objectMap := make(map[string]interface{})
10439 if awsrwrr.RecoveryPointRehydrationInfo != nil {
10440 objectMap["recoveryPointRehydrationInfo"] = awsrwrr.RecoveryPointRehydrationInfo
10441 }
10442 if awsrwrr.ShouldUseAlternateTargetLocation != nil {
10443 objectMap["shouldUseAlternateTargetLocation"] = awsrwrr.ShouldUseAlternateTargetLocation
10444 }
10445 if awsrwrr.IsNonRecoverable != nil {
10446 objectMap["isNonRecoverable"] = awsrwrr.IsNonRecoverable
10447 }
10448 if awsrwrr.AlternateDirectoryPaths != nil {
10449 objectMap["alternateDirectoryPaths"] = awsrwrr.AlternateDirectoryPaths
10450 }
10451 if awsrwrr.RecoveryType != "" {
10452 objectMap["recoveryType"] = awsrwrr.RecoveryType
10453 }
10454 if awsrwrr.SourceResourceID != nil {
10455 objectMap["sourceResourceId"] = awsrwrr.SourceResourceID
10456 }
10457 if awsrwrr.PropertyBag != nil {
10458 objectMap["propertyBag"] = awsrwrr.PropertyBag
10459 }
10460 if awsrwrr.TargetInfo != nil {
10461 objectMap["targetInfo"] = awsrwrr.TargetInfo
10462 }
10463 if awsrwrr.RecoveryMode != "" {
10464 objectMap["recoveryMode"] = awsrwrr.RecoveryMode
10465 }
10466 if awsrwrr.TargetVirtualMachineID != nil {
10467 objectMap["targetVirtualMachineId"] = awsrwrr.TargetVirtualMachineID
10468 }
10469 if awsrwrr.ObjectType != "" {
10470 objectMap["objectType"] = awsrwrr.ObjectType
10471 }
10472 return json.Marshal(objectMap)
10473 }
10474
10475
10476 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10477 return nil, false
10478 }
10479
10480
10481 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10482 return nil, false
10483 }
10484
10485
10486 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10487 return nil, false
10488 }
10489
10490
10491 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10492 return &awsrwrr, true
10493 }
10494
10495
10496 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10497 return nil, false
10498 }
10499
10500
10501 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10502 return nil, false
10503 }
10504
10505
10506 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10507 return nil, false
10508 }
10509
10510
10511 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10512 return nil, false
10513 }
10514
10515
10516 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10517 return nil, false
10518 }
10519
10520
10521 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10522 return nil, false
10523 }
10524
10525
10526 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10527 return nil, false
10528 }
10529
10530
10531 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10532 return &awsrwrr, true
10533 }
10534
10535
10536 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10537 return nil, false
10538 }
10539
10540
10541 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10542 return nil, false
10543 }
10544
10545
10546 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10547 return nil, false
10548 }
10549
10550
10551 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10552 return nil, false
10553 }
10554
10555
10556 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10557 return nil, false
10558 }
10559
10560
10561 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10562 return &awsrwrr, true
10563 }
10564
10565
10566 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10567 return nil, false
10568 }
10569
10570
10571 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10572 return nil, false
10573 }
10574
10575
10576 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10577 return &awsrwrr, true
10578 }
10579
10580
10581 type BEKDetails struct {
10582
10583 SecretURL *string `json:"secretUrl,omitempty"`
10584
10585 SecretVaultID *string `json:"secretVaultId,omitempty"`
10586
10587 SecretData *string `json:"secretData,omitempty"`
10588 }
10589
10590
10591 type BMSAADPropertiesQueryObject struct {
10592
10593 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10594 }
10595
10596
10597 type BMSBackupEngineQueryObject struct {
10598
10599 Expand *string `json:"expand,omitempty"`
10600 }
10601
10602
10603 type BMSBackupEnginesQueryObject struct {
10604
10605 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10606
10607 FriendlyName *string `json:"friendlyName,omitempty"`
10608
10609 Expand *string `json:"expand,omitempty"`
10610 }
10611
10612
10613 type BMSBackupSummariesQueryObject struct {
10614
10615 Type Type `json:"type,omitempty"`
10616 }
10617
10618
10619 type BMSContainerQueryObject struct {
10620
10621 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10622
10623 ContainerType ContainerType `json:"containerType,omitempty"`
10624
10625 BackupEngineName *string `json:"backupEngineName,omitempty"`
10626
10627 FabricName *string `json:"fabricName,omitempty"`
10628
10629 Status *string `json:"status,omitempty"`
10630
10631 FriendlyName *string `json:"friendlyName,omitempty"`
10632 }
10633
10634
10635 type BMSContainersInquiryQueryObject struct {
10636
10637 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10638
10639 WorkloadType WorkloadType `json:"workloadType,omitempty"`
10640 }
10641
10642
10643 type BMSPOQueryObject struct {
10644
10645 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10646
10647 WorkloadType WorkloadType `json:"workloadType,omitempty"`
10648
10649 ContainerName *string `json:"containerName,omitempty"`
10650
10651 Status *string `json:"status,omitempty"`
10652
10653 FriendlyName *string `json:"friendlyName,omitempty"`
10654 }
10655
10656
10657
10658 type BMSPrepareDataMoveFuture struct {
10659 azure.FutureAPI
10660
10661
10662 Result func(BaseClient) (autorest.Response, error)
10663 }
10664
10665
10666 func (future *BMSPrepareDataMoveFuture) UnmarshalJSON(body []byte) error {
10667 var azFuture azure.Future
10668 if err := json.Unmarshal(body, &azFuture); err != nil {
10669 return err
10670 }
10671 future.FutureAPI = &azFuture
10672 future.Result = future.result
10673 return nil
10674 }
10675
10676
10677 func (future *BMSPrepareDataMoveFuture) result(client BaseClient) (ar autorest.Response, err error) {
10678 var done bool
10679 done, err = future.DoneWithContext(context.Background(), client)
10680 if err != nil {
10681 err = autorest.NewErrorWithError(err, "backup.BMSPrepareDataMoveFuture", "Result", future.Response(), "Polling failure")
10682 return
10683 }
10684 if !done {
10685 ar.Response = future.Response()
10686 err = azure.NewAsyncOpIncompleteError("backup.BMSPrepareDataMoveFuture")
10687 return
10688 }
10689 ar.Response = future.Response()
10690 return
10691 }
10692
10693
10694 type BMSRefreshContainersQueryObject struct {
10695
10696 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10697 }
10698
10699
10700 type BMSRPQueryObject struct {
10701
10702 StartDate *date.Time `json:"startDate,omitempty"`
10703
10704 EndDate *date.Time `json:"endDate,omitempty"`
10705
10706 RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"`
10707
10708 ExtendedInfo *bool `json:"extendedInfo,omitempty"`
10709
10710 MoveReadyRPOnly *bool `json:"moveReadyRPOnly,omitempty"`
10711 }
10712
10713
10714
10715 type BMSTriggerDataMoveFuture struct {
10716 azure.FutureAPI
10717
10718
10719 Result func(BaseClient) (autorest.Response, error)
10720 }
10721
10722
10723 func (future *BMSTriggerDataMoveFuture) UnmarshalJSON(body []byte) error {
10724 var azFuture azure.Future
10725 if err := json.Unmarshal(body, &azFuture); err != nil {
10726 return err
10727 }
10728 future.FutureAPI = &azFuture
10729 future.Result = future.result
10730 return nil
10731 }
10732
10733
10734 func (future *BMSTriggerDataMoveFuture) result(client BaseClient) (ar autorest.Response, err error) {
10735 var done bool
10736 done, err = future.DoneWithContext(context.Background(), client)
10737 if err != nil {
10738 err = autorest.NewErrorWithError(err, "backup.BMSTriggerDataMoveFuture", "Result", future.Response(), "Polling failure")
10739 return
10740 }
10741 if !done {
10742 ar.Response = future.Response()
10743 err = azure.NewAsyncOpIncompleteError("backup.BMSTriggerDataMoveFuture")
10744 return
10745 }
10746 ar.Response = future.Response()
10747 return
10748 }
10749
10750
10751 type BMSWorkloadItemQueryObject struct {
10752
10753 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10754
10755 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
10756
10757 WorkloadType WorkloadType `json:"workloadType,omitempty"`
10758
10759 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
10760 }
10761
10762
10763 type ClientDiscoveryDisplay struct {
10764
10765 Provider *string `json:"provider,omitempty"`
10766
10767 Resource *string `json:"resource,omitempty"`
10768
10769 Operation *string `json:"operation,omitempty"`
10770
10771 Description *string `json:"description,omitempty"`
10772 }
10773
10774
10775
10776 type ClientDiscoveryForLogSpecification struct {
10777
10778 Name *string `json:"name,omitempty"`
10779
10780 DisplayName *string `json:"displayName,omitempty"`
10781
10782 BlobDuration *string `json:"blobDuration,omitempty"`
10783 }
10784
10785
10786 type ClientDiscoveryForProperties struct {
10787
10788 ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"`
10789 }
10790
10791
10792
10793 type ClientDiscoveryForServiceSpecification struct {
10794
10795 LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"`
10796 }
10797
10798
10799 type ClientDiscoveryResponse struct {
10800 autorest.Response `json:"-"`
10801
10802 Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"`
10803
10804 NextLink *string `json:"nextLink,omitempty"`
10805 }
10806
10807
10808
10809 type ClientDiscoveryResponseIterator struct {
10810 i int
10811 page ClientDiscoveryResponsePage
10812 }
10813
10814
10815
10816 func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) {
10817 if tracing.IsEnabled() {
10818 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext")
10819 defer func() {
10820 sc := -1
10821 if iter.Response().Response.Response != nil {
10822 sc = iter.Response().Response.Response.StatusCode
10823 }
10824 tracing.EndSpan(ctx, sc, err)
10825 }()
10826 }
10827 iter.i++
10828 if iter.i < len(iter.page.Values()) {
10829 return nil
10830 }
10831 err = iter.page.NextWithContext(ctx)
10832 if err != nil {
10833 iter.i--
10834 return err
10835 }
10836 iter.i = 0
10837 return nil
10838 }
10839
10840
10841
10842
10843 func (iter *ClientDiscoveryResponseIterator) Next() error {
10844 return iter.NextWithContext(context.Background())
10845 }
10846
10847
10848 func (iter ClientDiscoveryResponseIterator) NotDone() bool {
10849 return iter.page.NotDone() && iter.i < len(iter.page.Values())
10850 }
10851
10852
10853 func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse {
10854 return iter.page.Response()
10855 }
10856
10857
10858
10859 func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI {
10860 if !iter.page.NotDone() {
10861 return ClientDiscoveryValueForSingleAPI{}
10862 }
10863 return iter.page.Values()[iter.i]
10864 }
10865
10866
10867 func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator {
10868 return ClientDiscoveryResponseIterator{page: page}
10869 }
10870
10871
10872 func (cdr ClientDiscoveryResponse) IsEmpty() bool {
10873 return cdr.Value == nil || len(*cdr.Value) == 0
10874 }
10875
10876
10877 func (cdr ClientDiscoveryResponse) hasNextLink() bool {
10878 return cdr.NextLink != nil && len(*cdr.NextLink) != 0
10879 }
10880
10881
10882
10883 func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) {
10884 if !cdr.hasNextLink() {
10885 return nil, nil
10886 }
10887 return autorest.Prepare((&http.Request{}).WithContext(ctx),
10888 autorest.AsJSON(),
10889 autorest.AsGet(),
10890 autorest.WithBaseURL(to.String(cdr.NextLink)))
10891 }
10892
10893
10894 type ClientDiscoveryResponsePage struct {
10895 fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)
10896 cdr ClientDiscoveryResponse
10897 }
10898
10899
10900
10901 func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) {
10902 if tracing.IsEnabled() {
10903 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext")
10904 defer func() {
10905 sc := -1
10906 if page.Response().Response.Response != nil {
10907 sc = page.Response().Response.Response.StatusCode
10908 }
10909 tracing.EndSpan(ctx, sc, err)
10910 }()
10911 }
10912 for {
10913 next, err := page.fn(ctx, page.cdr)
10914 if err != nil {
10915 return err
10916 }
10917 page.cdr = next
10918 if !next.hasNextLink() || !next.IsEmpty() {
10919 break
10920 }
10921 }
10922 return nil
10923 }
10924
10925
10926
10927
10928 func (page *ClientDiscoveryResponsePage) Next() error {
10929 return page.NextWithContext(context.Background())
10930 }
10931
10932
10933 func (page ClientDiscoveryResponsePage) NotDone() bool {
10934 return !page.cdr.IsEmpty()
10935 }
10936
10937
10938 func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse {
10939 return page.cdr
10940 }
10941
10942
10943 func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI {
10944 if page.cdr.IsEmpty() {
10945 return nil
10946 }
10947 return *page.cdr.Value
10948 }
10949
10950
10951 func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage {
10952 return ClientDiscoveryResponsePage{
10953 fn: getNextPage,
10954 cdr: cur,
10955 }
10956 }
10957
10958
10959 type ClientDiscoveryValueForSingleAPI struct {
10960
10961 Name *string `json:"name,omitempty"`
10962
10963 Display *ClientDiscoveryDisplay `json:"display,omitempty"`
10964
10965 Origin *string `json:"origin,omitempty"`
10966
10967 Properties *ClientDiscoveryForProperties `json:"properties,omitempty"`
10968 }
10969
10970
10971 type ClientScriptForConnect struct {
10972
10973 ScriptContent *string `json:"scriptContent,omitempty"`
10974
10975 ScriptExtension *string `json:"scriptExtension,omitempty"`
10976
10977 OsType *string `json:"osType,omitempty"`
10978
10979 URL *string `json:"url,omitempty"`
10980
10981
10982 ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"`
10983 }
10984
10985
10986 type CloudError struct {
10987
10988 Error *CloudErrorBody `json:"error,omitempty"`
10989 }
10990
10991
10992 type CloudErrorBody struct {
10993
10994 Code *string `json:"code,omitempty"`
10995
10996 Message *string `json:"message,omitempty"`
10997
10998 Target *string `json:"target,omitempty"`
10999
11000 Details *[]CloudErrorBody `json:"details,omitempty"`
11001
11002 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
11003 }
11004
11005
11006 func (ceb CloudErrorBody) MarshalJSON() ([]byte, error) {
11007 objectMap := make(map[string]interface{})
11008 return json.Marshal(objectMap)
11009 }
11010
11011
11012 type ContainerIdentityInfo struct {
11013
11014 UniqueName *string `json:"uniqueName,omitempty"`
11015
11016 AadTenantID *string `json:"aadTenantId,omitempty"`
11017
11018 ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
11019
11020 Audience *string `json:"audience,omitempty"`
11021 }
11022
11023
11024 type CrossRegionRestoreRequest struct {
11025
11026 CrossRegionRestoreAccessDetails BasicCrrAccessToken `json:"crossRegionRestoreAccessDetails,omitempty"`
11027
11028 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
11029 }
11030
11031
11032 func (crrr *CrossRegionRestoreRequest) UnmarshalJSON(body []byte) error {
11033 var m map[string]*json.RawMessage
11034 err := json.Unmarshal(body, &m)
11035 if err != nil {
11036 return err
11037 }
11038 for k, v := range m {
11039 switch k {
11040 case "crossRegionRestoreAccessDetails":
11041 if v != nil {
11042 crossRegionRestoreAccessDetails, err := unmarshalBasicCrrAccessToken(*v)
11043 if err != nil {
11044 return err
11045 }
11046 crrr.CrossRegionRestoreAccessDetails = crossRegionRestoreAccessDetails
11047 }
11048 case "restoreRequest":
11049 if v != nil {
11050 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
11051 if err != nil {
11052 return err
11053 }
11054 crrr.RestoreRequest = restoreRequest
11055 }
11056 }
11057 }
11058
11059 return nil
11060 }
11061
11062
11063 type CrossRegionRestoreRequestResource struct {
11064
11065 Properties *CrossRegionRestoreRequest `json:"properties,omitempty"`
11066
11067 ID *string `json:"id,omitempty"`
11068
11069 Name *string `json:"name,omitempty"`
11070
11071 Type *string `json:"type,omitempty"`
11072
11073 Location *string `json:"location,omitempty"`
11074
11075 Tags map[string]*string `json:"tags"`
11076
11077 ETag *string `json:"eTag,omitempty"`
11078 }
11079
11080
11081 func (crrrr CrossRegionRestoreRequestResource) MarshalJSON() ([]byte, error) {
11082 objectMap := make(map[string]interface{})
11083 if crrrr.Properties != nil {
11084 objectMap["properties"] = crrrr.Properties
11085 }
11086 if crrrr.Location != nil {
11087 objectMap["location"] = crrrr.Location
11088 }
11089 if crrrr.Tags != nil {
11090 objectMap["tags"] = crrrr.Tags
11091 }
11092 if crrrr.ETag != nil {
11093 objectMap["eTag"] = crrrr.ETag
11094 }
11095 return json.Marshal(objectMap)
11096 }
11097
11098
11099
11100 type CrossRegionRestoreTriggerFuture struct {
11101 azure.FutureAPI
11102
11103
11104 Result func(CrossRegionRestoreClient) (autorest.Response, error)
11105 }
11106
11107
11108 func (future *CrossRegionRestoreTriggerFuture) UnmarshalJSON(body []byte) error {
11109 var azFuture azure.Future
11110 if err := json.Unmarshal(body, &azFuture); err != nil {
11111 return err
11112 }
11113 future.FutureAPI = &azFuture
11114 future.Result = future.result
11115 return nil
11116 }
11117
11118
11119 func (future *CrossRegionRestoreTriggerFuture) result(client CrossRegionRestoreClient) (ar autorest.Response, err error) {
11120 var done bool
11121 done, err = future.DoneWithContext(context.Background(), client)
11122 if err != nil {
11123 err = autorest.NewErrorWithError(err, "backup.CrossRegionRestoreTriggerFuture", "Result", future.Response(), "Polling failure")
11124 return
11125 }
11126 if !done {
11127 ar.Response = future.Response()
11128 err = azure.NewAsyncOpIncompleteError("backup.CrossRegionRestoreTriggerFuture")
11129 return
11130 }
11131 ar.Response = future.Response()
11132 return
11133 }
11134
11135
11136 type BasicCrrAccessToken interface {
11137 AsWorkloadCrrAccessToken() (*WorkloadCrrAccessToken, bool)
11138 AsCrrAccessToken() (*CrrAccessToken, bool)
11139 }
11140
11141
11142 type CrrAccessToken struct {
11143
11144 AccessTokenString *string `json:"accessTokenString,omitempty"`
11145
11146 SubscriptionID *string `json:"subscriptionId,omitempty"`
11147
11148 ResourceGroupName *string `json:"resourceGroupName,omitempty"`
11149
11150 ResourceName *string `json:"resourceName,omitempty"`
11151
11152 ResourceID *string `json:"resourceId,omitempty"`
11153
11154 ProtectionContainerID *int64 `json:"protectionContainerId,omitempty"`
11155
11156 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
11157
11158 RecoveryPointTime *string `json:"recoveryPointTime,omitempty"`
11159
11160 ContainerName *string `json:"containerName,omitempty"`
11161
11162 ContainerType *string `json:"containerType,omitempty"`
11163
11164 BackupManagementType *string `json:"backupManagementType,omitempty"`
11165
11166 DatasourceType *string `json:"datasourceType,omitempty"`
11167
11168 DatasourceName *string `json:"datasourceName,omitempty"`
11169
11170 DatasourceID *string `json:"datasourceId,omitempty"`
11171
11172 DatasourceContainerName *string `json:"datasourceContainerName,omitempty"`
11173
11174 CoordinatorServiceStampID *string `json:"coordinatorServiceStampId,omitempty"`
11175
11176 CoordinatorServiceStampURI *string `json:"coordinatorServiceStampUri,omitempty"`
11177
11178 ProtectionServiceStampID *string `json:"protectionServiceStampId,omitempty"`
11179
11180 ProtectionServiceStampURI *string `json:"protectionServiceStampUri,omitempty"`
11181
11182 TokenExtendedInformation *string `json:"tokenExtendedInformation,omitempty"`
11183
11184 RpTierInformation map[string]*string `json:"rpTierInformation"`
11185
11186 RpOriginalSAOption *bool `json:"rpOriginalSAOption,omitempty"`
11187
11188 RpIsManagedVirtualMachine *bool `json:"rpIsManagedVirtualMachine,omitempty"`
11189
11190 RpVMSizeDescription *string `json:"rpVMSizeDescription,omitempty"`
11191
11192 BMSActiveRegion *string `json:"bMSActiveRegion,omitempty"`
11193
11194 ObjectType ObjectTypeBasicCrrAccessToken `json:"objectType,omitempty"`
11195 }
11196
11197 func unmarshalBasicCrrAccessToken(body []byte) (BasicCrrAccessToken, error) {
11198 var m map[string]interface{}
11199 err := json.Unmarshal(body, &m)
11200 if err != nil {
11201 return nil, err
11202 }
11203
11204 switch m["objectType"] {
11205 case string(ObjectTypeBasicCrrAccessTokenObjectTypeWorkloadCrrAccessToken):
11206 var wcat WorkloadCrrAccessToken
11207 err := json.Unmarshal(body, &wcat)
11208 return wcat, err
11209 default:
11210 var cat CrrAccessToken
11211 err := json.Unmarshal(body, &cat)
11212 return cat, err
11213 }
11214 }
11215 func unmarshalBasicCrrAccessTokenArray(body []byte) ([]BasicCrrAccessToken, error) {
11216 var rawMessages []*json.RawMessage
11217 err := json.Unmarshal(body, &rawMessages)
11218 if err != nil {
11219 return nil, err
11220 }
11221
11222 catArray := make([]BasicCrrAccessToken, len(rawMessages))
11223
11224 for index, rawMessage := range rawMessages {
11225 cat, err := unmarshalBasicCrrAccessToken(*rawMessage)
11226 if err != nil {
11227 return nil, err
11228 }
11229 catArray[index] = cat
11230 }
11231 return catArray, nil
11232 }
11233
11234
11235 func (cat CrrAccessToken) MarshalJSON() ([]byte, error) {
11236 cat.ObjectType = ObjectTypeBasicCrrAccessTokenObjectTypeCrrAccessToken
11237 objectMap := make(map[string]interface{})
11238 if cat.AccessTokenString != nil {
11239 objectMap["accessTokenString"] = cat.AccessTokenString
11240 }
11241 if cat.SubscriptionID != nil {
11242 objectMap["subscriptionId"] = cat.SubscriptionID
11243 }
11244 if cat.ResourceGroupName != nil {
11245 objectMap["resourceGroupName"] = cat.ResourceGroupName
11246 }
11247 if cat.ResourceName != nil {
11248 objectMap["resourceName"] = cat.ResourceName
11249 }
11250 if cat.ResourceID != nil {
11251 objectMap["resourceId"] = cat.ResourceID
11252 }
11253 if cat.ProtectionContainerID != nil {
11254 objectMap["protectionContainerId"] = cat.ProtectionContainerID
11255 }
11256 if cat.RecoveryPointID != nil {
11257 objectMap["recoveryPointId"] = cat.RecoveryPointID
11258 }
11259 if cat.RecoveryPointTime != nil {
11260 objectMap["recoveryPointTime"] = cat.RecoveryPointTime
11261 }
11262 if cat.ContainerName != nil {
11263 objectMap["containerName"] = cat.ContainerName
11264 }
11265 if cat.ContainerType != nil {
11266 objectMap["containerType"] = cat.ContainerType
11267 }
11268 if cat.BackupManagementType != nil {
11269 objectMap["backupManagementType"] = cat.BackupManagementType
11270 }
11271 if cat.DatasourceType != nil {
11272 objectMap["datasourceType"] = cat.DatasourceType
11273 }
11274 if cat.DatasourceName != nil {
11275 objectMap["datasourceName"] = cat.DatasourceName
11276 }
11277 if cat.DatasourceID != nil {
11278 objectMap["datasourceId"] = cat.DatasourceID
11279 }
11280 if cat.DatasourceContainerName != nil {
11281 objectMap["datasourceContainerName"] = cat.DatasourceContainerName
11282 }
11283 if cat.CoordinatorServiceStampID != nil {
11284 objectMap["coordinatorServiceStampId"] = cat.CoordinatorServiceStampID
11285 }
11286 if cat.CoordinatorServiceStampURI != nil {
11287 objectMap["coordinatorServiceStampUri"] = cat.CoordinatorServiceStampURI
11288 }
11289 if cat.ProtectionServiceStampID != nil {
11290 objectMap["protectionServiceStampId"] = cat.ProtectionServiceStampID
11291 }
11292 if cat.ProtectionServiceStampURI != nil {
11293 objectMap["protectionServiceStampUri"] = cat.ProtectionServiceStampURI
11294 }
11295 if cat.TokenExtendedInformation != nil {
11296 objectMap["tokenExtendedInformation"] = cat.TokenExtendedInformation
11297 }
11298 if cat.RpTierInformation != nil {
11299 objectMap["rpTierInformation"] = cat.RpTierInformation
11300 }
11301 if cat.RpOriginalSAOption != nil {
11302 objectMap["rpOriginalSAOption"] = cat.RpOriginalSAOption
11303 }
11304 if cat.RpIsManagedVirtualMachine != nil {
11305 objectMap["rpIsManagedVirtualMachine"] = cat.RpIsManagedVirtualMachine
11306 }
11307 if cat.RpVMSizeDescription != nil {
11308 objectMap["rpVMSizeDescription"] = cat.RpVMSizeDescription
11309 }
11310 if cat.BMSActiveRegion != nil {
11311 objectMap["bMSActiveRegion"] = cat.BMSActiveRegion
11312 }
11313 if cat.ObjectType != "" {
11314 objectMap["objectType"] = cat.ObjectType
11315 }
11316 return json.Marshal(objectMap)
11317 }
11318
11319
11320 func (cat CrrAccessToken) AsWorkloadCrrAccessToken() (*WorkloadCrrAccessToken, bool) {
11321 return nil, false
11322 }
11323
11324
11325 func (cat CrrAccessToken) AsCrrAccessToken() (*CrrAccessToken, bool) {
11326 return &cat, true
11327 }
11328
11329
11330 func (cat CrrAccessToken) AsBasicCrrAccessToken() (BasicCrrAccessToken, bool) {
11331 return &cat, true
11332 }
11333
11334
11335 type CrrAccessTokenResource struct {
11336 autorest.Response `json:"-"`
11337
11338 Properties BasicCrrAccessToken `json:"properties,omitempty"`
11339
11340 ID *string `json:"id,omitempty"`
11341
11342 Name *string `json:"name,omitempty"`
11343
11344 Type *string `json:"type,omitempty"`
11345
11346 Location *string `json:"location,omitempty"`
11347
11348 Tags map[string]*string `json:"tags"`
11349
11350 ETag *string `json:"eTag,omitempty"`
11351 }
11352
11353
11354 func (catr CrrAccessTokenResource) MarshalJSON() ([]byte, error) {
11355 objectMap := make(map[string]interface{})
11356 objectMap["properties"] = catr.Properties
11357 if catr.Location != nil {
11358 objectMap["location"] = catr.Location
11359 }
11360 if catr.Tags != nil {
11361 objectMap["tags"] = catr.Tags
11362 }
11363 if catr.ETag != nil {
11364 objectMap["eTag"] = catr.ETag
11365 }
11366 return json.Marshal(objectMap)
11367 }
11368
11369
11370 func (catr *CrrAccessTokenResource) UnmarshalJSON(body []byte) error {
11371 var m map[string]*json.RawMessage
11372 err := json.Unmarshal(body, &m)
11373 if err != nil {
11374 return err
11375 }
11376 for k, v := range m {
11377 switch k {
11378 case "properties":
11379 if v != nil {
11380 properties, err := unmarshalBasicCrrAccessToken(*v)
11381 if err != nil {
11382 return err
11383 }
11384 catr.Properties = properties
11385 }
11386 case "id":
11387 if v != nil {
11388 var ID string
11389 err = json.Unmarshal(*v, &ID)
11390 if err != nil {
11391 return err
11392 }
11393 catr.ID = &ID
11394 }
11395 case "name":
11396 if v != nil {
11397 var name string
11398 err = json.Unmarshal(*v, &name)
11399 if err != nil {
11400 return err
11401 }
11402 catr.Name = &name
11403 }
11404 case "type":
11405 if v != nil {
11406 var typeVar string
11407 err = json.Unmarshal(*v, &typeVar)
11408 if err != nil {
11409 return err
11410 }
11411 catr.Type = &typeVar
11412 }
11413 case "location":
11414 if v != nil {
11415 var location string
11416 err = json.Unmarshal(*v, &location)
11417 if err != nil {
11418 return err
11419 }
11420 catr.Location = &location
11421 }
11422 case "tags":
11423 if v != nil {
11424 var tags map[string]*string
11425 err = json.Unmarshal(*v, &tags)
11426 if err != nil {
11427 return err
11428 }
11429 catr.Tags = tags
11430 }
11431 case "eTag":
11432 if v != nil {
11433 var eTag string
11434 err = json.Unmarshal(*v, &eTag)
11435 if err != nil {
11436 return err
11437 }
11438 catr.ETag = &eTag
11439 }
11440 }
11441 }
11442
11443 return nil
11444 }
11445
11446
11447 type CrrJobRequest struct {
11448
11449 ResourceID *string `json:"resourceId,omitempty"`
11450
11451 JobName *string `json:"jobName,omitempty"`
11452 }
11453
11454
11455 type CrrJobRequestResource struct {
11456
11457 Properties *CrrJobRequest `json:"properties,omitempty"`
11458
11459 ID *string `json:"id,omitempty"`
11460
11461 Name *string `json:"name,omitempty"`
11462
11463 Type *string `json:"type,omitempty"`
11464
11465 Location *string `json:"location,omitempty"`
11466
11467 Tags map[string]*string `json:"tags"`
11468
11469 ETag *string `json:"eTag,omitempty"`
11470 }
11471
11472
11473 func (cjrr CrrJobRequestResource) MarshalJSON() ([]byte, error) {
11474 objectMap := make(map[string]interface{})
11475 if cjrr.Properties != nil {
11476 objectMap["properties"] = cjrr.Properties
11477 }
11478 if cjrr.Location != nil {
11479 objectMap["location"] = cjrr.Location
11480 }
11481 if cjrr.Tags != nil {
11482 objectMap["tags"] = cjrr.Tags
11483 }
11484 if cjrr.ETag != nil {
11485 objectMap["eTag"] = cjrr.ETag
11486 }
11487 return json.Marshal(objectMap)
11488 }
11489
11490
11491 type DailyRetentionFormat struct {
11492
11493 DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"`
11494 }
11495
11496
11497 type DailyRetentionSchedule struct {
11498
11499 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
11500
11501 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
11502 }
11503
11504
11505 type Day struct {
11506
11507 Date *int32 `json:"date,omitempty"`
11508
11509 IsLast *bool `json:"isLast,omitempty"`
11510 }
11511
11512
11513 type DiskExclusionProperties struct {
11514
11515 DiskLunList *[]int32 `json:"diskLunList,omitempty"`
11516
11517 IsInclusionList *bool `json:"isInclusionList,omitempty"`
11518 }
11519
11520
11521 type DiskInformation struct {
11522 Lun *int32 `json:"lun,omitempty"`
11523 Name *string `json:"name,omitempty"`
11524 }
11525
11526
11527 type DistributedNodesInfo struct {
11528
11529 NodeName *string `json:"nodeName,omitempty"`
11530
11531
11532 Status *string `json:"status,omitempty"`
11533
11534 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
11535 }
11536
11537
11538 type DpmBackupEngine struct {
11539
11540 FriendlyName *string `json:"friendlyName,omitempty"`
11541
11542 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11543
11544 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11545
11546 BackupEngineState *string `json:"backupEngineState,omitempty"`
11547
11548 HealthStatus *string `json:"healthStatus,omitempty"`
11549
11550 CanReRegister *bool `json:"canReRegister,omitempty"`
11551
11552 BackupEngineID *string `json:"backupEngineId,omitempty"`
11553
11554 DpmVersion *string `json:"dpmVersion,omitempty"`
11555
11556 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
11557
11558 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
11559
11560 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
11561
11562 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
11563
11564 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
11565 }
11566
11567
11568 func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) {
11569 dbe.BackupEngineType = EngineTypeBackupEngineTypeDpmBackupEngine
11570 objectMap := make(map[string]interface{})
11571 if dbe.FriendlyName != nil {
11572 objectMap["friendlyName"] = dbe.FriendlyName
11573 }
11574 if dbe.BackupManagementType != "" {
11575 objectMap["backupManagementType"] = dbe.BackupManagementType
11576 }
11577 if dbe.RegistrationStatus != nil {
11578 objectMap["registrationStatus"] = dbe.RegistrationStatus
11579 }
11580 if dbe.BackupEngineState != nil {
11581 objectMap["backupEngineState"] = dbe.BackupEngineState
11582 }
11583 if dbe.HealthStatus != nil {
11584 objectMap["healthStatus"] = dbe.HealthStatus
11585 }
11586 if dbe.CanReRegister != nil {
11587 objectMap["canReRegister"] = dbe.CanReRegister
11588 }
11589 if dbe.BackupEngineID != nil {
11590 objectMap["backupEngineId"] = dbe.BackupEngineID
11591 }
11592 if dbe.DpmVersion != nil {
11593 objectMap["dpmVersion"] = dbe.DpmVersion
11594 }
11595 if dbe.AzureBackupAgentVersion != nil {
11596 objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion
11597 }
11598 if dbe.IsAzureBackupAgentUpgradeAvailable != nil {
11599 objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable
11600 }
11601 if dbe.IsDpmUpgradeAvailable != nil {
11602 objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable
11603 }
11604 if dbe.ExtendedInfo != nil {
11605 objectMap["extendedInfo"] = dbe.ExtendedInfo
11606 }
11607 if dbe.BackupEngineType != "" {
11608 objectMap["backupEngineType"] = dbe.BackupEngineType
11609 }
11610 return json.Marshal(objectMap)
11611 }
11612
11613
11614 func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
11615 return nil, false
11616 }
11617
11618
11619 func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
11620 return &dbe, true
11621 }
11622
11623
11624 func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) {
11625 return nil, false
11626 }
11627
11628
11629 func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
11630 return &dbe, true
11631 }
11632
11633
11634 type BasicDpmContainer interface {
11635 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
11636 AsDpmContainer() (*DpmContainer, bool)
11637 }
11638
11639
11640 type DpmContainer struct {
11641
11642 CanReRegister *bool `json:"canReRegister,omitempty"`
11643
11644 ContainerID *string `json:"containerId,omitempty"`
11645
11646 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
11647
11648 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
11649
11650 DpmServers *[]string `json:"dpmServers,omitempty"`
11651
11652 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
11653
11654 ProtectionStatus *string `json:"protectionStatus,omitempty"`
11655
11656 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
11657
11658 FriendlyName *string `json:"friendlyName,omitempty"`
11659
11660 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11661
11662 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11663
11664 HealthStatus *string `json:"healthStatus,omitempty"`
11665
11666 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
11667 }
11668
11669 func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) {
11670 var m map[string]interface{}
11671 err := json.Unmarshal(body, &m)
11672 if err != nil {
11673 return nil, err
11674 }
11675
11676 switch m["containerType"] {
11677 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer):
11678 var absc AzureBackupServerContainer
11679 err := json.Unmarshal(body, &absc)
11680 return absc, err
11681 default:
11682 var dc DpmContainer
11683 err := json.Unmarshal(body, &dc)
11684 return dc, err
11685 }
11686 }
11687 func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) {
11688 var rawMessages []*json.RawMessage
11689 err := json.Unmarshal(body, &rawMessages)
11690 if err != nil {
11691 return nil, err
11692 }
11693
11694 dcArray := make([]BasicDpmContainer, len(rawMessages))
11695
11696 for index, rawMessage := range rawMessages {
11697 dc, err := unmarshalBasicDpmContainer(*rawMessage)
11698 if err != nil {
11699 return nil, err
11700 }
11701 dcArray[index] = dc
11702 }
11703 return dcArray, nil
11704 }
11705
11706
11707 func (dc DpmContainer) MarshalJSON() ([]byte, error) {
11708 dc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeDPMContainer
11709 objectMap := make(map[string]interface{})
11710 if dc.CanReRegister != nil {
11711 objectMap["canReRegister"] = dc.CanReRegister
11712 }
11713 if dc.ContainerID != nil {
11714 objectMap["containerId"] = dc.ContainerID
11715 }
11716 if dc.ProtectedItemCount != nil {
11717 objectMap["protectedItemCount"] = dc.ProtectedItemCount
11718 }
11719 if dc.DpmAgentVersion != nil {
11720 objectMap["dpmAgentVersion"] = dc.DpmAgentVersion
11721 }
11722 if dc.DpmServers != nil {
11723 objectMap["dpmServers"] = dc.DpmServers
11724 }
11725 if dc.UpgradeAvailable != nil {
11726 objectMap["upgradeAvailable"] = dc.UpgradeAvailable
11727 }
11728 if dc.ProtectionStatus != nil {
11729 objectMap["protectionStatus"] = dc.ProtectionStatus
11730 }
11731 if dc.ExtendedInfo != nil {
11732 objectMap["extendedInfo"] = dc.ExtendedInfo
11733 }
11734 if dc.FriendlyName != nil {
11735 objectMap["friendlyName"] = dc.FriendlyName
11736 }
11737 if dc.BackupManagementType != "" {
11738 objectMap["backupManagementType"] = dc.BackupManagementType
11739 }
11740 if dc.RegistrationStatus != nil {
11741 objectMap["registrationStatus"] = dc.RegistrationStatus
11742 }
11743 if dc.HealthStatus != nil {
11744 objectMap["healthStatus"] = dc.HealthStatus
11745 }
11746 if dc.ContainerType != "" {
11747 objectMap["containerType"] = dc.ContainerType
11748 }
11749 return json.Marshal(objectMap)
11750 }
11751
11752
11753 func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
11754 return nil, false
11755 }
11756
11757
11758 func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
11759 return nil, false
11760 }
11761
11762
11763 func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
11764 return nil, false
11765 }
11766
11767
11768 func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
11769 return nil, false
11770 }
11771
11772
11773 func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
11774 return nil, false
11775 }
11776
11777
11778 func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
11779 return nil, false
11780 }
11781
11782
11783 func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
11784 return nil, false
11785 }
11786
11787
11788 func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
11789 return nil, false
11790 }
11791
11792
11793 func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
11794 return nil, false
11795 }
11796
11797
11798 func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) {
11799 return &dc, true
11800 }
11801
11802
11803 func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
11804 return &dc, true
11805 }
11806
11807
11808 func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) {
11809 return nil, false
11810 }
11811
11812
11813 func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
11814 return nil, false
11815 }
11816
11817
11818 func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
11819 return nil, false
11820 }
11821
11822
11823 func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) {
11824 return nil, false
11825 }
11826
11827
11828 func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
11829 return nil, false
11830 }
11831
11832
11833 func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
11834 return &dc, true
11835 }
11836
11837
11838 type DPMContainerExtendedInfo struct {
11839
11840 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
11841 }
11842
11843
11844 type DpmErrorInfo struct {
11845
11846 ErrorString *string `json:"errorString,omitempty"`
11847
11848 Recommendations *[]string `json:"recommendations,omitempty"`
11849 }
11850
11851
11852 type DpmJob struct {
11853
11854 Duration *string `json:"duration,omitempty"`
11855
11856 DpmServerName *string `json:"dpmServerName,omitempty"`
11857
11858 ContainerName *string `json:"containerName,omitempty"`
11859
11860 ContainerType *string `json:"containerType,omitempty"`
11861
11862 WorkloadType *string `json:"workloadType,omitempty"`
11863
11864 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
11865
11866 ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"`
11867
11868 ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"`
11869
11870 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
11871
11872 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11873
11874 Operation *string `json:"operation,omitempty"`
11875
11876 Status *string `json:"status,omitempty"`
11877
11878 StartTime *date.Time `json:"startTime,omitempty"`
11879
11880 EndTime *date.Time `json:"endTime,omitempty"`
11881
11882 ActivityID *string `json:"activityId,omitempty"`
11883
11884 JobType JobType `json:"jobType,omitempty"`
11885 }
11886
11887
11888 func (dj DpmJob) MarshalJSON() ([]byte, error) {
11889 dj.JobType = JobTypeDpmJob
11890 objectMap := make(map[string]interface{})
11891 if dj.Duration != nil {
11892 objectMap["duration"] = dj.Duration
11893 }
11894 if dj.DpmServerName != nil {
11895 objectMap["dpmServerName"] = dj.DpmServerName
11896 }
11897 if dj.ContainerName != nil {
11898 objectMap["containerName"] = dj.ContainerName
11899 }
11900 if dj.ContainerType != nil {
11901 objectMap["containerType"] = dj.ContainerType
11902 }
11903 if dj.WorkloadType != nil {
11904 objectMap["workloadType"] = dj.WorkloadType
11905 }
11906 if dj.ActionsInfo != nil {
11907 objectMap["actionsInfo"] = dj.ActionsInfo
11908 }
11909 if dj.ErrorDetails != nil {
11910 objectMap["errorDetails"] = dj.ErrorDetails
11911 }
11912 if dj.ExtendedInfo != nil {
11913 objectMap["extendedInfo"] = dj.ExtendedInfo
11914 }
11915 if dj.EntityFriendlyName != nil {
11916 objectMap["entityFriendlyName"] = dj.EntityFriendlyName
11917 }
11918 if dj.BackupManagementType != "" {
11919 objectMap["backupManagementType"] = dj.BackupManagementType
11920 }
11921 if dj.Operation != nil {
11922 objectMap["operation"] = dj.Operation
11923 }
11924 if dj.Status != nil {
11925 objectMap["status"] = dj.Status
11926 }
11927 if dj.StartTime != nil {
11928 objectMap["startTime"] = dj.StartTime
11929 }
11930 if dj.EndTime != nil {
11931 objectMap["endTime"] = dj.EndTime
11932 }
11933 if dj.ActivityID != nil {
11934 objectMap["activityId"] = dj.ActivityID
11935 }
11936 if dj.JobType != "" {
11937 objectMap["jobType"] = dj.JobType
11938 }
11939 return json.Marshal(objectMap)
11940 }
11941
11942
11943 func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
11944 return nil, false
11945 }
11946
11947
11948 func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
11949 return nil, false
11950 }
11951
11952
11953 func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
11954 return nil, false
11955 }
11956
11957
11958 func (dj DpmJob) AsDpmJob() (*DpmJob, bool) {
11959 return &dj, true
11960 }
11961
11962
11963 func (dj DpmJob) AsMabJob() (*MabJob, bool) {
11964 return nil, false
11965 }
11966
11967
11968 func (dj DpmJob) AsVaultJob() (*VaultJob, bool) {
11969 return nil, false
11970 }
11971
11972
11973 func (dj DpmJob) AsJob() (*Job, bool) {
11974 return nil, false
11975 }
11976
11977
11978 func (dj DpmJob) AsBasicJob() (BasicJob, bool) {
11979 return &dj, true
11980 }
11981
11982
11983 type DpmJobExtendedInfo struct {
11984
11985 TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"`
11986
11987 PropertyBag map[string]*string `json:"propertyBag"`
11988
11989 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
11990 }
11991
11992
11993 func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) {
11994 objectMap := make(map[string]interface{})
11995 if djei.TasksList != nil {
11996 objectMap["tasksList"] = djei.TasksList
11997 }
11998 if djei.PropertyBag != nil {
11999 objectMap["propertyBag"] = djei.PropertyBag
12000 }
12001 if djei.DynamicErrorMessage != nil {
12002 objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage
12003 }
12004 return json.Marshal(objectMap)
12005 }
12006
12007
12008 type DpmJobTaskDetails struct {
12009
12010 TaskID *string `json:"taskId,omitempty"`
12011
12012 StartTime *date.Time `json:"startTime,omitempty"`
12013
12014 EndTime *date.Time `json:"endTime,omitempty"`
12015
12016 Duration *string `json:"duration,omitempty"`
12017
12018 Status *string `json:"status,omitempty"`
12019 }
12020
12021
12022 type DPMProtectedItem struct {
12023
12024 FriendlyName *string `json:"friendlyName,omitempty"`
12025
12026 BackupEngineName *string `json:"backupEngineName,omitempty"`
12027
12028 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
12029
12030 ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
12031
12032 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12033
12034 WorkloadType DataSourceType `json:"workloadType,omitempty"`
12035
12036 ContainerName *string `json:"containerName,omitempty"`
12037
12038 SourceResourceID *string `json:"sourceResourceId,omitempty"`
12039
12040 PolicyID *string `json:"policyId,omitempty"`
12041
12042 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
12043
12044 BackupSetName *string `json:"backupSetName,omitempty"`
12045
12046 CreateMode CreateMode `json:"createMode,omitempty"`
12047
12048 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
12049
12050 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
12051
12052 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
12053
12054 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
12055
12056 IsRehydrate *bool `json:"isRehydrate,omitempty"`
12057
12058 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
12059 }
12060
12061
12062 func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) {
12063 dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem
12064 objectMap := make(map[string]interface{})
12065 if dpi.FriendlyName != nil {
12066 objectMap["friendlyName"] = dpi.FriendlyName
12067 }
12068 if dpi.BackupEngineName != nil {
12069 objectMap["backupEngineName"] = dpi.BackupEngineName
12070 }
12071 if dpi.ProtectionState != "" {
12072 objectMap["protectionState"] = dpi.ProtectionState
12073 }
12074 if dpi.ExtendedInfo != nil {
12075 objectMap["extendedInfo"] = dpi.ExtendedInfo
12076 }
12077 if dpi.BackupManagementType != "" {
12078 objectMap["backupManagementType"] = dpi.BackupManagementType
12079 }
12080 if dpi.WorkloadType != "" {
12081 objectMap["workloadType"] = dpi.WorkloadType
12082 }
12083 if dpi.ContainerName != nil {
12084 objectMap["containerName"] = dpi.ContainerName
12085 }
12086 if dpi.SourceResourceID != nil {
12087 objectMap["sourceResourceId"] = dpi.SourceResourceID
12088 }
12089 if dpi.PolicyID != nil {
12090 objectMap["policyId"] = dpi.PolicyID
12091 }
12092 if dpi.LastRecoveryPoint != nil {
12093 objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint
12094 }
12095 if dpi.BackupSetName != nil {
12096 objectMap["backupSetName"] = dpi.BackupSetName
12097 }
12098 if dpi.CreateMode != "" {
12099 objectMap["createMode"] = dpi.CreateMode
12100 }
12101 if dpi.DeferredDeleteTimeInUTC != nil {
12102 objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC
12103 }
12104 if dpi.IsScheduledForDeferredDelete != nil {
12105 objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete
12106 }
12107 if dpi.DeferredDeleteTimeRemaining != nil {
12108 objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining
12109 }
12110 if dpi.IsDeferredDeleteScheduleUpcoming != nil {
12111 objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming
12112 }
12113 if dpi.IsRehydrate != nil {
12114 objectMap["isRehydrate"] = dpi.IsRehydrate
12115 }
12116 if dpi.ProtectedItemType != "" {
12117 objectMap["protectedItemType"] = dpi.ProtectedItemType
12118 }
12119 return json.Marshal(objectMap)
12120 }
12121
12122
12123 func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
12124 return nil, false
12125 }
12126
12127
12128 func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
12129 return nil, false
12130 }
12131
12132
12133 func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
12134 return nil, false
12135 }
12136
12137
12138 func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
12139 return nil, false
12140 }
12141
12142
12143 func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
12144 return nil, false
12145 }
12146
12147
12148 func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
12149 return nil, false
12150 }
12151
12152
12153 func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
12154 return nil, false
12155 }
12156
12157
12158 func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
12159 return nil, false
12160 }
12161
12162
12163 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
12164 return nil, false
12165 }
12166
12167
12168 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
12169 return nil, false
12170 }
12171
12172
12173 func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
12174 return nil, false
12175 }
12176
12177
12178 func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
12179 return &dpi, true
12180 }
12181
12182
12183 func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
12184 return nil, false
12185 }
12186
12187
12188 func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
12189 return nil, false
12190 }
12191
12192
12193 func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
12194 return nil, false
12195 }
12196
12197
12198 func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
12199 return &dpi, true
12200 }
12201
12202
12203 type DPMProtectedItemExtendedInfo struct {
12204
12205 ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"`
12206
12207 Protected *bool `json:"protected,omitempty"`
12208
12209 IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"`
12210
12211 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
12212
12213 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
12214
12215 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
12216
12217 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
12218
12219 OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"`
12220
12221 OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"`
12222
12223 OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"`
12224
12225 IsCollocated *bool `json:"isCollocated,omitempty"`
12226
12227 ProtectionGroupName *string `json:"protectionGroupName,omitempty"`
12228
12229 DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"`
12230
12231 TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"`
12232 }
12233
12234
12235 func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
12236 objectMap := make(map[string]interface{})
12237 if dpiei.ProtectableObjectLoadPath != nil {
12238 objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath
12239 }
12240 if dpiei.Protected != nil {
12241 objectMap["protected"] = dpiei.Protected
12242 }
12243 if dpiei.IsPresentOnCloud != nil {
12244 objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud
12245 }
12246 if dpiei.LastBackupStatus != nil {
12247 objectMap["lastBackupStatus"] = dpiei.LastBackupStatus
12248 }
12249 if dpiei.LastRefreshedAt != nil {
12250 objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt
12251 }
12252 if dpiei.OldestRecoveryPoint != nil {
12253 objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint
12254 }
12255 if dpiei.RecoveryPointCount != nil {
12256 objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount
12257 }
12258 if dpiei.OnPremiseOldestRecoveryPoint != nil {
12259 objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint
12260 }
12261 if dpiei.OnPremiseLatestRecoveryPoint != nil {
12262 objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint
12263 }
12264 if dpiei.OnPremiseRecoveryPointCount != nil {
12265 objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount
12266 }
12267 if dpiei.IsCollocated != nil {
12268 objectMap["isCollocated"] = dpiei.IsCollocated
12269 }
12270 if dpiei.ProtectionGroupName != nil {
12271 objectMap["protectionGroupName"] = dpiei.ProtectionGroupName
12272 }
12273 if dpiei.DiskStorageUsedInBytes != nil {
12274 objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes
12275 }
12276 if dpiei.TotalDiskStorageSizeInBytes != nil {
12277 objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes
12278 }
12279 return json.Marshal(objectMap)
12280 }
12281
12282
12283 type EncryptionDetails struct {
12284
12285 EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"`
12286
12287 KekURL *string `json:"kekUrl,omitempty"`
12288
12289 SecretKeyURL *string `json:"secretKeyUrl,omitempty"`
12290
12291 KekVaultID *string `json:"kekVaultId,omitempty"`
12292
12293 SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"`
12294 }
12295
12296
12297 type BasicEngineBase interface {
12298 AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool)
12299 AsDpmBackupEngine() (*DpmBackupEngine, bool)
12300 AsEngineBase() (*EngineBase, bool)
12301 }
12302
12303
12304 type EngineBase struct {
12305
12306 FriendlyName *string `json:"friendlyName,omitempty"`
12307
12308 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12309
12310 RegistrationStatus *string `json:"registrationStatus,omitempty"`
12311
12312 BackupEngineState *string `json:"backupEngineState,omitempty"`
12313
12314 HealthStatus *string `json:"healthStatus,omitempty"`
12315
12316 CanReRegister *bool `json:"canReRegister,omitempty"`
12317
12318 BackupEngineID *string `json:"backupEngineId,omitempty"`
12319
12320 DpmVersion *string `json:"dpmVersion,omitempty"`
12321
12322 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
12323
12324 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
12325
12326 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
12327
12328 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
12329
12330 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
12331 }
12332
12333 func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) {
12334 var m map[string]interface{}
12335 err := json.Unmarshal(body, &m)
12336 if err != nil {
12337 return nil, err
12338 }
12339
12340 switch m["backupEngineType"] {
12341 case string(EngineTypeBackupEngineTypeAzureBackupServerEngine):
12342 var abse AzureBackupServerEngine
12343 err := json.Unmarshal(body, &abse)
12344 return abse, err
12345 case string(EngineTypeBackupEngineTypeDpmBackupEngine):
12346 var dbe DpmBackupEngine
12347 err := json.Unmarshal(body, &dbe)
12348 return dbe, err
12349 default:
12350 var eb EngineBase
12351 err := json.Unmarshal(body, &eb)
12352 return eb, err
12353 }
12354 }
12355 func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) {
12356 var rawMessages []*json.RawMessage
12357 err := json.Unmarshal(body, &rawMessages)
12358 if err != nil {
12359 return nil, err
12360 }
12361
12362 ebArray := make([]BasicEngineBase, len(rawMessages))
12363
12364 for index, rawMessage := range rawMessages {
12365 eb, err := unmarshalBasicEngineBase(*rawMessage)
12366 if err != nil {
12367 return nil, err
12368 }
12369 ebArray[index] = eb
12370 }
12371 return ebArray, nil
12372 }
12373
12374
12375 func (eb EngineBase) MarshalJSON() ([]byte, error) {
12376 eb.BackupEngineType = EngineTypeBackupEngineTypeBackupEngineBase
12377 objectMap := make(map[string]interface{})
12378 if eb.FriendlyName != nil {
12379 objectMap["friendlyName"] = eb.FriendlyName
12380 }
12381 if eb.BackupManagementType != "" {
12382 objectMap["backupManagementType"] = eb.BackupManagementType
12383 }
12384 if eb.RegistrationStatus != nil {
12385 objectMap["registrationStatus"] = eb.RegistrationStatus
12386 }
12387 if eb.BackupEngineState != nil {
12388 objectMap["backupEngineState"] = eb.BackupEngineState
12389 }
12390 if eb.HealthStatus != nil {
12391 objectMap["healthStatus"] = eb.HealthStatus
12392 }
12393 if eb.CanReRegister != nil {
12394 objectMap["canReRegister"] = eb.CanReRegister
12395 }
12396 if eb.BackupEngineID != nil {
12397 objectMap["backupEngineId"] = eb.BackupEngineID
12398 }
12399 if eb.DpmVersion != nil {
12400 objectMap["dpmVersion"] = eb.DpmVersion
12401 }
12402 if eb.AzureBackupAgentVersion != nil {
12403 objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion
12404 }
12405 if eb.IsAzureBackupAgentUpgradeAvailable != nil {
12406 objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable
12407 }
12408 if eb.IsDpmUpgradeAvailable != nil {
12409 objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable
12410 }
12411 if eb.ExtendedInfo != nil {
12412 objectMap["extendedInfo"] = eb.ExtendedInfo
12413 }
12414 if eb.BackupEngineType != "" {
12415 objectMap["backupEngineType"] = eb.BackupEngineType
12416 }
12417 return json.Marshal(objectMap)
12418 }
12419
12420
12421 func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
12422 return nil, false
12423 }
12424
12425
12426 func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
12427 return nil, false
12428 }
12429
12430
12431 func (eb EngineBase) AsEngineBase() (*EngineBase, bool) {
12432 return &eb, true
12433 }
12434
12435
12436 func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) {
12437 return &eb, true
12438 }
12439
12440
12441
12442 type EngineBaseResource struct {
12443 autorest.Response `json:"-"`
12444
12445 Properties BasicEngineBase `json:"properties,omitempty"`
12446
12447 ID *string `json:"id,omitempty"`
12448
12449 Name *string `json:"name,omitempty"`
12450
12451 Type *string `json:"type,omitempty"`
12452
12453 Location *string `json:"location,omitempty"`
12454
12455 Tags map[string]*string `json:"tags"`
12456
12457 ETag *string `json:"eTag,omitempty"`
12458 }
12459
12460
12461 func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) {
12462 objectMap := make(map[string]interface{})
12463 objectMap["properties"] = ebr.Properties
12464 if ebr.Location != nil {
12465 objectMap["location"] = ebr.Location
12466 }
12467 if ebr.Tags != nil {
12468 objectMap["tags"] = ebr.Tags
12469 }
12470 if ebr.ETag != nil {
12471 objectMap["eTag"] = ebr.ETag
12472 }
12473 return json.Marshal(objectMap)
12474 }
12475
12476
12477 func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error {
12478 var m map[string]*json.RawMessage
12479 err := json.Unmarshal(body, &m)
12480 if err != nil {
12481 return err
12482 }
12483 for k, v := range m {
12484 switch k {
12485 case "properties":
12486 if v != nil {
12487 properties, err := unmarshalBasicEngineBase(*v)
12488 if err != nil {
12489 return err
12490 }
12491 ebr.Properties = properties
12492 }
12493 case "id":
12494 if v != nil {
12495 var ID string
12496 err = json.Unmarshal(*v, &ID)
12497 if err != nil {
12498 return err
12499 }
12500 ebr.ID = &ID
12501 }
12502 case "name":
12503 if v != nil {
12504 var name string
12505 err = json.Unmarshal(*v, &name)
12506 if err != nil {
12507 return err
12508 }
12509 ebr.Name = &name
12510 }
12511 case "type":
12512 if v != nil {
12513 var typeVar string
12514 err = json.Unmarshal(*v, &typeVar)
12515 if err != nil {
12516 return err
12517 }
12518 ebr.Type = &typeVar
12519 }
12520 case "location":
12521 if v != nil {
12522 var location string
12523 err = json.Unmarshal(*v, &location)
12524 if err != nil {
12525 return err
12526 }
12527 ebr.Location = &location
12528 }
12529 case "tags":
12530 if v != nil {
12531 var tags map[string]*string
12532 err = json.Unmarshal(*v, &tags)
12533 if err != nil {
12534 return err
12535 }
12536 ebr.Tags = tags
12537 }
12538 case "eTag":
12539 if v != nil {
12540 var eTag string
12541 err = json.Unmarshal(*v, &eTag)
12542 if err != nil {
12543 return err
12544 }
12545 ebr.ETag = &eTag
12546 }
12547 }
12548 }
12549
12550 return nil
12551 }
12552
12553
12554 type EngineBaseResourceList struct {
12555 autorest.Response `json:"-"`
12556
12557 Value *[]EngineBaseResource `json:"value,omitempty"`
12558
12559 NextLink *string `json:"nextLink,omitempty"`
12560 }
12561
12562
12563 type EngineBaseResourceListIterator struct {
12564 i int
12565 page EngineBaseResourceListPage
12566 }
12567
12568
12569
12570 func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) {
12571 if tracing.IsEnabled() {
12572 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext")
12573 defer func() {
12574 sc := -1
12575 if iter.Response().Response.Response != nil {
12576 sc = iter.Response().Response.Response.StatusCode
12577 }
12578 tracing.EndSpan(ctx, sc, err)
12579 }()
12580 }
12581 iter.i++
12582 if iter.i < len(iter.page.Values()) {
12583 return nil
12584 }
12585 err = iter.page.NextWithContext(ctx)
12586 if err != nil {
12587 iter.i--
12588 return err
12589 }
12590 iter.i = 0
12591 return nil
12592 }
12593
12594
12595
12596
12597 func (iter *EngineBaseResourceListIterator) Next() error {
12598 return iter.NextWithContext(context.Background())
12599 }
12600
12601
12602 func (iter EngineBaseResourceListIterator) NotDone() bool {
12603 return iter.page.NotDone() && iter.i < len(iter.page.Values())
12604 }
12605
12606
12607 func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList {
12608 return iter.page.Response()
12609 }
12610
12611
12612
12613 func (iter EngineBaseResourceListIterator) Value() EngineBaseResource {
12614 if !iter.page.NotDone() {
12615 return EngineBaseResource{}
12616 }
12617 return iter.page.Values()[iter.i]
12618 }
12619
12620
12621 func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator {
12622 return EngineBaseResourceListIterator{page: page}
12623 }
12624
12625
12626 func (ebrl EngineBaseResourceList) IsEmpty() bool {
12627 return ebrl.Value == nil || len(*ebrl.Value) == 0
12628 }
12629
12630
12631 func (ebrl EngineBaseResourceList) hasNextLink() bool {
12632 return ebrl.NextLink != nil && len(*ebrl.NextLink) != 0
12633 }
12634
12635
12636
12637 func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) {
12638 if !ebrl.hasNextLink() {
12639 return nil, nil
12640 }
12641 return autorest.Prepare((&http.Request{}).WithContext(ctx),
12642 autorest.AsJSON(),
12643 autorest.AsGet(),
12644 autorest.WithBaseURL(to.String(ebrl.NextLink)))
12645 }
12646
12647
12648 type EngineBaseResourceListPage struct {
12649 fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)
12650 ebrl EngineBaseResourceList
12651 }
12652
12653
12654
12655 func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) {
12656 if tracing.IsEnabled() {
12657 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext")
12658 defer func() {
12659 sc := -1
12660 if page.Response().Response.Response != nil {
12661 sc = page.Response().Response.Response.StatusCode
12662 }
12663 tracing.EndSpan(ctx, sc, err)
12664 }()
12665 }
12666 for {
12667 next, err := page.fn(ctx, page.ebrl)
12668 if err != nil {
12669 return err
12670 }
12671 page.ebrl = next
12672 if !next.hasNextLink() || !next.IsEmpty() {
12673 break
12674 }
12675 }
12676 return nil
12677 }
12678
12679
12680
12681
12682 func (page *EngineBaseResourceListPage) Next() error {
12683 return page.NextWithContext(context.Background())
12684 }
12685
12686
12687 func (page EngineBaseResourceListPage) NotDone() bool {
12688 return !page.ebrl.IsEmpty()
12689 }
12690
12691
12692 func (page EngineBaseResourceListPage) Response() EngineBaseResourceList {
12693 return page.ebrl
12694 }
12695
12696
12697 func (page EngineBaseResourceListPage) Values() []EngineBaseResource {
12698 if page.ebrl.IsEmpty() {
12699 return nil
12700 }
12701 return *page.ebrl.Value
12702 }
12703
12704
12705 func NewEngineBaseResourceListPage(cur EngineBaseResourceList, getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage {
12706 return EngineBaseResourceListPage{
12707 fn: getNextPage,
12708 ebrl: cur,
12709 }
12710 }
12711
12712
12713 type EngineExtendedInfo struct {
12714
12715 DatabaseName *string `json:"databaseName,omitempty"`
12716
12717 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
12718
12719 ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"`
12720
12721 DiskCount *int32 `json:"diskCount,omitempty"`
12722
12723 UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"`
12724
12725 AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"`
12726
12727 RefreshedAt *date.Time `json:"refreshedAt,omitempty"`
12728
12729 AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"`
12730 }
12731
12732
12733 type ErrorAdditionalInfo struct {
12734
12735 Type *string `json:"type,omitempty"`
12736
12737 Info interface{} `json:"info,omitempty"`
12738 }
12739
12740
12741 func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
12742 objectMap := make(map[string]interface{})
12743 return json.Marshal(objectMap)
12744 }
12745
12746
12747 type ErrorDetail struct {
12748
12749 Code *string `json:"code,omitempty"`
12750
12751 Message *string `json:"message,omitempty"`
12752
12753 Recommendations *[]string `json:"recommendations,omitempty"`
12754 }
12755
12756
12757 func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
12758 objectMap := make(map[string]interface{})
12759 return json.Marshal(objectMap)
12760 }
12761
12762
12763 type ExportJobsOperationResultInfo struct {
12764
12765 BlobURL *string `json:"blobUrl,omitempty"`
12766
12767 BlobSasKey *string `json:"blobSasKey,omitempty"`
12768
12769 ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"`
12770
12771 ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"`
12772
12773 ObjectType ObjectType `json:"objectType,omitempty"`
12774 }
12775
12776
12777 func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) {
12778 ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo
12779 objectMap := make(map[string]interface{})
12780 if ejori.BlobURL != nil {
12781 objectMap["blobUrl"] = ejori.BlobURL
12782 }
12783 if ejori.BlobSasKey != nil {
12784 objectMap["blobSasKey"] = ejori.BlobSasKey
12785 }
12786 if ejori.ExcelFileBlobURL != nil {
12787 objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL
12788 }
12789 if ejori.ExcelFileBlobSasKey != nil {
12790 objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey
12791 }
12792 if ejori.ObjectType != "" {
12793 objectMap["objectType"] = ejori.ObjectType
12794 }
12795 return json.Marshal(objectMap)
12796 }
12797
12798
12799 func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
12800 return &ejori, true
12801 }
12802
12803
12804 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
12805 return nil, false
12806 }
12807
12808
12809 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
12810 return nil, false
12811 }
12812
12813
12814 func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
12815 return &ejori, true
12816 }
12817
12818
12819 type ExtendedProperties struct {
12820
12821 DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"`
12822 }
12823
12824
12825 type BasicFeatureSupportRequest interface {
12826 AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool)
12827 AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool)
12828 AsFeatureSupportRequest() (*FeatureSupportRequest, bool)
12829 }
12830
12831
12832 type FeatureSupportRequest struct {
12833
12834 FeatureType FeatureType `json:"featureType,omitempty"`
12835 }
12836
12837 func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) {
12838 var m map[string]interface{}
12839 err := json.Unmarshal(body, &m)
12840 if err != nil {
12841 return nil, err
12842 }
12843
12844 switch m["featureType"] {
12845 case string(FeatureTypeAzureBackupGoals):
12846 var abgfsr AzureBackupGoalFeatureSupportRequest
12847 err := json.Unmarshal(body, &abgfsr)
12848 return abgfsr, err
12849 case string(FeatureTypeAzureVMResourceBackup):
12850 var avrfsr AzureVMResourceFeatureSupportRequest
12851 err := json.Unmarshal(body, &avrfsr)
12852 return avrfsr, err
12853 default:
12854 var fsr FeatureSupportRequest
12855 err := json.Unmarshal(body, &fsr)
12856 return fsr, err
12857 }
12858 }
12859 func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) {
12860 var rawMessages []*json.RawMessage
12861 err := json.Unmarshal(body, &rawMessages)
12862 if err != nil {
12863 return nil, err
12864 }
12865
12866 fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages))
12867
12868 for index, rawMessage := range rawMessages {
12869 fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage)
12870 if err != nil {
12871 return nil, err
12872 }
12873 fsrArray[index] = fsr
12874 }
12875 return fsrArray, nil
12876 }
12877
12878
12879 func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) {
12880 fsr.FeatureType = FeatureTypeFeatureSupportRequest
12881 objectMap := make(map[string]interface{})
12882 if fsr.FeatureType != "" {
12883 objectMap["featureType"] = fsr.FeatureType
12884 }
12885 return json.Marshal(objectMap)
12886 }
12887
12888
12889 func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
12890 return nil, false
12891 }
12892
12893
12894 func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
12895 return nil, false
12896 }
12897
12898
12899 func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
12900 return &fsr, true
12901 }
12902
12903
12904 func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
12905 return &fsr, true
12906 }
12907
12908
12909 type GenericContainer struct {
12910
12911 FabricName *string `json:"fabricName,omitempty"`
12912
12913 ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"`
12914
12915 FriendlyName *string `json:"friendlyName,omitempty"`
12916
12917 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12918
12919 RegistrationStatus *string `json:"registrationStatus,omitempty"`
12920
12921 HealthStatus *string `json:"healthStatus,omitempty"`
12922
12923 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
12924 }
12925
12926
12927 func (gc GenericContainer) MarshalJSON() ([]byte, error) {
12928 gc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeGenericContainer
12929 objectMap := make(map[string]interface{})
12930 if gc.FabricName != nil {
12931 objectMap["fabricName"] = gc.FabricName
12932 }
12933 if gc.ExtendedInformation != nil {
12934 objectMap["extendedInformation"] = gc.ExtendedInformation
12935 }
12936 if gc.FriendlyName != nil {
12937 objectMap["friendlyName"] = gc.FriendlyName
12938 }
12939 if gc.BackupManagementType != "" {
12940 objectMap["backupManagementType"] = gc.BackupManagementType
12941 }
12942 if gc.RegistrationStatus != nil {
12943 objectMap["registrationStatus"] = gc.RegistrationStatus
12944 }
12945 if gc.HealthStatus != nil {
12946 objectMap["healthStatus"] = gc.HealthStatus
12947 }
12948 if gc.ContainerType != "" {
12949 objectMap["containerType"] = gc.ContainerType
12950 }
12951 return json.Marshal(objectMap)
12952 }
12953
12954
12955 func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
12956 return nil, false
12957 }
12958
12959
12960 func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
12961 return nil, false
12962 }
12963
12964
12965 func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
12966 return nil, false
12967 }
12968
12969
12970 func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
12971 return nil, false
12972 }
12973
12974
12975 func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
12976 return nil, false
12977 }
12978
12979
12980 func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
12981 return nil, false
12982 }
12983
12984
12985 func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
12986 return nil, false
12987 }
12988
12989
12990 func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
12991 return nil, false
12992 }
12993
12994
12995 func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
12996 return nil, false
12997 }
12998
12999
13000 func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) {
13001 return nil, false
13002 }
13003
13004
13005 func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13006 return nil, false
13007 }
13008
13009
13010 func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) {
13011 return &gc, true
13012 }
13013
13014
13015 func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13016 return nil, false
13017 }
13018
13019
13020 func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13021 return nil, false
13022 }
13023
13024
13025 func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) {
13026 return nil, false
13027 }
13028
13029
13030 func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13031 return nil, false
13032 }
13033
13034
13035 func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13036 return &gc, true
13037 }
13038
13039
13040 type GenericContainerExtendedInfo struct {
13041
13042 RawCertData *string `json:"rawCertData,omitempty"`
13043
13044 ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"`
13045
13046 ServiceEndpoints map[string]*string `json:"serviceEndpoints"`
13047 }
13048
13049
13050 func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) {
13051 objectMap := make(map[string]interface{})
13052 if gcei.RawCertData != nil {
13053 objectMap["rawCertData"] = gcei.RawCertData
13054 }
13055 if gcei.ContainerIdentityInfo != nil {
13056 objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo
13057 }
13058 if gcei.ServiceEndpoints != nil {
13059 objectMap["serviceEndpoints"] = gcei.ServiceEndpoints
13060 }
13061 return json.Marshal(objectMap)
13062 }
13063
13064
13065 type GenericProtectedItem struct {
13066
13067 FriendlyName *string `json:"friendlyName,omitempty"`
13068
13069 PolicyState *string `json:"policyState,omitempty"`
13070
13071 ProtectionState ProtectionState `json:"protectionState,omitempty"`
13072
13073 ProtectedItemID *int64 `json:"protectedItemId,omitempty"`
13074
13075 SourceAssociations map[string]*string `json:"sourceAssociations"`
13076
13077 FabricName *string `json:"fabricName,omitempty"`
13078
13079 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13080
13081 WorkloadType DataSourceType `json:"workloadType,omitempty"`
13082
13083 ContainerName *string `json:"containerName,omitempty"`
13084
13085 SourceResourceID *string `json:"sourceResourceId,omitempty"`
13086
13087 PolicyID *string `json:"policyId,omitempty"`
13088
13089 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
13090
13091 BackupSetName *string `json:"backupSetName,omitempty"`
13092
13093 CreateMode CreateMode `json:"createMode,omitempty"`
13094
13095 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
13096
13097 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
13098
13099 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
13100
13101 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
13102
13103 IsRehydrate *bool `json:"isRehydrate,omitempty"`
13104
13105 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
13106 }
13107
13108
13109 func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) {
13110 gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem
13111 objectMap := make(map[string]interface{})
13112 if gpi.FriendlyName != nil {
13113 objectMap["friendlyName"] = gpi.FriendlyName
13114 }
13115 if gpi.PolicyState != nil {
13116 objectMap["policyState"] = gpi.PolicyState
13117 }
13118 if gpi.ProtectionState != "" {
13119 objectMap["protectionState"] = gpi.ProtectionState
13120 }
13121 if gpi.ProtectedItemID != nil {
13122 objectMap["protectedItemId"] = gpi.ProtectedItemID
13123 }
13124 if gpi.SourceAssociations != nil {
13125 objectMap["sourceAssociations"] = gpi.SourceAssociations
13126 }
13127 if gpi.FabricName != nil {
13128 objectMap["fabricName"] = gpi.FabricName
13129 }
13130 if gpi.BackupManagementType != "" {
13131 objectMap["backupManagementType"] = gpi.BackupManagementType
13132 }
13133 if gpi.WorkloadType != "" {
13134 objectMap["workloadType"] = gpi.WorkloadType
13135 }
13136 if gpi.ContainerName != nil {
13137 objectMap["containerName"] = gpi.ContainerName
13138 }
13139 if gpi.SourceResourceID != nil {
13140 objectMap["sourceResourceId"] = gpi.SourceResourceID
13141 }
13142 if gpi.PolicyID != nil {
13143 objectMap["policyId"] = gpi.PolicyID
13144 }
13145 if gpi.LastRecoveryPoint != nil {
13146 objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint
13147 }
13148 if gpi.BackupSetName != nil {
13149 objectMap["backupSetName"] = gpi.BackupSetName
13150 }
13151 if gpi.CreateMode != "" {
13152 objectMap["createMode"] = gpi.CreateMode
13153 }
13154 if gpi.DeferredDeleteTimeInUTC != nil {
13155 objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC
13156 }
13157 if gpi.IsScheduledForDeferredDelete != nil {
13158 objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete
13159 }
13160 if gpi.DeferredDeleteTimeRemaining != nil {
13161 objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining
13162 }
13163 if gpi.IsDeferredDeleteScheduleUpcoming != nil {
13164 objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming
13165 }
13166 if gpi.IsRehydrate != nil {
13167 objectMap["isRehydrate"] = gpi.IsRehydrate
13168 }
13169 if gpi.ProtectedItemType != "" {
13170 objectMap["protectedItemType"] = gpi.ProtectedItemType
13171 }
13172 return json.Marshal(objectMap)
13173 }
13174
13175
13176 func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
13177 return nil, false
13178 }
13179
13180
13181 func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
13182 return nil, false
13183 }
13184
13185
13186 func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
13187 return nil, false
13188 }
13189
13190
13191 func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
13192 return nil, false
13193 }
13194
13195
13196 func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
13197 return nil, false
13198 }
13199
13200
13201 func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
13202 return nil, false
13203 }
13204
13205
13206 func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
13207 return nil, false
13208 }
13209
13210
13211 func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
13212 return nil, false
13213 }
13214
13215
13216 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
13217 return nil, false
13218 }
13219
13220
13221 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
13222 return nil, false
13223 }
13224
13225
13226 func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
13227 return nil, false
13228 }
13229
13230
13231 func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
13232 return nil, false
13233 }
13234
13235
13236 func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
13237 return &gpi, true
13238 }
13239
13240
13241 func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
13242 return nil, false
13243 }
13244
13245
13246 func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
13247 return nil, false
13248 }
13249
13250
13251 func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
13252 return &gpi, true
13253 }
13254
13255
13256 type GenericProtectionPolicy struct {
13257
13258 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
13259
13260 TimeZone *string `json:"timeZone,omitempty"`
13261
13262 FabricName *string `json:"fabricName,omitempty"`
13263
13264 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
13265
13266 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
13267 }
13268
13269
13270 func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) {
13271 gpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy
13272 objectMap := make(map[string]interface{})
13273 if gpp.SubProtectionPolicy != nil {
13274 objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy
13275 }
13276 if gpp.TimeZone != nil {
13277 objectMap["timeZone"] = gpp.TimeZone
13278 }
13279 if gpp.FabricName != nil {
13280 objectMap["fabricName"] = gpp.FabricName
13281 }
13282 if gpp.ProtectedItemsCount != nil {
13283 objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount
13284 }
13285 if gpp.BackupManagementType != "" {
13286 objectMap["backupManagementType"] = gpp.BackupManagementType
13287 }
13288 return json.Marshal(objectMap)
13289 }
13290
13291
13292 func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
13293 return nil, false
13294 }
13295
13296
13297 func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
13298 return nil, false
13299 }
13300
13301
13302 func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
13303 return nil, false
13304 }
13305
13306
13307 func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
13308 return nil, false
13309 }
13310
13311
13312 func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
13313 return &gpp, true
13314 }
13315
13316
13317 func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
13318 return nil, false
13319 }
13320
13321
13322 func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
13323 return nil, false
13324 }
13325
13326
13327 func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
13328 return &gpp, true
13329 }
13330
13331
13332 type GenericRecoveryPoint struct {
13333
13334 FriendlyName *string `json:"friendlyName,omitempty"`
13335
13336 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
13337
13338 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
13339
13340 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
13341
13342 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
13343 }
13344
13345
13346 func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) {
13347 grp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint
13348 objectMap := make(map[string]interface{})
13349 if grp.FriendlyName != nil {
13350 objectMap["friendlyName"] = grp.FriendlyName
13351 }
13352 if grp.RecoveryPointType != nil {
13353 objectMap["recoveryPointType"] = grp.RecoveryPointType
13354 }
13355 if grp.RecoveryPointTime != nil {
13356 objectMap["recoveryPointTime"] = grp.RecoveryPointTime
13357 }
13358 if grp.RecoveryPointAdditionalInfo != nil {
13359 objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo
13360 }
13361 if grp.ObjectType != "" {
13362 objectMap["objectType"] = grp.ObjectType
13363 }
13364 return json.Marshal(objectMap)
13365 }
13366
13367
13368 func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
13369 return nil, false
13370 }
13371
13372
13373 func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
13374 return nil, false
13375 }
13376
13377
13378 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
13379 return nil, false
13380 }
13381
13382
13383 func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
13384 return nil, false
13385 }
13386
13387
13388 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
13389 return nil, false
13390 }
13391
13392
13393 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
13394 return nil, false
13395 }
13396
13397
13398 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
13399 return nil, false
13400 }
13401
13402
13403 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
13404 return nil, false
13405 }
13406
13407
13408 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
13409 return nil, false
13410 }
13411
13412
13413 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
13414 return nil, false
13415 }
13416
13417
13418 func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
13419 return &grp, true
13420 }
13421
13422
13423 func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
13424 return nil, false
13425 }
13426
13427
13428 func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
13429 return nil, false
13430 }
13431
13432
13433 func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
13434 return &grp, true
13435 }
13436
13437
13438 type GetProtectedItemQueryObject struct {
13439
13440 Expand *string `json:"expand,omitempty"`
13441 }
13442
13443
13444 type IaasVMBackupRequest struct {
13445
13446 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
13447
13448 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
13449 }
13450
13451
13452 func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) {
13453 ivbr.ObjectType = ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest
13454 objectMap := make(map[string]interface{})
13455 if ivbr.RecoveryPointExpiryTimeInUTC != nil {
13456 objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC
13457 }
13458 if ivbr.ObjectType != "" {
13459 objectMap["objectType"] = ivbr.ObjectType
13460 }
13461 return json.Marshal(objectMap)
13462 }
13463
13464
13465 func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
13466 return nil, false
13467 }
13468
13469
13470 func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
13471 return nil, false
13472 }
13473
13474
13475 func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
13476 return &ivbr, true
13477 }
13478
13479
13480 func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) {
13481 return nil, false
13482 }
13483
13484
13485 func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) {
13486 return &ivbr, true
13487 }
13488
13489
13490 type BasicIaaSVMContainer interface {
13491 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
13492 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
13493 AsIaaSVMContainer() (*IaaSVMContainer, bool)
13494 }
13495
13496
13497 type IaaSVMContainer struct {
13498
13499 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13500
13501 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
13502
13503 ResourceGroup *string `json:"resourceGroup,omitempty"`
13504
13505 FriendlyName *string `json:"friendlyName,omitempty"`
13506
13507 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13508
13509 RegistrationStatus *string `json:"registrationStatus,omitempty"`
13510
13511 HealthStatus *string `json:"healthStatus,omitempty"`
13512
13513 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
13514 }
13515
13516 func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) {
13517 var m map[string]interface{}
13518 err := json.Unmarshal(body, &m)
13519 if err != nil {
13520 return nil, err
13521 }
13522
13523 switch m["containerType"] {
13524 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines):
13525 var aisccvc AzureIaaSClassicComputeVMContainer
13526 err := json.Unmarshal(body, &aisccvc)
13527 return aisccvc, err
13528 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines):
13529 var aiscvc AzureIaaSComputeVMContainer
13530 err := json.Unmarshal(body, &aiscvc)
13531 return aiscvc, err
13532 default:
13533 var isc IaaSVMContainer
13534 err := json.Unmarshal(body, &isc)
13535 return isc, err
13536 }
13537 }
13538 func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) {
13539 var rawMessages []*json.RawMessage
13540 err := json.Unmarshal(body, &rawMessages)
13541 if err != nil {
13542 return nil, err
13543 }
13544
13545 iscArray := make([]BasicIaaSVMContainer, len(rawMessages))
13546
13547 for index, rawMessage := range rawMessages {
13548 isc, err := unmarshalBasicIaaSVMContainer(*rawMessage)
13549 if err != nil {
13550 return nil, err
13551 }
13552 iscArray[index] = isc
13553 }
13554 return iscArray, nil
13555 }
13556
13557
13558 func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) {
13559 isc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer
13560 objectMap := make(map[string]interface{})
13561 if isc.VirtualMachineID != nil {
13562 objectMap["virtualMachineId"] = isc.VirtualMachineID
13563 }
13564 if isc.VirtualMachineVersion != nil {
13565 objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion
13566 }
13567 if isc.ResourceGroup != nil {
13568 objectMap["resourceGroup"] = isc.ResourceGroup
13569 }
13570 if isc.FriendlyName != nil {
13571 objectMap["friendlyName"] = isc.FriendlyName
13572 }
13573 if isc.BackupManagementType != "" {
13574 objectMap["backupManagementType"] = isc.BackupManagementType
13575 }
13576 if isc.RegistrationStatus != nil {
13577 objectMap["registrationStatus"] = isc.RegistrationStatus
13578 }
13579 if isc.HealthStatus != nil {
13580 objectMap["healthStatus"] = isc.HealthStatus
13581 }
13582 if isc.ContainerType != "" {
13583 objectMap["containerType"] = isc.ContainerType
13584 }
13585 return json.Marshal(objectMap)
13586 }
13587
13588
13589 func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
13590 return nil, false
13591 }
13592
13593
13594 func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
13595 return nil, false
13596 }
13597
13598
13599 func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
13600 return nil, false
13601 }
13602
13603
13604 func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
13605 return nil, false
13606 }
13607
13608
13609 func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
13610 return nil, false
13611 }
13612
13613
13614 func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
13615 return nil, false
13616 }
13617
13618
13619 func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
13620 return nil, false
13621 }
13622
13623
13624 func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
13625 return nil, false
13626 }
13627
13628
13629 func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
13630 return nil, false
13631 }
13632
13633
13634 func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) {
13635 return nil, false
13636 }
13637
13638
13639 func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13640 return nil, false
13641 }
13642
13643
13644 func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) {
13645 return nil, false
13646 }
13647
13648
13649 func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13650 return &isc, true
13651 }
13652
13653
13654 func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13655 return &isc, true
13656 }
13657
13658
13659 func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) {
13660 return nil, false
13661 }
13662
13663
13664 func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13665 return nil, false
13666 }
13667
13668
13669 func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13670 return &isc, true
13671 }
13672
13673
13674 type IaasVMILRRegistrationRequest struct {
13675
13676 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
13677
13678 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13679
13680 InitiatorName *string `json:"initiatorName,omitempty"`
13681
13682 RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"`
13683
13684 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
13685 }
13686
13687
13688 func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) {
13689 ivrr.ObjectType = ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest
13690 objectMap := make(map[string]interface{})
13691 if ivrr.RecoveryPointID != nil {
13692 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
13693 }
13694 if ivrr.VirtualMachineID != nil {
13695 objectMap["virtualMachineId"] = ivrr.VirtualMachineID
13696 }
13697 if ivrr.InitiatorName != nil {
13698 objectMap["initiatorName"] = ivrr.InitiatorName
13699 }
13700 if ivrr.RenewExistingRegistration != nil {
13701 objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration
13702 }
13703 if ivrr.ObjectType != "" {
13704 objectMap["objectType"] = ivrr.ObjectType
13705 }
13706 return json.Marshal(objectMap)
13707 }
13708
13709
13710 func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
13711 return nil, false
13712 }
13713
13714
13715 func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
13716 return &ivrr, true
13717 }
13718
13719
13720 func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) {
13721 return nil, false
13722 }
13723
13724
13725 func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
13726 return &ivrr, true
13727 }
13728
13729
13730 type BasicIaaSVMProtectableItem interface {
13731 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
13732 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
13733 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
13734 }
13735
13736
13737 type IaaSVMProtectableItem struct {
13738
13739 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13740
13741 BackupManagementType *string `json:"backupManagementType,omitempty"`
13742
13743 WorkloadType *string `json:"workloadType,omitempty"`
13744
13745 FriendlyName *string `json:"friendlyName,omitempty"`
13746
13747 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
13748
13749 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
13750 }
13751
13752 func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) {
13753 var m map[string]interface{}
13754 err := json.Unmarshal(body, &m)
13755 if err != nil {
13756 return nil, err
13757 }
13758
13759 switch m["protectableItemType"] {
13760 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
13761 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
13762 err := json.Unmarshal(body, &aisccvpi)
13763 return aisccvpi, err
13764 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
13765 var aiscvpi AzureIaaSComputeVMProtectableItem
13766 err := json.Unmarshal(body, &aiscvpi)
13767 return aiscvpi, err
13768 default:
13769 var ispi IaaSVMProtectableItem
13770 err := json.Unmarshal(body, &ispi)
13771 return ispi, err
13772 }
13773 }
13774 func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) {
13775 var rawMessages []*json.RawMessage
13776 err := json.Unmarshal(body, &rawMessages)
13777 if err != nil {
13778 return nil, err
13779 }
13780
13781 ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages))
13782
13783 for index, rawMessage := range rawMessages {
13784 ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage)
13785 if err != nil {
13786 return nil, err
13787 }
13788 ispiArray[index] = ispi
13789 }
13790 return ispiArray, nil
13791 }
13792
13793
13794 func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) {
13795 ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem
13796 objectMap := make(map[string]interface{})
13797 if ispi.VirtualMachineID != nil {
13798 objectMap["virtualMachineId"] = ispi.VirtualMachineID
13799 }
13800 if ispi.BackupManagementType != nil {
13801 objectMap["backupManagementType"] = ispi.BackupManagementType
13802 }
13803 if ispi.WorkloadType != nil {
13804 objectMap["workloadType"] = ispi.WorkloadType
13805 }
13806 if ispi.FriendlyName != nil {
13807 objectMap["friendlyName"] = ispi.FriendlyName
13808 }
13809 if ispi.ProtectionState != "" {
13810 objectMap["protectionState"] = ispi.ProtectionState
13811 }
13812 if ispi.ProtectableItemType != "" {
13813 objectMap["protectableItemType"] = ispi.ProtectableItemType
13814 }
13815 return json.Marshal(objectMap)
13816 }
13817
13818
13819 func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
13820 return nil, false
13821 }
13822
13823
13824 func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
13825 return nil, false
13826 }
13827
13828
13829 func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
13830 return nil, false
13831 }
13832
13833
13834 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
13835 return nil, false
13836 }
13837
13838
13839 func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
13840 return nil, false
13841 }
13842
13843
13844 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
13845 return nil, false
13846 }
13847
13848
13849 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
13850 return nil, false
13851 }
13852
13853
13854 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
13855 return nil, false
13856 }
13857
13858
13859 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
13860 return nil, false
13861 }
13862
13863
13864 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
13865 return nil, false
13866 }
13867
13868
13869 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
13870 return nil, false
13871 }
13872
13873
13874 func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
13875 return &ispi, true
13876 }
13877
13878
13879 func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
13880 return &ispi, true
13881 }
13882
13883
13884 func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
13885 return nil, false
13886 }
13887
13888
13889 func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
13890 return &ispi, true
13891 }
13892
13893
13894 type IaasVMRecoveryPoint struct {
13895
13896 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
13897
13898 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
13899
13900 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
13901
13902 SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"`
13903
13904 IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"`
13905
13906 KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"`
13907
13908 IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"`
13909
13910 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
13911
13912 IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"`
13913
13914 VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
13915
13916 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
13917
13918 OsType *string `json:"osType,omitempty"`
13919
13920 RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"`
13921
13922 Zones *[]string `json:"zones,omitempty"`
13923
13924 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
13925
13926 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
13927 }
13928
13929
13930 func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) {
13931 ivrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint
13932 objectMap := make(map[string]interface{})
13933 if ivrp.KeyAndSecret != nil {
13934 objectMap["keyAndSecret"] = ivrp.KeyAndSecret
13935 }
13936 if ivrp.IsInstantIlrSessionActive != nil {
13937 objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive
13938 }
13939 if ivrp.RecoveryPointTierDetails != nil {
13940 objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails
13941 }
13942 if ivrp.IsManagedVirtualMachine != nil {
13943 objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine
13944 }
13945 if ivrp.VirtualMachineSize != nil {
13946 objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize
13947 }
13948 if ivrp.OriginalStorageAccountOption != nil {
13949 objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption
13950 }
13951 if ivrp.OsType != nil {
13952 objectMap["osType"] = ivrp.OsType
13953 }
13954 if ivrp.RecoveryPointDiskConfiguration != nil {
13955 objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration
13956 }
13957 if ivrp.Zones != nil {
13958 objectMap["zones"] = ivrp.Zones
13959 }
13960 if ivrp.RecoveryPointMoveReadinessInfo != nil {
13961 objectMap["recoveryPointMoveReadinessInfo"] = ivrp.RecoveryPointMoveReadinessInfo
13962 }
13963 if ivrp.ObjectType != "" {
13964 objectMap["objectType"] = ivrp.ObjectType
13965 }
13966 return json.Marshal(objectMap)
13967 }
13968
13969
13970 func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
13971 return nil, false
13972 }
13973
13974
13975 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
13976 return nil, false
13977 }
13978
13979
13980 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
13981 return nil, false
13982 }
13983
13984
13985 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
13986 return nil, false
13987 }
13988
13989
13990 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
13991 return nil, false
13992 }
13993
13994
13995 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
13996 return nil, false
13997 }
13998
13999
14000 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
14001 return nil, false
14002 }
14003
14004
14005 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
14006 return nil, false
14007 }
14008
14009
14010 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
14011 return nil, false
14012 }
14013
14014
14015 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
14016 return nil, false
14017 }
14018
14019
14020 func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
14021 return nil, false
14022 }
14023
14024
14025 func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
14026 return &ivrp, true
14027 }
14028
14029
14030 func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
14031 return nil, false
14032 }
14033
14034
14035 func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
14036 return &ivrp, true
14037 }
14038
14039
14040 type BasicIaasVMRestoreRequest interface {
14041 AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool)
14042 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
14043 }
14044
14045
14046 type IaasVMRestoreRequest struct {
14047
14048 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
14049
14050 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
14051
14052 SourceResourceID *string `json:"sourceResourceId,omitempty"`
14053
14054
14055 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
14056
14057
14058 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
14059
14060 StorageAccountID *string `json:"storageAccountId,omitempty"`
14061
14062
14063 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
14064
14065
14066
14067 SubnetID *string `json:"subnetId,omitempty"`
14068
14069
14070 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
14071
14072 Region *string `json:"region,omitempty"`
14073
14074 AffinityGroup *string `json:"affinityGroup,omitempty"`
14075
14076
14077 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
14078
14079 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14080
14081 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
14082
14083 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
14084
14085 RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"`
14086
14087 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
14088
14089 Zones *[]string `json:"zones,omitempty"`
14090
14091 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
14092 }
14093
14094 func unmarshalBasicIaasVMRestoreRequest(body []byte) (BasicIaasVMRestoreRequest, error) {
14095 var m map[string]interface{}
14096 err := json.Unmarshal(body, &m)
14097 if err != nil {
14098 return nil, err
14099 }
14100
14101 switch m["objectType"] {
14102 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest):
14103 var ivrwrr IaasVMRestoreWithRehydrationRequest
14104 err := json.Unmarshal(body, &ivrwrr)
14105 return ivrwrr, err
14106 default:
14107 var ivrr IaasVMRestoreRequest
14108 err := json.Unmarshal(body, &ivrr)
14109 return ivrr, err
14110 }
14111 }
14112 func unmarshalBasicIaasVMRestoreRequestArray(body []byte) ([]BasicIaasVMRestoreRequest, error) {
14113 var rawMessages []*json.RawMessage
14114 err := json.Unmarshal(body, &rawMessages)
14115 if err != nil {
14116 return nil, err
14117 }
14118
14119 ivrrArray := make([]BasicIaasVMRestoreRequest, len(rawMessages))
14120
14121 for index, rawMessage := range rawMessages {
14122 ivrr, err := unmarshalBasicIaasVMRestoreRequest(*rawMessage)
14123 if err != nil {
14124 return nil, err
14125 }
14126 ivrrArray[index] = ivrr
14127 }
14128 return ivrrArray, nil
14129 }
14130
14131
14132 func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) {
14133 ivrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest
14134 objectMap := make(map[string]interface{})
14135 if ivrr.RecoveryPointID != nil {
14136 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
14137 }
14138 if ivrr.RecoveryType != "" {
14139 objectMap["recoveryType"] = ivrr.RecoveryType
14140 }
14141 if ivrr.SourceResourceID != nil {
14142 objectMap["sourceResourceId"] = ivrr.SourceResourceID
14143 }
14144 if ivrr.TargetVirtualMachineID != nil {
14145 objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID
14146 }
14147 if ivrr.TargetResourceGroupID != nil {
14148 objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID
14149 }
14150 if ivrr.StorageAccountID != nil {
14151 objectMap["storageAccountId"] = ivrr.StorageAccountID
14152 }
14153 if ivrr.VirtualNetworkID != nil {
14154 objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID
14155 }
14156 if ivrr.SubnetID != nil {
14157 objectMap["subnetId"] = ivrr.SubnetID
14158 }
14159 if ivrr.TargetDomainNameID != nil {
14160 objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID
14161 }
14162 if ivrr.Region != nil {
14163 objectMap["region"] = ivrr.Region
14164 }
14165 if ivrr.AffinityGroup != nil {
14166 objectMap["affinityGroup"] = ivrr.AffinityGroup
14167 }
14168 if ivrr.CreateNewCloudService != nil {
14169 objectMap["createNewCloudService"] = ivrr.CreateNewCloudService
14170 }
14171 if ivrr.OriginalStorageAccountOption != nil {
14172 objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption
14173 }
14174 if ivrr.EncryptionDetails != nil {
14175 objectMap["encryptionDetails"] = ivrr.EncryptionDetails
14176 }
14177 if ivrr.RestoreDiskLunList != nil {
14178 objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList
14179 }
14180 if ivrr.RestoreWithManagedDisks != nil {
14181 objectMap["restoreWithManagedDisks"] = ivrr.RestoreWithManagedDisks
14182 }
14183 if ivrr.DiskEncryptionSetID != nil {
14184 objectMap["diskEncryptionSetId"] = ivrr.DiskEncryptionSetID
14185 }
14186 if ivrr.Zones != nil {
14187 objectMap["zones"] = ivrr.Zones
14188 }
14189 if ivrr.ObjectType != "" {
14190 objectMap["objectType"] = ivrr.ObjectType
14191 }
14192 return json.Marshal(objectMap)
14193 }
14194
14195
14196 func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
14197 return nil, false
14198 }
14199
14200
14201 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
14202 return nil, false
14203 }
14204
14205
14206 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
14207 return nil, false
14208 }
14209
14210
14211 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
14212 return nil, false
14213 }
14214
14215
14216 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14217 return nil, false
14218 }
14219
14220
14221 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14222 return nil, false
14223 }
14224
14225
14226 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
14227 return nil, false
14228 }
14229
14230
14231 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
14232 return nil, false
14233 }
14234
14235
14236 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14237 return nil, false
14238 }
14239
14240
14241 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14242 return nil, false
14243 }
14244
14245
14246 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
14247 return nil, false
14248 }
14249
14250
14251 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
14252 return nil, false
14253 }
14254
14255
14256 func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
14257 return &ivrr, true
14258 }
14259
14260
14261 func (ivrr IaasVMRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
14262 return &ivrr, true
14263 }
14264
14265
14266 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
14267 return nil, false
14268 }
14269
14270
14271 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
14272 return nil, false
14273 }
14274
14275
14276 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
14277 return nil, false
14278 }
14279
14280
14281 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
14282 return nil, false
14283 }
14284
14285
14286 func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
14287 return nil, false
14288 }
14289
14290
14291 func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
14292 return nil, false
14293 }
14294
14295
14296 func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
14297 return &ivrr, true
14298 }
14299
14300
14301
14302 type IaasVMRestoreWithRehydrationRequest struct {
14303
14304 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
14305
14306 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
14307
14308 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
14309
14310 SourceResourceID *string `json:"sourceResourceId,omitempty"`
14311
14312
14313 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
14314
14315
14316 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
14317
14318 StorageAccountID *string `json:"storageAccountId,omitempty"`
14319
14320
14321 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
14322
14323
14324
14325 SubnetID *string `json:"subnetId,omitempty"`
14326
14327
14328 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
14329
14330 Region *string `json:"region,omitempty"`
14331
14332 AffinityGroup *string `json:"affinityGroup,omitempty"`
14333
14334
14335 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
14336
14337 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14338
14339 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
14340
14341 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
14342
14343 RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"`
14344
14345 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
14346
14347 Zones *[]string `json:"zones,omitempty"`
14348
14349 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
14350 }
14351
14352
14353 func (ivrwrr IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) {
14354 ivrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest
14355 objectMap := make(map[string]interface{})
14356 if ivrwrr.RecoveryPointRehydrationInfo != nil {
14357 objectMap["recoveryPointRehydrationInfo"] = ivrwrr.RecoveryPointRehydrationInfo
14358 }
14359 if ivrwrr.RecoveryPointID != nil {
14360 objectMap["recoveryPointId"] = ivrwrr.RecoveryPointID
14361 }
14362 if ivrwrr.RecoveryType != "" {
14363 objectMap["recoveryType"] = ivrwrr.RecoveryType
14364 }
14365 if ivrwrr.SourceResourceID != nil {
14366 objectMap["sourceResourceId"] = ivrwrr.SourceResourceID
14367 }
14368 if ivrwrr.TargetVirtualMachineID != nil {
14369 objectMap["targetVirtualMachineId"] = ivrwrr.TargetVirtualMachineID
14370 }
14371 if ivrwrr.TargetResourceGroupID != nil {
14372 objectMap["targetResourceGroupId"] = ivrwrr.TargetResourceGroupID
14373 }
14374 if ivrwrr.StorageAccountID != nil {
14375 objectMap["storageAccountId"] = ivrwrr.StorageAccountID
14376 }
14377 if ivrwrr.VirtualNetworkID != nil {
14378 objectMap["virtualNetworkId"] = ivrwrr.VirtualNetworkID
14379 }
14380 if ivrwrr.SubnetID != nil {
14381 objectMap["subnetId"] = ivrwrr.SubnetID
14382 }
14383 if ivrwrr.TargetDomainNameID != nil {
14384 objectMap["targetDomainNameId"] = ivrwrr.TargetDomainNameID
14385 }
14386 if ivrwrr.Region != nil {
14387 objectMap["region"] = ivrwrr.Region
14388 }
14389 if ivrwrr.AffinityGroup != nil {
14390 objectMap["affinityGroup"] = ivrwrr.AffinityGroup
14391 }
14392 if ivrwrr.CreateNewCloudService != nil {
14393 objectMap["createNewCloudService"] = ivrwrr.CreateNewCloudService
14394 }
14395 if ivrwrr.OriginalStorageAccountOption != nil {
14396 objectMap["originalStorageAccountOption"] = ivrwrr.OriginalStorageAccountOption
14397 }
14398 if ivrwrr.EncryptionDetails != nil {
14399 objectMap["encryptionDetails"] = ivrwrr.EncryptionDetails
14400 }
14401 if ivrwrr.RestoreDiskLunList != nil {
14402 objectMap["restoreDiskLunList"] = ivrwrr.RestoreDiskLunList
14403 }
14404 if ivrwrr.RestoreWithManagedDisks != nil {
14405 objectMap["restoreWithManagedDisks"] = ivrwrr.RestoreWithManagedDisks
14406 }
14407 if ivrwrr.DiskEncryptionSetID != nil {
14408 objectMap["diskEncryptionSetId"] = ivrwrr.DiskEncryptionSetID
14409 }
14410 if ivrwrr.Zones != nil {
14411 objectMap["zones"] = ivrwrr.Zones
14412 }
14413 if ivrwrr.ObjectType != "" {
14414 objectMap["objectType"] = ivrwrr.ObjectType
14415 }
14416 return json.Marshal(objectMap)
14417 }
14418
14419
14420 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
14421 return nil, false
14422 }
14423
14424
14425 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
14426 return nil, false
14427 }
14428
14429
14430 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
14431 return nil, false
14432 }
14433
14434
14435 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
14436 return nil, false
14437 }
14438
14439
14440 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14441 return nil, false
14442 }
14443
14444
14445 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14446 return nil, false
14447 }
14448
14449
14450 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
14451 return nil, false
14452 }
14453
14454
14455 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
14456 return nil, false
14457 }
14458
14459
14460 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14461 return nil, false
14462 }
14463
14464
14465 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14466 return nil, false
14467 }
14468
14469
14470 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
14471 return nil, false
14472 }
14473
14474
14475 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
14476 return nil, false
14477 }
14478
14479
14480 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
14481 return nil, false
14482 }
14483
14484
14485 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
14486 return &ivrwrr, true
14487 }
14488
14489
14490 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
14491 return nil, false
14492 }
14493
14494
14495 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
14496 return nil, false
14497 }
14498
14499
14500 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
14501 return nil, false
14502 }
14503
14504
14505 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
14506 return nil, false
14507 }
14508
14509
14510 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
14511 return &ivrwrr, true
14512 }
14513
14514
14515 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsRestoreRequest() (*RestoreRequest, bool) {
14516 return nil, false
14517 }
14518
14519
14520 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
14521 return &ivrwrr, true
14522 }
14523
14524
14525 type BasicILRRequest interface {
14526 AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool)
14527 AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool)
14528 AsILRRequest() (*ILRRequest, bool)
14529 }
14530
14531
14532 type ILRRequest struct {
14533
14534 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
14535 }
14536
14537 func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) {
14538 var m map[string]interface{}
14539 err := json.Unmarshal(body, &m)
14540 if err != nil {
14541 return nil, err
14542 }
14543
14544 switch m["objectType"] {
14545 case string(ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest):
14546 var afspir AzureFileShareProvisionILRRequest
14547 err := json.Unmarshal(body, &afspir)
14548 return afspir, err
14549 case string(ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest):
14550 var ivrr IaasVMILRRegistrationRequest
14551 err := json.Unmarshal(body, &ivrr)
14552 return ivrr, err
14553 default:
14554 var ir ILRRequest
14555 err := json.Unmarshal(body, &ir)
14556 return ir, err
14557 }
14558 }
14559 func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) {
14560 var rawMessages []*json.RawMessage
14561 err := json.Unmarshal(body, &rawMessages)
14562 if err != nil {
14563 return nil, err
14564 }
14565
14566 irArray := make([]BasicILRRequest, len(rawMessages))
14567
14568 for index, rawMessage := range rawMessages {
14569 ir, err := unmarshalBasicILRRequest(*rawMessage)
14570 if err != nil {
14571 return nil, err
14572 }
14573 irArray[index] = ir
14574 }
14575 return irArray, nil
14576 }
14577
14578
14579 func (ir ILRRequest) MarshalJSON() ([]byte, error) {
14580 ir.ObjectType = ObjectTypeBasicILRRequestObjectTypeILRRequest
14581 objectMap := make(map[string]interface{})
14582 if ir.ObjectType != "" {
14583 objectMap["objectType"] = ir.ObjectType
14584 }
14585 return json.Marshal(objectMap)
14586 }
14587
14588
14589 func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
14590 return nil, false
14591 }
14592
14593
14594 func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
14595 return nil, false
14596 }
14597
14598
14599 func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) {
14600 return &ir, true
14601 }
14602
14603
14604 func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
14605 return &ir, true
14606 }
14607
14608
14609 type ILRRequestResource struct {
14610
14611 Properties BasicILRRequest `json:"properties,omitempty"`
14612
14613 ID *string `json:"id,omitempty"`
14614
14615 Name *string `json:"name,omitempty"`
14616
14617 Type *string `json:"type,omitempty"`
14618
14619 Location *string `json:"location,omitempty"`
14620
14621 Tags map[string]*string `json:"tags"`
14622
14623 ETag *string `json:"eTag,omitempty"`
14624 }
14625
14626
14627 func (irr ILRRequestResource) MarshalJSON() ([]byte, error) {
14628 objectMap := make(map[string]interface{})
14629 objectMap["properties"] = irr.Properties
14630 if irr.Location != nil {
14631 objectMap["location"] = irr.Location
14632 }
14633 if irr.Tags != nil {
14634 objectMap["tags"] = irr.Tags
14635 }
14636 if irr.ETag != nil {
14637 objectMap["eTag"] = irr.ETag
14638 }
14639 return json.Marshal(objectMap)
14640 }
14641
14642
14643 func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error {
14644 var m map[string]*json.RawMessage
14645 err := json.Unmarshal(body, &m)
14646 if err != nil {
14647 return err
14648 }
14649 for k, v := range m {
14650 switch k {
14651 case "properties":
14652 if v != nil {
14653 properties, err := unmarshalBasicILRRequest(*v)
14654 if err != nil {
14655 return err
14656 }
14657 irr.Properties = properties
14658 }
14659 case "id":
14660 if v != nil {
14661 var ID string
14662 err = json.Unmarshal(*v, &ID)
14663 if err != nil {
14664 return err
14665 }
14666 irr.ID = &ID
14667 }
14668 case "name":
14669 if v != nil {
14670 var name string
14671 err = json.Unmarshal(*v, &name)
14672 if err != nil {
14673 return err
14674 }
14675 irr.Name = &name
14676 }
14677 case "type":
14678 if v != nil {
14679 var typeVar string
14680 err = json.Unmarshal(*v, &typeVar)
14681 if err != nil {
14682 return err
14683 }
14684 irr.Type = &typeVar
14685 }
14686 case "location":
14687 if v != nil {
14688 var location string
14689 err = json.Unmarshal(*v, &location)
14690 if err != nil {
14691 return err
14692 }
14693 irr.Location = &location
14694 }
14695 case "tags":
14696 if v != nil {
14697 var tags map[string]*string
14698 err = json.Unmarshal(*v, &tags)
14699 if err != nil {
14700 return err
14701 }
14702 irr.Tags = tags
14703 }
14704 case "eTag":
14705 if v != nil {
14706 var eTag string
14707 err = json.Unmarshal(*v, &eTag)
14708 if err != nil {
14709 return err
14710 }
14711 irr.ETag = &eTag
14712 }
14713 }
14714 }
14715
14716 return nil
14717 }
14718
14719
14720 type InquiryInfo struct {
14721
14722
14723 Status *string `json:"status,omitempty"`
14724
14725 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
14726
14727
14728 InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"`
14729 }
14730
14731
14732 type InquiryValidation struct {
14733
14734 Status *string `json:"status,omitempty"`
14735
14736 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
14737
14738 AdditionalDetail *string `json:"additionalDetail,omitempty"`
14739 }
14740
14741
14742 func (iv InquiryValidation) MarshalJSON() ([]byte, error) {
14743 objectMap := make(map[string]interface{})
14744 if iv.Status != nil {
14745 objectMap["status"] = iv.Status
14746 }
14747 if iv.ErrorDetail != nil {
14748 objectMap["errorDetail"] = iv.ErrorDetail
14749 }
14750 return json.Marshal(objectMap)
14751 }
14752
14753
14754 type InstantItemRecoveryTarget struct {
14755
14756 ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"`
14757 }
14758
14759
14760 type InstantRPAdditionalDetails struct {
14761 AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"`
14762 AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"`
14763 }
14764
14765
14766 type BasicJob interface {
14767 AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool)
14768 AsAzureStorageJob() (*AzureStorageJob, bool)
14769 AsAzureWorkloadJob() (*AzureWorkloadJob, bool)
14770 AsDpmJob() (*DpmJob, bool)
14771 AsMabJob() (*MabJob, bool)
14772 AsVaultJob() (*VaultJob, bool)
14773 AsJob() (*Job, bool)
14774 }
14775
14776
14777 type Job struct {
14778
14779 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
14780
14781 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
14782
14783 Operation *string `json:"operation,omitempty"`
14784
14785 Status *string `json:"status,omitempty"`
14786
14787 StartTime *date.Time `json:"startTime,omitempty"`
14788
14789 EndTime *date.Time `json:"endTime,omitempty"`
14790
14791 ActivityID *string `json:"activityId,omitempty"`
14792
14793 JobType JobType `json:"jobType,omitempty"`
14794 }
14795
14796 func unmarshalBasicJob(body []byte) (BasicJob, error) {
14797 var m map[string]interface{}
14798 err := json.Unmarshal(body, &m)
14799 if err != nil {
14800 return nil, err
14801 }
14802
14803 switch m["jobType"] {
14804 case string(JobTypeAzureIaaSVMJob):
14805 var aisj AzureIaaSVMJob
14806 err := json.Unmarshal(body, &aisj)
14807 return aisj, err
14808 case string(JobTypeAzureStorageJob):
14809 var asj AzureStorageJob
14810 err := json.Unmarshal(body, &asj)
14811 return asj, err
14812 case string(JobTypeAzureWorkloadJob):
14813 var awj AzureWorkloadJob
14814 err := json.Unmarshal(body, &awj)
14815 return awj, err
14816 case string(JobTypeDpmJob):
14817 var dj DpmJob
14818 err := json.Unmarshal(body, &dj)
14819 return dj, err
14820 case string(JobTypeMabJob):
14821 var mj MabJob
14822 err := json.Unmarshal(body, &mj)
14823 return mj, err
14824 case string(JobTypeVaultJob):
14825 var vj VaultJob
14826 err := json.Unmarshal(body, &vj)
14827 return vj, err
14828 default:
14829 var j Job
14830 err := json.Unmarshal(body, &j)
14831 return j, err
14832 }
14833 }
14834 func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) {
14835 var rawMessages []*json.RawMessage
14836 err := json.Unmarshal(body, &rawMessages)
14837 if err != nil {
14838 return nil, err
14839 }
14840
14841 jArray := make([]BasicJob, len(rawMessages))
14842
14843 for index, rawMessage := range rawMessages {
14844 j, err := unmarshalBasicJob(*rawMessage)
14845 if err != nil {
14846 return nil, err
14847 }
14848 jArray[index] = j
14849 }
14850 return jArray, nil
14851 }
14852
14853
14854 func (j Job) MarshalJSON() ([]byte, error) {
14855 j.JobType = JobTypeJob
14856 objectMap := make(map[string]interface{})
14857 if j.EntityFriendlyName != nil {
14858 objectMap["entityFriendlyName"] = j.EntityFriendlyName
14859 }
14860 if j.BackupManagementType != "" {
14861 objectMap["backupManagementType"] = j.BackupManagementType
14862 }
14863 if j.Operation != nil {
14864 objectMap["operation"] = j.Operation
14865 }
14866 if j.Status != nil {
14867 objectMap["status"] = j.Status
14868 }
14869 if j.StartTime != nil {
14870 objectMap["startTime"] = j.StartTime
14871 }
14872 if j.EndTime != nil {
14873 objectMap["endTime"] = j.EndTime
14874 }
14875 if j.ActivityID != nil {
14876 objectMap["activityId"] = j.ActivityID
14877 }
14878 if j.JobType != "" {
14879 objectMap["jobType"] = j.JobType
14880 }
14881 return json.Marshal(objectMap)
14882 }
14883
14884
14885 func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
14886 return nil, false
14887 }
14888
14889
14890 func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) {
14891 return nil, false
14892 }
14893
14894
14895 func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
14896 return nil, false
14897 }
14898
14899
14900 func (j Job) AsDpmJob() (*DpmJob, bool) {
14901 return nil, false
14902 }
14903
14904
14905 func (j Job) AsMabJob() (*MabJob, bool) {
14906 return nil, false
14907 }
14908
14909
14910 func (j Job) AsVaultJob() (*VaultJob, bool) {
14911 return nil, false
14912 }
14913
14914
14915 func (j Job) AsJob() (*Job, bool) {
14916 return &j, true
14917 }
14918
14919
14920 func (j Job) AsBasicJob() (BasicJob, bool) {
14921 return &j, true
14922 }
14923
14924
14925 type JobQueryObject struct {
14926
14927 Status JobStatus `json:"status,omitempty"`
14928
14929 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
14930
14931 Operation JobOperationType `json:"operation,omitempty"`
14932
14933 JobID *string `json:"jobId,omitempty"`
14934
14935 StartTime *date.Time `json:"startTime,omitempty"`
14936
14937 EndTime *date.Time `json:"endTime,omitempty"`
14938 }
14939
14940
14941 type JobResource struct {
14942 autorest.Response `json:"-"`
14943
14944 Properties BasicJob `json:"properties,omitempty"`
14945
14946 ID *string `json:"id,omitempty"`
14947
14948 Name *string `json:"name,omitempty"`
14949
14950 Type *string `json:"type,omitempty"`
14951
14952 Location *string `json:"location,omitempty"`
14953
14954 Tags map[string]*string `json:"tags"`
14955
14956 ETag *string `json:"eTag,omitempty"`
14957 }
14958
14959
14960 func (jr JobResource) MarshalJSON() ([]byte, error) {
14961 objectMap := make(map[string]interface{})
14962 objectMap["properties"] = jr.Properties
14963 if jr.Location != nil {
14964 objectMap["location"] = jr.Location
14965 }
14966 if jr.Tags != nil {
14967 objectMap["tags"] = jr.Tags
14968 }
14969 if jr.ETag != nil {
14970 objectMap["eTag"] = jr.ETag
14971 }
14972 return json.Marshal(objectMap)
14973 }
14974
14975
14976 func (jr *JobResource) UnmarshalJSON(body []byte) error {
14977 var m map[string]*json.RawMessage
14978 err := json.Unmarshal(body, &m)
14979 if err != nil {
14980 return err
14981 }
14982 for k, v := range m {
14983 switch k {
14984 case "properties":
14985 if v != nil {
14986 properties, err := unmarshalBasicJob(*v)
14987 if err != nil {
14988 return err
14989 }
14990 jr.Properties = properties
14991 }
14992 case "id":
14993 if v != nil {
14994 var ID string
14995 err = json.Unmarshal(*v, &ID)
14996 if err != nil {
14997 return err
14998 }
14999 jr.ID = &ID
15000 }
15001 case "name":
15002 if v != nil {
15003 var name string
15004 err = json.Unmarshal(*v, &name)
15005 if err != nil {
15006 return err
15007 }
15008 jr.Name = &name
15009 }
15010 case "type":
15011 if v != nil {
15012 var typeVar string
15013 err = json.Unmarshal(*v, &typeVar)
15014 if err != nil {
15015 return err
15016 }
15017 jr.Type = &typeVar
15018 }
15019 case "location":
15020 if v != nil {
15021 var location string
15022 err = json.Unmarshal(*v, &location)
15023 if err != nil {
15024 return err
15025 }
15026 jr.Location = &location
15027 }
15028 case "tags":
15029 if v != nil {
15030 var tags map[string]*string
15031 err = json.Unmarshal(*v, &tags)
15032 if err != nil {
15033 return err
15034 }
15035 jr.Tags = tags
15036 }
15037 case "eTag":
15038 if v != nil {
15039 var eTag string
15040 err = json.Unmarshal(*v, &eTag)
15041 if err != nil {
15042 return err
15043 }
15044 jr.ETag = &eTag
15045 }
15046 }
15047 }
15048
15049 return nil
15050 }
15051
15052
15053 type JobResourceList struct {
15054 autorest.Response `json:"-"`
15055
15056 Value *[]JobResource `json:"value,omitempty"`
15057
15058 NextLink *string `json:"nextLink,omitempty"`
15059 }
15060
15061
15062 type JobResourceListIterator struct {
15063 i int
15064 page JobResourceListPage
15065 }
15066
15067
15068
15069 func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) {
15070 if tracing.IsEnabled() {
15071 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext")
15072 defer func() {
15073 sc := -1
15074 if iter.Response().Response.Response != nil {
15075 sc = iter.Response().Response.Response.StatusCode
15076 }
15077 tracing.EndSpan(ctx, sc, err)
15078 }()
15079 }
15080 iter.i++
15081 if iter.i < len(iter.page.Values()) {
15082 return nil
15083 }
15084 err = iter.page.NextWithContext(ctx)
15085 if err != nil {
15086 iter.i--
15087 return err
15088 }
15089 iter.i = 0
15090 return nil
15091 }
15092
15093
15094
15095
15096 func (iter *JobResourceListIterator) Next() error {
15097 return iter.NextWithContext(context.Background())
15098 }
15099
15100
15101 func (iter JobResourceListIterator) NotDone() bool {
15102 return iter.page.NotDone() && iter.i < len(iter.page.Values())
15103 }
15104
15105
15106 func (iter JobResourceListIterator) Response() JobResourceList {
15107 return iter.page.Response()
15108 }
15109
15110
15111
15112 func (iter JobResourceListIterator) Value() JobResource {
15113 if !iter.page.NotDone() {
15114 return JobResource{}
15115 }
15116 return iter.page.Values()[iter.i]
15117 }
15118
15119
15120 func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator {
15121 return JobResourceListIterator{page: page}
15122 }
15123
15124
15125 func (jrl JobResourceList) IsEmpty() bool {
15126 return jrl.Value == nil || len(*jrl.Value) == 0
15127 }
15128
15129
15130 func (jrl JobResourceList) hasNextLink() bool {
15131 return jrl.NextLink != nil && len(*jrl.NextLink) != 0
15132 }
15133
15134
15135
15136 func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) {
15137 if !jrl.hasNextLink() {
15138 return nil, nil
15139 }
15140 return autorest.Prepare((&http.Request{}).WithContext(ctx),
15141 autorest.AsJSON(),
15142 autorest.AsGet(),
15143 autorest.WithBaseURL(to.String(jrl.NextLink)))
15144 }
15145
15146
15147 type JobResourceListPage struct {
15148 fn func(context.Context, JobResourceList) (JobResourceList, error)
15149 jrl JobResourceList
15150 }
15151
15152
15153
15154 func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) {
15155 if tracing.IsEnabled() {
15156 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext")
15157 defer func() {
15158 sc := -1
15159 if page.Response().Response.Response != nil {
15160 sc = page.Response().Response.Response.StatusCode
15161 }
15162 tracing.EndSpan(ctx, sc, err)
15163 }()
15164 }
15165 for {
15166 next, err := page.fn(ctx, page.jrl)
15167 if err != nil {
15168 return err
15169 }
15170 page.jrl = next
15171 if !next.hasNextLink() || !next.IsEmpty() {
15172 break
15173 }
15174 }
15175 return nil
15176 }
15177
15178
15179
15180
15181 func (page *JobResourceListPage) Next() error {
15182 return page.NextWithContext(context.Background())
15183 }
15184
15185
15186 func (page JobResourceListPage) NotDone() bool {
15187 return !page.jrl.IsEmpty()
15188 }
15189
15190
15191 func (page JobResourceListPage) Response() JobResourceList {
15192 return page.jrl
15193 }
15194
15195
15196 func (page JobResourceListPage) Values() []JobResource {
15197 if page.jrl.IsEmpty() {
15198 return nil
15199 }
15200 return *page.jrl.Value
15201 }
15202
15203
15204 func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage {
15205 return JobResourceListPage{
15206 fn: getNextPage,
15207 jrl: cur,
15208 }
15209 }
15210
15211
15212 type KEKDetails struct {
15213
15214 KeyURL *string `json:"keyUrl,omitempty"`
15215
15216 KeyVaultID *string `json:"keyVaultId,omitempty"`
15217
15218 KeyBackupData *string `json:"keyBackupData,omitempty"`
15219 }
15220
15221
15222
15223
15224
15225
15226
15227
15228 type KeyAndSecretDetails struct {
15229
15230 KekDetails *KEKDetails `json:"kekDetails,omitempty"`
15231
15232 BekDetails *BEKDetails `json:"bekDetails,omitempty"`
15233
15234 EncryptionMechanism *string `json:"encryptionMechanism,omitempty"`
15235 }
15236
15237
15238 type KPIResourceHealthDetails struct {
15239
15240 ResourceHealthStatus ResourceHealthStatus `json:"resourceHealthStatus,omitempty"`
15241
15242 ResourceHealthDetails *[]ResourceHealthDetails `json:"resourceHealthDetails,omitempty"`
15243 }
15244
15245
15246 type ListRecoveryPointsRecommendedForMoveRequest struct {
15247
15248 ObjectType *string `json:"objectType,omitempty"`
15249
15250 ExcludedRPList *[]string `json:"excludedRPList,omitempty"`
15251 }
15252
15253
15254 type LogSchedulePolicy struct {
15255
15256 ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"`
15257
15258 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
15259 }
15260
15261
15262 func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) {
15263 lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy
15264 objectMap := make(map[string]interface{})
15265 if lsp.ScheduleFrequencyInMins != nil {
15266 objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins
15267 }
15268 if lsp.SchedulePolicyType != "" {
15269 objectMap["schedulePolicyType"] = lsp.SchedulePolicyType
15270 }
15271 return json.Marshal(objectMap)
15272 }
15273
15274
15275 func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
15276 return &lsp, true
15277 }
15278
15279
15280 func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
15281 return nil, false
15282 }
15283
15284
15285 func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
15286 return nil, false
15287 }
15288
15289
15290 func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
15291 return nil, false
15292 }
15293
15294
15295 func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
15296 return &lsp, true
15297 }
15298
15299
15300 type LongTermRetentionPolicy struct {
15301
15302 DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"`
15303
15304 WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"`
15305
15306 MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"`
15307
15308 YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"`
15309
15310 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
15311 }
15312
15313
15314 func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) {
15315 ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy
15316 objectMap := make(map[string]interface{})
15317 if ltrp.DailySchedule != nil {
15318 objectMap["dailySchedule"] = ltrp.DailySchedule
15319 }
15320 if ltrp.WeeklySchedule != nil {
15321 objectMap["weeklySchedule"] = ltrp.WeeklySchedule
15322 }
15323 if ltrp.MonthlySchedule != nil {
15324 objectMap["monthlySchedule"] = ltrp.MonthlySchedule
15325 }
15326 if ltrp.YearlySchedule != nil {
15327 objectMap["yearlySchedule"] = ltrp.YearlySchedule
15328 }
15329 if ltrp.RetentionPolicyType != "" {
15330 objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType
15331 }
15332 return json.Marshal(objectMap)
15333 }
15334
15335
15336 func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
15337 return <rp, true
15338 }
15339
15340
15341 func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
15342 return nil, false
15343 }
15344
15345
15346 func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
15347 return nil, false
15348 }
15349
15350
15351 func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
15352 return <rp, true
15353 }
15354
15355
15356 type LongTermSchedulePolicy struct {
15357
15358 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
15359 }
15360
15361
15362 func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) {
15363 ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy
15364 objectMap := make(map[string]interface{})
15365 if ltsp.SchedulePolicyType != "" {
15366 objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType
15367 }
15368 return json.Marshal(objectMap)
15369 }
15370
15371
15372 func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
15373 return nil, false
15374 }
15375
15376
15377 func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
15378 return <sp, true
15379 }
15380
15381
15382 func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
15383 return nil, false
15384 }
15385
15386
15387 func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
15388 return nil, false
15389 }
15390
15391
15392 func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
15393 return <sp, true
15394 }
15395
15396
15397 type MabContainer struct {
15398
15399 CanReRegister *bool `json:"canReRegister,omitempty"`
15400
15401 ContainerID *int64 `json:"containerId,omitempty"`
15402
15403 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
15404
15405 AgentVersion *string `json:"agentVersion,omitempty"`
15406
15407 ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"`
15408
15409 MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"`
15410
15411 ContainerHealthState *string `json:"containerHealthState,omitempty"`
15412
15413 FriendlyName *string `json:"friendlyName,omitempty"`
15414
15415 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15416
15417 RegistrationStatus *string `json:"registrationStatus,omitempty"`
15418
15419 HealthStatus *string `json:"healthStatus,omitempty"`
15420
15421 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
15422 }
15423
15424
15425 func (mc MabContainer) MarshalJSON() ([]byte, error) {
15426 mc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeWindows
15427 objectMap := make(map[string]interface{})
15428 if mc.CanReRegister != nil {
15429 objectMap["canReRegister"] = mc.CanReRegister
15430 }
15431 if mc.ContainerID != nil {
15432 objectMap["containerId"] = mc.ContainerID
15433 }
15434 if mc.ProtectedItemCount != nil {
15435 objectMap["protectedItemCount"] = mc.ProtectedItemCount
15436 }
15437 if mc.AgentVersion != nil {
15438 objectMap["agentVersion"] = mc.AgentVersion
15439 }
15440 if mc.ExtendedInfo != nil {
15441 objectMap["extendedInfo"] = mc.ExtendedInfo
15442 }
15443 if mc.MabContainerHealthDetails != nil {
15444 objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails
15445 }
15446 if mc.ContainerHealthState != nil {
15447 objectMap["containerHealthState"] = mc.ContainerHealthState
15448 }
15449 if mc.FriendlyName != nil {
15450 objectMap["friendlyName"] = mc.FriendlyName
15451 }
15452 if mc.BackupManagementType != "" {
15453 objectMap["backupManagementType"] = mc.BackupManagementType
15454 }
15455 if mc.RegistrationStatus != nil {
15456 objectMap["registrationStatus"] = mc.RegistrationStatus
15457 }
15458 if mc.HealthStatus != nil {
15459 objectMap["healthStatus"] = mc.HealthStatus
15460 }
15461 if mc.ContainerType != "" {
15462 objectMap["containerType"] = mc.ContainerType
15463 }
15464 return json.Marshal(objectMap)
15465 }
15466
15467
15468 func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
15469 return nil, false
15470 }
15471
15472
15473 func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
15474 return nil, false
15475 }
15476
15477
15478 func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
15479 return nil, false
15480 }
15481
15482
15483 func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
15484 return nil, false
15485 }
15486
15487
15488 func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
15489 return nil, false
15490 }
15491
15492
15493 func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
15494 return nil, false
15495 }
15496
15497
15498 func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
15499 return nil, false
15500 }
15501
15502
15503 func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
15504 return nil, false
15505 }
15506
15507
15508 func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
15509 return nil, false
15510 }
15511
15512
15513 func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) {
15514 return nil, false
15515 }
15516
15517
15518 func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
15519 return nil, false
15520 }
15521
15522
15523 func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) {
15524 return nil, false
15525 }
15526
15527
15528 func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
15529 return nil, false
15530 }
15531
15532
15533 func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
15534 return nil, false
15535 }
15536
15537
15538 func (mc MabContainer) AsMabContainer() (*MabContainer, bool) {
15539 return &mc, true
15540 }
15541
15542
15543 func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
15544 return nil, false
15545 }
15546
15547
15548 func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
15549 return &mc, true
15550 }
15551
15552
15553 type MabContainerExtendedInfo struct {
15554
15555 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
15556
15557 BackupItemType ItemType `json:"backupItemType,omitempty"`
15558
15559 BackupItems *[]string `json:"backupItems,omitempty"`
15560
15561 PolicyName *string `json:"policyName,omitempty"`
15562
15563 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
15564 }
15565
15566
15567 type MABContainerHealthDetails struct {
15568
15569 Code *int32 `json:"code,omitempty"`
15570
15571 Title *string `json:"title,omitempty"`
15572
15573 Message *string `json:"message,omitempty"`
15574
15575 Recommendations *[]string `json:"recommendations,omitempty"`
15576 }
15577
15578
15579 type MabErrorInfo struct {
15580
15581 ErrorString *string `json:"errorString,omitempty"`
15582
15583 Recommendations *[]string `json:"recommendations,omitempty"`
15584 }
15585
15586
15587 func (mei MabErrorInfo) MarshalJSON() ([]byte, error) {
15588 objectMap := make(map[string]interface{})
15589 return json.Marshal(objectMap)
15590 }
15591
15592
15593 type MabFileFolderProtectedItem struct {
15594
15595 FriendlyName *string `json:"friendlyName,omitempty"`
15596
15597 ComputerName *string `json:"computerName,omitempty"`
15598
15599 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
15600
15601 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
15602
15603 ProtectionState *string `json:"protectionState,omitempty"`
15604
15605 DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"`
15606
15607 ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
15608
15609 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15610
15611 WorkloadType DataSourceType `json:"workloadType,omitempty"`
15612
15613 ContainerName *string `json:"containerName,omitempty"`
15614
15615 SourceResourceID *string `json:"sourceResourceId,omitempty"`
15616
15617 PolicyID *string `json:"policyId,omitempty"`
15618
15619 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
15620
15621 BackupSetName *string `json:"backupSetName,omitempty"`
15622
15623 CreateMode CreateMode `json:"createMode,omitempty"`
15624
15625 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
15626
15627 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
15628
15629 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
15630
15631 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
15632
15633 IsRehydrate *bool `json:"isRehydrate,omitempty"`
15634
15635 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
15636 }
15637
15638
15639 func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) {
15640 mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem
15641 objectMap := make(map[string]interface{})
15642 if mffpi.FriendlyName != nil {
15643 objectMap["friendlyName"] = mffpi.FriendlyName
15644 }
15645 if mffpi.ComputerName != nil {
15646 objectMap["computerName"] = mffpi.ComputerName
15647 }
15648 if mffpi.LastBackupStatus != nil {
15649 objectMap["lastBackupStatus"] = mffpi.LastBackupStatus
15650 }
15651 if mffpi.LastBackupTime != nil {
15652 objectMap["lastBackupTime"] = mffpi.LastBackupTime
15653 }
15654 if mffpi.ProtectionState != nil {
15655 objectMap["protectionState"] = mffpi.ProtectionState
15656 }
15657 if mffpi.DeferredDeleteSyncTimeInUTC != nil {
15658 objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC
15659 }
15660 if mffpi.ExtendedInfo != nil {
15661 objectMap["extendedInfo"] = mffpi.ExtendedInfo
15662 }
15663 if mffpi.BackupManagementType != "" {
15664 objectMap["backupManagementType"] = mffpi.BackupManagementType
15665 }
15666 if mffpi.WorkloadType != "" {
15667 objectMap["workloadType"] = mffpi.WorkloadType
15668 }
15669 if mffpi.ContainerName != nil {
15670 objectMap["containerName"] = mffpi.ContainerName
15671 }
15672 if mffpi.SourceResourceID != nil {
15673 objectMap["sourceResourceId"] = mffpi.SourceResourceID
15674 }
15675 if mffpi.PolicyID != nil {
15676 objectMap["policyId"] = mffpi.PolicyID
15677 }
15678 if mffpi.LastRecoveryPoint != nil {
15679 objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint
15680 }
15681 if mffpi.BackupSetName != nil {
15682 objectMap["backupSetName"] = mffpi.BackupSetName
15683 }
15684 if mffpi.CreateMode != "" {
15685 objectMap["createMode"] = mffpi.CreateMode
15686 }
15687 if mffpi.DeferredDeleteTimeInUTC != nil {
15688 objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC
15689 }
15690 if mffpi.IsScheduledForDeferredDelete != nil {
15691 objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete
15692 }
15693 if mffpi.DeferredDeleteTimeRemaining != nil {
15694 objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining
15695 }
15696 if mffpi.IsDeferredDeleteScheduleUpcoming != nil {
15697 objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming
15698 }
15699 if mffpi.IsRehydrate != nil {
15700 objectMap["isRehydrate"] = mffpi.IsRehydrate
15701 }
15702 if mffpi.ProtectedItemType != "" {
15703 objectMap["protectedItemType"] = mffpi.ProtectedItemType
15704 }
15705 return json.Marshal(objectMap)
15706 }
15707
15708
15709 func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
15710 return nil, false
15711 }
15712
15713
15714 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
15715 return nil, false
15716 }
15717
15718
15719 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
15720 return nil, false
15721 }
15722
15723
15724 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
15725 return nil, false
15726 }
15727
15728
15729 func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
15730 return nil, false
15731 }
15732
15733
15734 func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
15735 return nil, false
15736 }
15737
15738
15739 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
15740 return nil, false
15741 }
15742
15743
15744 func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
15745 return nil, false
15746 }
15747
15748
15749 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
15750 return nil, false
15751 }
15752
15753
15754 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
15755 return nil, false
15756 }
15757
15758
15759 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
15760 return nil, false
15761 }
15762
15763
15764 func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
15765 return nil, false
15766 }
15767
15768
15769 func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
15770 return nil, false
15771 }
15772
15773
15774 func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
15775 return &mffpi, true
15776 }
15777
15778
15779 func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
15780 return nil, false
15781 }
15782
15783
15784 func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
15785 return &mffpi, true
15786 }
15787
15788
15789 type MabFileFolderProtectedItemExtendedInfo struct {
15790
15791 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
15792
15793 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
15794
15795 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
15796 }
15797
15798
15799 type MabJob struct {
15800
15801 Duration *string `json:"duration,omitempty"`
15802
15803 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
15804
15805 MabServerName *string `json:"mabServerName,omitempty"`
15806
15807 MabServerType MabServerType `json:"mabServerType,omitempty"`
15808
15809 WorkloadType WorkloadType `json:"workloadType,omitempty"`
15810
15811 ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"`
15812
15813 ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"`
15814
15815 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
15816
15817 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15818
15819 Operation *string `json:"operation,omitempty"`
15820
15821 Status *string `json:"status,omitempty"`
15822
15823 StartTime *date.Time `json:"startTime,omitempty"`
15824
15825 EndTime *date.Time `json:"endTime,omitempty"`
15826
15827 ActivityID *string `json:"activityId,omitempty"`
15828
15829 JobType JobType `json:"jobType,omitempty"`
15830 }
15831
15832
15833 func (mj MabJob) MarshalJSON() ([]byte, error) {
15834 mj.JobType = JobTypeMabJob
15835 objectMap := make(map[string]interface{})
15836 if mj.Duration != nil {
15837 objectMap["duration"] = mj.Duration
15838 }
15839 if mj.ActionsInfo != nil {
15840 objectMap["actionsInfo"] = mj.ActionsInfo
15841 }
15842 if mj.MabServerName != nil {
15843 objectMap["mabServerName"] = mj.MabServerName
15844 }
15845 if mj.MabServerType != "" {
15846 objectMap["mabServerType"] = mj.MabServerType
15847 }
15848 if mj.WorkloadType != "" {
15849 objectMap["workloadType"] = mj.WorkloadType
15850 }
15851 if mj.ErrorDetails != nil {
15852 objectMap["errorDetails"] = mj.ErrorDetails
15853 }
15854 if mj.ExtendedInfo != nil {
15855 objectMap["extendedInfo"] = mj.ExtendedInfo
15856 }
15857 if mj.EntityFriendlyName != nil {
15858 objectMap["entityFriendlyName"] = mj.EntityFriendlyName
15859 }
15860 if mj.BackupManagementType != "" {
15861 objectMap["backupManagementType"] = mj.BackupManagementType
15862 }
15863 if mj.Operation != nil {
15864 objectMap["operation"] = mj.Operation
15865 }
15866 if mj.Status != nil {
15867 objectMap["status"] = mj.Status
15868 }
15869 if mj.StartTime != nil {
15870 objectMap["startTime"] = mj.StartTime
15871 }
15872 if mj.EndTime != nil {
15873 objectMap["endTime"] = mj.EndTime
15874 }
15875 if mj.ActivityID != nil {
15876 objectMap["activityId"] = mj.ActivityID
15877 }
15878 if mj.JobType != "" {
15879 objectMap["jobType"] = mj.JobType
15880 }
15881 return json.Marshal(objectMap)
15882 }
15883
15884
15885 func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
15886 return nil, false
15887 }
15888
15889
15890 func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
15891 return nil, false
15892 }
15893
15894
15895 func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
15896 return nil, false
15897 }
15898
15899
15900 func (mj MabJob) AsDpmJob() (*DpmJob, bool) {
15901 return nil, false
15902 }
15903
15904
15905 func (mj MabJob) AsMabJob() (*MabJob, bool) {
15906 return &mj, true
15907 }
15908
15909
15910 func (mj MabJob) AsVaultJob() (*VaultJob, bool) {
15911 return nil, false
15912 }
15913
15914
15915 func (mj MabJob) AsJob() (*Job, bool) {
15916 return nil, false
15917 }
15918
15919
15920 func (mj MabJob) AsBasicJob() (BasicJob, bool) {
15921 return &mj, true
15922 }
15923
15924
15925 type MabJobExtendedInfo struct {
15926
15927 TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"`
15928
15929 PropertyBag map[string]*string `json:"propertyBag"`
15930
15931 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
15932 }
15933
15934
15935 func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) {
15936 objectMap := make(map[string]interface{})
15937 if mjei.TasksList != nil {
15938 objectMap["tasksList"] = mjei.TasksList
15939 }
15940 if mjei.PropertyBag != nil {
15941 objectMap["propertyBag"] = mjei.PropertyBag
15942 }
15943 if mjei.DynamicErrorMessage != nil {
15944 objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage
15945 }
15946 return json.Marshal(objectMap)
15947 }
15948
15949
15950 type MabJobTaskDetails struct {
15951
15952 TaskID *string `json:"taskId,omitempty"`
15953
15954 StartTime *date.Time `json:"startTime,omitempty"`
15955
15956 EndTime *date.Time `json:"endTime,omitempty"`
15957
15958 Duration *string `json:"duration,omitempty"`
15959
15960 Status *string `json:"status,omitempty"`
15961 }
15962
15963
15964 type MabProtectionPolicy struct {
15965
15966 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
15967
15968 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
15969
15970 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
15971
15972 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
15973 }
15974
15975
15976 func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) {
15977 mpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB
15978 objectMap := make(map[string]interface{})
15979 objectMap["schedulePolicy"] = mpp.SchedulePolicy
15980 objectMap["retentionPolicy"] = mpp.RetentionPolicy
15981 if mpp.ProtectedItemsCount != nil {
15982 objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount
15983 }
15984 if mpp.BackupManagementType != "" {
15985 objectMap["backupManagementType"] = mpp.BackupManagementType
15986 }
15987 return json.Marshal(objectMap)
15988 }
15989
15990
15991 func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
15992 return nil, false
15993 }
15994
15995
15996 func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
15997 return nil, false
15998 }
15999
16000
16001 func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
16002 return nil, false
16003 }
16004
16005
16006 func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
16007 return nil, false
16008 }
16009
16010
16011 func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
16012 return nil, false
16013 }
16014
16015
16016 func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
16017 return &mpp, true
16018 }
16019
16020
16021 func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
16022 return nil, false
16023 }
16024
16025
16026 func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
16027 return &mpp, true
16028 }
16029
16030
16031 func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error {
16032 var m map[string]*json.RawMessage
16033 err := json.Unmarshal(body, &m)
16034 if err != nil {
16035 return err
16036 }
16037 for k, v := range m {
16038 switch k {
16039 case "schedulePolicy":
16040 if v != nil {
16041 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
16042 if err != nil {
16043 return err
16044 }
16045 mpp.SchedulePolicy = schedulePolicy
16046 }
16047 case "retentionPolicy":
16048 if v != nil {
16049 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
16050 if err != nil {
16051 return err
16052 }
16053 mpp.RetentionPolicy = retentionPolicy
16054 }
16055 case "protectedItemsCount":
16056 if v != nil {
16057 var protectedItemsCount int32
16058 err = json.Unmarshal(*v, &protectedItemsCount)
16059 if err != nil {
16060 return err
16061 }
16062 mpp.ProtectedItemsCount = &protectedItemsCount
16063 }
16064 case "backupManagementType":
16065 if v != nil {
16066 var backupManagementType ManagementTypeBasicProtectionPolicy
16067 err = json.Unmarshal(*v, &backupManagementType)
16068 if err != nil {
16069 return err
16070 }
16071 mpp.BackupManagementType = backupManagementType
16072 }
16073 }
16074 }
16075
16076 return nil
16077 }
16078
16079
16080 type ManagementUsage struct {
16081
16082 Unit UsagesUnit `json:"unit,omitempty"`
16083
16084 QuotaPeriod *string `json:"quotaPeriod,omitempty"`
16085
16086 NextResetTime *date.Time `json:"nextResetTime,omitempty"`
16087
16088 CurrentValue *int64 `json:"currentValue,omitempty"`
16089
16090 Limit *int64 `json:"limit,omitempty"`
16091
16092 Name *NameInfo `json:"name,omitempty"`
16093 }
16094
16095
16096 type ManagementUsageList struct {
16097 autorest.Response `json:"-"`
16098
16099 Value *[]ManagementUsage `json:"value,omitempty"`
16100 }
16101
16102
16103 type MonthlyRetentionSchedule struct {
16104
16105 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
16106
16107 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
16108
16109 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
16110
16111 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
16112
16113 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
16114 }
16115
16116
16117
16118 type MoveRecoveryPointFuture struct {
16119 azure.FutureAPI
16120
16121
16122 Result func(BaseClient) (autorest.Response, error)
16123 }
16124
16125
16126 func (future *MoveRecoveryPointFuture) UnmarshalJSON(body []byte) error {
16127 var azFuture azure.Future
16128 if err := json.Unmarshal(body, &azFuture); err != nil {
16129 return err
16130 }
16131 future.FutureAPI = &azFuture
16132 future.Result = future.result
16133 return nil
16134 }
16135
16136
16137 func (future *MoveRecoveryPointFuture) result(client BaseClient) (ar autorest.Response, err error) {
16138 var done bool
16139 done, err = future.DoneWithContext(context.Background(), client)
16140 if err != nil {
16141 err = autorest.NewErrorWithError(err, "backup.MoveRecoveryPointFuture", "Result", future.Response(), "Polling failure")
16142 return
16143 }
16144 if !done {
16145 ar.Response = future.Response()
16146 err = azure.NewAsyncOpIncompleteError("backup.MoveRecoveryPointFuture")
16147 return
16148 }
16149 ar.Response = future.Response()
16150 return
16151 }
16152
16153
16154 type MoveRPAcrossTiersRequest struct {
16155
16156 ObjectType *string `json:"objectType,omitempty"`
16157
16158 SourceTierType RecoveryPointTierType `json:"sourceTierType,omitempty"`
16159
16160 TargetTierType RecoveryPointTierType `json:"targetTierType,omitempty"`
16161 }
16162
16163
16164 type NameInfo struct {
16165
16166 Value *string `json:"value,omitempty"`
16167
16168 LocalizedValue *string `json:"localizedValue,omitempty"`
16169 }
16170
16171
16172 type NewErrorResponse struct {
16173
16174 Error *NewErrorResponseError `json:"error,omitempty"`
16175 }
16176
16177
16178 type NewErrorResponseError struct {
16179
16180 Code *string `json:"code,omitempty"`
16181
16182 Message *string `json:"message,omitempty"`
16183
16184 Target *string `json:"target,omitempty"`
16185
16186 Details *[]NewErrorResponse `json:"details,omitempty"`
16187
16188 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
16189 }
16190
16191
16192 func (ner NewErrorResponseError) MarshalJSON() ([]byte, error) {
16193 objectMap := make(map[string]interface{})
16194 return json.Marshal(objectMap)
16195 }
16196
16197
16198 type OperationResultInfo struct {
16199
16200 JobList *[]string `json:"jobList,omitempty"`
16201
16202 ObjectType ObjectType `json:"objectType,omitempty"`
16203 }
16204
16205
16206 func (ori OperationResultInfo) MarshalJSON() ([]byte, error) {
16207 ori.ObjectType = ObjectTypeOperationResultInfo
16208 objectMap := make(map[string]interface{})
16209 if ori.JobList != nil {
16210 objectMap["jobList"] = ori.JobList
16211 }
16212 if ori.ObjectType != "" {
16213 objectMap["objectType"] = ori.ObjectType
16214 }
16215 return json.Marshal(objectMap)
16216 }
16217
16218
16219 func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
16220 return nil, false
16221 }
16222
16223
16224 func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
16225 return &ori, true
16226 }
16227
16228
16229 func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
16230 return nil, false
16231 }
16232
16233
16234 func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
16235 return &ori, true
16236 }
16237
16238
16239 type BasicOperationResultInfoBase interface {
16240 AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool)
16241 AsOperationResultInfo() (*OperationResultInfo, bool)
16242 AsOperationResultInfoBase() (*OperationResultInfoBase, bool)
16243 }
16244
16245
16246 type OperationResultInfoBase struct {
16247
16248 ObjectType ObjectType `json:"objectType,omitempty"`
16249 }
16250
16251 func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) {
16252 var m map[string]interface{}
16253 err := json.Unmarshal(body, &m)
16254 if err != nil {
16255 return nil, err
16256 }
16257
16258 switch m["objectType"] {
16259 case string(ObjectTypeExportJobsOperationResultInfo):
16260 var ejori ExportJobsOperationResultInfo
16261 err := json.Unmarshal(body, &ejori)
16262 return ejori, err
16263 case string(ObjectTypeOperationResultInfo):
16264 var ori OperationResultInfo
16265 err := json.Unmarshal(body, &ori)
16266 return ori, err
16267 default:
16268 var orib OperationResultInfoBase
16269 err := json.Unmarshal(body, &orib)
16270 return orib, err
16271 }
16272 }
16273 func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) {
16274 var rawMessages []*json.RawMessage
16275 err := json.Unmarshal(body, &rawMessages)
16276 if err != nil {
16277 return nil, err
16278 }
16279
16280 oribArray := make([]BasicOperationResultInfoBase, len(rawMessages))
16281
16282 for index, rawMessage := range rawMessages {
16283 orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage)
16284 if err != nil {
16285 return nil, err
16286 }
16287 oribArray[index] = orib
16288 }
16289 return oribArray, nil
16290 }
16291
16292
16293 func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) {
16294 orib.ObjectType = ObjectTypeOperationResultInfoBase
16295 objectMap := make(map[string]interface{})
16296 if orib.ObjectType != "" {
16297 objectMap["objectType"] = orib.ObjectType
16298 }
16299 return json.Marshal(objectMap)
16300 }
16301
16302
16303 func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
16304 return nil, false
16305 }
16306
16307
16308 func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) {
16309 return nil, false
16310 }
16311
16312
16313 func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
16314 return &orib, true
16315 }
16316
16317
16318 func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
16319 return &orib, true
16320 }
16321
16322
16323 type OperationResultInfoBaseResource struct {
16324 autorest.Response `json:"-"`
16325
16326 Operation BasicOperationResultInfoBase `json:"operation,omitempty"`
16327
16328 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
16329
16330 Headers map[string][]string `json:"headers"`
16331 }
16332
16333
16334 func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) {
16335 objectMap := make(map[string]interface{})
16336 objectMap["operation"] = oribr.Operation
16337 if oribr.StatusCode != "" {
16338 objectMap["statusCode"] = oribr.StatusCode
16339 }
16340 if oribr.Headers != nil {
16341 objectMap["headers"] = oribr.Headers
16342 }
16343 return json.Marshal(objectMap)
16344 }
16345
16346
16347 func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error {
16348 var m map[string]*json.RawMessage
16349 err := json.Unmarshal(body, &m)
16350 if err != nil {
16351 return err
16352 }
16353 for k, v := range m {
16354 switch k {
16355 case "operation":
16356 if v != nil {
16357 operation, err := unmarshalBasicOperationResultInfoBase(*v)
16358 if err != nil {
16359 return err
16360 }
16361 oribr.Operation = operation
16362 }
16363 case "statusCode":
16364 if v != nil {
16365 var statusCode HTTPStatusCode
16366 err = json.Unmarshal(*v, &statusCode)
16367 if err != nil {
16368 return err
16369 }
16370 oribr.StatusCode = statusCode
16371 }
16372 case "headers":
16373 if v != nil {
16374 var headers map[string][]string
16375 err = json.Unmarshal(*v, &headers)
16376 if err != nil {
16377 return err
16378 }
16379 oribr.Headers = headers
16380 }
16381 }
16382 }
16383
16384 return nil
16385 }
16386
16387
16388 type OperationStatus struct {
16389 autorest.Response `json:"-"`
16390
16391 ID *string `json:"id,omitempty"`
16392
16393 Name *string `json:"name,omitempty"`
16394
16395 Status OperationStatusValues `json:"status,omitempty"`
16396
16397 StartTime *date.Time `json:"startTime,omitempty"`
16398
16399 EndTime *date.Time `json:"endTime,omitempty"`
16400
16401 Error *OperationStatusError `json:"error,omitempty"`
16402
16403 Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"`
16404 }
16405
16406
16407 func (osVar *OperationStatus) UnmarshalJSON(body []byte) error {
16408 var m map[string]*json.RawMessage
16409 err := json.Unmarshal(body, &m)
16410 if err != nil {
16411 return err
16412 }
16413 for k, v := range m {
16414 switch k {
16415 case "id":
16416 if v != nil {
16417 var ID string
16418 err = json.Unmarshal(*v, &ID)
16419 if err != nil {
16420 return err
16421 }
16422 osVar.ID = &ID
16423 }
16424 case "name":
16425 if v != nil {
16426 var name string
16427 err = json.Unmarshal(*v, &name)
16428 if err != nil {
16429 return err
16430 }
16431 osVar.Name = &name
16432 }
16433 case "status":
16434 if v != nil {
16435 var status OperationStatusValues
16436 err = json.Unmarshal(*v, &status)
16437 if err != nil {
16438 return err
16439 }
16440 osVar.Status = status
16441 }
16442 case "startTime":
16443 if v != nil {
16444 var startTime date.Time
16445 err = json.Unmarshal(*v, &startTime)
16446 if err != nil {
16447 return err
16448 }
16449 osVar.StartTime = &startTime
16450 }
16451 case "endTime":
16452 if v != nil {
16453 var endTime date.Time
16454 err = json.Unmarshal(*v, &endTime)
16455 if err != nil {
16456 return err
16457 }
16458 osVar.EndTime = &endTime
16459 }
16460 case "error":
16461 if v != nil {
16462 var errorVar OperationStatusError
16463 err = json.Unmarshal(*v, &errorVar)
16464 if err != nil {
16465 return err
16466 }
16467 osVar.Error = &errorVar
16468 }
16469 case "properties":
16470 if v != nil {
16471 properties, err := unmarshalBasicOperationStatusExtendedInfo(*v)
16472 if err != nil {
16473 return err
16474 }
16475 osVar.Properties = properties
16476 }
16477 }
16478 }
16479
16480 return nil
16481 }
16482
16483
16484 type OperationStatusError struct {
16485
16486 Code *string `json:"code,omitempty"`
16487
16488 Message *string `json:"message,omitempty"`
16489 }
16490
16491
16492 type BasicOperationStatusExtendedInfo interface {
16493 AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool)
16494 AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool)
16495 AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool)
16496 AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool)
16497 AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool)
16498 }
16499
16500
16501 type OperationStatusExtendedInfo struct {
16502
16503 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16504 }
16505
16506 func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) {
16507 var m map[string]interface{}
16508 err := json.Unmarshal(body, &m)
16509 if err != nil {
16510 return nil, err
16511 }
16512
16513 switch m["objectType"] {
16514 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo):
16515 var osjei OperationStatusJobExtendedInfo
16516 err := json.Unmarshal(body, &osjei)
16517 return osjei, err
16518 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo):
16519 var osjei OperationStatusJobsExtendedInfo
16520 err := json.Unmarshal(body, &osjei)
16521 return osjei, err
16522 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo):
16523 var ospiei OperationStatusProvisionILRExtendedInfo
16524 err := json.Unmarshal(body, &ospiei)
16525 return ospiei, err
16526 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusRecoveryPointExtendedInfo):
16527 var osrpei OperationStatusRecoveryPointExtendedInfo
16528 err := json.Unmarshal(body, &osrpei)
16529 return osrpei, err
16530 default:
16531 var osei OperationStatusExtendedInfo
16532 err := json.Unmarshal(body, &osei)
16533 return osei, err
16534 }
16535 }
16536 func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) {
16537 var rawMessages []*json.RawMessage
16538 err := json.Unmarshal(body, &rawMessages)
16539 if err != nil {
16540 return nil, err
16541 }
16542
16543 oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages))
16544
16545 for index, rawMessage := range rawMessages {
16546 osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage)
16547 if err != nil {
16548 return nil, err
16549 }
16550 oseiArray[index] = osei
16551 }
16552 return oseiArray, nil
16553 }
16554
16555
16556 func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) {
16557 osei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusExtendedInfo
16558 objectMap := make(map[string]interface{})
16559 if osei.ObjectType != "" {
16560 objectMap["objectType"] = osei.ObjectType
16561 }
16562 return json.Marshal(objectMap)
16563 }
16564
16565
16566 func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16567 return nil, false
16568 }
16569
16570
16571 func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16572 return nil, false
16573 }
16574
16575
16576 func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16577 return nil, false
16578 }
16579
16580
16581 func (osei OperationStatusExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16582 return nil, false
16583 }
16584
16585
16586 func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16587 return &osei, true
16588 }
16589
16590
16591 func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16592 return &osei, true
16593 }
16594
16595
16596 type OperationStatusJobExtendedInfo struct {
16597
16598 JobID *string `json:"jobId,omitempty"`
16599
16600 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16601 }
16602
16603
16604 func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) {
16605 osjei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo
16606 objectMap := make(map[string]interface{})
16607 if osjei.JobID != nil {
16608 objectMap["jobId"] = osjei.JobID
16609 }
16610 if osjei.ObjectType != "" {
16611 objectMap["objectType"] = osjei.ObjectType
16612 }
16613 return json.Marshal(objectMap)
16614 }
16615
16616
16617 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16618 return &osjei, true
16619 }
16620
16621
16622 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16623 return nil, false
16624 }
16625
16626
16627 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16628 return nil, false
16629 }
16630
16631
16632 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16633 return nil, false
16634 }
16635
16636
16637 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16638 return nil, false
16639 }
16640
16641
16642 func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16643 return &osjei, true
16644 }
16645
16646
16647 type OperationStatusJobsExtendedInfo struct {
16648
16649 JobIds *[]string `json:"jobIds,omitempty"`
16650
16651 FailedJobsError map[string]*string `json:"failedJobsError"`
16652
16653 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16654 }
16655
16656
16657 func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) {
16658 osjei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo
16659 objectMap := make(map[string]interface{})
16660 if osjei.JobIds != nil {
16661 objectMap["jobIds"] = osjei.JobIds
16662 }
16663 if osjei.FailedJobsError != nil {
16664 objectMap["failedJobsError"] = osjei.FailedJobsError
16665 }
16666 if osjei.ObjectType != "" {
16667 objectMap["objectType"] = osjei.ObjectType
16668 }
16669 return json.Marshal(objectMap)
16670 }
16671
16672
16673 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16674 return nil, false
16675 }
16676
16677
16678 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16679 return &osjei, true
16680 }
16681
16682
16683 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16684 return nil, false
16685 }
16686
16687
16688 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16689 return nil, false
16690 }
16691
16692
16693 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16694 return nil, false
16695 }
16696
16697
16698 func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16699 return &osjei, true
16700 }
16701
16702
16703 type OperationStatusProvisionILRExtendedInfo struct {
16704
16705 RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"`
16706
16707 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16708 }
16709
16710
16711 func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) {
16712 ospiei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo
16713 objectMap := make(map[string]interface{})
16714 if ospiei.RecoveryTarget != nil {
16715 objectMap["recoveryTarget"] = ospiei.RecoveryTarget
16716 }
16717 if ospiei.ObjectType != "" {
16718 objectMap["objectType"] = ospiei.ObjectType
16719 }
16720 return json.Marshal(objectMap)
16721 }
16722
16723
16724 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16725 return nil, false
16726 }
16727
16728
16729 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16730 return nil, false
16731 }
16732
16733
16734 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16735 return &ospiei, true
16736 }
16737
16738
16739 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16740 return nil, false
16741 }
16742
16743
16744 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16745 return nil, false
16746 }
16747
16748
16749 func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16750 return &ospiei, true
16751 }
16752
16753
16754 type OperationStatusRecoveryPointExtendedInfo struct {
16755
16756 UpdatedRecoveryPoint BasicRecoveryPoint `json:"updatedRecoveryPoint,omitempty"`
16757
16758 DeletedBackupItemVersion *string `json:"deletedBackupItemVersion,omitempty"`
16759
16760 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16761 }
16762
16763
16764 func (osrpei OperationStatusRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) {
16765 osrpei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusRecoveryPointExtendedInfo
16766 objectMap := make(map[string]interface{})
16767 objectMap["updatedRecoveryPoint"] = osrpei.UpdatedRecoveryPoint
16768 if osrpei.DeletedBackupItemVersion != nil {
16769 objectMap["deletedBackupItemVersion"] = osrpei.DeletedBackupItemVersion
16770 }
16771 if osrpei.ObjectType != "" {
16772 objectMap["objectType"] = osrpei.ObjectType
16773 }
16774 return json.Marshal(objectMap)
16775 }
16776
16777
16778 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16779 return nil, false
16780 }
16781
16782
16783 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16784 return nil, false
16785 }
16786
16787
16788 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16789 return nil, false
16790 }
16791
16792
16793 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16794 return &osrpei, true
16795 }
16796
16797
16798 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16799 return nil, false
16800 }
16801
16802
16803 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16804 return &osrpei, true
16805 }
16806
16807
16808 func (osrpei *OperationStatusRecoveryPointExtendedInfo) UnmarshalJSON(body []byte) error {
16809 var m map[string]*json.RawMessage
16810 err := json.Unmarshal(body, &m)
16811 if err != nil {
16812 return err
16813 }
16814 for k, v := range m {
16815 switch k {
16816 case "updatedRecoveryPoint":
16817 if v != nil {
16818 updatedRecoveryPoint, err := unmarshalBasicRecoveryPoint(*v)
16819 if err != nil {
16820 return err
16821 }
16822 osrpei.UpdatedRecoveryPoint = updatedRecoveryPoint
16823 }
16824 case "deletedBackupItemVersion":
16825 if v != nil {
16826 var deletedBackupItemVersion string
16827 err = json.Unmarshal(*v, &deletedBackupItemVersion)
16828 if err != nil {
16829 return err
16830 }
16831 osrpei.DeletedBackupItemVersion = &deletedBackupItemVersion
16832 }
16833 case "objectType":
16834 if v != nil {
16835 var objectType ObjectTypeBasicOperationStatusExtendedInfo
16836 err = json.Unmarshal(*v, &objectType)
16837 if err != nil {
16838 return err
16839 }
16840 osrpei.ObjectType = objectType
16841 }
16842 }
16843 }
16844
16845 return nil
16846 }
16847
16848
16849 type OperationWorkerResponse struct {
16850
16851 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
16852
16853 Headers map[string][]string `json:"headers"`
16854 }
16855
16856
16857 func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) {
16858 objectMap := make(map[string]interface{})
16859 if owr.StatusCode != "" {
16860 objectMap["statusCode"] = owr.StatusCode
16861 }
16862 if owr.Headers != nil {
16863 objectMap["headers"] = owr.Headers
16864 }
16865 return json.Marshal(objectMap)
16866 }
16867
16868
16869 type PointInTimeRange struct {
16870
16871 StartTime *date.Time `json:"startTime,omitempty"`
16872
16873 EndTime *date.Time `json:"endTime,omitempty"`
16874 }
16875
16876
16877 type PreBackupValidation struct {
16878
16879 Status InquiryStatus `json:"status,omitempty"`
16880
16881 Code *string `json:"code,omitempty"`
16882
16883 Message *string `json:"message,omitempty"`
16884 }
16885
16886
16887 type PrepareDataMoveRequest struct {
16888
16889 TargetResourceID *string `json:"targetResourceId,omitempty"`
16890
16891 TargetRegion *string `json:"targetRegion,omitempty"`
16892
16893 DataMoveLevel DataMoveLevel `json:"dataMoveLevel,omitempty"`
16894
16895
16896 SourceContainerArmIds *[]string `json:"sourceContainerArmIds,omitempty"`
16897
16898 IgnoreMoved *bool `json:"ignoreMoved,omitempty"`
16899 }
16900
16901
16902 type PrepareDataMoveResponse struct {
16903
16904 CorrelationID *string `json:"correlationId,omitempty"`
16905
16906 SourceVaultProperties map[string]*string `json:"sourceVaultProperties"`
16907
16908 ObjectType ObjectTypeBasicVaultStorageConfigOperationResultResponse `json:"objectType,omitempty"`
16909 }
16910
16911
16912 func (pdmr PrepareDataMoveResponse) MarshalJSON() ([]byte, error) {
16913 pdmr.ObjectType = ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse
16914 objectMap := make(map[string]interface{})
16915 if pdmr.CorrelationID != nil {
16916 objectMap["correlationId"] = pdmr.CorrelationID
16917 }
16918 if pdmr.SourceVaultProperties != nil {
16919 objectMap["sourceVaultProperties"] = pdmr.SourceVaultProperties
16920 }
16921 if pdmr.ObjectType != "" {
16922 objectMap["objectType"] = pdmr.ObjectType
16923 }
16924 return json.Marshal(objectMap)
16925 }
16926
16927
16928 func (pdmr PrepareDataMoveResponse) AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool) {
16929 return &pdmr, true
16930 }
16931
16932
16933 func (pdmr PrepareDataMoveResponse) AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool) {
16934 return nil, false
16935 }
16936
16937
16938 func (pdmr PrepareDataMoveResponse) AsBasicVaultStorageConfigOperationResultResponse() (BasicVaultStorageConfigOperationResultResponse, bool) {
16939 return &pdmr, true
16940 }
16941
16942
16943
16944
16945
16946
16947
16948 type PreValidateEnableBackupRequest struct {
16949
16950 ResourceType DataSourceType `json:"resourceType,omitempty"`
16951
16952 ResourceID *string `json:"resourceId,omitempty"`
16953
16954 VaultID *string `json:"vaultId,omitempty"`
16955
16956 Properties *string `json:"properties,omitempty"`
16957 }
16958
16959
16960 type PreValidateEnableBackupResponse struct {
16961 autorest.Response `json:"-"`
16962
16963 Status ValidationStatus `json:"status,omitempty"`
16964
16965 ErrorCode *string `json:"errorCode,omitempty"`
16966
16967 ErrorMessage *string `json:"errorMessage,omitempty"`
16968
16969 Recommendation *string `json:"recommendation,omitempty"`
16970
16971
16972 ContainerName *string `json:"containerName,omitempty"`
16973
16974 ProtectedItemName *string `json:"protectedItemName,omitempty"`
16975 }
16976
16977
16978 type PrivateEndpoint struct {
16979
16980 ID *string `json:"id,omitempty"`
16981 }
16982
16983
16984 type PrivateEndpointConnection struct {
16985
16986 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16987
16988 PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
16989
16990 PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
16991 }
16992
16993
16994
16995 type PrivateEndpointConnectionDeleteFuture struct {
16996 azure.FutureAPI
16997
16998
16999 Result func(PrivateEndpointConnectionClient) (autorest.Response, error)
17000 }
17001
17002
17003 func (future *PrivateEndpointConnectionDeleteFuture) UnmarshalJSON(body []byte) error {
17004 var azFuture azure.Future
17005 if err := json.Unmarshal(body, &azFuture); err != nil {
17006 return err
17007 }
17008 future.FutureAPI = &azFuture
17009 future.Result = future.result
17010 return nil
17011 }
17012
17013
17014 func (future *PrivateEndpointConnectionDeleteFuture) result(client PrivateEndpointConnectionClient) (ar autorest.Response, err error) {
17015 var done bool
17016 done, err = future.DoneWithContext(context.Background(), client)
17017 if err != nil {
17018 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionDeleteFuture", "Result", future.Response(), "Polling failure")
17019 return
17020 }
17021 if !done {
17022 ar.Response = future.Response()
17023 err = azure.NewAsyncOpIncompleteError("backup.PrivateEndpointConnectionDeleteFuture")
17024 return
17025 }
17026 ar.Response = future.Response()
17027 return
17028 }
17029
17030
17031
17032 type PrivateEndpointConnectionPutFuture struct {
17033 azure.FutureAPI
17034
17035
17036 Result func(PrivateEndpointConnectionClient) (PrivateEndpointConnectionResource, error)
17037 }
17038
17039
17040 func (future *PrivateEndpointConnectionPutFuture) UnmarshalJSON(body []byte) error {
17041 var azFuture azure.Future
17042 if err := json.Unmarshal(body, &azFuture); err != nil {
17043 return err
17044 }
17045 future.FutureAPI = &azFuture
17046 future.Result = future.result
17047 return nil
17048 }
17049
17050
17051 func (future *PrivateEndpointConnectionPutFuture) result(client PrivateEndpointConnectionClient) (pecr PrivateEndpointConnectionResource, err error) {
17052 var done bool
17053 done, err = future.DoneWithContext(context.Background(), client)
17054 if err != nil {
17055 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionPutFuture", "Result", future.Response(), "Polling failure")
17056 return
17057 }
17058 if !done {
17059 pecr.Response.Response = future.Response()
17060 err = azure.NewAsyncOpIncompleteError("backup.PrivateEndpointConnectionPutFuture")
17061 return
17062 }
17063 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17064 if pecr.Response.Response, err = future.GetResult(sender); err == nil && pecr.Response.Response.StatusCode != http.StatusNoContent {
17065 pecr, err = client.PutResponder(pecr.Response.Response)
17066 if err != nil {
17067 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionPutFuture", "Result", pecr.Response.Response, "Failure responding to request")
17068 }
17069 }
17070 return
17071 }
17072
17073
17074 type PrivateEndpointConnectionResource struct {
17075 autorest.Response `json:"-"`
17076
17077 Properties *PrivateEndpointConnection `json:"properties,omitempty"`
17078
17079 ID *string `json:"id,omitempty"`
17080
17081 Name *string `json:"name,omitempty"`
17082
17083 Type *string `json:"type,omitempty"`
17084
17085 Location *string `json:"location,omitempty"`
17086
17087 Tags map[string]*string `json:"tags"`
17088
17089 ETag *string `json:"eTag,omitempty"`
17090 }
17091
17092
17093 func (pecr PrivateEndpointConnectionResource) MarshalJSON() ([]byte, error) {
17094 objectMap := make(map[string]interface{})
17095 if pecr.Properties != nil {
17096 objectMap["properties"] = pecr.Properties
17097 }
17098 if pecr.Location != nil {
17099 objectMap["location"] = pecr.Location
17100 }
17101 if pecr.Tags != nil {
17102 objectMap["tags"] = pecr.Tags
17103 }
17104 if pecr.ETag != nil {
17105 objectMap["eTag"] = pecr.ETag
17106 }
17107 return json.Marshal(objectMap)
17108 }
17109
17110
17111 type PrivateLinkServiceConnectionState struct {
17112
17113 Status PrivateEndpointConnectionStatus `json:"status,omitempty"`
17114
17115 Description *string `json:"description,omitempty"`
17116
17117 ActionRequired *string `json:"actionRequired,omitempty"`
17118 }
17119
17120
17121 type BasicProtectableContainer interface {
17122 AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool)
17123 AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool)
17124 AsProtectableContainer() (*ProtectableContainer, bool)
17125 }
17126
17127
17128 type ProtectableContainer struct {
17129
17130 FriendlyName *string `json:"friendlyName,omitempty"`
17131
17132 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17133
17134 HealthStatus *string `json:"healthStatus,omitempty"`
17135
17136 ContainerID *string `json:"containerId,omitempty"`
17137
17138 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
17139 }
17140
17141 func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) {
17142 var m map[string]interface{}
17143 err := json.Unmarshal(body, &m)
17144 if err != nil {
17145 return nil, err
17146 }
17147
17148 switch m["protectableContainerType"] {
17149 case string(ProtectableContainerTypeStorageContainer):
17150 var aspc AzureStorageProtectableContainer
17151 err := json.Unmarshal(body, &aspc)
17152 return aspc, err
17153 case string(ProtectableContainerTypeVMAppContainer):
17154 var avacpc AzureVMAppContainerProtectableContainer
17155 err := json.Unmarshal(body, &avacpc)
17156 return avacpc, err
17157 default:
17158 var pc ProtectableContainer
17159 err := json.Unmarshal(body, &pc)
17160 return pc, err
17161 }
17162 }
17163 func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) {
17164 var rawMessages []*json.RawMessage
17165 err := json.Unmarshal(body, &rawMessages)
17166 if err != nil {
17167 return nil, err
17168 }
17169
17170 pcArray := make([]BasicProtectableContainer, len(rawMessages))
17171
17172 for index, rawMessage := range rawMessages {
17173 pc, err := unmarshalBasicProtectableContainer(*rawMessage)
17174 if err != nil {
17175 return nil, err
17176 }
17177 pcArray[index] = pc
17178 }
17179 return pcArray, nil
17180 }
17181
17182
17183 func (pc ProtectableContainer) MarshalJSON() ([]byte, error) {
17184 pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer
17185 objectMap := make(map[string]interface{})
17186 if pc.FriendlyName != nil {
17187 objectMap["friendlyName"] = pc.FriendlyName
17188 }
17189 if pc.BackupManagementType != "" {
17190 objectMap["backupManagementType"] = pc.BackupManagementType
17191 }
17192 if pc.HealthStatus != nil {
17193 objectMap["healthStatus"] = pc.HealthStatus
17194 }
17195 if pc.ContainerID != nil {
17196 objectMap["containerId"] = pc.ContainerID
17197 }
17198 if pc.ProtectableContainerType != "" {
17199 objectMap["protectableContainerType"] = pc.ProtectableContainerType
17200 }
17201 return json.Marshal(objectMap)
17202 }
17203
17204
17205 func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
17206 return nil, false
17207 }
17208
17209
17210 func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
17211 return nil, false
17212 }
17213
17214
17215 func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
17216 return &pc, true
17217 }
17218
17219
17220 func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
17221 return &pc, true
17222 }
17223
17224
17225 type ProtectableContainerResource struct {
17226
17227 Properties BasicProtectableContainer `json:"properties,omitempty"`
17228
17229 ID *string `json:"id,omitempty"`
17230
17231 Name *string `json:"name,omitempty"`
17232
17233 Type *string `json:"type,omitempty"`
17234
17235 Location *string `json:"location,omitempty"`
17236
17237 Tags map[string]*string `json:"tags"`
17238
17239 ETag *string `json:"eTag,omitempty"`
17240 }
17241
17242
17243 func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) {
17244 objectMap := make(map[string]interface{})
17245 objectMap["properties"] = pcr.Properties
17246 if pcr.Location != nil {
17247 objectMap["location"] = pcr.Location
17248 }
17249 if pcr.Tags != nil {
17250 objectMap["tags"] = pcr.Tags
17251 }
17252 if pcr.ETag != nil {
17253 objectMap["eTag"] = pcr.ETag
17254 }
17255 return json.Marshal(objectMap)
17256 }
17257
17258
17259 func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error {
17260 var m map[string]*json.RawMessage
17261 err := json.Unmarshal(body, &m)
17262 if err != nil {
17263 return err
17264 }
17265 for k, v := range m {
17266 switch k {
17267 case "properties":
17268 if v != nil {
17269 properties, err := unmarshalBasicProtectableContainer(*v)
17270 if err != nil {
17271 return err
17272 }
17273 pcr.Properties = properties
17274 }
17275 case "id":
17276 if v != nil {
17277 var ID string
17278 err = json.Unmarshal(*v, &ID)
17279 if err != nil {
17280 return err
17281 }
17282 pcr.ID = &ID
17283 }
17284 case "name":
17285 if v != nil {
17286 var name string
17287 err = json.Unmarshal(*v, &name)
17288 if err != nil {
17289 return err
17290 }
17291 pcr.Name = &name
17292 }
17293 case "type":
17294 if v != nil {
17295 var typeVar string
17296 err = json.Unmarshal(*v, &typeVar)
17297 if err != nil {
17298 return err
17299 }
17300 pcr.Type = &typeVar
17301 }
17302 case "location":
17303 if v != nil {
17304 var location string
17305 err = json.Unmarshal(*v, &location)
17306 if err != nil {
17307 return err
17308 }
17309 pcr.Location = &location
17310 }
17311 case "tags":
17312 if v != nil {
17313 var tags map[string]*string
17314 err = json.Unmarshal(*v, &tags)
17315 if err != nil {
17316 return err
17317 }
17318 pcr.Tags = tags
17319 }
17320 case "eTag":
17321 if v != nil {
17322 var eTag string
17323 err = json.Unmarshal(*v, &eTag)
17324 if err != nil {
17325 return err
17326 }
17327 pcr.ETag = &eTag
17328 }
17329 }
17330 }
17331
17332 return nil
17333 }
17334
17335
17336 type ProtectableContainerResourceList struct {
17337 autorest.Response `json:"-"`
17338
17339 Value *[]ProtectableContainerResource `json:"value,omitempty"`
17340
17341 NextLink *string `json:"nextLink,omitempty"`
17342 }
17343
17344
17345
17346 type ProtectableContainerResourceListIterator struct {
17347 i int
17348 page ProtectableContainerResourceListPage
17349 }
17350
17351
17352
17353 func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
17354 if tracing.IsEnabled() {
17355 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext")
17356 defer func() {
17357 sc := -1
17358 if iter.Response().Response.Response != nil {
17359 sc = iter.Response().Response.Response.StatusCode
17360 }
17361 tracing.EndSpan(ctx, sc, err)
17362 }()
17363 }
17364 iter.i++
17365 if iter.i < len(iter.page.Values()) {
17366 return nil
17367 }
17368 err = iter.page.NextWithContext(ctx)
17369 if err != nil {
17370 iter.i--
17371 return err
17372 }
17373 iter.i = 0
17374 return nil
17375 }
17376
17377
17378
17379
17380 func (iter *ProtectableContainerResourceListIterator) Next() error {
17381 return iter.NextWithContext(context.Background())
17382 }
17383
17384
17385 func (iter ProtectableContainerResourceListIterator) NotDone() bool {
17386 return iter.page.NotDone() && iter.i < len(iter.page.Values())
17387 }
17388
17389
17390 func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList {
17391 return iter.page.Response()
17392 }
17393
17394
17395
17396 func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource {
17397 if !iter.page.NotDone() {
17398 return ProtectableContainerResource{}
17399 }
17400 return iter.page.Values()[iter.i]
17401 }
17402
17403
17404 func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator {
17405 return ProtectableContainerResourceListIterator{page: page}
17406 }
17407
17408
17409 func (pcrl ProtectableContainerResourceList) IsEmpty() bool {
17410 return pcrl.Value == nil || len(*pcrl.Value) == 0
17411 }
17412
17413
17414 func (pcrl ProtectableContainerResourceList) hasNextLink() bool {
17415 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
17416 }
17417
17418
17419
17420 func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
17421 if !pcrl.hasNextLink() {
17422 return nil, nil
17423 }
17424 return autorest.Prepare((&http.Request{}).WithContext(ctx),
17425 autorest.AsJSON(),
17426 autorest.AsGet(),
17427 autorest.WithBaseURL(to.String(pcrl.NextLink)))
17428 }
17429
17430
17431 type ProtectableContainerResourceListPage struct {
17432 fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)
17433 pcrl ProtectableContainerResourceList
17434 }
17435
17436
17437
17438 func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
17439 if tracing.IsEnabled() {
17440 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext")
17441 defer func() {
17442 sc := -1
17443 if page.Response().Response.Response != nil {
17444 sc = page.Response().Response.Response.StatusCode
17445 }
17446 tracing.EndSpan(ctx, sc, err)
17447 }()
17448 }
17449 for {
17450 next, err := page.fn(ctx, page.pcrl)
17451 if err != nil {
17452 return err
17453 }
17454 page.pcrl = next
17455 if !next.hasNextLink() || !next.IsEmpty() {
17456 break
17457 }
17458 }
17459 return nil
17460 }
17461
17462
17463
17464
17465 func (page *ProtectableContainerResourceListPage) Next() error {
17466 return page.NextWithContext(context.Background())
17467 }
17468
17469
17470 func (page ProtectableContainerResourceListPage) NotDone() bool {
17471 return !page.pcrl.IsEmpty()
17472 }
17473
17474
17475 func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList {
17476 return page.pcrl
17477 }
17478
17479
17480 func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource {
17481 if page.pcrl.IsEmpty() {
17482 return nil
17483 }
17484 return *page.pcrl.Value
17485 }
17486
17487
17488 func NewProtectableContainerResourceListPage(cur ProtectableContainerResourceList, getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage {
17489 return ProtectableContainerResourceListPage{
17490 fn: getNextPage,
17491 pcrl: cur,
17492 }
17493 }
17494
17495
17496 type BasicProtectedItem interface {
17497 AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool)
17498 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
17499 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
17500 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
17501 AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool)
17502 AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool)
17503 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
17504 AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool)
17505 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
17506 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
17507 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
17508 AsDPMProtectedItem() (*DPMProtectedItem, bool)
17509 AsGenericProtectedItem() (*GenericProtectedItem, bool)
17510 AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool)
17511 AsProtectedItem() (*ProtectedItem, bool)
17512 }
17513
17514
17515 type ProtectedItem struct {
17516
17517 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17518
17519 WorkloadType DataSourceType `json:"workloadType,omitempty"`
17520
17521 ContainerName *string `json:"containerName,omitempty"`
17522
17523 SourceResourceID *string `json:"sourceResourceId,omitempty"`
17524
17525 PolicyID *string `json:"policyId,omitempty"`
17526
17527 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
17528
17529 BackupSetName *string `json:"backupSetName,omitempty"`
17530
17531 CreateMode CreateMode `json:"createMode,omitempty"`
17532
17533 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
17534
17535 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
17536
17537 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
17538
17539 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
17540
17541 IsRehydrate *bool `json:"isRehydrate,omitempty"`
17542
17543 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
17544 }
17545
17546 func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) {
17547 var m map[string]interface{}
17548 err := json.Unmarshal(body, &m)
17549 if err != nil {
17550 return nil, err
17551 }
17552
17553 switch m["protectedItemType"] {
17554 case string(ProtectedItemTypeAzureFileShareProtectedItem):
17555 var afpi AzureFileshareProtectedItem
17556 err := json.Unmarshal(body, &afpi)
17557 return afpi, err
17558 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
17559 var aisccvpi AzureIaaSClassicComputeVMProtectedItem
17560 err := json.Unmarshal(body, &aisccvpi)
17561 return aisccvpi, err
17562 case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
17563 var aiscvpi AzureIaaSComputeVMProtectedItem
17564 err := json.Unmarshal(body, &aiscvpi)
17565 return aiscvpi, err
17566 case string(ProtectedItemTypeAzureIaaSVMProtectedItem):
17567 var aispi AzureIaaSVMProtectedItem
17568 err := json.Unmarshal(body, &aispi)
17569 return aispi, err
17570 case string(ProtectedItemTypeMicrosoftSqlserversdatabases):
17571 var aspi AzureSQLProtectedItem
17572 err := json.Unmarshal(body, &aspi)
17573 return aspi, err
17574 case string(ProtectedItemTypeAzureVMWorkloadProtectedItem):
17575 var avwpi AzureVMWorkloadProtectedItem
17576 err := json.Unmarshal(body, &avwpi)
17577 return avwpi, err
17578 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
17579 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
17580 err := json.Unmarshal(body, &avwsadpi)
17581 return avwsadpi, err
17582 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
17583 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
17584 err := json.Unmarshal(body, &avwshdpi)
17585 return avwshdpi, err
17586 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
17587 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
17588 err := json.Unmarshal(body, &avwsdpi)
17589 return avwsdpi, err
17590 case string(ProtectedItemTypeDPMProtectedItem):
17591 var dpi DPMProtectedItem
17592 err := json.Unmarshal(body, &dpi)
17593 return dpi, err
17594 case string(ProtectedItemTypeGenericProtectedItem):
17595 var gpi GenericProtectedItem
17596 err := json.Unmarshal(body, &gpi)
17597 return gpi, err
17598 case string(ProtectedItemTypeMabFileFolderProtectedItem):
17599 var mffpi MabFileFolderProtectedItem
17600 err := json.Unmarshal(body, &mffpi)
17601 return mffpi, err
17602 default:
17603 var pi ProtectedItem
17604 err := json.Unmarshal(body, &pi)
17605 return pi, err
17606 }
17607 }
17608 func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) {
17609 var rawMessages []*json.RawMessage
17610 err := json.Unmarshal(body, &rawMessages)
17611 if err != nil {
17612 return nil, err
17613 }
17614
17615 piArray := make([]BasicProtectedItem, len(rawMessages))
17616
17617 for index, rawMessage := range rawMessages {
17618 pi, err := unmarshalBasicProtectedItem(*rawMessage)
17619 if err != nil {
17620 return nil, err
17621 }
17622 piArray[index] = pi
17623 }
17624 return piArray, nil
17625 }
17626
17627
17628 func (pi ProtectedItem) MarshalJSON() ([]byte, error) {
17629 pi.ProtectedItemType = ProtectedItemTypeProtectedItem
17630 objectMap := make(map[string]interface{})
17631 if pi.BackupManagementType != "" {
17632 objectMap["backupManagementType"] = pi.BackupManagementType
17633 }
17634 if pi.WorkloadType != "" {
17635 objectMap["workloadType"] = pi.WorkloadType
17636 }
17637 if pi.ContainerName != nil {
17638 objectMap["containerName"] = pi.ContainerName
17639 }
17640 if pi.SourceResourceID != nil {
17641 objectMap["sourceResourceId"] = pi.SourceResourceID
17642 }
17643 if pi.PolicyID != nil {
17644 objectMap["policyId"] = pi.PolicyID
17645 }
17646 if pi.LastRecoveryPoint != nil {
17647 objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint
17648 }
17649 if pi.BackupSetName != nil {
17650 objectMap["backupSetName"] = pi.BackupSetName
17651 }
17652 if pi.CreateMode != "" {
17653 objectMap["createMode"] = pi.CreateMode
17654 }
17655 if pi.DeferredDeleteTimeInUTC != nil {
17656 objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC
17657 }
17658 if pi.IsScheduledForDeferredDelete != nil {
17659 objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete
17660 }
17661 if pi.DeferredDeleteTimeRemaining != nil {
17662 objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining
17663 }
17664 if pi.IsDeferredDeleteScheduleUpcoming != nil {
17665 objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming
17666 }
17667 if pi.IsRehydrate != nil {
17668 objectMap["isRehydrate"] = pi.IsRehydrate
17669 }
17670 if pi.ProtectedItemType != "" {
17671 objectMap["protectedItemType"] = pi.ProtectedItemType
17672 }
17673 return json.Marshal(objectMap)
17674 }
17675
17676
17677 func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
17678 return nil, false
17679 }
17680
17681
17682 func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
17683 return nil, false
17684 }
17685
17686
17687 func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
17688 return nil, false
17689 }
17690
17691
17692 func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
17693 return nil, false
17694 }
17695
17696
17697 func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
17698 return nil, false
17699 }
17700
17701
17702 func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
17703 return nil, false
17704 }
17705
17706
17707 func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
17708 return nil, false
17709 }
17710
17711
17712 func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
17713 return nil, false
17714 }
17715
17716
17717 func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
17718 return nil, false
17719 }
17720
17721
17722 func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
17723 return nil, false
17724 }
17725
17726
17727 func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
17728 return nil, false
17729 }
17730
17731
17732 func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
17733 return nil, false
17734 }
17735
17736
17737 func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
17738 return nil, false
17739 }
17740
17741
17742 func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
17743 return nil, false
17744 }
17745
17746
17747 func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
17748 return &pi, true
17749 }
17750
17751
17752 func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
17753 return &pi, true
17754 }
17755
17756
17757 type ProtectedItemQueryObject struct {
17758
17759 HealthState HealthState `json:"healthState,omitempty"`
17760
17761 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17762
17763 ItemType DataSourceType `json:"itemType,omitempty"`
17764
17765 PolicyName *string `json:"policyName,omitempty"`
17766
17767 ContainerName *string `json:"containerName,omitempty"`
17768
17769 BackupEngineName *string `json:"backupEngineName,omitempty"`
17770
17771 FriendlyName *string `json:"friendlyName,omitempty"`
17772
17773 FabricName *string `json:"fabricName,omitempty"`
17774
17775 BackupSetName *string `json:"backupSetName,omitempty"`
17776 }
17777
17778
17779 type ProtectedItemResource struct {
17780 autorest.Response `json:"-"`
17781
17782 Properties BasicProtectedItem `json:"properties,omitempty"`
17783
17784 ID *string `json:"id,omitempty"`
17785
17786 Name *string `json:"name,omitempty"`
17787
17788 Type *string `json:"type,omitempty"`
17789
17790 Location *string `json:"location,omitempty"`
17791
17792 Tags map[string]*string `json:"tags"`
17793
17794 ETag *string `json:"eTag,omitempty"`
17795 }
17796
17797
17798 func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) {
17799 objectMap := make(map[string]interface{})
17800 objectMap["properties"] = pir.Properties
17801 if pir.Location != nil {
17802 objectMap["location"] = pir.Location
17803 }
17804 if pir.Tags != nil {
17805 objectMap["tags"] = pir.Tags
17806 }
17807 if pir.ETag != nil {
17808 objectMap["eTag"] = pir.ETag
17809 }
17810 return json.Marshal(objectMap)
17811 }
17812
17813
17814 func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error {
17815 var m map[string]*json.RawMessage
17816 err := json.Unmarshal(body, &m)
17817 if err != nil {
17818 return err
17819 }
17820 for k, v := range m {
17821 switch k {
17822 case "properties":
17823 if v != nil {
17824 properties, err := unmarshalBasicProtectedItem(*v)
17825 if err != nil {
17826 return err
17827 }
17828 pir.Properties = properties
17829 }
17830 case "id":
17831 if v != nil {
17832 var ID string
17833 err = json.Unmarshal(*v, &ID)
17834 if err != nil {
17835 return err
17836 }
17837 pir.ID = &ID
17838 }
17839 case "name":
17840 if v != nil {
17841 var name string
17842 err = json.Unmarshal(*v, &name)
17843 if err != nil {
17844 return err
17845 }
17846 pir.Name = &name
17847 }
17848 case "type":
17849 if v != nil {
17850 var typeVar string
17851 err = json.Unmarshal(*v, &typeVar)
17852 if err != nil {
17853 return err
17854 }
17855 pir.Type = &typeVar
17856 }
17857 case "location":
17858 if v != nil {
17859 var location string
17860 err = json.Unmarshal(*v, &location)
17861 if err != nil {
17862 return err
17863 }
17864 pir.Location = &location
17865 }
17866 case "tags":
17867 if v != nil {
17868 var tags map[string]*string
17869 err = json.Unmarshal(*v, &tags)
17870 if err != nil {
17871 return err
17872 }
17873 pir.Tags = tags
17874 }
17875 case "eTag":
17876 if v != nil {
17877 var eTag string
17878 err = json.Unmarshal(*v, &eTag)
17879 if err != nil {
17880 return err
17881 }
17882 pir.ETag = &eTag
17883 }
17884 }
17885 }
17886
17887 return nil
17888 }
17889
17890
17891 type ProtectedItemResourceList struct {
17892 autorest.Response `json:"-"`
17893
17894 Value *[]ProtectedItemResource `json:"value,omitempty"`
17895
17896 NextLink *string `json:"nextLink,omitempty"`
17897 }
17898
17899
17900 type ProtectedItemResourceListIterator struct {
17901 i int
17902 page ProtectedItemResourceListPage
17903 }
17904
17905
17906
17907 func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
17908 if tracing.IsEnabled() {
17909 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext")
17910 defer func() {
17911 sc := -1
17912 if iter.Response().Response.Response != nil {
17913 sc = iter.Response().Response.Response.StatusCode
17914 }
17915 tracing.EndSpan(ctx, sc, err)
17916 }()
17917 }
17918 iter.i++
17919 if iter.i < len(iter.page.Values()) {
17920 return nil
17921 }
17922 err = iter.page.NextWithContext(ctx)
17923 if err != nil {
17924 iter.i--
17925 return err
17926 }
17927 iter.i = 0
17928 return nil
17929 }
17930
17931
17932
17933
17934 func (iter *ProtectedItemResourceListIterator) Next() error {
17935 return iter.NextWithContext(context.Background())
17936 }
17937
17938
17939 func (iter ProtectedItemResourceListIterator) NotDone() bool {
17940 return iter.page.NotDone() && iter.i < len(iter.page.Values())
17941 }
17942
17943
17944 func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList {
17945 return iter.page.Response()
17946 }
17947
17948
17949
17950 func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource {
17951 if !iter.page.NotDone() {
17952 return ProtectedItemResource{}
17953 }
17954 return iter.page.Values()[iter.i]
17955 }
17956
17957
17958 func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator {
17959 return ProtectedItemResourceListIterator{page: page}
17960 }
17961
17962
17963 func (pirl ProtectedItemResourceList) IsEmpty() bool {
17964 return pirl.Value == nil || len(*pirl.Value) == 0
17965 }
17966
17967
17968 func (pirl ProtectedItemResourceList) hasNextLink() bool {
17969 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
17970 }
17971
17972
17973
17974 func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
17975 if !pirl.hasNextLink() {
17976 return nil, nil
17977 }
17978 return autorest.Prepare((&http.Request{}).WithContext(ctx),
17979 autorest.AsJSON(),
17980 autorest.AsGet(),
17981 autorest.WithBaseURL(to.String(pirl.NextLink)))
17982 }
17983
17984
17985 type ProtectedItemResourceListPage struct {
17986 fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)
17987 pirl ProtectedItemResourceList
17988 }
17989
17990
17991
17992 func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
17993 if tracing.IsEnabled() {
17994 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext")
17995 defer func() {
17996 sc := -1
17997 if page.Response().Response.Response != nil {
17998 sc = page.Response().Response.Response.StatusCode
17999 }
18000 tracing.EndSpan(ctx, sc, err)
18001 }()
18002 }
18003 for {
18004 next, err := page.fn(ctx, page.pirl)
18005 if err != nil {
18006 return err
18007 }
18008 page.pirl = next
18009 if !next.hasNextLink() || !next.IsEmpty() {
18010 break
18011 }
18012 }
18013 return nil
18014 }
18015
18016
18017
18018
18019 func (page *ProtectedItemResourceListPage) Next() error {
18020 return page.NextWithContext(context.Background())
18021 }
18022
18023
18024 func (page ProtectedItemResourceListPage) NotDone() bool {
18025 return !page.pirl.IsEmpty()
18026 }
18027
18028
18029 func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList {
18030 return page.pirl
18031 }
18032
18033
18034 func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource {
18035 if page.pirl.IsEmpty() {
18036 return nil
18037 }
18038 return *page.pirl.Value
18039 }
18040
18041
18042 func NewProtectedItemResourceListPage(cur ProtectedItemResourceList, getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage {
18043 return ProtectedItemResourceListPage{
18044 fn: getNextPage,
18045 pirl: cur,
18046 }
18047 }
18048
18049
18050
18051 type BasicProtectionContainer interface {
18052 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
18053 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
18054 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
18055 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
18056 AsAzureSQLContainer() (*AzureSQLContainer, bool)
18057 AsAzureStorageContainer() (*AzureStorageContainer, bool)
18058 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
18059 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
18060 AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool)
18061 AsDpmContainer() (*DpmContainer, bool)
18062 AsBasicDpmContainer() (BasicDpmContainer, bool)
18063 AsGenericContainer() (*GenericContainer, bool)
18064 AsIaaSVMContainer() (*IaaSVMContainer, bool)
18065 AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool)
18066 AsMabContainer() (*MabContainer, bool)
18067 AsProtectionContainer() (*ProtectionContainer, bool)
18068 }
18069
18070
18071
18072 type ProtectionContainer struct {
18073
18074 FriendlyName *string `json:"friendlyName,omitempty"`
18075
18076 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18077
18078 RegistrationStatus *string `json:"registrationStatus,omitempty"`
18079
18080 HealthStatus *string `json:"healthStatus,omitempty"`
18081
18082 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
18083 }
18084
18085 func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) {
18086 var m map[string]interface{}
18087 err := json.Unmarshal(body, &m)
18088 if err != nil {
18089 return nil, err
18090 }
18091
18092 switch m["containerType"] {
18093 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer):
18094 var absc AzureBackupServerContainer
18095 err := json.Unmarshal(body, &absc)
18096 return absc, err
18097 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines):
18098 var aisccvc AzureIaaSClassicComputeVMContainer
18099 err := json.Unmarshal(body, &aisccvc)
18100 return aisccvc, err
18101 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines):
18102 var aiscvc AzureIaaSComputeVMContainer
18103 err := json.Unmarshal(body, &aiscvc)
18104 return aiscvc, err
18105 case string(ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer):
18106 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
18107 err := json.Unmarshal(body, &aswcpc)
18108 return aswcpc, err
18109 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer):
18110 var asc AzureSQLContainer
18111 err := json.Unmarshal(body, &asc)
18112 return asc, err
18113 case string(ContainerTypeBasicProtectionContainerContainerTypeStorageContainer):
18114 var asc AzureStorageContainer
18115 err := json.Unmarshal(body, &asc)
18116 return asc, err
18117 case string(ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer):
18118 var avacpc AzureVMAppContainerProtectionContainer
18119 err := json.Unmarshal(body, &avacpc)
18120 return avacpc, err
18121 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer):
18122 var awc AzureWorkloadContainer
18123 err := json.Unmarshal(body, &awc)
18124 return awc, err
18125 case string(ContainerTypeBasicProtectionContainerContainerTypeDPMContainer):
18126 var dc DpmContainer
18127 err := json.Unmarshal(body, &dc)
18128 return dc, err
18129 case string(ContainerTypeBasicProtectionContainerContainerTypeGenericContainer):
18130 var gc GenericContainer
18131 err := json.Unmarshal(body, &gc)
18132 return gc, err
18133 case string(ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer):
18134 var isc IaaSVMContainer
18135 err := json.Unmarshal(body, &isc)
18136 return isc, err
18137 case string(ContainerTypeBasicProtectionContainerContainerTypeWindows):
18138 var mc MabContainer
18139 err := json.Unmarshal(body, &mc)
18140 return mc, err
18141 default:
18142 var pc ProtectionContainer
18143 err := json.Unmarshal(body, &pc)
18144 return pc, err
18145 }
18146 }
18147 func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) {
18148 var rawMessages []*json.RawMessage
18149 err := json.Unmarshal(body, &rawMessages)
18150 if err != nil {
18151 return nil, err
18152 }
18153
18154 pcArray := make([]BasicProtectionContainer, len(rawMessages))
18155
18156 for index, rawMessage := range rawMessages {
18157 pc, err := unmarshalBasicProtectionContainer(*rawMessage)
18158 if err != nil {
18159 return nil, err
18160 }
18161 pcArray[index] = pc
18162 }
18163 return pcArray, nil
18164 }
18165
18166
18167 func (pc ProtectionContainer) MarshalJSON() ([]byte, error) {
18168 pc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer
18169 objectMap := make(map[string]interface{})
18170 if pc.FriendlyName != nil {
18171 objectMap["friendlyName"] = pc.FriendlyName
18172 }
18173 if pc.BackupManagementType != "" {
18174 objectMap["backupManagementType"] = pc.BackupManagementType
18175 }
18176 if pc.RegistrationStatus != nil {
18177 objectMap["registrationStatus"] = pc.RegistrationStatus
18178 }
18179 if pc.HealthStatus != nil {
18180 objectMap["healthStatus"] = pc.HealthStatus
18181 }
18182 if pc.ContainerType != "" {
18183 objectMap["containerType"] = pc.ContainerType
18184 }
18185 return json.Marshal(objectMap)
18186 }
18187
18188
18189 func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
18190 return nil, false
18191 }
18192
18193
18194 func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
18195 return nil, false
18196 }
18197
18198
18199 func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
18200 return nil, false
18201 }
18202
18203
18204 func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
18205 return nil, false
18206 }
18207
18208
18209 func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
18210 return nil, false
18211 }
18212
18213
18214 func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
18215 return nil, false
18216 }
18217
18218
18219 func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
18220 return nil, false
18221 }
18222
18223
18224 func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
18225 return nil, false
18226 }
18227
18228
18229 func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
18230 return nil, false
18231 }
18232
18233
18234 func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
18235 return nil, false
18236 }
18237
18238
18239 func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
18240 return nil, false
18241 }
18242
18243
18244 func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
18245 return nil, false
18246 }
18247
18248
18249 func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
18250 return nil, false
18251 }
18252
18253
18254 func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
18255 return nil, false
18256 }
18257
18258
18259 func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) {
18260 return nil, false
18261 }
18262
18263
18264 func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
18265 return &pc, true
18266 }
18267
18268
18269 func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
18270 return &pc, true
18271 }
18272
18273
18274
18275 type ProtectionContainerResource struct {
18276 autorest.Response `json:"-"`
18277
18278 Properties BasicProtectionContainer `json:"properties,omitempty"`
18279
18280 ID *string `json:"id,omitempty"`
18281
18282 Name *string `json:"name,omitempty"`
18283
18284 Type *string `json:"type,omitempty"`
18285
18286 Location *string `json:"location,omitempty"`
18287
18288 Tags map[string]*string `json:"tags"`
18289
18290 ETag *string `json:"eTag,omitempty"`
18291 }
18292
18293
18294 func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) {
18295 objectMap := make(map[string]interface{})
18296 objectMap["properties"] = pcr.Properties
18297 if pcr.Location != nil {
18298 objectMap["location"] = pcr.Location
18299 }
18300 if pcr.Tags != nil {
18301 objectMap["tags"] = pcr.Tags
18302 }
18303 if pcr.ETag != nil {
18304 objectMap["eTag"] = pcr.ETag
18305 }
18306 return json.Marshal(objectMap)
18307 }
18308
18309
18310 func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error {
18311 var m map[string]*json.RawMessage
18312 err := json.Unmarshal(body, &m)
18313 if err != nil {
18314 return err
18315 }
18316 for k, v := range m {
18317 switch k {
18318 case "properties":
18319 if v != nil {
18320 properties, err := unmarshalBasicProtectionContainer(*v)
18321 if err != nil {
18322 return err
18323 }
18324 pcr.Properties = properties
18325 }
18326 case "id":
18327 if v != nil {
18328 var ID string
18329 err = json.Unmarshal(*v, &ID)
18330 if err != nil {
18331 return err
18332 }
18333 pcr.ID = &ID
18334 }
18335 case "name":
18336 if v != nil {
18337 var name string
18338 err = json.Unmarshal(*v, &name)
18339 if err != nil {
18340 return err
18341 }
18342 pcr.Name = &name
18343 }
18344 case "type":
18345 if v != nil {
18346 var typeVar string
18347 err = json.Unmarshal(*v, &typeVar)
18348 if err != nil {
18349 return err
18350 }
18351 pcr.Type = &typeVar
18352 }
18353 case "location":
18354 if v != nil {
18355 var location string
18356 err = json.Unmarshal(*v, &location)
18357 if err != nil {
18358 return err
18359 }
18360 pcr.Location = &location
18361 }
18362 case "tags":
18363 if v != nil {
18364 var tags map[string]*string
18365 err = json.Unmarshal(*v, &tags)
18366 if err != nil {
18367 return err
18368 }
18369 pcr.Tags = tags
18370 }
18371 case "eTag":
18372 if v != nil {
18373 var eTag string
18374 err = json.Unmarshal(*v, &eTag)
18375 if err != nil {
18376 return err
18377 }
18378 pcr.ETag = &eTag
18379 }
18380 }
18381 }
18382
18383 return nil
18384 }
18385
18386
18387 type ProtectionContainerResourceList struct {
18388 autorest.Response `json:"-"`
18389
18390 Value *[]ProtectionContainerResource `json:"value,omitempty"`
18391
18392 NextLink *string `json:"nextLink,omitempty"`
18393 }
18394
18395
18396
18397 type ProtectionContainerResourceListIterator struct {
18398 i int
18399 page ProtectionContainerResourceListPage
18400 }
18401
18402
18403
18404 func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18405 if tracing.IsEnabled() {
18406 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext")
18407 defer func() {
18408 sc := -1
18409 if iter.Response().Response.Response != nil {
18410 sc = iter.Response().Response.Response.StatusCode
18411 }
18412 tracing.EndSpan(ctx, sc, err)
18413 }()
18414 }
18415 iter.i++
18416 if iter.i < len(iter.page.Values()) {
18417 return nil
18418 }
18419 err = iter.page.NextWithContext(ctx)
18420 if err != nil {
18421 iter.i--
18422 return err
18423 }
18424 iter.i = 0
18425 return nil
18426 }
18427
18428
18429
18430
18431 func (iter *ProtectionContainerResourceListIterator) Next() error {
18432 return iter.NextWithContext(context.Background())
18433 }
18434
18435
18436 func (iter ProtectionContainerResourceListIterator) NotDone() bool {
18437 return iter.page.NotDone() && iter.i < len(iter.page.Values())
18438 }
18439
18440
18441 func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList {
18442 return iter.page.Response()
18443 }
18444
18445
18446
18447 func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource {
18448 if !iter.page.NotDone() {
18449 return ProtectionContainerResource{}
18450 }
18451 return iter.page.Values()[iter.i]
18452 }
18453
18454
18455 func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator {
18456 return ProtectionContainerResourceListIterator{page: page}
18457 }
18458
18459
18460 func (pcrl ProtectionContainerResourceList) IsEmpty() bool {
18461 return pcrl.Value == nil || len(*pcrl.Value) == 0
18462 }
18463
18464
18465 func (pcrl ProtectionContainerResourceList) hasNextLink() bool {
18466 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
18467 }
18468
18469
18470
18471 func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
18472 if !pcrl.hasNextLink() {
18473 return nil, nil
18474 }
18475 return autorest.Prepare((&http.Request{}).WithContext(ctx),
18476 autorest.AsJSON(),
18477 autorest.AsGet(),
18478 autorest.WithBaseURL(to.String(pcrl.NextLink)))
18479 }
18480
18481
18482 type ProtectionContainerResourceListPage struct {
18483 fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)
18484 pcrl ProtectionContainerResourceList
18485 }
18486
18487
18488
18489 func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
18490 if tracing.IsEnabled() {
18491 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext")
18492 defer func() {
18493 sc := -1
18494 if page.Response().Response.Response != nil {
18495 sc = page.Response().Response.Response.StatusCode
18496 }
18497 tracing.EndSpan(ctx, sc, err)
18498 }()
18499 }
18500 for {
18501 next, err := page.fn(ctx, page.pcrl)
18502 if err != nil {
18503 return err
18504 }
18505 page.pcrl = next
18506 if !next.hasNextLink() || !next.IsEmpty() {
18507 break
18508 }
18509 }
18510 return nil
18511 }
18512
18513
18514
18515
18516 func (page *ProtectionContainerResourceListPage) Next() error {
18517 return page.NextWithContext(context.Background())
18518 }
18519
18520
18521 func (page ProtectionContainerResourceListPage) NotDone() bool {
18522 return !page.pcrl.IsEmpty()
18523 }
18524
18525
18526 func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList {
18527 return page.pcrl
18528 }
18529
18530
18531 func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource {
18532 if page.pcrl.IsEmpty() {
18533 return nil
18534 }
18535 return *page.pcrl.Value
18536 }
18537
18538
18539 func NewProtectionContainerResourceListPage(cur ProtectionContainerResourceList, getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage {
18540 return ProtectionContainerResourceListPage{
18541 fn: getNextPage,
18542 pcrl: cur,
18543 }
18544 }
18545
18546
18547 type BasicProtectionIntent interface {
18548 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
18549 AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool)
18550 AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool)
18551 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
18552 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
18553 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
18554 AsProtectionIntent() (*ProtectionIntent, bool)
18555 }
18556
18557
18558 type ProtectionIntent struct {
18559
18560 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18561
18562 SourceResourceID *string `json:"sourceResourceId,omitempty"`
18563
18564 ItemID *string `json:"itemId,omitempty"`
18565
18566 PolicyID *string `json:"policyId,omitempty"`
18567
18568 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
18569
18570 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
18571 }
18572
18573 func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) {
18574 var m map[string]interface{}
18575 err := json.Unmarshal(body, &m)
18576 if err != nil {
18577 return nil, err
18578 }
18579
18580 switch m["protectionIntentItemType"] {
18581 case string(ProtectionIntentItemTypeRecoveryServiceVaultItem):
18582 var arsvpi AzureRecoveryServiceVaultProtectionIntent
18583 err := json.Unmarshal(body, &arsvpi)
18584 return arsvpi, err
18585 case string(ProtectionIntentItemTypeAzureResourceItem):
18586 var arpi AzureResourceProtectionIntent
18587 err := json.Unmarshal(body, &arpi)
18588 return arpi, err
18589 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
18590 var awapi AzureWorkloadAutoProtectionIntent
18591 err := json.Unmarshal(body, &awapi)
18592 return awapi, err
18593 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
18594 var awsapi AzureWorkloadSQLAutoProtectionIntent
18595 err := json.Unmarshal(body, &awsapi)
18596 return awsapi, err
18597 default:
18598 var pi ProtectionIntent
18599 err := json.Unmarshal(body, &pi)
18600 return pi, err
18601 }
18602 }
18603 func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) {
18604 var rawMessages []*json.RawMessage
18605 err := json.Unmarshal(body, &rawMessages)
18606 if err != nil {
18607 return nil, err
18608 }
18609
18610 piArray := make([]BasicProtectionIntent, len(rawMessages))
18611
18612 for index, rawMessage := range rawMessages {
18613 pi, err := unmarshalBasicProtectionIntent(*rawMessage)
18614 if err != nil {
18615 return nil, err
18616 }
18617 piArray[index] = pi
18618 }
18619 return piArray, nil
18620 }
18621
18622
18623 func (pi ProtectionIntent) MarshalJSON() ([]byte, error) {
18624 pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent
18625 objectMap := make(map[string]interface{})
18626 if pi.BackupManagementType != "" {
18627 objectMap["backupManagementType"] = pi.BackupManagementType
18628 }
18629 if pi.SourceResourceID != nil {
18630 objectMap["sourceResourceId"] = pi.SourceResourceID
18631 }
18632 if pi.ItemID != nil {
18633 objectMap["itemId"] = pi.ItemID
18634 }
18635 if pi.PolicyID != nil {
18636 objectMap["policyId"] = pi.PolicyID
18637 }
18638 if pi.ProtectionState != "" {
18639 objectMap["protectionState"] = pi.ProtectionState
18640 }
18641 if pi.ProtectionIntentItemType != "" {
18642 objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType
18643 }
18644 return json.Marshal(objectMap)
18645 }
18646
18647
18648 func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
18649 return nil, false
18650 }
18651
18652
18653 func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
18654 return nil, false
18655 }
18656
18657
18658 func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
18659 return nil, false
18660 }
18661
18662
18663 func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
18664 return nil, false
18665 }
18666
18667
18668 func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
18669 return nil, false
18670 }
18671
18672
18673 func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
18674 return nil, false
18675 }
18676
18677
18678 func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
18679 return &pi, true
18680 }
18681
18682
18683 func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
18684 return &pi, true
18685 }
18686
18687
18688 type ProtectionIntentQueryObject struct {
18689
18690 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18691
18692 ItemType IntentItemType `json:"itemType,omitempty"`
18693
18694 ParentName *string `json:"parentName,omitempty"`
18695
18696 ItemName *string `json:"itemName,omitempty"`
18697 }
18698
18699
18700 type ProtectionIntentResource struct {
18701 autorest.Response `json:"-"`
18702
18703 Properties BasicProtectionIntent `json:"properties,omitempty"`
18704
18705 ID *string `json:"id,omitempty"`
18706
18707 Name *string `json:"name,omitempty"`
18708
18709 Type *string `json:"type,omitempty"`
18710
18711 Location *string `json:"location,omitempty"`
18712
18713 Tags map[string]*string `json:"tags"`
18714
18715 ETag *string `json:"eTag,omitempty"`
18716 }
18717
18718
18719 func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) {
18720 objectMap := make(map[string]interface{})
18721 objectMap["properties"] = pir.Properties
18722 if pir.Location != nil {
18723 objectMap["location"] = pir.Location
18724 }
18725 if pir.Tags != nil {
18726 objectMap["tags"] = pir.Tags
18727 }
18728 if pir.ETag != nil {
18729 objectMap["eTag"] = pir.ETag
18730 }
18731 return json.Marshal(objectMap)
18732 }
18733
18734
18735 func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error {
18736 var m map[string]*json.RawMessage
18737 err := json.Unmarshal(body, &m)
18738 if err != nil {
18739 return err
18740 }
18741 for k, v := range m {
18742 switch k {
18743 case "properties":
18744 if v != nil {
18745 properties, err := unmarshalBasicProtectionIntent(*v)
18746 if err != nil {
18747 return err
18748 }
18749 pir.Properties = properties
18750 }
18751 case "id":
18752 if v != nil {
18753 var ID string
18754 err = json.Unmarshal(*v, &ID)
18755 if err != nil {
18756 return err
18757 }
18758 pir.ID = &ID
18759 }
18760 case "name":
18761 if v != nil {
18762 var name string
18763 err = json.Unmarshal(*v, &name)
18764 if err != nil {
18765 return err
18766 }
18767 pir.Name = &name
18768 }
18769 case "type":
18770 if v != nil {
18771 var typeVar string
18772 err = json.Unmarshal(*v, &typeVar)
18773 if err != nil {
18774 return err
18775 }
18776 pir.Type = &typeVar
18777 }
18778 case "location":
18779 if v != nil {
18780 var location string
18781 err = json.Unmarshal(*v, &location)
18782 if err != nil {
18783 return err
18784 }
18785 pir.Location = &location
18786 }
18787 case "tags":
18788 if v != nil {
18789 var tags map[string]*string
18790 err = json.Unmarshal(*v, &tags)
18791 if err != nil {
18792 return err
18793 }
18794 pir.Tags = tags
18795 }
18796 case "eTag":
18797 if v != nil {
18798 var eTag string
18799 err = json.Unmarshal(*v, &eTag)
18800 if err != nil {
18801 return err
18802 }
18803 pir.ETag = &eTag
18804 }
18805 }
18806 }
18807
18808 return nil
18809 }
18810
18811
18812 type ProtectionIntentResourceList struct {
18813 autorest.Response `json:"-"`
18814
18815 Value *[]ProtectionIntentResource `json:"value,omitempty"`
18816
18817 NextLink *string `json:"nextLink,omitempty"`
18818 }
18819
18820
18821
18822 type ProtectionIntentResourceListIterator struct {
18823 i int
18824 page ProtectionIntentResourceListPage
18825 }
18826
18827
18828
18829 func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18830 if tracing.IsEnabled() {
18831 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext")
18832 defer func() {
18833 sc := -1
18834 if iter.Response().Response.Response != nil {
18835 sc = iter.Response().Response.Response.StatusCode
18836 }
18837 tracing.EndSpan(ctx, sc, err)
18838 }()
18839 }
18840 iter.i++
18841 if iter.i < len(iter.page.Values()) {
18842 return nil
18843 }
18844 err = iter.page.NextWithContext(ctx)
18845 if err != nil {
18846 iter.i--
18847 return err
18848 }
18849 iter.i = 0
18850 return nil
18851 }
18852
18853
18854
18855
18856 func (iter *ProtectionIntentResourceListIterator) Next() error {
18857 return iter.NextWithContext(context.Background())
18858 }
18859
18860
18861 func (iter ProtectionIntentResourceListIterator) NotDone() bool {
18862 return iter.page.NotDone() && iter.i < len(iter.page.Values())
18863 }
18864
18865
18866 func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList {
18867 return iter.page.Response()
18868 }
18869
18870
18871
18872 func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource {
18873 if !iter.page.NotDone() {
18874 return ProtectionIntentResource{}
18875 }
18876 return iter.page.Values()[iter.i]
18877 }
18878
18879
18880 func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator {
18881 return ProtectionIntentResourceListIterator{page: page}
18882 }
18883
18884
18885 func (pirl ProtectionIntentResourceList) IsEmpty() bool {
18886 return pirl.Value == nil || len(*pirl.Value) == 0
18887 }
18888
18889
18890 func (pirl ProtectionIntentResourceList) hasNextLink() bool {
18891 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
18892 }
18893
18894
18895
18896 func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) {
18897 if !pirl.hasNextLink() {
18898 return nil, nil
18899 }
18900 return autorest.Prepare((&http.Request{}).WithContext(ctx),
18901 autorest.AsJSON(),
18902 autorest.AsGet(),
18903 autorest.WithBaseURL(to.String(pirl.NextLink)))
18904 }
18905
18906
18907 type ProtectionIntentResourceListPage struct {
18908 fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)
18909 pirl ProtectionIntentResourceList
18910 }
18911
18912
18913
18914 func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) {
18915 if tracing.IsEnabled() {
18916 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext")
18917 defer func() {
18918 sc := -1
18919 if page.Response().Response.Response != nil {
18920 sc = page.Response().Response.Response.StatusCode
18921 }
18922 tracing.EndSpan(ctx, sc, err)
18923 }()
18924 }
18925 for {
18926 next, err := page.fn(ctx, page.pirl)
18927 if err != nil {
18928 return err
18929 }
18930 page.pirl = next
18931 if !next.hasNextLink() || !next.IsEmpty() {
18932 break
18933 }
18934 }
18935 return nil
18936 }
18937
18938
18939
18940
18941 func (page *ProtectionIntentResourceListPage) Next() error {
18942 return page.NextWithContext(context.Background())
18943 }
18944
18945
18946 func (page ProtectionIntentResourceListPage) NotDone() bool {
18947 return !page.pirl.IsEmpty()
18948 }
18949
18950
18951 func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList {
18952 return page.pirl
18953 }
18954
18955
18956 func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource {
18957 if page.pirl.IsEmpty() {
18958 return nil
18959 }
18960 return *page.pirl.Value
18961 }
18962
18963
18964 func NewProtectionIntentResourceListPage(cur ProtectionIntentResourceList, getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage {
18965 return ProtectionIntentResourceListPage{
18966 fn: getNextPage,
18967 pirl: cur,
18968 }
18969 }
18970
18971
18972
18973 type ProtectionPoliciesDeleteFuture struct {
18974 azure.FutureAPI
18975
18976
18977 Result func(ProtectionPoliciesClient) (autorest.Response, error)
18978 }
18979
18980
18981 func (future *ProtectionPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
18982 var azFuture azure.Future
18983 if err := json.Unmarshal(body, &azFuture); err != nil {
18984 return err
18985 }
18986 future.FutureAPI = &azFuture
18987 future.Result = future.result
18988 return nil
18989 }
18990
18991
18992 func (future *ProtectionPoliciesDeleteFuture) result(client ProtectionPoliciesClient) (ar autorest.Response, err error) {
18993 var done bool
18994 done, err = future.DoneWithContext(context.Background(), client)
18995 if err != nil {
18996 err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
18997 return
18998 }
18999 if !done {
19000 ar.Response = future.Response()
19001 err = azure.NewAsyncOpIncompleteError("backup.ProtectionPoliciesDeleteFuture")
19002 return
19003 }
19004 ar.Response = future.Response()
19005 return
19006 }
19007
19008
19009 type BasicProtectionPolicy interface {
19010 AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool)
19011 AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool)
19012 AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool)
19013 AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool)
19014 AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool)
19015 AsMabProtectionPolicy() (*MabProtectionPolicy, bool)
19016 AsProtectionPolicy() (*ProtectionPolicy, bool)
19017 }
19018
19019
19020
19021 type ProtectionPolicy struct {
19022
19023 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
19024
19025 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
19026 }
19027
19028 func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) {
19029 var m map[string]interface{}
19030 err := json.Unmarshal(body, &m)
19031 if err != nil {
19032 return nil, err
19033 }
19034
19035 switch m["backupManagementType"] {
19036 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload):
19037 var avwpp AzureVMWorkloadProtectionPolicy
19038 err := json.Unmarshal(body, &avwpp)
19039 return avwpp, err
19040 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage):
19041 var afspp AzureFileShareProtectionPolicy
19042 err := json.Unmarshal(body, &afspp)
19043 return afspp, err
19044 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM):
19045 var aispp AzureIaaSVMProtectionPolicy
19046 err := json.Unmarshal(body, &aispp)
19047 return aispp, err
19048 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL):
19049 var aspp AzureSQLProtectionPolicy
19050 err := json.Unmarshal(body, &aspp)
19051 return aspp, err
19052 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy):
19053 var gpp GenericProtectionPolicy
19054 err := json.Unmarshal(body, &gpp)
19055 return gpp, err
19056 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB):
19057 var mpp MabProtectionPolicy
19058 err := json.Unmarshal(body, &mpp)
19059 return mpp, err
19060 default:
19061 var pp ProtectionPolicy
19062 err := json.Unmarshal(body, &pp)
19063 return pp, err
19064 }
19065 }
19066 func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) {
19067 var rawMessages []*json.RawMessage
19068 err := json.Unmarshal(body, &rawMessages)
19069 if err != nil {
19070 return nil, err
19071 }
19072
19073 ppArray := make([]BasicProtectionPolicy, len(rawMessages))
19074
19075 for index, rawMessage := range rawMessages {
19076 pp, err := unmarshalBasicProtectionPolicy(*rawMessage)
19077 if err != nil {
19078 return nil, err
19079 }
19080 ppArray[index] = pp
19081 }
19082 return ppArray, nil
19083 }
19084
19085
19086 func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) {
19087 pp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy
19088 objectMap := make(map[string]interface{})
19089 if pp.ProtectedItemsCount != nil {
19090 objectMap["protectedItemsCount"] = pp.ProtectedItemsCount
19091 }
19092 if pp.BackupManagementType != "" {
19093 objectMap["backupManagementType"] = pp.BackupManagementType
19094 }
19095 return json.Marshal(objectMap)
19096 }
19097
19098
19099 func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
19100 return nil, false
19101 }
19102
19103
19104 func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
19105 return nil, false
19106 }
19107
19108
19109 func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
19110 return nil, false
19111 }
19112
19113
19114 func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
19115 return nil, false
19116 }
19117
19118
19119 func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
19120 return nil, false
19121 }
19122
19123
19124 func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
19125 return nil, false
19126 }
19127
19128
19129 func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
19130 return &pp, true
19131 }
19132
19133
19134 func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
19135 return &pp, true
19136 }
19137
19138
19139 type ProtectionPolicyQueryObject struct {
19140
19141 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
19142
19143 FabricName *string `json:"fabricName,omitempty"`
19144
19145 WorkloadType WorkloadType `json:"workloadType,omitempty"`
19146 }
19147
19148
19149
19150 type ProtectionPolicyResource struct {
19151 autorest.Response `json:"-"`
19152
19153 Properties BasicProtectionPolicy `json:"properties,omitempty"`
19154
19155 ID *string `json:"id,omitempty"`
19156
19157 Name *string `json:"name,omitempty"`
19158
19159 Type *string `json:"type,omitempty"`
19160
19161 Location *string `json:"location,omitempty"`
19162
19163 Tags map[string]*string `json:"tags"`
19164
19165 ETag *string `json:"eTag,omitempty"`
19166 }
19167
19168
19169 func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) {
19170 objectMap := make(map[string]interface{})
19171 objectMap["properties"] = ppr.Properties
19172 if ppr.Location != nil {
19173 objectMap["location"] = ppr.Location
19174 }
19175 if ppr.Tags != nil {
19176 objectMap["tags"] = ppr.Tags
19177 }
19178 if ppr.ETag != nil {
19179 objectMap["eTag"] = ppr.ETag
19180 }
19181 return json.Marshal(objectMap)
19182 }
19183
19184
19185 func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error {
19186 var m map[string]*json.RawMessage
19187 err := json.Unmarshal(body, &m)
19188 if err != nil {
19189 return err
19190 }
19191 for k, v := range m {
19192 switch k {
19193 case "properties":
19194 if v != nil {
19195 properties, err := unmarshalBasicProtectionPolicy(*v)
19196 if err != nil {
19197 return err
19198 }
19199 ppr.Properties = properties
19200 }
19201 case "id":
19202 if v != nil {
19203 var ID string
19204 err = json.Unmarshal(*v, &ID)
19205 if err != nil {
19206 return err
19207 }
19208 ppr.ID = &ID
19209 }
19210 case "name":
19211 if v != nil {
19212 var name string
19213 err = json.Unmarshal(*v, &name)
19214 if err != nil {
19215 return err
19216 }
19217 ppr.Name = &name
19218 }
19219 case "type":
19220 if v != nil {
19221 var typeVar string
19222 err = json.Unmarshal(*v, &typeVar)
19223 if err != nil {
19224 return err
19225 }
19226 ppr.Type = &typeVar
19227 }
19228 case "location":
19229 if v != nil {
19230 var location string
19231 err = json.Unmarshal(*v, &location)
19232 if err != nil {
19233 return err
19234 }
19235 ppr.Location = &location
19236 }
19237 case "tags":
19238 if v != nil {
19239 var tags map[string]*string
19240 err = json.Unmarshal(*v, &tags)
19241 if err != nil {
19242 return err
19243 }
19244 ppr.Tags = tags
19245 }
19246 case "eTag":
19247 if v != nil {
19248 var eTag string
19249 err = json.Unmarshal(*v, &eTag)
19250 if err != nil {
19251 return err
19252 }
19253 ppr.ETag = &eTag
19254 }
19255 }
19256 }
19257
19258 return nil
19259 }
19260
19261
19262 type ProtectionPolicyResourceList struct {
19263 autorest.Response `json:"-"`
19264
19265 Value *[]ProtectionPolicyResource `json:"value,omitempty"`
19266
19267 NextLink *string `json:"nextLink,omitempty"`
19268 }
19269
19270
19271
19272 type ProtectionPolicyResourceListIterator struct {
19273 i int
19274 page ProtectionPolicyResourceListPage
19275 }
19276
19277
19278
19279 func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19280 if tracing.IsEnabled() {
19281 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext")
19282 defer func() {
19283 sc := -1
19284 if iter.Response().Response.Response != nil {
19285 sc = iter.Response().Response.Response.StatusCode
19286 }
19287 tracing.EndSpan(ctx, sc, err)
19288 }()
19289 }
19290 iter.i++
19291 if iter.i < len(iter.page.Values()) {
19292 return nil
19293 }
19294 err = iter.page.NextWithContext(ctx)
19295 if err != nil {
19296 iter.i--
19297 return err
19298 }
19299 iter.i = 0
19300 return nil
19301 }
19302
19303
19304
19305
19306 func (iter *ProtectionPolicyResourceListIterator) Next() error {
19307 return iter.NextWithContext(context.Background())
19308 }
19309
19310
19311 func (iter ProtectionPolicyResourceListIterator) NotDone() bool {
19312 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19313 }
19314
19315
19316 func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList {
19317 return iter.page.Response()
19318 }
19319
19320
19321
19322 func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource {
19323 if !iter.page.NotDone() {
19324 return ProtectionPolicyResource{}
19325 }
19326 return iter.page.Values()[iter.i]
19327 }
19328
19329
19330 func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator {
19331 return ProtectionPolicyResourceListIterator{page: page}
19332 }
19333
19334
19335 func (pprl ProtectionPolicyResourceList) IsEmpty() bool {
19336 return pprl.Value == nil || len(*pprl.Value) == 0
19337 }
19338
19339
19340 func (pprl ProtectionPolicyResourceList) hasNextLink() bool {
19341 return pprl.NextLink != nil && len(*pprl.NextLink) != 0
19342 }
19343
19344
19345
19346 func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) {
19347 if !pprl.hasNextLink() {
19348 return nil, nil
19349 }
19350 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19351 autorest.AsJSON(),
19352 autorest.AsGet(),
19353 autorest.WithBaseURL(to.String(pprl.NextLink)))
19354 }
19355
19356
19357 type ProtectionPolicyResourceListPage struct {
19358 fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)
19359 pprl ProtectionPolicyResourceList
19360 }
19361
19362
19363
19364 func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) {
19365 if tracing.IsEnabled() {
19366 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext")
19367 defer func() {
19368 sc := -1
19369 if page.Response().Response.Response != nil {
19370 sc = page.Response().Response.Response.StatusCode
19371 }
19372 tracing.EndSpan(ctx, sc, err)
19373 }()
19374 }
19375 for {
19376 next, err := page.fn(ctx, page.pprl)
19377 if err != nil {
19378 return err
19379 }
19380 page.pprl = next
19381 if !next.hasNextLink() || !next.IsEmpty() {
19382 break
19383 }
19384 }
19385 return nil
19386 }
19387
19388
19389
19390
19391 func (page *ProtectionPolicyResourceListPage) Next() error {
19392 return page.NextWithContext(context.Background())
19393 }
19394
19395
19396 func (page ProtectionPolicyResourceListPage) NotDone() bool {
19397 return !page.pprl.IsEmpty()
19398 }
19399
19400
19401 func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList {
19402 return page.pprl
19403 }
19404
19405
19406 func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource {
19407 if page.pprl.IsEmpty() {
19408 return nil
19409 }
19410 return *page.pprl.Value
19411 }
19412
19413
19414 func NewProtectionPolicyResourceListPage(cur ProtectionPolicyResourceList, getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage {
19415 return ProtectionPolicyResourceListPage{
19416 fn: getNextPage,
19417 pprl: cur,
19418 }
19419 }
19420
19421
19422 type BasicRecoveryPoint interface {
19423 AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool)
19424 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
19425 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
19426 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
19427 AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool)
19428 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
19429 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
19430 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
19431 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
19432 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
19433 AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool)
19434 AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool)
19435 AsRecoveryPoint() (*RecoveryPoint, bool)
19436 }
19437
19438
19439 type RecoveryPoint struct {
19440
19441 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
19442 }
19443
19444 func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) {
19445 var m map[string]interface{}
19446 err := json.Unmarshal(body, &m)
19447 if err != nil {
19448 return nil, err
19449 }
19450
19451 switch m["objectType"] {
19452 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint):
19453 var afsrp AzureFileShareRecoveryPoint
19454 err := json.Unmarshal(body, &afsrp)
19455 return afsrp, err
19456 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
19457 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
19458 err := json.Unmarshal(body, &awpitrp)
19459 return awpitrp, err
19460 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint):
19461 var awrp AzureWorkloadRecoveryPoint
19462 err := json.Unmarshal(body, &awrp)
19463 return awrp, err
19464 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
19465 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
19466 err := json.Unmarshal(body, &awshpitrp)
19467 return awshpitrp, err
19468 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
19469 var awshrp AzureWorkloadSAPHanaRecoveryPoint
19470 err := json.Unmarshal(body, &awshrp)
19471 return awshrp, err
19472 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
19473 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
19474 err := json.Unmarshal(body, &awspitrp)
19475 return awspitrp, err
19476 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint):
19477 var awsrp AzureWorkloadSQLRecoveryPoint
19478 err := json.Unmarshal(body, &awsrp)
19479 return awsrp, err
19480 case string(ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint):
19481 var grp GenericRecoveryPoint
19482 err := json.Unmarshal(body, &grp)
19483 return grp, err
19484 case string(ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint):
19485 var ivrp IaasVMRecoveryPoint
19486 err := json.Unmarshal(body, &ivrp)
19487 return ivrp, err
19488 default:
19489 var rp RecoveryPoint
19490 err := json.Unmarshal(body, &rp)
19491 return rp, err
19492 }
19493 }
19494 func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) {
19495 var rawMessages []*json.RawMessage
19496 err := json.Unmarshal(body, &rawMessages)
19497 if err != nil {
19498 return nil, err
19499 }
19500
19501 rpArray := make([]BasicRecoveryPoint, len(rawMessages))
19502
19503 for index, rawMessage := range rawMessages {
19504 rp, err := unmarshalBasicRecoveryPoint(*rawMessage)
19505 if err != nil {
19506 return nil, err
19507 }
19508 rpArray[index] = rp
19509 }
19510 return rpArray, nil
19511 }
19512
19513
19514 func (rp RecoveryPoint) MarshalJSON() ([]byte, error) {
19515 rp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint
19516 objectMap := make(map[string]interface{})
19517 if rp.ObjectType != "" {
19518 objectMap["objectType"] = rp.ObjectType
19519 }
19520 return json.Marshal(objectMap)
19521 }
19522
19523
19524 func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
19525 return nil, false
19526 }
19527
19528
19529 func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
19530 return nil, false
19531 }
19532
19533
19534 func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
19535 return nil, false
19536 }
19537
19538
19539 func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
19540 return nil, false
19541 }
19542
19543
19544 func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
19545 return nil, false
19546 }
19547
19548
19549 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
19550 return nil, false
19551 }
19552
19553
19554 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
19555 return nil, false
19556 }
19557
19558
19559 func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
19560 return nil, false
19561 }
19562
19563
19564 func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
19565 return nil, false
19566 }
19567
19568
19569 func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
19570 return nil, false
19571 }
19572
19573
19574 func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
19575 return nil, false
19576 }
19577
19578
19579 func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
19580 return nil, false
19581 }
19582
19583
19584 func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
19585 return &rp, true
19586 }
19587
19588
19589 func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
19590 return &rp, true
19591 }
19592
19593
19594 type RecoveryPointDiskConfiguration struct {
19595
19596 NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"`
19597
19598 NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"`
19599
19600 IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"`
19601
19602 ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"`
19603 }
19604
19605
19606 type RecoveryPointMoveReadinessInfo struct {
19607 IsReadyForMove *bool `json:"isReadyForMove,omitempty"`
19608 AdditionalInfo *string `json:"additionalInfo,omitempty"`
19609 }
19610
19611
19612 type RecoveryPointRehydrationInfo struct {
19613
19614
19615 RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"`
19616
19617 RehydrationPriority RehydrationPriority `json:"rehydrationPriority,omitempty"`
19618 }
19619
19620
19621
19622 type RecoveryPointResource struct {
19623 autorest.Response `json:"-"`
19624
19625 Properties BasicRecoveryPoint `json:"properties,omitempty"`
19626
19627 ID *string `json:"id,omitempty"`
19628
19629 Name *string `json:"name,omitempty"`
19630
19631 Type *string `json:"type,omitempty"`
19632
19633 Location *string `json:"location,omitempty"`
19634
19635 Tags map[string]*string `json:"tags"`
19636
19637 ETag *string `json:"eTag,omitempty"`
19638 }
19639
19640
19641 func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) {
19642 objectMap := make(map[string]interface{})
19643 objectMap["properties"] = rpr.Properties
19644 if rpr.Location != nil {
19645 objectMap["location"] = rpr.Location
19646 }
19647 if rpr.Tags != nil {
19648 objectMap["tags"] = rpr.Tags
19649 }
19650 if rpr.ETag != nil {
19651 objectMap["eTag"] = rpr.ETag
19652 }
19653 return json.Marshal(objectMap)
19654 }
19655
19656
19657 func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error {
19658 var m map[string]*json.RawMessage
19659 err := json.Unmarshal(body, &m)
19660 if err != nil {
19661 return err
19662 }
19663 for k, v := range m {
19664 switch k {
19665 case "properties":
19666 if v != nil {
19667 properties, err := unmarshalBasicRecoveryPoint(*v)
19668 if err != nil {
19669 return err
19670 }
19671 rpr.Properties = properties
19672 }
19673 case "id":
19674 if v != nil {
19675 var ID string
19676 err = json.Unmarshal(*v, &ID)
19677 if err != nil {
19678 return err
19679 }
19680 rpr.ID = &ID
19681 }
19682 case "name":
19683 if v != nil {
19684 var name string
19685 err = json.Unmarshal(*v, &name)
19686 if err != nil {
19687 return err
19688 }
19689 rpr.Name = &name
19690 }
19691 case "type":
19692 if v != nil {
19693 var typeVar string
19694 err = json.Unmarshal(*v, &typeVar)
19695 if err != nil {
19696 return err
19697 }
19698 rpr.Type = &typeVar
19699 }
19700 case "location":
19701 if v != nil {
19702 var location string
19703 err = json.Unmarshal(*v, &location)
19704 if err != nil {
19705 return err
19706 }
19707 rpr.Location = &location
19708 }
19709 case "tags":
19710 if v != nil {
19711 var tags map[string]*string
19712 err = json.Unmarshal(*v, &tags)
19713 if err != nil {
19714 return err
19715 }
19716 rpr.Tags = tags
19717 }
19718 case "eTag":
19719 if v != nil {
19720 var eTag string
19721 err = json.Unmarshal(*v, &eTag)
19722 if err != nil {
19723 return err
19724 }
19725 rpr.ETag = &eTag
19726 }
19727 }
19728 }
19729
19730 return nil
19731 }
19732
19733
19734 type RecoveryPointResourceList struct {
19735 autorest.Response `json:"-"`
19736
19737 Value *[]RecoveryPointResource `json:"value,omitempty"`
19738
19739 NextLink *string `json:"nextLink,omitempty"`
19740 }
19741
19742
19743 type RecoveryPointResourceListIterator struct {
19744 i int
19745 page RecoveryPointResourceListPage
19746 }
19747
19748
19749
19750 func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19751 if tracing.IsEnabled() {
19752 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext")
19753 defer func() {
19754 sc := -1
19755 if iter.Response().Response.Response != nil {
19756 sc = iter.Response().Response.Response.StatusCode
19757 }
19758 tracing.EndSpan(ctx, sc, err)
19759 }()
19760 }
19761 iter.i++
19762 if iter.i < len(iter.page.Values()) {
19763 return nil
19764 }
19765 err = iter.page.NextWithContext(ctx)
19766 if err != nil {
19767 iter.i--
19768 return err
19769 }
19770 iter.i = 0
19771 return nil
19772 }
19773
19774
19775
19776
19777 func (iter *RecoveryPointResourceListIterator) Next() error {
19778 return iter.NextWithContext(context.Background())
19779 }
19780
19781
19782 func (iter RecoveryPointResourceListIterator) NotDone() bool {
19783 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19784 }
19785
19786
19787 func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList {
19788 return iter.page.Response()
19789 }
19790
19791
19792
19793 func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource {
19794 if !iter.page.NotDone() {
19795 return RecoveryPointResource{}
19796 }
19797 return iter.page.Values()[iter.i]
19798 }
19799
19800
19801 func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator {
19802 return RecoveryPointResourceListIterator{page: page}
19803 }
19804
19805
19806 func (rprl RecoveryPointResourceList) IsEmpty() bool {
19807 return rprl.Value == nil || len(*rprl.Value) == 0
19808 }
19809
19810
19811 func (rprl RecoveryPointResourceList) hasNextLink() bool {
19812 return rprl.NextLink != nil && len(*rprl.NextLink) != 0
19813 }
19814
19815
19816
19817 func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) {
19818 if !rprl.hasNextLink() {
19819 return nil, nil
19820 }
19821 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19822 autorest.AsJSON(),
19823 autorest.AsGet(),
19824 autorest.WithBaseURL(to.String(rprl.NextLink)))
19825 }
19826
19827
19828 type RecoveryPointResourceListPage struct {
19829 fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)
19830 rprl RecoveryPointResourceList
19831 }
19832
19833
19834
19835 func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) {
19836 if tracing.IsEnabled() {
19837 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext")
19838 defer func() {
19839 sc := -1
19840 if page.Response().Response.Response != nil {
19841 sc = page.Response().Response.Response.StatusCode
19842 }
19843 tracing.EndSpan(ctx, sc, err)
19844 }()
19845 }
19846 for {
19847 next, err := page.fn(ctx, page.rprl)
19848 if err != nil {
19849 return err
19850 }
19851 page.rprl = next
19852 if !next.hasNextLink() || !next.IsEmpty() {
19853 break
19854 }
19855 }
19856 return nil
19857 }
19858
19859
19860
19861
19862 func (page *RecoveryPointResourceListPage) Next() error {
19863 return page.NextWithContext(context.Background())
19864 }
19865
19866
19867 func (page RecoveryPointResourceListPage) NotDone() bool {
19868 return !page.rprl.IsEmpty()
19869 }
19870
19871
19872 func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList {
19873 return page.rprl
19874 }
19875
19876
19877 func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource {
19878 if page.rprl.IsEmpty() {
19879 return nil
19880 }
19881 return *page.rprl.Value
19882 }
19883
19884
19885 func NewRecoveryPointResourceListPage(cur RecoveryPointResourceList, getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage {
19886 return RecoveryPointResourceListPage{
19887 fn: getNextPage,
19888 rprl: cur,
19889 }
19890 }
19891
19892
19893 type RecoveryPointTierInformation struct {
19894
19895 Type RecoveryPointTierType `json:"type,omitempty"`
19896
19897 Status RecoveryPointTierStatus `json:"status,omitempty"`
19898
19899 ExtendedInfo map[string]*string `json:"extendedInfo"`
19900 }
19901
19902
19903 func (rpti RecoveryPointTierInformation) MarshalJSON() ([]byte, error) {
19904 objectMap := make(map[string]interface{})
19905 if rpti.Type != "" {
19906 objectMap["type"] = rpti.Type
19907 }
19908 if rpti.Status != "" {
19909 objectMap["status"] = rpti.Status
19910 }
19911 if rpti.ExtendedInfo != nil {
19912 objectMap["extendedInfo"] = rpti.ExtendedInfo
19913 }
19914 return json.Marshal(objectMap)
19915 }
19916
19917
19918 type BasicRequest interface {
19919 AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool)
19920 AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool)
19921 AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool)
19922 AsRequest() (*Request, bool)
19923 }
19924
19925
19926 type Request struct {
19927
19928 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
19929 }
19930
19931 func unmarshalBasicRequest(body []byte) (BasicRequest, error) {
19932 var m map[string]interface{}
19933 err := json.Unmarshal(body, &m)
19934 if err != nil {
19935 return nil, err
19936 }
19937
19938 switch m["objectType"] {
19939 case string(ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest):
19940 var afsbr AzureFileShareBackupRequest
19941 err := json.Unmarshal(body, &afsbr)
19942 return afsbr, err
19943 case string(ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest):
19944 var awbr AzureWorkloadBackupRequest
19945 err := json.Unmarshal(body, &awbr)
19946 return awbr, err
19947 case string(ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest):
19948 var ivbr IaasVMBackupRequest
19949 err := json.Unmarshal(body, &ivbr)
19950 return ivbr, err
19951 default:
19952 var r Request
19953 err := json.Unmarshal(body, &r)
19954 return r, err
19955 }
19956 }
19957 func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) {
19958 var rawMessages []*json.RawMessage
19959 err := json.Unmarshal(body, &rawMessages)
19960 if err != nil {
19961 return nil, err
19962 }
19963
19964 rArray := make([]BasicRequest, len(rawMessages))
19965
19966 for index, rawMessage := range rawMessages {
19967 r, err := unmarshalBasicRequest(*rawMessage)
19968 if err != nil {
19969 return nil, err
19970 }
19971 rArray[index] = r
19972 }
19973 return rArray, nil
19974 }
19975
19976
19977 func (r Request) MarshalJSON() ([]byte, error) {
19978 r.ObjectType = ObjectTypeBasicRequestObjectTypeBackupRequest
19979 objectMap := make(map[string]interface{})
19980 if r.ObjectType != "" {
19981 objectMap["objectType"] = r.ObjectType
19982 }
19983 return json.Marshal(objectMap)
19984 }
19985
19986
19987 func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
19988 return nil, false
19989 }
19990
19991
19992 func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
19993 return nil, false
19994 }
19995
19996
19997 func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
19998 return nil, false
19999 }
20000
20001
20002 func (r Request) AsRequest() (*Request, bool) {
20003 return &r, true
20004 }
20005
20006
20007 func (r Request) AsBasicRequest() (BasicRequest, bool) {
20008 return &r, true
20009 }
20010
20011
20012
20013 type RequestResource struct {
20014
20015 Properties BasicRequest `json:"properties,omitempty"`
20016
20017 ID *string `json:"id,omitempty"`
20018
20019 Name *string `json:"name,omitempty"`
20020
20021 Type *string `json:"type,omitempty"`
20022
20023 Location *string `json:"location,omitempty"`
20024
20025 Tags map[string]*string `json:"tags"`
20026
20027 ETag *string `json:"eTag,omitempty"`
20028 }
20029
20030
20031 func (rr RequestResource) MarshalJSON() ([]byte, error) {
20032 objectMap := make(map[string]interface{})
20033 objectMap["properties"] = rr.Properties
20034 if rr.Location != nil {
20035 objectMap["location"] = rr.Location
20036 }
20037 if rr.Tags != nil {
20038 objectMap["tags"] = rr.Tags
20039 }
20040 if rr.ETag != nil {
20041 objectMap["eTag"] = rr.ETag
20042 }
20043 return json.Marshal(objectMap)
20044 }
20045
20046
20047 func (rr *RequestResource) UnmarshalJSON(body []byte) error {
20048 var m map[string]*json.RawMessage
20049 err := json.Unmarshal(body, &m)
20050 if err != nil {
20051 return err
20052 }
20053 for k, v := range m {
20054 switch k {
20055 case "properties":
20056 if v != nil {
20057 properties, err := unmarshalBasicRequest(*v)
20058 if err != nil {
20059 return err
20060 }
20061 rr.Properties = properties
20062 }
20063 case "id":
20064 if v != nil {
20065 var ID string
20066 err = json.Unmarshal(*v, &ID)
20067 if err != nil {
20068 return err
20069 }
20070 rr.ID = &ID
20071 }
20072 case "name":
20073 if v != nil {
20074 var name string
20075 err = json.Unmarshal(*v, &name)
20076 if err != nil {
20077 return err
20078 }
20079 rr.Name = &name
20080 }
20081 case "type":
20082 if v != nil {
20083 var typeVar string
20084 err = json.Unmarshal(*v, &typeVar)
20085 if err != nil {
20086 return err
20087 }
20088 rr.Type = &typeVar
20089 }
20090 case "location":
20091 if v != nil {
20092 var location string
20093 err = json.Unmarshal(*v, &location)
20094 if err != nil {
20095 return err
20096 }
20097 rr.Location = &location
20098 }
20099 case "tags":
20100 if v != nil {
20101 var tags map[string]*string
20102 err = json.Unmarshal(*v, &tags)
20103 if err != nil {
20104 return err
20105 }
20106 rr.Tags = tags
20107 }
20108 case "eTag":
20109 if v != nil {
20110 var eTag string
20111 err = json.Unmarshal(*v, &eTag)
20112 if err != nil {
20113 return err
20114 }
20115 rr.ETag = &eTag
20116 }
20117 }
20118 }
20119
20120 return nil
20121 }
20122
20123
20124 type Resource struct {
20125
20126 ID *string `json:"id,omitempty"`
20127
20128 Name *string `json:"name,omitempty"`
20129
20130 Type *string `json:"type,omitempty"`
20131
20132 Location *string `json:"location,omitempty"`
20133
20134 Tags map[string]*string `json:"tags"`
20135
20136 ETag *string `json:"eTag,omitempty"`
20137 }
20138
20139
20140 func (r Resource) MarshalJSON() ([]byte, error) {
20141 objectMap := make(map[string]interface{})
20142 if r.Location != nil {
20143 objectMap["location"] = r.Location
20144 }
20145 if r.Tags != nil {
20146 objectMap["tags"] = r.Tags
20147 }
20148 if r.ETag != nil {
20149 objectMap["eTag"] = r.ETag
20150 }
20151 return json.Marshal(objectMap)
20152 }
20153
20154
20155 type ResourceConfig struct {
20156
20157 StorageModelType StorageType `json:"storageModelType,omitempty"`
20158
20159 StorageType StorageType `json:"storageType,omitempty"`
20160
20161 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
20162
20163 CrossRegionRestoreFlag *bool `json:"crossRegionRestoreFlag,omitempty"`
20164 }
20165
20166
20167 type ResourceConfigResource struct {
20168 autorest.Response `json:"-"`
20169
20170 Properties *ResourceConfig `json:"properties,omitempty"`
20171
20172 ID *string `json:"id,omitempty"`
20173
20174 Name *string `json:"name,omitempty"`
20175
20176 Type *string `json:"type,omitempty"`
20177
20178 Location *string `json:"location,omitempty"`
20179
20180 Tags map[string]*string `json:"tags"`
20181
20182 ETag *string `json:"eTag,omitempty"`
20183 }
20184
20185
20186 func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) {
20187 objectMap := make(map[string]interface{})
20188 if rcr.Properties != nil {
20189 objectMap["properties"] = rcr.Properties
20190 }
20191 if rcr.Location != nil {
20192 objectMap["location"] = rcr.Location
20193 }
20194 if rcr.Tags != nil {
20195 objectMap["tags"] = rcr.Tags
20196 }
20197 if rcr.ETag != nil {
20198 objectMap["eTag"] = rcr.ETag
20199 }
20200 return json.Marshal(objectMap)
20201 }
20202
20203
20204 type ResourceEncryptionConfig struct {
20205
20206 EncryptionAtRestType EncryptionAtRestType `json:"encryptionAtRestType,omitempty"`
20207
20208 KeyURI *string `json:"keyUri,omitempty"`
20209
20210 SubscriptionID *string `json:"subscriptionId,omitempty"`
20211
20212 LastUpdateStatus LastUpdateStatus `json:"lastUpdateStatus,omitempty"`
20213
20214 InfrastructureEncryptionState InfrastructureEncryptionState `json:"infrastructureEncryptionState,omitempty"`
20215 }
20216
20217
20218 type ResourceEncryptionConfigResource struct {
20219 autorest.Response `json:"-"`
20220
20221 Properties *ResourceEncryptionConfig `json:"properties,omitempty"`
20222
20223 ID *string `json:"id,omitempty"`
20224
20225 Name *string `json:"name,omitempty"`
20226
20227 Type *string `json:"type,omitempty"`
20228
20229 Location *string `json:"location,omitempty"`
20230
20231 Tags map[string]*string `json:"tags"`
20232
20233 ETag *string `json:"eTag,omitempty"`
20234 }
20235
20236
20237 func (recr ResourceEncryptionConfigResource) MarshalJSON() ([]byte, error) {
20238 objectMap := make(map[string]interface{})
20239 if recr.Properties != nil {
20240 objectMap["properties"] = recr.Properties
20241 }
20242 if recr.Location != nil {
20243 objectMap["location"] = recr.Location
20244 }
20245 if recr.Tags != nil {
20246 objectMap["tags"] = recr.Tags
20247 }
20248 if recr.ETag != nil {
20249 objectMap["eTag"] = recr.ETag
20250 }
20251 return json.Marshal(objectMap)
20252 }
20253
20254
20255 type ResourceHealthDetails struct {
20256
20257 Code *int32 `json:"code,omitempty"`
20258
20259 Title *string `json:"title,omitempty"`
20260
20261 Message *string `json:"message,omitempty"`
20262
20263 Recommendations *[]string `json:"recommendations,omitempty"`
20264 }
20265
20266
20267 func (rhd ResourceHealthDetails) MarshalJSON() ([]byte, error) {
20268 objectMap := make(map[string]interface{})
20269 return json.Marshal(objectMap)
20270 }
20271
20272
20273 type ResourceList struct {
20274
20275 NextLink *string `json:"nextLink,omitempty"`
20276 }
20277
20278
20279 type ResourceVaultConfig struct {
20280
20281 StorageModelType StorageType `json:"storageModelType,omitempty"`
20282
20283 StorageType StorageType `json:"storageType,omitempty"`
20284
20285 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
20286
20287 EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"`
20288
20289 SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"`
20290 }
20291
20292
20293 type ResourceVaultConfigResource struct {
20294 autorest.Response `json:"-"`
20295
20296 Properties *ResourceVaultConfig `json:"properties,omitempty"`
20297
20298 ID *string `json:"id,omitempty"`
20299
20300 Name *string `json:"name,omitempty"`
20301
20302 Type *string `json:"type,omitempty"`
20303
20304 Location *string `json:"location,omitempty"`
20305
20306 Tags map[string]*string `json:"tags"`
20307
20308 ETag *string `json:"eTag,omitempty"`
20309 }
20310
20311
20312 func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) {
20313 objectMap := make(map[string]interface{})
20314 if rvcr.Properties != nil {
20315 objectMap["properties"] = rvcr.Properties
20316 }
20317 if rvcr.Location != nil {
20318 objectMap["location"] = rvcr.Location
20319 }
20320 if rvcr.Tags != nil {
20321 objectMap["tags"] = rvcr.Tags
20322 }
20323 if rvcr.ETag != nil {
20324 objectMap["eTag"] = rvcr.ETag
20325 }
20326 return json.Marshal(objectMap)
20327 }
20328
20329
20330 type RestoreFileSpecs struct {
20331
20332 Path *string `json:"path,omitempty"`
20333
20334 FileSpecType *string `json:"fileSpecType,omitempty"`
20335
20336 TargetFolderPath *string `json:"targetFolderPath,omitempty"`
20337 }
20338
20339
20340 type BasicRestoreRequest interface {
20341 AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool)
20342 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
20343 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
20344 AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool)
20345 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
20346 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
20347 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
20348 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
20349 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
20350 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
20351 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
20352 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
20353 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
20354 AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool)
20355 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
20356 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
20357 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
20358 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
20359 AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool)
20360 AsRestoreRequest() (*RestoreRequest, bool)
20361 }
20362
20363
20364
20365 type RestoreRequest struct {
20366
20367 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
20368 }
20369
20370 func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) {
20371 var m map[string]interface{}
20372 err := json.Unmarshal(body, &m)
20373 if err != nil {
20374 return nil, err
20375 }
20376
20377 switch m["objectType"] {
20378 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest):
20379 var afsrr AzureFileShareRestoreRequest
20380 err := json.Unmarshal(body, &afsrr)
20381 return afsrr, err
20382 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest):
20383 var awpitrr AzureWorkloadPointInTimeRestoreRequest
20384 err := json.Unmarshal(body, &awpitrr)
20385 return awpitrr, err
20386 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest):
20387 var awrr AzureWorkloadRestoreRequest
20388 err := json.Unmarshal(body, &awrr)
20389 return awrr, err
20390 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
20391 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
20392 err := json.Unmarshal(body, &awshpitrr)
20393 return awshpitrr, err
20394 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest):
20395 var awshrr AzureWorkloadSAPHanaRestoreRequest
20396 err := json.Unmarshal(body, &awshrr)
20397 return awshrr, err
20398 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
20399 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
20400 err := json.Unmarshal(body, &awspitrr)
20401 return awspitrr, err
20402 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest):
20403 var awsrr AzureWorkloadSQLRestoreRequest
20404 err := json.Unmarshal(body, &awsrr)
20405 return awsrr, err
20406 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest):
20407 var ivrr IaasVMRestoreRequest
20408 err := json.Unmarshal(body, &ivrr)
20409 return ivrr, err
20410 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
20411 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
20412 err := json.Unmarshal(body, &awshpitrwrr)
20413 return awshpitrwrr, err
20414 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
20415 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
20416 err := json.Unmarshal(body, &awshrwrr)
20417 return awshrwrr, err
20418 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
20419 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
20420 err := json.Unmarshal(body, &awspitrwrr)
20421 return awspitrwrr, err
20422 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
20423 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
20424 err := json.Unmarshal(body, &awsrwrr)
20425 return awsrwrr, err
20426 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest):
20427 var ivrwrr IaasVMRestoreWithRehydrationRequest
20428 err := json.Unmarshal(body, &ivrwrr)
20429 return ivrwrr, err
20430 default:
20431 var rr RestoreRequest
20432 err := json.Unmarshal(body, &rr)
20433 return rr, err
20434 }
20435 }
20436 func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) {
20437 var rawMessages []*json.RawMessage
20438 err := json.Unmarshal(body, &rawMessages)
20439 if err != nil {
20440 return nil, err
20441 }
20442
20443 rrArray := make([]BasicRestoreRequest, len(rawMessages))
20444
20445 for index, rawMessage := range rawMessages {
20446 rr, err := unmarshalBasicRestoreRequest(*rawMessage)
20447 if err != nil {
20448 return nil, err
20449 }
20450 rrArray[index] = rr
20451 }
20452 return rrArray, nil
20453 }
20454
20455
20456 func (rr RestoreRequest) MarshalJSON() ([]byte, error) {
20457 rr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest
20458 objectMap := make(map[string]interface{})
20459 if rr.ObjectType != "" {
20460 objectMap["objectType"] = rr.ObjectType
20461 }
20462 return json.Marshal(objectMap)
20463 }
20464
20465
20466 func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
20467 return nil, false
20468 }
20469
20470
20471 func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
20472 return nil, false
20473 }
20474
20475
20476 func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
20477 return nil, false
20478 }
20479
20480
20481 func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
20482 return nil, false
20483 }
20484
20485
20486 func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
20487 return nil, false
20488 }
20489
20490
20491 func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
20492 return nil, false
20493 }
20494
20495
20496 func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
20497 return nil, false
20498 }
20499
20500
20501 func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
20502 return nil, false
20503 }
20504
20505
20506 func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
20507 return nil, false
20508 }
20509
20510
20511 func (rr RestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
20512 return nil, false
20513 }
20514
20515
20516 func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
20517 return nil, false
20518 }
20519
20520
20521 func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
20522 return nil, false
20523 }
20524
20525
20526 func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
20527 return nil, false
20528 }
20529
20530
20531 func (rr RestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
20532 return nil, false
20533 }
20534
20535
20536 func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
20537 return nil, false
20538 }
20539
20540
20541 func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
20542 return nil, false
20543 }
20544
20545
20546 func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
20547 return nil, false
20548 }
20549
20550
20551 func (rr RestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
20552 return nil, false
20553 }
20554
20555
20556 func (rr RestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
20557 return nil, false
20558 }
20559
20560
20561 func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
20562 return &rr, true
20563 }
20564
20565
20566 func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
20567 return &rr, true
20568 }
20569
20570
20571
20572 type RestoreRequestResource struct {
20573
20574 Properties BasicRestoreRequest `json:"properties,omitempty"`
20575
20576 ID *string `json:"id,omitempty"`
20577
20578 Name *string `json:"name,omitempty"`
20579
20580 Type *string `json:"type,omitempty"`
20581
20582 Location *string `json:"location,omitempty"`
20583
20584 Tags map[string]*string `json:"tags"`
20585
20586 ETag *string `json:"eTag,omitempty"`
20587 }
20588
20589
20590 func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) {
20591 objectMap := make(map[string]interface{})
20592 objectMap["properties"] = rrr.Properties
20593 if rrr.Location != nil {
20594 objectMap["location"] = rrr.Location
20595 }
20596 if rrr.Tags != nil {
20597 objectMap["tags"] = rrr.Tags
20598 }
20599 if rrr.ETag != nil {
20600 objectMap["eTag"] = rrr.ETag
20601 }
20602 return json.Marshal(objectMap)
20603 }
20604
20605
20606 func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error {
20607 var m map[string]*json.RawMessage
20608 err := json.Unmarshal(body, &m)
20609 if err != nil {
20610 return err
20611 }
20612 for k, v := range m {
20613 switch k {
20614 case "properties":
20615 if v != nil {
20616 properties, err := unmarshalBasicRestoreRequest(*v)
20617 if err != nil {
20618 return err
20619 }
20620 rrr.Properties = properties
20621 }
20622 case "id":
20623 if v != nil {
20624 var ID string
20625 err = json.Unmarshal(*v, &ID)
20626 if err != nil {
20627 return err
20628 }
20629 rrr.ID = &ID
20630 }
20631 case "name":
20632 if v != nil {
20633 var name string
20634 err = json.Unmarshal(*v, &name)
20635 if err != nil {
20636 return err
20637 }
20638 rrr.Name = &name
20639 }
20640 case "type":
20641 if v != nil {
20642 var typeVar string
20643 err = json.Unmarshal(*v, &typeVar)
20644 if err != nil {
20645 return err
20646 }
20647 rrr.Type = &typeVar
20648 }
20649 case "location":
20650 if v != nil {
20651 var location string
20652 err = json.Unmarshal(*v, &location)
20653 if err != nil {
20654 return err
20655 }
20656 rrr.Location = &location
20657 }
20658 case "tags":
20659 if v != nil {
20660 var tags map[string]*string
20661 err = json.Unmarshal(*v, &tags)
20662 if err != nil {
20663 return err
20664 }
20665 rrr.Tags = tags
20666 }
20667 case "eTag":
20668 if v != nil {
20669 var eTag string
20670 err = json.Unmarshal(*v, &eTag)
20671 if err != nil {
20672 return err
20673 }
20674 rrr.ETag = &eTag
20675 }
20676 }
20677 }
20678
20679 return nil
20680 }
20681
20682
20683
20684 type RestoresTriggerFuture struct {
20685 azure.FutureAPI
20686
20687
20688 Result func(RestoresClient) (autorest.Response, error)
20689 }
20690
20691
20692 func (future *RestoresTriggerFuture) UnmarshalJSON(body []byte) error {
20693 var azFuture azure.Future
20694 if err := json.Unmarshal(body, &azFuture); err != nil {
20695 return err
20696 }
20697 future.FutureAPI = &azFuture
20698 future.Result = future.result
20699 return nil
20700 }
20701
20702
20703 func (future *RestoresTriggerFuture) result(client RestoresClient) (ar autorest.Response, err error) {
20704 var done bool
20705 done, err = future.DoneWithContext(context.Background(), client)
20706 if err != nil {
20707 err = autorest.NewErrorWithError(err, "backup.RestoresTriggerFuture", "Result", future.Response(), "Polling failure")
20708 return
20709 }
20710 if !done {
20711 ar.Response = future.Response()
20712 err = azure.NewAsyncOpIncompleteError("backup.RestoresTriggerFuture")
20713 return
20714 }
20715 ar.Response = future.Response()
20716 return
20717 }
20718
20719
20720 type RetentionDuration struct {
20721
20722
20723 Count *int32 `json:"count,omitempty"`
20724
20725 DurationType RetentionDurationType `json:"durationType,omitempty"`
20726 }
20727
20728
20729 type BasicRetentionPolicy interface {
20730 AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool)
20731 AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool)
20732 AsRetentionPolicy() (*RetentionPolicy, bool)
20733 }
20734
20735
20736 type RetentionPolicy struct {
20737
20738 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
20739 }
20740
20741 func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) {
20742 var m map[string]interface{}
20743 err := json.Unmarshal(body, &m)
20744 if err != nil {
20745 return nil, err
20746 }
20747
20748 switch m["retentionPolicyType"] {
20749 case string(RetentionPolicyTypeLongTermRetentionPolicy):
20750 var ltrp LongTermRetentionPolicy
20751 err := json.Unmarshal(body, <rp)
20752 return ltrp, err
20753 case string(RetentionPolicyTypeSimpleRetentionPolicy):
20754 var srp SimpleRetentionPolicy
20755 err := json.Unmarshal(body, &srp)
20756 return srp, err
20757 default:
20758 var rp RetentionPolicy
20759 err := json.Unmarshal(body, &rp)
20760 return rp, err
20761 }
20762 }
20763 func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) {
20764 var rawMessages []*json.RawMessage
20765 err := json.Unmarshal(body, &rawMessages)
20766 if err != nil {
20767 return nil, err
20768 }
20769
20770 rpArray := make([]BasicRetentionPolicy, len(rawMessages))
20771
20772 for index, rawMessage := range rawMessages {
20773 rp, err := unmarshalBasicRetentionPolicy(*rawMessage)
20774 if err != nil {
20775 return nil, err
20776 }
20777 rpArray[index] = rp
20778 }
20779 return rpArray, nil
20780 }
20781
20782
20783 func (rp RetentionPolicy) MarshalJSON() ([]byte, error) {
20784 rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy
20785 objectMap := make(map[string]interface{})
20786 if rp.RetentionPolicyType != "" {
20787 objectMap["retentionPolicyType"] = rp.RetentionPolicyType
20788 }
20789 return json.Marshal(objectMap)
20790 }
20791
20792
20793 func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
20794 return nil, false
20795 }
20796
20797
20798 func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
20799 return nil, false
20800 }
20801
20802
20803 func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
20804 return &rp, true
20805 }
20806
20807
20808 func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
20809 return &rp, true
20810 }
20811
20812
20813 type BasicSchedulePolicy interface {
20814 AsLogSchedulePolicy() (*LogSchedulePolicy, bool)
20815 AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool)
20816 AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool)
20817 AsSchedulePolicy() (*SchedulePolicy, bool)
20818 }
20819
20820
20821 type SchedulePolicy struct {
20822
20823 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
20824 }
20825
20826 func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) {
20827 var m map[string]interface{}
20828 err := json.Unmarshal(body, &m)
20829 if err != nil {
20830 return nil, err
20831 }
20832
20833 switch m["schedulePolicyType"] {
20834 case string(SchedulePolicyTypeLogSchedulePolicy):
20835 var lsp LogSchedulePolicy
20836 err := json.Unmarshal(body, &lsp)
20837 return lsp, err
20838 case string(SchedulePolicyTypeLongTermSchedulePolicy):
20839 var ltsp LongTermSchedulePolicy
20840 err := json.Unmarshal(body, <sp)
20841 return ltsp, err
20842 case string(SchedulePolicyTypeSimpleSchedulePolicy):
20843 var ssp SimpleSchedulePolicy
20844 err := json.Unmarshal(body, &ssp)
20845 return ssp, err
20846 default:
20847 var sp SchedulePolicy
20848 err := json.Unmarshal(body, &sp)
20849 return sp, err
20850 }
20851 }
20852 func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) {
20853 var rawMessages []*json.RawMessage
20854 err := json.Unmarshal(body, &rawMessages)
20855 if err != nil {
20856 return nil, err
20857 }
20858
20859 spArray := make([]BasicSchedulePolicy, len(rawMessages))
20860
20861 for index, rawMessage := range rawMessages {
20862 sp, err := unmarshalBasicSchedulePolicy(*rawMessage)
20863 if err != nil {
20864 return nil, err
20865 }
20866 spArray[index] = sp
20867 }
20868 return spArray, nil
20869 }
20870
20871
20872 func (sp SchedulePolicy) MarshalJSON() ([]byte, error) {
20873 sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy
20874 objectMap := make(map[string]interface{})
20875 if sp.SchedulePolicyType != "" {
20876 objectMap["schedulePolicyType"] = sp.SchedulePolicyType
20877 }
20878 return json.Marshal(objectMap)
20879 }
20880
20881
20882 func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
20883 return nil, false
20884 }
20885
20886
20887 func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
20888 return nil, false
20889 }
20890
20891
20892 func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
20893 return nil, false
20894 }
20895
20896
20897 func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
20898 return &sp, true
20899 }
20900
20901
20902 func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
20903 return &sp, true
20904 }
20905
20906
20907 type Settings struct {
20908
20909 TimeZone *string `json:"timeZone,omitempty"`
20910
20911 Issqlcompression *bool `json:"issqlcompression,omitempty"`
20912
20913
20914 IsCompression *bool `json:"isCompression,omitempty"`
20915 }
20916
20917
20918 type SimpleRetentionPolicy struct {
20919
20920 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
20921
20922 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
20923 }
20924
20925
20926 func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) {
20927 srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy
20928 objectMap := make(map[string]interface{})
20929 if srp.RetentionDuration != nil {
20930 objectMap["retentionDuration"] = srp.RetentionDuration
20931 }
20932 if srp.RetentionPolicyType != "" {
20933 objectMap["retentionPolicyType"] = srp.RetentionPolicyType
20934 }
20935 return json.Marshal(objectMap)
20936 }
20937
20938
20939 func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
20940 return nil, false
20941 }
20942
20943
20944 func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
20945 return &srp, true
20946 }
20947
20948
20949 func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
20950 return nil, false
20951 }
20952
20953
20954 func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
20955 return &srp, true
20956 }
20957
20958
20959 type SimpleSchedulePolicy struct {
20960
20961 ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"`
20962
20963 ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"`
20964
20965 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"`
20966
20967 ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"`
20968
20969 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
20970 }
20971
20972
20973 func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) {
20974 ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy
20975 objectMap := make(map[string]interface{})
20976 if ssp.ScheduleRunFrequency != "" {
20977 objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency
20978 }
20979 if ssp.ScheduleRunDays != nil {
20980 objectMap["scheduleRunDays"] = ssp.ScheduleRunDays
20981 }
20982 if ssp.ScheduleRunTimes != nil {
20983 objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes
20984 }
20985 if ssp.ScheduleWeeklyFrequency != nil {
20986 objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency
20987 }
20988 if ssp.SchedulePolicyType != "" {
20989 objectMap["schedulePolicyType"] = ssp.SchedulePolicyType
20990 }
20991 return json.Marshal(objectMap)
20992 }
20993
20994
20995 func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
20996 return nil, false
20997 }
20998
20999
21000 func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
21001 return nil, false
21002 }
21003
21004
21005 func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
21006 return &ssp, true
21007 }
21008
21009
21010 func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
21011 return nil, false
21012 }
21013
21014
21015 func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
21016 return &ssp, true
21017 }
21018
21019
21020 type SQLDataDirectory struct {
21021
21022 Type SQLDataDirectoryType `json:"type,omitempty"`
21023
21024 Path *string `json:"path,omitempty"`
21025
21026 LogicalName *string `json:"logicalName,omitempty"`
21027 }
21028
21029
21030 type SQLDataDirectoryMapping struct {
21031
21032 MappingType SQLDataDirectoryType `json:"mappingType,omitempty"`
21033
21034 SourceLogicalName *string `json:"sourceLogicalName,omitempty"`
21035
21036 SourcePath *string `json:"sourcePath,omitempty"`
21037
21038 TargetPath *string `json:"targetPath,omitempty"`
21039 }
21040
21041
21042 type StatusRequest struct {
21043
21044 ResourceType DataSourceType `json:"resourceType,omitempty"`
21045
21046 ResourceID *string `json:"resourceId,omitempty"`
21047
21048 PoLogicalName *string `json:"poLogicalName,omitempty"`
21049 }
21050
21051
21052 type StatusResponse struct {
21053 autorest.Response `json:"-"`
21054
21055 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
21056
21057 VaultID *string `json:"vaultId,omitempty"`
21058
21059 FabricName FabricName `json:"fabricName,omitempty"`
21060
21061 ContainerName *string `json:"containerName,omitempty"`
21062
21063 ProtectedItemName *string `json:"protectedItemName,omitempty"`
21064
21065 ErrorCode *string `json:"errorCode,omitempty"`
21066
21067 ErrorMessage *string `json:"errorMessage,omitempty"`
21068
21069 PolicyName *string `json:"policyName,omitempty"`
21070
21071 RegistrationStatus *string `json:"registrationStatus,omitempty"`
21072 }
21073
21074
21075 type SubProtectionPolicy struct {
21076
21077 PolicyType PolicyType `json:"policyType,omitempty"`
21078
21079 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
21080
21081 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
21082 }
21083
21084
21085 func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error {
21086 var m map[string]*json.RawMessage
21087 err := json.Unmarshal(body, &m)
21088 if err != nil {
21089 return err
21090 }
21091 for k, v := range m {
21092 switch k {
21093 case "policyType":
21094 if v != nil {
21095 var policyType PolicyType
21096 err = json.Unmarshal(*v, &policyType)
21097 if err != nil {
21098 return err
21099 }
21100 spp.PolicyType = policyType
21101 }
21102 case "schedulePolicy":
21103 if v != nil {
21104 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
21105 if err != nil {
21106 return err
21107 }
21108 spp.SchedulePolicy = schedulePolicy
21109 }
21110 case "retentionPolicy":
21111 if v != nil {
21112 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
21113 if err != nil {
21114 return err
21115 }
21116 spp.RetentionPolicy = retentionPolicy
21117 }
21118 }
21119 }
21120
21121 return nil
21122 }
21123
21124
21125 type TargetAFSRestoreInfo struct {
21126
21127 Name *string `json:"name,omitempty"`
21128
21129 TargetResourceID *string `json:"targetResourceId,omitempty"`
21130 }
21131
21132
21133 type TargetRestoreInfo struct {
21134
21135 OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"`
21136
21137 ContainerID *string `json:"containerId,omitempty"`
21138
21139 DatabaseName *string `json:"databaseName,omitempty"`
21140
21141 TargetDirectoryForFileRestore *string `json:"targetDirectoryForFileRestore,omitempty"`
21142 }
21143
21144
21145 type TokenInformation struct {
21146 autorest.Response `json:"-"`
21147
21148 Token *string `json:"token,omitempty"`
21149
21150 ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"`
21151
21152 SecurityPIN *string `json:"securityPIN,omitempty"`
21153 }
21154
21155
21156 type TriggerDataMoveRequest struct {
21157
21158 SourceResourceID *string `json:"sourceResourceId,omitempty"`
21159
21160 SourceRegion *string `json:"sourceRegion,omitempty"`
21161
21162 DataMoveLevel DataMoveLevel `json:"dataMoveLevel,omitempty"`
21163
21164 CorrelationID *string `json:"correlationId,omitempty"`
21165
21166 SourceContainerArmIds *[]string `json:"sourceContainerArmIds,omitempty"`
21167
21168 PauseGC *bool `json:"pauseGC,omitempty"`
21169 }
21170
21171
21172 type ValidateIaasVMRestoreOperationRequest struct {
21173
21174 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
21175
21176 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21177 }
21178
21179
21180 func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) {
21181 vivror.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest
21182 objectMap := make(map[string]interface{})
21183 objectMap["restoreRequest"] = vivror.RestoreRequest
21184 if vivror.ObjectType != "" {
21185 objectMap["objectType"] = vivror.ObjectType
21186 }
21187 return json.Marshal(objectMap)
21188 }
21189
21190
21191 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21192 return &vivror, true
21193 }
21194
21195
21196 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21197 return nil, false
21198 }
21199
21200
21201 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21202 return &vivror, true
21203 }
21204
21205
21206 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21207 return nil, false
21208 }
21209
21210
21211 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21212 return &vivror, true
21213 }
21214
21215
21216 func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error {
21217 var m map[string]*json.RawMessage
21218 err := json.Unmarshal(body, &m)
21219 if err != nil {
21220 return err
21221 }
21222 for k, v := range m {
21223 switch k {
21224 case "restoreRequest":
21225 if v != nil {
21226 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
21227 if err != nil {
21228 return err
21229 }
21230 vivror.RestoreRequest = restoreRequest
21231 }
21232 case "objectType":
21233 if v != nil {
21234 var objectType ObjectTypeBasicValidateOperationRequest
21235 err = json.Unmarshal(*v, &objectType)
21236 if err != nil {
21237 return err
21238 }
21239 vivror.ObjectType = objectType
21240 }
21241 }
21242 }
21243
21244 return nil
21245 }
21246
21247
21248 type BasicValidateOperationRequest interface {
21249 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
21250 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
21251 AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool)
21252 AsValidateOperationRequest() (*ValidateOperationRequest, bool)
21253 }
21254
21255
21256 type ValidateOperationRequest struct {
21257
21258 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21259 }
21260
21261 func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) {
21262 var m map[string]interface{}
21263 err := json.Unmarshal(body, &m)
21264 if err != nil {
21265 return nil, err
21266 }
21267
21268 switch m["objectType"] {
21269 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest):
21270 var vivror ValidateIaasVMRestoreOperationRequest
21271 err := json.Unmarshal(body, &vivror)
21272 return vivror, err
21273 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest):
21274 var vror ValidateRestoreOperationRequest
21275 err := json.Unmarshal(body, &vror)
21276 return vror, err
21277 default:
21278 var vor ValidateOperationRequest
21279 err := json.Unmarshal(body, &vor)
21280 return vor, err
21281 }
21282 }
21283 func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) {
21284 var rawMessages []*json.RawMessage
21285 err := json.Unmarshal(body, &rawMessages)
21286 if err != nil {
21287 return nil, err
21288 }
21289
21290 vorArray := make([]BasicValidateOperationRequest, len(rawMessages))
21291
21292 for index, rawMessage := range rawMessages {
21293 vor, err := unmarshalBasicValidateOperationRequest(*rawMessage)
21294 if err != nil {
21295 return nil, err
21296 }
21297 vorArray[index] = vor
21298 }
21299 return vorArray, nil
21300 }
21301
21302
21303 func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) {
21304 vor.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateOperationRequest
21305 objectMap := make(map[string]interface{})
21306 if vor.ObjectType != "" {
21307 objectMap["objectType"] = vor.ObjectType
21308 }
21309 return json.Marshal(objectMap)
21310 }
21311
21312
21313 func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21314 return nil, false
21315 }
21316
21317
21318 func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21319 return nil, false
21320 }
21321
21322
21323 func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21324 return nil, false
21325 }
21326
21327
21328 func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21329 return &vor, true
21330 }
21331
21332
21333 func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21334 return &vor, true
21335 }
21336
21337
21338 type ValidateOperationResponse struct {
21339
21340 ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"`
21341 }
21342
21343
21344 type ValidateOperationsResponse struct {
21345 autorest.Response `json:"-"`
21346 ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"`
21347 }
21348
21349
21350 type BasicValidateRestoreOperationRequest interface {
21351 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
21352 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
21353 }
21354
21355
21356 type ValidateRestoreOperationRequest struct {
21357
21358 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
21359
21360 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21361 }
21362
21363 func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) {
21364 var m map[string]interface{}
21365 err := json.Unmarshal(body, &m)
21366 if err != nil {
21367 return nil, err
21368 }
21369
21370 switch m["objectType"] {
21371 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest):
21372 var vivror ValidateIaasVMRestoreOperationRequest
21373 err := json.Unmarshal(body, &vivror)
21374 return vivror, err
21375 default:
21376 var vror ValidateRestoreOperationRequest
21377 err := json.Unmarshal(body, &vror)
21378 return vror, err
21379 }
21380 }
21381 func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) {
21382 var rawMessages []*json.RawMessage
21383 err := json.Unmarshal(body, &rawMessages)
21384 if err != nil {
21385 return nil, err
21386 }
21387
21388 vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages))
21389
21390 for index, rawMessage := range rawMessages {
21391 vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage)
21392 if err != nil {
21393 return nil, err
21394 }
21395 vrorArray[index] = vror
21396 }
21397 return vrorArray, nil
21398 }
21399
21400
21401 func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) {
21402 vror.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest
21403 objectMap := make(map[string]interface{})
21404 objectMap["restoreRequest"] = vror.RestoreRequest
21405 if vror.ObjectType != "" {
21406 objectMap["objectType"] = vror.ObjectType
21407 }
21408 return json.Marshal(objectMap)
21409 }
21410
21411
21412 func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21413 return nil, false
21414 }
21415
21416
21417 func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21418 return &vror, true
21419 }
21420
21421
21422 func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21423 return &vror, true
21424 }
21425
21426
21427 func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21428 return nil, false
21429 }
21430
21431
21432 func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21433 return &vror, true
21434 }
21435
21436
21437 func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error {
21438 var m map[string]*json.RawMessage
21439 err := json.Unmarshal(body, &m)
21440 if err != nil {
21441 return err
21442 }
21443 for k, v := range m {
21444 switch k {
21445 case "restoreRequest":
21446 if v != nil {
21447 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
21448 if err != nil {
21449 return err
21450 }
21451 vror.RestoreRequest = restoreRequest
21452 }
21453 case "objectType":
21454 if v != nil {
21455 var objectType ObjectTypeBasicValidateOperationRequest
21456 err = json.Unmarshal(*v, &objectType)
21457 if err != nil {
21458 return err
21459 }
21460 vror.ObjectType = objectType
21461 }
21462 }
21463 }
21464
21465 return nil
21466 }
21467
21468
21469 type VaultJob struct {
21470
21471 Duration *string `json:"duration,omitempty"`
21472
21473 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
21474
21475 ErrorDetails *[]VaultJobErrorInfo `json:"errorDetails,omitempty"`
21476
21477 ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"`
21478
21479 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
21480
21481 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
21482
21483 Operation *string `json:"operation,omitempty"`
21484
21485 Status *string `json:"status,omitempty"`
21486
21487 StartTime *date.Time `json:"startTime,omitempty"`
21488
21489 EndTime *date.Time `json:"endTime,omitempty"`
21490
21491 ActivityID *string `json:"activityId,omitempty"`
21492
21493 JobType JobType `json:"jobType,omitempty"`
21494 }
21495
21496
21497 func (vj VaultJob) MarshalJSON() ([]byte, error) {
21498 vj.JobType = JobTypeVaultJob
21499 objectMap := make(map[string]interface{})
21500 if vj.Duration != nil {
21501 objectMap["duration"] = vj.Duration
21502 }
21503 if vj.ActionsInfo != nil {
21504 objectMap["actionsInfo"] = vj.ActionsInfo
21505 }
21506 if vj.ErrorDetails != nil {
21507 objectMap["errorDetails"] = vj.ErrorDetails
21508 }
21509 if vj.ExtendedInfo != nil {
21510 objectMap["extendedInfo"] = vj.ExtendedInfo
21511 }
21512 if vj.EntityFriendlyName != nil {
21513 objectMap["entityFriendlyName"] = vj.EntityFriendlyName
21514 }
21515 if vj.BackupManagementType != "" {
21516 objectMap["backupManagementType"] = vj.BackupManagementType
21517 }
21518 if vj.Operation != nil {
21519 objectMap["operation"] = vj.Operation
21520 }
21521 if vj.Status != nil {
21522 objectMap["status"] = vj.Status
21523 }
21524 if vj.StartTime != nil {
21525 objectMap["startTime"] = vj.StartTime
21526 }
21527 if vj.EndTime != nil {
21528 objectMap["endTime"] = vj.EndTime
21529 }
21530 if vj.ActivityID != nil {
21531 objectMap["activityId"] = vj.ActivityID
21532 }
21533 if vj.JobType != "" {
21534 objectMap["jobType"] = vj.JobType
21535 }
21536 return json.Marshal(objectMap)
21537 }
21538
21539
21540 func (vj VaultJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
21541 return nil, false
21542 }
21543
21544
21545 func (vj VaultJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
21546 return nil, false
21547 }
21548
21549
21550 func (vj VaultJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
21551 return nil, false
21552 }
21553
21554
21555 func (vj VaultJob) AsDpmJob() (*DpmJob, bool) {
21556 return nil, false
21557 }
21558
21559
21560 func (vj VaultJob) AsMabJob() (*MabJob, bool) {
21561 return nil, false
21562 }
21563
21564
21565 func (vj VaultJob) AsVaultJob() (*VaultJob, bool) {
21566 return &vj, true
21567 }
21568
21569
21570 func (vj VaultJob) AsJob() (*Job, bool) {
21571 return nil, false
21572 }
21573
21574
21575 func (vj VaultJob) AsBasicJob() (BasicJob, bool) {
21576 return &vj, true
21577 }
21578
21579
21580 type VaultJobErrorInfo struct {
21581
21582 ErrorCode *int32 `json:"errorCode,omitempty"`
21583
21584 ErrorString *string `json:"errorString,omitempty"`
21585
21586 Recommendations *[]string `json:"recommendations,omitempty"`
21587 }
21588
21589
21590 type VaultJobExtendedInfo struct {
21591
21592 PropertyBag map[string]*string `json:"propertyBag"`
21593 }
21594
21595
21596 func (vjei VaultJobExtendedInfo) MarshalJSON() ([]byte, error) {
21597 objectMap := make(map[string]interface{})
21598 if vjei.PropertyBag != nil {
21599 objectMap["propertyBag"] = vjei.PropertyBag
21600 }
21601 return json.Marshal(objectMap)
21602 }
21603
21604
21605 type BasicVaultStorageConfigOperationResultResponse interface {
21606 AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool)
21607 AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool)
21608 }
21609
21610
21611 type VaultStorageConfigOperationResultResponse struct {
21612 autorest.Response `json:"-"`
21613
21614 ObjectType ObjectTypeBasicVaultStorageConfigOperationResultResponse `json:"objectType,omitempty"`
21615 }
21616
21617 func unmarshalBasicVaultStorageConfigOperationResultResponse(body []byte) (BasicVaultStorageConfigOperationResultResponse, error) {
21618 var m map[string]interface{}
21619 err := json.Unmarshal(body, &m)
21620 if err != nil {
21621 return nil, err
21622 }
21623
21624 switch m["objectType"] {
21625 case string(ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse):
21626 var pdmr PrepareDataMoveResponse
21627 err := json.Unmarshal(body, &pdmr)
21628 return pdmr, err
21629 default:
21630 var vscorr VaultStorageConfigOperationResultResponse
21631 err := json.Unmarshal(body, &vscorr)
21632 return vscorr, err
21633 }
21634 }
21635 func unmarshalBasicVaultStorageConfigOperationResultResponseArray(body []byte) ([]BasicVaultStorageConfigOperationResultResponse, error) {
21636 var rawMessages []*json.RawMessage
21637 err := json.Unmarshal(body, &rawMessages)
21638 if err != nil {
21639 return nil, err
21640 }
21641
21642 vscorrArray := make([]BasicVaultStorageConfigOperationResultResponse, len(rawMessages))
21643
21644 for index, rawMessage := range rawMessages {
21645 vscorr, err := unmarshalBasicVaultStorageConfigOperationResultResponse(*rawMessage)
21646 if err != nil {
21647 return nil, err
21648 }
21649 vscorrArray[index] = vscorr
21650 }
21651 return vscorrArray, nil
21652 }
21653
21654
21655 func (vscorr VaultStorageConfigOperationResultResponse) MarshalJSON() ([]byte, error) {
21656 vscorr.ObjectType = ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypeVaultStorageConfigOperationResultResponse
21657 objectMap := make(map[string]interface{})
21658 if vscorr.ObjectType != "" {
21659 objectMap["objectType"] = vscorr.ObjectType
21660 }
21661 return json.Marshal(objectMap)
21662 }
21663
21664
21665 func (vscorr VaultStorageConfigOperationResultResponse) AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool) {
21666 return nil, false
21667 }
21668
21669
21670 func (vscorr VaultStorageConfigOperationResultResponse) AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool) {
21671 return &vscorr, true
21672 }
21673
21674
21675 func (vscorr VaultStorageConfigOperationResultResponse) AsBasicVaultStorageConfigOperationResultResponse() (BasicVaultStorageConfigOperationResultResponse, bool) {
21676 return &vscorr, true
21677 }
21678
21679
21680 type VaultStorageConfigOperationResultResponseModel struct {
21681 autorest.Response `json:"-"`
21682 Value BasicVaultStorageConfigOperationResultResponse `json:"value,omitempty"`
21683 }
21684
21685
21686 func (vscorrm *VaultStorageConfigOperationResultResponseModel) UnmarshalJSON(body []byte) error {
21687 vscorr, err := unmarshalBasicVaultStorageConfigOperationResultResponse(body)
21688 if err != nil {
21689 return err
21690 }
21691 vscorrm.Value = vscorr
21692
21693 return nil
21694 }
21695
21696
21697 type WeeklyRetentionFormat struct {
21698
21699 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
21700
21701 WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"`
21702 }
21703
21704
21705 type WeeklyRetentionSchedule struct {
21706
21707 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
21708
21709 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
21710
21711 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
21712 }
21713
21714
21715 type WorkloadCrrAccessToken struct {
21716 ProtectableObjectUniqueName *string `json:"protectableObjectUniqueName,omitempty"`
21717 ProtectableObjectFriendlyName *string `json:"protectableObjectFriendlyName,omitempty"`
21718 ProtectableObjectWorkloadType *string `json:"protectableObjectWorkloadType,omitempty"`
21719 ProtectableObjectProtectionState *string `json:"protectableObjectProtectionState,omitempty"`
21720 ProtectableObjectContainerHostOsName *string `json:"protectableObjectContainerHostOsName,omitempty"`
21721 ProtectableObjectParentLogicalContainerName *string `json:"protectableObjectParentLogicalContainerName,omitempty"`
21722
21723 ContainerID *string `json:"containerId,omitempty"`
21724
21725 PolicyName *string `json:"policyName,omitempty"`
21726
21727 PolicyID *string `json:"policyId,omitempty"`
21728
21729 AccessTokenString *string `json:"accessTokenString,omitempty"`
21730
21731 SubscriptionID *string `json:"subscriptionId,omitempty"`
21732
21733 ResourceGroupName *string `json:"resourceGroupName,omitempty"`
21734
21735 ResourceName *string `json:"resourceName,omitempty"`
21736
21737 ResourceID *string `json:"resourceId,omitempty"`
21738
21739 ProtectionContainerID *int64 `json:"protectionContainerId,omitempty"`
21740
21741 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
21742
21743 RecoveryPointTime *string `json:"recoveryPointTime,omitempty"`
21744
21745 ContainerName *string `json:"containerName,omitempty"`
21746
21747 ContainerType *string `json:"containerType,omitempty"`
21748
21749 BackupManagementType *string `json:"backupManagementType,omitempty"`
21750
21751 DatasourceType *string `json:"datasourceType,omitempty"`
21752
21753 DatasourceName *string `json:"datasourceName,omitempty"`
21754
21755 DatasourceID *string `json:"datasourceId,omitempty"`
21756
21757 DatasourceContainerName *string `json:"datasourceContainerName,omitempty"`
21758
21759 CoordinatorServiceStampID *string `json:"coordinatorServiceStampId,omitempty"`
21760
21761 CoordinatorServiceStampURI *string `json:"coordinatorServiceStampUri,omitempty"`
21762
21763 ProtectionServiceStampID *string `json:"protectionServiceStampId,omitempty"`
21764
21765 ProtectionServiceStampURI *string `json:"protectionServiceStampUri,omitempty"`
21766
21767 TokenExtendedInformation *string `json:"tokenExtendedInformation,omitempty"`
21768
21769 RpTierInformation map[string]*string `json:"rpTierInformation"`
21770
21771 RpOriginalSAOption *bool `json:"rpOriginalSAOption,omitempty"`
21772
21773 RpIsManagedVirtualMachine *bool `json:"rpIsManagedVirtualMachine,omitempty"`
21774
21775 RpVMSizeDescription *string `json:"rpVMSizeDescription,omitempty"`
21776
21777 BMSActiveRegion *string `json:"bMSActiveRegion,omitempty"`
21778
21779 ObjectType ObjectTypeBasicCrrAccessToken `json:"objectType,omitempty"`
21780 }
21781
21782
21783 func (wcat WorkloadCrrAccessToken) MarshalJSON() ([]byte, error) {
21784 wcat.ObjectType = ObjectTypeBasicCrrAccessTokenObjectTypeWorkloadCrrAccessToken
21785 objectMap := make(map[string]interface{})
21786 if wcat.ProtectableObjectUniqueName != nil {
21787 objectMap["protectableObjectUniqueName"] = wcat.ProtectableObjectUniqueName
21788 }
21789 if wcat.ProtectableObjectFriendlyName != nil {
21790 objectMap["protectableObjectFriendlyName"] = wcat.ProtectableObjectFriendlyName
21791 }
21792 if wcat.ProtectableObjectWorkloadType != nil {
21793 objectMap["protectableObjectWorkloadType"] = wcat.ProtectableObjectWorkloadType
21794 }
21795 if wcat.ProtectableObjectProtectionState != nil {
21796 objectMap["protectableObjectProtectionState"] = wcat.ProtectableObjectProtectionState
21797 }
21798 if wcat.ProtectableObjectContainerHostOsName != nil {
21799 objectMap["protectableObjectContainerHostOsName"] = wcat.ProtectableObjectContainerHostOsName
21800 }
21801 if wcat.ProtectableObjectParentLogicalContainerName != nil {
21802 objectMap["protectableObjectParentLogicalContainerName"] = wcat.ProtectableObjectParentLogicalContainerName
21803 }
21804 if wcat.ContainerID != nil {
21805 objectMap["containerId"] = wcat.ContainerID
21806 }
21807 if wcat.PolicyName != nil {
21808 objectMap["policyName"] = wcat.PolicyName
21809 }
21810 if wcat.PolicyID != nil {
21811 objectMap["policyId"] = wcat.PolicyID
21812 }
21813 if wcat.AccessTokenString != nil {
21814 objectMap["accessTokenString"] = wcat.AccessTokenString
21815 }
21816 if wcat.SubscriptionID != nil {
21817 objectMap["subscriptionId"] = wcat.SubscriptionID
21818 }
21819 if wcat.ResourceGroupName != nil {
21820 objectMap["resourceGroupName"] = wcat.ResourceGroupName
21821 }
21822 if wcat.ResourceName != nil {
21823 objectMap["resourceName"] = wcat.ResourceName
21824 }
21825 if wcat.ResourceID != nil {
21826 objectMap["resourceId"] = wcat.ResourceID
21827 }
21828 if wcat.ProtectionContainerID != nil {
21829 objectMap["protectionContainerId"] = wcat.ProtectionContainerID
21830 }
21831 if wcat.RecoveryPointID != nil {
21832 objectMap["recoveryPointId"] = wcat.RecoveryPointID
21833 }
21834 if wcat.RecoveryPointTime != nil {
21835 objectMap["recoveryPointTime"] = wcat.RecoveryPointTime
21836 }
21837 if wcat.ContainerName != nil {
21838 objectMap["containerName"] = wcat.ContainerName
21839 }
21840 if wcat.ContainerType != nil {
21841 objectMap["containerType"] = wcat.ContainerType
21842 }
21843 if wcat.BackupManagementType != nil {
21844 objectMap["backupManagementType"] = wcat.BackupManagementType
21845 }
21846 if wcat.DatasourceType != nil {
21847 objectMap["datasourceType"] = wcat.DatasourceType
21848 }
21849 if wcat.DatasourceName != nil {
21850 objectMap["datasourceName"] = wcat.DatasourceName
21851 }
21852 if wcat.DatasourceID != nil {
21853 objectMap["datasourceId"] = wcat.DatasourceID
21854 }
21855 if wcat.DatasourceContainerName != nil {
21856 objectMap["datasourceContainerName"] = wcat.DatasourceContainerName
21857 }
21858 if wcat.CoordinatorServiceStampID != nil {
21859 objectMap["coordinatorServiceStampId"] = wcat.CoordinatorServiceStampID
21860 }
21861 if wcat.CoordinatorServiceStampURI != nil {
21862 objectMap["coordinatorServiceStampUri"] = wcat.CoordinatorServiceStampURI
21863 }
21864 if wcat.ProtectionServiceStampID != nil {
21865 objectMap["protectionServiceStampId"] = wcat.ProtectionServiceStampID
21866 }
21867 if wcat.ProtectionServiceStampURI != nil {
21868 objectMap["protectionServiceStampUri"] = wcat.ProtectionServiceStampURI
21869 }
21870 if wcat.TokenExtendedInformation != nil {
21871 objectMap["tokenExtendedInformation"] = wcat.TokenExtendedInformation
21872 }
21873 if wcat.RpTierInformation != nil {
21874 objectMap["rpTierInformation"] = wcat.RpTierInformation
21875 }
21876 if wcat.RpOriginalSAOption != nil {
21877 objectMap["rpOriginalSAOption"] = wcat.RpOriginalSAOption
21878 }
21879 if wcat.RpIsManagedVirtualMachine != nil {
21880 objectMap["rpIsManagedVirtualMachine"] = wcat.RpIsManagedVirtualMachine
21881 }
21882 if wcat.RpVMSizeDescription != nil {
21883 objectMap["rpVMSizeDescription"] = wcat.RpVMSizeDescription
21884 }
21885 if wcat.BMSActiveRegion != nil {
21886 objectMap["bMSActiveRegion"] = wcat.BMSActiveRegion
21887 }
21888 if wcat.ObjectType != "" {
21889 objectMap["objectType"] = wcat.ObjectType
21890 }
21891 return json.Marshal(objectMap)
21892 }
21893
21894
21895 func (wcat WorkloadCrrAccessToken) AsWorkloadCrrAccessToken() (*WorkloadCrrAccessToken, bool) {
21896 return &wcat, true
21897 }
21898
21899
21900 func (wcat WorkloadCrrAccessToken) AsCrrAccessToken() (*CrrAccessToken, bool) {
21901 return nil, false
21902 }
21903
21904
21905 func (wcat WorkloadCrrAccessToken) AsBasicCrrAccessToken() (BasicCrrAccessToken, bool) {
21906 return &wcat, true
21907 }
21908
21909
21910 type WorkloadInquiryDetails struct {
21911
21912 Type *string `json:"type,omitempty"`
21913
21914 ItemCount *int64 `json:"itemCount,omitempty"`
21915
21916 InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"`
21917 }
21918
21919
21920 type BasicWorkloadItem interface {
21921 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
21922 AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool)
21923 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
21924 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
21925 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
21926 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
21927 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
21928 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
21929 AsWorkloadItem() (*WorkloadItem, bool)
21930 }
21931
21932
21933 type WorkloadItem struct {
21934
21935 BackupManagementType *string `json:"backupManagementType,omitempty"`
21936
21937 WorkloadType *string `json:"workloadType,omitempty"`
21938
21939 FriendlyName *string `json:"friendlyName,omitempty"`
21940
21941 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
21942
21943 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
21944 }
21945
21946 func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) {
21947 var m map[string]interface{}
21948 err := json.Unmarshal(body, &m)
21949 if err != nil {
21950 return nil, err
21951 }
21952
21953 switch m["workloadItemType"] {
21954 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem):
21955 var avwi AzureVMWorkloadItem
21956 err := json.Unmarshal(body, &avwi)
21957 return avwi, err
21958 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase):
21959 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
21960 err := json.Unmarshal(body, &avwsadwi)
21961 return avwsadwi, err
21962 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem):
21963 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
21964 err := json.Unmarshal(body, &avwsaswi)
21965 return avwsaswi, err
21966 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase):
21967 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
21968 err := json.Unmarshal(body, &avwshdwi)
21969 return avwshdwi, err
21970 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem):
21971 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
21972 err := json.Unmarshal(body, &avwshswi)
21973 return avwshswi, err
21974 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase):
21975 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
21976 err := json.Unmarshal(body, &avwsdwi)
21977 return avwsdwi, err
21978 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance):
21979 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
21980 err := json.Unmarshal(body, &avwsiwi)
21981 return avwsiwi, err
21982 default:
21983 var wi WorkloadItem
21984 err := json.Unmarshal(body, &wi)
21985 return wi, err
21986 }
21987 }
21988 func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) {
21989 var rawMessages []*json.RawMessage
21990 err := json.Unmarshal(body, &rawMessages)
21991 if err != nil {
21992 return nil, err
21993 }
21994
21995 wiArray := make([]BasicWorkloadItem, len(rawMessages))
21996
21997 for index, rawMessage := range rawMessages {
21998 wi, err := unmarshalBasicWorkloadItem(*rawMessage)
21999 if err != nil {
22000 return nil, err
22001 }
22002 wiArray[index] = wi
22003 }
22004 return wiArray, nil
22005 }
22006
22007
22008 func (wi WorkloadItem) MarshalJSON() ([]byte, error) {
22009 wi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem
22010 objectMap := make(map[string]interface{})
22011 if wi.BackupManagementType != nil {
22012 objectMap["backupManagementType"] = wi.BackupManagementType
22013 }
22014 if wi.WorkloadType != nil {
22015 objectMap["workloadType"] = wi.WorkloadType
22016 }
22017 if wi.FriendlyName != nil {
22018 objectMap["friendlyName"] = wi.FriendlyName
22019 }
22020 if wi.ProtectionState != "" {
22021 objectMap["protectionState"] = wi.ProtectionState
22022 }
22023 if wi.WorkloadItemType != "" {
22024 objectMap["workloadItemType"] = wi.WorkloadItemType
22025 }
22026 return json.Marshal(objectMap)
22027 }
22028
22029
22030 func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
22031 return nil, false
22032 }
22033
22034
22035 func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
22036 return nil, false
22037 }
22038
22039
22040 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
22041 return nil, false
22042 }
22043
22044
22045 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
22046 return nil, false
22047 }
22048
22049
22050 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
22051 return nil, false
22052 }
22053
22054
22055 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
22056 return nil, false
22057 }
22058
22059
22060 func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
22061 return nil, false
22062 }
22063
22064
22065 func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
22066 return nil, false
22067 }
22068
22069
22070 func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
22071 return &wi, true
22072 }
22073
22074
22075 func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
22076 return &wi, true
22077 }
22078
22079
22080
22081 type WorkloadItemResource struct {
22082
22083 Properties BasicWorkloadItem `json:"properties,omitempty"`
22084
22085 ID *string `json:"id,omitempty"`
22086
22087 Name *string `json:"name,omitempty"`
22088
22089 Type *string `json:"type,omitempty"`
22090
22091 Location *string `json:"location,omitempty"`
22092
22093 Tags map[string]*string `json:"tags"`
22094
22095 ETag *string `json:"eTag,omitempty"`
22096 }
22097
22098
22099 func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) {
22100 objectMap := make(map[string]interface{})
22101 objectMap["properties"] = wir.Properties
22102 if wir.Location != nil {
22103 objectMap["location"] = wir.Location
22104 }
22105 if wir.Tags != nil {
22106 objectMap["tags"] = wir.Tags
22107 }
22108 if wir.ETag != nil {
22109 objectMap["eTag"] = wir.ETag
22110 }
22111 return json.Marshal(objectMap)
22112 }
22113
22114
22115 func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error {
22116 var m map[string]*json.RawMessage
22117 err := json.Unmarshal(body, &m)
22118 if err != nil {
22119 return err
22120 }
22121 for k, v := range m {
22122 switch k {
22123 case "properties":
22124 if v != nil {
22125 properties, err := unmarshalBasicWorkloadItem(*v)
22126 if err != nil {
22127 return err
22128 }
22129 wir.Properties = properties
22130 }
22131 case "id":
22132 if v != nil {
22133 var ID string
22134 err = json.Unmarshal(*v, &ID)
22135 if err != nil {
22136 return err
22137 }
22138 wir.ID = &ID
22139 }
22140 case "name":
22141 if v != nil {
22142 var name string
22143 err = json.Unmarshal(*v, &name)
22144 if err != nil {
22145 return err
22146 }
22147 wir.Name = &name
22148 }
22149 case "type":
22150 if v != nil {
22151 var typeVar string
22152 err = json.Unmarshal(*v, &typeVar)
22153 if err != nil {
22154 return err
22155 }
22156 wir.Type = &typeVar
22157 }
22158 case "location":
22159 if v != nil {
22160 var location string
22161 err = json.Unmarshal(*v, &location)
22162 if err != nil {
22163 return err
22164 }
22165 wir.Location = &location
22166 }
22167 case "tags":
22168 if v != nil {
22169 var tags map[string]*string
22170 err = json.Unmarshal(*v, &tags)
22171 if err != nil {
22172 return err
22173 }
22174 wir.Tags = tags
22175 }
22176 case "eTag":
22177 if v != nil {
22178 var eTag string
22179 err = json.Unmarshal(*v, &eTag)
22180 if err != nil {
22181 return err
22182 }
22183 wir.ETag = &eTag
22184 }
22185 }
22186 }
22187
22188 return nil
22189 }
22190
22191
22192 type WorkloadItemResourceList struct {
22193 autorest.Response `json:"-"`
22194
22195 Value *[]WorkloadItemResource `json:"value,omitempty"`
22196
22197 NextLink *string `json:"nextLink,omitempty"`
22198 }
22199
22200
22201 type WorkloadItemResourceListIterator struct {
22202 i int
22203 page WorkloadItemResourceListPage
22204 }
22205
22206
22207
22208 func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
22209 if tracing.IsEnabled() {
22210 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext")
22211 defer func() {
22212 sc := -1
22213 if iter.Response().Response.Response != nil {
22214 sc = iter.Response().Response.Response.StatusCode
22215 }
22216 tracing.EndSpan(ctx, sc, err)
22217 }()
22218 }
22219 iter.i++
22220 if iter.i < len(iter.page.Values()) {
22221 return nil
22222 }
22223 err = iter.page.NextWithContext(ctx)
22224 if err != nil {
22225 iter.i--
22226 return err
22227 }
22228 iter.i = 0
22229 return nil
22230 }
22231
22232
22233
22234
22235 func (iter *WorkloadItemResourceListIterator) Next() error {
22236 return iter.NextWithContext(context.Background())
22237 }
22238
22239
22240 func (iter WorkloadItemResourceListIterator) NotDone() bool {
22241 return iter.page.NotDone() && iter.i < len(iter.page.Values())
22242 }
22243
22244
22245 func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList {
22246 return iter.page.Response()
22247 }
22248
22249
22250
22251 func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource {
22252 if !iter.page.NotDone() {
22253 return WorkloadItemResource{}
22254 }
22255 return iter.page.Values()[iter.i]
22256 }
22257
22258
22259 func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator {
22260 return WorkloadItemResourceListIterator{page: page}
22261 }
22262
22263
22264 func (wirl WorkloadItemResourceList) IsEmpty() bool {
22265 return wirl.Value == nil || len(*wirl.Value) == 0
22266 }
22267
22268
22269 func (wirl WorkloadItemResourceList) hasNextLink() bool {
22270 return wirl.NextLink != nil && len(*wirl.NextLink) != 0
22271 }
22272
22273
22274
22275 func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
22276 if !wirl.hasNextLink() {
22277 return nil, nil
22278 }
22279 return autorest.Prepare((&http.Request{}).WithContext(ctx),
22280 autorest.AsJSON(),
22281 autorest.AsGet(),
22282 autorest.WithBaseURL(to.String(wirl.NextLink)))
22283 }
22284
22285
22286 type WorkloadItemResourceListPage struct {
22287 fn func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)
22288 wirl WorkloadItemResourceList
22289 }
22290
22291
22292
22293 func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
22294 if tracing.IsEnabled() {
22295 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext")
22296 defer func() {
22297 sc := -1
22298 if page.Response().Response.Response != nil {
22299 sc = page.Response().Response.Response.StatusCode
22300 }
22301 tracing.EndSpan(ctx, sc, err)
22302 }()
22303 }
22304 for {
22305 next, err := page.fn(ctx, page.wirl)
22306 if err != nil {
22307 return err
22308 }
22309 page.wirl = next
22310 if !next.hasNextLink() || !next.IsEmpty() {
22311 break
22312 }
22313 }
22314 return nil
22315 }
22316
22317
22318
22319
22320 func (page *WorkloadItemResourceListPage) Next() error {
22321 return page.NextWithContext(context.Background())
22322 }
22323
22324
22325 func (page WorkloadItemResourceListPage) NotDone() bool {
22326 return !page.wirl.IsEmpty()
22327 }
22328
22329
22330 func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList {
22331 return page.wirl
22332 }
22333
22334
22335 func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource {
22336 if page.wirl.IsEmpty() {
22337 return nil
22338 }
22339 return *page.wirl.Value
22340 }
22341
22342
22343 func NewWorkloadItemResourceListPage(cur WorkloadItemResourceList, getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage {
22344 return WorkloadItemResourceListPage{
22345 fn: getNextPage,
22346 wirl: cur,
22347 }
22348 }
22349
22350
22351 type BasicWorkloadProtectableItem interface {
22352 AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool)
22353 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
22354 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
22355 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
22356 AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool)
22357 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
22358 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
22359 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
22360 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
22361 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
22362 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
22363 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
22364 AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool)
22365 AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool)
22366 }
22367
22368
22369
22370 type WorkloadProtectableItem struct {
22371
22372 BackupManagementType *string `json:"backupManagementType,omitempty"`
22373
22374 WorkloadType *string `json:"workloadType,omitempty"`
22375
22376 FriendlyName *string `json:"friendlyName,omitempty"`
22377
22378 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
22379
22380 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
22381 }
22382
22383 func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) {
22384 var m map[string]interface{}
22385 err := json.Unmarshal(body, &m)
22386 if err != nil {
22387 return nil, err
22388 }
22389
22390 switch m["protectableItemType"] {
22391 case string(ProtectableItemTypeAzureFileShare):
22392 var afspi AzureFileShareProtectableItem
22393 err := json.Unmarshal(body, &afspi)
22394 return afspi, err
22395 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
22396 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
22397 err := json.Unmarshal(body, &aisccvpi)
22398 return aisccvpi, err
22399 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
22400 var aiscvpi AzureIaaSComputeVMProtectableItem
22401 err := json.Unmarshal(body, &aiscvpi)
22402 return aiscvpi, err
22403 case string(ProtectableItemTypeAzureVMWorkloadProtectableItem):
22404 var avwpi AzureVMWorkloadProtectableItem
22405 err := json.Unmarshal(body, &avwpi)
22406 return avwpi, err
22407 case string(ProtectableItemTypeSAPAseSystem):
22408 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
22409 err := json.Unmarshal(body, &avwsaspi)
22410 return avwsaspi, err
22411 case string(ProtectableItemTypeSAPHanaDatabase):
22412 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
22413 err := json.Unmarshal(body, &avwshdpi)
22414 return avwshdpi, err
22415 case string(ProtectableItemTypeSAPHanaSystem):
22416 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
22417 err := json.Unmarshal(body, &avwshspi)
22418 return avwshspi, err
22419 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
22420 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
22421 err := json.Unmarshal(body, &avwsagpi)
22422 return avwsagpi, err
22423 case string(ProtectableItemTypeSQLDataBase):
22424 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
22425 err := json.Unmarshal(body, &avwsdpi)
22426 return avwsdpi, err
22427 case string(ProtectableItemTypeSQLInstance):
22428 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
22429 err := json.Unmarshal(body, &avwsipi)
22430 return avwsipi, err
22431 case string(ProtectableItemTypeIaaSVMProtectableItem):
22432 var ispi IaaSVMProtectableItem
22433 err := json.Unmarshal(body, &ispi)
22434 return ispi, err
22435 default:
22436 var wpi WorkloadProtectableItem
22437 err := json.Unmarshal(body, &wpi)
22438 return wpi, err
22439 }
22440 }
22441 func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) {
22442 var rawMessages []*json.RawMessage
22443 err := json.Unmarshal(body, &rawMessages)
22444 if err != nil {
22445 return nil, err
22446 }
22447
22448 wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages))
22449
22450 for index, rawMessage := range rawMessages {
22451 wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage)
22452 if err != nil {
22453 return nil, err
22454 }
22455 wpiArray[index] = wpi
22456 }
22457 return wpiArray, nil
22458 }
22459
22460
22461 func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) {
22462 wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem
22463 objectMap := make(map[string]interface{})
22464 if wpi.BackupManagementType != nil {
22465 objectMap["backupManagementType"] = wpi.BackupManagementType
22466 }
22467 if wpi.WorkloadType != nil {
22468 objectMap["workloadType"] = wpi.WorkloadType
22469 }
22470 if wpi.FriendlyName != nil {
22471 objectMap["friendlyName"] = wpi.FriendlyName
22472 }
22473 if wpi.ProtectionState != "" {
22474 objectMap["protectionState"] = wpi.ProtectionState
22475 }
22476 if wpi.ProtectableItemType != "" {
22477 objectMap["protectableItemType"] = wpi.ProtectableItemType
22478 }
22479 return json.Marshal(objectMap)
22480 }
22481
22482
22483 func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
22484 return nil, false
22485 }
22486
22487
22488 func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
22489 return nil, false
22490 }
22491
22492
22493 func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
22494 return nil, false
22495 }
22496
22497
22498 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
22499 return nil, false
22500 }
22501
22502
22503 func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
22504 return nil, false
22505 }
22506
22507
22508 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
22509 return nil, false
22510 }
22511
22512
22513 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
22514 return nil, false
22515 }
22516
22517
22518 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
22519 return nil, false
22520 }
22521
22522
22523 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
22524 return nil, false
22525 }
22526
22527
22528 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
22529 return nil, false
22530 }
22531
22532
22533 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
22534 return nil, false
22535 }
22536
22537
22538 func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
22539 return nil, false
22540 }
22541
22542
22543 func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
22544 return nil, false
22545 }
22546
22547
22548 func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
22549 return &wpi, true
22550 }
22551
22552
22553 func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
22554 return &wpi, true
22555 }
22556
22557
22558
22559 type WorkloadProtectableItemResource struct {
22560
22561 Properties BasicWorkloadProtectableItem `json:"properties,omitempty"`
22562
22563 ID *string `json:"id,omitempty"`
22564
22565 Name *string `json:"name,omitempty"`
22566
22567 Type *string `json:"type,omitempty"`
22568
22569 Location *string `json:"location,omitempty"`
22570
22571 Tags map[string]*string `json:"tags"`
22572
22573 ETag *string `json:"eTag,omitempty"`
22574 }
22575
22576
22577 func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) {
22578 objectMap := make(map[string]interface{})
22579 objectMap["properties"] = wpir.Properties
22580 if wpir.Location != nil {
22581 objectMap["location"] = wpir.Location
22582 }
22583 if wpir.Tags != nil {
22584 objectMap["tags"] = wpir.Tags
22585 }
22586 if wpir.ETag != nil {
22587 objectMap["eTag"] = wpir.ETag
22588 }
22589 return json.Marshal(objectMap)
22590 }
22591
22592
22593 func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error {
22594 var m map[string]*json.RawMessage
22595 err := json.Unmarshal(body, &m)
22596 if err != nil {
22597 return err
22598 }
22599 for k, v := range m {
22600 switch k {
22601 case "properties":
22602 if v != nil {
22603 properties, err := unmarshalBasicWorkloadProtectableItem(*v)
22604 if err != nil {
22605 return err
22606 }
22607 wpir.Properties = properties
22608 }
22609 case "id":
22610 if v != nil {
22611 var ID string
22612 err = json.Unmarshal(*v, &ID)
22613 if err != nil {
22614 return err
22615 }
22616 wpir.ID = &ID
22617 }
22618 case "name":
22619 if v != nil {
22620 var name string
22621 err = json.Unmarshal(*v, &name)
22622 if err != nil {
22623 return err
22624 }
22625 wpir.Name = &name
22626 }
22627 case "type":
22628 if v != nil {
22629 var typeVar string
22630 err = json.Unmarshal(*v, &typeVar)
22631 if err != nil {
22632 return err
22633 }
22634 wpir.Type = &typeVar
22635 }
22636 case "location":
22637 if v != nil {
22638 var location string
22639 err = json.Unmarshal(*v, &location)
22640 if err != nil {
22641 return err
22642 }
22643 wpir.Location = &location
22644 }
22645 case "tags":
22646 if v != nil {
22647 var tags map[string]*string
22648 err = json.Unmarshal(*v, &tags)
22649 if err != nil {
22650 return err
22651 }
22652 wpir.Tags = tags
22653 }
22654 case "eTag":
22655 if v != nil {
22656 var eTag string
22657 err = json.Unmarshal(*v, &eTag)
22658 if err != nil {
22659 return err
22660 }
22661 wpir.ETag = &eTag
22662 }
22663 }
22664 }
22665
22666 return nil
22667 }
22668
22669
22670 type WorkloadProtectableItemResourceList struct {
22671 autorest.Response `json:"-"`
22672
22673 Value *[]WorkloadProtectableItemResource `json:"value,omitempty"`
22674
22675 NextLink *string `json:"nextLink,omitempty"`
22676 }
22677
22678
22679
22680 type WorkloadProtectableItemResourceListIterator struct {
22681 i int
22682 page WorkloadProtectableItemResourceListPage
22683 }
22684
22685
22686
22687 func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
22688 if tracing.IsEnabled() {
22689 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext")
22690 defer func() {
22691 sc := -1
22692 if iter.Response().Response.Response != nil {
22693 sc = iter.Response().Response.Response.StatusCode
22694 }
22695 tracing.EndSpan(ctx, sc, err)
22696 }()
22697 }
22698 iter.i++
22699 if iter.i < len(iter.page.Values()) {
22700 return nil
22701 }
22702 err = iter.page.NextWithContext(ctx)
22703 if err != nil {
22704 iter.i--
22705 return err
22706 }
22707 iter.i = 0
22708 return nil
22709 }
22710
22711
22712
22713
22714 func (iter *WorkloadProtectableItemResourceListIterator) Next() error {
22715 return iter.NextWithContext(context.Background())
22716 }
22717
22718
22719 func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool {
22720 return iter.page.NotDone() && iter.i < len(iter.page.Values())
22721 }
22722
22723
22724 func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList {
22725 return iter.page.Response()
22726 }
22727
22728
22729
22730 func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource {
22731 if !iter.page.NotDone() {
22732 return WorkloadProtectableItemResource{}
22733 }
22734 return iter.page.Values()[iter.i]
22735 }
22736
22737
22738 func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator {
22739 return WorkloadProtectableItemResourceListIterator{page: page}
22740 }
22741
22742
22743 func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool {
22744 return wpirl.Value == nil || len(*wpirl.Value) == 0
22745 }
22746
22747
22748 func (wpirl WorkloadProtectableItemResourceList) hasNextLink() bool {
22749 return wpirl.NextLink != nil && len(*wpirl.NextLink) != 0
22750 }
22751
22752
22753
22754 func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
22755 if !wpirl.hasNextLink() {
22756 return nil, nil
22757 }
22758 return autorest.Prepare((&http.Request{}).WithContext(ctx),
22759 autorest.AsJSON(),
22760 autorest.AsGet(),
22761 autorest.WithBaseURL(to.String(wpirl.NextLink)))
22762 }
22763
22764
22765 type WorkloadProtectableItemResourceListPage struct {
22766 fn func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)
22767 wpirl WorkloadProtectableItemResourceList
22768 }
22769
22770
22771
22772 func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
22773 if tracing.IsEnabled() {
22774 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext")
22775 defer func() {
22776 sc := -1
22777 if page.Response().Response.Response != nil {
22778 sc = page.Response().Response.Response.StatusCode
22779 }
22780 tracing.EndSpan(ctx, sc, err)
22781 }()
22782 }
22783 for {
22784 next, err := page.fn(ctx, page.wpirl)
22785 if err != nil {
22786 return err
22787 }
22788 page.wpirl = next
22789 if !next.hasNextLink() || !next.IsEmpty() {
22790 break
22791 }
22792 }
22793 return nil
22794 }
22795
22796
22797
22798
22799 func (page *WorkloadProtectableItemResourceListPage) Next() error {
22800 return page.NextWithContext(context.Background())
22801 }
22802
22803
22804 func (page WorkloadProtectableItemResourceListPage) NotDone() bool {
22805 return !page.wpirl.IsEmpty()
22806 }
22807
22808
22809 func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList {
22810 return page.wpirl
22811 }
22812
22813
22814 func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource {
22815 if page.wpirl.IsEmpty() {
22816 return nil
22817 }
22818 return *page.wpirl.Value
22819 }
22820
22821
22822 func NewWorkloadProtectableItemResourceListPage(cur WorkloadProtectableItemResourceList, getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage {
22823 return WorkloadProtectableItemResourceListPage{
22824 fn: getNextPage,
22825 wpirl: cur,
22826 }
22827 }
22828
22829
22830 type YearlyRetentionSchedule struct {
22831
22832 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
22833
22834 MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"`
22835
22836 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
22837
22838 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
22839
22840 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
22841
22842 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
22843 }
22844
View as plain text