/
everest-server.gen.go
2243 lines (1856 loc) · 111 KB
/
everest-server.gen.go
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
// Package api provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
package api
import (
"bytes"
"compress/gzip"
"encoding/base64"
"encoding/json"
"fmt"
"net/http"
"net/url"
"path"
"strings"
"time"
"github.com/getkin/kin-openapi/openapi3"
"github.com/labstack/echo/v4"
"github.com/oapi-codegen/runtime"
)
// Defines values for BackupStorageType.
const (
BackupStorageTypeAzure BackupStorageType = "azure"
BackupStorageTypeS3 BackupStorageType = "s3"
)
// Defines values for CreateBackupStorageParamsType.
const (
CreateBackupStorageParamsTypeAzure CreateBackupStorageParamsType = "azure"
CreateBackupStorageParamsTypeS3 CreateBackupStorageParamsType = "s3"
)
// Defines values for DatabaseClusterSpecDataSourcePitrType.
const (
DatabaseClusterSpecDataSourcePitrTypeDate DatabaseClusterSpecDataSourcePitrType = "date"
DatabaseClusterSpecDataSourcePitrTypeLatest DatabaseClusterSpecDataSourcePitrType = "latest"
)
// Defines values for DatabaseClusterSpecEngineType.
const (
Postgresql DatabaseClusterSpecEngineType = "postgresql"
Psmdb DatabaseClusterSpecEngineType = "psmdb"
Pxc DatabaseClusterSpecEngineType = "pxc"
)
// Defines values for DatabaseClusterSpecProxyExposeType.
const (
External DatabaseClusterSpecProxyExposeType = "external"
Internal DatabaseClusterSpecProxyExposeType = "internal"
)
// Defines values for DatabaseClusterSpecProxyType.
const (
Haproxy DatabaseClusterSpecProxyType = "haproxy"
Mongos DatabaseClusterSpecProxyType = "mongos"
Pgbouncer DatabaseClusterSpecProxyType = "pgbouncer"
Proxysql DatabaseClusterSpecProxyType = "proxysql"
)
// Defines values for DatabaseClusterRestoreSpecDataSourcePitrType.
const (
DatabaseClusterRestoreSpecDataSourcePitrTypeDate DatabaseClusterRestoreSpecDataSourcePitrType = "date"
DatabaseClusterRestoreSpecDataSourcePitrTypeLatest DatabaseClusterRestoreSpecDataSourcePitrType = "latest"
)
// Defines values for MonitoringInstanceBaseType.
const (
MonitoringInstanceBaseTypePmm MonitoringInstanceBaseType = "pmm"
)
// Defines values for MonitoringInstanceBaseWithNameType.
const (
MonitoringInstanceBaseWithNameTypePmm MonitoringInstanceBaseWithNameType = "pmm"
)
// Defines values for MonitoringInstanceCreateParamsType.
const (
MonitoringInstanceCreateParamsTypePmm MonitoringInstanceCreateParamsType = "pmm"
)
// Defines values for MonitoringInstanceUpdateParamsType.
const (
MonitoringInstanceUpdateParamsTypePmm MonitoringInstanceUpdateParamsType = "pmm"
)
// BackupStorage Backup storage information
type BackupStorage struct {
// AllowedNamespaces List of namespaces allowed to use this backup storage
AllowedNamespaces []string `json:"allowedNamespaces"`
BucketName string `json:"bucketName"`
Description *string `json:"description,omitempty"`
Name string `json:"name"`
Region string `json:"region,omitempty"`
Type BackupStorageType `json:"type"`
Url *string `json:"url,omitempty"`
}
// BackupStorageType defines model for BackupStorage.Type.
type BackupStorageType string
// BackupStoragesList defines model for BackupStoragesList.
type BackupStoragesList = []BackupStorage
// CreateBackupStorageParams Backup storage parameters
type CreateBackupStorageParams struct {
AccessKey string `json:"accessKey"`
// AllowedNamespaces List of namespaces allowed to use this backup storage
AllowedNamespaces []string `json:"allowedNamespaces"`
// BucketName The cloud storage bucket/container name
BucketName string `json:"bucketName"`
Description *string `json:"description,omitempty"`
// Name A user defined string name of the storage in the DNS name format https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names
Name string `json:"name"`
Region string `json:"region,omitempty"`
SecretKey string `json:"secretKey"`
Type CreateBackupStorageParamsType `json:"type"`
Url *string `json:"url,omitempty"`
}
// CreateBackupStorageParamsType defines model for CreateBackupStorageParams.Type.
type CreateBackupStorageParamsType string
// DatabaseCluster DatabaseCluster is the Schema for the databaseclusters API.
type DatabaseCluster struct {
// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `json:"apiVersion,omitempty"`
// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Spec DatabaseClusterSpec defines the desired state of DatabaseCluster.
Spec *struct {
// AllowUnsafeConfiguration AllowUnsafeConfiguration field used to ensure that the user can create configurations unfit for production use.
AllowUnsafeConfiguration *bool `json:"allowUnsafeConfiguration,omitempty"`
// Backup Backup is the backup specification
Backup *struct {
// Enabled Enabled is a flag to enable backups
Enabled bool `json:"enabled"`
// Pitr PITR is the configuration of the point in time recovery
Pitr *struct {
// BackupStorageName BackupStorageName is the name of the BackupStorage where the PITR is enabled
BackupStorageName *string `json:"backupStorageName,omitempty"`
// Enabled Enabled is a flag to enable PITR
Enabled bool `json:"enabled"`
// UploadIntervalSec UploadIntervalSec number of seconds between the binlogs uploads
UploadIntervalSec *int `json:"uploadIntervalSec,omitempty"`
} `json:"pitr,omitempty"`
// Schedules Schedules is a list of backup schedules
Schedules *[]struct {
// BackupStorageName BackupStorageName is the name of the BackupStorage CR that defines the storage location
BackupStorageName string `json:"backupStorageName"`
// Enabled Enabled is a flag to enable the schedule
Enabled bool `json:"enabled"`
// Name Name is the name of the schedule
Name string `json:"name"`
// RetentionCopies RetentionCopies is the number of backup copies to retain
RetentionCopies *int32 `json:"retentionCopies,omitempty"`
// Schedule Schedule is the cron schedule
Schedule string `json:"schedule"`
} `json:"schedules,omitempty"`
} `json:"backup,omitempty"`
// DataSource DataSource defines a data source for bootstraping a new cluster
DataSource *struct {
// BackupSource BackupSource is the backup source to restore from
BackupSource *struct {
// BackupStorageName BackupStorageName is the name of the BackupStorage used for backups.
BackupStorageName string `json:"backupStorageName"`
// Path Path is the path to the backup file/directory.
Path string `json:"path"`
} `json:"backupSource,omitempty"`
// DbClusterBackupName DBClusterBackupName is the name of the DB cluster backup to restore from
DbClusterBackupName *string `json:"dbClusterBackupName,omitempty"`
// Pitr PITR is the point-in-time recovery configuration
Pitr *struct {
// Date Date is the UTC date to recover to. The accepted format: "2006-01-02T15:04:05Z".
Date *string `json:"date,omitempty"`
// Type Type is the type of recovery.
Type *DatabaseClusterSpecDataSourcePitrType `json:"type,omitempty"`
} `json:"pitr,omitempty"`
} `json:"dataSource,omitempty"`
// Engine Engine is the database engine specification
Engine struct {
// Config Config is the engine configuration
Config *string `json:"config,omitempty"`
// Replicas Replicas is the number of engine replicas
Replicas *int32 `json:"replicas,omitempty"`
// Resources Resources are the resource limits for each engine replica. If not set, resource limits are not imposed
Resources *struct {
// Cpu CPU is the CPU resource requirements
Cpu *DatabaseCluster_Spec_Engine_Resources_Cpu `json:"cpu,omitempty"`
// Memory Memory is the memory resource requirements
Memory *DatabaseCluster_Spec_Engine_Resources_Memory `json:"memory,omitempty"`
} `json:"resources,omitempty"`
// Storage Storage is the engine storage configuration
Storage struct {
// Class Class is the storage class to use for the persistent volume claim
Class *string `json:"class,omitempty"`
// Size Size is the size of the persistent volume claim
Size DatabaseCluster_Spec_Engine_Storage_Size `json:"size"`
} `json:"storage"`
// Type Type is the engine type
Type DatabaseClusterSpecEngineType `json:"type"`
// UserSecretsName UserSecretsName is the name of the secret containing the user secrets
UserSecretsName *string `json:"userSecretsName,omitempty"`
// Version Version is the engine version
Version *string `json:"version,omitempty"`
} `json:"engine"`
// Monitoring Monitoring is the monitoring configuration
Monitoring *struct {
// MonitoringConfigName MonitoringConfigName is the name of a monitoringConfig CR.
MonitoringConfigName *string `json:"monitoringConfigName,omitempty"`
// Resources Resources defines resource limitations for the monitoring.
Resources *struct {
// Claims Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.
// This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
// This field is immutable. It can only be set for containers.
Claims *[]struct {
// Name Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
Name string `json:"name"`
} `json:"claims,omitempty"`
// Limits Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Limits *map[string]DatabaseCluster_Spec_Monitoring_Resources_Limits_AdditionalProperties `json:"limits,omitempty"`
// Requests Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Requests *map[string]DatabaseCluster_Spec_Monitoring_Resources_Requests_AdditionalProperties `json:"requests,omitempty"`
} `json:"resources,omitempty"`
} `json:"monitoring,omitempty"`
// Paused Paused is a flag to stop the cluster
Paused *bool `json:"paused,omitempty"`
// Proxy Proxy is the proxy specification. If not set, an appropriate proxy specification will be applied for the given engine. A common use case for setting this field is to control the external access to the database cluster.
Proxy *struct {
// Config Config is the proxy configuration
Config *string `json:"config,omitempty"`
// Expose Expose is the proxy expose configuration
Expose *struct {
// IpSourceRanges IPSourceRanges is the list of IP source ranges (CIDR notation) to allow access from. If not set, there is no limitations
IpSourceRanges *[]string `json:"ipSourceRanges,omitempty"`
// Type Type is the expose type, can be internal or external
Type *DatabaseClusterSpecProxyExposeType `json:"type,omitempty"`
} `json:"expose,omitempty"`
// Replicas Replicas is the number of proxy replicas
Replicas *int32 `json:"replicas,omitempty"`
// Resources Resources are the resource limits for each proxy replica. If not set, resource limits are not imposed
Resources *struct {
// Cpu CPU is the CPU resource requirements
Cpu *DatabaseCluster_Spec_Proxy_Resources_Cpu `json:"cpu,omitempty"`
// Memory Memory is the memory resource requirements
Memory *DatabaseCluster_Spec_Proxy_Resources_Memory `json:"memory,omitempty"`
} `json:"resources,omitempty"`
// Type Type is the proxy type
Type *DatabaseClusterSpecProxyType `json:"type,omitempty"`
} `json:"proxy,omitempty"`
} `json:"spec,omitempty"`
// Status DatabaseClusterStatus defines the observed state of DatabaseCluster.
Status *struct {
// ActiveStorage ActiveStorage is the storage used in cluster (psmdb only)
ActiveStorage *string `json:"activeStorage,omitempty"`
// Hostname Hostname is the hostname where the cluster can be reached
Hostname *string `json:"hostname,omitempty"`
// Message Message is extra information about the cluster
Message *string `json:"message,omitempty"`
// Port Port is the port where the cluster can be reached
Port *int32 `json:"port,omitempty"`
// Ready Ready is the number of ready pods
Ready *int32 `json:"ready,omitempty"`
// Size Size is the total number of pods
Size *int32 `json:"size,omitempty"`
// Status Status is the status of the cluster
Status *string `json:"status,omitempty"`
} `json:"status,omitempty"`
}
// DatabaseClusterSpecDataSourcePitrType Type is the type of recovery.
type DatabaseClusterSpecDataSourcePitrType string
// DatabaseClusterSpecEngineResourcesCpu0 defines model for .
type DatabaseClusterSpecEngineResourcesCpu0 = int
// DatabaseClusterSpecEngineResourcesCpu1 defines model for .
type DatabaseClusterSpecEngineResourcesCpu1 = string
// DatabaseCluster_Spec_Engine_Resources_Cpu CPU is the CPU resource requirements
type DatabaseCluster_Spec_Engine_Resources_Cpu struct {
union json.RawMessage
}
// DatabaseClusterSpecEngineResourcesMemory0 defines model for .
type DatabaseClusterSpecEngineResourcesMemory0 = int
// DatabaseClusterSpecEngineResourcesMemory1 defines model for .
type DatabaseClusterSpecEngineResourcesMemory1 = string
// DatabaseCluster_Spec_Engine_Resources_Memory Memory is the memory resource requirements
type DatabaseCluster_Spec_Engine_Resources_Memory struct {
union json.RawMessage
}
// DatabaseClusterSpecEngineStorageSize0 defines model for .
type DatabaseClusterSpecEngineStorageSize0 = int
// DatabaseClusterSpecEngineStorageSize1 defines model for .
type DatabaseClusterSpecEngineStorageSize1 = string
// DatabaseCluster_Spec_Engine_Storage_Size Size is the size of the persistent volume claim
type DatabaseCluster_Spec_Engine_Storage_Size struct {
union json.RawMessage
}
// DatabaseClusterSpecEngineType Type is the engine type
type DatabaseClusterSpecEngineType string
// DatabaseClusterSpecMonitoringResourcesLimits0 defines model for .
type DatabaseClusterSpecMonitoringResourcesLimits0 = int
// DatabaseClusterSpecMonitoringResourcesLimits1 defines model for .
type DatabaseClusterSpecMonitoringResourcesLimits1 = string
// DatabaseCluster_Spec_Monitoring_Resources_Limits_AdditionalProperties defines model for DatabaseCluster.Spec.Monitoring.Resources.Limits.AdditionalProperties.
type DatabaseCluster_Spec_Monitoring_Resources_Limits_AdditionalProperties struct {
union json.RawMessage
}
// DatabaseClusterSpecMonitoringResourcesRequests0 defines model for .
type DatabaseClusterSpecMonitoringResourcesRequests0 = int
// DatabaseClusterSpecMonitoringResourcesRequests1 defines model for .
type DatabaseClusterSpecMonitoringResourcesRequests1 = string
// DatabaseCluster_Spec_Monitoring_Resources_Requests_AdditionalProperties defines model for DatabaseCluster.Spec.Monitoring.Resources.Requests.AdditionalProperties.
type DatabaseCluster_Spec_Monitoring_Resources_Requests_AdditionalProperties struct {
union json.RawMessage
}
// DatabaseClusterSpecProxyExposeType Type is the expose type, can be internal or external
type DatabaseClusterSpecProxyExposeType string
// DatabaseClusterSpecProxyResourcesCpu0 defines model for .
type DatabaseClusterSpecProxyResourcesCpu0 = int
// DatabaseClusterSpecProxyResourcesCpu1 defines model for .
type DatabaseClusterSpecProxyResourcesCpu1 = string
// DatabaseCluster_Spec_Proxy_Resources_Cpu CPU is the CPU resource requirements
type DatabaseCluster_Spec_Proxy_Resources_Cpu struct {
union json.RawMessage
}
// DatabaseClusterSpecProxyResourcesMemory0 defines model for .
type DatabaseClusterSpecProxyResourcesMemory0 = int
// DatabaseClusterSpecProxyResourcesMemory1 defines model for .
type DatabaseClusterSpecProxyResourcesMemory1 = string
// DatabaseCluster_Spec_Proxy_Resources_Memory Memory is the memory resource requirements
type DatabaseCluster_Spec_Proxy_Resources_Memory struct {
union json.RawMessage
}
// DatabaseClusterSpecProxyType Type is the proxy type
type DatabaseClusterSpecProxyType string
// DatabaseClusterBackup DatabaseClusterBackup is the Schema for the databaseclusterbackups API.
type DatabaseClusterBackup struct {
// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `json:"apiVersion,omitempty"`
// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Spec DatabaseClusterBackupSpec defines the desired state of DatabaseClusterBackup.
Spec *struct {
// BackupStorageName BackupStorageName is the name of the BackupStorage used for backups.
BackupStorageName string `json:"backupStorageName"`
// DbClusterName DBClusterName is the original database cluster name.
DbClusterName string `json:"dbClusterName"`
} `json:"spec,omitempty"`
// Status DatabaseClusterBackupStatus defines the observed state of DatabaseClusterBackup.
Status *struct {
// Completed Completed is the time when the job was completed.
Completed *time.Time `json:"completed,omitempty"`
// Created Created is the timestamp of the upstream backup's creation.
Created *time.Time `json:"created,omitempty"`
// Destination Destination is the full path to the backup.
Destination *string `json:"destination,omitempty"`
// Gaps Gaps identifies if there are gaps detected in the PITR logs
Gaps bool `json:"gaps"`
// State State is the DatabaseBackup state.
State *string `json:"state,omitempty"`
} `json:"status,omitempty"`
}
// DatabaseClusterBackupList DatabaseClusterBackupList is an object that contains the list of the existing database cluster backups.
type DatabaseClusterBackupList struct {
// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `json:"apiVersion,omitempty"`
Items *[]DatabaseClusterBackup `json:"items,omitempty"`
// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
}
// DatabaseClusterCredential kubernetes object
type DatabaseClusterCredential struct {
Password *string `json:"password,omitempty"`
Username *string `json:"username,omitempty"`
}
// DatabaseClusterList DatabaseClusterList is an object that contains the list of the existing database clusters.
type DatabaseClusterList struct {
// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `json:"apiVersion,omitempty"`
Items *[]DatabaseCluster `json:"items,omitempty"`
// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
}
// DatabaseClusterPitr point-in-time recovery related data
type DatabaseClusterPitr struct {
EarliestDate *time.Time `json:"earliestDate,omitempty"`
// Gaps indicates if there are pitr logs gaps detected after this backup was taken
Gaps *bool `json:"gaps,omitempty"`
LatestBackupName *string `json:"latestBackupName,omitempty"`
LatestDate *time.Time `json:"latestDate,omitempty"`
}
// DatabaseClusterRestore DatabaseClusterRestore is the Schema for the databaseclusterrestores API.
type DatabaseClusterRestore struct {
// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `json:"apiVersion,omitempty"`
// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Spec DatabaseClusterRestoreSpec defines the desired state of DatabaseClusterRestore.
Spec *struct {
// DataSource DataSource defines a data source for restoration.
DataSource struct {
// BackupSource BackupSource is the backup source to restore from
BackupSource *struct {
// BackupStorageName BackupStorageName is the name of the BackupStorage used for backups.
BackupStorageName string `json:"backupStorageName"`
// Path Path is the path to the backup file/directory.
Path string `json:"path"`
} `json:"backupSource,omitempty"`
// DbClusterBackupName DBClusterBackupName is the name of the DB cluster backup to restore from
DbClusterBackupName *string `json:"dbClusterBackupName,omitempty"`
// Pitr PITR is the point-in-time recovery configuration
Pitr *struct {
// Date Date is the UTC date to recover to. The accepted format: "2006-01-02T15:04:05Z".
Date *string `json:"date,omitempty"`
// Type Type is the type of recovery.
Type *DatabaseClusterRestoreSpecDataSourcePitrType `json:"type,omitempty"`
} `json:"pitr,omitempty"`
} `json:"dataSource"`
// DbClusterName DBClusterName defines the cluster name to restore.
DbClusterName string `json:"dbClusterName"`
} `json:"spec,omitempty"`
// Status DatabaseClusterRestoreStatus defines the observed state of DatabaseClusterRestore.
Status *struct {
Completed *time.Time `json:"completed,omitempty"`
Message *string `json:"message,omitempty"`
// State RestoreState represents state of restoration.
State *string `json:"state,omitempty"`
} `json:"status,omitempty"`
}
// DatabaseClusterRestoreSpecDataSourcePitrType Type is the type of recovery.
type DatabaseClusterRestoreSpecDataSourcePitrType string
// DatabaseClusterRestoreList DatabaseClusterRestoreList is an object that contains the list of the existing database cluster restores.
type DatabaseClusterRestoreList struct {
// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `json:"apiVersion,omitempty"`
Items *[]DatabaseClusterRestore `json:"items,omitempty"`
// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
}
// DatabaseEngine DatabaseEngine is the Schema for the databaseengines API.
type DatabaseEngine struct {
// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `json:"apiVersion,omitempty"`
// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Spec DatabaseEngineSpec is a spec for a database engine.
Spec *struct {
AllowedVersions *[]string `json:"allowedVersions,omitempty"`
// Type EngineType stands for the supported database engines. Right now it's only pxc and psmdb. However, it can be ps, pg and any other source.
Type string `json:"type"`
} `json:"spec,omitempty"`
// Status DatabaseEngineStatus defines the observed state of DatabaseEngine.
Status *struct {
// AvailableVersions Versions struct represents available versions of database engine components.
AvailableVersions *struct {
Backup *map[string]struct {
Critical *bool `json:"critical,omitempty"`
ImageHash *string `json:"imageHash,omitempty"`
ImagePath *string `json:"imagePath,omitempty"`
Status *string `json:"status,omitempty"`
} `json:"backup,omitempty"`
Engine *map[string]struct {
Critical *bool `json:"critical,omitempty"`
ImageHash *string `json:"imageHash,omitempty"`
ImagePath *string `json:"imagePath,omitempty"`
Status *string `json:"status,omitempty"`
} `json:"engine,omitempty"`
Proxy *map[string]map[string]struct {
Critical *bool `json:"critical,omitempty"`
ImageHash *string `json:"imageHash,omitempty"`
ImagePath *string `json:"imagePath,omitempty"`
Status *string `json:"status,omitempty"`
} `json:"proxy,omitempty"`
Tools *map[string]map[string]struct {
Critical *bool `json:"critical,omitempty"`
ImageHash *string `json:"imageHash,omitempty"`
ImagePath *string `json:"imagePath,omitempty"`
Status *string `json:"status,omitempty"`
} `json:"tools,omitempty"`
} `json:"availableVersions,omitempty"`
OperatorVersion *string `json:"operatorVersion,omitempty"`
// Status EngineState represents state of engine in a k8s cluster.
Status *string `json:"status,omitempty"`
} `json:"status,omitempty"`
}
// DatabaseEngineList DatabaseEngineList is an object that contains the list of the existing database engines.
type DatabaseEngineList struct {
// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `json:"apiVersion,omitempty"`
Items *[]DatabaseEngine `json:"items,omitempty"`
// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
}
// Error Error response
type Error struct {
Message *string `json:"message,omitempty"`
}
// KubernetesClusterInfo kubernetes cluster info
type KubernetesClusterInfo struct {
ClusterType string `json:"clusterType"`
StorageClassNames []string `json:"storageClassNames"`
}
// KubernetesClusterResources kubernetes cluster resources
type KubernetesClusterResources struct {
Available ResourcesAvailable `json:"available"`
Capacity ResourcesCapacity `json:"capacity"`
}
// ResourcesAvailable defines model for .
type ResourcesAvailable struct {
CpuMillis *uint64 `json:"cpuMillis,omitempty"`
DiskSize *uint64 `json:"diskSize,omitempty"`
MemoryBytes *uint64 `json:"memoryBytes,omitempty"`
}
// ResourcesCapacity defines model for .
type ResourcesCapacity struct {
CpuMillis *uint64 `json:"cpuMillis,omitempty"`
DiskSize *uint64 `json:"diskSize,omitempty"`
MemoryBytes *uint64 `json:"memoryBytes,omitempty"`
}
// MonitoringInstance Monitoring instance information
type MonitoringInstance = MonitoringInstanceBaseWithName
// MonitoringInstanceBase Monitoring instance information
type MonitoringInstanceBase struct {
// AllowedNamespaces List of namespaces allowed to use this monitoring instance
AllowedNamespaces *[]string `json:"allowedNamespaces,omitempty"`
Type MonitoringInstanceBaseType `json:"type,omitempty"`
Url string `json:"url,omitempty"`
}
// MonitoringInstanceBaseType defines model for MonitoringInstanceBase.Type.
type MonitoringInstanceBaseType string
// MonitoringInstanceBaseWithName defines model for MonitoringInstanceBaseWithName.
type MonitoringInstanceBaseWithName struct {
// AllowedNamespaces List of namespaces allowed to use this monitoring instance
AllowedNamespaces *[]string `json:"allowedNamespaces,omitempty"`
// Name A user defined string name of the storage in the DNS name format https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names
Name string `json:"name,omitempty"`
Type MonitoringInstanceBaseWithNameType `json:"type,omitempty"`
Url string `json:"url,omitempty"`
}
// MonitoringInstanceBaseWithNameType defines model for MonitoringInstanceBaseWithName.Type.
type MonitoringInstanceBaseWithNameType string
// MonitoringInstanceCreateParams defines model for MonitoringInstanceCreateParams.
type MonitoringInstanceCreateParams struct {
// AllowedNamespaces List of namespaces allowed to use this monitoring instance
AllowedNamespaces *[]string `json:"allowedNamespaces,omitempty"`
// Name A user defined string name of the storage in the DNS name format https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names
Name string `json:"name,omitempty"`
Pmm *PMMMonitoringInstanceSpec `json:"pmm,omitempty"`
Type MonitoringInstanceCreateParamsType `json:"type,omitempty"`
Url string `json:"url,omitempty"`
}
// PMMMonitoringInstanceSpec defines model for .
type PMMMonitoringInstanceSpec struct {
ApiKey string `json:"apiKey,omitempty"`
Password string `json:"password,omitempty"`
User string `json:"user,omitempty"`
}
// MonitoringInstanceCreateParamsType defines model for MonitoringInstanceCreateParams.Type.
type MonitoringInstanceCreateParamsType string
// MonitoringInstancePMM defines model for MonitoringInstancePMM.
type MonitoringInstancePMM struct {
Pmm *PMMMonitoringInstanceSpec `json:"pmm,omitempty"`
}
// MonitoringInstanceUpdateParams defines model for MonitoringInstanceUpdateParams.
type MonitoringInstanceUpdateParams struct {
// AllowedNamespaces List of namespaces allowed to use this monitoring instance
AllowedNamespaces *[]string `json:"allowedNamespaces,omitempty"`
Pmm *PMMMonitoringInstanceSpec `json:"pmm,omitempty"`
Type MonitoringInstanceUpdateParamsType `json:"type,omitempty"`
Url string `json:"url,omitempty"`
}
// MonitoringInstanceUpdateParamsType defines model for MonitoringInstanceUpdateParams.Type.
type MonitoringInstanceUpdateParamsType string
// MonitoringInstancesList defines model for MonitoringInstancesList.
type MonitoringInstancesList = []MonitoringInstance
// NamespaceList defines model for NamespaceList.
type NamespaceList = []string
// UpdateBackupStorageParams Backup storage parameters
type UpdateBackupStorageParams struct {
AccessKey *string `json:"accessKey,omitempty"`
// AllowedNamespaces List of namespaces allowed to use this backup storage
AllowedNamespaces *[]string `json:"allowedNamespaces,omitempty"`
// BucketName The cloud storage bucket/container name
BucketName *string `json:"bucketName,omitempty"`
Description *string `json:"description,omitempty"`
Region *string `json:"region,omitempty"`
SecretKey *string `json:"secretKey,omitempty"`
Url *string `json:"url,omitempty"`
}
// Version Everest version info
type Version struct {
FullCommit string `json:"fullCommit"`
ProjectName string `json:"projectName"`
Version string `json:"version"`
}
// IoK8sApimachineryPkgApisMetaV1ListMeta ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
type IoK8sApimachineryPkgApisMetaV1ListMeta struct {
// Continue continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.
Continue *string `json:"continue,omitempty"`
// RemainingItemCount remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.
RemainingItemCount *int64 `json:"remainingItemCount,omitempty"`
// ResourceVersion String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
ResourceVersion *string `json:"resourceVersion,omitempty"`
// SelfLink selfLink is a URL representing this object. Populated by the system. Read-only.
//
// DEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.
SelfLink *string `json:"selfLink,omitempty"`
}
// IoK8sApimachineryPkgApisMetaV1StatusCause StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.
type IoK8sApimachineryPkgApisMetaV1StatusCause struct {
// Field The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
//
// Examples:
// "name" - the field "name" on the current resource
// "items[0].name" - the field "name" on the first array entry in "items"
Field *string `json:"field,omitempty"`
// Message A human-readable description of the cause of the error. This field may be presented as-is to a reader.
Message *string `json:"message,omitempty"`
// Reason A machine-readable description of the cause of the error. If this value is empty there is no information available.
Reason *string `json:"reason,omitempty"`
}
// IoK8sApimachineryPkgApisMetaV1StatusDetailsV2 StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.
type IoK8sApimachineryPkgApisMetaV1StatusDetailsV2 struct {
// Causes The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.
Causes *[]IoK8sApimachineryPkgApisMetaV1StatusCause `json:"causes,omitempty"`
// Group The group attribute of the resource associated with the status StatusReason.
Group *string `json:"group,omitempty"`
// Kind The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
// Name The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).
Name *string `json:"name,omitempty"`
// RetryAfterSeconds If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.
RetryAfterSeconds *int32 `json:"retryAfterSeconds,omitempty"`
// Uid UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids
Uid *string `json:"uid,omitempty"`
}
// IoK8sApimachineryPkgApisMetaV1StatusV2 Status is a return value for calls that don't return other objects.
type IoK8sApimachineryPkgApisMetaV1StatusV2 struct {
// ApiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
ApiVersion *string `json:"apiVersion,omitempty"`
// Code Suggested HTTP return code for this status, 0 if not set.
Code *int32 `json:"code,omitempty"`
// Details StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.
Details *IoK8sApimachineryPkgApisMetaV1StatusDetailsV2 `json:"details,omitempty"`
// Kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind *string `json:"kind,omitempty"`
// Message A human-readable description of the status of this operation.
Message *string `json:"message,omitempty"`
// Metadata ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
Metadata *IoK8sApimachineryPkgApisMetaV1ListMeta `json:"metadata,omitempty"`
// Reason A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
Reason *string `json:"reason,omitempty"`
// Status Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Status *string `json:"status,omitempty"`
}
// CreateBackupStorageJSONRequestBody defines body for CreateBackupStorage for application/json ContentType.
type CreateBackupStorageJSONRequestBody = CreateBackupStorageParams
// UpdateBackupStorageJSONRequestBody defines body for UpdateBackupStorage for application/json ContentType.
type UpdateBackupStorageJSONRequestBody = UpdateBackupStorageParams
// CreateMonitoringInstanceJSONRequestBody defines body for CreateMonitoringInstance for application/json ContentType.
type CreateMonitoringInstanceJSONRequestBody = MonitoringInstanceCreateParams
// UpdateMonitoringInstanceJSONRequestBody defines body for UpdateMonitoringInstance for application/json ContentType.
type UpdateMonitoringInstanceJSONRequestBody = MonitoringInstanceUpdateParams
// CreateDatabaseClusterBackupJSONRequestBody defines body for CreateDatabaseClusterBackup for application/json ContentType.
type CreateDatabaseClusterBackupJSONRequestBody = DatabaseClusterBackup
// CreateDatabaseClusterRestoreJSONRequestBody defines body for CreateDatabaseClusterRestore for application/json ContentType.
type CreateDatabaseClusterRestoreJSONRequestBody = DatabaseClusterRestore
// UpdateDatabaseClusterRestoreJSONRequestBody defines body for UpdateDatabaseClusterRestore for application/json ContentType.
type UpdateDatabaseClusterRestoreJSONRequestBody = DatabaseClusterRestore
// CreateDatabaseClusterJSONRequestBody defines body for CreateDatabaseCluster for application/json ContentType.
type CreateDatabaseClusterJSONRequestBody = DatabaseCluster
// UpdateDatabaseClusterJSONRequestBody defines body for UpdateDatabaseCluster for application/json ContentType.
type UpdateDatabaseClusterJSONRequestBody = DatabaseCluster
// UpdateDatabaseEngineJSONRequestBody defines body for UpdateDatabaseEngine for application/json ContentType.
type UpdateDatabaseEngineJSONRequestBody = DatabaseEngine
// AsDatabaseClusterSpecEngineResourcesCpu0 returns the union data inside the DatabaseCluster_Spec_Engine_Resources_Cpu as a DatabaseClusterSpecEngineResourcesCpu0
func (t DatabaseCluster_Spec_Engine_Resources_Cpu) AsDatabaseClusterSpecEngineResourcesCpu0() (DatabaseClusterSpecEngineResourcesCpu0, error) {
var body DatabaseClusterSpecEngineResourcesCpu0
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromDatabaseClusterSpecEngineResourcesCpu0 overwrites any union data inside the DatabaseCluster_Spec_Engine_Resources_Cpu as the provided DatabaseClusterSpecEngineResourcesCpu0
func (t *DatabaseCluster_Spec_Engine_Resources_Cpu) FromDatabaseClusterSpecEngineResourcesCpu0(v DatabaseClusterSpecEngineResourcesCpu0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeDatabaseClusterSpecEngineResourcesCpu0 performs a merge with any union data inside the DatabaseCluster_Spec_Engine_Resources_Cpu, using the provided DatabaseClusterSpecEngineResourcesCpu0
func (t *DatabaseCluster_Spec_Engine_Resources_Cpu) MergeDatabaseClusterSpecEngineResourcesCpu0(v DatabaseClusterSpecEngineResourcesCpu0) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsDatabaseClusterSpecEngineResourcesCpu1 returns the union data inside the DatabaseCluster_Spec_Engine_Resources_Cpu as a DatabaseClusterSpecEngineResourcesCpu1
func (t DatabaseCluster_Spec_Engine_Resources_Cpu) AsDatabaseClusterSpecEngineResourcesCpu1() (DatabaseClusterSpecEngineResourcesCpu1, error) {
var body DatabaseClusterSpecEngineResourcesCpu1
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromDatabaseClusterSpecEngineResourcesCpu1 overwrites any union data inside the DatabaseCluster_Spec_Engine_Resources_Cpu as the provided DatabaseClusterSpecEngineResourcesCpu1
func (t *DatabaseCluster_Spec_Engine_Resources_Cpu) FromDatabaseClusterSpecEngineResourcesCpu1(v DatabaseClusterSpecEngineResourcesCpu1) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeDatabaseClusterSpecEngineResourcesCpu1 performs a merge with any union data inside the DatabaseCluster_Spec_Engine_Resources_Cpu, using the provided DatabaseClusterSpecEngineResourcesCpu1
func (t *DatabaseCluster_Spec_Engine_Resources_Cpu) MergeDatabaseClusterSpecEngineResourcesCpu1(v DatabaseClusterSpecEngineResourcesCpu1) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
func (t DatabaseCluster_Spec_Engine_Resources_Cpu) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
func (t *DatabaseCluster_Spec_Engine_Resources_Cpu) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
// AsDatabaseClusterSpecEngineResourcesMemory0 returns the union data inside the DatabaseCluster_Spec_Engine_Resources_Memory as a DatabaseClusterSpecEngineResourcesMemory0
func (t DatabaseCluster_Spec_Engine_Resources_Memory) AsDatabaseClusterSpecEngineResourcesMemory0() (DatabaseClusterSpecEngineResourcesMemory0, error) {
var body DatabaseClusterSpecEngineResourcesMemory0
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromDatabaseClusterSpecEngineResourcesMemory0 overwrites any union data inside the DatabaseCluster_Spec_Engine_Resources_Memory as the provided DatabaseClusterSpecEngineResourcesMemory0
func (t *DatabaseCluster_Spec_Engine_Resources_Memory) FromDatabaseClusterSpecEngineResourcesMemory0(v DatabaseClusterSpecEngineResourcesMemory0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeDatabaseClusterSpecEngineResourcesMemory0 performs a merge with any union data inside the DatabaseCluster_Spec_Engine_Resources_Memory, using the provided DatabaseClusterSpecEngineResourcesMemory0
func (t *DatabaseCluster_Spec_Engine_Resources_Memory) MergeDatabaseClusterSpecEngineResourcesMemory0(v DatabaseClusterSpecEngineResourcesMemory0) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsDatabaseClusterSpecEngineResourcesMemory1 returns the union data inside the DatabaseCluster_Spec_Engine_Resources_Memory as a DatabaseClusterSpecEngineResourcesMemory1
func (t DatabaseCluster_Spec_Engine_Resources_Memory) AsDatabaseClusterSpecEngineResourcesMemory1() (DatabaseClusterSpecEngineResourcesMemory1, error) {
var body DatabaseClusterSpecEngineResourcesMemory1
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromDatabaseClusterSpecEngineResourcesMemory1 overwrites any union data inside the DatabaseCluster_Spec_Engine_Resources_Memory as the provided DatabaseClusterSpecEngineResourcesMemory1
func (t *DatabaseCluster_Spec_Engine_Resources_Memory) FromDatabaseClusterSpecEngineResourcesMemory1(v DatabaseClusterSpecEngineResourcesMemory1) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeDatabaseClusterSpecEngineResourcesMemory1 performs a merge with any union data inside the DatabaseCluster_Spec_Engine_Resources_Memory, using the provided DatabaseClusterSpecEngineResourcesMemory1
func (t *DatabaseCluster_Spec_Engine_Resources_Memory) MergeDatabaseClusterSpecEngineResourcesMemory1(v DatabaseClusterSpecEngineResourcesMemory1) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
func (t DatabaseCluster_Spec_Engine_Resources_Memory) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
func (t *DatabaseCluster_Spec_Engine_Resources_Memory) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
// AsDatabaseClusterSpecEngineStorageSize0 returns the union data inside the DatabaseCluster_Spec_Engine_Storage_Size as a DatabaseClusterSpecEngineStorageSize0
func (t DatabaseCluster_Spec_Engine_Storage_Size) AsDatabaseClusterSpecEngineStorageSize0() (DatabaseClusterSpecEngineStorageSize0, error) {
var body DatabaseClusterSpecEngineStorageSize0
err := json.Unmarshal(t.union, &body)
return body, err
}
// FromDatabaseClusterSpecEngineStorageSize0 overwrites any union data inside the DatabaseCluster_Spec_Engine_Storage_Size as the provided DatabaseClusterSpecEngineStorageSize0
func (t *DatabaseCluster_Spec_Engine_Storage_Size) FromDatabaseClusterSpecEngineStorageSize0(v DatabaseClusterSpecEngineStorageSize0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
// MergeDatabaseClusterSpecEngineStorageSize0 performs a merge with any union data inside the DatabaseCluster_Spec_Engine_Storage_Size, using the provided DatabaseClusterSpecEngineStorageSize0
func (t *DatabaseCluster_Spec_Engine_Storage_Size) MergeDatabaseClusterSpecEngineStorageSize0(v DatabaseClusterSpecEngineStorageSize0) error {
b, err := json.Marshal(v)
if err != nil {
return err
}
merged, err := runtime.JSONMerge(t.union, b)
t.union = merged
return err
}
// AsDatabaseClusterSpecEngineStorageSize1 returns the union data inside the DatabaseCluster_Spec_Engine_Storage_Size as a DatabaseClusterSpecEngineStorageSize1
func (t DatabaseCluster_Spec_Engine_Storage_Size) AsDatabaseClusterSpecEngineStorageSize1() (DatabaseClusterSpecEngineStorageSize1, error) {
var body DatabaseClusterSpecEngineStorageSize1