-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.go
More file actions
1648 lines (1243 loc) · 68.4 KB
/
Copy pathmodels.go
File metadata and controls
1648 lines (1243 loc) · 68.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//go:build go1.18
// +build go1.18
// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.7.6, generator: @autorest/go@4.0.0-preview.42)
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package generated
import "time"
// AdhocBasedTaggingCriteria - Class for Adhoc backup Tagging Criteria
type AdhocBasedTaggingCriteria struct {
// Retention tag information
TagInfo *RetentionTag `json:"tagInfo,omitempty"`
}
// AdhocBasedTriggerContext - Adhoc based trigger
type AdhocBasedTriggerContext struct {
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
// REQUIRED; Tagging Criteria containing retention tag for adhoc backup.
TaggingCriteria *AdhocBasedTaggingCriteria `json:"taggingCriteria,omitempty"`
}
// GetTriggerContext implements the TriggerContextClassification interface for type AdhocBasedTriggerContext.
func (a *AdhocBasedTriggerContext) GetTriggerContext() *TriggerContext {
return &TriggerContext{
ObjectType: a.ObjectType,
}
}
// AutoHealSettings - AutoHeal Settings ? On/Off ; other flags
type AutoHealSettings struct {
// Policy controlled toggle
AutoHealStatus *AutoHealStatus `json:"autoHealStatus,omitempty"`
}
// AzureBackupParamsClassification provides polymorphic access to related types.
// Call the interface's GetAzureBackupParams() method to access the common type.
// Use a type switch to determine the concrete type. The possible types are:
// - *AzureBackupParams, *AzureBackupParamsForPlugin
type AzureBackupParamsClassification interface {
BackupParametersClassification
// GetAzureBackupParams returns the AzureBackupParams content of the underlying type.
GetAzureBackupParams() *AzureBackupParams
}
// AzureBackupParams - backup Parameters for Azure resources
type AzureBackupParams struct {
// REQUIRED; BackupType ; Full/Incremental etc
BackupType *string `json:"backupType,omitempty"`
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
}
// GetAzureBackupParams implements the AzureBackupParamsClassification interface for type AzureBackupParams.
func (a *AzureBackupParams) GetAzureBackupParams() *AzureBackupParams { return a }
// GetBackupParameters implements the BackupParametersClassification interface for type AzureBackupParams.
func (a *AzureBackupParams) GetBackupParameters() *BackupParameters {
return &BackupParameters{
ObjectType: a.ObjectType,
}
}
// AzureBackupParamsForPlugin - Backup Parameters that need to be sent for plugin
type AzureBackupParamsForPlugin struct {
// REQUIRED; BackupType ; Full/Incremental etc
BackupType *string `json:"backupType,omitempty"`
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
// REQUIRED; Retention tag that the backup must be marked with
RetentionTag *RetentionTag `json:"retentionTag,omitempty"`
// Setting for autoHeal
AutoHealSettings *AutoHealSettings `json:"autoHealSettings,omitempty"`
// Policy Info that is required while creating the pit by plugin
PolicyInfo *PolicyInfo `json:"policyInfo,omitempty"`
// BackupInstance policy-parameters containing DataStore parameters etc.
PolicyParameters *PolicyParameters `json:"policyParameters,omitempty"`
// Trigger Type ? Adhoc/Scheduled/Custom event etc.
TriggerType *TriggerType `json:"triggerType,omitempty"`
}
// GetAzureBackupParams implements the AzureBackupParamsClassification interface for type AzureBackupParamsForPlugin.
func (a *AzureBackupParamsForPlugin) GetAzureBackupParams() *AzureBackupParams {
return &AzureBackupParams{
BackupType: a.BackupType,
ObjectType: a.ObjectType,
}
}
// GetBackupParameters implements the BackupParametersClassification interface for type AzureBackupParamsForPlugin.
func (a *AzureBackupParamsForPlugin) GetBackupParameters() *BackupParameters {
return &BackupParameters{
ObjectType: a.ObjectType,
}
}
// AzureOperationalStoreParameters - Parameters for Operational-Tier DataStore
type AzureOperationalStoreParameters struct {
// REQUIRED; type of datastore; SnapShot/Hot/Archive
DataStoreType *DataStoreTypes `json:"dataStoreType,omitempty"`
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
// Gets or sets the Resource Group Uri.
ResourceGroupID *string `json:"resourceGroupId,omitempty"`
}
// GetDataStoreParameters implements the DataStoreParametersClassification interface for type AzureOperationalStoreParameters.
func (a *AzureOperationalStoreParameters) GetDataStoreParameters() *DataStoreParameters {
return &DataStoreParameters{
ObjectType: a.ObjectType,
DataStoreType: a.DataStoreType,
}
}
// BackupClientCancelOptions contains the optional parameters for the BackupClient.Cancel method.
type BackupClientCancelOptions struct {
// placeholder for future optional parameters
}
// BackupClientGetOptions contains the optional parameters for the BackupClient.Get method.
type BackupClientGetOptions struct {
// placeholder for future optional parameters
}
// BackupClientRefreshTokensOptions contains the optional parameters for the BackupClient.RefreshTokens method.
type BackupClientRefreshTokensOptions struct {
// placeholder for future optional parameters
}
// BackupCriteriaClassification provides polymorphic access to related types.
// Call the interface's GetBackupCriteria() method to access the common type.
// Use a type switch to determine the concrete type. The possible types are:
// - *BackupCriteria, *ScheduleBasedBackupCriteria
type BackupCriteriaClassification interface {
// GetBackupCriteria returns the BackupCriteria content of the underlying type.
GetBackupCriteria() *BackupCriteria
}
// BackupCriteria - Identifies the type of backup and trigger
type BackupCriteria struct {
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
}
// GetBackupCriteria implements the BackupCriteriaClassification interface for type BackupCriteria.
func (b *BackupCriteria) GetBackupCriteria() *BackupCriteria { return b }
// BackupDatasourceParametersClassification provides polymorphic access to related types.
// Call the interface's GetBackupDatasourceParameters() method to access the common type.
// Use a type switch to determine the concrete type. The possible types are:
// - *BackupDatasourceParameters, *BlobBackupDatasourceParameters
type BackupDatasourceParametersClassification interface {
// GetBackupDatasourceParameters returns the BackupDatasourceParameters content of the underlying type.
GetBackupDatasourceParameters() *BackupDatasourceParameters
}
// BackupDatasourceParameters - Parameters for Backup
type BackupDatasourceParameters struct {
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
}
// GetBackupDatasourceParameters implements the BackupDatasourceParametersClassification interface for type BackupDatasourceParameters.
func (b *BackupDatasourceParameters) GetBackupDatasourceParameters() *BackupDatasourceParameters { return b }
// BackupParametersClassification provides polymorphic access to related types.
// Call the interface's GetBackupParameters() method to access the common type.
// Use a type switch to determine the concrete type. The possible types are:
// - *AzureBackupParams, *AzureBackupParamsForPlugin, *BackupParameters
type BackupParametersClassification interface {
// GetBackupParameters returns the BackupParameters content of the underlying type.
GetBackupParameters() *BackupParameters
}
// BackupParameters - Base class for parameters specific to Backup agent
type BackupParameters struct {
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
}
// GetBackupParameters implements the BackupParametersClassification interface for type BackupParameters.
func (b *BackupParameters) GetBackupParameters() *BackupParameters { return b }
// BackupRequest for the backup operation
type BackupRequest struct {
// REQUIRED; List of properties with values that the Backup should honour, for a given BackupRule. Like Tags, Exclusion rules
// etc.
BackupParameters *AzureBackupParamsForPlugin `json:"backupParameters,omitempty"`
// REQUIRED; Datasource object
Datasource *Datasource `json:"datasource,omitempty"`
// REQUIRED; The dictionary required to initialize the Datastore client library.
DatastoreInitializeParams map[string]*string `json:"datastoreInitializeParams,omitempty"`
// REQUIRED; The dictionary required to initialize the RPCatalog client library.
RPCatalogInitializeParams map[string]*string `json:"rPCatalogInitializeParams,omitempty"`
// Additional Properties for extensibility.
AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"`
// Access token for the Datasource Mgmt and Data plane. This is an MSI token (in almost all cases)
DatasourceAccessToken *DatasourceTokens `json:"datasourceAccessToken,omitempty"`
// DatasourceSet object
DatasourceSet *DatasourceSet `json:"datasourceSet,omitempty"`
// The initialization params of the Job Client Lib. The plugin needs this to do progress updates on Jobs.
JobLibraryInitializationParams *string `json:"jobLibraryInitializationParams,omitempty"`
// LoopbackContext returned from previous plugin calls, to be sent again.
LoopBackContext *string `json:"loopBackContext,omitempty"`
}
// BackupRequestBase is the base for all backup request.
type BackupRequestBase struct {
// REQUIRED; List of properties with values that the Backup should honour, for a given BackupRule. Like Tags, Exclusion rules
// etc.
BackupParameters *AzureBackupParamsForPlugin `json:"backupParameters,omitempty"`
// REQUIRED; Datasource object
Datasource *Datasource `json:"datasource,omitempty"`
// REQUIRED; The dictionary required to initialize the Datastore client library.
DatastoreInitializeParams map[string]*string `json:"datastoreInitializeParams,omitempty"`
// REQUIRED; The dictionary required to initialize the RPCatalog client library.
RPCatalogInitializeParams map[string]*string `json:"rPCatalogInitializeParams,omitempty"`
// Additional Properties for extensibility.
AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"`
// Access token for the Datasource Mgmt and Data plane. This is an MSI token (in almost all cases)
DatasourceAccessToken *DatasourceTokens `json:"datasourceAccessToken,omitempty"`
// DatasourceSet object
DatasourceSet *DatasourceSet `json:"datasourceSet,omitempty"`
// The initialization params of the Job Client Lib. The plugin needs this to do progress updates on Jobs.
JobLibraryInitializationParams *string `json:"jobLibraryInitializationParams,omitempty"`
}
// BackupResponse for the backup operation.
type BackupResponse struct {
// REQUIRED; As passed in the URL?s operationId query parameter
ID *string `json:"id,omitempty"`
// REQUIRED; Backup Status for the operation
Result *BackupStatus `json:"result,omitempty"`
// REQUIRED; Service-set extensible enum indicating operation?s kind
Status *ExecutionStatus `json:"status,omitempty"`
// Embedded Error Object.
Error *Error `json:"error,omitempty"`
}
// BackupRule - Rule definition based on which backup is triggered
type BackupRule struct {
// AutoHeal Settings ? On/Off ; other flags
AutoHealSettings *AutoHealSettings `json:"autoHealSettings,omitempty"`
// it will have parameters that should be used by BA i.e backup type like Full, Incremental, Logs
BackupParameters BackupParametersClassification `json:"backupParameters,omitempty"`
// Unique name of the entity/object (sometimes this is friendly as well)
Name *string `json:"name,omitempty"`
// Type of the object/command/entity
ObjectType *string `json:"objectType,omitempty"`
// DataStore info object
TargetDatastore *DataStoreInfo `json:"targetDatastore,omitempty"`
// Defines trigger; schedule based or adhoc
Trigger TriggerContextClassification `json:"trigger,omitempty"`
}
// BackupSchedule - Complete definition of schedule
type BackupSchedule struct {
// REQUIRED; ISO 8601 repeating time interval format
RepeatingTimeIntervals []*string `json:"repeatingTimeIntervals,omitempty"`
// TimeZone input as string. For example: TimeZone = "Pacific Standard Time".
TimeZone *string `json:"timeZone,omitempty"`
}
// BackupSettings - Settings and rules required to take scheduled/adhoc backups
type BackupSettings struct {
// REQUIRED; Type of datasource for the backup management
DataSourceType *string `json:"dataSourceType,omitempty"`
// REQUIRED; List of Rules
Rules []*BackupRule `json:"rules,omitempty"`
// Type of Datasource object, used to initialize the right inherited type
ObjectType *string `json:"objectType,omitempty"`
// Name of the policy used for this backup instance
PolicyName *string `json:"policyName,omitempty"`
// Policy parameters for the backup instance
PolicyParameters *PolicyParameters `json:"policyParameters,omitempty"`
// this is optional raw json opaque setting for the datasource where mgmt does not understand the backup policy/setting.
RawJSONSetting *string `json:"rawJsonSetting,omitempty"`
}
// BackupStatus for the backup operation.
type BackupStatus struct {
// Any additional properties that should be returned along with this operation
AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"`
// Json serialized Loopback Context
LoopBackContext *string `json:"loopBackContext,omitempty"`
// If Plugin terminates with a retryable ErrorCode, it can set this value in Seconds for BA to retry after this.
RetryAfterOnRetryableErrorInSeconds *int32 `json:"retryAfterOnRetryableErrorInSeconds,omitempty"`
// Additional Json Serialized Telemetry data from the Plugin. This would be logged with BA Telemetry.
TelemetryData *string `json:"telemetryData,omitempty"`
}
// BaseRequest - Base request for all plugin operations
type BaseRequest struct {
// Additional Properties for extensibility.
AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"`
// Access token for the Datasource Mgmt and Data plane. This is an MSI token (in almost all cases)
DatasourceAccessToken *DatasourceTokens `json:"datasourceAccessToken,omitempty"`
// The initialization params of the Job Client Lib. The plugin needs this to do progress updates on Jobs.
JobLibraryInitializationParams *string `json:"jobLibraryInitializationParams,omitempty"`
}
// BaseResourcePropertiesClassification provides polymorphic access to related types.
// Call the interface's GetBaseResourceProperties() method to access the common type.
// Use a type switch to determine the concrete type. The possible types are:
// - *BaseResourceProperties
type BaseResourcePropertiesClassification interface {
// GetBaseResourceProperties returns the BaseResourceProperties content of the underlying type.
GetBaseResourceProperties() *BaseResourceProperties
}
// BaseResourceProperties - Properties which are specific to datasource/datasourcesets/backupinstanceref/backupsettings
type BaseResourceProperties struct {
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
}
// GetBaseResourceProperties implements the BaseResourcePropertiesClassification interface for type BaseResourceProperties.
func (b *BaseResourceProperties) GetBaseResourceProperties() *BaseResourceProperties { return b }
// BaseStatus - Base Response.
type BaseStatus struct {
// Any additional properties that should be returned along with this operation
AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"`
// If Plugin terminates with a retryable ErrorCode, it can set this value in Seconds for BA to retry after this.
RetryAfterOnRetryableErrorInSeconds *int32 `json:"retryAfterOnRetryableErrorInSeconds,omitempty"`
// Additional Json Serialized Telemetry data from the Plugin. This would be logged with BA Telemetry.
TelemetryData *string `json:"telemetryData,omitempty"`
}
// BlobBackupDatasourceParameters - Parameters for Backup
type BlobBackupDatasourceParameters struct {
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
// List of containers to be protected
ContainersList []*string `json:"containersList,omitempty"`
}
// GetBackupDatasourceParameters implements the BackupDatasourceParametersClassification interface for type BlobBackupDatasourceParameters.
func (b *BlobBackupDatasourceParameters) GetBackupDatasourceParameters() *BackupDatasourceParameters {
return &BackupDatasourceParameters{
ObjectType: b.ObjectType,
}
}
// CancelRequest - Cancel Request contract
type CancelRequest struct {
// Access token for the Datasource Mgmt and Data plane. This is an MSI token (in almost all cases)
DatasourceAccessToken *DatasourceTokens `json:"datasourceAccessToken,omitempty"`
}
// CommitOrRollbackBackupClientCancelOptions contains the optional parameters for the CommitOrRollbackBackupClient.Cancel
// method.
type CommitOrRollbackBackupClientCancelOptions struct {
// placeholder for future optional parameters
}
// CommitOrRollbackBackupClientGetOptions contains the optional parameters for the CommitOrRollbackBackupClient.Get method.
type CommitOrRollbackBackupClientGetOptions struct {
// placeholder for future optional parameters
}
// CommitOrRollbackBackupClientRefreshTokensOptions contains the optional parameters for the CommitOrRollbackBackupClient.RefreshTokens
// method.
type CommitOrRollbackBackupClientRefreshTokensOptions struct {
// placeholder for future optional parameters
}
// CommitOrRollbackBackupRequest for the CommitOrRollbackBackup operation.
type CommitOrRollbackBackupRequest struct {
// REQUIRED; List of properties with values that the Backup should honour, for a given BackupRule. Like Tags, Exclusion rules
// etc.
BackupParameters *AzureBackupParamsForPlugin `json:"backupParameters,omitempty"`
// REQUIRED; Datasource object
Datasource *Datasource `json:"datasource,omitempty"`
// REQUIRED; The dictionary required to initialize the Datastore client library.
DatastoreInitializeParams map[string]*string `json:"datastoreInitializeParams,omitempty"`
// REQUIRED; The dictionary required to initialize the RPCatalog client library.
RPCatalogInitializeParams map[string]*string `json:"rPCatalogInitializeParams,omitempty"`
// Additional Properties for extensibility.
AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"`
// Access token for the Datasource Mgmt and Data plane. This is an MSI token (in almost all cases)
DatasourceAccessToken *DatasourceTokens `json:"datasourceAccessToken,omitempty"`
// DatasourceSet object
DatasourceSet *DatasourceSet `json:"datasourceSet,omitempty"`
// The initialization params of the Job Client Lib. The plugin needs this to do progress updates on Jobs.
JobLibraryInitializationParams *string `json:"jobLibraryInitializationParams,omitempty"`
// LoopbackContext returned from previous plugin calls, to be sent again.
LoopBackContext *string `json:"loopBackContext,omitempty"`
}
// CommitOrRollbackBackupResponse for the backup operation.
type CommitOrRollbackBackupResponse struct {
// REQUIRED; As passed in the URL?s operationId query parameter
ID *string `json:"id,omitempty"`
// REQUIRED; CommitOrRollbackBackupStatus for the operation
Result *CommitOrRollbackBackupStatus `json:"result,omitempty"`
// REQUIRED; Service-set extensible enum indicating operation?s kind
Status *ExecutionStatus `json:"status,omitempty"`
// Embedded Error Object.
Error *Error `json:"error,omitempty"`
}
// CommitOrRollbackBackupStatus for the CommitOrRollbackBackup operation.
type CommitOrRollbackBackupStatus struct {
// Any additional properties that should be returned along with this operation
AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"`
// Size of data transferred as part of backup
DataTransferredInBytes *int64 `json:"dataTransferredInBytes,omitempty"`
// Size of datasource in bytes
DatasourceSizeInBytes *int64 `json:"datasourceSizeInBytes,omitempty"`
// If Plugin terminates with a retryable ErrorCode, it can set this value in Seconds for BA to retry after this.
RetryAfterOnRetryableErrorInSeconds *int32 `json:"retryAfterOnRetryableErrorInSeconds,omitempty"`
// Additional Json Serialized Telemetry data from the Plugin. This would be logged with BA Telemetry.
TelemetryData *string `json:"telemetryData,omitempty"`
}
// CommitOrRollbackRestoreClientCancelOptions contains the optional parameters for the CommitOrRollbackRestoreClient.Cancel
// method.
type CommitOrRollbackRestoreClientCancelOptions struct {
// placeholder for future optional parameters
}
// CommitOrRollbackRestoreClientGetOptions contains the optional parameters for the CommitOrRollbackRestoreClient.Get method.
type CommitOrRollbackRestoreClientGetOptions struct {
// placeholder for future optional parameters
}
// CommitOrRollbackRestoreClientRefreshTokensOptions contains the optional parameters for the CommitOrRollbackRestoreClient.RefreshTokens
// method.
type CommitOrRollbackRestoreClientRefreshTokensOptions struct {
// placeholder for future optional parameters
}
// CommitOrRollbackRestoreRequest for the CommitOrRollbackRestore operation.
type CommitOrRollbackRestoreRequest struct {
// REQUIRED; Overwrite if exists ?.
ForceOverwrite *bool `json:"forceOverwrite,omitempty"`
// REQUIRED; Restore type: OLR, ALR, ILR, Copy
RestoreType *RestoreType `json:"restoreType,omitempty"`
// REQUIRED; Source Datasource object
SourceDatasource *Datasource `json:"sourceDatasource,omitempty"`
// Additional Properties for extensibility.
AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"`
// Access token for the Datasource Mgmt and Data plane. This is an MSI token (in almost all cases)
DatasourceAccessToken *DatasourceTokens `json:"datasourceAccessToken,omitempty"`
// The dictionary required to initialize the Datastore client library. We need to GET Backup content of the source.
DatastoreInitializeParams map[string]*string `json:"datastoreInitializeParams,omitempty"`
// Item level restore criteria
ILRRestoreCriteria []ItemLevelRestoreCriteriaClassification `json:"iLRRestoreCriteria,omitempty"`
// The initialization params of the Job Client Lib. The plugin needs this to do progress updates on Jobs.
JobLibraryInitializationParams *string `json:"jobLibraryInitializationParams,omitempty"`
// LoopbackContext returned from previous plugin calls, to be sent again.
LoopBackContext *string `json:"loopBackContext,omitempty"`
// The dictionary required to initialize the RPCatalog client library. We need to GET RPs of the src.
RPCatalogInitializeParams map[string]*string `json:"rPCatalogInitializeParams,omitempty"`
// Destination of RestoreAsFiles operation, when destination is not a datasource
RestoreAsFilesTargetDetails *TargetDetails `json:"restoreAsFilesTargetDetails,omitempty"`
// PointInTime to be used for restore.
RestoreToPointInTime *string `json:"restoreToPointInTime,omitempty"`
// RPId to be used for restore.
RestoreToRPID *string `json:"restoreToRPId,omitempty"`
// Source DatasourceSet object
SourceDatasourceSet *DatasourceSet `json:"sourceDatasourceSet,omitempty"`
// Target Datasource object
TargetDatasource *Datasource `json:"targetDatasource,omitempty"`
// Target DatasourceSet object
TargetDatasourceSet *DatasourceSet `json:"targetDatasourceSet,omitempty"`
}
// CommitOrRollbackRestoreResponse for the Restore operation.
type CommitOrRollbackRestoreResponse struct {
// REQUIRED; As passed in the URL?s operationId query parameter
ID *string `json:"id,omitempty"`
// REQUIRED; CommitOrRollbackRestoreStatus for the operation
Result *CommitOrRollbackRestoreStatus `json:"result,omitempty"`
// REQUIRED; Service-set extensible enum indicating operation?s kind
Status *ExecutionStatus `json:"status,omitempty"`
// Embedded Error Object.
Error *Error `json:"error,omitempty"`
}
// CommitOrRollbackRestoreStatus for the CommitOrRollbackRestore status.
type CommitOrRollbackRestoreStatus struct {
// Any additional properties that should be returned along with this operation
AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"`
// Size of data transferred as part of backup
DataTransferredInBytes *int64 `json:"dataTransferredInBytes,omitempty"`
// Size of original datasource when the backup was created
OriginalDatasourceSizeInBytes *int64 `json:"originalDatasourceSizeInBytes,omitempty"`
// If Plugin terminates with a retryable ErrorCode, it can set this value in Seconds for BA to retry after this.
RetryAfterOnRetryableErrorInSeconds *int32 `json:"retryAfterOnRetryableErrorInSeconds,omitempty"`
// Additional Json Serialized Telemetry data from the Plugin. This would be logged with BA Telemetry.
TelemetryData *string `json:"telemetryData,omitempty"`
}
// DataStoreInfo - Information of Datastore
type DataStoreInfo struct {
// REQUIRED; UniqueId of DataStore
DataStoreID *string `json:"dataStoreId,omitempty"`
// REQUIRED; Name of DataStore
DataStoreName *string `json:"dataStoreName,omitempty"`
// REQUIRED; type of datastore; SnapShot/Hot/Archive
DataStoreType *DataStoreTypes `json:"dataStoreType,omitempty"`
// REQUIRED; endpoint url of datastore
DataStoreURL *string `json:"dataStoreURL,omitempty"`
// REQUIRED; Type of Datasource object, used to initialize the right inherited type
ObjectType *string `json:"objectType,omitempty"`
// Type of storage to be used for storing backup data. Passed as input to datastore.
AuthorizationTypeFlags *string `json:"authorizationTypeFlags,omitempty"`
// Type of storage to be used for storing backup data. Passed as input to datastore.
StorageTypeFlags *string `json:"storageTypeFlags,omitempty"`
}
// DataStoreParametersClassification provides polymorphic access to related types.
// Call the interface's GetDataStoreParameters() method to access the common type.
// Use a type switch to determine the concrete type. The possible types are:
// - *AzureOperationalStoreParameters, *DataStoreParameters
type DataStoreParametersClassification interface {
// GetDataStoreParameters returns the DataStoreParameters content of the underlying type.
GetDataStoreParameters() *DataStoreParameters
}
// DataStoreParameters - Parameters for DataStore
type DataStoreParameters struct {
// REQUIRED; type of datastore; SnapShot/Hot/Archive
DataStoreType *DataStoreTypes `json:"dataStoreType,omitempty"`
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
}
// GetDataStoreParameters implements the DataStoreParametersClassification interface for type DataStoreParameters.
func (d *DataStoreParameters) GetDataStoreParameters() *DataStoreParameters { return d }
// Datasource - Base datasource class with properties common to all fabric types
type Datasource struct {
// REQUIRED; Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID
// created by backup service via Fabric/Vault.
ResourceID *string `json:"resourceID,omitempty"`
// BaseUri of the resource. For azure resources, this will be ARM endpoint of current cloud. For non azure resources, this
// will be private endpoint information or null.
BaseURI *string `json:"baseUri,omitempty"`
// DatasourceType of the resource.
DatasourceType *string `json:"datasourceType,omitempty"`
// Type of Datasource object, used to initialize the right inherited type
ObjectType *string `json:"objectType,omitempty"`
// Location of datasource.
ResourceLocation *string `json:"resourceLocation,omitempty"`
// Unique identifier of the resource in the context of parent.
ResourceName *string `json:"resourceName,omitempty"`
// Properties specific to data source
ResourceProperties BaseResourcePropertiesClassification `json:"resourceProperties,omitempty"`
// Resource Type of Datasource.
ResourceType *string `json:"resourceType,omitempty"`
// Uri of the resource.
ResourceURI *string `json:"resourceUri,omitempty"`
}
// DatasourceSet class with properties common to all fabric types
type DatasourceSet struct {
// REQUIRED; Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID
// created by backup service via Fabric/Vault.
ResourceID *string `json:"resourceID,omitempty"`
// BaseUri of the resource. For azure resources, this will be ARM endpoint of current cloud. For non azure resources, this
// will be private endpoint information or null.
BaseURI *string `json:"baseUri,omitempty"`
// DatasourceType of the resource.
DatasourceType *string `json:"datasourceType,omitempty"`
// Type of Datasource object, used to initialize the right inherited type
ObjectType *string `json:"objectType,omitempty"`
// Location of datasource.
ResourceLocation *string `json:"resourceLocation,omitempty"`
// Unique identifier of the resource in the context of parent.
ResourceName *string `json:"resourceName,omitempty"`
// Properties specific to data source
ResourceProperties BaseResourcePropertiesClassification `json:"resourceProperties,omitempty"`
// Resource Type of Datasource.
ResourceType *string `json:"resourceType,omitempty"`
// Uri of the resource.
ResourceURI *string `json:"resourceUri,omitempty"`
}
// DatasourceTokens - Tokens to be sent by Backup Agent to plugin host
type DatasourceTokens struct {
// PrincipalId of the identity which is providing DataPlaneToken.
DataPlanePrincipalID *string `json:"dataPlanePrincipalId,omitempty"`
// Token associated with accessing the data plane of datasource.
DataPlaneToken *string `json:"dataPlaneToken,omitempty"`
// Gets or sets the type of DataPlaneToken. One of values defined in enum DataPlaneTokenType.
DataPlaneTokenType *string `json:"dataPlaneTokenType,omitempty"`
// PrincipalId of the identity which is providing DataPlaneToken. Typically Vault MSI PrincipalId.
MgmtPlanePrincipalID *string `json:"mgmtPlanePrincipalId,omitempty"`
// Access token for the Datasource management plane. This is an MSI token (in almost all cases)
MgmtPlaneToken *string `json:"mgmtPlaneToken,omitempty"`
}
// Day of the Month.
type Day struct {
// Date of the month
Date *int32 `json:"date,omitempty"`
// Whether Date is last date of month
IsLast *bool `json:"isLast,omitempty"`
}
// Error object used by layers that dont use any localized content.
type Error struct {
// Unique code for this error
Code *string `json:"code,omitempty"`
// Additional related Errors
Details []*Error `json:"details,omitempty"`
// Inner Error
InnerError *InnerError `json:"innerError,omitempty"`
// Message ? Human readable, non-localized.
Message *string `json:"message,omitempty"`
// Any key value pairs that can be injected inside error object
Properties map[string]*string `json:"properties,omitempty"`
// Target of the error.
Target *string `json:"target,omitempty"`
}
// InnerError - Inner Error
type InnerError struct {
// Any Key value pairs that can be provided to the client for additional verbose information.
AdditionalInfo map[string]*string `json:"additionalInfo,omitempty"`
// Unique code for this error
Code *string `json:"code,omitempty"`
// Child Inner Error, to allow Nesting.
EmbeddedInnerError *InnerError `json:"embeddedInnerError,omitempty"`
}
// ItemLevelRestoreCriteriaClassification provides polymorphic access to related types.
// Call the interface's GetItemLevelRestoreCriteria() method to access the common type.
// Use a type switch to determine the concrete type. The possible types are:
// - *ItemLevelRestoreCriteria, *ItemPathBasedRestoreCriteria, *KubernetesPVRestoreCriteria, *KubernetesStorageClassRestoreCriteria,
// - *RangeBasedItemLevelRestoreCriteria
type ItemLevelRestoreCriteriaClassification interface {
// GetItemLevelRestoreCriteria returns the ItemLevelRestoreCriteria content of the underlying type.
GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria
}
// ItemLevelRestoreCriteria - Class to contain criteria for item level restore
type ItemLevelRestoreCriteria struct {
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
}
// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type ItemLevelRestoreCriteria.
func (i *ItemLevelRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria { return i }
// ItemPathBasedRestoreCriteria - Class to contain criteria for item path based restore
type ItemPathBasedRestoreCriteria struct {
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
// Flag to specify if the path is relative to Backup Item or full path
IsPathRelativeToBackupItem *bool `json:"isPathRelativeToBackupItem,omitempty"`
// Path of the item to be restored
ItemPath *string `json:"itemPath,omitempty"`
}
// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type ItemPathBasedRestoreCriteria.
func (i *ItemPathBasedRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria {
return &ItemLevelRestoreCriteria{
ObjectType: i.ObjectType,
}
}
// KubernetesPVRestoreCriteria - Class used for Kubernetes PV Restore Criteria
type KubernetesPVRestoreCriteria struct {
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
// name of the kubernetes resource
Name *string `json:"name,omitempty"`
// storage class name
StorageClassName *string `json:"storageClassName,omitempty"`
}
// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type KubernetesPVRestoreCriteria.
func (k *KubernetesPVRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria {
return &ItemLevelRestoreCriteria{
ObjectType: k.ObjectType,
}
}
// KubernetesStorageClassRestoreCriteria - Class used for Kubernetes Storage Class Restore Criteria
type KubernetesStorageClassRestoreCriteria struct {
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
// provisioner for the kubernetes resource
Provisioner *string `json:"provisioner,omitempty"`
// selected storage class name
SelectedStorageClassName *string `json:"selectedStorageClassName,omitempty"`
}
// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type KubernetesStorageClassRestoreCriteria.
func (k *KubernetesStorageClassRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria {
return &ItemLevelRestoreCriteria{
ObjectType: k.ObjectType,
}
}
// PluginClientBackupOptions contains the optional parameters for the PluginClient.Backup method.
type PluginClientBackupOptions struct {
// placeholder for future optional parameters
}
// PluginClientCommitOrRollbackBackupOptions contains the optional parameters for the PluginClient.CommitOrRollbackBackup
// method.
type PluginClientCommitOrRollbackBackupOptions struct {
// placeholder for future optional parameters
}
// PluginClientCommitOrRollbackRestoreOptions contains the optional parameters for the PluginClient.CommitOrRollbackRestore
// method.
type PluginClientCommitOrRollbackRestoreOptions struct {
// placeholder for future optional parameters
}
// PluginClientRestoreOptions contains the optional parameters for the PluginClient.Restore method.
type PluginClientRestoreOptions struct {
// placeholder for future optional parameters
}
// PluginClientStartProtectionOptions contains the optional parameters for the PluginClient.StartProtection method.
type PluginClientStartProtectionOptions struct {
// placeholder for future optional parameters
}
// PluginClientStopProtectionOptions contains the optional parameters for the PluginClient.StopProtection method.
type PluginClientStopProtectionOptions struct {
// placeholder for future optional parameters
}
// PluginClientUpdateProtectionOptions contains the optional parameters for the PluginClient.UpdateProtection method.
type PluginClientUpdateProtectionOptions struct {
// placeholder for future optional parameters
}
// PluginClientValidateForBackupOptions contains the optional parameters for the PluginClient.ValidateForBackup method.
type PluginClientValidateForBackupOptions struct {
// placeholder for future optional parameters
}
// PluginClientValidateForProtectionOptions contains the optional parameters for the PluginClient.ValidateForProtection method.
type PluginClientValidateForProtectionOptions struct {
// placeholder for future optional parameters
}
// PluginClientValidateForRestoreOptions contains the optional parameters for the PluginClient.ValidateForRestore method.
type PluginClientValidateForRestoreOptions struct {
// placeholder for future optional parameters
}
// PolicyInfo - Policy Info for the backups
type PolicyInfo struct {
// Name of the policy that pit should be tagged with
PolicyName *string `json:"policyName,omitempty"`
// Version of policy that pit should be tagged with
PolicyVersion *string `json:"policyVersion,omitempty"`
}
// PolicyParameters - Parameters in Policy
type PolicyParameters struct {
// Gets or sets the Backup Parameters
BackupDatasourceParametersList []BackupDatasourceParametersClassification `json:"backupDatasourceParametersList,omitempty"`
// Gets or sets the DataStore Parameters
DataStoreParametersList []DataStoreParametersClassification `json:"dataStoreParametersList,omitempty"`
}
// ProtectionRequestBase - Base request for Validate, Start and Stop protection
type ProtectionRequestBase struct {
// REQUIRED; Full backup settings used to protect the datasource
BackupSettings *BackupSettings `json:"backupSettings,omitempty"`
// REQUIRED; Datasource object
Datasource *Datasource `json:"datasource,omitempty"`
// Additional Properties for extensibility.
AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"`
// Access token for the Datasource Mgmt and Data plane. This is an MSI token (in almost all cases)
DatasourceAccessToken *DatasourceTokens `json:"datasourceAccessToken,omitempty"`
// DatasourceSet object
DatasourceSet *DatasourceSet `json:"datasourceSet,omitempty"`
// The initialization params of the Job Client Lib. The plugin needs this to do progress updates on Jobs.
JobLibraryInitializationParams *string `json:"jobLibraryInitializationParams,omitempty"`
}
// RangeBasedItemLevelRestoreCriteria - Item Level target info for restore operation
type RangeBasedItemLevelRestoreCriteria struct {
// REQUIRED; Type of the specific object - used for deserializing
ObjectType *string `json:"objectType,omitempty"`
// maximum value for range prefix match
MaxMatchingValue *string `json:"maxMatchingValue,omitempty"`
// minimum value for range prefix match
MinMatchingValue *string `json:"minMatchingValue,omitempty"`
}
// GetItemLevelRestoreCriteria implements the ItemLevelRestoreCriteriaClassification interface for type RangeBasedItemLevelRestoreCriteria.
func (r *RangeBasedItemLevelRestoreCriteria) GetItemLevelRestoreCriteria() *ItemLevelRestoreCriteria {
return &ItemLevelRestoreCriteria{
ObjectType: r.ObjectType,
}
}
// RefreshTokensRequest - RefreshToken Request contract
type RefreshTokensRequest struct {
// Access token for the Datasource Mgmt and Data plane. This is an MSI token (in almost all cases)
DatasourceAccessToken *DatasourceTokens `json:"datasourceAccessToken,omitempty"`
}
// Response body received from the Plugin Server.
type Response struct {
// REQUIRED; As passed in the URL?s operationId query parameter
ID *string `json:"id,omitempty"`
// REQUIRED; Service-set extensible enum indicating operation?s kind
Status *ExecutionStatus `json:"status,omitempty"`
// Embedded Error Object.
Error *Error `json:"error,omitempty"`
}
// RestoreClientCancelOptions contains the optional parameters for the RestoreClient.Cancel method.
type RestoreClientCancelOptions struct {
// placeholder for future optional parameters
}
// RestoreClientGetOptions contains the optional parameters for the RestoreClient.Get method.
type RestoreClientGetOptions struct {
// placeholder for future optional parameters
}
// RestoreClientRefreshTokensOptions contains the optional parameters for the RestoreClient.RefreshTokens method.
type RestoreClientRefreshTokensOptions struct {
// placeholder for future optional parameters
}
// RestoreRequest for the Restore operation.
type RestoreRequest struct {
// REQUIRED; Overwrite if exists ?.
ForceOverwrite *bool `json:"forceOverwrite,omitempty"`
// REQUIRED; Restore type: OLR, ALR, ILR, Copy
RestoreType *RestoreType `json:"restoreType,omitempty"`
// REQUIRED; Source Datasource object
SourceDatasource *Datasource `json:"sourceDatasource,omitempty"`
// Additional Properties for extensibility.
AdditionalProperties map[string]*string `json:"additionalProperties,omitempty"`
// Access token for the Datasource Mgmt and Data plane. This is an MSI token (in almost all cases)
DatasourceAccessToken *DatasourceTokens `json:"datasourceAccessToken,omitempty"`
// The dictionary required to initialize the Datastore client library. We need to GET Backup content of the source.
DatastoreInitializeParams map[string]*string `json:"datastoreInitializeParams,omitempty"`
// Item level restore criteria
ILRRestoreCriteria []ItemLevelRestoreCriteriaClassification `json:"iLRRestoreCriteria,omitempty"`
// The initialization params of the Job Client Lib. The plugin needs this to do progress updates on Jobs.
JobLibraryInitializationParams *string `json:"jobLibraryInitializationParams,omitempty"`
// LoopbackContext returned from previous plugin calls, to be sent again.
LoopBackContext *string `json:"loopBackContext,omitempty"`
// The dictionary required to initialize the RPCatalog client library. We need to GET RPs of the src.
RPCatalogInitializeParams map[string]*string `json:"rPCatalogInitializeParams,omitempty"`