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-07-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 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
580
581 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
582 }
583
584
585 func (afpi AzureFileshareProtectedItem) MarshalJSON() ([]byte, error) {
586 afpi.ProtectedItemType = ProtectedItemTypeAzureFileShareProtectedItem
587 objectMap := make(map[string]interface{})
588 if afpi.FriendlyName != nil {
589 objectMap["friendlyName"] = afpi.FriendlyName
590 }
591 if afpi.ProtectionStatus != nil {
592 objectMap["protectionStatus"] = afpi.ProtectionStatus
593 }
594 if afpi.ProtectionState != "" {
595 objectMap["protectionState"] = afpi.ProtectionState
596 }
597 if afpi.LastBackupStatus != nil {
598 objectMap["lastBackupStatus"] = afpi.LastBackupStatus
599 }
600 if afpi.LastBackupTime != nil {
601 objectMap["lastBackupTime"] = afpi.LastBackupTime
602 }
603 if afpi.KpisHealths != nil {
604 objectMap["kpisHealths"] = afpi.KpisHealths
605 }
606 if afpi.ExtendedInfo != nil {
607 objectMap["extendedInfo"] = afpi.ExtendedInfo
608 }
609 if afpi.HealthStatus != "" {
610 objectMap["healthStatus"] = afpi.HealthStatus
611 }
612 if afpi.BackupManagementType != "" {
613 objectMap["backupManagementType"] = afpi.BackupManagementType
614 }
615 if afpi.WorkloadType != "" {
616 objectMap["workloadType"] = afpi.WorkloadType
617 }
618 if afpi.ContainerName != nil {
619 objectMap["containerName"] = afpi.ContainerName
620 }
621 if afpi.SourceResourceID != nil {
622 objectMap["sourceResourceId"] = afpi.SourceResourceID
623 }
624 if afpi.PolicyID != nil {
625 objectMap["policyId"] = afpi.PolicyID
626 }
627 if afpi.LastRecoveryPoint != nil {
628 objectMap["lastRecoveryPoint"] = afpi.LastRecoveryPoint
629 }
630 if afpi.BackupSetName != nil {
631 objectMap["backupSetName"] = afpi.BackupSetName
632 }
633 if afpi.CreateMode != "" {
634 objectMap["createMode"] = afpi.CreateMode
635 }
636 if afpi.DeferredDeleteTimeInUTC != nil {
637 objectMap["deferredDeleteTimeInUTC"] = afpi.DeferredDeleteTimeInUTC
638 }
639 if afpi.IsScheduledForDeferredDelete != nil {
640 objectMap["isScheduledForDeferredDelete"] = afpi.IsScheduledForDeferredDelete
641 }
642 if afpi.DeferredDeleteTimeRemaining != nil {
643 objectMap["deferredDeleteTimeRemaining"] = afpi.DeferredDeleteTimeRemaining
644 }
645 if afpi.IsDeferredDeleteScheduleUpcoming != nil {
646 objectMap["isDeferredDeleteScheduleUpcoming"] = afpi.IsDeferredDeleteScheduleUpcoming
647 }
648 if afpi.IsRehydrate != nil {
649 objectMap["isRehydrate"] = afpi.IsRehydrate
650 }
651 if afpi.ResourceGuardOperationRequests != nil {
652 objectMap["resourceGuardOperationRequests"] = afpi.ResourceGuardOperationRequests
653 }
654 if afpi.ProtectedItemType != "" {
655 objectMap["protectedItemType"] = afpi.ProtectedItemType
656 }
657 return json.Marshal(objectMap)
658 }
659
660
661 func (afpi AzureFileshareProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
662 return &afpi, true
663 }
664
665
666 func (afpi AzureFileshareProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
667 return nil, false
668 }
669
670
671 func (afpi AzureFileshareProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
672 return nil, false
673 }
674
675
676 func (afpi AzureFileshareProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
677 return nil, false
678 }
679
680
681 func (afpi AzureFileshareProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
682 return nil, false
683 }
684
685
686 func (afpi AzureFileshareProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
687 return nil, false
688 }
689
690
691 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
692 return nil, false
693 }
694
695
696 func (afpi AzureFileshareProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
697 return nil, false
698 }
699
700
701 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
702 return nil, false
703 }
704
705
706 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
707 return nil, false
708 }
709
710
711 func (afpi AzureFileshareProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
712 return nil, false
713 }
714
715
716 func (afpi AzureFileshareProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
717 return nil, false
718 }
719
720
721 func (afpi AzureFileshareProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
722 return nil, false
723 }
724
725
726 func (afpi AzureFileshareProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
727 return nil, false
728 }
729
730
731 func (afpi AzureFileshareProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
732 return nil, false
733 }
734
735
736 func (afpi AzureFileshareProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
737 return &afpi, true
738 }
739
740
741 type AzureFileshareProtectedItemExtendedInfo struct {
742
743 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
744
745 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
746
747 PolicyState *string `json:"policyState,omitempty"`
748
749 ResourceState *string `json:"resourceState,omitempty"`
750
751 ResourceStateSyncTime *date.Time `json:"resourceStateSyncTime,omitempty"`
752 }
753
754
755 func (afpiei AzureFileshareProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
756 objectMap := make(map[string]interface{})
757 if afpiei.OldestRecoveryPoint != nil {
758 objectMap["oldestRecoveryPoint"] = afpiei.OldestRecoveryPoint
759 }
760 if afpiei.RecoveryPointCount != nil {
761 objectMap["recoveryPointCount"] = afpiei.RecoveryPointCount
762 }
763 if afpiei.PolicyState != nil {
764 objectMap["policyState"] = afpiei.PolicyState
765 }
766 return json.Marshal(objectMap)
767 }
768
769
770 type AzureFileShareProtectionPolicy struct {
771
772 WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
773
774 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
775
776 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
777
778 TimeZone *string `json:"timeZone,omitempty"`
779
780 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
781
782 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
783
784 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
785 }
786
787
788 func (afspp AzureFileShareProtectionPolicy) MarshalJSON() ([]byte, error) {
789 afspp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage
790 objectMap := make(map[string]interface{})
791 if afspp.WorkLoadType != "" {
792 objectMap["workLoadType"] = afspp.WorkLoadType
793 }
794 objectMap["schedulePolicy"] = afspp.SchedulePolicy
795 objectMap["retentionPolicy"] = afspp.RetentionPolicy
796 if afspp.TimeZone != nil {
797 objectMap["timeZone"] = afspp.TimeZone
798 }
799 if afspp.ProtectedItemsCount != nil {
800 objectMap["protectedItemsCount"] = afspp.ProtectedItemsCount
801 }
802 if afspp.ResourceGuardOperationRequests != nil {
803 objectMap["resourceGuardOperationRequests"] = afspp.ResourceGuardOperationRequests
804 }
805 if afspp.BackupManagementType != "" {
806 objectMap["backupManagementType"] = afspp.BackupManagementType
807 }
808 return json.Marshal(objectMap)
809 }
810
811
812 func (afspp AzureFileShareProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
813 return nil, false
814 }
815
816
817 func (afspp AzureFileShareProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
818 return &afspp, true
819 }
820
821
822 func (afspp AzureFileShareProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
823 return nil, false
824 }
825
826
827 func (afspp AzureFileShareProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
828 return nil, false
829 }
830
831
832 func (afspp AzureFileShareProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
833 return nil, false
834 }
835
836
837 func (afspp AzureFileShareProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
838 return nil, false
839 }
840
841
842 func (afspp AzureFileShareProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
843 return nil, false
844 }
845
846
847 func (afspp AzureFileShareProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
848 return &afspp, true
849 }
850
851
852 func (afspp *AzureFileShareProtectionPolicy) UnmarshalJSON(body []byte) error {
853 var m map[string]*json.RawMessage
854 err := json.Unmarshal(body, &m)
855 if err != nil {
856 return err
857 }
858 for k, v := range m {
859 switch k {
860 case "workLoadType":
861 if v != nil {
862 var workLoadType WorkloadType
863 err = json.Unmarshal(*v, &workLoadType)
864 if err != nil {
865 return err
866 }
867 afspp.WorkLoadType = workLoadType
868 }
869 case "schedulePolicy":
870 if v != nil {
871 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
872 if err != nil {
873 return err
874 }
875 afspp.SchedulePolicy = schedulePolicy
876 }
877 case "retentionPolicy":
878 if v != nil {
879 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
880 if err != nil {
881 return err
882 }
883 afspp.RetentionPolicy = retentionPolicy
884 }
885 case "timeZone":
886 if v != nil {
887 var timeZone string
888 err = json.Unmarshal(*v, &timeZone)
889 if err != nil {
890 return err
891 }
892 afspp.TimeZone = &timeZone
893 }
894 case "protectedItemsCount":
895 if v != nil {
896 var protectedItemsCount int32
897 err = json.Unmarshal(*v, &protectedItemsCount)
898 if err != nil {
899 return err
900 }
901 afspp.ProtectedItemsCount = &protectedItemsCount
902 }
903 case "resourceGuardOperationRequests":
904 if v != nil {
905 var resourceGuardOperationRequests []string
906 err = json.Unmarshal(*v, &resourceGuardOperationRequests)
907 if err != nil {
908 return err
909 }
910 afspp.ResourceGuardOperationRequests = &resourceGuardOperationRequests
911 }
912 case "backupManagementType":
913 if v != nil {
914 var backupManagementType ManagementTypeBasicProtectionPolicy
915 err = json.Unmarshal(*v, &backupManagementType)
916 if err != nil {
917 return err
918 }
919 afspp.BackupManagementType = backupManagementType
920 }
921 }
922 }
923
924 return nil
925 }
926
927
928
929 type AzureFileShareProvisionILRRequest struct {
930
931 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
932
933 SourceResourceID *string `json:"sourceResourceId,omitempty"`
934
935 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
936 }
937
938
939 func (afspir AzureFileShareProvisionILRRequest) MarshalJSON() ([]byte, error) {
940 afspir.ObjectType = ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest
941 objectMap := make(map[string]interface{})
942 if afspir.RecoveryPointID != nil {
943 objectMap["recoveryPointId"] = afspir.RecoveryPointID
944 }
945 if afspir.SourceResourceID != nil {
946 objectMap["sourceResourceId"] = afspir.SourceResourceID
947 }
948 if afspir.ObjectType != "" {
949 objectMap["objectType"] = afspir.ObjectType
950 }
951 return json.Marshal(objectMap)
952 }
953
954
955 func (afspir AzureFileShareProvisionILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
956 return &afspir, true
957 }
958
959
960 func (afspir AzureFileShareProvisionILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
961 return nil, false
962 }
963
964
965 func (afspir AzureFileShareProvisionILRRequest) AsILRRequest() (*ILRRequest, bool) {
966 return nil, false
967 }
968
969
970 func (afspir AzureFileShareProvisionILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
971 return &afspir, true
972 }
973
974
975 type AzureFileShareRecoveryPoint struct {
976
977 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
978
979 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
980
981 FileShareSnapshotURI *string `json:"fileShareSnapshotUri,omitempty"`
982
983 RecoveryPointSizeInGB *int32 `json:"recoveryPointSizeInGB,omitempty"`
984
985 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
986 }
987
988
989 func (afsrp AzureFileShareRecoveryPoint) MarshalJSON() ([]byte, error) {
990 afsrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint
991 objectMap := make(map[string]interface{})
992 if afsrp.ObjectType != "" {
993 objectMap["objectType"] = afsrp.ObjectType
994 }
995 return json.Marshal(objectMap)
996 }
997
998
999 func (afsrp AzureFileShareRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
1000 return &afsrp, true
1001 }
1002
1003
1004 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
1005 return nil, false
1006 }
1007
1008
1009 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
1010 return nil, false
1011 }
1012
1013
1014 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
1015 return nil, false
1016 }
1017
1018
1019 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
1020 return nil, false
1021 }
1022
1023
1024 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
1025 return nil, false
1026 }
1027
1028
1029 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
1030 return nil, false
1031 }
1032
1033
1034 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
1035 return nil, false
1036 }
1037
1038
1039 func (afsrp AzureFileShareRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
1040 return nil, false
1041 }
1042
1043
1044 func (afsrp AzureFileShareRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
1045 return nil, false
1046 }
1047
1048
1049 func (afsrp AzureFileShareRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
1050 return nil, false
1051 }
1052
1053
1054 func (afsrp AzureFileShareRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
1055 return nil, false
1056 }
1057
1058
1059 func (afsrp AzureFileShareRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
1060 return nil, false
1061 }
1062
1063
1064 func (afsrp AzureFileShareRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
1065 return &afsrp, true
1066 }
1067
1068
1069 type AzureFileShareRestoreRequest struct {
1070
1071 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
1072
1073 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1074
1075 CopyOptions CopyOptions `json:"copyOptions,omitempty"`
1076
1077 RestoreRequestType RestoreRequestType `json:"restoreRequestType,omitempty"`
1078
1079 RestoreFileSpecs *[]RestoreFileSpecs `json:"restoreFileSpecs,omitempty"`
1080
1081 TargetDetails *TargetAFSRestoreInfo `json:"targetDetails,omitempty"`
1082
1083 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
1084 }
1085
1086
1087 func (afsrr AzureFileShareRestoreRequest) MarshalJSON() ([]byte, error) {
1088 afsrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest
1089 objectMap := make(map[string]interface{})
1090 if afsrr.RecoveryType != "" {
1091 objectMap["recoveryType"] = afsrr.RecoveryType
1092 }
1093 if afsrr.SourceResourceID != nil {
1094 objectMap["sourceResourceId"] = afsrr.SourceResourceID
1095 }
1096 if afsrr.CopyOptions != "" {
1097 objectMap["copyOptions"] = afsrr.CopyOptions
1098 }
1099 if afsrr.RestoreRequestType != "" {
1100 objectMap["restoreRequestType"] = afsrr.RestoreRequestType
1101 }
1102 if afsrr.RestoreFileSpecs != nil {
1103 objectMap["restoreFileSpecs"] = afsrr.RestoreFileSpecs
1104 }
1105 if afsrr.TargetDetails != nil {
1106 objectMap["targetDetails"] = afsrr.TargetDetails
1107 }
1108 if afsrr.ObjectType != "" {
1109 objectMap["objectType"] = afsrr.ObjectType
1110 }
1111 return json.Marshal(objectMap)
1112 }
1113
1114
1115 func (afsrr AzureFileShareRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
1116 return &afsrr, true
1117 }
1118
1119
1120 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
1121 return nil, false
1122 }
1123
1124
1125 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
1126 return nil, false
1127 }
1128
1129
1130 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
1131 return nil, false
1132 }
1133
1134
1135 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
1136 return nil, false
1137 }
1138
1139
1140 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
1141 return nil, false
1142 }
1143
1144
1145 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
1146 return nil, false
1147 }
1148
1149
1150 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
1151 return nil, false
1152 }
1153
1154
1155 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
1156 return nil, false
1157 }
1158
1159
1160 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
1161 return nil, false
1162 }
1163
1164
1165 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
1166 return nil, false
1167 }
1168
1169
1170 func (afsrr AzureFileShareRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
1171 return nil, false
1172 }
1173
1174
1175 func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
1176 return nil, false
1177 }
1178
1179
1180 func (afsrr AzureFileShareRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
1181 return nil, false
1182 }
1183
1184
1185 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
1186 return nil, false
1187 }
1188
1189
1190 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
1191 return nil, false
1192 }
1193
1194
1195 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
1196 return nil, false
1197 }
1198
1199
1200 func (afsrr AzureFileShareRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
1201 return nil, false
1202 }
1203
1204
1205 func (afsrr AzureFileShareRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
1206 return nil, false
1207 }
1208
1209
1210 func (afsrr AzureFileShareRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
1211 return nil, false
1212 }
1213
1214
1215 func (afsrr AzureFileShareRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
1216 return &afsrr, true
1217 }
1218
1219
1220
1221 type AzureIaaSClassicComputeVMContainer struct {
1222
1223 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1224
1225 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1226
1227 ResourceGroup *string `json:"resourceGroup,omitempty"`
1228
1229 FriendlyName *string `json:"friendlyName,omitempty"`
1230
1231 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1232
1233 RegistrationStatus *string `json:"registrationStatus,omitempty"`
1234
1235 HealthStatus *string `json:"healthStatus,omitempty"`
1236
1237 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
1238 }
1239
1240
1241 func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) {
1242 aisccvc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines
1243 objectMap := make(map[string]interface{})
1244 if aisccvc.VirtualMachineID != nil {
1245 objectMap["virtualMachineId"] = aisccvc.VirtualMachineID
1246 }
1247 if aisccvc.VirtualMachineVersion != nil {
1248 objectMap["virtualMachineVersion"] = aisccvc.VirtualMachineVersion
1249 }
1250 if aisccvc.ResourceGroup != nil {
1251 objectMap["resourceGroup"] = aisccvc.ResourceGroup
1252 }
1253 if aisccvc.FriendlyName != nil {
1254 objectMap["friendlyName"] = aisccvc.FriendlyName
1255 }
1256 if aisccvc.BackupManagementType != "" {
1257 objectMap["backupManagementType"] = aisccvc.BackupManagementType
1258 }
1259 if aisccvc.RegistrationStatus != nil {
1260 objectMap["registrationStatus"] = aisccvc.RegistrationStatus
1261 }
1262 if aisccvc.HealthStatus != nil {
1263 objectMap["healthStatus"] = aisccvc.HealthStatus
1264 }
1265 if aisccvc.ContainerType != "" {
1266 objectMap["containerType"] = aisccvc.ContainerType
1267 }
1268 return json.Marshal(objectMap)
1269 }
1270
1271
1272 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
1273 return nil, false
1274 }
1275
1276
1277 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
1278 return &aisccvc, true
1279 }
1280
1281
1282 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
1283 return nil, false
1284 }
1285
1286
1287 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
1288 return nil, false
1289 }
1290
1291
1292 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
1293 return nil, false
1294 }
1295
1296
1297 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
1298 return nil, false
1299 }
1300
1301
1302 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
1303 return nil, false
1304 }
1305
1306
1307 func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
1308 return nil, false
1309 }
1310
1311
1312 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
1313 return nil, false
1314 }
1315
1316
1317 func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
1318 return nil, false
1319 }
1320
1321
1322 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
1323 return nil, false
1324 }
1325
1326
1327 func (aisccvc AzureIaaSClassicComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
1328 return nil, false
1329 }
1330
1331
1332 func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
1333 return nil, false
1334 }
1335
1336
1337 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
1338 return &aisccvc, true
1339 }
1340
1341
1342 func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
1343 return nil, false
1344 }
1345
1346
1347 func (aisccvc AzureIaaSClassicComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
1348 return nil, false
1349 }
1350
1351
1352 func (aisccvc AzureIaaSClassicComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
1353 return &aisccvc, true
1354 }
1355
1356
1357
1358 type AzureIaaSClassicComputeVMProtectableItem struct {
1359
1360 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1361
1362 BackupManagementType *string `json:"backupManagementType,omitempty"`
1363
1364 WorkloadType *string `json:"workloadType,omitempty"`
1365
1366 FriendlyName *string `json:"friendlyName,omitempty"`
1367
1368 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
1369
1370 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
1371 }
1372
1373
1374 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
1375 aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines
1376 objectMap := make(map[string]interface{})
1377 if aisccvpi.VirtualMachineID != nil {
1378 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
1379 }
1380 if aisccvpi.BackupManagementType != nil {
1381 objectMap["backupManagementType"] = aisccvpi.BackupManagementType
1382 }
1383 if aisccvpi.WorkloadType != nil {
1384 objectMap["workloadType"] = aisccvpi.WorkloadType
1385 }
1386 if aisccvpi.FriendlyName != nil {
1387 objectMap["friendlyName"] = aisccvpi.FriendlyName
1388 }
1389 if aisccvpi.ProtectionState != "" {
1390 objectMap["protectionState"] = aisccvpi.ProtectionState
1391 }
1392 if aisccvpi.ProtectableItemType != "" {
1393 objectMap["protectableItemType"] = aisccvpi.ProtectableItemType
1394 }
1395 return json.Marshal(objectMap)
1396 }
1397
1398
1399 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
1400 return nil, false
1401 }
1402
1403
1404 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
1405 return &aisccvpi, true
1406 }
1407
1408
1409 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
1410 return nil, false
1411 }
1412
1413
1414 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
1415 return nil, false
1416 }
1417
1418
1419 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
1420 return nil, false
1421 }
1422
1423
1424 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
1425 return nil, false
1426 }
1427
1428
1429 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
1430 return nil, false
1431 }
1432
1433
1434 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
1435 return nil, false
1436 }
1437
1438
1439 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
1440 return nil, false
1441 }
1442
1443
1444 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
1445 return nil, false
1446 }
1447
1448
1449 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
1450 return nil, false
1451 }
1452
1453
1454 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
1455 return nil, false
1456 }
1457
1458
1459 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
1460 return &aisccvpi, true
1461 }
1462
1463
1464 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
1465 return nil, false
1466 }
1467
1468
1469 func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
1470 return &aisccvpi, true
1471 }
1472
1473
1474
1475 type AzureIaaSClassicComputeVMProtectedItem struct {
1476
1477 FriendlyName *string `json:"friendlyName,omitempty"`
1478
1479 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1480
1481 ProtectionStatus *string `json:"protectionStatus,omitempty"`
1482
1483 ProtectionState ProtectionState `json:"protectionState,omitempty"`
1484
1485 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
1486
1487 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
1488
1489 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
1490
1491 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1492
1493 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1494
1495 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1496
1497 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1498 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
1499
1500 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1501
1502 WorkloadType DataSourceType `json:"workloadType,omitempty"`
1503
1504 ContainerName *string `json:"containerName,omitempty"`
1505
1506 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1507
1508 PolicyID *string `json:"policyId,omitempty"`
1509
1510 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
1511
1512 BackupSetName *string `json:"backupSetName,omitempty"`
1513
1514 CreateMode CreateMode `json:"createMode,omitempty"`
1515
1516 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
1517
1518 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
1519
1520 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
1521
1522 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
1523
1524 IsRehydrate *bool `json:"isRehydrate,omitempty"`
1525
1526 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
1527
1528 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
1529 }
1530
1531
1532 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
1533 aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines
1534 objectMap := make(map[string]interface{})
1535 if aisccvpi.FriendlyName != nil {
1536 objectMap["friendlyName"] = aisccvpi.FriendlyName
1537 }
1538 if aisccvpi.VirtualMachineID != nil {
1539 objectMap["virtualMachineId"] = aisccvpi.VirtualMachineID
1540 }
1541 if aisccvpi.ProtectionStatus != nil {
1542 objectMap["protectionStatus"] = aisccvpi.ProtectionStatus
1543 }
1544 if aisccvpi.ProtectionState != "" {
1545 objectMap["protectionState"] = aisccvpi.ProtectionState
1546 }
1547 if aisccvpi.HealthStatus != "" {
1548 objectMap["healthStatus"] = aisccvpi.HealthStatus
1549 }
1550 if aisccvpi.HealthDetails != nil {
1551 objectMap["healthDetails"] = aisccvpi.HealthDetails
1552 }
1553 if aisccvpi.KpisHealths != nil {
1554 objectMap["kpisHealths"] = aisccvpi.KpisHealths
1555 }
1556 if aisccvpi.LastBackupStatus != nil {
1557 objectMap["lastBackupStatus"] = aisccvpi.LastBackupStatus
1558 }
1559 if aisccvpi.LastBackupTime != nil {
1560 objectMap["lastBackupTime"] = aisccvpi.LastBackupTime
1561 }
1562 if aisccvpi.ProtectedItemDataID != nil {
1563 objectMap["protectedItemDataId"] = aisccvpi.ProtectedItemDataID
1564 }
1565 if aisccvpi.ExtendedInfo != nil {
1566 objectMap["extendedInfo"] = aisccvpi.ExtendedInfo
1567 }
1568 if aisccvpi.ExtendedProperties != nil {
1569 objectMap["extendedProperties"] = aisccvpi.ExtendedProperties
1570 }
1571 if aisccvpi.BackupManagementType != "" {
1572 objectMap["backupManagementType"] = aisccvpi.BackupManagementType
1573 }
1574 if aisccvpi.WorkloadType != "" {
1575 objectMap["workloadType"] = aisccvpi.WorkloadType
1576 }
1577 if aisccvpi.ContainerName != nil {
1578 objectMap["containerName"] = aisccvpi.ContainerName
1579 }
1580 if aisccvpi.SourceResourceID != nil {
1581 objectMap["sourceResourceId"] = aisccvpi.SourceResourceID
1582 }
1583 if aisccvpi.PolicyID != nil {
1584 objectMap["policyId"] = aisccvpi.PolicyID
1585 }
1586 if aisccvpi.LastRecoveryPoint != nil {
1587 objectMap["lastRecoveryPoint"] = aisccvpi.LastRecoveryPoint
1588 }
1589 if aisccvpi.BackupSetName != nil {
1590 objectMap["backupSetName"] = aisccvpi.BackupSetName
1591 }
1592 if aisccvpi.CreateMode != "" {
1593 objectMap["createMode"] = aisccvpi.CreateMode
1594 }
1595 if aisccvpi.DeferredDeleteTimeInUTC != nil {
1596 objectMap["deferredDeleteTimeInUTC"] = aisccvpi.DeferredDeleteTimeInUTC
1597 }
1598 if aisccvpi.IsScheduledForDeferredDelete != nil {
1599 objectMap["isScheduledForDeferredDelete"] = aisccvpi.IsScheduledForDeferredDelete
1600 }
1601 if aisccvpi.DeferredDeleteTimeRemaining != nil {
1602 objectMap["deferredDeleteTimeRemaining"] = aisccvpi.DeferredDeleteTimeRemaining
1603 }
1604 if aisccvpi.IsDeferredDeleteScheduleUpcoming != nil {
1605 objectMap["isDeferredDeleteScheduleUpcoming"] = aisccvpi.IsDeferredDeleteScheduleUpcoming
1606 }
1607 if aisccvpi.IsRehydrate != nil {
1608 objectMap["isRehydrate"] = aisccvpi.IsRehydrate
1609 }
1610 if aisccvpi.ResourceGuardOperationRequests != nil {
1611 objectMap["resourceGuardOperationRequests"] = aisccvpi.ResourceGuardOperationRequests
1612 }
1613 if aisccvpi.ProtectedItemType != "" {
1614 objectMap["protectedItemType"] = aisccvpi.ProtectedItemType
1615 }
1616 return json.Marshal(objectMap)
1617 }
1618
1619
1620 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
1621 return nil, false
1622 }
1623
1624
1625 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
1626 return &aisccvpi, true
1627 }
1628
1629
1630 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
1631 return nil, false
1632 }
1633
1634
1635 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
1636 return nil, false
1637 }
1638
1639
1640 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
1641 return &aisccvpi, true
1642 }
1643
1644
1645 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
1646 return nil, false
1647 }
1648
1649
1650 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
1651 return nil, false
1652 }
1653
1654
1655 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
1656 return nil, false
1657 }
1658
1659
1660 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
1661 return nil, false
1662 }
1663
1664
1665 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
1666 return nil, false
1667 }
1668
1669
1670 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
1671 return nil, false
1672 }
1673
1674
1675 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
1676 return nil, false
1677 }
1678
1679
1680 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
1681 return nil, false
1682 }
1683
1684
1685 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
1686 return nil, false
1687 }
1688
1689
1690 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
1691 return nil, false
1692 }
1693
1694
1695 func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
1696 return &aisccvpi, true
1697 }
1698
1699
1700
1701 type AzureIaaSComputeVMContainer struct {
1702
1703 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1704
1705 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
1706
1707 ResourceGroup *string `json:"resourceGroup,omitempty"`
1708
1709 FriendlyName *string `json:"friendlyName,omitempty"`
1710
1711 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1712
1713 RegistrationStatus *string `json:"registrationStatus,omitempty"`
1714
1715 HealthStatus *string `json:"healthStatus,omitempty"`
1716
1717 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
1718 }
1719
1720
1721 func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) {
1722 aiscvc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines
1723 objectMap := make(map[string]interface{})
1724 if aiscvc.VirtualMachineID != nil {
1725 objectMap["virtualMachineId"] = aiscvc.VirtualMachineID
1726 }
1727 if aiscvc.VirtualMachineVersion != nil {
1728 objectMap["virtualMachineVersion"] = aiscvc.VirtualMachineVersion
1729 }
1730 if aiscvc.ResourceGroup != nil {
1731 objectMap["resourceGroup"] = aiscvc.ResourceGroup
1732 }
1733 if aiscvc.FriendlyName != nil {
1734 objectMap["friendlyName"] = aiscvc.FriendlyName
1735 }
1736 if aiscvc.BackupManagementType != "" {
1737 objectMap["backupManagementType"] = aiscvc.BackupManagementType
1738 }
1739 if aiscvc.RegistrationStatus != nil {
1740 objectMap["registrationStatus"] = aiscvc.RegistrationStatus
1741 }
1742 if aiscvc.HealthStatus != nil {
1743 objectMap["healthStatus"] = aiscvc.HealthStatus
1744 }
1745 if aiscvc.ContainerType != "" {
1746 objectMap["containerType"] = aiscvc.ContainerType
1747 }
1748 return json.Marshal(objectMap)
1749 }
1750
1751
1752 func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
1753 return nil, false
1754 }
1755
1756
1757 func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
1758 return nil, false
1759 }
1760
1761
1762 func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
1763 return &aiscvc, true
1764 }
1765
1766
1767 func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
1768 return nil, false
1769 }
1770
1771
1772 func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
1773 return nil, false
1774 }
1775
1776
1777 func (aiscvc AzureIaaSComputeVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
1778 return nil, false
1779 }
1780
1781
1782 func (aiscvc AzureIaaSComputeVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
1783 return nil, false
1784 }
1785
1786
1787 func (aiscvc AzureIaaSComputeVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
1788 return nil, false
1789 }
1790
1791
1792 func (aiscvc AzureIaaSComputeVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
1793 return nil, false
1794 }
1795
1796
1797 func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) {
1798 return nil, false
1799 }
1800
1801
1802 func (aiscvc AzureIaaSComputeVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
1803 return nil, false
1804 }
1805
1806
1807 func (aiscvc AzureIaaSComputeVMContainer) AsGenericContainer() (*GenericContainer, bool) {
1808 return nil, false
1809 }
1810
1811
1812 func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
1813 return nil, false
1814 }
1815
1816
1817 func (aiscvc AzureIaaSComputeVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
1818 return &aiscvc, true
1819 }
1820
1821
1822 func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) {
1823 return nil, false
1824 }
1825
1826
1827 func (aiscvc AzureIaaSComputeVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
1828 return nil, false
1829 }
1830
1831
1832 func (aiscvc AzureIaaSComputeVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
1833 return &aiscvc, true
1834 }
1835
1836
1837
1838 type AzureIaaSComputeVMProtectableItem struct {
1839
1840 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1841
1842 BackupManagementType *string `json:"backupManagementType,omitempty"`
1843
1844 WorkloadType *string `json:"workloadType,omitempty"`
1845
1846 FriendlyName *string `json:"friendlyName,omitempty"`
1847
1848 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
1849
1850 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
1851 }
1852
1853
1854 func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) {
1855 aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines
1856 objectMap := make(map[string]interface{})
1857 if aiscvpi.VirtualMachineID != nil {
1858 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
1859 }
1860 if aiscvpi.BackupManagementType != nil {
1861 objectMap["backupManagementType"] = aiscvpi.BackupManagementType
1862 }
1863 if aiscvpi.WorkloadType != nil {
1864 objectMap["workloadType"] = aiscvpi.WorkloadType
1865 }
1866 if aiscvpi.FriendlyName != nil {
1867 objectMap["friendlyName"] = aiscvpi.FriendlyName
1868 }
1869 if aiscvpi.ProtectionState != "" {
1870 objectMap["protectionState"] = aiscvpi.ProtectionState
1871 }
1872 if aiscvpi.ProtectableItemType != "" {
1873 objectMap["protectableItemType"] = aiscvpi.ProtectableItemType
1874 }
1875 return json.Marshal(objectMap)
1876 }
1877
1878
1879 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
1880 return nil, false
1881 }
1882
1883
1884 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
1885 return nil, false
1886 }
1887
1888
1889 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
1890 return &aiscvpi, true
1891 }
1892
1893
1894 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
1895 return nil, false
1896 }
1897
1898
1899 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
1900 return nil, false
1901 }
1902
1903
1904 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
1905 return nil, false
1906 }
1907
1908
1909 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
1910 return nil, false
1911 }
1912
1913
1914 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
1915 return nil, false
1916 }
1917
1918
1919 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
1920 return nil, false
1921 }
1922
1923
1924 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
1925 return nil, false
1926 }
1927
1928
1929 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
1930 return nil, false
1931 }
1932
1933
1934 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
1935 return nil, false
1936 }
1937
1938
1939 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
1940 return &aiscvpi, true
1941 }
1942
1943
1944 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
1945 return nil, false
1946 }
1947
1948
1949 func (aiscvpi AzureIaaSComputeVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
1950 return &aiscvpi, true
1951 }
1952
1953
1954
1955 type AzureIaaSComputeVMProtectedItem struct {
1956
1957 FriendlyName *string `json:"friendlyName,omitempty"`
1958
1959 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
1960
1961 ProtectionStatus *string `json:"protectionStatus,omitempty"`
1962
1963 ProtectionState ProtectionState `json:"protectionState,omitempty"`
1964
1965 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
1966
1967 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
1968
1969 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
1970
1971 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
1972
1973 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
1974
1975 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
1976
1977 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
1978 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
1979
1980 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
1981
1982 WorkloadType DataSourceType `json:"workloadType,omitempty"`
1983
1984 ContainerName *string `json:"containerName,omitempty"`
1985
1986 SourceResourceID *string `json:"sourceResourceId,omitempty"`
1987
1988 PolicyID *string `json:"policyId,omitempty"`
1989
1990 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
1991
1992 BackupSetName *string `json:"backupSetName,omitempty"`
1993
1994 CreateMode CreateMode `json:"createMode,omitempty"`
1995
1996 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
1997
1998 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
1999
2000 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
2001
2002 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
2003
2004 IsRehydrate *bool `json:"isRehydrate,omitempty"`
2005
2006 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
2007
2008 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
2009 }
2010
2011
2012 func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) {
2013 aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines
2014 objectMap := make(map[string]interface{})
2015 if aiscvpi.FriendlyName != nil {
2016 objectMap["friendlyName"] = aiscvpi.FriendlyName
2017 }
2018 if aiscvpi.VirtualMachineID != nil {
2019 objectMap["virtualMachineId"] = aiscvpi.VirtualMachineID
2020 }
2021 if aiscvpi.ProtectionStatus != nil {
2022 objectMap["protectionStatus"] = aiscvpi.ProtectionStatus
2023 }
2024 if aiscvpi.ProtectionState != "" {
2025 objectMap["protectionState"] = aiscvpi.ProtectionState
2026 }
2027 if aiscvpi.HealthStatus != "" {
2028 objectMap["healthStatus"] = aiscvpi.HealthStatus
2029 }
2030 if aiscvpi.HealthDetails != nil {
2031 objectMap["healthDetails"] = aiscvpi.HealthDetails
2032 }
2033 if aiscvpi.KpisHealths != nil {
2034 objectMap["kpisHealths"] = aiscvpi.KpisHealths
2035 }
2036 if aiscvpi.LastBackupStatus != nil {
2037 objectMap["lastBackupStatus"] = aiscvpi.LastBackupStatus
2038 }
2039 if aiscvpi.LastBackupTime != nil {
2040 objectMap["lastBackupTime"] = aiscvpi.LastBackupTime
2041 }
2042 if aiscvpi.ProtectedItemDataID != nil {
2043 objectMap["protectedItemDataId"] = aiscvpi.ProtectedItemDataID
2044 }
2045 if aiscvpi.ExtendedInfo != nil {
2046 objectMap["extendedInfo"] = aiscvpi.ExtendedInfo
2047 }
2048 if aiscvpi.ExtendedProperties != nil {
2049 objectMap["extendedProperties"] = aiscvpi.ExtendedProperties
2050 }
2051 if aiscvpi.BackupManagementType != "" {
2052 objectMap["backupManagementType"] = aiscvpi.BackupManagementType
2053 }
2054 if aiscvpi.WorkloadType != "" {
2055 objectMap["workloadType"] = aiscvpi.WorkloadType
2056 }
2057 if aiscvpi.ContainerName != nil {
2058 objectMap["containerName"] = aiscvpi.ContainerName
2059 }
2060 if aiscvpi.SourceResourceID != nil {
2061 objectMap["sourceResourceId"] = aiscvpi.SourceResourceID
2062 }
2063 if aiscvpi.PolicyID != nil {
2064 objectMap["policyId"] = aiscvpi.PolicyID
2065 }
2066 if aiscvpi.LastRecoveryPoint != nil {
2067 objectMap["lastRecoveryPoint"] = aiscvpi.LastRecoveryPoint
2068 }
2069 if aiscvpi.BackupSetName != nil {
2070 objectMap["backupSetName"] = aiscvpi.BackupSetName
2071 }
2072 if aiscvpi.CreateMode != "" {
2073 objectMap["createMode"] = aiscvpi.CreateMode
2074 }
2075 if aiscvpi.DeferredDeleteTimeInUTC != nil {
2076 objectMap["deferredDeleteTimeInUTC"] = aiscvpi.DeferredDeleteTimeInUTC
2077 }
2078 if aiscvpi.IsScheduledForDeferredDelete != nil {
2079 objectMap["isScheduledForDeferredDelete"] = aiscvpi.IsScheduledForDeferredDelete
2080 }
2081 if aiscvpi.DeferredDeleteTimeRemaining != nil {
2082 objectMap["deferredDeleteTimeRemaining"] = aiscvpi.DeferredDeleteTimeRemaining
2083 }
2084 if aiscvpi.IsDeferredDeleteScheduleUpcoming != nil {
2085 objectMap["isDeferredDeleteScheduleUpcoming"] = aiscvpi.IsDeferredDeleteScheduleUpcoming
2086 }
2087 if aiscvpi.IsRehydrate != nil {
2088 objectMap["isRehydrate"] = aiscvpi.IsRehydrate
2089 }
2090 if aiscvpi.ResourceGuardOperationRequests != nil {
2091 objectMap["resourceGuardOperationRequests"] = aiscvpi.ResourceGuardOperationRequests
2092 }
2093 if aiscvpi.ProtectedItemType != "" {
2094 objectMap["protectedItemType"] = aiscvpi.ProtectedItemType
2095 }
2096 return json.Marshal(objectMap)
2097 }
2098
2099
2100 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
2101 return nil, false
2102 }
2103
2104
2105 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
2106 return nil, false
2107 }
2108
2109
2110 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
2111 return &aiscvpi, true
2112 }
2113
2114
2115 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
2116 return nil, false
2117 }
2118
2119
2120 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
2121 return &aiscvpi, true
2122 }
2123
2124
2125 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
2126 return nil, false
2127 }
2128
2129
2130 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2131 return nil, false
2132 }
2133
2134
2135 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2136 return nil, false
2137 }
2138
2139
2140 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2141 return nil, false
2142 }
2143
2144
2145 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2146 return nil, false
2147 }
2148
2149
2150 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2151 return nil, false
2152 }
2153
2154
2155 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2156 return nil, false
2157 }
2158
2159
2160 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2161 return nil, false
2162 }
2163
2164
2165 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2166 return nil, false
2167 }
2168
2169
2170 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2171 return nil, false
2172 }
2173
2174
2175 func (aiscvpi AzureIaaSComputeVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2176 return &aiscvpi, true
2177 }
2178
2179
2180 type AzureIaaSVMErrorInfo struct {
2181
2182 ErrorCode *int32 `json:"errorCode,omitempty"`
2183
2184 ErrorTitle *string `json:"errorTitle,omitempty"`
2185
2186 ErrorString *string `json:"errorString,omitempty"`
2187
2188 Recommendations *[]string `json:"recommendations,omitempty"`
2189 }
2190
2191
2192 func (aisei AzureIaaSVMErrorInfo) MarshalJSON() ([]byte, error) {
2193 objectMap := make(map[string]interface{})
2194 return json.Marshal(objectMap)
2195 }
2196
2197
2198 type AzureIaaSVMHealthDetails struct {
2199
2200 Code *int32 `json:"code,omitempty"`
2201
2202 Title *string `json:"title,omitempty"`
2203
2204 Message *string `json:"message,omitempty"`
2205
2206 Recommendations *[]string `json:"recommendations,omitempty"`
2207 }
2208
2209
2210 func (aishd AzureIaaSVMHealthDetails) MarshalJSON() ([]byte, error) {
2211 objectMap := make(map[string]interface{})
2212 return json.Marshal(objectMap)
2213 }
2214
2215
2216 type AzureIaaSVMJob struct {
2217
2218 Duration *string `json:"duration,omitempty"`
2219
2220 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
2221
2222 ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"`
2223
2224 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
2225
2226 ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"`
2227
2228 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
2229
2230 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2231
2232 Operation *string `json:"operation,omitempty"`
2233
2234 Status *string `json:"status,omitempty"`
2235
2236 StartTime *date.Time `json:"startTime,omitempty"`
2237
2238 EndTime *date.Time `json:"endTime,omitempty"`
2239
2240 ActivityID *string `json:"activityId,omitempty"`
2241
2242 JobType JobType `json:"jobType,omitempty"`
2243 }
2244
2245
2246 func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) {
2247 aisj.JobType = JobTypeAzureIaaSVMJob
2248 objectMap := make(map[string]interface{})
2249 if aisj.Duration != nil {
2250 objectMap["duration"] = aisj.Duration
2251 }
2252 if aisj.ActionsInfo != nil {
2253 objectMap["actionsInfo"] = aisj.ActionsInfo
2254 }
2255 if aisj.ErrorDetails != nil {
2256 objectMap["errorDetails"] = aisj.ErrorDetails
2257 }
2258 if aisj.VirtualMachineVersion != nil {
2259 objectMap["virtualMachineVersion"] = aisj.VirtualMachineVersion
2260 }
2261 if aisj.ExtendedInfo != nil {
2262 objectMap["extendedInfo"] = aisj.ExtendedInfo
2263 }
2264 if aisj.EntityFriendlyName != nil {
2265 objectMap["entityFriendlyName"] = aisj.EntityFriendlyName
2266 }
2267 if aisj.BackupManagementType != "" {
2268 objectMap["backupManagementType"] = aisj.BackupManagementType
2269 }
2270 if aisj.Operation != nil {
2271 objectMap["operation"] = aisj.Operation
2272 }
2273 if aisj.Status != nil {
2274 objectMap["status"] = aisj.Status
2275 }
2276 if aisj.StartTime != nil {
2277 objectMap["startTime"] = aisj.StartTime
2278 }
2279 if aisj.EndTime != nil {
2280 objectMap["endTime"] = aisj.EndTime
2281 }
2282 if aisj.ActivityID != nil {
2283 objectMap["activityId"] = aisj.ActivityID
2284 }
2285 if aisj.JobType != "" {
2286 objectMap["jobType"] = aisj.JobType
2287 }
2288 return json.Marshal(objectMap)
2289 }
2290
2291
2292 func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
2293 return &aisj, true
2294 }
2295
2296
2297 func (aisj AzureIaaSVMJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
2298 return nil, false
2299 }
2300
2301
2302 func (aisj AzureIaaSVMJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
2303 return nil, false
2304 }
2305
2306
2307 func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) {
2308 return nil, false
2309 }
2310
2311
2312 func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) {
2313 return nil, false
2314 }
2315
2316
2317 func (aisj AzureIaaSVMJob) AsVaultJob() (*VaultJob, bool) {
2318 return nil, false
2319 }
2320
2321
2322 func (aisj AzureIaaSVMJob) AsJob() (*Job, bool) {
2323 return nil, false
2324 }
2325
2326
2327 func (aisj AzureIaaSVMJob) AsBasicJob() (BasicJob, bool) {
2328 return &aisj, true
2329 }
2330
2331
2332 type AzureIaaSVMJobExtendedInfo struct {
2333
2334 TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"`
2335
2336 PropertyBag map[string]*string `json:"propertyBag"`
2337
2338 InternalPropertyBag map[string]*string `json:"internalPropertyBag"`
2339
2340 ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2341
2342 EstimatedRemainingDuration *string `json:"estimatedRemainingDuration,omitempty"`
2343
2344 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
2345 }
2346
2347
2348 func (aisjei AzureIaaSVMJobExtendedInfo) MarshalJSON() ([]byte, error) {
2349 objectMap := make(map[string]interface{})
2350 if aisjei.TasksList != nil {
2351 objectMap["tasksList"] = aisjei.TasksList
2352 }
2353 if aisjei.PropertyBag != nil {
2354 objectMap["propertyBag"] = aisjei.PropertyBag
2355 }
2356 if aisjei.InternalPropertyBag != nil {
2357 objectMap["internalPropertyBag"] = aisjei.InternalPropertyBag
2358 }
2359 if aisjei.ProgressPercentage != nil {
2360 objectMap["progressPercentage"] = aisjei.ProgressPercentage
2361 }
2362 if aisjei.EstimatedRemainingDuration != nil {
2363 objectMap["estimatedRemainingDuration"] = aisjei.EstimatedRemainingDuration
2364 }
2365 if aisjei.DynamicErrorMessage != nil {
2366 objectMap["dynamicErrorMessage"] = aisjei.DynamicErrorMessage
2367 }
2368 return json.Marshal(objectMap)
2369 }
2370
2371
2372 type AzureIaaSVMJobTaskDetails struct {
2373
2374 TaskID *string `json:"taskId,omitempty"`
2375
2376 StartTime *date.Time `json:"startTime,omitempty"`
2377
2378 EndTime *date.Time `json:"endTime,omitempty"`
2379
2380 InstanceID *string `json:"instanceId,omitempty"`
2381
2382 Duration *string `json:"duration,omitempty"`
2383
2384 Status *string `json:"status,omitempty"`
2385
2386 ProgressPercentage *float64 `json:"progressPercentage,omitempty"`
2387
2388
2389 TaskExecutionDetails *string `json:"taskExecutionDetails,omitempty"`
2390 }
2391
2392
2393 type BasicAzureIaaSVMProtectedItem interface {
2394 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
2395 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
2396 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
2397 }
2398
2399
2400 type AzureIaaSVMProtectedItem struct {
2401
2402 FriendlyName *string `json:"friendlyName,omitempty"`
2403
2404 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
2405
2406 ProtectionStatus *string `json:"protectionStatus,omitempty"`
2407
2408 ProtectionState ProtectionState `json:"protectionState,omitempty"`
2409
2410 HealthStatus HealthStatus `json:"healthStatus,omitempty"`
2411
2412 HealthDetails *[]AzureIaaSVMHealthDetails `json:"healthDetails,omitempty"`
2413
2414 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
2415
2416 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
2417
2418 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
2419
2420 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
2421
2422 ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
2423 ExtendedProperties *ExtendedProperties `json:"extendedProperties,omitempty"`
2424
2425 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2426
2427 WorkloadType DataSourceType `json:"workloadType,omitempty"`
2428
2429 ContainerName *string `json:"containerName,omitempty"`
2430
2431 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2432
2433 PolicyID *string `json:"policyId,omitempty"`
2434
2435 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
2436
2437 BackupSetName *string `json:"backupSetName,omitempty"`
2438
2439 CreateMode CreateMode `json:"createMode,omitempty"`
2440
2441 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
2442
2443 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
2444
2445 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
2446
2447 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
2448
2449 IsRehydrate *bool `json:"isRehydrate,omitempty"`
2450
2451 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
2452
2453 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
2454 }
2455
2456 func unmarshalBasicAzureIaaSVMProtectedItem(body []byte) (BasicAzureIaaSVMProtectedItem, error) {
2457 var m map[string]interface{}
2458 err := json.Unmarshal(body, &m)
2459 if err != nil {
2460 return nil, err
2461 }
2462
2463 switch m["protectedItemType"] {
2464 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
2465 var aisccvpi AzureIaaSClassicComputeVMProtectedItem
2466 err := json.Unmarshal(body, &aisccvpi)
2467 return aisccvpi, err
2468 case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
2469 var aiscvpi AzureIaaSComputeVMProtectedItem
2470 err := json.Unmarshal(body, &aiscvpi)
2471 return aiscvpi, err
2472 default:
2473 var aispi AzureIaaSVMProtectedItem
2474 err := json.Unmarshal(body, &aispi)
2475 return aispi, err
2476 }
2477 }
2478 func unmarshalBasicAzureIaaSVMProtectedItemArray(body []byte) ([]BasicAzureIaaSVMProtectedItem, error) {
2479 var rawMessages []*json.RawMessage
2480 err := json.Unmarshal(body, &rawMessages)
2481 if err != nil {
2482 return nil, err
2483 }
2484
2485 aispiArray := make([]BasicAzureIaaSVMProtectedItem, len(rawMessages))
2486
2487 for index, rawMessage := range rawMessages {
2488 aispi, err := unmarshalBasicAzureIaaSVMProtectedItem(*rawMessage)
2489 if err != nil {
2490 return nil, err
2491 }
2492 aispiArray[index] = aispi
2493 }
2494 return aispiArray, nil
2495 }
2496
2497
2498 func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) {
2499 aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem
2500 objectMap := make(map[string]interface{})
2501 if aispi.FriendlyName != nil {
2502 objectMap["friendlyName"] = aispi.FriendlyName
2503 }
2504 if aispi.VirtualMachineID != nil {
2505 objectMap["virtualMachineId"] = aispi.VirtualMachineID
2506 }
2507 if aispi.ProtectionStatus != nil {
2508 objectMap["protectionStatus"] = aispi.ProtectionStatus
2509 }
2510 if aispi.ProtectionState != "" {
2511 objectMap["protectionState"] = aispi.ProtectionState
2512 }
2513 if aispi.HealthStatus != "" {
2514 objectMap["healthStatus"] = aispi.HealthStatus
2515 }
2516 if aispi.HealthDetails != nil {
2517 objectMap["healthDetails"] = aispi.HealthDetails
2518 }
2519 if aispi.KpisHealths != nil {
2520 objectMap["kpisHealths"] = aispi.KpisHealths
2521 }
2522 if aispi.LastBackupStatus != nil {
2523 objectMap["lastBackupStatus"] = aispi.LastBackupStatus
2524 }
2525 if aispi.LastBackupTime != nil {
2526 objectMap["lastBackupTime"] = aispi.LastBackupTime
2527 }
2528 if aispi.ProtectedItemDataID != nil {
2529 objectMap["protectedItemDataId"] = aispi.ProtectedItemDataID
2530 }
2531 if aispi.ExtendedInfo != nil {
2532 objectMap["extendedInfo"] = aispi.ExtendedInfo
2533 }
2534 if aispi.ExtendedProperties != nil {
2535 objectMap["extendedProperties"] = aispi.ExtendedProperties
2536 }
2537 if aispi.BackupManagementType != "" {
2538 objectMap["backupManagementType"] = aispi.BackupManagementType
2539 }
2540 if aispi.WorkloadType != "" {
2541 objectMap["workloadType"] = aispi.WorkloadType
2542 }
2543 if aispi.ContainerName != nil {
2544 objectMap["containerName"] = aispi.ContainerName
2545 }
2546 if aispi.SourceResourceID != nil {
2547 objectMap["sourceResourceId"] = aispi.SourceResourceID
2548 }
2549 if aispi.PolicyID != nil {
2550 objectMap["policyId"] = aispi.PolicyID
2551 }
2552 if aispi.LastRecoveryPoint != nil {
2553 objectMap["lastRecoveryPoint"] = aispi.LastRecoveryPoint
2554 }
2555 if aispi.BackupSetName != nil {
2556 objectMap["backupSetName"] = aispi.BackupSetName
2557 }
2558 if aispi.CreateMode != "" {
2559 objectMap["createMode"] = aispi.CreateMode
2560 }
2561 if aispi.DeferredDeleteTimeInUTC != nil {
2562 objectMap["deferredDeleteTimeInUTC"] = aispi.DeferredDeleteTimeInUTC
2563 }
2564 if aispi.IsScheduledForDeferredDelete != nil {
2565 objectMap["isScheduledForDeferredDelete"] = aispi.IsScheduledForDeferredDelete
2566 }
2567 if aispi.DeferredDeleteTimeRemaining != nil {
2568 objectMap["deferredDeleteTimeRemaining"] = aispi.DeferredDeleteTimeRemaining
2569 }
2570 if aispi.IsDeferredDeleteScheduleUpcoming != nil {
2571 objectMap["isDeferredDeleteScheduleUpcoming"] = aispi.IsDeferredDeleteScheduleUpcoming
2572 }
2573 if aispi.IsRehydrate != nil {
2574 objectMap["isRehydrate"] = aispi.IsRehydrate
2575 }
2576 if aispi.ResourceGuardOperationRequests != nil {
2577 objectMap["resourceGuardOperationRequests"] = aispi.ResourceGuardOperationRequests
2578 }
2579 if aispi.ProtectedItemType != "" {
2580 objectMap["protectedItemType"] = aispi.ProtectedItemType
2581 }
2582 return json.Marshal(objectMap)
2583 }
2584
2585
2586 func (aispi AzureIaaSVMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
2587 return nil, false
2588 }
2589
2590
2591 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
2592 return nil, false
2593 }
2594
2595
2596 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
2597 return nil, false
2598 }
2599
2600
2601 func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
2602 return &aispi, true
2603 }
2604
2605
2606 func (aispi AzureIaaSVMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
2607 return &aispi, true
2608 }
2609
2610
2611 func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
2612 return nil, false
2613 }
2614
2615
2616 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
2617 return nil, false
2618 }
2619
2620
2621 func (aispi AzureIaaSVMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
2622 return nil, false
2623 }
2624
2625
2626 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
2627 return nil, false
2628 }
2629
2630
2631 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
2632 return nil, false
2633 }
2634
2635
2636 func (aispi AzureIaaSVMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
2637 return nil, false
2638 }
2639
2640
2641 func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
2642 return nil, false
2643 }
2644
2645
2646 func (aispi AzureIaaSVMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
2647 return nil, false
2648 }
2649
2650
2651 func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
2652 return nil, false
2653 }
2654
2655
2656 func (aispi AzureIaaSVMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
2657 return nil, false
2658 }
2659
2660
2661 func (aispi AzureIaaSVMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
2662 return &aispi, true
2663 }
2664
2665
2666 type AzureIaaSVMProtectedItemExtendedInfo struct {
2667
2668 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
2669
2670 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
2671
2672 PolicyInconsistent *bool `json:"policyInconsistent,omitempty"`
2673 }
2674
2675
2676 type AzureIaaSVMProtectionPolicy struct {
2677 InstantRPDetails *InstantRPAdditionalDetails `json:"instantRPDetails,omitempty"`
2678
2679 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
2680
2681 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
2682
2683 InstantRpRetentionRangeInDays *int32 `json:"instantRpRetentionRangeInDays,omitempty"`
2684
2685 TimeZone *string `json:"timeZone,omitempty"`
2686
2687 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
2688
2689 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
2690
2691 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
2692 }
2693
2694
2695 func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) {
2696 aispp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM
2697 objectMap := make(map[string]interface{})
2698 if aispp.InstantRPDetails != nil {
2699 objectMap["instantRPDetails"] = aispp.InstantRPDetails
2700 }
2701 objectMap["schedulePolicy"] = aispp.SchedulePolicy
2702 objectMap["retentionPolicy"] = aispp.RetentionPolicy
2703 if aispp.InstantRpRetentionRangeInDays != nil {
2704 objectMap["instantRpRetentionRangeInDays"] = aispp.InstantRpRetentionRangeInDays
2705 }
2706 if aispp.TimeZone != nil {
2707 objectMap["timeZone"] = aispp.TimeZone
2708 }
2709 if aispp.ProtectedItemsCount != nil {
2710 objectMap["protectedItemsCount"] = aispp.ProtectedItemsCount
2711 }
2712 if aispp.ResourceGuardOperationRequests != nil {
2713 objectMap["resourceGuardOperationRequests"] = aispp.ResourceGuardOperationRequests
2714 }
2715 if aispp.BackupManagementType != "" {
2716 objectMap["backupManagementType"] = aispp.BackupManagementType
2717 }
2718 return json.Marshal(objectMap)
2719 }
2720
2721
2722 func (aispp AzureIaaSVMProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
2723 return nil, false
2724 }
2725
2726
2727 func (aispp AzureIaaSVMProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
2728 return nil, false
2729 }
2730
2731
2732 func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
2733 return &aispp, true
2734 }
2735
2736
2737 func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
2738 return nil, false
2739 }
2740
2741
2742 func (aispp AzureIaaSVMProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
2743 return nil, false
2744 }
2745
2746
2747 func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
2748 return nil, false
2749 }
2750
2751
2752 func (aispp AzureIaaSVMProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
2753 return nil, false
2754 }
2755
2756
2757 func (aispp AzureIaaSVMProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
2758 return &aispp, true
2759 }
2760
2761
2762 func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error {
2763 var m map[string]*json.RawMessage
2764 err := json.Unmarshal(body, &m)
2765 if err != nil {
2766 return err
2767 }
2768 for k, v := range m {
2769 switch k {
2770 case "instantRPDetails":
2771 if v != nil {
2772 var instantRPDetails InstantRPAdditionalDetails
2773 err = json.Unmarshal(*v, &instantRPDetails)
2774 if err != nil {
2775 return err
2776 }
2777 aispp.InstantRPDetails = &instantRPDetails
2778 }
2779 case "schedulePolicy":
2780 if v != nil {
2781 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
2782 if err != nil {
2783 return err
2784 }
2785 aispp.SchedulePolicy = schedulePolicy
2786 }
2787 case "retentionPolicy":
2788 if v != nil {
2789 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
2790 if err != nil {
2791 return err
2792 }
2793 aispp.RetentionPolicy = retentionPolicy
2794 }
2795 case "instantRpRetentionRangeInDays":
2796 if v != nil {
2797 var instantRpRetentionRangeInDays int32
2798 err = json.Unmarshal(*v, &instantRpRetentionRangeInDays)
2799 if err != nil {
2800 return err
2801 }
2802 aispp.InstantRpRetentionRangeInDays = &instantRpRetentionRangeInDays
2803 }
2804 case "timeZone":
2805 if v != nil {
2806 var timeZone string
2807 err = json.Unmarshal(*v, &timeZone)
2808 if err != nil {
2809 return err
2810 }
2811 aispp.TimeZone = &timeZone
2812 }
2813 case "protectedItemsCount":
2814 if v != nil {
2815 var protectedItemsCount int32
2816 err = json.Unmarshal(*v, &protectedItemsCount)
2817 if err != nil {
2818 return err
2819 }
2820 aispp.ProtectedItemsCount = &protectedItemsCount
2821 }
2822 case "resourceGuardOperationRequests":
2823 if v != nil {
2824 var resourceGuardOperationRequests []string
2825 err = json.Unmarshal(*v, &resourceGuardOperationRequests)
2826 if err != nil {
2827 return err
2828 }
2829 aispp.ResourceGuardOperationRequests = &resourceGuardOperationRequests
2830 }
2831 case "backupManagementType":
2832 if v != nil {
2833 var backupManagementType ManagementTypeBasicProtectionPolicy
2834 err = json.Unmarshal(*v, &backupManagementType)
2835 if err != nil {
2836 return err
2837 }
2838 aispp.BackupManagementType = backupManagementType
2839 }
2840 }
2841 }
2842
2843 return nil
2844 }
2845
2846
2847 type BasicAzureRecoveryServiceVaultProtectionIntent interface {
2848 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
2849 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
2850 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
2851 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
2852 }
2853
2854
2855 type AzureRecoveryServiceVaultProtectionIntent struct {
2856
2857 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2858
2859 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2860
2861 ItemID *string `json:"itemId,omitempty"`
2862
2863 PolicyID *string `json:"policyId,omitempty"`
2864
2865 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
2866
2867 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
2868 }
2869
2870 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(body []byte) (BasicAzureRecoveryServiceVaultProtectionIntent, error) {
2871 var m map[string]interface{}
2872 err := json.Unmarshal(body, &m)
2873 if err != nil {
2874 return nil, err
2875 }
2876
2877 switch m["protectionIntentItemType"] {
2878 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
2879 var awapi AzureWorkloadAutoProtectionIntent
2880 err := json.Unmarshal(body, &awapi)
2881 return awapi, err
2882 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
2883 var awsapi AzureWorkloadSQLAutoProtectionIntent
2884 err := json.Unmarshal(body, &awsapi)
2885 return awsapi, err
2886 default:
2887 var arsvpi AzureRecoveryServiceVaultProtectionIntent
2888 err := json.Unmarshal(body, &arsvpi)
2889 return arsvpi, err
2890 }
2891 }
2892 func unmarshalBasicAzureRecoveryServiceVaultProtectionIntentArray(body []byte) ([]BasicAzureRecoveryServiceVaultProtectionIntent, error) {
2893 var rawMessages []*json.RawMessage
2894 err := json.Unmarshal(body, &rawMessages)
2895 if err != nil {
2896 return nil, err
2897 }
2898
2899 arsvpiArray := make([]BasicAzureRecoveryServiceVaultProtectionIntent, len(rawMessages))
2900
2901 for index, rawMessage := range rawMessages {
2902 arsvpi, err := unmarshalBasicAzureRecoveryServiceVaultProtectionIntent(*rawMessage)
2903 if err != nil {
2904 return nil, err
2905 }
2906 arsvpiArray[index] = arsvpi
2907 }
2908 return arsvpiArray, nil
2909 }
2910
2911
2912 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) MarshalJSON() ([]byte, error) {
2913 arsvpi.ProtectionIntentItemType = ProtectionIntentItemTypeRecoveryServiceVaultItem
2914 objectMap := make(map[string]interface{})
2915 if arsvpi.BackupManagementType != "" {
2916 objectMap["backupManagementType"] = arsvpi.BackupManagementType
2917 }
2918 if arsvpi.SourceResourceID != nil {
2919 objectMap["sourceResourceId"] = arsvpi.SourceResourceID
2920 }
2921 if arsvpi.ItemID != nil {
2922 objectMap["itemId"] = arsvpi.ItemID
2923 }
2924 if arsvpi.PolicyID != nil {
2925 objectMap["policyId"] = arsvpi.PolicyID
2926 }
2927 if arsvpi.ProtectionState != "" {
2928 objectMap["protectionState"] = arsvpi.ProtectionState
2929 }
2930 if arsvpi.ProtectionIntentItemType != "" {
2931 objectMap["protectionIntentItemType"] = arsvpi.ProtectionIntentItemType
2932 }
2933 return json.Marshal(objectMap)
2934 }
2935
2936
2937 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
2938 return &arsvpi, true
2939 }
2940
2941
2942 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
2943 return &arsvpi, true
2944 }
2945
2946
2947 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
2948 return nil, false
2949 }
2950
2951
2952 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
2953 return nil, false
2954 }
2955
2956
2957 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
2958 return nil, false
2959 }
2960
2961
2962 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
2963 return nil, false
2964 }
2965
2966
2967 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
2968 return nil, false
2969 }
2970
2971
2972 func (arsvpi AzureRecoveryServiceVaultProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
2973 return &arsvpi, true
2974 }
2975
2976
2977 type AzureResourceProtectionIntent struct {
2978
2979 FriendlyName *string `json:"friendlyName,omitempty"`
2980
2981 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
2982
2983 SourceResourceID *string `json:"sourceResourceId,omitempty"`
2984
2985 ItemID *string `json:"itemId,omitempty"`
2986
2987 PolicyID *string `json:"policyId,omitempty"`
2988
2989 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
2990
2991 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
2992 }
2993
2994
2995 func (arpi AzureResourceProtectionIntent) MarshalJSON() ([]byte, error) {
2996 arpi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureResourceItem
2997 objectMap := make(map[string]interface{})
2998 if arpi.FriendlyName != nil {
2999 objectMap["friendlyName"] = arpi.FriendlyName
3000 }
3001 if arpi.BackupManagementType != "" {
3002 objectMap["backupManagementType"] = arpi.BackupManagementType
3003 }
3004 if arpi.SourceResourceID != nil {
3005 objectMap["sourceResourceId"] = arpi.SourceResourceID
3006 }
3007 if arpi.ItemID != nil {
3008 objectMap["itemId"] = arpi.ItemID
3009 }
3010 if arpi.PolicyID != nil {
3011 objectMap["policyId"] = arpi.PolicyID
3012 }
3013 if arpi.ProtectionState != "" {
3014 objectMap["protectionState"] = arpi.ProtectionState
3015 }
3016 if arpi.ProtectionIntentItemType != "" {
3017 objectMap["protectionIntentItemType"] = arpi.ProtectionIntentItemType
3018 }
3019 return json.Marshal(objectMap)
3020 }
3021
3022
3023 func (arpi AzureResourceProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
3024 return nil, false
3025 }
3026
3027
3028 func (arpi AzureResourceProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
3029 return nil, false
3030 }
3031
3032
3033 func (arpi AzureResourceProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
3034 return &arpi, true
3035 }
3036
3037
3038 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
3039 return nil, false
3040 }
3041
3042
3043 func (arpi AzureResourceProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
3044 return nil, false
3045 }
3046
3047
3048 func (arpi AzureResourceProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
3049 return nil, false
3050 }
3051
3052
3053 func (arpi AzureResourceProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
3054 return nil, false
3055 }
3056
3057
3058 func (arpi AzureResourceProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
3059 return &arpi, true
3060 }
3061
3062
3063 type AzureSQLAGWorkloadContainerProtectionContainer struct {
3064
3065 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3066
3067 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
3068
3069 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
3070
3071 WorkloadType WorkloadType `json:"workloadType,omitempty"`
3072
3073 OperationType OperationType `json:"operationType,omitempty"`
3074
3075 FriendlyName *string `json:"friendlyName,omitempty"`
3076
3077 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3078
3079 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3080
3081 HealthStatus *string `json:"healthStatus,omitempty"`
3082
3083 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3084 }
3085
3086
3087 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) MarshalJSON() ([]byte, error) {
3088 aswcpc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer
3089 objectMap := make(map[string]interface{})
3090 if aswcpc.SourceResourceID != nil {
3091 objectMap["sourceResourceId"] = aswcpc.SourceResourceID
3092 }
3093 if aswcpc.LastUpdatedTime != nil {
3094 objectMap["lastUpdatedTime"] = aswcpc.LastUpdatedTime
3095 }
3096 if aswcpc.ExtendedInfo != nil {
3097 objectMap["extendedInfo"] = aswcpc.ExtendedInfo
3098 }
3099 if aswcpc.WorkloadType != "" {
3100 objectMap["workloadType"] = aswcpc.WorkloadType
3101 }
3102 if aswcpc.OperationType != "" {
3103 objectMap["operationType"] = aswcpc.OperationType
3104 }
3105 if aswcpc.FriendlyName != nil {
3106 objectMap["friendlyName"] = aswcpc.FriendlyName
3107 }
3108 if aswcpc.BackupManagementType != "" {
3109 objectMap["backupManagementType"] = aswcpc.BackupManagementType
3110 }
3111 if aswcpc.RegistrationStatus != nil {
3112 objectMap["registrationStatus"] = aswcpc.RegistrationStatus
3113 }
3114 if aswcpc.HealthStatus != nil {
3115 objectMap["healthStatus"] = aswcpc.HealthStatus
3116 }
3117 if aswcpc.ContainerType != "" {
3118 objectMap["containerType"] = aswcpc.ContainerType
3119 }
3120 return json.Marshal(objectMap)
3121 }
3122
3123
3124 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3125 return nil, false
3126 }
3127
3128
3129 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3130 return nil, false
3131 }
3132
3133
3134 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3135 return nil, false
3136 }
3137
3138
3139 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3140 return &aswcpc, true
3141 }
3142
3143
3144 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3145 return nil, false
3146 }
3147
3148
3149 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3150 return nil, false
3151 }
3152
3153
3154 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3155 return nil, false
3156 }
3157
3158
3159 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3160 return nil, false
3161 }
3162
3163
3164 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3165 return &aswcpc, true
3166 }
3167
3168
3169 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
3170 return nil, false
3171 }
3172
3173
3174 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3175 return nil, false
3176 }
3177
3178
3179 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
3180 return nil, false
3181 }
3182
3183
3184 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3185 return nil, false
3186 }
3187
3188
3189 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3190 return nil, false
3191 }
3192
3193
3194 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
3195 return nil, false
3196 }
3197
3198
3199 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3200 return nil, false
3201 }
3202
3203
3204 func (aswcpc AzureSQLAGWorkloadContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3205 return &aswcpc, true
3206 }
3207
3208
3209 type AzureSQLContainer struct {
3210
3211 FriendlyName *string `json:"friendlyName,omitempty"`
3212
3213 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3214
3215 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3216
3217 HealthStatus *string `json:"healthStatus,omitempty"`
3218
3219 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3220 }
3221
3222
3223 func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) {
3224 asc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer
3225 objectMap := make(map[string]interface{})
3226 if asc.FriendlyName != nil {
3227 objectMap["friendlyName"] = asc.FriendlyName
3228 }
3229 if asc.BackupManagementType != "" {
3230 objectMap["backupManagementType"] = asc.BackupManagementType
3231 }
3232 if asc.RegistrationStatus != nil {
3233 objectMap["registrationStatus"] = asc.RegistrationStatus
3234 }
3235 if asc.HealthStatus != nil {
3236 objectMap["healthStatus"] = asc.HealthStatus
3237 }
3238 if asc.ContainerType != "" {
3239 objectMap["containerType"] = asc.ContainerType
3240 }
3241 return json.Marshal(objectMap)
3242 }
3243
3244
3245 func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3246 return nil, false
3247 }
3248
3249
3250 func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3251 return nil, false
3252 }
3253
3254
3255 func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3256 return nil, false
3257 }
3258
3259
3260 func (asc AzureSQLContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3261 return nil, false
3262 }
3263
3264
3265 func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3266 return &asc, true
3267 }
3268
3269
3270 func (asc AzureSQLContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3271 return nil, false
3272 }
3273
3274
3275 func (asc AzureSQLContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3276 return nil, false
3277 }
3278
3279
3280 func (asc AzureSQLContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3281 return nil, false
3282 }
3283
3284
3285 func (asc AzureSQLContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3286 return nil, false
3287 }
3288
3289
3290 func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) {
3291 return nil, false
3292 }
3293
3294
3295 func (asc AzureSQLContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3296 return nil, false
3297 }
3298
3299
3300 func (asc AzureSQLContainer) AsGenericContainer() (*GenericContainer, bool) {
3301 return nil, false
3302 }
3303
3304
3305 func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3306 return nil, false
3307 }
3308
3309
3310 func (asc AzureSQLContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3311 return nil, false
3312 }
3313
3314
3315 func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) {
3316 return nil, false
3317 }
3318
3319
3320 func (asc AzureSQLContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3321 return nil, false
3322 }
3323
3324
3325 func (asc AzureSQLContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3326 return &asc, true
3327 }
3328
3329
3330 type AzureSQLProtectedItem struct {
3331
3332 ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"`
3333
3334 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
3335
3336 ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
3337
3338 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3339
3340 WorkloadType DataSourceType `json:"workloadType,omitempty"`
3341
3342 ContainerName *string `json:"containerName,omitempty"`
3343
3344 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3345
3346 PolicyID *string `json:"policyId,omitempty"`
3347
3348 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
3349
3350 BackupSetName *string `json:"backupSetName,omitempty"`
3351
3352 CreateMode CreateMode `json:"createMode,omitempty"`
3353
3354 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
3355
3356 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
3357
3358 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
3359
3360 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
3361
3362 IsRehydrate *bool `json:"isRehydrate,omitempty"`
3363
3364 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
3365
3366 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
3367 }
3368
3369
3370 func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) {
3371 aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases
3372 objectMap := make(map[string]interface{})
3373 if aspi.ProtectedItemDataID != nil {
3374 objectMap["protectedItemDataId"] = aspi.ProtectedItemDataID
3375 }
3376 if aspi.ProtectionState != "" {
3377 objectMap["protectionState"] = aspi.ProtectionState
3378 }
3379 if aspi.ExtendedInfo != nil {
3380 objectMap["extendedInfo"] = aspi.ExtendedInfo
3381 }
3382 if aspi.BackupManagementType != "" {
3383 objectMap["backupManagementType"] = aspi.BackupManagementType
3384 }
3385 if aspi.WorkloadType != "" {
3386 objectMap["workloadType"] = aspi.WorkloadType
3387 }
3388 if aspi.ContainerName != nil {
3389 objectMap["containerName"] = aspi.ContainerName
3390 }
3391 if aspi.SourceResourceID != nil {
3392 objectMap["sourceResourceId"] = aspi.SourceResourceID
3393 }
3394 if aspi.PolicyID != nil {
3395 objectMap["policyId"] = aspi.PolicyID
3396 }
3397 if aspi.LastRecoveryPoint != nil {
3398 objectMap["lastRecoveryPoint"] = aspi.LastRecoveryPoint
3399 }
3400 if aspi.BackupSetName != nil {
3401 objectMap["backupSetName"] = aspi.BackupSetName
3402 }
3403 if aspi.CreateMode != "" {
3404 objectMap["createMode"] = aspi.CreateMode
3405 }
3406 if aspi.DeferredDeleteTimeInUTC != nil {
3407 objectMap["deferredDeleteTimeInUTC"] = aspi.DeferredDeleteTimeInUTC
3408 }
3409 if aspi.IsScheduledForDeferredDelete != nil {
3410 objectMap["isScheduledForDeferredDelete"] = aspi.IsScheduledForDeferredDelete
3411 }
3412 if aspi.DeferredDeleteTimeRemaining != nil {
3413 objectMap["deferredDeleteTimeRemaining"] = aspi.DeferredDeleteTimeRemaining
3414 }
3415 if aspi.IsDeferredDeleteScheduleUpcoming != nil {
3416 objectMap["isDeferredDeleteScheduleUpcoming"] = aspi.IsDeferredDeleteScheduleUpcoming
3417 }
3418 if aspi.IsRehydrate != nil {
3419 objectMap["isRehydrate"] = aspi.IsRehydrate
3420 }
3421 if aspi.ResourceGuardOperationRequests != nil {
3422 objectMap["resourceGuardOperationRequests"] = aspi.ResourceGuardOperationRequests
3423 }
3424 if aspi.ProtectedItemType != "" {
3425 objectMap["protectedItemType"] = aspi.ProtectedItemType
3426 }
3427 return json.Marshal(objectMap)
3428 }
3429
3430
3431 func (aspi AzureSQLProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
3432 return nil, false
3433 }
3434
3435
3436 func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
3437 return nil, false
3438 }
3439
3440
3441 func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
3442 return nil, false
3443 }
3444
3445
3446 func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
3447 return nil, false
3448 }
3449
3450
3451 func (aspi AzureSQLProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
3452 return nil, false
3453 }
3454
3455
3456 func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
3457 return &aspi, true
3458 }
3459
3460
3461 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
3462 return nil, false
3463 }
3464
3465
3466 func (aspi AzureSQLProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
3467 return nil, false
3468 }
3469
3470
3471 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
3472 return nil, false
3473 }
3474
3475
3476 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
3477 return nil, false
3478 }
3479
3480
3481 func (aspi AzureSQLProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
3482 return nil, false
3483 }
3484
3485
3486 func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
3487 return nil, false
3488 }
3489
3490
3491 func (aspi AzureSQLProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
3492 return nil, false
3493 }
3494
3495
3496 func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
3497 return nil, false
3498 }
3499
3500
3501 func (aspi AzureSQLProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
3502 return nil, false
3503 }
3504
3505
3506 func (aspi AzureSQLProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
3507 return &aspi, true
3508 }
3509
3510
3511 type AzureSQLProtectedItemExtendedInfo struct {
3512
3513 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
3514
3515 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
3516
3517 PolicyState *string `json:"policyState,omitempty"`
3518 }
3519
3520
3521 type AzureSQLProtectionPolicy struct {
3522
3523 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
3524
3525 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
3526
3527 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
3528
3529 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
3530 }
3531
3532
3533 func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) {
3534 aspp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL
3535 objectMap := make(map[string]interface{})
3536 objectMap["retentionPolicy"] = aspp.RetentionPolicy
3537 if aspp.ProtectedItemsCount != nil {
3538 objectMap["protectedItemsCount"] = aspp.ProtectedItemsCount
3539 }
3540 if aspp.ResourceGuardOperationRequests != nil {
3541 objectMap["resourceGuardOperationRequests"] = aspp.ResourceGuardOperationRequests
3542 }
3543 if aspp.BackupManagementType != "" {
3544 objectMap["backupManagementType"] = aspp.BackupManagementType
3545 }
3546 return json.Marshal(objectMap)
3547 }
3548
3549
3550 func (aspp AzureSQLProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
3551 return nil, false
3552 }
3553
3554
3555 func (aspp AzureSQLProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
3556 return nil, false
3557 }
3558
3559
3560 func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
3561 return nil, false
3562 }
3563
3564
3565 func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
3566 return &aspp, true
3567 }
3568
3569
3570 func (aspp AzureSQLProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
3571 return nil, false
3572 }
3573
3574
3575 func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
3576 return nil, false
3577 }
3578
3579
3580 func (aspp AzureSQLProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
3581 return nil, false
3582 }
3583
3584
3585 func (aspp AzureSQLProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
3586 return &aspp, true
3587 }
3588
3589
3590 func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error {
3591 var m map[string]*json.RawMessage
3592 err := json.Unmarshal(body, &m)
3593 if err != nil {
3594 return err
3595 }
3596 for k, v := range m {
3597 switch k {
3598 case "retentionPolicy":
3599 if v != nil {
3600 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
3601 if err != nil {
3602 return err
3603 }
3604 aspp.RetentionPolicy = retentionPolicy
3605 }
3606 case "protectedItemsCount":
3607 if v != nil {
3608 var protectedItemsCount int32
3609 err = json.Unmarshal(*v, &protectedItemsCount)
3610 if err != nil {
3611 return err
3612 }
3613 aspp.ProtectedItemsCount = &protectedItemsCount
3614 }
3615 case "resourceGuardOperationRequests":
3616 if v != nil {
3617 var resourceGuardOperationRequests []string
3618 err = json.Unmarshal(*v, &resourceGuardOperationRequests)
3619 if err != nil {
3620 return err
3621 }
3622 aspp.ResourceGuardOperationRequests = &resourceGuardOperationRequests
3623 }
3624 case "backupManagementType":
3625 if v != nil {
3626 var backupManagementType ManagementTypeBasicProtectionPolicy
3627 err = json.Unmarshal(*v, &backupManagementType)
3628 if err != nil {
3629 return err
3630 }
3631 aspp.BackupManagementType = backupManagementType
3632 }
3633 }
3634 }
3635
3636 return nil
3637 }
3638
3639
3640 type AzureStorageContainer struct {
3641
3642 SourceResourceID *string `json:"sourceResourceId,omitempty"`
3643
3644 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3645
3646 ResourceGroup *string `json:"resourceGroup,omitempty"`
3647
3648 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
3649
3650 FriendlyName *string `json:"friendlyName,omitempty"`
3651
3652 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3653
3654 RegistrationStatus *string `json:"registrationStatus,omitempty"`
3655
3656 HealthStatus *string `json:"healthStatus,omitempty"`
3657
3658 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
3659 }
3660
3661
3662 func (asc AzureStorageContainer) MarshalJSON() ([]byte, error) {
3663 asc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeStorageContainer
3664 objectMap := make(map[string]interface{})
3665 if asc.SourceResourceID != nil {
3666 objectMap["sourceResourceId"] = asc.SourceResourceID
3667 }
3668 if asc.StorageAccountVersion != nil {
3669 objectMap["storageAccountVersion"] = asc.StorageAccountVersion
3670 }
3671 if asc.ResourceGroup != nil {
3672 objectMap["resourceGroup"] = asc.ResourceGroup
3673 }
3674 if asc.ProtectedItemCount != nil {
3675 objectMap["protectedItemCount"] = asc.ProtectedItemCount
3676 }
3677 if asc.FriendlyName != nil {
3678 objectMap["friendlyName"] = asc.FriendlyName
3679 }
3680 if asc.BackupManagementType != "" {
3681 objectMap["backupManagementType"] = asc.BackupManagementType
3682 }
3683 if asc.RegistrationStatus != nil {
3684 objectMap["registrationStatus"] = asc.RegistrationStatus
3685 }
3686 if asc.HealthStatus != nil {
3687 objectMap["healthStatus"] = asc.HealthStatus
3688 }
3689 if asc.ContainerType != "" {
3690 objectMap["containerType"] = asc.ContainerType
3691 }
3692 return json.Marshal(objectMap)
3693 }
3694
3695
3696 func (asc AzureStorageContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
3697 return nil, false
3698 }
3699
3700
3701 func (asc AzureStorageContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
3702 return nil, false
3703 }
3704
3705
3706 func (asc AzureStorageContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
3707 return nil, false
3708 }
3709
3710
3711 func (asc AzureStorageContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
3712 return nil, false
3713 }
3714
3715
3716 func (asc AzureStorageContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
3717 return nil, false
3718 }
3719
3720
3721 func (asc AzureStorageContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
3722 return &asc, true
3723 }
3724
3725
3726 func (asc AzureStorageContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
3727 return nil, false
3728 }
3729
3730
3731 func (asc AzureStorageContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
3732 return nil, false
3733 }
3734
3735
3736 func (asc AzureStorageContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
3737 return nil, false
3738 }
3739
3740
3741 func (asc AzureStorageContainer) AsDpmContainer() (*DpmContainer, bool) {
3742 return nil, false
3743 }
3744
3745
3746 func (asc AzureStorageContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
3747 return nil, false
3748 }
3749
3750
3751 func (asc AzureStorageContainer) AsGenericContainer() (*GenericContainer, bool) {
3752 return nil, false
3753 }
3754
3755
3756 func (asc AzureStorageContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
3757 return nil, false
3758 }
3759
3760
3761 func (asc AzureStorageContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
3762 return nil, false
3763 }
3764
3765
3766 func (asc AzureStorageContainer) AsMabContainer() (*MabContainer, bool) {
3767 return nil, false
3768 }
3769
3770
3771 func (asc AzureStorageContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
3772 return nil, false
3773 }
3774
3775
3776 func (asc AzureStorageContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
3777 return &asc, true
3778 }
3779
3780
3781 type AzureStorageErrorInfo struct {
3782
3783 ErrorCode *int32 `json:"errorCode,omitempty"`
3784
3785 ErrorString *string `json:"errorString,omitempty"`
3786
3787 Recommendations *[]string `json:"recommendations,omitempty"`
3788 }
3789
3790
3791 type AzureStorageJob struct {
3792
3793 Duration *string `json:"duration,omitempty"`
3794
3795 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
3796
3797 ErrorDetails *[]AzureStorageErrorInfo `json:"errorDetails,omitempty"`
3798
3799 StorageAccountName *string `json:"storageAccountName,omitempty"`
3800
3801 StorageAccountVersion *string `json:"storageAccountVersion,omitempty"`
3802
3803 ExtendedInfo *AzureStorageJobExtendedInfo `json:"extendedInfo,omitempty"`
3804
3805 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
3806
3807 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3808
3809 Operation *string `json:"operation,omitempty"`
3810
3811 Status *string `json:"status,omitempty"`
3812
3813 StartTime *date.Time `json:"startTime,omitempty"`
3814
3815 EndTime *date.Time `json:"endTime,omitempty"`
3816
3817 ActivityID *string `json:"activityId,omitempty"`
3818
3819 JobType JobType `json:"jobType,omitempty"`
3820 }
3821
3822
3823 func (asj AzureStorageJob) MarshalJSON() ([]byte, error) {
3824 asj.JobType = JobTypeAzureStorageJob
3825 objectMap := make(map[string]interface{})
3826 if asj.Duration != nil {
3827 objectMap["duration"] = asj.Duration
3828 }
3829 if asj.ActionsInfo != nil {
3830 objectMap["actionsInfo"] = asj.ActionsInfo
3831 }
3832 if asj.ErrorDetails != nil {
3833 objectMap["errorDetails"] = asj.ErrorDetails
3834 }
3835 if asj.StorageAccountName != nil {
3836 objectMap["storageAccountName"] = asj.StorageAccountName
3837 }
3838 if asj.StorageAccountVersion != nil {
3839 objectMap["storageAccountVersion"] = asj.StorageAccountVersion
3840 }
3841 if asj.ExtendedInfo != nil {
3842 objectMap["extendedInfo"] = asj.ExtendedInfo
3843 }
3844 if asj.EntityFriendlyName != nil {
3845 objectMap["entityFriendlyName"] = asj.EntityFriendlyName
3846 }
3847 if asj.BackupManagementType != "" {
3848 objectMap["backupManagementType"] = asj.BackupManagementType
3849 }
3850 if asj.Operation != nil {
3851 objectMap["operation"] = asj.Operation
3852 }
3853 if asj.Status != nil {
3854 objectMap["status"] = asj.Status
3855 }
3856 if asj.StartTime != nil {
3857 objectMap["startTime"] = asj.StartTime
3858 }
3859 if asj.EndTime != nil {
3860 objectMap["endTime"] = asj.EndTime
3861 }
3862 if asj.ActivityID != nil {
3863 objectMap["activityId"] = asj.ActivityID
3864 }
3865 if asj.JobType != "" {
3866 objectMap["jobType"] = asj.JobType
3867 }
3868 return json.Marshal(objectMap)
3869 }
3870
3871
3872 func (asj AzureStorageJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
3873 return nil, false
3874 }
3875
3876
3877 func (asj AzureStorageJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
3878 return &asj, true
3879 }
3880
3881
3882 func (asj AzureStorageJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
3883 return nil, false
3884 }
3885
3886
3887 func (asj AzureStorageJob) AsDpmJob() (*DpmJob, bool) {
3888 return nil, false
3889 }
3890
3891
3892 func (asj AzureStorageJob) AsMabJob() (*MabJob, bool) {
3893 return nil, false
3894 }
3895
3896
3897 func (asj AzureStorageJob) AsVaultJob() (*VaultJob, bool) {
3898 return nil, false
3899 }
3900
3901
3902 func (asj AzureStorageJob) AsJob() (*Job, bool) {
3903 return nil, false
3904 }
3905
3906
3907 func (asj AzureStorageJob) AsBasicJob() (BasicJob, bool) {
3908 return &asj, true
3909 }
3910
3911
3912 type AzureStorageJobExtendedInfo struct {
3913
3914 TasksList *[]AzureStorageJobTaskDetails `json:"tasksList,omitempty"`
3915
3916 PropertyBag map[string]*string `json:"propertyBag"`
3917
3918 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
3919 }
3920
3921
3922 func (asjei AzureStorageJobExtendedInfo) MarshalJSON() ([]byte, error) {
3923 objectMap := make(map[string]interface{})
3924 if asjei.TasksList != nil {
3925 objectMap["tasksList"] = asjei.TasksList
3926 }
3927 if asjei.PropertyBag != nil {
3928 objectMap["propertyBag"] = asjei.PropertyBag
3929 }
3930 if asjei.DynamicErrorMessage != nil {
3931 objectMap["dynamicErrorMessage"] = asjei.DynamicErrorMessage
3932 }
3933 return json.Marshal(objectMap)
3934 }
3935
3936
3937 type AzureStorageJobTaskDetails struct {
3938
3939 TaskID *string `json:"taskId,omitempty"`
3940
3941 Status *string `json:"status,omitempty"`
3942 }
3943
3944
3945 type AzureStorageProtectableContainer struct {
3946
3947 FriendlyName *string `json:"friendlyName,omitempty"`
3948
3949 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
3950
3951 HealthStatus *string `json:"healthStatus,omitempty"`
3952
3953 ContainerID *string `json:"containerId,omitempty"`
3954
3955 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
3956 }
3957
3958
3959 func (aspc AzureStorageProtectableContainer) MarshalJSON() ([]byte, error) {
3960 aspc.ProtectableContainerType = ProtectableContainerTypeStorageContainer
3961 objectMap := make(map[string]interface{})
3962 if aspc.FriendlyName != nil {
3963 objectMap["friendlyName"] = aspc.FriendlyName
3964 }
3965 if aspc.BackupManagementType != "" {
3966 objectMap["backupManagementType"] = aspc.BackupManagementType
3967 }
3968 if aspc.HealthStatus != nil {
3969 objectMap["healthStatus"] = aspc.HealthStatus
3970 }
3971 if aspc.ContainerID != nil {
3972 objectMap["containerId"] = aspc.ContainerID
3973 }
3974 if aspc.ProtectableContainerType != "" {
3975 objectMap["protectableContainerType"] = aspc.ProtectableContainerType
3976 }
3977 return json.Marshal(objectMap)
3978 }
3979
3980
3981 func (aspc AzureStorageProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
3982 return &aspc, true
3983 }
3984
3985
3986 func (aspc AzureStorageProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
3987 return nil, false
3988 }
3989
3990
3991 func (aspc AzureStorageProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
3992 return nil, false
3993 }
3994
3995
3996 func (aspc AzureStorageProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
3997 return &aspc, true
3998 }
3999
4000
4001 type AzureVMAppContainerProtectableContainer struct {
4002
4003 FriendlyName *string `json:"friendlyName,omitempty"`
4004
4005 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4006
4007 HealthStatus *string `json:"healthStatus,omitempty"`
4008
4009 ContainerID *string `json:"containerId,omitempty"`
4010
4011 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
4012 }
4013
4014
4015 func (avacpc AzureVMAppContainerProtectableContainer) MarshalJSON() ([]byte, error) {
4016 avacpc.ProtectableContainerType = ProtectableContainerTypeVMAppContainer
4017 objectMap := make(map[string]interface{})
4018 if avacpc.FriendlyName != nil {
4019 objectMap["friendlyName"] = avacpc.FriendlyName
4020 }
4021 if avacpc.BackupManagementType != "" {
4022 objectMap["backupManagementType"] = avacpc.BackupManagementType
4023 }
4024 if avacpc.HealthStatus != nil {
4025 objectMap["healthStatus"] = avacpc.HealthStatus
4026 }
4027 if avacpc.ContainerID != nil {
4028 objectMap["containerId"] = avacpc.ContainerID
4029 }
4030 if avacpc.ProtectableContainerType != "" {
4031 objectMap["protectableContainerType"] = avacpc.ProtectableContainerType
4032 }
4033 return json.Marshal(objectMap)
4034 }
4035
4036
4037 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
4038 return nil, false
4039 }
4040
4041
4042 func (avacpc AzureVMAppContainerProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
4043 return &avacpc, true
4044 }
4045
4046
4047 func (avacpc AzureVMAppContainerProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
4048 return nil, false
4049 }
4050
4051
4052 func (avacpc AzureVMAppContainerProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
4053 return &avacpc, true
4054 }
4055
4056
4057 type AzureVMAppContainerProtectionContainer struct {
4058
4059 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4060
4061 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
4062
4063 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
4064
4065 WorkloadType WorkloadType `json:"workloadType,omitempty"`
4066
4067 OperationType OperationType `json:"operationType,omitempty"`
4068
4069 FriendlyName *string `json:"friendlyName,omitempty"`
4070
4071 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4072
4073 RegistrationStatus *string `json:"registrationStatus,omitempty"`
4074
4075 HealthStatus *string `json:"healthStatus,omitempty"`
4076
4077 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
4078 }
4079
4080
4081 func (avacpc AzureVMAppContainerProtectionContainer) MarshalJSON() ([]byte, error) {
4082 avacpc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer
4083 objectMap := make(map[string]interface{})
4084 if avacpc.SourceResourceID != nil {
4085 objectMap["sourceResourceId"] = avacpc.SourceResourceID
4086 }
4087 if avacpc.LastUpdatedTime != nil {
4088 objectMap["lastUpdatedTime"] = avacpc.LastUpdatedTime
4089 }
4090 if avacpc.ExtendedInfo != nil {
4091 objectMap["extendedInfo"] = avacpc.ExtendedInfo
4092 }
4093 if avacpc.WorkloadType != "" {
4094 objectMap["workloadType"] = avacpc.WorkloadType
4095 }
4096 if avacpc.OperationType != "" {
4097 objectMap["operationType"] = avacpc.OperationType
4098 }
4099 if avacpc.FriendlyName != nil {
4100 objectMap["friendlyName"] = avacpc.FriendlyName
4101 }
4102 if avacpc.BackupManagementType != "" {
4103 objectMap["backupManagementType"] = avacpc.BackupManagementType
4104 }
4105 if avacpc.RegistrationStatus != nil {
4106 objectMap["registrationStatus"] = avacpc.RegistrationStatus
4107 }
4108 if avacpc.HealthStatus != nil {
4109 objectMap["healthStatus"] = avacpc.HealthStatus
4110 }
4111 if avacpc.ContainerType != "" {
4112 objectMap["containerType"] = avacpc.ContainerType
4113 }
4114 return json.Marshal(objectMap)
4115 }
4116
4117
4118 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
4119 return nil, false
4120 }
4121
4122
4123 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
4124 return nil, false
4125 }
4126
4127
4128 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
4129 return nil, false
4130 }
4131
4132
4133 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
4134 return nil, false
4135 }
4136
4137
4138 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
4139 return nil, false
4140 }
4141
4142
4143 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
4144 return nil, false
4145 }
4146
4147
4148 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
4149 return &avacpc, true
4150 }
4151
4152
4153 func (avacpc AzureVMAppContainerProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
4154 return nil, false
4155 }
4156
4157
4158 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
4159 return &avacpc, true
4160 }
4161
4162
4163 func (avacpc AzureVMAppContainerProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
4164 return nil, false
4165 }
4166
4167
4168 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
4169 return nil, false
4170 }
4171
4172
4173 func (avacpc AzureVMAppContainerProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
4174 return nil, false
4175 }
4176
4177
4178 func (avacpc AzureVMAppContainerProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
4179 return nil, false
4180 }
4181
4182
4183 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
4184 return nil, false
4185 }
4186
4187
4188 func (avacpc AzureVMAppContainerProtectionContainer) AsMabContainer() (*MabContainer, bool) {
4189 return nil, false
4190 }
4191
4192
4193 func (avacpc AzureVMAppContainerProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
4194 return nil, false
4195 }
4196
4197
4198 func (avacpc AzureVMAppContainerProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
4199 return &avacpc, true
4200 }
4201
4202
4203 type AzureVMResourceFeatureSupportRequest struct {
4204
4205 VMSize *string `json:"vmSize,omitempty"`
4206
4207 VMSku *string `json:"vmSku,omitempty"`
4208
4209 FeatureType FeatureType `json:"featureType,omitempty"`
4210 }
4211
4212
4213 func (avrfsr AzureVMResourceFeatureSupportRequest) MarshalJSON() ([]byte, error) {
4214 avrfsr.FeatureType = FeatureTypeAzureVMResourceBackup
4215 objectMap := make(map[string]interface{})
4216 if avrfsr.VMSize != nil {
4217 objectMap["vmSize"] = avrfsr.VMSize
4218 }
4219 if avrfsr.VMSku != nil {
4220 objectMap["vmSku"] = avrfsr.VMSku
4221 }
4222 if avrfsr.FeatureType != "" {
4223 objectMap["featureType"] = avrfsr.FeatureType
4224 }
4225 return json.Marshal(objectMap)
4226 }
4227
4228
4229 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
4230 return nil, false
4231 }
4232
4233
4234 func (avrfsr AzureVMResourceFeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
4235 return &avrfsr, true
4236 }
4237
4238
4239 func (avrfsr AzureVMResourceFeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
4240 return nil, false
4241 }
4242
4243
4244 func (avrfsr AzureVMResourceFeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
4245 return &avrfsr, true
4246 }
4247
4248
4249 type AzureVMResourceFeatureSupportResponse struct {
4250 autorest.Response `json:"-"`
4251
4252 SupportStatus SupportStatus `json:"supportStatus,omitempty"`
4253 }
4254
4255
4256 type BasicAzureVMWorkloadItem interface {
4257 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
4258 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
4259 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
4260 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
4261 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
4262 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
4263 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
4264 }
4265
4266
4267 type AzureVMWorkloadItem struct {
4268
4269 ParentName *string `json:"parentName,omitempty"`
4270
4271 ServerName *string `json:"serverName,omitempty"`
4272
4273 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4274
4275 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4276
4277 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
4278
4279 BackupManagementType *string `json:"backupManagementType,omitempty"`
4280
4281 WorkloadType *string `json:"workloadType,omitempty"`
4282
4283 FriendlyName *string `json:"friendlyName,omitempty"`
4284
4285 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4286
4287 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
4288 }
4289
4290 func unmarshalBasicAzureVMWorkloadItem(body []byte) (BasicAzureVMWorkloadItem, error) {
4291 var m map[string]interface{}
4292 err := json.Unmarshal(body, &m)
4293 if err != nil {
4294 return nil, err
4295 }
4296
4297 switch m["workloadItemType"] {
4298 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase):
4299 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
4300 err := json.Unmarshal(body, &avwsadwi)
4301 return avwsadwi, err
4302 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem):
4303 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
4304 err := json.Unmarshal(body, &avwsaswi)
4305 return avwsaswi, err
4306 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase):
4307 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
4308 err := json.Unmarshal(body, &avwshdwi)
4309 return avwshdwi, err
4310 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem):
4311 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
4312 err := json.Unmarshal(body, &avwshswi)
4313 return avwshswi, err
4314 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase):
4315 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
4316 err := json.Unmarshal(body, &avwsdwi)
4317 return avwsdwi, err
4318 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance):
4319 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
4320 err := json.Unmarshal(body, &avwsiwi)
4321 return avwsiwi, err
4322 default:
4323 var avwi AzureVMWorkloadItem
4324 err := json.Unmarshal(body, &avwi)
4325 return avwi, err
4326 }
4327 }
4328 func unmarshalBasicAzureVMWorkloadItemArray(body []byte) ([]BasicAzureVMWorkloadItem, error) {
4329 var rawMessages []*json.RawMessage
4330 err := json.Unmarshal(body, &rawMessages)
4331 if err != nil {
4332 return nil, err
4333 }
4334
4335 avwiArray := make([]BasicAzureVMWorkloadItem, len(rawMessages))
4336
4337 for index, rawMessage := range rawMessages {
4338 avwi, err := unmarshalBasicAzureVMWorkloadItem(*rawMessage)
4339 if err != nil {
4340 return nil, err
4341 }
4342 avwiArray[index] = avwi
4343 }
4344 return avwiArray, nil
4345 }
4346
4347
4348 func (avwi AzureVMWorkloadItem) MarshalJSON() ([]byte, error) {
4349 avwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem
4350 objectMap := make(map[string]interface{})
4351 if avwi.ParentName != nil {
4352 objectMap["parentName"] = avwi.ParentName
4353 }
4354 if avwi.ServerName != nil {
4355 objectMap["serverName"] = avwi.ServerName
4356 }
4357 if avwi.IsAutoProtectable != nil {
4358 objectMap["isAutoProtectable"] = avwi.IsAutoProtectable
4359 }
4360 if avwi.Subinquireditemcount != nil {
4361 objectMap["subinquireditemcount"] = avwi.Subinquireditemcount
4362 }
4363 if avwi.SubWorkloadItemCount != nil {
4364 objectMap["subWorkloadItemCount"] = avwi.SubWorkloadItemCount
4365 }
4366 if avwi.BackupManagementType != nil {
4367 objectMap["backupManagementType"] = avwi.BackupManagementType
4368 }
4369 if avwi.WorkloadType != nil {
4370 objectMap["workloadType"] = avwi.WorkloadType
4371 }
4372 if avwi.FriendlyName != nil {
4373 objectMap["friendlyName"] = avwi.FriendlyName
4374 }
4375 if avwi.ProtectionState != "" {
4376 objectMap["protectionState"] = avwi.ProtectionState
4377 }
4378 if avwi.WorkloadItemType != "" {
4379 objectMap["workloadItemType"] = avwi.WorkloadItemType
4380 }
4381 return json.Marshal(objectMap)
4382 }
4383
4384
4385 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
4386 return &avwi, true
4387 }
4388
4389
4390 func (avwi AzureVMWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
4391 return &avwi, true
4392 }
4393
4394
4395 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
4396 return nil, false
4397 }
4398
4399
4400 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
4401 return nil, false
4402 }
4403
4404
4405 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
4406 return nil, false
4407 }
4408
4409
4410 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
4411 return nil, false
4412 }
4413
4414
4415 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
4416 return nil, false
4417 }
4418
4419
4420 func (avwi AzureVMWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
4421 return nil, false
4422 }
4423
4424
4425 func (avwi AzureVMWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
4426 return nil, false
4427 }
4428
4429
4430 func (avwi AzureVMWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
4431 return &avwi, true
4432 }
4433
4434
4435 type BasicAzureVMWorkloadProtectableItem interface {
4436 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
4437 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
4438 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
4439 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
4440 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
4441 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
4442 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
4443 }
4444
4445
4446 type AzureVMWorkloadProtectableItem struct {
4447
4448 ParentName *string `json:"parentName,omitempty"`
4449
4450
4451 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
4452
4453 ServerName *string `json:"serverName,omitempty"`
4454
4455 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
4456
4457 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
4458
4459 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
4460
4461 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
4462
4463 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
4464
4465 BackupManagementType *string `json:"backupManagementType,omitempty"`
4466
4467 WorkloadType *string `json:"workloadType,omitempty"`
4468
4469 FriendlyName *string `json:"friendlyName,omitempty"`
4470
4471 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
4472
4473 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
4474 }
4475
4476 func unmarshalBasicAzureVMWorkloadProtectableItem(body []byte) (BasicAzureVMWorkloadProtectableItem, error) {
4477 var m map[string]interface{}
4478 err := json.Unmarshal(body, &m)
4479 if err != nil {
4480 return nil, err
4481 }
4482
4483 switch m["protectableItemType"] {
4484 case string(ProtectableItemTypeSAPAseSystem):
4485 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
4486 err := json.Unmarshal(body, &avwsaspi)
4487 return avwsaspi, err
4488 case string(ProtectableItemTypeSAPHanaDatabase):
4489 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
4490 err := json.Unmarshal(body, &avwshdpi)
4491 return avwshdpi, err
4492 case string(ProtectableItemTypeSAPHanaSystem):
4493 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
4494 err := json.Unmarshal(body, &avwshspi)
4495 return avwshspi, err
4496 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
4497 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
4498 err := json.Unmarshal(body, &avwsagpi)
4499 return avwsagpi, err
4500 case string(ProtectableItemTypeSQLDataBase):
4501 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
4502 err := json.Unmarshal(body, &avwsdpi)
4503 return avwsdpi, err
4504 case string(ProtectableItemTypeSQLInstance):
4505 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
4506 err := json.Unmarshal(body, &avwsipi)
4507 return avwsipi, err
4508 default:
4509 var avwpi AzureVMWorkloadProtectableItem
4510 err := json.Unmarshal(body, &avwpi)
4511 return avwpi, err
4512 }
4513 }
4514 func unmarshalBasicAzureVMWorkloadProtectableItemArray(body []byte) ([]BasicAzureVMWorkloadProtectableItem, error) {
4515 var rawMessages []*json.RawMessage
4516 err := json.Unmarshal(body, &rawMessages)
4517 if err != nil {
4518 return nil, err
4519 }
4520
4521 avwpiArray := make([]BasicAzureVMWorkloadProtectableItem, len(rawMessages))
4522
4523 for index, rawMessage := range rawMessages {
4524 avwpi, err := unmarshalBasicAzureVMWorkloadProtectableItem(*rawMessage)
4525 if err != nil {
4526 return nil, err
4527 }
4528 avwpiArray[index] = avwpi
4529 }
4530 return avwpiArray, nil
4531 }
4532
4533
4534 func (avwpi AzureVMWorkloadProtectableItem) MarshalJSON() ([]byte, error) {
4535 avwpi.ProtectableItemType = ProtectableItemTypeAzureVMWorkloadProtectableItem
4536 objectMap := make(map[string]interface{})
4537 if avwpi.ParentName != nil {
4538 objectMap["parentName"] = avwpi.ParentName
4539 }
4540 if avwpi.ParentUniqueName != nil {
4541 objectMap["parentUniqueName"] = avwpi.ParentUniqueName
4542 }
4543 if avwpi.ServerName != nil {
4544 objectMap["serverName"] = avwpi.ServerName
4545 }
4546 if avwpi.IsAutoProtectable != nil {
4547 objectMap["isAutoProtectable"] = avwpi.IsAutoProtectable
4548 }
4549 if avwpi.IsAutoProtected != nil {
4550 objectMap["isAutoProtected"] = avwpi.IsAutoProtected
4551 }
4552 if avwpi.Subinquireditemcount != nil {
4553 objectMap["subinquireditemcount"] = avwpi.Subinquireditemcount
4554 }
4555 if avwpi.Subprotectableitemcount != nil {
4556 objectMap["subprotectableitemcount"] = avwpi.Subprotectableitemcount
4557 }
4558 if avwpi.Prebackupvalidation != nil {
4559 objectMap["prebackupvalidation"] = avwpi.Prebackupvalidation
4560 }
4561 if avwpi.BackupManagementType != nil {
4562 objectMap["backupManagementType"] = avwpi.BackupManagementType
4563 }
4564 if avwpi.WorkloadType != nil {
4565 objectMap["workloadType"] = avwpi.WorkloadType
4566 }
4567 if avwpi.FriendlyName != nil {
4568 objectMap["friendlyName"] = avwpi.FriendlyName
4569 }
4570 if avwpi.ProtectionState != "" {
4571 objectMap["protectionState"] = avwpi.ProtectionState
4572 }
4573 if avwpi.ProtectableItemType != "" {
4574 objectMap["protectableItemType"] = avwpi.ProtectableItemType
4575 }
4576 return json.Marshal(objectMap)
4577 }
4578
4579
4580 func (avwpi AzureVMWorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
4581 return nil, false
4582 }
4583
4584
4585 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
4586 return nil, false
4587 }
4588
4589
4590 func (avwpi AzureVMWorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
4591 return nil, false
4592 }
4593
4594
4595 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
4596 return &avwpi, true
4597 }
4598
4599
4600 func (avwpi AzureVMWorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
4601 return &avwpi, true
4602 }
4603
4604
4605 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
4606 return nil, false
4607 }
4608
4609
4610 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
4611 return nil, false
4612 }
4613
4614
4615 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
4616 return nil, false
4617 }
4618
4619
4620 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
4621 return nil, false
4622 }
4623
4624
4625 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
4626 return nil, false
4627 }
4628
4629
4630 func (avwpi AzureVMWorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
4631 return nil, false
4632 }
4633
4634
4635 func (avwpi AzureVMWorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
4636 return nil, false
4637 }
4638
4639
4640 func (avwpi AzureVMWorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
4641 return nil, false
4642 }
4643
4644
4645 func (avwpi AzureVMWorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
4646 return nil, false
4647 }
4648
4649
4650 func (avwpi AzureVMWorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
4651 return &avwpi, true
4652 }
4653
4654
4655 type BasicAzureVMWorkloadProtectedItem interface {
4656 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
4657 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
4658 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
4659 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
4660 }
4661
4662
4663 type AzureVMWorkloadProtectedItem struct {
4664
4665 FriendlyName *string `json:"friendlyName,omitempty"`
4666
4667 ServerName *string `json:"serverName,omitempty"`
4668
4669 ParentName *string `json:"parentName,omitempty"`
4670
4671 ParentType *string `json:"parentType,omitempty"`
4672
4673 ProtectionStatus *string `json:"protectionStatus,omitempty"`
4674
4675 ProtectionState ProtectionState `json:"protectionState,omitempty"`
4676
4677 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
4678
4679 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
4680
4681 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
4682
4683 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
4684
4685 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
4686
4687 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
4688
4689 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
4690
4691 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
4692
4693 WorkloadType DataSourceType `json:"workloadType,omitempty"`
4694
4695 ContainerName *string `json:"containerName,omitempty"`
4696
4697 SourceResourceID *string `json:"sourceResourceId,omitempty"`
4698
4699 PolicyID *string `json:"policyId,omitempty"`
4700
4701 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
4702
4703 BackupSetName *string `json:"backupSetName,omitempty"`
4704
4705 CreateMode CreateMode `json:"createMode,omitempty"`
4706
4707 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
4708
4709 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
4710
4711 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
4712
4713 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
4714
4715 IsRehydrate *bool `json:"isRehydrate,omitempty"`
4716
4717 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
4718
4719 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
4720 }
4721
4722 func unmarshalBasicAzureVMWorkloadProtectedItem(body []byte) (BasicAzureVMWorkloadProtectedItem, error) {
4723 var m map[string]interface{}
4724 err := json.Unmarshal(body, &m)
4725 if err != nil {
4726 return nil, err
4727 }
4728
4729 switch m["protectedItemType"] {
4730 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
4731 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
4732 err := json.Unmarshal(body, &avwsadpi)
4733 return avwsadpi, err
4734 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
4735 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
4736 err := json.Unmarshal(body, &avwshdpi)
4737 return avwshdpi, err
4738 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
4739 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
4740 err := json.Unmarshal(body, &avwsdpi)
4741 return avwsdpi, err
4742 default:
4743 var avwpi AzureVMWorkloadProtectedItem
4744 err := json.Unmarshal(body, &avwpi)
4745 return avwpi, err
4746 }
4747 }
4748 func unmarshalBasicAzureVMWorkloadProtectedItemArray(body []byte) ([]BasicAzureVMWorkloadProtectedItem, error) {
4749 var rawMessages []*json.RawMessage
4750 err := json.Unmarshal(body, &rawMessages)
4751 if err != nil {
4752 return nil, err
4753 }
4754
4755 avwpiArray := make([]BasicAzureVMWorkloadProtectedItem, len(rawMessages))
4756
4757 for index, rawMessage := range rawMessages {
4758 avwpi, err := unmarshalBasicAzureVMWorkloadProtectedItem(*rawMessage)
4759 if err != nil {
4760 return nil, err
4761 }
4762 avwpiArray[index] = avwpi
4763 }
4764 return avwpiArray, nil
4765 }
4766
4767
4768 func (avwpi AzureVMWorkloadProtectedItem) MarshalJSON() ([]byte, error) {
4769 avwpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadProtectedItem
4770 objectMap := make(map[string]interface{})
4771 if avwpi.FriendlyName != nil {
4772 objectMap["friendlyName"] = avwpi.FriendlyName
4773 }
4774 if avwpi.ServerName != nil {
4775 objectMap["serverName"] = avwpi.ServerName
4776 }
4777 if avwpi.ParentName != nil {
4778 objectMap["parentName"] = avwpi.ParentName
4779 }
4780 if avwpi.ParentType != nil {
4781 objectMap["parentType"] = avwpi.ParentType
4782 }
4783 if avwpi.ProtectionStatus != nil {
4784 objectMap["protectionStatus"] = avwpi.ProtectionStatus
4785 }
4786 if avwpi.ProtectionState != "" {
4787 objectMap["protectionState"] = avwpi.ProtectionState
4788 }
4789 if avwpi.LastBackupStatus != "" {
4790 objectMap["lastBackupStatus"] = avwpi.LastBackupStatus
4791 }
4792 if avwpi.LastBackupTime != nil {
4793 objectMap["lastBackupTime"] = avwpi.LastBackupTime
4794 }
4795 if avwpi.LastBackupErrorDetail != nil {
4796 objectMap["lastBackupErrorDetail"] = avwpi.LastBackupErrorDetail
4797 }
4798 if avwpi.ProtectedItemDataSourceID != nil {
4799 objectMap["protectedItemDataSourceId"] = avwpi.ProtectedItemDataSourceID
4800 }
4801 if avwpi.ProtectedItemHealthStatus != "" {
4802 objectMap["protectedItemHealthStatus"] = avwpi.ProtectedItemHealthStatus
4803 }
4804 if avwpi.ExtendedInfo != nil {
4805 objectMap["extendedInfo"] = avwpi.ExtendedInfo
4806 }
4807 if avwpi.KpisHealths != nil {
4808 objectMap["kpisHealths"] = avwpi.KpisHealths
4809 }
4810 if avwpi.BackupManagementType != "" {
4811 objectMap["backupManagementType"] = avwpi.BackupManagementType
4812 }
4813 if avwpi.WorkloadType != "" {
4814 objectMap["workloadType"] = avwpi.WorkloadType
4815 }
4816 if avwpi.ContainerName != nil {
4817 objectMap["containerName"] = avwpi.ContainerName
4818 }
4819 if avwpi.SourceResourceID != nil {
4820 objectMap["sourceResourceId"] = avwpi.SourceResourceID
4821 }
4822 if avwpi.PolicyID != nil {
4823 objectMap["policyId"] = avwpi.PolicyID
4824 }
4825 if avwpi.LastRecoveryPoint != nil {
4826 objectMap["lastRecoveryPoint"] = avwpi.LastRecoveryPoint
4827 }
4828 if avwpi.BackupSetName != nil {
4829 objectMap["backupSetName"] = avwpi.BackupSetName
4830 }
4831 if avwpi.CreateMode != "" {
4832 objectMap["createMode"] = avwpi.CreateMode
4833 }
4834 if avwpi.DeferredDeleteTimeInUTC != nil {
4835 objectMap["deferredDeleteTimeInUTC"] = avwpi.DeferredDeleteTimeInUTC
4836 }
4837 if avwpi.IsScheduledForDeferredDelete != nil {
4838 objectMap["isScheduledForDeferredDelete"] = avwpi.IsScheduledForDeferredDelete
4839 }
4840 if avwpi.DeferredDeleteTimeRemaining != nil {
4841 objectMap["deferredDeleteTimeRemaining"] = avwpi.DeferredDeleteTimeRemaining
4842 }
4843 if avwpi.IsDeferredDeleteScheduleUpcoming != nil {
4844 objectMap["isDeferredDeleteScheduleUpcoming"] = avwpi.IsDeferredDeleteScheduleUpcoming
4845 }
4846 if avwpi.IsRehydrate != nil {
4847 objectMap["isRehydrate"] = avwpi.IsRehydrate
4848 }
4849 if avwpi.ResourceGuardOperationRequests != nil {
4850 objectMap["resourceGuardOperationRequests"] = avwpi.ResourceGuardOperationRequests
4851 }
4852 if avwpi.ProtectedItemType != "" {
4853 objectMap["protectedItemType"] = avwpi.ProtectedItemType
4854 }
4855 return json.Marshal(objectMap)
4856 }
4857
4858
4859 func (avwpi AzureVMWorkloadProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
4860 return nil, false
4861 }
4862
4863
4864 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
4865 return nil, false
4866 }
4867
4868
4869 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
4870 return nil, false
4871 }
4872
4873
4874 func (avwpi AzureVMWorkloadProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
4875 return nil, false
4876 }
4877
4878
4879 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
4880 return nil, false
4881 }
4882
4883
4884 func (avwpi AzureVMWorkloadProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
4885 return nil, false
4886 }
4887
4888
4889 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
4890 return &avwpi, true
4891 }
4892
4893
4894 func (avwpi AzureVMWorkloadProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
4895 return &avwpi, true
4896 }
4897
4898
4899 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
4900 return nil, false
4901 }
4902
4903
4904 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
4905 return nil, false
4906 }
4907
4908
4909 func (avwpi AzureVMWorkloadProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
4910 return nil, false
4911 }
4912
4913
4914 func (avwpi AzureVMWorkloadProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
4915 return nil, false
4916 }
4917
4918
4919 func (avwpi AzureVMWorkloadProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
4920 return nil, false
4921 }
4922
4923
4924 func (avwpi AzureVMWorkloadProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
4925 return nil, false
4926 }
4927
4928
4929 func (avwpi AzureVMWorkloadProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
4930 return nil, false
4931 }
4932
4933
4934 func (avwpi AzureVMWorkloadProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
4935 return &avwpi, true
4936 }
4937
4938
4939
4940 type AzureVMWorkloadProtectedItemExtendedInfo struct {
4941
4942 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
4943
4944 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
4945
4946 PolicyState *string `json:"policyState,omitempty"`
4947 }
4948
4949
4950 type AzureVMWorkloadProtectionPolicy struct {
4951
4952 WorkLoadType WorkloadType `json:"workLoadType,omitempty"`
4953
4954 Settings *Settings `json:"settings,omitempty"`
4955
4956 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
4957
4958 MakePolicyConsistent *bool `json:"makePolicyConsistent,omitempty"`
4959
4960 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
4961
4962 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
4963
4964 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
4965 }
4966
4967
4968 func (avwpp AzureVMWorkloadProtectionPolicy) MarshalJSON() ([]byte, error) {
4969 avwpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload
4970 objectMap := make(map[string]interface{})
4971 if avwpp.WorkLoadType != "" {
4972 objectMap["workLoadType"] = avwpp.WorkLoadType
4973 }
4974 if avwpp.Settings != nil {
4975 objectMap["settings"] = avwpp.Settings
4976 }
4977 if avwpp.SubProtectionPolicy != nil {
4978 objectMap["subProtectionPolicy"] = avwpp.SubProtectionPolicy
4979 }
4980 if avwpp.MakePolicyConsistent != nil {
4981 objectMap["makePolicyConsistent"] = avwpp.MakePolicyConsistent
4982 }
4983 if avwpp.ProtectedItemsCount != nil {
4984 objectMap["protectedItemsCount"] = avwpp.ProtectedItemsCount
4985 }
4986 if avwpp.ResourceGuardOperationRequests != nil {
4987 objectMap["resourceGuardOperationRequests"] = avwpp.ResourceGuardOperationRequests
4988 }
4989 if avwpp.BackupManagementType != "" {
4990 objectMap["backupManagementType"] = avwpp.BackupManagementType
4991 }
4992 return json.Marshal(objectMap)
4993 }
4994
4995
4996 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
4997 return &avwpp, true
4998 }
4999
5000
5001 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
5002 return nil, false
5003 }
5004
5005
5006 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
5007 return nil, false
5008 }
5009
5010
5011 func (avwpp AzureVMWorkloadProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
5012 return nil, false
5013 }
5014
5015
5016 func (avwpp AzureVMWorkloadProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
5017 return nil, false
5018 }
5019
5020
5021 func (avwpp AzureVMWorkloadProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
5022 return nil, false
5023 }
5024
5025
5026 func (avwpp AzureVMWorkloadProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
5027 return nil, false
5028 }
5029
5030
5031 func (avwpp AzureVMWorkloadProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
5032 return &avwpp, true
5033 }
5034
5035
5036
5037 type AzureVMWorkloadSAPAseDatabaseProtectedItem struct {
5038
5039 FriendlyName *string `json:"friendlyName,omitempty"`
5040
5041 ServerName *string `json:"serverName,omitempty"`
5042
5043 ParentName *string `json:"parentName,omitempty"`
5044
5045 ParentType *string `json:"parentType,omitempty"`
5046
5047 ProtectionStatus *string `json:"protectionStatus,omitempty"`
5048
5049 ProtectionState ProtectionState `json:"protectionState,omitempty"`
5050
5051 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
5052
5053 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
5054
5055 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
5056
5057 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
5058
5059 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
5060
5061 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
5062
5063 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
5064
5065 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
5066
5067 WorkloadType DataSourceType `json:"workloadType,omitempty"`
5068
5069 ContainerName *string `json:"containerName,omitempty"`
5070
5071 SourceResourceID *string `json:"sourceResourceId,omitempty"`
5072
5073 PolicyID *string `json:"policyId,omitempty"`
5074
5075 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
5076
5077 BackupSetName *string `json:"backupSetName,omitempty"`
5078
5079 CreateMode CreateMode `json:"createMode,omitempty"`
5080
5081 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
5082
5083 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
5084
5085 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
5086
5087 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
5088
5089 IsRehydrate *bool `json:"isRehydrate,omitempty"`
5090
5091 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
5092
5093 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
5094 }
5095
5096
5097 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
5098 avwsadpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPAseDatabase
5099 objectMap := make(map[string]interface{})
5100 if avwsadpi.FriendlyName != nil {
5101 objectMap["friendlyName"] = avwsadpi.FriendlyName
5102 }
5103 if avwsadpi.ServerName != nil {
5104 objectMap["serverName"] = avwsadpi.ServerName
5105 }
5106 if avwsadpi.ParentName != nil {
5107 objectMap["parentName"] = avwsadpi.ParentName
5108 }
5109 if avwsadpi.ParentType != nil {
5110 objectMap["parentType"] = avwsadpi.ParentType
5111 }
5112 if avwsadpi.ProtectionStatus != nil {
5113 objectMap["protectionStatus"] = avwsadpi.ProtectionStatus
5114 }
5115 if avwsadpi.ProtectionState != "" {
5116 objectMap["protectionState"] = avwsadpi.ProtectionState
5117 }
5118 if avwsadpi.LastBackupStatus != "" {
5119 objectMap["lastBackupStatus"] = avwsadpi.LastBackupStatus
5120 }
5121 if avwsadpi.LastBackupTime != nil {
5122 objectMap["lastBackupTime"] = avwsadpi.LastBackupTime
5123 }
5124 if avwsadpi.LastBackupErrorDetail != nil {
5125 objectMap["lastBackupErrorDetail"] = avwsadpi.LastBackupErrorDetail
5126 }
5127 if avwsadpi.ProtectedItemDataSourceID != nil {
5128 objectMap["protectedItemDataSourceId"] = avwsadpi.ProtectedItemDataSourceID
5129 }
5130 if avwsadpi.ProtectedItemHealthStatus != "" {
5131 objectMap["protectedItemHealthStatus"] = avwsadpi.ProtectedItemHealthStatus
5132 }
5133 if avwsadpi.ExtendedInfo != nil {
5134 objectMap["extendedInfo"] = avwsadpi.ExtendedInfo
5135 }
5136 if avwsadpi.KpisHealths != nil {
5137 objectMap["kpisHealths"] = avwsadpi.KpisHealths
5138 }
5139 if avwsadpi.BackupManagementType != "" {
5140 objectMap["backupManagementType"] = avwsadpi.BackupManagementType
5141 }
5142 if avwsadpi.WorkloadType != "" {
5143 objectMap["workloadType"] = avwsadpi.WorkloadType
5144 }
5145 if avwsadpi.ContainerName != nil {
5146 objectMap["containerName"] = avwsadpi.ContainerName
5147 }
5148 if avwsadpi.SourceResourceID != nil {
5149 objectMap["sourceResourceId"] = avwsadpi.SourceResourceID
5150 }
5151 if avwsadpi.PolicyID != nil {
5152 objectMap["policyId"] = avwsadpi.PolicyID
5153 }
5154 if avwsadpi.LastRecoveryPoint != nil {
5155 objectMap["lastRecoveryPoint"] = avwsadpi.LastRecoveryPoint
5156 }
5157 if avwsadpi.BackupSetName != nil {
5158 objectMap["backupSetName"] = avwsadpi.BackupSetName
5159 }
5160 if avwsadpi.CreateMode != "" {
5161 objectMap["createMode"] = avwsadpi.CreateMode
5162 }
5163 if avwsadpi.DeferredDeleteTimeInUTC != nil {
5164 objectMap["deferredDeleteTimeInUTC"] = avwsadpi.DeferredDeleteTimeInUTC
5165 }
5166 if avwsadpi.IsScheduledForDeferredDelete != nil {
5167 objectMap["isScheduledForDeferredDelete"] = avwsadpi.IsScheduledForDeferredDelete
5168 }
5169 if avwsadpi.DeferredDeleteTimeRemaining != nil {
5170 objectMap["deferredDeleteTimeRemaining"] = avwsadpi.DeferredDeleteTimeRemaining
5171 }
5172 if avwsadpi.IsDeferredDeleteScheduleUpcoming != nil {
5173 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsadpi.IsDeferredDeleteScheduleUpcoming
5174 }
5175 if avwsadpi.IsRehydrate != nil {
5176 objectMap["isRehydrate"] = avwsadpi.IsRehydrate
5177 }
5178 if avwsadpi.ResourceGuardOperationRequests != nil {
5179 objectMap["resourceGuardOperationRequests"] = avwsadpi.ResourceGuardOperationRequests
5180 }
5181 if avwsadpi.ProtectedItemType != "" {
5182 objectMap["protectedItemType"] = avwsadpi.ProtectedItemType
5183 }
5184 return json.Marshal(objectMap)
5185 }
5186
5187
5188 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5189 return nil, false
5190 }
5191
5192
5193 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5194 return nil, false
5195 }
5196
5197
5198 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5199 return nil, false
5200 }
5201
5202
5203 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5204 return nil, false
5205 }
5206
5207
5208 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5209 return nil, false
5210 }
5211
5212
5213 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5214 return nil, false
5215 }
5216
5217
5218 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5219 return nil, false
5220 }
5221
5222
5223 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5224 return &avwsadpi, true
5225 }
5226
5227
5228 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5229 return &avwsadpi, true
5230 }
5231
5232
5233 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5234 return nil, false
5235 }
5236
5237
5238 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
5239 return nil, false
5240 }
5241
5242
5243 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
5244 return nil, false
5245 }
5246
5247
5248 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
5249 return nil, false
5250 }
5251
5252
5253 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
5254 return nil, false
5255 }
5256
5257
5258 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
5259 return nil, false
5260 }
5261
5262
5263 func (avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
5264 return &avwsadpi, true
5265 }
5266
5267
5268
5269 type AzureVMWorkloadSAPAseDatabaseWorkloadItem struct {
5270
5271 ParentName *string `json:"parentName,omitempty"`
5272
5273 ServerName *string `json:"serverName,omitempty"`
5274
5275 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5276
5277 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5278
5279 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5280
5281 BackupManagementType *string `json:"backupManagementType,omitempty"`
5282
5283 WorkloadType *string `json:"workloadType,omitempty"`
5284
5285 FriendlyName *string `json:"friendlyName,omitempty"`
5286
5287 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5288
5289 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5290 }
5291
5292
5293 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
5294 avwsadwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase
5295 objectMap := make(map[string]interface{})
5296 if avwsadwi.ParentName != nil {
5297 objectMap["parentName"] = avwsadwi.ParentName
5298 }
5299 if avwsadwi.ServerName != nil {
5300 objectMap["serverName"] = avwsadwi.ServerName
5301 }
5302 if avwsadwi.IsAutoProtectable != nil {
5303 objectMap["isAutoProtectable"] = avwsadwi.IsAutoProtectable
5304 }
5305 if avwsadwi.Subinquireditemcount != nil {
5306 objectMap["subinquireditemcount"] = avwsadwi.Subinquireditemcount
5307 }
5308 if avwsadwi.SubWorkloadItemCount != nil {
5309 objectMap["subWorkloadItemCount"] = avwsadwi.SubWorkloadItemCount
5310 }
5311 if avwsadwi.BackupManagementType != nil {
5312 objectMap["backupManagementType"] = avwsadwi.BackupManagementType
5313 }
5314 if avwsadwi.WorkloadType != nil {
5315 objectMap["workloadType"] = avwsadwi.WorkloadType
5316 }
5317 if avwsadwi.FriendlyName != nil {
5318 objectMap["friendlyName"] = avwsadwi.FriendlyName
5319 }
5320 if avwsadwi.ProtectionState != "" {
5321 objectMap["protectionState"] = avwsadwi.ProtectionState
5322 }
5323 if avwsadwi.WorkloadItemType != "" {
5324 objectMap["workloadItemType"] = avwsadwi.WorkloadItemType
5325 }
5326 return json.Marshal(objectMap)
5327 }
5328
5329
5330 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5331 return nil, false
5332 }
5333
5334
5335 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5336 return &avwsadwi, true
5337 }
5338
5339
5340 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5341 return &avwsadwi, true
5342 }
5343
5344
5345 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5346 return nil, false
5347 }
5348
5349
5350 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5351 return nil, false
5352 }
5353
5354
5355 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5356 return nil, false
5357 }
5358
5359
5360 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5361 return nil, false
5362 }
5363
5364
5365 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5366 return nil, false
5367 }
5368
5369
5370 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5371 return nil, false
5372 }
5373
5374
5375 func (avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5376 return &avwsadwi, true
5377 }
5378
5379
5380
5381 type AzureVMWorkloadSAPAseSystemProtectableItem struct {
5382
5383 ParentName *string `json:"parentName,omitempty"`
5384
5385
5386 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5387
5388 ServerName *string `json:"serverName,omitempty"`
5389
5390 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5391
5392 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5393
5394 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5395
5396 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5397
5398 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5399
5400 BackupManagementType *string `json:"backupManagementType,omitempty"`
5401
5402 WorkloadType *string `json:"workloadType,omitempty"`
5403
5404 FriendlyName *string `json:"friendlyName,omitempty"`
5405
5406 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5407
5408 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5409 }
5410
5411
5412 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) MarshalJSON() ([]byte, error) {
5413 avwsaspi.ProtectableItemType = ProtectableItemTypeSAPAseSystem
5414 objectMap := make(map[string]interface{})
5415 if avwsaspi.ParentName != nil {
5416 objectMap["parentName"] = avwsaspi.ParentName
5417 }
5418 if avwsaspi.ParentUniqueName != nil {
5419 objectMap["parentUniqueName"] = avwsaspi.ParentUniqueName
5420 }
5421 if avwsaspi.ServerName != nil {
5422 objectMap["serverName"] = avwsaspi.ServerName
5423 }
5424 if avwsaspi.IsAutoProtectable != nil {
5425 objectMap["isAutoProtectable"] = avwsaspi.IsAutoProtectable
5426 }
5427 if avwsaspi.IsAutoProtected != nil {
5428 objectMap["isAutoProtected"] = avwsaspi.IsAutoProtected
5429 }
5430 if avwsaspi.Subinquireditemcount != nil {
5431 objectMap["subinquireditemcount"] = avwsaspi.Subinquireditemcount
5432 }
5433 if avwsaspi.Subprotectableitemcount != nil {
5434 objectMap["subprotectableitemcount"] = avwsaspi.Subprotectableitemcount
5435 }
5436 if avwsaspi.Prebackupvalidation != nil {
5437 objectMap["prebackupvalidation"] = avwsaspi.Prebackupvalidation
5438 }
5439 if avwsaspi.BackupManagementType != nil {
5440 objectMap["backupManagementType"] = avwsaspi.BackupManagementType
5441 }
5442 if avwsaspi.WorkloadType != nil {
5443 objectMap["workloadType"] = avwsaspi.WorkloadType
5444 }
5445 if avwsaspi.FriendlyName != nil {
5446 objectMap["friendlyName"] = avwsaspi.FriendlyName
5447 }
5448 if avwsaspi.ProtectionState != "" {
5449 objectMap["protectionState"] = avwsaspi.ProtectionState
5450 }
5451 if avwsaspi.ProtectableItemType != "" {
5452 objectMap["protectableItemType"] = avwsaspi.ProtectableItemType
5453 }
5454 return json.Marshal(objectMap)
5455 }
5456
5457
5458 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5459 return nil, false
5460 }
5461
5462
5463 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5464 return nil, false
5465 }
5466
5467
5468 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5469 return nil, false
5470 }
5471
5472
5473 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5474 return nil, false
5475 }
5476
5477
5478 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5479 return &avwsaspi, true
5480 }
5481
5482
5483 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5484 return &avwsaspi, true
5485 }
5486
5487
5488 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5489 return nil, false
5490 }
5491
5492
5493 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5494 return nil, false
5495 }
5496
5497
5498 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5499 return nil, false
5500 }
5501
5502
5503 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5504 return nil, false
5505 }
5506
5507
5508 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5509 return nil, false
5510 }
5511
5512
5513 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5514 return nil, false
5515 }
5516
5517
5518 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5519 return nil, false
5520 }
5521
5522
5523 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5524 return nil, false
5525 }
5526
5527
5528 func (avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5529 return &avwsaspi, true
5530 }
5531
5532
5533
5534 type AzureVMWorkloadSAPAseSystemWorkloadItem struct {
5535
5536 ParentName *string `json:"parentName,omitempty"`
5537
5538 ServerName *string `json:"serverName,omitempty"`
5539
5540 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5541
5542 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5543
5544 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
5545
5546 BackupManagementType *string `json:"backupManagementType,omitempty"`
5547
5548 WorkloadType *string `json:"workloadType,omitempty"`
5549
5550 FriendlyName *string `json:"friendlyName,omitempty"`
5551
5552 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5553
5554 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
5555 }
5556
5557
5558 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) MarshalJSON() ([]byte, error) {
5559 avwsaswi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem
5560 objectMap := make(map[string]interface{})
5561 if avwsaswi.ParentName != nil {
5562 objectMap["parentName"] = avwsaswi.ParentName
5563 }
5564 if avwsaswi.ServerName != nil {
5565 objectMap["serverName"] = avwsaswi.ServerName
5566 }
5567 if avwsaswi.IsAutoProtectable != nil {
5568 objectMap["isAutoProtectable"] = avwsaswi.IsAutoProtectable
5569 }
5570 if avwsaswi.Subinquireditemcount != nil {
5571 objectMap["subinquireditemcount"] = avwsaswi.Subinquireditemcount
5572 }
5573 if avwsaswi.SubWorkloadItemCount != nil {
5574 objectMap["subWorkloadItemCount"] = avwsaswi.SubWorkloadItemCount
5575 }
5576 if avwsaswi.BackupManagementType != nil {
5577 objectMap["backupManagementType"] = avwsaswi.BackupManagementType
5578 }
5579 if avwsaswi.WorkloadType != nil {
5580 objectMap["workloadType"] = avwsaswi.WorkloadType
5581 }
5582 if avwsaswi.FriendlyName != nil {
5583 objectMap["friendlyName"] = avwsaswi.FriendlyName
5584 }
5585 if avwsaswi.ProtectionState != "" {
5586 objectMap["protectionState"] = avwsaswi.ProtectionState
5587 }
5588 if avwsaswi.WorkloadItemType != "" {
5589 objectMap["workloadItemType"] = avwsaswi.WorkloadItemType
5590 }
5591 return json.Marshal(objectMap)
5592 }
5593
5594
5595 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
5596 return nil, false
5597 }
5598
5599
5600 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
5601 return &avwsaswi, true
5602 }
5603
5604
5605 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
5606 return nil, false
5607 }
5608
5609
5610 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
5611 return &avwsaswi, true
5612 }
5613
5614
5615 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
5616 return nil, false
5617 }
5618
5619
5620 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
5621 return nil, false
5622 }
5623
5624
5625 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
5626 return nil, false
5627 }
5628
5629
5630 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
5631 return nil, false
5632 }
5633
5634
5635 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
5636 return nil, false
5637 }
5638
5639
5640 func (avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
5641 return &avwsaswi, true
5642 }
5643
5644
5645
5646 type AzureVMWorkloadSAPHanaDatabaseProtectableItem struct {
5647
5648 ParentName *string `json:"parentName,omitempty"`
5649
5650
5651 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
5652
5653 ServerName *string `json:"serverName,omitempty"`
5654
5655 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
5656
5657 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
5658
5659 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
5660
5661 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
5662
5663 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
5664
5665 BackupManagementType *string `json:"backupManagementType,omitempty"`
5666
5667 WorkloadType *string `json:"workloadType,omitempty"`
5668
5669 FriendlyName *string `json:"friendlyName,omitempty"`
5670
5671 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
5672
5673 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
5674 }
5675
5676
5677 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
5678 avwshdpi.ProtectableItemType = ProtectableItemTypeSAPHanaDatabase
5679 objectMap := make(map[string]interface{})
5680 if avwshdpi.ParentName != nil {
5681 objectMap["parentName"] = avwshdpi.ParentName
5682 }
5683 if avwshdpi.ParentUniqueName != nil {
5684 objectMap["parentUniqueName"] = avwshdpi.ParentUniqueName
5685 }
5686 if avwshdpi.ServerName != nil {
5687 objectMap["serverName"] = avwshdpi.ServerName
5688 }
5689 if avwshdpi.IsAutoProtectable != nil {
5690 objectMap["isAutoProtectable"] = avwshdpi.IsAutoProtectable
5691 }
5692 if avwshdpi.IsAutoProtected != nil {
5693 objectMap["isAutoProtected"] = avwshdpi.IsAutoProtected
5694 }
5695 if avwshdpi.Subinquireditemcount != nil {
5696 objectMap["subinquireditemcount"] = avwshdpi.Subinquireditemcount
5697 }
5698 if avwshdpi.Subprotectableitemcount != nil {
5699 objectMap["subprotectableitemcount"] = avwshdpi.Subprotectableitemcount
5700 }
5701 if avwshdpi.Prebackupvalidation != nil {
5702 objectMap["prebackupvalidation"] = avwshdpi.Prebackupvalidation
5703 }
5704 if avwshdpi.BackupManagementType != nil {
5705 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
5706 }
5707 if avwshdpi.WorkloadType != nil {
5708 objectMap["workloadType"] = avwshdpi.WorkloadType
5709 }
5710 if avwshdpi.FriendlyName != nil {
5711 objectMap["friendlyName"] = avwshdpi.FriendlyName
5712 }
5713 if avwshdpi.ProtectionState != "" {
5714 objectMap["protectionState"] = avwshdpi.ProtectionState
5715 }
5716 if avwshdpi.ProtectableItemType != "" {
5717 objectMap["protectableItemType"] = avwshdpi.ProtectableItemType
5718 }
5719 return json.Marshal(objectMap)
5720 }
5721
5722
5723 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
5724 return nil, false
5725 }
5726
5727
5728 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
5729 return nil, false
5730 }
5731
5732
5733 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
5734 return nil, false
5735 }
5736
5737
5738 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
5739 return nil, false
5740 }
5741
5742
5743 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
5744 return &avwshdpi, true
5745 }
5746
5747
5748 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
5749 return nil, false
5750 }
5751
5752
5753 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
5754 return &avwshdpi, true
5755 }
5756
5757
5758 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
5759 return nil, false
5760 }
5761
5762
5763 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
5764 return nil, false
5765 }
5766
5767
5768 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
5769 return nil, false
5770 }
5771
5772
5773 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
5774 return nil, false
5775 }
5776
5777
5778 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
5779 return nil, false
5780 }
5781
5782
5783 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
5784 return nil, false
5785 }
5786
5787
5788 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
5789 return nil, false
5790 }
5791
5792
5793 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
5794 return &avwshdpi, true
5795 }
5796
5797
5798
5799 type AzureVMWorkloadSAPHanaDatabaseProtectedItem struct {
5800
5801 FriendlyName *string `json:"friendlyName,omitempty"`
5802
5803 ServerName *string `json:"serverName,omitempty"`
5804
5805 ParentName *string `json:"parentName,omitempty"`
5806
5807 ParentType *string `json:"parentType,omitempty"`
5808
5809 ProtectionStatus *string `json:"protectionStatus,omitempty"`
5810
5811 ProtectionState ProtectionState `json:"protectionState,omitempty"`
5812
5813 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
5814
5815 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
5816
5817 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
5818
5819 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
5820
5821 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
5822
5823 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
5824
5825 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
5826
5827 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
5828
5829 WorkloadType DataSourceType `json:"workloadType,omitempty"`
5830
5831 ContainerName *string `json:"containerName,omitempty"`
5832
5833 SourceResourceID *string `json:"sourceResourceId,omitempty"`
5834
5835 PolicyID *string `json:"policyId,omitempty"`
5836
5837 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
5838
5839 BackupSetName *string `json:"backupSetName,omitempty"`
5840
5841 CreateMode CreateMode `json:"createMode,omitempty"`
5842
5843 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
5844
5845 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
5846
5847 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
5848
5849 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
5850
5851 IsRehydrate *bool `json:"isRehydrate,omitempty"`
5852
5853 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
5854
5855 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
5856 }
5857
5858
5859 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
5860 avwshdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase
5861 objectMap := make(map[string]interface{})
5862 if avwshdpi.FriendlyName != nil {
5863 objectMap["friendlyName"] = avwshdpi.FriendlyName
5864 }
5865 if avwshdpi.ServerName != nil {
5866 objectMap["serverName"] = avwshdpi.ServerName
5867 }
5868 if avwshdpi.ParentName != nil {
5869 objectMap["parentName"] = avwshdpi.ParentName
5870 }
5871 if avwshdpi.ParentType != nil {
5872 objectMap["parentType"] = avwshdpi.ParentType
5873 }
5874 if avwshdpi.ProtectionStatus != nil {
5875 objectMap["protectionStatus"] = avwshdpi.ProtectionStatus
5876 }
5877 if avwshdpi.ProtectionState != "" {
5878 objectMap["protectionState"] = avwshdpi.ProtectionState
5879 }
5880 if avwshdpi.LastBackupStatus != "" {
5881 objectMap["lastBackupStatus"] = avwshdpi.LastBackupStatus
5882 }
5883 if avwshdpi.LastBackupTime != nil {
5884 objectMap["lastBackupTime"] = avwshdpi.LastBackupTime
5885 }
5886 if avwshdpi.LastBackupErrorDetail != nil {
5887 objectMap["lastBackupErrorDetail"] = avwshdpi.LastBackupErrorDetail
5888 }
5889 if avwshdpi.ProtectedItemDataSourceID != nil {
5890 objectMap["protectedItemDataSourceId"] = avwshdpi.ProtectedItemDataSourceID
5891 }
5892 if avwshdpi.ProtectedItemHealthStatus != "" {
5893 objectMap["protectedItemHealthStatus"] = avwshdpi.ProtectedItemHealthStatus
5894 }
5895 if avwshdpi.ExtendedInfo != nil {
5896 objectMap["extendedInfo"] = avwshdpi.ExtendedInfo
5897 }
5898 if avwshdpi.KpisHealths != nil {
5899 objectMap["kpisHealths"] = avwshdpi.KpisHealths
5900 }
5901 if avwshdpi.BackupManagementType != "" {
5902 objectMap["backupManagementType"] = avwshdpi.BackupManagementType
5903 }
5904 if avwshdpi.WorkloadType != "" {
5905 objectMap["workloadType"] = avwshdpi.WorkloadType
5906 }
5907 if avwshdpi.ContainerName != nil {
5908 objectMap["containerName"] = avwshdpi.ContainerName
5909 }
5910 if avwshdpi.SourceResourceID != nil {
5911 objectMap["sourceResourceId"] = avwshdpi.SourceResourceID
5912 }
5913 if avwshdpi.PolicyID != nil {
5914 objectMap["policyId"] = avwshdpi.PolicyID
5915 }
5916 if avwshdpi.LastRecoveryPoint != nil {
5917 objectMap["lastRecoveryPoint"] = avwshdpi.LastRecoveryPoint
5918 }
5919 if avwshdpi.BackupSetName != nil {
5920 objectMap["backupSetName"] = avwshdpi.BackupSetName
5921 }
5922 if avwshdpi.CreateMode != "" {
5923 objectMap["createMode"] = avwshdpi.CreateMode
5924 }
5925 if avwshdpi.DeferredDeleteTimeInUTC != nil {
5926 objectMap["deferredDeleteTimeInUTC"] = avwshdpi.DeferredDeleteTimeInUTC
5927 }
5928 if avwshdpi.IsScheduledForDeferredDelete != nil {
5929 objectMap["isScheduledForDeferredDelete"] = avwshdpi.IsScheduledForDeferredDelete
5930 }
5931 if avwshdpi.DeferredDeleteTimeRemaining != nil {
5932 objectMap["deferredDeleteTimeRemaining"] = avwshdpi.DeferredDeleteTimeRemaining
5933 }
5934 if avwshdpi.IsDeferredDeleteScheduleUpcoming != nil {
5935 objectMap["isDeferredDeleteScheduleUpcoming"] = avwshdpi.IsDeferredDeleteScheduleUpcoming
5936 }
5937 if avwshdpi.IsRehydrate != nil {
5938 objectMap["isRehydrate"] = avwshdpi.IsRehydrate
5939 }
5940 if avwshdpi.ResourceGuardOperationRequests != nil {
5941 objectMap["resourceGuardOperationRequests"] = avwshdpi.ResourceGuardOperationRequests
5942 }
5943 if avwshdpi.ProtectedItemType != "" {
5944 objectMap["protectedItemType"] = avwshdpi.ProtectedItemType
5945 }
5946 return json.Marshal(objectMap)
5947 }
5948
5949
5950 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
5951 return nil, false
5952 }
5953
5954
5955 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
5956 return nil, false
5957 }
5958
5959
5960 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
5961 return nil, false
5962 }
5963
5964
5965 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
5966 return nil, false
5967 }
5968
5969
5970 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
5971 return nil, false
5972 }
5973
5974
5975 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
5976 return nil, false
5977 }
5978
5979
5980 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
5981 return nil, false
5982 }
5983
5984
5985 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
5986 return &avwshdpi, true
5987 }
5988
5989
5990 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
5991 return nil, false
5992 }
5993
5994
5995 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
5996 return &avwshdpi, true
5997 }
5998
5999
6000 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
6001 return nil, false
6002 }
6003
6004
6005 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
6006 return nil, false
6007 }
6008
6009
6010 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
6011 return nil, false
6012 }
6013
6014
6015 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
6016 return nil, false
6017 }
6018
6019
6020 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
6021 return nil, false
6022 }
6023
6024
6025 func (avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
6026 return &avwshdpi, true
6027 }
6028
6029
6030
6031 type AzureVMWorkloadSAPHanaDatabaseWorkloadItem struct {
6032
6033 ParentName *string `json:"parentName,omitempty"`
6034
6035 ServerName *string `json:"serverName,omitempty"`
6036
6037 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6038
6039 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6040
6041 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6042
6043 BackupManagementType *string `json:"backupManagementType,omitempty"`
6044
6045 WorkloadType *string `json:"workloadType,omitempty"`
6046
6047 FriendlyName *string `json:"friendlyName,omitempty"`
6048
6049 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6050
6051 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6052 }
6053
6054
6055 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
6056 avwshdwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase
6057 objectMap := make(map[string]interface{})
6058 if avwshdwi.ParentName != nil {
6059 objectMap["parentName"] = avwshdwi.ParentName
6060 }
6061 if avwshdwi.ServerName != nil {
6062 objectMap["serverName"] = avwshdwi.ServerName
6063 }
6064 if avwshdwi.IsAutoProtectable != nil {
6065 objectMap["isAutoProtectable"] = avwshdwi.IsAutoProtectable
6066 }
6067 if avwshdwi.Subinquireditemcount != nil {
6068 objectMap["subinquireditemcount"] = avwshdwi.Subinquireditemcount
6069 }
6070 if avwshdwi.SubWorkloadItemCount != nil {
6071 objectMap["subWorkloadItemCount"] = avwshdwi.SubWorkloadItemCount
6072 }
6073 if avwshdwi.BackupManagementType != nil {
6074 objectMap["backupManagementType"] = avwshdwi.BackupManagementType
6075 }
6076 if avwshdwi.WorkloadType != nil {
6077 objectMap["workloadType"] = avwshdwi.WorkloadType
6078 }
6079 if avwshdwi.FriendlyName != nil {
6080 objectMap["friendlyName"] = avwshdwi.FriendlyName
6081 }
6082 if avwshdwi.ProtectionState != "" {
6083 objectMap["protectionState"] = avwshdwi.ProtectionState
6084 }
6085 if avwshdwi.WorkloadItemType != "" {
6086 objectMap["workloadItemType"] = avwshdwi.WorkloadItemType
6087 }
6088 return json.Marshal(objectMap)
6089 }
6090
6091
6092 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6093 return nil, false
6094 }
6095
6096
6097 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6098 return &avwshdwi, true
6099 }
6100
6101
6102 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6103 return nil, false
6104 }
6105
6106
6107 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6108 return nil, false
6109 }
6110
6111
6112 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6113 return &avwshdwi, true
6114 }
6115
6116
6117 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6118 return nil, false
6119 }
6120
6121
6122 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6123 return nil, false
6124 }
6125
6126
6127 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6128 return nil, false
6129 }
6130
6131
6132 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6133 return nil, false
6134 }
6135
6136
6137 func (avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6138 return &avwshdwi, true
6139 }
6140
6141
6142
6143 type AzureVMWorkloadSAPHanaSystemProtectableItem struct {
6144
6145 ParentName *string `json:"parentName,omitempty"`
6146
6147
6148 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6149
6150 ServerName *string `json:"serverName,omitempty"`
6151
6152 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6153
6154 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6155
6156 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6157
6158 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6159
6160 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6161
6162 BackupManagementType *string `json:"backupManagementType,omitempty"`
6163
6164 WorkloadType *string `json:"workloadType,omitempty"`
6165
6166 FriendlyName *string `json:"friendlyName,omitempty"`
6167
6168 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6169
6170 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6171 }
6172
6173
6174 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) MarshalJSON() ([]byte, error) {
6175 avwshspi.ProtectableItemType = ProtectableItemTypeSAPHanaSystem
6176 objectMap := make(map[string]interface{})
6177 if avwshspi.ParentName != nil {
6178 objectMap["parentName"] = avwshspi.ParentName
6179 }
6180 if avwshspi.ParentUniqueName != nil {
6181 objectMap["parentUniqueName"] = avwshspi.ParentUniqueName
6182 }
6183 if avwshspi.ServerName != nil {
6184 objectMap["serverName"] = avwshspi.ServerName
6185 }
6186 if avwshspi.IsAutoProtectable != nil {
6187 objectMap["isAutoProtectable"] = avwshspi.IsAutoProtectable
6188 }
6189 if avwshspi.IsAutoProtected != nil {
6190 objectMap["isAutoProtected"] = avwshspi.IsAutoProtected
6191 }
6192 if avwshspi.Subinquireditemcount != nil {
6193 objectMap["subinquireditemcount"] = avwshspi.Subinquireditemcount
6194 }
6195 if avwshspi.Subprotectableitemcount != nil {
6196 objectMap["subprotectableitemcount"] = avwshspi.Subprotectableitemcount
6197 }
6198 if avwshspi.Prebackupvalidation != nil {
6199 objectMap["prebackupvalidation"] = avwshspi.Prebackupvalidation
6200 }
6201 if avwshspi.BackupManagementType != nil {
6202 objectMap["backupManagementType"] = avwshspi.BackupManagementType
6203 }
6204 if avwshspi.WorkloadType != nil {
6205 objectMap["workloadType"] = avwshspi.WorkloadType
6206 }
6207 if avwshspi.FriendlyName != nil {
6208 objectMap["friendlyName"] = avwshspi.FriendlyName
6209 }
6210 if avwshspi.ProtectionState != "" {
6211 objectMap["protectionState"] = avwshspi.ProtectionState
6212 }
6213 if avwshspi.ProtectableItemType != "" {
6214 objectMap["protectableItemType"] = avwshspi.ProtectableItemType
6215 }
6216 return json.Marshal(objectMap)
6217 }
6218
6219
6220 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6221 return nil, false
6222 }
6223
6224
6225 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6226 return nil, false
6227 }
6228
6229
6230 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6231 return nil, false
6232 }
6233
6234
6235 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6236 return nil, false
6237 }
6238
6239
6240 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6241 return &avwshspi, true
6242 }
6243
6244
6245 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6246 return nil, false
6247 }
6248
6249
6250 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6251 return nil, false
6252 }
6253
6254
6255 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6256 return &avwshspi, true
6257 }
6258
6259
6260 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6261 return nil, false
6262 }
6263
6264
6265 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6266 return nil, false
6267 }
6268
6269
6270 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6271 return nil, false
6272 }
6273
6274
6275 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6276 return nil, false
6277 }
6278
6279
6280 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6281 return nil, false
6282 }
6283
6284
6285 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6286 return nil, false
6287 }
6288
6289
6290 func (avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6291 return &avwshspi, true
6292 }
6293
6294
6295
6296 type AzureVMWorkloadSAPHanaSystemWorkloadItem struct {
6297
6298 ParentName *string `json:"parentName,omitempty"`
6299
6300 ServerName *string `json:"serverName,omitempty"`
6301
6302 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6303
6304 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6305
6306 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6307
6308 BackupManagementType *string `json:"backupManagementType,omitempty"`
6309
6310 WorkloadType *string `json:"workloadType,omitempty"`
6311
6312 FriendlyName *string `json:"friendlyName,omitempty"`
6313
6314 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6315
6316 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6317 }
6318
6319
6320 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) MarshalJSON() ([]byte, error) {
6321 avwshswi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem
6322 objectMap := make(map[string]interface{})
6323 if avwshswi.ParentName != nil {
6324 objectMap["parentName"] = avwshswi.ParentName
6325 }
6326 if avwshswi.ServerName != nil {
6327 objectMap["serverName"] = avwshswi.ServerName
6328 }
6329 if avwshswi.IsAutoProtectable != nil {
6330 objectMap["isAutoProtectable"] = avwshswi.IsAutoProtectable
6331 }
6332 if avwshswi.Subinquireditemcount != nil {
6333 objectMap["subinquireditemcount"] = avwshswi.Subinquireditemcount
6334 }
6335 if avwshswi.SubWorkloadItemCount != nil {
6336 objectMap["subWorkloadItemCount"] = avwshswi.SubWorkloadItemCount
6337 }
6338 if avwshswi.BackupManagementType != nil {
6339 objectMap["backupManagementType"] = avwshswi.BackupManagementType
6340 }
6341 if avwshswi.WorkloadType != nil {
6342 objectMap["workloadType"] = avwshswi.WorkloadType
6343 }
6344 if avwshswi.FriendlyName != nil {
6345 objectMap["friendlyName"] = avwshswi.FriendlyName
6346 }
6347 if avwshswi.ProtectionState != "" {
6348 objectMap["protectionState"] = avwshswi.ProtectionState
6349 }
6350 if avwshswi.WorkloadItemType != "" {
6351 objectMap["workloadItemType"] = avwshswi.WorkloadItemType
6352 }
6353 return json.Marshal(objectMap)
6354 }
6355
6356
6357 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
6358 return nil, false
6359 }
6360
6361
6362 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
6363 return &avwshswi, true
6364 }
6365
6366
6367 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
6368 return nil, false
6369 }
6370
6371
6372 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
6373 return nil, false
6374 }
6375
6376
6377 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
6378 return nil, false
6379 }
6380
6381
6382 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
6383 return &avwshswi, true
6384 }
6385
6386
6387 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
6388 return nil, false
6389 }
6390
6391
6392 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
6393 return nil, false
6394 }
6395
6396
6397 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
6398 return nil, false
6399 }
6400
6401
6402 func (avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
6403 return &avwshswi, true
6404 }
6405
6406
6407
6408 type AzureVMWorkloadSQLAvailabilityGroupProtectableItem struct {
6409
6410 ParentName *string `json:"parentName,omitempty"`
6411
6412
6413 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6414
6415 ServerName *string `json:"serverName,omitempty"`
6416
6417 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6418
6419 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6420
6421 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6422
6423 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6424
6425 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6426
6427 BackupManagementType *string `json:"backupManagementType,omitempty"`
6428
6429 WorkloadType *string `json:"workloadType,omitempty"`
6430
6431 FriendlyName *string `json:"friendlyName,omitempty"`
6432
6433 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6434
6435 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6436 }
6437
6438
6439 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) MarshalJSON() ([]byte, error) {
6440 avwsagpi.ProtectableItemType = ProtectableItemTypeSQLAvailabilityGroupContainer
6441 objectMap := make(map[string]interface{})
6442 if avwsagpi.ParentName != nil {
6443 objectMap["parentName"] = avwsagpi.ParentName
6444 }
6445 if avwsagpi.ParentUniqueName != nil {
6446 objectMap["parentUniqueName"] = avwsagpi.ParentUniqueName
6447 }
6448 if avwsagpi.ServerName != nil {
6449 objectMap["serverName"] = avwsagpi.ServerName
6450 }
6451 if avwsagpi.IsAutoProtectable != nil {
6452 objectMap["isAutoProtectable"] = avwsagpi.IsAutoProtectable
6453 }
6454 if avwsagpi.IsAutoProtected != nil {
6455 objectMap["isAutoProtected"] = avwsagpi.IsAutoProtected
6456 }
6457 if avwsagpi.Subinquireditemcount != nil {
6458 objectMap["subinquireditemcount"] = avwsagpi.Subinquireditemcount
6459 }
6460 if avwsagpi.Subprotectableitemcount != nil {
6461 objectMap["subprotectableitemcount"] = avwsagpi.Subprotectableitemcount
6462 }
6463 if avwsagpi.Prebackupvalidation != nil {
6464 objectMap["prebackupvalidation"] = avwsagpi.Prebackupvalidation
6465 }
6466 if avwsagpi.BackupManagementType != nil {
6467 objectMap["backupManagementType"] = avwsagpi.BackupManagementType
6468 }
6469 if avwsagpi.WorkloadType != nil {
6470 objectMap["workloadType"] = avwsagpi.WorkloadType
6471 }
6472 if avwsagpi.FriendlyName != nil {
6473 objectMap["friendlyName"] = avwsagpi.FriendlyName
6474 }
6475 if avwsagpi.ProtectionState != "" {
6476 objectMap["protectionState"] = avwsagpi.ProtectionState
6477 }
6478 if avwsagpi.ProtectableItemType != "" {
6479 objectMap["protectableItemType"] = avwsagpi.ProtectableItemType
6480 }
6481 return json.Marshal(objectMap)
6482 }
6483
6484
6485 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6486 return nil, false
6487 }
6488
6489
6490 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6491 return nil, false
6492 }
6493
6494
6495 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6496 return nil, false
6497 }
6498
6499
6500 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6501 return nil, false
6502 }
6503
6504
6505 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6506 return &avwsagpi, true
6507 }
6508
6509
6510 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6511 return nil, false
6512 }
6513
6514
6515 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6516 return nil, false
6517 }
6518
6519
6520 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6521 return nil, false
6522 }
6523
6524
6525 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6526 return &avwsagpi, true
6527 }
6528
6529
6530 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6531 return nil, false
6532 }
6533
6534
6535 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6536 return nil, false
6537 }
6538
6539
6540 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6541 return nil, false
6542 }
6543
6544
6545 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6546 return nil, false
6547 }
6548
6549
6550 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6551 return nil, false
6552 }
6553
6554
6555 func (avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6556 return &avwsagpi, true
6557 }
6558
6559
6560
6561 type AzureVMWorkloadSQLDatabaseProtectableItem struct {
6562
6563 ParentName *string `json:"parentName,omitempty"`
6564
6565
6566 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
6567
6568 ServerName *string `json:"serverName,omitempty"`
6569
6570 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6571
6572 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
6573
6574 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6575
6576 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
6577
6578 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
6579
6580 BackupManagementType *string `json:"backupManagementType,omitempty"`
6581
6582 WorkloadType *string `json:"workloadType,omitempty"`
6583
6584 FriendlyName *string `json:"friendlyName,omitempty"`
6585
6586 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6587
6588 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
6589 }
6590
6591
6592 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) MarshalJSON() ([]byte, error) {
6593 avwsdpi.ProtectableItemType = ProtectableItemTypeSQLDataBase
6594 objectMap := make(map[string]interface{})
6595 if avwsdpi.ParentName != nil {
6596 objectMap["parentName"] = avwsdpi.ParentName
6597 }
6598 if avwsdpi.ParentUniqueName != nil {
6599 objectMap["parentUniqueName"] = avwsdpi.ParentUniqueName
6600 }
6601 if avwsdpi.ServerName != nil {
6602 objectMap["serverName"] = avwsdpi.ServerName
6603 }
6604 if avwsdpi.IsAutoProtectable != nil {
6605 objectMap["isAutoProtectable"] = avwsdpi.IsAutoProtectable
6606 }
6607 if avwsdpi.IsAutoProtected != nil {
6608 objectMap["isAutoProtected"] = avwsdpi.IsAutoProtected
6609 }
6610 if avwsdpi.Subinquireditemcount != nil {
6611 objectMap["subinquireditemcount"] = avwsdpi.Subinquireditemcount
6612 }
6613 if avwsdpi.Subprotectableitemcount != nil {
6614 objectMap["subprotectableitemcount"] = avwsdpi.Subprotectableitemcount
6615 }
6616 if avwsdpi.Prebackupvalidation != nil {
6617 objectMap["prebackupvalidation"] = avwsdpi.Prebackupvalidation
6618 }
6619 if avwsdpi.BackupManagementType != nil {
6620 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6621 }
6622 if avwsdpi.WorkloadType != nil {
6623 objectMap["workloadType"] = avwsdpi.WorkloadType
6624 }
6625 if avwsdpi.FriendlyName != nil {
6626 objectMap["friendlyName"] = avwsdpi.FriendlyName
6627 }
6628 if avwsdpi.ProtectionState != "" {
6629 objectMap["protectionState"] = avwsdpi.ProtectionState
6630 }
6631 if avwsdpi.ProtectableItemType != "" {
6632 objectMap["protectableItemType"] = avwsdpi.ProtectableItemType
6633 }
6634 return json.Marshal(objectMap)
6635 }
6636
6637
6638 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
6639 return nil, false
6640 }
6641
6642
6643 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
6644 return nil, false
6645 }
6646
6647
6648 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
6649 return nil, false
6650 }
6651
6652
6653 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
6654 return nil, false
6655 }
6656
6657
6658 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
6659 return &avwsdpi, true
6660 }
6661
6662
6663 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
6664 return nil, false
6665 }
6666
6667
6668 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
6669 return nil, false
6670 }
6671
6672
6673 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
6674 return nil, false
6675 }
6676
6677
6678 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
6679 return nil, false
6680 }
6681
6682
6683 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
6684 return &avwsdpi, true
6685 }
6686
6687
6688 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
6689 return nil, false
6690 }
6691
6692
6693 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
6694 return nil, false
6695 }
6696
6697
6698 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
6699 return nil, false
6700 }
6701
6702
6703 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
6704 return nil, false
6705 }
6706
6707
6708 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
6709 return &avwsdpi, true
6710 }
6711
6712
6713
6714 type AzureVMWorkloadSQLDatabaseProtectedItem struct {
6715
6716 FriendlyName *string `json:"friendlyName,omitempty"`
6717
6718 ServerName *string `json:"serverName,omitempty"`
6719
6720 ParentName *string `json:"parentName,omitempty"`
6721
6722 ParentType *string `json:"parentType,omitempty"`
6723
6724 ProtectionStatus *string `json:"protectionStatus,omitempty"`
6725
6726 ProtectionState ProtectionState `json:"protectionState,omitempty"`
6727
6728 LastBackupStatus LastBackupStatus `json:"lastBackupStatus,omitempty"`
6729
6730 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
6731
6732 LastBackupErrorDetail *ErrorDetail `json:"lastBackupErrorDetail,omitempty"`
6733
6734 ProtectedItemDataSourceID *string `json:"protectedItemDataSourceId,omitempty"`
6735
6736 ProtectedItemHealthStatus ProtectedItemHealthStatus `json:"protectedItemHealthStatus,omitempty"`
6737
6738 ExtendedInfo *AzureVMWorkloadProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
6739
6740 KpisHealths map[string]*KPIResourceHealthDetails `json:"kpisHealths"`
6741
6742 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
6743
6744 WorkloadType DataSourceType `json:"workloadType,omitempty"`
6745
6746 ContainerName *string `json:"containerName,omitempty"`
6747
6748 SourceResourceID *string `json:"sourceResourceId,omitempty"`
6749
6750 PolicyID *string `json:"policyId,omitempty"`
6751
6752 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
6753
6754 BackupSetName *string `json:"backupSetName,omitempty"`
6755
6756 CreateMode CreateMode `json:"createMode,omitempty"`
6757
6758 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
6759
6760 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
6761
6762 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
6763
6764 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
6765
6766 IsRehydrate *bool `json:"isRehydrate,omitempty"`
6767
6768 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
6769
6770 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
6771 }
6772
6773
6774 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) MarshalJSON() ([]byte, error) {
6775 avwsdpi.ProtectedItemType = ProtectedItemTypeAzureVMWorkloadSQLDatabase
6776 objectMap := make(map[string]interface{})
6777 if avwsdpi.FriendlyName != nil {
6778 objectMap["friendlyName"] = avwsdpi.FriendlyName
6779 }
6780 if avwsdpi.ServerName != nil {
6781 objectMap["serverName"] = avwsdpi.ServerName
6782 }
6783 if avwsdpi.ParentName != nil {
6784 objectMap["parentName"] = avwsdpi.ParentName
6785 }
6786 if avwsdpi.ParentType != nil {
6787 objectMap["parentType"] = avwsdpi.ParentType
6788 }
6789 if avwsdpi.ProtectionStatus != nil {
6790 objectMap["protectionStatus"] = avwsdpi.ProtectionStatus
6791 }
6792 if avwsdpi.ProtectionState != "" {
6793 objectMap["protectionState"] = avwsdpi.ProtectionState
6794 }
6795 if avwsdpi.LastBackupStatus != "" {
6796 objectMap["lastBackupStatus"] = avwsdpi.LastBackupStatus
6797 }
6798 if avwsdpi.LastBackupTime != nil {
6799 objectMap["lastBackupTime"] = avwsdpi.LastBackupTime
6800 }
6801 if avwsdpi.LastBackupErrorDetail != nil {
6802 objectMap["lastBackupErrorDetail"] = avwsdpi.LastBackupErrorDetail
6803 }
6804 if avwsdpi.ProtectedItemDataSourceID != nil {
6805 objectMap["protectedItemDataSourceId"] = avwsdpi.ProtectedItemDataSourceID
6806 }
6807 if avwsdpi.ProtectedItemHealthStatus != "" {
6808 objectMap["protectedItemHealthStatus"] = avwsdpi.ProtectedItemHealthStatus
6809 }
6810 if avwsdpi.ExtendedInfo != nil {
6811 objectMap["extendedInfo"] = avwsdpi.ExtendedInfo
6812 }
6813 if avwsdpi.KpisHealths != nil {
6814 objectMap["kpisHealths"] = avwsdpi.KpisHealths
6815 }
6816 if avwsdpi.BackupManagementType != "" {
6817 objectMap["backupManagementType"] = avwsdpi.BackupManagementType
6818 }
6819 if avwsdpi.WorkloadType != "" {
6820 objectMap["workloadType"] = avwsdpi.WorkloadType
6821 }
6822 if avwsdpi.ContainerName != nil {
6823 objectMap["containerName"] = avwsdpi.ContainerName
6824 }
6825 if avwsdpi.SourceResourceID != nil {
6826 objectMap["sourceResourceId"] = avwsdpi.SourceResourceID
6827 }
6828 if avwsdpi.PolicyID != nil {
6829 objectMap["policyId"] = avwsdpi.PolicyID
6830 }
6831 if avwsdpi.LastRecoveryPoint != nil {
6832 objectMap["lastRecoveryPoint"] = avwsdpi.LastRecoveryPoint
6833 }
6834 if avwsdpi.BackupSetName != nil {
6835 objectMap["backupSetName"] = avwsdpi.BackupSetName
6836 }
6837 if avwsdpi.CreateMode != "" {
6838 objectMap["createMode"] = avwsdpi.CreateMode
6839 }
6840 if avwsdpi.DeferredDeleteTimeInUTC != nil {
6841 objectMap["deferredDeleteTimeInUTC"] = avwsdpi.DeferredDeleteTimeInUTC
6842 }
6843 if avwsdpi.IsScheduledForDeferredDelete != nil {
6844 objectMap["isScheduledForDeferredDelete"] = avwsdpi.IsScheduledForDeferredDelete
6845 }
6846 if avwsdpi.DeferredDeleteTimeRemaining != nil {
6847 objectMap["deferredDeleteTimeRemaining"] = avwsdpi.DeferredDeleteTimeRemaining
6848 }
6849 if avwsdpi.IsDeferredDeleteScheduleUpcoming != nil {
6850 objectMap["isDeferredDeleteScheduleUpcoming"] = avwsdpi.IsDeferredDeleteScheduleUpcoming
6851 }
6852 if avwsdpi.IsRehydrate != nil {
6853 objectMap["isRehydrate"] = avwsdpi.IsRehydrate
6854 }
6855 if avwsdpi.ResourceGuardOperationRequests != nil {
6856 objectMap["resourceGuardOperationRequests"] = avwsdpi.ResourceGuardOperationRequests
6857 }
6858 if avwsdpi.ProtectedItemType != "" {
6859 objectMap["protectedItemType"] = avwsdpi.ProtectedItemType
6860 }
6861 return json.Marshal(objectMap)
6862 }
6863
6864
6865 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
6866 return nil, false
6867 }
6868
6869
6870 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
6871 return nil, false
6872 }
6873
6874
6875 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
6876 return nil, false
6877 }
6878
6879
6880 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
6881 return nil, false
6882 }
6883
6884
6885 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
6886 return nil, false
6887 }
6888
6889
6890 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
6891 return nil, false
6892 }
6893
6894
6895 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
6896 return nil, false
6897 }
6898
6899
6900 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
6901 return &avwsdpi, true
6902 }
6903
6904
6905 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
6906 return nil, false
6907 }
6908
6909
6910 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
6911 return nil, false
6912 }
6913
6914
6915 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
6916 return &avwsdpi, true
6917 }
6918
6919
6920 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
6921 return nil, false
6922 }
6923
6924
6925 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
6926 return nil, false
6927 }
6928
6929
6930 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
6931 return nil, false
6932 }
6933
6934
6935 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
6936 return nil, false
6937 }
6938
6939
6940 func (avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
6941 return &avwsdpi, true
6942 }
6943
6944
6945
6946 type AzureVMWorkloadSQLDatabaseWorkloadItem struct {
6947
6948 ParentName *string `json:"parentName,omitempty"`
6949
6950 ServerName *string `json:"serverName,omitempty"`
6951
6952 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
6953
6954 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
6955
6956 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
6957
6958 BackupManagementType *string `json:"backupManagementType,omitempty"`
6959
6960 WorkloadType *string `json:"workloadType,omitempty"`
6961
6962 FriendlyName *string `json:"friendlyName,omitempty"`
6963
6964 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
6965
6966 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
6967 }
6968
6969
6970 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) MarshalJSON() ([]byte, error) {
6971 avwsdwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase
6972 objectMap := make(map[string]interface{})
6973 if avwsdwi.ParentName != nil {
6974 objectMap["parentName"] = avwsdwi.ParentName
6975 }
6976 if avwsdwi.ServerName != nil {
6977 objectMap["serverName"] = avwsdwi.ServerName
6978 }
6979 if avwsdwi.IsAutoProtectable != nil {
6980 objectMap["isAutoProtectable"] = avwsdwi.IsAutoProtectable
6981 }
6982 if avwsdwi.Subinquireditemcount != nil {
6983 objectMap["subinquireditemcount"] = avwsdwi.Subinquireditemcount
6984 }
6985 if avwsdwi.SubWorkloadItemCount != nil {
6986 objectMap["subWorkloadItemCount"] = avwsdwi.SubWorkloadItemCount
6987 }
6988 if avwsdwi.BackupManagementType != nil {
6989 objectMap["backupManagementType"] = avwsdwi.BackupManagementType
6990 }
6991 if avwsdwi.WorkloadType != nil {
6992 objectMap["workloadType"] = avwsdwi.WorkloadType
6993 }
6994 if avwsdwi.FriendlyName != nil {
6995 objectMap["friendlyName"] = avwsdwi.FriendlyName
6996 }
6997 if avwsdwi.ProtectionState != "" {
6998 objectMap["protectionState"] = avwsdwi.ProtectionState
6999 }
7000 if avwsdwi.WorkloadItemType != "" {
7001 objectMap["workloadItemType"] = avwsdwi.WorkloadItemType
7002 }
7003 return json.Marshal(objectMap)
7004 }
7005
7006
7007 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
7008 return nil, false
7009 }
7010
7011
7012 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
7013 return &avwsdwi, true
7014 }
7015
7016
7017 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
7018 return nil, false
7019 }
7020
7021
7022 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
7023 return nil, false
7024 }
7025
7026
7027 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
7028 return nil, false
7029 }
7030
7031
7032 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
7033 return nil, false
7034 }
7035
7036
7037 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
7038 return &avwsdwi, true
7039 }
7040
7041
7042 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
7043 return nil, false
7044 }
7045
7046
7047 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
7048 return nil, false
7049 }
7050
7051
7052 func (avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
7053 return &avwsdwi, true
7054 }
7055
7056
7057
7058 type AzureVMWorkloadSQLInstanceProtectableItem struct {
7059
7060 ParentName *string `json:"parentName,omitempty"`
7061
7062
7063 ParentUniqueName *string `json:"parentUniqueName,omitempty"`
7064
7065 ServerName *string `json:"serverName,omitempty"`
7066
7067 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
7068
7069 IsAutoProtected *bool `json:"isAutoProtected,omitempty"`
7070
7071 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
7072
7073 Subprotectableitemcount *int32 `json:"subprotectableitemcount,omitempty"`
7074
7075 Prebackupvalidation *PreBackupValidation `json:"prebackupvalidation,omitempty"`
7076
7077 BackupManagementType *string `json:"backupManagementType,omitempty"`
7078
7079 WorkloadType *string `json:"workloadType,omitempty"`
7080
7081 FriendlyName *string `json:"friendlyName,omitempty"`
7082
7083 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7084
7085 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
7086 }
7087
7088
7089 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) MarshalJSON() ([]byte, error) {
7090 avwsipi.ProtectableItemType = ProtectableItemTypeSQLInstance
7091 objectMap := make(map[string]interface{})
7092 if avwsipi.ParentName != nil {
7093 objectMap["parentName"] = avwsipi.ParentName
7094 }
7095 if avwsipi.ParentUniqueName != nil {
7096 objectMap["parentUniqueName"] = avwsipi.ParentUniqueName
7097 }
7098 if avwsipi.ServerName != nil {
7099 objectMap["serverName"] = avwsipi.ServerName
7100 }
7101 if avwsipi.IsAutoProtectable != nil {
7102 objectMap["isAutoProtectable"] = avwsipi.IsAutoProtectable
7103 }
7104 if avwsipi.IsAutoProtected != nil {
7105 objectMap["isAutoProtected"] = avwsipi.IsAutoProtected
7106 }
7107 if avwsipi.Subinquireditemcount != nil {
7108 objectMap["subinquireditemcount"] = avwsipi.Subinquireditemcount
7109 }
7110 if avwsipi.Subprotectableitemcount != nil {
7111 objectMap["subprotectableitemcount"] = avwsipi.Subprotectableitemcount
7112 }
7113 if avwsipi.Prebackupvalidation != nil {
7114 objectMap["prebackupvalidation"] = avwsipi.Prebackupvalidation
7115 }
7116 if avwsipi.BackupManagementType != nil {
7117 objectMap["backupManagementType"] = avwsipi.BackupManagementType
7118 }
7119 if avwsipi.WorkloadType != nil {
7120 objectMap["workloadType"] = avwsipi.WorkloadType
7121 }
7122 if avwsipi.FriendlyName != nil {
7123 objectMap["friendlyName"] = avwsipi.FriendlyName
7124 }
7125 if avwsipi.ProtectionState != "" {
7126 objectMap["protectionState"] = avwsipi.ProtectionState
7127 }
7128 if avwsipi.ProtectableItemType != "" {
7129 objectMap["protectableItemType"] = avwsipi.ProtectableItemType
7130 }
7131 return json.Marshal(objectMap)
7132 }
7133
7134
7135 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
7136 return nil, false
7137 }
7138
7139
7140 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
7141 return nil, false
7142 }
7143
7144
7145 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
7146 return nil, false
7147 }
7148
7149
7150 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
7151 return nil, false
7152 }
7153
7154
7155 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
7156 return &avwsipi, true
7157 }
7158
7159
7160 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
7161 return nil, false
7162 }
7163
7164
7165 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
7166 return nil, false
7167 }
7168
7169
7170 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
7171 return nil, false
7172 }
7173
7174
7175 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
7176 return nil, false
7177 }
7178
7179
7180 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
7181 return nil, false
7182 }
7183
7184
7185 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
7186 return &avwsipi, true
7187 }
7188
7189
7190 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
7191 return nil, false
7192 }
7193
7194
7195 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
7196 return nil, false
7197 }
7198
7199
7200 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
7201 return nil, false
7202 }
7203
7204
7205 func (avwsipi AzureVMWorkloadSQLInstanceProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
7206 return &avwsipi, true
7207 }
7208
7209
7210
7211 type AzureVMWorkloadSQLInstanceWorkloadItem struct {
7212
7213 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
7214
7215 ParentName *string `json:"parentName,omitempty"`
7216
7217 ServerName *string `json:"serverName,omitempty"`
7218
7219 IsAutoProtectable *bool `json:"isAutoProtectable,omitempty"`
7220
7221 Subinquireditemcount *int32 `json:"subinquireditemcount,omitempty"`
7222
7223 SubWorkloadItemCount *int32 `json:"subWorkloadItemCount,omitempty"`
7224
7225 BackupManagementType *string `json:"backupManagementType,omitempty"`
7226
7227 WorkloadType *string `json:"workloadType,omitempty"`
7228
7229 FriendlyName *string `json:"friendlyName,omitempty"`
7230
7231 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7232
7233 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
7234 }
7235
7236
7237 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) MarshalJSON() ([]byte, error) {
7238 avwsiwi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance
7239 objectMap := make(map[string]interface{})
7240 if avwsiwi.DataDirectoryPaths != nil {
7241 objectMap["dataDirectoryPaths"] = avwsiwi.DataDirectoryPaths
7242 }
7243 if avwsiwi.ParentName != nil {
7244 objectMap["parentName"] = avwsiwi.ParentName
7245 }
7246 if avwsiwi.ServerName != nil {
7247 objectMap["serverName"] = avwsiwi.ServerName
7248 }
7249 if avwsiwi.IsAutoProtectable != nil {
7250 objectMap["isAutoProtectable"] = avwsiwi.IsAutoProtectable
7251 }
7252 if avwsiwi.Subinquireditemcount != nil {
7253 objectMap["subinquireditemcount"] = avwsiwi.Subinquireditemcount
7254 }
7255 if avwsiwi.SubWorkloadItemCount != nil {
7256 objectMap["subWorkloadItemCount"] = avwsiwi.SubWorkloadItemCount
7257 }
7258 if avwsiwi.BackupManagementType != nil {
7259 objectMap["backupManagementType"] = avwsiwi.BackupManagementType
7260 }
7261 if avwsiwi.WorkloadType != nil {
7262 objectMap["workloadType"] = avwsiwi.WorkloadType
7263 }
7264 if avwsiwi.FriendlyName != nil {
7265 objectMap["friendlyName"] = avwsiwi.FriendlyName
7266 }
7267 if avwsiwi.ProtectionState != "" {
7268 objectMap["protectionState"] = avwsiwi.ProtectionState
7269 }
7270 if avwsiwi.WorkloadItemType != "" {
7271 objectMap["workloadItemType"] = avwsiwi.WorkloadItemType
7272 }
7273 return json.Marshal(objectMap)
7274 }
7275
7276
7277 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
7278 return nil, false
7279 }
7280
7281
7282 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
7283 return &avwsiwi, true
7284 }
7285
7286
7287 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
7288 return nil, false
7289 }
7290
7291
7292 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
7293 return nil, false
7294 }
7295
7296
7297 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
7298 return nil, false
7299 }
7300
7301
7302 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
7303 return nil, false
7304 }
7305
7306
7307 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
7308 return nil, false
7309 }
7310
7311
7312 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
7313 return &avwsiwi, true
7314 }
7315
7316
7317 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
7318 return nil, false
7319 }
7320
7321
7322 func (avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
7323 return &avwsiwi, true
7324 }
7325
7326
7327 type BasicAzureWorkloadAutoProtectionIntent interface {
7328 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
7329 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
7330 }
7331
7332
7333 type AzureWorkloadAutoProtectionIntent struct {
7334
7335 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7336
7337 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7338
7339 ItemID *string `json:"itemId,omitempty"`
7340
7341 PolicyID *string `json:"policyId,omitempty"`
7342
7343 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
7344
7345 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
7346 }
7347
7348 func unmarshalBasicAzureWorkloadAutoProtectionIntent(body []byte) (BasicAzureWorkloadAutoProtectionIntent, error) {
7349 var m map[string]interface{}
7350 err := json.Unmarshal(body, &m)
7351 if err != nil {
7352 return nil, err
7353 }
7354
7355 switch m["protectionIntentItemType"] {
7356 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
7357 var awsapi AzureWorkloadSQLAutoProtectionIntent
7358 err := json.Unmarshal(body, &awsapi)
7359 return awsapi, err
7360 default:
7361 var awapi AzureWorkloadAutoProtectionIntent
7362 err := json.Unmarshal(body, &awapi)
7363 return awapi, err
7364 }
7365 }
7366 func unmarshalBasicAzureWorkloadAutoProtectionIntentArray(body []byte) ([]BasicAzureWorkloadAutoProtectionIntent, error) {
7367 var rawMessages []*json.RawMessage
7368 err := json.Unmarshal(body, &rawMessages)
7369 if err != nil {
7370 return nil, err
7371 }
7372
7373 awapiArray := make([]BasicAzureWorkloadAutoProtectionIntent, len(rawMessages))
7374
7375 for index, rawMessage := range rawMessages {
7376 awapi, err := unmarshalBasicAzureWorkloadAutoProtectionIntent(*rawMessage)
7377 if err != nil {
7378 return nil, err
7379 }
7380 awapiArray[index] = awapi
7381 }
7382 return awapiArray, nil
7383 }
7384
7385
7386 func (awapi AzureWorkloadAutoProtectionIntent) MarshalJSON() ([]byte, error) {
7387 awapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent
7388 objectMap := make(map[string]interface{})
7389 if awapi.BackupManagementType != "" {
7390 objectMap["backupManagementType"] = awapi.BackupManagementType
7391 }
7392 if awapi.SourceResourceID != nil {
7393 objectMap["sourceResourceId"] = awapi.SourceResourceID
7394 }
7395 if awapi.ItemID != nil {
7396 objectMap["itemId"] = awapi.ItemID
7397 }
7398 if awapi.PolicyID != nil {
7399 objectMap["policyId"] = awapi.PolicyID
7400 }
7401 if awapi.ProtectionState != "" {
7402 objectMap["protectionState"] = awapi.ProtectionState
7403 }
7404 if awapi.ProtectionIntentItemType != "" {
7405 objectMap["protectionIntentItemType"] = awapi.ProtectionIntentItemType
7406 }
7407 return json.Marshal(objectMap)
7408 }
7409
7410
7411 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
7412 return nil, false
7413 }
7414
7415
7416 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
7417 return &awapi, true
7418 }
7419
7420
7421 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
7422 return nil, false
7423 }
7424
7425
7426 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
7427 return &awapi, true
7428 }
7429
7430
7431 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
7432 return &awapi, true
7433 }
7434
7435
7436 func (awapi AzureWorkloadAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
7437 return nil, false
7438 }
7439
7440
7441 func (awapi AzureWorkloadAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
7442 return nil, false
7443 }
7444
7445
7446 func (awapi AzureWorkloadAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
7447 return &awapi, true
7448 }
7449
7450
7451 type AzureWorkloadBackupRequest struct {
7452
7453 BackupType TypeEnum `json:"backupType,omitempty"`
7454
7455 EnableCompression *bool `json:"enableCompression,omitempty"`
7456
7457 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
7458
7459 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
7460 }
7461
7462
7463 func (awbr AzureWorkloadBackupRequest) MarshalJSON() ([]byte, error) {
7464 awbr.ObjectType = ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest
7465 objectMap := make(map[string]interface{})
7466 if awbr.BackupType != "" {
7467 objectMap["backupType"] = awbr.BackupType
7468 }
7469 if awbr.EnableCompression != nil {
7470 objectMap["enableCompression"] = awbr.EnableCompression
7471 }
7472 if awbr.RecoveryPointExpiryTimeInUTC != nil {
7473 objectMap["recoveryPointExpiryTimeInUTC"] = awbr.RecoveryPointExpiryTimeInUTC
7474 }
7475 if awbr.ObjectType != "" {
7476 objectMap["objectType"] = awbr.ObjectType
7477 }
7478 return json.Marshal(objectMap)
7479 }
7480
7481
7482 func (awbr AzureWorkloadBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
7483 return nil, false
7484 }
7485
7486
7487 func (awbr AzureWorkloadBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
7488 return &awbr, true
7489 }
7490
7491
7492 func (awbr AzureWorkloadBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
7493 return nil, false
7494 }
7495
7496
7497 func (awbr AzureWorkloadBackupRequest) AsRequest() (*Request, bool) {
7498 return nil, false
7499 }
7500
7501
7502 func (awbr AzureWorkloadBackupRequest) AsBasicRequest() (BasicRequest, bool) {
7503 return &awbr, true
7504 }
7505
7506
7507 type BasicAzureWorkloadContainer interface {
7508 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
7509 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
7510 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
7511 }
7512
7513
7514 type AzureWorkloadContainer struct {
7515
7516 SourceResourceID *string `json:"sourceResourceId,omitempty"`
7517
7518 LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
7519
7520 ExtendedInfo *AzureWorkloadContainerExtendedInfo `json:"extendedInfo,omitempty"`
7521
7522 WorkloadType WorkloadType `json:"workloadType,omitempty"`
7523
7524 OperationType OperationType `json:"operationType,omitempty"`
7525
7526 FriendlyName *string `json:"friendlyName,omitempty"`
7527
7528 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7529
7530 RegistrationStatus *string `json:"registrationStatus,omitempty"`
7531
7532 HealthStatus *string `json:"healthStatus,omitempty"`
7533
7534 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
7535 }
7536
7537 func unmarshalBasicAzureWorkloadContainer(body []byte) (BasicAzureWorkloadContainer, error) {
7538 var m map[string]interface{}
7539 err := json.Unmarshal(body, &m)
7540 if err != nil {
7541 return nil, err
7542 }
7543
7544 switch m["containerType"] {
7545 case string(ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer):
7546 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
7547 err := json.Unmarshal(body, &aswcpc)
7548 return aswcpc, err
7549 case string(ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer):
7550 var avacpc AzureVMAppContainerProtectionContainer
7551 err := json.Unmarshal(body, &avacpc)
7552 return avacpc, err
7553 default:
7554 var awc AzureWorkloadContainer
7555 err := json.Unmarshal(body, &awc)
7556 return awc, err
7557 }
7558 }
7559 func unmarshalBasicAzureWorkloadContainerArray(body []byte) ([]BasicAzureWorkloadContainer, error) {
7560 var rawMessages []*json.RawMessage
7561 err := json.Unmarshal(body, &rawMessages)
7562 if err != nil {
7563 return nil, err
7564 }
7565
7566 awcArray := make([]BasicAzureWorkloadContainer, len(rawMessages))
7567
7568 for index, rawMessage := range rawMessages {
7569 awc, err := unmarshalBasicAzureWorkloadContainer(*rawMessage)
7570 if err != nil {
7571 return nil, err
7572 }
7573 awcArray[index] = awc
7574 }
7575 return awcArray, nil
7576 }
7577
7578
7579 func (awc AzureWorkloadContainer) MarshalJSON() ([]byte, error) {
7580 awc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer
7581 objectMap := make(map[string]interface{})
7582 if awc.SourceResourceID != nil {
7583 objectMap["sourceResourceId"] = awc.SourceResourceID
7584 }
7585 if awc.LastUpdatedTime != nil {
7586 objectMap["lastUpdatedTime"] = awc.LastUpdatedTime
7587 }
7588 if awc.ExtendedInfo != nil {
7589 objectMap["extendedInfo"] = awc.ExtendedInfo
7590 }
7591 if awc.WorkloadType != "" {
7592 objectMap["workloadType"] = awc.WorkloadType
7593 }
7594 if awc.OperationType != "" {
7595 objectMap["operationType"] = awc.OperationType
7596 }
7597 if awc.FriendlyName != nil {
7598 objectMap["friendlyName"] = awc.FriendlyName
7599 }
7600 if awc.BackupManagementType != "" {
7601 objectMap["backupManagementType"] = awc.BackupManagementType
7602 }
7603 if awc.RegistrationStatus != nil {
7604 objectMap["registrationStatus"] = awc.RegistrationStatus
7605 }
7606 if awc.HealthStatus != nil {
7607 objectMap["healthStatus"] = awc.HealthStatus
7608 }
7609 if awc.ContainerType != "" {
7610 objectMap["containerType"] = awc.ContainerType
7611 }
7612 return json.Marshal(objectMap)
7613 }
7614
7615
7616 func (awc AzureWorkloadContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
7617 return nil, false
7618 }
7619
7620
7621 func (awc AzureWorkloadContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
7622 return nil, false
7623 }
7624
7625
7626 func (awc AzureWorkloadContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
7627 return nil, false
7628 }
7629
7630
7631 func (awc AzureWorkloadContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
7632 return nil, false
7633 }
7634
7635
7636 func (awc AzureWorkloadContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
7637 return nil, false
7638 }
7639
7640
7641 func (awc AzureWorkloadContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
7642 return nil, false
7643 }
7644
7645
7646 func (awc AzureWorkloadContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
7647 return nil, false
7648 }
7649
7650
7651 func (awc AzureWorkloadContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
7652 return &awc, true
7653 }
7654
7655
7656 func (awc AzureWorkloadContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
7657 return &awc, true
7658 }
7659
7660
7661 func (awc AzureWorkloadContainer) AsDpmContainer() (*DpmContainer, bool) {
7662 return nil, false
7663 }
7664
7665
7666 func (awc AzureWorkloadContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
7667 return nil, false
7668 }
7669
7670
7671 func (awc AzureWorkloadContainer) AsGenericContainer() (*GenericContainer, bool) {
7672 return nil, false
7673 }
7674
7675
7676 func (awc AzureWorkloadContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
7677 return nil, false
7678 }
7679
7680
7681 func (awc AzureWorkloadContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
7682 return nil, false
7683 }
7684
7685
7686 func (awc AzureWorkloadContainer) AsMabContainer() (*MabContainer, bool) {
7687 return nil, false
7688 }
7689
7690
7691 func (awc AzureWorkloadContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
7692 return nil, false
7693 }
7694
7695
7696 func (awc AzureWorkloadContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
7697 return &awc, true
7698 }
7699
7700
7701 type AzureWorkloadContainerExtendedInfo struct {
7702
7703 HostServerName *string `json:"hostServerName,omitempty"`
7704
7705 InquiryInfo *InquiryInfo `json:"inquiryInfo,omitempty"`
7706
7707 NodesList *[]DistributedNodesInfo `json:"nodesList,omitempty"`
7708 }
7709
7710
7711 type AzureWorkloadErrorInfo struct {
7712
7713 ErrorCode *int32 `json:"errorCode,omitempty"`
7714
7715 ErrorString *string `json:"errorString,omitempty"`
7716
7717 ErrorTitle *string `json:"errorTitle,omitempty"`
7718
7719 Recommendations *[]string `json:"recommendations,omitempty"`
7720
7721 AdditionalDetails *string `json:"additionalDetails,omitempty"`
7722 }
7723
7724
7725 type AzureWorkloadJob struct {
7726
7727 WorkloadType *string `json:"workloadType,omitempty"`
7728
7729 Duration *string `json:"duration,omitempty"`
7730
7731 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
7732
7733 ErrorDetails *[]AzureWorkloadErrorInfo `json:"errorDetails,omitempty"`
7734
7735 ExtendedInfo *AzureWorkloadJobExtendedInfo `json:"extendedInfo,omitempty"`
7736
7737 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
7738
7739 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
7740
7741 Operation *string `json:"operation,omitempty"`
7742
7743 Status *string `json:"status,omitempty"`
7744
7745 StartTime *date.Time `json:"startTime,omitempty"`
7746
7747 EndTime *date.Time `json:"endTime,omitempty"`
7748
7749 ActivityID *string `json:"activityId,omitempty"`
7750
7751 JobType JobType `json:"jobType,omitempty"`
7752 }
7753
7754
7755 func (awj AzureWorkloadJob) MarshalJSON() ([]byte, error) {
7756 awj.JobType = JobTypeAzureWorkloadJob
7757 objectMap := make(map[string]interface{})
7758 if awj.WorkloadType != nil {
7759 objectMap["workloadType"] = awj.WorkloadType
7760 }
7761 if awj.Duration != nil {
7762 objectMap["duration"] = awj.Duration
7763 }
7764 if awj.ActionsInfo != nil {
7765 objectMap["actionsInfo"] = awj.ActionsInfo
7766 }
7767 if awj.ErrorDetails != nil {
7768 objectMap["errorDetails"] = awj.ErrorDetails
7769 }
7770 if awj.ExtendedInfo != nil {
7771 objectMap["extendedInfo"] = awj.ExtendedInfo
7772 }
7773 if awj.EntityFriendlyName != nil {
7774 objectMap["entityFriendlyName"] = awj.EntityFriendlyName
7775 }
7776 if awj.BackupManagementType != "" {
7777 objectMap["backupManagementType"] = awj.BackupManagementType
7778 }
7779 if awj.Operation != nil {
7780 objectMap["operation"] = awj.Operation
7781 }
7782 if awj.Status != nil {
7783 objectMap["status"] = awj.Status
7784 }
7785 if awj.StartTime != nil {
7786 objectMap["startTime"] = awj.StartTime
7787 }
7788 if awj.EndTime != nil {
7789 objectMap["endTime"] = awj.EndTime
7790 }
7791 if awj.ActivityID != nil {
7792 objectMap["activityId"] = awj.ActivityID
7793 }
7794 if awj.JobType != "" {
7795 objectMap["jobType"] = awj.JobType
7796 }
7797 return json.Marshal(objectMap)
7798 }
7799
7800
7801 func (awj AzureWorkloadJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
7802 return nil, false
7803 }
7804
7805
7806 func (awj AzureWorkloadJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
7807 return nil, false
7808 }
7809
7810
7811 func (awj AzureWorkloadJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
7812 return &awj, true
7813 }
7814
7815
7816 func (awj AzureWorkloadJob) AsDpmJob() (*DpmJob, bool) {
7817 return nil, false
7818 }
7819
7820
7821 func (awj AzureWorkloadJob) AsMabJob() (*MabJob, bool) {
7822 return nil, false
7823 }
7824
7825
7826 func (awj AzureWorkloadJob) AsVaultJob() (*VaultJob, bool) {
7827 return nil, false
7828 }
7829
7830
7831 func (awj AzureWorkloadJob) AsJob() (*Job, bool) {
7832 return nil, false
7833 }
7834
7835
7836 func (awj AzureWorkloadJob) AsBasicJob() (BasicJob, bool) {
7837 return &awj, true
7838 }
7839
7840
7841 type AzureWorkloadJobExtendedInfo struct {
7842
7843 TasksList *[]AzureWorkloadJobTaskDetails `json:"tasksList,omitempty"`
7844
7845 PropertyBag map[string]*string `json:"propertyBag"`
7846
7847 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
7848 }
7849
7850
7851 func (awjei AzureWorkloadJobExtendedInfo) MarshalJSON() ([]byte, error) {
7852 objectMap := make(map[string]interface{})
7853 if awjei.TasksList != nil {
7854 objectMap["tasksList"] = awjei.TasksList
7855 }
7856 if awjei.PropertyBag != nil {
7857 objectMap["propertyBag"] = awjei.PropertyBag
7858 }
7859 if awjei.DynamicErrorMessage != nil {
7860 objectMap["dynamicErrorMessage"] = awjei.DynamicErrorMessage
7861 }
7862 return json.Marshal(objectMap)
7863 }
7864
7865
7866 type AzureWorkloadJobTaskDetails struct {
7867
7868 TaskID *string `json:"taskId,omitempty"`
7869
7870 Status *string `json:"status,omitempty"`
7871 }
7872
7873
7874 type BasicAzureWorkloadPointInTimeRecoveryPoint interface {
7875 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
7876 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
7877 }
7878
7879
7880 type AzureWorkloadPointInTimeRecoveryPoint struct {
7881
7882 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
7883
7884 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
7885
7886 Type RestorePointType `json:"type,omitempty"`
7887
7888 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
7889
7890 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
7891
7892 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
7893 }
7894
7895 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(body []byte) (BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
7896 var m map[string]interface{}
7897 err := json.Unmarshal(body, &m)
7898 if err != nil {
7899 return nil, err
7900 }
7901
7902 switch m["objectType"] {
7903 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
7904 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
7905 err := json.Unmarshal(body, &awshpitrp)
7906 return awshpitrp, err
7907 default:
7908 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
7909 err := json.Unmarshal(body, &awpitrp)
7910 return awpitrp, err
7911 }
7912 }
7913 func unmarshalBasicAzureWorkloadPointInTimeRecoveryPointArray(body []byte) ([]BasicAzureWorkloadPointInTimeRecoveryPoint, error) {
7914 var rawMessages []*json.RawMessage
7915 err := json.Unmarshal(body, &rawMessages)
7916 if err != nil {
7917 return nil, err
7918 }
7919
7920 awpitrpArray := make([]BasicAzureWorkloadPointInTimeRecoveryPoint, len(rawMessages))
7921
7922 for index, rawMessage := range rawMessages {
7923 awpitrp, err := unmarshalBasicAzureWorkloadPointInTimeRecoveryPoint(*rawMessage)
7924 if err != nil {
7925 return nil, err
7926 }
7927 awpitrpArray[index] = awpitrp
7928 }
7929 return awpitrpArray, nil
7930 }
7931
7932
7933 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
7934 awpitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint
7935 objectMap := make(map[string]interface{})
7936 if awpitrp.TimeRanges != nil {
7937 objectMap["timeRanges"] = awpitrp.TimeRanges
7938 }
7939 if awpitrp.RecoveryPointTierDetails != nil {
7940 objectMap["recoveryPointTierDetails"] = awpitrp.RecoveryPointTierDetails
7941 }
7942 if awpitrp.RecoveryPointMoveReadinessInfo != nil {
7943 objectMap["recoveryPointMoveReadinessInfo"] = awpitrp.RecoveryPointMoveReadinessInfo
7944 }
7945 if awpitrp.ObjectType != "" {
7946 objectMap["objectType"] = awpitrp.ObjectType
7947 }
7948 return json.Marshal(objectMap)
7949 }
7950
7951
7952 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
7953 return nil, false
7954 }
7955
7956
7957 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
7958 return &awpitrp, true
7959 }
7960
7961
7962 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
7963 return &awpitrp, true
7964 }
7965
7966
7967 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
7968 return nil, false
7969 }
7970
7971
7972 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
7973 return &awpitrp, true
7974 }
7975
7976
7977 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
7978 return nil, false
7979 }
7980
7981
7982 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
7983 return nil, false
7984 }
7985
7986
7987 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
7988 return nil, false
7989 }
7990
7991
7992 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
7993 return nil, false
7994 }
7995
7996
7997 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
7998 return nil, false
7999 }
8000
8001
8002 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8003 return nil, false
8004 }
8005
8006
8007 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8008 return nil, false
8009 }
8010
8011
8012 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8013 return nil, false
8014 }
8015
8016
8017 func (awpitrp AzureWorkloadPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8018 return &awpitrp, true
8019 }
8020
8021
8022
8023 type AzureWorkloadPointInTimeRestoreRequest struct {
8024
8025 PointInTime *date.Time `json:"pointInTime,omitempty"`
8026
8027 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8028
8029 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8030
8031 PropertyBag map[string]*string `json:"propertyBag"`
8032
8033 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8034
8035 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8036
8037
8038 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8039
8040 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8041 }
8042
8043
8044 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
8045 awpitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest
8046 objectMap := make(map[string]interface{})
8047 if awpitrr.PointInTime != nil {
8048 objectMap["pointInTime"] = awpitrr.PointInTime
8049 }
8050 if awpitrr.RecoveryType != "" {
8051 objectMap["recoveryType"] = awpitrr.RecoveryType
8052 }
8053 if awpitrr.SourceResourceID != nil {
8054 objectMap["sourceResourceId"] = awpitrr.SourceResourceID
8055 }
8056 if awpitrr.PropertyBag != nil {
8057 objectMap["propertyBag"] = awpitrr.PropertyBag
8058 }
8059 if awpitrr.TargetInfo != nil {
8060 objectMap["targetInfo"] = awpitrr.TargetInfo
8061 }
8062 if awpitrr.RecoveryMode != "" {
8063 objectMap["recoveryMode"] = awpitrr.RecoveryMode
8064 }
8065 if awpitrr.TargetVirtualMachineID != nil {
8066 objectMap["targetVirtualMachineId"] = awpitrr.TargetVirtualMachineID
8067 }
8068 if awpitrr.ObjectType != "" {
8069 objectMap["objectType"] = awpitrr.ObjectType
8070 }
8071 return json.Marshal(objectMap)
8072 }
8073
8074
8075 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8076 return nil, false
8077 }
8078
8079
8080 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8081 return &awpitrr, true
8082 }
8083
8084
8085 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8086 return nil, false
8087 }
8088
8089
8090 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8091 return &awpitrr, true
8092 }
8093
8094
8095 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8096 return nil, false
8097 }
8098
8099
8100 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8101 return nil, false
8102 }
8103
8104
8105 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8106 return nil, false
8107 }
8108
8109
8110 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8111 return nil, false
8112 }
8113
8114
8115 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8116 return nil, false
8117 }
8118
8119
8120 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8121 return nil, false
8122 }
8123
8124
8125 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8126 return nil, false
8127 }
8128
8129
8130 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8131 return nil, false
8132 }
8133
8134
8135 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8136 return nil, false
8137 }
8138
8139
8140 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8141 return nil, false
8142 }
8143
8144
8145 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8146 return nil, false
8147 }
8148
8149
8150 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8151 return nil, false
8152 }
8153
8154
8155 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8156 return nil, false
8157 }
8158
8159
8160 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8161 return nil, false
8162 }
8163
8164
8165 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8166 return nil, false
8167 }
8168
8169
8170 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8171 return nil, false
8172 }
8173
8174
8175 func (awpitrr AzureWorkloadPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8176 return &awpitrr, true
8177 }
8178
8179
8180 type BasicAzureWorkloadRecoveryPoint interface {
8181 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
8182 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
8183 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
8184 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
8185 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
8186 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
8187 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
8188 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
8189 }
8190
8191
8192
8193 type AzureWorkloadRecoveryPoint struct {
8194
8195 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8196
8197 Type RestorePointType `json:"type,omitempty"`
8198
8199 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
8200
8201 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8202
8203 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8204 }
8205
8206 func unmarshalBasicAzureWorkloadRecoveryPoint(body []byte) (BasicAzureWorkloadRecoveryPoint, error) {
8207 var m map[string]interface{}
8208 err := json.Unmarshal(body, &m)
8209 if err != nil {
8210 return nil, err
8211 }
8212
8213 switch m["objectType"] {
8214 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
8215 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
8216 err := json.Unmarshal(body, &awpitrp)
8217 return awpitrp, err
8218 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
8219 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
8220 err := json.Unmarshal(body, &awshpitrp)
8221 return awshpitrp, err
8222 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
8223 var awshrp AzureWorkloadSAPHanaRecoveryPoint
8224 err := json.Unmarshal(body, &awshrp)
8225 return awshrp, err
8226 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
8227 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
8228 err := json.Unmarshal(body, &awspitrp)
8229 return awspitrp, err
8230 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint):
8231 var awsrp AzureWorkloadSQLRecoveryPoint
8232 err := json.Unmarshal(body, &awsrp)
8233 return awsrp, err
8234 default:
8235 var awrp AzureWorkloadRecoveryPoint
8236 err := json.Unmarshal(body, &awrp)
8237 return awrp, err
8238 }
8239 }
8240 func unmarshalBasicAzureWorkloadRecoveryPointArray(body []byte) ([]BasicAzureWorkloadRecoveryPoint, error) {
8241 var rawMessages []*json.RawMessage
8242 err := json.Unmarshal(body, &rawMessages)
8243 if err != nil {
8244 return nil, err
8245 }
8246
8247 awrpArray := make([]BasicAzureWorkloadRecoveryPoint, len(rawMessages))
8248
8249 for index, rawMessage := range rawMessages {
8250 awrp, err := unmarshalBasicAzureWorkloadRecoveryPoint(*rawMessage)
8251 if err != nil {
8252 return nil, err
8253 }
8254 awrpArray[index] = awrp
8255 }
8256 return awrpArray, nil
8257 }
8258
8259
8260 func (awrp AzureWorkloadRecoveryPoint) MarshalJSON() ([]byte, error) {
8261 awrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint
8262 objectMap := make(map[string]interface{})
8263 if awrp.RecoveryPointTierDetails != nil {
8264 objectMap["recoveryPointTierDetails"] = awrp.RecoveryPointTierDetails
8265 }
8266 if awrp.RecoveryPointMoveReadinessInfo != nil {
8267 objectMap["recoveryPointMoveReadinessInfo"] = awrp.RecoveryPointMoveReadinessInfo
8268 }
8269 if awrp.ObjectType != "" {
8270 objectMap["objectType"] = awrp.ObjectType
8271 }
8272 return json.Marshal(objectMap)
8273 }
8274
8275
8276 func (awrp AzureWorkloadRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8277 return nil, false
8278 }
8279
8280
8281 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8282 return nil, false
8283 }
8284
8285
8286 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8287 return nil, false
8288 }
8289
8290
8291 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8292 return &awrp, true
8293 }
8294
8295
8296 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8297 return &awrp, true
8298 }
8299
8300
8301 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8302 return nil, false
8303 }
8304
8305
8306 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8307 return nil, false
8308 }
8309
8310
8311 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8312 return nil, false
8313 }
8314
8315
8316 func (awrp AzureWorkloadRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8317 return nil, false
8318 }
8319
8320
8321 func (awrp AzureWorkloadRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8322 return nil, false
8323 }
8324
8325
8326 func (awrp AzureWorkloadRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8327 return nil, false
8328 }
8329
8330
8331 func (awrp AzureWorkloadRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8332 return nil, false
8333 }
8334
8335
8336 func (awrp AzureWorkloadRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8337 return nil, false
8338 }
8339
8340
8341 func (awrp AzureWorkloadRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8342 return &awrp, true
8343 }
8344
8345
8346 type BasicAzureWorkloadRestoreRequest interface {
8347 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
8348 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8349 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8350 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
8351 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
8352 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
8353 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
8354 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
8355 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
8356 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
8357 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
8358 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
8359 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
8360 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
8361 }
8362
8363
8364 type AzureWorkloadRestoreRequest struct {
8365
8366 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8367
8368 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8369
8370 PropertyBag map[string]*string `json:"propertyBag"`
8371
8372 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8373
8374 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8375
8376
8377 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8378
8379 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8380 }
8381
8382 func unmarshalBasicAzureWorkloadRestoreRequest(body []byte) (BasicAzureWorkloadRestoreRequest, error) {
8383 var m map[string]interface{}
8384 err := json.Unmarshal(body, &m)
8385 if err != nil {
8386 return nil, err
8387 }
8388
8389 switch m["objectType"] {
8390 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest):
8391 var awpitrr AzureWorkloadPointInTimeRestoreRequest
8392 err := json.Unmarshal(body, &awpitrr)
8393 return awpitrr, err
8394 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
8395 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8396 err := json.Unmarshal(body, &awshpitrr)
8397 return awshpitrr, err
8398 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest):
8399 var awshrr AzureWorkloadSAPHanaRestoreRequest
8400 err := json.Unmarshal(body, &awshrr)
8401 return awshrr, err
8402 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
8403 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
8404 err := json.Unmarshal(body, &awspitrr)
8405 return awspitrr, err
8406 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest):
8407 var awsrr AzureWorkloadSQLRestoreRequest
8408 err := json.Unmarshal(body, &awsrr)
8409 return awsrr, err
8410 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
8411 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
8412 err := json.Unmarshal(body, &awshpitrwrr)
8413 return awshpitrwrr, err
8414 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
8415 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
8416 err := json.Unmarshal(body, &awshrwrr)
8417 return awshrwrr, err
8418 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
8419 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
8420 err := json.Unmarshal(body, &awspitrwrr)
8421 return awspitrwrr, err
8422 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
8423 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
8424 err := json.Unmarshal(body, &awsrwrr)
8425 return awsrwrr, err
8426 default:
8427 var awrr AzureWorkloadRestoreRequest
8428 err := json.Unmarshal(body, &awrr)
8429 return awrr, err
8430 }
8431 }
8432 func unmarshalBasicAzureWorkloadRestoreRequestArray(body []byte) ([]BasicAzureWorkloadRestoreRequest, error) {
8433 var rawMessages []*json.RawMessage
8434 err := json.Unmarshal(body, &rawMessages)
8435 if err != nil {
8436 return nil, err
8437 }
8438
8439 awrrArray := make([]BasicAzureWorkloadRestoreRequest, len(rawMessages))
8440
8441 for index, rawMessage := range rawMessages {
8442 awrr, err := unmarshalBasicAzureWorkloadRestoreRequest(*rawMessage)
8443 if err != nil {
8444 return nil, err
8445 }
8446 awrrArray[index] = awrr
8447 }
8448 return awrrArray, nil
8449 }
8450
8451
8452 func (awrr AzureWorkloadRestoreRequest) MarshalJSON() ([]byte, error) {
8453 awrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest
8454 objectMap := make(map[string]interface{})
8455 if awrr.RecoveryType != "" {
8456 objectMap["recoveryType"] = awrr.RecoveryType
8457 }
8458 if awrr.SourceResourceID != nil {
8459 objectMap["sourceResourceId"] = awrr.SourceResourceID
8460 }
8461 if awrr.PropertyBag != nil {
8462 objectMap["propertyBag"] = awrr.PropertyBag
8463 }
8464 if awrr.TargetInfo != nil {
8465 objectMap["targetInfo"] = awrr.TargetInfo
8466 }
8467 if awrr.RecoveryMode != "" {
8468 objectMap["recoveryMode"] = awrr.RecoveryMode
8469 }
8470 if awrr.TargetVirtualMachineID != nil {
8471 objectMap["targetVirtualMachineId"] = awrr.TargetVirtualMachineID
8472 }
8473 if awrr.ObjectType != "" {
8474 objectMap["objectType"] = awrr.ObjectType
8475 }
8476 return json.Marshal(objectMap)
8477 }
8478
8479
8480 func (awrr AzureWorkloadRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8481 return nil, false
8482 }
8483
8484
8485 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8486 return nil, false
8487 }
8488
8489
8490 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8491 return &awrr, true
8492 }
8493
8494
8495 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8496 return &awrr, true
8497 }
8498
8499
8500 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8501 return nil, false
8502 }
8503
8504
8505 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8506 return nil, false
8507 }
8508
8509
8510 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8511 return nil, false
8512 }
8513
8514
8515 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8516 return nil, false
8517 }
8518
8519
8520 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8521 return nil, false
8522 }
8523
8524
8525 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8526 return nil, false
8527 }
8528
8529
8530 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8531 return nil, false
8532 }
8533
8534
8535 func (awrr AzureWorkloadRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8536 return nil, false
8537 }
8538
8539
8540 func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8541 return nil, false
8542 }
8543
8544
8545 func (awrr AzureWorkloadRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8546 return nil, false
8547 }
8548
8549
8550 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8551 return nil, false
8552 }
8553
8554
8555 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8556 return nil, false
8557 }
8558
8559
8560 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8561 return nil, false
8562 }
8563
8564
8565 func (awrr AzureWorkloadRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8566 return nil, false
8567 }
8568
8569
8570 func (awrr AzureWorkloadRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8571 return nil, false
8572 }
8573
8574
8575 func (awrr AzureWorkloadRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8576 return nil, false
8577 }
8578
8579
8580 func (awrr AzureWorkloadRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8581 return &awrr, true
8582 }
8583
8584
8585 type AzureWorkloadSAPHanaPointInTimeRecoveryPoint struct {
8586
8587 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
8588
8589 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
8590
8591 Type RestorePointType `json:"type,omitempty"`
8592
8593 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
8594
8595 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
8596
8597 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
8598 }
8599
8600
8601 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
8602 awshpitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint
8603 objectMap := make(map[string]interface{})
8604 if awshpitrp.TimeRanges != nil {
8605 objectMap["timeRanges"] = awshpitrp.TimeRanges
8606 }
8607 if awshpitrp.RecoveryPointTierDetails != nil {
8608 objectMap["recoveryPointTierDetails"] = awshpitrp.RecoveryPointTierDetails
8609 }
8610 if awshpitrp.RecoveryPointMoveReadinessInfo != nil {
8611 objectMap["recoveryPointMoveReadinessInfo"] = awshpitrp.RecoveryPointMoveReadinessInfo
8612 }
8613 if awshpitrp.ObjectType != "" {
8614 objectMap["objectType"] = awshpitrp.ObjectType
8615 }
8616 return json.Marshal(objectMap)
8617 }
8618
8619
8620 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
8621 return nil, false
8622 }
8623
8624
8625 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
8626 return nil, false
8627 }
8628
8629
8630 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
8631 return &awshpitrp, true
8632 }
8633
8634
8635 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
8636 return nil, false
8637 }
8638
8639
8640 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
8641 return &awshpitrp, true
8642 }
8643
8644
8645 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
8646 return &awshpitrp, true
8647 }
8648
8649
8650 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
8651 return nil, false
8652 }
8653
8654
8655 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
8656 return nil, false
8657 }
8658
8659
8660 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
8661 return nil, false
8662 }
8663
8664
8665 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
8666 return nil, false
8667 }
8668
8669
8670 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
8671 return nil, false
8672 }
8673
8674
8675 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
8676 return nil, false
8677 }
8678
8679
8680 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
8681 return nil, false
8682 }
8683
8684
8685 func (awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
8686 return &awshpitrp, true
8687 }
8688
8689
8690
8691 type BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest interface {
8692 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
8693 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
8694 }
8695
8696
8697
8698 type AzureWorkloadSAPHanaPointInTimeRestoreRequest struct {
8699
8700 PointInTime *date.Time `json:"pointInTime,omitempty"`
8701
8702 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8703
8704 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8705
8706 PropertyBag map[string]*string `json:"propertyBag"`
8707
8708 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8709
8710 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8711
8712
8713 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8714
8715 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8716 }
8717
8718 func unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, error) {
8719 var m map[string]interface{}
8720 err := json.Unmarshal(body, &m)
8721 if err != nil {
8722 return nil, err
8723 }
8724
8725 switch m["objectType"] {
8726 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
8727 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
8728 err := json.Unmarshal(body, &awshpitrwrr)
8729 return awshpitrwrr, err
8730 default:
8731 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
8732 err := json.Unmarshal(body, &awshpitrr)
8733 return awshpitrr, err
8734 }
8735 }
8736 func unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, error) {
8737 var rawMessages []*json.RawMessage
8738 err := json.Unmarshal(body, &rawMessages)
8739 if err != nil {
8740 return nil, err
8741 }
8742
8743 awshpitrrArray := make([]BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, len(rawMessages))
8744
8745 for index, rawMessage := range rawMessages {
8746 awshpitrr, err := unmarshalBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest(*rawMessage)
8747 if err != nil {
8748 return nil, err
8749 }
8750 awshpitrrArray[index] = awshpitrr
8751 }
8752 return awshpitrrArray, nil
8753 }
8754
8755
8756 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
8757 awshpitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest
8758 objectMap := make(map[string]interface{})
8759 if awshpitrr.PointInTime != nil {
8760 objectMap["pointInTime"] = awshpitrr.PointInTime
8761 }
8762 if awshpitrr.RecoveryType != "" {
8763 objectMap["recoveryType"] = awshpitrr.RecoveryType
8764 }
8765 if awshpitrr.SourceResourceID != nil {
8766 objectMap["sourceResourceId"] = awshpitrr.SourceResourceID
8767 }
8768 if awshpitrr.PropertyBag != nil {
8769 objectMap["propertyBag"] = awshpitrr.PropertyBag
8770 }
8771 if awshpitrr.TargetInfo != nil {
8772 objectMap["targetInfo"] = awshpitrr.TargetInfo
8773 }
8774 if awshpitrr.RecoveryMode != "" {
8775 objectMap["recoveryMode"] = awshpitrr.RecoveryMode
8776 }
8777 if awshpitrr.TargetVirtualMachineID != nil {
8778 objectMap["targetVirtualMachineId"] = awshpitrr.TargetVirtualMachineID
8779 }
8780 if awshpitrr.ObjectType != "" {
8781 objectMap["objectType"] = awshpitrr.ObjectType
8782 }
8783 return json.Marshal(objectMap)
8784 }
8785
8786
8787 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8788 return nil, false
8789 }
8790
8791
8792 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8793 return nil, false
8794 }
8795
8796
8797 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8798 return nil, false
8799 }
8800
8801
8802 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8803 return &awshpitrr, true
8804 }
8805
8806
8807 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8808 return &awshpitrr, true
8809 }
8810
8811
8812 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8813 return &awshpitrr, true
8814 }
8815
8816
8817 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8818 return nil, false
8819 }
8820
8821
8822 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8823 return &awshpitrr, true
8824 }
8825
8826
8827 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8828 return nil, false
8829 }
8830
8831
8832 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8833 return nil, false
8834 }
8835
8836
8837 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
8838 return nil, false
8839 }
8840
8841
8842 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
8843 return nil, false
8844 }
8845
8846
8847 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
8848 return nil, false
8849 }
8850
8851
8852 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
8853 return nil, false
8854 }
8855
8856
8857 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
8858 return nil, false
8859 }
8860
8861
8862 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
8863 return nil, false
8864 }
8865
8866
8867 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
8868 return nil, false
8869 }
8870
8871
8872 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
8873 return nil, false
8874 }
8875
8876
8877 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
8878 return nil, false
8879 }
8880
8881
8882 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
8883 return nil, false
8884 }
8885
8886
8887 func (awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
8888 return &awshpitrr, true
8889 }
8890
8891
8892
8893 type AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest struct {
8894
8895 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
8896
8897 PointInTime *date.Time `json:"pointInTime,omitempty"`
8898
8899 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
8900
8901 SourceResourceID *string `json:"sourceResourceId,omitempty"`
8902
8903 PropertyBag map[string]*string `json:"propertyBag"`
8904
8905 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
8906
8907 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
8908
8909
8910 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
8911
8912 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
8913 }
8914
8915
8916 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
8917 awshpitrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
8918 objectMap := make(map[string]interface{})
8919 if awshpitrwrr.RecoveryPointRehydrationInfo != nil {
8920 objectMap["recoveryPointRehydrationInfo"] = awshpitrwrr.RecoveryPointRehydrationInfo
8921 }
8922 if awshpitrwrr.PointInTime != nil {
8923 objectMap["pointInTime"] = awshpitrwrr.PointInTime
8924 }
8925 if awshpitrwrr.RecoveryType != "" {
8926 objectMap["recoveryType"] = awshpitrwrr.RecoveryType
8927 }
8928 if awshpitrwrr.SourceResourceID != nil {
8929 objectMap["sourceResourceId"] = awshpitrwrr.SourceResourceID
8930 }
8931 if awshpitrwrr.PropertyBag != nil {
8932 objectMap["propertyBag"] = awshpitrwrr.PropertyBag
8933 }
8934 if awshpitrwrr.TargetInfo != nil {
8935 objectMap["targetInfo"] = awshpitrwrr.TargetInfo
8936 }
8937 if awshpitrwrr.RecoveryMode != "" {
8938 objectMap["recoveryMode"] = awshpitrwrr.RecoveryMode
8939 }
8940 if awshpitrwrr.TargetVirtualMachineID != nil {
8941 objectMap["targetVirtualMachineId"] = awshpitrwrr.TargetVirtualMachineID
8942 }
8943 if awshpitrwrr.ObjectType != "" {
8944 objectMap["objectType"] = awshpitrwrr.ObjectType
8945 }
8946 return json.Marshal(objectMap)
8947 }
8948
8949
8950 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
8951 return nil, false
8952 }
8953
8954
8955 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
8956 return nil, false
8957 }
8958
8959
8960 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
8961 return nil, false
8962 }
8963
8964
8965 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
8966 return &awshpitrwrr, true
8967 }
8968
8969
8970 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8971 return nil, false
8972 }
8973
8974
8975 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
8976 return &awshpitrwrr, true
8977 }
8978
8979
8980 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
8981 return nil, false
8982 }
8983
8984
8985 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
8986 return &awshpitrwrr, true
8987 }
8988
8989
8990 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8991 return nil, false
8992 }
8993
8994
8995 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
8996 return nil, false
8997 }
8998
8999
9000 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9001 return nil, false
9002 }
9003
9004
9005 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9006 return nil, false
9007 }
9008
9009
9010 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9011 return nil, false
9012 }
9013
9014
9015 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9016 return nil, false
9017 }
9018
9019
9020 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9021 return &awshpitrwrr, true
9022 }
9023
9024
9025 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9026 return nil, false
9027 }
9028
9029
9030 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9031 return nil, false
9032 }
9033
9034
9035 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9036 return nil, false
9037 }
9038
9039
9040 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9041 return nil, false
9042 }
9043
9044
9045 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9046 return nil, false
9047 }
9048
9049
9050 func (awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9051 return &awshpitrwrr, true
9052 }
9053
9054
9055
9056 type AzureWorkloadSAPHanaRecoveryPoint struct {
9057
9058 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
9059
9060 Type RestorePointType `json:"type,omitempty"`
9061
9062 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
9063
9064 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
9065
9066 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
9067 }
9068
9069
9070 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) MarshalJSON() ([]byte, error) {
9071 awshrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint
9072 objectMap := make(map[string]interface{})
9073 if awshrp.RecoveryPointTierDetails != nil {
9074 objectMap["recoveryPointTierDetails"] = awshrp.RecoveryPointTierDetails
9075 }
9076 if awshrp.RecoveryPointMoveReadinessInfo != nil {
9077 objectMap["recoveryPointMoveReadinessInfo"] = awshrp.RecoveryPointMoveReadinessInfo
9078 }
9079 if awshrp.ObjectType != "" {
9080 objectMap["objectType"] = awshrp.ObjectType
9081 }
9082 return json.Marshal(objectMap)
9083 }
9084
9085
9086 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
9087 return nil, false
9088 }
9089
9090
9091 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9092 return nil, false
9093 }
9094
9095
9096 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9097 return nil, false
9098 }
9099
9100
9101 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9102 return nil, false
9103 }
9104
9105
9106 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9107 return &awshrp, true
9108 }
9109
9110
9111 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9112 return nil, false
9113 }
9114
9115
9116 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9117 return &awshrp, true
9118 }
9119
9120
9121 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9122 return nil, false
9123 }
9124
9125
9126 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9127 return nil, false
9128 }
9129
9130
9131 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9132 return nil, false
9133 }
9134
9135
9136 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9137 return nil, false
9138 }
9139
9140
9141 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9142 return nil, false
9143 }
9144
9145
9146 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9147 return nil, false
9148 }
9149
9150
9151 func (awshrp AzureWorkloadSAPHanaRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9152 return &awshrp, true
9153 }
9154
9155
9156 type BasicAzureWorkloadSAPHanaRestoreRequest interface {
9157 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9158 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
9159 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
9160 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
9161 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
9162 }
9163
9164
9165 type AzureWorkloadSAPHanaRestoreRequest struct {
9166
9167 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9168
9169 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9170
9171 PropertyBag map[string]*string `json:"propertyBag"`
9172
9173 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9174
9175 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9176
9177
9178 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9179
9180 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9181 }
9182
9183 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(body []byte) (BasicAzureWorkloadSAPHanaRestoreRequest, error) {
9184 var m map[string]interface{}
9185 err := json.Unmarshal(body, &m)
9186 if err != nil {
9187 return nil, err
9188 }
9189
9190 switch m["objectType"] {
9191 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
9192 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
9193 err := json.Unmarshal(body, &awshpitrr)
9194 return awshpitrr, err
9195 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
9196 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
9197 err := json.Unmarshal(body, &awshpitrwrr)
9198 return awshpitrwrr, err
9199 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
9200 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
9201 err := json.Unmarshal(body, &awshrwrr)
9202 return awshrwrr, err
9203 default:
9204 var awshrr AzureWorkloadSAPHanaRestoreRequest
9205 err := json.Unmarshal(body, &awshrr)
9206 return awshrr, err
9207 }
9208 }
9209 func unmarshalBasicAzureWorkloadSAPHanaRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSAPHanaRestoreRequest, error) {
9210 var rawMessages []*json.RawMessage
9211 err := json.Unmarshal(body, &rawMessages)
9212 if err != nil {
9213 return nil, err
9214 }
9215
9216 awshrrArray := make([]BasicAzureWorkloadSAPHanaRestoreRequest, len(rawMessages))
9217
9218 for index, rawMessage := range rawMessages {
9219 awshrr, err := unmarshalBasicAzureWorkloadSAPHanaRestoreRequest(*rawMessage)
9220 if err != nil {
9221 return nil, err
9222 }
9223 awshrrArray[index] = awshrr
9224 }
9225 return awshrrArray, nil
9226 }
9227
9228
9229 func (awshrr AzureWorkloadSAPHanaRestoreRequest) MarshalJSON() ([]byte, error) {
9230 awshrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest
9231 objectMap := make(map[string]interface{})
9232 if awshrr.RecoveryType != "" {
9233 objectMap["recoveryType"] = awshrr.RecoveryType
9234 }
9235 if awshrr.SourceResourceID != nil {
9236 objectMap["sourceResourceId"] = awshrr.SourceResourceID
9237 }
9238 if awshrr.PropertyBag != nil {
9239 objectMap["propertyBag"] = awshrr.PropertyBag
9240 }
9241 if awshrr.TargetInfo != nil {
9242 objectMap["targetInfo"] = awshrr.TargetInfo
9243 }
9244 if awshrr.RecoveryMode != "" {
9245 objectMap["recoveryMode"] = awshrr.RecoveryMode
9246 }
9247 if awshrr.TargetVirtualMachineID != nil {
9248 objectMap["targetVirtualMachineId"] = awshrr.TargetVirtualMachineID
9249 }
9250 if awshrr.ObjectType != "" {
9251 objectMap["objectType"] = awshrr.ObjectType
9252 }
9253 return json.Marshal(objectMap)
9254 }
9255
9256
9257 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9258 return nil, false
9259 }
9260
9261
9262 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9263 return nil, false
9264 }
9265
9266
9267 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9268 return nil, false
9269 }
9270
9271
9272 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9273 return &awshrr, true
9274 }
9275
9276
9277 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9278 return nil, false
9279 }
9280
9281
9282 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9283 return nil, false
9284 }
9285
9286
9287 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9288 return &awshrr, true
9289 }
9290
9291
9292 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9293 return &awshrr, true
9294 }
9295
9296
9297 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9298 return nil, false
9299 }
9300
9301
9302 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9303 return nil, false
9304 }
9305
9306
9307 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9308 return nil, false
9309 }
9310
9311
9312 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9313 return nil, false
9314 }
9315
9316
9317 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9318 return nil, false
9319 }
9320
9321
9322 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9323 return nil, false
9324 }
9325
9326
9327 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9328 return nil, false
9329 }
9330
9331
9332 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9333 return nil, false
9334 }
9335
9336
9337 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9338 return nil, false
9339 }
9340
9341
9342 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9343 return nil, false
9344 }
9345
9346
9347 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9348 return nil, false
9349 }
9350
9351
9352 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9353 return nil, false
9354 }
9355
9356
9357 func (awshrr AzureWorkloadSAPHanaRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9358 return &awshrr, true
9359 }
9360
9361
9362
9363 type AzureWorkloadSAPHanaRestoreWithRehydrateRequest struct {
9364
9365 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
9366
9367 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9368
9369 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9370
9371 PropertyBag map[string]*string `json:"propertyBag"`
9372
9373 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9374
9375 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9376
9377
9378 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9379
9380 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9381 }
9382
9383
9384 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
9385 awshrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest
9386 objectMap := make(map[string]interface{})
9387 if awshrwrr.RecoveryPointRehydrationInfo != nil {
9388 objectMap["recoveryPointRehydrationInfo"] = awshrwrr.RecoveryPointRehydrationInfo
9389 }
9390 if awshrwrr.RecoveryType != "" {
9391 objectMap["recoveryType"] = awshrwrr.RecoveryType
9392 }
9393 if awshrwrr.SourceResourceID != nil {
9394 objectMap["sourceResourceId"] = awshrwrr.SourceResourceID
9395 }
9396 if awshrwrr.PropertyBag != nil {
9397 objectMap["propertyBag"] = awshrwrr.PropertyBag
9398 }
9399 if awshrwrr.TargetInfo != nil {
9400 objectMap["targetInfo"] = awshrwrr.TargetInfo
9401 }
9402 if awshrwrr.RecoveryMode != "" {
9403 objectMap["recoveryMode"] = awshrwrr.RecoveryMode
9404 }
9405 if awshrwrr.TargetVirtualMachineID != nil {
9406 objectMap["targetVirtualMachineId"] = awshrwrr.TargetVirtualMachineID
9407 }
9408 if awshrwrr.ObjectType != "" {
9409 objectMap["objectType"] = awshrwrr.ObjectType
9410 }
9411 return json.Marshal(objectMap)
9412 }
9413
9414
9415 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9416 return nil, false
9417 }
9418
9419
9420 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9421 return nil, false
9422 }
9423
9424
9425 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9426 return nil, false
9427 }
9428
9429
9430 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9431 return &awshrwrr, true
9432 }
9433
9434
9435 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9436 return nil, false
9437 }
9438
9439
9440 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9441 return nil, false
9442 }
9443
9444
9445 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9446 return nil, false
9447 }
9448
9449
9450 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9451 return &awshrwrr, true
9452 }
9453
9454
9455 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9456 return nil, false
9457 }
9458
9459
9460 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9461 return nil, false
9462 }
9463
9464
9465 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9466 return nil, false
9467 }
9468
9469
9470 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9471 return nil, false
9472 }
9473
9474
9475 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9476 return nil, false
9477 }
9478
9479
9480 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9481 return nil, false
9482 }
9483
9484
9485 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9486 return nil, false
9487 }
9488
9489
9490 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9491 return &awshrwrr, true
9492 }
9493
9494
9495 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9496 return nil, false
9497 }
9498
9499
9500 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9501 return nil, false
9502 }
9503
9504
9505 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9506 return nil, false
9507 }
9508
9509
9510 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9511 return nil, false
9512 }
9513
9514
9515 func (awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9516 return &awshrwrr, true
9517 }
9518
9519
9520 type AzureWorkloadSQLAutoProtectionIntent struct {
9521
9522 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
9523
9524 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
9525
9526 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9527
9528 ItemID *string `json:"itemId,omitempty"`
9529
9530 PolicyID *string `json:"policyId,omitempty"`
9531
9532 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
9533
9534 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
9535 }
9536
9537
9538 func (awsapi AzureWorkloadSQLAutoProtectionIntent) MarshalJSON() ([]byte, error) {
9539 awsapi.ProtectionIntentItemType = ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent
9540 objectMap := make(map[string]interface{})
9541 if awsapi.WorkloadItemType != "" {
9542 objectMap["workloadItemType"] = awsapi.WorkloadItemType
9543 }
9544 if awsapi.BackupManagementType != "" {
9545 objectMap["backupManagementType"] = awsapi.BackupManagementType
9546 }
9547 if awsapi.SourceResourceID != nil {
9548 objectMap["sourceResourceId"] = awsapi.SourceResourceID
9549 }
9550 if awsapi.ItemID != nil {
9551 objectMap["itemId"] = awsapi.ItemID
9552 }
9553 if awsapi.PolicyID != nil {
9554 objectMap["policyId"] = awsapi.PolicyID
9555 }
9556 if awsapi.ProtectionState != "" {
9557 objectMap["protectionState"] = awsapi.ProtectionState
9558 }
9559 if awsapi.ProtectionIntentItemType != "" {
9560 objectMap["protectionIntentItemType"] = awsapi.ProtectionIntentItemType
9561 }
9562 return json.Marshal(objectMap)
9563 }
9564
9565
9566 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
9567 return nil, false
9568 }
9569
9570
9571 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
9572 return &awsapi, true
9573 }
9574
9575
9576 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
9577 return nil, false
9578 }
9579
9580
9581 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
9582 return nil, false
9583 }
9584
9585
9586 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
9587 return &awsapi, true
9588 }
9589
9590
9591 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
9592 return &awsapi, true
9593 }
9594
9595
9596 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
9597 return nil, false
9598 }
9599
9600
9601 func (awsapi AzureWorkloadSQLAutoProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
9602 return &awsapi, true
9603 }
9604
9605
9606 type AzureWorkloadSQLPointInTimeRecoveryPoint struct {
9607
9608 TimeRanges *[]PointInTimeRange `json:"timeRanges,omitempty"`
9609
9610
9611
9612 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
9613
9614 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
9615
9616 Type RestorePointType `json:"type,omitempty"`
9617
9618 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
9619
9620 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
9621
9622 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
9623 }
9624
9625
9626 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) MarshalJSON() ([]byte, error) {
9627 awspitrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint
9628 objectMap := make(map[string]interface{})
9629 if awspitrp.TimeRanges != nil {
9630 objectMap["timeRanges"] = awspitrp.TimeRanges
9631 }
9632 if awspitrp.ExtendedInfo != nil {
9633 objectMap["extendedInfo"] = awspitrp.ExtendedInfo
9634 }
9635 if awspitrp.RecoveryPointTierDetails != nil {
9636 objectMap["recoveryPointTierDetails"] = awspitrp.RecoveryPointTierDetails
9637 }
9638 if awspitrp.RecoveryPointMoveReadinessInfo != nil {
9639 objectMap["recoveryPointMoveReadinessInfo"] = awspitrp.RecoveryPointMoveReadinessInfo
9640 }
9641 if awspitrp.ObjectType != "" {
9642 objectMap["objectType"] = awspitrp.ObjectType
9643 }
9644 return json.Marshal(objectMap)
9645 }
9646
9647
9648 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
9649 return nil, false
9650 }
9651
9652
9653 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
9654 return nil, false
9655 }
9656
9657
9658 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
9659 return nil, false
9660 }
9661
9662
9663 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
9664 return nil, false
9665 }
9666
9667
9668 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
9669 return &awspitrp, true
9670 }
9671
9672
9673 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
9674 return nil, false
9675 }
9676
9677
9678 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
9679 return nil, false
9680 }
9681
9682
9683 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
9684 return &awspitrp, true
9685 }
9686
9687
9688 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
9689 return nil, false
9690 }
9691
9692
9693 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
9694 return &awspitrp, true
9695 }
9696
9697
9698 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
9699 return nil, false
9700 }
9701
9702
9703 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
9704 return nil, false
9705 }
9706
9707
9708 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
9709 return nil, false
9710 }
9711
9712
9713 func (awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
9714 return &awspitrp, true
9715 }
9716
9717
9718
9719 type BasicAzureWorkloadSQLPointInTimeRestoreRequest interface {
9720 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
9721 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
9722 }
9723
9724
9725
9726 type AzureWorkloadSQLPointInTimeRestoreRequest struct {
9727
9728 PointInTime *date.Time `json:"pointInTime,omitempty"`
9729
9730 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
9731
9732 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
9733
9734 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
9735
9736 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9737
9738 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9739
9740 PropertyBag map[string]*string `json:"propertyBag"`
9741
9742 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9743
9744 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9745
9746
9747 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9748
9749 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9750 }
9751
9752 func unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequest(body []byte) (BasicAzureWorkloadSQLPointInTimeRestoreRequest, error) {
9753 var m map[string]interface{}
9754 err := json.Unmarshal(body, &m)
9755 if err != nil {
9756 return nil, err
9757 }
9758
9759 switch m["objectType"] {
9760 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
9761 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
9762 err := json.Unmarshal(body, &awspitrwrr)
9763 return awspitrwrr, err
9764 default:
9765 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
9766 err := json.Unmarshal(body, &awspitrr)
9767 return awspitrr, err
9768 }
9769 }
9770 func unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLPointInTimeRestoreRequest, error) {
9771 var rawMessages []*json.RawMessage
9772 err := json.Unmarshal(body, &rawMessages)
9773 if err != nil {
9774 return nil, err
9775 }
9776
9777 awspitrrArray := make([]BasicAzureWorkloadSQLPointInTimeRestoreRequest, len(rawMessages))
9778
9779 for index, rawMessage := range rawMessages {
9780 awspitrr, err := unmarshalBasicAzureWorkloadSQLPointInTimeRestoreRequest(*rawMessage)
9781 if err != nil {
9782 return nil, err
9783 }
9784 awspitrrArray[index] = awspitrr
9785 }
9786 return awspitrrArray, nil
9787 }
9788
9789
9790 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) MarshalJSON() ([]byte, error) {
9791 awspitrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest
9792 objectMap := make(map[string]interface{})
9793 if awspitrr.PointInTime != nil {
9794 objectMap["pointInTime"] = awspitrr.PointInTime
9795 }
9796 if awspitrr.ShouldUseAlternateTargetLocation != nil {
9797 objectMap["shouldUseAlternateTargetLocation"] = awspitrr.ShouldUseAlternateTargetLocation
9798 }
9799 if awspitrr.IsNonRecoverable != nil {
9800 objectMap["isNonRecoverable"] = awspitrr.IsNonRecoverable
9801 }
9802 if awspitrr.AlternateDirectoryPaths != nil {
9803 objectMap["alternateDirectoryPaths"] = awspitrr.AlternateDirectoryPaths
9804 }
9805 if awspitrr.RecoveryType != "" {
9806 objectMap["recoveryType"] = awspitrr.RecoveryType
9807 }
9808 if awspitrr.SourceResourceID != nil {
9809 objectMap["sourceResourceId"] = awspitrr.SourceResourceID
9810 }
9811 if awspitrr.PropertyBag != nil {
9812 objectMap["propertyBag"] = awspitrr.PropertyBag
9813 }
9814 if awspitrr.TargetInfo != nil {
9815 objectMap["targetInfo"] = awspitrr.TargetInfo
9816 }
9817 if awspitrr.RecoveryMode != "" {
9818 objectMap["recoveryMode"] = awspitrr.RecoveryMode
9819 }
9820 if awspitrr.TargetVirtualMachineID != nil {
9821 objectMap["targetVirtualMachineId"] = awspitrr.TargetVirtualMachineID
9822 }
9823 if awspitrr.ObjectType != "" {
9824 objectMap["objectType"] = awspitrr.ObjectType
9825 }
9826 return json.Marshal(objectMap)
9827 }
9828
9829
9830 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
9831 return nil, false
9832 }
9833
9834
9835 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
9836 return nil, false
9837 }
9838
9839
9840 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
9841 return nil, false
9842 }
9843
9844
9845 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
9846 return &awspitrr, true
9847 }
9848
9849
9850 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9851 return nil, false
9852 }
9853
9854
9855 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
9856 return nil, false
9857 }
9858
9859
9860 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
9861 return nil, false
9862 }
9863
9864
9865 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
9866 return nil, false
9867 }
9868
9869
9870 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9871 return &awspitrr, true
9872 }
9873
9874
9875 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
9876 return &awspitrr, true
9877 }
9878
9879
9880 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
9881 return nil, false
9882 }
9883
9884
9885 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
9886 return &awspitrr, true
9887 }
9888
9889
9890 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
9891 return nil, false
9892 }
9893
9894
9895 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
9896 return nil, false
9897 }
9898
9899
9900 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
9901 return nil, false
9902 }
9903
9904
9905 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
9906 return nil, false
9907 }
9908
9909
9910 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
9911 return nil, false
9912 }
9913
9914
9915 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
9916 return nil, false
9917 }
9918
9919
9920 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
9921 return nil, false
9922 }
9923
9924
9925 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
9926 return nil, false
9927 }
9928
9929
9930 func (awspitrr AzureWorkloadSQLPointInTimeRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
9931 return &awspitrr, true
9932 }
9933
9934
9935
9936 type AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest struct {
9937
9938 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
9939
9940 PointInTime *date.Time `json:"pointInTime,omitempty"`
9941
9942 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
9943
9944 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
9945
9946 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
9947
9948 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
9949
9950 SourceResourceID *string `json:"sourceResourceId,omitempty"`
9951
9952 PropertyBag map[string]*string `json:"propertyBag"`
9953
9954 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
9955
9956 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
9957
9958
9959 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
9960
9961 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
9962 }
9963
9964
9965 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
9966 awspitrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
9967 objectMap := make(map[string]interface{})
9968 if awspitrwrr.RecoveryPointRehydrationInfo != nil {
9969 objectMap["recoveryPointRehydrationInfo"] = awspitrwrr.RecoveryPointRehydrationInfo
9970 }
9971 if awspitrwrr.PointInTime != nil {
9972 objectMap["pointInTime"] = awspitrwrr.PointInTime
9973 }
9974 if awspitrwrr.ShouldUseAlternateTargetLocation != nil {
9975 objectMap["shouldUseAlternateTargetLocation"] = awspitrwrr.ShouldUseAlternateTargetLocation
9976 }
9977 if awspitrwrr.IsNonRecoverable != nil {
9978 objectMap["isNonRecoverable"] = awspitrwrr.IsNonRecoverable
9979 }
9980 if awspitrwrr.AlternateDirectoryPaths != nil {
9981 objectMap["alternateDirectoryPaths"] = awspitrwrr.AlternateDirectoryPaths
9982 }
9983 if awspitrwrr.RecoveryType != "" {
9984 objectMap["recoveryType"] = awspitrwrr.RecoveryType
9985 }
9986 if awspitrwrr.SourceResourceID != nil {
9987 objectMap["sourceResourceId"] = awspitrwrr.SourceResourceID
9988 }
9989 if awspitrwrr.PropertyBag != nil {
9990 objectMap["propertyBag"] = awspitrwrr.PropertyBag
9991 }
9992 if awspitrwrr.TargetInfo != nil {
9993 objectMap["targetInfo"] = awspitrwrr.TargetInfo
9994 }
9995 if awspitrwrr.RecoveryMode != "" {
9996 objectMap["recoveryMode"] = awspitrwrr.RecoveryMode
9997 }
9998 if awspitrwrr.TargetVirtualMachineID != nil {
9999 objectMap["targetVirtualMachineId"] = awspitrwrr.TargetVirtualMachineID
10000 }
10001 if awspitrwrr.ObjectType != "" {
10002 objectMap["objectType"] = awspitrwrr.ObjectType
10003 }
10004 return json.Marshal(objectMap)
10005 }
10006
10007
10008 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10009 return nil, false
10010 }
10011
10012
10013 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10014 return nil, false
10015 }
10016
10017
10018 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10019 return nil, false
10020 }
10021
10022
10023 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10024 return &awspitrwrr, true
10025 }
10026
10027
10028 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10029 return nil, false
10030 }
10031
10032
10033 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10034 return nil, false
10035 }
10036
10037
10038 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10039 return nil, false
10040 }
10041
10042
10043 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10044 return nil, false
10045 }
10046
10047
10048 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10049 return nil, false
10050 }
10051
10052
10053 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10054 return &awspitrwrr, true
10055 }
10056
10057
10058 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10059 return nil, false
10060 }
10061
10062
10063 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10064 return &awspitrwrr, true
10065 }
10066
10067
10068 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10069 return nil, false
10070 }
10071
10072
10073 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10074 return nil, false
10075 }
10076
10077
10078 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10079 return nil, false
10080 }
10081
10082
10083 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10084 return nil, false
10085 }
10086
10087
10088 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10089 return &awspitrwrr, true
10090 }
10091
10092
10093 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10094 return nil, false
10095 }
10096
10097
10098 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10099 return nil, false
10100 }
10101
10102
10103 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10104 return nil, false
10105 }
10106
10107
10108 func (awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10109 return &awspitrwrr, true
10110 }
10111
10112
10113
10114 type BasicAzureWorkloadSQLRecoveryPoint interface {
10115 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
10116 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
10117 }
10118
10119
10120
10121 type AzureWorkloadSQLRecoveryPoint struct {
10122
10123
10124
10125 ExtendedInfo *AzureWorkloadSQLRecoveryPointExtendedInfo `json:"extendedInfo,omitempty"`
10126
10127 RecoveryPointTimeInUTC *date.Time `json:"recoveryPointTimeInUTC,omitempty"`
10128
10129 Type RestorePointType `json:"type,omitempty"`
10130
10131 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
10132
10133 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
10134
10135 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
10136 }
10137
10138 func unmarshalBasicAzureWorkloadSQLRecoveryPoint(body []byte) (BasicAzureWorkloadSQLRecoveryPoint, error) {
10139 var m map[string]interface{}
10140 err := json.Unmarshal(body, &m)
10141 if err != nil {
10142 return nil, err
10143 }
10144
10145 switch m["objectType"] {
10146 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
10147 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
10148 err := json.Unmarshal(body, &awspitrp)
10149 return awspitrp, err
10150 default:
10151 var awsrp AzureWorkloadSQLRecoveryPoint
10152 err := json.Unmarshal(body, &awsrp)
10153 return awsrp, err
10154 }
10155 }
10156 func unmarshalBasicAzureWorkloadSQLRecoveryPointArray(body []byte) ([]BasicAzureWorkloadSQLRecoveryPoint, error) {
10157 var rawMessages []*json.RawMessage
10158 err := json.Unmarshal(body, &rawMessages)
10159 if err != nil {
10160 return nil, err
10161 }
10162
10163 awsrpArray := make([]BasicAzureWorkloadSQLRecoveryPoint, len(rawMessages))
10164
10165 for index, rawMessage := range rawMessages {
10166 awsrp, err := unmarshalBasicAzureWorkloadSQLRecoveryPoint(*rawMessage)
10167 if err != nil {
10168 return nil, err
10169 }
10170 awsrpArray[index] = awsrp
10171 }
10172 return awsrpArray, nil
10173 }
10174
10175
10176 func (awsrp AzureWorkloadSQLRecoveryPoint) MarshalJSON() ([]byte, error) {
10177 awsrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint
10178 objectMap := make(map[string]interface{})
10179 if awsrp.ExtendedInfo != nil {
10180 objectMap["extendedInfo"] = awsrp.ExtendedInfo
10181 }
10182 if awsrp.RecoveryPointTierDetails != nil {
10183 objectMap["recoveryPointTierDetails"] = awsrp.RecoveryPointTierDetails
10184 }
10185 if awsrp.RecoveryPointMoveReadinessInfo != nil {
10186 objectMap["recoveryPointMoveReadinessInfo"] = awsrp.RecoveryPointMoveReadinessInfo
10187 }
10188 if awsrp.ObjectType != "" {
10189 objectMap["objectType"] = awsrp.ObjectType
10190 }
10191 return json.Marshal(objectMap)
10192 }
10193
10194
10195 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
10196 return nil, false
10197 }
10198
10199
10200 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
10201 return nil, false
10202 }
10203
10204
10205 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
10206 return nil, false
10207 }
10208
10209
10210 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
10211 return nil, false
10212 }
10213
10214
10215 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
10216 return &awsrp, true
10217 }
10218
10219
10220 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
10221 return nil, false
10222 }
10223
10224
10225 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
10226 return nil, false
10227 }
10228
10229
10230 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
10231 return nil, false
10232 }
10233
10234
10235 func (awsrp AzureWorkloadSQLRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
10236 return &awsrp, true
10237 }
10238
10239
10240 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
10241 return &awsrp, true
10242 }
10243
10244
10245 func (awsrp AzureWorkloadSQLRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
10246 return nil, false
10247 }
10248
10249
10250 func (awsrp AzureWorkloadSQLRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
10251 return nil, false
10252 }
10253
10254
10255 func (awsrp AzureWorkloadSQLRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
10256 return nil, false
10257 }
10258
10259
10260 func (awsrp AzureWorkloadSQLRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
10261 return &awsrp, true
10262 }
10263
10264
10265 type AzureWorkloadSQLRecoveryPointExtendedInfo struct {
10266
10267 DataDirectoryTimeInUTC *date.Time `json:"dataDirectoryTimeInUTC,omitempty"`
10268
10269 DataDirectoryPaths *[]SQLDataDirectory `json:"dataDirectoryPaths,omitempty"`
10270 }
10271
10272
10273 func (awsrpei AzureWorkloadSQLRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) {
10274 objectMap := make(map[string]interface{})
10275 return json.Marshal(objectMap)
10276 }
10277
10278
10279 type BasicAzureWorkloadSQLRestoreRequest interface {
10280 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
10281 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
10282 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
10283 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
10284 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
10285 }
10286
10287
10288 type AzureWorkloadSQLRestoreRequest struct {
10289
10290 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10291
10292 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10293
10294 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10295
10296 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10297
10298 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10299
10300 PropertyBag map[string]*string `json:"propertyBag"`
10301
10302 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10303
10304 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10305
10306
10307 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10308
10309 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10310 }
10311
10312 func unmarshalBasicAzureWorkloadSQLRestoreRequest(body []byte) (BasicAzureWorkloadSQLRestoreRequest, error) {
10313 var m map[string]interface{}
10314 err := json.Unmarshal(body, &m)
10315 if err != nil {
10316 return nil, err
10317 }
10318
10319 switch m["objectType"] {
10320 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
10321 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
10322 err := json.Unmarshal(body, &awspitrr)
10323 return awspitrr, err
10324 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
10325 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
10326 err := json.Unmarshal(body, &awspitrwrr)
10327 return awspitrwrr, err
10328 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
10329 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
10330 err := json.Unmarshal(body, &awsrwrr)
10331 return awsrwrr, err
10332 default:
10333 var awsrr AzureWorkloadSQLRestoreRequest
10334 err := json.Unmarshal(body, &awsrr)
10335 return awsrr, err
10336 }
10337 }
10338 func unmarshalBasicAzureWorkloadSQLRestoreRequestArray(body []byte) ([]BasicAzureWorkloadSQLRestoreRequest, error) {
10339 var rawMessages []*json.RawMessage
10340 err := json.Unmarshal(body, &rawMessages)
10341 if err != nil {
10342 return nil, err
10343 }
10344
10345 awsrrArray := make([]BasicAzureWorkloadSQLRestoreRequest, len(rawMessages))
10346
10347 for index, rawMessage := range rawMessages {
10348 awsrr, err := unmarshalBasicAzureWorkloadSQLRestoreRequest(*rawMessage)
10349 if err != nil {
10350 return nil, err
10351 }
10352 awsrrArray[index] = awsrr
10353 }
10354 return awsrrArray, nil
10355 }
10356
10357
10358 func (awsrr AzureWorkloadSQLRestoreRequest) MarshalJSON() ([]byte, error) {
10359 awsrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest
10360 objectMap := make(map[string]interface{})
10361 if awsrr.ShouldUseAlternateTargetLocation != nil {
10362 objectMap["shouldUseAlternateTargetLocation"] = awsrr.ShouldUseAlternateTargetLocation
10363 }
10364 if awsrr.IsNonRecoverable != nil {
10365 objectMap["isNonRecoverable"] = awsrr.IsNonRecoverable
10366 }
10367 if awsrr.AlternateDirectoryPaths != nil {
10368 objectMap["alternateDirectoryPaths"] = awsrr.AlternateDirectoryPaths
10369 }
10370 if awsrr.RecoveryType != "" {
10371 objectMap["recoveryType"] = awsrr.RecoveryType
10372 }
10373 if awsrr.SourceResourceID != nil {
10374 objectMap["sourceResourceId"] = awsrr.SourceResourceID
10375 }
10376 if awsrr.PropertyBag != nil {
10377 objectMap["propertyBag"] = awsrr.PropertyBag
10378 }
10379 if awsrr.TargetInfo != nil {
10380 objectMap["targetInfo"] = awsrr.TargetInfo
10381 }
10382 if awsrr.RecoveryMode != "" {
10383 objectMap["recoveryMode"] = awsrr.RecoveryMode
10384 }
10385 if awsrr.TargetVirtualMachineID != nil {
10386 objectMap["targetVirtualMachineId"] = awsrr.TargetVirtualMachineID
10387 }
10388 if awsrr.ObjectType != "" {
10389 objectMap["objectType"] = awsrr.ObjectType
10390 }
10391 return json.Marshal(objectMap)
10392 }
10393
10394
10395 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10396 return nil, false
10397 }
10398
10399
10400 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10401 return nil, false
10402 }
10403
10404
10405 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10406 return nil, false
10407 }
10408
10409
10410 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10411 return &awsrr, true
10412 }
10413
10414
10415 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10416 return nil, false
10417 }
10418
10419
10420 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10421 return nil, false
10422 }
10423
10424
10425 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10426 return nil, false
10427 }
10428
10429
10430 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10431 return nil, false
10432 }
10433
10434
10435 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10436 return nil, false
10437 }
10438
10439
10440 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10441 return nil, false
10442 }
10443
10444
10445 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10446 return &awsrr, true
10447 }
10448
10449
10450 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10451 return &awsrr, true
10452 }
10453
10454
10455 func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10456 return nil, false
10457 }
10458
10459
10460 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10461 return nil, false
10462 }
10463
10464
10465 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10466 return nil, false
10467 }
10468
10469
10470 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10471 return nil, false
10472 }
10473
10474
10475 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10476 return nil, false
10477 }
10478
10479
10480 func (awsrr AzureWorkloadSQLRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10481 return nil, false
10482 }
10483
10484
10485 func (awsrr AzureWorkloadSQLRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10486 return nil, false
10487 }
10488
10489
10490 func (awsrr AzureWorkloadSQLRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10491 return nil, false
10492 }
10493
10494
10495 func (awsrr AzureWorkloadSQLRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10496 return &awsrr, true
10497 }
10498
10499
10500
10501 type AzureWorkloadSQLRestoreWithRehydrateRequest struct {
10502
10503 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
10504
10505 ShouldUseAlternateTargetLocation *bool `json:"shouldUseAlternateTargetLocation,omitempty"`
10506
10507 IsNonRecoverable *bool `json:"isNonRecoverable,omitempty"`
10508
10509 AlternateDirectoryPaths *[]SQLDataDirectoryMapping `json:"alternateDirectoryPaths,omitempty"`
10510
10511 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
10512
10513 SourceResourceID *string `json:"sourceResourceId,omitempty"`
10514
10515 PropertyBag map[string]*string `json:"propertyBag"`
10516
10517 TargetInfo *TargetRestoreInfo `json:"targetInfo,omitempty"`
10518
10519 RecoveryMode RecoveryMode `json:"recoveryMode,omitempty"`
10520
10521
10522 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
10523
10524 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
10525 }
10526
10527
10528 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) MarshalJSON() ([]byte, error) {
10529 awsrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest
10530 objectMap := make(map[string]interface{})
10531 if awsrwrr.RecoveryPointRehydrationInfo != nil {
10532 objectMap["recoveryPointRehydrationInfo"] = awsrwrr.RecoveryPointRehydrationInfo
10533 }
10534 if awsrwrr.ShouldUseAlternateTargetLocation != nil {
10535 objectMap["shouldUseAlternateTargetLocation"] = awsrwrr.ShouldUseAlternateTargetLocation
10536 }
10537 if awsrwrr.IsNonRecoverable != nil {
10538 objectMap["isNonRecoverable"] = awsrwrr.IsNonRecoverable
10539 }
10540 if awsrwrr.AlternateDirectoryPaths != nil {
10541 objectMap["alternateDirectoryPaths"] = awsrwrr.AlternateDirectoryPaths
10542 }
10543 if awsrwrr.RecoveryType != "" {
10544 objectMap["recoveryType"] = awsrwrr.RecoveryType
10545 }
10546 if awsrwrr.SourceResourceID != nil {
10547 objectMap["sourceResourceId"] = awsrwrr.SourceResourceID
10548 }
10549 if awsrwrr.PropertyBag != nil {
10550 objectMap["propertyBag"] = awsrwrr.PropertyBag
10551 }
10552 if awsrwrr.TargetInfo != nil {
10553 objectMap["targetInfo"] = awsrwrr.TargetInfo
10554 }
10555 if awsrwrr.RecoveryMode != "" {
10556 objectMap["recoveryMode"] = awsrwrr.RecoveryMode
10557 }
10558 if awsrwrr.TargetVirtualMachineID != nil {
10559 objectMap["targetVirtualMachineId"] = awsrwrr.TargetVirtualMachineID
10560 }
10561 if awsrwrr.ObjectType != "" {
10562 objectMap["objectType"] = awsrwrr.ObjectType
10563 }
10564 return json.Marshal(objectMap)
10565 }
10566
10567
10568 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
10569 return nil, false
10570 }
10571
10572
10573 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
10574 return nil, false
10575 }
10576
10577
10578 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
10579 return nil, false
10580 }
10581
10582
10583 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
10584 return &awsrwrr, true
10585 }
10586
10587
10588 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10589 return nil, false
10590 }
10591
10592
10593 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
10594 return nil, false
10595 }
10596
10597
10598 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
10599 return nil, false
10600 }
10601
10602
10603 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
10604 return nil, false
10605 }
10606
10607
10608 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10609 return nil, false
10610 }
10611
10612
10613 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
10614 return nil, false
10615 }
10616
10617
10618 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
10619 return nil, false
10620 }
10621
10622
10623 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
10624 return &awsrwrr, true
10625 }
10626
10627
10628 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
10629 return nil, false
10630 }
10631
10632
10633 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
10634 return nil, false
10635 }
10636
10637
10638 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
10639 return nil, false
10640 }
10641
10642
10643 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
10644 return nil, false
10645 }
10646
10647
10648 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
10649 return nil, false
10650 }
10651
10652
10653 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
10654 return &awsrwrr, true
10655 }
10656
10657
10658 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
10659 return nil, false
10660 }
10661
10662
10663 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsRestoreRequest() (*RestoreRequest, bool) {
10664 return nil, false
10665 }
10666
10667
10668 func (awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
10669 return &awsrwrr, true
10670 }
10671
10672
10673 type BEKDetails struct {
10674
10675 SecretURL *string `json:"secretUrl,omitempty"`
10676
10677 SecretVaultID *string `json:"secretVaultId,omitempty"`
10678
10679 SecretData *string `json:"secretData,omitempty"`
10680 }
10681
10682
10683 type BMSAADPropertiesQueryObject struct {
10684
10685 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10686 }
10687
10688
10689 type BMSBackupEngineQueryObject struct {
10690
10691 Expand *string `json:"expand,omitempty"`
10692 }
10693
10694
10695 type BMSBackupEnginesQueryObject struct {
10696
10697 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10698
10699 FriendlyName *string `json:"friendlyName,omitempty"`
10700
10701 Expand *string `json:"expand,omitempty"`
10702 }
10703
10704
10705 type BMSBackupSummariesQueryObject struct {
10706
10707 Type Type `json:"type,omitempty"`
10708 }
10709
10710
10711 type BMSContainerQueryObject struct {
10712
10713 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10714
10715 ContainerType ContainerType `json:"containerType,omitempty"`
10716
10717 BackupEngineName *string `json:"backupEngineName,omitempty"`
10718
10719 FabricName *string `json:"fabricName,omitempty"`
10720
10721 Status *string `json:"status,omitempty"`
10722
10723 FriendlyName *string `json:"friendlyName,omitempty"`
10724 }
10725
10726
10727 type BMSContainersInquiryQueryObject struct {
10728
10729 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10730
10731 WorkloadType WorkloadType `json:"workloadType,omitempty"`
10732 }
10733
10734
10735 type BMSPOQueryObject struct {
10736
10737 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10738
10739 WorkloadType WorkloadType `json:"workloadType,omitempty"`
10740
10741 ContainerName *string `json:"containerName,omitempty"`
10742
10743 Status *string `json:"status,omitempty"`
10744
10745 FriendlyName *string `json:"friendlyName,omitempty"`
10746 }
10747
10748
10749
10750 type BMSPrepareDataMoveFuture struct {
10751 azure.FutureAPI
10752
10753
10754 Result func(BaseClient) (autorest.Response, error)
10755 }
10756
10757
10758 func (future *BMSPrepareDataMoveFuture) UnmarshalJSON(body []byte) error {
10759 var azFuture azure.Future
10760 if err := json.Unmarshal(body, &azFuture); err != nil {
10761 return err
10762 }
10763 future.FutureAPI = &azFuture
10764 future.Result = future.result
10765 return nil
10766 }
10767
10768
10769 func (future *BMSPrepareDataMoveFuture) result(client BaseClient) (ar autorest.Response, err error) {
10770 var done bool
10771 done, err = future.DoneWithContext(context.Background(), client)
10772 if err != nil {
10773 err = autorest.NewErrorWithError(err, "backup.BMSPrepareDataMoveFuture", "Result", future.Response(), "Polling failure")
10774 return
10775 }
10776 if !done {
10777 ar.Response = future.Response()
10778 err = azure.NewAsyncOpIncompleteError("backup.BMSPrepareDataMoveFuture")
10779 return
10780 }
10781 ar.Response = future.Response()
10782 return
10783 }
10784
10785
10786 type BMSRefreshContainersQueryObject struct {
10787
10788 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10789 }
10790
10791
10792 type BMSRPQueryObject struct {
10793
10794 StartDate *date.Time `json:"startDate,omitempty"`
10795
10796 EndDate *date.Time `json:"endDate,omitempty"`
10797
10798 RestorePointQueryType RestorePointQueryType `json:"restorePointQueryType,omitempty"`
10799
10800 ExtendedInfo *bool `json:"extendedInfo,omitempty"`
10801
10802 MoveReadyRPOnly *bool `json:"moveReadyRPOnly,omitempty"`
10803 }
10804
10805
10806
10807 type BMSTriggerDataMoveFuture struct {
10808 azure.FutureAPI
10809
10810
10811 Result func(BaseClient) (autorest.Response, error)
10812 }
10813
10814
10815 func (future *BMSTriggerDataMoveFuture) UnmarshalJSON(body []byte) error {
10816 var azFuture azure.Future
10817 if err := json.Unmarshal(body, &azFuture); err != nil {
10818 return err
10819 }
10820 future.FutureAPI = &azFuture
10821 future.Result = future.result
10822 return nil
10823 }
10824
10825
10826 func (future *BMSTriggerDataMoveFuture) result(client BaseClient) (ar autorest.Response, err error) {
10827 var done bool
10828 done, err = future.DoneWithContext(context.Background(), client)
10829 if err != nil {
10830 err = autorest.NewErrorWithError(err, "backup.BMSTriggerDataMoveFuture", "Result", future.Response(), "Polling failure")
10831 return
10832 }
10833 if !done {
10834 ar.Response = future.Response()
10835 err = azure.NewAsyncOpIncompleteError("backup.BMSTriggerDataMoveFuture")
10836 return
10837 }
10838 ar.Response = future.Response()
10839 return
10840 }
10841
10842
10843 type BMSWorkloadItemQueryObject struct {
10844
10845 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
10846
10847 WorkloadItemType WorkloadItemType `json:"workloadItemType,omitempty"`
10848
10849 WorkloadType WorkloadType `json:"workloadType,omitempty"`
10850
10851 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
10852 }
10853
10854
10855 type ClientDiscoveryDisplay struct {
10856
10857 Provider *string `json:"provider,omitempty"`
10858
10859 Resource *string `json:"resource,omitempty"`
10860
10861 Operation *string `json:"operation,omitempty"`
10862
10863 Description *string `json:"description,omitempty"`
10864 }
10865
10866
10867
10868 type ClientDiscoveryForLogSpecification struct {
10869
10870 Name *string `json:"name,omitempty"`
10871
10872 DisplayName *string `json:"displayName,omitempty"`
10873
10874 BlobDuration *string `json:"blobDuration,omitempty"`
10875 }
10876
10877
10878 type ClientDiscoveryForProperties struct {
10879
10880 ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"`
10881 }
10882
10883
10884
10885 type ClientDiscoveryForServiceSpecification struct {
10886
10887 LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"`
10888 }
10889
10890
10891 type ClientDiscoveryResponse struct {
10892 autorest.Response `json:"-"`
10893
10894 Value *[]ClientDiscoveryValueForSingleAPI `json:"value,omitempty"`
10895
10896 NextLink *string `json:"nextLink,omitempty"`
10897 }
10898
10899
10900
10901 type ClientDiscoveryResponseIterator struct {
10902 i int
10903 page ClientDiscoveryResponsePage
10904 }
10905
10906
10907
10908 func (iter *ClientDiscoveryResponseIterator) NextWithContext(ctx context.Context) (err error) {
10909 if tracing.IsEnabled() {
10910 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponseIterator.NextWithContext")
10911 defer func() {
10912 sc := -1
10913 if iter.Response().Response.Response != nil {
10914 sc = iter.Response().Response.Response.StatusCode
10915 }
10916 tracing.EndSpan(ctx, sc, err)
10917 }()
10918 }
10919 iter.i++
10920 if iter.i < len(iter.page.Values()) {
10921 return nil
10922 }
10923 err = iter.page.NextWithContext(ctx)
10924 if err != nil {
10925 iter.i--
10926 return err
10927 }
10928 iter.i = 0
10929 return nil
10930 }
10931
10932
10933
10934
10935 func (iter *ClientDiscoveryResponseIterator) Next() error {
10936 return iter.NextWithContext(context.Background())
10937 }
10938
10939
10940 func (iter ClientDiscoveryResponseIterator) NotDone() bool {
10941 return iter.page.NotDone() && iter.i < len(iter.page.Values())
10942 }
10943
10944
10945 func (iter ClientDiscoveryResponseIterator) Response() ClientDiscoveryResponse {
10946 return iter.page.Response()
10947 }
10948
10949
10950
10951 func (iter ClientDiscoveryResponseIterator) Value() ClientDiscoveryValueForSingleAPI {
10952 if !iter.page.NotDone() {
10953 return ClientDiscoveryValueForSingleAPI{}
10954 }
10955 return iter.page.Values()[iter.i]
10956 }
10957
10958
10959 func NewClientDiscoveryResponseIterator(page ClientDiscoveryResponsePage) ClientDiscoveryResponseIterator {
10960 return ClientDiscoveryResponseIterator{page: page}
10961 }
10962
10963
10964 func (cdr ClientDiscoveryResponse) IsEmpty() bool {
10965 return cdr.Value == nil || len(*cdr.Value) == 0
10966 }
10967
10968
10969 func (cdr ClientDiscoveryResponse) hasNextLink() bool {
10970 return cdr.NextLink != nil && len(*cdr.NextLink) != 0
10971 }
10972
10973
10974
10975 func (cdr ClientDiscoveryResponse) clientDiscoveryResponsePreparer(ctx context.Context) (*http.Request, error) {
10976 if !cdr.hasNextLink() {
10977 return nil, nil
10978 }
10979 return autorest.Prepare((&http.Request{}).WithContext(ctx),
10980 autorest.AsJSON(),
10981 autorest.AsGet(),
10982 autorest.WithBaseURL(to.String(cdr.NextLink)))
10983 }
10984
10985
10986 type ClientDiscoveryResponsePage struct {
10987 fn func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)
10988 cdr ClientDiscoveryResponse
10989 }
10990
10991
10992
10993 func (page *ClientDiscoveryResponsePage) NextWithContext(ctx context.Context) (err error) {
10994 if tracing.IsEnabled() {
10995 ctx = tracing.StartSpan(ctx, fqdn+"/ClientDiscoveryResponsePage.NextWithContext")
10996 defer func() {
10997 sc := -1
10998 if page.Response().Response.Response != nil {
10999 sc = page.Response().Response.Response.StatusCode
11000 }
11001 tracing.EndSpan(ctx, sc, err)
11002 }()
11003 }
11004 for {
11005 next, err := page.fn(ctx, page.cdr)
11006 if err != nil {
11007 return err
11008 }
11009 page.cdr = next
11010 if !next.hasNextLink() || !next.IsEmpty() {
11011 break
11012 }
11013 }
11014 return nil
11015 }
11016
11017
11018
11019
11020 func (page *ClientDiscoveryResponsePage) Next() error {
11021 return page.NextWithContext(context.Background())
11022 }
11023
11024
11025 func (page ClientDiscoveryResponsePage) NotDone() bool {
11026 return !page.cdr.IsEmpty()
11027 }
11028
11029
11030 func (page ClientDiscoveryResponsePage) Response() ClientDiscoveryResponse {
11031 return page.cdr
11032 }
11033
11034
11035 func (page ClientDiscoveryResponsePage) Values() []ClientDiscoveryValueForSingleAPI {
11036 if page.cdr.IsEmpty() {
11037 return nil
11038 }
11039 return *page.cdr.Value
11040 }
11041
11042
11043 func NewClientDiscoveryResponsePage(cur ClientDiscoveryResponse, getNextPage func(context.Context, ClientDiscoveryResponse) (ClientDiscoveryResponse, error)) ClientDiscoveryResponsePage {
11044 return ClientDiscoveryResponsePage{
11045 fn: getNextPage,
11046 cdr: cur,
11047 }
11048 }
11049
11050
11051 type ClientDiscoveryValueForSingleAPI struct {
11052
11053 Name *string `json:"name,omitempty"`
11054
11055 Display *ClientDiscoveryDisplay `json:"display,omitempty"`
11056
11057 Origin *string `json:"origin,omitempty"`
11058
11059 Properties *ClientDiscoveryForProperties `json:"properties,omitempty"`
11060 }
11061
11062
11063 type ClientScriptForConnect struct {
11064
11065 ScriptContent *string `json:"scriptContent,omitempty"`
11066
11067 ScriptExtension *string `json:"scriptExtension,omitempty"`
11068
11069 OsType *string `json:"osType,omitempty"`
11070
11071 URL *string `json:"url,omitempty"`
11072
11073
11074 ScriptNameSuffix *string `json:"scriptNameSuffix,omitempty"`
11075 }
11076
11077
11078 type CloudError struct {
11079
11080 Error *CloudErrorBody `json:"error,omitempty"`
11081 }
11082
11083
11084 type CloudErrorBody struct {
11085
11086 Code *string `json:"code,omitempty"`
11087
11088 Message *string `json:"message,omitempty"`
11089
11090 Target *string `json:"target,omitempty"`
11091
11092 Details *[]CloudErrorBody `json:"details,omitempty"`
11093
11094 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
11095 }
11096
11097
11098 func (ceb CloudErrorBody) MarshalJSON() ([]byte, error) {
11099 objectMap := make(map[string]interface{})
11100 return json.Marshal(objectMap)
11101 }
11102
11103
11104 type ContainerIdentityInfo struct {
11105
11106 UniqueName *string `json:"uniqueName,omitempty"`
11107
11108 AadTenantID *string `json:"aadTenantId,omitempty"`
11109
11110 ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
11111
11112 Audience *string `json:"audience,omitempty"`
11113 }
11114
11115
11116 type CrossRegionRestoreRequest struct {
11117
11118 CrossRegionRestoreAccessDetails BasicCrrAccessToken `json:"crossRegionRestoreAccessDetails,omitempty"`
11119
11120 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
11121 }
11122
11123
11124 func (crrr *CrossRegionRestoreRequest) UnmarshalJSON(body []byte) error {
11125 var m map[string]*json.RawMessage
11126 err := json.Unmarshal(body, &m)
11127 if err != nil {
11128 return err
11129 }
11130 for k, v := range m {
11131 switch k {
11132 case "crossRegionRestoreAccessDetails":
11133 if v != nil {
11134 crossRegionRestoreAccessDetails, err := unmarshalBasicCrrAccessToken(*v)
11135 if err != nil {
11136 return err
11137 }
11138 crrr.CrossRegionRestoreAccessDetails = crossRegionRestoreAccessDetails
11139 }
11140 case "restoreRequest":
11141 if v != nil {
11142 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
11143 if err != nil {
11144 return err
11145 }
11146 crrr.RestoreRequest = restoreRequest
11147 }
11148 }
11149 }
11150
11151 return nil
11152 }
11153
11154
11155 type CrossRegionRestoreRequestResource struct {
11156
11157 Properties *CrossRegionRestoreRequest `json:"properties,omitempty"`
11158
11159 ID *string `json:"id,omitempty"`
11160
11161 Name *string `json:"name,omitempty"`
11162
11163 Type *string `json:"type,omitempty"`
11164
11165 Location *string `json:"location,omitempty"`
11166
11167 Tags map[string]*string `json:"tags"`
11168
11169 ETag *string `json:"eTag,omitempty"`
11170 }
11171
11172
11173 func (crrrr CrossRegionRestoreRequestResource) MarshalJSON() ([]byte, error) {
11174 objectMap := make(map[string]interface{})
11175 if crrrr.Properties != nil {
11176 objectMap["properties"] = crrrr.Properties
11177 }
11178 if crrrr.Location != nil {
11179 objectMap["location"] = crrrr.Location
11180 }
11181 if crrrr.Tags != nil {
11182 objectMap["tags"] = crrrr.Tags
11183 }
11184 if crrrr.ETag != nil {
11185 objectMap["eTag"] = crrrr.ETag
11186 }
11187 return json.Marshal(objectMap)
11188 }
11189
11190
11191
11192 type CrossRegionRestoreTriggerFuture struct {
11193 azure.FutureAPI
11194
11195
11196 Result func(CrossRegionRestoreClient) (autorest.Response, error)
11197 }
11198
11199
11200 func (future *CrossRegionRestoreTriggerFuture) UnmarshalJSON(body []byte) error {
11201 var azFuture azure.Future
11202 if err := json.Unmarshal(body, &azFuture); err != nil {
11203 return err
11204 }
11205 future.FutureAPI = &azFuture
11206 future.Result = future.result
11207 return nil
11208 }
11209
11210
11211 func (future *CrossRegionRestoreTriggerFuture) result(client CrossRegionRestoreClient) (ar autorest.Response, err error) {
11212 var done bool
11213 done, err = future.DoneWithContext(context.Background(), client)
11214 if err != nil {
11215 err = autorest.NewErrorWithError(err, "backup.CrossRegionRestoreTriggerFuture", "Result", future.Response(), "Polling failure")
11216 return
11217 }
11218 if !done {
11219 ar.Response = future.Response()
11220 err = azure.NewAsyncOpIncompleteError("backup.CrossRegionRestoreTriggerFuture")
11221 return
11222 }
11223 ar.Response = future.Response()
11224 return
11225 }
11226
11227
11228 type BasicCrrAccessToken interface {
11229 AsWorkloadCrrAccessToken() (*WorkloadCrrAccessToken, bool)
11230 AsCrrAccessToken() (*CrrAccessToken, bool)
11231 }
11232
11233
11234 type CrrAccessToken struct {
11235
11236 AccessTokenString *string `json:"accessTokenString,omitempty"`
11237
11238 SubscriptionID *string `json:"subscriptionId,omitempty"`
11239
11240 ResourceGroupName *string `json:"resourceGroupName,omitempty"`
11241
11242 ResourceName *string `json:"resourceName,omitempty"`
11243
11244 ResourceID *string `json:"resourceId,omitempty"`
11245
11246 ProtectionContainerID *int64 `json:"protectionContainerId,omitempty"`
11247
11248 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
11249
11250 RecoveryPointTime *string `json:"recoveryPointTime,omitempty"`
11251
11252 ContainerName *string `json:"containerName,omitempty"`
11253
11254 ContainerType *string `json:"containerType,omitempty"`
11255
11256 BackupManagementType *string `json:"backupManagementType,omitempty"`
11257
11258 DatasourceType *string `json:"datasourceType,omitempty"`
11259
11260 DatasourceName *string `json:"datasourceName,omitempty"`
11261
11262 DatasourceID *string `json:"datasourceId,omitempty"`
11263
11264 DatasourceContainerName *string `json:"datasourceContainerName,omitempty"`
11265
11266 CoordinatorServiceStampID *string `json:"coordinatorServiceStampId,omitempty"`
11267
11268 CoordinatorServiceStampURI *string `json:"coordinatorServiceStampUri,omitempty"`
11269
11270 ProtectionServiceStampID *string `json:"protectionServiceStampId,omitempty"`
11271
11272 ProtectionServiceStampURI *string `json:"protectionServiceStampUri,omitempty"`
11273
11274 TokenExtendedInformation *string `json:"tokenExtendedInformation,omitempty"`
11275
11276 RpTierInformation map[string]*string `json:"rpTierInformation"`
11277
11278 RpOriginalSAOption *bool `json:"rpOriginalSAOption,omitempty"`
11279
11280 RpIsManagedVirtualMachine *bool `json:"rpIsManagedVirtualMachine,omitempty"`
11281
11282 RpVMSizeDescription *string `json:"rpVMSizeDescription,omitempty"`
11283
11284 BMSActiveRegion *string `json:"bMSActiveRegion,omitempty"`
11285
11286 ObjectType ObjectTypeBasicCrrAccessToken `json:"objectType,omitempty"`
11287 }
11288
11289 func unmarshalBasicCrrAccessToken(body []byte) (BasicCrrAccessToken, error) {
11290 var m map[string]interface{}
11291 err := json.Unmarshal(body, &m)
11292 if err != nil {
11293 return nil, err
11294 }
11295
11296 switch m["objectType"] {
11297 case string(ObjectTypeBasicCrrAccessTokenObjectTypeWorkloadCrrAccessToken):
11298 var wcat WorkloadCrrAccessToken
11299 err := json.Unmarshal(body, &wcat)
11300 return wcat, err
11301 default:
11302 var cat CrrAccessToken
11303 err := json.Unmarshal(body, &cat)
11304 return cat, err
11305 }
11306 }
11307 func unmarshalBasicCrrAccessTokenArray(body []byte) ([]BasicCrrAccessToken, error) {
11308 var rawMessages []*json.RawMessage
11309 err := json.Unmarshal(body, &rawMessages)
11310 if err != nil {
11311 return nil, err
11312 }
11313
11314 catArray := make([]BasicCrrAccessToken, len(rawMessages))
11315
11316 for index, rawMessage := range rawMessages {
11317 cat, err := unmarshalBasicCrrAccessToken(*rawMessage)
11318 if err != nil {
11319 return nil, err
11320 }
11321 catArray[index] = cat
11322 }
11323 return catArray, nil
11324 }
11325
11326
11327 func (cat CrrAccessToken) MarshalJSON() ([]byte, error) {
11328 cat.ObjectType = ObjectTypeBasicCrrAccessTokenObjectTypeCrrAccessToken
11329 objectMap := make(map[string]interface{})
11330 if cat.AccessTokenString != nil {
11331 objectMap["accessTokenString"] = cat.AccessTokenString
11332 }
11333 if cat.SubscriptionID != nil {
11334 objectMap["subscriptionId"] = cat.SubscriptionID
11335 }
11336 if cat.ResourceGroupName != nil {
11337 objectMap["resourceGroupName"] = cat.ResourceGroupName
11338 }
11339 if cat.ResourceName != nil {
11340 objectMap["resourceName"] = cat.ResourceName
11341 }
11342 if cat.ResourceID != nil {
11343 objectMap["resourceId"] = cat.ResourceID
11344 }
11345 if cat.ProtectionContainerID != nil {
11346 objectMap["protectionContainerId"] = cat.ProtectionContainerID
11347 }
11348 if cat.RecoveryPointID != nil {
11349 objectMap["recoveryPointId"] = cat.RecoveryPointID
11350 }
11351 if cat.RecoveryPointTime != nil {
11352 objectMap["recoveryPointTime"] = cat.RecoveryPointTime
11353 }
11354 if cat.ContainerName != nil {
11355 objectMap["containerName"] = cat.ContainerName
11356 }
11357 if cat.ContainerType != nil {
11358 objectMap["containerType"] = cat.ContainerType
11359 }
11360 if cat.BackupManagementType != nil {
11361 objectMap["backupManagementType"] = cat.BackupManagementType
11362 }
11363 if cat.DatasourceType != nil {
11364 objectMap["datasourceType"] = cat.DatasourceType
11365 }
11366 if cat.DatasourceName != nil {
11367 objectMap["datasourceName"] = cat.DatasourceName
11368 }
11369 if cat.DatasourceID != nil {
11370 objectMap["datasourceId"] = cat.DatasourceID
11371 }
11372 if cat.DatasourceContainerName != nil {
11373 objectMap["datasourceContainerName"] = cat.DatasourceContainerName
11374 }
11375 if cat.CoordinatorServiceStampID != nil {
11376 objectMap["coordinatorServiceStampId"] = cat.CoordinatorServiceStampID
11377 }
11378 if cat.CoordinatorServiceStampURI != nil {
11379 objectMap["coordinatorServiceStampUri"] = cat.CoordinatorServiceStampURI
11380 }
11381 if cat.ProtectionServiceStampID != nil {
11382 objectMap["protectionServiceStampId"] = cat.ProtectionServiceStampID
11383 }
11384 if cat.ProtectionServiceStampURI != nil {
11385 objectMap["protectionServiceStampUri"] = cat.ProtectionServiceStampURI
11386 }
11387 if cat.TokenExtendedInformation != nil {
11388 objectMap["tokenExtendedInformation"] = cat.TokenExtendedInformation
11389 }
11390 if cat.RpTierInformation != nil {
11391 objectMap["rpTierInformation"] = cat.RpTierInformation
11392 }
11393 if cat.RpOriginalSAOption != nil {
11394 objectMap["rpOriginalSAOption"] = cat.RpOriginalSAOption
11395 }
11396 if cat.RpIsManagedVirtualMachine != nil {
11397 objectMap["rpIsManagedVirtualMachine"] = cat.RpIsManagedVirtualMachine
11398 }
11399 if cat.RpVMSizeDescription != nil {
11400 objectMap["rpVMSizeDescription"] = cat.RpVMSizeDescription
11401 }
11402 if cat.BMSActiveRegion != nil {
11403 objectMap["bMSActiveRegion"] = cat.BMSActiveRegion
11404 }
11405 if cat.ObjectType != "" {
11406 objectMap["objectType"] = cat.ObjectType
11407 }
11408 return json.Marshal(objectMap)
11409 }
11410
11411
11412 func (cat CrrAccessToken) AsWorkloadCrrAccessToken() (*WorkloadCrrAccessToken, bool) {
11413 return nil, false
11414 }
11415
11416
11417 func (cat CrrAccessToken) AsCrrAccessToken() (*CrrAccessToken, bool) {
11418 return &cat, true
11419 }
11420
11421
11422 func (cat CrrAccessToken) AsBasicCrrAccessToken() (BasicCrrAccessToken, bool) {
11423 return &cat, true
11424 }
11425
11426
11427 type CrrAccessTokenResource struct {
11428 autorest.Response `json:"-"`
11429
11430 Properties BasicCrrAccessToken `json:"properties,omitempty"`
11431
11432 ID *string `json:"id,omitempty"`
11433
11434 Name *string `json:"name,omitempty"`
11435
11436 Type *string `json:"type,omitempty"`
11437
11438 Location *string `json:"location,omitempty"`
11439
11440 Tags map[string]*string `json:"tags"`
11441
11442 ETag *string `json:"eTag,omitempty"`
11443 }
11444
11445
11446 func (catr CrrAccessTokenResource) MarshalJSON() ([]byte, error) {
11447 objectMap := make(map[string]interface{})
11448 objectMap["properties"] = catr.Properties
11449 if catr.Location != nil {
11450 objectMap["location"] = catr.Location
11451 }
11452 if catr.Tags != nil {
11453 objectMap["tags"] = catr.Tags
11454 }
11455 if catr.ETag != nil {
11456 objectMap["eTag"] = catr.ETag
11457 }
11458 return json.Marshal(objectMap)
11459 }
11460
11461
11462 func (catr *CrrAccessTokenResource) UnmarshalJSON(body []byte) error {
11463 var m map[string]*json.RawMessage
11464 err := json.Unmarshal(body, &m)
11465 if err != nil {
11466 return err
11467 }
11468 for k, v := range m {
11469 switch k {
11470 case "properties":
11471 if v != nil {
11472 properties, err := unmarshalBasicCrrAccessToken(*v)
11473 if err != nil {
11474 return err
11475 }
11476 catr.Properties = properties
11477 }
11478 case "id":
11479 if v != nil {
11480 var ID string
11481 err = json.Unmarshal(*v, &ID)
11482 if err != nil {
11483 return err
11484 }
11485 catr.ID = &ID
11486 }
11487 case "name":
11488 if v != nil {
11489 var name string
11490 err = json.Unmarshal(*v, &name)
11491 if err != nil {
11492 return err
11493 }
11494 catr.Name = &name
11495 }
11496 case "type":
11497 if v != nil {
11498 var typeVar string
11499 err = json.Unmarshal(*v, &typeVar)
11500 if err != nil {
11501 return err
11502 }
11503 catr.Type = &typeVar
11504 }
11505 case "location":
11506 if v != nil {
11507 var location string
11508 err = json.Unmarshal(*v, &location)
11509 if err != nil {
11510 return err
11511 }
11512 catr.Location = &location
11513 }
11514 case "tags":
11515 if v != nil {
11516 var tags map[string]*string
11517 err = json.Unmarshal(*v, &tags)
11518 if err != nil {
11519 return err
11520 }
11521 catr.Tags = tags
11522 }
11523 case "eTag":
11524 if v != nil {
11525 var eTag string
11526 err = json.Unmarshal(*v, &eTag)
11527 if err != nil {
11528 return err
11529 }
11530 catr.ETag = &eTag
11531 }
11532 }
11533 }
11534
11535 return nil
11536 }
11537
11538
11539 type CrrJobRequest struct {
11540
11541 ResourceID *string `json:"resourceId,omitempty"`
11542
11543 JobName *string `json:"jobName,omitempty"`
11544 }
11545
11546
11547 type CrrJobRequestResource struct {
11548
11549 Properties *CrrJobRequest `json:"properties,omitempty"`
11550
11551 ID *string `json:"id,omitempty"`
11552
11553 Name *string `json:"name,omitempty"`
11554
11555 Type *string `json:"type,omitempty"`
11556
11557 Location *string `json:"location,omitempty"`
11558
11559 Tags map[string]*string `json:"tags"`
11560
11561 ETag *string `json:"eTag,omitempty"`
11562 }
11563
11564
11565 func (cjrr CrrJobRequestResource) MarshalJSON() ([]byte, error) {
11566 objectMap := make(map[string]interface{})
11567 if cjrr.Properties != nil {
11568 objectMap["properties"] = cjrr.Properties
11569 }
11570 if cjrr.Location != nil {
11571 objectMap["location"] = cjrr.Location
11572 }
11573 if cjrr.Tags != nil {
11574 objectMap["tags"] = cjrr.Tags
11575 }
11576 if cjrr.ETag != nil {
11577 objectMap["eTag"] = cjrr.ETag
11578 }
11579 return json.Marshal(objectMap)
11580 }
11581
11582
11583 type DailyRetentionFormat struct {
11584
11585 DaysOfTheMonth *[]Day `json:"daysOfTheMonth,omitempty"`
11586 }
11587
11588
11589 type DailyRetentionSchedule struct {
11590
11591 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
11592
11593 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
11594 }
11595
11596
11597 type Day struct {
11598
11599 Date *int32 `json:"date,omitempty"`
11600
11601 IsLast *bool `json:"isLast,omitempty"`
11602 }
11603
11604
11605 type DiskExclusionProperties struct {
11606
11607 DiskLunList *[]int32 `json:"diskLunList,omitempty"`
11608
11609 IsInclusionList *bool `json:"isInclusionList,omitempty"`
11610 }
11611
11612
11613 type DiskInformation struct {
11614 Lun *int32 `json:"lun,omitempty"`
11615 Name *string `json:"name,omitempty"`
11616 }
11617
11618
11619 type DistributedNodesInfo struct {
11620
11621 NodeName *string `json:"nodeName,omitempty"`
11622
11623
11624 Status *string `json:"status,omitempty"`
11625
11626 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
11627 }
11628
11629
11630 type DpmBackupEngine struct {
11631
11632 FriendlyName *string `json:"friendlyName,omitempty"`
11633
11634 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11635
11636 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11637
11638 BackupEngineState *string `json:"backupEngineState,omitempty"`
11639
11640 HealthStatus *string `json:"healthStatus,omitempty"`
11641
11642 CanReRegister *bool `json:"canReRegister,omitempty"`
11643
11644 BackupEngineID *string `json:"backupEngineId,omitempty"`
11645
11646 DpmVersion *string `json:"dpmVersion,omitempty"`
11647
11648 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
11649
11650 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
11651
11652 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
11653
11654 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
11655
11656 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
11657 }
11658
11659
11660 func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) {
11661 dbe.BackupEngineType = EngineTypeBackupEngineTypeDpmBackupEngine
11662 objectMap := make(map[string]interface{})
11663 if dbe.FriendlyName != nil {
11664 objectMap["friendlyName"] = dbe.FriendlyName
11665 }
11666 if dbe.BackupManagementType != "" {
11667 objectMap["backupManagementType"] = dbe.BackupManagementType
11668 }
11669 if dbe.RegistrationStatus != nil {
11670 objectMap["registrationStatus"] = dbe.RegistrationStatus
11671 }
11672 if dbe.BackupEngineState != nil {
11673 objectMap["backupEngineState"] = dbe.BackupEngineState
11674 }
11675 if dbe.HealthStatus != nil {
11676 objectMap["healthStatus"] = dbe.HealthStatus
11677 }
11678 if dbe.CanReRegister != nil {
11679 objectMap["canReRegister"] = dbe.CanReRegister
11680 }
11681 if dbe.BackupEngineID != nil {
11682 objectMap["backupEngineId"] = dbe.BackupEngineID
11683 }
11684 if dbe.DpmVersion != nil {
11685 objectMap["dpmVersion"] = dbe.DpmVersion
11686 }
11687 if dbe.AzureBackupAgentVersion != nil {
11688 objectMap["azureBackupAgentVersion"] = dbe.AzureBackupAgentVersion
11689 }
11690 if dbe.IsAzureBackupAgentUpgradeAvailable != nil {
11691 objectMap["isAzureBackupAgentUpgradeAvailable"] = dbe.IsAzureBackupAgentUpgradeAvailable
11692 }
11693 if dbe.IsDpmUpgradeAvailable != nil {
11694 objectMap["isDpmUpgradeAvailable"] = dbe.IsDpmUpgradeAvailable
11695 }
11696 if dbe.ExtendedInfo != nil {
11697 objectMap["extendedInfo"] = dbe.ExtendedInfo
11698 }
11699 if dbe.BackupEngineType != "" {
11700 objectMap["backupEngineType"] = dbe.BackupEngineType
11701 }
11702 return json.Marshal(objectMap)
11703 }
11704
11705
11706 func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
11707 return nil, false
11708 }
11709
11710
11711 func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
11712 return &dbe, true
11713 }
11714
11715
11716 func (dbe DpmBackupEngine) AsEngineBase() (*EngineBase, bool) {
11717 return nil, false
11718 }
11719
11720
11721 func (dbe DpmBackupEngine) AsBasicEngineBase() (BasicEngineBase, bool) {
11722 return &dbe, true
11723 }
11724
11725
11726 type BasicDpmContainer interface {
11727 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
11728 AsDpmContainer() (*DpmContainer, bool)
11729 }
11730
11731
11732 type DpmContainer struct {
11733
11734 CanReRegister *bool `json:"canReRegister,omitempty"`
11735
11736 ContainerID *string `json:"containerId,omitempty"`
11737
11738 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
11739
11740 DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"`
11741
11742 DpmServers *[]string `json:"dpmServers,omitempty"`
11743
11744 UpgradeAvailable *bool `json:"upgradeAvailable,omitempty"`
11745
11746 ProtectionStatus *string `json:"protectionStatus,omitempty"`
11747
11748 ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"`
11749
11750 FriendlyName *string `json:"friendlyName,omitempty"`
11751
11752 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11753
11754 RegistrationStatus *string `json:"registrationStatus,omitempty"`
11755
11756 HealthStatus *string `json:"healthStatus,omitempty"`
11757
11758 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
11759 }
11760
11761 func unmarshalBasicDpmContainer(body []byte) (BasicDpmContainer, error) {
11762 var m map[string]interface{}
11763 err := json.Unmarshal(body, &m)
11764 if err != nil {
11765 return nil, err
11766 }
11767
11768 switch m["containerType"] {
11769 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer):
11770 var absc AzureBackupServerContainer
11771 err := json.Unmarshal(body, &absc)
11772 return absc, err
11773 default:
11774 var dc DpmContainer
11775 err := json.Unmarshal(body, &dc)
11776 return dc, err
11777 }
11778 }
11779 func unmarshalBasicDpmContainerArray(body []byte) ([]BasicDpmContainer, error) {
11780 var rawMessages []*json.RawMessage
11781 err := json.Unmarshal(body, &rawMessages)
11782 if err != nil {
11783 return nil, err
11784 }
11785
11786 dcArray := make([]BasicDpmContainer, len(rawMessages))
11787
11788 for index, rawMessage := range rawMessages {
11789 dc, err := unmarshalBasicDpmContainer(*rawMessage)
11790 if err != nil {
11791 return nil, err
11792 }
11793 dcArray[index] = dc
11794 }
11795 return dcArray, nil
11796 }
11797
11798
11799 func (dc DpmContainer) MarshalJSON() ([]byte, error) {
11800 dc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeDPMContainer
11801 objectMap := make(map[string]interface{})
11802 if dc.CanReRegister != nil {
11803 objectMap["canReRegister"] = dc.CanReRegister
11804 }
11805 if dc.ContainerID != nil {
11806 objectMap["containerId"] = dc.ContainerID
11807 }
11808 if dc.ProtectedItemCount != nil {
11809 objectMap["protectedItemCount"] = dc.ProtectedItemCount
11810 }
11811 if dc.DpmAgentVersion != nil {
11812 objectMap["dpmAgentVersion"] = dc.DpmAgentVersion
11813 }
11814 if dc.DpmServers != nil {
11815 objectMap["dpmServers"] = dc.DpmServers
11816 }
11817 if dc.UpgradeAvailable != nil {
11818 objectMap["upgradeAvailable"] = dc.UpgradeAvailable
11819 }
11820 if dc.ProtectionStatus != nil {
11821 objectMap["protectionStatus"] = dc.ProtectionStatus
11822 }
11823 if dc.ExtendedInfo != nil {
11824 objectMap["extendedInfo"] = dc.ExtendedInfo
11825 }
11826 if dc.FriendlyName != nil {
11827 objectMap["friendlyName"] = dc.FriendlyName
11828 }
11829 if dc.BackupManagementType != "" {
11830 objectMap["backupManagementType"] = dc.BackupManagementType
11831 }
11832 if dc.RegistrationStatus != nil {
11833 objectMap["registrationStatus"] = dc.RegistrationStatus
11834 }
11835 if dc.HealthStatus != nil {
11836 objectMap["healthStatus"] = dc.HealthStatus
11837 }
11838 if dc.ContainerType != "" {
11839 objectMap["containerType"] = dc.ContainerType
11840 }
11841 return json.Marshal(objectMap)
11842 }
11843
11844
11845 func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
11846 return nil, false
11847 }
11848
11849
11850 func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
11851 return nil, false
11852 }
11853
11854
11855 func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
11856 return nil, false
11857 }
11858
11859
11860 func (dc DpmContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
11861 return nil, false
11862 }
11863
11864
11865 func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
11866 return nil, false
11867 }
11868
11869
11870 func (dc DpmContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
11871 return nil, false
11872 }
11873
11874
11875 func (dc DpmContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
11876 return nil, false
11877 }
11878
11879
11880 func (dc DpmContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
11881 return nil, false
11882 }
11883
11884
11885 func (dc DpmContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
11886 return nil, false
11887 }
11888
11889
11890 func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) {
11891 return &dc, true
11892 }
11893
11894
11895 func (dc DpmContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
11896 return &dc, true
11897 }
11898
11899
11900 func (dc DpmContainer) AsGenericContainer() (*GenericContainer, bool) {
11901 return nil, false
11902 }
11903
11904
11905 func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
11906 return nil, false
11907 }
11908
11909
11910 func (dc DpmContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
11911 return nil, false
11912 }
11913
11914
11915 func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) {
11916 return nil, false
11917 }
11918
11919
11920 func (dc DpmContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
11921 return nil, false
11922 }
11923
11924
11925 func (dc DpmContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
11926 return &dc, true
11927 }
11928
11929
11930 type DPMContainerExtendedInfo struct {
11931
11932 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
11933 }
11934
11935
11936 type DpmErrorInfo struct {
11937
11938 ErrorString *string `json:"errorString,omitempty"`
11939
11940 Recommendations *[]string `json:"recommendations,omitempty"`
11941 }
11942
11943
11944 type DpmJob struct {
11945
11946 Duration *string `json:"duration,omitempty"`
11947
11948 DpmServerName *string `json:"dpmServerName,omitempty"`
11949
11950 ContainerName *string `json:"containerName,omitempty"`
11951
11952 ContainerType *string `json:"containerType,omitempty"`
11953
11954 WorkloadType *string `json:"workloadType,omitempty"`
11955
11956 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
11957
11958 ErrorDetails *[]DpmErrorInfo `json:"errorDetails,omitempty"`
11959
11960 ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"`
11961
11962 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
11963
11964 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
11965
11966 Operation *string `json:"operation,omitempty"`
11967
11968 Status *string `json:"status,omitempty"`
11969
11970 StartTime *date.Time `json:"startTime,omitempty"`
11971
11972 EndTime *date.Time `json:"endTime,omitempty"`
11973
11974 ActivityID *string `json:"activityId,omitempty"`
11975
11976 JobType JobType `json:"jobType,omitempty"`
11977 }
11978
11979
11980 func (dj DpmJob) MarshalJSON() ([]byte, error) {
11981 dj.JobType = JobTypeDpmJob
11982 objectMap := make(map[string]interface{})
11983 if dj.Duration != nil {
11984 objectMap["duration"] = dj.Duration
11985 }
11986 if dj.DpmServerName != nil {
11987 objectMap["dpmServerName"] = dj.DpmServerName
11988 }
11989 if dj.ContainerName != nil {
11990 objectMap["containerName"] = dj.ContainerName
11991 }
11992 if dj.ContainerType != nil {
11993 objectMap["containerType"] = dj.ContainerType
11994 }
11995 if dj.WorkloadType != nil {
11996 objectMap["workloadType"] = dj.WorkloadType
11997 }
11998 if dj.ActionsInfo != nil {
11999 objectMap["actionsInfo"] = dj.ActionsInfo
12000 }
12001 if dj.ErrorDetails != nil {
12002 objectMap["errorDetails"] = dj.ErrorDetails
12003 }
12004 if dj.ExtendedInfo != nil {
12005 objectMap["extendedInfo"] = dj.ExtendedInfo
12006 }
12007 if dj.EntityFriendlyName != nil {
12008 objectMap["entityFriendlyName"] = dj.EntityFriendlyName
12009 }
12010 if dj.BackupManagementType != "" {
12011 objectMap["backupManagementType"] = dj.BackupManagementType
12012 }
12013 if dj.Operation != nil {
12014 objectMap["operation"] = dj.Operation
12015 }
12016 if dj.Status != nil {
12017 objectMap["status"] = dj.Status
12018 }
12019 if dj.StartTime != nil {
12020 objectMap["startTime"] = dj.StartTime
12021 }
12022 if dj.EndTime != nil {
12023 objectMap["endTime"] = dj.EndTime
12024 }
12025 if dj.ActivityID != nil {
12026 objectMap["activityId"] = dj.ActivityID
12027 }
12028 if dj.JobType != "" {
12029 objectMap["jobType"] = dj.JobType
12030 }
12031 return json.Marshal(objectMap)
12032 }
12033
12034
12035 func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
12036 return nil, false
12037 }
12038
12039
12040 func (dj DpmJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
12041 return nil, false
12042 }
12043
12044
12045 func (dj DpmJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
12046 return nil, false
12047 }
12048
12049
12050 func (dj DpmJob) AsDpmJob() (*DpmJob, bool) {
12051 return &dj, true
12052 }
12053
12054
12055 func (dj DpmJob) AsMabJob() (*MabJob, bool) {
12056 return nil, false
12057 }
12058
12059
12060 func (dj DpmJob) AsVaultJob() (*VaultJob, bool) {
12061 return nil, false
12062 }
12063
12064
12065 func (dj DpmJob) AsJob() (*Job, bool) {
12066 return nil, false
12067 }
12068
12069
12070 func (dj DpmJob) AsBasicJob() (BasicJob, bool) {
12071 return &dj, true
12072 }
12073
12074
12075 type DpmJobExtendedInfo struct {
12076
12077 TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"`
12078
12079 PropertyBag map[string]*string `json:"propertyBag"`
12080
12081 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
12082 }
12083
12084
12085 func (djei DpmJobExtendedInfo) MarshalJSON() ([]byte, error) {
12086 objectMap := make(map[string]interface{})
12087 if djei.TasksList != nil {
12088 objectMap["tasksList"] = djei.TasksList
12089 }
12090 if djei.PropertyBag != nil {
12091 objectMap["propertyBag"] = djei.PropertyBag
12092 }
12093 if djei.DynamicErrorMessage != nil {
12094 objectMap["dynamicErrorMessage"] = djei.DynamicErrorMessage
12095 }
12096 return json.Marshal(objectMap)
12097 }
12098
12099
12100 type DpmJobTaskDetails struct {
12101
12102 TaskID *string `json:"taskId,omitempty"`
12103
12104 StartTime *date.Time `json:"startTime,omitempty"`
12105
12106 EndTime *date.Time `json:"endTime,omitempty"`
12107
12108 Duration *string `json:"duration,omitempty"`
12109
12110 Status *string `json:"status,omitempty"`
12111 }
12112
12113
12114 type DPMProtectedItem struct {
12115
12116 FriendlyName *string `json:"friendlyName,omitempty"`
12117
12118 BackupEngineName *string `json:"backupEngineName,omitempty"`
12119
12120 ProtectionState ProtectedItemState `json:"protectionState,omitempty"`
12121
12122 ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
12123
12124 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12125
12126 WorkloadType DataSourceType `json:"workloadType,omitempty"`
12127
12128 ContainerName *string `json:"containerName,omitempty"`
12129
12130 SourceResourceID *string `json:"sourceResourceId,omitempty"`
12131
12132 PolicyID *string `json:"policyId,omitempty"`
12133
12134 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
12135
12136 BackupSetName *string `json:"backupSetName,omitempty"`
12137
12138 CreateMode CreateMode `json:"createMode,omitempty"`
12139
12140 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
12141
12142 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
12143
12144 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
12145
12146 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
12147
12148 IsRehydrate *bool `json:"isRehydrate,omitempty"`
12149
12150 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
12151
12152 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
12153 }
12154
12155
12156 func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) {
12157 dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem
12158 objectMap := make(map[string]interface{})
12159 if dpi.FriendlyName != nil {
12160 objectMap["friendlyName"] = dpi.FriendlyName
12161 }
12162 if dpi.BackupEngineName != nil {
12163 objectMap["backupEngineName"] = dpi.BackupEngineName
12164 }
12165 if dpi.ProtectionState != "" {
12166 objectMap["protectionState"] = dpi.ProtectionState
12167 }
12168 if dpi.ExtendedInfo != nil {
12169 objectMap["extendedInfo"] = dpi.ExtendedInfo
12170 }
12171 if dpi.BackupManagementType != "" {
12172 objectMap["backupManagementType"] = dpi.BackupManagementType
12173 }
12174 if dpi.WorkloadType != "" {
12175 objectMap["workloadType"] = dpi.WorkloadType
12176 }
12177 if dpi.ContainerName != nil {
12178 objectMap["containerName"] = dpi.ContainerName
12179 }
12180 if dpi.SourceResourceID != nil {
12181 objectMap["sourceResourceId"] = dpi.SourceResourceID
12182 }
12183 if dpi.PolicyID != nil {
12184 objectMap["policyId"] = dpi.PolicyID
12185 }
12186 if dpi.LastRecoveryPoint != nil {
12187 objectMap["lastRecoveryPoint"] = dpi.LastRecoveryPoint
12188 }
12189 if dpi.BackupSetName != nil {
12190 objectMap["backupSetName"] = dpi.BackupSetName
12191 }
12192 if dpi.CreateMode != "" {
12193 objectMap["createMode"] = dpi.CreateMode
12194 }
12195 if dpi.DeferredDeleteTimeInUTC != nil {
12196 objectMap["deferredDeleteTimeInUTC"] = dpi.DeferredDeleteTimeInUTC
12197 }
12198 if dpi.IsScheduledForDeferredDelete != nil {
12199 objectMap["isScheduledForDeferredDelete"] = dpi.IsScheduledForDeferredDelete
12200 }
12201 if dpi.DeferredDeleteTimeRemaining != nil {
12202 objectMap["deferredDeleteTimeRemaining"] = dpi.DeferredDeleteTimeRemaining
12203 }
12204 if dpi.IsDeferredDeleteScheduleUpcoming != nil {
12205 objectMap["isDeferredDeleteScheduleUpcoming"] = dpi.IsDeferredDeleteScheduleUpcoming
12206 }
12207 if dpi.IsRehydrate != nil {
12208 objectMap["isRehydrate"] = dpi.IsRehydrate
12209 }
12210 if dpi.ResourceGuardOperationRequests != nil {
12211 objectMap["resourceGuardOperationRequests"] = dpi.ResourceGuardOperationRequests
12212 }
12213 if dpi.ProtectedItemType != "" {
12214 objectMap["protectedItemType"] = dpi.ProtectedItemType
12215 }
12216 return json.Marshal(objectMap)
12217 }
12218
12219
12220 func (dpi DPMProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
12221 return nil, false
12222 }
12223
12224
12225 func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
12226 return nil, false
12227 }
12228
12229
12230 func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
12231 return nil, false
12232 }
12233
12234
12235 func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
12236 return nil, false
12237 }
12238
12239
12240 func (dpi DPMProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
12241 return nil, false
12242 }
12243
12244
12245 func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
12246 return nil, false
12247 }
12248
12249
12250 func (dpi DPMProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
12251 return nil, false
12252 }
12253
12254
12255 func (dpi DPMProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
12256 return nil, false
12257 }
12258
12259
12260 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
12261 return nil, false
12262 }
12263
12264
12265 func (dpi DPMProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
12266 return nil, false
12267 }
12268
12269
12270 func (dpi DPMProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
12271 return nil, false
12272 }
12273
12274
12275 func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
12276 return &dpi, true
12277 }
12278
12279
12280 func (dpi DPMProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
12281 return nil, false
12282 }
12283
12284
12285 func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
12286 return nil, false
12287 }
12288
12289
12290 func (dpi DPMProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
12291 return nil, false
12292 }
12293
12294
12295 func (dpi DPMProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
12296 return &dpi, true
12297 }
12298
12299
12300 type DPMProtectedItemExtendedInfo struct {
12301
12302 ProtectableObjectLoadPath map[string]*string `json:"protectableObjectLoadPath"`
12303
12304 Protected *bool `json:"protected,omitempty"`
12305
12306 IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"`
12307
12308 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
12309
12310 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
12311
12312 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
12313
12314 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
12315
12316 OnPremiseOldestRecoveryPoint *date.Time `json:"onPremiseOldestRecoveryPoint,omitempty"`
12317
12318 OnPremiseLatestRecoveryPoint *date.Time `json:"onPremiseLatestRecoveryPoint,omitempty"`
12319
12320 OnPremiseRecoveryPointCount *int32 `json:"onPremiseRecoveryPointCount,omitempty"`
12321
12322 IsCollocated *bool `json:"isCollocated,omitempty"`
12323
12324 ProtectionGroupName *string `json:"protectionGroupName,omitempty"`
12325
12326 DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"`
12327
12328 TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"`
12329 }
12330
12331
12332 func (dpiei DPMProtectedItemExtendedInfo) MarshalJSON() ([]byte, error) {
12333 objectMap := make(map[string]interface{})
12334 if dpiei.ProtectableObjectLoadPath != nil {
12335 objectMap["protectableObjectLoadPath"] = dpiei.ProtectableObjectLoadPath
12336 }
12337 if dpiei.Protected != nil {
12338 objectMap["protected"] = dpiei.Protected
12339 }
12340 if dpiei.IsPresentOnCloud != nil {
12341 objectMap["isPresentOnCloud"] = dpiei.IsPresentOnCloud
12342 }
12343 if dpiei.LastBackupStatus != nil {
12344 objectMap["lastBackupStatus"] = dpiei.LastBackupStatus
12345 }
12346 if dpiei.LastRefreshedAt != nil {
12347 objectMap["lastRefreshedAt"] = dpiei.LastRefreshedAt
12348 }
12349 if dpiei.OldestRecoveryPoint != nil {
12350 objectMap["oldestRecoveryPoint"] = dpiei.OldestRecoveryPoint
12351 }
12352 if dpiei.RecoveryPointCount != nil {
12353 objectMap["recoveryPointCount"] = dpiei.RecoveryPointCount
12354 }
12355 if dpiei.OnPremiseOldestRecoveryPoint != nil {
12356 objectMap["onPremiseOldestRecoveryPoint"] = dpiei.OnPremiseOldestRecoveryPoint
12357 }
12358 if dpiei.OnPremiseLatestRecoveryPoint != nil {
12359 objectMap["onPremiseLatestRecoveryPoint"] = dpiei.OnPremiseLatestRecoveryPoint
12360 }
12361 if dpiei.OnPremiseRecoveryPointCount != nil {
12362 objectMap["onPremiseRecoveryPointCount"] = dpiei.OnPremiseRecoveryPointCount
12363 }
12364 if dpiei.IsCollocated != nil {
12365 objectMap["isCollocated"] = dpiei.IsCollocated
12366 }
12367 if dpiei.ProtectionGroupName != nil {
12368 objectMap["protectionGroupName"] = dpiei.ProtectionGroupName
12369 }
12370 if dpiei.DiskStorageUsedInBytes != nil {
12371 objectMap["diskStorageUsedInBytes"] = dpiei.DiskStorageUsedInBytes
12372 }
12373 if dpiei.TotalDiskStorageSizeInBytes != nil {
12374 objectMap["totalDiskStorageSizeInBytes"] = dpiei.TotalDiskStorageSizeInBytes
12375 }
12376 return json.Marshal(objectMap)
12377 }
12378
12379
12380 type EncryptionDetails struct {
12381
12382 EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"`
12383
12384 KekURL *string `json:"kekUrl,omitempty"`
12385
12386 SecretKeyURL *string `json:"secretKeyUrl,omitempty"`
12387
12388 KekVaultID *string `json:"kekVaultId,omitempty"`
12389
12390 SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"`
12391 }
12392
12393
12394 type BasicEngineBase interface {
12395 AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool)
12396 AsDpmBackupEngine() (*DpmBackupEngine, bool)
12397 AsEngineBase() (*EngineBase, bool)
12398 }
12399
12400
12401 type EngineBase struct {
12402
12403 FriendlyName *string `json:"friendlyName,omitempty"`
12404
12405 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
12406
12407 RegistrationStatus *string `json:"registrationStatus,omitempty"`
12408
12409 BackupEngineState *string `json:"backupEngineState,omitempty"`
12410
12411 HealthStatus *string `json:"healthStatus,omitempty"`
12412
12413 CanReRegister *bool `json:"canReRegister,omitempty"`
12414
12415 BackupEngineID *string `json:"backupEngineId,omitempty"`
12416
12417 DpmVersion *string `json:"dpmVersion,omitempty"`
12418
12419 AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"`
12420
12421 IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"`
12422
12423 IsDpmUpgradeAvailable *bool `json:"isDpmUpgradeAvailable,omitempty"`
12424
12425 ExtendedInfo *EngineExtendedInfo `json:"extendedInfo,omitempty"`
12426
12427 BackupEngineType EngineType `json:"backupEngineType,omitempty"`
12428 }
12429
12430 func unmarshalBasicEngineBase(body []byte) (BasicEngineBase, error) {
12431 var m map[string]interface{}
12432 err := json.Unmarshal(body, &m)
12433 if err != nil {
12434 return nil, err
12435 }
12436
12437 switch m["backupEngineType"] {
12438 case string(EngineTypeBackupEngineTypeAzureBackupServerEngine):
12439 var abse AzureBackupServerEngine
12440 err := json.Unmarshal(body, &abse)
12441 return abse, err
12442 case string(EngineTypeBackupEngineTypeDpmBackupEngine):
12443 var dbe DpmBackupEngine
12444 err := json.Unmarshal(body, &dbe)
12445 return dbe, err
12446 default:
12447 var eb EngineBase
12448 err := json.Unmarshal(body, &eb)
12449 return eb, err
12450 }
12451 }
12452 func unmarshalBasicEngineBaseArray(body []byte) ([]BasicEngineBase, error) {
12453 var rawMessages []*json.RawMessage
12454 err := json.Unmarshal(body, &rawMessages)
12455 if err != nil {
12456 return nil, err
12457 }
12458
12459 ebArray := make([]BasicEngineBase, len(rawMessages))
12460
12461 for index, rawMessage := range rawMessages {
12462 eb, err := unmarshalBasicEngineBase(*rawMessage)
12463 if err != nil {
12464 return nil, err
12465 }
12466 ebArray[index] = eb
12467 }
12468 return ebArray, nil
12469 }
12470
12471
12472 func (eb EngineBase) MarshalJSON() ([]byte, error) {
12473 eb.BackupEngineType = EngineTypeBackupEngineTypeBackupEngineBase
12474 objectMap := make(map[string]interface{})
12475 if eb.FriendlyName != nil {
12476 objectMap["friendlyName"] = eb.FriendlyName
12477 }
12478 if eb.BackupManagementType != "" {
12479 objectMap["backupManagementType"] = eb.BackupManagementType
12480 }
12481 if eb.RegistrationStatus != nil {
12482 objectMap["registrationStatus"] = eb.RegistrationStatus
12483 }
12484 if eb.BackupEngineState != nil {
12485 objectMap["backupEngineState"] = eb.BackupEngineState
12486 }
12487 if eb.HealthStatus != nil {
12488 objectMap["healthStatus"] = eb.HealthStatus
12489 }
12490 if eb.CanReRegister != nil {
12491 objectMap["canReRegister"] = eb.CanReRegister
12492 }
12493 if eb.BackupEngineID != nil {
12494 objectMap["backupEngineId"] = eb.BackupEngineID
12495 }
12496 if eb.DpmVersion != nil {
12497 objectMap["dpmVersion"] = eb.DpmVersion
12498 }
12499 if eb.AzureBackupAgentVersion != nil {
12500 objectMap["azureBackupAgentVersion"] = eb.AzureBackupAgentVersion
12501 }
12502 if eb.IsAzureBackupAgentUpgradeAvailable != nil {
12503 objectMap["isAzureBackupAgentUpgradeAvailable"] = eb.IsAzureBackupAgentUpgradeAvailable
12504 }
12505 if eb.IsDpmUpgradeAvailable != nil {
12506 objectMap["isDpmUpgradeAvailable"] = eb.IsDpmUpgradeAvailable
12507 }
12508 if eb.ExtendedInfo != nil {
12509 objectMap["extendedInfo"] = eb.ExtendedInfo
12510 }
12511 if eb.BackupEngineType != "" {
12512 objectMap["backupEngineType"] = eb.BackupEngineType
12513 }
12514 return json.Marshal(objectMap)
12515 }
12516
12517
12518 func (eb EngineBase) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) {
12519 return nil, false
12520 }
12521
12522
12523 func (eb EngineBase) AsDpmBackupEngine() (*DpmBackupEngine, bool) {
12524 return nil, false
12525 }
12526
12527
12528 func (eb EngineBase) AsEngineBase() (*EngineBase, bool) {
12529 return &eb, true
12530 }
12531
12532
12533 func (eb EngineBase) AsBasicEngineBase() (BasicEngineBase, bool) {
12534 return &eb, true
12535 }
12536
12537
12538
12539 type EngineBaseResource struct {
12540 autorest.Response `json:"-"`
12541
12542 Properties BasicEngineBase `json:"properties,omitempty"`
12543
12544 ID *string `json:"id,omitempty"`
12545
12546 Name *string `json:"name,omitempty"`
12547
12548 Type *string `json:"type,omitempty"`
12549
12550 Location *string `json:"location,omitempty"`
12551
12552 Tags map[string]*string `json:"tags"`
12553
12554 ETag *string `json:"eTag,omitempty"`
12555 }
12556
12557
12558 func (ebr EngineBaseResource) MarshalJSON() ([]byte, error) {
12559 objectMap := make(map[string]interface{})
12560 objectMap["properties"] = ebr.Properties
12561 if ebr.Location != nil {
12562 objectMap["location"] = ebr.Location
12563 }
12564 if ebr.Tags != nil {
12565 objectMap["tags"] = ebr.Tags
12566 }
12567 if ebr.ETag != nil {
12568 objectMap["eTag"] = ebr.ETag
12569 }
12570 return json.Marshal(objectMap)
12571 }
12572
12573
12574 func (ebr *EngineBaseResource) UnmarshalJSON(body []byte) error {
12575 var m map[string]*json.RawMessage
12576 err := json.Unmarshal(body, &m)
12577 if err != nil {
12578 return err
12579 }
12580 for k, v := range m {
12581 switch k {
12582 case "properties":
12583 if v != nil {
12584 properties, err := unmarshalBasicEngineBase(*v)
12585 if err != nil {
12586 return err
12587 }
12588 ebr.Properties = properties
12589 }
12590 case "id":
12591 if v != nil {
12592 var ID string
12593 err = json.Unmarshal(*v, &ID)
12594 if err != nil {
12595 return err
12596 }
12597 ebr.ID = &ID
12598 }
12599 case "name":
12600 if v != nil {
12601 var name string
12602 err = json.Unmarshal(*v, &name)
12603 if err != nil {
12604 return err
12605 }
12606 ebr.Name = &name
12607 }
12608 case "type":
12609 if v != nil {
12610 var typeVar string
12611 err = json.Unmarshal(*v, &typeVar)
12612 if err != nil {
12613 return err
12614 }
12615 ebr.Type = &typeVar
12616 }
12617 case "location":
12618 if v != nil {
12619 var location string
12620 err = json.Unmarshal(*v, &location)
12621 if err != nil {
12622 return err
12623 }
12624 ebr.Location = &location
12625 }
12626 case "tags":
12627 if v != nil {
12628 var tags map[string]*string
12629 err = json.Unmarshal(*v, &tags)
12630 if err != nil {
12631 return err
12632 }
12633 ebr.Tags = tags
12634 }
12635 case "eTag":
12636 if v != nil {
12637 var eTag string
12638 err = json.Unmarshal(*v, &eTag)
12639 if err != nil {
12640 return err
12641 }
12642 ebr.ETag = &eTag
12643 }
12644 }
12645 }
12646
12647 return nil
12648 }
12649
12650
12651 type EngineBaseResourceList struct {
12652 autorest.Response `json:"-"`
12653
12654 Value *[]EngineBaseResource `json:"value,omitempty"`
12655
12656 NextLink *string `json:"nextLink,omitempty"`
12657 }
12658
12659
12660 type EngineBaseResourceListIterator struct {
12661 i int
12662 page EngineBaseResourceListPage
12663 }
12664
12665
12666
12667 func (iter *EngineBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) {
12668 if tracing.IsEnabled() {
12669 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListIterator.NextWithContext")
12670 defer func() {
12671 sc := -1
12672 if iter.Response().Response.Response != nil {
12673 sc = iter.Response().Response.Response.StatusCode
12674 }
12675 tracing.EndSpan(ctx, sc, err)
12676 }()
12677 }
12678 iter.i++
12679 if iter.i < len(iter.page.Values()) {
12680 return nil
12681 }
12682 err = iter.page.NextWithContext(ctx)
12683 if err != nil {
12684 iter.i--
12685 return err
12686 }
12687 iter.i = 0
12688 return nil
12689 }
12690
12691
12692
12693
12694 func (iter *EngineBaseResourceListIterator) Next() error {
12695 return iter.NextWithContext(context.Background())
12696 }
12697
12698
12699 func (iter EngineBaseResourceListIterator) NotDone() bool {
12700 return iter.page.NotDone() && iter.i < len(iter.page.Values())
12701 }
12702
12703
12704 func (iter EngineBaseResourceListIterator) Response() EngineBaseResourceList {
12705 return iter.page.Response()
12706 }
12707
12708
12709
12710 func (iter EngineBaseResourceListIterator) Value() EngineBaseResource {
12711 if !iter.page.NotDone() {
12712 return EngineBaseResource{}
12713 }
12714 return iter.page.Values()[iter.i]
12715 }
12716
12717
12718 func NewEngineBaseResourceListIterator(page EngineBaseResourceListPage) EngineBaseResourceListIterator {
12719 return EngineBaseResourceListIterator{page: page}
12720 }
12721
12722
12723 func (ebrl EngineBaseResourceList) IsEmpty() bool {
12724 return ebrl.Value == nil || len(*ebrl.Value) == 0
12725 }
12726
12727
12728 func (ebrl EngineBaseResourceList) hasNextLink() bool {
12729 return ebrl.NextLink != nil && len(*ebrl.NextLink) != 0
12730 }
12731
12732
12733
12734 func (ebrl EngineBaseResourceList) engineBaseResourceListPreparer(ctx context.Context) (*http.Request, error) {
12735 if !ebrl.hasNextLink() {
12736 return nil, nil
12737 }
12738 return autorest.Prepare((&http.Request{}).WithContext(ctx),
12739 autorest.AsJSON(),
12740 autorest.AsGet(),
12741 autorest.WithBaseURL(to.String(ebrl.NextLink)))
12742 }
12743
12744
12745 type EngineBaseResourceListPage struct {
12746 fn func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)
12747 ebrl EngineBaseResourceList
12748 }
12749
12750
12751
12752 func (page *EngineBaseResourceListPage) NextWithContext(ctx context.Context) (err error) {
12753 if tracing.IsEnabled() {
12754 ctx = tracing.StartSpan(ctx, fqdn+"/EngineBaseResourceListPage.NextWithContext")
12755 defer func() {
12756 sc := -1
12757 if page.Response().Response.Response != nil {
12758 sc = page.Response().Response.Response.StatusCode
12759 }
12760 tracing.EndSpan(ctx, sc, err)
12761 }()
12762 }
12763 for {
12764 next, err := page.fn(ctx, page.ebrl)
12765 if err != nil {
12766 return err
12767 }
12768 page.ebrl = next
12769 if !next.hasNextLink() || !next.IsEmpty() {
12770 break
12771 }
12772 }
12773 return nil
12774 }
12775
12776
12777
12778
12779 func (page *EngineBaseResourceListPage) Next() error {
12780 return page.NextWithContext(context.Background())
12781 }
12782
12783
12784 func (page EngineBaseResourceListPage) NotDone() bool {
12785 return !page.ebrl.IsEmpty()
12786 }
12787
12788
12789 func (page EngineBaseResourceListPage) Response() EngineBaseResourceList {
12790 return page.ebrl
12791 }
12792
12793
12794 func (page EngineBaseResourceListPage) Values() []EngineBaseResource {
12795 if page.ebrl.IsEmpty() {
12796 return nil
12797 }
12798 return *page.ebrl.Value
12799 }
12800
12801
12802 func NewEngineBaseResourceListPage(cur EngineBaseResourceList, getNextPage func(context.Context, EngineBaseResourceList) (EngineBaseResourceList, error)) EngineBaseResourceListPage {
12803 return EngineBaseResourceListPage{
12804 fn: getNextPage,
12805 ebrl: cur,
12806 }
12807 }
12808
12809
12810 type EngineExtendedInfo struct {
12811
12812 DatabaseName *string `json:"databaseName,omitempty"`
12813
12814 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
12815
12816 ProtectedServersCount *int32 `json:"protectedServersCount,omitempty"`
12817
12818 DiskCount *int32 `json:"diskCount,omitempty"`
12819
12820 UsedDiskSpace *float64 `json:"usedDiskSpace,omitempty"`
12821
12822 AvailableDiskSpace *float64 `json:"availableDiskSpace,omitempty"`
12823
12824 RefreshedAt *date.Time `json:"refreshedAt,omitempty"`
12825
12826 AzureProtectedInstances *int32 `json:"azureProtectedInstances,omitempty"`
12827 }
12828
12829
12830 type ErrorAdditionalInfo struct {
12831
12832 Type *string `json:"type,omitempty"`
12833
12834 Info interface{} `json:"info,omitempty"`
12835 }
12836
12837
12838 func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
12839 objectMap := make(map[string]interface{})
12840 return json.Marshal(objectMap)
12841 }
12842
12843
12844 type ErrorDetail struct {
12845
12846 Code *string `json:"code,omitempty"`
12847
12848 Message *string `json:"message,omitempty"`
12849
12850 Recommendations *[]string `json:"recommendations,omitempty"`
12851 }
12852
12853
12854 func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
12855 objectMap := make(map[string]interface{})
12856 return json.Marshal(objectMap)
12857 }
12858
12859
12860 type ExportJobsOperationResultInfo struct {
12861
12862 BlobURL *string `json:"blobUrl,omitempty"`
12863
12864 BlobSasKey *string `json:"blobSasKey,omitempty"`
12865
12866 ExcelFileBlobURL *string `json:"excelFileBlobUrl,omitempty"`
12867
12868 ExcelFileBlobSasKey *string `json:"excelFileBlobSasKey,omitempty"`
12869
12870 ObjectType ObjectType `json:"objectType,omitempty"`
12871 }
12872
12873
12874 func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) {
12875 ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo
12876 objectMap := make(map[string]interface{})
12877 if ejori.BlobURL != nil {
12878 objectMap["blobUrl"] = ejori.BlobURL
12879 }
12880 if ejori.BlobSasKey != nil {
12881 objectMap["blobSasKey"] = ejori.BlobSasKey
12882 }
12883 if ejori.ExcelFileBlobURL != nil {
12884 objectMap["excelFileBlobUrl"] = ejori.ExcelFileBlobURL
12885 }
12886 if ejori.ExcelFileBlobSasKey != nil {
12887 objectMap["excelFileBlobSasKey"] = ejori.ExcelFileBlobSasKey
12888 }
12889 if ejori.ObjectType != "" {
12890 objectMap["objectType"] = ejori.ObjectType
12891 }
12892 return json.Marshal(objectMap)
12893 }
12894
12895
12896 func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
12897 return &ejori, true
12898 }
12899
12900
12901 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
12902 return nil, false
12903 }
12904
12905
12906 func (ejori ExportJobsOperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
12907 return nil, false
12908 }
12909
12910
12911 func (ejori ExportJobsOperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
12912 return &ejori, true
12913 }
12914
12915
12916 type ExtendedProperties struct {
12917
12918 DiskExclusionProperties *DiskExclusionProperties `json:"diskExclusionProperties,omitempty"`
12919 }
12920
12921
12922 type BasicFeatureSupportRequest interface {
12923 AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool)
12924 AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool)
12925 AsFeatureSupportRequest() (*FeatureSupportRequest, bool)
12926 }
12927
12928
12929 type FeatureSupportRequest struct {
12930
12931 FeatureType FeatureType `json:"featureType,omitempty"`
12932 }
12933
12934 func unmarshalBasicFeatureSupportRequest(body []byte) (BasicFeatureSupportRequest, error) {
12935 var m map[string]interface{}
12936 err := json.Unmarshal(body, &m)
12937 if err != nil {
12938 return nil, err
12939 }
12940
12941 switch m["featureType"] {
12942 case string(FeatureTypeAzureBackupGoals):
12943 var abgfsr AzureBackupGoalFeatureSupportRequest
12944 err := json.Unmarshal(body, &abgfsr)
12945 return abgfsr, err
12946 case string(FeatureTypeAzureVMResourceBackup):
12947 var avrfsr AzureVMResourceFeatureSupportRequest
12948 err := json.Unmarshal(body, &avrfsr)
12949 return avrfsr, err
12950 default:
12951 var fsr FeatureSupportRequest
12952 err := json.Unmarshal(body, &fsr)
12953 return fsr, err
12954 }
12955 }
12956 func unmarshalBasicFeatureSupportRequestArray(body []byte) ([]BasicFeatureSupportRequest, error) {
12957 var rawMessages []*json.RawMessage
12958 err := json.Unmarshal(body, &rawMessages)
12959 if err != nil {
12960 return nil, err
12961 }
12962
12963 fsrArray := make([]BasicFeatureSupportRequest, len(rawMessages))
12964
12965 for index, rawMessage := range rawMessages {
12966 fsr, err := unmarshalBasicFeatureSupportRequest(*rawMessage)
12967 if err != nil {
12968 return nil, err
12969 }
12970 fsrArray[index] = fsr
12971 }
12972 return fsrArray, nil
12973 }
12974
12975
12976 func (fsr FeatureSupportRequest) MarshalJSON() ([]byte, error) {
12977 fsr.FeatureType = FeatureTypeFeatureSupportRequest
12978 objectMap := make(map[string]interface{})
12979 if fsr.FeatureType != "" {
12980 objectMap["featureType"] = fsr.FeatureType
12981 }
12982 return json.Marshal(objectMap)
12983 }
12984
12985
12986 func (fsr FeatureSupportRequest) AsAzureBackupGoalFeatureSupportRequest() (*AzureBackupGoalFeatureSupportRequest, bool) {
12987 return nil, false
12988 }
12989
12990
12991 func (fsr FeatureSupportRequest) AsAzureVMResourceFeatureSupportRequest() (*AzureVMResourceFeatureSupportRequest, bool) {
12992 return nil, false
12993 }
12994
12995
12996 func (fsr FeatureSupportRequest) AsFeatureSupportRequest() (*FeatureSupportRequest, bool) {
12997 return &fsr, true
12998 }
12999
13000
13001 func (fsr FeatureSupportRequest) AsBasicFeatureSupportRequest() (BasicFeatureSupportRequest, bool) {
13002 return &fsr, true
13003 }
13004
13005
13006 type GenericContainer struct {
13007
13008 FabricName *string `json:"fabricName,omitempty"`
13009
13010 ExtendedInformation *GenericContainerExtendedInfo `json:"extendedInformation,omitempty"`
13011
13012 FriendlyName *string `json:"friendlyName,omitempty"`
13013
13014 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13015
13016 RegistrationStatus *string `json:"registrationStatus,omitempty"`
13017
13018 HealthStatus *string `json:"healthStatus,omitempty"`
13019
13020 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
13021 }
13022
13023
13024 func (gc GenericContainer) MarshalJSON() ([]byte, error) {
13025 gc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeGenericContainer
13026 objectMap := make(map[string]interface{})
13027 if gc.FabricName != nil {
13028 objectMap["fabricName"] = gc.FabricName
13029 }
13030 if gc.ExtendedInformation != nil {
13031 objectMap["extendedInformation"] = gc.ExtendedInformation
13032 }
13033 if gc.FriendlyName != nil {
13034 objectMap["friendlyName"] = gc.FriendlyName
13035 }
13036 if gc.BackupManagementType != "" {
13037 objectMap["backupManagementType"] = gc.BackupManagementType
13038 }
13039 if gc.RegistrationStatus != nil {
13040 objectMap["registrationStatus"] = gc.RegistrationStatus
13041 }
13042 if gc.HealthStatus != nil {
13043 objectMap["healthStatus"] = gc.HealthStatus
13044 }
13045 if gc.ContainerType != "" {
13046 objectMap["containerType"] = gc.ContainerType
13047 }
13048 return json.Marshal(objectMap)
13049 }
13050
13051
13052 func (gc GenericContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
13053 return nil, false
13054 }
13055
13056
13057 func (gc GenericContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
13058 return nil, false
13059 }
13060
13061
13062 func (gc GenericContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
13063 return nil, false
13064 }
13065
13066
13067 func (gc GenericContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
13068 return nil, false
13069 }
13070
13071
13072 func (gc GenericContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
13073 return nil, false
13074 }
13075
13076
13077 func (gc GenericContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
13078 return nil, false
13079 }
13080
13081
13082 func (gc GenericContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
13083 return nil, false
13084 }
13085
13086
13087 func (gc GenericContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
13088 return nil, false
13089 }
13090
13091
13092 func (gc GenericContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
13093 return nil, false
13094 }
13095
13096
13097 func (gc GenericContainer) AsDpmContainer() (*DpmContainer, bool) {
13098 return nil, false
13099 }
13100
13101
13102 func (gc GenericContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13103 return nil, false
13104 }
13105
13106
13107 func (gc GenericContainer) AsGenericContainer() (*GenericContainer, bool) {
13108 return &gc, true
13109 }
13110
13111
13112 func (gc GenericContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13113 return nil, false
13114 }
13115
13116
13117 func (gc GenericContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13118 return nil, false
13119 }
13120
13121
13122 func (gc GenericContainer) AsMabContainer() (*MabContainer, bool) {
13123 return nil, false
13124 }
13125
13126
13127 func (gc GenericContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13128 return nil, false
13129 }
13130
13131
13132 func (gc GenericContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13133 return &gc, true
13134 }
13135
13136
13137 type GenericContainerExtendedInfo struct {
13138
13139 RawCertData *string `json:"rawCertData,omitempty"`
13140
13141 ContainerIdentityInfo *ContainerIdentityInfo `json:"containerIdentityInfo,omitempty"`
13142
13143 ServiceEndpoints map[string]*string `json:"serviceEndpoints"`
13144 }
13145
13146
13147 func (gcei GenericContainerExtendedInfo) MarshalJSON() ([]byte, error) {
13148 objectMap := make(map[string]interface{})
13149 if gcei.RawCertData != nil {
13150 objectMap["rawCertData"] = gcei.RawCertData
13151 }
13152 if gcei.ContainerIdentityInfo != nil {
13153 objectMap["containerIdentityInfo"] = gcei.ContainerIdentityInfo
13154 }
13155 if gcei.ServiceEndpoints != nil {
13156 objectMap["serviceEndpoints"] = gcei.ServiceEndpoints
13157 }
13158 return json.Marshal(objectMap)
13159 }
13160
13161
13162 type GenericProtectedItem struct {
13163
13164 FriendlyName *string `json:"friendlyName,omitempty"`
13165
13166 PolicyState *string `json:"policyState,omitempty"`
13167
13168 ProtectionState ProtectionState `json:"protectionState,omitempty"`
13169
13170 ProtectedItemID *int64 `json:"protectedItemId,omitempty"`
13171
13172 SourceAssociations map[string]*string `json:"sourceAssociations"`
13173
13174 FabricName *string `json:"fabricName,omitempty"`
13175
13176 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13177
13178 WorkloadType DataSourceType `json:"workloadType,omitempty"`
13179
13180 ContainerName *string `json:"containerName,omitempty"`
13181
13182 SourceResourceID *string `json:"sourceResourceId,omitempty"`
13183
13184 PolicyID *string `json:"policyId,omitempty"`
13185
13186 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
13187
13188 BackupSetName *string `json:"backupSetName,omitempty"`
13189
13190 CreateMode CreateMode `json:"createMode,omitempty"`
13191
13192 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
13193
13194 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
13195
13196 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
13197
13198 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
13199
13200 IsRehydrate *bool `json:"isRehydrate,omitempty"`
13201
13202 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
13203
13204 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
13205 }
13206
13207
13208 func (gpi GenericProtectedItem) MarshalJSON() ([]byte, error) {
13209 gpi.ProtectedItemType = ProtectedItemTypeGenericProtectedItem
13210 objectMap := make(map[string]interface{})
13211 if gpi.FriendlyName != nil {
13212 objectMap["friendlyName"] = gpi.FriendlyName
13213 }
13214 if gpi.PolicyState != nil {
13215 objectMap["policyState"] = gpi.PolicyState
13216 }
13217 if gpi.ProtectionState != "" {
13218 objectMap["protectionState"] = gpi.ProtectionState
13219 }
13220 if gpi.ProtectedItemID != nil {
13221 objectMap["protectedItemId"] = gpi.ProtectedItemID
13222 }
13223 if gpi.SourceAssociations != nil {
13224 objectMap["sourceAssociations"] = gpi.SourceAssociations
13225 }
13226 if gpi.FabricName != nil {
13227 objectMap["fabricName"] = gpi.FabricName
13228 }
13229 if gpi.BackupManagementType != "" {
13230 objectMap["backupManagementType"] = gpi.BackupManagementType
13231 }
13232 if gpi.WorkloadType != "" {
13233 objectMap["workloadType"] = gpi.WorkloadType
13234 }
13235 if gpi.ContainerName != nil {
13236 objectMap["containerName"] = gpi.ContainerName
13237 }
13238 if gpi.SourceResourceID != nil {
13239 objectMap["sourceResourceId"] = gpi.SourceResourceID
13240 }
13241 if gpi.PolicyID != nil {
13242 objectMap["policyId"] = gpi.PolicyID
13243 }
13244 if gpi.LastRecoveryPoint != nil {
13245 objectMap["lastRecoveryPoint"] = gpi.LastRecoveryPoint
13246 }
13247 if gpi.BackupSetName != nil {
13248 objectMap["backupSetName"] = gpi.BackupSetName
13249 }
13250 if gpi.CreateMode != "" {
13251 objectMap["createMode"] = gpi.CreateMode
13252 }
13253 if gpi.DeferredDeleteTimeInUTC != nil {
13254 objectMap["deferredDeleteTimeInUTC"] = gpi.DeferredDeleteTimeInUTC
13255 }
13256 if gpi.IsScheduledForDeferredDelete != nil {
13257 objectMap["isScheduledForDeferredDelete"] = gpi.IsScheduledForDeferredDelete
13258 }
13259 if gpi.DeferredDeleteTimeRemaining != nil {
13260 objectMap["deferredDeleteTimeRemaining"] = gpi.DeferredDeleteTimeRemaining
13261 }
13262 if gpi.IsDeferredDeleteScheduleUpcoming != nil {
13263 objectMap["isDeferredDeleteScheduleUpcoming"] = gpi.IsDeferredDeleteScheduleUpcoming
13264 }
13265 if gpi.IsRehydrate != nil {
13266 objectMap["isRehydrate"] = gpi.IsRehydrate
13267 }
13268 if gpi.ResourceGuardOperationRequests != nil {
13269 objectMap["resourceGuardOperationRequests"] = gpi.ResourceGuardOperationRequests
13270 }
13271 if gpi.ProtectedItemType != "" {
13272 objectMap["protectedItemType"] = gpi.ProtectedItemType
13273 }
13274 return json.Marshal(objectMap)
13275 }
13276
13277
13278 func (gpi GenericProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
13279 return nil, false
13280 }
13281
13282
13283 func (gpi GenericProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
13284 return nil, false
13285 }
13286
13287
13288 func (gpi GenericProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
13289 return nil, false
13290 }
13291
13292
13293 func (gpi GenericProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
13294 return nil, false
13295 }
13296
13297
13298 func (gpi GenericProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
13299 return nil, false
13300 }
13301
13302
13303 func (gpi GenericProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
13304 return nil, false
13305 }
13306
13307
13308 func (gpi GenericProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
13309 return nil, false
13310 }
13311
13312
13313 func (gpi GenericProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
13314 return nil, false
13315 }
13316
13317
13318 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
13319 return nil, false
13320 }
13321
13322
13323 func (gpi GenericProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
13324 return nil, false
13325 }
13326
13327
13328 func (gpi GenericProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
13329 return nil, false
13330 }
13331
13332
13333 func (gpi GenericProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
13334 return nil, false
13335 }
13336
13337
13338 func (gpi GenericProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
13339 return &gpi, true
13340 }
13341
13342
13343 func (gpi GenericProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
13344 return nil, false
13345 }
13346
13347
13348 func (gpi GenericProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
13349 return nil, false
13350 }
13351
13352
13353 func (gpi GenericProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
13354 return &gpi, true
13355 }
13356
13357
13358 type GenericProtectionPolicy struct {
13359
13360 SubProtectionPolicy *[]SubProtectionPolicy `json:"subProtectionPolicy,omitempty"`
13361
13362 TimeZone *string `json:"timeZone,omitempty"`
13363
13364 FabricName *string `json:"fabricName,omitempty"`
13365
13366 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
13367
13368 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
13369
13370 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
13371 }
13372
13373
13374 func (gpp GenericProtectionPolicy) MarshalJSON() ([]byte, error) {
13375 gpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy
13376 objectMap := make(map[string]interface{})
13377 if gpp.SubProtectionPolicy != nil {
13378 objectMap["subProtectionPolicy"] = gpp.SubProtectionPolicy
13379 }
13380 if gpp.TimeZone != nil {
13381 objectMap["timeZone"] = gpp.TimeZone
13382 }
13383 if gpp.FabricName != nil {
13384 objectMap["fabricName"] = gpp.FabricName
13385 }
13386 if gpp.ProtectedItemsCount != nil {
13387 objectMap["protectedItemsCount"] = gpp.ProtectedItemsCount
13388 }
13389 if gpp.ResourceGuardOperationRequests != nil {
13390 objectMap["resourceGuardOperationRequests"] = gpp.ResourceGuardOperationRequests
13391 }
13392 if gpp.BackupManagementType != "" {
13393 objectMap["backupManagementType"] = gpp.BackupManagementType
13394 }
13395 return json.Marshal(objectMap)
13396 }
13397
13398
13399 func (gpp GenericProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
13400 return nil, false
13401 }
13402
13403
13404 func (gpp GenericProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
13405 return nil, false
13406 }
13407
13408
13409 func (gpp GenericProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
13410 return nil, false
13411 }
13412
13413
13414 func (gpp GenericProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
13415 return nil, false
13416 }
13417
13418
13419 func (gpp GenericProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
13420 return &gpp, true
13421 }
13422
13423
13424 func (gpp GenericProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
13425 return nil, false
13426 }
13427
13428
13429 func (gpp GenericProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
13430 return nil, false
13431 }
13432
13433
13434 func (gpp GenericProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
13435 return &gpp, true
13436 }
13437
13438
13439 type GenericRecoveryPoint struct {
13440
13441 FriendlyName *string `json:"friendlyName,omitempty"`
13442
13443 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
13444
13445 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
13446
13447 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
13448
13449 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
13450 }
13451
13452
13453 func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) {
13454 grp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint
13455 objectMap := make(map[string]interface{})
13456 if grp.FriendlyName != nil {
13457 objectMap["friendlyName"] = grp.FriendlyName
13458 }
13459 if grp.RecoveryPointType != nil {
13460 objectMap["recoveryPointType"] = grp.RecoveryPointType
13461 }
13462 if grp.RecoveryPointTime != nil {
13463 objectMap["recoveryPointTime"] = grp.RecoveryPointTime
13464 }
13465 if grp.RecoveryPointAdditionalInfo != nil {
13466 objectMap["recoveryPointAdditionalInfo"] = grp.RecoveryPointAdditionalInfo
13467 }
13468 if grp.ObjectType != "" {
13469 objectMap["objectType"] = grp.ObjectType
13470 }
13471 return json.Marshal(objectMap)
13472 }
13473
13474
13475 func (grp GenericRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
13476 return nil, false
13477 }
13478
13479
13480 func (grp GenericRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
13481 return nil, false
13482 }
13483
13484
13485 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
13486 return nil, false
13487 }
13488
13489
13490 func (grp GenericRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
13491 return nil, false
13492 }
13493
13494
13495 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
13496 return nil, false
13497 }
13498
13499
13500 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
13501 return nil, false
13502 }
13503
13504
13505 func (grp GenericRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
13506 return nil, false
13507 }
13508
13509
13510 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
13511 return nil, false
13512 }
13513
13514
13515 func (grp GenericRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
13516 return nil, false
13517 }
13518
13519
13520 func (grp GenericRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
13521 return nil, false
13522 }
13523
13524
13525 func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
13526 return &grp, true
13527 }
13528
13529
13530 func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
13531 return nil, false
13532 }
13533
13534
13535 func (grp GenericRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
13536 return nil, false
13537 }
13538
13539
13540 func (grp GenericRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
13541 return &grp, true
13542 }
13543
13544
13545 type GetProtectedItemQueryObject struct {
13546
13547 Expand *string `json:"expand,omitempty"`
13548 }
13549
13550
13551 type IaasVMBackupRequest struct {
13552
13553 RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"`
13554
13555 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
13556 }
13557
13558
13559 func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) {
13560 ivbr.ObjectType = ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest
13561 objectMap := make(map[string]interface{})
13562 if ivbr.RecoveryPointExpiryTimeInUTC != nil {
13563 objectMap["recoveryPointExpiryTimeInUTC"] = ivbr.RecoveryPointExpiryTimeInUTC
13564 }
13565 if ivbr.ObjectType != "" {
13566 objectMap["objectType"] = ivbr.ObjectType
13567 }
13568 return json.Marshal(objectMap)
13569 }
13570
13571
13572 func (ivbr IaasVMBackupRequest) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
13573 return nil, false
13574 }
13575
13576
13577 func (ivbr IaasVMBackupRequest) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
13578 return nil, false
13579 }
13580
13581
13582 func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
13583 return &ivbr, true
13584 }
13585
13586
13587 func (ivbr IaasVMBackupRequest) AsRequest() (*Request, bool) {
13588 return nil, false
13589 }
13590
13591
13592 func (ivbr IaasVMBackupRequest) AsBasicRequest() (BasicRequest, bool) {
13593 return &ivbr, true
13594 }
13595
13596
13597 type BasicIaaSVMContainer interface {
13598 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
13599 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
13600 AsIaaSVMContainer() (*IaaSVMContainer, bool)
13601 }
13602
13603
13604 type IaaSVMContainer struct {
13605
13606 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13607
13608 VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"`
13609
13610 ResourceGroup *string `json:"resourceGroup,omitempty"`
13611
13612 FriendlyName *string `json:"friendlyName,omitempty"`
13613
13614 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
13615
13616 RegistrationStatus *string `json:"registrationStatus,omitempty"`
13617
13618 HealthStatus *string `json:"healthStatus,omitempty"`
13619
13620 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
13621 }
13622
13623 func unmarshalBasicIaaSVMContainer(body []byte) (BasicIaaSVMContainer, error) {
13624 var m map[string]interface{}
13625 err := json.Unmarshal(body, &m)
13626 if err != nil {
13627 return nil, err
13628 }
13629
13630 switch m["containerType"] {
13631 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines):
13632 var aisccvc AzureIaaSClassicComputeVMContainer
13633 err := json.Unmarshal(body, &aisccvc)
13634 return aisccvc, err
13635 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines):
13636 var aiscvc AzureIaaSComputeVMContainer
13637 err := json.Unmarshal(body, &aiscvc)
13638 return aiscvc, err
13639 default:
13640 var isc IaaSVMContainer
13641 err := json.Unmarshal(body, &isc)
13642 return isc, err
13643 }
13644 }
13645 func unmarshalBasicIaaSVMContainerArray(body []byte) ([]BasicIaaSVMContainer, error) {
13646 var rawMessages []*json.RawMessage
13647 err := json.Unmarshal(body, &rawMessages)
13648 if err != nil {
13649 return nil, err
13650 }
13651
13652 iscArray := make([]BasicIaaSVMContainer, len(rawMessages))
13653
13654 for index, rawMessage := range rawMessages {
13655 isc, err := unmarshalBasicIaaSVMContainer(*rawMessage)
13656 if err != nil {
13657 return nil, err
13658 }
13659 iscArray[index] = isc
13660 }
13661 return iscArray, nil
13662 }
13663
13664
13665 func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) {
13666 isc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer
13667 objectMap := make(map[string]interface{})
13668 if isc.VirtualMachineID != nil {
13669 objectMap["virtualMachineId"] = isc.VirtualMachineID
13670 }
13671 if isc.VirtualMachineVersion != nil {
13672 objectMap["virtualMachineVersion"] = isc.VirtualMachineVersion
13673 }
13674 if isc.ResourceGroup != nil {
13675 objectMap["resourceGroup"] = isc.ResourceGroup
13676 }
13677 if isc.FriendlyName != nil {
13678 objectMap["friendlyName"] = isc.FriendlyName
13679 }
13680 if isc.BackupManagementType != "" {
13681 objectMap["backupManagementType"] = isc.BackupManagementType
13682 }
13683 if isc.RegistrationStatus != nil {
13684 objectMap["registrationStatus"] = isc.RegistrationStatus
13685 }
13686 if isc.HealthStatus != nil {
13687 objectMap["healthStatus"] = isc.HealthStatus
13688 }
13689 if isc.ContainerType != "" {
13690 objectMap["containerType"] = isc.ContainerType
13691 }
13692 return json.Marshal(objectMap)
13693 }
13694
13695
13696 func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
13697 return nil, false
13698 }
13699
13700
13701 func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
13702 return nil, false
13703 }
13704
13705
13706 func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
13707 return nil, false
13708 }
13709
13710
13711 func (isc IaaSVMContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
13712 return nil, false
13713 }
13714
13715
13716 func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
13717 return nil, false
13718 }
13719
13720
13721 func (isc IaaSVMContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
13722 return nil, false
13723 }
13724
13725
13726 func (isc IaaSVMContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
13727 return nil, false
13728 }
13729
13730
13731 func (isc IaaSVMContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
13732 return nil, false
13733 }
13734
13735
13736 func (isc IaaSVMContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
13737 return nil, false
13738 }
13739
13740
13741 func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) {
13742 return nil, false
13743 }
13744
13745
13746 func (isc IaaSVMContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
13747 return nil, false
13748 }
13749
13750
13751 func (isc IaaSVMContainer) AsGenericContainer() (*GenericContainer, bool) {
13752 return nil, false
13753 }
13754
13755
13756 func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
13757 return &isc, true
13758 }
13759
13760
13761 func (isc IaaSVMContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
13762 return &isc, true
13763 }
13764
13765
13766 func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) {
13767 return nil, false
13768 }
13769
13770
13771 func (isc IaaSVMContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
13772 return nil, false
13773 }
13774
13775
13776 func (isc IaaSVMContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
13777 return &isc, true
13778 }
13779
13780
13781 type IaasVMILRRegistrationRequest struct {
13782
13783 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
13784
13785 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13786
13787 InitiatorName *string `json:"initiatorName,omitempty"`
13788
13789 RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"`
13790
13791 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
13792 }
13793
13794
13795 func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) {
13796 ivrr.ObjectType = ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest
13797 objectMap := make(map[string]interface{})
13798 if ivrr.RecoveryPointID != nil {
13799 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
13800 }
13801 if ivrr.VirtualMachineID != nil {
13802 objectMap["virtualMachineId"] = ivrr.VirtualMachineID
13803 }
13804 if ivrr.InitiatorName != nil {
13805 objectMap["initiatorName"] = ivrr.InitiatorName
13806 }
13807 if ivrr.RenewExistingRegistration != nil {
13808 objectMap["renewExistingRegistration"] = ivrr.RenewExistingRegistration
13809 }
13810 if ivrr.ObjectType != "" {
13811 objectMap["objectType"] = ivrr.ObjectType
13812 }
13813 return json.Marshal(objectMap)
13814 }
13815
13816
13817 func (ivrr IaasVMILRRegistrationRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
13818 return nil, false
13819 }
13820
13821
13822 func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
13823 return &ivrr, true
13824 }
13825
13826
13827 func (ivrr IaasVMILRRegistrationRequest) AsILRRequest() (*ILRRequest, bool) {
13828 return nil, false
13829 }
13830
13831
13832 func (ivrr IaasVMILRRegistrationRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
13833 return &ivrr, true
13834 }
13835
13836
13837 type BasicIaaSVMProtectableItem interface {
13838 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
13839 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
13840 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
13841 }
13842
13843
13844 type IaaSVMProtectableItem struct {
13845
13846 VirtualMachineID *string `json:"virtualMachineId,omitempty"`
13847
13848 BackupManagementType *string `json:"backupManagementType,omitempty"`
13849
13850 WorkloadType *string `json:"workloadType,omitempty"`
13851
13852 FriendlyName *string `json:"friendlyName,omitempty"`
13853
13854 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
13855
13856 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
13857 }
13858
13859 func unmarshalBasicIaaSVMProtectableItem(body []byte) (BasicIaaSVMProtectableItem, error) {
13860 var m map[string]interface{}
13861 err := json.Unmarshal(body, &m)
13862 if err != nil {
13863 return nil, err
13864 }
13865
13866 switch m["protectableItemType"] {
13867 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
13868 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
13869 err := json.Unmarshal(body, &aisccvpi)
13870 return aisccvpi, err
13871 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
13872 var aiscvpi AzureIaaSComputeVMProtectableItem
13873 err := json.Unmarshal(body, &aiscvpi)
13874 return aiscvpi, err
13875 default:
13876 var ispi IaaSVMProtectableItem
13877 err := json.Unmarshal(body, &ispi)
13878 return ispi, err
13879 }
13880 }
13881 func unmarshalBasicIaaSVMProtectableItemArray(body []byte) ([]BasicIaaSVMProtectableItem, error) {
13882 var rawMessages []*json.RawMessage
13883 err := json.Unmarshal(body, &rawMessages)
13884 if err != nil {
13885 return nil, err
13886 }
13887
13888 ispiArray := make([]BasicIaaSVMProtectableItem, len(rawMessages))
13889
13890 for index, rawMessage := range rawMessages {
13891 ispi, err := unmarshalBasicIaaSVMProtectableItem(*rawMessage)
13892 if err != nil {
13893 return nil, err
13894 }
13895 ispiArray[index] = ispi
13896 }
13897 return ispiArray, nil
13898 }
13899
13900
13901 func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) {
13902 ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem
13903 objectMap := make(map[string]interface{})
13904 if ispi.VirtualMachineID != nil {
13905 objectMap["virtualMachineId"] = ispi.VirtualMachineID
13906 }
13907 if ispi.BackupManagementType != nil {
13908 objectMap["backupManagementType"] = ispi.BackupManagementType
13909 }
13910 if ispi.WorkloadType != nil {
13911 objectMap["workloadType"] = ispi.WorkloadType
13912 }
13913 if ispi.FriendlyName != nil {
13914 objectMap["friendlyName"] = ispi.FriendlyName
13915 }
13916 if ispi.ProtectionState != "" {
13917 objectMap["protectionState"] = ispi.ProtectionState
13918 }
13919 if ispi.ProtectableItemType != "" {
13920 objectMap["protectableItemType"] = ispi.ProtectableItemType
13921 }
13922 return json.Marshal(objectMap)
13923 }
13924
13925
13926 func (ispi IaaSVMProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
13927 return nil, false
13928 }
13929
13930
13931 func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
13932 return nil, false
13933 }
13934
13935
13936 func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
13937 return nil, false
13938 }
13939
13940
13941 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
13942 return nil, false
13943 }
13944
13945
13946 func (ispi IaaSVMProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
13947 return nil, false
13948 }
13949
13950
13951 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
13952 return nil, false
13953 }
13954
13955
13956 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
13957 return nil, false
13958 }
13959
13960
13961 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
13962 return nil, false
13963 }
13964
13965
13966 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
13967 return nil, false
13968 }
13969
13970
13971 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
13972 return nil, false
13973 }
13974
13975
13976 func (ispi IaaSVMProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
13977 return nil, false
13978 }
13979
13980
13981 func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
13982 return &ispi, true
13983 }
13984
13985
13986 func (ispi IaaSVMProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
13987 return &ispi, true
13988 }
13989
13990
13991 func (ispi IaaSVMProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
13992 return nil, false
13993 }
13994
13995
13996 func (ispi IaaSVMProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
13997 return &ispi, true
13998 }
13999
14000
14001 type IaasVMRecoveryPoint struct {
14002
14003 RecoveryPointType *string `json:"recoveryPointType,omitempty"`
14004
14005 RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"`
14006
14007 RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"`
14008
14009 SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"`
14010
14011 IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"`
14012
14013 KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"`
14014
14015 IsInstantIlrSessionActive *bool `json:"isInstantIlrSessionActive,omitempty"`
14016
14017 RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"`
14018
14019 IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"`
14020
14021 VirtualMachineSize *string `json:"virtualMachineSize,omitempty"`
14022
14023 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14024
14025 OsType *string `json:"osType,omitempty"`
14026
14027 RecoveryPointDiskConfiguration *RecoveryPointDiskConfiguration `json:"recoveryPointDiskConfiguration,omitempty"`
14028
14029 Zones *[]string `json:"zones,omitempty"`
14030
14031 RecoveryPointMoveReadinessInfo map[string]*RecoveryPointMoveReadinessInfo `json:"recoveryPointMoveReadinessInfo"`
14032
14033 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
14034 }
14035
14036
14037 func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) {
14038 ivrp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint
14039 objectMap := make(map[string]interface{})
14040 if ivrp.KeyAndSecret != nil {
14041 objectMap["keyAndSecret"] = ivrp.KeyAndSecret
14042 }
14043 if ivrp.IsInstantIlrSessionActive != nil {
14044 objectMap["isInstantIlrSessionActive"] = ivrp.IsInstantIlrSessionActive
14045 }
14046 if ivrp.RecoveryPointTierDetails != nil {
14047 objectMap["recoveryPointTierDetails"] = ivrp.RecoveryPointTierDetails
14048 }
14049 if ivrp.IsManagedVirtualMachine != nil {
14050 objectMap["isManagedVirtualMachine"] = ivrp.IsManagedVirtualMachine
14051 }
14052 if ivrp.VirtualMachineSize != nil {
14053 objectMap["virtualMachineSize"] = ivrp.VirtualMachineSize
14054 }
14055 if ivrp.OriginalStorageAccountOption != nil {
14056 objectMap["originalStorageAccountOption"] = ivrp.OriginalStorageAccountOption
14057 }
14058 if ivrp.OsType != nil {
14059 objectMap["osType"] = ivrp.OsType
14060 }
14061 if ivrp.RecoveryPointDiskConfiguration != nil {
14062 objectMap["recoveryPointDiskConfiguration"] = ivrp.RecoveryPointDiskConfiguration
14063 }
14064 if ivrp.Zones != nil {
14065 objectMap["zones"] = ivrp.Zones
14066 }
14067 if ivrp.RecoveryPointMoveReadinessInfo != nil {
14068 objectMap["recoveryPointMoveReadinessInfo"] = ivrp.RecoveryPointMoveReadinessInfo
14069 }
14070 if ivrp.ObjectType != "" {
14071 objectMap["objectType"] = ivrp.ObjectType
14072 }
14073 return json.Marshal(objectMap)
14074 }
14075
14076
14077 func (ivrp IaasVMRecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
14078 return nil, false
14079 }
14080
14081
14082 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
14083 return nil, false
14084 }
14085
14086
14087 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
14088 return nil, false
14089 }
14090
14091
14092 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
14093 return nil, false
14094 }
14095
14096
14097 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
14098 return nil, false
14099 }
14100
14101
14102 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
14103 return nil, false
14104 }
14105
14106
14107 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
14108 return nil, false
14109 }
14110
14111
14112 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
14113 return nil, false
14114 }
14115
14116
14117 func (ivrp IaasVMRecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
14118 return nil, false
14119 }
14120
14121
14122 func (ivrp IaasVMRecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
14123 return nil, false
14124 }
14125
14126
14127 func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
14128 return nil, false
14129 }
14130
14131
14132 func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
14133 return &ivrp, true
14134 }
14135
14136
14137 func (ivrp IaasVMRecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
14138 return nil, false
14139 }
14140
14141
14142 func (ivrp IaasVMRecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
14143 return &ivrp, true
14144 }
14145
14146
14147 type BasicIaasVMRestoreRequest interface {
14148 AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool)
14149 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
14150 }
14151
14152
14153 type IaasVMRestoreRequest struct {
14154
14155 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
14156
14157 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
14158
14159 SourceResourceID *string `json:"sourceResourceId,omitempty"`
14160
14161
14162 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
14163
14164
14165 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
14166
14167 StorageAccountID *string `json:"storageAccountId,omitempty"`
14168
14169
14170 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
14171
14172
14173
14174 SubnetID *string `json:"subnetId,omitempty"`
14175
14176
14177 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
14178
14179 Region *string `json:"region,omitempty"`
14180
14181 AffinityGroup *string `json:"affinityGroup,omitempty"`
14182
14183
14184 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
14185
14186 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14187
14188 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
14189
14190 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
14191
14192 RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"`
14193
14194 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
14195
14196 Zones *[]string `json:"zones,omitempty"`
14197
14198 IdentityInfo *IdentityInfo `json:"identityInfo,omitempty"`
14199
14200 IdentityBasedRestoreDetails *IdentityBasedRestoreDetails `json:"identityBasedRestoreDetails,omitempty"`
14201
14202 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
14203 }
14204
14205 func unmarshalBasicIaasVMRestoreRequest(body []byte) (BasicIaasVMRestoreRequest, error) {
14206 var m map[string]interface{}
14207 err := json.Unmarshal(body, &m)
14208 if err != nil {
14209 return nil, err
14210 }
14211
14212 switch m["objectType"] {
14213 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest):
14214 var ivrwrr IaasVMRestoreWithRehydrationRequest
14215 err := json.Unmarshal(body, &ivrwrr)
14216 return ivrwrr, err
14217 default:
14218 var ivrr IaasVMRestoreRequest
14219 err := json.Unmarshal(body, &ivrr)
14220 return ivrr, err
14221 }
14222 }
14223 func unmarshalBasicIaasVMRestoreRequestArray(body []byte) ([]BasicIaasVMRestoreRequest, error) {
14224 var rawMessages []*json.RawMessage
14225 err := json.Unmarshal(body, &rawMessages)
14226 if err != nil {
14227 return nil, err
14228 }
14229
14230 ivrrArray := make([]BasicIaasVMRestoreRequest, len(rawMessages))
14231
14232 for index, rawMessage := range rawMessages {
14233 ivrr, err := unmarshalBasicIaasVMRestoreRequest(*rawMessage)
14234 if err != nil {
14235 return nil, err
14236 }
14237 ivrrArray[index] = ivrr
14238 }
14239 return ivrrArray, nil
14240 }
14241
14242
14243 func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) {
14244 ivrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest
14245 objectMap := make(map[string]interface{})
14246 if ivrr.RecoveryPointID != nil {
14247 objectMap["recoveryPointId"] = ivrr.RecoveryPointID
14248 }
14249 if ivrr.RecoveryType != "" {
14250 objectMap["recoveryType"] = ivrr.RecoveryType
14251 }
14252 if ivrr.SourceResourceID != nil {
14253 objectMap["sourceResourceId"] = ivrr.SourceResourceID
14254 }
14255 if ivrr.TargetVirtualMachineID != nil {
14256 objectMap["targetVirtualMachineId"] = ivrr.TargetVirtualMachineID
14257 }
14258 if ivrr.TargetResourceGroupID != nil {
14259 objectMap["targetResourceGroupId"] = ivrr.TargetResourceGroupID
14260 }
14261 if ivrr.StorageAccountID != nil {
14262 objectMap["storageAccountId"] = ivrr.StorageAccountID
14263 }
14264 if ivrr.VirtualNetworkID != nil {
14265 objectMap["virtualNetworkId"] = ivrr.VirtualNetworkID
14266 }
14267 if ivrr.SubnetID != nil {
14268 objectMap["subnetId"] = ivrr.SubnetID
14269 }
14270 if ivrr.TargetDomainNameID != nil {
14271 objectMap["targetDomainNameId"] = ivrr.TargetDomainNameID
14272 }
14273 if ivrr.Region != nil {
14274 objectMap["region"] = ivrr.Region
14275 }
14276 if ivrr.AffinityGroup != nil {
14277 objectMap["affinityGroup"] = ivrr.AffinityGroup
14278 }
14279 if ivrr.CreateNewCloudService != nil {
14280 objectMap["createNewCloudService"] = ivrr.CreateNewCloudService
14281 }
14282 if ivrr.OriginalStorageAccountOption != nil {
14283 objectMap["originalStorageAccountOption"] = ivrr.OriginalStorageAccountOption
14284 }
14285 if ivrr.EncryptionDetails != nil {
14286 objectMap["encryptionDetails"] = ivrr.EncryptionDetails
14287 }
14288 if ivrr.RestoreDiskLunList != nil {
14289 objectMap["restoreDiskLunList"] = ivrr.RestoreDiskLunList
14290 }
14291 if ivrr.RestoreWithManagedDisks != nil {
14292 objectMap["restoreWithManagedDisks"] = ivrr.RestoreWithManagedDisks
14293 }
14294 if ivrr.DiskEncryptionSetID != nil {
14295 objectMap["diskEncryptionSetId"] = ivrr.DiskEncryptionSetID
14296 }
14297 if ivrr.Zones != nil {
14298 objectMap["zones"] = ivrr.Zones
14299 }
14300 if ivrr.IdentityInfo != nil {
14301 objectMap["identityInfo"] = ivrr.IdentityInfo
14302 }
14303 if ivrr.IdentityBasedRestoreDetails != nil {
14304 objectMap["identityBasedRestoreDetails"] = ivrr.IdentityBasedRestoreDetails
14305 }
14306 if ivrr.ObjectType != "" {
14307 objectMap["objectType"] = ivrr.ObjectType
14308 }
14309 return json.Marshal(objectMap)
14310 }
14311
14312
14313 func (ivrr IaasVMRestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
14314 return nil, false
14315 }
14316
14317
14318 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
14319 return nil, false
14320 }
14321
14322
14323 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
14324 return nil, false
14325 }
14326
14327
14328 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
14329 return nil, false
14330 }
14331
14332
14333 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14334 return nil, false
14335 }
14336
14337
14338 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14339 return nil, false
14340 }
14341
14342
14343 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
14344 return nil, false
14345 }
14346
14347
14348 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
14349 return nil, false
14350 }
14351
14352
14353 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14354 return nil, false
14355 }
14356
14357
14358 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14359 return nil, false
14360 }
14361
14362
14363 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
14364 return nil, false
14365 }
14366
14367
14368 func (ivrr IaasVMRestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
14369 return nil, false
14370 }
14371
14372
14373 func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
14374 return &ivrr, true
14375 }
14376
14377
14378 func (ivrr IaasVMRestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
14379 return &ivrr, true
14380 }
14381
14382
14383 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
14384 return nil, false
14385 }
14386
14387
14388 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
14389 return nil, false
14390 }
14391
14392
14393 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
14394 return nil, false
14395 }
14396
14397
14398 func (ivrr IaasVMRestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
14399 return nil, false
14400 }
14401
14402
14403 func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
14404 return nil, false
14405 }
14406
14407
14408 func (ivrr IaasVMRestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
14409 return nil, false
14410 }
14411
14412
14413 func (ivrr IaasVMRestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
14414 return &ivrr, true
14415 }
14416
14417
14418
14419 type IaasVMRestoreWithRehydrationRequest struct {
14420
14421 RecoveryPointRehydrationInfo *RecoveryPointRehydrationInfo `json:"recoveryPointRehydrationInfo,omitempty"`
14422
14423 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
14424
14425 RecoveryType RecoveryType `json:"recoveryType,omitempty"`
14426
14427 SourceResourceID *string `json:"sourceResourceId,omitempty"`
14428
14429
14430 TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"`
14431
14432
14433 TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"`
14434
14435 StorageAccountID *string `json:"storageAccountId,omitempty"`
14436
14437
14438 VirtualNetworkID *string `json:"virtualNetworkId,omitempty"`
14439
14440
14441
14442 SubnetID *string `json:"subnetId,omitempty"`
14443
14444
14445 TargetDomainNameID *string `json:"targetDomainNameId,omitempty"`
14446
14447 Region *string `json:"region,omitempty"`
14448
14449 AffinityGroup *string `json:"affinityGroup,omitempty"`
14450
14451
14452 CreateNewCloudService *bool `json:"createNewCloudService,omitempty"`
14453
14454 OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"`
14455
14456 EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"`
14457
14458 RestoreDiskLunList *[]int32 `json:"restoreDiskLunList,omitempty"`
14459
14460 RestoreWithManagedDisks *bool `json:"restoreWithManagedDisks,omitempty"`
14461
14462 DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
14463
14464 Zones *[]string `json:"zones,omitempty"`
14465
14466 IdentityInfo *IdentityInfo `json:"identityInfo,omitempty"`
14467
14468 IdentityBasedRestoreDetails *IdentityBasedRestoreDetails `json:"identityBasedRestoreDetails,omitempty"`
14469
14470 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
14471 }
14472
14473
14474 func (ivrwrr IaasVMRestoreWithRehydrationRequest) MarshalJSON() ([]byte, error) {
14475 ivrwrr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest
14476 objectMap := make(map[string]interface{})
14477 if ivrwrr.RecoveryPointRehydrationInfo != nil {
14478 objectMap["recoveryPointRehydrationInfo"] = ivrwrr.RecoveryPointRehydrationInfo
14479 }
14480 if ivrwrr.RecoveryPointID != nil {
14481 objectMap["recoveryPointId"] = ivrwrr.RecoveryPointID
14482 }
14483 if ivrwrr.RecoveryType != "" {
14484 objectMap["recoveryType"] = ivrwrr.RecoveryType
14485 }
14486 if ivrwrr.SourceResourceID != nil {
14487 objectMap["sourceResourceId"] = ivrwrr.SourceResourceID
14488 }
14489 if ivrwrr.TargetVirtualMachineID != nil {
14490 objectMap["targetVirtualMachineId"] = ivrwrr.TargetVirtualMachineID
14491 }
14492 if ivrwrr.TargetResourceGroupID != nil {
14493 objectMap["targetResourceGroupId"] = ivrwrr.TargetResourceGroupID
14494 }
14495 if ivrwrr.StorageAccountID != nil {
14496 objectMap["storageAccountId"] = ivrwrr.StorageAccountID
14497 }
14498 if ivrwrr.VirtualNetworkID != nil {
14499 objectMap["virtualNetworkId"] = ivrwrr.VirtualNetworkID
14500 }
14501 if ivrwrr.SubnetID != nil {
14502 objectMap["subnetId"] = ivrwrr.SubnetID
14503 }
14504 if ivrwrr.TargetDomainNameID != nil {
14505 objectMap["targetDomainNameId"] = ivrwrr.TargetDomainNameID
14506 }
14507 if ivrwrr.Region != nil {
14508 objectMap["region"] = ivrwrr.Region
14509 }
14510 if ivrwrr.AffinityGroup != nil {
14511 objectMap["affinityGroup"] = ivrwrr.AffinityGroup
14512 }
14513 if ivrwrr.CreateNewCloudService != nil {
14514 objectMap["createNewCloudService"] = ivrwrr.CreateNewCloudService
14515 }
14516 if ivrwrr.OriginalStorageAccountOption != nil {
14517 objectMap["originalStorageAccountOption"] = ivrwrr.OriginalStorageAccountOption
14518 }
14519 if ivrwrr.EncryptionDetails != nil {
14520 objectMap["encryptionDetails"] = ivrwrr.EncryptionDetails
14521 }
14522 if ivrwrr.RestoreDiskLunList != nil {
14523 objectMap["restoreDiskLunList"] = ivrwrr.RestoreDiskLunList
14524 }
14525 if ivrwrr.RestoreWithManagedDisks != nil {
14526 objectMap["restoreWithManagedDisks"] = ivrwrr.RestoreWithManagedDisks
14527 }
14528 if ivrwrr.DiskEncryptionSetID != nil {
14529 objectMap["diskEncryptionSetId"] = ivrwrr.DiskEncryptionSetID
14530 }
14531 if ivrwrr.Zones != nil {
14532 objectMap["zones"] = ivrwrr.Zones
14533 }
14534 if ivrwrr.IdentityInfo != nil {
14535 objectMap["identityInfo"] = ivrwrr.IdentityInfo
14536 }
14537 if ivrwrr.IdentityBasedRestoreDetails != nil {
14538 objectMap["identityBasedRestoreDetails"] = ivrwrr.IdentityBasedRestoreDetails
14539 }
14540 if ivrwrr.ObjectType != "" {
14541 objectMap["objectType"] = ivrwrr.ObjectType
14542 }
14543 return json.Marshal(objectMap)
14544 }
14545
14546
14547 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
14548 return nil, false
14549 }
14550
14551
14552 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
14553 return nil, false
14554 }
14555
14556
14557 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
14558 return nil, false
14559 }
14560
14561
14562 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
14563 return nil, false
14564 }
14565
14566
14567 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14568 return nil, false
14569 }
14570
14571
14572 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
14573 return nil, false
14574 }
14575
14576
14577 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
14578 return nil, false
14579 }
14580
14581
14582 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
14583 return nil, false
14584 }
14585
14586
14587 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14588 return nil, false
14589 }
14590
14591
14592 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
14593 return nil, false
14594 }
14595
14596
14597 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
14598 return nil, false
14599 }
14600
14601
14602 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
14603 return nil, false
14604 }
14605
14606
14607 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
14608 return nil, false
14609 }
14610
14611
14612 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
14613 return &ivrwrr, true
14614 }
14615
14616
14617 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
14618 return nil, false
14619 }
14620
14621
14622 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
14623 return nil, false
14624 }
14625
14626
14627 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
14628 return nil, false
14629 }
14630
14631
14632 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
14633 return nil, false
14634 }
14635
14636
14637 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
14638 return &ivrwrr, true
14639 }
14640
14641
14642 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsRestoreRequest() (*RestoreRequest, bool) {
14643 return nil, false
14644 }
14645
14646
14647 func (ivrwrr IaasVMRestoreWithRehydrationRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
14648 return &ivrwrr, true
14649 }
14650
14651
14652
14653 type IdentityBasedRestoreDetails struct {
14654
14655 ObjectType *string `json:"objectType,omitempty"`
14656
14657 TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"`
14658 }
14659
14660
14661 type IdentityInfo struct {
14662
14663 IsSystemAssignedIdentity *bool `json:"isSystemAssignedIdentity,omitempty"`
14664
14665
14666 ManagedIdentityResourceID *string `json:"managedIdentityResourceId,omitempty"`
14667 }
14668
14669
14670 type BasicILRRequest interface {
14671 AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool)
14672 AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool)
14673 AsILRRequest() (*ILRRequest, bool)
14674 }
14675
14676
14677 type ILRRequest struct {
14678
14679 ObjectType ObjectTypeBasicILRRequest `json:"objectType,omitempty"`
14680 }
14681
14682 func unmarshalBasicILRRequest(body []byte) (BasicILRRequest, error) {
14683 var m map[string]interface{}
14684 err := json.Unmarshal(body, &m)
14685 if err != nil {
14686 return nil, err
14687 }
14688
14689 switch m["objectType"] {
14690 case string(ObjectTypeBasicILRRequestObjectTypeAzureFileShareProvisionILRRequest):
14691 var afspir AzureFileShareProvisionILRRequest
14692 err := json.Unmarshal(body, &afspir)
14693 return afspir, err
14694 case string(ObjectTypeBasicILRRequestObjectTypeIaasVMILRRegistrationRequest):
14695 var ivrr IaasVMILRRegistrationRequest
14696 err := json.Unmarshal(body, &ivrr)
14697 return ivrr, err
14698 default:
14699 var ir ILRRequest
14700 err := json.Unmarshal(body, &ir)
14701 return ir, err
14702 }
14703 }
14704 func unmarshalBasicILRRequestArray(body []byte) ([]BasicILRRequest, error) {
14705 var rawMessages []*json.RawMessage
14706 err := json.Unmarshal(body, &rawMessages)
14707 if err != nil {
14708 return nil, err
14709 }
14710
14711 irArray := make([]BasicILRRequest, len(rawMessages))
14712
14713 for index, rawMessage := range rawMessages {
14714 ir, err := unmarshalBasicILRRequest(*rawMessage)
14715 if err != nil {
14716 return nil, err
14717 }
14718 irArray[index] = ir
14719 }
14720 return irArray, nil
14721 }
14722
14723
14724 func (ir ILRRequest) MarshalJSON() ([]byte, error) {
14725 ir.ObjectType = ObjectTypeBasicILRRequestObjectTypeILRRequest
14726 objectMap := make(map[string]interface{})
14727 if ir.ObjectType != "" {
14728 objectMap["objectType"] = ir.ObjectType
14729 }
14730 return json.Marshal(objectMap)
14731 }
14732
14733
14734 func (ir ILRRequest) AsAzureFileShareProvisionILRRequest() (*AzureFileShareProvisionILRRequest, bool) {
14735 return nil, false
14736 }
14737
14738
14739 func (ir ILRRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) {
14740 return nil, false
14741 }
14742
14743
14744 func (ir ILRRequest) AsILRRequest() (*ILRRequest, bool) {
14745 return &ir, true
14746 }
14747
14748
14749 func (ir ILRRequest) AsBasicILRRequest() (BasicILRRequest, bool) {
14750 return &ir, true
14751 }
14752
14753
14754 type ILRRequestResource struct {
14755
14756 Properties BasicILRRequest `json:"properties,omitempty"`
14757
14758 ID *string `json:"id,omitempty"`
14759
14760 Name *string `json:"name,omitempty"`
14761
14762 Type *string `json:"type,omitempty"`
14763
14764 Location *string `json:"location,omitempty"`
14765
14766 Tags map[string]*string `json:"tags"`
14767
14768 ETag *string `json:"eTag,omitempty"`
14769 }
14770
14771
14772 func (irr ILRRequestResource) MarshalJSON() ([]byte, error) {
14773 objectMap := make(map[string]interface{})
14774 objectMap["properties"] = irr.Properties
14775 if irr.Location != nil {
14776 objectMap["location"] = irr.Location
14777 }
14778 if irr.Tags != nil {
14779 objectMap["tags"] = irr.Tags
14780 }
14781 if irr.ETag != nil {
14782 objectMap["eTag"] = irr.ETag
14783 }
14784 return json.Marshal(objectMap)
14785 }
14786
14787
14788 func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error {
14789 var m map[string]*json.RawMessage
14790 err := json.Unmarshal(body, &m)
14791 if err != nil {
14792 return err
14793 }
14794 for k, v := range m {
14795 switch k {
14796 case "properties":
14797 if v != nil {
14798 properties, err := unmarshalBasicILRRequest(*v)
14799 if err != nil {
14800 return err
14801 }
14802 irr.Properties = properties
14803 }
14804 case "id":
14805 if v != nil {
14806 var ID string
14807 err = json.Unmarshal(*v, &ID)
14808 if err != nil {
14809 return err
14810 }
14811 irr.ID = &ID
14812 }
14813 case "name":
14814 if v != nil {
14815 var name string
14816 err = json.Unmarshal(*v, &name)
14817 if err != nil {
14818 return err
14819 }
14820 irr.Name = &name
14821 }
14822 case "type":
14823 if v != nil {
14824 var typeVar string
14825 err = json.Unmarshal(*v, &typeVar)
14826 if err != nil {
14827 return err
14828 }
14829 irr.Type = &typeVar
14830 }
14831 case "location":
14832 if v != nil {
14833 var location string
14834 err = json.Unmarshal(*v, &location)
14835 if err != nil {
14836 return err
14837 }
14838 irr.Location = &location
14839 }
14840 case "tags":
14841 if v != nil {
14842 var tags map[string]*string
14843 err = json.Unmarshal(*v, &tags)
14844 if err != nil {
14845 return err
14846 }
14847 irr.Tags = tags
14848 }
14849 case "eTag":
14850 if v != nil {
14851 var eTag string
14852 err = json.Unmarshal(*v, &eTag)
14853 if err != nil {
14854 return err
14855 }
14856 irr.ETag = &eTag
14857 }
14858 }
14859 }
14860
14861 return nil
14862 }
14863
14864
14865 type InquiryInfo struct {
14866
14867
14868 Status *string `json:"status,omitempty"`
14869
14870 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
14871
14872
14873 InquiryDetails *[]WorkloadInquiryDetails `json:"inquiryDetails,omitempty"`
14874 }
14875
14876
14877 type InquiryValidation struct {
14878
14879 Status *string `json:"status,omitempty"`
14880
14881 ErrorDetail *ErrorDetail `json:"errorDetail,omitempty"`
14882
14883 AdditionalDetail *string `json:"additionalDetail,omitempty"`
14884 }
14885
14886
14887 func (iv InquiryValidation) MarshalJSON() ([]byte, error) {
14888 objectMap := make(map[string]interface{})
14889 if iv.Status != nil {
14890 objectMap["status"] = iv.Status
14891 }
14892 if iv.ErrorDetail != nil {
14893 objectMap["errorDetail"] = iv.ErrorDetail
14894 }
14895 return json.Marshal(objectMap)
14896 }
14897
14898
14899 type InstantItemRecoveryTarget struct {
14900
14901 ClientScripts *[]ClientScriptForConnect `json:"clientScripts,omitempty"`
14902 }
14903
14904
14905 type InstantRPAdditionalDetails struct {
14906 AzureBackupRGNamePrefix *string `json:"azureBackupRGNamePrefix,omitempty"`
14907 AzureBackupRGNameSuffix *string `json:"azureBackupRGNameSuffix,omitempty"`
14908 }
14909
14910
14911 type BasicJob interface {
14912 AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool)
14913 AsAzureStorageJob() (*AzureStorageJob, bool)
14914 AsAzureWorkloadJob() (*AzureWorkloadJob, bool)
14915 AsDpmJob() (*DpmJob, bool)
14916 AsMabJob() (*MabJob, bool)
14917 AsVaultJob() (*VaultJob, bool)
14918 AsJob() (*Job, bool)
14919 }
14920
14921
14922 type Job struct {
14923
14924 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
14925
14926 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
14927
14928 Operation *string `json:"operation,omitempty"`
14929
14930 Status *string `json:"status,omitempty"`
14931
14932 StartTime *date.Time `json:"startTime,omitempty"`
14933
14934 EndTime *date.Time `json:"endTime,omitempty"`
14935
14936 ActivityID *string `json:"activityId,omitempty"`
14937
14938 JobType JobType `json:"jobType,omitempty"`
14939 }
14940
14941 func unmarshalBasicJob(body []byte) (BasicJob, error) {
14942 var m map[string]interface{}
14943 err := json.Unmarshal(body, &m)
14944 if err != nil {
14945 return nil, err
14946 }
14947
14948 switch m["jobType"] {
14949 case string(JobTypeAzureIaaSVMJob):
14950 var aisj AzureIaaSVMJob
14951 err := json.Unmarshal(body, &aisj)
14952 return aisj, err
14953 case string(JobTypeAzureStorageJob):
14954 var asj AzureStorageJob
14955 err := json.Unmarshal(body, &asj)
14956 return asj, err
14957 case string(JobTypeAzureWorkloadJob):
14958 var awj AzureWorkloadJob
14959 err := json.Unmarshal(body, &awj)
14960 return awj, err
14961 case string(JobTypeDpmJob):
14962 var dj DpmJob
14963 err := json.Unmarshal(body, &dj)
14964 return dj, err
14965 case string(JobTypeMabJob):
14966 var mj MabJob
14967 err := json.Unmarshal(body, &mj)
14968 return mj, err
14969 case string(JobTypeVaultJob):
14970 var vj VaultJob
14971 err := json.Unmarshal(body, &vj)
14972 return vj, err
14973 default:
14974 var j Job
14975 err := json.Unmarshal(body, &j)
14976 return j, err
14977 }
14978 }
14979 func unmarshalBasicJobArray(body []byte) ([]BasicJob, error) {
14980 var rawMessages []*json.RawMessage
14981 err := json.Unmarshal(body, &rawMessages)
14982 if err != nil {
14983 return nil, err
14984 }
14985
14986 jArray := make([]BasicJob, len(rawMessages))
14987
14988 for index, rawMessage := range rawMessages {
14989 j, err := unmarshalBasicJob(*rawMessage)
14990 if err != nil {
14991 return nil, err
14992 }
14993 jArray[index] = j
14994 }
14995 return jArray, nil
14996 }
14997
14998
14999 func (j Job) MarshalJSON() ([]byte, error) {
15000 j.JobType = JobTypeJob
15001 objectMap := make(map[string]interface{})
15002 if j.EntityFriendlyName != nil {
15003 objectMap["entityFriendlyName"] = j.EntityFriendlyName
15004 }
15005 if j.BackupManagementType != "" {
15006 objectMap["backupManagementType"] = j.BackupManagementType
15007 }
15008 if j.Operation != nil {
15009 objectMap["operation"] = j.Operation
15010 }
15011 if j.Status != nil {
15012 objectMap["status"] = j.Status
15013 }
15014 if j.StartTime != nil {
15015 objectMap["startTime"] = j.StartTime
15016 }
15017 if j.EndTime != nil {
15018 objectMap["endTime"] = j.EndTime
15019 }
15020 if j.ActivityID != nil {
15021 objectMap["activityId"] = j.ActivityID
15022 }
15023 if j.JobType != "" {
15024 objectMap["jobType"] = j.JobType
15025 }
15026 return json.Marshal(objectMap)
15027 }
15028
15029
15030 func (j Job) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
15031 return nil, false
15032 }
15033
15034
15035 func (j Job) AsAzureStorageJob() (*AzureStorageJob, bool) {
15036 return nil, false
15037 }
15038
15039
15040 func (j Job) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
15041 return nil, false
15042 }
15043
15044
15045 func (j Job) AsDpmJob() (*DpmJob, bool) {
15046 return nil, false
15047 }
15048
15049
15050 func (j Job) AsMabJob() (*MabJob, bool) {
15051 return nil, false
15052 }
15053
15054
15055 func (j Job) AsVaultJob() (*VaultJob, bool) {
15056 return nil, false
15057 }
15058
15059
15060 func (j Job) AsJob() (*Job, bool) {
15061 return &j, true
15062 }
15063
15064
15065 func (j Job) AsBasicJob() (BasicJob, bool) {
15066 return &j, true
15067 }
15068
15069
15070 type JobQueryObject struct {
15071
15072 Status JobStatus `json:"status,omitempty"`
15073
15074 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15075
15076 Operation JobOperationType `json:"operation,omitempty"`
15077
15078 JobID *string `json:"jobId,omitempty"`
15079
15080 StartTime *date.Time `json:"startTime,omitempty"`
15081
15082 EndTime *date.Time `json:"endTime,omitempty"`
15083 }
15084
15085
15086 type JobResource struct {
15087 autorest.Response `json:"-"`
15088
15089 Properties BasicJob `json:"properties,omitempty"`
15090
15091 ID *string `json:"id,omitempty"`
15092
15093 Name *string `json:"name,omitempty"`
15094
15095 Type *string `json:"type,omitempty"`
15096
15097 Location *string `json:"location,omitempty"`
15098
15099 Tags map[string]*string `json:"tags"`
15100
15101 ETag *string `json:"eTag,omitempty"`
15102 }
15103
15104
15105 func (jr JobResource) MarshalJSON() ([]byte, error) {
15106 objectMap := make(map[string]interface{})
15107 objectMap["properties"] = jr.Properties
15108 if jr.Location != nil {
15109 objectMap["location"] = jr.Location
15110 }
15111 if jr.Tags != nil {
15112 objectMap["tags"] = jr.Tags
15113 }
15114 if jr.ETag != nil {
15115 objectMap["eTag"] = jr.ETag
15116 }
15117 return json.Marshal(objectMap)
15118 }
15119
15120
15121 func (jr *JobResource) UnmarshalJSON(body []byte) error {
15122 var m map[string]*json.RawMessage
15123 err := json.Unmarshal(body, &m)
15124 if err != nil {
15125 return err
15126 }
15127 for k, v := range m {
15128 switch k {
15129 case "properties":
15130 if v != nil {
15131 properties, err := unmarshalBasicJob(*v)
15132 if err != nil {
15133 return err
15134 }
15135 jr.Properties = properties
15136 }
15137 case "id":
15138 if v != nil {
15139 var ID string
15140 err = json.Unmarshal(*v, &ID)
15141 if err != nil {
15142 return err
15143 }
15144 jr.ID = &ID
15145 }
15146 case "name":
15147 if v != nil {
15148 var name string
15149 err = json.Unmarshal(*v, &name)
15150 if err != nil {
15151 return err
15152 }
15153 jr.Name = &name
15154 }
15155 case "type":
15156 if v != nil {
15157 var typeVar string
15158 err = json.Unmarshal(*v, &typeVar)
15159 if err != nil {
15160 return err
15161 }
15162 jr.Type = &typeVar
15163 }
15164 case "location":
15165 if v != nil {
15166 var location string
15167 err = json.Unmarshal(*v, &location)
15168 if err != nil {
15169 return err
15170 }
15171 jr.Location = &location
15172 }
15173 case "tags":
15174 if v != nil {
15175 var tags map[string]*string
15176 err = json.Unmarshal(*v, &tags)
15177 if err != nil {
15178 return err
15179 }
15180 jr.Tags = tags
15181 }
15182 case "eTag":
15183 if v != nil {
15184 var eTag string
15185 err = json.Unmarshal(*v, &eTag)
15186 if err != nil {
15187 return err
15188 }
15189 jr.ETag = &eTag
15190 }
15191 }
15192 }
15193
15194 return nil
15195 }
15196
15197
15198 type JobResourceList struct {
15199 autorest.Response `json:"-"`
15200
15201 Value *[]JobResource `json:"value,omitempty"`
15202
15203 NextLink *string `json:"nextLink,omitempty"`
15204 }
15205
15206
15207 type JobResourceListIterator struct {
15208 i int
15209 page JobResourceListPage
15210 }
15211
15212
15213
15214 func (iter *JobResourceListIterator) NextWithContext(ctx context.Context) (err error) {
15215 if tracing.IsEnabled() {
15216 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListIterator.NextWithContext")
15217 defer func() {
15218 sc := -1
15219 if iter.Response().Response.Response != nil {
15220 sc = iter.Response().Response.Response.StatusCode
15221 }
15222 tracing.EndSpan(ctx, sc, err)
15223 }()
15224 }
15225 iter.i++
15226 if iter.i < len(iter.page.Values()) {
15227 return nil
15228 }
15229 err = iter.page.NextWithContext(ctx)
15230 if err != nil {
15231 iter.i--
15232 return err
15233 }
15234 iter.i = 0
15235 return nil
15236 }
15237
15238
15239
15240
15241 func (iter *JobResourceListIterator) Next() error {
15242 return iter.NextWithContext(context.Background())
15243 }
15244
15245
15246 func (iter JobResourceListIterator) NotDone() bool {
15247 return iter.page.NotDone() && iter.i < len(iter.page.Values())
15248 }
15249
15250
15251 func (iter JobResourceListIterator) Response() JobResourceList {
15252 return iter.page.Response()
15253 }
15254
15255
15256
15257 func (iter JobResourceListIterator) Value() JobResource {
15258 if !iter.page.NotDone() {
15259 return JobResource{}
15260 }
15261 return iter.page.Values()[iter.i]
15262 }
15263
15264
15265 func NewJobResourceListIterator(page JobResourceListPage) JobResourceListIterator {
15266 return JobResourceListIterator{page: page}
15267 }
15268
15269
15270 func (jrl JobResourceList) IsEmpty() bool {
15271 return jrl.Value == nil || len(*jrl.Value) == 0
15272 }
15273
15274
15275 func (jrl JobResourceList) hasNextLink() bool {
15276 return jrl.NextLink != nil && len(*jrl.NextLink) != 0
15277 }
15278
15279
15280
15281 func (jrl JobResourceList) jobResourceListPreparer(ctx context.Context) (*http.Request, error) {
15282 if !jrl.hasNextLink() {
15283 return nil, nil
15284 }
15285 return autorest.Prepare((&http.Request{}).WithContext(ctx),
15286 autorest.AsJSON(),
15287 autorest.AsGet(),
15288 autorest.WithBaseURL(to.String(jrl.NextLink)))
15289 }
15290
15291
15292 type JobResourceListPage struct {
15293 fn func(context.Context, JobResourceList) (JobResourceList, error)
15294 jrl JobResourceList
15295 }
15296
15297
15298
15299 func (page *JobResourceListPage) NextWithContext(ctx context.Context) (err error) {
15300 if tracing.IsEnabled() {
15301 ctx = tracing.StartSpan(ctx, fqdn+"/JobResourceListPage.NextWithContext")
15302 defer func() {
15303 sc := -1
15304 if page.Response().Response.Response != nil {
15305 sc = page.Response().Response.Response.StatusCode
15306 }
15307 tracing.EndSpan(ctx, sc, err)
15308 }()
15309 }
15310 for {
15311 next, err := page.fn(ctx, page.jrl)
15312 if err != nil {
15313 return err
15314 }
15315 page.jrl = next
15316 if !next.hasNextLink() || !next.IsEmpty() {
15317 break
15318 }
15319 }
15320 return nil
15321 }
15322
15323
15324
15325
15326 func (page *JobResourceListPage) Next() error {
15327 return page.NextWithContext(context.Background())
15328 }
15329
15330
15331 func (page JobResourceListPage) NotDone() bool {
15332 return !page.jrl.IsEmpty()
15333 }
15334
15335
15336 func (page JobResourceListPage) Response() JobResourceList {
15337 return page.jrl
15338 }
15339
15340
15341 func (page JobResourceListPage) Values() []JobResource {
15342 if page.jrl.IsEmpty() {
15343 return nil
15344 }
15345 return *page.jrl.Value
15346 }
15347
15348
15349 func NewJobResourceListPage(cur JobResourceList, getNextPage func(context.Context, JobResourceList) (JobResourceList, error)) JobResourceListPage {
15350 return JobResourceListPage{
15351 fn: getNextPage,
15352 jrl: cur,
15353 }
15354 }
15355
15356
15357 type KEKDetails struct {
15358
15359 KeyURL *string `json:"keyUrl,omitempty"`
15360
15361 KeyVaultID *string `json:"keyVaultId,omitempty"`
15362
15363 KeyBackupData *string `json:"keyBackupData,omitempty"`
15364 }
15365
15366
15367
15368
15369
15370
15371
15372
15373 type KeyAndSecretDetails struct {
15374
15375 KekDetails *KEKDetails `json:"kekDetails,omitempty"`
15376
15377 BekDetails *BEKDetails `json:"bekDetails,omitempty"`
15378
15379 EncryptionMechanism *string `json:"encryptionMechanism,omitempty"`
15380 }
15381
15382
15383 type KPIResourceHealthDetails struct {
15384
15385 ResourceHealthStatus ResourceHealthStatus `json:"resourceHealthStatus,omitempty"`
15386
15387 ResourceHealthDetails *[]ResourceHealthDetails `json:"resourceHealthDetails,omitempty"`
15388 }
15389
15390
15391 type ListRecoveryPointsRecommendedForMoveRequest struct {
15392
15393 ObjectType *string `json:"objectType,omitempty"`
15394
15395 ExcludedRPList *[]string `json:"excludedRPList,omitempty"`
15396 }
15397
15398
15399 type LogSchedulePolicy struct {
15400
15401 ScheduleFrequencyInMins *int32 `json:"scheduleFrequencyInMins,omitempty"`
15402
15403 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
15404 }
15405
15406
15407 func (lsp LogSchedulePolicy) MarshalJSON() ([]byte, error) {
15408 lsp.SchedulePolicyType = SchedulePolicyTypeLogSchedulePolicy
15409 objectMap := make(map[string]interface{})
15410 if lsp.ScheduleFrequencyInMins != nil {
15411 objectMap["scheduleFrequencyInMins"] = lsp.ScheduleFrequencyInMins
15412 }
15413 if lsp.SchedulePolicyType != "" {
15414 objectMap["schedulePolicyType"] = lsp.SchedulePolicyType
15415 }
15416 return json.Marshal(objectMap)
15417 }
15418
15419
15420 func (lsp LogSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
15421 return &lsp, true
15422 }
15423
15424
15425 func (lsp LogSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
15426 return nil, false
15427 }
15428
15429
15430 func (lsp LogSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
15431 return nil, false
15432 }
15433
15434
15435 func (lsp LogSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
15436 return nil, false
15437 }
15438
15439
15440 func (lsp LogSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
15441 return &lsp, true
15442 }
15443
15444
15445 type LongTermRetentionPolicy struct {
15446
15447 DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"`
15448
15449 WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"`
15450
15451 MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"`
15452
15453 YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"`
15454
15455 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
15456 }
15457
15458
15459 func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) {
15460 ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy
15461 objectMap := make(map[string]interface{})
15462 if ltrp.DailySchedule != nil {
15463 objectMap["dailySchedule"] = ltrp.DailySchedule
15464 }
15465 if ltrp.WeeklySchedule != nil {
15466 objectMap["weeklySchedule"] = ltrp.WeeklySchedule
15467 }
15468 if ltrp.MonthlySchedule != nil {
15469 objectMap["monthlySchedule"] = ltrp.MonthlySchedule
15470 }
15471 if ltrp.YearlySchedule != nil {
15472 objectMap["yearlySchedule"] = ltrp.YearlySchedule
15473 }
15474 if ltrp.RetentionPolicyType != "" {
15475 objectMap["retentionPolicyType"] = ltrp.RetentionPolicyType
15476 }
15477 return json.Marshal(objectMap)
15478 }
15479
15480
15481 func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
15482 return <rp, true
15483 }
15484
15485
15486 func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
15487 return nil, false
15488 }
15489
15490
15491 func (ltrp LongTermRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
15492 return nil, false
15493 }
15494
15495
15496 func (ltrp LongTermRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
15497 return <rp, true
15498 }
15499
15500
15501 type LongTermSchedulePolicy struct {
15502
15503 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
15504 }
15505
15506
15507 func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) {
15508 ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy
15509 objectMap := make(map[string]interface{})
15510 if ltsp.SchedulePolicyType != "" {
15511 objectMap["schedulePolicyType"] = ltsp.SchedulePolicyType
15512 }
15513 return json.Marshal(objectMap)
15514 }
15515
15516
15517 func (ltsp LongTermSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
15518 return nil, false
15519 }
15520
15521
15522 func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
15523 return <sp, true
15524 }
15525
15526
15527 func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
15528 return nil, false
15529 }
15530
15531
15532 func (ltsp LongTermSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
15533 return nil, false
15534 }
15535
15536
15537 func (ltsp LongTermSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
15538 return <sp, true
15539 }
15540
15541
15542 type MabContainer struct {
15543
15544 CanReRegister *bool `json:"canReRegister,omitempty"`
15545
15546 ContainerID *int64 `json:"containerId,omitempty"`
15547
15548 ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"`
15549
15550 AgentVersion *string `json:"agentVersion,omitempty"`
15551
15552 ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"`
15553
15554 MabContainerHealthDetails *[]MABContainerHealthDetails `json:"mabContainerHealthDetails,omitempty"`
15555
15556 ContainerHealthState *string `json:"containerHealthState,omitempty"`
15557
15558 FriendlyName *string `json:"friendlyName,omitempty"`
15559
15560 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15561
15562 RegistrationStatus *string `json:"registrationStatus,omitempty"`
15563
15564 HealthStatus *string `json:"healthStatus,omitempty"`
15565
15566 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
15567 }
15568
15569
15570 func (mc MabContainer) MarshalJSON() ([]byte, error) {
15571 mc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeWindows
15572 objectMap := make(map[string]interface{})
15573 if mc.CanReRegister != nil {
15574 objectMap["canReRegister"] = mc.CanReRegister
15575 }
15576 if mc.ContainerID != nil {
15577 objectMap["containerId"] = mc.ContainerID
15578 }
15579 if mc.ProtectedItemCount != nil {
15580 objectMap["protectedItemCount"] = mc.ProtectedItemCount
15581 }
15582 if mc.AgentVersion != nil {
15583 objectMap["agentVersion"] = mc.AgentVersion
15584 }
15585 if mc.ExtendedInfo != nil {
15586 objectMap["extendedInfo"] = mc.ExtendedInfo
15587 }
15588 if mc.MabContainerHealthDetails != nil {
15589 objectMap["mabContainerHealthDetails"] = mc.MabContainerHealthDetails
15590 }
15591 if mc.ContainerHealthState != nil {
15592 objectMap["containerHealthState"] = mc.ContainerHealthState
15593 }
15594 if mc.FriendlyName != nil {
15595 objectMap["friendlyName"] = mc.FriendlyName
15596 }
15597 if mc.BackupManagementType != "" {
15598 objectMap["backupManagementType"] = mc.BackupManagementType
15599 }
15600 if mc.RegistrationStatus != nil {
15601 objectMap["registrationStatus"] = mc.RegistrationStatus
15602 }
15603 if mc.HealthStatus != nil {
15604 objectMap["healthStatus"] = mc.HealthStatus
15605 }
15606 if mc.ContainerType != "" {
15607 objectMap["containerType"] = mc.ContainerType
15608 }
15609 return json.Marshal(objectMap)
15610 }
15611
15612
15613 func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
15614 return nil, false
15615 }
15616
15617
15618 func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
15619 return nil, false
15620 }
15621
15622
15623 func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
15624 return nil, false
15625 }
15626
15627
15628 func (mc MabContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
15629 return nil, false
15630 }
15631
15632
15633 func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
15634 return nil, false
15635 }
15636
15637
15638 func (mc MabContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
15639 return nil, false
15640 }
15641
15642
15643 func (mc MabContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
15644 return nil, false
15645 }
15646
15647
15648 func (mc MabContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
15649 return nil, false
15650 }
15651
15652
15653 func (mc MabContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
15654 return nil, false
15655 }
15656
15657
15658 func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) {
15659 return nil, false
15660 }
15661
15662
15663 func (mc MabContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
15664 return nil, false
15665 }
15666
15667
15668 func (mc MabContainer) AsGenericContainer() (*GenericContainer, bool) {
15669 return nil, false
15670 }
15671
15672
15673 func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
15674 return nil, false
15675 }
15676
15677
15678 func (mc MabContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
15679 return nil, false
15680 }
15681
15682
15683 func (mc MabContainer) AsMabContainer() (*MabContainer, bool) {
15684 return &mc, true
15685 }
15686
15687
15688 func (mc MabContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
15689 return nil, false
15690 }
15691
15692
15693 func (mc MabContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
15694 return &mc, true
15695 }
15696
15697
15698 type MabContainerExtendedInfo struct {
15699
15700 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
15701
15702 BackupItemType ItemType `json:"backupItemType,omitempty"`
15703
15704 BackupItems *[]string `json:"backupItems,omitempty"`
15705
15706 PolicyName *string `json:"policyName,omitempty"`
15707
15708 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
15709 }
15710
15711
15712 type MABContainerHealthDetails struct {
15713
15714 Code *int32 `json:"code,omitempty"`
15715
15716 Title *string `json:"title,omitempty"`
15717
15718 Message *string `json:"message,omitempty"`
15719
15720 Recommendations *[]string `json:"recommendations,omitempty"`
15721 }
15722
15723
15724 type MabErrorInfo struct {
15725
15726 ErrorString *string `json:"errorString,omitempty"`
15727
15728 Recommendations *[]string `json:"recommendations,omitempty"`
15729 }
15730
15731
15732 func (mei MabErrorInfo) MarshalJSON() ([]byte, error) {
15733 objectMap := make(map[string]interface{})
15734 return json.Marshal(objectMap)
15735 }
15736
15737
15738 type MabFileFolderProtectedItem struct {
15739
15740 FriendlyName *string `json:"friendlyName,omitempty"`
15741
15742 ComputerName *string `json:"computerName,omitempty"`
15743
15744 LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
15745
15746 LastBackupTime *date.Time `json:"lastBackupTime,omitempty"`
15747
15748 ProtectionState *string `json:"protectionState,omitempty"`
15749
15750 DeferredDeleteSyncTimeInUTC *int64 `json:"deferredDeleteSyncTimeInUTC,omitempty"`
15751
15752 ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"`
15753
15754 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15755
15756 WorkloadType DataSourceType `json:"workloadType,omitempty"`
15757
15758 ContainerName *string `json:"containerName,omitempty"`
15759
15760 SourceResourceID *string `json:"sourceResourceId,omitempty"`
15761
15762 PolicyID *string `json:"policyId,omitempty"`
15763
15764 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
15765
15766 BackupSetName *string `json:"backupSetName,omitempty"`
15767
15768 CreateMode CreateMode `json:"createMode,omitempty"`
15769
15770 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
15771
15772 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
15773
15774 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
15775
15776 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
15777
15778 IsRehydrate *bool `json:"isRehydrate,omitempty"`
15779
15780 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
15781
15782 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
15783 }
15784
15785
15786 func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) {
15787 mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem
15788 objectMap := make(map[string]interface{})
15789 if mffpi.FriendlyName != nil {
15790 objectMap["friendlyName"] = mffpi.FriendlyName
15791 }
15792 if mffpi.ComputerName != nil {
15793 objectMap["computerName"] = mffpi.ComputerName
15794 }
15795 if mffpi.LastBackupStatus != nil {
15796 objectMap["lastBackupStatus"] = mffpi.LastBackupStatus
15797 }
15798 if mffpi.LastBackupTime != nil {
15799 objectMap["lastBackupTime"] = mffpi.LastBackupTime
15800 }
15801 if mffpi.ProtectionState != nil {
15802 objectMap["protectionState"] = mffpi.ProtectionState
15803 }
15804 if mffpi.DeferredDeleteSyncTimeInUTC != nil {
15805 objectMap["deferredDeleteSyncTimeInUTC"] = mffpi.DeferredDeleteSyncTimeInUTC
15806 }
15807 if mffpi.ExtendedInfo != nil {
15808 objectMap["extendedInfo"] = mffpi.ExtendedInfo
15809 }
15810 if mffpi.BackupManagementType != "" {
15811 objectMap["backupManagementType"] = mffpi.BackupManagementType
15812 }
15813 if mffpi.WorkloadType != "" {
15814 objectMap["workloadType"] = mffpi.WorkloadType
15815 }
15816 if mffpi.ContainerName != nil {
15817 objectMap["containerName"] = mffpi.ContainerName
15818 }
15819 if mffpi.SourceResourceID != nil {
15820 objectMap["sourceResourceId"] = mffpi.SourceResourceID
15821 }
15822 if mffpi.PolicyID != nil {
15823 objectMap["policyId"] = mffpi.PolicyID
15824 }
15825 if mffpi.LastRecoveryPoint != nil {
15826 objectMap["lastRecoveryPoint"] = mffpi.LastRecoveryPoint
15827 }
15828 if mffpi.BackupSetName != nil {
15829 objectMap["backupSetName"] = mffpi.BackupSetName
15830 }
15831 if mffpi.CreateMode != "" {
15832 objectMap["createMode"] = mffpi.CreateMode
15833 }
15834 if mffpi.DeferredDeleteTimeInUTC != nil {
15835 objectMap["deferredDeleteTimeInUTC"] = mffpi.DeferredDeleteTimeInUTC
15836 }
15837 if mffpi.IsScheduledForDeferredDelete != nil {
15838 objectMap["isScheduledForDeferredDelete"] = mffpi.IsScheduledForDeferredDelete
15839 }
15840 if mffpi.DeferredDeleteTimeRemaining != nil {
15841 objectMap["deferredDeleteTimeRemaining"] = mffpi.DeferredDeleteTimeRemaining
15842 }
15843 if mffpi.IsDeferredDeleteScheduleUpcoming != nil {
15844 objectMap["isDeferredDeleteScheduleUpcoming"] = mffpi.IsDeferredDeleteScheduleUpcoming
15845 }
15846 if mffpi.IsRehydrate != nil {
15847 objectMap["isRehydrate"] = mffpi.IsRehydrate
15848 }
15849 if mffpi.ResourceGuardOperationRequests != nil {
15850 objectMap["resourceGuardOperationRequests"] = mffpi.ResourceGuardOperationRequests
15851 }
15852 if mffpi.ProtectedItemType != "" {
15853 objectMap["protectedItemType"] = mffpi.ProtectedItemType
15854 }
15855 return json.Marshal(objectMap)
15856 }
15857
15858
15859 func (mffpi MabFileFolderProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
15860 return nil, false
15861 }
15862
15863
15864 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
15865 return nil, false
15866 }
15867
15868
15869 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
15870 return nil, false
15871 }
15872
15873
15874 func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
15875 return nil, false
15876 }
15877
15878
15879 func (mffpi MabFileFolderProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
15880 return nil, false
15881 }
15882
15883
15884 func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
15885 return nil, false
15886 }
15887
15888
15889 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
15890 return nil, false
15891 }
15892
15893
15894 func (mffpi MabFileFolderProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
15895 return nil, false
15896 }
15897
15898
15899 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
15900 return nil, false
15901 }
15902
15903
15904 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
15905 return nil, false
15906 }
15907
15908
15909 func (mffpi MabFileFolderProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
15910 return nil, false
15911 }
15912
15913
15914 func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
15915 return nil, false
15916 }
15917
15918
15919 func (mffpi MabFileFolderProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
15920 return nil, false
15921 }
15922
15923
15924 func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
15925 return &mffpi, true
15926 }
15927
15928
15929 func (mffpi MabFileFolderProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
15930 return nil, false
15931 }
15932
15933
15934 func (mffpi MabFileFolderProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
15935 return &mffpi, true
15936 }
15937
15938
15939 type MabFileFolderProtectedItemExtendedInfo struct {
15940
15941 LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"`
15942
15943 OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"`
15944
15945 RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"`
15946 }
15947
15948
15949 type MabJob struct {
15950
15951 Duration *string `json:"duration,omitempty"`
15952
15953 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
15954
15955 MabServerName *string `json:"mabServerName,omitempty"`
15956
15957 MabServerType MabServerType `json:"mabServerType,omitempty"`
15958
15959 WorkloadType WorkloadType `json:"workloadType,omitempty"`
15960
15961 ErrorDetails *[]MabErrorInfo `json:"errorDetails,omitempty"`
15962
15963 ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"`
15964
15965 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
15966
15967 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
15968
15969 Operation *string `json:"operation,omitempty"`
15970
15971 Status *string `json:"status,omitempty"`
15972
15973 StartTime *date.Time `json:"startTime,omitempty"`
15974
15975 EndTime *date.Time `json:"endTime,omitempty"`
15976
15977 ActivityID *string `json:"activityId,omitempty"`
15978
15979 JobType JobType `json:"jobType,omitempty"`
15980 }
15981
15982
15983 func (mj MabJob) MarshalJSON() ([]byte, error) {
15984 mj.JobType = JobTypeMabJob
15985 objectMap := make(map[string]interface{})
15986 if mj.Duration != nil {
15987 objectMap["duration"] = mj.Duration
15988 }
15989 if mj.ActionsInfo != nil {
15990 objectMap["actionsInfo"] = mj.ActionsInfo
15991 }
15992 if mj.MabServerName != nil {
15993 objectMap["mabServerName"] = mj.MabServerName
15994 }
15995 if mj.MabServerType != "" {
15996 objectMap["mabServerType"] = mj.MabServerType
15997 }
15998 if mj.WorkloadType != "" {
15999 objectMap["workloadType"] = mj.WorkloadType
16000 }
16001 if mj.ErrorDetails != nil {
16002 objectMap["errorDetails"] = mj.ErrorDetails
16003 }
16004 if mj.ExtendedInfo != nil {
16005 objectMap["extendedInfo"] = mj.ExtendedInfo
16006 }
16007 if mj.EntityFriendlyName != nil {
16008 objectMap["entityFriendlyName"] = mj.EntityFriendlyName
16009 }
16010 if mj.BackupManagementType != "" {
16011 objectMap["backupManagementType"] = mj.BackupManagementType
16012 }
16013 if mj.Operation != nil {
16014 objectMap["operation"] = mj.Operation
16015 }
16016 if mj.Status != nil {
16017 objectMap["status"] = mj.Status
16018 }
16019 if mj.StartTime != nil {
16020 objectMap["startTime"] = mj.StartTime
16021 }
16022 if mj.EndTime != nil {
16023 objectMap["endTime"] = mj.EndTime
16024 }
16025 if mj.ActivityID != nil {
16026 objectMap["activityId"] = mj.ActivityID
16027 }
16028 if mj.JobType != "" {
16029 objectMap["jobType"] = mj.JobType
16030 }
16031 return json.Marshal(objectMap)
16032 }
16033
16034
16035 func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
16036 return nil, false
16037 }
16038
16039
16040 func (mj MabJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
16041 return nil, false
16042 }
16043
16044
16045 func (mj MabJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
16046 return nil, false
16047 }
16048
16049
16050 func (mj MabJob) AsDpmJob() (*DpmJob, bool) {
16051 return nil, false
16052 }
16053
16054
16055 func (mj MabJob) AsMabJob() (*MabJob, bool) {
16056 return &mj, true
16057 }
16058
16059
16060 func (mj MabJob) AsVaultJob() (*VaultJob, bool) {
16061 return nil, false
16062 }
16063
16064
16065 func (mj MabJob) AsJob() (*Job, bool) {
16066 return nil, false
16067 }
16068
16069
16070 func (mj MabJob) AsBasicJob() (BasicJob, bool) {
16071 return &mj, true
16072 }
16073
16074
16075 type MabJobExtendedInfo struct {
16076
16077 TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"`
16078
16079 PropertyBag map[string]*string `json:"propertyBag"`
16080
16081 DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"`
16082 }
16083
16084
16085 func (mjei MabJobExtendedInfo) MarshalJSON() ([]byte, error) {
16086 objectMap := make(map[string]interface{})
16087 if mjei.TasksList != nil {
16088 objectMap["tasksList"] = mjei.TasksList
16089 }
16090 if mjei.PropertyBag != nil {
16091 objectMap["propertyBag"] = mjei.PropertyBag
16092 }
16093 if mjei.DynamicErrorMessage != nil {
16094 objectMap["dynamicErrorMessage"] = mjei.DynamicErrorMessage
16095 }
16096 return json.Marshal(objectMap)
16097 }
16098
16099
16100 type MabJobTaskDetails struct {
16101
16102 TaskID *string `json:"taskId,omitempty"`
16103
16104 StartTime *date.Time `json:"startTime,omitempty"`
16105
16106 EndTime *date.Time `json:"endTime,omitempty"`
16107
16108 Duration *string `json:"duration,omitempty"`
16109
16110 Status *string `json:"status,omitempty"`
16111 }
16112
16113
16114 type MabProtectionPolicy struct {
16115
16116 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
16117
16118 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
16119
16120 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
16121
16122 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
16123
16124 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
16125 }
16126
16127
16128 func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) {
16129 mpp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB
16130 objectMap := make(map[string]interface{})
16131 objectMap["schedulePolicy"] = mpp.SchedulePolicy
16132 objectMap["retentionPolicy"] = mpp.RetentionPolicy
16133 if mpp.ProtectedItemsCount != nil {
16134 objectMap["protectedItemsCount"] = mpp.ProtectedItemsCount
16135 }
16136 if mpp.ResourceGuardOperationRequests != nil {
16137 objectMap["resourceGuardOperationRequests"] = mpp.ResourceGuardOperationRequests
16138 }
16139 if mpp.BackupManagementType != "" {
16140 objectMap["backupManagementType"] = mpp.BackupManagementType
16141 }
16142 return json.Marshal(objectMap)
16143 }
16144
16145
16146 func (mpp MabProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
16147 return nil, false
16148 }
16149
16150
16151 func (mpp MabProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
16152 return nil, false
16153 }
16154
16155
16156 func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
16157 return nil, false
16158 }
16159
16160
16161 func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
16162 return nil, false
16163 }
16164
16165
16166 func (mpp MabProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
16167 return nil, false
16168 }
16169
16170
16171 func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
16172 return &mpp, true
16173 }
16174
16175
16176 func (mpp MabProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
16177 return nil, false
16178 }
16179
16180
16181 func (mpp MabProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
16182 return &mpp, true
16183 }
16184
16185
16186 func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error {
16187 var m map[string]*json.RawMessage
16188 err := json.Unmarshal(body, &m)
16189 if err != nil {
16190 return err
16191 }
16192 for k, v := range m {
16193 switch k {
16194 case "schedulePolicy":
16195 if v != nil {
16196 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
16197 if err != nil {
16198 return err
16199 }
16200 mpp.SchedulePolicy = schedulePolicy
16201 }
16202 case "retentionPolicy":
16203 if v != nil {
16204 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
16205 if err != nil {
16206 return err
16207 }
16208 mpp.RetentionPolicy = retentionPolicy
16209 }
16210 case "protectedItemsCount":
16211 if v != nil {
16212 var protectedItemsCount int32
16213 err = json.Unmarshal(*v, &protectedItemsCount)
16214 if err != nil {
16215 return err
16216 }
16217 mpp.ProtectedItemsCount = &protectedItemsCount
16218 }
16219 case "resourceGuardOperationRequests":
16220 if v != nil {
16221 var resourceGuardOperationRequests []string
16222 err = json.Unmarshal(*v, &resourceGuardOperationRequests)
16223 if err != nil {
16224 return err
16225 }
16226 mpp.ResourceGuardOperationRequests = &resourceGuardOperationRequests
16227 }
16228 case "backupManagementType":
16229 if v != nil {
16230 var backupManagementType ManagementTypeBasicProtectionPolicy
16231 err = json.Unmarshal(*v, &backupManagementType)
16232 if err != nil {
16233 return err
16234 }
16235 mpp.BackupManagementType = backupManagementType
16236 }
16237 }
16238 }
16239
16240 return nil
16241 }
16242
16243
16244 type ManagementUsage struct {
16245
16246 Unit UsagesUnit `json:"unit,omitempty"`
16247
16248 QuotaPeriod *string `json:"quotaPeriod,omitempty"`
16249
16250 NextResetTime *date.Time `json:"nextResetTime,omitempty"`
16251
16252 CurrentValue *int64 `json:"currentValue,omitempty"`
16253
16254 Limit *int64 `json:"limit,omitempty"`
16255
16256 Name *NameInfo `json:"name,omitempty"`
16257 }
16258
16259
16260 type ManagementUsageList struct {
16261 autorest.Response `json:"-"`
16262
16263 Value *[]ManagementUsage `json:"value,omitempty"`
16264 }
16265
16266
16267 type MonthlyRetentionSchedule struct {
16268
16269 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
16270
16271 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
16272
16273 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
16274
16275 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
16276
16277 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
16278 }
16279
16280
16281
16282 type MoveRecoveryPointFuture struct {
16283 azure.FutureAPI
16284
16285
16286 Result func(BaseClient) (autorest.Response, error)
16287 }
16288
16289
16290 func (future *MoveRecoveryPointFuture) UnmarshalJSON(body []byte) error {
16291 var azFuture azure.Future
16292 if err := json.Unmarshal(body, &azFuture); err != nil {
16293 return err
16294 }
16295 future.FutureAPI = &azFuture
16296 future.Result = future.result
16297 return nil
16298 }
16299
16300
16301 func (future *MoveRecoveryPointFuture) result(client BaseClient) (ar autorest.Response, err error) {
16302 var done bool
16303 done, err = future.DoneWithContext(context.Background(), client)
16304 if err != nil {
16305 err = autorest.NewErrorWithError(err, "backup.MoveRecoveryPointFuture", "Result", future.Response(), "Polling failure")
16306 return
16307 }
16308 if !done {
16309 ar.Response = future.Response()
16310 err = azure.NewAsyncOpIncompleteError("backup.MoveRecoveryPointFuture")
16311 return
16312 }
16313 ar.Response = future.Response()
16314 return
16315 }
16316
16317
16318 type MoveRPAcrossTiersRequest struct {
16319
16320 ObjectType *string `json:"objectType,omitempty"`
16321
16322 SourceTierType RecoveryPointTierType `json:"sourceTierType,omitempty"`
16323
16324 TargetTierType RecoveryPointTierType `json:"targetTierType,omitempty"`
16325 }
16326
16327
16328 type NameInfo struct {
16329
16330 Value *string `json:"value,omitempty"`
16331
16332 LocalizedValue *string `json:"localizedValue,omitempty"`
16333 }
16334
16335
16336 type NewErrorResponse struct {
16337
16338 Error *NewErrorResponseError `json:"error,omitempty"`
16339 }
16340
16341
16342 type NewErrorResponseError struct {
16343
16344 Code *string `json:"code,omitempty"`
16345
16346 Message *string `json:"message,omitempty"`
16347
16348 Target *string `json:"target,omitempty"`
16349
16350 Details *[]NewErrorResponse `json:"details,omitempty"`
16351
16352 AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
16353 }
16354
16355
16356 func (ner NewErrorResponseError) MarshalJSON() ([]byte, error) {
16357 objectMap := make(map[string]interface{})
16358 return json.Marshal(objectMap)
16359 }
16360
16361
16362 type OperationResultInfo struct {
16363
16364 JobList *[]string `json:"jobList,omitempty"`
16365
16366 ObjectType ObjectType `json:"objectType,omitempty"`
16367 }
16368
16369
16370 func (ori OperationResultInfo) MarshalJSON() ([]byte, error) {
16371 ori.ObjectType = ObjectTypeOperationResultInfo
16372 objectMap := make(map[string]interface{})
16373 if ori.JobList != nil {
16374 objectMap["jobList"] = ori.JobList
16375 }
16376 if ori.ObjectType != "" {
16377 objectMap["objectType"] = ori.ObjectType
16378 }
16379 return json.Marshal(objectMap)
16380 }
16381
16382
16383 func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
16384 return nil, false
16385 }
16386
16387
16388 func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) {
16389 return &ori, true
16390 }
16391
16392
16393 func (ori OperationResultInfo) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
16394 return nil, false
16395 }
16396
16397
16398 func (ori OperationResultInfo) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
16399 return &ori, true
16400 }
16401
16402
16403 type BasicOperationResultInfoBase interface {
16404 AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool)
16405 AsOperationResultInfo() (*OperationResultInfo, bool)
16406 AsOperationResultInfoBase() (*OperationResultInfoBase, bool)
16407 }
16408
16409
16410 type OperationResultInfoBase struct {
16411
16412 ObjectType ObjectType `json:"objectType,omitempty"`
16413 }
16414
16415 func unmarshalBasicOperationResultInfoBase(body []byte) (BasicOperationResultInfoBase, error) {
16416 var m map[string]interface{}
16417 err := json.Unmarshal(body, &m)
16418 if err != nil {
16419 return nil, err
16420 }
16421
16422 switch m["objectType"] {
16423 case string(ObjectTypeExportJobsOperationResultInfo):
16424 var ejori ExportJobsOperationResultInfo
16425 err := json.Unmarshal(body, &ejori)
16426 return ejori, err
16427 case string(ObjectTypeOperationResultInfo):
16428 var ori OperationResultInfo
16429 err := json.Unmarshal(body, &ori)
16430 return ori, err
16431 default:
16432 var orib OperationResultInfoBase
16433 err := json.Unmarshal(body, &orib)
16434 return orib, err
16435 }
16436 }
16437 func unmarshalBasicOperationResultInfoBaseArray(body []byte) ([]BasicOperationResultInfoBase, error) {
16438 var rawMessages []*json.RawMessage
16439 err := json.Unmarshal(body, &rawMessages)
16440 if err != nil {
16441 return nil, err
16442 }
16443
16444 oribArray := make([]BasicOperationResultInfoBase, len(rawMessages))
16445
16446 for index, rawMessage := range rawMessages {
16447 orib, err := unmarshalBasicOperationResultInfoBase(*rawMessage)
16448 if err != nil {
16449 return nil, err
16450 }
16451 oribArray[index] = orib
16452 }
16453 return oribArray, nil
16454 }
16455
16456
16457 func (orib OperationResultInfoBase) MarshalJSON() ([]byte, error) {
16458 orib.ObjectType = ObjectTypeOperationResultInfoBase
16459 objectMap := make(map[string]interface{})
16460 if orib.ObjectType != "" {
16461 objectMap["objectType"] = orib.ObjectType
16462 }
16463 return json.Marshal(objectMap)
16464 }
16465
16466
16467 func (orib OperationResultInfoBase) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) {
16468 return nil, false
16469 }
16470
16471
16472 func (orib OperationResultInfoBase) AsOperationResultInfo() (*OperationResultInfo, bool) {
16473 return nil, false
16474 }
16475
16476
16477 func (orib OperationResultInfoBase) AsOperationResultInfoBase() (*OperationResultInfoBase, bool) {
16478 return &orib, true
16479 }
16480
16481
16482 func (orib OperationResultInfoBase) AsBasicOperationResultInfoBase() (BasicOperationResultInfoBase, bool) {
16483 return &orib, true
16484 }
16485
16486
16487 type OperationResultInfoBaseResource struct {
16488 autorest.Response `json:"-"`
16489
16490 Operation BasicOperationResultInfoBase `json:"operation,omitempty"`
16491
16492 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
16493
16494 Headers map[string][]string `json:"headers"`
16495 }
16496
16497
16498 func (oribr OperationResultInfoBaseResource) MarshalJSON() ([]byte, error) {
16499 objectMap := make(map[string]interface{})
16500 objectMap["operation"] = oribr.Operation
16501 if oribr.StatusCode != "" {
16502 objectMap["statusCode"] = oribr.StatusCode
16503 }
16504 if oribr.Headers != nil {
16505 objectMap["headers"] = oribr.Headers
16506 }
16507 return json.Marshal(objectMap)
16508 }
16509
16510
16511 func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error {
16512 var m map[string]*json.RawMessage
16513 err := json.Unmarshal(body, &m)
16514 if err != nil {
16515 return err
16516 }
16517 for k, v := range m {
16518 switch k {
16519 case "operation":
16520 if v != nil {
16521 operation, err := unmarshalBasicOperationResultInfoBase(*v)
16522 if err != nil {
16523 return err
16524 }
16525 oribr.Operation = operation
16526 }
16527 case "statusCode":
16528 if v != nil {
16529 var statusCode HTTPStatusCode
16530 err = json.Unmarshal(*v, &statusCode)
16531 if err != nil {
16532 return err
16533 }
16534 oribr.StatusCode = statusCode
16535 }
16536 case "headers":
16537 if v != nil {
16538 var headers map[string][]string
16539 err = json.Unmarshal(*v, &headers)
16540 if err != nil {
16541 return err
16542 }
16543 oribr.Headers = headers
16544 }
16545 }
16546 }
16547
16548 return nil
16549 }
16550
16551
16552 type OperationStatus struct {
16553 autorest.Response `json:"-"`
16554
16555 ID *string `json:"id,omitempty"`
16556
16557 Name *string `json:"name,omitempty"`
16558
16559 Status OperationStatusValues `json:"status,omitempty"`
16560
16561 StartTime *date.Time `json:"startTime,omitempty"`
16562
16563 EndTime *date.Time `json:"endTime,omitempty"`
16564
16565 Error *OperationStatusError `json:"error,omitempty"`
16566
16567 Properties BasicOperationStatusExtendedInfo `json:"properties,omitempty"`
16568 }
16569
16570
16571 func (osVar *OperationStatus) UnmarshalJSON(body []byte) error {
16572 var m map[string]*json.RawMessage
16573 err := json.Unmarshal(body, &m)
16574 if err != nil {
16575 return err
16576 }
16577 for k, v := range m {
16578 switch k {
16579 case "id":
16580 if v != nil {
16581 var ID string
16582 err = json.Unmarshal(*v, &ID)
16583 if err != nil {
16584 return err
16585 }
16586 osVar.ID = &ID
16587 }
16588 case "name":
16589 if v != nil {
16590 var name string
16591 err = json.Unmarshal(*v, &name)
16592 if err != nil {
16593 return err
16594 }
16595 osVar.Name = &name
16596 }
16597 case "status":
16598 if v != nil {
16599 var status OperationStatusValues
16600 err = json.Unmarshal(*v, &status)
16601 if err != nil {
16602 return err
16603 }
16604 osVar.Status = status
16605 }
16606 case "startTime":
16607 if v != nil {
16608 var startTime date.Time
16609 err = json.Unmarshal(*v, &startTime)
16610 if err != nil {
16611 return err
16612 }
16613 osVar.StartTime = &startTime
16614 }
16615 case "endTime":
16616 if v != nil {
16617 var endTime date.Time
16618 err = json.Unmarshal(*v, &endTime)
16619 if err != nil {
16620 return err
16621 }
16622 osVar.EndTime = &endTime
16623 }
16624 case "error":
16625 if v != nil {
16626 var errorVar OperationStatusError
16627 err = json.Unmarshal(*v, &errorVar)
16628 if err != nil {
16629 return err
16630 }
16631 osVar.Error = &errorVar
16632 }
16633 case "properties":
16634 if v != nil {
16635 properties, err := unmarshalBasicOperationStatusExtendedInfo(*v)
16636 if err != nil {
16637 return err
16638 }
16639 osVar.Properties = properties
16640 }
16641 }
16642 }
16643
16644 return nil
16645 }
16646
16647
16648 type OperationStatusError struct {
16649
16650 Code *string `json:"code,omitempty"`
16651
16652 Message *string `json:"message,omitempty"`
16653 }
16654
16655
16656 type BasicOperationStatusExtendedInfo interface {
16657 AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool)
16658 AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool)
16659 AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool)
16660 AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool)
16661 AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool)
16662 }
16663
16664
16665 type OperationStatusExtendedInfo struct {
16666
16667 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16668 }
16669
16670 func unmarshalBasicOperationStatusExtendedInfo(body []byte) (BasicOperationStatusExtendedInfo, error) {
16671 var m map[string]interface{}
16672 err := json.Unmarshal(body, &m)
16673 if err != nil {
16674 return nil, err
16675 }
16676
16677 switch m["objectType"] {
16678 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo):
16679 var osjei OperationStatusJobExtendedInfo
16680 err := json.Unmarshal(body, &osjei)
16681 return osjei, err
16682 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo):
16683 var osjei OperationStatusJobsExtendedInfo
16684 err := json.Unmarshal(body, &osjei)
16685 return osjei, err
16686 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo):
16687 var ospiei OperationStatusProvisionILRExtendedInfo
16688 err := json.Unmarshal(body, &ospiei)
16689 return ospiei, err
16690 case string(ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusRecoveryPointExtendedInfo):
16691 var osrpei OperationStatusRecoveryPointExtendedInfo
16692 err := json.Unmarshal(body, &osrpei)
16693 return osrpei, err
16694 default:
16695 var osei OperationStatusExtendedInfo
16696 err := json.Unmarshal(body, &osei)
16697 return osei, err
16698 }
16699 }
16700 func unmarshalBasicOperationStatusExtendedInfoArray(body []byte) ([]BasicOperationStatusExtendedInfo, error) {
16701 var rawMessages []*json.RawMessage
16702 err := json.Unmarshal(body, &rawMessages)
16703 if err != nil {
16704 return nil, err
16705 }
16706
16707 oseiArray := make([]BasicOperationStatusExtendedInfo, len(rawMessages))
16708
16709 for index, rawMessage := range rawMessages {
16710 osei, err := unmarshalBasicOperationStatusExtendedInfo(*rawMessage)
16711 if err != nil {
16712 return nil, err
16713 }
16714 oseiArray[index] = osei
16715 }
16716 return oseiArray, nil
16717 }
16718
16719
16720 func (osei OperationStatusExtendedInfo) MarshalJSON() ([]byte, error) {
16721 osei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusExtendedInfo
16722 objectMap := make(map[string]interface{})
16723 if osei.ObjectType != "" {
16724 objectMap["objectType"] = osei.ObjectType
16725 }
16726 return json.Marshal(objectMap)
16727 }
16728
16729
16730 func (osei OperationStatusExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16731 return nil, false
16732 }
16733
16734
16735 func (osei OperationStatusExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16736 return nil, false
16737 }
16738
16739
16740 func (osei OperationStatusExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16741 return nil, false
16742 }
16743
16744
16745 func (osei OperationStatusExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16746 return nil, false
16747 }
16748
16749
16750 func (osei OperationStatusExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16751 return &osei, true
16752 }
16753
16754
16755 func (osei OperationStatusExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16756 return &osei, true
16757 }
16758
16759
16760 type OperationStatusJobExtendedInfo struct {
16761
16762 JobID *string `json:"jobId,omitempty"`
16763
16764 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16765 }
16766
16767
16768 func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) {
16769 osjei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobExtendedInfo
16770 objectMap := make(map[string]interface{})
16771 if osjei.JobID != nil {
16772 objectMap["jobId"] = osjei.JobID
16773 }
16774 if osjei.ObjectType != "" {
16775 objectMap["objectType"] = osjei.ObjectType
16776 }
16777 return json.Marshal(objectMap)
16778 }
16779
16780
16781 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16782 return &osjei, true
16783 }
16784
16785
16786 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16787 return nil, false
16788 }
16789
16790
16791 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16792 return nil, false
16793 }
16794
16795
16796 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16797 return nil, false
16798 }
16799
16800
16801 func (osjei OperationStatusJobExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16802 return nil, false
16803 }
16804
16805
16806 func (osjei OperationStatusJobExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16807 return &osjei, true
16808 }
16809
16810
16811 type OperationStatusJobsExtendedInfo struct {
16812
16813 JobIds *[]string `json:"jobIds,omitempty"`
16814
16815 FailedJobsError map[string]*string `json:"failedJobsError"`
16816
16817 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16818 }
16819
16820
16821 func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) {
16822 osjei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusJobsExtendedInfo
16823 objectMap := make(map[string]interface{})
16824 if osjei.JobIds != nil {
16825 objectMap["jobIds"] = osjei.JobIds
16826 }
16827 if osjei.FailedJobsError != nil {
16828 objectMap["failedJobsError"] = osjei.FailedJobsError
16829 }
16830 if osjei.ObjectType != "" {
16831 objectMap["objectType"] = osjei.ObjectType
16832 }
16833 return json.Marshal(objectMap)
16834 }
16835
16836
16837 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16838 return nil, false
16839 }
16840
16841
16842 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16843 return &osjei, true
16844 }
16845
16846
16847 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16848 return nil, false
16849 }
16850
16851
16852 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16853 return nil, false
16854 }
16855
16856
16857 func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16858 return nil, false
16859 }
16860
16861
16862 func (osjei OperationStatusJobsExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16863 return &osjei, true
16864 }
16865
16866
16867 type OperationStatusProvisionILRExtendedInfo struct {
16868
16869 RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"`
16870
16871 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16872 }
16873
16874
16875 func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) {
16876 ospiei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusProvisionILRExtendedInfo
16877 objectMap := make(map[string]interface{})
16878 if ospiei.RecoveryTarget != nil {
16879 objectMap["recoveryTarget"] = ospiei.RecoveryTarget
16880 }
16881 if ospiei.ObjectType != "" {
16882 objectMap["objectType"] = ospiei.ObjectType
16883 }
16884 return json.Marshal(objectMap)
16885 }
16886
16887
16888 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16889 return nil, false
16890 }
16891
16892
16893 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16894 return nil, false
16895 }
16896
16897
16898 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16899 return &ospiei, true
16900 }
16901
16902
16903 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16904 return nil, false
16905 }
16906
16907
16908 func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16909 return nil, false
16910 }
16911
16912
16913 func (ospiei OperationStatusProvisionILRExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16914 return &ospiei, true
16915 }
16916
16917
16918 type OperationStatusRecoveryPointExtendedInfo struct {
16919
16920 UpdatedRecoveryPoint BasicRecoveryPoint `json:"updatedRecoveryPoint,omitempty"`
16921
16922 DeletedBackupItemVersion *string `json:"deletedBackupItemVersion,omitempty"`
16923
16924 ObjectType ObjectTypeBasicOperationStatusExtendedInfo `json:"objectType,omitempty"`
16925 }
16926
16927
16928 func (osrpei OperationStatusRecoveryPointExtendedInfo) MarshalJSON() ([]byte, error) {
16929 osrpei.ObjectType = ObjectTypeBasicOperationStatusExtendedInfoObjectTypeOperationStatusRecoveryPointExtendedInfo
16930 objectMap := make(map[string]interface{})
16931 objectMap["updatedRecoveryPoint"] = osrpei.UpdatedRecoveryPoint
16932 if osrpei.DeletedBackupItemVersion != nil {
16933 objectMap["deletedBackupItemVersion"] = osrpei.DeletedBackupItemVersion
16934 }
16935 if osrpei.ObjectType != "" {
16936 objectMap["objectType"] = osrpei.ObjectType
16937 }
16938 return json.Marshal(objectMap)
16939 }
16940
16941
16942 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) {
16943 return nil, false
16944 }
16945
16946
16947 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) {
16948 return nil, false
16949 }
16950
16951
16952 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) {
16953 return nil, false
16954 }
16955
16956
16957 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusRecoveryPointExtendedInfo() (*OperationStatusRecoveryPointExtendedInfo, bool) {
16958 return &osrpei, true
16959 }
16960
16961
16962 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsOperationStatusExtendedInfo() (*OperationStatusExtendedInfo, bool) {
16963 return nil, false
16964 }
16965
16966
16967 func (osrpei OperationStatusRecoveryPointExtendedInfo) AsBasicOperationStatusExtendedInfo() (BasicOperationStatusExtendedInfo, bool) {
16968 return &osrpei, true
16969 }
16970
16971
16972 func (osrpei *OperationStatusRecoveryPointExtendedInfo) UnmarshalJSON(body []byte) error {
16973 var m map[string]*json.RawMessage
16974 err := json.Unmarshal(body, &m)
16975 if err != nil {
16976 return err
16977 }
16978 for k, v := range m {
16979 switch k {
16980 case "updatedRecoveryPoint":
16981 if v != nil {
16982 updatedRecoveryPoint, err := unmarshalBasicRecoveryPoint(*v)
16983 if err != nil {
16984 return err
16985 }
16986 osrpei.UpdatedRecoveryPoint = updatedRecoveryPoint
16987 }
16988 case "deletedBackupItemVersion":
16989 if v != nil {
16990 var deletedBackupItemVersion string
16991 err = json.Unmarshal(*v, &deletedBackupItemVersion)
16992 if err != nil {
16993 return err
16994 }
16995 osrpei.DeletedBackupItemVersion = &deletedBackupItemVersion
16996 }
16997 case "objectType":
16998 if v != nil {
16999 var objectType ObjectTypeBasicOperationStatusExtendedInfo
17000 err = json.Unmarshal(*v, &objectType)
17001 if err != nil {
17002 return err
17003 }
17004 osrpei.ObjectType = objectType
17005 }
17006 }
17007 }
17008
17009 return nil
17010 }
17011
17012
17013 type OperationWorkerResponse struct {
17014
17015 StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
17016
17017 Headers map[string][]string `json:"headers"`
17018 }
17019
17020
17021 func (owr OperationWorkerResponse) MarshalJSON() ([]byte, error) {
17022 objectMap := make(map[string]interface{})
17023 if owr.StatusCode != "" {
17024 objectMap["statusCode"] = owr.StatusCode
17025 }
17026 if owr.Headers != nil {
17027 objectMap["headers"] = owr.Headers
17028 }
17029 return json.Marshal(objectMap)
17030 }
17031
17032
17033 type PointInTimeRange struct {
17034
17035 StartTime *date.Time `json:"startTime,omitempty"`
17036
17037 EndTime *date.Time `json:"endTime,omitempty"`
17038 }
17039
17040
17041 type PreBackupValidation struct {
17042
17043 Status InquiryStatus `json:"status,omitempty"`
17044
17045 Code *string `json:"code,omitempty"`
17046
17047 Message *string `json:"message,omitempty"`
17048 }
17049
17050
17051 type PrepareDataMoveRequest struct {
17052
17053 TargetResourceID *string `json:"targetResourceId,omitempty"`
17054
17055 TargetRegion *string `json:"targetRegion,omitempty"`
17056
17057 DataMoveLevel DataMoveLevel `json:"dataMoveLevel,omitempty"`
17058
17059
17060 SourceContainerArmIds *[]string `json:"sourceContainerArmIds,omitempty"`
17061
17062 IgnoreMoved *bool `json:"ignoreMoved,omitempty"`
17063 }
17064
17065
17066 type PrepareDataMoveResponse struct {
17067
17068 CorrelationID *string `json:"correlationId,omitempty"`
17069
17070 SourceVaultProperties map[string]*string `json:"sourceVaultProperties"`
17071
17072 ObjectType ObjectTypeBasicVaultStorageConfigOperationResultResponse `json:"objectType,omitempty"`
17073 }
17074
17075
17076 func (pdmr PrepareDataMoveResponse) MarshalJSON() ([]byte, error) {
17077 pdmr.ObjectType = ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse
17078 objectMap := make(map[string]interface{})
17079 if pdmr.CorrelationID != nil {
17080 objectMap["correlationId"] = pdmr.CorrelationID
17081 }
17082 if pdmr.SourceVaultProperties != nil {
17083 objectMap["sourceVaultProperties"] = pdmr.SourceVaultProperties
17084 }
17085 if pdmr.ObjectType != "" {
17086 objectMap["objectType"] = pdmr.ObjectType
17087 }
17088 return json.Marshal(objectMap)
17089 }
17090
17091
17092 func (pdmr PrepareDataMoveResponse) AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool) {
17093 return &pdmr, true
17094 }
17095
17096
17097 func (pdmr PrepareDataMoveResponse) AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool) {
17098 return nil, false
17099 }
17100
17101
17102 func (pdmr PrepareDataMoveResponse) AsBasicVaultStorageConfigOperationResultResponse() (BasicVaultStorageConfigOperationResultResponse, bool) {
17103 return &pdmr, true
17104 }
17105
17106
17107
17108
17109
17110
17111
17112 type PreValidateEnableBackupRequest struct {
17113
17114 ResourceType DataSourceType `json:"resourceType,omitempty"`
17115
17116 ResourceID *string `json:"resourceId,omitempty"`
17117
17118 VaultID *string `json:"vaultId,omitempty"`
17119
17120 Properties *string `json:"properties,omitempty"`
17121 }
17122
17123
17124 type PreValidateEnableBackupResponse struct {
17125 autorest.Response `json:"-"`
17126
17127 Status ValidationStatus `json:"status,omitempty"`
17128
17129 ErrorCode *string `json:"errorCode,omitempty"`
17130
17131 ErrorMessage *string `json:"errorMessage,omitempty"`
17132
17133 Recommendation *string `json:"recommendation,omitempty"`
17134
17135
17136 ContainerName *string `json:"containerName,omitempty"`
17137
17138 ProtectedItemName *string `json:"protectedItemName,omitempty"`
17139 }
17140
17141
17142 type PrivateEndpoint struct {
17143
17144 ID *string `json:"id,omitempty"`
17145 }
17146
17147
17148 type PrivateEndpointConnection struct {
17149
17150 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17151
17152 PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
17153
17154 PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
17155 }
17156
17157
17158
17159 type PrivateEndpointConnectionDeleteFuture struct {
17160 azure.FutureAPI
17161
17162
17163 Result func(PrivateEndpointConnectionClient) (autorest.Response, error)
17164 }
17165
17166
17167 func (future *PrivateEndpointConnectionDeleteFuture) UnmarshalJSON(body []byte) error {
17168 var azFuture azure.Future
17169 if err := json.Unmarshal(body, &azFuture); err != nil {
17170 return err
17171 }
17172 future.FutureAPI = &azFuture
17173 future.Result = future.result
17174 return nil
17175 }
17176
17177
17178 func (future *PrivateEndpointConnectionDeleteFuture) result(client PrivateEndpointConnectionClient) (ar autorest.Response, err error) {
17179 var done bool
17180 done, err = future.DoneWithContext(context.Background(), client)
17181 if err != nil {
17182 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionDeleteFuture", "Result", future.Response(), "Polling failure")
17183 return
17184 }
17185 if !done {
17186 ar.Response = future.Response()
17187 err = azure.NewAsyncOpIncompleteError("backup.PrivateEndpointConnectionDeleteFuture")
17188 return
17189 }
17190 ar.Response = future.Response()
17191 return
17192 }
17193
17194
17195
17196 type PrivateEndpointConnectionPutFuture struct {
17197 azure.FutureAPI
17198
17199
17200 Result func(PrivateEndpointConnectionClient) (PrivateEndpointConnectionResource, error)
17201 }
17202
17203
17204 func (future *PrivateEndpointConnectionPutFuture) UnmarshalJSON(body []byte) error {
17205 var azFuture azure.Future
17206 if err := json.Unmarshal(body, &azFuture); err != nil {
17207 return err
17208 }
17209 future.FutureAPI = &azFuture
17210 future.Result = future.result
17211 return nil
17212 }
17213
17214
17215 func (future *PrivateEndpointConnectionPutFuture) result(client PrivateEndpointConnectionClient) (pecr PrivateEndpointConnectionResource, err error) {
17216 var done bool
17217 done, err = future.DoneWithContext(context.Background(), client)
17218 if err != nil {
17219 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionPutFuture", "Result", future.Response(), "Polling failure")
17220 return
17221 }
17222 if !done {
17223 pecr.Response.Response = future.Response()
17224 err = azure.NewAsyncOpIncompleteError("backup.PrivateEndpointConnectionPutFuture")
17225 return
17226 }
17227 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17228 if pecr.Response.Response, err = future.GetResult(sender); err == nil && pecr.Response.Response.StatusCode != http.StatusNoContent {
17229 pecr, err = client.PutResponder(pecr.Response.Response)
17230 if err != nil {
17231 err = autorest.NewErrorWithError(err, "backup.PrivateEndpointConnectionPutFuture", "Result", pecr.Response.Response, "Failure responding to request")
17232 }
17233 }
17234 return
17235 }
17236
17237
17238 type PrivateEndpointConnectionResource struct {
17239 autorest.Response `json:"-"`
17240
17241 Properties *PrivateEndpointConnection `json:"properties,omitempty"`
17242
17243 ID *string `json:"id,omitempty"`
17244
17245 Name *string `json:"name,omitempty"`
17246
17247 Type *string `json:"type,omitempty"`
17248
17249 Location *string `json:"location,omitempty"`
17250
17251 Tags map[string]*string `json:"tags"`
17252
17253 ETag *string `json:"eTag,omitempty"`
17254 }
17255
17256
17257 func (pecr PrivateEndpointConnectionResource) MarshalJSON() ([]byte, error) {
17258 objectMap := make(map[string]interface{})
17259 if pecr.Properties != nil {
17260 objectMap["properties"] = pecr.Properties
17261 }
17262 if pecr.Location != nil {
17263 objectMap["location"] = pecr.Location
17264 }
17265 if pecr.Tags != nil {
17266 objectMap["tags"] = pecr.Tags
17267 }
17268 if pecr.ETag != nil {
17269 objectMap["eTag"] = pecr.ETag
17270 }
17271 return json.Marshal(objectMap)
17272 }
17273
17274
17275 type PrivateLinkServiceConnectionState struct {
17276
17277 Status PrivateEndpointConnectionStatus `json:"status,omitempty"`
17278
17279 Description *string `json:"description,omitempty"`
17280
17281 ActionRequired *string `json:"actionRequired,omitempty"`
17282 }
17283
17284
17285 type BasicProtectableContainer interface {
17286 AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool)
17287 AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool)
17288 AsProtectableContainer() (*ProtectableContainer, bool)
17289 }
17290
17291
17292 type ProtectableContainer struct {
17293
17294 FriendlyName *string `json:"friendlyName,omitempty"`
17295
17296 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17297
17298 HealthStatus *string `json:"healthStatus,omitempty"`
17299
17300 ContainerID *string `json:"containerId,omitempty"`
17301
17302 ProtectableContainerType ProtectableContainerType `json:"protectableContainerType,omitempty"`
17303 }
17304
17305 func unmarshalBasicProtectableContainer(body []byte) (BasicProtectableContainer, error) {
17306 var m map[string]interface{}
17307 err := json.Unmarshal(body, &m)
17308 if err != nil {
17309 return nil, err
17310 }
17311
17312 switch m["protectableContainerType"] {
17313 case string(ProtectableContainerTypeStorageContainer):
17314 var aspc AzureStorageProtectableContainer
17315 err := json.Unmarshal(body, &aspc)
17316 return aspc, err
17317 case string(ProtectableContainerTypeVMAppContainer):
17318 var avacpc AzureVMAppContainerProtectableContainer
17319 err := json.Unmarshal(body, &avacpc)
17320 return avacpc, err
17321 default:
17322 var pc ProtectableContainer
17323 err := json.Unmarshal(body, &pc)
17324 return pc, err
17325 }
17326 }
17327 func unmarshalBasicProtectableContainerArray(body []byte) ([]BasicProtectableContainer, error) {
17328 var rawMessages []*json.RawMessage
17329 err := json.Unmarshal(body, &rawMessages)
17330 if err != nil {
17331 return nil, err
17332 }
17333
17334 pcArray := make([]BasicProtectableContainer, len(rawMessages))
17335
17336 for index, rawMessage := range rawMessages {
17337 pc, err := unmarshalBasicProtectableContainer(*rawMessage)
17338 if err != nil {
17339 return nil, err
17340 }
17341 pcArray[index] = pc
17342 }
17343 return pcArray, nil
17344 }
17345
17346
17347 func (pc ProtectableContainer) MarshalJSON() ([]byte, error) {
17348 pc.ProtectableContainerType = ProtectableContainerTypeProtectableContainer
17349 objectMap := make(map[string]interface{})
17350 if pc.FriendlyName != nil {
17351 objectMap["friendlyName"] = pc.FriendlyName
17352 }
17353 if pc.BackupManagementType != "" {
17354 objectMap["backupManagementType"] = pc.BackupManagementType
17355 }
17356 if pc.HealthStatus != nil {
17357 objectMap["healthStatus"] = pc.HealthStatus
17358 }
17359 if pc.ContainerID != nil {
17360 objectMap["containerId"] = pc.ContainerID
17361 }
17362 if pc.ProtectableContainerType != "" {
17363 objectMap["protectableContainerType"] = pc.ProtectableContainerType
17364 }
17365 return json.Marshal(objectMap)
17366 }
17367
17368
17369 func (pc ProtectableContainer) AsAzureStorageProtectableContainer() (*AzureStorageProtectableContainer, bool) {
17370 return nil, false
17371 }
17372
17373
17374 func (pc ProtectableContainer) AsAzureVMAppContainerProtectableContainer() (*AzureVMAppContainerProtectableContainer, bool) {
17375 return nil, false
17376 }
17377
17378
17379 func (pc ProtectableContainer) AsProtectableContainer() (*ProtectableContainer, bool) {
17380 return &pc, true
17381 }
17382
17383
17384 func (pc ProtectableContainer) AsBasicProtectableContainer() (BasicProtectableContainer, bool) {
17385 return &pc, true
17386 }
17387
17388
17389 type ProtectableContainerResource struct {
17390
17391 Properties BasicProtectableContainer `json:"properties,omitempty"`
17392
17393 ID *string `json:"id,omitempty"`
17394
17395 Name *string `json:"name,omitempty"`
17396
17397 Type *string `json:"type,omitempty"`
17398
17399 Location *string `json:"location,omitempty"`
17400
17401 Tags map[string]*string `json:"tags"`
17402
17403 ETag *string `json:"eTag,omitempty"`
17404 }
17405
17406
17407 func (pcr ProtectableContainerResource) MarshalJSON() ([]byte, error) {
17408 objectMap := make(map[string]interface{})
17409 objectMap["properties"] = pcr.Properties
17410 if pcr.Location != nil {
17411 objectMap["location"] = pcr.Location
17412 }
17413 if pcr.Tags != nil {
17414 objectMap["tags"] = pcr.Tags
17415 }
17416 if pcr.ETag != nil {
17417 objectMap["eTag"] = pcr.ETag
17418 }
17419 return json.Marshal(objectMap)
17420 }
17421
17422
17423 func (pcr *ProtectableContainerResource) UnmarshalJSON(body []byte) error {
17424 var m map[string]*json.RawMessage
17425 err := json.Unmarshal(body, &m)
17426 if err != nil {
17427 return err
17428 }
17429 for k, v := range m {
17430 switch k {
17431 case "properties":
17432 if v != nil {
17433 properties, err := unmarshalBasicProtectableContainer(*v)
17434 if err != nil {
17435 return err
17436 }
17437 pcr.Properties = properties
17438 }
17439 case "id":
17440 if v != nil {
17441 var ID string
17442 err = json.Unmarshal(*v, &ID)
17443 if err != nil {
17444 return err
17445 }
17446 pcr.ID = &ID
17447 }
17448 case "name":
17449 if v != nil {
17450 var name string
17451 err = json.Unmarshal(*v, &name)
17452 if err != nil {
17453 return err
17454 }
17455 pcr.Name = &name
17456 }
17457 case "type":
17458 if v != nil {
17459 var typeVar string
17460 err = json.Unmarshal(*v, &typeVar)
17461 if err != nil {
17462 return err
17463 }
17464 pcr.Type = &typeVar
17465 }
17466 case "location":
17467 if v != nil {
17468 var location string
17469 err = json.Unmarshal(*v, &location)
17470 if err != nil {
17471 return err
17472 }
17473 pcr.Location = &location
17474 }
17475 case "tags":
17476 if v != nil {
17477 var tags map[string]*string
17478 err = json.Unmarshal(*v, &tags)
17479 if err != nil {
17480 return err
17481 }
17482 pcr.Tags = tags
17483 }
17484 case "eTag":
17485 if v != nil {
17486 var eTag string
17487 err = json.Unmarshal(*v, &eTag)
17488 if err != nil {
17489 return err
17490 }
17491 pcr.ETag = &eTag
17492 }
17493 }
17494 }
17495
17496 return nil
17497 }
17498
17499
17500 type ProtectableContainerResourceList struct {
17501 autorest.Response `json:"-"`
17502
17503 Value *[]ProtectableContainerResource `json:"value,omitempty"`
17504
17505 NextLink *string `json:"nextLink,omitempty"`
17506 }
17507
17508
17509
17510 type ProtectableContainerResourceListIterator struct {
17511 i int
17512 page ProtectableContainerResourceListPage
17513 }
17514
17515
17516
17517 func (iter *ProtectableContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
17518 if tracing.IsEnabled() {
17519 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListIterator.NextWithContext")
17520 defer func() {
17521 sc := -1
17522 if iter.Response().Response.Response != nil {
17523 sc = iter.Response().Response.Response.StatusCode
17524 }
17525 tracing.EndSpan(ctx, sc, err)
17526 }()
17527 }
17528 iter.i++
17529 if iter.i < len(iter.page.Values()) {
17530 return nil
17531 }
17532 err = iter.page.NextWithContext(ctx)
17533 if err != nil {
17534 iter.i--
17535 return err
17536 }
17537 iter.i = 0
17538 return nil
17539 }
17540
17541
17542
17543
17544 func (iter *ProtectableContainerResourceListIterator) Next() error {
17545 return iter.NextWithContext(context.Background())
17546 }
17547
17548
17549 func (iter ProtectableContainerResourceListIterator) NotDone() bool {
17550 return iter.page.NotDone() && iter.i < len(iter.page.Values())
17551 }
17552
17553
17554 func (iter ProtectableContainerResourceListIterator) Response() ProtectableContainerResourceList {
17555 return iter.page.Response()
17556 }
17557
17558
17559
17560 func (iter ProtectableContainerResourceListIterator) Value() ProtectableContainerResource {
17561 if !iter.page.NotDone() {
17562 return ProtectableContainerResource{}
17563 }
17564 return iter.page.Values()[iter.i]
17565 }
17566
17567
17568 func NewProtectableContainerResourceListIterator(page ProtectableContainerResourceListPage) ProtectableContainerResourceListIterator {
17569 return ProtectableContainerResourceListIterator{page: page}
17570 }
17571
17572
17573 func (pcrl ProtectableContainerResourceList) IsEmpty() bool {
17574 return pcrl.Value == nil || len(*pcrl.Value) == 0
17575 }
17576
17577
17578 func (pcrl ProtectableContainerResourceList) hasNextLink() bool {
17579 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
17580 }
17581
17582
17583
17584 func (pcrl ProtectableContainerResourceList) protectableContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
17585 if !pcrl.hasNextLink() {
17586 return nil, nil
17587 }
17588 return autorest.Prepare((&http.Request{}).WithContext(ctx),
17589 autorest.AsJSON(),
17590 autorest.AsGet(),
17591 autorest.WithBaseURL(to.String(pcrl.NextLink)))
17592 }
17593
17594
17595 type ProtectableContainerResourceListPage struct {
17596 fn func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)
17597 pcrl ProtectableContainerResourceList
17598 }
17599
17600
17601
17602 func (page *ProtectableContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
17603 if tracing.IsEnabled() {
17604 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectableContainerResourceListPage.NextWithContext")
17605 defer func() {
17606 sc := -1
17607 if page.Response().Response.Response != nil {
17608 sc = page.Response().Response.Response.StatusCode
17609 }
17610 tracing.EndSpan(ctx, sc, err)
17611 }()
17612 }
17613 for {
17614 next, err := page.fn(ctx, page.pcrl)
17615 if err != nil {
17616 return err
17617 }
17618 page.pcrl = next
17619 if !next.hasNextLink() || !next.IsEmpty() {
17620 break
17621 }
17622 }
17623 return nil
17624 }
17625
17626
17627
17628
17629 func (page *ProtectableContainerResourceListPage) Next() error {
17630 return page.NextWithContext(context.Background())
17631 }
17632
17633
17634 func (page ProtectableContainerResourceListPage) NotDone() bool {
17635 return !page.pcrl.IsEmpty()
17636 }
17637
17638
17639 func (page ProtectableContainerResourceListPage) Response() ProtectableContainerResourceList {
17640 return page.pcrl
17641 }
17642
17643
17644 func (page ProtectableContainerResourceListPage) Values() []ProtectableContainerResource {
17645 if page.pcrl.IsEmpty() {
17646 return nil
17647 }
17648 return *page.pcrl.Value
17649 }
17650
17651
17652 func NewProtectableContainerResourceListPage(cur ProtectableContainerResourceList, getNextPage func(context.Context, ProtectableContainerResourceList) (ProtectableContainerResourceList, error)) ProtectableContainerResourceListPage {
17653 return ProtectableContainerResourceListPage{
17654 fn: getNextPage,
17655 pcrl: cur,
17656 }
17657 }
17658
17659
17660 type BasicProtectedItem interface {
17661 AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool)
17662 AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool)
17663 AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool)
17664 AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool)
17665 AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool)
17666 AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool)
17667 AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool)
17668 AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool)
17669 AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool)
17670 AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool)
17671 AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool)
17672 AsDPMProtectedItem() (*DPMProtectedItem, bool)
17673 AsGenericProtectedItem() (*GenericProtectedItem, bool)
17674 AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool)
17675 AsProtectedItem() (*ProtectedItem, bool)
17676 }
17677
17678
17679 type ProtectedItem struct {
17680
17681 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17682
17683 WorkloadType DataSourceType `json:"workloadType,omitempty"`
17684
17685 ContainerName *string `json:"containerName,omitempty"`
17686
17687 SourceResourceID *string `json:"sourceResourceId,omitempty"`
17688
17689 PolicyID *string `json:"policyId,omitempty"`
17690
17691 LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"`
17692
17693 BackupSetName *string `json:"backupSetName,omitempty"`
17694
17695 CreateMode CreateMode `json:"createMode,omitempty"`
17696
17697 DeferredDeleteTimeInUTC *date.Time `json:"deferredDeleteTimeInUTC,omitempty"`
17698
17699 IsScheduledForDeferredDelete *bool `json:"isScheduledForDeferredDelete,omitempty"`
17700
17701 DeferredDeleteTimeRemaining *string `json:"deferredDeleteTimeRemaining,omitempty"`
17702
17703 IsDeferredDeleteScheduleUpcoming *bool `json:"isDeferredDeleteScheduleUpcoming,omitempty"`
17704
17705 IsRehydrate *bool `json:"isRehydrate,omitempty"`
17706
17707 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
17708
17709 ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"`
17710 }
17711
17712 func unmarshalBasicProtectedItem(body []byte) (BasicProtectedItem, error) {
17713 var m map[string]interface{}
17714 err := json.Unmarshal(body, &m)
17715 if err != nil {
17716 return nil, err
17717 }
17718
17719 switch m["protectedItemType"] {
17720 case string(ProtectedItemTypeAzureFileShareProtectedItem):
17721 var afpi AzureFileshareProtectedItem
17722 err := json.Unmarshal(body, &afpi)
17723 return afpi, err
17724 case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines):
17725 var aisccvpi AzureIaaSClassicComputeVMProtectedItem
17726 err := json.Unmarshal(body, &aisccvpi)
17727 return aisccvpi, err
17728 case string(ProtectedItemTypeMicrosoftComputevirtualMachines):
17729 var aiscvpi AzureIaaSComputeVMProtectedItem
17730 err := json.Unmarshal(body, &aiscvpi)
17731 return aiscvpi, err
17732 case string(ProtectedItemTypeAzureIaaSVMProtectedItem):
17733 var aispi AzureIaaSVMProtectedItem
17734 err := json.Unmarshal(body, &aispi)
17735 return aispi, err
17736 case string(ProtectedItemTypeMicrosoftSqlserversdatabases):
17737 var aspi AzureSQLProtectedItem
17738 err := json.Unmarshal(body, &aspi)
17739 return aspi, err
17740 case string(ProtectedItemTypeAzureVMWorkloadProtectedItem):
17741 var avwpi AzureVMWorkloadProtectedItem
17742 err := json.Unmarshal(body, &avwpi)
17743 return avwpi, err
17744 case string(ProtectedItemTypeAzureVMWorkloadSAPAseDatabase):
17745 var avwsadpi AzureVMWorkloadSAPAseDatabaseProtectedItem
17746 err := json.Unmarshal(body, &avwsadpi)
17747 return avwsadpi, err
17748 case string(ProtectedItemTypeAzureVMWorkloadSAPHanaDatabase):
17749 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectedItem
17750 err := json.Unmarshal(body, &avwshdpi)
17751 return avwshdpi, err
17752 case string(ProtectedItemTypeAzureVMWorkloadSQLDatabase):
17753 var avwsdpi AzureVMWorkloadSQLDatabaseProtectedItem
17754 err := json.Unmarshal(body, &avwsdpi)
17755 return avwsdpi, err
17756 case string(ProtectedItemTypeDPMProtectedItem):
17757 var dpi DPMProtectedItem
17758 err := json.Unmarshal(body, &dpi)
17759 return dpi, err
17760 case string(ProtectedItemTypeGenericProtectedItem):
17761 var gpi GenericProtectedItem
17762 err := json.Unmarshal(body, &gpi)
17763 return gpi, err
17764 case string(ProtectedItemTypeMabFileFolderProtectedItem):
17765 var mffpi MabFileFolderProtectedItem
17766 err := json.Unmarshal(body, &mffpi)
17767 return mffpi, err
17768 default:
17769 var pi ProtectedItem
17770 err := json.Unmarshal(body, &pi)
17771 return pi, err
17772 }
17773 }
17774 func unmarshalBasicProtectedItemArray(body []byte) ([]BasicProtectedItem, error) {
17775 var rawMessages []*json.RawMessage
17776 err := json.Unmarshal(body, &rawMessages)
17777 if err != nil {
17778 return nil, err
17779 }
17780
17781 piArray := make([]BasicProtectedItem, len(rawMessages))
17782
17783 for index, rawMessage := range rawMessages {
17784 pi, err := unmarshalBasicProtectedItem(*rawMessage)
17785 if err != nil {
17786 return nil, err
17787 }
17788 piArray[index] = pi
17789 }
17790 return piArray, nil
17791 }
17792
17793
17794 func (pi ProtectedItem) MarshalJSON() ([]byte, error) {
17795 pi.ProtectedItemType = ProtectedItemTypeProtectedItem
17796 objectMap := make(map[string]interface{})
17797 if pi.BackupManagementType != "" {
17798 objectMap["backupManagementType"] = pi.BackupManagementType
17799 }
17800 if pi.WorkloadType != "" {
17801 objectMap["workloadType"] = pi.WorkloadType
17802 }
17803 if pi.ContainerName != nil {
17804 objectMap["containerName"] = pi.ContainerName
17805 }
17806 if pi.SourceResourceID != nil {
17807 objectMap["sourceResourceId"] = pi.SourceResourceID
17808 }
17809 if pi.PolicyID != nil {
17810 objectMap["policyId"] = pi.PolicyID
17811 }
17812 if pi.LastRecoveryPoint != nil {
17813 objectMap["lastRecoveryPoint"] = pi.LastRecoveryPoint
17814 }
17815 if pi.BackupSetName != nil {
17816 objectMap["backupSetName"] = pi.BackupSetName
17817 }
17818 if pi.CreateMode != "" {
17819 objectMap["createMode"] = pi.CreateMode
17820 }
17821 if pi.DeferredDeleteTimeInUTC != nil {
17822 objectMap["deferredDeleteTimeInUTC"] = pi.DeferredDeleteTimeInUTC
17823 }
17824 if pi.IsScheduledForDeferredDelete != nil {
17825 objectMap["isScheduledForDeferredDelete"] = pi.IsScheduledForDeferredDelete
17826 }
17827 if pi.DeferredDeleteTimeRemaining != nil {
17828 objectMap["deferredDeleteTimeRemaining"] = pi.DeferredDeleteTimeRemaining
17829 }
17830 if pi.IsDeferredDeleteScheduleUpcoming != nil {
17831 objectMap["isDeferredDeleteScheduleUpcoming"] = pi.IsDeferredDeleteScheduleUpcoming
17832 }
17833 if pi.IsRehydrate != nil {
17834 objectMap["isRehydrate"] = pi.IsRehydrate
17835 }
17836 if pi.ResourceGuardOperationRequests != nil {
17837 objectMap["resourceGuardOperationRequests"] = pi.ResourceGuardOperationRequests
17838 }
17839 if pi.ProtectedItemType != "" {
17840 objectMap["protectedItemType"] = pi.ProtectedItemType
17841 }
17842 return json.Marshal(objectMap)
17843 }
17844
17845
17846 func (pi ProtectedItem) AsAzureFileshareProtectedItem() (*AzureFileshareProtectedItem, bool) {
17847 return nil, false
17848 }
17849
17850
17851 func (pi ProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) {
17852 return nil, false
17853 }
17854
17855
17856 func (pi ProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) {
17857 return nil, false
17858 }
17859
17860
17861 func (pi ProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) {
17862 return nil, false
17863 }
17864
17865
17866 func (pi ProtectedItem) AsBasicAzureIaaSVMProtectedItem() (BasicAzureIaaSVMProtectedItem, bool) {
17867 return nil, false
17868 }
17869
17870
17871 func (pi ProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) {
17872 return nil, false
17873 }
17874
17875
17876 func (pi ProtectedItem) AsAzureVMWorkloadProtectedItem() (*AzureVMWorkloadProtectedItem, bool) {
17877 return nil, false
17878 }
17879
17880
17881 func (pi ProtectedItem) AsBasicAzureVMWorkloadProtectedItem() (BasicAzureVMWorkloadProtectedItem, bool) {
17882 return nil, false
17883 }
17884
17885
17886 func (pi ProtectedItem) AsAzureVMWorkloadSAPAseDatabaseProtectedItem() (*AzureVMWorkloadSAPAseDatabaseProtectedItem, bool) {
17887 return nil, false
17888 }
17889
17890
17891 func (pi ProtectedItem) AsAzureVMWorkloadSAPHanaDatabaseProtectedItem() (*AzureVMWorkloadSAPHanaDatabaseProtectedItem, bool) {
17892 return nil, false
17893 }
17894
17895
17896 func (pi ProtectedItem) AsAzureVMWorkloadSQLDatabaseProtectedItem() (*AzureVMWorkloadSQLDatabaseProtectedItem, bool) {
17897 return nil, false
17898 }
17899
17900
17901 func (pi ProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) {
17902 return nil, false
17903 }
17904
17905
17906 func (pi ProtectedItem) AsGenericProtectedItem() (*GenericProtectedItem, bool) {
17907 return nil, false
17908 }
17909
17910
17911 func (pi ProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) {
17912 return nil, false
17913 }
17914
17915
17916 func (pi ProtectedItem) AsProtectedItem() (*ProtectedItem, bool) {
17917 return &pi, true
17918 }
17919
17920
17921 func (pi ProtectedItem) AsBasicProtectedItem() (BasicProtectedItem, bool) {
17922 return &pi, true
17923 }
17924
17925
17926 type ProtectedItemQueryObject struct {
17927
17928 HealthState HealthState `json:"healthState,omitempty"`
17929
17930 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
17931
17932 ItemType DataSourceType `json:"itemType,omitempty"`
17933
17934 PolicyName *string `json:"policyName,omitempty"`
17935
17936 ContainerName *string `json:"containerName,omitempty"`
17937
17938 BackupEngineName *string `json:"backupEngineName,omitempty"`
17939
17940 FriendlyName *string `json:"friendlyName,omitempty"`
17941
17942 FabricName *string `json:"fabricName,omitempty"`
17943
17944 BackupSetName *string `json:"backupSetName,omitempty"`
17945 }
17946
17947
17948 type ProtectedItemResource struct {
17949 autorest.Response `json:"-"`
17950
17951 Properties BasicProtectedItem `json:"properties,omitempty"`
17952
17953 ID *string `json:"id,omitempty"`
17954
17955 Name *string `json:"name,omitempty"`
17956
17957 Type *string `json:"type,omitempty"`
17958
17959 Location *string `json:"location,omitempty"`
17960
17961 Tags map[string]*string `json:"tags"`
17962
17963 ETag *string `json:"eTag,omitempty"`
17964 }
17965
17966
17967 func (pir ProtectedItemResource) MarshalJSON() ([]byte, error) {
17968 objectMap := make(map[string]interface{})
17969 objectMap["properties"] = pir.Properties
17970 if pir.Location != nil {
17971 objectMap["location"] = pir.Location
17972 }
17973 if pir.Tags != nil {
17974 objectMap["tags"] = pir.Tags
17975 }
17976 if pir.ETag != nil {
17977 objectMap["eTag"] = pir.ETag
17978 }
17979 return json.Marshal(objectMap)
17980 }
17981
17982
17983 func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error {
17984 var m map[string]*json.RawMessage
17985 err := json.Unmarshal(body, &m)
17986 if err != nil {
17987 return err
17988 }
17989 for k, v := range m {
17990 switch k {
17991 case "properties":
17992 if v != nil {
17993 properties, err := unmarshalBasicProtectedItem(*v)
17994 if err != nil {
17995 return err
17996 }
17997 pir.Properties = properties
17998 }
17999 case "id":
18000 if v != nil {
18001 var ID string
18002 err = json.Unmarshal(*v, &ID)
18003 if err != nil {
18004 return err
18005 }
18006 pir.ID = &ID
18007 }
18008 case "name":
18009 if v != nil {
18010 var name string
18011 err = json.Unmarshal(*v, &name)
18012 if err != nil {
18013 return err
18014 }
18015 pir.Name = &name
18016 }
18017 case "type":
18018 if v != nil {
18019 var typeVar string
18020 err = json.Unmarshal(*v, &typeVar)
18021 if err != nil {
18022 return err
18023 }
18024 pir.Type = &typeVar
18025 }
18026 case "location":
18027 if v != nil {
18028 var location string
18029 err = json.Unmarshal(*v, &location)
18030 if err != nil {
18031 return err
18032 }
18033 pir.Location = &location
18034 }
18035 case "tags":
18036 if v != nil {
18037 var tags map[string]*string
18038 err = json.Unmarshal(*v, &tags)
18039 if err != nil {
18040 return err
18041 }
18042 pir.Tags = tags
18043 }
18044 case "eTag":
18045 if v != nil {
18046 var eTag string
18047 err = json.Unmarshal(*v, &eTag)
18048 if err != nil {
18049 return err
18050 }
18051 pir.ETag = &eTag
18052 }
18053 }
18054 }
18055
18056 return nil
18057 }
18058
18059
18060 type ProtectedItemResourceList struct {
18061 autorest.Response `json:"-"`
18062
18063 Value *[]ProtectedItemResource `json:"value,omitempty"`
18064
18065 NextLink *string `json:"nextLink,omitempty"`
18066 }
18067
18068
18069 type ProtectedItemResourceListIterator struct {
18070 i int
18071 page ProtectedItemResourceListPage
18072 }
18073
18074
18075
18076 func (iter *ProtectedItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18077 if tracing.IsEnabled() {
18078 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListIterator.NextWithContext")
18079 defer func() {
18080 sc := -1
18081 if iter.Response().Response.Response != nil {
18082 sc = iter.Response().Response.Response.StatusCode
18083 }
18084 tracing.EndSpan(ctx, sc, err)
18085 }()
18086 }
18087 iter.i++
18088 if iter.i < len(iter.page.Values()) {
18089 return nil
18090 }
18091 err = iter.page.NextWithContext(ctx)
18092 if err != nil {
18093 iter.i--
18094 return err
18095 }
18096 iter.i = 0
18097 return nil
18098 }
18099
18100
18101
18102
18103 func (iter *ProtectedItemResourceListIterator) Next() error {
18104 return iter.NextWithContext(context.Background())
18105 }
18106
18107
18108 func (iter ProtectedItemResourceListIterator) NotDone() bool {
18109 return iter.page.NotDone() && iter.i < len(iter.page.Values())
18110 }
18111
18112
18113 func (iter ProtectedItemResourceListIterator) Response() ProtectedItemResourceList {
18114 return iter.page.Response()
18115 }
18116
18117
18118
18119 func (iter ProtectedItemResourceListIterator) Value() ProtectedItemResource {
18120 if !iter.page.NotDone() {
18121 return ProtectedItemResource{}
18122 }
18123 return iter.page.Values()[iter.i]
18124 }
18125
18126
18127 func NewProtectedItemResourceListIterator(page ProtectedItemResourceListPage) ProtectedItemResourceListIterator {
18128 return ProtectedItemResourceListIterator{page: page}
18129 }
18130
18131
18132 func (pirl ProtectedItemResourceList) IsEmpty() bool {
18133 return pirl.Value == nil || len(*pirl.Value) == 0
18134 }
18135
18136
18137 func (pirl ProtectedItemResourceList) hasNextLink() bool {
18138 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
18139 }
18140
18141
18142
18143 func (pirl ProtectedItemResourceList) protectedItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
18144 if !pirl.hasNextLink() {
18145 return nil, nil
18146 }
18147 return autorest.Prepare((&http.Request{}).WithContext(ctx),
18148 autorest.AsJSON(),
18149 autorest.AsGet(),
18150 autorest.WithBaseURL(to.String(pirl.NextLink)))
18151 }
18152
18153
18154 type ProtectedItemResourceListPage struct {
18155 fn func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)
18156 pirl ProtectedItemResourceList
18157 }
18158
18159
18160
18161 func (page *ProtectedItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
18162 if tracing.IsEnabled() {
18163 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectedItemResourceListPage.NextWithContext")
18164 defer func() {
18165 sc := -1
18166 if page.Response().Response.Response != nil {
18167 sc = page.Response().Response.Response.StatusCode
18168 }
18169 tracing.EndSpan(ctx, sc, err)
18170 }()
18171 }
18172 for {
18173 next, err := page.fn(ctx, page.pirl)
18174 if err != nil {
18175 return err
18176 }
18177 page.pirl = next
18178 if !next.hasNextLink() || !next.IsEmpty() {
18179 break
18180 }
18181 }
18182 return nil
18183 }
18184
18185
18186
18187
18188 func (page *ProtectedItemResourceListPage) Next() error {
18189 return page.NextWithContext(context.Background())
18190 }
18191
18192
18193 func (page ProtectedItemResourceListPage) NotDone() bool {
18194 return !page.pirl.IsEmpty()
18195 }
18196
18197
18198 func (page ProtectedItemResourceListPage) Response() ProtectedItemResourceList {
18199 return page.pirl
18200 }
18201
18202
18203 func (page ProtectedItemResourceListPage) Values() []ProtectedItemResource {
18204 if page.pirl.IsEmpty() {
18205 return nil
18206 }
18207 return *page.pirl.Value
18208 }
18209
18210
18211 func NewProtectedItemResourceListPage(cur ProtectedItemResourceList, getNextPage func(context.Context, ProtectedItemResourceList) (ProtectedItemResourceList, error)) ProtectedItemResourceListPage {
18212 return ProtectedItemResourceListPage{
18213 fn: getNextPage,
18214 pirl: cur,
18215 }
18216 }
18217
18218
18219
18220 type BasicProtectionContainer interface {
18221 AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool)
18222 AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool)
18223 AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool)
18224 AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool)
18225 AsAzureSQLContainer() (*AzureSQLContainer, bool)
18226 AsAzureStorageContainer() (*AzureStorageContainer, bool)
18227 AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool)
18228 AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool)
18229 AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool)
18230 AsDpmContainer() (*DpmContainer, bool)
18231 AsBasicDpmContainer() (BasicDpmContainer, bool)
18232 AsGenericContainer() (*GenericContainer, bool)
18233 AsIaaSVMContainer() (*IaaSVMContainer, bool)
18234 AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool)
18235 AsMabContainer() (*MabContainer, bool)
18236 AsProtectionContainer() (*ProtectionContainer, bool)
18237 }
18238
18239
18240
18241 type ProtectionContainer struct {
18242
18243 FriendlyName *string `json:"friendlyName,omitempty"`
18244
18245 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18246
18247 RegistrationStatus *string `json:"registrationStatus,omitempty"`
18248
18249 HealthStatus *string `json:"healthStatus,omitempty"`
18250
18251 ContainerType ContainerTypeBasicProtectionContainer `json:"containerType,omitempty"`
18252 }
18253
18254 func unmarshalBasicProtectionContainer(body []byte) (BasicProtectionContainer, error) {
18255 var m map[string]interface{}
18256 err := json.Unmarshal(body, &m)
18257 if err != nil {
18258 return nil, err
18259 }
18260
18261 switch m["containerType"] {
18262 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureBackupServerContainer):
18263 var absc AzureBackupServerContainer
18264 err := json.Unmarshal(body, &absc)
18265 return absc, err
18266 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftClassicComputevirtualMachines):
18267 var aisccvc AzureIaaSClassicComputeVMContainer
18268 err := json.Unmarshal(body, &aisccvc)
18269 return aisccvc, err
18270 case string(ContainerTypeBasicProtectionContainerContainerTypeMicrosoftComputevirtualMachines):
18271 var aiscvc AzureIaaSComputeVMContainer
18272 err := json.Unmarshal(body, &aiscvc)
18273 return aiscvc, err
18274 case string(ContainerTypeBasicProtectionContainerContainerTypeSQLAGWorkLoadContainer):
18275 var aswcpc AzureSQLAGWorkloadContainerProtectionContainer
18276 err := json.Unmarshal(body, &aswcpc)
18277 return aswcpc, err
18278 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureSQLContainer):
18279 var asc AzureSQLContainer
18280 err := json.Unmarshal(body, &asc)
18281 return asc, err
18282 case string(ContainerTypeBasicProtectionContainerContainerTypeStorageContainer):
18283 var asc AzureStorageContainer
18284 err := json.Unmarshal(body, &asc)
18285 return asc, err
18286 case string(ContainerTypeBasicProtectionContainerContainerTypeVMAppContainer):
18287 var avacpc AzureVMAppContainerProtectionContainer
18288 err := json.Unmarshal(body, &avacpc)
18289 return avacpc, err
18290 case string(ContainerTypeBasicProtectionContainerContainerTypeAzureWorkloadContainer):
18291 var awc AzureWorkloadContainer
18292 err := json.Unmarshal(body, &awc)
18293 return awc, err
18294 case string(ContainerTypeBasicProtectionContainerContainerTypeDPMContainer):
18295 var dc DpmContainer
18296 err := json.Unmarshal(body, &dc)
18297 return dc, err
18298 case string(ContainerTypeBasicProtectionContainerContainerTypeGenericContainer):
18299 var gc GenericContainer
18300 err := json.Unmarshal(body, &gc)
18301 return gc, err
18302 case string(ContainerTypeBasicProtectionContainerContainerTypeIaaSVMContainer):
18303 var isc IaaSVMContainer
18304 err := json.Unmarshal(body, &isc)
18305 return isc, err
18306 case string(ContainerTypeBasicProtectionContainerContainerTypeWindows):
18307 var mc MabContainer
18308 err := json.Unmarshal(body, &mc)
18309 return mc, err
18310 default:
18311 var pc ProtectionContainer
18312 err := json.Unmarshal(body, &pc)
18313 return pc, err
18314 }
18315 }
18316 func unmarshalBasicProtectionContainerArray(body []byte) ([]BasicProtectionContainer, error) {
18317 var rawMessages []*json.RawMessage
18318 err := json.Unmarshal(body, &rawMessages)
18319 if err != nil {
18320 return nil, err
18321 }
18322
18323 pcArray := make([]BasicProtectionContainer, len(rawMessages))
18324
18325 for index, rawMessage := range rawMessages {
18326 pc, err := unmarshalBasicProtectionContainer(*rawMessage)
18327 if err != nil {
18328 return nil, err
18329 }
18330 pcArray[index] = pc
18331 }
18332 return pcArray, nil
18333 }
18334
18335
18336 func (pc ProtectionContainer) MarshalJSON() ([]byte, error) {
18337 pc.ContainerType = ContainerTypeBasicProtectionContainerContainerTypeProtectionContainer
18338 objectMap := make(map[string]interface{})
18339 if pc.FriendlyName != nil {
18340 objectMap["friendlyName"] = pc.FriendlyName
18341 }
18342 if pc.BackupManagementType != "" {
18343 objectMap["backupManagementType"] = pc.BackupManagementType
18344 }
18345 if pc.RegistrationStatus != nil {
18346 objectMap["registrationStatus"] = pc.RegistrationStatus
18347 }
18348 if pc.HealthStatus != nil {
18349 objectMap["healthStatus"] = pc.HealthStatus
18350 }
18351 if pc.ContainerType != "" {
18352 objectMap["containerType"] = pc.ContainerType
18353 }
18354 return json.Marshal(objectMap)
18355 }
18356
18357
18358 func (pc ProtectionContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) {
18359 return nil, false
18360 }
18361
18362
18363 func (pc ProtectionContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) {
18364 return nil, false
18365 }
18366
18367
18368 func (pc ProtectionContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) {
18369 return nil, false
18370 }
18371
18372
18373 func (pc ProtectionContainer) AsAzureSQLAGWorkloadContainerProtectionContainer() (*AzureSQLAGWorkloadContainerProtectionContainer, bool) {
18374 return nil, false
18375 }
18376
18377
18378 func (pc ProtectionContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) {
18379 return nil, false
18380 }
18381
18382
18383 func (pc ProtectionContainer) AsAzureStorageContainer() (*AzureStorageContainer, bool) {
18384 return nil, false
18385 }
18386
18387
18388 func (pc ProtectionContainer) AsAzureVMAppContainerProtectionContainer() (*AzureVMAppContainerProtectionContainer, bool) {
18389 return nil, false
18390 }
18391
18392
18393 func (pc ProtectionContainer) AsAzureWorkloadContainer() (*AzureWorkloadContainer, bool) {
18394 return nil, false
18395 }
18396
18397
18398 func (pc ProtectionContainer) AsBasicAzureWorkloadContainer() (BasicAzureWorkloadContainer, bool) {
18399 return nil, false
18400 }
18401
18402
18403 func (pc ProtectionContainer) AsDpmContainer() (*DpmContainer, bool) {
18404 return nil, false
18405 }
18406
18407
18408 func (pc ProtectionContainer) AsBasicDpmContainer() (BasicDpmContainer, bool) {
18409 return nil, false
18410 }
18411
18412
18413 func (pc ProtectionContainer) AsGenericContainer() (*GenericContainer, bool) {
18414 return nil, false
18415 }
18416
18417
18418 func (pc ProtectionContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) {
18419 return nil, false
18420 }
18421
18422
18423 func (pc ProtectionContainer) AsBasicIaaSVMContainer() (BasicIaaSVMContainer, bool) {
18424 return nil, false
18425 }
18426
18427
18428 func (pc ProtectionContainer) AsMabContainer() (*MabContainer, bool) {
18429 return nil, false
18430 }
18431
18432
18433 func (pc ProtectionContainer) AsProtectionContainer() (*ProtectionContainer, bool) {
18434 return &pc, true
18435 }
18436
18437
18438 func (pc ProtectionContainer) AsBasicProtectionContainer() (BasicProtectionContainer, bool) {
18439 return &pc, true
18440 }
18441
18442
18443
18444 type ProtectionContainerResource struct {
18445 autorest.Response `json:"-"`
18446
18447 Properties BasicProtectionContainer `json:"properties,omitempty"`
18448
18449 ID *string `json:"id,omitempty"`
18450
18451 Name *string `json:"name,omitempty"`
18452
18453 Type *string `json:"type,omitempty"`
18454
18455 Location *string `json:"location,omitempty"`
18456
18457 Tags map[string]*string `json:"tags"`
18458
18459 ETag *string `json:"eTag,omitempty"`
18460 }
18461
18462
18463 func (pcr ProtectionContainerResource) MarshalJSON() ([]byte, error) {
18464 objectMap := make(map[string]interface{})
18465 objectMap["properties"] = pcr.Properties
18466 if pcr.Location != nil {
18467 objectMap["location"] = pcr.Location
18468 }
18469 if pcr.Tags != nil {
18470 objectMap["tags"] = pcr.Tags
18471 }
18472 if pcr.ETag != nil {
18473 objectMap["eTag"] = pcr.ETag
18474 }
18475 return json.Marshal(objectMap)
18476 }
18477
18478
18479 func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error {
18480 var m map[string]*json.RawMessage
18481 err := json.Unmarshal(body, &m)
18482 if err != nil {
18483 return err
18484 }
18485 for k, v := range m {
18486 switch k {
18487 case "properties":
18488 if v != nil {
18489 properties, err := unmarshalBasicProtectionContainer(*v)
18490 if err != nil {
18491 return err
18492 }
18493 pcr.Properties = properties
18494 }
18495 case "id":
18496 if v != nil {
18497 var ID string
18498 err = json.Unmarshal(*v, &ID)
18499 if err != nil {
18500 return err
18501 }
18502 pcr.ID = &ID
18503 }
18504 case "name":
18505 if v != nil {
18506 var name string
18507 err = json.Unmarshal(*v, &name)
18508 if err != nil {
18509 return err
18510 }
18511 pcr.Name = &name
18512 }
18513 case "type":
18514 if v != nil {
18515 var typeVar string
18516 err = json.Unmarshal(*v, &typeVar)
18517 if err != nil {
18518 return err
18519 }
18520 pcr.Type = &typeVar
18521 }
18522 case "location":
18523 if v != nil {
18524 var location string
18525 err = json.Unmarshal(*v, &location)
18526 if err != nil {
18527 return err
18528 }
18529 pcr.Location = &location
18530 }
18531 case "tags":
18532 if v != nil {
18533 var tags map[string]*string
18534 err = json.Unmarshal(*v, &tags)
18535 if err != nil {
18536 return err
18537 }
18538 pcr.Tags = tags
18539 }
18540 case "eTag":
18541 if v != nil {
18542 var eTag string
18543 err = json.Unmarshal(*v, &eTag)
18544 if err != nil {
18545 return err
18546 }
18547 pcr.ETag = &eTag
18548 }
18549 }
18550 }
18551
18552 return nil
18553 }
18554
18555
18556 type ProtectionContainerResourceList struct {
18557 autorest.Response `json:"-"`
18558
18559 Value *[]ProtectionContainerResource `json:"value,omitempty"`
18560
18561 NextLink *string `json:"nextLink,omitempty"`
18562 }
18563
18564
18565
18566 type ProtectionContainerResourceListIterator struct {
18567 i int
18568 page ProtectionContainerResourceListPage
18569 }
18570
18571
18572
18573 func (iter *ProtectionContainerResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18574 if tracing.IsEnabled() {
18575 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListIterator.NextWithContext")
18576 defer func() {
18577 sc := -1
18578 if iter.Response().Response.Response != nil {
18579 sc = iter.Response().Response.Response.StatusCode
18580 }
18581 tracing.EndSpan(ctx, sc, err)
18582 }()
18583 }
18584 iter.i++
18585 if iter.i < len(iter.page.Values()) {
18586 return nil
18587 }
18588 err = iter.page.NextWithContext(ctx)
18589 if err != nil {
18590 iter.i--
18591 return err
18592 }
18593 iter.i = 0
18594 return nil
18595 }
18596
18597
18598
18599
18600 func (iter *ProtectionContainerResourceListIterator) Next() error {
18601 return iter.NextWithContext(context.Background())
18602 }
18603
18604
18605 func (iter ProtectionContainerResourceListIterator) NotDone() bool {
18606 return iter.page.NotDone() && iter.i < len(iter.page.Values())
18607 }
18608
18609
18610 func (iter ProtectionContainerResourceListIterator) Response() ProtectionContainerResourceList {
18611 return iter.page.Response()
18612 }
18613
18614
18615
18616 func (iter ProtectionContainerResourceListIterator) Value() ProtectionContainerResource {
18617 if !iter.page.NotDone() {
18618 return ProtectionContainerResource{}
18619 }
18620 return iter.page.Values()[iter.i]
18621 }
18622
18623
18624 func NewProtectionContainerResourceListIterator(page ProtectionContainerResourceListPage) ProtectionContainerResourceListIterator {
18625 return ProtectionContainerResourceListIterator{page: page}
18626 }
18627
18628
18629 func (pcrl ProtectionContainerResourceList) IsEmpty() bool {
18630 return pcrl.Value == nil || len(*pcrl.Value) == 0
18631 }
18632
18633
18634 func (pcrl ProtectionContainerResourceList) hasNextLink() bool {
18635 return pcrl.NextLink != nil && len(*pcrl.NextLink) != 0
18636 }
18637
18638
18639
18640 func (pcrl ProtectionContainerResourceList) protectionContainerResourceListPreparer(ctx context.Context) (*http.Request, error) {
18641 if !pcrl.hasNextLink() {
18642 return nil, nil
18643 }
18644 return autorest.Prepare((&http.Request{}).WithContext(ctx),
18645 autorest.AsJSON(),
18646 autorest.AsGet(),
18647 autorest.WithBaseURL(to.String(pcrl.NextLink)))
18648 }
18649
18650
18651 type ProtectionContainerResourceListPage struct {
18652 fn func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)
18653 pcrl ProtectionContainerResourceList
18654 }
18655
18656
18657
18658 func (page *ProtectionContainerResourceListPage) NextWithContext(ctx context.Context) (err error) {
18659 if tracing.IsEnabled() {
18660 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionContainerResourceListPage.NextWithContext")
18661 defer func() {
18662 sc := -1
18663 if page.Response().Response.Response != nil {
18664 sc = page.Response().Response.Response.StatusCode
18665 }
18666 tracing.EndSpan(ctx, sc, err)
18667 }()
18668 }
18669 for {
18670 next, err := page.fn(ctx, page.pcrl)
18671 if err != nil {
18672 return err
18673 }
18674 page.pcrl = next
18675 if !next.hasNextLink() || !next.IsEmpty() {
18676 break
18677 }
18678 }
18679 return nil
18680 }
18681
18682
18683
18684
18685 func (page *ProtectionContainerResourceListPage) Next() error {
18686 return page.NextWithContext(context.Background())
18687 }
18688
18689
18690 func (page ProtectionContainerResourceListPage) NotDone() bool {
18691 return !page.pcrl.IsEmpty()
18692 }
18693
18694
18695 func (page ProtectionContainerResourceListPage) Response() ProtectionContainerResourceList {
18696 return page.pcrl
18697 }
18698
18699
18700 func (page ProtectionContainerResourceListPage) Values() []ProtectionContainerResource {
18701 if page.pcrl.IsEmpty() {
18702 return nil
18703 }
18704 return *page.pcrl.Value
18705 }
18706
18707
18708 func NewProtectionContainerResourceListPage(cur ProtectionContainerResourceList, getNextPage func(context.Context, ProtectionContainerResourceList) (ProtectionContainerResourceList, error)) ProtectionContainerResourceListPage {
18709 return ProtectionContainerResourceListPage{
18710 fn: getNextPage,
18711 pcrl: cur,
18712 }
18713 }
18714
18715
18716 type BasicProtectionIntent interface {
18717 AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool)
18718 AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool)
18719 AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool)
18720 AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool)
18721 AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool)
18722 AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool)
18723 AsProtectionIntent() (*ProtectionIntent, bool)
18724 }
18725
18726
18727 type ProtectionIntent struct {
18728
18729 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18730
18731 SourceResourceID *string `json:"sourceResourceId,omitempty"`
18732
18733 ItemID *string `json:"itemId,omitempty"`
18734
18735 PolicyID *string `json:"policyId,omitempty"`
18736
18737 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
18738
18739 ProtectionIntentItemType ProtectionIntentItemType `json:"protectionIntentItemType,omitempty"`
18740 }
18741
18742 func unmarshalBasicProtectionIntent(body []byte) (BasicProtectionIntent, error) {
18743 var m map[string]interface{}
18744 err := json.Unmarshal(body, &m)
18745 if err != nil {
18746 return nil, err
18747 }
18748
18749 switch m["protectionIntentItemType"] {
18750 case string(ProtectionIntentItemTypeRecoveryServiceVaultItem):
18751 var arsvpi AzureRecoveryServiceVaultProtectionIntent
18752 err := json.Unmarshal(body, &arsvpi)
18753 return arsvpi, err
18754 case string(ProtectionIntentItemTypeAzureResourceItem):
18755 var arpi AzureResourceProtectionIntent
18756 err := json.Unmarshal(body, &arpi)
18757 return arpi, err
18758 case string(ProtectionIntentItemTypeAzureWorkloadAutoProtectionIntent):
18759 var awapi AzureWorkloadAutoProtectionIntent
18760 err := json.Unmarshal(body, &awapi)
18761 return awapi, err
18762 case string(ProtectionIntentItemTypeAzureWorkloadSQLAutoProtectionIntent):
18763 var awsapi AzureWorkloadSQLAutoProtectionIntent
18764 err := json.Unmarshal(body, &awsapi)
18765 return awsapi, err
18766 default:
18767 var pi ProtectionIntent
18768 err := json.Unmarshal(body, &pi)
18769 return pi, err
18770 }
18771 }
18772 func unmarshalBasicProtectionIntentArray(body []byte) ([]BasicProtectionIntent, error) {
18773 var rawMessages []*json.RawMessage
18774 err := json.Unmarshal(body, &rawMessages)
18775 if err != nil {
18776 return nil, err
18777 }
18778
18779 piArray := make([]BasicProtectionIntent, len(rawMessages))
18780
18781 for index, rawMessage := range rawMessages {
18782 pi, err := unmarshalBasicProtectionIntent(*rawMessage)
18783 if err != nil {
18784 return nil, err
18785 }
18786 piArray[index] = pi
18787 }
18788 return piArray, nil
18789 }
18790
18791
18792 func (pi ProtectionIntent) MarshalJSON() ([]byte, error) {
18793 pi.ProtectionIntentItemType = ProtectionIntentItemTypeProtectionIntent
18794 objectMap := make(map[string]interface{})
18795 if pi.BackupManagementType != "" {
18796 objectMap["backupManagementType"] = pi.BackupManagementType
18797 }
18798 if pi.SourceResourceID != nil {
18799 objectMap["sourceResourceId"] = pi.SourceResourceID
18800 }
18801 if pi.ItemID != nil {
18802 objectMap["itemId"] = pi.ItemID
18803 }
18804 if pi.PolicyID != nil {
18805 objectMap["policyId"] = pi.PolicyID
18806 }
18807 if pi.ProtectionState != "" {
18808 objectMap["protectionState"] = pi.ProtectionState
18809 }
18810 if pi.ProtectionIntentItemType != "" {
18811 objectMap["protectionIntentItemType"] = pi.ProtectionIntentItemType
18812 }
18813 return json.Marshal(objectMap)
18814 }
18815
18816
18817 func (pi ProtectionIntent) AsAzureRecoveryServiceVaultProtectionIntent() (*AzureRecoveryServiceVaultProtectionIntent, bool) {
18818 return nil, false
18819 }
18820
18821
18822 func (pi ProtectionIntent) AsBasicAzureRecoveryServiceVaultProtectionIntent() (BasicAzureRecoveryServiceVaultProtectionIntent, bool) {
18823 return nil, false
18824 }
18825
18826
18827 func (pi ProtectionIntent) AsAzureResourceProtectionIntent() (*AzureResourceProtectionIntent, bool) {
18828 return nil, false
18829 }
18830
18831
18832 func (pi ProtectionIntent) AsAzureWorkloadAutoProtectionIntent() (*AzureWorkloadAutoProtectionIntent, bool) {
18833 return nil, false
18834 }
18835
18836
18837 func (pi ProtectionIntent) AsBasicAzureWorkloadAutoProtectionIntent() (BasicAzureWorkloadAutoProtectionIntent, bool) {
18838 return nil, false
18839 }
18840
18841
18842 func (pi ProtectionIntent) AsAzureWorkloadSQLAutoProtectionIntent() (*AzureWorkloadSQLAutoProtectionIntent, bool) {
18843 return nil, false
18844 }
18845
18846
18847 func (pi ProtectionIntent) AsProtectionIntent() (*ProtectionIntent, bool) {
18848 return &pi, true
18849 }
18850
18851
18852 func (pi ProtectionIntent) AsBasicProtectionIntent() (BasicProtectionIntent, bool) {
18853 return &pi, true
18854 }
18855
18856
18857 type ProtectionIntentQueryObject struct {
18858
18859 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
18860
18861 ItemType IntentItemType `json:"itemType,omitempty"`
18862
18863 ParentName *string `json:"parentName,omitempty"`
18864
18865 ItemName *string `json:"itemName,omitempty"`
18866 }
18867
18868
18869 type ProtectionIntentResource struct {
18870 autorest.Response `json:"-"`
18871
18872 Properties BasicProtectionIntent `json:"properties,omitempty"`
18873
18874 ID *string `json:"id,omitempty"`
18875
18876 Name *string `json:"name,omitempty"`
18877
18878 Type *string `json:"type,omitempty"`
18879
18880 Location *string `json:"location,omitempty"`
18881
18882 Tags map[string]*string `json:"tags"`
18883
18884 ETag *string `json:"eTag,omitempty"`
18885 }
18886
18887
18888 func (pir ProtectionIntentResource) MarshalJSON() ([]byte, error) {
18889 objectMap := make(map[string]interface{})
18890 objectMap["properties"] = pir.Properties
18891 if pir.Location != nil {
18892 objectMap["location"] = pir.Location
18893 }
18894 if pir.Tags != nil {
18895 objectMap["tags"] = pir.Tags
18896 }
18897 if pir.ETag != nil {
18898 objectMap["eTag"] = pir.ETag
18899 }
18900 return json.Marshal(objectMap)
18901 }
18902
18903
18904 func (pir *ProtectionIntentResource) UnmarshalJSON(body []byte) error {
18905 var m map[string]*json.RawMessage
18906 err := json.Unmarshal(body, &m)
18907 if err != nil {
18908 return err
18909 }
18910 for k, v := range m {
18911 switch k {
18912 case "properties":
18913 if v != nil {
18914 properties, err := unmarshalBasicProtectionIntent(*v)
18915 if err != nil {
18916 return err
18917 }
18918 pir.Properties = properties
18919 }
18920 case "id":
18921 if v != nil {
18922 var ID string
18923 err = json.Unmarshal(*v, &ID)
18924 if err != nil {
18925 return err
18926 }
18927 pir.ID = &ID
18928 }
18929 case "name":
18930 if v != nil {
18931 var name string
18932 err = json.Unmarshal(*v, &name)
18933 if err != nil {
18934 return err
18935 }
18936 pir.Name = &name
18937 }
18938 case "type":
18939 if v != nil {
18940 var typeVar string
18941 err = json.Unmarshal(*v, &typeVar)
18942 if err != nil {
18943 return err
18944 }
18945 pir.Type = &typeVar
18946 }
18947 case "location":
18948 if v != nil {
18949 var location string
18950 err = json.Unmarshal(*v, &location)
18951 if err != nil {
18952 return err
18953 }
18954 pir.Location = &location
18955 }
18956 case "tags":
18957 if v != nil {
18958 var tags map[string]*string
18959 err = json.Unmarshal(*v, &tags)
18960 if err != nil {
18961 return err
18962 }
18963 pir.Tags = tags
18964 }
18965 case "eTag":
18966 if v != nil {
18967 var eTag string
18968 err = json.Unmarshal(*v, &eTag)
18969 if err != nil {
18970 return err
18971 }
18972 pir.ETag = &eTag
18973 }
18974 }
18975 }
18976
18977 return nil
18978 }
18979
18980
18981 type ProtectionIntentResourceList struct {
18982 autorest.Response `json:"-"`
18983
18984 Value *[]ProtectionIntentResource `json:"value,omitempty"`
18985
18986 NextLink *string `json:"nextLink,omitempty"`
18987 }
18988
18989
18990
18991 type ProtectionIntentResourceListIterator struct {
18992 i int
18993 page ProtectionIntentResourceListPage
18994 }
18995
18996
18997
18998 func (iter *ProtectionIntentResourceListIterator) NextWithContext(ctx context.Context) (err error) {
18999 if tracing.IsEnabled() {
19000 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListIterator.NextWithContext")
19001 defer func() {
19002 sc := -1
19003 if iter.Response().Response.Response != nil {
19004 sc = iter.Response().Response.Response.StatusCode
19005 }
19006 tracing.EndSpan(ctx, sc, err)
19007 }()
19008 }
19009 iter.i++
19010 if iter.i < len(iter.page.Values()) {
19011 return nil
19012 }
19013 err = iter.page.NextWithContext(ctx)
19014 if err != nil {
19015 iter.i--
19016 return err
19017 }
19018 iter.i = 0
19019 return nil
19020 }
19021
19022
19023
19024
19025 func (iter *ProtectionIntentResourceListIterator) Next() error {
19026 return iter.NextWithContext(context.Background())
19027 }
19028
19029
19030 func (iter ProtectionIntentResourceListIterator) NotDone() bool {
19031 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19032 }
19033
19034
19035 func (iter ProtectionIntentResourceListIterator) Response() ProtectionIntentResourceList {
19036 return iter.page.Response()
19037 }
19038
19039
19040
19041 func (iter ProtectionIntentResourceListIterator) Value() ProtectionIntentResource {
19042 if !iter.page.NotDone() {
19043 return ProtectionIntentResource{}
19044 }
19045 return iter.page.Values()[iter.i]
19046 }
19047
19048
19049 func NewProtectionIntentResourceListIterator(page ProtectionIntentResourceListPage) ProtectionIntentResourceListIterator {
19050 return ProtectionIntentResourceListIterator{page: page}
19051 }
19052
19053
19054 func (pirl ProtectionIntentResourceList) IsEmpty() bool {
19055 return pirl.Value == nil || len(*pirl.Value) == 0
19056 }
19057
19058
19059 func (pirl ProtectionIntentResourceList) hasNextLink() bool {
19060 return pirl.NextLink != nil && len(*pirl.NextLink) != 0
19061 }
19062
19063
19064
19065 func (pirl ProtectionIntentResourceList) protectionIntentResourceListPreparer(ctx context.Context) (*http.Request, error) {
19066 if !pirl.hasNextLink() {
19067 return nil, nil
19068 }
19069 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19070 autorest.AsJSON(),
19071 autorest.AsGet(),
19072 autorest.WithBaseURL(to.String(pirl.NextLink)))
19073 }
19074
19075
19076 type ProtectionIntentResourceListPage struct {
19077 fn func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)
19078 pirl ProtectionIntentResourceList
19079 }
19080
19081
19082
19083 func (page *ProtectionIntentResourceListPage) NextWithContext(ctx context.Context) (err error) {
19084 if tracing.IsEnabled() {
19085 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionIntentResourceListPage.NextWithContext")
19086 defer func() {
19087 sc := -1
19088 if page.Response().Response.Response != nil {
19089 sc = page.Response().Response.Response.StatusCode
19090 }
19091 tracing.EndSpan(ctx, sc, err)
19092 }()
19093 }
19094 for {
19095 next, err := page.fn(ctx, page.pirl)
19096 if err != nil {
19097 return err
19098 }
19099 page.pirl = next
19100 if !next.hasNextLink() || !next.IsEmpty() {
19101 break
19102 }
19103 }
19104 return nil
19105 }
19106
19107
19108
19109
19110 func (page *ProtectionIntentResourceListPage) Next() error {
19111 return page.NextWithContext(context.Background())
19112 }
19113
19114
19115 func (page ProtectionIntentResourceListPage) NotDone() bool {
19116 return !page.pirl.IsEmpty()
19117 }
19118
19119
19120 func (page ProtectionIntentResourceListPage) Response() ProtectionIntentResourceList {
19121 return page.pirl
19122 }
19123
19124
19125 func (page ProtectionIntentResourceListPage) Values() []ProtectionIntentResource {
19126 if page.pirl.IsEmpty() {
19127 return nil
19128 }
19129 return *page.pirl.Value
19130 }
19131
19132
19133 func NewProtectionIntentResourceListPage(cur ProtectionIntentResourceList, getNextPage func(context.Context, ProtectionIntentResourceList) (ProtectionIntentResourceList, error)) ProtectionIntentResourceListPage {
19134 return ProtectionIntentResourceListPage{
19135 fn: getNextPage,
19136 pirl: cur,
19137 }
19138 }
19139
19140
19141
19142 type ProtectionPoliciesDeleteFuture struct {
19143 azure.FutureAPI
19144
19145
19146 Result func(ProtectionPoliciesClient) (autorest.Response, error)
19147 }
19148
19149
19150 func (future *ProtectionPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
19151 var azFuture azure.Future
19152 if err := json.Unmarshal(body, &azFuture); err != nil {
19153 return err
19154 }
19155 future.FutureAPI = &azFuture
19156 future.Result = future.result
19157 return nil
19158 }
19159
19160
19161 func (future *ProtectionPoliciesDeleteFuture) result(client ProtectionPoliciesClient) (ar autorest.Response, err error) {
19162 var done bool
19163 done, err = future.DoneWithContext(context.Background(), client)
19164 if err != nil {
19165 err = autorest.NewErrorWithError(err, "backup.ProtectionPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
19166 return
19167 }
19168 if !done {
19169 ar.Response = future.Response()
19170 err = azure.NewAsyncOpIncompleteError("backup.ProtectionPoliciesDeleteFuture")
19171 return
19172 }
19173 ar.Response = future.Response()
19174 return
19175 }
19176
19177
19178 type BasicProtectionPolicy interface {
19179 AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool)
19180 AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool)
19181 AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool)
19182 AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool)
19183 AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool)
19184 AsMabProtectionPolicy() (*MabProtectionPolicy, bool)
19185 AsProtectionPolicy() (*ProtectionPolicy, bool)
19186 }
19187
19188
19189
19190 type ProtectionPolicy struct {
19191
19192 ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"`
19193
19194 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
19195
19196 BackupManagementType ManagementTypeBasicProtectionPolicy `json:"backupManagementType,omitempty"`
19197 }
19198
19199 func unmarshalBasicProtectionPolicy(body []byte) (BasicProtectionPolicy, error) {
19200 var m map[string]interface{}
19201 err := json.Unmarshal(body, &m)
19202 if err != nil {
19203 return nil, err
19204 }
19205
19206 switch m["backupManagementType"] {
19207 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureWorkload):
19208 var avwpp AzureVMWorkloadProtectionPolicy
19209 err := json.Unmarshal(body, &avwpp)
19210 return avwpp, err
19211 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureStorage):
19212 var afspp AzureFileShareProtectionPolicy
19213 err := json.Unmarshal(body, &afspp)
19214 return afspp, err
19215 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureIaasVM):
19216 var aispp AzureIaaSVMProtectionPolicy
19217 err := json.Unmarshal(body, &aispp)
19218 return aispp, err
19219 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeAzureSQL):
19220 var aspp AzureSQLProtectionPolicy
19221 err := json.Unmarshal(body, &aspp)
19222 return aspp, err
19223 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeGenericProtectionPolicy):
19224 var gpp GenericProtectionPolicy
19225 err := json.Unmarshal(body, &gpp)
19226 return gpp, err
19227 case string(ManagementTypeBasicProtectionPolicyBackupManagementTypeMAB):
19228 var mpp MabProtectionPolicy
19229 err := json.Unmarshal(body, &mpp)
19230 return mpp, err
19231 default:
19232 var pp ProtectionPolicy
19233 err := json.Unmarshal(body, &pp)
19234 return pp, err
19235 }
19236 }
19237 func unmarshalBasicProtectionPolicyArray(body []byte) ([]BasicProtectionPolicy, error) {
19238 var rawMessages []*json.RawMessage
19239 err := json.Unmarshal(body, &rawMessages)
19240 if err != nil {
19241 return nil, err
19242 }
19243
19244 ppArray := make([]BasicProtectionPolicy, len(rawMessages))
19245
19246 for index, rawMessage := range rawMessages {
19247 pp, err := unmarshalBasicProtectionPolicy(*rawMessage)
19248 if err != nil {
19249 return nil, err
19250 }
19251 ppArray[index] = pp
19252 }
19253 return ppArray, nil
19254 }
19255
19256
19257 func (pp ProtectionPolicy) MarshalJSON() ([]byte, error) {
19258 pp.BackupManagementType = ManagementTypeBasicProtectionPolicyBackupManagementTypeProtectionPolicy
19259 objectMap := make(map[string]interface{})
19260 if pp.ProtectedItemsCount != nil {
19261 objectMap["protectedItemsCount"] = pp.ProtectedItemsCount
19262 }
19263 if pp.ResourceGuardOperationRequests != nil {
19264 objectMap["resourceGuardOperationRequests"] = pp.ResourceGuardOperationRequests
19265 }
19266 if pp.BackupManagementType != "" {
19267 objectMap["backupManagementType"] = pp.BackupManagementType
19268 }
19269 return json.Marshal(objectMap)
19270 }
19271
19272
19273 func (pp ProtectionPolicy) AsAzureVMWorkloadProtectionPolicy() (*AzureVMWorkloadProtectionPolicy, bool) {
19274 return nil, false
19275 }
19276
19277
19278 func (pp ProtectionPolicy) AsAzureFileShareProtectionPolicy() (*AzureFileShareProtectionPolicy, bool) {
19279 return nil, false
19280 }
19281
19282
19283 func (pp ProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) {
19284 return nil, false
19285 }
19286
19287
19288 func (pp ProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) {
19289 return nil, false
19290 }
19291
19292
19293 func (pp ProtectionPolicy) AsGenericProtectionPolicy() (*GenericProtectionPolicy, bool) {
19294 return nil, false
19295 }
19296
19297
19298 func (pp ProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) {
19299 return nil, false
19300 }
19301
19302
19303 func (pp ProtectionPolicy) AsProtectionPolicy() (*ProtectionPolicy, bool) {
19304 return &pp, true
19305 }
19306
19307
19308 func (pp ProtectionPolicy) AsBasicProtectionPolicy() (BasicProtectionPolicy, bool) {
19309 return &pp, true
19310 }
19311
19312
19313 type ProtectionPolicyQueryObject struct {
19314
19315 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
19316
19317 FabricName *string `json:"fabricName,omitempty"`
19318
19319 WorkloadType WorkloadType `json:"workloadType,omitempty"`
19320 }
19321
19322
19323
19324 type ProtectionPolicyResource struct {
19325 autorest.Response `json:"-"`
19326
19327 Properties BasicProtectionPolicy `json:"properties,omitempty"`
19328
19329 ID *string `json:"id,omitempty"`
19330
19331 Name *string `json:"name,omitempty"`
19332
19333 Type *string `json:"type,omitempty"`
19334
19335 Location *string `json:"location,omitempty"`
19336
19337 Tags map[string]*string `json:"tags"`
19338
19339 ETag *string `json:"eTag,omitempty"`
19340 }
19341
19342
19343 func (ppr ProtectionPolicyResource) MarshalJSON() ([]byte, error) {
19344 objectMap := make(map[string]interface{})
19345 objectMap["properties"] = ppr.Properties
19346 if ppr.Location != nil {
19347 objectMap["location"] = ppr.Location
19348 }
19349 if ppr.Tags != nil {
19350 objectMap["tags"] = ppr.Tags
19351 }
19352 if ppr.ETag != nil {
19353 objectMap["eTag"] = ppr.ETag
19354 }
19355 return json.Marshal(objectMap)
19356 }
19357
19358
19359 func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error {
19360 var m map[string]*json.RawMessage
19361 err := json.Unmarshal(body, &m)
19362 if err != nil {
19363 return err
19364 }
19365 for k, v := range m {
19366 switch k {
19367 case "properties":
19368 if v != nil {
19369 properties, err := unmarshalBasicProtectionPolicy(*v)
19370 if err != nil {
19371 return err
19372 }
19373 ppr.Properties = properties
19374 }
19375 case "id":
19376 if v != nil {
19377 var ID string
19378 err = json.Unmarshal(*v, &ID)
19379 if err != nil {
19380 return err
19381 }
19382 ppr.ID = &ID
19383 }
19384 case "name":
19385 if v != nil {
19386 var name string
19387 err = json.Unmarshal(*v, &name)
19388 if err != nil {
19389 return err
19390 }
19391 ppr.Name = &name
19392 }
19393 case "type":
19394 if v != nil {
19395 var typeVar string
19396 err = json.Unmarshal(*v, &typeVar)
19397 if err != nil {
19398 return err
19399 }
19400 ppr.Type = &typeVar
19401 }
19402 case "location":
19403 if v != nil {
19404 var location string
19405 err = json.Unmarshal(*v, &location)
19406 if err != nil {
19407 return err
19408 }
19409 ppr.Location = &location
19410 }
19411 case "tags":
19412 if v != nil {
19413 var tags map[string]*string
19414 err = json.Unmarshal(*v, &tags)
19415 if err != nil {
19416 return err
19417 }
19418 ppr.Tags = tags
19419 }
19420 case "eTag":
19421 if v != nil {
19422 var eTag string
19423 err = json.Unmarshal(*v, &eTag)
19424 if err != nil {
19425 return err
19426 }
19427 ppr.ETag = &eTag
19428 }
19429 }
19430 }
19431
19432 return nil
19433 }
19434
19435
19436 type ProtectionPolicyResourceList struct {
19437 autorest.Response `json:"-"`
19438
19439 Value *[]ProtectionPolicyResource `json:"value,omitempty"`
19440
19441 NextLink *string `json:"nextLink,omitempty"`
19442 }
19443
19444
19445
19446 type ProtectionPolicyResourceListIterator struct {
19447 i int
19448 page ProtectionPolicyResourceListPage
19449 }
19450
19451
19452
19453 func (iter *ProtectionPolicyResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19454 if tracing.IsEnabled() {
19455 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListIterator.NextWithContext")
19456 defer func() {
19457 sc := -1
19458 if iter.Response().Response.Response != nil {
19459 sc = iter.Response().Response.Response.StatusCode
19460 }
19461 tracing.EndSpan(ctx, sc, err)
19462 }()
19463 }
19464 iter.i++
19465 if iter.i < len(iter.page.Values()) {
19466 return nil
19467 }
19468 err = iter.page.NextWithContext(ctx)
19469 if err != nil {
19470 iter.i--
19471 return err
19472 }
19473 iter.i = 0
19474 return nil
19475 }
19476
19477
19478
19479
19480 func (iter *ProtectionPolicyResourceListIterator) Next() error {
19481 return iter.NextWithContext(context.Background())
19482 }
19483
19484
19485 func (iter ProtectionPolicyResourceListIterator) NotDone() bool {
19486 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19487 }
19488
19489
19490 func (iter ProtectionPolicyResourceListIterator) Response() ProtectionPolicyResourceList {
19491 return iter.page.Response()
19492 }
19493
19494
19495
19496 func (iter ProtectionPolicyResourceListIterator) Value() ProtectionPolicyResource {
19497 if !iter.page.NotDone() {
19498 return ProtectionPolicyResource{}
19499 }
19500 return iter.page.Values()[iter.i]
19501 }
19502
19503
19504 func NewProtectionPolicyResourceListIterator(page ProtectionPolicyResourceListPage) ProtectionPolicyResourceListIterator {
19505 return ProtectionPolicyResourceListIterator{page: page}
19506 }
19507
19508
19509 func (pprl ProtectionPolicyResourceList) IsEmpty() bool {
19510 return pprl.Value == nil || len(*pprl.Value) == 0
19511 }
19512
19513
19514 func (pprl ProtectionPolicyResourceList) hasNextLink() bool {
19515 return pprl.NextLink != nil && len(*pprl.NextLink) != 0
19516 }
19517
19518
19519
19520 func (pprl ProtectionPolicyResourceList) protectionPolicyResourceListPreparer(ctx context.Context) (*http.Request, error) {
19521 if !pprl.hasNextLink() {
19522 return nil, nil
19523 }
19524 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19525 autorest.AsJSON(),
19526 autorest.AsGet(),
19527 autorest.WithBaseURL(to.String(pprl.NextLink)))
19528 }
19529
19530
19531 type ProtectionPolicyResourceListPage struct {
19532 fn func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)
19533 pprl ProtectionPolicyResourceList
19534 }
19535
19536
19537
19538 func (page *ProtectionPolicyResourceListPage) NextWithContext(ctx context.Context) (err error) {
19539 if tracing.IsEnabled() {
19540 ctx = tracing.StartSpan(ctx, fqdn+"/ProtectionPolicyResourceListPage.NextWithContext")
19541 defer func() {
19542 sc := -1
19543 if page.Response().Response.Response != nil {
19544 sc = page.Response().Response.Response.StatusCode
19545 }
19546 tracing.EndSpan(ctx, sc, err)
19547 }()
19548 }
19549 for {
19550 next, err := page.fn(ctx, page.pprl)
19551 if err != nil {
19552 return err
19553 }
19554 page.pprl = next
19555 if !next.hasNextLink() || !next.IsEmpty() {
19556 break
19557 }
19558 }
19559 return nil
19560 }
19561
19562
19563
19564
19565 func (page *ProtectionPolicyResourceListPage) Next() error {
19566 return page.NextWithContext(context.Background())
19567 }
19568
19569
19570 func (page ProtectionPolicyResourceListPage) NotDone() bool {
19571 return !page.pprl.IsEmpty()
19572 }
19573
19574
19575 func (page ProtectionPolicyResourceListPage) Response() ProtectionPolicyResourceList {
19576 return page.pprl
19577 }
19578
19579
19580 func (page ProtectionPolicyResourceListPage) Values() []ProtectionPolicyResource {
19581 if page.pprl.IsEmpty() {
19582 return nil
19583 }
19584 return *page.pprl.Value
19585 }
19586
19587
19588 func NewProtectionPolicyResourceListPage(cur ProtectionPolicyResourceList, getNextPage func(context.Context, ProtectionPolicyResourceList) (ProtectionPolicyResourceList, error)) ProtectionPolicyResourceListPage {
19589 return ProtectionPolicyResourceListPage{
19590 fn: getNextPage,
19591 pprl: cur,
19592 }
19593 }
19594
19595
19596 type BasicRecoveryPoint interface {
19597 AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool)
19598 AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool)
19599 AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool)
19600 AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool)
19601 AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool)
19602 AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool)
19603 AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool)
19604 AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool)
19605 AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool)
19606 AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool)
19607 AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool)
19608 AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool)
19609 AsRecoveryPoint() (*RecoveryPoint, bool)
19610 }
19611
19612
19613 type RecoveryPoint struct {
19614
19615 ObjectType ObjectTypeBasicRecoveryPoint `json:"objectType,omitempty"`
19616 }
19617
19618 func unmarshalBasicRecoveryPoint(body []byte) (BasicRecoveryPoint, error) {
19619 var m map[string]interface{}
19620 err := json.Unmarshal(body, &m)
19621 if err != nil {
19622 return nil, err
19623 }
19624
19625 switch m["objectType"] {
19626 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureFileShareRecoveryPoint):
19627 var afsrp AzureFileShareRecoveryPoint
19628 err := json.Unmarshal(body, &afsrp)
19629 return afsrp, err
19630 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadPointInTimeRecoveryPoint):
19631 var awpitrp AzureWorkloadPointInTimeRecoveryPoint
19632 err := json.Unmarshal(body, &awpitrp)
19633 return awpitrp, err
19634 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadRecoveryPoint):
19635 var awrp AzureWorkloadRecoveryPoint
19636 err := json.Unmarshal(body, &awrp)
19637 return awrp, err
19638 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaPointInTimeRecoveryPoint):
19639 var awshpitrp AzureWorkloadSAPHanaPointInTimeRecoveryPoint
19640 err := json.Unmarshal(body, &awshpitrp)
19641 return awshpitrp, err
19642 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSAPHanaRecoveryPoint):
19643 var awshrp AzureWorkloadSAPHanaRecoveryPoint
19644 err := json.Unmarshal(body, &awshrp)
19645 return awshrp, err
19646 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLPointInTimeRecoveryPoint):
19647 var awspitrp AzureWorkloadSQLPointInTimeRecoveryPoint
19648 err := json.Unmarshal(body, &awspitrp)
19649 return awspitrp, err
19650 case string(ObjectTypeBasicRecoveryPointObjectTypeAzureWorkloadSQLRecoveryPoint):
19651 var awsrp AzureWorkloadSQLRecoveryPoint
19652 err := json.Unmarshal(body, &awsrp)
19653 return awsrp, err
19654 case string(ObjectTypeBasicRecoveryPointObjectTypeGenericRecoveryPoint):
19655 var grp GenericRecoveryPoint
19656 err := json.Unmarshal(body, &grp)
19657 return grp, err
19658 case string(ObjectTypeBasicRecoveryPointObjectTypeIaasVMRecoveryPoint):
19659 var ivrp IaasVMRecoveryPoint
19660 err := json.Unmarshal(body, &ivrp)
19661 return ivrp, err
19662 default:
19663 var rp RecoveryPoint
19664 err := json.Unmarshal(body, &rp)
19665 return rp, err
19666 }
19667 }
19668 func unmarshalBasicRecoveryPointArray(body []byte) ([]BasicRecoveryPoint, error) {
19669 var rawMessages []*json.RawMessage
19670 err := json.Unmarshal(body, &rawMessages)
19671 if err != nil {
19672 return nil, err
19673 }
19674
19675 rpArray := make([]BasicRecoveryPoint, len(rawMessages))
19676
19677 for index, rawMessage := range rawMessages {
19678 rp, err := unmarshalBasicRecoveryPoint(*rawMessage)
19679 if err != nil {
19680 return nil, err
19681 }
19682 rpArray[index] = rp
19683 }
19684 return rpArray, nil
19685 }
19686
19687
19688 func (rp RecoveryPoint) MarshalJSON() ([]byte, error) {
19689 rp.ObjectType = ObjectTypeBasicRecoveryPointObjectTypeRecoveryPoint
19690 objectMap := make(map[string]interface{})
19691 if rp.ObjectType != "" {
19692 objectMap["objectType"] = rp.ObjectType
19693 }
19694 return json.Marshal(objectMap)
19695 }
19696
19697
19698 func (rp RecoveryPoint) AsAzureFileShareRecoveryPoint() (*AzureFileShareRecoveryPoint, bool) {
19699 return nil, false
19700 }
19701
19702
19703 func (rp RecoveryPoint) AsAzureWorkloadPointInTimeRecoveryPoint() (*AzureWorkloadPointInTimeRecoveryPoint, bool) {
19704 return nil, false
19705 }
19706
19707
19708 func (rp RecoveryPoint) AsBasicAzureWorkloadPointInTimeRecoveryPoint() (BasicAzureWorkloadPointInTimeRecoveryPoint, bool) {
19709 return nil, false
19710 }
19711
19712
19713 func (rp RecoveryPoint) AsAzureWorkloadRecoveryPoint() (*AzureWorkloadRecoveryPoint, bool) {
19714 return nil, false
19715 }
19716
19717
19718 func (rp RecoveryPoint) AsBasicAzureWorkloadRecoveryPoint() (BasicAzureWorkloadRecoveryPoint, bool) {
19719 return nil, false
19720 }
19721
19722
19723 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaPointInTimeRecoveryPoint() (*AzureWorkloadSAPHanaPointInTimeRecoveryPoint, bool) {
19724 return nil, false
19725 }
19726
19727
19728 func (rp RecoveryPoint) AsAzureWorkloadSAPHanaRecoveryPoint() (*AzureWorkloadSAPHanaRecoveryPoint, bool) {
19729 return nil, false
19730 }
19731
19732
19733 func (rp RecoveryPoint) AsAzureWorkloadSQLPointInTimeRecoveryPoint() (*AzureWorkloadSQLPointInTimeRecoveryPoint, bool) {
19734 return nil, false
19735 }
19736
19737
19738 func (rp RecoveryPoint) AsAzureWorkloadSQLRecoveryPoint() (*AzureWorkloadSQLRecoveryPoint, bool) {
19739 return nil, false
19740 }
19741
19742
19743 func (rp RecoveryPoint) AsBasicAzureWorkloadSQLRecoveryPoint() (BasicAzureWorkloadSQLRecoveryPoint, bool) {
19744 return nil, false
19745 }
19746
19747
19748 func (rp RecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) {
19749 return nil, false
19750 }
19751
19752
19753 func (rp RecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) {
19754 return nil, false
19755 }
19756
19757
19758 func (rp RecoveryPoint) AsRecoveryPoint() (*RecoveryPoint, bool) {
19759 return &rp, true
19760 }
19761
19762
19763 func (rp RecoveryPoint) AsBasicRecoveryPoint() (BasicRecoveryPoint, bool) {
19764 return &rp, true
19765 }
19766
19767
19768 type RecoveryPointDiskConfiguration struct {
19769
19770 NumberOfDisksIncludedInBackup *int32 `json:"numberOfDisksIncludedInBackup,omitempty"`
19771
19772 NumberOfDisksAttachedToVM *int32 `json:"numberOfDisksAttachedToVm,omitempty"`
19773
19774 IncludedDiskList *[]DiskInformation `json:"includedDiskList,omitempty"`
19775
19776 ExcludedDiskList *[]DiskInformation `json:"excludedDiskList,omitempty"`
19777 }
19778
19779
19780 type RecoveryPointMoveReadinessInfo struct {
19781 IsReadyForMove *bool `json:"isReadyForMove,omitempty"`
19782 AdditionalInfo *string `json:"additionalInfo,omitempty"`
19783 }
19784
19785
19786 type RecoveryPointRehydrationInfo struct {
19787
19788
19789 RehydrationRetentionDuration *string `json:"rehydrationRetentionDuration,omitempty"`
19790
19791 RehydrationPriority RehydrationPriority `json:"rehydrationPriority,omitempty"`
19792 }
19793
19794
19795
19796 type RecoveryPointResource struct {
19797 autorest.Response `json:"-"`
19798
19799 Properties BasicRecoveryPoint `json:"properties,omitempty"`
19800
19801 ID *string `json:"id,omitempty"`
19802
19803 Name *string `json:"name,omitempty"`
19804
19805 Type *string `json:"type,omitempty"`
19806
19807 Location *string `json:"location,omitempty"`
19808
19809 Tags map[string]*string `json:"tags"`
19810
19811 ETag *string `json:"eTag,omitempty"`
19812 }
19813
19814
19815 func (rpr RecoveryPointResource) MarshalJSON() ([]byte, error) {
19816 objectMap := make(map[string]interface{})
19817 objectMap["properties"] = rpr.Properties
19818 if rpr.Location != nil {
19819 objectMap["location"] = rpr.Location
19820 }
19821 if rpr.Tags != nil {
19822 objectMap["tags"] = rpr.Tags
19823 }
19824 if rpr.ETag != nil {
19825 objectMap["eTag"] = rpr.ETag
19826 }
19827 return json.Marshal(objectMap)
19828 }
19829
19830
19831 func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error {
19832 var m map[string]*json.RawMessage
19833 err := json.Unmarshal(body, &m)
19834 if err != nil {
19835 return err
19836 }
19837 for k, v := range m {
19838 switch k {
19839 case "properties":
19840 if v != nil {
19841 properties, err := unmarshalBasicRecoveryPoint(*v)
19842 if err != nil {
19843 return err
19844 }
19845 rpr.Properties = properties
19846 }
19847 case "id":
19848 if v != nil {
19849 var ID string
19850 err = json.Unmarshal(*v, &ID)
19851 if err != nil {
19852 return err
19853 }
19854 rpr.ID = &ID
19855 }
19856 case "name":
19857 if v != nil {
19858 var name string
19859 err = json.Unmarshal(*v, &name)
19860 if err != nil {
19861 return err
19862 }
19863 rpr.Name = &name
19864 }
19865 case "type":
19866 if v != nil {
19867 var typeVar string
19868 err = json.Unmarshal(*v, &typeVar)
19869 if err != nil {
19870 return err
19871 }
19872 rpr.Type = &typeVar
19873 }
19874 case "location":
19875 if v != nil {
19876 var location string
19877 err = json.Unmarshal(*v, &location)
19878 if err != nil {
19879 return err
19880 }
19881 rpr.Location = &location
19882 }
19883 case "tags":
19884 if v != nil {
19885 var tags map[string]*string
19886 err = json.Unmarshal(*v, &tags)
19887 if err != nil {
19888 return err
19889 }
19890 rpr.Tags = tags
19891 }
19892 case "eTag":
19893 if v != nil {
19894 var eTag string
19895 err = json.Unmarshal(*v, &eTag)
19896 if err != nil {
19897 return err
19898 }
19899 rpr.ETag = &eTag
19900 }
19901 }
19902 }
19903
19904 return nil
19905 }
19906
19907
19908 type RecoveryPointResourceList struct {
19909 autorest.Response `json:"-"`
19910
19911 Value *[]RecoveryPointResource `json:"value,omitempty"`
19912
19913 NextLink *string `json:"nextLink,omitempty"`
19914 }
19915
19916
19917 type RecoveryPointResourceListIterator struct {
19918 i int
19919 page RecoveryPointResourceListPage
19920 }
19921
19922
19923
19924 func (iter *RecoveryPointResourceListIterator) NextWithContext(ctx context.Context) (err error) {
19925 if tracing.IsEnabled() {
19926 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListIterator.NextWithContext")
19927 defer func() {
19928 sc := -1
19929 if iter.Response().Response.Response != nil {
19930 sc = iter.Response().Response.Response.StatusCode
19931 }
19932 tracing.EndSpan(ctx, sc, err)
19933 }()
19934 }
19935 iter.i++
19936 if iter.i < len(iter.page.Values()) {
19937 return nil
19938 }
19939 err = iter.page.NextWithContext(ctx)
19940 if err != nil {
19941 iter.i--
19942 return err
19943 }
19944 iter.i = 0
19945 return nil
19946 }
19947
19948
19949
19950
19951 func (iter *RecoveryPointResourceListIterator) Next() error {
19952 return iter.NextWithContext(context.Background())
19953 }
19954
19955
19956 func (iter RecoveryPointResourceListIterator) NotDone() bool {
19957 return iter.page.NotDone() && iter.i < len(iter.page.Values())
19958 }
19959
19960
19961 func (iter RecoveryPointResourceListIterator) Response() RecoveryPointResourceList {
19962 return iter.page.Response()
19963 }
19964
19965
19966
19967 func (iter RecoveryPointResourceListIterator) Value() RecoveryPointResource {
19968 if !iter.page.NotDone() {
19969 return RecoveryPointResource{}
19970 }
19971 return iter.page.Values()[iter.i]
19972 }
19973
19974
19975 func NewRecoveryPointResourceListIterator(page RecoveryPointResourceListPage) RecoveryPointResourceListIterator {
19976 return RecoveryPointResourceListIterator{page: page}
19977 }
19978
19979
19980 func (rprl RecoveryPointResourceList) IsEmpty() bool {
19981 return rprl.Value == nil || len(*rprl.Value) == 0
19982 }
19983
19984
19985 func (rprl RecoveryPointResourceList) hasNextLink() bool {
19986 return rprl.NextLink != nil && len(*rprl.NextLink) != 0
19987 }
19988
19989
19990
19991 func (rprl RecoveryPointResourceList) recoveryPointResourceListPreparer(ctx context.Context) (*http.Request, error) {
19992 if !rprl.hasNextLink() {
19993 return nil, nil
19994 }
19995 return autorest.Prepare((&http.Request{}).WithContext(ctx),
19996 autorest.AsJSON(),
19997 autorest.AsGet(),
19998 autorest.WithBaseURL(to.String(rprl.NextLink)))
19999 }
20000
20001
20002 type RecoveryPointResourceListPage struct {
20003 fn func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)
20004 rprl RecoveryPointResourceList
20005 }
20006
20007
20008
20009 func (page *RecoveryPointResourceListPage) NextWithContext(ctx context.Context) (err error) {
20010 if tracing.IsEnabled() {
20011 ctx = tracing.StartSpan(ctx, fqdn+"/RecoveryPointResourceListPage.NextWithContext")
20012 defer func() {
20013 sc := -1
20014 if page.Response().Response.Response != nil {
20015 sc = page.Response().Response.Response.StatusCode
20016 }
20017 tracing.EndSpan(ctx, sc, err)
20018 }()
20019 }
20020 for {
20021 next, err := page.fn(ctx, page.rprl)
20022 if err != nil {
20023 return err
20024 }
20025 page.rprl = next
20026 if !next.hasNextLink() || !next.IsEmpty() {
20027 break
20028 }
20029 }
20030 return nil
20031 }
20032
20033
20034
20035
20036 func (page *RecoveryPointResourceListPage) Next() error {
20037 return page.NextWithContext(context.Background())
20038 }
20039
20040
20041 func (page RecoveryPointResourceListPage) NotDone() bool {
20042 return !page.rprl.IsEmpty()
20043 }
20044
20045
20046 func (page RecoveryPointResourceListPage) Response() RecoveryPointResourceList {
20047 return page.rprl
20048 }
20049
20050
20051 func (page RecoveryPointResourceListPage) Values() []RecoveryPointResource {
20052 if page.rprl.IsEmpty() {
20053 return nil
20054 }
20055 return *page.rprl.Value
20056 }
20057
20058
20059 func NewRecoveryPointResourceListPage(cur RecoveryPointResourceList, getNextPage func(context.Context, RecoveryPointResourceList) (RecoveryPointResourceList, error)) RecoveryPointResourceListPage {
20060 return RecoveryPointResourceListPage{
20061 fn: getNextPage,
20062 rprl: cur,
20063 }
20064 }
20065
20066
20067 type RecoveryPointTierInformation struct {
20068
20069 Type RecoveryPointTierType `json:"type,omitempty"`
20070
20071 Status RecoveryPointTierStatus `json:"status,omitempty"`
20072
20073 ExtendedInfo map[string]*string `json:"extendedInfo"`
20074 }
20075
20076
20077 func (rpti RecoveryPointTierInformation) MarshalJSON() ([]byte, error) {
20078 objectMap := make(map[string]interface{})
20079 if rpti.Type != "" {
20080 objectMap["type"] = rpti.Type
20081 }
20082 if rpti.Status != "" {
20083 objectMap["status"] = rpti.Status
20084 }
20085 if rpti.ExtendedInfo != nil {
20086 objectMap["extendedInfo"] = rpti.ExtendedInfo
20087 }
20088 return json.Marshal(objectMap)
20089 }
20090
20091
20092 type BasicRequest interface {
20093 AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool)
20094 AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool)
20095 AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool)
20096 AsRequest() (*Request, bool)
20097 }
20098
20099
20100 type Request struct {
20101
20102 ObjectType ObjectTypeBasicRequest `json:"objectType,omitempty"`
20103 }
20104
20105 func unmarshalBasicRequest(body []byte) (BasicRequest, error) {
20106 var m map[string]interface{}
20107 err := json.Unmarshal(body, &m)
20108 if err != nil {
20109 return nil, err
20110 }
20111
20112 switch m["objectType"] {
20113 case string(ObjectTypeBasicRequestObjectTypeAzureFileShareBackupRequest):
20114 var afsbr AzureFileShareBackupRequest
20115 err := json.Unmarshal(body, &afsbr)
20116 return afsbr, err
20117 case string(ObjectTypeBasicRequestObjectTypeAzureWorkloadBackupRequest):
20118 var awbr AzureWorkloadBackupRequest
20119 err := json.Unmarshal(body, &awbr)
20120 return awbr, err
20121 case string(ObjectTypeBasicRequestObjectTypeIaasVMBackupRequest):
20122 var ivbr IaasVMBackupRequest
20123 err := json.Unmarshal(body, &ivbr)
20124 return ivbr, err
20125 default:
20126 var r Request
20127 err := json.Unmarshal(body, &r)
20128 return r, err
20129 }
20130 }
20131 func unmarshalBasicRequestArray(body []byte) ([]BasicRequest, error) {
20132 var rawMessages []*json.RawMessage
20133 err := json.Unmarshal(body, &rawMessages)
20134 if err != nil {
20135 return nil, err
20136 }
20137
20138 rArray := make([]BasicRequest, len(rawMessages))
20139
20140 for index, rawMessage := range rawMessages {
20141 r, err := unmarshalBasicRequest(*rawMessage)
20142 if err != nil {
20143 return nil, err
20144 }
20145 rArray[index] = r
20146 }
20147 return rArray, nil
20148 }
20149
20150
20151 func (r Request) MarshalJSON() ([]byte, error) {
20152 r.ObjectType = ObjectTypeBasicRequestObjectTypeBackupRequest
20153 objectMap := make(map[string]interface{})
20154 if r.ObjectType != "" {
20155 objectMap["objectType"] = r.ObjectType
20156 }
20157 return json.Marshal(objectMap)
20158 }
20159
20160
20161 func (r Request) AsAzureFileShareBackupRequest() (*AzureFileShareBackupRequest, bool) {
20162 return nil, false
20163 }
20164
20165
20166 func (r Request) AsAzureWorkloadBackupRequest() (*AzureWorkloadBackupRequest, bool) {
20167 return nil, false
20168 }
20169
20170
20171 func (r Request) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) {
20172 return nil, false
20173 }
20174
20175
20176 func (r Request) AsRequest() (*Request, bool) {
20177 return &r, true
20178 }
20179
20180
20181 func (r Request) AsBasicRequest() (BasicRequest, bool) {
20182 return &r, true
20183 }
20184
20185
20186
20187 type RequestResource struct {
20188
20189 Properties BasicRequest `json:"properties,omitempty"`
20190
20191 ID *string `json:"id,omitempty"`
20192
20193 Name *string `json:"name,omitempty"`
20194
20195 Type *string `json:"type,omitempty"`
20196
20197 Location *string `json:"location,omitempty"`
20198
20199 Tags map[string]*string `json:"tags"`
20200
20201 ETag *string `json:"eTag,omitempty"`
20202 }
20203
20204
20205 func (rr RequestResource) MarshalJSON() ([]byte, error) {
20206 objectMap := make(map[string]interface{})
20207 objectMap["properties"] = rr.Properties
20208 if rr.Location != nil {
20209 objectMap["location"] = rr.Location
20210 }
20211 if rr.Tags != nil {
20212 objectMap["tags"] = rr.Tags
20213 }
20214 if rr.ETag != nil {
20215 objectMap["eTag"] = rr.ETag
20216 }
20217 return json.Marshal(objectMap)
20218 }
20219
20220
20221 func (rr *RequestResource) UnmarshalJSON(body []byte) error {
20222 var m map[string]*json.RawMessage
20223 err := json.Unmarshal(body, &m)
20224 if err != nil {
20225 return err
20226 }
20227 for k, v := range m {
20228 switch k {
20229 case "properties":
20230 if v != nil {
20231 properties, err := unmarshalBasicRequest(*v)
20232 if err != nil {
20233 return err
20234 }
20235 rr.Properties = properties
20236 }
20237 case "id":
20238 if v != nil {
20239 var ID string
20240 err = json.Unmarshal(*v, &ID)
20241 if err != nil {
20242 return err
20243 }
20244 rr.ID = &ID
20245 }
20246 case "name":
20247 if v != nil {
20248 var name string
20249 err = json.Unmarshal(*v, &name)
20250 if err != nil {
20251 return err
20252 }
20253 rr.Name = &name
20254 }
20255 case "type":
20256 if v != nil {
20257 var typeVar string
20258 err = json.Unmarshal(*v, &typeVar)
20259 if err != nil {
20260 return err
20261 }
20262 rr.Type = &typeVar
20263 }
20264 case "location":
20265 if v != nil {
20266 var location string
20267 err = json.Unmarshal(*v, &location)
20268 if err != nil {
20269 return err
20270 }
20271 rr.Location = &location
20272 }
20273 case "tags":
20274 if v != nil {
20275 var tags map[string]*string
20276 err = json.Unmarshal(*v, &tags)
20277 if err != nil {
20278 return err
20279 }
20280 rr.Tags = tags
20281 }
20282 case "eTag":
20283 if v != nil {
20284 var eTag string
20285 err = json.Unmarshal(*v, &eTag)
20286 if err != nil {
20287 return err
20288 }
20289 rr.ETag = &eTag
20290 }
20291 }
20292 }
20293
20294 return nil
20295 }
20296
20297
20298 type Resource struct {
20299
20300 ID *string `json:"id,omitempty"`
20301
20302 Name *string `json:"name,omitempty"`
20303
20304 Type *string `json:"type,omitempty"`
20305
20306 Location *string `json:"location,omitempty"`
20307
20308 Tags map[string]*string `json:"tags"`
20309
20310 ETag *string `json:"eTag,omitempty"`
20311 }
20312
20313
20314 func (r Resource) MarshalJSON() ([]byte, error) {
20315 objectMap := make(map[string]interface{})
20316 if r.Location != nil {
20317 objectMap["location"] = r.Location
20318 }
20319 if r.Tags != nil {
20320 objectMap["tags"] = r.Tags
20321 }
20322 if r.ETag != nil {
20323 objectMap["eTag"] = r.ETag
20324 }
20325 return json.Marshal(objectMap)
20326 }
20327
20328
20329 type ResourceConfig struct {
20330
20331 StorageModelType StorageType `json:"storageModelType,omitempty"`
20332
20333 StorageType StorageType `json:"storageType,omitempty"`
20334
20335 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
20336
20337 CrossRegionRestoreFlag *bool `json:"crossRegionRestoreFlag,omitempty"`
20338 }
20339
20340
20341 type ResourceConfigResource struct {
20342 autorest.Response `json:"-"`
20343
20344 Properties *ResourceConfig `json:"properties,omitempty"`
20345
20346 ID *string `json:"id,omitempty"`
20347
20348 Name *string `json:"name,omitempty"`
20349
20350 Type *string `json:"type,omitempty"`
20351
20352 Location *string `json:"location,omitempty"`
20353
20354 Tags map[string]*string `json:"tags"`
20355
20356 ETag *string `json:"eTag,omitempty"`
20357 }
20358
20359
20360 func (rcr ResourceConfigResource) MarshalJSON() ([]byte, error) {
20361 objectMap := make(map[string]interface{})
20362 if rcr.Properties != nil {
20363 objectMap["properties"] = rcr.Properties
20364 }
20365 if rcr.Location != nil {
20366 objectMap["location"] = rcr.Location
20367 }
20368 if rcr.Tags != nil {
20369 objectMap["tags"] = rcr.Tags
20370 }
20371 if rcr.ETag != nil {
20372 objectMap["eTag"] = rcr.ETag
20373 }
20374 return json.Marshal(objectMap)
20375 }
20376
20377
20378 type ResourceEncryptionConfig struct {
20379
20380 EncryptionAtRestType EncryptionAtRestType `json:"encryptionAtRestType,omitempty"`
20381
20382 KeyURI *string `json:"keyUri,omitempty"`
20383
20384 SubscriptionID *string `json:"subscriptionId,omitempty"`
20385
20386 LastUpdateStatus LastUpdateStatus `json:"lastUpdateStatus,omitempty"`
20387
20388 InfrastructureEncryptionState InfrastructureEncryptionState `json:"infrastructureEncryptionState,omitempty"`
20389 }
20390
20391
20392 type ResourceEncryptionConfigExtended struct {
20393
20394 UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"`
20395
20396 UseSystemAssignedIdentity *bool `json:"useSystemAssignedIdentity,omitempty"`
20397
20398 EncryptionAtRestType EncryptionAtRestType `json:"encryptionAtRestType,omitempty"`
20399
20400 KeyURI *string `json:"keyUri,omitempty"`
20401
20402 SubscriptionID *string `json:"subscriptionId,omitempty"`
20403
20404 LastUpdateStatus LastUpdateStatus `json:"lastUpdateStatus,omitempty"`
20405
20406 InfrastructureEncryptionState InfrastructureEncryptionState `json:"infrastructureEncryptionState,omitempty"`
20407 }
20408
20409
20410 type ResourceEncryptionConfigExtendedResource struct {
20411 autorest.Response `json:"-"`
20412
20413 Properties *ResourceEncryptionConfigExtended `json:"properties,omitempty"`
20414
20415 ID *string `json:"id,omitempty"`
20416
20417 Name *string `json:"name,omitempty"`
20418
20419 Type *string `json:"type,omitempty"`
20420
20421 Location *string `json:"location,omitempty"`
20422
20423 Tags map[string]*string `json:"tags"`
20424
20425 ETag *string `json:"eTag,omitempty"`
20426 }
20427
20428
20429 func (recer ResourceEncryptionConfigExtendedResource) MarshalJSON() ([]byte, error) {
20430 objectMap := make(map[string]interface{})
20431 if recer.Properties != nil {
20432 objectMap["properties"] = recer.Properties
20433 }
20434 if recer.Location != nil {
20435 objectMap["location"] = recer.Location
20436 }
20437 if recer.Tags != nil {
20438 objectMap["tags"] = recer.Tags
20439 }
20440 if recer.ETag != nil {
20441 objectMap["eTag"] = recer.ETag
20442 }
20443 return json.Marshal(objectMap)
20444 }
20445
20446
20447 type ResourceEncryptionConfigResource struct {
20448
20449 Properties *ResourceEncryptionConfig `json:"properties,omitempty"`
20450
20451 ID *string `json:"id,omitempty"`
20452
20453 Name *string `json:"name,omitempty"`
20454
20455 Type *string `json:"type,omitempty"`
20456
20457 Location *string `json:"location,omitempty"`
20458
20459 Tags map[string]*string `json:"tags"`
20460
20461 ETag *string `json:"eTag,omitempty"`
20462 }
20463
20464
20465 func (recr ResourceEncryptionConfigResource) MarshalJSON() ([]byte, error) {
20466 objectMap := make(map[string]interface{})
20467 if recr.Properties != nil {
20468 objectMap["properties"] = recr.Properties
20469 }
20470 if recr.Location != nil {
20471 objectMap["location"] = recr.Location
20472 }
20473 if recr.Tags != nil {
20474 objectMap["tags"] = recr.Tags
20475 }
20476 if recr.ETag != nil {
20477 objectMap["eTag"] = recr.ETag
20478 }
20479 return json.Marshal(objectMap)
20480 }
20481
20482
20483 type ResourceGuardOperationDetail struct {
20484 VaultCriticalOperation *string `json:"vaultCriticalOperation,omitempty"`
20485 DefaultResourceRequest *string `json:"defaultResourceRequest,omitempty"`
20486 }
20487
20488
20489 type ResourceGuardProxyBase struct {
20490 ResourceGuardResourceID *string `json:"resourceGuardResourceId,omitempty"`
20491 ResourceGuardOperationDetails *[]ResourceGuardOperationDetail `json:"resourceGuardOperationDetails,omitempty"`
20492 LastUpdatedTime *string `json:"lastUpdatedTime,omitempty"`
20493 Description *string `json:"description,omitempty"`
20494 }
20495
20496
20497 type ResourceGuardProxyBaseResource struct {
20498 autorest.Response `json:"-"`
20499
20500 Properties *ResourceGuardProxyBase `json:"properties,omitempty"`
20501
20502 ID *string `json:"id,omitempty"`
20503
20504 Name *string `json:"name,omitempty"`
20505
20506 Type *string `json:"type,omitempty"`
20507
20508 Location *string `json:"location,omitempty"`
20509
20510 Tags map[string]*string `json:"tags"`
20511
20512 ETag *string `json:"eTag,omitempty"`
20513 }
20514
20515
20516 func (rgpbr ResourceGuardProxyBaseResource) MarshalJSON() ([]byte, error) {
20517 objectMap := make(map[string]interface{})
20518 if rgpbr.Properties != nil {
20519 objectMap["properties"] = rgpbr.Properties
20520 }
20521 if rgpbr.Location != nil {
20522 objectMap["location"] = rgpbr.Location
20523 }
20524 if rgpbr.Tags != nil {
20525 objectMap["tags"] = rgpbr.Tags
20526 }
20527 if rgpbr.ETag != nil {
20528 objectMap["eTag"] = rgpbr.ETag
20529 }
20530 return json.Marshal(objectMap)
20531 }
20532
20533
20534 type ResourceGuardProxyBaseResourceList struct {
20535 autorest.Response `json:"-"`
20536
20537 Value *[]ResourceGuardProxyBaseResource `json:"value,omitempty"`
20538
20539 NextLink *string `json:"nextLink,omitempty"`
20540 }
20541
20542
20543
20544 type ResourceGuardProxyBaseResourceListIterator struct {
20545 i int
20546 page ResourceGuardProxyBaseResourceListPage
20547 }
20548
20549
20550
20551 func (iter *ResourceGuardProxyBaseResourceListIterator) NextWithContext(ctx context.Context) (err error) {
20552 if tracing.IsEnabled() {
20553 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardProxyBaseResourceListIterator.NextWithContext")
20554 defer func() {
20555 sc := -1
20556 if iter.Response().Response.Response != nil {
20557 sc = iter.Response().Response.Response.StatusCode
20558 }
20559 tracing.EndSpan(ctx, sc, err)
20560 }()
20561 }
20562 iter.i++
20563 if iter.i < len(iter.page.Values()) {
20564 return nil
20565 }
20566 err = iter.page.NextWithContext(ctx)
20567 if err != nil {
20568 iter.i--
20569 return err
20570 }
20571 iter.i = 0
20572 return nil
20573 }
20574
20575
20576
20577
20578 func (iter *ResourceGuardProxyBaseResourceListIterator) Next() error {
20579 return iter.NextWithContext(context.Background())
20580 }
20581
20582
20583 func (iter ResourceGuardProxyBaseResourceListIterator) NotDone() bool {
20584 return iter.page.NotDone() && iter.i < len(iter.page.Values())
20585 }
20586
20587
20588 func (iter ResourceGuardProxyBaseResourceListIterator) Response() ResourceGuardProxyBaseResourceList {
20589 return iter.page.Response()
20590 }
20591
20592
20593
20594 func (iter ResourceGuardProxyBaseResourceListIterator) Value() ResourceGuardProxyBaseResource {
20595 if !iter.page.NotDone() {
20596 return ResourceGuardProxyBaseResource{}
20597 }
20598 return iter.page.Values()[iter.i]
20599 }
20600
20601
20602 func NewResourceGuardProxyBaseResourceListIterator(page ResourceGuardProxyBaseResourceListPage) ResourceGuardProxyBaseResourceListIterator {
20603 return ResourceGuardProxyBaseResourceListIterator{page: page}
20604 }
20605
20606
20607 func (rgpbrl ResourceGuardProxyBaseResourceList) IsEmpty() bool {
20608 return rgpbrl.Value == nil || len(*rgpbrl.Value) == 0
20609 }
20610
20611
20612 func (rgpbrl ResourceGuardProxyBaseResourceList) hasNextLink() bool {
20613 return rgpbrl.NextLink != nil && len(*rgpbrl.NextLink) != 0
20614 }
20615
20616
20617
20618 func (rgpbrl ResourceGuardProxyBaseResourceList) resourceGuardProxyBaseResourceListPreparer(ctx context.Context) (*http.Request, error) {
20619 if !rgpbrl.hasNextLink() {
20620 return nil, nil
20621 }
20622 return autorest.Prepare((&http.Request{}).WithContext(ctx),
20623 autorest.AsJSON(),
20624 autorest.AsGet(),
20625 autorest.WithBaseURL(to.String(rgpbrl.NextLink)))
20626 }
20627
20628
20629 type ResourceGuardProxyBaseResourceListPage struct {
20630 fn func(context.Context, ResourceGuardProxyBaseResourceList) (ResourceGuardProxyBaseResourceList, error)
20631 rgpbrl ResourceGuardProxyBaseResourceList
20632 }
20633
20634
20635
20636 func (page *ResourceGuardProxyBaseResourceListPage) NextWithContext(ctx context.Context) (err error) {
20637 if tracing.IsEnabled() {
20638 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceGuardProxyBaseResourceListPage.NextWithContext")
20639 defer func() {
20640 sc := -1
20641 if page.Response().Response.Response != nil {
20642 sc = page.Response().Response.Response.StatusCode
20643 }
20644 tracing.EndSpan(ctx, sc, err)
20645 }()
20646 }
20647 for {
20648 next, err := page.fn(ctx, page.rgpbrl)
20649 if err != nil {
20650 return err
20651 }
20652 page.rgpbrl = next
20653 if !next.hasNextLink() || !next.IsEmpty() {
20654 break
20655 }
20656 }
20657 return nil
20658 }
20659
20660
20661
20662
20663 func (page *ResourceGuardProxyBaseResourceListPage) Next() error {
20664 return page.NextWithContext(context.Background())
20665 }
20666
20667
20668 func (page ResourceGuardProxyBaseResourceListPage) NotDone() bool {
20669 return !page.rgpbrl.IsEmpty()
20670 }
20671
20672
20673 func (page ResourceGuardProxyBaseResourceListPage) Response() ResourceGuardProxyBaseResourceList {
20674 return page.rgpbrl
20675 }
20676
20677
20678 func (page ResourceGuardProxyBaseResourceListPage) Values() []ResourceGuardProxyBaseResource {
20679 if page.rgpbrl.IsEmpty() {
20680 return nil
20681 }
20682 return *page.rgpbrl.Value
20683 }
20684
20685
20686 func NewResourceGuardProxyBaseResourceListPage(cur ResourceGuardProxyBaseResourceList, getNextPage func(context.Context, ResourceGuardProxyBaseResourceList) (ResourceGuardProxyBaseResourceList, error)) ResourceGuardProxyBaseResourceListPage {
20687 return ResourceGuardProxyBaseResourceListPage{
20688 fn: getNextPage,
20689 rgpbrl: cur,
20690 }
20691 }
20692
20693
20694 type ResourceHealthDetails struct {
20695
20696 Code *int32 `json:"code,omitempty"`
20697
20698 Title *string `json:"title,omitempty"`
20699
20700 Message *string `json:"message,omitempty"`
20701
20702 Recommendations *[]string `json:"recommendations,omitempty"`
20703 }
20704
20705
20706 func (rhd ResourceHealthDetails) MarshalJSON() ([]byte, error) {
20707 objectMap := make(map[string]interface{})
20708 return json.Marshal(objectMap)
20709 }
20710
20711
20712 type ResourceList struct {
20713
20714 NextLink *string `json:"nextLink,omitempty"`
20715 }
20716
20717
20718 type ResourceVaultConfig struct {
20719
20720 StorageModelType StorageType `json:"storageModelType,omitempty"`
20721
20722 StorageType StorageType `json:"storageType,omitempty"`
20723
20724 StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
20725
20726 EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"`
20727
20728 SoftDeleteFeatureState SoftDeleteFeatureState `json:"softDeleteFeatureState,omitempty"`
20729
20730 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
20731 }
20732
20733
20734 type ResourceVaultConfigResource struct {
20735 autorest.Response `json:"-"`
20736
20737 Properties *ResourceVaultConfig `json:"properties,omitempty"`
20738
20739 ID *string `json:"id,omitempty"`
20740
20741 Name *string `json:"name,omitempty"`
20742
20743 Type *string `json:"type,omitempty"`
20744
20745 Location *string `json:"location,omitempty"`
20746
20747 Tags map[string]*string `json:"tags"`
20748
20749 ETag *string `json:"eTag,omitempty"`
20750 }
20751
20752
20753 func (rvcr ResourceVaultConfigResource) MarshalJSON() ([]byte, error) {
20754 objectMap := make(map[string]interface{})
20755 if rvcr.Properties != nil {
20756 objectMap["properties"] = rvcr.Properties
20757 }
20758 if rvcr.Location != nil {
20759 objectMap["location"] = rvcr.Location
20760 }
20761 if rvcr.Tags != nil {
20762 objectMap["tags"] = rvcr.Tags
20763 }
20764 if rvcr.ETag != nil {
20765 objectMap["eTag"] = rvcr.ETag
20766 }
20767 return json.Marshal(objectMap)
20768 }
20769
20770
20771 type RestoreFileSpecs struct {
20772
20773 Path *string `json:"path,omitempty"`
20774
20775 FileSpecType *string `json:"fileSpecType,omitempty"`
20776
20777 TargetFolderPath *string `json:"targetFolderPath,omitempty"`
20778 }
20779
20780
20781 type BasicRestoreRequest interface {
20782 AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool)
20783 AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool)
20784 AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool)
20785 AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool)
20786 AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
20787 AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool)
20788 AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool)
20789 AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool)
20790 AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool)
20791 AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool)
20792 AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool)
20793 AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool)
20794 AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool)
20795 AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool)
20796 AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool)
20797 AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool)
20798 AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool)
20799 AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool)
20800 AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool)
20801 AsRestoreRequest() (*RestoreRequest, bool)
20802 }
20803
20804
20805
20806 type RestoreRequest struct {
20807
20808 ObjectType ObjectTypeBasicRestoreRequest `json:"objectType,omitempty"`
20809 }
20810
20811 func unmarshalBasicRestoreRequest(body []byte) (BasicRestoreRequest, error) {
20812 var m map[string]interface{}
20813 err := json.Unmarshal(body, &m)
20814 if err != nil {
20815 return nil, err
20816 }
20817
20818 switch m["objectType"] {
20819 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureFileShareRestoreRequest):
20820 var afsrr AzureFileShareRestoreRequest
20821 err := json.Unmarshal(body, &afsrr)
20822 return afsrr, err
20823 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadPointInTimeRestoreRequest):
20824 var awpitrr AzureWorkloadPointInTimeRestoreRequest
20825 err := json.Unmarshal(body, &awpitrr)
20826 return awpitrr, err
20827 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadRestoreRequest):
20828 var awrr AzureWorkloadRestoreRequest
20829 err := json.Unmarshal(body, &awrr)
20830 return awrr, err
20831 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreRequest):
20832 var awshpitrr AzureWorkloadSAPHanaPointInTimeRestoreRequest
20833 err := json.Unmarshal(body, &awshpitrr)
20834 return awshpitrr, err
20835 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreRequest):
20836 var awshrr AzureWorkloadSAPHanaRestoreRequest
20837 err := json.Unmarshal(body, &awshrr)
20838 return awshrr, err
20839 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreRequest):
20840 var awspitrr AzureWorkloadSQLPointInTimeRestoreRequest
20841 err := json.Unmarshal(body, &awspitrr)
20842 return awspitrr, err
20843 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreRequest):
20844 var awsrr AzureWorkloadSQLRestoreRequest
20845 err := json.Unmarshal(body, &awsrr)
20846 return awsrr, err
20847 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreRequest):
20848 var ivrr IaasVMRestoreRequest
20849 err := json.Unmarshal(body, &ivrr)
20850 return ivrr, err
20851 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest):
20852 var awshpitrwrr AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest
20853 err := json.Unmarshal(body, &awshpitrwrr)
20854 return awshpitrwrr, err
20855 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSAPHanaRestoreWithRehydrateRequest):
20856 var awshrwrr AzureWorkloadSAPHanaRestoreWithRehydrateRequest
20857 err := json.Unmarshal(body, &awshrwrr)
20858 return awshrwrr, err
20859 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest):
20860 var awspitrwrr AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest
20861 err := json.Unmarshal(body, &awspitrwrr)
20862 return awspitrwrr, err
20863 case string(ObjectTypeBasicRestoreRequestObjectTypeAzureWorkloadSQLRestoreWithRehydrateRequest):
20864 var awsrwrr AzureWorkloadSQLRestoreWithRehydrateRequest
20865 err := json.Unmarshal(body, &awsrwrr)
20866 return awsrwrr, err
20867 case string(ObjectTypeBasicRestoreRequestObjectTypeIaasVMRestoreWithRehydrationRequest):
20868 var ivrwrr IaasVMRestoreWithRehydrationRequest
20869 err := json.Unmarshal(body, &ivrwrr)
20870 return ivrwrr, err
20871 default:
20872 var rr RestoreRequest
20873 err := json.Unmarshal(body, &rr)
20874 return rr, err
20875 }
20876 }
20877 func unmarshalBasicRestoreRequestArray(body []byte) ([]BasicRestoreRequest, error) {
20878 var rawMessages []*json.RawMessage
20879 err := json.Unmarshal(body, &rawMessages)
20880 if err != nil {
20881 return nil, err
20882 }
20883
20884 rrArray := make([]BasicRestoreRequest, len(rawMessages))
20885
20886 for index, rawMessage := range rawMessages {
20887 rr, err := unmarshalBasicRestoreRequest(*rawMessage)
20888 if err != nil {
20889 return nil, err
20890 }
20891 rrArray[index] = rr
20892 }
20893 return rrArray, nil
20894 }
20895
20896
20897 func (rr RestoreRequest) MarshalJSON() ([]byte, error) {
20898 rr.ObjectType = ObjectTypeBasicRestoreRequestObjectTypeRestoreRequest
20899 objectMap := make(map[string]interface{})
20900 if rr.ObjectType != "" {
20901 objectMap["objectType"] = rr.ObjectType
20902 }
20903 return json.Marshal(objectMap)
20904 }
20905
20906
20907 func (rr RestoreRequest) AsAzureFileShareRestoreRequest() (*AzureFileShareRestoreRequest, bool) {
20908 return nil, false
20909 }
20910
20911
20912 func (rr RestoreRequest) AsAzureWorkloadPointInTimeRestoreRequest() (*AzureWorkloadPointInTimeRestoreRequest, bool) {
20913 return nil, false
20914 }
20915
20916
20917 func (rr RestoreRequest) AsAzureWorkloadRestoreRequest() (*AzureWorkloadRestoreRequest, bool) {
20918 return nil, false
20919 }
20920
20921
20922 func (rr RestoreRequest) AsBasicAzureWorkloadRestoreRequest() (BasicAzureWorkloadRestoreRequest, bool) {
20923 return nil, false
20924 }
20925
20926
20927 func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
20928 return nil, false
20929 }
20930
20931
20932 func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaPointInTimeRestoreRequest() (BasicAzureWorkloadSAPHanaPointInTimeRestoreRequest, bool) {
20933 return nil, false
20934 }
20935
20936
20937 func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreRequest() (*AzureWorkloadSAPHanaRestoreRequest, bool) {
20938 return nil, false
20939 }
20940
20941
20942 func (rr RestoreRequest) AsBasicAzureWorkloadSAPHanaRestoreRequest() (BasicAzureWorkloadSAPHanaRestoreRequest, bool) {
20943 return nil, false
20944 }
20945
20946
20947 func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreRequest() (*AzureWorkloadSQLPointInTimeRestoreRequest, bool) {
20948 return nil, false
20949 }
20950
20951
20952 func (rr RestoreRequest) AsBasicAzureWorkloadSQLPointInTimeRestoreRequest() (BasicAzureWorkloadSQLPointInTimeRestoreRequest, bool) {
20953 return nil, false
20954 }
20955
20956
20957 func (rr RestoreRequest) AsAzureWorkloadSQLRestoreRequest() (*AzureWorkloadSQLRestoreRequest, bool) {
20958 return nil, false
20959 }
20960
20961
20962 func (rr RestoreRequest) AsBasicAzureWorkloadSQLRestoreRequest() (BasicAzureWorkloadSQLRestoreRequest, bool) {
20963 return nil, false
20964 }
20965
20966
20967 func (rr RestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) {
20968 return nil, false
20969 }
20970
20971
20972 func (rr RestoreRequest) AsBasicIaasVMRestoreRequest() (BasicIaasVMRestoreRequest, bool) {
20973 return nil, false
20974 }
20975
20976
20977 func (rr RestoreRequest) AsAzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest, bool) {
20978 return nil, false
20979 }
20980
20981
20982 func (rr RestoreRequest) AsAzureWorkloadSAPHanaRestoreWithRehydrateRequest() (*AzureWorkloadSAPHanaRestoreWithRehydrateRequest, bool) {
20983 return nil, false
20984 }
20985
20986
20987 func (rr RestoreRequest) AsAzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest() (*AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest, bool) {
20988 return nil, false
20989 }
20990
20991
20992 func (rr RestoreRequest) AsAzureWorkloadSQLRestoreWithRehydrateRequest() (*AzureWorkloadSQLRestoreWithRehydrateRequest, bool) {
20993 return nil, false
20994 }
20995
20996
20997 func (rr RestoreRequest) AsIaasVMRestoreWithRehydrationRequest() (*IaasVMRestoreWithRehydrationRequest, bool) {
20998 return nil, false
20999 }
21000
21001
21002 func (rr RestoreRequest) AsRestoreRequest() (*RestoreRequest, bool) {
21003 return &rr, true
21004 }
21005
21006
21007 func (rr RestoreRequest) AsBasicRestoreRequest() (BasicRestoreRequest, bool) {
21008 return &rr, true
21009 }
21010
21011
21012
21013 type RestoreRequestResource struct {
21014
21015 Properties BasicRestoreRequest `json:"properties,omitempty"`
21016
21017 ID *string `json:"id,omitempty"`
21018
21019 Name *string `json:"name,omitempty"`
21020
21021 Type *string `json:"type,omitempty"`
21022
21023 Location *string `json:"location,omitempty"`
21024
21025 Tags map[string]*string `json:"tags"`
21026
21027 ETag *string `json:"eTag,omitempty"`
21028 }
21029
21030
21031 func (rrr RestoreRequestResource) MarshalJSON() ([]byte, error) {
21032 objectMap := make(map[string]interface{})
21033 objectMap["properties"] = rrr.Properties
21034 if rrr.Location != nil {
21035 objectMap["location"] = rrr.Location
21036 }
21037 if rrr.Tags != nil {
21038 objectMap["tags"] = rrr.Tags
21039 }
21040 if rrr.ETag != nil {
21041 objectMap["eTag"] = rrr.ETag
21042 }
21043 return json.Marshal(objectMap)
21044 }
21045
21046
21047 func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error {
21048 var m map[string]*json.RawMessage
21049 err := json.Unmarshal(body, &m)
21050 if err != nil {
21051 return err
21052 }
21053 for k, v := range m {
21054 switch k {
21055 case "properties":
21056 if v != nil {
21057 properties, err := unmarshalBasicRestoreRequest(*v)
21058 if err != nil {
21059 return err
21060 }
21061 rrr.Properties = properties
21062 }
21063 case "id":
21064 if v != nil {
21065 var ID string
21066 err = json.Unmarshal(*v, &ID)
21067 if err != nil {
21068 return err
21069 }
21070 rrr.ID = &ID
21071 }
21072 case "name":
21073 if v != nil {
21074 var name string
21075 err = json.Unmarshal(*v, &name)
21076 if err != nil {
21077 return err
21078 }
21079 rrr.Name = &name
21080 }
21081 case "type":
21082 if v != nil {
21083 var typeVar string
21084 err = json.Unmarshal(*v, &typeVar)
21085 if err != nil {
21086 return err
21087 }
21088 rrr.Type = &typeVar
21089 }
21090 case "location":
21091 if v != nil {
21092 var location string
21093 err = json.Unmarshal(*v, &location)
21094 if err != nil {
21095 return err
21096 }
21097 rrr.Location = &location
21098 }
21099 case "tags":
21100 if v != nil {
21101 var tags map[string]*string
21102 err = json.Unmarshal(*v, &tags)
21103 if err != nil {
21104 return err
21105 }
21106 rrr.Tags = tags
21107 }
21108 case "eTag":
21109 if v != nil {
21110 var eTag string
21111 err = json.Unmarshal(*v, &eTag)
21112 if err != nil {
21113 return err
21114 }
21115 rrr.ETag = &eTag
21116 }
21117 }
21118 }
21119
21120 return nil
21121 }
21122
21123
21124
21125 type RestoresTriggerFuture struct {
21126 azure.FutureAPI
21127
21128
21129 Result func(RestoresClient) (autorest.Response, error)
21130 }
21131
21132
21133 func (future *RestoresTriggerFuture) UnmarshalJSON(body []byte) error {
21134 var azFuture azure.Future
21135 if err := json.Unmarshal(body, &azFuture); err != nil {
21136 return err
21137 }
21138 future.FutureAPI = &azFuture
21139 future.Result = future.result
21140 return nil
21141 }
21142
21143
21144 func (future *RestoresTriggerFuture) result(client RestoresClient) (ar autorest.Response, err error) {
21145 var done bool
21146 done, err = future.DoneWithContext(context.Background(), client)
21147 if err != nil {
21148 err = autorest.NewErrorWithError(err, "backup.RestoresTriggerFuture", "Result", future.Response(), "Polling failure")
21149 return
21150 }
21151 if !done {
21152 ar.Response = future.Response()
21153 err = azure.NewAsyncOpIncompleteError("backup.RestoresTriggerFuture")
21154 return
21155 }
21156 ar.Response = future.Response()
21157 return
21158 }
21159
21160
21161 type RetentionDuration struct {
21162
21163
21164 Count *int32 `json:"count,omitempty"`
21165
21166 DurationType RetentionDurationType `json:"durationType,omitempty"`
21167 }
21168
21169
21170 type BasicRetentionPolicy interface {
21171 AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool)
21172 AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool)
21173 AsRetentionPolicy() (*RetentionPolicy, bool)
21174 }
21175
21176
21177 type RetentionPolicy struct {
21178
21179 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
21180 }
21181
21182 func unmarshalBasicRetentionPolicy(body []byte) (BasicRetentionPolicy, error) {
21183 var m map[string]interface{}
21184 err := json.Unmarshal(body, &m)
21185 if err != nil {
21186 return nil, err
21187 }
21188
21189 switch m["retentionPolicyType"] {
21190 case string(RetentionPolicyTypeLongTermRetentionPolicy):
21191 var ltrp LongTermRetentionPolicy
21192 err := json.Unmarshal(body, <rp)
21193 return ltrp, err
21194 case string(RetentionPolicyTypeSimpleRetentionPolicy):
21195 var srp SimpleRetentionPolicy
21196 err := json.Unmarshal(body, &srp)
21197 return srp, err
21198 default:
21199 var rp RetentionPolicy
21200 err := json.Unmarshal(body, &rp)
21201 return rp, err
21202 }
21203 }
21204 func unmarshalBasicRetentionPolicyArray(body []byte) ([]BasicRetentionPolicy, error) {
21205 var rawMessages []*json.RawMessage
21206 err := json.Unmarshal(body, &rawMessages)
21207 if err != nil {
21208 return nil, err
21209 }
21210
21211 rpArray := make([]BasicRetentionPolicy, len(rawMessages))
21212
21213 for index, rawMessage := range rawMessages {
21214 rp, err := unmarshalBasicRetentionPolicy(*rawMessage)
21215 if err != nil {
21216 return nil, err
21217 }
21218 rpArray[index] = rp
21219 }
21220 return rpArray, nil
21221 }
21222
21223
21224 func (rp RetentionPolicy) MarshalJSON() ([]byte, error) {
21225 rp.RetentionPolicyType = RetentionPolicyTypeRetentionPolicy
21226 objectMap := make(map[string]interface{})
21227 if rp.RetentionPolicyType != "" {
21228 objectMap["retentionPolicyType"] = rp.RetentionPolicyType
21229 }
21230 return json.Marshal(objectMap)
21231 }
21232
21233
21234 func (rp RetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
21235 return nil, false
21236 }
21237
21238
21239 func (rp RetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
21240 return nil, false
21241 }
21242
21243
21244 func (rp RetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
21245 return &rp, true
21246 }
21247
21248
21249 func (rp RetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
21250 return &rp, true
21251 }
21252
21253
21254 type BasicSchedulePolicy interface {
21255 AsLogSchedulePolicy() (*LogSchedulePolicy, bool)
21256 AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool)
21257 AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool)
21258 AsSchedulePolicy() (*SchedulePolicy, bool)
21259 }
21260
21261
21262 type SchedulePolicy struct {
21263
21264 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
21265 }
21266
21267 func unmarshalBasicSchedulePolicy(body []byte) (BasicSchedulePolicy, error) {
21268 var m map[string]interface{}
21269 err := json.Unmarshal(body, &m)
21270 if err != nil {
21271 return nil, err
21272 }
21273
21274 switch m["schedulePolicyType"] {
21275 case string(SchedulePolicyTypeLogSchedulePolicy):
21276 var lsp LogSchedulePolicy
21277 err := json.Unmarshal(body, &lsp)
21278 return lsp, err
21279 case string(SchedulePolicyTypeLongTermSchedulePolicy):
21280 var ltsp LongTermSchedulePolicy
21281 err := json.Unmarshal(body, <sp)
21282 return ltsp, err
21283 case string(SchedulePolicyTypeSimpleSchedulePolicy):
21284 var ssp SimpleSchedulePolicy
21285 err := json.Unmarshal(body, &ssp)
21286 return ssp, err
21287 default:
21288 var sp SchedulePolicy
21289 err := json.Unmarshal(body, &sp)
21290 return sp, err
21291 }
21292 }
21293 func unmarshalBasicSchedulePolicyArray(body []byte) ([]BasicSchedulePolicy, error) {
21294 var rawMessages []*json.RawMessage
21295 err := json.Unmarshal(body, &rawMessages)
21296 if err != nil {
21297 return nil, err
21298 }
21299
21300 spArray := make([]BasicSchedulePolicy, len(rawMessages))
21301
21302 for index, rawMessage := range rawMessages {
21303 sp, err := unmarshalBasicSchedulePolicy(*rawMessage)
21304 if err != nil {
21305 return nil, err
21306 }
21307 spArray[index] = sp
21308 }
21309 return spArray, nil
21310 }
21311
21312
21313 func (sp SchedulePolicy) MarshalJSON() ([]byte, error) {
21314 sp.SchedulePolicyType = SchedulePolicyTypeSchedulePolicy
21315 objectMap := make(map[string]interface{})
21316 if sp.SchedulePolicyType != "" {
21317 objectMap["schedulePolicyType"] = sp.SchedulePolicyType
21318 }
21319 return json.Marshal(objectMap)
21320 }
21321
21322
21323 func (sp SchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
21324 return nil, false
21325 }
21326
21327
21328 func (sp SchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
21329 return nil, false
21330 }
21331
21332
21333 func (sp SchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
21334 return nil, false
21335 }
21336
21337
21338 func (sp SchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
21339 return &sp, true
21340 }
21341
21342
21343 func (sp SchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
21344 return &sp, true
21345 }
21346
21347
21348 type SecurityPinBase struct {
21349
21350 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
21351 }
21352
21353
21354 type Settings struct {
21355
21356 TimeZone *string `json:"timeZone,omitempty"`
21357
21358 Issqlcompression *bool `json:"issqlcompression,omitempty"`
21359
21360
21361 IsCompression *bool `json:"isCompression,omitempty"`
21362 }
21363
21364
21365 type SimpleRetentionPolicy struct {
21366
21367 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
21368
21369 RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"`
21370 }
21371
21372
21373 func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) {
21374 srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy
21375 objectMap := make(map[string]interface{})
21376 if srp.RetentionDuration != nil {
21377 objectMap["retentionDuration"] = srp.RetentionDuration
21378 }
21379 if srp.RetentionPolicyType != "" {
21380 objectMap["retentionPolicyType"] = srp.RetentionPolicyType
21381 }
21382 return json.Marshal(objectMap)
21383 }
21384
21385
21386 func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) {
21387 return nil, false
21388 }
21389
21390
21391 func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) {
21392 return &srp, true
21393 }
21394
21395
21396 func (srp SimpleRetentionPolicy) AsRetentionPolicy() (*RetentionPolicy, bool) {
21397 return nil, false
21398 }
21399
21400
21401 func (srp SimpleRetentionPolicy) AsBasicRetentionPolicy() (BasicRetentionPolicy, bool) {
21402 return &srp, true
21403 }
21404
21405
21406 type SimpleSchedulePolicy struct {
21407
21408 ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"`
21409
21410 ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"`
21411
21412 ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"`
21413
21414 ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"`
21415
21416 SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"`
21417 }
21418
21419
21420 func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) {
21421 ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy
21422 objectMap := make(map[string]interface{})
21423 if ssp.ScheduleRunFrequency != "" {
21424 objectMap["scheduleRunFrequency"] = ssp.ScheduleRunFrequency
21425 }
21426 if ssp.ScheduleRunDays != nil {
21427 objectMap["scheduleRunDays"] = ssp.ScheduleRunDays
21428 }
21429 if ssp.ScheduleRunTimes != nil {
21430 objectMap["scheduleRunTimes"] = ssp.ScheduleRunTimes
21431 }
21432 if ssp.ScheduleWeeklyFrequency != nil {
21433 objectMap["scheduleWeeklyFrequency"] = ssp.ScheduleWeeklyFrequency
21434 }
21435 if ssp.SchedulePolicyType != "" {
21436 objectMap["schedulePolicyType"] = ssp.SchedulePolicyType
21437 }
21438 return json.Marshal(objectMap)
21439 }
21440
21441
21442 func (ssp SimpleSchedulePolicy) AsLogSchedulePolicy() (*LogSchedulePolicy, bool) {
21443 return nil, false
21444 }
21445
21446
21447 func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) {
21448 return nil, false
21449 }
21450
21451
21452 func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) {
21453 return &ssp, true
21454 }
21455
21456
21457 func (ssp SimpleSchedulePolicy) AsSchedulePolicy() (*SchedulePolicy, bool) {
21458 return nil, false
21459 }
21460
21461
21462 func (ssp SimpleSchedulePolicy) AsBasicSchedulePolicy() (BasicSchedulePolicy, bool) {
21463 return &ssp, true
21464 }
21465
21466
21467 type SQLDataDirectory struct {
21468
21469 Type SQLDataDirectoryType `json:"type,omitempty"`
21470
21471 Path *string `json:"path,omitempty"`
21472
21473 LogicalName *string `json:"logicalName,omitempty"`
21474 }
21475
21476
21477 type SQLDataDirectoryMapping struct {
21478
21479 MappingType SQLDataDirectoryType `json:"mappingType,omitempty"`
21480
21481 SourceLogicalName *string `json:"sourceLogicalName,omitempty"`
21482
21483 SourcePath *string `json:"sourcePath,omitempty"`
21484
21485 TargetPath *string `json:"targetPath,omitempty"`
21486 }
21487
21488
21489 type StatusRequest struct {
21490
21491 ResourceType DataSourceType `json:"resourceType,omitempty"`
21492
21493 ResourceID *string `json:"resourceId,omitempty"`
21494
21495 PoLogicalName *string `json:"poLogicalName,omitempty"`
21496 }
21497
21498
21499 type StatusResponse struct {
21500 autorest.Response `json:"-"`
21501
21502 ProtectionStatus ProtectionStatus `json:"protectionStatus,omitempty"`
21503
21504 VaultID *string `json:"vaultId,omitempty"`
21505
21506 FabricName FabricName `json:"fabricName,omitempty"`
21507
21508 ContainerName *string `json:"containerName,omitempty"`
21509
21510 ProtectedItemName *string `json:"protectedItemName,omitempty"`
21511
21512 ErrorCode *string `json:"errorCode,omitempty"`
21513
21514 ErrorMessage *string `json:"errorMessage,omitempty"`
21515
21516 PolicyName *string `json:"policyName,omitempty"`
21517
21518 RegistrationStatus *string `json:"registrationStatus,omitempty"`
21519 }
21520
21521
21522 type SubProtectionPolicy struct {
21523
21524 PolicyType PolicyType `json:"policyType,omitempty"`
21525
21526 SchedulePolicy BasicSchedulePolicy `json:"schedulePolicy,omitempty"`
21527
21528 RetentionPolicy BasicRetentionPolicy `json:"retentionPolicy,omitempty"`
21529 }
21530
21531
21532 func (spp *SubProtectionPolicy) UnmarshalJSON(body []byte) error {
21533 var m map[string]*json.RawMessage
21534 err := json.Unmarshal(body, &m)
21535 if err != nil {
21536 return err
21537 }
21538 for k, v := range m {
21539 switch k {
21540 case "policyType":
21541 if v != nil {
21542 var policyType PolicyType
21543 err = json.Unmarshal(*v, &policyType)
21544 if err != nil {
21545 return err
21546 }
21547 spp.PolicyType = policyType
21548 }
21549 case "schedulePolicy":
21550 if v != nil {
21551 schedulePolicy, err := unmarshalBasicSchedulePolicy(*v)
21552 if err != nil {
21553 return err
21554 }
21555 spp.SchedulePolicy = schedulePolicy
21556 }
21557 case "retentionPolicy":
21558 if v != nil {
21559 retentionPolicy, err := unmarshalBasicRetentionPolicy(*v)
21560 if err != nil {
21561 return err
21562 }
21563 spp.RetentionPolicy = retentionPolicy
21564 }
21565 }
21566 }
21567
21568 return nil
21569 }
21570
21571
21572 type TargetAFSRestoreInfo struct {
21573
21574 Name *string `json:"name,omitempty"`
21575
21576 TargetResourceID *string `json:"targetResourceId,omitempty"`
21577 }
21578
21579
21580 type TargetRestoreInfo struct {
21581
21582 OverwriteOption OverwriteOptions `json:"overwriteOption,omitempty"`
21583
21584 ContainerID *string `json:"containerId,omitempty"`
21585
21586 DatabaseName *string `json:"databaseName,omitempty"`
21587
21588 TargetDirectoryForFileRestore *string `json:"targetDirectoryForFileRestore,omitempty"`
21589 }
21590
21591
21592 type TokenInformation struct {
21593 autorest.Response `json:"-"`
21594
21595 Token *string `json:"token,omitempty"`
21596
21597 ExpiryTimeInUtcTicks *int64 `json:"expiryTimeInUtcTicks,omitempty"`
21598
21599 SecurityPIN *string `json:"securityPIN,omitempty"`
21600 }
21601
21602
21603 type TriggerDataMoveRequest struct {
21604
21605 SourceResourceID *string `json:"sourceResourceId,omitempty"`
21606
21607 SourceRegion *string `json:"sourceRegion,omitempty"`
21608
21609 DataMoveLevel DataMoveLevel `json:"dataMoveLevel,omitempty"`
21610
21611 CorrelationID *string `json:"correlationId,omitempty"`
21612
21613 SourceContainerArmIds *[]string `json:"sourceContainerArmIds,omitempty"`
21614
21615 PauseGC *bool `json:"pauseGC,omitempty"`
21616 }
21617
21618
21619 type UnlockDeleteRequest struct {
21620 ResourceGuardOperationRequests *[]string `json:"resourceGuardOperationRequests,omitempty"`
21621 ResourceToBeDeleted *string `json:"resourceToBeDeleted,omitempty"`
21622 }
21623
21624
21625 type UnlockDeleteResponse struct {
21626 autorest.Response `json:"-"`
21627
21628 UnlockDeleteExpiryTime *string `json:"unlockDeleteExpiryTime,omitempty"`
21629 }
21630
21631
21632 type ValidateIaasVMRestoreOperationRequest struct {
21633
21634 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
21635
21636 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21637 }
21638
21639
21640 func (vivror ValidateIaasVMRestoreOperationRequest) MarshalJSON() ([]byte, error) {
21641 vivror.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest
21642 objectMap := make(map[string]interface{})
21643 objectMap["restoreRequest"] = vivror.RestoreRequest
21644 if vivror.ObjectType != "" {
21645 objectMap["objectType"] = vivror.ObjectType
21646 }
21647 return json.Marshal(objectMap)
21648 }
21649
21650
21651 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21652 return &vivror, true
21653 }
21654
21655
21656 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21657 return nil, false
21658 }
21659
21660
21661 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21662 return &vivror, true
21663 }
21664
21665
21666 func (vivror ValidateIaasVMRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21667 return nil, false
21668 }
21669
21670
21671 func (vivror ValidateIaasVMRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21672 return &vivror, true
21673 }
21674
21675
21676 func (vivror *ValidateIaasVMRestoreOperationRequest) UnmarshalJSON(body []byte) error {
21677 var m map[string]*json.RawMessage
21678 err := json.Unmarshal(body, &m)
21679 if err != nil {
21680 return err
21681 }
21682 for k, v := range m {
21683 switch k {
21684 case "restoreRequest":
21685 if v != nil {
21686 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
21687 if err != nil {
21688 return err
21689 }
21690 vivror.RestoreRequest = restoreRequest
21691 }
21692 case "objectType":
21693 if v != nil {
21694 var objectType ObjectTypeBasicValidateOperationRequest
21695 err = json.Unmarshal(*v, &objectType)
21696 if err != nil {
21697 return err
21698 }
21699 vivror.ObjectType = objectType
21700 }
21701 }
21702 }
21703
21704 return nil
21705 }
21706
21707
21708 type BasicValidateOperationRequest interface {
21709 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
21710 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
21711 AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool)
21712 AsValidateOperationRequest() (*ValidateOperationRequest, bool)
21713 }
21714
21715
21716 type ValidateOperationRequest struct {
21717
21718 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21719 }
21720
21721 func unmarshalBasicValidateOperationRequest(body []byte) (BasicValidateOperationRequest, error) {
21722 var m map[string]interface{}
21723 err := json.Unmarshal(body, &m)
21724 if err != nil {
21725 return nil, err
21726 }
21727
21728 switch m["objectType"] {
21729 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest):
21730 var vivror ValidateIaasVMRestoreOperationRequest
21731 err := json.Unmarshal(body, &vivror)
21732 return vivror, err
21733 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest):
21734 var vror ValidateRestoreOperationRequest
21735 err := json.Unmarshal(body, &vror)
21736 return vror, err
21737 default:
21738 var vor ValidateOperationRequest
21739 err := json.Unmarshal(body, &vor)
21740 return vor, err
21741 }
21742 }
21743 func unmarshalBasicValidateOperationRequestArray(body []byte) ([]BasicValidateOperationRequest, error) {
21744 var rawMessages []*json.RawMessage
21745 err := json.Unmarshal(body, &rawMessages)
21746 if err != nil {
21747 return nil, err
21748 }
21749
21750 vorArray := make([]BasicValidateOperationRequest, len(rawMessages))
21751
21752 for index, rawMessage := range rawMessages {
21753 vor, err := unmarshalBasicValidateOperationRequest(*rawMessage)
21754 if err != nil {
21755 return nil, err
21756 }
21757 vorArray[index] = vor
21758 }
21759 return vorArray, nil
21760 }
21761
21762
21763 func (vor ValidateOperationRequest) MarshalJSON() ([]byte, error) {
21764 vor.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateOperationRequest
21765 objectMap := make(map[string]interface{})
21766 if vor.ObjectType != "" {
21767 objectMap["objectType"] = vor.ObjectType
21768 }
21769 return json.Marshal(objectMap)
21770 }
21771
21772
21773 func (vor ValidateOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21774 return nil, false
21775 }
21776
21777
21778 func (vor ValidateOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21779 return nil, false
21780 }
21781
21782
21783 func (vor ValidateOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21784 return nil, false
21785 }
21786
21787
21788 func (vor ValidateOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21789 return &vor, true
21790 }
21791
21792
21793 func (vor ValidateOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21794 return &vor, true
21795 }
21796
21797
21798 type ValidateOperationResponse struct {
21799
21800 ValidationResults *[]ErrorDetail `json:"validationResults,omitempty"`
21801 }
21802
21803
21804 type ValidateOperationsResponse struct {
21805 autorest.Response `json:"-"`
21806 ValidateOperationResponse *ValidateOperationResponse `json:"validateOperationResponse,omitempty"`
21807 }
21808
21809
21810 type BasicValidateRestoreOperationRequest interface {
21811 AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool)
21812 AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool)
21813 }
21814
21815
21816 type ValidateRestoreOperationRequest struct {
21817
21818 RestoreRequest BasicRestoreRequest `json:"restoreRequest,omitempty"`
21819
21820 ObjectType ObjectTypeBasicValidateOperationRequest `json:"objectType,omitempty"`
21821 }
21822
21823 func unmarshalBasicValidateRestoreOperationRequest(body []byte) (BasicValidateRestoreOperationRequest, error) {
21824 var m map[string]interface{}
21825 err := json.Unmarshal(body, &m)
21826 if err != nil {
21827 return nil, err
21828 }
21829
21830 switch m["objectType"] {
21831 case string(ObjectTypeBasicValidateOperationRequestObjectTypeValidateIaasVMRestoreOperationRequest):
21832 var vivror ValidateIaasVMRestoreOperationRequest
21833 err := json.Unmarshal(body, &vivror)
21834 return vivror, err
21835 default:
21836 var vror ValidateRestoreOperationRequest
21837 err := json.Unmarshal(body, &vror)
21838 return vror, err
21839 }
21840 }
21841 func unmarshalBasicValidateRestoreOperationRequestArray(body []byte) ([]BasicValidateRestoreOperationRequest, error) {
21842 var rawMessages []*json.RawMessage
21843 err := json.Unmarshal(body, &rawMessages)
21844 if err != nil {
21845 return nil, err
21846 }
21847
21848 vrorArray := make([]BasicValidateRestoreOperationRequest, len(rawMessages))
21849
21850 for index, rawMessage := range rawMessages {
21851 vror, err := unmarshalBasicValidateRestoreOperationRequest(*rawMessage)
21852 if err != nil {
21853 return nil, err
21854 }
21855 vrorArray[index] = vror
21856 }
21857 return vrorArray, nil
21858 }
21859
21860
21861 func (vror ValidateRestoreOperationRequest) MarshalJSON() ([]byte, error) {
21862 vror.ObjectType = ObjectTypeBasicValidateOperationRequestObjectTypeValidateRestoreOperationRequest
21863 objectMap := make(map[string]interface{})
21864 objectMap["restoreRequest"] = vror.RestoreRequest
21865 if vror.ObjectType != "" {
21866 objectMap["objectType"] = vror.ObjectType
21867 }
21868 return json.Marshal(objectMap)
21869 }
21870
21871
21872 func (vror ValidateRestoreOperationRequest) AsValidateIaasVMRestoreOperationRequest() (*ValidateIaasVMRestoreOperationRequest, bool) {
21873 return nil, false
21874 }
21875
21876
21877 func (vror ValidateRestoreOperationRequest) AsValidateRestoreOperationRequest() (*ValidateRestoreOperationRequest, bool) {
21878 return &vror, true
21879 }
21880
21881
21882 func (vror ValidateRestoreOperationRequest) AsBasicValidateRestoreOperationRequest() (BasicValidateRestoreOperationRequest, bool) {
21883 return &vror, true
21884 }
21885
21886
21887 func (vror ValidateRestoreOperationRequest) AsValidateOperationRequest() (*ValidateOperationRequest, bool) {
21888 return nil, false
21889 }
21890
21891
21892 func (vror ValidateRestoreOperationRequest) AsBasicValidateOperationRequest() (BasicValidateOperationRequest, bool) {
21893 return &vror, true
21894 }
21895
21896
21897 func (vror *ValidateRestoreOperationRequest) UnmarshalJSON(body []byte) error {
21898 var m map[string]*json.RawMessage
21899 err := json.Unmarshal(body, &m)
21900 if err != nil {
21901 return err
21902 }
21903 for k, v := range m {
21904 switch k {
21905 case "restoreRequest":
21906 if v != nil {
21907 restoreRequest, err := unmarshalBasicRestoreRequest(*v)
21908 if err != nil {
21909 return err
21910 }
21911 vror.RestoreRequest = restoreRequest
21912 }
21913 case "objectType":
21914 if v != nil {
21915 var objectType ObjectTypeBasicValidateOperationRequest
21916 err = json.Unmarshal(*v, &objectType)
21917 if err != nil {
21918 return err
21919 }
21920 vror.ObjectType = objectType
21921 }
21922 }
21923 }
21924
21925 return nil
21926 }
21927
21928
21929 type VaultJob struct {
21930
21931 Duration *string `json:"duration,omitempty"`
21932
21933 ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"`
21934
21935 ErrorDetails *[]VaultJobErrorInfo `json:"errorDetails,omitempty"`
21936
21937 ExtendedInfo *VaultJobExtendedInfo `json:"extendedInfo,omitempty"`
21938
21939 EntityFriendlyName *string `json:"entityFriendlyName,omitempty"`
21940
21941 BackupManagementType ManagementType `json:"backupManagementType,omitempty"`
21942
21943 Operation *string `json:"operation,omitempty"`
21944
21945 Status *string `json:"status,omitempty"`
21946
21947 StartTime *date.Time `json:"startTime,omitempty"`
21948
21949 EndTime *date.Time `json:"endTime,omitempty"`
21950
21951 ActivityID *string `json:"activityId,omitempty"`
21952
21953 JobType JobType `json:"jobType,omitempty"`
21954 }
21955
21956
21957 func (vj VaultJob) MarshalJSON() ([]byte, error) {
21958 vj.JobType = JobTypeVaultJob
21959 objectMap := make(map[string]interface{})
21960 if vj.Duration != nil {
21961 objectMap["duration"] = vj.Duration
21962 }
21963 if vj.ActionsInfo != nil {
21964 objectMap["actionsInfo"] = vj.ActionsInfo
21965 }
21966 if vj.ErrorDetails != nil {
21967 objectMap["errorDetails"] = vj.ErrorDetails
21968 }
21969 if vj.ExtendedInfo != nil {
21970 objectMap["extendedInfo"] = vj.ExtendedInfo
21971 }
21972 if vj.EntityFriendlyName != nil {
21973 objectMap["entityFriendlyName"] = vj.EntityFriendlyName
21974 }
21975 if vj.BackupManagementType != "" {
21976 objectMap["backupManagementType"] = vj.BackupManagementType
21977 }
21978 if vj.Operation != nil {
21979 objectMap["operation"] = vj.Operation
21980 }
21981 if vj.Status != nil {
21982 objectMap["status"] = vj.Status
21983 }
21984 if vj.StartTime != nil {
21985 objectMap["startTime"] = vj.StartTime
21986 }
21987 if vj.EndTime != nil {
21988 objectMap["endTime"] = vj.EndTime
21989 }
21990 if vj.ActivityID != nil {
21991 objectMap["activityId"] = vj.ActivityID
21992 }
21993 if vj.JobType != "" {
21994 objectMap["jobType"] = vj.JobType
21995 }
21996 return json.Marshal(objectMap)
21997 }
21998
21999
22000 func (vj VaultJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) {
22001 return nil, false
22002 }
22003
22004
22005 func (vj VaultJob) AsAzureStorageJob() (*AzureStorageJob, bool) {
22006 return nil, false
22007 }
22008
22009
22010 func (vj VaultJob) AsAzureWorkloadJob() (*AzureWorkloadJob, bool) {
22011 return nil, false
22012 }
22013
22014
22015 func (vj VaultJob) AsDpmJob() (*DpmJob, bool) {
22016 return nil, false
22017 }
22018
22019
22020 func (vj VaultJob) AsMabJob() (*MabJob, bool) {
22021 return nil, false
22022 }
22023
22024
22025 func (vj VaultJob) AsVaultJob() (*VaultJob, bool) {
22026 return &vj, true
22027 }
22028
22029
22030 func (vj VaultJob) AsJob() (*Job, bool) {
22031 return nil, false
22032 }
22033
22034
22035 func (vj VaultJob) AsBasicJob() (BasicJob, bool) {
22036 return &vj, true
22037 }
22038
22039
22040 type VaultJobErrorInfo struct {
22041
22042 ErrorCode *int32 `json:"errorCode,omitempty"`
22043
22044 ErrorString *string `json:"errorString,omitempty"`
22045
22046 Recommendations *[]string `json:"recommendations,omitempty"`
22047 }
22048
22049
22050 type VaultJobExtendedInfo struct {
22051
22052 PropertyBag map[string]*string `json:"propertyBag"`
22053 }
22054
22055
22056 func (vjei VaultJobExtendedInfo) MarshalJSON() ([]byte, error) {
22057 objectMap := make(map[string]interface{})
22058 if vjei.PropertyBag != nil {
22059 objectMap["propertyBag"] = vjei.PropertyBag
22060 }
22061 return json.Marshal(objectMap)
22062 }
22063
22064
22065 type BasicVaultStorageConfigOperationResultResponse interface {
22066 AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool)
22067 AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool)
22068 }
22069
22070
22071 type VaultStorageConfigOperationResultResponse struct {
22072 autorest.Response `json:"-"`
22073
22074 ObjectType ObjectTypeBasicVaultStorageConfigOperationResultResponse `json:"objectType,omitempty"`
22075 }
22076
22077 func unmarshalBasicVaultStorageConfigOperationResultResponse(body []byte) (BasicVaultStorageConfigOperationResultResponse, error) {
22078 var m map[string]interface{}
22079 err := json.Unmarshal(body, &m)
22080 if err != nil {
22081 return nil, err
22082 }
22083
22084 switch m["objectType"] {
22085 case string(ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypePrepareDataMoveResponse):
22086 var pdmr PrepareDataMoveResponse
22087 err := json.Unmarshal(body, &pdmr)
22088 return pdmr, err
22089 default:
22090 var vscorr VaultStorageConfigOperationResultResponse
22091 err := json.Unmarshal(body, &vscorr)
22092 return vscorr, err
22093 }
22094 }
22095 func unmarshalBasicVaultStorageConfigOperationResultResponseArray(body []byte) ([]BasicVaultStorageConfigOperationResultResponse, error) {
22096 var rawMessages []*json.RawMessage
22097 err := json.Unmarshal(body, &rawMessages)
22098 if err != nil {
22099 return nil, err
22100 }
22101
22102 vscorrArray := make([]BasicVaultStorageConfigOperationResultResponse, len(rawMessages))
22103
22104 for index, rawMessage := range rawMessages {
22105 vscorr, err := unmarshalBasicVaultStorageConfigOperationResultResponse(*rawMessage)
22106 if err != nil {
22107 return nil, err
22108 }
22109 vscorrArray[index] = vscorr
22110 }
22111 return vscorrArray, nil
22112 }
22113
22114
22115 func (vscorr VaultStorageConfigOperationResultResponse) MarshalJSON() ([]byte, error) {
22116 vscorr.ObjectType = ObjectTypeBasicVaultStorageConfigOperationResultResponseObjectTypeVaultStorageConfigOperationResultResponse
22117 objectMap := make(map[string]interface{})
22118 if vscorr.ObjectType != "" {
22119 objectMap["objectType"] = vscorr.ObjectType
22120 }
22121 return json.Marshal(objectMap)
22122 }
22123
22124
22125 func (vscorr VaultStorageConfigOperationResultResponse) AsPrepareDataMoveResponse() (*PrepareDataMoveResponse, bool) {
22126 return nil, false
22127 }
22128
22129
22130 func (vscorr VaultStorageConfigOperationResultResponse) AsVaultStorageConfigOperationResultResponse() (*VaultStorageConfigOperationResultResponse, bool) {
22131 return &vscorr, true
22132 }
22133
22134
22135 func (vscorr VaultStorageConfigOperationResultResponse) AsBasicVaultStorageConfigOperationResultResponse() (BasicVaultStorageConfigOperationResultResponse, bool) {
22136 return &vscorr, true
22137 }
22138
22139
22140 type VaultStorageConfigOperationResultResponseModel struct {
22141 autorest.Response `json:"-"`
22142 Value BasicVaultStorageConfigOperationResultResponse `json:"value,omitempty"`
22143 }
22144
22145
22146 func (vscorrm *VaultStorageConfigOperationResultResponseModel) UnmarshalJSON(body []byte) error {
22147 vscorr, err := unmarshalBasicVaultStorageConfigOperationResultResponse(body)
22148 if err != nil {
22149 return err
22150 }
22151 vscorrm.Value = vscorr
22152
22153 return nil
22154 }
22155
22156
22157 type WeeklyRetentionFormat struct {
22158
22159 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
22160
22161 WeeksOfTheMonth *[]WeekOfMonth `json:"weeksOfTheMonth,omitempty"`
22162 }
22163
22164
22165 type WeeklyRetentionSchedule struct {
22166
22167 DaysOfTheWeek *[]DayOfWeek `json:"daysOfTheWeek,omitempty"`
22168
22169 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
22170
22171 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
22172 }
22173
22174
22175 type WorkloadCrrAccessToken struct {
22176 ProtectableObjectUniqueName *string `json:"protectableObjectUniqueName,omitempty"`
22177 ProtectableObjectFriendlyName *string `json:"protectableObjectFriendlyName,omitempty"`
22178 ProtectableObjectWorkloadType *string `json:"protectableObjectWorkloadType,omitempty"`
22179 ProtectableObjectProtectionState *string `json:"protectableObjectProtectionState,omitempty"`
22180 ProtectableObjectContainerHostOsName *string `json:"protectableObjectContainerHostOsName,omitempty"`
22181 ProtectableObjectParentLogicalContainerName *string `json:"protectableObjectParentLogicalContainerName,omitempty"`
22182
22183 ContainerID *string `json:"containerId,omitempty"`
22184
22185 PolicyName *string `json:"policyName,omitempty"`
22186
22187 PolicyID *string `json:"policyId,omitempty"`
22188
22189 AccessTokenString *string `json:"accessTokenString,omitempty"`
22190
22191 SubscriptionID *string `json:"subscriptionId,omitempty"`
22192
22193 ResourceGroupName *string `json:"resourceGroupName,omitempty"`
22194
22195 ResourceName *string `json:"resourceName,omitempty"`
22196
22197 ResourceID *string `json:"resourceId,omitempty"`
22198
22199 ProtectionContainerID *int64 `json:"protectionContainerId,omitempty"`
22200
22201 RecoveryPointID *string `json:"recoveryPointId,omitempty"`
22202
22203 RecoveryPointTime *string `json:"recoveryPointTime,omitempty"`
22204
22205 ContainerName *string `json:"containerName,omitempty"`
22206
22207 ContainerType *string `json:"containerType,omitempty"`
22208
22209 BackupManagementType *string `json:"backupManagementType,omitempty"`
22210
22211 DatasourceType *string `json:"datasourceType,omitempty"`
22212
22213 DatasourceName *string `json:"datasourceName,omitempty"`
22214
22215 DatasourceID *string `json:"datasourceId,omitempty"`
22216
22217 DatasourceContainerName *string `json:"datasourceContainerName,omitempty"`
22218
22219 CoordinatorServiceStampID *string `json:"coordinatorServiceStampId,omitempty"`
22220
22221 CoordinatorServiceStampURI *string `json:"coordinatorServiceStampUri,omitempty"`
22222
22223 ProtectionServiceStampID *string `json:"protectionServiceStampId,omitempty"`
22224
22225 ProtectionServiceStampURI *string `json:"protectionServiceStampUri,omitempty"`
22226
22227 TokenExtendedInformation *string `json:"tokenExtendedInformation,omitempty"`
22228
22229 RpTierInformation map[string]*string `json:"rpTierInformation"`
22230
22231 RpOriginalSAOption *bool `json:"rpOriginalSAOption,omitempty"`
22232
22233 RpIsManagedVirtualMachine *bool `json:"rpIsManagedVirtualMachine,omitempty"`
22234
22235 RpVMSizeDescription *string `json:"rpVMSizeDescription,omitempty"`
22236
22237 BMSActiveRegion *string `json:"bMSActiveRegion,omitempty"`
22238
22239 ObjectType ObjectTypeBasicCrrAccessToken `json:"objectType,omitempty"`
22240 }
22241
22242
22243 func (wcat WorkloadCrrAccessToken) MarshalJSON() ([]byte, error) {
22244 wcat.ObjectType = ObjectTypeBasicCrrAccessTokenObjectTypeWorkloadCrrAccessToken
22245 objectMap := make(map[string]interface{})
22246 if wcat.ProtectableObjectUniqueName != nil {
22247 objectMap["protectableObjectUniqueName"] = wcat.ProtectableObjectUniqueName
22248 }
22249 if wcat.ProtectableObjectFriendlyName != nil {
22250 objectMap["protectableObjectFriendlyName"] = wcat.ProtectableObjectFriendlyName
22251 }
22252 if wcat.ProtectableObjectWorkloadType != nil {
22253 objectMap["protectableObjectWorkloadType"] = wcat.ProtectableObjectWorkloadType
22254 }
22255 if wcat.ProtectableObjectProtectionState != nil {
22256 objectMap["protectableObjectProtectionState"] = wcat.ProtectableObjectProtectionState
22257 }
22258 if wcat.ProtectableObjectContainerHostOsName != nil {
22259 objectMap["protectableObjectContainerHostOsName"] = wcat.ProtectableObjectContainerHostOsName
22260 }
22261 if wcat.ProtectableObjectParentLogicalContainerName != nil {
22262 objectMap["protectableObjectParentLogicalContainerName"] = wcat.ProtectableObjectParentLogicalContainerName
22263 }
22264 if wcat.ContainerID != nil {
22265 objectMap["containerId"] = wcat.ContainerID
22266 }
22267 if wcat.PolicyName != nil {
22268 objectMap["policyName"] = wcat.PolicyName
22269 }
22270 if wcat.PolicyID != nil {
22271 objectMap["policyId"] = wcat.PolicyID
22272 }
22273 if wcat.AccessTokenString != nil {
22274 objectMap["accessTokenString"] = wcat.AccessTokenString
22275 }
22276 if wcat.SubscriptionID != nil {
22277 objectMap["subscriptionId"] = wcat.SubscriptionID
22278 }
22279 if wcat.ResourceGroupName != nil {
22280 objectMap["resourceGroupName"] = wcat.ResourceGroupName
22281 }
22282 if wcat.ResourceName != nil {
22283 objectMap["resourceName"] = wcat.ResourceName
22284 }
22285 if wcat.ResourceID != nil {
22286 objectMap["resourceId"] = wcat.ResourceID
22287 }
22288 if wcat.ProtectionContainerID != nil {
22289 objectMap["protectionContainerId"] = wcat.ProtectionContainerID
22290 }
22291 if wcat.RecoveryPointID != nil {
22292 objectMap["recoveryPointId"] = wcat.RecoveryPointID
22293 }
22294 if wcat.RecoveryPointTime != nil {
22295 objectMap["recoveryPointTime"] = wcat.RecoveryPointTime
22296 }
22297 if wcat.ContainerName != nil {
22298 objectMap["containerName"] = wcat.ContainerName
22299 }
22300 if wcat.ContainerType != nil {
22301 objectMap["containerType"] = wcat.ContainerType
22302 }
22303 if wcat.BackupManagementType != nil {
22304 objectMap["backupManagementType"] = wcat.BackupManagementType
22305 }
22306 if wcat.DatasourceType != nil {
22307 objectMap["datasourceType"] = wcat.DatasourceType
22308 }
22309 if wcat.DatasourceName != nil {
22310 objectMap["datasourceName"] = wcat.DatasourceName
22311 }
22312 if wcat.DatasourceID != nil {
22313 objectMap["datasourceId"] = wcat.DatasourceID
22314 }
22315 if wcat.DatasourceContainerName != nil {
22316 objectMap["datasourceContainerName"] = wcat.DatasourceContainerName
22317 }
22318 if wcat.CoordinatorServiceStampID != nil {
22319 objectMap["coordinatorServiceStampId"] = wcat.CoordinatorServiceStampID
22320 }
22321 if wcat.CoordinatorServiceStampURI != nil {
22322 objectMap["coordinatorServiceStampUri"] = wcat.CoordinatorServiceStampURI
22323 }
22324 if wcat.ProtectionServiceStampID != nil {
22325 objectMap["protectionServiceStampId"] = wcat.ProtectionServiceStampID
22326 }
22327 if wcat.ProtectionServiceStampURI != nil {
22328 objectMap["protectionServiceStampUri"] = wcat.ProtectionServiceStampURI
22329 }
22330 if wcat.TokenExtendedInformation != nil {
22331 objectMap["tokenExtendedInformation"] = wcat.TokenExtendedInformation
22332 }
22333 if wcat.RpTierInformation != nil {
22334 objectMap["rpTierInformation"] = wcat.RpTierInformation
22335 }
22336 if wcat.RpOriginalSAOption != nil {
22337 objectMap["rpOriginalSAOption"] = wcat.RpOriginalSAOption
22338 }
22339 if wcat.RpIsManagedVirtualMachine != nil {
22340 objectMap["rpIsManagedVirtualMachine"] = wcat.RpIsManagedVirtualMachine
22341 }
22342 if wcat.RpVMSizeDescription != nil {
22343 objectMap["rpVMSizeDescription"] = wcat.RpVMSizeDescription
22344 }
22345 if wcat.BMSActiveRegion != nil {
22346 objectMap["bMSActiveRegion"] = wcat.BMSActiveRegion
22347 }
22348 if wcat.ObjectType != "" {
22349 objectMap["objectType"] = wcat.ObjectType
22350 }
22351 return json.Marshal(objectMap)
22352 }
22353
22354
22355 func (wcat WorkloadCrrAccessToken) AsWorkloadCrrAccessToken() (*WorkloadCrrAccessToken, bool) {
22356 return &wcat, true
22357 }
22358
22359
22360 func (wcat WorkloadCrrAccessToken) AsCrrAccessToken() (*CrrAccessToken, bool) {
22361 return nil, false
22362 }
22363
22364
22365 func (wcat WorkloadCrrAccessToken) AsBasicCrrAccessToken() (BasicCrrAccessToken, bool) {
22366 return &wcat, true
22367 }
22368
22369
22370 type WorkloadInquiryDetails struct {
22371
22372 Type *string `json:"type,omitempty"`
22373
22374 ItemCount *int64 `json:"itemCount,omitempty"`
22375
22376 InquiryValidation *InquiryValidation `json:"inquiryValidation,omitempty"`
22377 }
22378
22379
22380 type BasicWorkloadItem interface {
22381 AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool)
22382 AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool)
22383 AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool)
22384 AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool)
22385 AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool)
22386 AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool)
22387 AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool)
22388 AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool)
22389 AsWorkloadItem() (*WorkloadItem, bool)
22390 }
22391
22392
22393 type WorkloadItem struct {
22394
22395 BackupManagementType *string `json:"backupManagementType,omitempty"`
22396
22397 WorkloadType *string `json:"workloadType,omitempty"`
22398
22399 FriendlyName *string `json:"friendlyName,omitempty"`
22400
22401 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
22402
22403 WorkloadItemType WorkloadItemTypeBasicWorkloadItem `json:"workloadItemType,omitempty"`
22404 }
22405
22406 func unmarshalBasicWorkloadItem(body []byte) (BasicWorkloadItem, error) {
22407 var m map[string]interface{}
22408 err := json.Unmarshal(body, &m)
22409 if err != nil {
22410 return nil, err
22411 }
22412
22413 switch m["workloadItemType"] {
22414 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeAzureVMWorkloadItem):
22415 var avwi AzureVMWorkloadItem
22416 err := json.Unmarshal(body, &avwi)
22417 return avwi, err
22418 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseDatabase):
22419 var avwsadwi AzureVMWorkloadSAPAseDatabaseWorkloadItem
22420 err := json.Unmarshal(body, &avwsadwi)
22421 return avwsadwi, err
22422 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPAseSystem):
22423 var avwsaswi AzureVMWorkloadSAPAseSystemWorkloadItem
22424 err := json.Unmarshal(body, &avwsaswi)
22425 return avwsaswi, err
22426 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaDatabase):
22427 var avwshdwi AzureVMWorkloadSAPHanaDatabaseWorkloadItem
22428 err := json.Unmarshal(body, &avwshdwi)
22429 return avwshdwi, err
22430 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSAPHanaSystem):
22431 var avwshswi AzureVMWorkloadSAPHanaSystemWorkloadItem
22432 err := json.Unmarshal(body, &avwshswi)
22433 return avwshswi, err
22434 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLDataBase):
22435 var avwsdwi AzureVMWorkloadSQLDatabaseWorkloadItem
22436 err := json.Unmarshal(body, &avwsdwi)
22437 return avwsdwi, err
22438 case string(WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeSQLInstance):
22439 var avwsiwi AzureVMWorkloadSQLInstanceWorkloadItem
22440 err := json.Unmarshal(body, &avwsiwi)
22441 return avwsiwi, err
22442 default:
22443 var wi WorkloadItem
22444 err := json.Unmarshal(body, &wi)
22445 return wi, err
22446 }
22447 }
22448 func unmarshalBasicWorkloadItemArray(body []byte) ([]BasicWorkloadItem, error) {
22449 var rawMessages []*json.RawMessage
22450 err := json.Unmarshal(body, &rawMessages)
22451 if err != nil {
22452 return nil, err
22453 }
22454
22455 wiArray := make([]BasicWorkloadItem, len(rawMessages))
22456
22457 for index, rawMessage := range rawMessages {
22458 wi, err := unmarshalBasicWorkloadItem(*rawMessage)
22459 if err != nil {
22460 return nil, err
22461 }
22462 wiArray[index] = wi
22463 }
22464 return wiArray, nil
22465 }
22466
22467
22468 func (wi WorkloadItem) MarshalJSON() ([]byte, error) {
22469 wi.WorkloadItemType = WorkloadItemTypeBasicWorkloadItemWorkloadItemTypeWorkloadItem
22470 objectMap := make(map[string]interface{})
22471 if wi.BackupManagementType != nil {
22472 objectMap["backupManagementType"] = wi.BackupManagementType
22473 }
22474 if wi.WorkloadType != nil {
22475 objectMap["workloadType"] = wi.WorkloadType
22476 }
22477 if wi.FriendlyName != nil {
22478 objectMap["friendlyName"] = wi.FriendlyName
22479 }
22480 if wi.ProtectionState != "" {
22481 objectMap["protectionState"] = wi.ProtectionState
22482 }
22483 if wi.WorkloadItemType != "" {
22484 objectMap["workloadItemType"] = wi.WorkloadItemType
22485 }
22486 return json.Marshal(objectMap)
22487 }
22488
22489
22490 func (wi WorkloadItem) AsAzureVMWorkloadItem() (*AzureVMWorkloadItem, bool) {
22491 return nil, false
22492 }
22493
22494
22495 func (wi WorkloadItem) AsBasicAzureVMWorkloadItem() (BasicAzureVMWorkloadItem, bool) {
22496 return nil, false
22497 }
22498
22499
22500 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseDatabaseWorkloadItem() (*AzureVMWorkloadSAPAseDatabaseWorkloadItem, bool) {
22501 return nil, false
22502 }
22503
22504
22505 func (wi WorkloadItem) AsAzureVMWorkloadSAPAseSystemWorkloadItem() (*AzureVMWorkloadSAPAseSystemWorkloadItem, bool) {
22506 return nil, false
22507 }
22508
22509
22510 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaDatabaseWorkloadItem() (*AzureVMWorkloadSAPHanaDatabaseWorkloadItem, bool) {
22511 return nil, false
22512 }
22513
22514
22515 func (wi WorkloadItem) AsAzureVMWorkloadSAPHanaSystemWorkloadItem() (*AzureVMWorkloadSAPHanaSystemWorkloadItem, bool) {
22516 return nil, false
22517 }
22518
22519
22520 func (wi WorkloadItem) AsAzureVMWorkloadSQLDatabaseWorkloadItem() (*AzureVMWorkloadSQLDatabaseWorkloadItem, bool) {
22521 return nil, false
22522 }
22523
22524
22525 func (wi WorkloadItem) AsAzureVMWorkloadSQLInstanceWorkloadItem() (*AzureVMWorkloadSQLInstanceWorkloadItem, bool) {
22526 return nil, false
22527 }
22528
22529
22530 func (wi WorkloadItem) AsWorkloadItem() (*WorkloadItem, bool) {
22531 return &wi, true
22532 }
22533
22534
22535 func (wi WorkloadItem) AsBasicWorkloadItem() (BasicWorkloadItem, bool) {
22536 return &wi, true
22537 }
22538
22539
22540
22541 type WorkloadItemResource struct {
22542
22543 Properties BasicWorkloadItem `json:"properties,omitempty"`
22544
22545 ID *string `json:"id,omitempty"`
22546
22547 Name *string `json:"name,omitempty"`
22548
22549 Type *string `json:"type,omitempty"`
22550
22551 Location *string `json:"location,omitempty"`
22552
22553 Tags map[string]*string `json:"tags"`
22554
22555 ETag *string `json:"eTag,omitempty"`
22556 }
22557
22558
22559 func (wir WorkloadItemResource) MarshalJSON() ([]byte, error) {
22560 objectMap := make(map[string]interface{})
22561 objectMap["properties"] = wir.Properties
22562 if wir.Location != nil {
22563 objectMap["location"] = wir.Location
22564 }
22565 if wir.Tags != nil {
22566 objectMap["tags"] = wir.Tags
22567 }
22568 if wir.ETag != nil {
22569 objectMap["eTag"] = wir.ETag
22570 }
22571 return json.Marshal(objectMap)
22572 }
22573
22574
22575 func (wir *WorkloadItemResource) UnmarshalJSON(body []byte) error {
22576 var m map[string]*json.RawMessage
22577 err := json.Unmarshal(body, &m)
22578 if err != nil {
22579 return err
22580 }
22581 for k, v := range m {
22582 switch k {
22583 case "properties":
22584 if v != nil {
22585 properties, err := unmarshalBasicWorkloadItem(*v)
22586 if err != nil {
22587 return err
22588 }
22589 wir.Properties = properties
22590 }
22591 case "id":
22592 if v != nil {
22593 var ID string
22594 err = json.Unmarshal(*v, &ID)
22595 if err != nil {
22596 return err
22597 }
22598 wir.ID = &ID
22599 }
22600 case "name":
22601 if v != nil {
22602 var name string
22603 err = json.Unmarshal(*v, &name)
22604 if err != nil {
22605 return err
22606 }
22607 wir.Name = &name
22608 }
22609 case "type":
22610 if v != nil {
22611 var typeVar string
22612 err = json.Unmarshal(*v, &typeVar)
22613 if err != nil {
22614 return err
22615 }
22616 wir.Type = &typeVar
22617 }
22618 case "location":
22619 if v != nil {
22620 var location string
22621 err = json.Unmarshal(*v, &location)
22622 if err != nil {
22623 return err
22624 }
22625 wir.Location = &location
22626 }
22627 case "tags":
22628 if v != nil {
22629 var tags map[string]*string
22630 err = json.Unmarshal(*v, &tags)
22631 if err != nil {
22632 return err
22633 }
22634 wir.Tags = tags
22635 }
22636 case "eTag":
22637 if v != nil {
22638 var eTag string
22639 err = json.Unmarshal(*v, &eTag)
22640 if err != nil {
22641 return err
22642 }
22643 wir.ETag = &eTag
22644 }
22645 }
22646 }
22647
22648 return nil
22649 }
22650
22651
22652 type WorkloadItemResourceList struct {
22653 autorest.Response `json:"-"`
22654
22655 Value *[]WorkloadItemResource `json:"value,omitempty"`
22656
22657 NextLink *string `json:"nextLink,omitempty"`
22658 }
22659
22660
22661 type WorkloadItemResourceListIterator struct {
22662 i int
22663 page WorkloadItemResourceListPage
22664 }
22665
22666
22667
22668 func (iter *WorkloadItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
22669 if tracing.IsEnabled() {
22670 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListIterator.NextWithContext")
22671 defer func() {
22672 sc := -1
22673 if iter.Response().Response.Response != nil {
22674 sc = iter.Response().Response.Response.StatusCode
22675 }
22676 tracing.EndSpan(ctx, sc, err)
22677 }()
22678 }
22679 iter.i++
22680 if iter.i < len(iter.page.Values()) {
22681 return nil
22682 }
22683 err = iter.page.NextWithContext(ctx)
22684 if err != nil {
22685 iter.i--
22686 return err
22687 }
22688 iter.i = 0
22689 return nil
22690 }
22691
22692
22693
22694
22695 func (iter *WorkloadItemResourceListIterator) Next() error {
22696 return iter.NextWithContext(context.Background())
22697 }
22698
22699
22700 func (iter WorkloadItemResourceListIterator) NotDone() bool {
22701 return iter.page.NotDone() && iter.i < len(iter.page.Values())
22702 }
22703
22704
22705 func (iter WorkloadItemResourceListIterator) Response() WorkloadItemResourceList {
22706 return iter.page.Response()
22707 }
22708
22709
22710
22711 func (iter WorkloadItemResourceListIterator) Value() WorkloadItemResource {
22712 if !iter.page.NotDone() {
22713 return WorkloadItemResource{}
22714 }
22715 return iter.page.Values()[iter.i]
22716 }
22717
22718
22719 func NewWorkloadItemResourceListIterator(page WorkloadItemResourceListPage) WorkloadItemResourceListIterator {
22720 return WorkloadItemResourceListIterator{page: page}
22721 }
22722
22723
22724 func (wirl WorkloadItemResourceList) IsEmpty() bool {
22725 return wirl.Value == nil || len(*wirl.Value) == 0
22726 }
22727
22728
22729 func (wirl WorkloadItemResourceList) hasNextLink() bool {
22730 return wirl.NextLink != nil && len(*wirl.NextLink) != 0
22731 }
22732
22733
22734
22735 func (wirl WorkloadItemResourceList) workloadItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
22736 if !wirl.hasNextLink() {
22737 return nil, nil
22738 }
22739 return autorest.Prepare((&http.Request{}).WithContext(ctx),
22740 autorest.AsJSON(),
22741 autorest.AsGet(),
22742 autorest.WithBaseURL(to.String(wirl.NextLink)))
22743 }
22744
22745
22746 type WorkloadItemResourceListPage struct {
22747 fn func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)
22748 wirl WorkloadItemResourceList
22749 }
22750
22751
22752
22753 func (page *WorkloadItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
22754 if tracing.IsEnabled() {
22755 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadItemResourceListPage.NextWithContext")
22756 defer func() {
22757 sc := -1
22758 if page.Response().Response.Response != nil {
22759 sc = page.Response().Response.Response.StatusCode
22760 }
22761 tracing.EndSpan(ctx, sc, err)
22762 }()
22763 }
22764 for {
22765 next, err := page.fn(ctx, page.wirl)
22766 if err != nil {
22767 return err
22768 }
22769 page.wirl = next
22770 if !next.hasNextLink() || !next.IsEmpty() {
22771 break
22772 }
22773 }
22774 return nil
22775 }
22776
22777
22778
22779
22780 func (page *WorkloadItemResourceListPage) Next() error {
22781 return page.NextWithContext(context.Background())
22782 }
22783
22784
22785 func (page WorkloadItemResourceListPage) NotDone() bool {
22786 return !page.wirl.IsEmpty()
22787 }
22788
22789
22790 func (page WorkloadItemResourceListPage) Response() WorkloadItemResourceList {
22791 return page.wirl
22792 }
22793
22794
22795 func (page WorkloadItemResourceListPage) Values() []WorkloadItemResource {
22796 if page.wirl.IsEmpty() {
22797 return nil
22798 }
22799 return *page.wirl.Value
22800 }
22801
22802
22803 func NewWorkloadItemResourceListPage(cur WorkloadItemResourceList, getNextPage func(context.Context, WorkloadItemResourceList) (WorkloadItemResourceList, error)) WorkloadItemResourceListPage {
22804 return WorkloadItemResourceListPage{
22805 fn: getNextPage,
22806 wirl: cur,
22807 }
22808 }
22809
22810
22811 type BasicWorkloadProtectableItem interface {
22812 AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool)
22813 AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool)
22814 AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool)
22815 AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool)
22816 AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool)
22817 AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool)
22818 AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool)
22819 AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool)
22820 AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool)
22821 AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool)
22822 AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool)
22823 AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool)
22824 AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool)
22825 AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool)
22826 }
22827
22828
22829
22830 type WorkloadProtectableItem struct {
22831
22832 BackupManagementType *string `json:"backupManagementType,omitempty"`
22833
22834 WorkloadType *string `json:"workloadType,omitempty"`
22835
22836 FriendlyName *string `json:"friendlyName,omitempty"`
22837
22838 ProtectionState ProtectionStatus `json:"protectionState,omitempty"`
22839
22840 ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"`
22841 }
22842
22843 func unmarshalBasicWorkloadProtectableItem(body []byte) (BasicWorkloadProtectableItem, error) {
22844 var m map[string]interface{}
22845 err := json.Unmarshal(body, &m)
22846 if err != nil {
22847 return nil, err
22848 }
22849
22850 switch m["protectableItemType"] {
22851 case string(ProtectableItemTypeAzureFileShare):
22852 var afspi AzureFileShareProtectableItem
22853 err := json.Unmarshal(body, &afspi)
22854 return afspi, err
22855 case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines):
22856 var aisccvpi AzureIaaSClassicComputeVMProtectableItem
22857 err := json.Unmarshal(body, &aisccvpi)
22858 return aisccvpi, err
22859 case string(ProtectableItemTypeMicrosoftComputevirtualMachines):
22860 var aiscvpi AzureIaaSComputeVMProtectableItem
22861 err := json.Unmarshal(body, &aiscvpi)
22862 return aiscvpi, err
22863 case string(ProtectableItemTypeAzureVMWorkloadProtectableItem):
22864 var avwpi AzureVMWorkloadProtectableItem
22865 err := json.Unmarshal(body, &avwpi)
22866 return avwpi, err
22867 case string(ProtectableItemTypeSAPAseSystem):
22868 var avwsaspi AzureVMWorkloadSAPAseSystemProtectableItem
22869 err := json.Unmarshal(body, &avwsaspi)
22870 return avwsaspi, err
22871 case string(ProtectableItemTypeSAPHanaDatabase):
22872 var avwshdpi AzureVMWorkloadSAPHanaDatabaseProtectableItem
22873 err := json.Unmarshal(body, &avwshdpi)
22874 return avwshdpi, err
22875 case string(ProtectableItemTypeSAPHanaSystem):
22876 var avwshspi AzureVMWorkloadSAPHanaSystemProtectableItem
22877 err := json.Unmarshal(body, &avwshspi)
22878 return avwshspi, err
22879 case string(ProtectableItemTypeSQLAvailabilityGroupContainer):
22880 var avwsagpi AzureVMWorkloadSQLAvailabilityGroupProtectableItem
22881 err := json.Unmarshal(body, &avwsagpi)
22882 return avwsagpi, err
22883 case string(ProtectableItemTypeSQLDataBase):
22884 var avwsdpi AzureVMWorkloadSQLDatabaseProtectableItem
22885 err := json.Unmarshal(body, &avwsdpi)
22886 return avwsdpi, err
22887 case string(ProtectableItemTypeSQLInstance):
22888 var avwsipi AzureVMWorkloadSQLInstanceProtectableItem
22889 err := json.Unmarshal(body, &avwsipi)
22890 return avwsipi, err
22891 case string(ProtectableItemTypeIaaSVMProtectableItem):
22892 var ispi IaaSVMProtectableItem
22893 err := json.Unmarshal(body, &ispi)
22894 return ispi, err
22895 default:
22896 var wpi WorkloadProtectableItem
22897 err := json.Unmarshal(body, &wpi)
22898 return wpi, err
22899 }
22900 }
22901 func unmarshalBasicWorkloadProtectableItemArray(body []byte) ([]BasicWorkloadProtectableItem, error) {
22902 var rawMessages []*json.RawMessage
22903 err := json.Unmarshal(body, &rawMessages)
22904 if err != nil {
22905 return nil, err
22906 }
22907
22908 wpiArray := make([]BasicWorkloadProtectableItem, len(rawMessages))
22909
22910 for index, rawMessage := range rawMessages {
22911 wpi, err := unmarshalBasicWorkloadProtectableItem(*rawMessage)
22912 if err != nil {
22913 return nil, err
22914 }
22915 wpiArray[index] = wpi
22916 }
22917 return wpiArray, nil
22918 }
22919
22920
22921 func (wpi WorkloadProtectableItem) MarshalJSON() ([]byte, error) {
22922 wpi.ProtectableItemType = ProtectableItemTypeWorkloadProtectableItem
22923 objectMap := make(map[string]interface{})
22924 if wpi.BackupManagementType != nil {
22925 objectMap["backupManagementType"] = wpi.BackupManagementType
22926 }
22927 if wpi.WorkloadType != nil {
22928 objectMap["workloadType"] = wpi.WorkloadType
22929 }
22930 if wpi.FriendlyName != nil {
22931 objectMap["friendlyName"] = wpi.FriendlyName
22932 }
22933 if wpi.ProtectionState != "" {
22934 objectMap["protectionState"] = wpi.ProtectionState
22935 }
22936 if wpi.ProtectableItemType != "" {
22937 objectMap["protectableItemType"] = wpi.ProtectableItemType
22938 }
22939 return json.Marshal(objectMap)
22940 }
22941
22942
22943 func (wpi WorkloadProtectableItem) AsAzureFileShareProtectableItem() (*AzureFileShareProtectableItem, bool) {
22944 return nil, false
22945 }
22946
22947
22948 func (wpi WorkloadProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) {
22949 return nil, false
22950 }
22951
22952
22953 func (wpi WorkloadProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) {
22954 return nil, false
22955 }
22956
22957
22958 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadProtectableItem() (*AzureVMWorkloadProtectableItem, bool) {
22959 return nil, false
22960 }
22961
22962
22963 func (wpi WorkloadProtectableItem) AsBasicAzureVMWorkloadProtectableItem() (BasicAzureVMWorkloadProtectableItem, bool) {
22964 return nil, false
22965 }
22966
22967
22968 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPAseSystemProtectableItem() (*AzureVMWorkloadSAPAseSystemProtectableItem, bool) {
22969 return nil, false
22970 }
22971
22972
22973 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaDatabaseProtectableItem() (*AzureVMWorkloadSAPHanaDatabaseProtectableItem, bool) {
22974 return nil, false
22975 }
22976
22977
22978 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSAPHanaSystemProtectableItem() (*AzureVMWorkloadSAPHanaSystemProtectableItem, bool) {
22979 return nil, false
22980 }
22981
22982
22983 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLAvailabilityGroupProtectableItem() (*AzureVMWorkloadSQLAvailabilityGroupProtectableItem, bool) {
22984 return nil, false
22985 }
22986
22987
22988 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLDatabaseProtectableItem() (*AzureVMWorkloadSQLDatabaseProtectableItem, bool) {
22989 return nil, false
22990 }
22991
22992
22993 func (wpi WorkloadProtectableItem) AsAzureVMWorkloadSQLInstanceProtectableItem() (*AzureVMWorkloadSQLInstanceProtectableItem, bool) {
22994 return nil, false
22995 }
22996
22997
22998 func (wpi WorkloadProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) {
22999 return nil, false
23000 }
23001
23002
23003 func (wpi WorkloadProtectableItem) AsBasicIaaSVMProtectableItem() (BasicIaaSVMProtectableItem, bool) {
23004 return nil, false
23005 }
23006
23007
23008 func (wpi WorkloadProtectableItem) AsWorkloadProtectableItem() (*WorkloadProtectableItem, bool) {
23009 return &wpi, true
23010 }
23011
23012
23013 func (wpi WorkloadProtectableItem) AsBasicWorkloadProtectableItem() (BasicWorkloadProtectableItem, bool) {
23014 return &wpi, true
23015 }
23016
23017
23018
23019 type WorkloadProtectableItemResource struct {
23020
23021 Properties BasicWorkloadProtectableItem `json:"properties,omitempty"`
23022
23023 ID *string `json:"id,omitempty"`
23024
23025 Name *string `json:"name,omitempty"`
23026
23027 Type *string `json:"type,omitempty"`
23028
23029 Location *string `json:"location,omitempty"`
23030
23031 Tags map[string]*string `json:"tags"`
23032
23033 ETag *string `json:"eTag,omitempty"`
23034 }
23035
23036
23037 func (wpir WorkloadProtectableItemResource) MarshalJSON() ([]byte, error) {
23038 objectMap := make(map[string]interface{})
23039 objectMap["properties"] = wpir.Properties
23040 if wpir.Location != nil {
23041 objectMap["location"] = wpir.Location
23042 }
23043 if wpir.Tags != nil {
23044 objectMap["tags"] = wpir.Tags
23045 }
23046 if wpir.ETag != nil {
23047 objectMap["eTag"] = wpir.ETag
23048 }
23049 return json.Marshal(objectMap)
23050 }
23051
23052
23053 func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error {
23054 var m map[string]*json.RawMessage
23055 err := json.Unmarshal(body, &m)
23056 if err != nil {
23057 return err
23058 }
23059 for k, v := range m {
23060 switch k {
23061 case "properties":
23062 if v != nil {
23063 properties, err := unmarshalBasicWorkloadProtectableItem(*v)
23064 if err != nil {
23065 return err
23066 }
23067 wpir.Properties = properties
23068 }
23069 case "id":
23070 if v != nil {
23071 var ID string
23072 err = json.Unmarshal(*v, &ID)
23073 if err != nil {
23074 return err
23075 }
23076 wpir.ID = &ID
23077 }
23078 case "name":
23079 if v != nil {
23080 var name string
23081 err = json.Unmarshal(*v, &name)
23082 if err != nil {
23083 return err
23084 }
23085 wpir.Name = &name
23086 }
23087 case "type":
23088 if v != nil {
23089 var typeVar string
23090 err = json.Unmarshal(*v, &typeVar)
23091 if err != nil {
23092 return err
23093 }
23094 wpir.Type = &typeVar
23095 }
23096 case "location":
23097 if v != nil {
23098 var location string
23099 err = json.Unmarshal(*v, &location)
23100 if err != nil {
23101 return err
23102 }
23103 wpir.Location = &location
23104 }
23105 case "tags":
23106 if v != nil {
23107 var tags map[string]*string
23108 err = json.Unmarshal(*v, &tags)
23109 if err != nil {
23110 return err
23111 }
23112 wpir.Tags = tags
23113 }
23114 case "eTag":
23115 if v != nil {
23116 var eTag string
23117 err = json.Unmarshal(*v, &eTag)
23118 if err != nil {
23119 return err
23120 }
23121 wpir.ETag = &eTag
23122 }
23123 }
23124 }
23125
23126 return nil
23127 }
23128
23129
23130 type WorkloadProtectableItemResourceList struct {
23131 autorest.Response `json:"-"`
23132
23133 Value *[]WorkloadProtectableItemResource `json:"value,omitempty"`
23134
23135 NextLink *string `json:"nextLink,omitempty"`
23136 }
23137
23138
23139
23140 type WorkloadProtectableItemResourceListIterator struct {
23141 i int
23142 page WorkloadProtectableItemResourceListPage
23143 }
23144
23145
23146
23147 func (iter *WorkloadProtectableItemResourceListIterator) NextWithContext(ctx context.Context) (err error) {
23148 if tracing.IsEnabled() {
23149 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListIterator.NextWithContext")
23150 defer func() {
23151 sc := -1
23152 if iter.Response().Response.Response != nil {
23153 sc = iter.Response().Response.Response.StatusCode
23154 }
23155 tracing.EndSpan(ctx, sc, err)
23156 }()
23157 }
23158 iter.i++
23159 if iter.i < len(iter.page.Values()) {
23160 return nil
23161 }
23162 err = iter.page.NextWithContext(ctx)
23163 if err != nil {
23164 iter.i--
23165 return err
23166 }
23167 iter.i = 0
23168 return nil
23169 }
23170
23171
23172
23173
23174 func (iter *WorkloadProtectableItemResourceListIterator) Next() error {
23175 return iter.NextWithContext(context.Background())
23176 }
23177
23178
23179 func (iter WorkloadProtectableItemResourceListIterator) NotDone() bool {
23180 return iter.page.NotDone() && iter.i < len(iter.page.Values())
23181 }
23182
23183
23184 func (iter WorkloadProtectableItemResourceListIterator) Response() WorkloadProtectableItemResourceList {
23185 return iter.page.Response()
23186 }
23187
23188
23189
23190 func (iter WorkloadProtectableItemResourceListIterator) Value() WorkloadProtectableItemResource {
23191 if !iter.page.NotDone() {
23192 return WorkloadProtectableItemResource{}
23193 }
23194 return iter.page.Values()[iter.i]
23195 }
23196
23197
23198 func NewWorkloadProtectableItemResourceListIterator(page WorkloadProtectableItemResourceListPage) WorkloadProtectableItemResourceListIterator {
23199 return WorkloadProtectableItemResourceListIterator{page: page}
23200 }
23201
23202
23203 func (wpirl WorkloadProtectableItemResourceList) IsEmpty() bool {
23204 return wpirl.Value == nil || len(*wpirl.Value) == 0
23205 }
23206
23207
23208 func (wpirl WorkloadProtectableItemResourceList) hasNextLink() bool {
23209 return wpirl.NextLink != nil && len(*wpirl.NextLink) != 0
23210 }
23211
23212
23213
23214 func (wpirl WorkloadProtectableItemResourceList) workloadProtectableItemResourceListPreparer(ctx context.Context) (*http.Request, error) {
23215 if !wpirl.hasNextLink() {
23216 return nil, nil
23217 }
23218 return autorest.Prepare((&http.Request{}).WithContext(ctx),
23219 autorest.AsJSON(),
23220 autorest.AsGet(),
23221 autorest.WithBaseURL(to.String(wpirl.NextLink)))
23222 }
23223
23224
23225 type WorkloadProtectableItemResourceListPage struct {
23226 fn func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)
23227 wpirl WorkloadProtectableItemResourceList
23228 }
23229
23230
23231
23232 func (page *WorkloadProtectableItemResourceListPage) NextWithContext(ctx context.Context) (err error) {
23233 if tracing.IsEnabled() {
23234 ctx = tracing.StartSpan(ctx, fqdn+"/WorkloadProtectableItemResourceListPage.NextWithContext")
23235 defer func() {
23236 sc := -1
23237 if page.Response().Response.Response != nil {
23238 sc = page.Response().Response.Response.StatusCode
23239 }
23240 tracing.EndSpan(ctx, sc, err)
23241 }()
23242 }
23243 for {
23244 next, err := page.fn(ctx, page.wpirl)
23245 if err != nil {
23246 return err
23247 }
23248 page.wpirl = next
23249 if !next.hasNextLink() || !next.IsEmpty() {
23250 break
23251 }
23252 }
23253 return nil
23254 }
23255
23256
23257
23258
23259 func (page *WorkloadProtectableItemResourceListPage) Next() error {
23260 return page.NextWithContext(context.Background())
23261 }
23262
23263
23264 func (page WorkloadProtectableItemResourceListPage) NotDone() bool {
23265 return !page.wpirl.IsEmpty()
23266 }
23267
23268
23269 func (page WorkloadProtectableItemResourceListPage) Response() WorkloadProtectableItemResourceList {
23270 return page.wpirl
23271 }
23272
23273
23274 func (page WorkloadProtectableItemResourceListPage) Values() []WorkloadProtectableItemResource {
23275 if page.wpirl.IsEmpty() {
23276 return nil
23277 }
23278 return *page.wpirl.Value
23279 }
23280
23281
23282 func NewWorkloadProtectableItemResourceListPage(cur WorkloadProtectableItemResourceList, getNextPage func(context.Context, WorkloadProtectableItemResourceList) (WorkloadProtectableItemResourceList, error)) WorkloadProtectableItemResourceListPage {
23283 return WorkloadProtectableItemResourceListPage{
23284 fn: getNextPage,
23285 wpirl: cur,
23286 }
23287 }
23288
23289
23290 type YearlyRetentionSchedule struct {
23291
23292 RetentionScheduleFormatType RetentionScheduleFormat `json:"retentionScheduleFormatType,omitempty"`
23293
23294 MonthsOfYear *[]MonthOfYear `json:"monthsOfYear,omitempty"`
23295
23296 RetentionScheduleDaily *DailyRetentionFormat `json:"retentionScheduleDaily,omitempty"`
23297
23298 RetentionScheduleWeekly *WeeklyRetentionFormat `json:"retentionScheduleWeekly,omitempty"`
23299
23300 RetentionTimes *[]date.Time `json:"retentionTimes,omitempty"`
23301
23302 RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"`
23303 }
23304
View as plain text