kcr_camel_apache_org 3.20260616.194955

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
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/apache/camel-k/camel.apache.org/v1alpha1/kamelets.yaml
// kopium version: 0.23.0

#[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::*;

/// the desired specification.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "camel.apache.org", version = "v1alpha1", kind = "Kamelet", plural = "kamelets")]
#[kube(namespaced)]
#[kube(status = "KameletStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct KameletSpec {
    /// data specification types for the events consumed/produced by the Kamelet
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "dataTypes")]
    pub data_types: Option<BTreeMap<String, KameletDataTypes>>,
    /// defines the formal configuration of the Kamelet
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub definition: Option<KameletDefinition>,
    /// Camel dependencies needed by the Kamelet
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub dependencies: Option<Vec<String>>,
    /// sources in any Camel DSL supported
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sources: Option<Vec<KameletSources>>,
    /// the main source in YAML DSL
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub template: Option<BTreeMap<String, serde_json::Value>>,
    /// data specification types for the events consumed/produced by the Kamelet
    /// Deprecated: In favor of using DataTypes
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub types: Option<BTreeMap<String, KameletTypes>>,
}

/// data specification types for the events consumed/produced by the Kamelet
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletDataTypes {
    /// the default data type for this Kamelet
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub default: Option<String>,
    /// one to many header specifications
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub headers: Option<BTreeMap<String, KameletDataTypesHeaders>>,
    /// one to many data type specifications
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub types: Option<BTreeMap<String, KameletDataTypesTypes>>,
}

/// one to many header specifications
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletDataTypesHeaders {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub default: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub required: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
    pub r#type: Option<String>,
}

/// one to many data type specifications
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletDataTypesTypes {
    /// the list of Camel or Maven dependencies required by the data type
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub dependencies: Option<Vec<String>>,
    /// optional description
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// the data type format name
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub format: Option<String>,
    /// one to many header specifications
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub headers: Option<BTreeMap<String, KameletDataTypesTypesHeaders>>,
    /// media type as expected for HTTP media types (ie, application/json)
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mediaType")]
    pub media_type: Option<String>,
    /// the expected schema for the data type
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub schema: Option<KameletDataTypesTypesSchema>,
    /// the data type component scheme
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub scheme: Option<String>,
}

/// one to many header specifications
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletDataTypesTypesHeaders {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub default: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub required: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
    pub r#type: Option<String>,
}

/// the expected schema for the data type
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletDataTypesTypesSchema {
    /// JSONSchemaURL represents a schema url.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "$schema")]
    pub schema: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// JSON represents any valid JSON value.
    /// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub example: Option<serde_json::Value>,
    /// ExternalDocumentation allows referencing an external resource for extended documentation.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "externalDocs")]
    pub external_docs: Option<KameletDataTypesTypesSchemaExternalDocs>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<BTreeMap<String, KameletDataTypesTypesSchemaProperties>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub required: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
    pub r#type: Option<String>,
}

/// ExternalDocumentation allows referencing an external resource for extended documentation.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletDataTypesTypesSchemaExternalDocs {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletDataTypesTypesSchemaProperties {
    /// default is a default value for undefined object fields.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub default: Option<serde_json::Value>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub deprecated: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enum")]
    pub r#enum: Option<Vec<serde_json::Value>>,
    /// JSON represents any valid JSON value.
    /// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub example: Option<serde_json::Value>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "exclusiveMaximum")]
    pub exclusive_maximum: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "exclusiveMinimum")]
    pub exclusive_minimum: Option<bool>,
    /// format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:
    /// 
    /// 
    /// - bsonobjectid: a bson object ID, i.e. a 24 characters hex string
    /// - uri: an URI as parsed by Golang net/url.ParseRequestURI
    /// - email: an email address as parsed by Golang net/mail.ParseAddress
    /// - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034].
    /// - ipv4: an IPv4 IP as parsed by Golang net.ParseIP
    /// - ipv6: an IPv6 IP as parsed by Golang net.ParseIP
    /// - cidr: a CIDR as parsed by Golang net.ParseCIDR
    /// - mac: a MAC address as parsed by Golang net.ParseMAC
    /// - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$
    /// - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$
    /// - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
    /// - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
    /// - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041"
    /// - isbn10: an ISBN10 number string like "0321751043"
    /// - isbn13: an ISBN13 number string like "978-0321751041"
    /// - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in
    /// - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$
    /// - hexcolor: an hexadecimal color code like "#FFFFFF" following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
    /// - rgbcolor: an RGB color code like rgb like "rgb(255,255,255)"
    /// - byte: base64 encoded binary data
    /// - password: any kind of string
    /// - date: a date string like "2006-01-02" as defined by full-date in RFC3339
    /// - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format
    /// - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub format: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxItems")]
    pub max_items: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxLength")]
    pub max_length: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxProperties")]
    pub max_properties: Option<i64>,
    /// A Number represents a JSON number literal.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub maximum: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minItems")]
    pub min_items: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minLength")]
    pub min_length: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minProperties")]
    pub min_properties: Option<i64>,
    /// A Number represents a JSON number literal.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub minimum: Option<String>,
    /// A Number represents a JSON number literal.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "multipleOf")]
    pub multiple_of: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub nullable: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pattern: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
    pub r#type: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "uniqueItems")]
    pub unique_items: Option<bool>,
    /// XDescriptors is a list of extended properties that trigger a custom behavior in external systems
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "x-descriptors")]
    pub x_descriptors: Option<Vec<String>>,
}

/// defines the formal configuration of the Kamelet
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletDefinition {
    /// JSONSchemaURL represents a schema url.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "$schema")]
    pub schema: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// JSON represents any valid JSON value.
    /// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub example: Option<serde_json::Value>,
    /// ExternalDocumentation allows referencing an external resource for extended documentation.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "externalDocs")]
    pub external_docs: Option<KameletDefinitionExternalDocs>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<BTreeMap<String, KameletDefinitionProperties>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub required: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
    pub r#type: Option<String>,
}

/// ExternalDocumentation allows referencing an external resource for extended documentation.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletDefinitionExternalDocs {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletDefinitionProperties {
    /// default is a default value for undefined object fields.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub default: Option<serde_json::Value>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub deprecated: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enum")]
    pub r#enum: Option<Vec<serde_json::Value>>,
    /// JSON represents any valid JSON value.
    /// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub example: Option<serde_json::Value>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "exclusiveMaximum")]
    pub exclusive_maximum: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "exclusiveMinimum")]
    pub exclusive_minimum: Option<bool>,
    /// format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:
    /// 
    /// 
    /// - bsonobjectid: a bson object ID, i.e. a 24 characters hex string
    /// - uri: an URI as parsed by Golang net/url.ParseRequestURI
    /// - email: an email address as parsed by Golang net/mail.ParseAddress
    /// - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034].
    /// - ipv4: an IPv4 IP as parsed by Golang net.ParseIP
    /// - ipv6: an IPv6 IP as parsed by Golang net.ParseIP
    /// - cidr: a CIDR as parsed by Golang net.ParseCIDR
    /// - mac: a MAC address as parsed by Golang net.ParseMAC
    /// - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$
    /// - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$
    /// - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
    /// - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
    /// - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041"
    /// - isbn10: an ISBN10 number string like "0321751043"
    /// - isbn13: an ISBN13 number string like "978-0321751041"
    /// - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in
    /// - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$
    /// - hexcolor: an hexadecimal color code like "#FFFFFF" following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
    /// - rgbcolor: an RGB color code like rgb like "rgb(255,255,255)"
    /// - byte: base64 encoded binary data
    /// - password: any kind of string
    /// - date: a date string like "2006-01-02" as defined by full-date in RFC3339
    /// - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format
    /// - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub format: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxItems")]
    pub max_items: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxLength")]
    pub max_length: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxProperties")]
    pub max_properties: Option<i64>,
    /// A Number represents a JSON number literal.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub maximum: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minItems")]
    pub min_items: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minLength")]
    pub min_length: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minProperties")]
    pub min_properties: Option<i64>,
    /// A Number represents a JSON number literal.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub minimum: Option<String>,
    /// A Number represents a JSON number literal.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "multipleOf")]
    pub multiple_of: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub nullable: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pattern: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
    pub r#type: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "uniqueItems")]
    pub unique_items: Option<bool>,
    /// XDescriptors is a list of extended properties that trigger a custom behavior in external systems
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "x-descriptors")]
    pub x_descriptors: Option<Vec<String>>,
}

/// SourceSpec defines the configuration for one or more routes to be executed in a certain Camel DSL language.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletSources {
    /// if the content is compressed (base64 encrypted)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub compression: Option<bool>,
    /// the source code (plain text)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub content: Option<String>,
    /// the confimap key holding the source content
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "contentKey")]
    pub content_key: Option<String>,
    /// the confimap reference holding the source content
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "contentRef")]
    pub content_ref: Option<String>,
    /// the content type (tipically text or binary)
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "contentType")]
    pub content_type: Option<String>,
    /// True if the spec is generated from a Kamelet
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "from-kamelet")]
    pub from_kamelet: Option<bool>,
    /// Interceptors are optional identifiers the org.apache.camel.k.RoutesLoader
    /// uses to pre/post process sources
    /// Deprecated: no longer in use.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub interceptors: Option<Vec<String>>,
    /// specify which is the language (Camel DSL) used to interpret this source code
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub language: Option<String>,
    /// Loader is an optional id of the org.apache.camel.k.RoutesLoader that will
    /// interpret this source at runtime
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub loader: Option<String>,
    /// the name of the specification
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// the path where the file is stored
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,
    /// List of property names defined in the source (e.g. if type is "template")
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "property-names")]
    pub property_names: Option<Vec<String>>,
    /// the source code (binary)
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "rawContent")]
    pub raw_content: Option<String>,
    /// Type defines the kind of source described by this object
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
    pub r#type: Option<String>,
}

/// data specification types for the events consumed/produced by the Kamelet
/// Deprecated: In favor of using DataTypes
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletTypes {
    /// media type as expected for HTTP media types (ie, application/json)
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mediaType")]
    pub media_type: Option<String>,
    /// the expected schema for the event
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub schema: Option<KameletTypesSchema>,
}

/// the expected schema for the event
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletTypesSchema {
    /// JSONSchemaURL represents a schema url.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "$schema")]
    pub schema: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// JSON represents any valid JSON value.
    /// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub example: Option<serde_json::Value>,
    /// ExternalDocumentation allows referencing an external resource for extended documentation.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "externalDocs")]
    pub external_docs: Option<KameletTypesSchemaExternalDocs>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<BTreeMap<String, KameletTypesSchemaProperties>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub required: Option<Vec<String>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
    pub r#type: Option<String>,
}

/// ExternalDocumentation allows referencing an external resource for extended documentation.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletTypesSchemaExternalDocs {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletTypesSchemaProperties {
    /// default is a default value for undefined object fields.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub default: Option<serde_json::Value>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub deprecated: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enum")]
    pub r#enum: Option<Vec<serde_json::Value>>,
    /// JSON represents any valid JSON value.
    /// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub example: Option<serde_json::Value>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "exclusiveMaximum")]
    pub exclusive_maximum: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "exclusiveMinimum")]
    pub exclusive_minimum: Option<bool>,
    /// format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:
    /// 
    /// 
    /// - bsonobjectid: a bson object ID, i.e. a 24 characters hex string
    /// - uri: an URI as parsed by Golang net/url.ParseRequestURI
    /// - email: an email address as parsed by Golang net/mail.ParseAddress
    /// - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034].
    /// - ipv4: an IPv4 IP as parsed by Golang net.ParseIP
    /// - ipv6: an IPv6 IP as parsed by Golang net.ParseIP
    /// - cidr: a CIDR as parsed by Golang net.ParseCIDR
    /// - mac: a MAC address as parsed by Golang net.ParseMAC
    /// - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$
    /// - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$
    /// - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
    /// - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
    /// - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041"
    /// - isbn10: an ISBN10 number string like "0321751043"
    /// - isbn13: an ISBN13 number string like "978-0321751041"
    /// - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in
    /// - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$
    /// - hexcolor: an hexadecimal color code like "#FFFFFF" following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
    /// - rgbcolor: an RGB color code like rgb like "rgb(255,255,255)"
    /// - byte: base64 encoded binary data
    /// - password: any kind of string
    /// - date: a date string like "2006-01-02" as defined by full-date in RFC3339
    /// - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format
    /// - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub format: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxItems")]
    pub max_items: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxLength")]
    pub max_length: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxProperties")]
    pub max_properties: Option<i64>,
    /// A Number represents a JSON number literal.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub maximum: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minItems")]
    pub min_items: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minLength")]
    pub min_length: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "minProperties")]
    pub min_properties: Option<i64>,
    /// A Number represents a JSON number literal.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub minimum: Option<String>,
    /// A Number represents a JSON number literal.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "multipleOf")]
    pub multiple_of: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub nullable: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pattern: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
    pub r#type: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "uniqueItems")]
    pub unique_items: Option<bool>,
    /// XDescriptors is a list of extended properties that trigger a custom behavior in external systems
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "x-descriptors")]
    pub x_descriptors: Option<Vec<String>>,
}

/// the actual status of the resource.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletStatus {
    /// Conditions --
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Vec<Condition>>,
    /// ObservedGeneration is the most recent generation observed for this Kamelet.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")]
    pub observed_generation: Option<i64>,
    /// Phase --
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub phase: Option<String>,
    /// Properties --
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<Vec<KameletStatusProperties>>,
}

/// KameletProperty specify the behavior of a property in a Kamelet.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct KameletStatusProperties {
    /// the default value of the property (if any)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub default: Option<String>,
    /// the name of the property
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}