kcr_app_redislabs_com 3.20260530.90154

Kubernetes Custom Resource Bindings
Documentation
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
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/RedisLabs/redis-enterprise-k8s-docs/app.redislabs.com/v1alpha1/redisenterpriseactiveactivedatabases.yaml
// kopium version: 0.23.0

#[allow(unused_imports)]
mod prelude {
    pub use kube::CustomResource;
    pub use serde::{Serialize, Deserialize};
}

use self::prelude::*;

/// Defines the desired state of RedisEnterpriseActiveActiveDatabase.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "app.redislabs.com", version = "v1alpha1", kind = "RedisEnterpriseActiveActiveDatabase", plural = "redisenterpriseactiveactivedatabases")]
#[kube(namespaced)]
#[kube(status = "RedisEnterpriseActiveActiveDatabaseStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct RedisEnterpriseActiveActiveDatabaseSpec {
    /// Global configurations for the Active-Active database. Contains the global properties for each participating cluster database within the Active-Active database.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "globalConfigurations")]
    pub global_configurations: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurations>,
    /// List of participating cluster specifications and configurations.
    #[serde(rename = "participatingClusters")]
    pub participating_clusters: Vec<RedisEnterpriseActiveActiveDatabaseParticipatingClusters>,
    /// Connection to the Redis Enterprise Cluster.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "redisEnterpriseCluster")]
    pub redis_enterprise_cluster: Option<RedisEnterpriseActiveActiveDatabaseRedisEnterpriseCluster>,
}

/// Global configurations for the Active-Active database. Contains the global properties for each participating cluster database within the Active-Active database.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurations {
    /// Connection/ association to the Active-Active database.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "activeActive")]
    pub active_active: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsActiveActive>,
    /// Settings for database alerts.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "alertSettings")]
    pub alert_settings: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettings>,
    /// Database auditing configuration.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub auditing: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAuditing>,
    /// Target for automatic database backups.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub backup: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackup>,
    /// The Secrets containing TLS Client Certificate to use for Authentication
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientAuthenticationCertificates")]
    pub client_authentication_certificates: Option<Vec<String>>,
    /// Connection-related settings such as proxy connections and scheduling policy.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "connectionSettings")]
    pub connection_settings: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsConnectionSettings>,
    /// Internode encryption (INE) setting. An optional boolean setting, overriding a similar cluster-wide policy. If set to False, INE is guaranteed to be turned off for this DB (regardless of cluster-wide policy). If set to True, INE will be turned on, unless the capability is not supported by the DB ( in such a case we will get an error and database creation will fail). If left unspecified, will be disabled if internode encryption is not supported by the DB (regardless of cluster default). Deleting this property after explicitly setting its value shall have no effect.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "dataInternodeEncryption")]
    pub data_internode_encryption: Option<bool>,
    /// Database port number. TCP port on which the database is available. Will be generated automatically if omitted. can not be changed after creation
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "databasePort")]
    pub database_port: Option<i64>,
    /// The name of the secret that holds the password to the database (redis databases only). If secret does not exist, it will be created. To define the password, create an opaque secret and set the name in the spec. The password will be taken from the value of the 'password' key. Use an empty string as value within the secret to disable authentication for the database. Notes - For Active-Active databases this secret will not be automatically created, and also, memcached databases must not be set with a value, and a secret/password will not be automatically created for them. Use the memcachedSaslSecretName field to set authentication parameters for memcached databases.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "databaseSecretName")]
    pub database_secret_name: Option<String>,
    /// A custom port to be exposed by the database services. Can be be modified/added/removed after REDB creation. If set, it'll replace the default service port (namely, databasePort or defaultRedisPort).
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "databaseServicePort")]
    pub database_service_port: Option<i64>,
    /// Is connecting with a default user allowed?  If disabled, the DatabaseSecret will not be created or updated
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultUser")]
    pub default_user: Option<bool>,
    /// Database eviction policy. see more <https://docs.redislabs.com/latest/rs/administering/database-operations/eviction-policy/>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "evictionPolicy")]
    pub eviction_policy: Option<String>,
    /// Whether it is an RoF database or not. Applicable only for databases of type "REDIS". Assumed to be false if left blank.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "isRof")]
    pub is_rof: Option<bool>,
    /// Credentials used for binary authentication in memcached databases. The credentials should be saved as an opaque secret and the name of that secret should be configured using this field. For username, use 'username' as the key and the actual username as the value. For password, use 'password' as the key and the actual password as the value. Note that connections are not encrypted.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "memcachedSaslSecretName")]
    pub memcached_sasl_secret_name: Option<String>,
    /// memory size of database. use formats like 100MB, 0.1GB. minimum value in 100MB. When redis on flash (RoF) is enabled, this value refers to RAM+Flash memory, and it must not be below 1GB.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "memorySize")]
    pub memory_size: Option<String>,
    /// List of modules associated with the database. The list of valid modules for the specific cluster can be retrieved from the status of the REC object. Use the "name" and "versions" fields for the specific module configuration. If specifying an explicit version for a module, automatic modules versions upgrade must be disabled by setting the '.upgradeSpec.upgradeModulesToLatest' field in the REC to 'false'. Note that the option to specify module versions is deprecated, and will be removed in future releases.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "modulesList")]
    pub modules_list: Option<Vec<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsModulesList>>,
    /// OSS Cluster mode option. Note that not all client libraries support OSS cluster mode.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "ossCluster")]
    pub oss_cluster: Option<bool>,
    /// Additional OSS cluster settings that may be provided to tweak OSS cluster behavior.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "ossClusterSettings")]
    pub oss_cluster_settings: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsOssClusterSettings>,
    /// Database on-disk persistence policy
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub persistence: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsPersistence>,
    /// The policy used for proxy binding to the endpoint. Supported proxy policies are: single/all-master-shards/all-nodes When left blank, the default value will be chosen according to the value of ossCluster - single if disabled, all-master-shards when enabled
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "proxyPolicy")]
    pub proxy_policy: Option<String>,
    /// Whether database should be rack aware. This improves availability - more information: <https://docs.redislabs.com/latest/rs/concepts/high-availability/rack-zone-awareness/>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rackAware")]
    pub rack_aware: Option<bool>,
    /// Connection to Redis Enterprise Cluster
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "redisEnterpriseCluster")]
    pub redis_enterprise_cluster: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsRedisEnterpriseCluster>,
    /// Redis OSS version. Version can be specified via <major.minor> prefix, or via channels - for existing databases - Upgrade Redis OSS version. For new databases - the version which the database will be created with. If set to 'major' - will always upgrade to the most recent major Redis version. If set to 'latest' - will always upgrade to the most recent Redis version. Depends on 'redisUpgradePolicy' - if you want to set the value to 'latest' for some databases, you must set redisUpgradePolicy on the cluster before. Possible values are 'major' or 'latest' When using upgrade - make sure to backup the database before. This value is used only for database type 'redis'. Note - Specifying Redis version is currently not supported for Active-Active database.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "redisVersion")]
    pub redis_version: Option<String>,
    /// What databases to replicate from
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "replicaSources")]
    pub replica_sources: Option<Vec<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsReplicaSources>>,
    /// In-memory database replication. When enabled, database will have replica shard for every master - leading to higher availability. Defaults to false.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub replication: Option<bool>,
    /// Whether this database supports RESP3 protocol. Note - Deleting this property after explicitly setting its value shall have no effect. Please view the corresponding field in RS doc for more info.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resp3: Option<bool>,
    /// RAM allocation ratio for Redis Flex (v2) databases as a percentage of total data size. Valid range 0-100. When omitted, RS uses the default value of 50%. Controls how much RAM is allocated per unit of data (e.g., 30% means 3MB RAM per 10MB data). RAM grows proportionally with data until rofRamSize limit is reached (if specified). Only applicable when isRof=true and Redis version >= 8.0 (BigStore v2 - Redis Flex).
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rofRamRatio")]
    pub rof_ram_ratio: Option<i64>,
    /// The size of the RAM portion of an RoF database. Similarly to "memorySize" use formats like 100MB, 0.1GB It must be at least 10% of combined memory size (RAM+Flash), as specified by "memorySize".
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rofRamSize")]
    pub rof_ram_size: Option<String>,
    /// List of Redis Enteprise ACL and Role bindings to apply
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rolesPermissions")]
    pub roles_permissions: Option<Vec<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsRolesPermissions>>,
    /// Enables search module indexing on flash storage for Redis Flex (v2) databases. Only applicable when isRof=true and Redis version >= 8.6. Defaults to false.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "searchOnBigstore")]
    pub search_on_bigstore: Option<bool>,
    /// Number of database server-side shards
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "shardCount")]
    pub shard_count: Option<i64>,
    /// Toggles database sharding for REAADBs (Active Active databases) and enabled by default. This field is blocked for REDB (non-Active Active databases) and sharding is toggled via the shardCount field - when shardCount is 1 this is disabled otherwise enabled.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "shardingEnabled")]
    pub sharding_enabled: Option<bool>,
    /// Control the density of shards - should they reside on as few or as many nodes as possible. Available options are "dense" or "sparse". If left unset, defaults to "dense".
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "shardsPlacement")]
    pub shards_placement: Option<String>,
    /// Require SSL authenticated and encrypted connections to the database. enabled - all incoming connections to the Database must use SSL. disabled - no incoming connection to the Database should use SSL. replica_ssl - databases that replicate from this one need to use SSL.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "tlsMode")]
    pub tls_mode: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsTlsMode>,
    /// The type of the database.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
    pub r#type: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsType>,
    /// Specifications for DB upgrade.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "upgradeSpec")]
    pub upgrade_spec: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsUpgradeSpec>,
}

/// Connection/ association to the Active-Active database.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsActiveActive {
    /// The the corresponding Active-Active database name, Redis Enterprise Active Active Database custom resource name, this Resource is associated with. In case this resource is created manually at the active active database creation this field must be filled via the user, otherwise, the operator will assign this field automatically. Note: this feature is currently unsupported.
    pub name: String,
    /// The corresponding participating cluster name, Redis Enterprise Remote Cluster custom resource name, in the Active-Active database, In case this resource is created manually at the active active database creation this field must be filled via the user, otherwise, the operator will assign this field automatically. Note: this feature is currently unsupported.
    #[serde(rename = "participatingClusterName")]
    pub participating_cluster_name: String,
}

/// Settings for database alerts.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettings {
    /// Periodic backup has been delayed for longer than specified threshold value [minutes]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_backup_delayed: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbBackupDelayed>,
    /// Active-active source - sync lag is higher than specified threshold value [seconds]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_crdt_src_high_syncer_lag: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbCrdtSrcHighSyncerLag>,
    /// Active-active source - sync has connection error while trying to connect replica source
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_crdt_src_syncer_connection_error: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbCrdtSrcSyncerConnectionError>,
    /// Active-active source - sync encountered in general error
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_crdt_src_syncer_general_error: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbCrdtSrcSyncerGeneralError>,
    /// Latency is higher than specified threshold value [micro-sec]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_high_latency: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbHighLatency>,
    /// Throughput is higher than specified threshold value [requests / sec.]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_high_throughput: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbHighThroughput>,
    /// An alert for state-machines that are running for too long
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_long_running_action: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbLongRunningAction>,
    /// Throughput is lower than specified threshold value [requests / sec.]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_low_throughput: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbLowThroughput>,
    /// Proxy certificate will expire in less than specified threshold value [days]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_proxy_cert_expiring_soon: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbProxyCertExpiringSoon>,
    /// Dataset RAM overhead of a shard has reached the threshold value [% of its RAM limit]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_ram_dataset_overhead: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbRamDatasetOverhead>,
    /// Percent of values kept in a shard's RAM is lower than [% of its key count]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_ram_values: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbRamValues>,
    /// Replica-of source - sync lag is higher than specified threshold value [seconds]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_replica_src_high_syncer_lag: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbReplicaSrcHighSyncerLag>,
    /// Replica-of source - sync has connection error while trying to connect replica source
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_replica_src_syncer_connection_error: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbReplicaSrcSyncerConnectionError>,
    /// Number of values kept in a shard's RAM is lower than [values]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_shard_num_ram_values: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbShardNumRamValues>,
    /// Dataset size has reached the threshold value [% of the memory limit]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub bdb_size: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbSize>,
}

/// Periodic backup has been delayed for longer than specified threshold value [minutes]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbBackupDelayed {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Active-active source - sync lag is higher than specified threshold value [seconds]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbCrdtSrcHighSyncerLag {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Active-active source - sync has connection error while trying to connect replica source
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbCrdtSrcSyncerConnectionError {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Active-active source - sync encountered in general error
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbCrdtSrcSyncerGeneralError {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Latency is higher than specified threshold value [micro-sec]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbHighLatency {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Throughput is higher than specified threshold value [requests / sec.]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbHighThroughput {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// An alert for state-machines that are running for too long
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbLongRunningAction {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Throughput is lower than specified threshold value [requests / sec.]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbLowThroughput {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Proxy certificate will expire in less than specified threshold value [days]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbProxyCertExpiringSoon {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Dataset RAM overhead of a shard has reached the threshold value [% of its RAM limit]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbRamDatasetOverhead {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Percent of values kept in a shard's RAM is lower than [% of its key count]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbRamValues {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Replica-of source - sync lag is higher than specified threshold value [seconds]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbReplicaSrcHighSyncerLag {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Replica-of source - sync has connection error while trying to connect replica source
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbReplicaSrcSyncerConnectionError {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Number of values kept in a shard's RAM is lower than [values]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbShardNumRamValues {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Dataset size has reached the threshold value [% of the memory limit]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAlertSettingsBdbSize {
    /// Alert enabled or disabled
    pub enabled: bool,
    /// Threshold for alert going on/off
    pub threshold: String,
}

/// Database auditing configuration.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsAuditing {
    /// Enables auditing of database connection and authentication events. When enabled, connection, authentication, and disconnection events are tracked and sent to the configured audit listener (configured at the cluster level). The cluster-level auditing configuration must be set before enabling this on a database.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "dbConnsAuditing")]
    pub db_conns_auditing: Option<bool>,
}

/// Target for automatic database backups.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackup {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub abs: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupAbs>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ftp: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupFtp>,
    /// GoogleStorage
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub gcs: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupGcs>,
    /// Backup Interval in seconds. Specifies the time interval in seconds at which periodic backup is performed.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub interval: Option<i64>,
    /// Backup Interval Offset in seconds. Specifies a time offset in seconds at which the periodic backup job starts. This can only be used if the backup interval is 24 hours (86400 seconds) or 12 hours (43200 seconds). The offset is relative to 00:00 UTC for 24-hour mode, and 00:00 + 12:00 UTC for 12-hour mode. If not specified, a random starting time (offset) is automatically chosen. The offset must be less than the backup interval.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "intervalOffset")]
    pub interval_offset: Option<i64>,
    /// MountPointStorage
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub mount: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupMount>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub s3: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupS3>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sftp: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupSftp>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub swift: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupSwift>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupAbs {
    /// The name of the secret that holds ABS credentials. The secret must contain the keys "AccountName" and "AccountKey", and these must hold the corresponding credentials
    #[serde(rename = "absSecretName")]
    pub abs_secret_name: String,
    /// Azure Blob Storage container name.
    pub container: String,
    /// Optional. Azure Blob Storage subdir under container.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub subdir: Option<String>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupFtp {
    /// a URI of the "ftps://[USER[:PASSWORD]@]HOST[:PORT]/PATH[/]" format
    pub url: String,
}

/// GoogleStorage
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupGcs {
    /// Google Storage bucket name.
    #[serde(rename = "bucketName")]
    pub bucket_name: String,
    /// The name of the secret that holds the Google Cloud Storage credentials. The secret must contain the keys "CLIENT_ID", "PRIVATE_KEY", "PRIVATE_KEY_ID", "CLIENT_EMAIL" and these must hold the corresponding credentials. The keys should correspond to the values in the key JSON.
    #[serde(rename = "gcsSecretName")]
    pub gcs_secret_name: String,
    /// Optional. Google Storage subdir under bucket.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub subdir: Option<String>,
}

/// MountPointStorage
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupMount {
    /// Path to the local mount point. You must create the mount point on all nodes, and the redislabs:redislabs user must have read and write permissions on the local mount point.
    pub path: String,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupS3 {
    /// The name of the secret that holds the AWS credentials. The secret must contain the keys "AWS_ACCESS_KEY_ID" and "AWS_SECRET_ACCESS_KEY", and these must hold the corresponding credentials.
    #[serde(rename = "awsSecretName")]
    pub aws_secret_name: String,
    /// Amazon S3 bucket name.
    #[serde(rename = "bucketName")]
    pub bucket_name: String,
    /// Optional. Amazon S3 region name. If not specified, the region is auto-detected using a HEAD request to the bucket. For AWS GovCloud or other regions where auto-detection may not work, specify the region explicitly (e.g., "us-gov-east-1").
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "regionName")]
    pub region_name: Option<String>,
    /// Optional. Amazon S3 subdir under bucket.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub subdir: Option<String>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupSftp {
    /// The name of the secret that holds SFTP credentials. The secret must contain the "Key" key, which is the SSH private key for connecting to the sftp server.
    #[serde(rename = "sftpSecretName")]
    pub sftp_secret_name: String,
    /// SFTP url
    pub sftp_url: String,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsBackupSwift {
    /// Swift service authentication URL.
    pub auth_url: String,
    /// Swift object store container for storing the backup files.
    pub container: String,
    /// Optional. Prefix (path) of backup files in the swift container.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub prefix: Option<String>,
    /// The name of the secret that holds Swift credentials. The secret must contain the keys "Key" and "User", and these must hold the corresponding credentials: service access key and service user name (pattern for the latter does not allow special characters &,<,>,")
    #[serde(rename = "swiftSecretName")]
    pub swift_secret_name: String,
}

/// Connection-related settings such as proxy connections and scheduling policy.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsConnectionSettings {
    /// Connections limit type.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "connectionLimitType")]
    pub connection_limit_type: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsConnectionSettingsConnectionLimitType>,
    /// Controls how server-side connections are used when forwarding traffic to shards. Values: cmp: Closest to max_pipelined policy. Pick the connection with the most pipelined commands that has not reached the max_pipelined limit. mru: Try to use most recently used connections. spread: Try to use all connections. mnp: Minimal pipeline policy. Pick the connection with the least pipelined commands.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "connectionSchedulingPolicy")]
    pub connection_scheduling_policy: Option<RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsConnectionSettingsConnectionSchedulingPolicy>,
    /// Defines the maximum number of dedicated server connections for a given database. The total number across all workers. The default is 0 for unlimited. Defaults to 0, which means unlimited.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "globalMaxDedicatedConnections")]
    pub global_max_dedicated_connections: Option<i64>,
    /// The number of internal proxy connections. Defaults to 5 if unspecified.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "internalConnections")]
    pub internal_connections: Option<i64>,
    /// Number of dedicated server connections the DMC has per worker per shard. Defaults to 2 if unspecified.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minDedicatedConnections")]
    pub min_dedicated_connections: Option<i64>,
}

/// Connection-related settings such as proxy connections and scheduling policy.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsConnectionSettingsConnectionLimitType {
    #[serde(rename = "per-thread")]
    PerThread,
    #[serde(rename = "per-shard")]
    PerShard,
}

/// Connection-related settings such as proxy connections and scheduling policy.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsConnectionSettingsConnectionSchedulingPolicy {
    #[serde(rename = "cmp")]
    Cmp,
    #[serde(rename = "mru")]
    Mru,
    #[serde(rename = "spread")]
    Spread,
    #[serde(rename = "mnp")]
    Mnp,
}

/// Redis Enterprise module (see <https://redis.io/docs/latest/develop/reference/modules/)>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsModulesList {
    /// Module command line arguments e.g. VKEY_MAX_ENTITY_COUNT 30 30
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub config: Option<String>,
    /// The name of the module, e.g. "search" or "ReJSON". The complete list of modules available in the cluster can be retrieved from the '.status.modules' field in the REC.
    pub name: String,
    /// The semantic version of the module, e.g. '1.6.12'. Optional for REDB, must be set for REAADB. Note that this field is deprecated, and will be removed in future releases.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
}

/// Additional OSS cluster settings that may be provided to tweak OSS cluster behavior.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsOssClusterSettings {
    /// Toggles whether this database supports external access in OSS cluster mode. When enabled, advertised database topology includes the external endpoints for the Redis Enterprise nodes hosting the database shards. The external access mechanism (e.g., LoadBalancer services) is configured via the ossClusterSettings.externalAccessType field of the RedisEnterpriseCluster. When external access is enabled, the corresponding database secret will have the list of primary shard IPs in the oss_startup_nodes field. Currently enabling OSS cluster API in conjunction with external access is not supported for active active databases.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableExternalAccess")]
    pub enable_external_access: Option<bool>,
}

/// Global configurations for the Active-Active database. Contains the global properties for each participating cluster database within the Active-Active database.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsPersistence {
    #[serde(rename = "disabled")]
    Disabled,
    #[serde(rename = "aofEverySecond")]
    AofEverySecond,
    #[serde(rename = "aofAlways")]
    AofAlways,
    #[serde(rename = "snapshotEvery1Hour")]
    SnapshotEvery1Hour,
    #[serde(rename = "snapshotEvery6Hour")]
    SnapshotEvery6Hour,
    #[serde(rename = "snapshotEvery12Hour")]
    SnapshotEvery12Hour,
}

/// Connection to Redis Enterprise Cluster
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsRedisEnterpriseCluster {
    /// The name of the Redis Enterprise Cluster where the database should be stored.
    pub name: String,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsReplicaSources {
    /// Secret that defines the client certificate and key used by the syncer in the target database cluster. The secret must have 2 keys in its map: "cert" which is the PEM encoded certificate, and "key" which is the PEM encoded private key.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientKeySecret")]
    pub client_key_secret: Option<String>,
    /// GZIP compression level (0-6) to use for replication.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub compression: Option<i64>,
    /// The name of the resource from which the source database URI is derived. The type of resource must match the type specified in the ReplicaSourceType field.
    #[serde(rename = "replicaSourceName")]
    pub replica_source_name: String,
    /// The type of resource from which the source database URI is derived. If set to 'SECRET', the source database URI is derived from the secret named in the ReplicaSourceName field. The secret must have a key named 'uri' that defines the URI of the source database in the form of 'redis://...'. The type of secret (kubernetes, vault, ...) is determined by the secret mechanism used by the underlying REC object. If set to 'REDB', the source database URI is derived from the RedisEnterpriseDatabase resource named in the ReplicaSourceName field.
    #[serde(rename = "replicaSourceType")]
    pub replica_source_type: String,
    /// Secret that defines the server certificate used by the proxy in the source database cluster. The secret must have 1 key in its map: "cert" which is the PEM encoded certificate.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "serverCertSecret")]
    pub server_cert_secret: Option<String>,
    /// TLS SNI name to use for the replication link.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "tlsSniName")]
    pub tls_sni_name: Option<String>,
}

/// Redis Enterprise Role and ACL Binding
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsRolesPermissions {
    /// Acl Name of RolePermissionType (note: use exact name of the ACL from the Redis Enterprise ACL list, case sensitive)
    pub acl: String,
    /// Role Name of RolePermissionType (note: use exact name of the role from the Redis Enterprise role list, case sensitive)
    pub role: String,
    /// Type of Redis Enterprise Database Role Permission. Currently, only "redis-enterprise" is supported, which uses roles and ACLs defined within Redis Enterprise directly.
    #[serde(rename = "type")]
    pub r#type: RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsRolesPermissionsType,
}

/// Redis Enterprise Role and ACL Binding
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsRolesPermissionsType {
    #[serde(rename = "redis-enterprise")]
    RedisEnterprise,
}

/// Global configurations for the Active-Active database. Contains the global properties for each participating cluster database within the Active-Active database.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsTlsMode {
    #[serde(rename = "disabled")]
    Disabled,
    #[serde(rename = "enabled")]
    Enabled,
    #[serde(rename = "replica_ssl")]
    ReplicaSsl,
}

/// Global configurations for the Active-Active database. Contains the global properties for each participating cluster database within the Active-Active database.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsType {
    #[serde(rename = "redis")]
    Redis,
    #[serde(rename = "memcached")]
    Memcached,
}

/// Specifications for DB upgrade.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseGlobalConfigurationsUpgradeSpec {
    /// Upgrades the modules to the latest version that supports the DB version during a DB upgrade action, to upgrade the DB version view the 'redisVersion' field. Note - This field is currently not supported for Active-Active databases.
    #[serde(rename = "upgradeModulesToLatest")]
    pub upgrade_modules_to_latest: bool,
}

/// Specifies the configuration for a participating cluster in the Active-Active database.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseParticipatingClusters {
    /// Port number for the replication endpoint. Use this field when you use LoadBalancers for synchronization between Active-Active replicas and need to specify the port number that the LoadBalancer listens on.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "externalReplicationPort")]
    pub external_replication_port: Option<i64>,
    /// Name of the remote cluster custom resource to link.
    pub name: String,
    /// Namespace where the REAADB object is deployed within the corresponding participating cluster. Ensure that the Redis Enterprise operator is configured to watch this namespace in the corresponding cluster and that the required RBAC configuration is properly set up. For more information about setting up multiple namespaces, see <https://redis.io/docs/latest/operate/kubernetes/re-clusters/multi-namespace/.> If you don't specify a namespace, the REAADB is deployed to the REC's namespace in the corresponding cluster.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
}

/// Connection to the Redis Enterprise Cluster.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseRedisEnterpriseCluster {
    /// The name of the Redis Enterprise Cluster where the database should be stored.
    pub name: String,
}

/// Defines the observed state of RedisEnterpriseActiveActiveDatabase.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseStatus {
    /// Certificate generation number from the participating cluster's REC.Status.CertificatesStatus.Generation. The operator monitors this field to detect when proxy or syncer certificates are updated on the local participating cluster. When the operator detects a change, it automatically runs a CRDB force update (equivalent to 'crdb-cli crdb update --force'), which synchronizes the certificate changes to all participating clusters and prevents sync issues. This eliminates the manual step of running crdb-cli commands when you rotate certificates in Active-Active deployments on Kubernetes.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterCertificatesGeneration")]
    pub cluster_certificates_generation: Option<i64>,
    /// GUID of the Active-Active database.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub guid: Option<String>,
    /// UID of the last Active-Active database task.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastTaskUid")]
    pub last_task_uid: Option<String>,
    /// List of linked REDBs.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "linkedRedbs")]
    pub linked_redbs: Option<Vec<String>>,
    /// List of participating cluster statuses.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "participatingClusters")]
    pub participating_clusters: Option<Vec<RedisEnterpriseActiveActiveDatabaseStatusParticipatingClusters>>,
    /// Name of the Redis Enterprise Cluster that this resource is associated with.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "redisEnterpriseCluster")]
    pub redis_enterprise_cluster: Option<String>,
    /// Overall replication status.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "replicationStatus")]
    pub replication_status: Option<RedisEnterpriseActiveActiveDatabaseStatusReplicationStatus>,
    /// Status of the secrets.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretsStatus")]
    pub secrets_status: Option<Vec<RedisEnterpriseActiveActiveDatabaseStatusSecretsStatus>>,
    /// Indicates whether the desired specification is valid.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "specStatus")]
    pub spec_status: Option<String>,
    /// Status of the Active-Active database. This status doesn't include the replication link (data path) status. To view the replication link status, see the ReplicationStatus field or status.replicationStatus on the custom resource.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
}

/// The status of a participating cluster.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseStatusParticipatingClusters {
    /// ID of the instance in the Active-Active database.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<i64>,
    /// Name of the linked remote cluster custom resource.
    pub name: String,
    /// Replication status of the participating cluster.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "replicationStatus")]
    pub replication_status: Option<RedisEnterpriseActiveActiveDatabaseStatusParticipatingClustersReplicationStatus>,
}

/// The status of a participating cluster.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum RedisEnterpriseActiveActiveDatabaseStatusParticipatingClustersReplicationStatus {
    #[serde(rename = "up")]
    Up,
    #[serde(rename = "down")]
    Down,
}

/// Defines the observed state of RedisEnterpriseActiveActiveDatabase.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum RedisEnterpriseActiveActiveDatabaseStatusReplicationStatus {
    #[serde(rename = "up")]
    Up,
    #[serde(rename = "down")]
    Down,
}

/// The status of a secret.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RedisEnterpriseActiveActiveDatabaseStatusSecretsStatus {
    /// Name of the secret.
    pub name: String,
    /// Status of the secret.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<RedisEnterpriseActiveActiveDatabaseStatusSecretsStatusStatus>,
}

/// The status of a secret.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum RedisEnterpriseActiveActiveDatabaseStatusSecretsStatusStatus {
    Valid,
    Invalid,
}