kcr_iot_eclipse_org 3.20260112.135504

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
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
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/ctron/ditto-operator/iot.eclipse.org/v1alpha1/dittos.yaml
// kopium version: 0.22.5

#[allow(unused_imports)]
mod prelude {
    pub use kube::CustomResource;
    pub use serde::{Serialize, Deserialize};
    pub use std::collections::BTreeMap;
    pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
}
use self::prelude::*;

#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "iot.eclipse.org", version = "v1alpha1", kind = "Ditto", plural = "dittos")]
#[kube(namespaced)]
#[kube(status = "DittoStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct DittoSpec {
    /// Create the default "ditto" user when initially deploying.
    /// 
    /// This has no effect when using OAuth2.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "createDefaultUser")]
    pub create_default_user: Option<bool>,
    /// Devops endpoint
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub devops: Option<DittoDevops>,
    /// Don't expose infra endpoints
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "disableInfraProxy")]
    pub disable_infra_proxy: Option<bool>,
    /// Allow disabling the welcome page
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "disableWelcomePage")]
    pub disable_welcome_page: Option<bool>,
    /// Configure ingress options
    /// 
    /// If the field is missing, no ingress resource is being created.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ingress: Option<DittoIngress>,
    /// Kafka options
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub kafka: Option<DittoKafka>,
    /// Enable and configure keycloak integration.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub keycloak: Option<DittoKeycloak>,
    /// Metrics configuration
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub metrics: Option<DittoMetrics>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mongoDb")]
    pub mongo_db: Option<DittoMongoDb>,
    /// Provide additional OAuth configuration
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oauth: Option<DittoOauth>,
    /// Influence some options of the hosted OpenAPI spec.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "openApi")]
    pub open_api: Option<DittoOpenApi>,
    /// Override the imagePullPolicy
    /// 
    /// By default this will use Always if the image version is ":latest" and IfNotPresent otherwise
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "pullPolicy")]
    pub pull_policy: Option<String>,
    /// Allow to override the Ditto container registry
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub registry: Option<String>,
    /// Services configuration
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub services: Option<DittoServices>,
    /// Influence some options of the hosted SwaggerUI.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "swaggerUi")]
    pub swagger_ui: Option<DittoSwaggerUi>,
    /// Allow to override the Ditto image version.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
}

/// Devops endpoint
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoDevops {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub expose: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub insecure: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub password: Option<DittoDevopsPassword>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "statusPassword")]
    pub status_password: Option<DittoDevopsStatusPassword>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoDevopsPassword {
    /// Selects a key from a ConfigMap.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
    pub config_map: Option<DittoDevopsPasswordConfigMap>,
    /// SecretKeySelector selects a key of a Secret.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub secret: Option<DittoDevopsPasswordSecret>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

/// Selects a key from a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoDevopsPasswordConfigMap {
    /// The key to select.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the ConfigMap or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// SecretKeySelector selects a key of a Secret.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoDevopsPasswordSecret {
    /// The key of the secret to select from.  Must be a valid secret key.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the Secret or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoDevopsStatusPassword {
    /// Selects a key from a ConfigMap.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
    pub config_map: Option<DittoDevopsStatusPasswordConfigMap>,
    /// SecretKeySelector selects a key of a Secret.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub secret: Option<DittoDevopsStatusPasswordSecret>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

/// Selects a key from a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoDevopsStatusPasswordConfigMap {
    /// The key to select.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the ConfigMap or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// SecretKeySelector selects a key of a Secret.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoDevopsStatusPasswordSecret {
    /// The key of the secret to select from.  Must be a valid secret key.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the Secret or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// Configure ingress options
/// 
/// If the field is missing, no ingress resource is being created.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoIngress {
    /// Annotations which should be applied to the ingress resources.
    /// 
    /// The annotations will be set to the resource, not merged. All changes done on the ingress resource itself will be overridden.
    /// 
    /// If no annotations are configured, reasonable defaults will be used instead. You can prevent this by setting a single dummy annotation.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub annotations: Option<BTreeMap<String, String>>,
    /// The optional ingress class name.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "className")]
    pub class_name: Option<String>,
    /// The host of the ingress resource.
    /// 
    /// This is required if the ingress resource should be created by the operator
    pub host: String,
}

/// Kafka options
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoKafka {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "consumerThrottlingLimit")]
    pub consumer_throttling_limit: Option<u32>,
}

/// Enable and configure keycloak integration.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoKeycloak {
    #[serde(rename = "clientId")]
    pub client_id: DittoKeycloakClientId,
    #[serde(rename = "clientSecret")]
    pub client_secret: DittoKeycloakClientSecret,
    /// Description of this login option.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "disableProxy")]
    pub disable_proxy: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub groups: Option<Vec<String>>,
    /// Label when referencing this login option.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
    pub realm: String,
    /// Allow overriding the redirect URL.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "redirectUrl")]
    pub redirect_url: Option<String>,
    pub url: String,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoKeycloakClientId {
    /// Selects a key from a ConfigMap.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
    pub config_map: Option<DittoKeycloakClientIdConfigMap>,
    /// SecretKeySelector selects a key of a Secret.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub secret: Option<DittoKeycloakClientIdSecret>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

/// Selects a key from a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoKeycloakClientIdConfigMap {
    /// The key to select.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the ConfigMap or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// SecretKeySelector selects a key of a Secret.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoKeycloakClientIdSecret {
    /// The key of the secret to select from.  Must be a valid secret key.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the Secret or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoKeycloakClientSecret {
    /// Selects a key from a ConfigMap.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
    pub config_map: Option<DittoKeycloakClientSecretConfigMap>,
    /// SecretKeySelector selects a key of a Secret.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub secret: Option<DittoKeycloakClientSecretSecret>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

/// Selects a key from a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoKeycloakClientSecretConfigMap {
    /// The key to select.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the ConfigMap or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// SecretKeySelector selects a key of a Secret.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoKeycloakClientSecretSecret {
    /// The key of the secret to select from.  Must be a valid secret key.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the Secret or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// Metrics configuration
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoMetrics {
    /// Enable metrics integration
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoMongoDb {
    /// The optional database name used to connect, defaults to "ditto".
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub database: Option<DittoMongoDbDatabase>,
    /// The hostname of the MongoDB instance.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub host: Option<String>,
    /// The password used to connect to the MongoDB instance.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub password: Option<DittoMongoDbPassword>,
    /// The port name of the MongoDB instance.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub port: Option<u16>,
    /// The username used to connect to the MongoDB instance.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub username: Option<DittoMongoDbUsername>,
}

/// The optional database name used to connect, defaults to "ditto".
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoMongoDbDatabase {
    /// Selects a key from a ConfigMap.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
    pub config_map: Option<DittoMongoDbDatabaseConfigMap>,
    /// SecretKeySelector selects a key of a Secret.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub secret: Option<DittoMongoDbDatabaseSecret>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

/// Selects a key from a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoMongoDbDatabaseConfigMap {
    /// The key to select.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the ConfigMap or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// SecretKeySelector selects a key of a Secret.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoMongoDbDatabaseSecret {
    /// The key of the secret to select from.  Must be a valid secret key.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the Secret or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// The password used to connect to the MongoDB instance.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoMongoDbPassword {
    /// Selects a key from a ConfigMap.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
    pub config_map: Option<DittoMongoDbPasswordConfigMap>,
    /// SecretKeySelector selects a key of a Secret.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub secret: Option<DittoMongoDbPasswordSecret>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

/// Selects a key from a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoMongoDbPasswordConfigMap {
    /// The key to select.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the ConfigMap or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// SecretKeySelector selects a key of a Secret.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoMongoDbPasswordSecret {
    /// The key of the secret to select from.  Must be a valid secret key.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the Secret or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// The username used to connect to the MongoDB instance.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoMongoDbUsername {
    /// Selects a key from a ConfigMap.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
    pub config_map: Option<DittoMongoDbUsernameConfigMap>,
    /// SecretKeySelector selects a key of a Secret.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub secret: Option<DittoMongoDbUsernameSecret>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

/// Selects a key from a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoMongoDbUsernameConfigMap {
    /// The key to select.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the ConfigMap or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// SecretKeySelector selects a key of a Secret.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoMongoDbUsernameSecret {
    /// The key of the secret to select from.  Must be a valid secret key.
    pub key: String,
    /// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Specify whether the Secret or its key must be defined
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub optional: Option<bool>,
}

/// Provide additional OAuth configuration
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoOauth {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub issuers: Option<BTreeMap<String, DittoOauthIssuers>>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoOauthIssuers {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub subjects: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}

/// Influence some options of the hosted OpenAPI spec.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoOpenApi {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "serverLabel")]
    pub server_label: Option<String>,
}

/// Services configuration
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServices {
    /// The concierge service
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub concierge: Option<DittoServicesConcierge>,
    /// The connectivity service
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub connectivity: Option<DittoServicesConnectivity>,
    /// The gateway service
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub gateway: Option<DittoServicesGateway>,
    /// The policies service
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub policies: Option<DittoServicesPolicies>,
    /// The things service
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub things: Option<DittoServicesThings>,
    /// The things search service
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "thingsSearch")]
    pub things_search: Option<DittoServicesThingsSearch>,
}

/// The concierge service
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesConcierge {
    /// Additional system properties, which will be appended to the list of system properties.
    /// 
    /// Note: Setting arbitrary system properties may break the deployment and may also not be compatible with future versions.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "additionalProperties")]
    pub additional_properties: Option<BTreeMap<String, String>>,
    /// Allow configuring the application log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "appLogLevel")]
    pub app_log_level: Option<DittoServicesConciergeAppLogLevel>,
    /// Allow configuring all log levels.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "logLevel")]
    pub log_level: Option<DittoServicesConciergeLogLevel>,
    /// Number of replicas. Defaults to one.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub replicas: Option<u32>,
    /// Service resource limits
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resources: Option<DittoServicesConciergeResources>,
    /// Allow configuring the root log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rootLogLevel")]
    pub root_log_level: Option<DittoServicesConciergeRootLogLevel>,
}

/// The concierge service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesConciergeAppLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// The concierge service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesConciergeLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// Service resource limits
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesConciergeResources {
    /// Limits describes the maximum amount of compute resources allowed. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub limits: Option<BTreeMap<String, String>>,
    /// 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. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub requests: Option<BTreeMap<String, String>>,
}

/// The concierge service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesConciergeRootLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// The connectivity service
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesConnectivity {
    /// Additional system properties, which will be appended to the list of system properties.
    /// 
    /// Note: Setting arbitrary system properties may break the deployment and may also not be compatible with future versions.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "additionalProperties")]
    pub additional_properties: Option<BTreeMap<String, String>>,
    /// Allow configuring the application log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "appLogLevel")]
    pub app_log_level: Option<DittoServicesConnectivityAppLogLevel>,
    /// Allow configuring all log levels.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "logLevel")]
    pub log_level: Option<DittoServicesConnectivityLogLevel>,
    /// Number of replicas. Defaults to one.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub replicas: Option<u32>,
    /// Service resource limits
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resources: Option<DittoServicesConnectivityResources>,
    /// Allow configuring the root log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rootLogLevel")]
    pub root_log_level: Option<DittoServicesConnectivityRootLogLevel>,
}

/// The connectivity service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesConnectivityAppLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// The connectivity service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesConnectivityLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// Service resource limits
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesConnectivityResources {
    /// Limits describes the maximum amount of compute resources allowed. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub limits: Option<BTreeMap<String, String>>,
    /// 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. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub requests: Option<BTreeMap<String, String>>,
}

/// The connectivity service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesConnectivityRootLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// The gateway service
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesGateway {
    /// Additional system properties, which will be appended to the list of system properties.
    /// 
    /// Note: Setting arbitrary system properties may break the deployment and may also not be compatible with future versions.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "additionalProperties")]
    pub additional_properties: Option<BTreeMap<String, String>>,
    /// Allow configuring the application log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "appLogLevel")]
    pub app_log_level: Option<DittoServicesGatewayAppLogLevel>,
    /// Allow configuring all log levels.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "logLevel")]
    pub log_level: Option<DittoServicesGatewayLogLevel>,
    /// Number of replicas. Defaults to one.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub replicas: Option<u32>,
    /// Service resource limits
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resources: Option<DittoServicesGatewayResources>,
    /// Allow configuring the root log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rootLogLevel")]
    pub root_log_level: Option<DittoServicesGatewayRootLogLevel>,
}

/// The gateway service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesGatewayAppLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// The gateway service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesGatewayLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// Service resource limits
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesGatewayResources {
    /// Limits describes the maximum amount of compute resources allowed. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub limits: Option<BTreeMap<String, String>>,
    /// 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. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub requests: Option<BTreeMap<String, String>>,
}

/// The gateway service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesGatewayRootLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// The policies service
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesPolicies {
    /// Additional system properties, which will be appended to the list of system properties.
    /// 
    /// Note: Setting arbitrary system properties may break the deployment and may also not be compatible with future versions.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "additionalProperties")]
    pub additional_properties: Option<BTreeMap<String, String>>,
    /// Allow configuring the application log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "appLogLevel")]
    pub app_log_level: Option<DittoServicesPoliciesAppLogLevel>,
    /// Allow configuring all log levels.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "logLevel")]
    pub log_level: Option<DittoServicesPoliciesLogLevel>,
    /// Number of replicas. Defaults to one.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub replicas: Option<u32>,
    /// Service resource limits
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resources: Option<DittoServicesPoliciesResources>,
    /// Allow configuring the root log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rootLogLevel")]
    pub root_log_level: Option<DittoServicesPoliciesRootLogLevel>,
}

/// The policies service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesPoliciesAppLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// The policies service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesPoliciesLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// Service resource limits
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesPoliciesResources {
    /// Limits describes the maximum amount of compute resources allowed. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub limits: Option<BTreeMap<String, String>>,
    /// 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. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub requests: Option<BTreeMap<String, String>>,
}

/// The policies service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesPoliciesRootLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// The things service
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesThings {
    /// Additional system properties, which will be appended to the list of system properties.
    /// 
    /// Note: Setting arbitrary system properties may break the deployment and may also not be compatible with future versions.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "additionalProperties")]
    pub additional_properties: Option<BTreeMap<String, String>>,
    /// Allow configuring the application log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "appLogLevel")]
    pub app_log_level: Option<DittoServicesThingsAppLogLevel>,
    /// Allow configuring all log levels.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "logLevel")]
    pub log_level: Option<DittoServicesThingsLogLevel>,
    /// Number of replicas. Defaults to one.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub replicas: Option<u32>,
    /// Service resource limits
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resources: Option<DittoServicesThingsResources>,
    /// Allow configuring the root log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rootLogLevel")]
    pub root_log_level: Option<DittoServicesThingsRootLogLevel>,
}

/// The things service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesThingsAppLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// The things service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesThingsLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// Service resource limits
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesThingsResources {
    /// Limits describes the maximum amount of compute resources allowed. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub limits: Option<BTreeMap<String, String>>,
    /// 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. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub requests: Option<BTreeMap<String, String>>,
}

/// The things service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesThingsRootLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// The things search service
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesThingsSearch {
    /// Additional system properties, which will be appended to the list of system properties.
    /// 
    /// Note: Setting arbitrary system properties may break the deployment and may also not be compatible with future versions.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "additionalProperties")]
    pub additional_properties: Option<BTreeMap<String, String>>,
    /// Allow configuring the application log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "appLogLevel")]
    pub app_log_level: Option<DittoServicesThingsSearchAppLogLevel>,
    /// Allow configuring all log levels.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "logLevel")]
    pub log_level: Option<DittoServicesThingsSearchLogLevel>,
    /// Number of replicas. Defaults to one.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub replicas: Option<u32>,
    /// Service resource limits
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resources: Option<DittoServicesThingsSearchResources>,
    /// Allow configuring the root log level.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rootLogLevel")]
    pub root_log_level: Option<DittoServicesThingsSearchRootLogLevel>,
}

/// The things search service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesThingsSearchAppLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// The things search service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesThingsSearchLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// Service resource limits
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoServicesThingsSearchResources {
    /// Limits describes the maximum amount of compute resources allowed. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub limits: Option<BTreeMap<String, String>>,
    /// 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. More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub requests: Option<BTreeMap<String, String>>,
}

/// The things search service
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum DittoServicesThingsSearchRootLogLevel {
    #[serde(rename = "trace")]
    Trace,
    #[serde(rename = "debug")]
    Debug,
    #[serde(rename = "info")]
    Info,
    #[serde(rename = "warn")]
    Warn,
    #[serde(rename = "error")]
    Error,
}

/// Influence some options of the hosted SwaggerUI.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoSwaggerUi {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub disable: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub image: Option<String>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct DittoStatus {
    /// Status conditions
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Vec<Condition>>,
    /// An optional message
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    /// The phase the deployment is in.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub phase: Option<String>,
}