Skip to main content

ftm_types/generated/
entities.rs

1#![allow(missing_docs)]
2#[cfg(feature = "builder")]
3use bon::Builder;
4use serde::{Deserialize, Serialize};
5/// Deserialize a `Vec<f64>` whose elements may arrive as JSON strings
6/// (e.g. `["6000.00"]`) or as JSON numbers (e.g. `[6000.0]`).
7fn deserialize_f64_vec<'de, D>(deserializer: D) -> Result<Vec<f64>, D::Error>
8where
9    D: serde::Deserializer<'de>,
10{
11    Vec::<serde_json::Value>::deserialize(deserializer)?
12        .into_iter()
13        .map(|v| match v {
14            serde_json::Value::Number(n) => n
15                .as_f64()
16                .ok_or_else(|| serde::de::Error::custom("number out of f64 range")),
17            serde_json::Value::String(s) => s.parse::<f64>().map_err(serde::de::Error::custom),
18            other => Err(serde::de::Error::custom(format!(
19                "expected number or numeric string, got {other}"
20            ))),
21        })
22        .collect()
23}
24/// Same as [`deserialize_f64_vec`] but wrapped in `Some`.
25/// Used for optional number fields so the field can still be absent (`None`)
26/// while a present value tolerates string-encoded numbers.
27fn deserialize_opt_f64_vec<'de, D>(deserializer: D) -> Result<Option<Vec<f64>>, D::Error>
28where
29    D: serde::Deserializer<'de>,
30{
31    deserialize_f64_vec(deserializer).map(Some)
32}
33///FTM Schema: Address
34#[derive(Debug, Clone, Serialize, Deserialize)]
35#[cfg_attr(feature = "builder", derive(Builder))]
36#[serde(rename_all = "camelCase")]
37pub struct Address {
38    pub id: String,
39    #[cfg_attr(feature = "builder", builder(default = "Address".to_string()))]
40    pub schema: String,
41    ///Property: Address
42    #[serde(skip_serializing_if = "Option::is_none")]
43    #[cfg_attr(
44        feature = "builder",
45        builder(with = |value:impl Into<String>|vec![value.into()])
46    )]
47    pub address: Option<Vec<String>>,
48    ///Property: Address
49    #[serde(skip_serializing_if = "Option::is_none")]
50    #[cfg_attr(
51        feature = "builder",
52        builder(with = |value:impl Into<String>|vec![value.into()])
53    )]
54    pub address_entity: Option<Vec<String>>,
55    ///Property: Aleph URL
56    #[serde(skip_serializing_if = "Option::is_none")]
57    #[cfg_attr(
58        feature = "builder",
59        builder(with = |value:impl Into<String>|vec![value.into()])
60    )]
61    pub aleph_url: Option<Vec<String>>,
62    ///Property: Alias
63    #[serde(skip_serializing_if = "Option::is_none")]
64    #[cfg_attr(
65        feature = "builder",
66        builder(with = |value:impl Into<String>|vec![value.into()])
67    )]
68    pub alias: Option<Vec<String>>,
69    ///Property: City
70    #[serde(skip_serializing_if = "Option::is_none")]
71    #[cfg_attr(
72        feature = "builder",
73        builder(with = |value:impl Into<String>|vec![value.into()])
74    )]
75    pub city: Option<Vec<String>>,
76    ///Property: Country
77    #[serde(skip_serializing_if = "Option::is_none")]
78    #[cfg_attr(
79        feature = "builder",
80        builder(with = |value:impl Into<String>|vec![value.into()])
81    )]
82    pub country: Option<Vec<String>>,
83    ///Property: Created at
84    #[serde(skip_serializing_if = "Option::is_none")]
85    #[cfg_attr(
86        feature = "builder",
87        builder(with = |value:impl Into<String>|vec![value.into()])
88    )]
89    pub created_at: Option<Vec<String>>,
90    ///Property: Description
91    #[serde(skip_serializing_if = "Option::is_none")]
92    #[cfg_attr(
93        feature = "builder",
94        builder(with = |value:impl Into<String>|vec![value.into()])
95    )]
96    pub description: Option<Vec<String>>,
97    ///Property: Full address
98    #[serde(skip_serializing_if = "Option::is_none")]
99    #[cfg_attr(
100        feature = "builder",
101        builder(with = |value:impl Into<String>|vec![value.into()])
102    )]
103    pub full: Option<Vec<String>>,
104    ///Property: Google Places ID
105    #[serde(skip_serializing_if = "Option::is_none")]
106    #[cfg_attr(
107        feature = "builder",
108        builder(with = |value:impl Into<String>|vec![value.into()])
109    )]
110    pub google_place_id: Option<Vec<String>>,
111    ///Property: Index text
112    #[serde(skip_serializing_if = "Option::is_none")]
113    #[cfg_attr(
114        feature = "builder",
115        builder(with = |value:impl Into<String>|vec![value.into()])
116    )]
117    pub index_text: Option<Vec<String>>,
118    ///Property: Keywords
119    #[serde(skip_serializing_if = "Option::is_none")]
120    #[cfg_attr(
121        feature = "builder",
122        builder(with = |value:impl Into<String>|vec![value.into()])
123    )]
124    pub keywords: Option<Vec<String>>,
125    ///Property: Latitude
126    #[serde(
127        skip_serializing_if = "Option::is_none",
128        deserialize_with = "deserialize_opt_f64_vec",
129        default
130    )]
131    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
132    pub latitude: Option<Vec<f64>>,
133    ///Property: Longitude
134    #[serde(
135        skip_serializing_if = "Option::is_none",
136        deserialize_with = "deserialize_opt_f64_vec",
137        default
138    )]
139    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
140    pub longitude: Option<Vec<f64>>,
141    ///Property: Modified on
142    #[serde(skip_serializing_if = "Option::is_none")]
143    #[cfg_attr(
144        feature = "builder",
145        builder(with = |value:impl Into<String>|vec![value.into()])
146    )]
147    pub modified_at: Option<Vec<String>>,
148    ///Property: Name
149    #[serde(default)]
150    #[cfg_attr(
151        feature = "builder",
152        builder(with = |value:impl Into<String>|vec![value.into()])
153    )]
154    pub name: Vec<String>,
155    ///Property: Notes
156    #[serde(skip_serializing_if = "Option::is_none")]
157    #[cfg_attr(
158        feature = "builder",
159        builder(with = |value:impl Into<String>|vec![value.into()])
160    )]
161    pub notes: Option<Vec<String>>,
162    ///Property: OpenStreetmap Place ID
163    #[serde(skip_serializing_if = "Option::is_none")]
164    #[cfg_attr(
165        feature = "builder",
166        builder(with = |value:impl Into<String>|vec![value.into()])
167    )]
168    pub osm_id: Option<Vec<String>>,
169    ///Property: PO Box
170    #[serde(skip_serializing_if = "Option::is_none")]
171    #[cfg_attr(
172        feature = "builder",
173        builder(with = |value:impl Into<String>|vec![value.into()])
174    )]
175    pub post_office_box: Option<Vec<String>>,
176    ///Property: Postal code
177    #[serde(skip_serializing_if = "Option::is_none")]
178    #[cfg_attr(
179        feature = "builder",
180        builder(with = |value:impl Into<String>|vec![value.into()])
181    )]
182    pub postal_code: Option<Vec<String>>,
183    ///Property: Previous name
184    #[serde(skip_serializing_if = "Option::is_none")]
185    #[cfg_attr(
186        feature = "builder",
187        builder(with = |value:impl Into<String>|vec![value.into()])
188    )]
189    pub previous_name: Option<Vec<String>>,
190    ///Property: Program
191    #[serde(skip_serializing_if = "Option::is_none")]
192    #[cfg_attr(
193        feature = "builder",
194        builder(with = |value:impl Into<String>|vec![value.into()])
195    )]
196    pub program: Option<Vec<String>>,
197    ///Property: Program ID
198    #[serde(skip_serializing_if = "Option::is_none")]
199    #[cfg_attr(
200        feature = "builder",
201        builder(with = |value:impl Into<String>|vec![value.into()])
202    )]
203    pub program_id: Option<Vec<String>>,
204    ///Property: Source document
205    #[serde(skip_serializing_if = "Option::is_none")]
206    #[cfg_attr(
207        feature = "builder",
208        builder(with = |value:impl Into<String>|vec![value.into()])
209    )]
210    pub proof: Option<Vec<String>>,
211    ///Property: Publishing source
212    #[serde(skip_serializing_if = "Option::is_none")]
213    #[cfg_attr(
214        feature = "builder",
215        builder(with = |value:impl Into<String>|vec![value.into()])
216    )]
217    pub publisher: Option<Vec<String>>,
218    ///Property: Publishing source URL
219    #[serde(skip_serializing_if = "Option::is_none")]
220    #[cfg_attr(
221        feature = "builder",
222        builder(with = |value:impl Into<String>|vec![value.into()])
223    )]
224    pub publisher_url: Option<Vec<String>>,
225    ///Property: Region
226    #[serde(skip_serializing_if = "Option::is_none")]
227    #[cfg_attr(
228        feature = "builder",
229        builder(with = |value:impl Into<String>|vec![value.into()])
230    )]
231    pub region: Option<Vec<String>>,
232    ///Property: Remarks
233    #[serde(skip_serializing_if = "Option::is_none")]
234    #[cfg_attr(
235        feature = "builder",
236        builder(with = |value:impl Into<String>|vec![value.into()])
237    )]
238    pub remarks: Option<Vec<String>>,
239    ///Property: Retrieved on
240    #[serde(skip_serializing_if = "Option::is_none")]
241    #[cfg_attr(
242        feature = "builder",
243        builder(with = |value:impl Into<String>|vec![value.into()])
244    )]
245    pub retrieved_at: Option<Vec<String>>,
246    ///Property: Source link
247    #[serde(skip_serializing_if = "Option::is_none")]
248    #[cfg_attr(
249        feature = "builder",
250        builder(with = |value:impl Into<String>|vec![value.into()])
251    )]
252    pub source_url: Option<Vec<String>>,
253    ///Property: State
254    #[serde(skip_serializing_if = "Option::is_none")]
255    #[cfg_attr(
256        feature = "builder",
257        builder(with = |value:impl Into<String>|vec![value.into()])
258    )]
259    pub state: Option<Vec<String>>,
260    ///Property: Street address
261    #[serde(skip_serializing_if = "Option::is_none")]
262    #[cfg_attr(
263        feature = "builder",
264        builder(with = |value:impl Into<String>|vec![value.into()])
265    )]
266    pub street: Option<Vec<String>>,
267    ///Property: Street address (ctd.)
268    #[serde(skip_serializing_if = "Option::is_none")]
269    #[cfg_attr(
270        feature = "builder",
271        builder(with = |value:impl Into<String>|vec![value.into()])
272    )]
273    pub street2: Option<Vec<String>>,
274    ///Property: Summary
275    #[serde(skip_serializing_if = "Option::is_none")]
276    #[cfg_attr(
277        feature = "builder",
278        builder(with = |value:impl Into<String>|vec![value.into()])
279    )]
280    pub summary: Option<Vec<String>>,
281    ///Property: Topics
282    #[serde(skip_serializing_if = "Option::is_none")]
283    #[cfg_attr(
284        feature = "builder",
285        builder(with = |value:impl Into<String>|vec![value.into()])
286    )]
287    pub topics: Option<Vec<String>>,
288    ///Property: Weak alias
289    #[serde(skip_serializing_if = "Option::is_none")]
290    #[cfg_attr(
291        feature = "builder",
292        builder(with = |value:impl Into<String>|vec![value.into()])
293    )]
294    pub weak_alias: Option<Vec<String>>,
295    ///Property: Wikidata ID
296    #[serde(skip_serializing_if = "Option::is_none")]
297    #[cfg_attr(
298        feature = "builder",
299        builder(with = |value:impl Into<String>|vec![value.into()])
300    )]
301    pub wikidata_id: Option<Vec<String>>,
302    ///Property: Wikipedia Article
303    #[serde(skip_serializing_if = "Option::is_none")]
304    #[cfg_attr(
305        feature = "builder",
306        builder(with = |value:impl Into<String>|vec![value.into()])
307    )]
308    pub wikipedia_url: Option<Vec<String>>,
309}
310impl Address {
311    /// Create a new entity with the given ID
312    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
313    pub fn new(id: impl Into<String>) -> Self {
314        Self {
315            id: id.into(),
316            schema: "Address".to_string(),
317            address: None,
318            address_entity: None,
319            aleph_url: None,
320            alias: None,
321            city: None,
322            country: None,
323            created_at: None,
324            description: None,
325            full: None,
326            google_place_id: None,
327            index_text: None,
328            keywords: None,
329            latitude: None,
330            longitude: None,
331            modified_at: None,
332            name: Vec::new(),
333            notes: None,
334            osm_id: None,
335            post_office_box: None,
336            postal_code: None,
337            previous_name: None,
338            program: None,
339            program_id: None,
340            proof: None,
341            publisher: None,
342            publisher_url: None,
343            region: None,
344            remarks: None,
345            retrieved_at: None,
346            source_url: None,
347            state: None,
348            street: None,
349            street2: None,
350            summary: None,
351            topics: None,
352            weak_alias: None,
353            wikidata_id: None,
354            wikipedia_url: None,
355        }
356    }
357    /// Get the schema name
358    pub fn schema_name() -> &'static str {
359        "Address"
360    }
361    /// Serialize to standard FTM nested JSON format
362    ///
363    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
364    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
365        let mut value = serde_json::to_value(self)?;
366        if let Some(obj) = value.as_object_mut() {
367            let id = obj.remove("id");
368            let schema = obj.remove("schema");
369            let properties = serde_json::Value::Object(std::mem::take(obj));
370            if let Some(id) = id {
371                obj.insert("id".into(), id);
372            }
373            if let Some(schema) = schema {
374                obj.insert("schema".into(), schema);
375            }
376            obj.insert("properties".into(), properties);
377        }
378        serde_json::to_string(&value)
379    }
380}
381///FTM Schema: Airplane
382#[derive(Debug, Clone, Serialize, Deserialize)]
383#[cfg_attr(feature = "builder", derive(Builder))]
384#[serde(rename_all = "camelCase")]
385pub struct Airplane {
386    pub id: String,
387    #[cfg_attr(feature = "builder", builder(default = "Airplane".to_string()))]
388    pub schema: String,
389    ///Property: Address
390    #[serde(skip_serializing_if = "Option::is_none")]
391    #[cfg_attr(
392        feature = "builder",
393        builder(with = |value:impl Into<String>|vec![value.into()])
394    )]
395    pub address: Option<Vec<String>>,
396    ///Property: Address
397    #[serde(skip_serializing_if = "Option::is_none")]
398    #[cfg_attr(
399        feature = "builder",
400        builder(with = |value:impl Into<String>|vec![value.into()])
401    )]
402    pub address_entity: Option<Vec<String>>,
403    ///Property: Aleph URL
404    #[serde(skip_serializing_if = "Option::is_none")]
405    #[cfg_attr(
406        feature = "builder",
407        builder(with = |value:impl Into<String>|vec![value.into()])
408    )]
409    pub aleph_url: Option<Vec<String>>,
410    ///Property: Alias
411    #[serde(skip_serializing_if = "Option::is_none")]
412    #[cfg_attr(
413        feature = "builder",
414        builder(with = |value:impl Into<String>|vec![value.into()])
415    )]
416    pub alias: Option<Vec<String>>,
417    ///Property: Amount
418    #[serde(
419        skip_serializing_if = "Option::is_none",
420        deserialize_with = "deserialize_opt_f64_vec",
421        default
422    )]
423    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
424    pub amount: Option<Vec<f64>>,
425    ///Property: Amount in EUR
426    #[serde(
427        skip_serializing_if = "Option::is_none",
428        deserialize_with = "deserialize_opt_f64_vec",
429        default
430    )]
431    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
432    pub amount_eur: Option<Vec<f64>>,
433    ///Property: Amount in USD
434    #[serde(
435        skip_serializing_if = "Option::is_none",
436        deserialize_with = "deserialize_opt_f64_vec",
437        default
438    )]
439    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
440    pub amount_usd: Option<Vec<f64>>,
441    ///Property: Build Date
442    #[serde(skip_serializing_if = "Option::is_none")]
443    #[cfg_attr(
444        feature = "builder",
445        builder(with = |value:impl Into<String>|vec![value.into()])
446    )]
447    pub build_date: Option<Vec<String>>,
448    ///Property: Country
449    #[serde(skip_serializing_if = "Option::is_none")]
450    #[cfg_attr(
451        feature = "builder",
452        builder(with = |value:impl Into<String>|vec![value.into()])
453    )]
454    pub country: Option<Vec<String>>,
455    ///Property: Created at
456    #[serde(skip_serializing_if = "Option::is_none")]
457    #[cfg_attr(
458        feature = "builder",
459        builder(with = |value:impl Into<String>|vec![value.into()])
460    )]
461    pub created_at: Option<Vec<String>>,
462    ///Property: Currency
463    #[serde(skip_serializing_if = "Option::is_none")]
464    #[cfg_attr(
465        feature = "builder",
466        builder(with = |value:impl Into<String>|vec![value.into()])
467    )]
468    pub currency: Option<Vec<String>>,
469    ///Property: De-registration Date
470    #[serde(skip_serializing_if = "Option::is_none")]
471    #[cfg_attr(
472        feature = "builder",
473        builder(with = |value:impl Into<String>|vec![value.into()])
474    )]
475    pub deregistration_date: Option<Vec<String>>,
476    ///Property: Description
477    #[serde(skip_serializing_if = "Option::is_none")]
478    #[cfg_attr(
479        feature = "builder",
480        builder(with = |value:impl Into<String>|vec![value.into()])
481    )]
482    pub description: Option<Vec<String>>,
483    ///Property: ICAO aircraft type designator
484    #[serde(skip_serializing_if = "Option::is_none")]
485    #[cfg_attr(
486        feature = "builder",
487        builder(with = |value:impl Into<String>|vec![value.into()])
488    )]
489    pub icao_code: Option<Vec<String>>,
490    ///Property: Index text
491    #[serde(skip_serializing_if = "Option::is_none")]
492    #[cfg_attr(
493        feature = "builder",
494        builder(with = |value:impl Into<String>|vec![value.into()])
495    )]
496    pub index_text: Option<Vec<String>>,
497    ///Property: Keywords
498    #[serde(skip_serializing_if = "Option::is_none")]
499    #[cfg_attr(
500        feature = "builder",
501        builder(with = |value:impl Into<String>|vec![value.into()])
502    )]
503    pub keywords: Option<Vec<String>>,
504    ///Property: Manufacturer
505    #[serde(skip_serializing_if = "Option::is_none")]
506    #[cfg_attr(
507        feature = "builder",
508        builder(with = |value:impl Into<String>|vec![value.into()])
509    )]
510    pub manufacturer: Option<Vec<String>>,
511    ///Property: Model
512    #[serde(skip_serializing_if = "Option::is_none")]
513    #[cfg_attr(
514        feature = "builder",
515        builder(with = |value:impl Into<String>|vec![value.into()])
516    )]
517    pub model: Option<Vec<String>>,
518    ///Property: Modified on
519    #[serde(skip_serializing_if = "Option::is_none")]
520    #[cfg_attr(
521        feature = "builder",
522        builder(with = |value:impl Into<String>|vec![value.into()])
523    )]
524    pub modified_at: Option<Vec<String>>,
525    ///Property: Name
526    #[serde(default)]
527    #[cfg_attr(
528        feature = "builder",
529        builder(with = |value:impl Into<String>|vec![value.into()])
530    )]
531    pub name: Vec<String>,
532    ///Property: Notes
533    #[serde(skip_serializing_if = "Option::is_none")]
534    #[cfg_attr(
535        feature = "builder",
536        builder(with = |value:impl Into<String>|vec![value.into()])
537    )]
538    pub notes: Option<Vec<String>>,
539    ///Property: Operator
540    #[serde(skip_serializing_if = "Option::is_none")]
541    #[cfg_attr(
542        feature = "builder",
543        builder(with = |value:impl Into<String>|vec![value.into()])
544    )]
545    pub operator: Option<Vec<String>>,
546    ///Property: Owner
547    #[serde(skip_serializing_if = "Option::is_none")]
548    #[cfg_attr(
549        feature = "builder",
550        builder(with = |value:impl Into<String>|vec![value.into()])
551    )]
552    pub owner: Option<Vec<String>>,
553    ///Property: Previous name
554    #[serde(skip_serializing_if = "Option::is_none")]
555    #[cfg_attr(
556        feature = "builder",
557        builder(with = |value:impl Into<String>|vec![value.into()])
558    )]
559    pub previous_name: Option<Vec<String>>,
560    ///Property: Program
561    #[serde(skip_serializing_if = "Option::is_none")]
562    #[cfg_attr(
563        feature = "builder",
564        builder(with = |value:impl Into<String>|vec![value.into()])
565    )]
566    pub program: Option<Vec<String>>,
567    ///Property: Program ID
568    #[serde(skip_serializing_if = "Option::is_none")]
569    #[cfg_attr(
570        feature = "builder",
571        builder(with = |value:impl Into<String>|vec![value.into()])
572    )]
573    pub program_id: Option<Vec<String>>,
574    ///Property: Source document
575    #[serde(skip_serializing_if = "Option::is_none")]
576    #[cfg_attr(
577        feature = "builder",
578        builder(with = |value:impl Into<String>|vec![value.into()])
579    )]
580    pub proof: Option<Vec<String>>,
581    ///Property: Publishing source
582    #[serde(skip_serializing_if = "Option::is_none")]
583    #[cfg_attr(
584        feature = "builder",
585        builder(with = |value:impl Into<String>|vec![value.into()])
586    )]
587    pub publisher: Option<Vec<String>>,
588    ///Property: Publishing source URL
589    #[serde(skip_serializing_if = "Option::is_none")]
590    #[cfg_attr(
591        feature = "builder",
592        builder(with = |value:impl Into<String>|vec![value.into()])
593    )]
594    pub publisher_url: Option<Vec<String>>,
595    ///Property: Registration Date
596    #[serde(skip_serializing_if = "Option::is_none")]
597    #[cfg_attr(
598        feature = "builder",
599        builder(with = |value:impl Into<String>|vec![value.into()])
600    )]
601    pub registration_date: Option<Vec<String>>,
602    ///Property: Registration number
603    #[serde(skip_serializing_if = "Option::is_none")]
604    #[cfg_attr(
605        feature = "builder",
606        builder(with = |value:impl Into<String>|vec![value.into()])
607    )]
608    pub registration_number: Option<Vec<String>>,
609    ///Property: Retrieved on
610    #[serde(skip_serializing_if = "Option::is_none")]
611    #[cfg_attr(
612        feature = "builder",
613        builder(with = |value:impl Into<String>|vec![value.into()])
614    )]
615    pub retrieved_at: Option<Vec<String>>,
616    ///Property: Serial Number
617    #[serde(skip_serializing_if = "Option::is_none")]
618    #[cfg_attr(
619        feature = "builder",
620        builder(with = |value:impl Into<String>|vec![value.into()])
621    )]
622    pub serial_number: Option<Vec<String>>,
623    ///Property: Source link
624    #[serde(skip_serializing_if = "Option::is_none")]
625    #[cfg_attr(
626        feature = "builder",
627        builder(with = |value:impl Into<String>|vec![value.into()])
628    )]
629    pub source_url: Option<Vec<String>>,
630    ///Property: Summary
631    #[serde(skip_serializing_if = "Option::is_none")]
632    #[cfg_attr(
633        feature = "builder",
634        builder(with = |value:impl Into<String>|vec![value.into()])
635    )]
636    pub summary: Option<Vec<String>>,
637    ///Property: Topics
638    #[serde(skip_serializing_if = "Option::is_none")]
639    #[cfg_attr(
640        feature = "builder",
641        builder(with = |value:impl Into<String>|vec![value.into()])
642    )]
643    pub topics: Option<Vec<String>>,
644    ///Property: Type
645    #[serde(skip_serializing_if = "Option::is_none")]
646    #[cfg_attr(
647        feature = "builder",
648        builder(with = |value:impl Into<String>|vec![value.into()])
649    )]
650    pub type_: Option<Vec<String>>,
651    ///Property: Weak alias
652    #[serde(skip_serializing_if = "Option::is_none")]
653    #[cfg_attr(
654        feature = "builder",
655        builder(with = |value:impl Into<String>|vec![value.into()])
656    )]
657    pub weak_alias: Option<Vec<String>>,
658    ///Property: Wikidata ID
659    #[serde(skip_serializing_if = "Option::is_none")]
660    #[cfg_attr(
661        feature = "builder",
662        builder(with = |value:impl Into<String>|vec![value.into()])
663    )]
664    pub wikidata_id: Option<Vec<String>>,
665    ///Property: Wikipedia Article
666    #[serde(skip_serializing_if = "Option::is_none")]
667    #[cfg_attr(
668        feature = "builder",
669        builder(with = |value:impl Into<String>|vec![value.into()])
670    )]
671    pub wikipedia_url: Option<Vec<String>>,
672}
673impl Airplane {
674    /// Create a new entity with the given ID
675    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
676    pub fn new(id: impl Into<String>) -> Self {
677        Self {
678            id: id.into(),
679            schema: "Airplane".to_string(),
680            address: None,
681            address_entity: None,
682            aleph_url: None,
683            alias: None,
684            amount: None,
685            amount_eur: None,
686            amount_usd: None,
687            build_date: None,
688            country: None,
689            created_at: None,
690            currency: None,
691            deregistration_date: None,
692            description: None,
693            icao_code: None,
694            index_text: None,
695            keywords: None,
696            manufacturer: None,
697            model: None,
698            modified_at: None,
699            name: Vec::new(),
700            notes: None,
701            operator: None,
702            owner: None,
703            previous_name: None,
704            program: None,
705            program_id: None,
706            proof: None,
707            publisher: None,
708            publisher_url: None,
709            registration_date: None,
710            registration_number: None,
711            retrieved_at: None,
712            serial_number: None,
713            source_url: None,
714            summary: None,
715            topics: None,
716            type_: None,
717            weak_alias: None,
718            wikidata_id: None,
719            wikipedia_url: None,
720        }
721    }
722    /// Get the schema name
723    pub fn schema_name() -> &'static str {
724        "Airplane"
725    }
726    /// Serialize to standard FTM nested JSON format
727    ///
728    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
729    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
730        let mut value = serde_json::to_value(self)?;
731        if let Some(obj) = value.as_object_mut() {
732            let id = obj.remove("id");
733            let schema = obj.remove("schema");
734            let properties = serde_json::Value::Object(std::mem::take(obj));
735            if let Some(id) = id {
736                obj.insert("id".into(), id);
737            }
738            if let Some(schema) = schema {
739                obj.insert("schema".into(), schema);
740            }
741            obj.insert("properties".into(), properties);
742        }
743        serde_json::to_string(&value)
744    }
745}
746///FTM Schema: Article
747#[derive(Debug, Clone, Serialize, Deserialize)]
748#[cfg_attr(feature = "builder", derive(Builder))]
749#[serde(rename_all = "camelCase")]
750pub struct Article {
751    pub id: String,
752    #[cfg_attr(feature = "builder", builder(default = "Article".to_string()))]
753    pub schema: String,
754    ///Property: Address
755    #[serde(skip_serializing_if = "Option::is_none")]
756    #[cfg_attr(
757        feature = "builder",
758        builder(with = |value:impl Into<String>|vec![value.into()])
759    )]
760    pub address: Option<Vec<String>>,
761    ///Property: Address
762    #[serde(skip_serializing_if = "Option::is_none")]
763    #[cfg_attr(
764        feature = "builder",
765        builder(with = |value:impl Into<String>|vec![value.into()])
766    )]
767    pub address_entity: Option<Vec<String>>,
768    ///Property: Aleph URL
769    #[serde(skip_serializing_if = "Option::is_none")]
770    #[cfg_attr(
771        feature = "builder",
772        builder(with = |value:impl Into<String>|vec![value.into()])
773    )]
774    pub aleph_url: Option<Vec<String>>,
775    ///Property: Alias
776    #[serde(skip_serializing_if = "Option::is_none")]
777    #[cfg_attr(
778        feature = "builder",
779        builder(with = |value:impl Into<String>|vec![value.into()])
780    )]
781    pub alias: Option<Vec<String>>,
782    ///Property: Ancestors
783    #[serde(skip_serializing_if = "Option::is_none")]
784    #[cfg_attr(
785        feature = "builder",
786        builder(with = |value:impl Into<String>|vec![value.into()])
787    )]
788    pub ancestors: Option<Vec<String>>,
789    ///Property: Author
790    #[serde(skip_serializing_if = "Option::is_none")]
791    #[cfg_attr(
792        feature = "builder",
793        builder(with = |value:impl Into<String>|vec![value.into()])
794    )]
795    pub author: Option<Vec<String>>,
796    ///Property: Authored on
797    #[serde(skip_serializing_if = "Option::is_none")]
798    #[cfg_attr(
799        feature = "builder",
800        builder(with = |value:impl Into<String>|vec![value.into()])
801    )]
802    pub authored_at: Option<Vec<String>>,
803    ///Property: Text
804    #[serde(skip_serializing_if = "Option::is_none")]
805    #[cfg_attr(
806        feature = "builder",
807        builder(with = |value:impl Into<String>|vec![value.into()])
808    )]
809    pub body_text: Option<Vec<String>>,
810    ///Property: Detected companies
811    #[serde(skip_serializing_if = "Option::is_none")]
812    #[cfg_attr(
813        feature = "builder",
814        builder(with = |value:impl Into<String>|vec![value.into()])
815    )]
816    pub companies_mentioned: Option<Vec<String>>,
817    ///Property: Checksum
818    #[serde(skip_serializing_if = "Option::is_none")]
819    #[cfg_attr(
820        feature = "builder",
821        builder(with = |value:impl Into<String>|vec![value.into()])
822    )]
823    pub content_hash: Option<Vec<String>>,
824    ///Property: Country
825    #[serde(skip_serializing_if = "Option::is_none")]
826    #[cfg_attr(
827        feature = "builder",
828        builder(with = |value:impl Into<String>|vec![value.into()])
829    )]
830    pub country: Option<Vec<String>>,
831    ///Property: Crawler
832    #[serde(skip_serializing_if = "Option::is_none")]
833    #[cfg_attr(
834        feature = "builder",
835        builder(with = |value:impl Into<String>|vec![value.into()])
836    )]
837    pub crawler: Option<Vec<String>>,
838    ///Property: Created at
839    #[serde(skip_serializing_if = "Option::is_none")]
840    #[cfg_attr(
841        feature = "builder",
842        builder(with = |value:impl Into<String>|vec![value.into()])
843    )]
844    pub created_at: Option<Vec<String>>,
845    ///Property: Date
846    #[serde(skip_serializing_if = "Option::is_none")]
847    #[cfg_attr(
848        feature = "builder",
849        builder(with = |value:impl Into<String>|vec![value.into()])
850    )]
851    pub date: Option<Vec<String>>,
852    ///Property: Description
853    #[serde(skip_serializing_if = "Option::is_none")]
854    #[cfg_attr(
855        feature = "builder",
856        builder(with = |value:impl Into<String>|vec![value.into()])
857    )]
858    pub description: Option<Vec<String>>,
859    ///Property: Detected country
860    #[serde(skip_serializing_if = "Option::is_none")]
861    #[cfg_attr(
862        feature = "builder",
863        builder(with = |value:impl Into<String>|vec![value.into()])
864    )]
865    pub detected_country: Option<Vec<String>>,
866    ///Property: Detected language
867    #[serde(skip_serializing_if = "Option::is_none")]
868    #[cfg_attr(
869        feature = "builder",
870        builder(with = |value:impl Into<String>|vec![value.into()])
871    )]
872    pub detected_language: Option<Vec<String>>,
873    ///Property: Detected e-mail addresses
874    #[serde(skip_serializing_if = "Option::is_none")]
875    #[cfg_attr(
876        feature = "builder",
877        builder(with = |value:impl Into<String>|vec![value.into()])
878    )]
879    pub email_mentioned: Option<Vec<String>>,
880    ///Property: File encoding
881    #[serde(skip_serializing_if = "Option::is_none")]
882    #[cfg_attr(
883        feature = "builder",
884        builder(with = |value:impl Into<String>|vec![value.into()])
885    )]
886    pub encoding: Option<Vec<String>>,
887    ///Property: File extension
888    #[serde(skip_serializing_if = "Option::is_none")]
889    #[cfg_attr(
890        feature = "builder",
891        builder(with = |value:impl Into<String>|vec![value.into()])
892    )]
893    pub extension: Option<Vec<String>>,
894    ///Property: File name
895    #[serde(default)]
896    #[cfg_attr(
897        feature = "builder",
898        builder(with = |value:impl Into<String>|vec![value.into()])
899    )]
900    pub file_name: Vec<String>,
901    ///Property: File size
902    #[serde(
903        skip_serializing_if = "Option::is_none",
904        deserialize_with = "deserialize_opt_f64_vec",
905        default
906    )]
907    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
908    pub file_size: Option<Vec<f64>>,
909    ///Property: Generator
910    #[serde(skip_serializing_if = "Option::is_none")]
911    #[cfg_attr(
912        feature = "builder",
913        builder(with = |value:impl Into<String>|vec![value.into()])
914    )]
915    pub generator: Option<Vec<String>>,
916    ///Property: Detected IBANs
917    #[serde(skip_serializing_if = "Option::is_none")]
918    #[cfg_attr(
919        feature = "builder",
920        builder(with = |value:impl Into<String>|vec![value.into()])
921    )]
922    pub iban_mentioned: Option<Vec<String>>,
923    ///Property: Index text
924    #[serde(skip_serializing_if = "Option::is_none")]
925    #[cfg_attr(
926        feature = "builder",
927        builder(with = |value:impl Into<String>|vec![value.into()])
928    )]
929    pub index_text: Option<Vec<String>>,
930    ///Property: Detected IP addresses
931    #[serde(skip_serializing_if = "Option::is_none")]
932    #[cfg_attr(
933        feature = "builder",
934        builder(with = |value:impl Into<String>|vec![value.into()])
935    )]
936    pub ip_mentioned: Option<Vec<String>>,
937    ///Property: Keywords
938    #[serde(skip_serializing_if = "Option::is_none")]
939    #[cfg_attr(
940        feature = "builder",
941        builder(with = |value:impl Into<String>|vec![value.into()])
942    )]
943    pub keywords: Option<Vec<String>>,
944    ///Property: Language
945    #[serde(skip_serializing_if = "Option::is_none")]
946    #[cfg_attr(
947        feature = "builder",
948        builder(with = |value:impl Into<String>|vec![value.into()])
949    )]
950    pub language: Option<Vec<String>>,
951    ///Property: Detected locations
952    #[serde(skip_serializing_if = "Option::is_none")]
953    #[cfg_attr(
954        feature = "builder",
955        builder(with = |value:impl Into<String>|vec![value.into()])
956    )]
957    pub location_mentioned: Option<Vec<String>>,
958    ///Property: Message ID
959    #[serde(skip_serializing_if = "Option::is_none")]
960    #[cfg_attr(
961        feature = "builder",
962        builder(with = |value:impl Into<String>|vec![value.into()])
963    )]
964    pub message_id: Option<Vec<String>>,
965    ///Property: MIME type
966    #[serde(skip_serializing_if = "Option::is_none")]
967    #[cfg_attr(
968        feature = "builder",
969        builder(with = |value:impl Into<String>|vec![value.into()])
970    )]
971    pub mime_type: Option<Vec<String>>,
972    ///Property: Modified on
973    #[serde(skip_serializing_if = "Option::is_none")]
974    #[cfg_attr(
975        feature = "builder",
976        builder(with = |value:impl Into<String>|vec![value.into()])
977    )]
978    pub modified_at: Option<Vec<String>>,
979    ///Property: Name
980    #[serde(default)]
981    #[cfg_attr(
982        feature = "builder",
983        builder(with = |value:impl Into<String>|vec![value.into()])
984    )]
985    pub name: Vec<String>,
986    ///Property: Detected names
987    #[serde(skip_serializing_if = "Option::is_none")]
988    #[cfg_attr(
989        feature = "builder",
990        builder(with = |value:impl Into<String>|vec![value.into()])
991    )]
992    pub names_mentioned: Option<Vec<String>>,
993    ///Property: Notes
994    #[serde(skip_serializing_if = "Option::is_none")]
995    #[cfg_attr(
996        feature = "builder",
997        builder(with = |value:impl Into<String>|vec![value.into()])
998    )]
999    pub notes: Option<Vec<String>>,
1000    ///Property: Folder
1001    #[serde(skip_serializing_if = "Option::is_none")]
1002    #[cfg_attr(
1003        feature = "builder",
1004        builder(with = |value:impl Into<String>|vec![value.into()])
1005    )]
1006    pub parent: Option<Vec<String>>,
1007    ///Property: Detected people
1008    #[serde(skip_serializing_if = "Option::is_none")]
1009    #[cfg_attr(
1010        feature = "builder",
1011        builder(with = |value:impl Into<String>|vec![value.into()])
1012    )]
1013    pub people_mentioned: Option<Vec<String>>,
1014    ///Property: Detected phones
1015    #[serde(skip_serializing_if = "Option::is_none")]
1016    #[cfg_attr(
1017        feature = "builder",
1018        builder(with = |value:impl Into<String>|vec![value.into()])
1019    )]
1020    pub phone_mentioned: Option<Vec<String>>,
1021    ///Property: Previous name
1022    #[serde(skip_serializing_if = "Option::is_none")]
1023    #[cfg_attr(
1024        feature = "builder",
1025        builder(with = |value:impl Into<String>|vec![value.into()])
1026    )]
1027    pub previous_name: Option<Vec<String>>,
1028    ///Property: Processed at
1029    #[serde(skip_serializing_if = "Option::is_none")]
1030    #[cfg_attr(
1031        feature = "builder",
1032        builder(with = |value:impl Into<String>|vec![value.into()])
1033    )]
1034    pub processed_at: Option<Vec<String>>,
1035    ///Property: Processing agent
1036    #[serde(skip_serializing_if = "Option::is_none")]
1037    #[cfg_attr(
1038        feature = "builder",
1039        builder(with = |value:impl Into<String>|vec![value.into()])
1040    )]
1041    pub processing_agent: Option<Vec<String>>,
1042    ///Property: Processing error
1043    #[serde(skip_serializing_if = "Option::is_none")]
1044    #[cfg_attr(
1045        feature = "builder",
1046        builder(with = |value:impl Into<String>|vec![value.into()])
1047    )]
1048    pub processing_error: Option<Vec<String>>,
1049    ///Property: Processing status
1050    #[serde(skip_serializing_if = "Option::is_none")]
1051    #[cfg_attr(
1052        feature = "builder",
1053        builder(with = |value:impl Into<String>|vec![value.into()])
1054    )]
1055    pub processing_status: Option<Vec<String>>,
1056    ///Property: Program
1057    #[serde(skip_serializing_if = "Option::is_none")]
1058    #[cfg_attr(
1059        feature = "builder",
1060        builder(with = |value:impl Into<String>|vec![value.into()])
1061    )]
1062    pub program: Option<Vec<String>>,
1063    ///Property: Program ID
1064    #[serde(skip_serializing_if = "Option::is_none")]
1065    #[cfg_attr(
1066        feature = "builder",
1067        builder(with = |value:impl Into<String>|vec![value.into()])
1068    )]
1069    pub program_id: Option<Vec<String>>,
1070    ///Property: Source document
1071    #[serde(skip_serializing_if = "Option::is_none")]
1072    #[cfg_attr(
1073        feature = "builder",
1074        builder(with = |value:impl Into<String>|vec![value.into()])
1075    )]
1076    pub proof: Option<Vec<String>>,
1077    ///Property: Published on
1078    #[serde(skip_serializing_if = "Option::is_none")]
1079    #[cfg_attr(
1080        feature = "builder",
1081        builder(with = |value:impl Into<String>|vec![value.into()])
1082    )]
1083    pub published_at: Option<Vec<String>>,
1084    ///Property: Publishing source
1085    #[serde(skip_serializing_if = "Option::is_none")]
1086    #[cfg_attr(
1087        feature = "builder",
1088        builder(with = |value:impl Into<String>|vec![value.into()])
1089    )]
1090    pub publisher: Option<Vec<String>>,
1091    ///Property: Publishing source URL
1092    #[serde(skip_serializing_if = "Option::is_none")]
1093    #[cfg_attr(
1094        feature = "builder",
1095        builder(with = |value:impl Into<String>|vec![value.into()])
1096    )]
1097    pub publisher_url: Option<Vec<String>>,
1098    ///Property: Retrieved on
1099    #[serde(skip_serializing_if = "Option::is_none")]
1100    #[cfg_attr(
1101        feature = "builder",
1102        builder(with = |value:impl Into<String>|vec![value.into()])
1103    )]
1104    pub retrieved_at: Option<Vec<String>>,
1105    ///Property: Source link
1106    #[serde(skip_serializing_if = "Option::is_none")]
1107    #[cfg_attr(
1108        feature = "builder",
1109        builder(with = |value:impl Into<String>|vec![value.into()])
1110    )]
1111    pub source_url: Option<Vec<String>>,
1112    ///Property: Summary
1113    #[serde(skip_serializing_if = "Option::is_none")]
1114    #[cfg_attr(
1115        feature = "builder",
1116        builder(with = |value:impl Into<String>|vec![value.into()])
1117    )]
1118    pub summary: Option<Vec<String>>,
1119    ///Property: Title
1120    #[serde(skip_serializing_if = "Option::is_none")]
1121    #[cfg_attr(
1122        feature = "builder",
1123        builder(with = |value:impl Into<String>|vec![value.into()])
1124    )]
1125    pub title: Option<Vec<String>>,
1126    ///Property: Topics
1127    #[serde(skip_serializing_if = "Option::is_none")]
1128    #[cfg_attr(
1129        feature = "builder",
1130        builder(with = |value:impl Into<String>|vec![value.into()])
1131    )]
1132    pub topics: Option<Vec<String>>,
1133    ///Property: The language of the translated text
1134    #[serde(skip_serializing_if = "Option::is_none")]
1135    #[cfg_attr(
1136        feature = "builder",
1137        builder(with = |value:impl Into<String>|vec![value.into()])
1138    )]
1139    pub translated_language: Option<Vec<String>>,
1140    ///Property: Translated version of the body text
1141    #[serde(skip_serializing_if = "Option::is_none")]
1142    #[cfg_attr(
1143        feature = "builder",
1144        builder(with = |value:impl Into<String>|vec![value.into()])
1145    )]
1146    pub translated_text: Option<Vec<String>>,
1147    ///Property: Weak alias
1148    #[serde(skip_serializing_if = "Option::is_none")]
1149    #[cfg_attr(
1150        feature = "builder",
1151        builder(with = |value:impl Into<String>|vec![value.into()])
1152    )]
1153    pub weak_alias: Option<Vec<String>>,
1154    ///Property: Wikidata ID
1155    #[serde(skip_serializing_if = "Option::is_none")]
1156    #[cfg_attr(
1157        feature = "builder",
1158        builder(with = |value:impl Into<String>|vec![value.into()])
1159    )]
1160    pub wikidata_id: Option<Vec<String>>,
1161    ///Property: Wikipedia Article
1162    #[serde(skip_serializing_if = "Option::is_none")]
1163    #[cfg_attr(
1164        feature = "builder",
1165        builder(with = |value:impl Into<String>|vec![value.into()])
1166    )]
1167    pub wikipedia_url: Option<Vec<String>>,
1168}
1169impl Article {
1170    /// Create a new entity with the given ID
1171    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
1172    pub fn new(id: impl Into<String>) -> Self {
1173        Self {
1174            id: id.into(),
1175            schema: "Article".to_string(),
1176            address: None,
1177            address_entity: None,
1178            aleph_url: None,
1179            alias: None,
1180            ancestors: None,
1181            author: None,
1182            authored_at: None,
1183            body_text: None,
1184            companies_mentioned: None,
1185            content_hash: None,
1186            country: None,
1187            crawler: None,
1188            created_at: None,
1189            date: None,
1190            description: None,
1191            detected_country: None,
1192            detected_language: None,
1193            email_mentioned: None,
1194            encoding: None,
1195            extension: None,
1196            file_name: Vec::new(),
1197            file_size: None,
1198            generator: None,
1199            iban_mentioned: None,
1200            index_text: None,
1201            ip_mentioned: None,
1202            keywords: None,
1203            language: None,
1204            location_mentioned: None,
1205            message_id: None,
1206            mime_type: None,
1207            modified_at: None,
1208            name: Vec::new(),
1209            names_mentioned: None,
1210            notes: None,
1211            parent: None,
1212            people_mentioned: None,
1213            phone_mentioned: None,
1214            previous_name: None,
1215            processed_at: None,
1216            processing_agent: None,
1217            processing_error: None,
1218            processing_status: None,
1219            program: None,
1220            program_id: None,
1221            proof: None,
1222            published_at: None,
1223            publisher: None,
1224            publisher_url: None,
1225            retrieved_at: None,
1226            source_url: None,
1227            summary: None,
1228            title: None,
1229            topics: None,
1230            translated_language: None,
1231            translated_text: None,
1232            weak_alias: None,
1233            wikidata_id: None,
1234            wikipedia_url: None,
1235        }
1236    }
1237    /// Get the schema name
1238    pub fn schema_name() -> &'static str {
1239        "Article"
1240    }
1241    /// Serialize to standard FTM nested JSON format
1242    ///
1243    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
1244    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
1245        let mut value = serde_json::to_value(self)?;
1246        if let Some(obj) = value.as_object_mut() {
1247            let id = obj.remove("id");
1248            let schema = obj.remove("schema");
1249            let properties = serde_json::Value::Object(std::mem::take(obj));
1250            if let Some(id) = id {
1251                obj.insert("id".into(), id);
1252            }
1253            if let Some(schema) = schema {
1254                obj.insert("schema".into(), schema);
1255            }
1256            obj.insert("properties".into(), properties);
1257        }
1258        serde_json::to_string(&value)
1259    }
1260}
1261///FTM Schema: Asset
1262#[derive(Debug, Clone, Serialize, Deserialize)]
1263#[cfg_attr(feature = "builder", derive(Builder))]
1264#[serde(rename_all = "camelCase")]
1265pub struct Asset {
1266    pub id: String,
1267    #[cfg_attr(feature = "builder", builder(default = "Asset".to_string()))]
1268    pub schema: String,
1269    ///Property: Address
1270    #[serde(skip_serializing_if = "Option::is_none")]
1271    #[cfg_attr(
1272        feature = "builder",
1273        builder(with = |value:impl Into<String>|vec![value.into()])
1274    )]
1275    pub address: Option<Vec<String>>,
1276    ///Property: Address
1277    #[serde(skip_serializing_if = "Option::is_none")]
1278    #[cfg_attr(
1279        feature = "builder",
1280        builder(with = |value:impl Into<String>|vec![value.into()])
1281    )]
1282    pub address_entity: Option<Vec<String>>,
1283    ///Property: Aleph URL
1284    #[serde(skip_serializing_if = "Option::is_none")]
1285    #[cfg_attr(
1286        feature = "builder",
1287        builder(with = |value:impl Into<String>|vec![value.into()])
1288    )]
1289    pub aleph_url: Option<Vec<String>>,
1290    ///Property: Alias
1291    #[serde(skip_serializing_if = "Option::is_none")]
1292    #[cfg_attr(
1293        feature = "builder",
1294        builder(with = |value:impl Into<String>|vec![value.into()])
1295    )]
1296    pub alias: Option<Vec<String>>,
1297    ///Property: Amount
1298    #[serde(
1299        skip_serializing_if = "Option::is_none",
1300        deserialize_with = "deserialize_opt_f64_vec",
1301        default
1302    )]
1303    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
1304    pub amount: Option<Vec<f64>>,
1305    ///Property: Amount in EUR
1306    #[serde(
1307        skip_serializing_if = "Option::is_none",
1308        deserialize_with = "deserialize_opt_f64_vec",
1309        default
1310    )]
1311    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
1312    pub amount_eur: Option<Vec<f64>>,
1313    ///Property: Amount in USD
1314    #[serde(
1315        skip_serializing_if = "Option::is_none",
1316        deserialize_with = "deserialize_opt_f64_vec",
1317        default
1318    )]
1319    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
1320    pub amount_usd: Option<Vec<f64>>,
1321    ///Property: Country
1322    #[serde(skip_serializing_if = "Option::is_none")]
1323    #[cfg_attr(
1324        feature = "builder",
1325        builder(with = |value:impl Into<String>|vec![value.into()])
1326    )]
1327    pub country: Option<Vec<String>>,
1328    ///Property: Created at
1329    #[serde(skip_serializing_if = "Option::is_none")]
1330    #[cfg_attr(
1331        feature = "builder",
1332        builder(with = |value:impl Into<String>|vec![value.into()])
1333    )]
1334    pub created_at: Option<Vec<String>>,
1335    ///Property: Currency
1336    #[serde(skip_serializing_if = "Option::is_none")]
1337    #[cfg_attr(
1338        feature = "builder",
1339        builder(with = |value:impl Into<String>|vec![value.into()])
1340    )]
1341    pub currency: Option<Vec<String>>,
1342    ///Property: Description
1343    #[serde(skip_serializing_if = "Option::is_none")]
1344    #[cfg_attr(
1345        feature = "builder",
1346        builder(with = |value:impl Into<String>|vec![value.into()])
1347    )]
1348    pub description: Option<Vec<String>>,
1349    ///Property: Index text
1350    #[serde(skip_serializing_if = "Option::is_none")]
1351    #[cfg_attr(
1352        feature = "builder",
1353        builder(with = |value:impl Into<String>|vec![value.into()])
1354    )]
1355    pub index_text: Option<Vec<String>>,
1356    ///Property: Keywords
1357    #[serde(skip_serializing_if = "Option::is_none")]
1358    #[cfg_attr(
1359        feature = "builder",
1360        builder(with = |value:impl Into<String>|vec![value.into()])
1361    )]
1362    pub keywords: Option<Vec<String>>,
1363    ///Property: Modified on
1364    #[serde(skip_serializing_if = "Option::is_none")]
1365    #[cfg_attr(
1366        feature = "builder",
1367        builder(with = |value:impl Into<String>|vec![value.into()])
1368    )]
1369    pub modified_at: Option<Vec<String>>,
1370    ///Property: Name
1371    #[serde(default)]
1372    #[cfg_attr(
1373        feature = "builder",
1374        builder(with = |value:impl Into<String>|vec![value.into()])
1375    )]
1376    pub name: Vec<String>,
1377    ///Property: Notes
1378    #[serde(skip_serializing_if = "Option::is_none")]
1379    #[cfg_attr(
1380        feature = "builder",
1381        builder(with = |value:impl Into<String>|vec![value.into()])
1382    )]
1383    pub notes: Option<Vec<String>>,
1384    ///Property: Previous name
1385    #[serde(skip_serializing_if = "Option::is_none")]
1386    #[cfg_attr(
1387        feature = "builder",
1388        builder(with = |value:impl Into<String>|vec![value.into()])
1389    )]
1390    pub previous_name: Option<Vec<String>>,
1391    ///Property: Program
1392    #[serde(skip_serializing_if = "Option::is_none")]
1393    #[cfg_attr(
1394        feature = "builder",
1395        builder(with = |value:impl Into<String>|vec![value.into()])
1396    )]
1397    pub program: Option<Vec<String>>,
1398    ///Property: Program ID
1399    #[serde(skip_serializing_if = "Option::is_none")]
1400    #[cfg_attr(
1401        feature = "builder",
1402        builder(with = |value:impl Into<String>|vec![value.into()])
1403    )]
1404    pub program_id: Option<Vec<String>>,
1405    ///Property: Source document
1406    #[serde(skip_serializing_if = "Option::is_none")]
1407    #[cfg_attr(
1408        feature = "builder",
1409        builder(with = |value:impl Into<String>|vec![value.into()])
1410    )]
1411    pub proof: Option<Vec<String>>,
1412    ///Property: Publishing source
1413    #[serde(skip_serializing_if = "Option::is_none")]
1414    #[cfg_attr(
1415        feature = "builder",
1416        builder(with = |value:impl Into<String>|vec![value.into()])
1417    )]
1418    pub publisher: Option<Vec<String>>,
1419    ///Property: Publishing source URL
1420    #[serde(skip_serializing_if = "Option::is_none")]
1421    #[cfg_attr(
1422        feature = "builder",
1423        builder(with = |value:impl Into<String>|vec![value.into()])
1424    )]
1425    pub publisher_url: Option<Vec<String>>,
1426    ///Property: Retrieved on
1427    #[serde(skip_serializing_if = "Option::is_none")]
1428    #[cfg_attr(
1429        feature = "builder",
1430        builder(with = |value:impl Into<String>|vec![value.into()])
1431    )]
1432    pub retrieved_at: Option<Vec<String>>,
1433    ///Property: Source link
1434    #[serde(skip_serializing_if = "Option::is_none")]
1435    #[cfg_attr(
1436        feature = "builder",
1437        builder(with = |value:impl Into<String>|vec![value.into()])
1438    )]
1439    pub source_url: Option<Vec<String>>,
1440    ///Property: Summary
1441    #[serde(skip_serializing_if = "Option::is_none")]
1442    #[cfg_attr(
1443        feature = "builder",
1444        builder(with = |value:impl Into<String>|vec![value.into()])
1445    )]
1446    pub summary: Option<Vec<String>>,
1447    ///Property: Topics
1448    #[serde(skip_serializing_if = "Option::is_none")]
1449    #[cfg_attr(
1450        feature = "builder",
1451        builder(with = |value:impl Into<String>|vec![value.into()])
1452    )]
1453    pub topics: Option<Vec<String>>,
1454    ///Property: Weak alias
1455    #[serde(skip_serializing_if = "Option::is_none")]
1456    #[cfg_attr(
1457        feature = "builder",
1458        builder(with = |value:impl Into<String>|vec![value.into()])
1459    )]
1460    pub weak_alias: Option<Vec<String>>,
1461    ///Property: Wikidata ID
1462    #[serde(skip_serializing_if = "Option::is_none")]
1463    #[cfg_attr(
1464        feature = "builder",
1465        builder(with = |value:impl Into<String>|vec![value.into()])
1466    )]
1467    pub wikidata_id: Option<Vec<String>>,
1468    ///Property: Wikipedia Article
1469    #[serde(skip_serializing_if = "Option::is_none")]
1470    #[cfg_attr(
1471        feature = "builder",
1472        builder(with = |value:impl Into<String>|vec![value.into()])
1473    )]
1474    pub wikipedia_url: Option<Vec<String>>,
1475}
1476impl Asset {
1477    /// Create a new entity with the given ID
1478    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
1479    pub fn new(id: impl Into<String>) -> Self {
1480        Self {
1481            id: id.into(),
1482            schema: "Asset".to_string(),
1483            address: None,
1484            address_entity: None,
1485            aleph_url: None,
1486            alias: None,
1487            amount: None,
1488            amount_eur: None,
1489            amount_usd: None,
1490            country: None,
1491            created_at: None,
1492            currency: None,
1493            description: None,
1494            index_text: None,
1495            keywords: None,
1496            modified_at: None,
1497            name: Vec::new(),
1498            notes: None,
1499            previous_name: None,
1500            program: None,
1501            program_id: None,
1502            proof: None,
1503            publisher: None,
1504            publisher_url: None,
1505            retrieved_at: None,
1506            source_url: None,
1507            summary: None,
1508            topics: None,
1509            weak_alias: None,
1510            wikidata_id: None,
1511            wikipedia_url: None,
1512        }
1513    }
1514    /// Get the schema name
1515    pub fn schema_name() -> &'static str {
1516        "Asset"
1517    }
1518    /// Serialize to standard FTM nested JSON format
1519    ///
1520    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
1521    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
1522        let mut value = serde_json::to_value(self)?;
1523        if let Some(obj) = value.as_object_mut() {
1524            let id = obj.remove("id");
1525            let schema = obj.remove("schema");
1526            let properties = serde_json::Value::Object(std::mem::take(obj));
1527            if let Some(id) = id {
1528                obj.insert("id".into(), id);
1529            }
1530            if let Some(schema) = schema {
1531                obj.insert("schema".into(), schema);
1532            }
1533            obj.insert("properties".into(), properties);
1534        }
1535        serde_json::to_string(&value)
1536    }
1537}
1538///FTM Schema: Associate
1539#[derive(Debug, Clone, Serialize, Deserialize)]
1540#[cfg_attr(feature = "builder", derive(Builder))]
1541#[serde(rename_all = "camelCase")]
1542pub struct Associate {
1543    pub id: String,
1544    #[cfg_attr(feature = "builder", builder(default = "Associate".to_string()))]
1545    pub schema: String,
1546    ///Property: Aleph URL
1547    #[serde(skip_serializing_if = "Option::is_none")]
1548    #[cfg_attr(
1549        feature = "builder",
1550        builder(with = |value:impl Into<String>|vec![value.into()])
1551    )]
1552    pub aleph_url: Option<Vec<String>>,
1553    ///Property: Associate
1554    #[serde(default)]
1555    #[cfg_attr(
1556        feature = "builder",
1557        builder(with = |value:impl Into<String>|vec![value.into()])
1558    )]
1559    pub associate: Vec<String>,
1560    ///Property: Date
1561    #[serde(skip_serializing_if = "Option::is_none")]
1562    #[cfg_attr(
1563        feature = "builder",
1564        builder(with = |value:impl Into<String>|vec![value.into()])
1565    )]
1566    pub date: Option<Vec<String>>,
1567    ///Property: Description
1568    #[serde(skip_serializing_if = "Option::is_none")]
1569    #[cfg_attr(
1570        feature = "builder",
1571        builder(with = |value:impl Into<String>|vec![value.into()])
1572    )]
1573    pub description: Option<Vec<String>>,
1574    ///Property: End date
1575    #[serde(skip_serializing_if = "Option::is_none")]
1576    #[cfg_attr(
1577        feature = "builder",
1578        builder(with = |value:impl Into<String>|vec![value.into()])
1579    )]
1580    pub end_date: Option<Vec<String>>,
1581    ///Property: Index text
1582    #[serde(skip_serializing_if = "Option::is_none")]
1583    #[cfg_attr(
1584        feature = "builder",
1585        builder(with = |value:impl Into<String>|vec![value.into()])
1586    )]
1587    pub index_text: Option<Vec<String>>,
1588    ///Property: Modified on
1589    #[serde(skip_serializing_if = "Option::is_none")]
1590    #[cfg_attr(
1591        feature = "builder",
1592        builder(with = |value:impl Into<String>|vec![value.into()])
1593    )]
1594    pub modified_at: Option<Vec<String>>,
1595    ///Property: Detected names
1596    #[serde(skip_serializing_if = "Option::is_none")]
1597    #[cfg_attr(
1598        feature = "builder",
1599        builder(with = |value:impl Into<String>|vec![value.into()])
1600    )]
1601    pub names_mentioned: Option<Vec<String>>,
1602    ///Property: Person
1603    #[serde(default)]
1604    #[cfg_attr(
1605        feature = "builder",
1606        builder(with = |value:impl Into<String>|vec![value.into()])
1607    )]
1608    pub person: Vec<String>,
1609    ///Property: Source document
1610    #[serde(skip_serializing_if = "Option::is_none")]
1611    #[cfg_attr(
1612        feature = "builder",
1613        builder(with = |value:impl Into<String>|vec![value.into()])
1614    )]
1615    pub proof: Option<Vec<String>>,
1616    ///Property: Publishing source
1617    #[serde(skip_serializing_if = "Option::is_none")]
1618    #[cfg_attr(
1619        feature = "builder",
1620        builder(with = |value:impl Into<String>|vec![value.into()])
1621    )]
1622    pub publisher: Option<Vec<String>>,
1623    ///Property: Publishing source URL
1624    #[serde(skip_serializing_if = "Option::is_none")]
1625    #[cfg_attr(
1626        feature = "builder",
1627        builder(with = |value:impl Into<String>|vec![value.into()])
1628    )]
1629    pub publisher_url: Option<Vec<String>>,
1630    ///Property: Record ID
1631    #[serde(skip_serializing_if = "Option::is_none")]
1632    #[cfg_attr(
1633        feature = "builder",
1634        builder(with = |value:impl Into<String>|vec![value.into()])
1635    )]
1636    pub record_id: Option<Vec<String>>,
1637    ///Property: Relationship
1638    #[serde(skip_serializing_if = "Option::is_none")]
1639    #[cfg_attr(
1640        feature = "builder",
1641        builder(with = |value:impl Into<String>|vec![value.into()])
1642    )]
1643    pub relationship: Option<Vec<String>>,
1644    ///Property: Retrieved on
1645    #[serde(skip_serializing_if = "Option::is_none")]
1646    #[cfg_attr(
1647        feature = "builder",
1648        builder(with = |value:impl Into<String>|vec![value.into()])
1649    )]
1650    pub retrieved_at: Option<Vec<String>>,
1651    ///Property: Source link
1652    #[serde(skip_serializing_if = "Option::is_none")]
1653    #[cfg_attr(
1654        feature = "builder",
1655        builder(with = |value:impl Into<String>|vec![value.into()])
1656    )]
1657    pub source_url: Option<Vec<String>>,
1658    ///Property: Start date
1659    #[serde(skip_serializing_if = "Option::is_none")]
1660    #[cfg_attr(
1661        feature = "builder",
1662        builder(with = |value:impl Into<String>|vec![value.into()])
1663    )]
1664    pub start_date: Option<Vec<String>>,
1665    ///Property: Summary
1666    #[serde(skip_serializing_if = "Option::is_none")]
1667    #[cfg_attr(
1668        feature = "builder",
1669        builder(with = |value:impl Into<String>|vec![value.into()])
1670    )]
1671    pub summary: Option<Vec<String>>,
1672}
1673impl Associate {
1674    /// Create a new entity with the given ID
1675    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
1676    pub fn new(id: impl Into<String>) -> Self {
1677        Self {
1678            id: id.into(),
1679            schema: "Associate".to_string(),
1680            aleph_url: None,
1681            associate: Vec::new(),
1682            date: None,
1683            description: None,
1684            end_date: None,
1685            index_text: None,
1686            modified_at: None,
1687            names_mentioned: None,
1688            person: Vec::new(),
1689            proof: None,
1690            publisher: None,
1691            publisher_url: None,
1692            record_id: None,
1693            relationship: None,
1694            retrieved_at: None,
1695            source_url: None,
1696            start_date: None,
1697            summary: None,
1698        }
1699    }
1700    /// Get the schema name
1701    pub fn schema_name() -> &'static str {
1702        "Associate"
1703    }
1704    /// Serialize to standard FTM nested JSON format
1705    ///
1706    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
1707    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
1708        let mut value = serde_json::to_value(self)?;
1709        if let Some(obj) = value.as_object_mut() {
1710            let id = obj.remove("id");
1711            let schema = obj.remove("schema");
1712            let properties = serde_json::Value::Object(std::mem::take(obj));
1713            if let Some(id) = id {
1714                obj.insert("id".into(), id);
1715            }
1716            if let Some(schema) = schema {
1717                obj.insert("schema".into(), schema);
1718            }
1719            obj.insert("properties".into(), properties);
1720        }
1721        serde_json::to_string(&value)
1722    }
1723}
1724///FTM Schema: Audio
1725#[derive(Debug, Clone, Serialize, Deserialize)]
1726#[cfg_attr(feature = "builder", derive(Builder))]
1727#[serde(rename_all = "camelCase")]
1728pub struct Audio {
1729    pub id: String,
1730    #[cfg_attr(feature = "builder", builder(default = "Audio".to_string()))]
1731    pub schema: String,
1732    ///Property: Address
1733    #[serde(skip_serializing_if = "Option::is_none")]
1734    #[cfg_attr(
1735        feature = "builder",
1736        builder(with = |value:impl Into<String>|vec![value.into()])
1737    )]
1738    pub address: Option<Vec<String>>,
1739    ///Property: Address
1740    #[serde(skip_serializing_if = "Option::is_none")]
1741    #[cfg_attr(
1742        feature = "builder",
1743        builder(with = |value:impl Into<String>|vec![value.into()])
1744    )]
1745    pub address_entity: Option<Vec<String>>,
1746    ///Property: Aleph URL
1747    #[serde(skip_serializing_if = "Option::is_none")]
1748    #[cfg_attr(
1749        feature = "builder",
1750        builder(with = |value:impl Into<String>|vec![value.into()])
1751    )]
1752    pub aleph_url: Option<Vec<String>>,
1753    ///Property: Alias
1754    #[serde(skip_serializing_if = "Option::is_none")]
1755    #[cfg_attr(
1756        feature = "builder",
1757        builder(with = |value:impl Into<String>|vec![value.into()])
1758    )]
1759    pub alias: Option<Vec<String>>,
1760    ///Property: Ancestors
1761    #[serde(skip_serializing_if = "Option::is_none")]
1762    #[cfg_attr(
1763        feature = "builder",
1764        builder(with = |value:impl Into<String>|vec![value.into()])
1765    )]
1766    pub ancestors: Option<Vec<String>>,
1767    ///Property: Author
1768    #[serde(skip_serializing_if = "Option::is_none")]
1769    #[cfg_attr(
1770        feature = "builder",
1771        builder(with = |value:impl Into<String>|vec![value.into()])
1772    )]
1773    pub author: Option<Vec<String>>,
1774    ///Property: Authored on
1775    #[serde(skip_serializing_if = "Option::is_none")]
1776    #[cfg_attr(
1777        feature = "builder",
1778        builder(with = |value:impl Into<String>|vec![value.into()])
1779    )]
1780    pub authored_at: Option<Vec<String>>,
1781    ///Property: Text
1782    #[serde(skip_serializing_if = "Option::is_none")]
1783    #[cfg_attr(
1784        feature = "builder",
1785        builder(with = |value:impl Into<String>|vec![value.into()])
1786    )]
1787    pub body_text: Option<Vec<String>>,
1788    ///Property: Detected companies
1789    #[serde(skip_serializing_if = "Option::is_none")]
1790    #[cfg_attr(
1791        feature = "builder",
1792        builder(with = |value:impl Into<String>|vec![value.into()])
1793    )]
1794    pub companies_mentioned: Option<Vec<String>>,
1795    ///Property: Checksum
1796    #[serde(skip_serializing_if = "Option::is_none")]
1797    #[cfg_attr(
1798        feature = "builder",
1799        builder(with = |value:impl Into<String>|vec![value.into()])
1800    )]
1801    pub content_hash: Option<Vec<String>>,
1802    ///Property: Country
1803    #[serde(skip_serializing_if = "Option::is_none")]
1804    #[cfg_attr(
1805        feature = "builder",
1806        builder(with = |value:impl Into<String>|vec![value.into()])
1807    )]
1808    pub country: Option<Vec<String>>,
1809    ///Property: Crawler
1810    #[serde(skip_serializing_if = "Option::is_none")]
1811    #[cfg_attr(
1812        feature = "builder",
1813        builder(with = |value:impl Into<String>|vec![value.into()])
1814    )]
1815    pub crawler: Option<Vec<String>>,
1816    ///Property: Created at
1817    #[serde(skip_serializing_if = "Option::is_none")]
1818    #[cfg_attr(
1819        feature = "builder",
1820        builder(with = |value:impl Into<String>|vec![value.into()])
1821    )]
1822    pub created_at: Option<Vec<String>>,
1823    ///Property: Date
1824    #[serde(skip_serializing_if = "Option::is_none")]
1825    #[cfg_attr(
1826        feature = "builder",
1827        builder(with = |value:impl Into<String>|vec![value.into()])
1828    )]
1829    pub date: Option<Vec<String>>,
1830    ///Property: Description
1831    #[serde(skip_serializing_if = "Option::is_none")]
1832    #[cfg_attr(
1833        feature = "builder",
1834        builder(with = |value:impl Into<String>|vec![value.into()])
1835    )]
1836    pub description: Option<Vec<String>>,
1837    ///Property: Detected country
1838    #[serde(skip_serializing_if = "Option::is_none")]
1839    #[cfg_attr(
1840        feature = "builder",
1841        builder(with = |value:impl Into<String>|vec![value.into()])
1842    )]
1843    pub detected_country: Option<Vec<String>>,
1844    ///Property: Detected language
1845    #[serde(skip_serializing_if = "Option::is_none")]
1846    #[cfg_attr(
1847        feature = "builder",
1848        builder(with = |value:impl Into<String>|vec![value.into()])
1849    )]
1850    pub detected_language: Option<Vec<String>>,
1851    ///Property: Duration
1852    #[serde(
1853        skip_serializing_if = "Option::is_none",
1854        deserialize_with = "deserialize_opt_f64_vec",
1855        default
1856    )]
1857    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
1858    pub duration: Option<Vec<f64>>,
1859    ///Property: Detected e-mail addresses
1860    #[serde(skip_serializing_if = "Option::is_none")]
1861    #[cfg_attr(
1862        feature = "builder",
1863        builder(with = |value:impl Into<String>|vec![value.into()])
1864    )]
1865    pub email_mentioned: Option<Vec<String>>,
1866    ///Property: File encoding
1867    #[serde(skip_serializing_if = "Option::is_none")]
1868    #[cfg_attr(
1869        feature = "builder",
1870        builder(with = |value:impl Into<String>|vec![value.into()])
1871    )]
1872    pub encoding: Option<Vec<String>>,
1873    ///Property: File extension
1874    #[serde(skip_serializing_if = "Option::is_none")]
1875    #[cfg_attr(
1876        feature = "builder",
1877        builder(with = |value:impl Into<String>|vec![value.into()])
1878    )]
1879    pub extension: Option<Vec<String>>,
1880    ///Property: File name
1881    #[serde(default)]
1882    #[cfg_attr(
1883        feature = "builder",
1884        builder(with = |value:impl Into<String>|vec![value.into()])
1885    )]
1886    pub file_name: Vec<String>,
1887    ///Property: File size
1888    #[serde(
1889        skip_serializing_if = "Option::is_none",
1890        deserialize_with = "deserialize_opt_f64_vec",
1891        default
1892    )]
1893    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
1894    pub file_size: Option<Vec<f64>>,
1895    ///Property: Generator
1896    #[serde(skip_serializing_if = "Option::is_none")]
1897    #[cfg_attr(
1898        feature = "builder",
1899        builder(with = |value:impl Into<String>|vec![value.into()])
1900    )]
1901    pub generator: Option<Vec<String>>,
1902    ///Property: Detected IBANs
1903    #[serde(skip_serializing_if = "Option::is_none")]
1904    #[cfg_attr(
1905        feature = "builder",
1906        builder(with = |value:impl Into<String>|vec![value.into()])
1907    )]
1908    pub iban_mentioned: Option<Vec<String>>,
1909    ///Property: Index text
1910    #[serde(skip_serializing_if = "Option::is_none")]
1911    #[cfg_attr(
1912        feature = "builder",
1913        builder(with = |value:impl Into<String>|vec![value.into()])
1914    )]
1915    pub index_text: Option<Vec<String>>,
1916    ///Property: Detected IP addresses
1917    #[serde(skip_serializing_if = "Option::is_none")]
1918    #[cfg_attr(
1919        feature = "builder",
1920        builder(with = |value:impl Into<String>|vec![value.into()])
1921    )]
1922    pub ip_mentioned: Option<Vec<String>>,
1923    ///Property: Keywords
1924    #[serde(skip_serializing_if = "Option::is_none")]
1925    #[cfg_attr(
1926        feature = "builder",
1927        builder(with = |value:impl Into<String>|vec![value.into()])
1928    )]
1929    pub keywords: Option<Vec<String>>,
1930    ///Property: Language
1931    #[serde(skip_serializing_if = "Option::is_none")]
1932    #[cfg_attr(
1933        feature = "builder",
1934        builder(with = |value:impl Into<String>|vec![value.into()])
1935    )]
1936    pub language: Option<Vec<String>>,
1937    ///Property: Detected locations
1938    #[serde(skip_serializing_if = "Option::is_none")]
1939    #[cfg_attr(
1940        feature = "builder",
1941        builder(with = |value:impl Into<String>|vec![value.into()])
1942    )]
1943    pub location_mentioned: Option<Vec<String>>,
1944    ///Property: Message ID
1945    #[serde(skip_serializing_if = "Option::is_none")]
1946    #[cfg_attr(
1947        feature = "builder",
1948        builder(with = |value:impl Into<String>|vec![value.into()])
1949    )]
1950    pub message_id: Option<Vec<String>>,
1951    ///Property: MIME type
1952    #[serde(skip_serializing_if = "Option::is_none")]
1953    #[cfg_attr(
1954        feature = "builder",
1955        builder(with = |value:impl Into<String>|vec![value.into()])
1956    )]
1957    pub mime_type: Option<Vec<String>>,
1958    ///Property: Modified on
1959    #[serde(skip_serializing_if = "Option::is_none")]
1960    #[cfg_attr(
1961        feature = "builder",
1962        builder(with = |value:impl Into<String>|vec![value.into()])
1963    )]
1964    pub modified_at: Option<Vec<String>>,
1965    ///Property: Name
1966    #[serde(default)]
1967    #[cfg_attr(
1968        feature = "builder",
1969        builder(with = |value:impl Into<String>|vec![value.into()])
1970    )]
1971    pub name: Vec<String>,
1972    ///Property: Detected names
1973    #[serde(skip_serializing_if = "Option::is_none")]
1974    #[cfg_attr(
1975        feature = "builder",
1976        builder(with = |value:impl Into<String>|vec![value.into()])
1977    )]
1978    pub names_mentioned: Option<Vec<String>>,
1979    ///Property: Notes
1980    #[serde(skip_serializing_if = "Option::is_none")]
1981    #[cfg_attr(
1982        feature = "builder",
1983        builder(with = |value:impl Into<String>|vec![value.into()])
1984    )]
1985    pub notes: Option<Vec<String>>,
1986    ///Property: Folder
1987    #[serde(skip_serializing_if = "Option::is_none")]
1988    #[cfg_attr(
1989        feature = "builder",
1990        builder(with = |value:impl Into<String>|vec![value.into()])
1991    )]
1992    pub parent: Option<Vec<String>>,
1993    ///Property: Detected people
1994    #[serde(skip_serializing_if = "Option::is_none")]
1995    #[cfg_attr(
1996        feature = "builder",
1997        builder(with = |value:impl Into<String>|vec![value.into()])
1998    )]
1999    pub people_mentioned: Option<Vec<String>>,
2000    ///Property: Detected phones
2001    #[serde(skip_serializing_if = "Option::is_none")]
2002    #[cfg_attr(
2003        feature = "builder",
2004        builder(with = |value:impl Into<String>|vec![value.into()])
2005    )]
2006    pub phone_mentioned: Option<Vec<String>>,
2007    ///Property: Previous name
2008    #[serde(skip_serializing_if = "Option::is_none")]
2009    #[cfg_attr(
2010        feature = "builder",
2011        builder(with = |value:impl Into<String>|vec![value.into()])
2012    )]
2013    pub previous_name: Option<Vec<String>>,
2014    ///Property: Processed at
2015    #[serde(skip_serializing_if = "Option::is_none")]
2016    #[cfg_attr(
2017        feature = "builder",
2018        builder(with = |value:impl Into<String>|vec![value.into()])
2019    )]
2020    pub processed_at: Option<Vec<String>>,
2021    ///Property: Processing agent
2022    #[serde(skip_serializing_if = "Option::is_none")]
2023    #[cfg_attr(
2024        feature = "builder",
2025        builder(with = |value:impl Into<String>|vec![value.into()])
2026    )]
2027    pub processing_agent: Option<Vec<String>>,
2028    ///Property: Processing error
2029    #[serde(skip_serializing_if = "Option::is_none")]
2030    #[cfg_attr(
2031        feature = "builder",
2032        builder(with = |value:impl Into<String>|vec![value.into()])
2033    )]
2034    pub processing_error: Option<Vec<String>>,
2035    ///Property: Processing status
2036    #[serde(skip_serializing_if = "Option::is_none")]
2037    #[cfg_attr(
2038        feature = "builder",
2039        builder(with = |value:impl Into<String>|vec![value.into()])
2040    )]
2041    pub processing_status: Option<Vec<String>>,
2042    ///Property: Program
2043    #[serde(skip_serializing_if = "Option::is_none")]
2044    #[cfg_attr(
2045        feature = "builder",
2046        builder(with = |value:impl Into<String>|vec![value.into()])
2047    )]
2048    pub program: Option<Vec<String>>,
2049    ///Property: Program ID
2050    #[serde(skip_serializing_if = "Option::is_none")]
2051    #[cfg_attr(
2052        feature = "builder",
2053        builder(with = |value:impl Into<String>|vec![value.into()])
2054    )]
2055    pub program_id: Option<Vec<String>>,
2056    ///Property: Source document
2057    #[serde(skip_serializing_if = "Option::is_none")]
2058    #[cfg_attr(
2059        feature = "builder",
2060        builder(with = |value:impl Into<String>|vec![value.into()])
2061    )]
2062    pub proof: Option<Vec<String>>,
2063    ///Property: Published on
2064    #[serde(skip_serializing_if = "Option::is_none")]
2065    #[cfg_attr(
2066        feature = "builder",
2067        builder(with = |value:impl Into<String>|vec![value.into()])
2068    )]
2069    pub published_at: Option<Vec<String>>,
2070    ///Property: Publishing source
2071    #[serde(skip_serializing_if = "Option::is_none")]
2072    #[cfg_attr(
2073        feature = "builder",
2074        builder(with = |value:impl Into<String>|vec![value.into()])
2075    )]
2076    pub publisher: Option<Vec<String>>,
2077    ///Property: Publishing source URL
2078    #[serde(skip_serializing_if = "Option::is_none")]
2079    #[cfg_attr(
2080        feature = "builder",
2081        builder(with = |value:impl Into<String>|vec![value.into()])
2082    )]
2083    pub publisher_url: Option<Vec<String>>,
2084    ///Property: Retrieved on
2085    #[serde(skip_serializing_if = "Option::is_none")]
2086    #[cfg_attr(
2087        feature = "builder",
2088        builder(with = |value:impl Into<String>|vec![value.into()])
2089    )]
2090    pub retrieved_at: Option<Vec<String>>,
2091    ///Property: Sampling Rate
2092    #[serde(
2093        skip_serializing_if = "Option::is_none",
2094        deserialize_with = "deserialize_opt_f64_vec",
2095        default
2096    )]
2097    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
2098    pub sampling_rate: Option<Vec<f64>>,
2099    ///Property: Source link
2100    #[serde(skip_serializing_if = "Option::is_none")]
2101    #[cfg_attr(
2102        feature = "builder",
2103        builder(with = |value:impl Into<String>|vec![value.into()])
2104    )]
2105    pub source_url: Option<Vec<String>>,
2106    ///Property: Summary
2107    #[serde(skip_serializing_if = "Option::is_none")]
2108    #[cfg_attr(
2109        feature = "builder",
2110        builder(with = |value:impl Into<String>|vec![value.into()])
2111    )]
2112    pub summary: Option<Vec<String>>,
2113    ///Property: Title
2114    #[serde(skip_serializing_if = "Option::is_none")]
2115    #[cfg_attr(
2116        feature = "builder",
2117        builder(with = |value:impl Into<String>|vec![value.into()])
2118    )]
2119    pub title: Option<Vec<String>>,
2120    ///Property: Topics
2121    #[serde(skip_serializing_if = "Option::is_none")]
2122    #[cfg_attr(
2123        feature = "builder",
2124        builder(with = |value:impl Into<String>|vec![value.into()])
2125    )]
2126    pub topics: Option<Vec<String>>,
2127    ///Property: The language of the translated text
2128    #[serde(skip_serializing_if = "Option::is_none")]
2129    #[cfg_attr(
2130        feature = "builder",
2131        builder(with = |value:impl Into<String>|vec![value.into()])
2132    )]
2133    pub translated_language: Option<Vec<String>>,
2134    ///Property: Translated version of the body text
2135    #[serde(skip_serializing_if = "Option::is_none")]
2136    #[cfg_attr(
2137        feature = "builder",
2138        builder(with = |value:impl Into<String>|vec![value.into()])
2139    )]
2140    pub translated_text: Option<Vec<String>>,
2141    ///Property: Weak alias
2142    #[serde(skip_serializing_if = "Option::is_none")]
2143    #[cfg_attr(
2144        feature = "builder",
2145        builder(with = |value:impl Into<String>|vec![value.into()])
2146    )]
2147    pub weak_alias: Option<Vec<String>>,
2148    ///Property: Wikidata ID
2149    #[serde(skip_serializing_if = "Option::is_none")]
2150    #[cfg_attr(
2151        feature = "builder",
2152        builder(with = |value:impl Into<String>|vec![value.into()])
2153    )]
2154    pub wikidata_id: Option<Vec<String>>,
2155    ///Property: Wikipedia Article
2156    #[serde(skip_serializing_if = "Option::is_none")]
2157    #[cfg_attr(
2158        feature = "builder",
2159        builder(with = |value:impl Into<String>|vec![value.into()])
2160    )]
2161    pub wikipedia_url: Option<Vec<String>>,
2162}
2163impl Audio {
2164    /// Create a new entity with the given ID
2165    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
2166    pub fn new(id: impl Into<String>) -> Self {
2167        Self {
2168            id: id.into(),
2169            schema: "Audio".to_string(),
2170            address: None,
2171            address_entity: None,
2172            aleph_url: None,
2173            alias: None,
2174            ancestors: None,
2175            author: None,
2176            authored_at: None,
2177            body_text: None,
2178            companies_mentioned: None,
2179            content_hash: None,
2180            country: None,
2181            crawler: None,
2182            created_at: None,
2183            date: None,
2184            description: None,
2185            detected_country: None,
2186            detected_language: None,
2187            duration: None,
2188            email_mentioned: None,
2189            encoding: None,
2190            extension: None,
2191            file_name: Vec::new(),
2192            file_size: None,
2193            generator: None,
2194            iban_mentioned: None,
2195            index_text: None,
2196            ip_mentioned: None,
2197            keywords: None,
2198            language: None,
2199            location_mentioned: None,
2200            message_id: None,
2201            mime_type: None,
2202            modified_at: None,
2203            name: Vec::new(),
2204            names_mentioned: None,
2205            notes: None,
2206            parent: None,
2207            people_mentioned: None,
2208            phone_mentioned: None,
2209            previous_name: None,
2210            processed_at: None,
2211            processing_agent: None,
2212            processing_error: None,
2213            processing_status: None,
2214            program: None,
2215            program_id: None,
2216            proof: None,
2217            published_at: None,
2218            publisher: None,
2219            publisher_url: None,
2220            retrieved_at: None,
2221            sampling_rate: None,
2222            source_url: None,
2223            summary: None,
2224            title: None,
2225            topics: None,
2226            translated_language: None,
2227            translated_text: None,
2228            weak_alias: None,
2229            wikidata_id: None,
2230            wikipedia_url: None,
2231        }
2232    }
2233    /// Get the schema name
2234    pub fn schema_name() -> &'static str {
2235        "Audio"
2236    }
2237    /// Serialize to standard FTM nested JSON format
2238    ///
2239    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
2240    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
2241        let mut value = serde_json::to_value(self)?;
2242        if let Some(obj) = value.as_object_mut() {
2243            let id = obj.remove("id");
2244            let schema = obj.remove("schema");
2245            let properties = serde_json::Value::Object(std::mem::take(obj));
2246            if let Some(id) = id {
2247                obj.insert("id".into(), id);
2248            }
2249            if let Some(schema) = schema {
2250                obj.insert("schema".into(), schema);
2251            }
2252            obj.insert("properties".into(), properties);
2253        }
2254        serde_json::to_string(&value)
2255    }
2256}
2257///FTM Schema: Bank account
2258#[derive(Debug, Clone, Serialize, Deserialize)]
2259#[cfg_attr(feature = "builder", derive(Builder))]
2260#[serde(rename_all = "camelCase")]
2261pub struct BankAccount {
2262    pub id: String,
2263    #[cfg_attr(feature = "builder", builder(default = "BankAccount".to_string()))]
2264    pub schema: String,
2265    ///Property: Account number
2266    #[serde(skip_serializing_if = "Option::is_none")]
2267    #[cfg_attr(
2268        feature = "builder",
2269        builder(with = |value:impl Into<String>|vec![value.into()])
2270    )]
2271    pub account_number: Option<Vec<String>>,
2272    ///Property: Account type
2273    #[serde(skip_serializing_if = "Option::is_none")]
2274    #[cfg_attr(
2275        feature = "builder",
2276        builder(with = |value:impl Into<String>|vec![value.into()])
2277    )]
2278    pub account_type: Option<Vec<String>>,
2279    ///Property: Address
2280    #[serde(skip_serializing_if = "Option::is_none")]
2281    #[cfg_attr(
2282        feature = "builder",
2283        builder(with = |value:impl Into<String>|vec![value.into()])
2284    )]
2285    pub address: Option<Vec<String>>,
2286    ///Property: Address
2287    #[serde(skip_serializing_if = "Option::is_none")]
2288    #[cfg_attr(
2289        feature = "builder",
2290        builder(with = |value:impl Into<String>|vec![value.into()])
2291    )]
2292    pub address_entity: Option<Vec<String>>,
2293    ///Property: Aleph URL
2294    #[serde(skip_serializing_if = "Option::is_none")]
2295    #[cfg_attr(
2296        feature = "builder",
2297        builder(with = |value:impl Into<String>|vec![value.into()])
2298    )]
2299    pub aleph_url: Option<Vec<String>>,
2300    ///Property: Alias
2301    #[serde(skip_serializing_if = "Option::is_none")]
2302    #[cfg_attr(
2303        feature = "builder",
2304        builder(with = |value:impl Into<String>|vec![value.into()])
2305    )]
2306    pub alias: Option<Vec<String>>,
2307    ///Property: Amount
2308    #[serde(
2309        skip_serializing_if = "Option::is_none",
2310        deserialize_with = "deserialize_opt_f64_vec",
2311        default
2312    )]
2313    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
2314    pub amount: Option<Vec<f64>>,
2315    ///Property: Amount in EUR
2316    #[serde(
2317        skip_serializing_if = "Option::is_none",
2318        deserialize_with = "deserialize_opt_f64_vec",
2319        default
2320    )]
2321    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
2322    pub amount_eur: Option<Vec<f64>>,
2323    ///Property: Amount in USD
2324    #[serde(
2325        skip_serializing_if = "Option::is_none",
2326        deserialize_with = "deserialize_opt_f64_vec",
2327        default
2328    )]
2329    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
2330    pub amount_usd: Option<Vec<f64>>,
2331    ///Property: Balance
2332    #[serde(
2333        skip_serializing_if = "Option::is_none",
2334        deserialize_with = "deserialize_opt_f64_vec",
2335        default
2336    )]
2337    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
2338    pub balance: Option<Vec<f64>>,
2339    ///Property: Balance date
2340    #[serde(skip_serializing_if = "Option::is_none")]
2341    #[cfg_attr(
2342        feature = "builder",
2343        builder(with = |value:impl Into<String>|vec![value.into()])
2344    )]
2345    pub balance_date: Option<Vec<String>>,
2346    ///Property: Bank
2347    #[serde(skip_serializing_if = "Option::is_none")]
2348    #[cfg_attr(
2349        feature = "builder",
2350        builder(with = |value:impl Into<String>|vec![value.into()])
2351    )]
2352    pub bank: Option<Vec<String>>,
2353    ///Property: Bank address
2354    #[serde(skip_serializing_if = "Option::is_none")]
2355    #[cfg_attr(
2356        feature = "builder",
2357        builder(with = |value:impl Into<String>|vec![value.into()])
2358    )]
2359    pub bank_address: Option<Vec<String>>,
2360    ///Property: Bank name
2361    #[serde(skip_serializing_if = "Option::is_none")]
2362    #[cfg_attr(
2363        feature = "builder",
2364        builder(with = |value:impl Into<String>|vec![value.into()])
2365    )]
2366    pub bank_name: Option<Vec<String>>,
2367    ///Property: Bank Identifier Code
2368    #[serde(skip_serializing_if = "Option::is_none")]
2369    #[cfg_attr(
2370        feature = "builder",
2371        builder(with = |value:impl Into<String>|vec![value.into()])
2372    )]
2373    pub bic: Option<Vec<String>>,
2374    ///Property: Closing date
2375    #[serde(skip_serializing_if = "Option::is_none")]
2376    #[cfg_attr(
2377        feature = "builder",
2378        builder(with = |value:impl Into<String>|vec![value.into()])
2379    )]
2380    pub closing_date: Option<Vec<String>>,
2381    ///Property: Country
2382    #[serde(skip_serializing_if = "Option::is_none")]
2383    #[cfg_attr(
2384        feature = "builder",
2385        builder(with = |value:impl Into<String>|vec![value.into()])
2386    )]
2387    pub country: Option<Vec<String>>,
2388    ///Property: Created at
2389    #[serde(skip_serializing_if = "Option::is_none")]
2390    #[cfg_attr(
2391        feature = "builder",
2392        builder(with = |value:impl Into<String>|vec![value.into()])
2393    )]
2394    pub created_at: Option<Vec<String>>,
2395    ///Property: Currency
2396    #[serde(skip_serializing_if = "Option::is_none")]
2397    #[cfg_attr(
2398        feature = "builder",
2399        builder(with = |value:impl Into<String>|vec![value.into()])
2400    )]
2401    pub currency: Option<Vec<String>>,
2402    ///Property: Description
2403    #[serde(skip_serializing_if = "Option::is_none")]
2404    #[cfg_attr(
2405        feature = "builder",
2406        builder(with = |value:impl Into<String>|vec![value.into()])
2407    )]
2408    pub description: Option<Vec<String>>,
2409    ///Property: IBAN
2410    #[serde(skip_serializing_if = "Option::is_none")]
2411    #[cfg_attr(
2412        feature = "builder",
2413        builder(with = |value:impl Into<String>|vec![value.into()])
2414    )]
2415    pub iban: Option<Vec<String>>,
2416    ///Property: Index text
2417    #[serde(skip_serializing_if = "Option::is_none")]
2418    #[cfg_attr(
2419        feature = "builder",
2420        builder(with = |value:impl Into<String>|vec![value.into()])
2421    )]
2422    pub index_text: Option<Vec<String>>,
2423    ///Property: Keywords
2424    #[serde(skip_serializing_if = "Option::is_none")]
2425    #[cfg_attr(
2426        feature = "builder",
2427        builder(with = |value:impl Into<String>|vec![value.into()])
2428    )]
2429    pub keywords: Option<Vec<String>>,
2430    ///Property: Maximum balance
2431    #[serde(
2432        skip_serializing_if = "Option::is_none",
2433        deserialize_with = "deserialize_opt_f64_vec",
2434        default
2435    )]
2436    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
2437    pub max_balance: Option<Vec<f64>>,
2438    ///Property: Maximum balance date
2439    #[serde(skip_serializing_if = "Option::is_none")]
2440    #[cfg_attr(
2441        feature = "builder",
2442        builder(with = |value:impl Into<String>|vec![value.into()])
2443    )]
2444    pub max_balance_date: Option<Vec<String>>,
2445    ///Property: Modified on
2446    #[serde(skip_serializing_if = "Option::is_none")]
2447    #[cfg_attr(
2448        feature = "builder",
2449        builder(with = |value:impl Into<String>|vec![value.into()])
2450    )]
2451    pub modified_at: Option<Vec<String>>,
2452    ///Property: Name
2453    #[serde(default)]
2454    #[cfg_attr(
2455        feature = "builder",
2456        builder(with = |value:impl Into<String>|vec![value.into()])
2457    )]
2458    pub name: Vec<String>,
2459    ///Property: Notes
2460    #[serde(skip_serializing_if = "Option::is_none")]
2461    #[cfg_attr(
2462        feature = "builder",
2463        builder(with = |value:impl Into<String>|vec![value.into()])
2464    )]
2465    pub notes: Option<Vec<String>>,
2466    ///Property: Opening date
2467    #[serde(skip_serializing_if = "Option::is_none")]
2468    #[cfg_attr(
2469        feature = "builder",
2470        builder(with = |value:impl Into<String>|vec![value.into()])
2471    )]
2472    pub opening_date: Option<Vec<String>>,
2473    ///Property: Previous name
2474    #[serde(skip_serializing_if = "Option::is_none")]
2475    #[cfg_attr(
2476        feature = "builder",
2477        builder(with = |value:impl Into<String>|vec![value.into()])
2478    )]
2479    pub previous_name: Option<Vec<String>>,
2480    ///Property: Program
2481    #[serde(skip_serializing_if = "Option::is_none")]
2482    #[cfg_attr(
2483        feature = "builder",
2484        builder(with = |value:impl Into<String>|vec![value.into()])
2485    )]
2486    pub program: Option<Vec<String>>,
2487    ///Property: Program ID
2488    #[serde(skip_serializing_if = "Option::is_none")]
2489    #[cfg_attr(
2490        feature = "builder",
2491        builder(with = |value:impl Into<String>|vec![value.into()])
2492    )]
2493    pub program_id: Option<Vec<String>>,
2494    ///Property: Source document
2495    #[serde(skip_serializing_if = "Option::is_none")]
2496    #[cfg_attr(
2497        feature = "builder",
2498        builder(with = |value:impl Into<String>|vec![value.into()])
2499    )]
2500    pub proof: Option<Vec<String>>,
2501    ///Property: Publishing source
2502    #[serde(skip_serializing_if = "Option::is_none")]
2503    #[cfg_attr(
2504        feature = "builder",
2505        builder(with = |value:impl Into<String>|vec![value.into()])
2506    )]
2507    pub publisher: Option<Vec<String>>,
2508    ///Property: Publishing source URL
2509    #[serde(skip_serializing_if = "Option::is_none")]
2510    #[cfg_attr(
2511        feature = "builder",
2512        builder(with = |value:impl Into<String>|vec![value.into()])
2513    )]
2514    pub publisher_url: Option<Vec<String>>,
2515    ///Property: Retrieved on
2516    #[serde(skip_serializing_if = "Option::is_none")]
2517    #[cfg_attr(
2518        feature = "builder",
2519        builder(with = |value:impl Into<String>|vec![value.into()])
2520    )]
2521    pub retrieved_at: Option<Vec<String>>,
2522    ///Property: Source link
2523    #[serde(skip_serializing_if = "Option::is_none")]
2524    #[cfg_attr(
2525        feature = "builder",
2526        builder(with = |value:impl Into<String>|vec![value.into()])
2527    )]
2528    pub source_url: Option<Vec<String>>,
2529    ///Property: Summary
2530    #[serde(skip_serializing_if = "Option::is_none")]
2531    #[cfg_attr(
2532        feature = "builder",
2533        builder(with = |value:impl Into<String>|vec![value.into()])
2534    )]
2535    pub summary: Option<Vec<String>>,
2536    ///Property: Topics
2537    #[serde(skip_serializing_if = "Option::is_none")]
2538    #[cfg_attr(
2539        feature = "builder",
2540        builder(with = |value:impl Into<String>|vec![value.into()])
2541    )]
2542    pub topics: Option<Vec<String>>,
2543    ///Property: Weak alias
2544    #[serde(skip_serializing_if = "Option::is_none")]
2545    #[cfg_attr(
2546        feature = "builder",
2547        builder(with = |value:impl Into<String>|vec![value.into()])
2548    )]
2549    pub weak_alias: Option<Vec<String>>,
2550    ///Property: Wikidata ID
2551    #[serde(skip_serializing_if = "Option::is_none")]
2552    #[cfg_attr(
2553        feature = "builder",
2554        builder(with = |value:impl Into<String>|vec![value.into()])
2555    )]
2556    pub wikidata_id: Option<Vec<String>>,
2557    ///Property: Wikipedia Article
2558    #[serde(skip_serializing_if = "Option::is_none")]
2559    #[cfg_attr(
2560        feature = "builder",
2561        builder(with = |value:impl Into<String>|vec![value.into()])
2562    )]
2563    pub wikipedia_url: Option<Vec<String>>,
2564}
2565impl BankAccount {
2566    /// Create a new entity with the given ID
2567    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
2568    pub fn new(id: impl Into<String>) -> Self {
2569        Self {
2570            id: id.into(),
2571            schema: "BankAccount".to_string(),
2572            account_number: None,
2573            account_type: None,
2574            address: None,
2575            address_entity: None,
2576            aleph_url: None,
2577            alias: None,
2578            amount: None,
2579            amount_eur: None,
2580            amount_usd: None,
2581            balance: None,
2582            balance_date: None,
2583            bank: None,
2584            bank_address: None,
2585            bank_name: None,
2586            bic: None,
2587            closing_date: None,
2588            country: None,
2589            created_at: None,
2590            currency: None,
2591            description: None,
2592            iban: None,
2593            index_text: None,
2594            keywords: None,
2595            max_balance: None,
2596            max_balance_date: None,
2597            modified_at: None,
2598            name: Vec::new(),
2599            notes: None,
2600            opening_date: None,
2601            previous_name: None,
2602            program: None,
2603            program_id: None,
2604            proof: None,
2605            publisher: None,
2606            publisher_url: None,
2607            retrieved_at: None,
2608            source_url: None,
2609            summary: None,
2610            topics: None,
2611            weak_alias: None,
2612            wikidata_id: None,
2613            wikipedia_url: None,
2614        }
2615    }
2616    /// Get the schema name
2617    pub fn schema_name() -> &'static str {
2618        "BankAccount"
2619    }
2620    /// Serialize to standard FTM nested JSON format
2621    ///
2622    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
2623    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
2624        let mut value = serde_json::to_value(self)?;
2625        if let Some(obj) = value.as_object_mut() {
2626            let id = obj.remove("id");
2627            let schema = obj.remove("schema");
2628            let properties = serde_json::Value::Object(std::mem::take(obj));
2629            if let Some(id) = id {
2630                obj.insert("id".into(), id);
2631            }
2632            if let Some(schema) = schema {
2633                obj.insert("schema".into(), schema);
2634            }
2635            obj.insert("properties".into(), properties);
2636        }
2637        serde_json::to_string(&value)
2638    }
2639}
2640///FTM Schema: Call
2641#[derive(Debug, Clone, Serialize, Deserialize)]
2642#[cfg_attr(feature = "builder", derive(Builder))]
2643#[serde(rename_all = "camelCase")]
2644pub struct Call {
2645    pub id: String,
2646    #[cfg_attr(feature = "builder", builder(default = "Call".to_string()))]
2647    pub schema: String,
2648    ///Property: Aleph URL
2649    #[serde(skip_serializing_if = "Option::is_none")]
2650    #[cfg_attr(
2651        feature = "builder",
2652        builder(with = |value:impl Into<String>|vec![value.into()])
2653    )]
2654    pub aleph_url: Option<Vec<String>>,
2655    ///Property: Caller
2656    #[serde(skip_serializing_if = "Option::is_none")]
2657    #[cfg_attr(
2658        feature = "builder",
2659        builder(with = |value:impl Into<String>|vec![value.into()])
2660    )]
2661    pub caller: Option<Vec<String>>,
2662    ///Property: Caller's Number
2663    #[serde(skip_serializing_if = "Option::is_none")]
2664    #[cfg_attr(
2665        feature = "builder",
2666        builder(with = |value:impl Into<String>|vec![value.into()])
2667    )]
2668    pub caller_number: Option<Vec<String>>,
2669    ///Property: Date
2670    #[serde(skip_serializing_if = "Option::is_none")]
2671    #[cfg_attr(
2672        feature = "builder",
2673        builder(with = |value:impl Into<String>|vec![value.into()])
2674    )]
2675    pub date: Option<Vec<String>>,
2676    ///Property: Description
2677    #[serde(skip_serializing_if = "Option::is_none")]
2678    #[cfg_attr(
2679        feature = "builder",
2680        builder(with = |value:impl Into<String>|vec![value.into()])
2681    )]
2682    pub description: Option<Vec<String>>,
2683    ///Property: Duration
2684    #[serde(
2685        skip_serializing_if = "Option::is_none",
2686        deserialize_with = "deserialize_opt_f64_vec",
2687        default
2688    )]
2689    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
2690    pub duration: Option<Vec<f64>>,
2691    ///Property: End date
2692    #[serde(skip_serializing_if = "Option::is_none")]
2693    #[cfg_attr(
2694        feature = "builder",
2695        builder(with = |value:impl Into<String>|vec![value.into()])
2696    )]
2697    pub end_date: Option<Vec<String>>,
2698    ///Property: Index text
2699    #[serde(skip_serializing_if = "Option::is_none")]
2700    #[cfg_attr(
2701        feature = "builder",
2702        builder(with = |value:impl Into<String>|vec![value.into()])
2703    )]
2704    pub index_text: Option<Vec<String>>,
2705    ///Property: Modified on
2706    #[serde(skip_serializing_if = "Option::is_none")]
2707    #[cfg_attr(
2708        feature = "builder",
2709        builder(with = |value:impl Into<String>|vec![value.into()])
2710    )]
2711    pub modified_at: Option<Vec<String>>,
2712    ///Property: Detected names
2713    #[serde(skip_serializing_if = "Option::is_none")]
2714    #[cfg_attr(
2715        feature = "builder",
2716        builder(with = |value:impl Into<String>|vec![value.into()])
2717    )]
2718    pub names_mentioned: Option<Vec<String>>,
2719    ///Property: Source document
2720    #[serde(skip_serializing_if = "Option::is_none")]
2721    #[cfg_attr(
2722        feature = "builder",
2723        builder(with = |value:impl Into<String>|vec![value.into()])
2724    )]
2725    pub proof: Option<Vec<String>>,
2726    ///Property: Publishing source
2727    #[serde(skip_serializing_if = "Option::is_none")]
2728    #[cfg_attr(
2729        feature = "builder",
2730        builder(with = |value:impl Into<String>|vec![value.into()])
2731    )]
2732    pub publisher: Option<Vec<String>>,
2733    ///Property: Publishing source URL
2734    #[serde(skip_serializing_if = "Option::is_none")]
2735    #[cfg_attr(
2736        feature = "builder",
2737        builder(with = |value:impl Into<String>|vec![value.into()])
2738    )]
2739    pub publisher_url: Option<Vec<String>>,
2740    ///Property: Receiver
2741    #[serde(skip_serializing_if = "Option::is_none")]
2742    #[cfg_attr(
2743        feature = "builder",
2744        builder(with = |value:impl Into<String>|vec![value.into()])
2745    )]
2746    pub receiver: Option<Vec<String>>,
2747    ///Property: Receiver's Number
2748    #[serde(skip_serializing_if = "Option::is_none")]
2749    #[cfg_attr(
2750        feature = "builder",
2751        builder(with = |value:impl Into<String>|vec![value.into()])
2752    )]
2753    pub receiver_number: Option<Vec<String>>,
2754    ///Property: Record ID
2755    #[serde(skip_serializing_if = "Option::is_none")]
2756    #[cfg_attr(
2757        feature = "builder",
2758        builder(with = |value:impl Into<String>|vec![value.into()])
2759    )]
2760    pub record_id: Option<Vec<String>>,
2761    ///Property: Retrieved on
2762    #[serde(skip_serializing_if = "Option::is_none")]
2763    #[cfg_attr(
2764        feature = "builder",
2765        builder(with = |value:impl Into<String>|vec![value.into()])
2766    )]
2767    pub retrieved_at: Option<Vec<String>>,
2768    ///Property: Source link
2769    #[serde(skip_serializing_if = "Option::is_none")]
2770    #[cfg_attr(
2771        feature = "builder",
2772        builder(with = |value:impl Into<String>|vec![value.into()])
2773    )]
2774    pub source_url: Option<Vec<String>>,
2775    ///Property: Start date
2776    #[serde(skip_serializing_if = "Option::is_none")]
2777    #[cfg_attr(
2778        feature = "builder",
2779        builder(with = |value:impl Into<String>|vec![value.into()])
2780    )]
2781    pub start_date: Option<Vec<String>>,
2782    ///Property: Summary
2783    #[serde(skip_serializing_if = "Option::is_none")]
2784    #[cfg_attr(
2785        feature = "builder",
2786        builder(with = |value:impl Into<String>|vec![value.into()])
2787    )]
2788    pub summary: Option<Vec<String>>,
2789}
2790impl Call {
2791    /// Create a new entity with the given ID
2792    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
2793    pub fn new(id: impl Into<String>) -> Self {
2794        Self {
2795            id: id.into(),
2796            schema: "Call".to_string(),
2797            aleph_url: None,
2798            caller: None,
2799            caller_number: None,
2800            date: None,
2801            description: None,
2802            duration: None,
2803            end_date: None,
2804            index_text: None,
2805            modified_at: None,
2806            names_mentioned: None,
2807            proof: None,
2808            publisher: None,
2809            publisher_url: None,
2810            receiver: None,
2811            receiver_number: None,
2812            record_id: None,
2813            retrieved_at: None,
2814            source_url: None,
2815            start_date: None,
2816            summary: None,
2817        }
2818    }
2819    /// Get the schema name
2820    pub fn schema_name() -> &'static str {
2821        "Call"
2822    }
2823    /// Serialize to standard FTM nested JSON format
2824    ///
2825    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
2826    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
2827        let mut value = serde_json::to_value(self)?;
2828        if let Some(obj) = value.as_object_mut() {
2829            let id = obj.remove("id");
2830            let schema = obj.remove("schema");
2831            let properties = serde_json::Value::Object(std::mem::take(obj));
2832            if let Some(id) = id {
2833                obj.insert("id".into(), id);
2834            }
2835            if let Some(schema) = schema {
2836                obj.insert("schema".into(), schema);
2837            }
2838            obj.insert("properties".into(), properties);
2839        }
2840        serde_json::to_string(&value)
2841    }
2842}
2843///FTM Schema: Call for tenders
2844#[derive(Debug, Clone, Serialize, Deserialize)]
2845#[cfg_attr(feature = "builder", derive(Builder))]
2846#[serde(rename_all = "camelCase")]
2847pub struct CallForTenders {
2848    pub id: String,
2849    #[cfg_attr(feature = "builder", builder(default = "CallForTenders".to_string()))]
2850    pub schema: String,
2851    ///Property: Address
2852    #[serde(skip_serializing_if = "Option::is_none")]
2853    #[cfg_attr(
2854        feature = "builder",
2855        builder(with = |value:impl Into<String>|vec![value.into()])
2856    )]
2857    pub address: Option<Vec<String>>,
2858    ///Property: Address
2859    #[serde(skip_serializing_if = "Option::is_none")]
2860    #[cfg_attr(
2861        feature = "builder",
2862        builder(with = |value:impl Into<String>|vec![value.into()])
2863    )]
2864    pub address_entity: Option<Vec<String>>,
2865    ///Property: Aleph URL
2866    #[serde(skip_serializing_if = "Option::is_none")]
2867    #[cfg_attr(
2868        feature = "builder",
2869        builder(with = |value:impl Into<String>|vec![value.into()])
2870    )]
2871    pub aleph_url: Option<Vec<String>>,
2872    ///Property: Alias
2873    #[serde(skip_serializing_if = "Option::is_none")]
2874    #[cfg_attr(
2875        feature = "builder",
2876        builder(with = |value:impl Into<String>|vec![value.into()])
2877    )]
2878    pub alias: Option<Vec<String>>,
2879    ///Property: Name of contracting authority
2880    #[serde(default)]
2881    #[cfg_attr(
2882        feature = "builder",
2883        builder(with = |value:impl Into<String>|vec![value.into()])
2884    )]
2885    pub authority: Vec<String>,
2886    ///Property: Contracting authority reference ID
2887    #[serde(skip_serializing_if = "Option::is_none")]
2888    #[cfg_attr(
2889        feature = "builder",
2890        builder(with = |value:impl Into<String>|vec![value.into()])
2891    )]
2892    pub authority_reference_id: Option<Vec<String>>,
2893    ///Property: Award Notice Date
2894    #[serde(skip_serializing_if = "Option::is_none")]
2895    #[cfg_attr(
2896        feature = "builder",
2897        builder(with = |value:impl Into<String>|vec![value.into()])
2898    )]
2899    pub award_notice_date: Option<Vec<String>>,
2900    ///Property: Contract awarded in Lots
2901    #[serde(skip_serializing_if = "Option::is_none")]
2902    #[cfg_attr(
2903        feature = "builder",
2904        builder(with = |value:impl Into<String>|vec![value.into()])
2905    )]
2906    pub awarded_in_lots: Option<Vec<String>>,
2907    ///Property: Date of awarding
2908    #[serde(skip_serializing_if = "Option::is_none")]
2909    #[cfg_attr(
2910        feature = "builder",
2911        builder(with = |value:impl Into<String>|vec![value.into()])
2912    )]
2913    pub awarding_date: Option<Vec<String>>,
2914    ///Property: CfT unique id
2915    #[serde(skip_serializing_if = "Option::is_none")]
2916    #[cfg_attr(
2917        feature = "builder",
2918        builder(with = |value:impl Into<String>|vec![value.into()])
2919    )]
2920    pub call_id: Option<Vec<String>>,
2921    ///Property: Certification check
2922    #[serde(skip_serializing_if = "Option::is_none")]
2923    #[cfg_attr(
2924        feature = "builder",
2925        builder(with = |value:impl Into<String>|vec![value.into()])
2926    )]
2927    pub certification_check: Option<Vec<String>>,
2928    ///Property: End of clarification period
2929    #[serde(skip_serializing_if = "Option::is_none")]
2930    #[cfg_attr(
2931        feature = "builder",
2932        builder(with = |value:impl Into<String>|vec![value.into()])
2933    )]
2934    pub clarification_deadline: Option<Vec<String>>,
2935    ///Property: Contract notice date
2936    #[serde(skip_serializing_if = "Option::is_none")]
2937    #[cfg_attr(
2938        feature = "builder",
2939        builder(with = |value:impl Into<String>|vec![value.into()])
2940    )]
2941    pub contract_notice_date: Option<Vec<String>>,
2942    ///Property: Country
2943    #[serde(skip_serializing_if = "Option::is_none")]
2944    #[cfg_attr(
2945        feature = "builder",
2946        builder(with = |value:impl Into<String>|vec![value.into()])
2947    )]
2948    pub country: Option<Vec<String>>,
2949    ///Property: CPV code
2950    #[serde(skip_serializing_if = "Option::is_none")]
2951    #[cfg_attr(
2952        feature = "builder",
2953        builder(with = |value:impl Into<String>|vec![value.into()])
2954    )]
2955    pub cpv_code: Option<Vec<String>>,
2956    ///Property: Created at
2957    #[serde(skip_serializing_if = "Option::is_none")]
2958    #[cfg_attr(
2959        feature = "builder",
2960        builder(with = |value:impl Into<String>|vec![value.into()])
2961    )]
2962    pub created_at: Option<Vec<String>>,
2963    ///Property: Date
2964    #[serde(skip_serializing_if = "Option::is_none")]
2965    #[cfg_attr(
2966        feature = "builder",
2967        builder(with = |value:impl Into<String>|vec![value.into()])
2968    )]
2969    pub date: Option<Vec<String>>,
2970    ///Property: Description
2971    #[serde(skip_serializing_if = "Option::is_none")]
2972    #[cfg_attr(
2973        feature = "builder",
2974        builder(with = |value:impl Into<String>|vec![value.into()])
2975    )]
2976    pub description: Option<Vec<String>>,
2977    ///Property: Directive
2978    #[serde(skip_serializing_if = "Option::is_none")]
2979    #[cfg_attr(
2980        feature = "builder",
2981        builder(with = |value:impl Into<String>|vec![value.into()])
2982    )]
2983    pub directive: Option<Vec<String>>,
2984    ///Property: End date
2985    #[serde(skip_serializing_if = "Option::is_none")]
2986    #[cfg_attr(
2987        feature = "builder",
2988        builder(with = |value:impl Into<String>|vec![value.into()])
2989    )]
2990    pub end_date: Option<Vec<String>>,
2991    ///Property: EU funding
2992    #[serde(skip_serializing_if = "Option::is_none")]
2993    #[cfg_attr(
2994        feature = "builder",
2995        builder(with = |value:impl Into<String>|vec![value.into()])
2996    )]
2997    pub eu_funding: Option<Vec<String>>,
2998    ///Property: Evaluation mechanism
2999    #[serde(skip_serializing_if = "Option::is_none")]
3000    #[cfg_attr(
3001        feature = "builder",
3002        builder(with = |value:impl Into<String>|vec![value.into()])
3003    )]
3004    pub evaluation_mechanism: Option<Vec<String>>,
3005    ///Property: Does this call fall under the scope of GPP?
3006    #[serde(skip_serializing_if = "Option::is_none")]
3007    #[cfg_attr(
3008        feature = "builder",
3009        builder(with = |value:impl Into<String>|vec![value.into()])
3010    )]
3011    pub falls_under_gppscope: Option<Vec<String>>,
3012    ///Property: Index text
3013    #[serde(skip_serializing_if = "Option::is_none")]
3014    #[cfg_attr(
3015        feature = "builder",
3016        builder(with = |value:impl Into<String>|vec![value.into()])
3017    )]
3018    pub index_text: Option<Vec<String>>,
3019    ///Property: Call for tenders result
3020    #[serde(skip_serializing_if = "Option::is_none")]
3021    #[cfg_attr(
3022        feature = "builder",
3023        builder(with = |value:impl Into<String>|vec![value.into()])
3024    )]
3025    pub involves_outcome: Option<Vec<String>>,
3026    ///Property: Keywords
3027    #[serde(skip_serializing_if = "Option::is_none")]
3028    #[cfg_attr(
3029        feature = "builder",
3030        builder(with = |value:impl Into<String>|vec![value.into()])
3031    )]
3032    pub keywords: Option<Vec<String>>,
3033    ///Property: Lots names
3034    #[serde(skip_serializing_if = "Option::is_none")]
3035    #[cfg_attr(
3036        feature = "builder",
3037        builder(with = |value:impl Into<String>|vec![value.into()])
3038    )]
3039    pub lots_names: Option<Vec<String>>,
3040    ///Property: Maximum number of lots
3041    #[serde(
3042        skip_serializing_if = "Option::is_none",
3043        deserialize_with = "deserialize_opt_f64_vec",
3044        default
3045    )]
3046    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
3047    pub maximum_number_of_lots: Option<Vec<f64>>,
3048    ///Property: Modified on
3049    #[serde(skip_serializing_if = "Option::is_none")]
3050    #[cfg_attr(
3051        feature = "builder",
3052        builder(with = |value:impl Into<String>|vec![value.into()])
3053    )]
3054    pub modified_at: Option<Vec<String>>,
3055    ///Property: Multiple tenders will be accepted
3056    #[serde(skip_serializing_if = "Option::is_none")]
3057    #[cfg_attr(
3058        feature = "builder",
3059        builder(with = |value:impl Into<String>|vec![value.into()])
3060    )]
3061    pub multiple_tenders: Option<Vec<String>>,
3062    ///Property: Name
3063    #[serde(default)]
3064    #[cfg_attr(
3065        feature = "builder",
3066        builder(with = |value:impl Into<String>|vec![value.into()])
3067    )]
3068    pub name: Vec<String>,
3069    ///Property: Detected names
3070    #[serde(skip_serializing_if = "Option::is_none")]
3071    #[cfg_attr(
3072        feature = "builder",
3073        builder(with = |value:impl Into<String>|vec![value.into()])
3074    )]
3075    pub names_mentioned: Option<Vec<String>>,
3076    ///Property: Notes
3077    #[serde(skip_serializing_if = "Option::is_none")]
3078    #[cfg_attr(
3079        feature = "builder",
3080        builder(with = |value:impl Into<String>|vec![value.into()])
3081    )]
3082    pub notes: Option<Vec<String>>,
3083    ///Property: Number of lots
3084    #[serde(
3085        skip_serializing_if = "Option::is_none",
3086        deserialize_with = "deserialize_opt_f64_vec",
3087        default
3088    )]
3089    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
3090    pub number_of_lots: Option<Vec<f64>>,
3091    ///Property: NUTS code
3092    #[serde(skip_serializing_if = "Option::is_none")]
3093    #[cfg_attr(
3094        feature = "builder",
3095        builder(with = |value:impl Into<String>|vec![value.into()])
3096    )]
3097    pub nuts_code: Option<Vec<String>>,
3098    ///Property: Published on behalf of
3099    #[serde(skip_serializing_if = "Option::is_none")]
3100    #[cfg_attr(
3101        feature = "builder",
3102        builder(with = |value:impl Into<String>|vec![value.into()])
3103    )]
3104    pub on_behalf_of: Option<Vec<String>>,
3105    ///Property: Payment options
3106    #[serde(skip_serializing_if = "Option::is_none")]
3107    #[cfg_attr(
3108        feature = "builder",
3109        builder(with = |value:impl Into<String>|vec![value.into()])
3110    )]
3111    pub payment_options: Option<Vec<String>>,
3112    ///Property: Previous name
3113    #[serde(skip_serializing_if = "Option::is_none")]
3114    #[cfg_attr(
3115        feature = "builder",
3116        builder(with = |value:impl Into<String>|vec![value.into()])
3117    )]
3118    pub previous_name: Option<Vec<String>>,
3119    ///Property: Procedure
3120    #[serde(skip_serializing_if = "Option::is_none")]
3121    #[cfg_attr(
3122        feature = "builder",
3123        builder(with = |value:impl Into<String>|vec![value.into()])
3124    )]
3125    pub procedure: Option<Vec<String>>,
3126    ///Property: Procurement type
3127    #[serde(skip_serializing_if = "Option::is_none")]
3128    #[cfg_attr(
3129        feature = "builder",
3130        builder(with = |value:impl Into<String>|vec![value.into()])
3131    )]
3132    pub procurement_type: Option<Vec<String>>,
3133    ///Property: Program
3134    #[serde(skip_serializing_if = "Option::is_none")]
3135    #[cfg_attr(
3136        feature = "builder",
3137        builder(with = |value:impl Into<String>|vec![value.into()])
3138    )]
3139    pub program: Option<Vec<String>>,
3140    ///Property: Program ID
3141    #[serde(skip_serializing_if = "Option::is_none")]
3142    #[cfg_attr(
3143        feature = "builder",
3144        builder(with = |value:impl Into<String>|vec![value.into()])
3145    )]
3146    pub program_id: Option<Vec<String>>,
3147    ///Property: Source document
3148    #[serde(skip_serializing_if = "Option::is_none")]
3149    #[cfg_attr(
3150        feature = "builder",
3151        builder(with = |value:impl Into<String>|vec![value.into()])
3152    )]
3153    pub proof: Option<Vec<String>>,
3154    ///Property: Date of publication/invitation
3155    #[serde(skip_serializing_if = "Option::is_none")]
3156    #[cfg_attr(
3157        feature = "builder",
3158        builder(with = |value:impl Into<String>|vec![value.into()])
3159    )]
3160    pub publication_date: Option<Vec<String>>,
3161    ///Property: Publishing source
3162    #[serde(skip_serializing_if = "Option::is_none")]
3163    #[cfg_attr(
3164        feature = "builder",
3165        builder(with = |value:impl Into<String>|vec![value.into()])
3166    )]
3167    pub publisher: Option<Vec<String>>,
3168    ///Property: Publishing source URL
3169    #[serde(skip_serializing_if = "Option::is_none")]
3170    #[cfg_attr(
3171        feature = "builder",
3172        builder(with = |value:impl Into<String>|vec![value.into()])
3173    )]
3174    pub publisher_url: Option<Vec<String>>,
3175    ///Property: Record ID
3176    #[serde(skip_serializing_if = "Option::is_none")]
3177    #[cfg_attr(
3178        feature = "builder",
3179        builder(with = |value:impl Into<String>|vec![value.into()])
3180    )]
3181    pub record_id: Option<Vec<String>>,
3182    ///Property: Above or below threshold
3183    #[serde(skip_serializing_if = "Option::is_none")]
3184    #[cfg_attr(
3185        feature = "builder",
3186        builder(with = |value:impl Into<String>|vec![value.into()])
3187    )]
3188    pub relation_to_threshold: Option<Vec<String>>,
3189    ///Property: Retrieved on
3190    #[serde(skip_serializing_if = "Option::is_none")]
3191    #[cfg_attr(
3192        feature = "builder",
3193        builder(with = |value:impl Into<String>|vec![value.into()])
3194    )]
3195    pub retrieved_at: Option<Vec<String>>,
3196    ///Property: Inclusion of e-Auctions
3197    #[serde(skip_serializing_if = "Option::is_none")]
3198    #[cfg_attr(
3199        feature = "builder",
3200        builder(with = |value:impl Into<String>|vec![value.into()])
3201    )]
3202    pub reverse_auctions_included: Option<Vec<String>>,
3203    ///Property: Source link
3204    #[serde(skip_serializing_if = "Option::is_none")]
3205    #[cfg_attr(
3206        feature = "builder",
3207        builder(with = |value:impl Into<String>|vec![value.into()])
3208    )]
3209    pub source_url: Option<Vec<String>>,
3210    ///Property: Start date
3211    #[serde(skip_serializing_if = "Option::is_none")]
3212    #[cfg_attr(
3213        feature = "builder",
3214        builder(with = |value:impl Into<String>|vec![value.into()])
3215    )]
3216    pub start_date: Option<Vec<String>>,
3217    ///Property: Submission deadline
3218    #[serde(skip_serializing_if = "Option::is_none")]
3219    #[cfg_attr(
3220        feature = "builder",
3221        builder(with = |value:impl Into<String>|vec![value.into()])
3222    )]
3223    pub submission_deadline: Option<Vec<String>>,
3224    ///Property: Summary
3225    #[serde(skip_serializing_if = "Option::is_none")]
3226    #[cfg_attr(
3227        feature = "builder",
3228        builder(with = |value:impl Into<String>|vec![value.into()])
3229    )]
3230    pub summary: Option<Vec<String>>,
3231    ///Property: TED link for published notices
3232    #[serde(skip_serializing_if = "Option::is_none")]
3233    #[cfg_attr(
3234        feature = "builder",
3235        builder(with = |value:impl Into<String>|vec![value.into()])
3236    )]
3237    pub ted_url: Option<Vec<String>>,
3238    ///Property: Tenderers
3239    #[serde(skip_serializing_if = "Option::is_none")]
3240    #[cfg_attr(
3241        feature = "builder",
3242        builder(with = |value:impl Into<String>|vec![value.into()])
3243    )]
3244    pub tenderers: Option<Vec<String>>,
3245    ///Property: Tenders for lots
3246    #[serde(skip_serializing_if = "Option::is_none")]
3247    #[cfg_attr(
3248        feature = "builder",
3249        builder(with = |value:impl Into<String>|vec![value.into()])
3250    )]
3251    pub tenders_for_lots: Option<Vec<String>>,
3252    ///Property: Title
3253    #[serde(default)]
3254    #[cfg_attr(
3255        feature = "builder",
3256        builder(with = |value:impl Into<String>|vec![value.into()])
3257    )]
3258    pub title: Vec<String>,
3259    ///Property: Topics
3260    #[serde(skip_serializing_if = "Option::is_none")]
3261    #[cfg_attr(
3262        feature = "builder",
3263        builder(with = |value:impl Into<String>|vec![value.into()])
3264    )]
3265    pub topics: Option<Vec<String>>,
3266    ///Property: Weak alias
3267    #[serde(skip_serializing_if = "Option::is_none")]
3268    #[cfg_attr(
3269        feature = "builder",
3270        builder(with = |value:impl Into<String>|vec![value.into()])
3271    )]
3272    pub weak_alias: Option<Vec<String>>,
3273    ///Property: Wikidata ID
3274    #[serde(skip_serializing_if = "Option::is_none")]
3275    #[cfg_attr(
3276        feature = "builder",
3277        builder(with = |value:impl Into<String>|vec![value.into()])
3278    )]
3279    pub wikidata_id: Option<Vec<String>>,
3280    ///Property: Wikipedia Article
3281    #[serde(skip_serializing_if = "Option::is_none")]
3282    #[cfg_attr(
3283        feature = "builder",
3284        builder(with = |value:impl Into<String>|vec![value.into()])
3285    )]
3286    pub wikipedia_url: Option<Vec<String>>,
3287}
3288impl CallForTenders {
3289    /// Create a new entity with the given ID
3290    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
3291    pub fn new(id: impl Into<String>) -> Self {
3292        Self {
3293            id: id.into(),
3294            schema: "CallForTenders".to_string(),
3295            address: None,
3296            address_entity: None,
3297            aleph_url: None,
3298            alias: None,
3299            authority: Vec::new(),
3300            authority_reference_id: None,
3301            award_notice_date: None,
3302            awarded_in_lots: None,
3303            awarding_date: None,
3304            call_id: None,
3305            certification_check: None,
3306            clarification_deadline: None,
3307            contract_notice_date: None,
3308            country: None,
3309            cpv_code: None,
3310            created_at: None,
3311            date: None,
3312            description: None,
3313            directive: None,
3314            end_date: None,
3315            eu_funding: None,
3316            evaluation_mechanism: None,
3317            falls_under_gppscope: None,
3318            index_text: None,
3319            involves_outcome: None,
3320            keywords: None,
3321            lots_names: None,
3322            maximum_number_of_lots: None,
3323            modified_at: None,
3324            multiple_tenders: None,
3325            name: Vec::new(),
3326            names_mentioned: None,
3327            notes: None,
3328            number_of_lots: None,
3329            nuts_code: None,
3330            on_behalf_of: None,
3331            payment_options: None,
3332            previous_name: None,
3333            procedure: None,
3334            procurement_type: None,
3335            program: None,
3336            program_id: None,
3337            proof: None,
3338            publication_date: None,
3339            publisher: None,
3340            publisher_url: None,
3341            record_id: None,
3342            relation_to_threshold: None,
3343            retrieved_at: None,
3344            reverse_auctions_included: None,
3345            source_url: None,
3346            start_date: None,
3347            submission_deadline: None,
3348            summary: None,
3349            ted_url: None,
3350            tenderers: None,
3351            tenders_for_lots: None,
3352            title: Vec::new(),
3353            topics: None,
3354            weak_alias: None,
3355            wikidata_id: None,
3356            wikipedia_url: None,
3357        }
3358    }
3359    /// Get the schema name
3360    pub fn schema_name() -> &'static str {
3361        "CallForTenders"
3362    }
3363    /// Serialize to standard FTM nested JSON format
3364    ///
3365    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
3366    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
3367        let mut value = serde_json::to_value(self)?;
3368        if let Some(obj) = value.as_object_mut() {
3369            let id = obj.remove("id");
3370            let schema = obj.remove("schema");
3371            let properties = serde_json::Value::Object(std::mem::take(obj));
3372            if let Some(id) = id {
3373                obj.insert("id".into(), id);
3374            }
3375            if let Some(schema) = schema {
3376                obj.insert("schema".into(), schema);
3377            }
3378            obj.insert("properties".into(), properties);
3379        }
3380        serde_json::to_string(&value)
3381    }
3382}
3383///FTM Schema: Company
3384#[derive(Debug, Clone, Serialize, Deserialize)]
3385#[cfg_attr(feature = "builder", derive(Builder))]
3386#[serde(rename_all = "camelCase")]
3387pub struct Company {
3388    pub id: String,
3389    #[cfg_attr(feature = "builder", builder(default = "Company".to_string()))]
3390    pub schema: String,
3391    ///Property: Abbreviation
3392    #[serde(skip_serializing_if = "Option::is_none")]
3393    #[cfg_attr(
3394        feature = "builder",
3395        builder(with = |value:impl Into<String>|vec![value.into()])
3396    )]
3397    pub abbreviation: Option<Vec<String>>,
3398    ///Property: Address
3399    #[serde(skip_serializing_if = "Option::is_none")]
3400    #[cfg_attr(
3401        feature = "builder",
3402        builder(with = |value:impl Into<String>|vec![value.into()])
3403    )]
3404    pub address: Option<Vec<String>>,
3405    ///Property: Address
3406    #[serde(skip_serializing_if = "Option::is_none")]
3407    #[cfg_attr(
3408        feature = "builder",
3409        builder(with = |value:impl Into<String>|vec![value.into()])
3410    )]
3411    pub address_entity: Option<Vec<String>>,
3412    ///Property: Aleph URL
3413    #[serde(skip_serializing_if = "Option::is_none")]
3414    #[cfg_attr(
3415        feature = "builder",
3416        builder(with = |value:impl Into<String>|vec![value.into()])
3417    )]
3418    pub aleph_url: Option<Vec<String>>,
3419    ///Property: Alias
3420    #[serde(skip_serializing_if = "Option::is_none")]
3421    #[cfg_attr(
3422        feature = "builder",
3423        builder(with = |value:impl Into<String>|vec![value.into()])
3424    )]
3425    pub alias: Option<Vec<String>>,
3426    ///Property: Amount
3427    #[serde(
3428        skip_serializing_if = "Option::is_none",
3429        deserialize_with = "deserialize_opt_f64_vec",
3430        default
3431    )]
3432    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
3433    pub amount: Option<Vec<f64>>,
3434    ///Property: Amount in EUR
3435    #[serde(
3436        skip_serializing_if = "Option::is_none",
3437        deserialize_with = "deserialize_opt_f64_vec",
3438        default
3439    )]
3440    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
3441    pub amount_eur: Option<Vec<f64>>,
3442    ///Property: Amount in USD
3443    #[serde(
3444        skip_serializing_if = "Option::is_none",
3445        deserialize_with = "deserialize_opt_f64_vec",
3446        default
3447    )]
3448    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
3449    pub amount_usd: Option<Vec<f64>>,
3450    ///Property: BIK
3451    #[serde(skip_serializing_if = "Option::is_none")]
3452    #[cfg_attr(
3453        feature = "builder",
3454        builder(with = |value:impl Into<String>|vec![value.into()])
3455    )]
3456    pub bik_code: Option<Vec<String>>,
3457    ///Property: BrightQuery ID
3458    #[serde(skip_serializing_if = "Option::is_none")]
3459    #[cfg_attr(
3460        feature = "builder",
3461        builder(with = |value:impl Into<String>|vec![value.into()])
3462    )]
3463    pub bright_query_id: Option<Vec<String>>,
3464    ///Property: BrightQuery Organization ID
3465    #[serde(skip_serializing_if = "Option::is_none")]
3466    #[cfg_attr(
3467        feature = "builder",
3468        builder(with = |value:impl Into<String>|vec![value.into()])
3469    )]
3470    pub bright_query_org_id: Option<Vec<String>>,
3471    ///Property: Bureau van Dijk ID
3472    #[serde(skip_serializing_if = "Option::is_none")]
3473    #[cfg_attr(
3474        feature = "builder",
3475        builder(with = |value:impl Into<String>|vec![value.into()])
3476    )]
3477    pub bvd_id: Option<Vec<String>>,
3478    ///Property: COD CAEM
3479    #[serde(skip_serializing_if = "Option::is_none")]
3480    #[cfg_attr(
3481        feature = "builder",
3482        builder(with = |value:impl Into<String>|vec![value.into()])
3483    )]
3484    pub caem_code: Option<Vec<String>>,
3485    ///Property: CAGE
3486    #[serde(skip_serializing_if = "Option::is_none")]
3487    #[cfg_attr(
3488        feature = "builder",
3489        builder(with = |value:impl Into<String>|vec![value.into()])
3490    )]
3491    pub cage_code: Option<Vec<String>>,
3492    ///Property: Capital
3493    #[serde(
3494        skip_serializing_if = "Option::is_none",
3495        deserialize_with = "deserialize_opt_f64_vec",
3496        default
3497    )]
3498    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
3499    pub capital: Option<Vec<f64>>,
3500    ///Property: SEC Central Index Key
3501    #[serde(skip_serializing_if = "Option::is_none")]
3502    #[cfg_attr(
3503        feature = "builder",
3504        builder(with = |value:impl Into<String>|vec![value.into()])
3505    )]
3506    pub cik_code: Option<Vec<String>>,
3507    ///Property: Classification
3508    #[serde(skip_serializing_if = "Option::is_none")]
3509    #[cfg_attr(
3510        feature = "builder",
3511        builder(with = |value:impl Into<String>|vec![value.into()])
3512    )]
3513    pub classification: Option<Vec<String>>,
3514    ///Property: COATO / SOATO / OKATO
3515    #[serde(skip_serializing_if = "Option::is_none")]
3516    #[cfg_attr(
3517        feature = "builder",
3518        builder(with = |value:impl Into<String>|vec![value.into()])
3519    )]
3520    pub coato_code: Option<Vec<String>>,
3521    ///Property: Country
3522    #[serde(skip_serializing_if = "Option::is_none")]
3523    #[cfg_attr(
3524        feature = "builder",
3525        builder(with = |value:impl Into<String>|vec![value.into()])
3526    )]
3527    pub country: Option<Vec<String>>,
3528    ///Property: Created at
3529    #[serde(skip_serializing_if = "Option::is_none")]
3530    #[cfg_attr(
3531        feature = "builder",
3532        builder(with = |value:impl Into<String>|vec![value.into()])
3533    )]
3534    pub created_at: Option<Vec<String>>,
3535    ///Property: Currency
3536    #[serde(skip_serializing_if = "Option::is_none")]
3537    #[cfg_attr(
3538        feature = "builder",
3539        builder(with = |value:impl Into<String>|vec![value.into()])
3540    )]
3541    pub currency: Option<Vec<String>>,
3542    ///Property: Description
3543    #[serde(skip_serializing_if = "Option::is_none")]
3544    #[cfg_attr(
3545        feature = "builder",
3546        builder(with = |value:impl Into<String>|vec![value.into()])
3547    )]
3548    pub description: Option<Vec<String>>,
3549    ///Property: Dissolution date
3550    #[serde(skip_serializing_if = "Option::is_none")]
3551    #[cfg_attr(
3552        feature = "builder",
3553        builder(with = |value:impl Into<String>|vec![value.into()])
3554    )]
3555    pub dissolution_date: Option<Vec<String>>,
3556    ///Property: DUNS
3557    #[serde(skip_serializing_if = "Option::is_none")]
3558    #[cfg_attr(
3559        feature = "builder",
3560        builder(with = |value:impl Into<String>|vec![value.into()])
3561    )]
3562    pub duns_code: Option<Vec<String>>,
3563    ///Property: Email
3564    #[serde(skip_serializing_if = "Option::is_none")]
3565    #[cfg_attr(
3566        feature = "builder",
3567        builder(with = |value:impl Into<String>|vec![value.into()])
3568    )]
3569    pub email: Option<Vec<String>>,
3570    ///Property: Federal tax service code
3571    #[serde(skip_serializing_if = "Option::is_none")]
3572    #[cfg_attr(
3573        feature = "builder",
3574        builder(with = |value:impl Into<String>|vec![value.into()])
3575    )]
3576    pub fns_code: Option<Vec<String>>,
3577    ///Property: FSS
3578    #[serde(skip_serializing_if = "Option::is_none")]
3579    #[cfg_attr(
3580        feature = "builder",
3581        builder(with = |value:impl Into<String>|vec![value.into()])
3582    )]
3583    pub fss_code: Option<Vec<String>>,
3584    ///Property: GIIN
3585    #[serde(skip_serializing_if = "Option::is_none")]
3586    #[cfg_attr(
3587        feature = "builder",
3588        builder(with = |value:impl Into<String>|vec![value.into()])
3589    )]
3590    pub gii_number: Option<Vec<String>>,
3591    ///Property: ICIJ ID
3592    #[serde(skip_serializing_if = "Option::is_none")]
3593    #[cfg_attr(
3594        feature = "builder",
3595        builder(with = |value:impl Into<String>|vec![value.into()])
3596    )]
3597    pub icij_id: Option<Vec<String>>,
3598    ///Property: ID Number
3599    #[serde(skip_serializing_if = "Option::is_none")]
3600    #[cfg_attr(
3601        feature = "builder",
3602        builder(with = |value:impl Into<String>|vec![value.into()])
3603    )]
3604    pub id_number: Option<Vec<String>>,
3605    ///Property: IMO Number
3606    #[serde(skip_serializing_if = "Option::is_none")]
3607    #[cfg_attr(
3608        feature = "builder",
3609        builder(with = |value:impl Into<String>|vec![value.into()])
3610    )]
3611    pub imo_number: Option<Vec<String>>,
3612    ///Property: Incorporation date
3613    #[serde(skip_serializing_if = "Option::is_none")]
3614    #[cfg_attr(
3615        feature = "builder",
3616        builder(with = |value:impl Into<String>|vec![value.into()])
3617    )]
3618    pub incorporation_date: Option<Vec<String>>,
3619    ///Property: Index text
3620    #[serde(skip_serializing_if = "Option::is_none")]
3621    #[cfg_attr(
3622        feature = "builder",
3623        builder(with = |value:impl Into<String>|vec![value.into()])
3624    )]
3625    pub index_text: Option<Vec<String>>,
3626    ///Property: INN
3627    #[serde(skip_serializing_if = "Option::is_none")]
3628    #[cfg_attr(
3629        feature = "builder",
3630        builder(with = |value:impl Into<String>|vec![value.into()])
3631    )]
3632    pub inn_code: Option<Vec<String>>,
3633    ///Property: IPO
3634    #[serde(skip_serializing_if = "Option::is_none")]
3635    #[cfg_attr(
3636        feature = "builder",
3637        builder(with = |value:impl Into<String>|vec![value.into()])
3638    )]
3639    pub ipo_code: Option<Vec<String>>,
3640    ///Property: IRS Number
3641    #[serde(skip_serializing_if = "Option::is_none")]
3642    #[cfg_attr(
3643        feature = "builder",
3644        builder(with = |value:impl Into<String>|vec![value.into()])
3645    )]
3646    pub irs_code: Option<Vec<String>>,
3647    ///Property: ISIN
3648    #[serde(skip_serializing_if = "Option::is_none")]
3649    #[cfg_attr(
3650        feature = "builder",
3651        builder(with = |value:impl Into<String>|vec![value.into()])
3652    )]
3653    pub isin_code: Option<Vec<String>>,
3654    ///Property: JIB
3655    #[serde(skip_serializing_if = "Option::is_none")]
3656    #[cfg_attr(
3657        feature = "builder",
3658        builder(with = |value:impl Into<String>|vec![value.into()])
3659    )]
3660    pub jib_code: Option<Vec<String>>,
3661    ///Property: Jurisdiction
3662    #[serde(skip_serializing_if = "Option::is_none")]
3663    #[cfg_attr(
3664        feature = "builder",
3665        builder(with = |value:impl Into<String>|vec![value.into()])
3666    )]
3667    pub jurisdiction: Option<Vec<String>>,
3668    ///Property: Keywords
3669    #[serde(skip_serializing_if = "Option::is_none")]
3670    #[cfg_attr(
3671        feature = "builder",
3672        builder(with = |value:impl Into<String>|vec![value.into()])
3673    )]
3674    pub keywords: Option<Vec<String>>,
3675    ///Property: KPP
3676    #[serde(skip_serializing_if = "Option::is_none")]
3677    #[cfg_attr(
3678        feature = "builder",
3679        builder(with = |value:impl Into<String>|vec![value.into()])
3680    )]
3681    pub kpp_code: Option<Vec<String>>,
3682    ///Property: Legal form
3683    #[serde(skip_serializing_if = "Option::is_none")]
3684    #[cfg_attr(
3685        feature = "builder",
3686        builder(with = |value:impl Into<String>|vec![value.into()])
3687    )]
3688    pub legal_form: Option<Vec<String>>,
3689    ///Property: LEI
3690    #[serde(skip_serializing_if = "Option::is_none")]
3691    #[cfg_attr(
3692        feature = "builder",
3693        builder(with = |value:impl Into<String>|vec![value.into()])
3694    )]
3695    pub lei_code: Option<Vec<String>>,
3696    ///Property: License Number
3697    #[serde(skip_serializing_if = "Option::is_none")]
3698    #[cfg_attr(
3699        feature = "builder",
3700        builder(with = |value:impl Into<String>|vec![value.into()])
3701    )]
3702    pub license_number: Option<Vec<String>>,
3703    ///Property: Country of origin
3704    #[serde(skip_serializing_if = "Option::is_none")]
3705    #[cfg_attr(
3706        feature = "builder",
3707        builder(with = |value:impl Into<String>|vec![value.into()])
3708    )]
3709    pub main_country: Option<Vec<String>>,
3710    ///Property: MBS
3711    #[serde(skip_serializing_if = "Option::is_none")]
3712    #[cfg_attr(
3713        feature = "builder",
3714        builder(with = |value:impl Into<String>|vec![value.into()])
3715    )]
3716    pub mbs_code: Option<Vec<String>>,
3717    ///Property: Modified on
3718    #[serde(skip_serializing_if = "Option::is_none")]
3719    #[cfg_attr(
3720        feature = "builder",
3721        builder(with = |value:impl Into<String>|vec![value.into()])
3722    )]
3723    pub modified_at: Option<Vec<String>>,
3724    ///Property: Name
3725    #[serde(default)]
3726    #[cfg_attr(
3727        feature = "builder",
3728        builder(with = |value:impl Into<String>|vec![value.into()])
3729    )]
3730    pub name: Vec<String>,
3731    ///Property: Notes
3732    #[serde(skip_serializing_if = "Option::is_none")]
3733    #[cfg_attr(
3734        feature = "builder",
3735        builder(with = |value:impl Into<String>|vec![value.into()])
3736    )]
3737    pub notes: Option<Vec<String>>,
3738    ///Property: NPI
3739    #[serde(skip_serializing_if = "Option::is_none")]
3740    #[cfg_attr(
3741        feature = "builder",
3742        builder(with = |value:impl Into<String>|vec![value.into()])
3743    )]
3744    pub npi_code: Option<Vec<String>>,
3745    ///Property: OGRN
3746    #[serde(skip_serializing_if = "Option::is_none")]
3747    #[cfg_attr(
3748        feature = "builder",
3749        builder(with = |value:impl Into<String>|vec![value.into()])
3750    )]
3751    pub ogrn_code: Option<Vec<String>>,
3752    ///Property: OKOPF
3753    #[serde(skip_serializing_if = "Option::is_none")]
3754    #[cfg_attr(
3755        feature = "builder",
3756        builder(with = |value:impl Into<String>|vec![value.into()])
3757    )]
3758    pub okopf_code: Option<Vec<String>>,
3759    ///Property: OKPO
3760    #[serde(skip_serializing_if = "Option::is_none")]
3761    #[cfg_attr(
3762        feature = "builder",
3763        builder(with = |value:impl Into<String>|vec![value.into()])
3764    )]
3765    pub okpo_code: Option<Vec<String>>,
3766    ///Property: OKSM
3767    #[serde(skip_serializing_if = "Option::is_none")]
3768    #[cfg_attr(
3769        feature = "builder",
3770        builder(with = |value:impl Into<String>|vec![value.into()])
3771    )]
3772    pub oksm_code: Option<Vec<String>>,
3773    ///Property: OKVED(2) Classifier
3774    #[serde(skip_serializing_if = "Option::is_none")]
3775    #[cfg_attr(
3776        feature = "builder",
3777        builder(with = |value:impl Into<String>|vec![value.into()])
3778    )]
3779    pub okved_code: Option<Vec<String>>,
3780    ///Property: OpenCorporates URL
3781    #[serde(skip_serializing_if = "Option::is_none")]
3782    #[cfg_attr(
3783        feature = "builder",
3784        builder(with = |value:impl Into<String>|vec![value.into()])
3785    )]
3786    pub opencorporates_url: Option<Vec<String>>,
3787    ///Property: Parent company
3788    #[serde(skip_serializing_if = "Option::is_none")]
3789    #[cfg_attr(
3790        feature = "builder",
3791        builder(with = |value:impl Into<String>|vec![value.into()])
3792    )]
3793    pub parent: Option<Vec<String>>,
3794    ///Property: PermID
3795    #[serde(skip_serializing_if = "Option::is_none")]
3796    #[cfg_attr(
3797        feature = "builder",
3798        builder(with = |value:impl Into<String>|vec![value.into()])
3799    )]
3800    pub perm_id: Option<Vec<String>>,
3801    ///Property: PFR Number
3802    #[serde(skip_serializing_if = "Option::is_none")]
3803    #[cfg_attr(
3804        feature = "builder",
3805        builder(with = |value:impl Into<String>|vec![value.into()])
3806    )]
3807    pub pfr_number: Option<Vec<String>>,
3808    ///Property: Phone
3809    #[serde(skip_serializing_if = "Option::is_none")]
3810    #[cfg_attr(
3811        feature = "builder",
3812        builder(with = |value:impl Into<String>|vec![value.into()])
3813    )]
3814    pub phone: Option<Vec<String>>,
3815    ///Property: Previous name
3816    #[serde(skip_serializing_if = "Option::is_none")]
3817    #[cfg_attr(
3818        feature = "builder",
3819        builder(with = |value:impl Into<String>|vec![value.into()])
3820    )]
3821    pub previous_name: Option<Vec<String>>,
3822    ///Property: Program
3823    #[serde(skip_serializing_if = "Option::is_none")]
3824    #[cfg_attr(
3825        feature = "builder",
3826        builder(with = |value:impl Into<String>|vec![value.into()])
3827    )]
3828    pub program: Option<Vec<String>>,
3829    ///Property: Program ID
3830    #[serde(skip_serializing_if = "Option::is_none")]
3831    #[cfg_attr(
3832        feature = "builder",
3833        builder(with = |value:impl Into<String>|vec![value.into()])
3834    )]
3835    pub program_id: Option<Vec<String>>,
3836    ///Property: Source document
3837    #[serde(skip_serializing_if = "Option::is_none")]
3838    #[cfg_attr(
3839        feature = "builder",
3840        builder(with = |value:impl Into<String>|vec![value.into()])
3841    )]
3842    pub proof: Option<Vec<String>>,
3843    ///Property: Publishing source
3844    #[serde(skip_serializing_if = "Option::is_none")]
3845    #[cfg_attr(
3846        feature = "builder",
3847        builder(with = |value:impl Into<String>|vec![value.into()])
3848    )]
3849    pub publisher: Option<Vec<String>>,
3850    ///Property: Publishing source URL
3851    #[serde(skip_serializing_if = "Option::is_none")]
3852    #[cfg_attr(
3853        feature = "builder",
3854        builder(with = |value:impl Into<String>|vec![value.into()])
3855    )]
3856    pub publisher_url: Option<Vec<String>>,
3857    ///Property: Registration number
3858    #[serde(skip_serializing_if = "Option::is_none")]
3859    #[cfg_attr(
3860        feature = "builder",
3861        builder(with = |value:impl Into<String>|vec![value.into()])
3862    )]
3863    pub registration_number: Option<Vec<String>>,
3864    ///Property: Retrieved on
3865    #[serde(skip_serializing_if = "Option::is_none")]
3866    #[cfg_attr(
3867        feature = "builder",
3868        builder(with = |value:impl Into<String>|vec![value.into()])
3869    )]
3870    pub retrieved_at: Option<Vec<String>>,
3871    ///Property: Reuters Instrument Code
3872    #[serde(skip_serializing_if = "Option::is_none")]
3873    #[cfg_attr(
3874        feature = "builder",
3875        builder(with = |value:impl Into<String>|vec![value.into()])
3876    )]
3877    pub ric_code: Option<Vec<String>>,
3878    ///Property: Sayari Entity ID
3879    #[serde(skip_serializing_if = "Option::is_none")]
3880    #[cfg_attr(
3881        feature = "builder",
3882        builder(with = |value:impl Into<String>|vec![value.into()])
3883    )]
3884    pub sayari_id: Option<Vec<String>>,
3885    ///Property: Sector
3886    #[serde(skip_serializing_if = "Option::is_none")]
3887    #[cfg_attr(
3888        feature = "builder",
3889        builder(with = |value:impl Into<String>|vec![value.into()])
3890    )]
3891    pub sector: Option<Vec<String>>,
3892    ///Property: Source link
3893    #[serde(skip_serializing_if = "Option::is_none")]
3894    #[cfg_attr(
3895        feature = "builder",
3896        builder(with = |value:impl Into<String>|vec![value.into()])
3897    )]
3898    pub source_url: Option<Vec<String>>,
3899    ///Property: Status
3900    #[serde(skip_serializing_if = "Option::is_none")]
3901    #[cfg_attr(
3902        feature = "builder",
3903        builder(with = |value:impl Into<String>|vec![value.into()])
3904    )]
3905    pub status: Option<Vec<String>>,
3906    ///Property: Summary
3907    #[serde(skip_serializing_if = "Option::is_none")]
3908    #[cfg_attr(
3909        feature = "builder",
3910        builder(with = |value:impl Into<String>|vec![value.into()])
3911    )]
3912    pub summary: Option<Vec<String>>,
3913    ///Property: SWIFT/BIC
3914    #[serde(skip_serializing_if = "Option::is_none")]
3915    #[cfg_attr(
3916        feature = "builder",
3917        builder(with = |value:impl Into<String>|vec![value.into()])
3918    )]
3919    pub swift_bic: Option<Vec<String>>,
3920    ///Property: Tax Number
3921    #[serde(skip_serializing_if = "Option::is_none")]
3922    #[cfg_attr(
3923        feature = "builder",
3924        builder(with = |value:impl Into<String>|vec![value.into()])
3925    )]
3926    pub tax_number: Option<Vec<String>>,
3927    ///Property: Tax status
3928    #[serde(skip_serializing_if = "Option::is_none")]
3929    #[cfg_attr(
3930        feature = "builder",
3931        builder(with = |value:impl Into<String>|vec![value.into()])
3932    )]
3933    pub tax_status: Option<Vec<String>>,
3934    ///Property: Stock ticker symbol
3935    #[serde(skip_serializing_if = "Option::is_none")]
3936    #[cfg_attr(
3937        feature = "builder",
3938        builder(with = |value:impl Into<String>|vec![value.into()])
3939    )]
3940    pub ticker: Option<Vec<String>>,
3941    ///Property: Topics
3942    #[serde(skip_serializing_if = "Option::is_none")]
3943    #[cfg_attr(
3944        feature = "builder",
3945        builder(with = |value:impl Into<String>|vec![value.into()])
3946    )]
3947    pub topics: Option<Vec<String>>,
3948    ///Property: Unique Entity ID
3949    #[serde(skip_serializing_if = "Option::is_none")]
3950    #[cfg_attr(
3951        feature = "builder",
3952        builder(with = |value:impl Into<String>|vec![value.into()])
3953    )]
3954    pub unique_entity_id: Option<Vec<String>>,
3955    ///Property: USCC
3956    #[serde(skip_serializing_if = "Option::is_none")]
3957    #[cfg_attr(
3958        feature = "builder",
3959        builder(with = |value:impl Into<String>|vec![value.into()])
3960    )]
3961    pub usc_code: Option<Vec<String>>,
3962    ///Property: V.A.T. Identifier
3963    #[serde(skip_serializing_if = "Option::is_none")]
3964    #[cfg_attr(
3965        feature = "builder",
3966        builder(with = |value:impl Into<String>|vec![value.into()])
3967    )]
3968    pub vat_code: Option<Vec<String>>,
3969    ///Property: VOEN
3970    #[serde(skip_serializing_if = "Option::is_none")]
3971    #[cfg_attr(
3972        feature = "builder",
3973        builder(with = |value:impl Into<String>|vec![value.into()])
3974    )]
3975    pub voen_code: Option<Vec<String>>,
3976    ///Property: Weak alias
3977    #[serde(skip_serializing_if = "Option::is_none")]
3978    #[cfg_attr(
3979        feature = "builder",
3980        builder(with = |value:impl Into<String>|vec![value.into()])
3981    )]
3982    pub weak_alias: Option<Vec<String>>,
3983    ///Property: Website
3984    #[serde(skip_serializing_if = "Option::is_none")]
3985    #[cfg_attr(
3986        feature = "builder",
3987        builder(with = |value:impl Into<String>|vec![value.into()])
3988    )]
3989    pub website: Option<Vec<String>>,
3990    ///Property: Wikidata ID
3991    #[serde(skip_serializing_if = "Option::is_none")]
3992    #[cfg_attr(
3993        feature = "builder",
3994        builder(with = |value:impl Into<String>|vec![value.into()])
3995    )]
3996    pub wikidata_id: Option<Vec<String>>,
3997    ///Property: Wikipedia Article
3998    #[serde(skip_serializing_if = "Option::is_none")]
3999    #[cfg_attr(
4000        feature = "builder",
4001        builder(with = |value:impl Into<String>|vec![value.into()])
4002    )]
4003    pub wikipedia_url: Option<Vec<String>>,
4004}
4005impl Company {
4006    /// Create a new entity with the given ID
4007    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
4008    pub fn new(id: impl Into<String>) -> Self {
4009        Self {
4010            id: id.into(),
4011            schema: "Company".to_string(),
4012            abbreviation: None,
4013            address: None,
4014            address_entity: None,
4015            aleph_url: None,
4016            alias: None,
4017            amount: None,
4018            amount_eur: None,
4019            amount_usd: None,
4020            bik_code: None,
4021            bright_query_id: None,
4022            bright_query_org_id: None,
4023            bvd_id: None,
4024            caem_code: None,
4025            cage_code: None,
4026            capital: None,
4027            cik_code: None,
4028            classification: None,
4029            coato_code: None,
4030            country: None,
4031            created_at: None,
4032            currency: None,
4033            description: None,
4034            dissolution_date: None,
4035            duns_code: None,
4036            email: None,
4037            fns_code: None,
4038            fss_code: None,
4039            gii_number: None,
4040            icij_id: None,
4041            id_number: None,
4042            imo_number: None,
4043            incorporation_date: None,
4044            index_text: None,
4045            inn_code: None,
4046            ipo_code: None,
4047            irs_code: None,
4048            isin_code: None,
4049            jib_code: None,
4050            jurisdiction: None,
4051            keywords: None,
4052            kpp_code: None,
4053            legal_form: None,
4054            lei_code: None,
4055            license_number: None,
4056            main_country: None,
4057            mbs_code: None,
4058            modified_at: None,
4059            name: Vec::new(),
4060            notes: None,
4061            npi_code: None,
4062            ogrn_code: None,
4063            okopf_code: None,
4064            okpo_code: None,
4065            oksm_code: None,
4066            okved_code: None,
4067            opencorporates_url: None,
4068            parent: None,
4069            perm_id: None,
4070            pfr_number: None,
4071            phone: None,
4072            previous_name: None,
4073            program: None,
4074            program_id: None,
4075            proof: None,
4076            publisher: None,
4077            publisher_url: None,
4078            registration_number: None,
4079            retrieved_at: None,
4080            ric_code: None,
4081            sayari_id: None,
4082            sector: None,
4083            source_url: None,
4084            status: None,
4085            summary: None,
4086            swift_bic: None,
4087            tax_number: None,
4088            tax_status: None,
4089            ticker: None,
4090            topics: None,
4091            unique_entity_id: None,
4092            usc_code: None,
4093            vat_code: None,
4094            voen_code: None,
4095            weak_alias: None,
4096            website: None,
4097            wikidata_id: None,
4098            wikipedia_url: None,
4099        }
4100    }
4101    /// Get the schema name
4102    pub fn schema_name() -> &'static str {
4103        "Company"
4104    }
4105    /// Serialize to standard FTM nested JSON format
4106    ///
4107    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
4108    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
4109        let mut value = serde_json::to_value(self)?;
4110        if let Some(obj) = value.as_object_mut() {
4111            let id = obj.remove("id");
4112            let schema = obj.remove("schema");
4113            let properties = serde_json::Value::Object(std::mem::take(obj));
4114            if let Some(id) = id {
4115                obj.insert("id".into(), id);
4116            }
4117            if let Some(schema) = schema {
4118                obj.insert("schema".into(), schema);
4119            }
4120            obj.insert("properties".into(), properties);
4121        }
4122        serde_json::to_string(&value)
4123    }
4124}
4125///FTM Schema: Contract
4126#[derive(Debug, Clone, Serialize, Deserialize)]
4127#[cfg_attr(feature = "builder", derive(Builder))]
4128#[serde(rename_all = "camelCase")]
4129pub struct Contract {
4130    pub id: String,
4131    #[cfg_attr(feature = "builder", builder(default = "Contract".to_string()))]
4132    pub schema: String,
4133    ///Property: Address
4134    #[serde(skip_serializing_if = "Option::is_none")]
4135    #[cfg_attr(
4136        feature = "builder",
4137        builder(with = |value:impl Into<String>|vec![value.into()])
4138    )]
4139    pub address: Option<Vec<String>>,
4140    ///Property: Address
4141    #[serde(skip_serializing_if = "Option::is_none")]
4142    #[cfg_attr(
4143        feature = "builder",
4144        builder(with = |value:impl Into<String>|vec![value.into()])
4145    )]
4146    pub address_entity: Option<Vec<String>>,
4147    ///Property: Aleph URL
4148    #[serde(skip_serializing_if = "Option::is_none")]
4149    #[cfg_attr(
4150        feature = "builder",
4151        builder(with = |value:impl Into<String>|vec![value.into()])
4152    )]
4153    pub aleph_url: Option<Vec<String>>,
4154    ///Property: Alias
4155    #[serde(skip_serializing_if = "Option::is_none")]
4156    #[cfg_attr(
4157        feature = "builder",
4158        builder(with = |value:impl Into<String>|vec![value.into()])
4159    )]
4160    pub alias: Option<Vec<String>>,
4161    ///Property: Amount
4162    #[serde(
4163        skip_serializing_if = "Option::is_none",
4164        deserialize_with = "deserialize_opt_f64_vec",
4165        default
4166    )]
4167    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
4168    pub amount: Option<Vec<f64>>,
4169    ///Property: Amount in EUR
4170    #[serde(
4171        skip_serializing_if = "Option::is_none",
4172        deserialize_with = "deserialize_opt_f64_vec",
4173        default
4174    )]
4175    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
4176    pub amount_eur: Option<Vec<f64>>,
4177    ///Property: Amount in USD
4178    #[serde(
4179        skip_serializing_if = "Option::is_none",
4180        deserialize_with = "deserialize_opt_f64_vec",
4181        default
4182    )]
4183    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
4184    pub amount_usd: Option<Vec<f64>>,
4185    ///Property: Contract authority
4186    #[serde(skip_serializing_if = "Option::is_none")]
4187    #[cfg_attr(
4188        feature = "builder",
4189        builder(with = |value:impl Into<String>|vec![value.into()])
4190    )]
4191    pub authority: Option<Vec<String>>,
4192    ///Property: Cancelled?
4193    #[serde(skip_serializing_if = "Option::is_none")]
4194    #[cfg_attr(
4195        feature = "builder",
4196        builder(with = |value:impl Into<String>|vec![value.into()])
4197    )]
4198    pub cancelled: Option<Vec<String>>,
4199    ///Property: Classification
4200    #[serde(skip_serializing_if = "Option::is_none")]
4201    #[cfg_attr(
4202        feature = "builder",
4203        builder(with = |value:impl Into<String>|vec![value.into()])
4204    )]
4205    pub classification: Option<Vec<String>>,
4206    ///Property: Contract date
4207    #[serde(skip_serializing_if = "Option::is_none")]
4208    #[cfg_attr(
4209        feature = "builder",
4210        builder(with = |value:impl Into<String>|vec![value.into()])
4211    )]
4212    pub contract_date: Option<Vec<String>>,
4213    ///Property: Country
4214    #[serde(skip_serializing_if = "Option::is_none")]
4215    #[cfg_attr(
4216        feature = "builder",
4217        builder(with = |value:impl Into<String>|vec![value.into()])
4218    )]
4219    pub country: Option<Vec<String>>,
4220    ///Property: Created at
4221    #[serde(skip_serializing_if = "Option::is_none")]
4222    #[cfg_attr(
4223        feature = "builder",
4224        builder(with = |value:impl Into<String>|vec![value.into()])
4225    )]
4226    pub created_at: Option<Vec<String>>,
4227    ///Property: Contract award criteria
4228    #[serde(skip_serializing_if = "Option::is_none")]
4229    #[cfg_attr(
4230        feature = "builder",
4231        builder(with = |value:impl Into<String>|vec![value.into()])
4232    )]
4233    pub criteria: Option<Vec<String>>,
4234    ///Property: Currency
4235    #[serde(skip_serializing_if = "Option::is_none")]
4236    #[cfg_attr(
4237        feature = "builder",
4238        builder(with = |value:impl Into<String>|vec![value.into()])
4239    )]
4240    pub currency: Option<Vec<String>>,
4241    ///Property: Description
4242    #[serde(skip_serializing_if = "Option::is_none")]
4243    #[cfg_attr(
4244        feature = "builder",
4245        builder(with = |value:impl Into<String>|vec![value.into()])
4246    )]
4247    pub description: Option<Vec<String>>,
4248    ///Property: Index text
4249    #[serde(skip_serializing_if = "Option::is_none")]
4250    #[cfg_attr(
4251        feature = "builder",
4252        builder(with = |value:impl Into<String>|vec![value.into()])
4253    )]
4254    pub index_text: Option<Vec<String>>,
4255    ///Property: Keywords
4256    #[serde(skip_serializing_if = "Option::is_none")]
4257    #[cfg_attr(
4258        feature = "builder",
4259        builder(with = |value:impl Into<String>|vec![value.into()])
4260    )]
4261    pub keywords: Option<Vec<String>>,
4262    ///Property: Language
4263    #[serde(skip_serializing_if = "Option::is_none")]
4264    #[cfg_attr(
4265        feature = "builder",
4266        builder(with = |value:impl Into<String>|vec![value.into()])
4267    )]
4268    pub language: Option<Vec<String>>,
4269    ///Property: Procurement method
4270    #[serde(skip_serializing_if = "Option::is_none")]
4271    #[cfg_attr(
4272        feature = "builder",
4273        builder(with = |value:impl Into<String>|vec![value.into()])
4274    )]
4275    pub method: Option<Vec<String>>,
4276    ///Property: Modified on
4277    #[serde(skip_serializing_if = "Option::is_none")]
4278    #[cfg_attr(
4279        feature = "builder",
4280        builder(with = |value:impl Into<String>|vec![value.into()])
4281    )]
4282    pub modified_at: Option<Vec<String>>,
4283    ///Property: Name
4284    #[serde(default)]
4285    #[cfg_attr(
4286        feature = "builder",
4287        builder(with = |value:impl Into<String>|vec![value.into()])
4288    )]
4289    pub name: Vec<String>,
4290    ///Property: Notes
4291    #[serde(skip_serializing_if = "Option::is_none")]
4292    #[cfg_attr(
4293        feature = "builder",
4294        builder(with = |value:impl Into<String>|vec![value.into()])
4295    )]
4296    pub notes: Option<Vec<String>>,
4297    ///Property: Contract Award Notice ID
4298    #[serde(skip_serializing_if = "Option::is_none")]
4299    #[cfg_attr(
4300        feature = "builder",
4301        builder(with = |value:impl Into<String>|vec![value.into()])
4302    )]
4303    pub notice_id: Option<Vec<String>>,
4304    ///Property: Number of awards
4305    #[serde(skip_serializing_if = "Option::is_none")]
4306    #[cfg_attr(
4307        feature = "builder",
4308        builder(with = |value:impl Into<String>|vec![value.into()])
4309    )]
4310    pub number_awards: Option<Vec<String>>,
4311    ///Property: Previous name
4312    #[serde(skip_serializing_if = "Option::is_none")]
4313    #[cfg_attr(
4314        feature = "builder",
4315        builder(with = |value:impl Into<String>|vec![value.into()])
4316    )]
4317    pub previous_name: Option<Vec<String>>,
4318    ///Property: Contract procedure
4319    #[serde(skip_serializing_if = "Option::is_none")]
4320    #[cfg_attr(
4321        feature = "builder",
4322        builder(with = |value:impl Into<String>|vec![value.into()])
4323    )]
4324    pub procedure: Option<Vec<String>>,
4325    ///Property: Procedure number
4326    #[serde(skip_serializing_if = "Option::is_none")]
4327    #[cfg_attr(
4328        feature = "builder",
4329        builder(with = |value:impl Into<String>|vec![value.into()])
4330    )]
4331    pub procedure_number: Option<Vec<String>>,
4332    ///Property: Program
4333    #[serde(skip_serializing_if = "Option::is_none")]
4334    #[cfg_attr(
4335        feature = "builder",
4336        builder(with = |value:impl Into<String>|vec![value.into()])
4337    )]
4338    pub program: Option<Vec<String>>,
4339    ///Property: Program ID
4340    #[serde(skip_serializing_if = "Option::is_none")]
4341    #[cfg_attr(
4342        feature = "builder",
4343        builder(with = |value:impl Into<String>|vec![value.into()])
4344    )]
4345    pub program_id: Option<Vec<String>>,
4346    ///Property: Project
4347    #[serde(skip_serializing_if = "Option::is_none")]
4348    #[cfg_attr(
4349        feature = "builder",
4350        builder(with = |value:impl Into<String>|vec![value.into()])
4351    )]
4352    pub project: Option<Vec<String>>,
4353    ///Property: Source document
4354    #[serde(skip_serializing_if = "Option::is_none")]
4355    #[cfg_attr(
4356        feature = "builder",
4357        builder(with = |value:impl Into<String>|vec![value.into()])
4358    )]
4359    pub proof: Option<Vec<String>>,
4360    ///Property: Publishing source
4361    #[serde(skip_serializing_if = "Option::is_none")]
4362    #[cfg_attr(
4363        feature = "builder",
4364        builder(with = |value:impl Into<String>|vec![value.into()])
4365    )]
4366    pub publisher: Option<Vec<String>>,
4367    ///Property: Publishing source URL
4368    #[serde(skip_serializing_if = "Option::is_none")]
4369    #[cfg_attr(
4370        feature = "builder",
4371        builder(with = |value:impl Into<String>|vec![value.into()])
4372    )]
4373    pub publisher_url: Option<Vec<String>>,
4374    ///Property: Retrieved on
4375    #[serde(skip_serializing_if = "Option::is_none")]
4376    #[cfg_attr(
4377        feature = "builder",
4378        builder(with = |value:impl Into<String>|vec![value.into()])
4379    )]
4380    pub retrieved_at: Option<Vec<String>>,
4381    ///Property: Source link
4382    #[serde(skip_serializing_if = "Option::is_none")]
4383    #[cfg_attr(
4384        feature = "builder",
4385        builder(with = |value:impl Into<String>|vec![value.into()])
4386    )]
4387    pub source_url: Option<Vec<String>>,
4388    ///Property: Status
4389    #[serde(skip_serializing_if = "Option::is_none")]
4390    #[cfg_attr(
4391        feature = "builder",
4392        builder(with = |value:impl Into<String>|vec![value.into()])
4393    )]
4394    pub status: Option<Vec<String>>,
4395    ///Property: Summary
4396    #[serde(skip_serializing_if = "Option::is_none")]
4397    #[cfg_attr(
4398        feature = "builder",
4399        builder(with = |value:impl Into<String>|vec![value.into()])
4400    )]
4401    pub summary: Option<Vec<String>>,
4402    ///Property: Title
4403    #[serde(default)]
4404    #[cfg_attr(
4405        feature = "builder",
4406        builder(with = |value:impl Into<String>|vec![value.into()])
4407    )]
4408    pub title: Vec<String>,
4409    ///Property: Topics
4410    #[serde(skip_serializing_if = "Option::is_none")]
4411    #[cfg_attr(
4412        feature = "builder",
4413        builder(with = |value:impl Into<String>|vec![value.into()])
4414    )]
4415    pub topics: Option<Vec<String>>,
4416    ///Property: Type
4417    #[serde(skip_serializing_if = "Option::is_none")]
4418    #[cfg_attr(
4419        feature = "builder",
4420        builder(with = |value:impl Into<String>|vec![value.into()])
4421    )]
4422    pub type_: Option<Vec<String>>,
4423    ///Property: Weak alias
4424    #[serde(skip_serializing_if = "Option::is_none")]
4425    #[cfg_attr(
4426        feature = "builder",
4427        builder(with = |value:impl Into<String>|vec![value.into()])
4428    )]
4429    pub weak_alias: Option<Vec<String>>,
4430    ///Property: Wikidata ID
4431    #[serde(skip_serializing_if = "Option::is_none")]
4432    #[cfg_attr(
4433        feature = "builder",
4434        builder(with = |value:impl Into<String>|vec![value.into()])
4435    )]
4436    pub wikidata_id: Option<Vec<String>>,
4437    ///Property: Wikipedia Article
4438    #[serde(skip_serializing_if = "Option::is_none")]
4439    #[cfg_attr(
4440        feature = "builder",
4441        builder(with = |value:impl Into<String>|vec![value.into()])
4442    )]
4443    pub wikipedia_url: Option<Vec<String>>,
4444}
4445impl Contract {
4446    /// Create a new entity with the given ID
4447    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
4448    pub fn new(id: impl Into<String>) -> Self {
4449        Self {
4450            id: id.into(),
4451            schema: "Contract".to_string(),
4452            address: None,
4453            address_entity: None,
4454            aleph_url: None,
4455            alias: None,
4456            amount: None,
4457            amount_eur: None,
4458            amount_usd: None,
4459            authority: None,
4460            cancelled: None,
4461            classification: None,
4462            contract_date: None,
4463            country: None,
4464            created_at: None,
4465            criteria: None,
4466            currency: None,
4467            description: None,
4468            index_text: None,
4469            keywords: None,
4470            language: None,
4471            method: None,
4472            modified_at: None,
4473            name: Vec::new(),
4474            notes: None,
4475            notice_id: None,
4476            number_awards: None,
4477            previous_name: None,
4478            procedure: None,
4479            procedure_number: None,
4480            program: None,
4481            program_id: None,
4482            project: None,
4483            proof: None,
4484            publisher: None,
4485            publisher_url: None,
4486            retrieved_at: None,
4487            source_url: None,
4488            status: None,
4489            summary: None,
4490            title: Vec::new(),
4491            topics: None,
4492            type_: None,
4493            weak_alias: None,
4494            wikidata_id: None,
4495            wikipedia_url: None,
4496        }
4497    }
4498    /// Get the schema name
4499    pub fn schema_name() -> &'static str {
4500        "Contract"
4501    }
4502    /// Serialize to standard FTM nested JSON format
4503    ///
4504    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
4505    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
4506        let mut value = serde_json::to_value(self)?;
4507        if let Some(obj) = value.as_object_mut() {
4508            let id = obj.remove("id");
4509            let schema = obj.remove("schema");
4510            let properties = serde_json::Value::Object(std::mem::take(obj));
4511            if let Some(id) = id {
4512                obj.insert("id".into(), id);
4513            }
4514            if let Some(schema) = schema {
4515                obj.insert("schema".into(), schema);
4516            }
4517            obj.insert("properties".into(), properties);
4518        }
4519        serde_json::to_string(&value)
4520    }
4521}
4522///FTM Schema: Contract award
4523#[derive(Debug, Clone, Serialize, Deserialize)]
4524#[cfg_attr(feature = "builder", derive(Builder))]
4525#[serde(rename_all = "camelCase")]
4526pub struct ContractAward {
4527    pub id: String,
4528    #[cfg_attr(feature = "builder", builder(default = "ContractAward".to_string()))]
4529    pub schema: String,
4530    ///Property: Aleph URL
4531    #[serde(skip_serializing_if = "Option::is_none")]
4532    #[cfg_attr(
4533        feature = "builder",
4534        builder(with = |value:impl Into<String>|vec![value.into()])
4535    )]
4536    pub aleph_url: Option<Vec<String>>,
4537    ///Property: Amended
4538    #[serde(skip_serializing_if = "Option::is_none")]
4539    #[cfg_attr(
4540        feature = "builder",
4541        builder(with = |value:impl Into<String>|vec![value.into()])
4542    )]
4543    pub amended: Option<Vec<String>>,
4544    ///Property: Amount
4545    #[serde(
4546        skip_serializing_if = "Option::is_none",
4547        deserialize_with = "deserialize_opt_f64_vec",
4548        default
4549    )]
4550    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
4551    pub amount: Option<Vec<f64>>,
4552    ///Property: Amount in EUR
4553    #[serde(
4554        skip_serializing_if = "Option::is_none",
4555        deserialize_with = "deserialize_opt_f64_vec",
4556        default
4557    )]
4558    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
4559    pub amount_eur: Option<Vec<f64>>,
4560    ///Property: Amount in USD
4561    #[serde(
4562        skip_serializing_if = "Option::is_none",
4563        deserialize_with = "deserialize_opt_f64_vec",
4564        default
4565    )]
4566    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
4567    pub amount_usd: Option<Vec<f64>>,
4568    ///Property: Call For Tenders
4569    #[serde(skip_serializing_if = "Option::is_none")]
4570    #[cfg_attr(
4571        feature = "builder",
4572        builder(with = |value:impl Into<String>|vec![value.into()])
4573    )]
4574    pub call_for_tenders: Option<Vec<String>>,
4575    ///Property: Contract
4576    #[serde(default)]
4577    #[cfg_attr(
4578        feature = "builder",
4579        builder(with = |value:impl Into<String>|vec![value.into()])
4580    )]
4581    pub contract: Vec<String>,
4582    ///Property: CPV code
4583    #[serde(skip_serializing_if = "Option::is_none")]
4584    #[cfg_attr(
4585        feature = "builder",
4586        builder(with = |value:impl Into<String>|vec![value.into()])
4587    )]
4588    pub cpv_code: Option<Vec<String>>,
4589    ///Property: Currency
4590    #[serde(skip_serializing_if = "Option::is_none")]
4591    #[cfg_attr(
4592        feature = "builder",
4593        builder(with = |value:impl Into<String>|vec![value.into()])
4594    )]
4595    pub currency: Option<Vec<String>>,
4596    ///Property: Date
4597    #[serde(skip_serializing_if = "Option::is_none")]
4598    #[cfg_attr(
4599        feature = "builder",
4600        builder(with = |value:impl Into<String>|vec![value.into()])
4601    )]
4602    pub date: Option<Vec<String>>,
4603    ///Property: Decision reason
4604    #[serde(skip_serializing_if = "Option::is_none")]
4605    #[cfg_attr(
4606        feature = "builder",
4607        builder(with = |value:impl Into<String>|vec![value.into()])
4608    )]
4609    pub decision_reason: Option<Vec<String>>,
4610    ///Property: Description
4611    #[serde(skip_serializing_if = "Option::is_none")]
4612    #[cfg_attr(
4613        feature = "builder",
4614        builder(with = |value:impl Into<String>|vec![value.into()])
4615    )]
4616    pub description: Option<Vec<String>>,
4617    ///Property: Document number
4618    #[serde(skip_serializing_if = "Option::is_none")]
4619    #[cfg_attr(
4620        feature = "builder",
4621        builder(with = |value:impl Into<String>|vec![value.into()])
4622    )]
4623    pub document_number: Option<Vec<String>>,
4624    ///Property: Document type
4625    #[serde(skip_serializing_if = "Option::is_none")]
4626    #[cfg_attr(
4627        feature = "builder",
4628        builder(with = |value:impl Into<String>|vec![value.into()])
4629    )]
4630    pub document_type: Option<Vec<String>>,
4631    ///Property: End date
4632    #[serde(skip_serializing_if = "Option::is_none")]
4633    #[cfg_attr(
4634        feature = "builder",
4635        builder(with = |value:impl Into<String>|vec![value.into()])
4636    )]
4637    pub end_date: Option<Vec<String>>,
4638    ///Property: Index text
4639    #[serde(skip_serializing_if = "Option::is_none")]
4640    #[cfg_attr(
4641        feature = "builder",
4642        builder(with = |value:impl Into<String>|vec![value.into()])
4643    )]
4644    pub index_text: Option<Vec<String>>,
4645    ///Property: Lot number
4646    #[serde(skip_serializing_if = "Option::is_none")]
4647    #[cfg_attr(
4648        feature = "builder",
4649        builder(with = |value:impl Into<String>|vec![value.into()])
4650    )]
4651    pub lot_number: Option<Vec<String>>,
4652    ///Property: Modified on
4653    #[serde(skip_serializing_if = "Option::is_none")]
4654    #[cfg_attr(
4655        feature = "builder",
4656        builder(with = |value:impl Into<String>|vec![value.into()])
4657    )]
4658    pub modified_at: Option<Vec<String>>,
4659    ///Property: Detected names
4660    #[serde(skip_serializing_if = "Option::is_none")]
4661    #[cfg_attr(
4662        feature = "builder",
4663        builder(with = |value:impl Into<String>|vec![value.into()])
4664    )]
4665    pub names_mentioned: Option<Vec<String>>,
4666    ///Property: NUTS code
4667    #[serde(skip_serializing_if = "Option::is_none")]
4668    #[cfg_attr(
4669        feature = "builder",
4670        builder(with = |value:impl Into<String>|vec![value.into()])
4671    )]
4672    pub nuts_code: Option<Vec<String>>,
4673    ///Property: Source document
4674    #[serde(skip_serializing_if = "Option::is_none")]
4675    #[cfg_attr(
4676        feature = "builder",
4677        builder(with = |value:impl Into<String>|vec![value.into()])
4678    )]
4679    pub proof: Option<Vec<String>>,
4680    ///Property: Publishing source
4681    #[serde(skip_serializing_if = "Option::is_none")]
4682    #[cfg_attr(
4683        feature = "builder",
4684        builder(with = |value:impl Into<String>|vec![value.into()])
4685    )]
4686    pub publisher: Option<Vec<String>>,
4687    ///Property: Publishing source URL
4688    #[serde(skip_serializing_if = "Option::is_none")]
4689    #[cfg_attr(
4690        feature = "builder",
4691        builder(with = |value:impl Into<String>|vec![value.into()])
4692    )]
4693    pub publisher_url: Option<Vec<String>>,
4694    ///Property: Record ID
4695    #[serde(skip_serializing_if = "Option::is_none")]
4696    #[cfg_attr(
4697        feature = "builder",
4698        builder(with = |value:impl Into<String>|vec![value.into()])
4699    )]
4700    pub record_id: Option<Vec<String>>,
4701    ///Property: Retrieved on
4702    #[serde(skip_serializing_if = "Option::is_none")]
4703    #[cfg_attr(
4704        feature = "builder",
4705        builder(with = |value:impl Into<String>|vec![value.into()])
4706    )]
4707    pub retrieved_at: Option<Vec<String>>,
4708    ///Property: Role
4709    #[serde(skip_serializing_if = "Option::is_none")]
4710    #[cfg_attr(
4711        feature = "builder",
4712        builder(with = |value:impl Into<String>|vec![value.into()])
4713    )]
4714    pub role: Option<Vec<String>>,
4715    ///Property: Source link
4716    #[serde(skip_serializing_if = "Option::is_none")]
4717    #[cfg_attr(
4718        feature = "builder",
4719        builder(with = |value:impl Into<String>|vec![value.into()])
4720    )]
4721    pub source_url: Option<Vec<String>>,
4722    ///Property: Start date
4723    #[serde(skip_serializing_if = "Option::is_none")]
4724    #[cfg_attr(
4725        feature = "builder",
4726        builder(with = |value:impl Into<String>|vec![value.into()])
4727    )]
4728    pub start_date: Option<Vec<String>>,
4729    ///Property: Status
4730    #[serde(skip_serializing_if = "Option::is_none")]
4731    #[cfg_attr(
4732        feature = "builder",
4733        builder(with = |value:impl Into<String>|vec![value.into()])
4734    )]
4735    pub status: Option<Vec<String>>,
4736    ///Property: Summary
4737    #[serde(skip_serializing_if = "Option::is_none")]
4738    #[cfg_attr(
4739        feature = "builder",
4740        builder(with = |value:impl Into<String>|vec![value.into()])
4741    )]
4742    pub summary: Option<Vec<String>>,
4743    ///Property: Supplier
4744    #[serde(default)]
4745    #[cfg_attr(
4746        feature = "builder",
4747        builder(with = |value:impl Into<String>|vec![value.into()])
4748    )]
4749    pub supplier: Vec<String>,
4750}
4751impl ContractAward {
4752    /// Create a new entity with the given ID
4753    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
4754    pub fn new(id: impl Into<String>) -> Self {
4755        Self {
4756            id: id.into(),
4757            schema: "ContractAward".to_string(),
4758            aleph_url: None,
4759            amended: None,
4760            amount: None,
4761            amount_eur: None,
4762            amount_usd: None,
4763            call_for_tenders: None,
4764            contract: Vec::new(),
4765            cpv_code: None,
4766            currency: None,
4767            date: None,
4768            decision_reason: None,
4769            description: None,
4770            document_number: None,
4771            document_type: None,
4772            end_date: None,
4773            index_text: None,
4774            lot_number: None,
4775            modified_at: None,
4776            names_mentioned: None,
4777            nuts_code: None,
4778            proof: None,
4779            publisher: None,
4780            publisher_url: None,
4781            record_id: None,
4782            retrieved_at: None,
4783            role: None,
4784            source_url: None,
4785            start_date: None,
4786            status: None,
4787            summary: None,
4788            supplier: Vec::new(),
4789        }
4790    }
4791    /// Get the schema name
4792    pub fn schema_name() -> &'static str {
4793        "ContractAward"
4794    }
4795    /// Serialize to standard FTM nested JSON format
4796    ///
4797    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
4798    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
4799        let mut value = serde_json::to_value(self)?;
4800        if let Some(obj) = value.as_object_mut() {
4801            let id = obj.remove("id");
4802            let schema = obj.remove("schema");
4803            let properties = serde_json::Value::Object(std::mem::take(obj));
4804            if let Some(id) = id {
4805                obj.insert("id".into(), id);
4806            }
4807            if let Some(schema) = schema {
4808                obj.insert("schema".into(), schema);
4809            }
4810            obj.insert("properties".into(), properties);
4811        }
4812        serde_json::to_string(&value)
4813    }
4814}
4815///FTM Schema: Court case
4816#[derive(Debug, Clone, Serialize, Deserialize)]
4817#[cfg_attr(feature = "builder", derive(Builder))]
4818#[serde(rename_all = "camelCase")]
4819pub struct CourtCase {
4820    pub id: String,
4821    #[cfg_attr(feature = "builder", builder(default = "CourtCase".to_string()))]
4822    pub schema: String,
4823    ///Property: Address
4824    #[serde(skip_serializing_if = "Option::is_none")]
4825    #[cfg_attr(
4826        feature = "builder",
4827        builder(with = |value:impl Into<String>|vec![value.into()])
4828    )]
4829    pub address: Option<Vec<String>>,
4830    ///Property: Address
4831    #[serde(skip_serializing_if = "Option::is_none")]
4832    #[cfg_attr(
4833        feature = "builder",
4834        builder(with = |value:impl Into<String>|vec![value.into()])
4835    )]
4836    pub address_entity: Option<Vec<String>>,
4837    ///Property: Aleph URL
4838    #[serde(skip_serializing_if = "Option::is_none")]
4839    #[cfg_attr(
4840        feature = "builder",
4841        builder(with = |value:impl Into<String>|vec![value.into()])
4842    )]
4843    pub aleph_url: Option<Vec<String>>,
4844    ///Property: Alias
4845    #[serde(skip_serializing_if = "Option::is_none")]
4846    #[cfg_attr(
4847        feature = "builder",
4848        builder(with = |value:impl Into<String>|vec![value.into()])
4849    )]
4850    pub alias: Option<Vec<String>>,
4851    ///Property: Case number
4852    #[serde(skip_serializing_if = "Option::is_none")]
4853    #[cfg_attr(
4854        feature = "builder",
4855        builder(with = |value:impl Into<String>|vec![value.into()])
4856    )]
4857    pub case_number: Option<Vec<String>>,
4858    ///Property: Category
4859    #[serde(skip_serializing_if = "Option::is_none")]
4860    #[cfg_attr(
4861        feature = "builder",
4862        builder(with = |value:impl Into<String>|vec![value.into()])
4863    )]
4864    pub category: Option<Vec<String>>,
4865    ///Property: Close date
4866    #[serde(skip_serializing_if = "Option::is_none")]
4867    #[cfg_attr(
4868        feature = "builder",
4869        builder(with = |value:impl Into<String>|vec![value.into()])
4870    )]
4871    pub close_date: Option<Vec<String>>,
4872    ///Property: Country
4873    #[serde(skip_serializing_if = "Option::is_none")]
4874    #[cfg_attr(
4875        feature = "builder",
4876        builder(with = |value:impl Into<String>|vec![value.into()])
4877    )]
4878    pub country: Option<Vec<String>>,
4879    ///Property: Court
4880    #[serde(skip_serializing_if = "Option::is_none")]
4881    #[cfg_attr(
4882        feature = "builder",
4883        builder(with = |value:impl Into<String>|vec![value.into()])
4884    )]
4885    pub court: Option<Vec<String>>,
4886    ///Property: Created at
4887    #[serde(skip_serializing_if = "Option::is_none")]
4888    #[cfg_attr(
4889        feature = "builder",
4890        builder(with = |value:impl Into<String>|vec![value.into()])
4891    )]
4892    pub created_at: Option<Vec<String>>,
4893    ///Property: Description
4894    #[serde(skip_serializing_if = "Option::is_none")]
4895    #[cfg_attr(
4896        feature = "builder",
4897        builder(with = |value:impl Into<String>|vec![value.into()])
4898    )]
4899    pub description: Option<Vec<String>>,
4900    ///Property: File date
4901    #[serde(skip_serializing_if = "Option::is_none")]
4902    #[cfg_attr(
4903        feature = "builder",
4904        builder(with = |value:impl Into<String>|vec![value.into()])
4905    )]
4906    pub file_date: Option<Vec<String>>,
4907    ///Property: Index text
4908    #[serde(skip_serializing_if = "Option::is_none")]
4909    #[cfg_attr(
4910        feature = "builder",
4911        builder(with = |value:impl Into<String>|vec![value.into()])
4912    )]
4913    pub index_text: Option<Vec<String>>,
4914    ///Property: Keywords
4915    #[serde(skip_serializing_if = "Option::is_none")]
4916    #[cfg_attr(
4917        feature = "builder",
4918        builder(with = |value:impl Into<String>|vec![value.into()])
4919    )]
4920    pub keywords: Option<Vec<String>>,
4921    ///Property: Modified on
4922    #[serde(skip_serializing_if = "Option::is_none")]
4923    #[cfg_attr(
4924        feature = "builder",
4925        builder(with = |value:impl Into<String>|vec![value.into()])
4926    )]
4927    pub modified_at: Option<Vec<String>>,
4928    ///Property: Name
4929    #[serde(default)]
4930    #[cfg_attr(
4931        feature = "builder",
4932        builder(with = |value:impl Into<String>|vec![value.into()])
4933    )]
4934    pub name: Vec<String>,
4935    ///Property: Notes
4936    #[serde(skip_serializing_if = "Option::is_none")]
4937    #[cfg_attr(
4938        feature = "builder",
4939        builder(with = |value:impl Into<String>|vec![value.into()])
4940    )]
4941    pub notes: Option<Vec<String>>,
4942    ///Property: Previous name
4943    #[serde(skip_serializing_if = "Option::is_none")]
4944    #[cfg_attr(
4945        feature = "builder",
4946        builder(with = |value:impl Into<String>|vec![value.into()])
4947    )]
4948    pub previous_name: Option<Vec<String>>,
4949    ///Property: Program
4950    #[serde(skip_serializing_if = "Option::is_none")]
4951    #[cfg_attr(
4952        feature = "builder",
4953        builder(with = |value:impl Into<String>|vec![value.into()])
4954    )]
4955    pub program: Option<Vec<String>>,
4956    ///Property: Program ID
4957    #[serde(skip_serializing_if = "Option::is_none")]
4958    #[cfg_attr(
4959        feature = "builder",
4960        builder(with = |value:impl Into<String>|vec![value.into()])
4961    )]
4962    pub program_id: Option<Vec<String>>,
4963    ///Property: Source document
4964    #[serde(skip_serializing_if = "Option::is_none")]
4965    #[cfg_attr(
4966        feature = "builder",
4967        builder(with = |value:impl Into<String>|vec![value.into()])
4968    )]
4969    pub proof: Option<Vec<String>>,
4970    ///Property: Publishing source
4971    #[serde(skip_serializing_if = "Option::is_none")]
4972    #[cfg_attr(
4973        feature = "builder",
4974        builder(with = |value:impl Into<String>|vec![value.into()])
4975    )]
4976    pub publisher: Option<Vec<String>>,
4977    ///Property: Publishing source URL
4978    #[serde(skip_serializing_if = "Option::is_none")]
4979    #[cfg_attr(
4980        feature = "builder",
4981        builder(with = |value:impl Into<String>|vec![value.into()])
4982    )]
4983    pub publisher_url: Option<Vec<String>>,
4984    ///Property: Retrieved on
4985    #[serde(skip_serializing_if = "Option::is_none")]
4986    #[cfg_attr(
4987        feature = "builder",
4988        builder(with = |value:impl Into<String>|vec![value.into()])
4989    )]
4990    pub retrieved_at: Option<Vec<String>>,
4991    ///Property: Source link
4992    #[serde(skip_serializing_if = "Option::is_none")]
4993    #[cfg_attr(
4994        feature = "builder",
4995        builder(with = |value:impl Into<String>|vec![value.into()])
4996    )]
4997    pub source_url: Option<Vec<String>>,
4998    ///Property: Status
4999    #[serde(skip_serializing_if = "Option::is_none")]
5000    #[cfg_attr(
5001        feature = "builder",
5002        builder(with = |value:impl Into<String>|vec![value.into()])
5003    )]
5004    pub status: Option<Vec<String>>,
5005    ///Property: Summary
5006    #[serde(skip_serializing_if = "Option::is_none")]
5007    #[cfg_attr(
5008        feature = "builder",
5009        builder(with = |value:impl Into<String>|vec![value.into()])
5010    )]
5011    pub summary: Option<Vec<String>>,
5012    ///Property: Topics
5013    #[serde(skip_serializing_if = "Option::is_none")]
5014    #[cfg_attr(
5015        feature = "builder",
5016        builder(with = |value:impl Into<String>|vec![value.into()])
5017    )]
5018    pub topics: Option<Vec<String>>,
5019    ///Property: Type
5020    #[serde(skip_serializing_if = "Option::is_none")]
5021    #[cfg_attr(
5022        feature = "builder",
5023        builder(with = |value:impl Into<String>|vec![value.into()])
5024    )]
5025    pub type_: Option<Vec<String>>,
5026    ///Property: Weak alias
5027    #[serde(skip_serializing_if = "Option::is_none")]
5028    #[cfg_attr(
5029        feature = "builder",
5030        builder(with = |value:impl Into<String>|vec![value.into()])
5031    )]
5032    pub weak_alias: Option<Vec<String>>,
5033    ///Property: Wikidata ID
5034    #[serde(skip_serializing_if = "Option::is_none")]
5035    #[cfg_attr(
5036        feature = "builder",
5037        builder(with = |value:impl Into<String>|vec![value.into()])
5038    )]
5039    pub wikidata_id: Option<Vec<String>>,
5040    ///Property: Wikipedia Article
5041    #[serde(skip_serializing_if = "Option::is_none")]
5042    #[cfg_attr(
5043        feature = "builder",
5044        builder(with = |value:impl Into<String>|vec![value.into()])
5045    )]
5046    pub wikipedia_url: Option<Vec<String>>,
5047}
5048impl CourtCase {
5049    /// Create a new entity with the given ID
5050    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
5051    pub fn new(id: impl Into<String>) -> Self {
5052        Self {
5053            id: id.into(),
5054            schema: "CourtCase".to_string(),
5055            address: None,
5056            address_entity: None,
5057            aleph_url: None,
5058            alias: None,
5059            case_number: None,
5060            category: None,
5061            close_date: None,
5062            country: None,
5063            court: None,
5064            created_at: None,
5065            description: None,
5066            file_date: None,
5067            index_text: None,
5068            keywords: None,
5069            modified_at: None,
5070            name: Vec::new(),
5071            notes: None,
5072            previous_name: None,
5073            program: None,
5074            program_id: None,
5075            proof: None,
5076            publisher: None,
5077            publisher_url: None,
5078            retrieved_at: None,
5079            source_url: None,
5080            status: None,
5081            summary: None,
5082            topics: None,
5083            type_: None,
5084            weak_alias: None,
5085            wikidata_id: None,
5086            wikipedia_url: None,
5087        }
5088    }
5089    /// Get the schema name
5090    pub fn schema_name() -> &'static str {
5091        "CourtCase"
5092    }
5093    /// Serialize to standard FTM nested JSON format
5094    ///
5095    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
5096    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
5097        let mut value = serde_json::to_value(self)?;
5098        if let Some(obj) = value.as_object_mut() {
5099            let id = obj.remove("id");
5100            let schema = obj.remove("schema");
5101            let properties = serde_json::Value::Object(std::mem::take(obj));
5102            if let Some(id) = id {
5103                obj.insert("id".into(), id);
5104            }
5105            if let Some(schema) = schema {
5106                obj.insert("schema".into(), schema);
5107            }
5108            obj.insert("properties".into(), properties);
5109        }
5110        serde_json::to_string(&value)
5111    }
5112}
5113///FTM Schema: Case party
5114#[derive(Debug, Clone, Serialize, Deserialize)]
5115#[cfg_attr(feature = "builder", derive(Builder))]
5116#[serde(rename_all = "camelCase")]
5117pub struct CourtCaseParty {
5118    pub id: String,
5119    #[cfg_attr(feature = "builder", builder(default = "CourtCaseParty".to_string()))]
5120    pub schema: String,
5121    ///Property: Aleph URL
5122    #[serde(skip_serializing_if = "Option::is_none")]
5123    #[cfg_attr(
5124        feature = "builder",
5125        builder(with = |value:impl Into<String>|vec![value.into()])
5126    )]
5127    pub aleph_url: Option<Vec<String>>,
5128    ///Property: Case
5129    #[serde(default)]
5130    #[cfg_attr(
5131        feature = "builder",
5132        builder(with = |value:impl Into<String>|vec![value.into()])
5133    )]
5134    pub case: Vec<String>,
5135    ///Property: Date
5136    #[serde(skip_serializing_if = "Option::is_none")]
5137    #[cfg_attr(
5138        feature = "builder",
5139        builder(with = |value:impl Into<String>|vec![value.into()])
5140    )]
5141    pub date: Option<Vec<String>>,
5142    ///Property: Description
5143    #[serde(skip_serializing_if = "Option::is_none")]
5144    #[cfg_attr(
5145        feature = "builder",
5146        builder(with = |value:impl Into<String>|vec![value.into()])
5147    )]
5148    pub description: Option<Vec<String>>,
5149    ///Property: End date
5150    #[serde(skip_serializing_if = "Option::is_none")]
5151    #[cfg_attr(
5152        feature = "builder",
5153        builder(with = |value:impl Into<String>|vec![value.into()])
5154    )]
5155    pub end_date: Option<Vec<String>>,
5156    ///Property: Index text
5157    #[serde(skip_serializing_if = "Option::is_none")]
5158    #[cfg_attr(
5159        feature = "builder",
5160        builder(with = |value:impl Into<String>|vec![value.into()])
5161    )]
5162    pub index_text: Option<Vec<String>>,
5163    ///Property: Modified on
5164    #[serde(skip_serializing_if = "Option::is_none")]
5165    #[cfg_attr(
5166        feature = "builder",
5167        builder(with = |value:impl Into<String>|vec![value.into()])
5168    )]
5169    pub modified_at: Option<Vec<String>>,
5170    ///Property: Detected names
5171    #[serde(skip_serializing_if = "Option::is_none")]
5172    #[cfg_attr(
5173        feature = "builder",
5174        builder(with = |value:impl Into<String>|vec![value.into()])
5175    )]
5176    pub names_mentioned: Option<Vec<String>>,
5177    ///Property: Party
5178    #[serde(default)]
5179    #[cfg_attr(
5180        feature = "builder",
5181        builder(with = |value:impl Into<String>|vec![value.into()])
5182    )]
5183    pub party: Vec<String>,
5184    ///Property: Source document
5185    #[serde(skip_serializing_if = "Option::is_none")]
5186    #[cfg_attr(
5187        feature = "builder",
5188        builder(with = |value:impl Into<String>|vec![value.into()])
5189    )]
5190    pub proof: Option<Vec<String>>,
5191    ///Property: Publishing source
5192    #[serde(skip_serializing_if = "Option::is_none")]
5193    #[cfg_attr(
5194        feature = "builder",
5195        builder(with = |value:impl Into<String>|vec![value.into()])
5196    )]
5197    pub publisher: Option<Vec<String>>,
5198    ///Property: Publishing source URL
5199    #[serde(skip_serializing_if = "Option::is_none")]
5200    #[cfg_attr(
5201        feature = "builder",
5202        builder(with = |value:impl Into<String>|vec![value.into()])
5203    )]
5204    pub publisher_url: Option<Vec<String>>,
5205    ///Property: Record ID
5206    #[serde(skip_serializing_if = "Option::is_none")]
5207    #[cfg_attr(
5208        feature = "builder",
5209        builder(with = |value:impl Into<String>|vec![value.into()])
5210    )]
5211    pub record_id: Option<Vec<String>>,
5212    ///Property: Retrieved on
5213    #[serde(skip_serializing_if = "Option::is_none")]
5214    #[cfg_attr(
5215        feature = "builder",
5216        builder(with = |value:impl Into<String>|vec![value.into()])
5217    )]
5218    pub retrieved_at: Option<Vec<String>>,
5219    ///Property: Role
5220    #[serde(skip_serializing_if = "Option::is_none")]
5221    #[cfg_attr(
5222        feature = "builder",
5223        builder(with = |value:impl Into<String>|vec![value.into()])
5224    )]
5225    pub role: Option<Vec<String>>,
5226    ///Property: Source link
5227    #[serde(skip_serializing_if = "Option::is_none")]
5228    #[cfg_attr(
5229        feature = "builder",
5230        builder(with = |value:impl Into<String>|vec![value.into()])
5231    )]
5232    pub source_url: Option<Vec<String>>,
5233    ///Property: Start date
5234    #[serde(skip_serializing_if = "Option::is_none")]
5235    #[cfg_attr(
5236        feature = "builder",
5237        builder(with = |value:impl Into<String>|vec![value.into()])
5238    )]
5239    pub start_date: Option<Vec<String>>,
5240    ///Property: Status
5241    #[serde(skip_serializing_if = "Option::is_none")]
5242    #[cfg_attr(
5243        feature = "builder",
5244        builder(with = |value:impl Into<String>|vec![value.into()])
5245    )]
5246    pub status: Option<Vec<String>>,
5247    ///Property: Summary
5248    #[serde(skip_serializing_if = "Option::is_none")]
5249    #[cfg_attr(
5250        feature = "builder",
5251        builder(with = |value:impl Into<String>|vec![value.into()])
5252    )]
5253    pub summary: Option<Vec<String>>,
5254}
5255impl CourtCaseParty {
5256    /// Create a new entity with the given ID
5257    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
5258    pub fn new(id: impl Into<String>) -> Self {
5259        Self {
5260            id: id.into(),
5261            schema: "CourtCaseParty".to_string(),
5262            aleph_url: None,
5263            case: Vec::new(),
5264            date: None,
5265            description: None,
5266            end_date: None,
5267            index_text: None,
5268            modified_at: None,
5269            names_mentioned: None,
5270            party: Vec::new(),
5271            proof: None,
5272            publisher: None,
5273            publisher_url: None,
5274            record_id: None,
5275            retrieved_at: None,
5276            role: None,
5277            source_url: None,
5278            start_date: None,
5279            status: None,
5280            summary: None,
5281        }
5282    }
5283    /// Get the schema name
5284    pub fn schema_name() -> &'static str {
5285        "CourtCaseParty"
5286    }
5287    /// Serialize to standard FTM nested JSON format
5288    ///
5289    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
5290    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
5291        let mut value = serde_json::to_value(self)?;
5292        if let Some(obj) = value.as_object_mut() {
5293            let id = obj.remove("id");
5294            let schema = obj.remove("schema");
5295            let properties = serde_json::Value::Object(std::mem::take(obj));
5296            if let Some(id) = id {
5297                obj.insert("id".into(), id);
5298            }
5299            if let Some(schema) = schema {
5300                obj.insert("schema".into(), schema);
5301            }
5302            obj.insert("properties".into(), properties);
5303        }
5304        serde_json::to_string(&value)
5305    }
5306}
5307///FTM Schema: Cryptocurrency wallet
5308#[derive(Debug, Clone, Serialize, Deserialize)]
5309#[cfg_attr(feature = "builder", derive(Builder))]
5310#[serde(rename_all = "camelCase")]
5311pub struct CryptoWallet {
5312    pub id: String,
5313    #[cfg_attr(feature = "builder", builder(default = "CryptoWallet".to_string()))]
5314    pub schema: String,
5315    ///Property: Account ID
5316    #[serde(skip_serializing_if = "Option::is_none")]
5317    #[cfg_attr(
5318        feature = "builder",
5319        builder(with = |value:impl Into<String>|vec![value.into()])
5320    )]
5321    pub account_id: Option<Vec<String>>,
5322    ///Property: Address
5323    #[serde(skip_serializing_if = "Option::is_none")]
5324    #[cfg_attr(
5325        feature = "builder",
5326        builder(with = |value:impl Into<String>|vec![value.into()])
5327    )]
5328    pub address: Option<Vec<String>>,
5329    ///Property: Address
5330    #[serde(skip_serializing_if = "Option::is_none")]
5331    #[cfg_attr(
5332        feature = "builder",
5333        builder(with = |value:impl Into<String>|vec![value.into()])
5334    )]
5335    pub address_entity: Option<Vec<String>>,
5336    ///Property: Aleph URL
5337    #[serde(skip_serializing_if = "Option::is_none")]
5338    #[cfg_attr(
5339        feature = "builder",
5340        builder(with = |value:impl Into<String>|vec![value.into()])
5341    )]
5342    pub aleph_url: Option<Vec<String>>,
5343    ///Property: Alias
5344    #[serde(skip_serializing_if = "Option::is_none")]
5345    #[cfg_attr(
5346        feature = "builder",
5347        builder(with = |value:impl Into<String>|vec![value.into()])
5348    )]
5349    pub alias: Option<Vec<String>>,
5350    ///Property: Amount
5351    #[serde(
5352        skip_serializing_if = "Option::is_none",
5353        deserialize_with = "deserialize_opt_f64_vec",
5354        default
5355    )]
5356    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
5357    pub amount: Option<Vec<f64>>,
5358    ///Property: Amount in EUR
5359    #[serde(
5360        skip_serializing_if = "Option::is_none",
5361        deserialize_with = "deserialize_opt_f64_vec",
5362        default
5363    )]
5364    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
5365    pub amount_eur: Option<Vec<f64>>,
5366    ///Property: Amount in USD
5367    #[serde(
5368        skip_serializing_if = "Option::is_none",
5369        deserialize_with = "deserialize_opt_f64_vec",
5370        default
5371    )]
5372    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
5373    pub amount_usd: Option<Vec<f64>>,
5374    ///Property: Balance
5375    #[serde(
5376        skip_serializing_if = "Option::is_none",
5377        deserialize_with = "deserialize_opt_f64_vec",
5378        default
5379    )]
5380    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
5381    pub balance: Option<Vec<f64>>,
5382    ///Property: Balance date
5383    #[serde(skip_serializing_if = "Option::is_none")]
5384    #[cfg_attr(
5385        feature = "builder",
5386        builder(with = |value:impl Into<String>|vec![value.into()])
5387    )]
5388    pub balance_date: Option<Vec<String>>,
5389    ///Property: Blockchain
5390    #[serde(skip_serializing_if = "Option::is_none")]
5391    #[cfg_attr(
5392        feature = "builder",
5393        builder(with = |value:impl Into<String>|vec![value.into()])
5394    )]
5395    pub blockchain: Option<Vec<String>>,
5396    ///Property: Country
5397    #[serde(skip_serializing_if = "Option::is_none")]
5398    #[cfg_attr(
5399        feature = "builder",
5400        builder(with = |value:impl Into<String>|vec![value.into()])
5401    )]
5402    pub country: Option<Vec<String>>,
5403    ///Property: Created at
5404    #[serde(skip_serializing_if = "Option::is_none")]
5405    #[cfg_attr(
5406        feature = "builder",
5407        builder(with = |value:impl Into<String>|vec![value.into()])
5408    )]
5409    pub created_at: Option<Vec<String>>,
5410    ///Property: Creation date
5411    #[serde(skip_serializing_if = "Option::is_none")]
5412    #[cfg_attr(
5413        feature = "builder",
5414        builder(with = |value:impl Into<String>|vec![value.into()])
5415    )]
5416    pub creation_date: Option<Vec<String>>,
5417    ///Property: Crypto address
5418    #[serde(skip_serializing_if = "Option::is_none")]
5419    #[cfg_attr(
5420        feature = "builder",
5421        builder(with = |value:impl Into<String>|vec![value.into()])
5422    )]
5423    pub crypto_address: Option<Vec<String>>,
5424    ///Property: Currency
5425    #[serde(skip_serializing_if = "Option::is_none")]
5426    #[cfg_attr(
5427        feature = "builder",
5428        builder(with = |value:impl Into<String>|vec![value.into()])
5429    )]
5430    pub currency: Option<Vec<String>>,
5431    ///Property: Currency short code
5432    #[serde(skip_serializing_if = "Option::is_none")]
5433    #[cfg_attr(
5434        feature = "builder",
5435        builder(with = |value:impl Into<String>|vec![value.into()])
5436    )]
5437    pub currency_symbol: Option<Vec<String>>,
5438    ///Property: Custody type
5439    #[serde(skip_serializing_if = "Option::is_none")]
5440    #[cfg_attr(
5441        feature = "builder",
5442        builder(with = |value:impl Into<String>|vec![value.into()])
5443    )]
5444    pub custody_type: Option<Vec<String>>,
5445    ///Property: Description
5446    #[serde(skip_serializing_if = "Option::is_none")]
5447    #[cfg_attr(
5448        feature = "builder",
5449        builder(with = |value:impl Into<String>|vec![value.into()])
5450    )]
5451    pub description: Option<Vec<String>>,
5452    ///Property: Wallet holder
5453    #[serde(skip_serializing_if = "Option::is_none")]
5454    #[cfg_attr(
5455        feature = "builder",
5456        builder(with = |value:impl Into<String>|vec![value.into()])
5457    )]
5458    pub holder: Option<Vec<String>>,
5459    ///Property: Index text
5460    #[serde(skip_serializing_if = "Option::is_none")]
5461    #[cfg_attr(
5462        feature = "builder",
5463        builder(with = |value:impl Into<String>|vec![value.into()])
5464    )]
5465    pub index_text: Option<Vec<String>>,
5466    ///Property: Keywords
5467    #[serde(skip_serializing_if = "Option::is_none")]
5468    #[cfg_attr(
5469        feature = "builder",
5470        builder(with = |value:impl Into<String>|vec![value.into()])
5471    )]
5472    pub keywords: Option<Vec<String>>,
5473    ///Property: Managing exchange
5474    #[serde(skip_serializing_if = "Option::is_none")]
5475    #[cfg_attr(
5476        feature = "builder",
5477        builder(with = |value:impl Into<String>|vec![value.into()])
5478    )]
5479    pub managing_exchange: Option<Vec<String>>,
5480    ///Property: Modified on
5481    #[serde(skip_serializing_if = "Option::is_none")]
5482    #[cfg_attr(
5483        feature = "builder",
5484        builder(with = |value:impl Into<String>|vec![value.into()])
5485    )]
5486    pub modified_at: Option<Vec<String>>,
5487    ///Property: Name
5488    #[serde(default)]
5489    #[cfg_attr(
5490        feature = "builder",
5491        builder(with = |value:impl Into<String>|vec![value.into()])
5492    )]
5493    pub name: Vec<String>,
5494    ///Property: Notes
5495    #[serde(skip_serializing_if = "Option::is_none")]
5496    #[cfg_attr(
5497        feature = "builder",
5498        builder(with = |value:impl Into<String>|vec![value.into()])
5499    )]
5500    pub notes: Option<Vec<String>>,
5501    ///Property: Previous name
5502    #[serde(skip_serializing_if = "Option::is_none")]
5503    #[cfg_attr(
5504        feature = "builder",
5505        builder(with = |value:impl Into<String>|vec![value.into()])
5506    )]
5507    pub previous_name: Option<Vec<String>>,
5508    ///Property: Private key
5509    #[serde(skip_serializing_if = "Option::is_none")]
5510    #[cfg_attr(
5511        feature = "builder",
5512        builder(with = |value:impl Into<String>|vec![value.into()])
5513    )]
5514    pub private_key: Option<Vec<String>>,
5515    ///Property: Program
5516    #[serde(skip_serializing_if = "Option::is_none")]
5517    #[cfg_attr(
5518        feature = "builder",
5519        builder(with = |value:impl Into<String>|vec![value.into()])
5520    )]
5521    pub program: Option<Vec<String>>,
5522    ///Property: Program ID
5523    #[serde(skip_serializing_if = "Option::is_none")]
5524    #[cfg_attr(
5525        feature = "builder",
5526        builder(with = |value:impl Into<String>|vec![value.into()])
5527    )]
5528    pub program_id: Option<Vec<String>>,
5529    ///Property: Source document
5530    #[serde(skip_serializing_if = "Option::is_none")]
5531    #[cfg_attr(
5532        feature = "builder",
5533        builder(with = |value:impl Into<String>|vec![value.into()])
5534    )]
5535    pub proof: Option<Vec<String>>,
5536    ///Property: Address
5537    #[serde(skip_serializing_if = "Option::is_none")]
5538    #[cfg_attr(
5539        feature = "builder",
5540        builder(with = |value:impl Into<String>|vec![value.into()])
5541    )]
5542    pub public_key: Option<Vec<String>>,
5543    ///Property: Publishing source
5544    #[serde(skip_serializing_if = "Option::is_none")]
5545    #[cfg_attr(
5546        feature = "builder",
5547        builder(with = |value:impl Into<String>|vec![value.into()])
5548    )]
5549    pub publisher: Option<Vec<String>>,
5550    ///Property: Publishing source URL
5551    #[serde(skip_serializing_if = "Option::is_none")]
5552    #[cfg_attr(
5553        feature = "builder",
5554        builder(with = |value:impl Into<String>|vec![value.into()])
5555    )]
5556    pub publisher_url: Option<Vec<String>>,
5557    ///Property: Retrieved on
5558    #[serde(skip_serializing_if = "Option::is_none")]
5559    #[cfg_attr(
5560        feature = "builder",
5561        builder(with = |value:impl Into<String>|vec![value.into()])
5562    )]
5563    pub retrieved_at: Option<Vec<String>>,
5564    ///Property: Source link
5565    #[serde(skip_serializing_if = "Option::is_none")]
5566    #[cfg_attr(
5567        feature = "builder",
5568        builder(with = |value:impl Into<String>|vec![value.into()])
5569    )]
5570    pub source_url: Option<Vec<String>>,
5571    ///Property: Summary
5572    #[serde(skip_serializing_if = "Option::is_none")]
5573    #[cfg_attr(
5574        feature = "builder",
5575        builder(with = |value:impl Into<String>|vec![value.into()])
5576    )]
5577    pub summary: Option<Vec<String>>,
5578    ///Property: Topics
5579    #[serde(skip_serializing_if = "Option::is_none")]
5580    #[cfg_attr(
5581        feature = "builder",
5582        builder(with = |value:impl Into<String>|vec![value.into()])
5583    )]
5584    pub topics: Option<Vec<String>>,
5585    ///Property: Weak alias
5586    #[serde(skip_serializing_if = "Option::is_none")]
5587    #[cfg_attr(
5588        feature = "builder",
5589        builder(with = |value:impl Into<String>|vec![value.into()])
5590    )]
5591    pub weak_alias: Option<Vec<String>>,
5592    ///Property: Wikidata ID
5593    #[serde(skip_serializing_if = "Option::is_none")]
5594    #[cfg_attr(
5595        feature = "builder",
5596        builder(with = |value:impl Into<String>|vec![value.into()])
5597    )]
5598    pub wikidata_id: Option<Vec<String>>,
5599    ///Property: Wikipedia Article
5600    #[serde(skip_serializing_if = "Option::is_none")]
5601    #[cfg_attr(
5602        feature = "builder",
5603        builder(with = |value:impl Into<String>|vec![value.into()])
5604    )]
5605    pub wikipedia_url: Option<Vec<String>>,
5606}
5607impl CryptoWallet {
5608    /// Create a new entity with the given ID
5609    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
5610    pub fn new(id: impl Into<String>) -> Self {
5611        Self {
5612            id: id.into(),
5613            schema: "CryptoWallet".to_string(),
5614            account_id: None,
5615            address: None,
5616            address_entity: None,
5617            aleph_url: None,
5618            alias: None,
5619            amount: None,
5620            amount_eur: None,
5621            amount_usd: None,
5622            balance: None,
5623            balance_date: None,
5624            blockchain: None,
5625            country: None,
5626            created_at: None,
5627            creation_date: None,
5628            crypto_address: None,
5629            currency: None,
5630            currency_symbol: None,
5631            custody_type: None,
5632            description: None,
5633            holder: None,
5634            index_text: None,
5635            keywords: None,
5636            managing_exchange: None,
5637            modified_at: None,
5638            name: Vec::new(),
5639            notes: None,
5640            previous_name: None,
5641            private_key: None,
5642            program: None,
5643            program_id: None,
5644            proof: None,
5645            public_key: None,
5646            publisher: None,
5647            publisher_url: None,
5648            retrieved_at: None,
5649            source_url: None,
5650            summary: None,
5651            topics: None,
5652            weak_alias: None,
5653            wikidata_id: None,
5654            wikipedia_url: None,
5655        }
5656    }
5657    /// Get the schema name
5658    pub fn schema_name() -> &'static str {
5659        "CryptoWallet"
5660    }
5661    /// Serialize to standard FTM nested JSON format
5662    ///
5663    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
5664    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
5665        let mut value = serde_json::to_value(self)?;
5666        if let Some(obj) = value.as_object_mut() {
5667            let id = obj.remove("id");
5668            let schema = obj.remove("schema");
5669            let properties = serde_json::Value::Object(std::mem::take(obj));
5670            if let Some(id) = id {
5671                obj.insert("id".into(), id);
5672            }
5673            if let Some(schema) = schema {
5674                obj.insert("schema".into(), schema);
5675            }
5676            obj.insert("properties".into(), properties);
5677        }
5678        serde_json::to_string(&value)
5679    }
5680}
5681///FTM Schema: Debt
5682#[derive(Debug, Clone, Serialize, Deserialize)]
5683#[cfg_attr(feature = "builder", derive(Builder))]
5684#[serde(rename_all = "camelCase")]
5685pub struct Debt {
5686    pub id: String,
5687    #[cfg_attr(feature = "builder", builder(default = "Debt".to_string()))]
5688    pub schema: String,
5689    ///Property: Aleph URL
5690    #[serde(skip_serializing_if = "Option::is_none")]
5691    #[cfg_attr(
5692        feature = "builder",
5693        builder(with = |value:impl Into<String>|vec![value.into()])
5694    )]
5695    pub aleph_url: Option<Vec<String>>,
5696    ///Property: Amount
5697    #[serde(
5698        skip_serializing_if = "Option::is_none",
5699        deserialize_with = "deserialize_opt_f64_vec",
5700        default
5701    )]
5702    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
5703    pub amount: Option<Vec<f64>>,
5704    ///Property: Amount in EUR
5705    #[serde(
5706        skip_serializing_if = "Option::is_none",
5707        deserialize_with = "deserialize_opt_f64_vec",
5708        default
5709    )]
5710    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
5711    pub amount_eur: Option<Vec<f64>>,
5712    ///Property: Amount in USD
5713    #[serde(
5714        skip_serializing_if = "Option::is_none",
5715        deserialize_with = "deserialize_opt_f64_vec",
5716        default
5717    )]
5718    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
5719    pub amount_usd: Option<Vec<f64>>,
5720    ///Property: Creditor
5721    #[serde(skip_serializing_if = "Option::is_none")]
5722    #[cfg_attr(
5723        feature = "builder",
5724        builder(with = |value:impl Into<String>|vec![value.into()])
5725    )]
5726    pub creditor: Option<Vec<String>>,
5727    ///Property: Currency
5728    #[serde(skip_serializing_if = "Option::is_none")]
5729    #[cfg_attr(
5730        feature = "builder",
5731        builder(with = |value:impl Into<String>|vec![value.into()])
5732    )]
5733    pub currency: Option<Vec<String>>,
5734    ///Property: Date
5735    #[serde(skip_serializing_if = "Option::is_none")]
5736    #[cfg_attr(
5737        feature = "builder",
5738        builder(with = |value:impl Into<String>|vec![value.into()])
5739    )]
5740    pub date: Option<Vec<String>>,
5741    ///Property: Debtor
5742    #[serde(default)]
5743    #[cfg_attr(
5744        feature = "builder",
5745        builder(with = |value:impl Into<String>|vec![value.into()])
5746    )]
5747    pub debtor: Vec<String>,
5748    ///Property: Description
5749    #[serde(skip_serializing_if = "Option::is_none")]
5750    #[cfg_attr(
5751        feature = "builder",
5752        builder(with = |value:impl Into<String>|vec![value.into()])
5753    )]
5754    pub description: Option<Vec<String>>,
5755    ///Property: End date
5756    #[serde(skip_serializing_if = "Option::is_none")]
5757    #[cfg_attr(
5758        feature = "builder",
5759        builder(with = |value:impl Into<String>|vec![value.into()])
5760    )]
5761    pub end_date: Option<Vec<String>>,
5762    ///Property: Index text
5763    #[serde(skip_serializing_if = "Option::is_none")]
5764    #[cfg_attr(
5765        feature = "builder",
5766        builder(with = |value:impl Into<String>|vec![value.into()])
5767    )]
5768    pub index_text: Option<Vec<String>>,
5769    ///Property: Modified on
5770    #[serde(skip_serializing_if = "Option::is_none")]
5771    #[cfg_attr(
5772        feature = "builder",
5773        builder(with = |value:impl Into<String>|vec![value.into()])
5774    )]
5775    pub modified_at: Option<Vec<String>>,
5776    ///Property: Detected names
5777    #[serde(skip_serializing_if = "Option::is_none")]
5778    #[cfg_attr(
5779        feature = "builder",
5780        builder(with = |value:impl Into<String>|vec![value.into()])
5781    )]
5782    pub names_mentioned: Option<Vec<String>>,
5783    ///Property: Source document
5784    #[serde(skip_serializing_if = "Option::is_none")]
5785    #[cfg_attr(
5786        feature = "builder",
5787        builder(with = |value:impl Into<String>|vec![value.into()])
5788    )]
5789    pub proof: Option<Vec<String>>,
5790    ///Property: Publishing source
5791    #[serde(skip_serializing_if = "Option::is_none")]
5792    #[cfg_attr(
5793        feature = "builder",
5794        builder(with = |value:impl Into<String>|vec![value.into()])
5795    )]
5796    pub publisher: Option<Vec<String>>,
5797    ///Property: Publishing source URL
5798    #[serde(skip_serializing_if = "Option::is_none")]
5799    #[cfg_attr(
5800        feature = "builder",
5801        builder(with = |value:impl Into<String>|vec![value.into()])
5802    )]
5803    pub publisher_url: Option<Vec<String>>,
5804    ///Property: Record ID
5805    #[serde(skip_serializing_if = "Option::is_none")]
5806    #[cfg_attr(
5807        feature = "builder",
5808        builder(with = |value:impl Into<String>|vec![value.into()])
5809    )]
5810    pub record_id: Option<Vec<String>>,
5811    ///Property: Retrieved on
5812    #[serde(skip_serializing_if = "Option::is_none")]
5813    #[cfg_attr(
5814        feature = "builder",
5815        builder(with = |value:impl Into<String>|vec![value.into()])
5816    )]
5817    pub retrieved_at: Option<Vec<String>>,
5818    ///Property: Source link
5819    #[serde(skip_serializing_if = "Option::is_none")]
5820    #[cfg_attr(
5821        feature = "builder",
5822        builder(with = |value:impl Into<String>|vec![value.into()])
5823    )]
5824    pub source_url: Option<Vec<String>>,
5825    ///Property: Start date
5826    #[serde(skip_serializing_if = "Option::is_none")]
5827    #[cfg_attr(
5828        feature = "builder",
5829        builder(with = |value:impl Into<String>|vec![value.into()])
5830    )]
5831    pub start_date: Option<Vec<String>>,
5832    ///Property: Summary
5833    #[serde(skip_serializing_if = "Option::is_none")]
5834    #[cfg_attr(
5835        feature = "builder",
5836        builder(with = |value:impl Into<String>|vec![value.into()])
5837    )]
5838    pub summary: Option<Vec<String>>,
5839}
5840impl Debt {
5841    /// Create a new entity with the given ID
5842    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
5843    pub fn new(id: impl Into<String>) -> Self {
5844        Self {
5845            id: id.into(),
5846            schema: "Debt".to_string(),
5847            aleph_url: None,
5848            amount: None,
5849            amount_eur: None,
5850            amount_usd: None,
5851            creditor: None,
5852            currency: None,
5853            date: None,
5854            debtor: Vec::new(),
5855            description: None,
5856            end_date: None,
5857            index_text: None,
5858            modified_at: None,
5859            names_mentioned: None,
5860            proof: None,
5861            publisher: None,
5862            publisher_url: None,
5863            record_id: None,
5864            retrieved_at: None,
5865            source_url: None,
5866            start_date: None,
5867            summary: None,
5868        }
5869    }
5870    /// Get the schema name
5871    pub fn schema_name() -> &'static str {
5872        "Debt"
5873    }
5874    /// Serialize to standard FTM nested JSON format
5875    ///
5876    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
5877    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
5878        let mut value = serde_json::to_value(self)?;
5879        if let Some(obj) = value.as_object_mut() {
5880            let id = obj.remove("id");
5881            let schema = obj.remove("schema");
5882            let properties = serde_json::Value::Object(std::mem::take(obj));
5883            if let Some(id) = id {
5884                obj.insert("id".into(), id);
5885            }
5886            if let Some(schema) = schema {
5887                obj.insert("schema".into(), schema);
5888            }
5889            obj.insert("properties".into(), properties);
5890        }
5891        serde_json::to_string(&value)
5892    }
5893}
5894///FTM Schema: Directorship
5895#[derive(Debug, Clone, Serialize, Deserialize)]
5896#[cfg_attr(feature = "builder", derive(Builder))]
5897#[serde(rename_all = "camelCase")]
5898pub struct Directorship {
5899    pub id: String,
5900    #[cfg_attr(feature = "builder", builder(default = "Directorship".to_string()))]
5901    pub schema: String,
5902    ///Property: Aleph URL
5903    #[serde(skip_serializing_if = "Option::is_none")]
5904    #[cfg_attr(
5905        feature = "builder",
5906        builder(with = |value:impl Into<String>|vec![value.into()])
5907    )]
5908    pub aleph_url: Option<Vec<String>>,
5909    ///Property: Date
5910    #[serde(skip_serializing_if = "Option::is_none")]
5911    #[cfg_attr(
5912        feature = "builder",
5913        builder(with = |value:impl Into<String>|vec![value.into()])
5914    )]
5915    pub date: Option<Vec<String>>,
5916    ///Property: Description
5917    #[serde(skip_serializing_if = "Option::is_none")]
5918    #[cfg_attr(
5919        feature = "builder",
5920        builder(with = |value:impl Into<String>|vec![value.into()])
5921    )]
5922    pub description: Option<Vec<String>>,
5923    ///Property: Director
5924    #[serde(default)]
5925    #[cfg_attr(
5926        feature = "builder",
5927        builder(with = |value:impl Into<String>|vec![value.into()])
5928    )]
5929    pub director: Vec<String>,
5930    ///Property: End date
5931    #[serde(skip_serializing_if = "Option::is_none")]
5932    #[cfg_attr(
5933        feature = "builder",
5934        builder(with = |value:impl Into<String>|vec![value.into()])
5935    )]
5936    pub end_date: Option<Vec<String>>,
5937    ///Property: Index text
5938    #[serde(skip_serializing_if = "Option::is_none")]
5939    #[cfg_attr(
5940        feature = "builder",
5941        builder(with = |value:impl Into<String>|vec![value.into()])
5942    )]
5943    pub index_text: Option<Vec<String>>,
5944    ///Property: Modified on
5945    #[serde(skip_serializing_if = "Option::is_none")]
5946    #[cfg_attr(
5947        feature = "builder",
5948        builder(with = |value:impl Into<String>|vec![value.into()])
5949    )]
5950    pub modified_at: Option<Vec<String>>,
5951    ///Property: Detected names
5952    #[serde(skip_serializing_if = "Option::is_none")]
5953    #[cfg_attr(
5954        feature = "builder",
5955        builder(with = |value:impl Into<String>|vec![value.into()])
5956    )]
5957    pub names_mentioned: Option<Vec<String>>,
5958    ///Property: Organization
5959    #[serde(default)]
5960    #[cfg_attr(
5961        feature = "builder",
5962        builder(with = |value:impl Into<String>|vec![value.into()])
5963    )]
5964    pub organization: Vec<String>,
5965    ///Property: Source document
5966    #[serde(skip_serializing_if = "Option::is_none")]
5967    #[cfg_attr(
5968        feature = "builder",
5969        builder(with = |value:impl Into<String>|vec![value.into()])
5970    )]
5971    pub proof: Option<Vec<String>>,
5972    ///Property: Publishing source
5973    #[serde(skip_serializing_if = "Option::is_none")]
5974    #[cfg_attr(
5975        feature = "builder",
5976        builder(with = |value:impl Into<String>|vec![value.into()])
5977    )]
5978    pub publisher: Option<Vec<String>>,
5979    ///Property: Publishing source URL
5980    #[serde(skip_serializing_if = "Option::is_none")]
5981    #[cfg_attr(
5982        feature = "builder",
5983        builder(with = |value:impl Into<String>|vec![value.into()])
5984    )]
5985    pub publisher_url: Option<Vec<String>>,
5986    ///Property: Record ID
5987    #[serde(skip_serializing_if = "Option::is_none")]
5988    #[cfg_attr(
5989        feature = "builder",
5990        builder(with = |value:impl Into<String>|vec![value.into()])
5991    )]
5992    pub record_id: Option<Vec<String>>,
5993    ///Property: Retrieved on
5994    #[serde(skip_serializing_if = "Option::is_none")]
5995    #[cfg_attr(
5996        feature = "builder",
5997        builder(with = |value:impl Into<String>|vec![value.into()])
5998    )]
5999    pub retrieved_at: Option<Vec<String>>,
6000    ///Property: Role
6001    #[serde(skip_serializing_if = "Option::is_none")]
6002    #[cfg_attr(
6003        feature = "builder",
6004        builder(with = |value:impl Into<String>|vec![value.into()])
6005    )]
6006    pub role: Option<Vec<String>>,
6007    ///Property: Secretary
6008    #[serde(skip_serializing_if = "Option::is_none")]
6009    #[cfg_attr(
6010        feature = "builder",
6011        builder(with = |value:impl Into<String>|vec![value.into()])
6012    )]
6013    pub secretary: Option<Vec<String>>,
6014    ///Property: Source link
6015    #[serde(skip_serializing_if = "Option::is_none")]
6016    #[cfg_attr(
6017        feature = "builder",
6018        builder(with = |value:impl Into<String>|vec![value.into()])
6019    )]
6020    pub source_url: Option<Vec<String>>,
6021    ///Property: Start date
6022    #[serde(skip_serializing_if = "Option::is_none")]
6023    #[cfg_attr(
6024        feature = "builder",
6025        builder(with = |value:impl Into<String>|vec![value.into()])
6026    )]
6027    pub start_date: Option<Vec<String>>,
6028    ///Property: Status
6029    #[serde(skip_serializing_if = "Option::is_none")]
6030    #[cfg_attr(
6031        feature = "builder",
6032        builder(with = |value:impl Into<String>|vec![value.into()])
6033    )]
6034    pub status: Option<Vec<String>>,
6035    ///Property: Summary
6036    #[serde(skip_serializing_if = "Option::is_none")]
6037    #[cfg_attr(
6038        feature = "builder",
6039        builder(with = |value:impl Into<String>|vec![value.into()])
6040    )]
6041    pub summary: Option<Vec<String>>,
6042}
6043impl Directorship {
6044    /// Create a new entity with the given ID
6045    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
6046    pub fn new(id: impl Into<String>) -> Self {
6047        Self {
6048            id: id.into(),
6049            schema: "Directorship".to_string(),
6050            aleph_url: None,
6051            date: None,
6052            description: None,
6053            director: Vec::new(),
6054            end_date: None,
6055            index_text: None,
6056            modified_at: None,
6057            names_mentioned: None,
6058            organization: Vec::new(),
6059            proof: None,
6060            publisher: None,
6061            publisher_url: None,
6062            record_id: None,
6063            retrieved_at: None,
6064            role: None,
6065            secretary: None,
6066            source_url: None,
6067            start_date: None,
6068            status: None,
6069            summary: None,
6070        }
6071    }
6072    /// Get the schema name
6073    pub fn schema_name() -> &'static str {
6074        "Directorship"
6075    }
6076    /// Serialize to standard FTM nested JSON format
6077    ///
6078    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
6079    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
6080        let mut value = serde_json::to_value(self)?;
6081        if let Some(obj) = value.as_object_mut() {
6082            let id = obj.remove("id");
6083            let schema = obj.remove("schema");
6084            let properties = serde_json::Value::Object(std::mem::take(obj));
6085            if let Some(id) = id {
6086                obj.insert("id".into(), id);
6087            }
6088            if let Some(schema) = schema {
6089                obj.insert("schema".into(), schema);
6090            }
6091            obj.insert("properties".into(), properties);
6092        }
6093        serde_json::to_string(&value)
6094    }
6095}
6096///FTM Schema: File
6097#[derive(Debug, Clone, Serialize, Deserialize)]
6098#[cfg_attr(feature = "builder", derive(Builder))]
6099#[serde(rename_all = "camelCase")]
6100pub struct Document {
6101    pub id: String,
6102    #[cfg_attr(feature = "builder", builder(default = "Document".to_string()))]
6103    pub schema: String,
6104    ///Property: Address
6105    #[serde(skip_serializing_if = "Option::is_none")]
6106    #[cfg_attr(
6107        feature = "builder",
6108        builder(with = |value:impl Into<String>|vec![value.into()])
6109    )]
6110    pub address: Option<Vec<String>>,
6111    ///Property: Address
6112    #[serde(skip_serializing_if = "Option::is_none")]
6113    #[cfg_attr(
6114        feature = "builder",
6115        builder(with = |value:impl Into<String>|vec![value.into()])
6116    )]
6117    pub address_entity: Option<Vec<String>>,
6118    ///Property: Aleph URL
6119    #[serde(skip_serializing_if = "Option::is_none")]
6120    #[cfg_attr(
6121        feature = "builder",
6122        builder(with = |value:impl Into<String>|vec![value.into()])
6123    )]
6124    pub aleph_url: Option<Vec<String>>,
6125    ///Property: Alias
6126    #[serde(skip_serializing_if = "Option::is_none")]
6127    #[cfg_attr(
6128        feature = "builder",
6129        builder(with = |value:impl Into<String>|vec![value.into()])
6130    )]
6131    pub alias: Option<Vec<String>>,
6132    ///Property: Ancestors
6133    #[serde(skip_serializing_if = "Option::is_none")]
6134    #[cfg_attr(
6135        feature = "builder",
6136        builder(with = |value:impl Into<String>|vec![value.into()])
6137    )]
6138    pub ancestors: Option<Vec<String>>,
6139    ///Property: Author
6140    #[serde(skip_serializing_if = "Option::is_none")]
6141    #[cfg_attr(
6142        feature = "builder",
6143        builder(with = |value:impl Into<String>|vec![value.into()])
6144    )]
6145    pub author: Option<Vec<String>>,
6146    ///Property: Authored on
6147    #[serde(skip_serializing_if = "Option::is_none")]
6148    #[cfg_attr(
6149        feature = "builder",
6150        builder(with = |value:impl Into<String>|vec![value.into()])
6151    )]
6152    pub authored_at: Option<Vec<String>>,
6153    ///Property: Text
6154    #[serde(skip_serializing_if = "Option::is_none")]
6155    #[cfg_attr(
6156        feature = "builder",
6157        builder(with = |value:impl Into<String>|vec![value.into()])
6158    )]
6159    pub body_text: Option<Vec<String>>,
6160    ///Property: Detected companies
6161    #[serde(skip_serializing_if = "Option::is_none")]
6162    #[cfg_attr(
6163        feature = "builder",
6164        builder(with = |value:impl Into<String>|vec![value.into()])
6165    )]
6166    pub companies_mentioned: Option<Vec<String>>,
6167    ///Property: Checksum
6168    #[serde(skip_serializing_if = "Option::is_none")]
6169    #[cfg_attr(
6170        feature = "builder",
6171        builder(with = |value:impl Into<String>|vec![value.into()])
6172    )]
6173    pub content_hash: Option<Vec<String>>,
6174    ///Property: Country
6175    #[serde(skip_serializing_if = "Option::is_none")]
6176    #[cfg_attr(
6177        feature = "builder",
6178        builder(with = |value:impl Into<String>|vec![value.into()])
6179    )]
6180    pub country: Option<Vec<String>>,
6181    ///Property: Crawler
6182    #[serde(skip_serializing_if = "Option::is_none")]
6183    #[cfg_attr(
6184        feature = "builder",
6185        builder(with = |value:impl Into<String>|vec![value.into()])
6186    )]
6187    pub crawler: Option<Vec<String>>,
6188    ///Property: Created at
6189    #[serde(skip_serializing_if = "Option::is_none")]
6190    #[cfg_attr(
6191        feature = "builder",
6192        builder(with = |value:impl Into<String>|vec![value.into()])
6193    )]
6194    pub created_at: Option<Vec<String>>,
6195    ///Property: Date
6196    #[serde(skip_serializing_if = "Option::is_none")]
6197    #[cfg_attr(
6198        feature = "builder",
6199        builder(with = |value:impl Into<String>|vec![value.into()])
6200    )]
6201    pub date: Option<Vec<String>>,
6202    ///Property: Description
6203    #[serde(skip_serializing_if = "Option::is_none")]
6204    #[cfg_attr(
6205        feature = "builder",
6206        builder(with = |value:impl Into<String>|vec![value.into()])
6207    )]
6208    pub description: Option<Vec<String>>,
6209    ///Property: Detected country
6210    #[serde(skip_serializing_if = "Option::is_none")]
6211    #[cfg_attr(
6212        feature = "builder",
6213        builder(with = |value:impl Into<String>|vec![value.into()])
6214    )]
6215    pub detected_country: Option<Vec<String>>,
6216    ///Property: Detected language
6217    #[serde(skip_serializing_if = "Option::is_none")]
6218    #[cfg_attr(
6219        feature = "builder",
6220        builder(with = |value:impl Into<String>|vec![value.into()])
6221    )]
6222    pub detected_language: Option<Vec<String>>,
6223    ///Property: Detected e-mail addresses
6224    #[serde(skip_serializing_if = "Option::is_none")]
6225    #[cfg_attr(
6226        feature = "builder",
6227        builder(with = |value:impl Into<String>|vec![value.into()])
6228    )]
6229    pub email_mentioned: Option<Vec<String>>,
6230    ///Property: File encoding
6231    #[serde(skip_serializing_if = "Option::is_none")]
6232    #[cfg_attr(
6233        feature = "builder",
6234        builder(with = |value:impl Into<String>|vec![value.into()])
6235    )]
6236    pub encoding: Option<Vec<String>>,
6237    ///Property: File extension
6238    #[serde(skip_serializing_if = "Option::is_none")]
6239    #[cfg_attr(
6240        feature = "builder",
6241        builder(with = |value:impl Into<String>|vec![value.into()])
6242    )]
6243    pub extension: Option<Vec<String>>,
6244    ///Property: File name
6245    #[serde(default)]
6246    #[cfg_attr(
6247        feature = "builder",
6248        builder(with = |value:impl Into<String>|vec![value.into()])
6249    )]
6250    pub file_name: Vec<String>,
6251    ///Property: File size
6252    #[serde(
6253        skip_serializing_if = "Option::is_none",
6254        deserialize_with = "deserialize_opt_f64_vec",
6255        default
6256    )]
6257    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
6258    pub file_size: Option<Vec<f64>>,
6259    ///Property: Generator
6260    #[serde(skip_serializing_if = "Option::is_none")]
6261    #[cfg_attr(
6262        feature = "builder",
6263        builder(with = |value:impl Into<String>|vec![value.into()])
6264    )]
6265    pub generator: Option<Vec<String>>,
6266    ///Property: Detected IBANs
6267    #[serde(skip_serializing_if = "Option::is_none")]
6268    #[cfg_attr(
6269        feature = "builder",
6270        builder(with = |value:impl Into<String>|vec![value.into()])
6271    )]
6272    pub iban_mentioned: Option<Vec<String>>,
6273    ///Property: Index text
6274    #[serde(skip_serializing_if = "Option::is_none")]
6275    #[cfg_attr(
6276        feature = "builder",
6277        builder(with = |value:impl Into<String>|vec![value.into()])
6278    )]
6279    pub index_text: Option<Vec<String>>,
6280    ///Property: Detected IP addresses
6281    #[serde(skip_serializing_if = "Option::is_none")]
6282    #[cfg_attr(
6283        feature = "builder",
6284        builder(with = |value:impl Into<String>|vec![value.into()])
6285    )]
6286    pub ip_mentioned: Option<Vec<String>>,
6287    ///Property: Keywords
6288    #[serde(skip_serializing_if = "Option::is_none")]
6289    #[cfg_attr(
6290        feature = "builder",
6291        builder(with = |value:impl Into<String>|vec![value.into()])
6292    )]
6293    pub keywords: Option<Vec<String>>,
6294    ///Property: Language
6295    #[serde(skip_serializing_if = "Option::is_none")]
6296    #[cfg_attr(
6297        feature = "builder",
6298        builder(with = |value:impl Into<String>|vec![value.into()])
6299    )]
6300    pub language: Option<Vec<String>>,
6301    ///Property: Detected locations
6302    #[serde(skip_serializing_if = "Option::is_none")]
6303    #[cfg_attr(
6304        feature = "builder",
6305        builder(with = |value:impl Into<String>|vec![value.into()])
6306    )]
6307    pub location_mentioned: Option<Vec<String>>,
6308    ///Property: Message ID
6309    #[serde(skip_serializing_if = "Option::is_none")]
6310    #[cfg_attr(
6311        feature = "builder",
6312        builder(with = |value:impl Into<String>|vec![value.into()])
6313    )]
6314    pub message_id: Option<Vec<String>>,
6315    ///Property: MIME type
6316    #[serde(skip_serializing_if = "Option::is_none")]
6317    #[cfg_attr(
6318        feature = "builder",
6319        builder(with = |value:impl Into<String>|vec![value.into()])
6320    )]
6321    pub mime_type: Option<Vec<String>>,
6322    ///Property: Modified on
6323    #[serde(skip_serializing_if = "Option::is_none")]
6324    #[cfg_attr(
6325        feature = "builder",
6326        builder(with = |value:impl Into<String>|vec![value.into()])
6327    )]
6328    pub modified_at: Option<Vec<String>>,
6329    ///Property: Name
6330    #[serde(default)]
6331    #[cfg_attr(
6332        feature = "builder",
6333        builder(with = |value:impl Into<String>|vec![value.into()])
6334    )]
6335    pub name: Vec<String>,
6336    ///Property: Detected names
6337    #[serde(skip_serializing_if = "Option::is_none")]
6338    #[cfg_attr(
6339        feature = "builder",
6340        builder(with = |value:impl Into<String>|vec![value.into()])
6341    )]
6342    pub names_mentioned: Option<Vec<String>>,
6343    ///Property: Notes
6344    #[serde(skip_serializing_if = "Option::is_none")]
6345    #[cfg_attr(
6346        feature = "builder",
6347        builder(with = |value:impl Into<String>|vec![value.into()])
6348    )]
6349    pub notes: Option<Vec<String>>,
6350    ///Property: Folder
6351    #[serde(skip_serializing_if = "Option::is_none")]
6352    #[cfg_attr(
6353        feature = "builder",
6354        builder(with = |value:impl Into<String>|vec![value.into()])
6355    )]
6356    pub parent: Option<Vec<String>>,
6357    ///Property: Detected people
6358    #[serde(skip_serializing_if = "Option::is_none")]
6359    #[cfg_attr(
6360        feature = "builder",
6361        builder(with = |value:impl Into<String>|vec![value.into()])
6362    )]
6363    pub people_mentioned: Option<Vec<String>>,
6364    ///Property: Detected phones
6365    #[serde(skip_serializing_if = "Option::is_none")]
6366    #[cfg_attr(
6367        feature = "builder",
6368        builder(with = |value:impl Into<String>|vec![value.into()])
6369    )]
6370    pub phone_mentioned: Option<Vec<String>>,
6371    ///Property: Previous name
6372    #[serde(skip_serializing_if = "Option::is_none")]
6373    #[cfg_attr(
6374        feature = "builder",
6375        builder(with = |value:impl Into<String>|vec![value.into()])
6376    )]
6377    pub previous_name: Option<Vec<String>>,
6378    ///Property: Processed at
6379    #[serde(skip_serializing_if = "Option::is_none")]
6380    #[cfg_attr(
6381        feature = "builder",
6382        builder(with = |value:impl Into<String>|vec![value.into()])
6383    )]
6384    pub processed_at: Option<Vec<String>>,
6385    ///Property: Processing agent
6386    #[serde(skip_serializing_if = "Option::is_none")]
6387    #[cfg_attr(
6388        feature = "builder",
6389        builder(with = |value:impl Into<String>|vec![value.into()])
6390    )]
6391    pub processing_agent: Option<Vec<String>>,
6392    ///Property: Processing error
6393    #[serde(skip_serializing_if = "Option::is_none")]
6394    #[cfg_attr(
6395        feature = "builder",
6396        builder(with = |value:impl Into<String>|vec![value.into()])
6397    )]
6398    pub processing_error: Option<Vec<String>>,
6399    ///Property: Processing status
6400    #[serde(skip_serializing_if = "Option::is_none")]
6401    #[cfg_attr(
6402        feature = "builder",
6403        builder(with = |value:impl Into<String>|vec![value.into()])
6404    )]
6405    pub processing_status: Option<Vec<String>>,
6406    ///Property: Program
6407    #[serde(skip_serializing_if = "Option::is_none")]
6408    #[cfg_attr(
6409        feature = "builder",
6410        builder(with = |value:impl Into<String>|vec![value.into()])
6411    )]
6412    pub program: Option<Vec<String>>,
6413    ///Property: Program ID
6414    #[serde(skip_serializing_if = "Option::is_none")]
6415    #[cfg_attr(
6416        feature = "builder",
6417        builder(with = |value:impl Into<String>|vec![value.into()])
6418    )]
6419    pub program_id: Option<Vec<String>>,
6420    ///Property: Source document
6421    #[serde(skip_serializing_if = "Option::is_none")]
6422    #[cfg_attr(
6423        feature = "builder",
6424        builder(with = |value:impl Into<String>|vec![value.into()])
6425    )]
6426    pub proof: Option<Vec<String>>,
6427    ///Property: Published on
6428    #[serde(skip_serializing_if = "Option::is_none")]
6429    #[cfg_attr(
6430        feature = "builder",
6431        builder(with = |value:impl Into<String>|vec![value.into()])
6432    )]
6433    pub published_at: Option<Vec<String>>,
6434    ///Property: Publishing source
6435    #[serde(skip_serializing_if = "Option::is_none")]
6436    #[cfg_attr(
6437        feature = "builder",
6438        builder(with = |value:impl Into<String>|vec![value.into()])
6439    )]
6440    pub publisher: Option<Vec<String>>,
6441    ///Property: Publishing source URL
6442    #[serde(skip_serializing_if = "Option::is_none")]
6443    #[cfg_attr(
6444        feature = "builder",
6445        builder(with = |value:impl Into<String>|vec![value.into()])
6446    )]
6447    pub publisher_url: Option<Vec<String>>,
6448    ///Property: Retrieved on
6449    #[serde(skip_serializing_if = "Option::is_none")]
6450    #[cfg_attr(
6451        feature = "builder",
6452        builder(with = |value:impl Into<String>|vec![value.into()])
6453    )]
6454    pub retrieved_at: Option<Vec<String>>,
6455    ///Property: Source link
6456    #[serde(skip_serializing_if = "Option::is_none")]
6457    #[cfg_attr(
6458        feature = "builder",
6459        builder(with = |value:impl Into<String>|vec![value.into()])
6460    )]
6461    pub source_url: Option<Vec<String>>,
6462    ///Property: Summary
6463    #[serde(skip_serializing_if = "Option::is_none")]
6464    #[cfg_attr(
6465        feature = "builder",
6466        builder(with = |value:impl Into<String>|vec![value.into()])
6467    )]
6468    pub summary: Option<Vec<String>>,
6469    ///Property: Title
6470    #[serde(skip_serializing_if = "Option::is_none")]
6471    #[cfg_attr(
6472        feature = "builder",
6473        builder(with = |value:impl Into<String>|vec![value.into()])
6474    )]
6475    pub title: Option<Vec<String>>,
6476    ///Property: Topics
6477    #[serde(skip_serializing_if = "Option::is_none")]
6478    #[cfg_attr(
6479        feature = "builder",
6480        builder(with = |value:impl Into<String>|vec![value.into()])
6481    )]
6482    pub topics: Option<Vec<String>>,
6483    ///Property: The language of the translated text
6484    #[serde(skip_serializing_if = "Option::is_none")]
6485    #[cfg_attr(
6486        feature = "builder",
6487        builder(with = |value:impl Into<String>|vec![value.into()])
6488    )]
6489    pub translated_language: Option<Vec<String>>,
6490    ///Property: Translated version of the body text
6491    #[serde(skip_serializing_if = "Option::is_none")]
6492    #[cfg_attr(
6493        feature = "builder",
6494        builder(with = |value:impl Into<String>|vec![value.into()])
6495    )]
6496    pub translated_text: Option<Vec<String>>,
6497    ///Property: Weak alias
6498    #[serde(skip_serializing_if = "Option::is_none")]
6499    #[cfg_attr(
6500        feature = "builder",
6501        builder(with = |value:impl Into<String>|vec![value.into()])
6502    )]
6503    pub weak_alias: Option<Vec<String>>,
6504    ///Property: Wikidata ID
6505    #[serde(skip_serializing_if = "Option::is_none")]
6506    #[cfg_attr(
6507        feature = "builder",
6508        builder(with = |value:impl Into<String>|vec![value.into()])
6509    )]
6510    pub wikidata_id: Option<Vec<String>>,
6511    ///Property: Wikipedia Article
6512    #[serde(skip_serializing_if = "Option::is_none")]
6513    #[cfg_attr(
6514        feature = "builder",
6515        builder(with = |value:impl Into<String>|vec![value.into()])
6516    )]
6517    pub wikipedia_url: Option<Vec<String>>,
6518}
6519impl Document {
6520    /// Create a new entity with the given ID
6521    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
6522    pub fn new(id: impl Into<String>) -> Self {
6523        Self {
6524            id: id.into(),
6525            schema: "Document".to_string(),
6526            address: None,
6527            address_entity: None,
6528            aleph_url: None,
6529            alias: None,
6530            ancestors: None,
6531            author: None,
6532            authored_at: None,
6533            body_text: None,
6534            companies_mentioned: None,
6535            content_hash: None,
6536            country: None,
6537            crawler: None,
6538            created_at: None,
6539            date: None,
6540            description: None,
6541            detected_country: None,
6542            detected_language: None,
6543            email_mentioned: None,
6544            encoding: None,
6545            extension: None,
6546            file_name: Vec::new(),
6547            file_size: None,
6548            generator: None,
6549            iban_mentioned: None,
6550            index_text: None,
6551            ip_mentioned: None,
6552            keywords: None,
6553            language: None,
6554            location_mentioned: None,
6555            message_id: None,
6556            mime_type: None,
6557            modified_at: None,
6558            name: Vec::new(),
6559            names_mentioned: None,
6560            notes: None,
6561            parent: None,
6562            people_mentioned: None,
6563            phone_mentioned: None,
6564            previous_name: None,
6565            processed_at: None,
6566            processing_agent: None,
6567            processing_error: None,
6568            processing_status: None,
6569            program: None,
6570            program_id: None,
6571            proof: None,
6572            published_at: None,
6573            publisher: None,
6574            publisher_url: None,
6575            retrieved_at: None,
6576            source_url: None,
6577            summary: None,
6578            title: None,
6579            topics: None,
6580            translated_language: None,
6581            translated_text: None,
6582            weak_alias: None,
6583            wikidata_id: None,
6584            wikipedia_url: None,
6585        }
6586    }
6587    /// Get the schema name
6588    pub fn schema_name() -> &'static str {
6589        "Document"
6590    }
6591    /// Serialize to standard FTM nested JSON format
6592    ///
6593    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
6594    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
6595        let mut value = serde_json::to_value(self)?;
6596        if let Some(obj) = value.as_object_mut() {
6597            let id = obj.remove("id");
6598            let schema = obj.remove("schema");
6599            let properties = serde_json::Value::Object(std::mem::take(obj));
6600            if let Some(id) = id {
6601                obj.insert("id".into(), id);
6602            }
6603            if let Some(schema) = schema {
6604                obj.insert("schema".into(), schema);
6605            }
6606            obj.insert("properties".into(), properties);
6607        }
6608        serde_json::to_string(&value)
6609    }
6610}
6611///FTM Schema: Documentation
6612#[derive(Debug, Clone, Serialize, Deserialize)]
6613#[cfg_attr(feature = "builder", derive(Builder))]
6614#[serde(rename_all = "camelCase")]
6615pub struct Documentation {
6616    pub id: String,
6617    #[cfg_attr(feature = "builder", builder(default = "Documentation".to_string()))]
6618    pub schema: String,
6619    ///Property: Aleph URL
6620    #[serde(skip_serializing_if = "Option::is_none")]
6621    #[cfg_attr(
6622        feature = "builder",
6623        builder(with = |value:impl Into<String>|vec![value.into()])
6624    )]
6625    pub aleph_url: Option<Vec<String>>,
6626    ///Property: Date
6627    #[serde(skip_serializing_if = "Option::is_none")]
6628    #[cfg_attr(
6629        feature = "builder",
6630        builder(with = |value:impl Into<String>|vec![value.into()])
6631    )]
6632    pub date: Option<Vec<String>>,
6633    ///Property: Description
6634    #[serde(skip_serializing_if = "Option::is_none")]
6635    #[cfg_attr(
6636        feature = "builder",
6637        builder(with = |value:impl Into<String>|vec![value.into()])
6638    )]
6639    pub description: Option<Vec<String>>,
6640    ///Property: Document
6641    #[serde(default)]
6642    #[cfg_attr(
6643        feature = "builder",
6644        builder(with = |value:impl Into<String>|vec![value.into()])
6645    )]
6646    pub document: Vec<String>,
6647    ///Property: End date
6648    #[serde(skip_serializing_if = "Option::is_none")]
6649    #[cfg_attr(
6650        feature = "builder",
6651        builder(with = |value:impl Into<String>|vec![value.into()])
6652    )]
6653    pub end_date: Option<Vec<String>>,
6654    ///Property: Entity
6655    #[serde(default)]
6656    #[cfg_attr(
6657        feature = "builder",
6658        builder(with = |value:impl Into<String>|vec![value.into()])
6659    )]
6660    pub entity: Vec<String>,
6661    ///Property: Index text
6662    #[serde(skip_serializing_if = "Option::is_none")]
6663    #[cfg_attr(
6664        feature = "builder",
6665        builder(with = |value:impl Into<String>|vec![value.into()])
6666    )]
6667    pub index_text: Option<Vec<String>>,
6668    ///Property: Modified on
6669    #[serde(skip_serializing_if = "Option::is_none")]
6670    #[cfg_attr(
6671        feature = "builder",
6672        builder(with = |value:impl Into<String>|vec![value.into()])
6673    )]
6674    pub modified_at: Option<Vec<String>>,
6675    ///Property: Detected names
6676    #[serde(skip_serializing_if = "Option::is_none")]
6677    #[cfg_attr(
6678        feature = "builder",
6679        builder(with = |value:impl Into<String>|vec![value.into()])
6680    )]
6681    pub names_mentioned: Option<Vec<String>>,
6682    ///Property: Source document
6683    #[serde(skip_serializing_if = "Option::is_none")]
6684    #[cfg_attr(
6685        feature = "builder",
6686        builder(with = |value:impl Into<String>|vec![value.into()])
6687    )]
6688    pub proof: Option<Vec<String>>,
6689    ///Property: Publishing source
6690    #[serde(skip_serializing_if = "Option::is_none")]
6691    #[cfg_attr(
6692        feature = "builder",
6693        builder(with = |value:impl Into<String>|vec![value.into()])
6694    )]
6695    pub publisher: Option<Vec<String>>,
6696    ///Property: Publishing source URL
6697    #[serde(skip_serializing_if = "Option::is_none")]
6698    #[cfg_attr(
6699        feature = "builder",
6700        builder(with = |value:impl Into<String>|vec![value.into()])
6701    )]
6702    pub publisher_url: Option<Vec<String>>,
6703    ///Property: Record ID
6704    #[serde(skip_serializing_if = "Option::is_none")]
6705    #[cfg_attr(
6706        feature = "builder",
6707        builder(with = |value:impl Into<String>|vec![value.into()])
6708    )]
6709    pub record_id: Option<Vec<String>>,
6710    ///Property: Retrieved on
6711    #[serde(skip_serializing_if = "Option::is_none")]
6712    #[cfg_attr(
6713        feature = "builder",
6714        builder(with = |value:impl Into<String>|vec![value.into()])
6715    )]
6716    pub retrieved_at: Option<Vec<String>>,
6717    ///Property: Role
6718    #[serde(skip_serializing_if = "Option::is_none")]
6719    #[cfg_attr(
6720        feature = "builder",
6721        builder(with = |value:impl Into<String>|vec![value.into()])
6722    )]
6723    pub role: Option<Vec<String>>,
6724    ///Property: Source link
6725    #[serde(skip_serializing_if = "Option::is_none")]
6726    #[cfg_attr(
6727        feature = "builder",
6728        builder(with = |value:impl Into<String>|vec![value.into()])
6729    )]
6730    pub source_url: Option<Vec<String>>,
6731    ///Property: Start date
6732    #[serde(skip_serializing_if = "Option::is_none")]
6733    #[cfg_attr(
6734        feature = "builder",
6735        builder(with = |value:impl Into<String>|vec![value.into()])
6736    )]
6737    pub start_date: Option<Vec<String>>,
6738    ///Property: Status
6739    #[serde(skip_serializing_if = "Option::is_none")]
6740    #[cfg_attr(
6741        feature = "builder",
6742        builder(with = |value:impl Into<String>|vec![value.into()])
6743    )]
6744    pub status: Option<Vec<String>>,
6745    ///Property: Summary
6746    #[serde(skip_serializing_if = "Option::is_none")]
6747    #[cfg_attr(
6748        feature = "builder",
6749        builder(with = |value:impl Into<String>|vec![value.into()])
6750    )]
6751    pub summary: Option<Vec<String>>,
6752}
6753impl Documentation {
6754    /// Create a new entity with the given ID
6755    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
6756    pub fn new(id: impl Into<String>) -> Self {
6757        Self {
6758            id: id.into(),
6759            schema: "Documentation".to_string(),
6760            aleph_url: None,
6761            date: None,
6762            description: None,
6763            document: Vec::new(),
6764            end_date: None,
6765            entity: Vec::new(),
6766            index_text: None,
6767            modified_at: None,
6768            names_mentioned: None,
6769            proof: None,
6770            publisher: None,
6771            publisher_url: None,
6772            record_id: None,
6773            retrieved_at: None,
6774            role: None,
6775            source_url: None,
6776            start_date: None,
6777            status: None,
6778            summary: None,
6779        }
6780    }
6781    /// Get the schema name
6782    pub fn schema_name() -> &'static str {
6783        "Documentation"
6784    }
6785    /// Serialize to standard FTM nested JSON format
6786    ///
6787    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
6788    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
6789        let mut value = serde_json::to_value(self)?;
6790        if let Some(obj) = value.as_object_mut() {
6791            let id = obj.remove("id");
6792            let schema = obj.remove("schema");
6793            let properties = serde_json::Value::Object(std::mem::take(obj));
6794            if let Some(id) = id {
6795                obj.insert("id".into(), id);
6796            }
6797            if let Some(schema) = schema {
6798                obj.insert("schema".into(), schema);
6799            }
6800            obj.insert("properties".into(), properties);
6801        }
6802        serde_json::to_string(&value)
6803    }
6804}
6805///FTM Schema: Customs declaration
6806#[derive(Debug, Clone, Serialize, Deserialize)]
6807#[cfg_attr(feature = "builder", derive(Builder))]
6808#[serde(rename_all = "camelCase")]
6809pub struct EconomicActivity {
6810    pub id: String,
6811    #[cfg_attr(feature = "builder", builder(default = "EconomicActivity".to_string()))]
6812    pub schema: String,
6813    ///Property: Aleph URL
6814    #[serde(skip_serializing_if = "Option::is_none")]
6815    #[cfg_attr(
6816        feature = "builder",
6817        builder(with = |value:impl Into<String>|vec![value.into()])
6818    )]
6819    pub aleph_url: Option<Vec<String>>,
6820    ///Property: Bank Account
6821    #[serde(skip_serializing_if = "Option::is_none")]
6822    #[cfg_attr(
6823        feature = "builder",
6824        builder(with = |value:impl Into<String>|vec![value.into()])
6825    )]
6826    pub bank_account: Option<Vec<String>>,
6827    ///Property: Foreign currency bank
6828    #[serde(skip_serializing_if = "Option::is_none")]
6829    #[cfg_attr(
6830        feature = "builder",
6831        builder(with = |value:impl Into<String>|vec![value.into()])
6832    )]
6833    pub bank_foreign: Option<Vec<String>>,
6834    ///Property: Rouble bank
6835    #[serde(skip_serializing_if = "Option::is_none")]
6836    #[cfg_attr(
6837        feature = "builder",
6838        builder(with = |value:impl Into<String>|vec![value.into()])
6839    )]
6840    pub bank_rub: Option<Vec<String>>,
6841    ///Property: Customs Cargo Declaration Number
6842    #[serde(skip_serializing_if = "Option::is_none")]
6843    #[cfg_attr(
6844        feature = "builder",
6845        builder(with = |value:impl Into<String>|vec![value.into()])
6846    )]
6847    pub ccd_number: Option<Vec<String>>,
6848    ///Property: CCD Value
6849    #[serde(skip_serializing_if = "Option::is_none")]
6850    #[cfg_attr(
6851        feature = "builder",
6852        builder(with = |value:impl Into<String>|vec![value.into()])
6853    )]
6854    pub ccd_value: Option<Vec<String>>,
6855    ///Property: Contract
6856    #[serde(skip_serializing_if = "Option::is_none")]
6857    #[cfg_attr(
6858        feature = "builder",
6859        builder(with = |value:impl Into<String>|vec![value.into()])
6860    )]
6861    pub contract: Option<Vec<String>>,
6862    ///Property: Contract holder
6863    #[serde(skip_serializing_if = "Option::is_none")]
6864    #[cfg_attr(
6865        feature = "builder",
6866        builder(with = |value:impl Into<String>|vec![value.into()])
6867    )]
6868    pub contract_holder: Option<Vec<String>>,
6869    ///Property: Customs Value Amount
6870    #[serde(skip_serializing_if = "Option::is_none")]
6871    #[cfg_attr(
6872        feature = "builder",
6873        builder(with = |value:impl Into<String>|vec![value.into()])
6874    )]
6875    pub customs_amount: Option<Vec<String>>,
6876    ///Property: Customs Procedure
6877    #[serde(skip_serializing_if = "Option::is_none")]
6878    #[cfg_attr(
6879        feature = "builder",
6880        builder(with = |value:impl Into<String>|vec![value.into()])
6881    )]
6882    pub customs_procedure: Option<Vec<String>>,
6883    ///Property: Date
6884    #[serde(skip_serializing_if = "Option::is_none")]
6885    #[cfg_attr(
6886        feature = "builder",
6887        builder(with = |value:impl Into<String>|vec![value.into()])
6888    )]
6889    pub date: Option<Vec<String>>,
6890    ///Property: Declarant
6891    #[serde(skip_serializing_if = "Option::is_none")]
6892    #[cfg_attr(
6893        feature = "builder",
6894        builder(with = |value:impl Into<String>|vec![value.into()])
6895    )]
6896    pub declarant: Option<Vec<String>>,
6897    ///Property: Country of departure
6898    #[serde(skip_serializing_if = "Option::is_none")]
6899    #[cfg_attr(
6900        feature = "builder",
6901        builder(with = |value:impl Into<String>|vec![value.into()])
6902    )]
6903    pub departure_country: Option<Vec<String>>,
6904    ///Property: Description
6905    #[serde(skip_serializing_if = "Option::is_none")]
6906    #[cfg_attr(
6907        feature = "builder",
6908        builder(with = |value:impl Into<String>|vec![value.into()])
6909    )]
6910    pub description: Option<Vec<String>>,
6911    ///Property: Country of destination
6912    #[serde(skip_serializing_if = "Option::is_none")]
6913    #[cfg_attr(
6914        feature = "builder",
6915        builder(with = |value:impl Into<String>|vec![value.into()])
6916    )]
6917    pub destination_country: Option<Vec<String>>,
6918    ///Property: Direction of transportation
6919    #[serde(skip_serializing_if = "Option::is_none")]
6920    #[cfg_attr(
6921        feature = "builder",
6922        builder(with = |value:impl Into<String>|vec![value.into()])
6923    )]
6924    pub direction_of_transportation: Option<Vec<String>>,
6925    ///Property: USD Exchange Rate
6926    #[serde(skip_serializing_if = "Option::is_none")]
6927    #[cfg_attr(
6928        feature = "builder",
6929        builder(with = |value:impl Into<String>|vec![value.into()])
6930    )]
6931    pub dollar_exch_rate: Option<Vec<String>>,
6932    ///Property: End date
6933    #[serde(skip_serializing_if = "Option::is_none")]
6934    #[cfg_attr(
6935        feature = "builder",
6936        builder(with = |value:impl Into<String>|vec![value.into()])
6937    )]
6938    pub end_date: Option<Vec<String>>,
6939    ///Property: Description of goods
6940    #[serde(skip_serializing_if = "Option::is_none")]
6941    #[cfg_attr(
6942        feature = "builder",
6943        builder(with = |value:impl Into<String>|vec![value.into()])
6944    )]
6945    pub goods_description: Option<Vec<String>>,
6946    ///Property: Index text
6947    #[serde(skip_serializing_if = "Option::is_none")]
6948    #[cfg_attr(
6949        feature = "builder",
6950        builder(with = |value:impl Into<String>|vec![value.into()])
6951    )]
6952    pub index_text: Option<Vec<String>>,
6953    ///Property: Invoice Value Amount
6954    #[serde(skip_serializing_if = "Option::is_none")]
6955    #[cfg_attr(
6956        feature = "builder",
6957        builder(with = |value:impl Into<String>|vec![value.into()])
6958    )]
6959    pub invoice_amount: Option<Vec<String>>,
6960    ///Property: Modified on
6961    #[serde(skip_serializing_if = "Option::is_none")]
6962    #[cfg_attr(
6963        feature = "builder",
6964        builder(with = |value:impl Into<String>|vec![value.into()])
6965    )]
6966    pub modified_at: Option<Vec<String>>,
6967    ///Property: Detected names
6968    #[serde(skip_serializing_if = "Option::is_none")]
6969    #[cfg_attr(
6970        feature = "builder",
6971        builder(with = |value:impl Into<String>|vec![value.into()])
6972    )]
6973    pub names_mentioned: Option<Vec<String>>,
6974    ///Property: Country of origin
6975    #[serde(skip_serializing_if = "Option::is_none")]
6976    #[cfg_attr(
6977        feature = "builder",
6978        builder(with = |value:impl Into<String>|vec![value.into()])
6979    )]
6980    pub origin_country: Option<Vec<String>>,
6981    ///Property: Source document
6982    #[serde(skip_serializing_if = "Option::is_none")]
6983    #[cfg_attr(
6984        feature = "builder",
6985        builder(with = |value:impl Into<String>|vec![value.into()])
6986    )]
6987    pub proof: Option<Vec<String>>,
6988    ///Property: Publishing source
6989    #[serde(skip_serializing_if = "Option::is_none")]
6990    #[cfg_attr(
6991        feature = "builder",
6992        builder(with = |value:impl Into<String>|vec![value.into()])
6993    )]
6994    pub publisher: Option<Vec<String>>,
6995    ///Property: Publishing source URL
6996    #[serde(skip_serializing_if = "Option::is_none")]
6997    #[cfg_attr(
6998        feature = "builder",
6999        builder(with = |value:impl Into<String>|vec![value.into()])
7000    )]
7001    pub publisher_url: Option<Vec<String>>,
7002    ///Property: Receiver
7003    #[serde(skip_serializing_if = "Option::is_none")]
7004    #[cfg_attr(
7005        feature = "builder",
7006        builder(with = |value:impl Into<String>|vec![value.into()])
7007    )]
7008    pub receiver: Option<Vec<String>>,
7009    ///Property: Record ID
7010    #[serde(skip_serializing_if = "Option::is_none")]
7011    #[cfg_attr(
7012        feature = "builder",
7013        builder(with = |value:impl Into<String>|vec![value.into()])
7014    )]
7015    pub record_id: Option<Vec<String>>,
7016    ///Property: Retrieved on
7017    #[serde(skip_serializing_if = "Option::is_none")]
7018    #[cfg_attr(
7019        feature = "builder",
7020        builder(with = |value:impl Into<String>|vec![value.into()])
7021    )]
7022    pub retrieved_at: Option<Vec<String>>,
7023    ///Property: Sender
7024    #[serde(skip_serializing_if = "Option::is_none")]
7025    #[cfg_attr(
7026        feature = "builder",
7027        builder(with = |value:impl Into<String>|vec![value.into()])
7028    )]
7029    pub sender: Option<Vec<String>>,
7030    ///Property: Source link
7031    #[serde(skip_serializing_if = "Option::is_none")]
7032    #[cfg_attr(
7033        feature = "builder",
7034        builder(with = |value:impl Into<String>|vec![value.into()])
7035    )]
7036    pub source_url: Option<Vec<String>>,
7037    ///Property: Start date
7038    #[serde(skip_serializing_if = "Option::is_none")]
7039    #[cfg_attr(
7040        feature = "builder",
7041        builder(with = |value:impl Into<String>|vec![value.into()])
7042    )]
7043    pub start_date: Option<Vec<String>>,
7044    ///Property: Summary
7045    #[serde(skip_serializing_if = "Option::is_none")]
7046    #[cfg_attr(
7047        feature = "builder",
7048        builder(with = |value:impl Into<String>|vec![value.into()])
7049    )]
7050    pub summary: Option<Vec<String>>,
7051    ///Property: Trading Country
7052    #[serde(skip_serializing_if = "Option::is_none")]
7053    #[cfg_attr(
7054        feature = "builder",
7055        builder(with = |value:impl Into<String>|vec![value.into()])
7056    )]
7057    pub trading_country: Option<Vec<String>>,
7058    ///Property: Transport
7059    #[serde(skip_serializing_if = "Option::is_none")]
7060    #[cfg_attr(
7061        feature = "builder",
7062        builder(with = |value:impl Into<String>|vec![value.into()])
7063    )]
7064    pub transport: Option<Vec<String>>,
7065    ///Property: FEAC Code
7066    #[serde(skip_serializing_if = "Option::is_none")]
7067    #[cfg_attr(
7068        feature = "builder",
7069        builder(with = |value:impl Into<String>|vec![value.into()])
7070    )]
7071    pub ved_code: Option<Vec<String>>,
7072    ///Property: FEAC Code description
7073    #[serde(skip_serializing_if = "Option::is_none")]
7074    #[cfg_attr(
7075        feature = "builder",
7076        builder(with = |value:impl Into<String>|vec![value.into()])
7077    )]
7078    pub ved_code_description: Option<Vec<String>>,
7079}
7080impl EconomicActivity {
7081    /// Create a new entity with the given ID
7082    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
7083    pub fn new(id: impl Into<String>) -> Self {
7084        Self {
7085            id: id.into(),
7086            schema: "EconomicActivity".to_string(),
7087            aleph_url: None,
7088            bank_account: None,
7089            bank_foreign: None,
7090            bank_rub: None,
7091            ccd_number: None,
7092            ccd_value: None,
7093            contract: None,
7094            contract_holder: None,
7095            customs_amount: None,
7096            customs_procedure: None,
7097            date: None,
7098            declarant: None,
7099            departure_country: None,
7100            description: None,
7101            destination_country: None,
7102            direction_of_transportation: None,
7103            dollar_exch_rate: None,
7104            end_date: None,
7105            goods_description: None,
7106            index_text: None,
7107            invoice_amount: None,
7108            modified_at: None,
7109            names_mentioned: None,
7110            origin_country: None,
7111            proof: None,
7112            publisher: None,
7113            publisher_url: None,
7114            receiver: None,
7115            record_id: None,
7116            retrieved_at: None,
7117            sender: None,
7118            source_url: None,
7119            start_date: None,
7120            summary: None,
7121            trading_country: None,
7122            transport: None,
7123            ved_code: None,
7124            ved_code_description: None,
7125        }
7126    }
7127    /// Get the schema name
7128    pub fn schema_name() -> &'static str {
7129        "EconomicActivity"
7130    }
7131    /// Serialize to standard FTM nested JSON format
7132    ///
7133    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
7134    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
7135        let mut value = serde_json::to_value(self)?;
7136        if let Some(obj) = value.as_object_mut() {
7137            let id = obj.remove("id");
7138            let schema = obj.remove("schema");
7139            let properties = serde_json::Value::Object(std::mem::take(obj));
7140            if let Some(id) = id {
7141                obj.insert("id".into(), id);
7142            }
7143            if let Some(schema) = schema {
7144                obj.insert("schema".into(), schema);
7145            }
7146            obj.insert("properties".into(), properties);
7147        }
7148        serde_json::to_string(&value)
7149    }
7150}
7151///FTM Schema: E-Mail
7152#[derive(Debug, Clone, Serialize, Deserialize)]
7153#[cfg_attr(feature = "builder", derive(Builder))]
7154#[serde(rename_all = "camelCase")]
7155pub struct Email {
7156    pub id: String,
7157    #[cfg_attr(feature = "builder", builder(default = "Email".to_string()))]
7158    pub schema: String,
7159    ///Property: Address
7160    #[serde(skip_serializing_if = "Option::is_none")]
7161    #[cfg_attr(
7162        feature = "builder",
7163        builder(with = |value:impl Into<String>|vec![value.into()])
7164    )]
7165    pub address: Option<Vec<String>>,
7166    ///Property: Address
7167    #[serde(skip_serializing_if = "Option::is_none")]
7168    #[cfg_attr(
7169        feature = "builder",
7170        builder(with = |value:impl Into<String>|vec![value.into()])
7171    )]
7172    pub address_entity: Option<Vec<String>>,
7173    ///Property: Aleph URL
7174    #[serde(skip_serializing_if = "Option::is_none")]
7175    #[cfg_attr(
7176        feature = "builder",
7177        builder(with = |value:impl Into<String>|vec![value.into()])
7178    )]
7179    pub aleph_url: Option<Vec<String>>,
7180    ///Property: Alias
7181    #[serde(skip_serializing_if = "Option::is_none")]
7182    #[cfg_attr(
7183        feature = "builder",
7184        builder(with = |value:impl Into<String>|vec![value.into()])
7185    )]
7186    pub alias: Option<Vec<String>>,
7187    ///Property: Ancestors
7188    #[serde(skip_serializing_if = "Option::is_none")]
7189    #[cfg_attr(
7190        feature = "builder",
7191        builder(with = |value:impl Into<String>|vec![value.into()])
7192    )]
7193    pub ancestors: Option<Vec<String>>,
7194    ///Property: Author
7195    #[serde(skip_serializing_if = "Option::is_none")]
7196    #[cfg_attr(
7197        feature = "builder",
7198        builder(with = |value:impl Into<String>|vec![value.into()])
7199    )]
7200    pub author: Option<Vec<String>>,
7201    ///Property: Authored on
7202    #[serde(skip_serializing_if = "Option::is_none")]
7203    #[cfg_attr(
7204        feature = "builder",
7205        builder(with = |value:impl Into<String>|vec![value.into()])
7206    )]
7207    pub authored_at: Option<Vec<String>>,
7208    ///Property: BCC
7209    #[serde(skip_serializing_if = "Option::is_none")]
7210    #[cfg_attr(
7211        feature = "builder",
7212        builder(with = |value:impl Into<String>|vec![value.into()])
7213    )]
7214    pub bcc: Option<Vec<String>>,
7215    ///Property: HTML
7216    #[serde(skip_serializing_if = "Option::is_none")]
7217    #[cfg_attr(
7218        feature = "builder",
7219        builder(with = |value:impl Into<String>|vec![value.into()])
7220    )]
7221    pub body_html: Option<Vec<String>>,
7222    ///Property: Text
7223    #[serde(skip_serializing_if = "Option::is_none")]
7224    #[cfg_attr(
7225        feature = "builder",
7226        builder(with = |value:impl Into<String>|vec![value.into()])
7227    )]
7228    pub body_text: Option<Vec<String>>,
7229    ///Property: CC
7230    #[serde(skip_serializing_if = "Option::is_none")]
7231    #[cfg_attr(
7232        feature = "builder",
7233        builder(with = |value:impl Into<String>|vec![value.into()])
7234    )]
7235    pub cc: Option<Vec<String>>,
7236    ///Property: Detected companies
7237    #[serde(skip_serializing_if = "Option::is_none")]
7238    #[cfg_attr(
7239        feature = "builder",
7240        builder(with = |value:impl Into<String>|vec![value.into()])
7241    )]
7242    pub companies_mentioned: Option<Vec<String>>,
7243    ///Property: Checksum
7244    #[serde(skip_serializing_if = "Option::is_none")]
7245    #[cfg_attr(
7246        feature = "builder",
7247        builder(with = |value:impl Into<String>|vec![value.into()])
7248    )]
7249    pub content_hash: Option<Vec<String>>,
7250    ///Property: Country
7251    #[serde(skip_serializing_if = "Option::is_none")]
7252    #[cfg_attr(
7253        feature = "builder",
7254        builder(with = |value:impl Into<String>|vec![value.into()])
7255    )]
7256    pub country: Option<Vec<String>>,
7257    ///Property: Crawler
7258    #[serde(skip_serializing_if = "Option::is_none")]
7259    #[cfg_attr(
7260        feature = "builder",
7261        builder(with = |value:impl Into<String>|vec![value.into()])
7262    )]
7263    pub crawler: Option<Vec<String>>,
7264    ///Property: Created at
7265    #[serde(skip_serializing_if = "Option::is_none")]
7266    #[cfg_attr(
7267        feature = "builder",
7268        builder(with = |value:impl Into<String>|vec![value.into()])
7269    )]
7270    pub created_at: Option<Vec<String>>,
7271    ///Property: Date
7272    #[serde(skip_serializing_if = "Option::is_none")]
7273    #[cfg_attr(
7274        feature = "builder",
7275        builder(with = |value:impl Into<String>|vec![value.into()])
7276    )]
7277    pub date: Option<Vec<String>>,
7278    ///Property: Description
7279    #[serde(skip_serializing_if = "Option::is_none")]
7280    #[cfg_attr(
7281        feature = "builder",
7282        builder(with = |value:impl Into<String>|vec![value.into()])
7283    )]
7284    pub description: Option<Vec<String>>,
7285    ///Property: Detected country
7286    #[serde(skip_serializing_if = "Option::is_none")]
7287    #[cfg_attr(
7288        feature = "builder",
7289        builder(with = |value:impl Into<String>|vec![value.into()])
7290    )]
7291    pub detected_country: Option<Vec<String>>,
7292    ///Property: Detected language
7293    #[serde(skip_serializing_if = "Option::is_none")]
7294    #[cfg_attr(
7295        feature = "builder",
7296        builder(with = |value:impl Into<String>|vec![value.into()])
7297    )]
7298    pub detected_language: Option<Vec<String>>,
7299    ///Property: Detected e-mail addresses
7300    #[serde(skip_serializing_if = "Option::is_none")]
7301    #[cfg_attr(
7302        feature = "builder",
7303        builder(with = |value:impl Into<String>|vec![value.into()])
7304    )]
7305    pub email_mentioned: Option<Vec<String>>,
7306    ///Property: Emitter
7307    #[serde(skip_serializing_if = "Option::is_none")]
7308    #[cfg_attr(
7309        feature = "builder",
7310        builder(with = |value:impl Into<String>|vec![value.into()])
7311    )]
7312    pub emitters: Option<Vec<String>>,
7313    ///Property: File encoding
7314    #[serde(skip_serializing_if = "Option::is_none")]
7315    #[cfg_attr(
7316        feature = "builder",
7317        builder(with = |value:impl Into<String>|vec![value.into()])
7318    )]
7319    pub encoding: Option<Vec<String>>,
7320    ///Property: File extension
7321    #[serde(skip_serializing_if = "Option::is_none")]
7322    #[cfg_attr(
7323        feature = "builder",
7324        builder(with = |value:impl Into<String>|vec![value.into()])
7325    )]
7326    pub extension: Option<Vec<String>>,
7327    ///Property: File name
7328    #[serde(default)]
7329    #[cfg_attr(
7330        feature = "builder",
7331        builder(with = |value:impl Into<String>|vec![value.into()])
7332    )]
7333    pub file_name: Vec<String>,
7334    ///Property: File size
7335    #[serde(
7336        skip_serializing_if = "Option::is_none",
7337        deserialize_with = "deserialize_opt_f64_vec",
7338        default
7339    )]
7340    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
7341    pub file_size: Option<Vec<f64>>,
7342    ///Property: From
7343    #[serde(skip_serializing_if = "Option::is_none")]
7344    #[cfg_attr(
7345        feature = "builder",
7346        builder(with = |value:impl Into<String>|vec![value.into()])
7347    )]
7348    pub from: Option<Vec<String>>,
7349    ///Property: Generator
7350    #[serde(skip_serializing_if = "Option::is_none")]
7351    #[cfg_attr(
7352        feature = "builder",
7353        builder(with = |value:impl Into<String>|vec![value.into()])
7354    )]
7355    pub generator: Option<Vec<String>>,
7356    ///Property: Raw headers
7357    #[serde(skip_serializing_if = "Option::is_none")]
7358    pub headers: Option<serde_json::Value>,
7359    ///Property: Detected IBANs
7360    #[serde(skip_serializing_if = "Option::is_none")]
7361    #[cfg_attr(
7362        feature = "builder",
7363        builder(with = |value:impl Into<String>|vec![value.into()])
7364    )]
7365    pub iban_mentioned: Option<Vec<String>>,
7366    ///Property: In Reply To
7367    #[serde(skip_serializing_if = "Option::is_none")]
7368    #[cfg_attr(
7369        feature = "builder",
7370        builder(with = |value:impl Into<String>|vec![value.into()])
7371    )]
7372    pub in_reply_to: Option<Vec<String>>,
7373    ///Property: Responding to
7374    #[serde(skip_serializing_if = "Option::is_none")]
7375    #[cfg_attr(
7376        feature = "builder",
7377        builder(with = |value:impl Into<String>|vec![value.into()])
7378    )]
7379    pub in_reply_to_email: Option<Vec<String>>,
7380    ///Property: Index text
7381    #[serde(skip_serializing_if = "Option::is_none")]
7382    #[cfg_attr(
7383        feature = "builder",
7384        builder(with = |value:impl Into<String>|vec![value.into()])
7385    )]
7386    pub index_text: Option<Vec<String>>,
7387    ///Property: Detected IP addresses
7388    #[serde(skip_serializing_if = "Option::is_none")]
7389    #[cfg_attr(
7390        feature = "builder",
7391        builder(with = |value:impl Into<String>|vec![value.into()])
7392    )]
7393    pub ip_mentioned: Option<Vec<String>>,
7394    ///Property: Keywords
7395    #[serde(skip_serializing_if = "Option::is_none")]
7396    #[cfg_attr(
7397        feature = "builder",
7398        builder(with = |value:impl Into<String>|vec![value.into()])
7399    )]
7400    pub keywords: Option<Vec<String>>,
7401    ///Property: Language
7402    #[serde(skip_serializing_if = "Option::is_none")]
7403    #[cfg_attr(
7404        feature = "builder",
7405        builder(with = |value:impl Into<String>|vec![value.into()])
7406    )]
7407    pub language: Option<Vec<String>>,
7408    ///Property: Detected locations
7409    #[serde(skip_serializing_if = "Option::is_none")]
7410    #[cfg_attr(
7411        feature = "builder",
7412        builder(with = |value:impl Into<String>|vec![value.into()])
7413    )]
7414    pub location_mentioned: Option<Vec<String>>,
7415    ///Property: Message ID
7416    #[serde(skip_serializing_if = "Option::is_none")]
7417    #[cfg_attr(
7418        feature = "builder",
7419        builder(with = |value:impl Into<String>|vec![value.into()])
7420    )]
7421    pub message_id: Option<Vec<String>>,
7422    ///Property: MIME type
7423    #[serde(skip_serializing_if = "Option::is_none")]
7424    #[cfg_attr(
7425        feature = "builder",
7426        builder(with = |value:impl Into<String>|vec![value.into()])
7427    )]
7428    pub mime_type: Option<Vec<String>>,
7429    ///Property: Modified on
7430    #[serde(skip_serializing_if = "Option::is_none")]
7431    #[cfg_attr(
7432        feature = "builder",
7433        builder(with = |value:impl Into<String>|vec![value.into()])
7434    )]
7435    pub modified_at: Option<Vec<String>>,
7436    ///Property: Name
7437    #[serde(default)]
7438    #[cfg_attr(
7439        feature = "builder",
7440        builder(with = |value:impl Into<String>|vec![value.into()])
7441    )]
7442    pub name: Vec<String>,
7443    ///Property: Detected names
7444    #[serde(skip_serializing_if = "Option::is_none")]
7445    #[cfg_attr(
7446        feature = "builder",
7447        builder(with = |value:impl Into<String>|vec![value.into()])
7448    )]
7449    pub names_mentioned: Option<Vec<String>>,
7450    ///Property: Notes
7451    #[serde(skip_serializing_if = "Option::is_none")]
7452    #[cfg_attr(
7453        feature = "builder",
7454        builder(with = |value:impl Into<String>|vec![value.into()])
7455    )]
7456    pub notes: Option<Vec<String>>,
7457    ///Property: Folder
7458    #[serde(skip_serializing_if = "Option::is_none")]
7459    #[cfg_attr(
7460        feature = "builder",
7461        builder(with = |value:impl Into<String>|vec![value.into()])
7462    )]
7463    pub parent: Option<Vec<String>>,
7464    ///Property: Detected people
7465    #[serde(skip_serializing_if = "Option::is_none")]
7466    #[cfg_attr(
7467        feature = "builder",
7468        builder(with = |value:impl Into<String>|vec![value.into()])
7469    )]
7470    pub people_mentioned: Option<Vec<String>>,
7471    ///Property: Detected phones
7472    #[serde(skip_serializing_if = "Option::is_none")]
7473    #[cfg_attr(
7474        feature = "builder",
7475        builder(with = |value:impl Into<String>|vec![value.into()])
7476    )]
7477    pub phone_mentioned: Option<Vec<String>>,
7478    ///Property: Previous name
7479    #[serde(skip_serializing_if = "Option::is_none")]
7480    #[cfg_attr(
7481        feature = "builder",
7482        builder(with = |value:impl Into<String>|vec![value.into()])
7483    )]
7484    pub previous_name: Option<Vec<String>>,
7485    ///Property: Processed at
7486    #[serde(skip_serializing_if = "Option::is_none")]
7487    #[cfg_attr(
7488        feature = "builder",
7489        builder(with = |value:impl Into<String>|vec![value.into()])
7490    )]
7491    pub processed_at: Option<Vec<String>>,
7492    ///Property: Processing agent
7493    #[serde(skip_serializing_if = "Option::is_none")]
7494    #[cfg_attr(
7495        feature = "builder",
7496        builder(with = |value:impl Into<String>|vec![value.into()])
7497    )]
7498    pub processing_agent: Option<Vec<String>>,
7499    ///Property: Processing error
7500    #[serde(skip_serializing_if = "Option::is_none")]
7501    #[cfg_attr(
7502        feature = "builder",
7503        builder(with = |value:impl Into<String>|vec![value.into()])
7504    )]
7505    pub processing_error: Option<Vec<String>>,
7506    ///Property: Processing status
7507    #[serde(skip_serializing_if = "Option::is_none")]
7508    #[cfg_attr(
7509        feature = "builder",
7510        builder(with = |value:impl Into<String>|vec![value.into()])
7511    )]
7512    pub processing_status: Option<Vec<String>>,
7513    ///Property: Program
7514    #[serde(skip_serializing_if = "Option::is_none")]
7515    #[cfg_attr(
7516        feature = "builder",
7517        builder(with = |value:impl Into<String>|vec![value.into()])
7518    )]
7519    pub program: Option<Vec<String>>,
7520    ///Property: Program ID
7521    #[serde(skip_serializing_if = "Option::is_none")]
7522    #[cfg_attr(
7523        feature = "builder",
7524        builder(with = |value:impl Into<String>|vec![value.into()])
7525    )]
7526    pub program_id: Option<Vec<String>>,
7527    ///Property: Source document
7528    #[serde(skip_serializing_if = "Option::is_none")]
7529    #[cfg_attr(
7530        feature = "builder",
7531        builder(with = |value:impl Into<String>|vec![value.into()])
7532    )]
7533    pub proof: Option<Vec<String>>,
7534    ///Property: Published on
7535    #[serde(skip_serializing_if = "Option::is_none")]
7536    #[cfg_attr(
7537        feature = "builder",
7538        builder(with = |value:impl Into<String>|vec![value.into()])
7539    )]
7540    pub published_at: Option<Vec<String>>,
7541    ///Property: Publishing source
7542    #[serde(skip_serializing_if = "Option::is_none")]
7543    #[cfg_attr(
7544        feature = "builder",
7545        builder(with = |value:impl Into<String>|vec![value.into()])
7546    )]
7547    pub publisher: Option<Vec<String>>,
7548    ///Property: Publishing source URL
7549    #[serde(skip_serializing_if = "Option::is_none")]
7550    #[cfg_attr(
7551        feature = "builder",
7552        builder(with = |value:impl Into<String>|vec![value.into()])
7553    )]
7554    pub publisher_url: Option<Vec<String>>,
7555    ///Property: Recipients
7556    #[serde(skip_serializing_if = "Option::is_none")]
7557    #[cfg_attr(
7558        feature = "builder",
7559        builder(with = |value:impl Into<String>|vec![value.into()])
7560    )]
7561    pub recipients: Option<Vec<String>>,
7562    ///Property: Retrieved on
7563    #[serde(skip_serializing_if = "Option::is_none")]
7564    #[cfg_attr(
7565        feature = "builder",
7566        builder(with = |value:impl Into<String>|vec![value.into()])
7567    )]
7568    pub retrieved_at: Option<Vec<String>>,
7569    ///Property: Sender
7570    #[serde(skip_serializing_if = "Option::is_none")]
7571    #[cfg_attr(
7572        feature = "builder",
7573        builder(with = |value:impl Into<String>|vec![value.into()])
7574    )]
7575    pub sender: Option<Vec<String>>,
7576    ///Property: Source link
7577    #[serde(skip_serializing_if = "Option::is_none")]
7578    #[cfg_attr(
7579        feature = "builder",
7580        builder(with = |value:impl Into<String>|vec![value.into()])
7581    )]
7582    pub source_url: Option<Vec<String>>,
7583    ///Property: Subject
7584    #[serde(skip_serializing_if = "Option::is_none")]
7585    #[cfg_attr(
7586        feature = "builder",
7587        builder(with = |value:impl Into<String>|vec![value.into()])
7588    )]
7589    pub subject: Option<Vec<String>>,
7590    ///Property: Summary
7591    #[serde(skip_serializing_if = "Option::is_none")]
7592    #[cfg_attr(
7593        feature = "builder",
7594        builder(with = |value:impl Into<String>|vec![value.into()])
7595    )]
7596    pub summary: Option<Vec<String>>,
7597    ///Property: Thread topic
7598    #[serde(skip_serializing_if = "Option::is_none")]
7599    #[cfg_attr(
7600        feature = "builder",
7601        builder(with = |value:impl Into<String>|vec![value.into()])
7602    )]
7603    pub thread_topic: Option<Vec<String>>,
7604    ///Property: Title
7605    #[serde(skip_serializing_if = "Option::is_none")]
7606    #[cfg_attr(
7607        feature = "builder",
7608        builder(with = |value:impl Into<String>|vec![value.into()])
7609    )]
7610    pub title: Option<Vec<String>>,
7611    ///Property: To
7612    #[serde(skip_serializing_if = "Option::is_none")]
7613    #[cfg_attr(
7614        feature = "builder",
7615        builder(with = |value:impl Into<String>|vec![value.into()])
7616    )]
7617    pub to: Option<Vec<String>>,
7618    ///Property: Topics
7619    #[serde(skip_serializing_if = "Option::is_none")]
7620    #[cfg_attr(
7621        feature = "builder",
7622        builder(with = |value:impl Into<String>|vec![value.into()])
7623    )]
7624    pub topics: Option<Vec<String>>,
7625    ///Property: The language of the translated text
7626    #[serde(skip_serializing_if = "Option::is_none")]
7627    #[cfg_attr(
7628        feature = "builder",
7629        builder(with = |value:impl Into<String>|vec![value.into()])
7630    )]
7631    pub translated_language: Option<Vec<String>>,
7632    ///Property: Translated version of the body text
7633    #[serde(skip_serializing_if = "Option::is_none")]
7634    #[cfg_attr(
7635        feature = "builder",
7636        builder(with = |value:impl Into<String>|vec![value.into()])
7637    )]
7638    pub translated_text: Option<Vec<String>>,
7639    ///Property: Weak alias
7640    #[serde(skip_serializing_if = "Option::is_none")]
7641    #[cfg_attr(
7642        feature = "builder",
7643        builder(with = |value:impl Into<String>|vec![value.into()])
7644    )]
7645    pub weak_alias: Option<Vec<String>>,
7646    ///Property: Wikidata ID
7647    #[serde(skip_serializing_if = "Option::is_none")]
7648    #[cfg_attr(
7649        feature = "builder",
7650        builder(with = |value:impl Into<String>|vec![value.into()])
7651    )]
7652    pub wikidata_id: Option<Vec<String>>,
7653    ///Property: Wikipedia Article
7654    #[serde(skip_serializing_if = "Option::is_none")]
7655    #[cfg_attr(
7656        feature = "builder",
7657        builder(with = |value:impl Into<String>|vec![value.into()])
7658    )]
7659    pub wikipedia_url: Option<Vec<String>>,
7660}
7661impl Email {
7662    /// Create a new entity with the given ID
7663    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
7664    pub fn new(id: impl Into<String>) -> Self {
7665        Self {
7666            id: id.into(),
7667            schema: "Email".to_string(),
7668            address: None,
7669            address_entity: None,
7670            aleph_url: None,
7671            alias: None,
7672            ancestors: None,
7673            author: None,
7674            authored_at: None,
7675            bcc: None,
7676            body_html: None,
7677            body_text: None,
7678            cc: None,
7679            companies_mentioned: None,
7680            content_hash: None,
7681            country: None,
7682            crawler: None,
7683            created_at: None,
7684            date: None,
7685            description: None,
7686            detected_country: None,
7687            detected_language: None,
7688            email_mentioned: None,
7689            emitters: None,
7690            encoding: None,
7691            extension: None,
7692            file_name: Vec::new(),
7693            file_size: None,
7694            from: None,
7695            generator: None,
7696            headers: None,
7697            iban_mentioned: None,
7698            in_reply_to: None,
7699            in_reply_to_email: None,
7700            index_text: None,
7701            ip_mentioned: None,
7702            keywords: None,
7703            language: None,
7704            location_mentioned: None,
7705            message_id: None,
7706            mime_type: None,
7707            modified_at: None,
7708            name: Vec::new(),
7709            names_mentioned: None,
7710            notes: None,
7711            parent: None,
7712            people_mentioned: None,
7713            phone_mentioned: None,
7714            previous_name: None,
7715            processed_at: None,
7716            processing_agent: None,
7717            processing_error: None,
7718            processing_status: None,
7719            program: None,
7720            program_id: None,
7721            proof: None,
7722            published_at: None,
7723            publisher: None,
7724            publisher_url: None,
7725            recipients: None,
7726            retrieved_at: None,
7727            sender: None,
7728            source_url: None,
7729            subject: None,
7730            summary: None,
7731            thread_topic: None,
7732            title: None,
7733            to: None,
7734            topics: None,
7735            translated_language: None,
7736            translated_text: None,
7737            weak_alias: None,
7738            wikidata_id: None,
7739            wikipedia_url: None,
7740        }
7741    }
7742    /// Get the schema name
7743    pub fn schema_name() -> &'static str {
7744        "Email"
7745    }
7746    /// Serialize to standard FTM nested JSON format
7747    ///
7748    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
7749    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
7750        let mut value = serde_json::to_value(self)?;
7751        if let Some(obj) = value.as_object_mut() {
7752            let id = obj.remove("id");
7753            let schema = obj.remove("schema");
7754            let properties = serde_json::Value::Object(std::mem::take(obj));
7755            if let Some(id) = id {
7756                obj.insert("id".into(), id);
7757            }
7758            if let Some(schema) = schema {
7759                obj.insert("schema".into(), schema);
7760            }
7761            obj.insert("properties".into(), properties);
7762        }
7763        serde_json::to_string(&value)
7764    }
7765}
7766///FTM Schema: Employment
7767#[derive(Debug, Clone, Serialize, Deserialize)]
7768#[cfg_attr(feature = "builder", derive(Builder))]
7769#[serde(rename_all = "camelCase")]
7770pub struct Employment {
7771    pub id: String,
7772    #[cfg_attr(feature = "builder", builder(default = "Employment".to_string()))]
7773    pub schema: String,
7774    ///Property: Aleph URL
7775    #[serde(skip_serializing_if = "Option::is_none")]
7776    #[cfg_attr(
7777        feature = "builder",
7778        builder(with = |value:impl Into<String>|vec![value.into()])
7779    )]
7780    pub aleph_url: Option<Vec<String>>,
7781    ///Property: Date
7782    #[serde(skip_serializing_if = "Option::is_none")]
7783    #[cfg_attr(
7784        feature = "builder",
7785        builder(with = |value:impl Into<String>|vec![value.into()])
7786    )]
7787    pub date: Option<Vec<String>>,
7788    ///Property: Description
7789    #[serde(skip_serializing_if = "Option::is_none")]
7790    #[cfg_attr(
7791        feature = "builder",
7792        builder(with = |value:impl Into<String>|vec![value.into()])
7793    )]
7794    pub description: Option<Vec<String>>,
7795    ///Property: Employee
7796    #[serde(default)]
7797    #[cfg_attr(
7798        feature = "builder",
7799        builder(with = |value:impl Into<String>|vec![value.into()])
7800    )]
7801    pub employee: Vec<String>,
7802    ///Property: Employer
7803    #[serde(default)]
7804    #[cfg_attr(
7805        feature = "builder",
7806        builder(with = |value:impl Into<String>|vec![value.into()])
7807    )]
7808    pub employer: Vec<String>,
7809    ///Property: End date
7810    #[serde(skip_serializing_if = "Option::is_none")]
7811    #[cfg_attr(
7812        feature = "builder",
7813        builder(with = |value:impl Into<String>|vec![value.into()])
7814    )]
7815    pub end_date: Option<Vec<String>>,
7816    ///Property: Index text
7817    #[serde(skip_serializing_if = "Option::is_none")]
7818    #[cfg_attr(
7819        feature = "builder",
7820        builder(with = |value:impl Into<String>|vec![value.into()])
7821    )]
7822    pub index_text: Option<Vec<String>>,
7823    ///Property: Modified on
7824    #[serde(skip_serializing_if = "Option::is_none")]
7825    #[cfg_attr(
7826        feature = "builder",
7827        builder(with = |value:impl Into<String>|vec![value.into()])
7828    )]
7829    pub modified_at: Option<Vec<String>>,
7830    ///Property: Detected names
7831    #[serde(skip_serializing_if = "Option::is_none")]
7832    #[cfg_attr(
7833        feature = "builder",
7834        builder(with = |value:impl Into<String>|vec![value.into()])
7835    )]
7836    pub names_mentioned: Option<Vec<String>>,
7837    ///Property: Source document
7838    #[serde(skip_serializing_if = "Option::is_none")]
7839    #[cfg_attr(
7840        feature = "builder",
7841        builder(with = |value:impl Into<String>|vec![value.into()])
7842    )]
7843    pub proof: Option<Vec<String>>,
7844    ///Property: Publishing source
7845    #[serde(skip_serializing_if = "Option::is_none")]
7846    #[cfg_attr(
7847        feature = "builder",
7848        builder(with = |value:impl Into<String>|vec![value.into()])
7849    )]
7850    pub publisher: Option<Vec<String>>,
7851    ///Property: Publishing source URL
7852    #[serde(skip_serializing_if = "Option::is_none")]
7853    #[cfg_attr(
7854        feature = "builder",
7855        builder(with = |value:impl Into<String>|vec![value.into()])
7856    )]
7857    pub publisher_url: Option<Vec<String>>,
7858    ///Property: Record ID
7859    #[serde(skip_serializing_if = "Option::is_none")]
7860    #[cfg_attr(
7861        feature = "builder",
7862        builder(with = |value:impl Into<String>|vec![value.into()])
7863    )]
7864    pub record_id: Option<Vec<String>>,
7865    ///Property: Retrieved on
7866    #[serde(skip_serializing_if = "Option::is_none")]
7867    #[cfg_attr(
7868        feature = "builder",
7869        builder(with = |value:impl Into<String>|vec![value.into()])
7870    )]
7871    pub retrieved_at: Option<Vec<String>>,
7872    ///Property: Role
7873    #[serde(skip_serializing_if = "Option::is_none")]
7874    #[cfg_attr(
7875        feature = "builder",
7876        builder(with = |value:impl Into<String>|vec![value.into()])
7877    )]
7878    pub role: Option<Vec<String>>,
7879    ///Property: Source link
7880    #[serde(skip_serializing_if = "Option::is_none")]
7881    #[cfg_attr(
7882        feature = "builder",
7883        builder(with = |value:impl Into<String>|vec![value.into()])
7884    )]
7885    pub source_url: Option<Vec<String>>,
7886    ///Property: Start date
7887    #[serde(skip_serializing_if = "Option::is_none")]
7888    #[cfg_attr(
7889        feature = "builder",
7890        builder(with = |value:impl Into<String>|vec![value.into()])
7891    )]
7892    pub start_date: Option<Vec<String>>,
7893    ///Property: Status
7894    #[serde(skip_serializing_if = "Option::is_none")]
7895    #[cfg_attr(
7896        feature = "builder",
7897        builder(with = |value:impl Into<String>|vec![value.into()])
7898    )]
7899    pub status: Option<Vec<String>>,
7900    ///Property: Summary
7901    #[serde(skip_serializing_if = "Option::is_none")]
7902    #[cfg_attr(
7903        feature = "builder",
7904        builder(with = |value:impl Into<String>|vec![value.into()])
7905    )]
7906    pub summary: Option<Vec<String>>,
7907}
7908impl Employment {
7909    /// Create a new entity with the given ID
7910    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
7911    pub fn new(id: impl Into<String>) -> Self {
7912        Self {
7913            id: id.into(),
7914            schema: "Employment".to_string(),
7915            aleph_url: None,
7916            date: None,
7917            description: None,
7918            employee: Vec::new(),
7919            employer: Vec::new(),
7920            end_date: None,
7921            index_text: None,
7922            modified_at: None,
7923            names_mentioned: None,
7924            proof: None,
7925            publisher: None,
7926            publisher_url: None,
7927            record_id: None,
7928            retrieved_at: None,
7929            role: None,
7930            source_url: None,
7931            start_date: None,
7932            status: None,
7933            summary: None,
7934        }
7935    }
7936    /// Get the schema name
7937    pub fn schema_name() -> &'static str {
7938        "Employment"
7939    }
7940    /// Serialize to standard FTM nested JSON format
7941    ///
7942    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
7943    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
7944        let mut value = serde_json::to_value(self)?;
7945        if let Some(obj) = value.as_object_mut() {
7946            let id = obj.remove("id");
7947            let schema = obj.remove("schema");
7948            let properties = serde_json::Value::Object(std::mem::take(obj));
7949            if let Some(id) = id {
7950                obj.insert("id".into(), id);
7951            }
7952            if let Some(schema) = schema {
7953                obj.insert("schema".into(), schema);
7954            }
7955            obj.insert("properties".into(), properties);
7956        }
7957        serde_json::to_string(&value)
7958    }
7959}
7960///FTM Schema: Event
7961#[derive(Debug, Clone, Serialize, Deserialize)]
7962#[cfg_attr(feature = "builder", derive(Builder))]
7963#[serde(rename_all = "camelCase")]
7964pub struct Event {
7965    pub id: String,
7966    #[cfg_attr(feature = "builder", builder(default = "Event".to_string()))]
7967    pub schema: String,
7968    ///Property: Address
7969    #[serde(skip_serializing_if = "Option::is_none")]
7970    #[cfg_attr(
7971        feature = "builder",
7972        builder(with = |value:impl Into<String>|vec![value.into()])
7973    )]
7974    pub address: Option<Vec<String>>,
7975    ///Property: Address
7976    #[serde(skip_serializing_if = "Option::is_none")]
7977    #[cfg_attr(
7978        feature = "builder",
7979        builder(with = |value:impl Into<String>|vec![value.into()])
7980    )]
7981    pub address_entity: Option<Vec<String>>,
7982    ///Property: Aleph URL
7983    #[serde(skip_serializing_if = "Option::is_none")]
7984    #[cfg_attr(
7985        feature = "builder",
7986        builder(with = |value:impl Into<String>|vec![value.into()])
7987    )]
7988    pub aleph_url: Option<Vec<String>>,
7989    ///Property: Alias
7990    #[serde(skip_serializing_if = "Option::is_none")]
7991    #[cfg_attr(
7992        feature = "builder",
7993        builder(with = |value:impl Into<String>|vec![value.into()])
7994    )]
7995    pub alias: Option<Vec<String>>,
7996    ///Property: Detected companies
7997    #[serde(skip_serializing_if = "Option::is_none")]
7998    #[cfg_attr(
7999        feature = "builder",
8000        builder(with = |value:impl Into<String>|vec![value.into()])
8001    )]
8002    pub companies_mentioned: Option<Vec<String>>,
8003    ///Property: Country
8004    #[serde(skip_serializing_if = "Option::is_none")]
8005    #[cfg_attr(
8006        feature = "builder",
8007        builder(with = |value:impl Into<String>|vec![value.into()])
8008    )]
8009    pub country: Option<Vec<String>>,
8010    ///Property: Created at
8011    #[serde(skip_serializing_if = "Option::is_none")]
8012    #[cfg_attr(
8013        feature = "builder",
8014        builder(with = |value:impl Into<String>|vec![value.into()])
8015    )]
8016    pub created_at: Option<Vec<String>>,
8017    ///Property: Date
8018    #[serde(skip_serializing_if = "Option::is_none")]
8019    #[cfg_attr(
8020        feature = "builder",
8021        builder(with = |value:impl Into<String>|vec![value.into()])
8022    )]
8023    pub date: Option<Vec<String>>,
8024    ///Property: Description
8025    #[serde(skip_serializing_if = "Option::is_none")]
8026    #[cfg_attr(
8027        feature = "builder",
8028        builder(with = |value:impl Into<String>|vec![value.into()])
8029    )]
8030    pub description: Option<Vec<String>>,
8031    ///Property: Detected country
8032    #[serde(skip_serializing_if = "Option::is_none")]
8033    #[cfg_attr(
8034        feature = "builder",
8035        builder(with = |value:impl Into<String>|vec![value.into()])
8036    )]
8037    pub detected_country: Option<Vec<String>>,
8038    ///Property: Detected language
8039    #[serde(skip_serializing_if = "Option::is_none")]
8040    #[cfg_attr(
8041        feature = "builder",
8042        builder(with = |value:impl Into<String>|vec![value.into()])
8043    )]
8044    pub detected_language: Option<Vec<String>>,
8045    ///Property: Detected e-mail addresses
8046    #[serde(skip_serializing_if = "Option::is_none")]
8047    #[cfg_attr(
8048        feature = "builder",
8049        builder(with = |value:impl Into<String>|vec![value.into()])
8050    )]
8051    pub email_mentioned: Option<Vec<String>>,
8052    ///Property: End date
8053    #[serde(skip_serializing_if = "Option::is_none")]
8054    #[cfg_attr(
8055        feature = "builder",
8056        builder(with = |value:impl Into<String>|vec![value.into()])
8057    )]
8058    pub end_date: Option<Vec<String>>,
8059    ///Property: Detected IBANs
8060    #[serde(skip_serializing_if = "Option::is_none")]
8061    #[cfg_attr(
8062        feature = "builder",
8063        builder(with = |value:impl Into<String>|vec![value.into()])
8064    )]
8065    pub iban_mentioned: Option<Vec<String>>,
8066    ///Property: Important
8067    #[serde(skip_serializing_if = "Option::is_none")]
8068    #[cfg_attr(
8069        feature = "builder",
8070        builder(with = |value:impl Into<String>|vec![value.into()])
8071    )]
8072    pub important: Option<Vec<String>>,
8073    ///Property: Index text
8074    #[serde(skip_serializing_if = "Option::is_none")]
8075    #[cfg_attr(
8076        feature = "builder",
8077        builder(with = |value:impl Into<String>|vec![value.into()])
8078    )]
8079    pub index_text: Option<Vec<String>>,
8080    ///Property: Involved
8081    #[serde(skip_serializing_if = "Option::is_none")]
8082    #[cfg_attr(
8083        feature = "builder",
8084        builder(with = |value:impl Into<String>|vec![value.into()])
8085    )]
8086    pub involved: Option<Vec<String>>,
8087    ///Property: Detected IP addresses
8088    #[serde(skip_serializing_if = "Option::is_none")]
8089    #[cfg_attr(
8090        feature = "builder",
8091        builder(with = |value:impl Into<String>|vec![value.into()])
8092    )]
8093    pub ip_mentioned: Option<Vec<String>>,
8094    ///Property: Keywords
8095    #[serde(skip_serializing_if = "Option::is_none")]
8096    #[cfg_attr(
8097        feature = "builder",
8098        builder(with = |value:impl Into<String>|vec![value.into()])
8099    )]
8100    pub keywords: Option<Vec<String>>,
8101    ///Property: Location
8102    #[serde(skip_serializing_if = "Option::is_none")]
8103    #[cfg_attr(
8104        feature = "builder",
8105        builder(with = |value:impl Into<String>|vec![value.into()])
8106    )]
8107    pub location: Option<Vec<String>>,
8108    ///Property: Detected locations
8109    #[serde(skip_serializing_if = "Option::is_none")]
8110    #[cfg_attr(
8111        feature = "builder",
8112        builder(with = |value:impl Into<String>|vec![value.into()])
8113    )]
8114    pub location_mentioned: Option<Vec<String>>,
8115    ///Property: Modified on
8116    #[serde(skip_serializing_if = "Option::is_none")]
8117    #[cfg_attr(
8118        feature = "builder",
8119        builder(with = |value:impl Into<String>|vec![value.into()])
8120    )]
8121    pub modified_at: Option<Vec<String>>,
8122    ///Property: Name
8123    #[serde(default)]
8124    #[cfg_attr(
8125        feature = "builder",
8126        builder(with = |value:impl Into<String>|vec![value.into()])
8127    )]
8128    pub name: Vec<String>,
8129    ///Property: Detected names
8130    #[serde(skip_serializing_if = "Option::is_none")]
8131    #[cfg_attr(
8132        feature = "builder",
8133        builder(with = |value:impl Into<String>|vec![value.into()])
8134    )]
8135    pub names_mentioned: Option<Vec<String>>,
8136    ///Property: Notes
8137    #[serde(skip_serializing_if = "Option::is_none")]
8138    #[cfg_attr(
8139        feature = "builder",
8140        builder(with = |value:impl Into<String>|vec![value.into()])
8141    )]
8142    pub notes: Option<Vec<String>>,
8143    ///Property: Organizer
8144    #[serde(skip_serializing_if = "Option::is_none")]
8145    #[cfg_attr(
8146        feature = "builder",
8147        builder(with = |value:impl Into<String>|vec![value.into()])
8148    )]
8149    pub organizer: Option<Vec<String>>,
8150    ///Property: Detected people
8151    #[serde(skip_serializing_if = "Option::is_none")]
8152    #[cfg_attr(
8153        feature = "builder",
8154        builder(with = |value:impl Into<String>|vec![value.into()])
8155    )]
8156    pub people_mentioned: Option<Vec<String>>,
8157    ///Property: Detected phones
8158    #[serde(skip_serializing_if = "Option::is_none")]
8159    #[cfg_attr(
8160        feature = "builder",
8161        builder(with = |value:impl Into<String>|vec![value.into()])
8162    )]
8163    pub phone_mentioned: Option<Vec<String>>,
8164    ///Property: Previous name
8165    #[serde(skip_serializing_if = "Option::is_none")]
8166    #[cfg_attr(
8167        feature = "builder",
8168        builder(with = |value:impl Into<String>|vec![value.into()])
8169    )]
8170    pub previous_name: Option<Vec<String>>,
8171    ///Property: Program
8172    #[serde(skip_serializing_if = "Option::is_none")]
8173    #[cfg_attr(
8174        feature = "builder",
8175        builder(with = |value:impl Into<String>|vec![value.into()])
8176    )]
8177    pub program: Option<Vec<String>>,
8178    ///Property: Program ID
8179    #[serde(skip_serializing_if = "Option::is_none")]
8180    #[cfg_attr(
8181        feature = "builder",
8182        builder(with = |value:impl Into<String>|vec![value.into()])
8183    )]
8184    pub program_id: Option<Vec<String>>,
8185    ///Property: Source document
8186    #[serde(skip_serializing_if = "Option::is_none")]
8187    #[cfg_attr(
8188        feature = "builder",
8189        builder(with = |value:impl Into<String>|vec![value.into()])
8190    )]
8191    pub proof: Option<Vec<String>>,
8192    ///Property: Publishing source
8193    #[serde(skip_serializing_if = "Option::is_none")]
8194    #[cfg_attr(
8195        feature = "builder",
8196        builder(with = |value:impl Into<String>|vec![value.into()])
8197    )]
8198    pub publisher: Option<Vec<String>>,
8199    ///Property: Publishing source URL
8200    #[serde(skip_serializing_if = "Option::is_none")]
8201    #[cfg_attr(
8202        feature = "builder",
8203        builder(with = |value:impl Into<String>|vec![value.into()])
8204    )]
8205    pub publisher_url: Option<Vec<String>>,
8206    ///Property: Record ID
8207    #[serde(skip_serializing_if = "Option::is_none")]
8208    #[cfg_attr(
8209        feature = "builder",
8210        builder(with = |value:impl Into<String>|vec![value.into()])
8211    )]
8212    pub record_id: Option<Vec<String>>,
8213    ///Property: Retrieved on
8214    #[serde(skip_serializing_if = "Option::is_none")]
8215    #[cfg_attr(
8216        feature = "builder",
8217        builder(with = |value:impl Into<String>|vec![value.into()])
8218    )]
8219    pub retrieved_at: Option<Vec<String>>,
8220    ///Property: Source link
8221    #[serde(skip_serializing_if = "Option::is_none")]
8222    #[cfg_attr(
8223        feature = "builder",
8224        builder(with = |value:impl Into<String>|vec![value.into()])
8225    )]
8226    pub source_url: Option<Vec<String>>,
8227    ///Property: Start date
8228    #[serde(skip_serializing_if = "Option::is_none")]
8229    #[cfg_attr(
8230        feature = "builder",
8231        builder(with = |value:impl Into<String>|vec![value.into()])
8232    )]
8233    pub start_date: Option<Vec<String>>,
8234    ///Property: Summary
8235    #[serde(skip_serializing_if = "Option::is_none")]
8236    #[cfg_attr(
8237        feature = "builder",
8238        builder(with = |value:impl Into<String>|vec![value.into()])
8239    )]
8240    pub summary: Option<Vec<String>>,
8241    ///Property: Topics
8242    #[serde(skip_serializing_if = "Option::is_none")]
8243    #[cfg_attr(
8244        feature = "builder",
8245        builder(with = |value:impl Into<String>|vec![value.into()])
8246    )]
8247    pub topics: Option<Vec<String>>,
8248    ///Property: Weak alias
8249    #[serde(skip_serializing_if = "Option::is_none")]
8250    #[cfg_attr(
8251        feature = "builder",
8252        builder(with = |value:impl Into<String>|vec![value.into()])
8253    )]
8254    pub weak_alias: Option<Vec<String>>,
8255    ///Property: Wikidata ID
8256    #[serde(skip_serializing_if = "Option::is_none")]
8257    #[cfg_attr(
8258        feature = "builder",
8259        builder(with = |value:impl Into<String>|vec![value.into()])
8260    )]
8261    pub wikidata_id: Option<Vec<String>>,
8262    ///Property: Wikipedia Article
8263    #[serde(skip_serializing_if = "Option::is_none")]
8264    #[cfg_attr(
8265        feature = "builder",
8266        builder(with = |value:impl Into<String>|vec![value.into()])
8267    )]
8268    pub wikipedia_url: Option<Vec<String>>,
8269}
8270impl Event {
8271    /// Create a new entity with the given ID
8272    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
8273    pub fn new(id: impl Into<String>) -> Self {
8274        Self {
8275            id: id.into(),
8276            schema: "Event".to_string(),
8277            address: None,
8278            address_entity: None,
8279            aleph_url: None,
8280            alias: None,
8281            companies_mentioned: None,
8282            country: None,
8283            created_at: None,
8284            date: None,
8285            description: None,
8286            detected_country: None,
8287            detected_language: None,
8288            email_mentioned: None,
8289            end_date: None,
8290            iban_mentioned: None,
8291            important: None,
8292            index_text: None,
8293            involved: None,
8294            ip_mentioned: None,
8295            keywords: None,
8296            location: None,
8297            location_mentioned: None,
8298            modified_at: None,
8299            name: Vec::new(),
8300            names_mentioned: None,
8301            notes: None,
8302            organizer: None,
8303            people_mentioned: None,
8304            phone_mentioned: None,
8305            previous_name: None,
8306            program: None,
8307            program_id: None,
8308            proof: None,
8309            publisher: None,
8310            publisher_url: None,
8311            record_id: None,
8312            retrieved_at: None,
8313            source_url: None,
8314            start_date: None,
8315            summary: None,
8316            topics: None,
8317            weak_alias: None,
8318            wikidata_id: None,
8319            wikipedia_url: None,
8320        }
8321    }
8322    /// Get the schema name
8323    pub fn schema_name() -> &'static str {
8324        "Event"
8325    }
8326    /// Serialize to standard FTM nested JSON format
8327    ///
8328    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
8329    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
8330        let mut value = serde_json::to_value(self)?;
8331        if let Some(obj) = value.as_object_mut() {
8332            let id = obj.remove("id");
8333            let schema = obj.remove("schema");
8334            let properties = serde_json::Value::Object(std::mem::take(obj));
8335            if let Some(id) = id {
8336                obj.insert("id".into(), id);
8337            }
8338            if let Some(schema) = schema {
8339                obj.insert("schema".into(), schema);
8340            }
8341            obj.insert("properties".into(), properties);
8342        }
8343        serde_json::to_string(&value)
8344    }
8345}
8346///FTM Schema: Family
8347#[derive(Debug, Clone, Serialize, Deserialize)]
8348#[cfg_attr(feature = "builder", derive(Builder))]
8349#[serde(rename_all = "camelCase")]
8350pub struct Family {
8351    pub id: String,
8352    #[cfg_attr(feature = "builder", builder(default = "Family".to_string()))]
8353    pub schema: String,
8354    ///Property: Aleph URL
8355    #[serde(skip_serializing_if = "Option::is_none")]
8356    #[cfg_attr(
8357        feature = "builder",
8358        builder(with = |value:impl Into<String>|vec![value.into()])
8359    )]
8360    pub aleph_url: Option<Vec<String>>,
8361    ///Property: Date
8362    #[serde(skip_serializing_if = "Option::is_none")]
8363    #[cfg_attr(
8364        feature = "builder",
8365        builder(with = |value:impl Into<String>|vec![value.into()])
8366    )]
8367    pub date: Option<Vec<String>>,
8368    ///Property: Description
8369    #[serde(skip_serializing_if = "Option::is_none")]
8370    #[cfg_attr(
8371        feature = "builder",
8372        builder(with = |value:impl Into<String>|vec![value.into()])
8373    )]
8374    pub description: Option<Vec<String>>,
8375    ///Property: End date
8376    #[serde(skip_serializing_if = "Option::is_none")]
8377    #[cfg_attr(
8378        feature = "builder",
8379        builder(with = |value:impl Into<String>|vec![value.into()])
8380    )]
8381    pub end_date: Option<Vec<String>>,
8382    ///Property: Index text
8383    #[serde(skip_serializing_if = "Option::is_none")]
8384    #[cfg_attr(
8385        feature = "builder",
8386        builder(with = |value:impl Into<String>|vec![value.into()])
8387    )]
8388    pub index_text: Option<Vec<String>>,
8389    ///Property: Modified on
8390    #[serde(skip_serializing_if = "Option::is_none")]
8391    #[cfg_attr(
8392        feature = "builder",
8393        builder(with = |value:impl Into<String>|vec![value.into()])
8394    )]
8395    pub modified_at: Option<Vec<String>>,
8396    ///Property: Detected names
8397    #[serde(skip_serializing_if = "Option::is_none")]
8398    #[cfg_attr(
8399        feature = "builder",
8400        builder(with = |value:impl Into<String>|vec![value.into()])
8401    )]
8402    pub names_mentioned: Option<Vec<String>>,
8403    ///Property: Person
8404    #[serde(default)]
8405    #[cfg_attr(
8406        feature = "builder",
8407        builder(with = |value:impl Into<String>|vec![value.into()])
8408    )]
8409    pub person: Vec<String>,
8410    ///Property: Source document
8411    #[serde(skip_serializing_if = "Option::is_none")]
8412    #[cfg_attr(
8413        feature = "builder",
8414        builder(with = |value:impl Into<String>|vec![value.into()])
8415    )]
8416    pub proof: Option<Vec<String>>,
8417    ///Property: Publishing source
8418    #[serde(skip_serializing_if = "Option::is_none")]
8419    #[cfg_attr(
8420        feature = "builder",
8421        builder(with = |value:impl Into<String>|vec![value.into()])
8422    )]
8423    pub publisher: Option<Vec<String>>,
8424    ///Property: Publishing source URL
8425    #[serde(skip_serializing_if = "Option::is_none")]
8426    #[cfg_attr(
8427        feature = "builder",
8428        builder(with = |value:impl Into<String>|vec![value.into()])
8429    )]
8430    pub publisher_url: Option<Vec<String>>,
8431    ///Property: Record ID
8432    #[serde(skip_serializing_if = "Option::is_none")]
8433    #[cfg_attr(
8434        feature = "builder",
8435        builder(with = |value:impl Into<String>|vec![value.into()])
8436    )]
8437    pub record_id: Option<Vec<String>>,
8438    ///Property: Relationship
8439    #[serde(skip_serializing_if = "Option::is_none")]
8440    #[cfg_attr(
8441        feature = "builder",
8442        builder(with = |value:impl Into<String>|vec![value.into()])
8443    )]
8444    pub relationship: Option<Vec<String>>,
8445    ///Property: Relative
8446    #[serde(default)]
8447    #[cfg_attr(
8448        feature = "builder",
8449        builder(with = |value:impl Into<String>|vec![value.into()])
8450    )]
8451    pub relative: Vec<String>,
8452    ///Property: Retrieved on
8453    #[serde(skip_serializing_if = "Option::is_none")]
8454    #[cfg_attr(
8455        feature = "builder",
8456        builder(with = |value:impl Into<String>|vec![value.into()])
8457    )]
8458    pub retrieved_at: Option<Vec<String>>,
8459    ///Property: Source link
8460    #[serde(skip_serializing_if = "Option::is_none")]
8461    #[cfg_attr(
8462        feature = "builder",
8463        builder(with = |value:impl Into<String>|vec![value.into()])
8464    )]
8465    pub source_url: Option<Vec<String>>,
8466    ///Property: Start date
8467    #[serde(skip_serializing_if = "Option::is_none")]
8468    #[cfg_attr(
8469        feature = "builder",
8470        builder(with = |value:impl Into<String>|vec![value.into()])
8471    )]
8472    pub start_date: Option<Vec<String>>,
8473    ///Property: Summary
8474    #[serde(skip_serializing_if = "Option::is_none")]
8475    #[cfg_attr(
8476        feature = "builder",
8477        builder(with = |value:impl Into<String>|vec![value.into()])
8478    )]
8479    pub summary: Option<Vec<String>>,
8480}
8481impl Family {
8482    /// Create a new entity with the given ID
8483    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
8484    pub fn new(id: impl Into<String>) -> Self {
8485        Self {
8486            id: id.into(),
8487            schema: "Family".to_string(),
8488            aleph_url: None,
8489            date: None,
8490            description: None,
8491            end_date: None,
8492            index_text: None,
8493            modified_at: None,
8494            names_mentioned: None,
8495            person: Vec::new(),
8496            proof: None,
8497            publisher: None,
8498            publisher_url: None,
8499            record_id: None,
8500            relationship: None,
8501            relative: Vec::new(),
8502            retrieved_at: None,
8503            source_url: None,
8504            start_date: None,
8505            summary: None,
8506        }
8507    }
8508    /// Get the schema name
8509    pub fn schema_name() -> &'static str {
8510        "Family"
8511    }
8512    /// Serialize to standard FTM nested JSON format
8513    ///
8514    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
8515    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
8516        let mut value = serde_json::to_value(self)?;
8517        if let Some(obj) = value.as_object_mut() {
8518            let id = obj.remove("id");
8519            let schema = obj.remove("schema");
8520            let properties = serde_json::Value::Object(std::mem::take(obj));
8521            if let Some(id) = id {
8522                obj.insert("id".into(), id);
8523            }
8524            if let Some(schema) = schema {
8525                obj.insert("schema".into(), schema);
8526            }
8527            obj.insert("properties".into(), properties);
8528        }
8529        serde_json::to_string(&value)
8530    }
8531}
8532///FTM Schema: Folder
8533#[derive(Debug, Clone, Serialize, Deserialize)]
8534#[cfg_attr(feature = "builder", derive(Builder))]
8535#[serde(rename_all = "camelCase")]
8536pub struct Folder {
8537    pub id: String,
8538    #[cfg_attr(feature = "builder", builder(default = "Folder".to_string()))]
8539    pub schema: String,
8540    ///Property: Address
8541    #[serde(skip_serializing_if = "Option::is_none")]
8542    #[cfg_attr(
8543        feature = "builder",
8544        builder(with = |value:impl Into<String>|vec![value.into()])
8545    )]
8546    pub address: Option<Vec<String>>,
8547    ///Property: Address
8548    #[serde(skip_serializing_if = "Option::is_none")]
8549    #[cfg_attr(
8550        feature = "builder",
8551        builder(with = |value:impl Into<String>|vec![value.into()])
8552    )]
8553    pub address_entity: Option<Vec<String>>,
8554    ///Property: Aleph URL
8555    #[serde(skip_serializing_if = "Option::is_none")]
8556    #[cfg_attr(
8557        feature = "builder",
8558        builder(with = |value:impl Into<String>|vec![value.into()])
8559    )]
8560    pub aleph_url: Option<Vec<String>>,
8561    ///Property: Alias
8562    #[serde(skip_serializing_if = "Option::is_none")]
8563    #[cfg_attr(
8564        feature = "builder",
8565        builder(with = |value:impl Into<String>|vec![value.into()])
8566    )]
8567    pub alias: Option<Vec<String>>,
8568    ///Property: Ancestors
8569    #[serde(skip_serializing_if = "Option::is_none")]
8570    #[cfg_attr(
8571        feature = "builder",
8572        builder(with = |value:impl Into<String>|vec![value.into()])
8573    )]
8574    pub ancestors: Option<Vec<String>>,
8575    ///Property: Author
8576    #[serde(skip_serializing_if = "Option::is_none")]
8577    #[cfg_attr(
8578        feature = "builder",
8579        builder(with = |value:impl Into<String>|vec![value.into()])
8580    )]
8581    pub author: Option<Vec<String>>,
8582    ///Property: Authored on
8583    #[serde(skip_serializing_if = "Option::is_none")]
8584    #[cfg_attr(
8585        feature = "builder",
8586        builder(with = |value:impl Into<String>|vec![value.into()])
8587    )]
8588    pub authored_at: Option<Vec<String>>,
8589    ///Property: Text
8590    #[serde(skip_serializing_if = "Option::is_none")]
8591    #[cfg_attr(
8592        feature = "builder",
8593        builder(with = |value:impl Into<String>|vec![value.into()])
8594    )]
8595    pub body_text: Option<Vec<String>>,
8596    ///Property: Detected companies
8597    #[serde(skip_serializing_if = "Option::is_none")]
8598    #[cfg_attr(
8599        feature = "builder",
8600        builder(with = |value:impl Into<String>|vec![value.into()])
8601    )]
8602    pub companies_mentioned: Option<Vec<String>>,
8603    ///Property: Checksum
8604    #[serde(skip_serializing_if = "Option::is_none")]
8605    #[cfg_attr(
8606        feature = "builder",
8607        builder(with = |value:impl Into<String>|vec![value.into()])
8608    )]
8609    pub content_hash: Option<Vec<String>>,
8610    ///Property: Country
8611    #[serde(skip_serializing_if = "Option::is_none")]
8612    #[cfg_attr(
8613        feature = "builder",
8614        builder(with = |value:impl Into<String>|vec![value.into()])
8615    )]
8616    pub country: Option<Vec<String>>,
8617    ///Property: Crawler
8618    #[serde(skip_serializing_if = "Option::is_none")]
8619    #[cfg_attr(
8620        feature = "builder",
8621        builder(with = |value:impl Into<String>|vec![value.into()])
8622    )]
8623    pub crawler: Option<Vec<String>>,
8624    ///Property: Created at
8625    #[serde(skip_serializing_if = "Option::is_none")]
8626    #[cfg_attr(
8627        feature = "builder",
8628        builder(with = |value:impl Into<String>|vec![value.into()])
8629    )]
8630    pub created_at: Option<Vec<String>>,
8631    ///Property: Date
8632    #[serde(skip_serializing_if = "Option::is_none")]
8633    #[cfg_attr(
8634        feature = "builder",
8635        builder(with = |value:impl Into<String>|vec![value.into()])
8636    )]
8637    pub date: Option<Vec<String>>,
8638    ///Property: Description
8639    #[serde(skip_serializing_if = "Option::is_none")]
8640    #[cfg_attr(
8641        feature = "builder",
8642        builder(with = |value:impl Into<String>|vec![value.into()])
8643    )]
8644    pub description: Option<Vec<String>>,
8645    ///Property: Detected country
8646    #[serde(skip_serializing_if = "Option::is_none")]
8647    #[cfg_attr(
8648        feature = "builder",
8649        builder(with = |value:impl Into<String>|vec![value.into()])
8650    )]
8651    pub detected_country: Option<Vec<String>>,
8652    ///Property: Detected language
8653    #[serde(skip_serializing_if = "Option::is_none")]
8654    #[cfg_attr(
8655        feature = "builder",
8656        builder(with = |value:impl Into<String>|vec![value.into()])
8657    )]
8658    pub detected_language: Option<Vec<String>>,
8659    ///Property: Detected e-mail addresses
8660    #[serde(skip_serializing_if = "Option::is_none")]
8661    #[cfg_attr(
8662        feature = "builder",
8663        builder(with = |value:impl Into<String>|vec![value.into()])
8664    )]
8665    pub email_mentioned: Option<Vec<String>>,
8666    ///Property: File encoding
8667    #[serde(skip_serializing_if = "Option::is_none")]
8668    #[cfg_attr(
8669        feature = "builder",
8670        builder(with = |value:impl Into<String>|vec![value.into()])
8671    )]
8672    pub encoding: Option<Vec<String>>,
8673    ///Property: File extension
8674    #[serde(skip_serializing_if = "Option::is_none")]
8675    #[cfg_attr(
8676        feature = "builder",
8677        builder(with = |value:impl Into<String>|vec![value.into()])
8678    )]
8679    pub extension: Option<Vec<String>>,
8680    ///Property: File name
8681    #[serde(default)]
8682    #[cfg_attr(
8683        feature = "builder",
8684        builder(with = |value:impl Into<String>|vec![value.into()])
8685    )]
8686    pub file_name: Vec<String>,
8687    ///Property: File size
8688    #[serde(
8689        skip_serializing_if = "Option::is_none",
8690        deserialize_with = "deserialize_opt_f64_vec",
8691        default
8692    )]
8693    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
8694    pub file_size: Option<Vec<f64>>,
8695    ///Property: Generator
8696    #[serde(skip_serializing_if = "Option::is_none")]
8697    #[cfg_attr(
8698        feature = "builder",
8699        builder(with = |value:impl Into<String>|vec![value.into()])
8700    )]
8701    pub generator: Option<Vec<String>>,
8702    ///Property: Detected IBANs
8703    #[serde(skip_serializing_if = "Option::is_none")]
8704    #[cfg_attr(
8705        feature = "builder",
8706        builder(with = |value:impl Into<String>|vec![value.into()])
8707    )]
8708    pub iban_mentioned: Option<Vec<String>>,
8709    ///Property: Index text
8710    #[serde(skip_serializing_if = "Option::is_none")]
8711    #[cfg_attr(
8712        feature = "builder",
8713        builder(with = |value:impl Into<String>|vec![value.into()])
8714    )]
8715    pub index_text: Option<Vec<String>>,
8716    ///Property: Detected IP addresses
8717    #[serde(skip_serializing_if = "Option::is_none")]
8718    #[cfg_attr(
8719        feature = "builder",
8720        builder(with = |value:impl Into<String>|vec![value.into()])
8721    )]
8722    pub ip_mentioned: Option<Vec<String>>,
8723    ///Property: Keywords
8724    #[serde(skip_serializing_if = "Option::is_none")]
8725    #[cfg_attr(
8726        feature = "builder",
8727        builder(with = |value:impl Into<String>|vec![value.into()])
8728    )]
8729    pub keywords: Option<Vec<String>>,
8730    ///Property: Language
8731    #[serde(skip_serializing_if = "Option::is_none")]
8732    #[cfg_attr(
8733        feature = "builder",
8734        builder(with = |value:impl Into<String>|vec![value.into()])
8735    )]
8736    pub language: Option<Vec<String>>,
8737    ///Property: Detected locations
8738    #[serde(skip_serializing_if = "Option::is_none")]
8739    #[cfg_attr(
8740        feature = "builder",
8741        builder(with = |value:impl Into<String>|vec![value.into()])
8742    )]
8743    pub location_mentioned: Option<Vec<String>>,
8744    ///Property: Message ID
8745    #[serde(skip_serializing_if = "Option::is_none")]
8746    #[cfg_attr(
8747        feature = "builder",
8748        builder(with = |value:impl Into<String>|vec![value.into()])
8749    )]
8750    pub message_id: Option<Vec<String>>,
8751    ///Property: MIME type
8752    #[serde(skip_serializing_if = "Option::is_none")]
8753    #[cfg_attr(
8754        feature = "builder",
8755        builder(with = |value:impl Into<String>|vec![value.into()])
8756    )]
8757    pub mime_type: Option<Vec<String>>,
8758    ///Property: Modified on
8759    #[serde(skip_serializing_if = "Option::is_none")]
8760    #[cfg_attr(
8761        feature = "builder",
8762        builder(with = |value:impl Into<String>|vec![value.into()])
8763    )]
8764    pub modified_at: Option<Vec<String>>,
8765    ///Property: Name
8766    #[serde(default)]
8767    #[cfg_attr(
8768        feature = "builder",
8769        builder(with = |value:impl Into<String>|vec![value.into()])
8770    )]
8771    pub name: Vec<String>,
8772    ///Property: Detected names
8773    #[serde(skip_serializing_if = "Option::is_none")]
8774    #[cfg_attr(
8775        feature = "builder",
8776        builder(with = |value:impl Into<String>|vec![value.into()])
8777    )]
8778    pub names_mentioned: Option<Vec<String>>,
8779    ///Property: Notes
8780    #[serde(skip_serializing_if = "Option::is_none")]
8781    #[cfg_attr(
8782        feature = "builder",
8783        builder(with = |value:impl Into<String>|vec![value.into()])
8784    )]
8785    pub notes: Option<Vec<String>>,
8786    ///Property: Folder
8787    #[serde(skip_serializing_if = "Option::is_none")]
8788    #[cfg_attr(
8789        feature = "builder",
8790        builder(with = |value:impl Into<String>|vec![value.into()])
8791    )]
8792    pub parent: Option<Vec<String>>,
8793    ///Property: Detected people
8794    #[serde(skip_serializing_if = "Option::is_none")]
8795    #[cfg_attr(
8796        feature = "builder",
8797        builder(with = |value:impl Into<String>|vec![value.into()])
8798    )]
8799    pub people_mentioned: Option<Vec<String>>,
8800    ///Property: Detected phones
8801    #[serde(skip_serializing_if = "Option::is_none")]
8802    #[cfg_attr(
8803        feature = "builder",
8804        builder(with = |value:impl Into<String>|vec![value.into()])
8805    )]
8806    pub phone_mentioned: Option<Vec<String>>,
8807    ///Property: Previous name
8808    #[serde(skip_serializing_if = "Option::is_none")]
8809    #[cfg_attr(
8810        feature = "builder",
8811        builder(with = |value:impl Into<String>|vec![value.into()])
8812    )]
8813    pub previous_name: Option<Vec<String>>,
8814    ///Property: Processed at
8815    #[serde(skip_serializing_if = "Option::is_none")]
8816    #[cfg_attr(
8817        feature = "builder",
8818        builder(with = |value:impl Into<String>|vec![value.into()])
8819    )]
8820    pub processed_at: Option<Vec<String>>,
8821    ///Property: Processing agent
8822    #[serde(skip_serializing_if = "Option::is_none")]
8823    #[cfg_attr(
8824        feature = "builder",
8825        builder(with = |value:impl Into<String>|vec![value.into()])
8826    )]
8827    pub processing_agent: Option<Vec<String>>,
8828    ///Property: Processing error
8829    #[serde(skip_serializing_if = "Option::is_none")]
8830    #[cfg_attr(
8831        feature = "builder",
8832        builder(with = |value:impl Into<String>|vec![value.into()])
8833    )]
8834    pub processing_error: Option<Vec<String>>,
8835    ///Property: Processing status
8836    #[serde(skip_serializing_if = "Option::is_none")]
8837    #[cfg_attr(
8838        feature = "builder",
8839        builder(with = |value:impl Into<String>|vec![value.into()])
8840    )]
8841    pub processing_status: Option<Vec<String>>,
8842    ///Property: Program
8843    #[serde(skip_serializing_if = "Option::is_none")]
8844    #[cfg_attr(
8845        feature = "builder",
8846        builder(with = |value:impl Into<String>|vec![value.into()])
8847    )]
8848    pub program: Option<Vec<String>>,
8849    ///Property: Program ID
8850    #[serde(skip_serializing_if = "Option::is_none")]
8851    #[cfg_attr(
8852        feature = "builder",
8853        builder(with = |value:impl Into<String>|vec![value.into()])
8854    )]
8855    pub program_id: Option<Vec<String>>,
8856    ///Property: Source document
8857    #[serde(skip_serializing_if = "Option::is_none")]
8858    #[cfg_attr(
8859        feature = "builder",
8860        builder(with = |value:impl Into<String>|vec![value.into()])
8861    )]
8862    pub proof: Option<Vec<String>>,
8863    ///Property: Published on
8864    #[serde(skip_serializing_if = "Option::is_none")]
8865    #[cfg_attr(
8866        feature = "builder",
8867        builder(with = |value:impl Into<String>|vec![value.into()])
8868    )]
8869    pub published_at: Option<Vec<String>>,
8870    ///Property: Publishing source
8871    #[serde(skip_serializing_if = "Option::is_none")]
8872    #[cfg_attr(
8873        feature = "builder",
8874        builder(with = |value:impl Into<String>|vec![value.into()])
8875    )]
8876    pub publisher: Option<Vec<String>>,
8877    ///Property: Publishing source URL
8878    #[serde(skip_serializing_if = "Option::is_none")]
8879    #[cfg_attr(
8880        feature = "builder",
8881        builder(with = |value:impl Into<String>|vec![value.into()])
8882    )]
8883    pub publisher_url: Option<Vec<String>>,
8884    ///Property: Retrieved on
8885    #[serde(skip_serializing_if = "Option::is_none")]
8886    #[cfg_attr(
8887        feature = "builder",
8888        builder(with = |value:impl Into<String>|vec![value.into()])
8889    )]
8890    pub retrieved_at: Option<Vec<String>>,
8891    ///Property: Source link
8892    #[serde(skip_serializing_if = "Option::is_none")]
8893    #[cfg_attr(
8894        feature = "builder",
8895        builder(with = |value:impl Into<String>|vec![value.into()])
8896    )]
8897    pub source_url: Option<Vec<String>>,
8898    ///Property: Summary
8899    #[serde(skip_serializing_if = "Option::is_none")]
8900    #[cfg_attr(
8901        feature = "builder",
8902        builder(with = |value:impl Into<String>|vec![value.into()])
8903    )]
8904    pub summary: Option<Vec<String>>,
8905    ///Property: Title
8906    #[serde(skip_serializing_if = "Option::is_none")]
8907    #[cfg_attr(
8908        feature = "builder",
8909        builder(with = |value:impl Into<String>|vec![value.into()])
8910    )]
8911    pub title: Option<Vec<String>>,
8912    ///Property: Topics
8913    #[serde(skip_serializing_if = "Option::is_none")]
8914    #[cfg_attr(
8915        feature = "builder",
8916        builder(with = |value:impl Into<String>|vec![value.into()])
8917    )]
8918    pub topics: Option<Vec<String>>,
8919    ///Property: The language of the translated text
8920    #[serde(skip_serializing_if = "Option::is_none")]
8921    #[cfg_attr(
8922        feature = "builder",
8923        builder(with = |value:impl Into<String>|vec![value.into()])
8924    )]
8925    pub translated_language: Option<Vec<String>>,
8926    ///Property: Translated version of the body text
8927    #[serde(skip_serializing_if = "Option::is_none")]
8928    #[cfg_attr(
8929        feature = "builder",
8930        builder(with = |value:impl Into<String>|vec![value.into()])
8931    )]
8932    pub translated_text: Option<Vec<String>>,
8933    ///Property: Weak alias
8934    #[serde(skip_serializing_if = "Option::is_none")]
8935    #[cfg_attr(
8936        feature = "builder",
8937        builder(with = |value:impl Into<String>|vec![value.into()])
8938    )]
8939    pub weak_alias: Option<Vec<String>>,
8940    ///Property: Wikidata ID
8941    #[serde(skip_serializing_if = "Option::is_none")]
8942    #[cfg_attr(
8943        feature = "builder",
8944        builder(with = |value:impl Into<String>|vec![value.into()])
8945    )]
8946    pub wikidata_id: Option<Vec<String>>,
8947    ///Property: Wikipedia Article
8948    #[serde(skip_serializing_if = "Option::is_none")]
8949    #[cfg_attr(
8950        feature = "builder",
8951        builder(with = |value:impl Into<String>|vec![value.into()])
8952    )]
8953    pub wikipedia_url: Option<Vec<String>>,
8954}
8955impl Folder {
8956    /// Create a new entity with the given ID
8957    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
8958    pub fn new(id: impl Into<String>) -> Self {
8959        Self {
8960            id: id.into(),
8961            schema: "Folder".to_string(),
8962            address: None,
8963            address_entity: None,
8964            aleph_url: None,
8965            alias: None,
8966            ancestors: None,
8967            author: None,
8968            authored_at: None,
8969            body_text: None,
8970            companies_mentioned: None,
8971            content_hash: None,
8972            country: None,
8973            crawler: None,
8974            created_at: None,
8975            date: None,
8976            description: None,
8977            detected_country: None,
8978            detected_language: None,
8979            email_mentioned: None,
8980            encoding: None,
8981            extension: None,
8982            file_name: Vec::new(),
8983            file_size: None,
8984            generator: None,
8985            iban_mentioned: None,
8986            index_text: None,
8987            ip_mentioned: None,
8988            keywords: None,
8989            language: None,
8990            location_mentioned: None,
8991            message_id: None,
8992            mime_type: None,
8993            modified_at: None,
8994            name: Vec::new(),
8995            names_mentioned: None,
8996            notes: None,
8997            parent: None,
8998            people_mentioned: None,
8999            phone_mentioned: None,
9000            previous_name: None,
9001            processed_at: None,
9002            processing_agent: None,
9003            processing_error: None,
9004            processing_status: None,
9005            program: None,
9006            program_id: None,
9007            proof: None,
9008            published_at: None,
9009            publisher: None,
9010            publisher_url: None,
9011            retrieved_at: None,
9012            source_url: None,
9013            summary: None,
9014            title: None,
9015            topics: None,
9016            translated_language: None,
9017            translated_text: None,
9018            weak_alias: None,
9019            wikidata_id: None,
9020            wikipedia_url: None,
9021        }
9022    }
9023    /// Get the schema name
9024    pub fn schema_name() -> &'static str {
9025        "Folder"
9026    }
9027    /// Serialize to standard FTM nested JSON format
9028    ///
9029    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
9030    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
9031        let mut value = serde_json::to_value(self)?;
9032        if let Some(obj) = value.as_object_mut() {
9033            let id = obj.remove("id");
9034            let schema = obj.remove("schema");
9035            let properties = serde_json::Value::Object(std::mem::take(obj));
9036            if let Some(id) = id {
9037                obj.insert("id".into(), id);
9038            }
9039            if let Some(schema) = schema {
9040                obj.insert("schema".into(), schema);
9041            }
9042            obj.insert("properties".into(), properties);
9043        }
9044        serde_json::to_string(&value)
9045    }
9046}
9047///FTM Schema: Web page
9048#[derive(Debug, Clone, Serialize, Deserialize)]
9049#[cfg_attr(feature = "builder", derive(Builder))]
9050#[serde(rename_all = "camelCase")]
9051pub struct HyperText {
9052    pub id: String,
9053    #[cfg_attr(feature = "builder", builder(default = "HyperText".to_string()))]
9054    pub schema: String,
9055    ///Property: Address
9056    #[serde(skip_serializing_if = "Option::is_none")]
9057    #[cfg_attr(
9058        feature = "builder",
9059        builder(with = |value:impl Into<String>|vec![value.into()])
9060    )]
9061    pub address: Option<Vec<String>>,
9062    ///Property: Address
9063    #[serde(skip_serializing_if = "Option::is_none")]
9064    #[cfg_attr(
9065        feature = "builder",
9066        builder(with = |value:impl Into<String>|vec![value.into()])
9067    )]
9068    pub address_entity: Option<Vec<String>>,
9069    ///Property: Aleph URL
9070    #[serde(skip_serializing_if = "Option::is_none")]
9071    #[cfg_attr(
9072        feature = "builder",
9073        builder(with = |value:impl Into<String>|vec![value.into()])
9074    )]
9075    pub aleph_url: Option<Vec<String>>,
9076    ///Property: Alias
9077    #[serde(skip_serializing_if = "Option::is_none")]
9078    #[cfg_attr(
9079        feature = "builder",
9080        builder(with = |value:impl Into<String>|vec![value.into()])
9081    )]
9082    pub alias: Option<Vec<String>>,
9083    ///Property: Ancestors
9084    #[serde(skip_serializing_if = "Option::is_none")]
9085    #[cfg_attr(
9086        feature = "builder",
9087        builder(with = |value:impl Into<String>|vec![value.into()])
9088    )]
9089    pub ancestors: Option<Vec<String>>,
9090    ///Property: Author
9091    #[serde(skip_serializing_if = "Option::is_none")]
9092    #[cfg_attr(
9093        feature = "builder",
9094        builder(with = |value:impl Into<String>|vec![value.into()])
9095    )]
9096    pub author: Option<Vec<String>>,
9097    ///Property: Authored on
9098    #[serde(skip_serializing_if = "Option::is_none")]
9099    #[cfg_attr(
9100        feature = "builder",
9101        builder(with = |value:impl Into<String>|vec![value.into()])
9102    )]
9103    pub authored_at: Option<Vec<String>>,
9104    ///Property: HTML
9105    #[serde(skip_serializing_if = "Option::is_none")]
9106    #[cfg_attr(
9107        feature = "builder",
9108        builder(with = |value:impl Into<String>|vec![value.into()])
9109    )]
9110    pub body_html: Option<Vec<String>>,
9111    ///Property: Text
9112    #[serde(skip_serializing_if = "Option::is_none")]
9113    #[cfg_attr(
9114        feature = "builder",
9115        builder(with = |value:impl Into<String>|vec![value.into()])
9116    )]
9117    pub body_text: Option<Vec<String>>,
9118    ///Property: Detected companies
9119    #[serde(skip_serializing_if = "Option::is_none")]
9120    #[cfg_attr(
9121        feature = "builder",
9122        builder(with = |value:impl Into<String>|vec![value.into()])
9123    )]
9124    pub companies_mentioned: Option<Vec<String>>,
9125    ///Property: Checksum
9126    #[serde(skip_serializing_if = "Option::is_none")]
9127    #[cfg_attr(
9128        feature = "builder",
9129        builder(with = |value:impl Into<String>|vec![value.into()])
9130    )]
9131    pub content_hash: Option<Vec<String>>,
9132    ///Property: Country
9133    #[serde(skip_serializing_if = "Option::is_none")]
9134    #[cfg_attr(
9135        feature = "builder",
9136        builder(with = |value:impl Into<String>|vec![value.into()])
9137    )]
9138    pub country: Option<Vec<String>>,
9139    ///Property: Crawler
9140    #[serde(skip_serializing_if = "Option::is_none")]
9141    #[cfg_attr(
9142        feature = "builder",
9143        builder(with = |value:impl Into<String>|vec![value.into()])
9144    )]
9145    pub crawler: Option<Vec<String>>,
9146    ///Property: Created at
9147    #[serde(skip_serializing_if = "Option::is_none")]
9148    #[cfg_attr(
9149        feature = "builder",
9150        builder(with = |value:impl Into<String>|vec![value.into()])
9151    )]
9152    pub created_at: Option<Vec<String>>,
9153    ///Property: Date
9154    #[serde(skip_serializing_if = "Option::is_none")]
9155    #[cfg_attr(
9156        feature = "builder",
9157        builder(with = |value:impl Into<String>|vec![value.into()])
9158    )]
9159    pub date: Option<Vec<String>>,
9160    ///Property: Description
9161    #[serde(skip_serializing_if = "Option::is_none")]
9162    #[cfg_attr(
9163        feature = "builder",
9164        builder(with = |value:impl Into<String>|vec![value.into()])
9165    )]
9166    pub description: Option<Vec<String>>,
9167    ///Property: Detected country
9168    #[serde(skip_serializing_if = "Option::is_none")]
9169    #[cfg_attr(
9170        feature = "builder",
9171        builder(with = |value:impl Into<String>|vec![value.into()])
9172    )]
9173    pub detected_country: Option<Vec<String>>,
9174    ///Property: Detected language
9175    #[serde(skip_serializing_if = "Option::is_none")]
9176    #[cfg_attr(
9177        feature = "builder",
9178        builder(with = |value:impl Into<String>|vec![value.into()])
9179    )]
9180    pub detected_language: Option<Vec<String>>,
9181    ///Property: Detected e-mail addresses
9182    #[serde(skip_serializing_if = "Option::is_none")]
9183    #[cfg_attr(
9184        feature = "builder",
9185        builder(with = |value:impl Into<String>|vec![value.into()])
9186    )]
9187    pub email_mentioned: Option<Vec<String>>,
9188    ///Property: File encoding
9189    #[serde(skip_serializing_if = "Option::is_none")]
9190    #[cfg_attr(
9191        feature = "builder",
9192        builder(with = |value:impl Into<String>|vec![value.into()])
9193    )]
9194    pub encoding: Option<Vec<String>>,
9195    ///Property: File extension
9196    #[serde(skip_serializing_if = "Option::is_none")]
9197    #[cfg_attr(
9198        feature = "builder",
9199        builder(with = |value:impl Into<String>|vec![value.into()])
9200    )]
9201    pub extension: Option<Vec<String>>,
9202    ///Property: File name
9203    #[serde(default)]
9204    #[cfg_attr(
9205        feature = "builder",
9206        builder(with = |value:impl Into<String>|vec![value.into()])
9207    )]
9208    pub file_name: Vec<String>,
9209    ///Property: File size
9210    #[serde(
9211        skip_serializing_if = "Option::is_none",
9212        deserialize_with = "deserialize_opt_f64_vec",
9213        default
9214    )]
9215    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
9216    pub file_size: Option<Vec<f64>>,
9217    ///Property: Generator
9218    #[serde(skip_serializing_if = "Option::is_none")]
9219    #[cfg_attr(
9220        feature = "builder",
9221        builder(with = |value:impl Into<String>|vec![value.into()])
9222    )]
9223    pub generator: Option<Vec<String>>,
9224    ///Property: Detected IBANs
9225    #[serde(skip_serializing_if = "Option::is_none")]
9226    #[cfg_attr(
9227        feature = "builder",
9228        builder(with = |value:impl Into<String>|vec![value.into()])
9229    )]
9230    pub iban_mentioned: Option<Vec<String>>,
9231    ///Property: Index text
9232    #[serde(skip_serializing_if = "Option::is_none")]
9233    #[cfg_attr(
9234        feature = "builder",
9235        builder(with = |value:impl Into<String>|vec![value.into()])
9236    )]
9237    pub index_text: Option<Vec<String>>,
9238    ///Property: Detected IP addresses
9239    #[serde(skip_serializing_if = "Option::is_none")]
9240    #[cfg_attr(
9241        feature = "builder",
9242        builder(with = |value:impl Into<String>|vec![value.into()])
9243    )]
9244    pub ip_mentioned: Option<Vec<String>>,
9245    ///Property: Keywords
9246    #[serde(skip_serializing_if = "Option::is_none")]
9247    #[cfg_attr(
9248        feature = "builder",
9249        builder(with = |value:impl Into<String>|vec![value.into()])
9250    )]
9251    pub keywords: Option<Vec<String>>,
9252    ///Property: Language
9253    #[serde(skip_serializing_if = "Option::is_none")]
9254    #[cfg_attr(
9255        feature = "builder",
9256        builder(with = |value:impl Into<String>|vec![value.into()])
9257    )]
9258    pub language: Option<Vec<String>>,
9259    ///Property: Detected locations
9260    #[serde(skip_serializing_if = "Option::is_none")]
9261    #[cfg_attr(
9262        feature = "builder",
9263        builder(with = |value:impl Into<String>|vec![value.into()])
9264    )]
9265    pub location_mentioned: Option<Vec<String>>,
9266    ///Property: Message ID
9267    #[serde(skip_serializing_if = "Option::is_none")]
9268    #[cfg_attr(
9269        feature = "builder",
9270        builder(with = |value:impl Into<String>|vec![value.into()])
9271    )]
9272    pub message_id: Option<Vec<String>>,
9273    ///Property: MIME type
9274    #[serde(skip_serializing_if = "Option::is_none")]
9275    #[cfg_attr(
9276        feature = "builder",
9277        builder(with = |value:impl Into<String>|vec![value.into()])
9278    )]
9279    pub mime_type: Option<Vec<String>>,
9280    ///Property: Modified on
9281    #[serde(skip_serializing_if = "Option::is_none")]
9282    #[cfg_attr(
9283        feature = "builder",
9284        builder(with = |value:impl Into<String>|vec![value.into()])
9285    )]
9286    pub modified_at: Option<Vec<String>>,
9287    ///Property: Name
9288    #[serde(default)]
9289    #[cfg_attr(
9290        feature = "builder",
9291        builder(with = |value:impl Into<String>|vec![value.into()])
9292    )]
9293    pub name: Vec<String>,
9294    ///Property: Detected names
9295    #[serde(skip_serializing_if = "Option::is_none")]
9296    #[cfg_attr(
9297        feature = "builder",
9298        builder(with = |value:impl Into<String>|vec![value.into()])
9299    )]
9300    pub names_mentioned: Option<Vec<String>>,
9301    ///Property: Notes
9302    #[serde(skip_serializing_if = "Option::is_none")]
9303    #[cfg_attr(
9304        feature = "builder",
9305        builder(with = |value:impl Into<String>|vec![value.into()])
9306    )]
9307    pub notes: Option<Vec<String>>,
9308    ///Property: Folder
9309    #[serde(skip_serializing_if = "Option::is_none")]
9310    #[cfg_attr(
9311        feature = "builder",
9312        builder(with = |value:impl Into<String>|vec![value.into()])
9313    )]
9314    pub parent: Option<Vec<String>>,
9315    ///Property: Detected people
9316    #[serde(skip_serializing_if = "Option::is_none")]
9317    #[cfg_attr(
9318        feature = "builder",
9319        builder(with = |value:impl Into<String>|vec![value.into()])
9320    )]
9321    pub people_mentioned: Option<Vec<String>>,
9322    ///Property: Detected phones
9323    #[serde(skip_serializing_if = "Option::is_none")]
9324    #[cfg_attr(
9325        feature = "builder",
9326        builder(with = |value:impl Into<String>|vec![value.into()])
9327    )]
9328    pub phone_mentioned: Option<Vec<String>>,
9329    ///Property: Previous name
9330    #[serde(skip_serializing_if = "Option::is_none")]
9331    #[cfg_attr(
9332        feature = "builder",
9333        builder(with = |value:impl Into<String>|vec![value.into()])
9334    )]
9335    pub previous_name: Option<Vec<String>>,
9336    ///Property: Processed at
9337    #[serde(skip_serializing_if = "Option::is_none")]
9338    #[cfg_attr(
9339        feature = "builder",
9340        builder(with = |value:impl Into<String>|vec![value.into()])
9341    )]
9342    pub processed_at: Option<Vec<String>>,
9343    ///Property: Processing agent
9344    #[serde(skip_serializing_if = "Option::is_none")]
9345    #[cfg_attr(
9346        feature = "builder",
9347        builder(with = |value:impl Into<String>|vec![value.into()])
9348    )]
9349    pub processing_agent: Option<Vec<String>>,
9350    ///Property: Processing error
9351    #[serde(skip_serializing_if = "Option::is_none")]
9352    #[cfg_attr(
9353        feature = "builder",
9354        builder(with = |value:impl Into<String>|vec![value.into()])
9355    )]
9356    pub processing_error: Option<Vec<String>>,
9357    ///Property: Processing status
9358    #[serde(skip_serializing_if = "Option::is_none")]
9359    #[cfg_attr(
9360        feature = "builder",
9361        builder(with = |value:impl Into<String>|vec![value.into()])
9362    )]
9363    pub processing_status: Option<Vec<String>>,
9364    ///Property: Program
9365    #[serde(skip_serializing_if = "Option::is_none")]
9366    #[cfg_attr(
9367        feature = "builder",
9368        builder(with = |value:impl Into<String>|vec![value.into()])
9369    )]
9370    pub program: Option<Vec<String>>,
9371    ///Property: Program ID
9372    #[serde(skip_serializing_if = "Option::is_none")]
9373    #[cfg_attr(
9374        feature = "builder",
9375        builder(with = |value:impl Into<String>|vec![value.into()])
9376    )]
9377    pub program_id: Option<Vec<String>>,
9378    ///Property: Source document
9379    #[serde(skip_serializing_if = "Option::is_none")]
9380    #[cfg_attr(
9381        feature = "builder",
9382        builder(with = |value:impl Into<String>|vec![value.into()])
9383    )]
9384    pub proof: Option<Vec<String>>,
9385    ///Property: Published on
9386    #[serde(skip_serializing_if = "Option::is_none")]
9387    #[cfg_attr(
9388        feature = "builder",
9389        builder(with = |value:impl Into<String>|vec![value.into()])
9390    )]
9391    pub published_at: Option<Vec<String>>,
9392    ///Property: Publishing source
9393    #[serde(skip_serializing_if = "Option::is_none")]
9394    #[cfg_attr(
9395        feature = "builder",
9396        builder(with = |value:impl Into<String>|vec![value.into()])
9397    )]
9398    pub publisher: Option<Vec<String>>,
9399    ///Property: Publishing source URL
9400    #[serde(skip_serializing_if = "Option::is_none")]
9401    #[cfg_attr(
9402        feature = "builder",
9403        builder(with = |value:impl Into<String>|vec![value.into()])
9404    )]
9405    pub publisher_url: Option<Vec<String>>,
9406    ///Property: Retrieved on
9407    #[serde(skip_serializing_if = "Option::is_none")]
9408    #[cfg_attr(
9409        feature = "builder",
9410        builder(with = |value:impl Into<String>|vec![value.into()])
9411    )]
9412    pub retrieved_at: Option<Vec<String>>,
9413    ///Property: Source link
9414    #[serde(skip_serializing_if = "Option::is_none")]
9415    #[cfg_attr(
9416        feature = "builder",
9417        builder(with = |value:impl Into<String>|vec![value.into()])
9418    )]
9419    pub source_url: Option<Vec<String>>,
9420    ///Property: Summary
9421    #[serde(skip_serializing_if = "Option::is_none")]
9422    #[cfg_attr(
9423        feature = "builder",
9424        builder(with = |value:impl Into<String>|vec![value.into()])
9425    )]
9426    pub summary: Option<Vec<String>>,
9427    ///Property: Title
9428    #[serde(skip_serializing_if = "Option::is_none")]
9429    #[cfg_attr(
9430        feature = "builder",
9431        builder(with = |value:impl Into<String>|vec![value.into()])
9432    )]
9433    pub title: Option<Vec<String>>,
9434    ///Property: Topics
9435    #[serde(skip_serializing_if = "Option::is_none")]
9436    #[cfg_attr(
9437        feature = "builder",
9438        builder(with = |value:impl Into<String>|vec![value.into()])
9439    )]
9440    pub topics: Option<Vec<String>>,
9441    ///Property: The language of the translated text
9442    #[serde(skip_serializing_if = "Option::is_none")]
9443    #[cfg_attr(
9444        feature = "builder",
9445        builder(with = |value:impl Into<String>|vec![value.into()])
9446    )]
9447    pub translated_language: Option<Vec<String>>,
9448    ///Property: Translated version of the body text
9449    #[serde(skip_serializing_if = "Option::is_none")]
9450    #[cfg_attr(
9451        feature = "builder",
9452        builder(with = |value:impl Into<String>|vec![value.into()])
9453    )]
9454    pub translated_text: Option<Vec<String>>,
9455    ///Property: Weak alias
9456    #[serde(skip_serializing_if = "Option::is_none")]
9457    #[cfg_attr(
9458        feature = "builder",
9459        builder(with = |value:impl Into<String>|vec![value.into()])
9460    )]
9461    pub weak_alias: Option<Vec<String>>,
9462    ///Property: Wikidata ID
9463    #[serde(skip_serializing_if = "Option::is_none")]
9464    #[cfg_attr(
9465        feature = "builder",
9466        builder(with = |value:impl Into<String>|vec![value.into()])
9467    )]
9468    pub wikidata_id: Option<Vec<String>>,
9469    ///Property: Wikipedia Article
9470    #[serde(skip_serializing_if = "Option::is_none")]
9471    #[cfg_attr(
9472        feature = "builder",
9473        builder(with = |value:impl Into<String>|vec![value.into()])
9474    )]
9475    pub wikipedia_url: Option<Vec<String>>,
9476}
9477impl HyperText {
9478    /// Create a new entity with the given ID
9479    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
9480    pub fn new(id: impl Into<String>) -> Self {
9481        Self {
9482            id: id.into(),
9483            schema: "HyperText".to_string(),
9484            address: None,
9485            address_entity: None,
9486            aleph_url: None,
9487            alias: None,
9488            ancestors: None,
9489            author: None,
9490            authored_at: None,
9491            body_html: None,
9492            body_text: None,
9493            companies_mentioned: None,
9494            content_hash: None,
9495            country: None,
9496            crawler: None,
9497            created_at: None,
9498            date: None,
9499            description: None,
9500            detected_country: None,
9501            detected_language: None,
9502            email_mentioned: None,
9503            encoding: None,
9504            extension: None,
9505            file_name: Vec::new(),
9506            file_size: None,
9507            generator: None,
9508            iban_mentioned: None,
9509            index_text: None,
9510            ip_mentioned: None,
9511            keywords: None,
9512            language: None,
9513            location_mentioned: None,
9514            message_id: None,
9515            mime_type: None,
9516            modified_at: None,
9517            name: Vec::new(),
9518            names_mentioned: None,
9519            notes: None,
9520            parent: None,
9521            people_mentioned: None,
9522            phone_mentioned: None,
9523            previous_name: None,
9524            processed_at: None,
9525            processing_agent: None,
9526            processing_error: None,
9527            processing_status: None,
9528            program: None,
9529            program_id: None,
9530            proof: None,
9531            published_at: None,
9532            publisher: None,
9533            publisher_url: None,
9534            retrieved_at: None,
9535            source_url: None,
9536            summary: None,
9537            title: None,
9538            topics: None,
9539            translated_language: None,
9540            translated_text: None,
9541            weak_alias: None,
9542            wikidata_id: None,
9543            wikipedia_url: None,
9544        }
9545    }
9546    /// Get the schema name
9547    pub fn schema_name() -> &'static str {
9548        "HyperText"
9549    }
9550    /// Serialize to standard FTM nested JSON format
9551    ///
9552    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
9553    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
9554        let mut value = serde_json::to_value(self)?;
9555        if let Some(obj) = value.as_object_mut() {
9556            let id = obj.remove("id");
9557            let schema = obj.remove("schema");
9558            let properties = serde_json::Value::Object(std::mem::take(obj));
9559            if let Some(id) = id {
9560                obj.insert("id".into(), id);
9561            }
9562            if let Some(schema) = schema {
9563                obj.insert("schema".into(), schema);
9564            }
9565            obj.insert("properties".into(), properties);
9566        }
9567        serde_json::to_string(&value)
9568    }
9569}
9570///FTM Schema: Identification
9571#[derive(Debug, Clone, Serialize, Deserialize)]
9572#[cfg_attr(feature = "builder", derive(Builder))]
9573#[serde(rename_all = "camelCase")]
9574pub struct Identification {
9575    pub id: String,
9576    #[cfg_attr(feature = "builder", builder(default = "Identification".to_string()))]
9577    pub schema: String,
9578    ///Property: Aleph URL
9579    #[serde(skip_serializing_if = "Option::is_none")]
9580    #[cfg_attr(
9581        feature = "builder",
9582        builder(with = |value:impl Into<String>|vec![value.into()])
9583    )]
9584    pub aleph_url: Option<Vec<String>>,
9585    ///Property: Authority
9586    #[serde(skip_serializing_if = "Option::is_none")]
9587    #[cfg_attr(
9588        feature = "builder",
9589        builder(with = |value:impl Into<String>|vec![value.into()])
9590    )]
9591    pub authority: Option<Vec<String>>,
9592    ///Property: Country
9593    #[serde(skip_serializing_if = "Option::is_none")]
9594    #[cfg_attr(
9595        feature = "builder",
9596        builder(with = |value:impl Into<String>|vec![value.into()])
9597    )]
9598    pub country: Option<Vec<String>>,
9599    ///Property: Date
9600    #[serde(skip_serializing_if = "Option::is_none")]
9601    #[cfg_attr(
9602        feature = "builder",
9603        builder(with = |value:impl Into<String>|vec![value.into()])
9604    )]
9605    pub date: Option<Vec<String>>,
9606    ///Property: Description
9607    #[serde(skip_serializing_if = "Option::is_none")]
9608    #[cfg_attr(
9609        feature = "builder",
9610        builder(with = |value:impl Into<String>|vec![value.into()])
9611    )]
9612    pub description: Option<Vec<String>>,
9613    ///Property: End date
9614    #[serde(skip_serializing_if = "Option::is_none")]
9615    #[cfg_attr(
9616        feature = "builder",
9617        builder(with = |value:impl Into<String>|vec![value.into()])
9618    )]
9619    pub end_date: Option<Vec<String>>,
9620    ///Property: Identification holder
9621    #[serde(default)]
9622    #[cfg_attr(
9623        feature = "builder",
9624        builder(with = |value:impl Into<String>|vec![value.into()])
9625    )]
9626    pub holder: Vec<String>,
9627    ///Property: Index text
9628    #[serde(skip_serializing_if = "Option::is_none")]
9629    #[cfg_attr(
9630        feature = "builder",
9631        builder(with = |value:impl Into<String>|vec![value.into()])
9632    )]
9633    pub index_text: Option<Vec<String>>,
9634    ///Property: Modified on
9635    #[serde(skip_serializing_if = "Option::is_none")]
9636    #[cfg_attr(
9637        feature = "builder",
9638        builder(with = |value:impl Into<String>|vec![value.into()])
9639    )]
9640    pub modified_at: Option<Vec<String>>,
9641    ///Property: Detected names
9642    #[serde(skip_serializing_if = "Option::is_none")]
9643    #[cfg_attr(
9644        feature = "builder",
9645        builder(with = |value:impl Into<String>|vec![value.into()])
9646    )]
9647    pub names_mentioned: Option<Vec<String>>,
9648    ///Property: Document number
9649    #[serde(default)]
9650    #[cfg_attr(
9651        feature = "builder",
9652        builder(with = |value:impl Into<String>|vec![value.into()])
9653    )]
9654    pub number: Vec<String>,
9655    ///Property: Source document
9656    #[serde(skip_serializing_if = "Option::is_none")]
9657    #[cfg_attr(
9658        feature = "builder",
9659        builder(with = |value:impl Into<String>|vec![value.into()])
9660    )]
9661    pub proof: Option<Vec<String>>,
9662    ///Property: Publishing source
9663    #[serde(skip_serializing_if = "Option::is_none")]
9664    #[cfg_attr(
9665        feature = "builder",
9666        builder(with = |value:impl Into<String>|vec![value.into()])
9667    )]
9668    pub publisher: Option<Vec<String>>,
9669    ///Property: Publishing source URL
9670    #[serde(skip_serializing_if = "Option::is_none")]
9671    #[cfg_attr(
9672        feature = "builder",
9673        builder(with = |value:impl Into<String>|vec![value.into()])
9674    )]
9675    pub publisher_url: Option<Vec<String>>,
9676    ///Property: Record ID
9677    #[serde(skip_serializing_if = "Option::is_none")]
9678    #[cfg_attr(
9679        feature = "builder",
9680        builder(with = |value:impl Into<String>|vec![value.into()])
9681    )]
9682    pub record_id: Option<Vec<String>>,
9683    ///Property: Retrieved on
9684    #[serde(skip_serializing_if = "Option::is_none")]
9685    #[cfg_attr(
9686        feature = "builder",
9687        builder(with = |value:impl Into<String>|vec![value.into()])
9688    )]
9689    pub retrieved_at: Option<Vec<String>>,
9690    ///Property: Source link
9691    #[serde(skip_serializing_if = "Option::is_none")]
9692    #[cfg_attr(
9693        feature = "builder",
9694        builder(with = |value:impl Into<String>|vec![value.into()])
9695    )]
9696    pub source_url: Option<Vec<String>>,
9697    ///Property: Start date
9698    #[serde(skip_serializing_if = "Option::is_none")]
9699    #[cfg_attr(
9700        feature = "builder",
9701        builder(with = |value:impl Into<String>|vec![value.into()])
9702    )]
9703    pub start_date: Option<Vec<String>>,
9704    ///Property: Summary
9705    #[serde(skip_serializing_if = "Option::is_none")]
9706    #[cfg_attr(
9707        feature = "builder",
9708        builder(with = |value:impl Into<String>|vec![value.into()])
9709    )]
9710    pub summary: Option<Vec<String>>,
9711    ///Property: Type
9712    #[serde(skip_serializing_if = "Option::is_none")]
9713    #[cfg_attr(
9714        feature = "builder",
9715        builder(with = |value:impl Into<String>|vec![value.into()])
9716    )]
9717    pub type_: Option<Vec<String>>,
9718}
9719impl Identification {
9720    /// Create a new entity with the given ID
9721    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
9722    pub fn new(id: impl Into<String>) -> Self {
9723        Self {
9724            id: id.into(),
9725            schema: "Identification".to_string(),
9726            aleph_url: None,
9727            authority: None,
9728            country: None,
9729            date: None,
9730            description: None,
9731            end_date: None,
9732            holder: Vec::new(),
9733            index_text: None,
9734            modified_at: None,
9735            names_mentioned: None,
9736            number: Vec::new(),
9737            proof: None,
9738            publisher: None,
9739            publisher_url: None,
9740            record_id: None,
9741            retrieved_at: None,
9742            source_url: None,
9743            start_date: None,
9744            summary: None,
9745            type_: None,
9746        }
9747    }
9748    /// Get the schema name
9749    pub fn schema_name() -> &'static str {
9750        "Identification"
9751    }
9752    /// Serialize to standard FTM nested JSON format
9753    ///
9754    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
9755    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
9756        let mut value = serde_json::to_value(self)?;
9757        if let Some(obj) = value.as_object_mut() {
9758            let id = obj.remove("id");
9759            let schema = obj.remove("schema");
9760            let properties = serde_json::Value::Object(std::mem::take(obj));
9761            if let Some(id) = id {
9762                obj.insert("id".into(), id);
9763            }
9764            if let Some(schema) = schema {
9765                obj.insert("schema".into(), schema);
9766            }
9767            obj.insert("properties".into(), properties);
9768        }
9769        serde_json::to_string(&value)
9770    }
9771}
9772///FTM Schema: Image
9773#[derive(Debug, Clone, Serialize, Deserialize)]
9774#[cfg_attr(feature = "builder", derive(Builder))]
9775#[serde(rename_all = "camelCase")]
9776pub struct Image {
9777    pub id: String,
9778    #[cfg_attr(feature = "builder", builder(default = "Image".to_string()))]
9779    pub schema: String,
9780    ///Property: Address
9781    #[serde(skip_serializing_if = "Option::is_none")]
9782    #[cfg_attr(
9783        feature = "builder",
9784        builder(with = |value:impl Into<String>|vec![value.into()])
9785    )]
9786    pub address: Option<Vec<String>>,
9787    ///Property: Address
9788    #[serde(skip_serializing_if = "Option::is_none")]
9789    #[cfg_attr(
9790        feature = "builder",
9791        builder(with = |value:impl Into<String>|vec![value.into()])
9792    )]
9793    pub address_entity: Option<Vec<String>>,
9794    ///Property: Aleph URL
9795    #[serde(skip_serializing_if = "Option::is_none")]
9796    #[cfg_attr(
9797        feature = "builder",
9798        builder(with = |value:impl Into<String>|vec![value.into()])
9799    )]
9800    pub aleph_url: Option<Vec<String>>,
9801    ///Property: Alias
9802    #[serde(skip_serializing_if = "Option::is_none")]
9803    #[cfg_attr(
9804        feature = "builder",
9805        builder(with = |value:impl Into<String>|vec![value.into()])
9806    )]
9807    pub alias: Option<Vec<String>>,
9808    ///Property: Ancestors
9809    #[serde(skip_serializing_if = "Option::is_none")]
9810    #[cfg_attr(
9811        feature = "builder",
9812        builder(with = |value:impl Into<String>|vec![value.into()])
9813    )]
9814    pub ancestors: Option<Vec<String>>,
9815    ///Property: Author
9816    #[serde(skip_serializing_if = "Option::is_none")]
9817    #[cfg_attr(
9818        feature = "builder",
9819        builder(with = |value:impl Into<String>|vec![value.into()])
9820    )]
9821    pub author: Option<Vec<String>>,
9822    ///Property: Authored on
9823    #[serde(skip_serializing_if = "Option::is_none")]
9824    #[cfg_attr(
9825        feature = "builder",
9826        builder(with = |value:impl Into<String>|vec![value.into()])
9827    )]
9828    pub authored_at: Option<Vec<String>>,
9829    ///Property: Text
9830    #[serde(skip_serializing_if = "Option::is_none")]
9831    #[cfg_attr(
9832        feature = "builder",
9833        builder(with = |value:impl Into<String>|vec![value.into()])
9834    )]
9835    pub body_text: Option<Vec<String>>,
9836    ///Property: Detected companies
9837    #[serde(skip_serializing_if = "Option::is_none")]
9838    #[cfg_attr(
9839        feature = "builder",
9840        builder(with = |value:impl Into<String>|vec![value.into()])
9841    )]
9842    pub companies_mentioned: Option<Vec<String>>,
9843    ///Property: Checksum
9844    #[serde(skip_serializing_if = "Option::is_none")]
9845    #[cfg_attr(
9846        feature = "builder",
9847        builder(with = |value:impl Into<String>|vec![value.into()])
9848    )]
9849    pub content_hash: Option<Vec<String>>,
9850    ///Property: Country
9851    #[serde(skip_serializing_if = "Option::is_none")]
9852    #[cfg_attr(
9853        feature = "builder",
9854        builder(with = |value:impl Into<String>|vec![value.into()])
9855    )]
9856    pub country: Option<Vec<String>>,
9857    ///Property: Crawler
9858    #[serde(skip_serializing_if = "Option::is_none")]
9859    #[cfg_attr(
9860        feature = "builder",
9861        builder(with = |value:impl Into<String>|vec![value.into()])
9862    )]
9863    pub crawler: Option<Vec<String>>,
9864    ///Property: Created at
9865    #[serde(skip_serializing_if = "Option::is_none")]
9866    #[cfg_attr(
9867        feature = "builder",
9868        builder(with = |value:impl Into<String>|vec![value.into()])
9869    )]
9870    pub created_at: Option<Vec<String>>,
9871    ///Property: Credit
9872    #[serde(skip_serializing_if = "Option::is_none")]
9873    #[cfg_attr(
9874        feature = "builder",
9875        builder(with = |value:impl Into<String>|vec![value.into()])
9876    )]
9877    pub credit: Option<Vec<String>>,
9878    ///Property: Date
9879    #[serde(skip_serializing_if = "Option::is_none")]
9880    #[cfg_attr(
9881        feature = "builder",
9882        builder(with = |value:impl Into<String>|vec![value.into()])
9883    )]
9884    pub date: Option<Vec<String>>,
9885    ///Property: Description
9886    #[serde(skip_serializing_if = "Option::is_none")]
9887    #[cfg_attr(
9888        feature = "builder",
9889        builder(with = |value:impl Into<String>|vec![value.into()])
9890    )]
9891    pub description: Option<Vec<String>>,
9892    ///Property: Detected country
9893    #[serde(skip_serializing_if = "Option::is_none")]
9894    #[cfg_attr(
9895        feature = "builder",
9896        builder(with = |value:impl Into<String>|vec![value.into()])
9897    )]
9898    pub detected_country: Option<Vec<String>>,
9899    ///Property: Detected language
9900    #[serde(skip_serializing_if = "Option::is_none")]
9901    #[cfg_attr(
9902        feature = "builder",
9903        builder(with = |value:impl Into<String>|vec![value.into()])
9904    )]
9905    pub detected_language: Option<Vec<String>>,
9906    ///Property: Detected e-mail addresses
9907    #[serde(skip_serializing_if = "Option::is_none")]
9908    #[cfg_attr(
9909        feature = "builder",
9910        builder(with = |value:impl Into<String>|vec![value.into()])
9911    )]
9912    pub email_mentioned: Option<Vec<String>>,
9913    ///Property: File encoding
9914    #[serde(skip_serializing_if = "Option::is_none")]
9915    #[cfg_attr(
9916        feature = "builder",
9917        builder(with = |value:impl Into<String>|vec![value.into()])
9918    )]
9919    pub encoding: Option<Vec<String>>,
9920    ///Property: File extension
9921    #[serde(skip_serializing_if = "Option::is_none")]
9922    #[cfg_attr(
9923        feature = "builder",
9924        builder(with = |value:impl Into<String>|vec![value.into()])
9925    )]
9926    pub extension: Option<Vec<String>>,
9927    ///Property: File name
9928    #[serde(default)]
9929    #[cfg_attr(
9930        feature = "builder",
9931        builder(with = |value:impl Into<String>|vec![value.into()])
9932    )]
9933    pub file_name: Vec<String>,
9934    ///Property: File size
9935    #[serde(
9936        skip_serializing_if = "Option::is_none",
9937        deserialize_with = "deserialize_opt_f64_vec",
9938        default
9939    )]
9940    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
9941    pub file_size: Option<Vec<f64>>,
9942    ///Property: Generator
9943    #[serde(skip_serializing_if = "Option::is_none")]
9944    #[cfg_attr(
9945        feature = "builder",
9946        builder(with = |value:impl Into<String>|vec![value.into()])
9947    )]
9948    pub generator: Option<Vec<String>>,
9949    ///Property: Detected IBANs
9950    #[serde(skip_serializing_if = "Option::is_none")]
9951    #[cfg_attr(
9952        feature = "builder",
9953        builder(with = |value:impl Into<String>|vec![value.into()])
9954    )]
9955    pub iban_mentioned: Option<Vec<String>>,
9956    ///Property: Index text
9957    #[serde(skip_serializing_if = "Option::is_none")]
9958    #[cfg_attr(
9959        feature = "builder",
9960        builder(with = |value:impl Into<String>|vec![value.into()])
9961    )]
9962    pub index_text: Option<Vec<String>>,
9963    ///Property: Detected IP addresses
9964    #[serde(skip_serializing_if = "Option::is_none")]
9965    #[cfg_attr(
9966        feature = "builder",
9967        builder(with = |value:impl Into<String>|vec![value.into()])
9968    )]
9969    pub ip_mentioned: Option<Vec<String>>,
9970    ///Property: Keywords
9971    #[serde(skip_serializing_if = "Option::is_none")]
9972    #[cfg_attr(
9973        feature = "builder",
9974        builder(with = |value:impl Into<String>|vec![value.into()])
9975    )]
9976    pub keywords: Option<Vec<String>>,
9977    ///Property: Language
9978    #[serde(skip_serializing_if = "Option::is_none")]
9979    #[cfg_attr(
9980        feature = "builder",
9981        builder(with = |value:impl Into<String>|vec![value.into()])
9982    )]
9983    pub language: Option<Vec<String>>,
9984    ///Property: Detected locations
9985    #[serde(skip_serializing_if = "Option::is_none")]
9986    #[cfg_attr(
9987        feature = "builder",
9988        builder(with = |value:impl Into<String>|vec![value.into()])
9989    )]
9990    pub location_mentioned: Option<Vec<String>>,
9991    ///Property: Message ID
9992    #[serde(skip_serializing_if = "Option::is_none")]
9993    #[cfg_attr(
9994        feature = "builder",
9995        builder(with = |value:impl Into<String>|vec![value.into()])
9996    )]
9997    pub message_id: Option<Vec<String>>,
9998    ///Property: MIME type
9999    #[serde(skip_serializing_if = "Option::is_none")]
10000    #[cfg_attr(
10001        feature = "builder",
10002        builder(with = |value:impl Into<String>|vec![value.into()])
10003    )]
10004    pub mime_type: Option<Vec<String>>,
10005    ///Property: Modified on
10006    #[serde(skip_serializing_if = "Option::is_none")]
10007    #[cfg_attr(
10008        feature = "builder",
10009        builder(with = |value:impl Into<String>|vec![value.into()])
10010    )]
10011    pub modified_at: Option<Vec<String>>,
10012    ///Property: Name
10013    #[serde(default)]
10014    #[cfg_attr(
10015        feature = "builder",
10016        builder(with = |value:impl Into<String>|vec![value.into()])
10017    )]
10018    pub name: Vec<String>,
10019    ///Property: Detected names
10020    #[serde(skip_serializing_if = "Option::is_none")]
10021    #[cfg_attr(
10022        feature = "builder",
10023        builder(with = |value:impl Into<String>|vec![value.into()])
10024    )]
10025    pub names_mentioned: Option<Vec<String>>,
10026    ///Property: Notes
10027    #[serde(skip_serializing_if = "Option::is_none")]
10028    #[cfg_attr(
10029        feature = "builder",
10030        builder(with = |value:impl Into<String>|vec![value.into()])
10031    )]
10032    pub notes: Option<Vec<String>>,
10033    ///Property: Folder
10034    #[serde(skip_serializing_if = "Option::is_none")]
10035    #[cfg_attr(
10036        feature = "builder",
10037        builder(with = |value:impl Into<String>|vec![value.into()])
10038    )]
10039    pub parent: Option<Vec<String>>,
10040    ///Property: Detected people
10041    #[serde(skip_serializing_if = "Option::is_none")]
10042    #[cfg_attr(
10043        feature = "builder",
10044        builder(with = |value:impl Into<String>|vec![value.into()])
10045    )]
10046    pub people_mentioned: Option<Vec<String>>,
10047    ///Property: Detected phones
10048    #[serde(skip_serializing_if = "Option::is_none")]
10049    #[cfg_attr(
10050        feature = "builder",
10051        builder(with = |value:impl Into<String>|vec![value.into()])
10052    )]
10053    pub phone_mentioned: Option<Vec<String>>,
10054    ///Property: Pictured
10055    #[serde(skip_serializing_if = "Option::is_none")]
10056    #[cfg_attr(
10057        feature = "builder",
10058        builder(with = |value:impl Into<String>|vec![value.into()])
10059    )]
10060    pub pictured: Option<Vec<String>>,
10061    ///Property: Previous name
10062    #[serde(skip_serializing_if = "Option::is_none")]
10063    #[cfg_attr(
10064        feature = "builder",
10065        builder(with = |value:impl Into<String>|vec![value.into()])
10066    )]
10067    pub previous_name: Option<Vec<String>>,
10068    ///Property: Processed at
10069    #[serde(skip_serializing_if = "Option::is_none")]
10070    #[cfg_attr(
10071        feature = "builder",
10072        builder(with = |value:impl Into<String>|vec![value.into()])
10073    )]
10074    pub processed_at: Option<Vec<String>>,
10075    ///Property: Processing agent
10076    #[serde(skip_serializing_if = "Option::is_none")]
10077    #[cfg_attr(
10078        feature = "builder",
10079        builder(with = |value:impl Into<String>|vec![value.into()])
10080    )]
10081    pub processing_agent: Option<Vec<String>>,
10082    ///Property: Processing error
10083    #[serde(skip_serializing_if = "Option::is_none")]
10084    #[cfg_attr(
10085        feature = "builder",
10086        builder(with = |value:impl Into<String>|vec![value.into()])
10087    )]
10088    pub processing_error: Option<Vec<String>>,
10089    ///Property: Processing status
10090    #[serde(skip_serializing_if = "Option::is_none")]
10091    #[cfg_attr(
10092        feature = "builder",
10093        builder(with = |value:impl Into<String>|vec![value.into()])
10094    )]
10095    pub processing_status: Option<Vec<String>>,
10096    ///Property: Program
10097    #[serde(skip_serializing_if = "Option::is_none")]
10098    #[cfg_attr(
10099        feature = "builder",
10100        builder(with = |value:impl Into<String>|vec![value.into()])
10101    )]
10102    pub program: Option<Vec<String>>,
10103    ///Property: Program ID
10104    #[serde(skip_serializing_if = "Option::is_none")]
10105    #[cfg_attr(
10106        feature = "builder",
10107        builder(with = |value:impl Into<String>|vec![value.into()])
10108    )]
10109    pub program_id: Option<Vec<String>>,
10110    ///Property: Source document
10111    #[serde(skip_serializing_if = "Option::is_none")]
10112    #[cfg_attr(
10113        feature = "builder",
10114        builder(with = |value:impl Into<String>|vec![value.into()])
10115    )]
10116    pub proof: Option<Vec<String>>,
10117    ///Property: Published on
10118    #[serde(skip_serializing_if = "Option::is_none")]
10119    #[cfg_attr(
10120        feature = "builder",
10121        builder(with = |value:impl Into<String>|vec![value.into()])
10122    )]
10123    pub published_at: Option<Vec<String>>,
10124    ///Property: Publishing source
10125    #[serde(skip_serializing_if = "Option::is_none")]
10126    #[cfg_attr(
10127        feature = "builder",
10128        builder(with = |value:impl Into<String>|vec![value.into()])
10129    )]
10130    pub publisher: Option<Vec<String>>,
10131    ///Property: Publishing source URL
10132    #[serde(skip_serializing_if = "Option::is_none")]
10133    #[cfg_attr(
10134        feature = "builder",
10135        builder(with = |value:impl Into<String>|vec![value.into()])
10136    )]
10137    pub publisher_url: Option<Vec<String>>,
10138    ///Property: Retrieved on
10139    #[serde(skip_serializing_if = "Option::is_none")]
10140    #[cfg_attr(
10141        feature = "builder",
10142        builder(with = |value:impl Into<String>|vec![value.into()])
10143    )]
10144    pub retrieved_at: Option<Vec<String>>,
10145    ///Property: Source link
10146    #[serde(skip_serializing_if = "Option::is_none")]
10147    #[cfg_attr(
10148        feature = "builder",
10149        builder(with = |value:impl Into<String>|vec![value.into()])
10150    )]
10151    pub source_url: Option<Vec<String>>,
10152    ///Property: Summary
10153    #[serde(skip_serializing_if = "Option::is_none")]
10154    #[cfg_attr(
10155        feature = "builder",
10156        builder(with = |value:impl Into<String>|vec![value.into()])
10157    )]
10158    pub summary: Option<Vec<String>>,
10159    ///Property: Title
10160    #[serde(skip_serializing_if = "Option::is_none")]
10161    #[cfg_attr(
10162        feature = "builder",
10163        builder(with = |value:impl Into<String>|vec![value.into()])
10164    )]
10165    pub title: Option<Vec<String>>,
10166    ///Property: Topics
10167    #[serde(skip_serializing_if = "Option::is_none")]
10168    #[cfg_attr(
10169        feature = "builder",
10170        builder(with = |value:impl Into<String>|vec![value.into()])
10171    )]
10172    pub topics: Option<Vec<String>>,
10173    ///Property: The language of the translated text
10174    #[serde(skip_serializing_if = "Option::is_none")]
10175    #[cfg_attr(
10176        feature = "builder",
10177        builder(with = |value:impl Into<String>|vec![value.into()])
10178    )]
10179    pub translated_language: Option<Vec<String>>,
10180    ///Property: Translated version of the body text
10181    #[serde(skip_serializing_if = "Option::is_none")]
10182    #[cfg_attr(
10183        feature = "builder",
10184        builder(with = |value:impl Into<String>|vec![value.into()])
10185    )]
10186    pub translated_text: Option<Vec<String>>,
10187    ///Property: Weak alias
10188    #[serde(skip_serializing_if = "Option::is_none")]
10189    #[cfg_attr(
10190        feature = "builder",
10191        builder(with = |value:impl Into<String>|vec![value.into()])
10192    )]
10193    pub weak_alias: Option<Vec<String>>,
10194    ///Property: Wikidata ID
10195    #[serde(skip_serializing_if = "Option::is_none")]
10196    #[cfg_attr(
10197        feature = "builder",
10198        builder(with = |value:impl Into<String>|vec![value.into()])
10199    )]
10200    pub wikidata_id: Option<Vec<String>>,
10201    ///Property: Wikipedia Article
10202    #[serde(skip_serializing_if = "Option::is_none")]
10203    #[cfg_attr(
10204        feature = "builder",
10205        builder(with = |value:impl Into<String>|vec![value.into()])
10206    )]
10207    pub wikipedia_url: Option<Vec<String>>,
10208}
10209impl Image {
10210    /// Create a new entity with the given ID
10211    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
10212    pub fn new(id: impl Into<String>) -> Self {
10213        Self {
10214            id: id.into(),
10215            schema: "Image".to_string(),
10216            address: None,
10217            address_entity: None,
10218            aleph_url: None,
10219            alias: None,
10220            ancestors: None,
10221            author: None,
10222            authored_at: None,
10223            body_text: None,
10224            companies_mentioned: None,
10225            content_hash: None,
10226            country: None,
10227            crawler: None,
10228            created_at: None,
10229            credit: None,
10230            date: None,
10231            description: None,
10232            detected_country: None,
10233            detected_language: None,
10234            email_mentioned: None,
10235            encoding: None,
10236            extension: None,
10237            file_name: Vec::new(),
10238            file_size: None,
10239            generator: None,
10240            iban_mentioned: None,
10241            index_text: None,
10242            ip_mentioned: None,
10243            keywords: None,
10244            language: None,
10245            location_mentioned: None,
10246            message_id: None,
10247            mime_type: None,
10248            modified_at: None,
10249            name: Vec::new(),
10250            names_mentioned: None,
10251            notes: None,
10252            parent: None,
10253            people_mentioned: None,
10254            phone_mentioned: None,
10255            pictured: None,
10256            previous_name: None,
10257            processed_at: None,
10258            processing_agent: None,
10259            processing_error: None,
10260            processing_status: None,
10261            program: None,
10262            program_id: None,
10263            proof: None,
10264            published_at: None,
10265            publisher: None,
10266            publisher_url: None,
10267            retrieved_at: None,
10268            source_url: None,
10269            summary: None,
10270            title: None,
10271            topics: None,
10272            translated_language: None,
10273            translated_text: None,
10274            weak_alias: None,
10275            wikidata_id: None,
10276            wikipedia_url: None,
10277        }
10278    }
10279    /// Get the schema name
10280    pub fn schema_name() -> &'static str {
10281        "Image"
10282    }
10283    /// Serialize to standard FTM nested JSON format
10284    ///
10285    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
10286    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
10287        let mut value = serde_json::to_value(self)?;
10288        if let Some(obj) = value.as_object_mut() {
10289            let id = obj.remove("id");
10290            let schema = obj.remove("schema");
10291            let properties = serde_json::Value::Object(std::mem::take(obj));
10292            if let Some(id) = id {
10293                obj.insert("id".into(), id);
10294            }
10295            if let Some(schema) = schema {
10296                obj.insert("schema".into(), schema);
10297            }
10298            obj.insert("properties".into(), properties);
10299        }
10300        serde_json::to_string(&value)
10301    }
10302}
10303///FTM Schema: Legal entity
10304#[derive(Debug, Clone, Serialize, Deserialize)]
10305#[cfg_attr(feature = "builder", derive(Builder))]
10306#[serde(rename_all = "camelCase")]
10307pub struct LegalEntity {
10308    pub id: String,
10309    #[cfg_attr(feature = "builder", builder(default = "LegalEntity".to_string()))]
10310    pub schema: String,
10311    ///Property: Abbreviation
10312    #[serde(skip_serializing_if = "Option::is_none")]
10313    #[cfg_attr(
10314        feature = "builder",
10315        builder(with = |value:impl Into<String>|vec![value.into()])
10316    )]
10317    pub abbreviation: Option<Vec<String>>,
10318    ///Property: Address
10319    #[serde(skip_serializing_if = "Option::is_none")]
10320    #[cfg_attr(
10321        feature = "builder",
10322        builder(with = |value:impl Into<String>|vec![value.into()])
10323    )]
10324    pub address: Option<Vec<String>>,
10325    ///Property: Address
10326    #[serde(skip_serializing_if = "Option::is_none")]
10327    #[cfg_attr(
10328        feature = "builder",
10329        builder(with = |value:impl Into<String>|vec![value.into()])
10330    )]
10331    pub address_entity: Option<Vec<String>>,
10332    ///Property: Aleph URL
10333    #[serde(skip_serializing_if = "Option::is_none")]
10334    #[cfg_attr(
10335        feature = "builder",
10336        builder(with = |value:impl Into<String>|vec![value.into()])
10337    )]
10338    pub aleph_url: Option<Vec<String>>,
10339    ///Property: Alias
10340    #[serde(skip_serializing_if = "Option::is_none")]
10341    #[cfg_attr(
10342        feature = "builder",
10343        builder(with = |value:impl Into<String>|vec![value.into()])
10344    )]
10345    pub alias: Option<Vec<String>>,
10346    ///Property: BrightQuery ID
10347    #[serde(skip_serializing_if = "Option::is_none")]
10348    #[cfg_attr(
10349        feature = "builder",
10350        builder(with = |value:impl Into<String>|vec![value.into()])
10351    )]
10352    pub bright_query_id: Option<Vec<String>>,
10353    ///Property: BrightQuery Organization ID
10354    #[serde(skip_serializing_if = "Option::is_none")]
10355    #[cfg_attr(
10356        feature = "builder",
10357        builder(with = |value:impl Into<String>|vec![value.into()])
10358    )]
10359    pub bright_query_org_id: Option<Vec<String>>,
10360    ///Property: Bureau van Dijk ID
10361    #[serde(skip_serializing_if = "Option::is_none")]
10362    #[cfg_attr(
10363        feature = "builder",
10364        builder(with = |value:impl Into<String>|vec![value.into()])
10365    )]
10366    pub bvd_id: Option<Vec<String>>,
10367    ///Property: Classification
10368    #[serde(skip_serializing_if = "Option::is_none")]
10369    #[cfg_attr(
10370        feature = "builder",
10371        builder(with = |value:impl Into<String>|vec![value.into()])
10372    )]
10373    pub classification: Option<Vec<String>>,
10374    ///Property: Country
10375    #[serde(skip_serializing_if = "Option::is_none")]
10376    #[cfg_attr(
10377        feature = "builder",
10378        builder(with = |value:impl Into<String>|vec![value.into()])
10379    )]
10380    pub country: Option<Vec<String>>,
10381    ///Property: Created at
10382    #[serde(skip_serializing_if = "Option::is_none")]
10383    #[cfg_attr(
10384        feature = "builder",
10385        builder(with = |value:impl Into<String>|vec![value.into()])
10386    )]
10387    pub created_at: Option<Vec<String>>,
10388    ///Property: Description
10389    #[serde(skip_serializing_if = "Option::is_none")]
10390    #[cfg_attr(
10391        feature = "builder",
10392        builder(with = |value:impl Into<String>|vec![value.into()])
10393    )]
10394    pub description: Option<Vec<String>>,
10395    ///Property: Dissolution date
10396    #[serde(skip_serializing_if = "Option::is_none")]
10397    #[cfg_attr(
10398        feature = "builder",
10399        builder(with = |value:impl Into<String>|vec![value.into()])
10400    )]
10401    pub dissolution_date: Option<Vec<String>>,
10402    ///Property: DUNS
10403    #[serde(skip_serializing_if = "Option::is_none")]
10404    #[cfg_attr(
10405        feature = "builder",
10406        builder(with = |value:impl Into<String>|vec![value.into()])
10407    )]
10408    pub duns_code: Option<Vec<String>>,
10409    ///Property: Email
10410    #[serde(skip_serializing_if = "Option::is_none")]
10411    #[cfg_attr(
10412        feature = "builder",
10413        builder(with = |value:impl Into<String>|vec![value.into()])
10414    )]
10415    pub email: Option<Vec<String>>,
10416    ///Property: ICIJ ID
10417    #[serde(skip_serializing_if = "Option::is_none")]
10418    #[cfg_attr(
10419        feature = "builder",
10420        builder(with = |value:impl Into<String>|vec![value.into()])
10421    )]
10422    pub icij_id: Option<Vec<String>>,
10423    ///Property: ID Number
10424    #[serde(skip_serializing_if = "Option::is_none")]
10425    #[cfg_attr(
10426        feature = "builder",
10427        builder(with = |value:impl Into<String>|vec![value.into()])
10428    )]
10429    pub id_number: Option<Vec<String>>,
10430    ///Property: Incorporation date
10431    #[serde(skip_serializing_if = "Option::is_none")]
10432    #[cfg_attr(
10433        feature = "builder",
10434        builder(with = |value:impl Into<String>|vec![value.into()])
10435    )]
10436    pub incorporation_date: Option<Vec<String>>,
10437    ///Property: Index text
10438    #[serde(skip_serializing_if = "Option::is_none")]
10439    #[cfg_attr(
10440        feature = "builder",
10441        builder(with = |value:impl Into<String>|vec![value.into()])
10442    )]
10443    pub index_text: Option<Vec<String>>,
10444    ///Property: INN
10445    #[serde(skip_serializing_if = "Option::is_none")]
10446    #[cfg_attr(
10447        feature = "builder",
10448        builder(with = |value:impl Into<String>|vec![value.into()])
10449    )]
10450    pub inn_code: Option<Vec<String>>,
10451    ///Property: Jurisdiction
10452    #[serde(skip_serializing_if = "Option::is_none")]
10453    #[cfg_attr(
10454        feature = "builder",
10455        builder(with = |value:impl Into<String>|vec![value.into()])
10456    )]
10457    pub jurisdiction: Option<Vec<String>>,
10458    ///Property: Keywords
10459    #[serde(skip_serializing_if = "Option::is_none")]
10460    #[cfg_attr(
10461        feature = "builder",
10462        builder(with = |value:impl Into<String>|vec![value.into()])
10463    )]
10464    pub keywords: Option<Vec<String>>,
10465    ///Property: Legal form
10466    #[serde(skip_serializing_if = "Option::is_none")]
10467    #[cfg_attr(
10468        feature = "builder",
10469        builder(with = |value:impl Into<String>|vec![value.into()])
10470    )]
10471    pub legal_form: Option<Vec<String>>,
10472    ///Property: LEI
10473    #[serde(skip_serializing_if = "Option::is_none")]
10474    #[cfg_attr(
10475        feature = "builder",
10476        builder(with = |value:impl Into<String>|vec![value.into()])
10477    )]
10478    pub lei_code: Option<Vec<String>>,
10479    ///Property: License Number
10480    #[serde(skip_serializing_if = "Option::is_none")]
10481    #[cfg_attr(
10482        feature = "builder",
10483        builder(with = |value:impl Into<String>|vec![value.into()])
10484    )]
10485    pub license_number: Option<Vec<String>>,
10486    ///Property: Country of origin
10487    #[serde(skip_serializing_if = "Option::is_none")]
10488    #[cfg_attr(
10489        feature = "builder",
10490        builder(with = |value:impl Into<String>|vec![value.into()])
10491    )]
10492    pub main_country: Option<Vec<String>>,
10493    ///Property: Modified on
10494    #[serde(skip_serializing_if = "Option::is_none")]
10495    #[cfg_attr(
10496        feature = "builder",
10497        builder(with = |value:impl Into<String>|vec![value.into()])
10498    )]
10499    pub modified_at: Option<Vec<String>>,
10500    ///Property: Name
10501    #[serde(default)]
10502    #[cfg_attr(
10503        feature = "builder",
10504        builder(with = |value:impl Into<String>|vec![value.into()])
10505    )]
10506    pub name: Vec<String>,
10507    ///Property: Notes
10508    #[serde(skip_serializing_if = "Option::is_none")]
10509    #[cfg_attr(
10510        feature = "builder",
10511        builder(with = |value:impl Into<String>|vec![value.into()])
10512    )]
10513    pub notes: Option<Vec<String>>,
10514    ///Property: NPI
10515    #[serde(skip_serializing_if = "Option::is_none")]
10516    #[cfg_attr(
10517        feature = "builder",
10518        builder(with = |value:impl Into<String>|vec![value.into()])
10519    )]
10520    pub npi_code: Option<Vec<String>>,
10521    ///Property: OGRN
10522    #[serde(skip_serializing_if = "Option::is_none")]
10523    #[cfg_attr(
10524        feature = "builder",
10525        builder(with = |value:impl Into<String>|vec![value.into()])
10526    )]
10527    pub ogrn_code: Option<Vec<String>>,
10528    ///Property: OKPO
10529    #[serde(skip_serializing_if = "Option::is_none")]
10530    #[cfg_attr(
10531        feature = "builder",
10532        builder(with = |value:impl Into<String>|vec![value.into()])
10533    )]
10534    pub okpo_code: Option<Vec<String>>,
10535    ///Property: OpenCorporates URL
10536    #[serde(skip_serializing_if = "Option::is_none")]
10537    #[cfg_attr(
10538        feature = "builder",
10539        builder(with = |value:impl Into<String>|vec![value.into()])
10540    )]
10541    pub opencorporates_url: Option<Vec<String>>,
10542    ///Property: Parent company
10543    #[serde(skip_serializing_if = "Option::is_none")]
10544    #[cfg_attr(
10545        feature = "builder",
10546        builder(with = |value:impl Into<String>|vec![value.into()])
10547    )]
10548    pub parent: Option<Vec<String>>,
10549    ///Property: Phone
10550    #[serde(skip_serializing_if = "Option::is_none")]
10551    #[cfg_attr(
10552        feature = "builder",
10553        builder(with = |value:impl Into<String>|vec![value.into()])
10554    )]
10555    pub phone: Option<Vec<String>>,
10556    ///Property: Previous name
10557    #[serde(skip_serializing_if = "Option::is_none")]
10558    #[cfg_attr(
10559        feature = "builder",
10560        builder(with = |value:impl Into<String>|vec![value.into()])
10561    )]
10562    pub previous_name: Option<Vec<String>>,
10563    ///Property: Program
10564    #[serde(skip_serializing_if = "Option::is_none")]
10565    #[cfg_attr(
10566        feature = "builder",
10567        builder(with = |value:impl Into<String>|vec![value.into()])
10568    )]
10569    pub program: Option<Vec<String>>,
10570    ///Property: Program ID
10571    #[serde(skip_serializing_if = "Option::is_none")]
10572    #[cfg_attr(
10573        feature = "builder",
10574        builder(with = |value:impl Into<String>|vec![value.into()])
10575    )]
10576    pub program_id: Option<Vec<String>>,
10577    ///Property: Source document
10578    #[serde(skip_serializing_if = "Option::is_none")]
10579    #[cfg_attr(
10580        feature = "builder",
10581        builder(with = |value:impl Into<String>|vec![value.into()])
10582    )]
10583    pub proof: Option<Vec<String>>,
10584    ///Property: Publishing source
10585    #[serde(skip_serializing_if = "Option::is_none")]
10586    #[cfg_attr(
10587        feature = "builder",
10588        builder(with = |value:impl Into<String>|vec![value.into()])
10589    )]
10590    pub publisher: Option<Vec<String>>,
10591    ///Property: Publishing source URL
10592    #[serde(skip_serializing_if = "Option::is_none")]
10593    #[cfg_attr(
10594        feature = "builder",
10595        builder(with = |value:impl Into<String>|vec![value.into()])
10596    )]
10597    pub publisher_url: Option<Vec<String>>,
10598    ///Property: Registration number
10599    #[serde(skip_serializing_if = "Option::is_none")]
10600    #[cfg_attr(
10601        feature = "builder",
10602        builder(with = |value:impl Into<String>|vec![value.into()])
10603    )]
10604    pub registration_number: Option<Vec<String>>,
10605    ///Property: Retrieved on
10606    #[serde(skip_serializing_if = "Option::is_none")]
10607    #[cfg_attr(
10608        feature = "builder",
10609        builder(with = |value:impl Into<String>|vec![value.into()])
10610    )]
10611    pub retrieved_at: Option<Vec<String>>,
10612    ///Property: Sayari Entity ID
10613    #[serde(skip_serializing_if = "Option::is_none")]
10614    #[cfg_attr(
10615        feature = "builder",
10616        builder(with = |value:impl Into<String>|vec![value.into()])
10617    )]
10618    pub sayari_id: Option<Vec<String>>,
10619    ///Property: Sector
10620    #[serde(skip_serializing_if = "Option::is_none")]
10621    #[cfg_attr(
10622        feature = "builder",
10623        builder(with = |value:impl Into<String>|vec![value.into()])
10624    )]
10625    pub sector: Option<Vec<String>>,
10626    ///Property: Source link
10627    #[serde(skip_serializing_if = "Option::is_none")]
10628    #[cfg_attr(
10629        feature = "builder",
10630        builder(with = |value:impl Into<String>|vec![value.into()])
10631    )]
10632    pub source_url: Option<Vec<String>>,
10633    ///Property: Status
10634    #[serde(skip_serializing_if = "Option::is_none")]
10635    #[cfg_attr(
10636        feature = "builder",
10637        builder(with = |value:impl Into<String>|vec![value.into()])
10638    )]
10639    pub status: Option<Vec<String>>,
10640    ///Property: Summary
10641    #[serde(skip_serializing_if = "Option::is_none")]
10642    #[cfg_attr(
10643        feature = "builder",
10644        builder(with = |value:impl Into<String>|vec![value.into()])
10645    )]
10646    pub summary: Option<Vec<String>>,
10647    ///Property: SWIFT/BIC
10648    #[serde(skip_serializing_if = "Option::is_none")]
10649    #[cfg_attr(
10650        feature = "builder",
10651        builder(with = |value:impl Into<String>|vec![value.into()])
10652    )]
10653    pub swift_bic: Option<Vec<String>>,
10654    ///Property: Tax Number
10655    #[serde(skip_serializing_if = "Option::is_none")]
10656    #[cfg_attr(
10657        feature = "builder",
10658        builder(with = |value:impl Into<String>|vec![value.into()])
10659    )]
10660    pub tax_number: Option<Vec<String>>,
10661    ///Property: Tax status
10662    #[serde(skip_serializing_if = "Option::is_none")]
10663    #[cfg_attr(
10664        feature = "builder",
10665        builder(with = |value:impl Into<String>|vec![value.into()])
10666    )]
10667    pub tax_status: Option<Vec<String>>,
10668    ///Property: Topics
10669    #[serde(skip_serializing_if = "Option::is_none")]
10670    #[cfg_attr(
10671        feature = "builder",
10672        builder(with = |value:impl Into<String>|vec![value.into()])
10673    )]
10674    pub topics: Option<Vec<String>>,
10675    ///Property: Unique Entity ID
10676    #[serde(skip_serializing_if = "Option::is_none")]
10677    #[cfg_attr(
10678        feature = "builder",
10679        builder(with = |value:impl Into<String>|vec![value.into()])
10680    )]
10681    pub unique_entity_id: Option<Vec<String>>,
10682    ///Property: USCC
10683    #[serde(skip_serializing_if = "Option::is_none")]
10684    #[cfg_attr(
10685        feature = "builder",
10686        builder(with = |value:impl Into<String>|vec![value.into()])
10687    )]
10688    pub usc_code: Option<Vec<String>>,
10689    ///Property: V.A.T. Identifier
10690    #[serde(skip_serializing_if = "Option::is_none")]
10691    #[cfg_attr(
10692        feature = "builder",
10693        builder(with = |value:impl Into<String>|vec![value.into()])
10694    )]
10695    pub vat_code: Option<Vec<String>>,
10696    ///Property: Weak alias
10697    #[serde(skip_serializing_if = "Option::is_none")]
10698    #[cfg_attr(
10699        feature = "builder",
10700        builder(with = |value:impl Into<String>|vec![value.into()])
10701    )]
10702    pub weak_alias: Option<Vec<String>>,
10703    ///Property: Website
10704    #[serde(skip_serializing_if = "Option::is_none")]
10705    #[cfg_attr(
10706        feature = "builder",
10707        builder(with = |value:impl Into<String>|vec![value.into()])
10708    )]
10709    pub website: Option<Vec<String>>,
10710    ///Property: Wikidata ID
10711    #[serde(skip_serializing_if = "Option::is_none")]
10712    #[cfg_attr(
10713        feature = "builder",
10714        builder(with = |value:impl Into<String>|vec![value.into()])
10715    )]
10716    pub wikidata_id: Option<Vec<String>>,
10717    ///Property: Wikipedia Article
10718    #[serde(skip_serializing_if = "Option::is_none")]
10719    #[cfg_attr(
10720        feature = "builder",
10721        builder(with = |value:impl Into<String>|vec![value.into()])
10722    )]
10723    pub wikipedia_url: Option<Vec<String>>,
10724}
10725impl LegalEntity {
10726    /// Create a new entity with the given ID
10727    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
10728    pub fn new(id: impl Into<String>) -> Self {
10729        Self {
10730            id: id.into(),
10731            schema: "LegalEntity".to_string(),
10732            abbreviation: None,
10733            address: None,
10734            address_entity: None,
10735            aleph_url: None,
10736            alias: None,
10737            bright_query_id: None,
10738            bright_query_org_id: None,
10739            bvd_id: None,
10740            classification: None,
10741            country: None,
10742            created_at: None,
10743            description: None,
10744            dissolution_date: None,
10745            duns_code: None,
10746            email: None,
10747            icij_id: None,
10748            id_number: None,
10749            incorporation_date: None,
10750            index_text: None,
10751            inn_code: None,
10752            jurisdiction: None,
10753            keywords: None,
10754            legal_form: None,
10755            lei_code: None,
10756            license_number: None,
10757            main_country: None,
10758            modified_at: None,
10759            name: Vec::new(),
10760            notes: None,
10761            npi_code: None,
10762            ogrn_code: None,
10763            okpo_code: None,
10764            opencorporates_url: None,
10765            parent: None,
10766            phone: None,
10767            previous_name: None,
10768            program: None,
10769            program_id: None,
10770            proof: None,
10771            publisher: None,
10772            publisher_url: None,
10773            registration_number: None,
10774            retrieved_at: None,
10775            sayari_id: None,
10776            sector: None,
10777            source_url: None,
10778            status: None,
10779            summary: None,
10780            swift_bic: None,
10781            tax_number: None,
10782            tax_status: None,
10783            topics: None,
10784            unique_entity_id: None,
10785            usc_code: None,
10786            vat_code: None,
10787            weak_alias: None,
10788            website: None,
10789            wikidata_id: None,
10790            wikipedia_url: None,
10791        }
10792    }
10793    /// Get the schema name
10794    pub fn schema_name() -> &'static str {
10795        "LegalEntity"
10796    }
10797    /// Serialize to standard FTM nested JSON format
10798    ///
10799    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
10800    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
10801        let mut value = serde_json::to_value(self)?;
10802        if let Some(obj) = value.as_object_mut() {
10803            let id = obj.remove("id");
10804            let schema = obj.remove("schema");
10805            let properties = serde_json::Value::Object(std::mem::take(obj));
10806            if let Some(id) = id {
10807                obj.insert("id".into(), id);
10808            }
10809            if let Some(schema) = schema {
10810                obj.insert("schema".into(), schema);
10811            }
10812            obj.insert("properties".into(), properties);
10813        }
10814        serde_json::to_string(&value)
10815    }
10816}
10817///FTM Schema: License
10818#[derive(Debug, Clone, Serialize, Deserialize)]
10819#[cfg_attr(feature = "builder", derive(Builder))]
10820#[serde(rename_all = "camelCase")]
10821pub struct License {
10822    pub id: String,
10823    #[cfg_attr(feature = "builder", builder(default = "License".to_string()))]
10824    pub schema: String,
10825    ///Property: Address
10826    #[serde(skip_serializing_if = "Option::is_none")]
10827    #[cfg_attr(
10828        feature = "builder",
10829        builder(with = |value:impl Into<String>|vec![value.into()])
10830    )]
10831    pub address: Option<Vec<String>>,
10832    ///Property: Address
10833    #[serde(skip_serializing_if = "Option::is_none")]
10834    #[cfg_attr(
10835        feature = "builder",
10836        builder(with = |value:impl Into<String>|vec![value.into()])
10837    )]
10838    pub address_entity: Option<Vec<String>>,
10839    ///Property: Aleph URL
10840    #[serde(skip_serializing_if = "Option::is_none")]
10841    #[cfg_attr(
10842        feature = "builder",
10843        builder(with = |value:impl Into<String>|vec![value.into()])
10844    )]
10845    pub aleph_url: Option<Vec<String>>,
10846    ///Property: Alias
10847    #[serde(skip_serializing_if = "Option::is_none")]
10848    #[cfg_attr(
10849        feature = "builder",
10850        builder(with = |value:impl Into<String>|vec![value.into()])
10851    )]
10852    pub alias: Option<Vec<String>>,
10853    ///Property: Amount
10854    #[serde(
10855        skip_serializing_if = "Option::is_none",
10856        deserialize_with = "deserialize_opt_f64_vec",
10857        default
10858    )]
10859    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
10860    pub amount: Option<Vec<f64>>,
10861    ///Property: Amount in EUR
10862    #[serde(
10863        skip_serializing_if = "Option::is_none",
10864        deserialize_with = "deserialize_opt_f64_vec",
10865        default
10866    )]
10867    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
10868    pub amount_eur: Option<Vec<f64>>,
10869    ///Property: Amount in USD
10870    #[serde(
10871        skip_serializing_if = "Option::is_none",
10872        deserialize_with = "deserialize_opt_f64_vec",
10873        default
10874    )]
10875    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
10876    pub amount_usd: Option<Vec<f64>>,
10877    ///Property: Area
10878    #[serde(
10879        skip_serializing_if = "Option::is_none",
10880        deserialize_with = "deserialize_opt_f64_vec",
10881        default
10882    )]
10883    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
10884    pub area: Option<Vec<f64>>,
10885    ///Property: Contract authority
10886    #[serde(default)]
10887    #[cfg_attr(
10888        feature = "builder",
10889        builder(with = |value:impl Into<String>|vec![value.into()])
10890    )]
10891    pub authority: Vec<String>,
10892    ///Property: Cancelled?
10893    #[serde(skip_serializing_if = "Option::is_none")]
10894    #[cfg_attr(
10895        feature = "builder",
10896        builder(with = |value:impl Into<String>|vec![value.into()])
10897    )]
10898    pub cancelled: Option<Vec<String>>,
10899    ///Property: Classification
10900    #[serde(skip_serializing_if = "Option::is_none")]
10901    #[cfg_attr(
10902        feature = "builder",
10903        builder(with = |value:impl Into<String>|vec![value.into()])
10904    )]
10905    pub classification: Option<Vec<String>>,
10906    ///Property: Commodities
10907    #[serde(skip_serializing_if = "Option::is_none")]
10908    #[cfg_attr(
10909        feature = "builder",
10910        builder(with = |value:impl Into<String>|vec![value.into()])
10911    )]
10912    pub commodities: Option<Vec<String>>,
10913    ///Property: Contract date
10914    #[serde(skip_serializing_if = "Option::is_none")]
10915    #[cfg_attr(
10916        feature = "builder",
10917        builder(with = |value:impl Into<String>|vec![value.into()])
10918    )]
10919    pub contract_date: Option<Vec<String>>,
10920    ///Property: Country
10921    #[serde(skip_serializing_if = "Option::is_none")]
10922    #[cfg_attr(
10923        feature = "builder",
10924        builder(with = |value:impl Into<String>|vec![value.into()])
10925    )]
10926    pub country: Option<Vec<String>>,
10927    ///Property: Created at
10928    #[serde(skip_serializing_if = "Option::is_none")]
10929    #[cfg_attr(
10930        feature = "builder",
10931        builder(with = |value:impl Into<String>|vec![value.into()])
10932    )]
10933    pub created_at: Option<Vec<String>>,
10934    ///Property: Contract award criteria
10935    #[serde(skip_serializing_if = "Option::is_none")]
10936    #[cfg_attr(
10937        feature = "builder",
10938        builder(with = |value:impl Into<String>|vec![value.into()])
10939    )]
10940    pub criteria: Option<Vec<String>>,
10941    ///Property: Currency
10942    #[serde(skip_serializing_if = "Option::is_none")]
10943    #[cfg_attr(
10944        feature = "builder",
10945        builder(with = |value:impl Into<String>|vec![value.into()])
10946    )]
10947    pub currency: Option<Vec<String>>,
10948    ///Property: Description
10949    #[serde(skip_serializing_if = "Option::is_none")]
10950    #[cfg_attr(
10951        feature = "builder",
10952        builder(with = |value:impl Into<String>|vec![value.into()])
10953    )]
10954    pub description: Option<Vec<String>>,
10955    ///Property: Index text
10956    #[serde(skip_serializing_if = "Option::is_none")]
10957    #[cfg_attr(
10958        feature = "builder",
10959        builder(with = |value:impl Into<String>|vec![value.into()])
10960    )]
10961    pub index_text: Option<Vec<String>>,
10962    ///Property: Keywords
10963    #[serde(skip_serializing_if = "Option::is_none")]
10964    #[cfg_attr(
10965        feature = "builder",
10966        builder(with = |value:impl Into<String>|vec![value.into()])
10967    )]
10968    pub keywords: Option<Vec<String>>,
10969    ///Property: Language
10970    #[serde(skip_serializing_if = "Option::is_none")]
10971    #[cfg_attr(
10972        feature = "builder",
10973        builder(with = |value:impl Into<String>|vec![value.into()])
10974    )]
10975    pub language: Option<Vec<String>>,
10976    ///Property: Procurement method
10977    #[serde(skip_serializing_if = "Option::is_none")]
10978    #[cfg_attr(
10979        feature = "builder",
10980        builder(with = |value:impl Into<String>|vec![value.into()])
10981    )]
10982    pub method: Option<Vec<String>>,
10983    ///Property: Modified on
10984    #[serde(skip_serializing_if = "Option::is_none")]
10985    #[cfg_attr(
10986        feature = "builder",
10987        builder(with = |value:impl Into<String>|vec![value.into()])
10988    )]
10989    pub modified_at: Option<Vec<String>>,
10990    ///Property: Name
10991    #[serde(default)]
10992    #[cfg_attr(
10993        feature = "builder",
10994        builder(with = |value:impl Into<String>|vec![value.into()])
10995    )]
10996    pub name: Vec<String>,
10997    ///Property: Notes
10998    #[serde(skip_serializing_if = "Option::is_none")]
10999    #[cfg_attr(
11000        feature = "builder",
11001        builder(with = |value:impl Into<String>|vec![value.into()])
11002    )]
11003    pub notes: Option<Vec<String>>,
11004    ///Property: Contract Award Notice ID
11005    #[serde(skip_serializing_if = "Option::is_none")]
11006    #[cfg_attr(
11007        feature = "builder",
11008        builder(with = |value:impl Into<String>|vec![value.into()])
11009    )]
11010    pub notice_id: Option<Vec<String>>,
11011    ///Property: Number of awards
11012    #[serde(skip_serializing_if = "Option::is_none")]
11013    #[cfg_attr(
11014        feature = "builder",
11015        builder(with = |value:impl Into<String>|vec![value.into()])
11016    )]
11017    pub number_awards: Option<Vec<String>>,
11018    ///Property: Previous name
11019    #[serde(skip_serializing_if = "Option::is_none")]
11020    #[cfg_attr(
11021        feature = "builder",
11022        builder(with = |value:impl Into<String>|vec![value.into()])
11023    )]
11024    pub previous_name: Option<Vec<String>>,
11025    ///Property: Contract procedure
11026    #[serde(skip_serializing_if = "Option::is_none")]
11027    #[cfg_attr(
11028        feature = "builder",
11029        builder(with = |value:impl Into<String>|vec![value.into()])
11030    )]
11031    pub procedure: Option<Vec<String>>,
11032    ///Property: Procedure number
11033    #[serde(skip_serializing_if = "Option::is_none")]
11034    #[cfg_attr(
11035        feature = "builder",
11036        builder(with = |value:impl Into<String>|vec![value.into()])
11037    )]
11038    pub procedure_number: Option<Vec<String>>,
11039    ///Property: Program
11040    #[serde(skip_serializing_if = "Option::is_none")]
11041    #[cfg_attr(
11042        feature = "builder",
11043        builder(with = |value:impl Into<String>|vec![value.into()])
11044    )]
11045    pub program: Option<Vec<String>>,
11046    ///Property: Program ID
11047    #[serde(skip_serializing_if = "Option::is_none")]
11048    #[cfg_attr(
11049        feature = "builder",
11050        builder(with = |value:impl Into<String>|vec![value.into()])
11051    )]
11052    pub program_id: Option<Vec<String>>,
11053    ///Property: Project
11054    #[serde(skip_serializing_if = "Option::is_none")]
11055    #[cfg_attr(
11056        feature = "builder",
11057        builder(with = |value:impl Into<String>|vec![value.into()])
11058    )]
11059    pub project: Option<Vec<String>>,
11060    ///Property: Source document
11061    #[serde(skip_serializing_if = "Option::is_none")]
11062    #[cfg_attr(
11063        feature = "builder",
11064        builder(with = |value:impl Into<String>|vec![value.into()])
11065    )]
11066    pub proof: Option<Vec<String>>,
11067    ///Property: Publishing source
11068    #[serde(skip_serializing_if = "Option::is_none")]
11069    #[cfg_attr(
11070        feature = "builder",
11071        builder(with = |value:impl Into<String>|vec![value.into()])
11072    )]
11073    pub publisher: Option<Vec<String>>,
11074    ///Property: Publishing source URL
11075    #[serde(skip_serializing_if = "Option::is_none")]
11076    #[cfg_attr(
11077        feature = "builder",
11078        builder(with = |value:impl Into<String>|vec![value.into()])
11079    )]
11080    pub publisher_url: Option<Vec<String>>,
11081    ///Property: Retrieved on
11082    #[serde(skip_serializing_if = "Option::is_none")]
11083    #[cfg_attr(
11084        feature = "builder",
11085        builder(with = |value:impl Into<String>|vec![value.into()])
11086    )]
11087    pub retrieved_at: Option<Vec<String>>,
11088    ///Property: License review date
11089    #[serde(skip_serializing_if = "Option::is_none")]
11090    #[cfg_attr(
11091        feature = "builder",
11092        builder(with = |value:impl Into<String>|vec![value.into()])
11093    )]
11094    pub review_date: Option<Vec<String>>,
11095    ///Property: Source link
11096    #[serde(skip_serializing_if = "Option::is_none")]
11097    #[cfg_attr(
11098        feature = "builder",
11099        builder(with = |value:impl Into<String>|vec![value.into()])
11100    )]
11101    pub source_url: Option<Vec<String>>,
11102    ///Property: Status
11103    #[serde(skip_serializing_if = "Option::is_none")]
11104    #[cfg_attr(
11105        feature = "builder",
11106        builder(with = |value:impl Into<String>|vec![value.into()])
11107    )]
11108    pub status: Option<Vec<String>>,
11109    ///Property: Summary
11110    #[serde(skip_serializing_if = "Option::is_none")]
11111    #[cfg_attr(
11112        feature = "builder",
11113        builder(with = |value:impl Into<String>|vec![value.into()])
11114    )]
11115    pub summary: Option<Vec<String>>,
11116    ///Property: Title
11117    #[serde(default)]
11118    #[cfg_attr(
11119        feature = "builder",
11120        builder(with = |value:impl Into<String>|vec![value.into()])
11121    )]
11122    pub title: Vec<String>,
11123    ///Property: Topics
11124    #[serde(skip_serializing_if = "Option::is_none")]
11125    #[cfg_attr(
11126        feature = "builder",
11127        builder(with = |value:impl Into<String>|vec![value.into()])
11128    )]
11129    pub topics: Option<Vec<String>>,
11130    ///Property: Type
11131    #[serde(skip_serializing_if = "Option::is_none")]
11132    #[cfg_attr(
11133        feature = "builder",
11134        builder(with = |value:impl Into<String>|vec![value.into()])
11135    )]
11136    pub type_: Option<Vec<String>>,
11137    ///Property: Weak alias
11138    #[serde(skip_serializing_if = "Option::is_none")]
11139    #[cfg_attr(
11140        feature = "builder",
11141        builder(with = |value:impl Into<String>|vec![value.into()])
11142    )]
11143    pub weak_alias: Option<Vec<String>>,
11144    ///Property: Wikidata ID
11145    #[serde(skip_serializing_if = "Option::is_none")]
11146    #[cfg_attr(
11147        feature = "builder",
11148        builder(with = |value:impl Into<String>|vec![value.into()])
11149    )]
11150    pub wikidata_id: Option<Vec<String>>,
11151    ///Property: Wikipedia Article
11152    #[serde(skip_serializing_if = "Option::is_none")]
11153    #[cfg_attr(
11154        feature = "builder",
11155        builder(with = |value:impl Into<String>|vec![value.into()])
11156    )]
11157    pub wikipedia_url: Option<Vec<String>>,
11158}
11159impl License {
11160    /// Create a new entity with the given ID
11161    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
11162    pub fn new(id: impl Into<String>) -> Self {
11163        Self {
11164            id: id.into(),
11165            schema: "License".to_string(),
11166            address: None,
11167            address_entity: None,
11168            aleph_url: None,
11169            alias: None,
11170            amount: None,
11171            amount_eur: None,
11172            amount_usd: None,
11173            area: None,
11174            authority: Vec::new(),
11175            cancelled: None,
11176            classification: None,
11177            commodities: None,
11178            contract_date: None,
11179            country: None,
11180            created_at: None,
11181            criteria: None,
11182            currency: None,
11183            description: None,
11184            index_text: None,
11185            keywords: None,
11186            language: None,
11187            method: None,
11188            modified_at: None,
11189            name: Vec::new(),
11190            notes: None,
11191            notice_id: None,
11192            number_awards: None,
11193            previous_name: None,
11194            procedure: None,
11195            procedure_number: None,
11196            program: None,
11197            program_id: None,
11198            project: None,
11199            proof: None,
11200            publisher: None,
11201            publisher_url: None,
11202            retrieved_at: None,
11203            review_date: None,
11204            source_url: None,
11205            status: None,
11206            summary: None,
11207            title: Vec::new(),
11208            topics: None,
11209            type_: None,
11210            weak_alias: None,
11211            wikidata_id: None,
11212            wikipedia_url: None,
11213        }
11214    }
11215    /// Get the schema name
11216    pub fn schema_name() -> &'static str {
11217        "License"
11218    }
11219    /// Serialize to standard FTM nested JSON format
11220    ///
11221    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
11222    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
11223        let mut value = serde_json::to_value(self)?;
11224        if let Some(obj) = value.as_object_mut() {
11225            let id = obj.remove("id");
11226            let schema = obj.remove("schema");
11227            let properties = serde_json::Value::Object(std::mem::take(obj));
11228            if let Some(id) = id {
11229                obj.insert("id".into(), id);
11230            }
11231            if let Some(schema) = schema {
11232                obj.insert("schema".into(), schema);
11233            }
11234            obj.insert("properties".into(), properties);
11235        }
11236        serde_json::to_string(&value)
11237    }
11238}
11239///FTM Schema: Membership
11240#[derive(Debug, Clone, Serialize, Deserialize)]
11241#[cfg_attr(feature = "builder", derive(Builder))]
11242#[serde(rename_all = "camelCase")]
11243pub struct Membership {
11244    pub id: String,
11245    #[cfg_attr(feature = "builder", builder(default = "Membership".to_string()))]
11246    pub schema: String,
11247    ///Property: Aleph URL
11248    #[serde(skip_serializing_if = "Option::is_none")]
11249    #[cfg_attr(
11250        feature = "builder",
11251        builder(with = |value:impl Into<String>|vec![value.into()])
11252    )]
11253    pub aleph_url: Option<Vec<String>>,
11254    ///Property: Date
11255    #[serde(skip_serializing_if = "Option::is_none")]
11256    #[cfg_attr(
11257        feature = "builder",
11258        builder(with = |value:impl Into<String>|vec![value.into()])
11259    )]
11260    pub date: Option<Vec<String>>,
11261    ///Property: Description
11262    #[serde(skip_serializing_if = "Option::is_none")]
11263    #[cfg_attr(
11264        feature = "builder",
11265        builder(with = |value:impl Into<String>|vec![value.into()])
11266    )]
11267    pub description: Option<Vec<String>>,
11268    ///Property: End date
11269    #[serde(skip_serializing_if = "Option::is_none")]
11270    #[cfg_attr(
11271        feature = "builder",
11272        builder(with = |value:impl Into<String>|vec![value.into()])
11273    )]
11274    pub end_date: Option<Vec<String>>,
11275    ///Property: Index text
11276    #[serde(skip_serializing_if = "Option::is_none")]
11277    #[cfg_attr(
11278        feature = "builder",
11279        builder(with = |value:impl Into<String>|vec![value.into()])
11280    )]
11281    pub index_text: Option<Vec<String>>,
11282    ///Property: Member
11283    #[serde(default)]
11284    #[cfg_attr(
11285        feature = "builder",
11286        builder(with = |value:impl Into<String>|vec![value.into()])
11287    )]
11288    pub member: Vec<String>,
11289    ///Property: Modified on
11290    #[serde(skip_serializing_if = "Option::is_none")]
11291    #[cfg_attr(
11292        feature = "builder",
11293        builder(with = |value:impl Into<String>|vec![value.into()])
11294    )]
11295    pub modified_at: Option<Vec<String>>,
11296    ///Property: Detected names
11297    #[serde(skip_serializing_if = "Option::is_none")]
11298    #[cfg_attr(
11299        feature = "builder",
11300        builder(with = |value:impl Into<String>|vec![value.into()])
11301    )]
11302    pub names_mentioned: Option<Vec<String>>,
11303    ///Property: Organization
11304    #[serde(default)]
11305    #[cfg_attr(
11306        feature = "builder",
11307        builder(with = |value:impl Into<String>|vec![value.into()])
11308    )]
11309    pub organization: Vec<String>,
11310    ///Property: Source document
11311    #[serde(skip_serializing_if = "Option::is_none")]
11312    #[cfg_attr(
11313        feature = "builder",
11314        builder(with = |value:impl Into<String>|vec![value.into()])
11315    )]
11316    pub proof: Option<Vec<String>>,
11317    ///Property: Publishing source
11318    #[serde(skip_serializing_if = "Option::is_none")]
11319    #[cfg_attr(
11320        feature = "builder",
11321        builder(with = |value:impl Into<String>|vec![value.into()])
11322    )]
11323    pub publisher: Option<Vec<String>>,
11324    ///Property: Publishing source URL
11325    #[serde(skip_serializing_if = "Option::is_none")]
11326    #[cfg_attr(
11327        feature = "builder",
11328        builder(with = |value:impl Into<String>|vec![value.into()])
11329    )]
11330    pub publisher_url: Option<Vec<String>>,
11331    ///Property: Record ID
11332    #[serde(skip_serializing_if = "Option::is_none")]
11333    #[cfg_attr(
11334        feature = "builder",
11335        builder(with = |value:impl Into<String>|vec![value.into()])
11336    )]
11337    pub record_id: Option<Vec<String>>,
11338    ///Property: Retrieved on
11339    #[serde(skip_serializing_if = "Option::is_none")]
11340    #[cfg_attr(
11341        feature = "builder",
11342        builder(with = |value:impl Into<String>|vec![value.into()])
11343    )]
11344    pub retrieved_at: Option<Vec<String>>,
11345    ///Property: Role
11346    #[serde(skip_serializing_if = "Option::is_none")]
11347    #[cfg_attr(
11348        feature = "builder",
11349        builder(with = |value:impl Into<String>|vec![value.into()])
11350    )]
11351    pub role: Option<Vec<String>>,
11352    ///Property: Source link
11353    #[serde(skip_serializing_if = "Option::is_none")]
11354    #[cfg_attr(
11355        feature = "builder",
11356        builder(with = |value:impl Into<String>|vec![value.into()])
11357    )]
11358    pub source_url: Option<Vec<String>>,
11359    ///Property: Start date
11360    #[serde(skip_serializing_if = "Option::is_none")]
11361    #[cfg_attr(
11362        feature = "builder",
11363        builder(with = |value:impl Into<String>|vec![value.into()])
11364    )]
11365    pub start_date: Option<Vec<String>>,
11366    ///Property: Status
11367    #[serde(skip_serializing_if = "Option::is_none")]
11368    #[cfg_attr(
11369        feature = "builder",
11370        builder(with = |value:impl Into<String>|vec![value.into()])
11371    )]
11372    pub status: Option<Vec<String>>,
11373    ///Property: Summary
11374    #[serde(skip_serializing_if = "Option::is_none")]
11375    #[cfg_attr(
11376        feature = "builder",
11377        builder(with = |value:impl Into<String>|vec![value.into()])
11378    )]
11379    pub summary: Option<Vec<String>>,
11380}
11381impl Membership {
11382    /// Create a new entity with the given ID
11383    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
11384    pub fn new(id: impl Into<String>) -> Self {
11385        Self {
11386            id: id.into(),
11387            schema: "Membership".to_string(),
11388            aleph_url: None,
11389            date: None,
11390            description: None,
11391            end_date: None,
11392            index_text: None,
11393            member: Vec::new(),
11394            modified_at: None,
11395            names_mentioned: None,
11396            organization: Vec::new(),
11397            proof: None,
11398            publisher: None,
11399            publisher_url: None,
11400            record_id: None,
11401            retrieved_at: None,
11402            role: None,
11403            source_url: None,
11404            start_date: None,
11405            status: None,
11406            summary: None,
11407        }
11408    }
11409    /// Get the schema name
11410    pub fn schema_name() -> &'static str {
11411        "Membership"
11412    }
11413    /// Serialize to standard FTM nested JSON format
11414    ///
11415    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
11416    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
11417        let mut value = serde_json::to_value(self)?;
11418        if let Some(obj) = value.as_object_mut() {
11419            let id = obj.remove("id");
11420            let schema = obj.remove("schema");
11421            let properties = serde_json::Value::Object(std::mem::take(obj));
11422            if let Some(id) = id {
11423                obj.insert("id".into(), id);
11424            }
11425            if let Some(schema) = schema {
11426                obj.insert("schema".into(), schema);
11427            }
11428            obj.insert("properties".into(), properties);
11429        }
11430        serde_json::to_string(&value)
11431    }
11432}
11433///FTM Schema: Mention
11434#[derive(Debug, Clone, Serialize, Deserialize)]
11435#[cfg_attr(feature = "builder", derive(Builder))]
11436#[serde(rename_all = "camelCase")]
11437pub struct Mention {
11438    pub id: String,
11439    #[cfg_attr(feature = "builder", builder(default = "Mention".to_string()))]
11440    pub schema: String,
11441    ///Property: Co-occurring countries
11442    #[serde(skip_serializing_if = "Option::is_none")]
11443    #[cfg_attr(
11444        feature = "builder",
11445        builder(with = |value:impl Into<String>|vec![value.into()])
11446    )]
11447    pub context_country: Option<Vec<String>>,
11448    ///Property: Co-occurring e-mail addresses
11449    #[serde(skip_serializing_if = "Option::is_none")]
11450    #[cfg_attr(
11451        feature = "builder",
11452        builder(with = |value:impl Into<String>|vec![value.into()])
11453    )]
11454    pub context_email: Option<Vec<String>>,
11455    ///Property: Co-occurring phone numbers
11456    #[serde(skip_serializing_if = "Option::is_none")]
11457    #[cfg_attr(
11458        feature = "builder",
11459        builder(with = |value:impl Into<String>|vec![value.into()])
11460    )]
11461    pub context_phone: Option<Vec<String>>,
11462    ///Property: Detected entity type
11463    #[serde(skip_serializing_if = "Option::is_none")]
11464    #[cfg_attr(
11465        feature = "builder",
11466        builder(with = |value:impl Into<String>|vec![value.into()])
11467    )]
11468    pub detected_schema: Option<Vec<String>>,
11469    ///Property: Document
11470    #[serde(default)]
11471    #[cfg_attr(
11472        feature = "builder",
11473        builder(with = |value:impl Into<String>|vec![value.into()])
11474    )]
11475    pub document: Vec<String>,
11476    ///Property: Name
11477    #[serde(default)]
11478    #[cfg_attr(
11479        feature = "builder",
11480        builder(with = |value:impl Into<String>|vec![value.into()])
11481    )]
11482    pub name: Vec<String>,
11483    ///Property: Entity
11484    #[serde(skip_serializing_if = "Option::is_none")]
11485    #[cfg_attr(
11486        feature = "builder",
11487        builder(with = |value:impl Into<String>|vec![value.into()])
11488    )]
11489    pub resolved: Option<Vec<String>>,
11490}
11491impl Mention {
11492    /// Create a new entity with the given ID
11493    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
11494    pub fn new(id: impl Into<String>) -> Self {
11495        Self {
11496            id: id.into(),
11497            schema: "Mention".to_string(),
11498            context_country: None,
11499            context_email: None,
11500            context_phone: None,
11501            detected_schema: None,
11502            document: Vec::new(),
11503            name: Vec::new(),
11504            resolved: None,
11505        }
11506    }
11507    /// Get the schema name
11508    pub fn schema_name() -> &'static str {
11509        "Mention"
11510    }
11511    /// Serialize to standard FTM nested JSON format
11512    ///
11513    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
11514    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
11515        let mut value = serde_json::to_value(self)?;
11516        if let Some(obj) = value.as_object_mut() {
11517            let id = obj.remove("id");
11518            let schema = obj.remove("schema");
11519            let properties = serde_json::Value::Object(std::mem::take(obj));
11520            if let Some(id) = id {
11521                obj.insert("id".into(), id);
11522            }
11523            if let Some(schema) = schema {
11524                obj.insert("schema".into(), schema);
11525            }
11526            obj.insert("properties".into(), properties);
11527        }
11528        serde_json::to_string(&value)
11529    }
11530}
11531///FTM Schema: Message
11532#[derive(Debug, Clone, Serialize, Deserialize)]
11533#[cfg_attr(feature = "builder", derive(Builder))]
11534#[serde(rename_all = "camelCase")]
11535pub struct Message {
11536    pub id: String,
11537    #[cfg_attr(feature = "builder", builder(default = "Message".to_string()))]
11538    pub schema: String,
11539    ///Property: Address
11540    #[serde(skip_serializing_if = "Option::is_none")]
11541    #[cfg_attr(
11542        feature = "builder",
11543        builder(with = |value:impl Into<String>|vec![value.into()])
11544    )]
11545    pub address: Option<Vec<String>>,
11546    ///Property: Address
11547    #[serde(skip_serializing_if = "Option::is_none")]
11548    #[cfg_attr(
11549        feature = "builder",
11550        builder(with = |value:impl Into<String>|vec![value.into()])
11551    )]
11552    pub address_entity: Option<Vec<String>>,
11553    ///Property: Aleph URL
11554    #[serde(skip_serializing_if = "Option::is_none")]
11555    #[cfg_attr(
11556        feature = "builder",
11557        builder(with = |value:impl Into<String>|vec![value.into()])
11558    )]
11559    pub aleph_url: Option<Vec<String>>,
11560    ///Property: Alias
11561    #[serde(skip_serializing_if = "Option::is_none")]
11562    #[cfg_attr(
11563        feature = "builder",
11564        builder(with = |value:impl Into<String>|vec![value.into()])
11565    )]
11566    pub alias: Option<Vec<String>>,
11567    ///Property: Ancestors
11568    #[serde(skip_serializing_if = "Option::is_none")]
11569    #[cfg_attr(
11570        feature = "builder",
11571        builder(with = |value:impl Into<String>|vec![value.into()])
11572    )]
11573    pub ancestors: Option<Vec<String>>,
11574    ///Property: Author
11575    #[serde(skip_serializing_if = "Option::is_none")]
11576    #[cfg_attr(
11577        feature = "builder",
11578        builder(with = |value:impl Into<String>|vec![value.into()])
11579    )]
11580    pub author: Option<Vec<String>>,
11581    ///Property: Authored on
11582    #[serde(skip_serializing_if = "Option::is_none")]
11583    #[cfg_attr(
11584        feature = "builder",
11585        builder(with = |value:impl Into<String>|vec![value.into()])
11586    )]
11587    pub authored_at: Option<Vec<String>>,
11588    ///Property: HTML
11589    #[serde(skip_serializing_if = "Option::is_none")]
11590    #[cfg_attr(
11591        feature = "builder",
11592        builder(with = |value:impl Into<String>|vec![value.into()])
11593    )]
11594    pub body_html: Option<Vec<String>>,
11595    ///Property: Text
11596    #[serde(default)]
11597    #[cfg_attr(
11598        feature = "builder",
11599        builder(with = |value:impl Into<String>|vec![value.into()])
11600    )]
11601    pub body_text: Vec<String>,
11602    ///Property: Detected companies
11603    #[serde(skip_serializing_if = "Option::is_none")]
11604    #[cfg_attr(
11605        feature = "builder",
11606        builder(with = |value:impl Into<String>|vec![value.into()])
11607    )]
11608    pub companies_mentioned: Option<Vec<String>>,
11609    ///Property: Checksum
11610    #[serde(skip_serializing_if = "Option::is_none")]
11611    #[cfg_attr(
11612        feature = "builder",
11613        builder(with = |value:impl Into<String>|vec![value.into()])
11614    )]
11615    pub content_hash: Option<Vec<String>>,
11616    ///Property: Country
11617    #[serde(skip_serializing_if = "Option::is_none")]
11618    #[cfg_attr(
11619        feature = "builder",
11620        builder(with = |value:impl Into<String>|vec![value.into()])
11621    )]
11622    pub country: Option<Vec<String>>,
11623    ///Property: Crawler
11624    #[serde(skip_serializing_if = "Option::is_none")]
11625    #[cfg_attr(
11626        feature = "builder",
11627        builder(with = |value:impl Into<String>|vec![value.into()])
11628    )]
11629    pub crawler: Option<Vec<String>>,
11630    ///Property: Created at
11631    #[serde(skip_serializing_if = "Option::is_none")]
11632    #[cfg_attr(
11633        feature = "builder",
11634        builder(with = |value:impl Into<String>|vec![value.into()])
11635    )]
11636    pub created_at: Option<Vec<String>>,
11637    ///Property: Date
11638    #[serde(skip_serializing_if = "Option::is_none")]
11639    #[cfg_attr(
11640        feature = "builder",
11641        builder(with = |value:impl Into<String>|vec![value.into()])
11642    )]
11643    pub date: Option<Vec<String>>,
11644    ///Property: Description
11645    #[serde(skip_serializing_if = "Option::is_none")]
11646    #[cfg_attr(
11647        feature = "builder",
11648        builder(with = |value:impl Into<String>|vec![value.into()])
11649    )]
11650    pub description: Option<Vec<String>>,
11651    ///Property: Detected country
11652    #[serde(skip_serializing_if = "Option::is_none")]
11653    #[cfg_attr(
11654        feature = "builder",
11655        builder(with = |value:impl Into<String>|vec![value.into()])
11656    )]
11657    pub detected_country: Option<Vec<String>>,
11658    ///Property: Detected language
11659    #[serde(skip_serializing_if = "Option::is_none")]
11660    #[cfg_attr(
11661        feature = "builder",
11662        builder(with = |value:impl Into<String>|vec![value.into()])
11663    )]
11664    pub detected_language: Option<Vec<String>>,
11665    ///Property: Detected e-mail addresses
11666    #[serde(skip_serializing_if = "Option::is_none")]
11667    #[cfg_attr(
11668        feature = "builder",
11669        builder(with = |value:impl Into<String>|vec![value.into()])
11670    )]
11671    pub email_mentioned: Option<Vec<String>>,
11672    ///Property: File encoding
11673    #[serde(skip_serializing_if = "Option::is_none")]
11674    #[cfg_attr(
11675        feature = "builder",
11676        builder(with = |value:impl Into<String>|vec![value.into()])
11677    )]
11678    pub encoding: Option<Vec<String>>,
11679    ///Property: End date
11680    #[serde(skip_serializing_if = "Option::is_none")]
11681    #[cfg_attr(
11682        feature = "builder",
11683        builder(with = |value:impl Into<String>|vec![value.into()])
11684    )]
11685    pub end_date: Option<Vec<String>>,
11686    ///Property: File extension
11687    #[serde(skip_serializing_if = "Option::is_none")]
11688    #[cfg_attr(
11689        feature = "builder",
11690        builder(with = |value:impl Into<String>|vec![value.into()])
11691    )]
11692    pub extension: Option<Vec<String>>,
11693    ///Property: File name
11694    #[serde(default)]
11695    #[cfg_attr(
11696        feature = "builder",
11697        builder(with = |value:impl Into<String>|vec![value.into()])
11698    )]
11699    pub file_name: Vec<String>,
11700    ///Property: File size
11701    #[serde(
11702        skip_serializing_if = "Option::is_none",
11703        deserialize_with = "deserialize_opt_f64_vec",
11704        default
11705    )]
11706    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
11707    pub file_size: Option<Vec<f64>>,
11708    ///Property: Generator
11709    #[serde(skip_serializing_if = "Option::is_none")]
11710    #[cfg_attr(
11711        feature = "builder",
11712        builder(with = |value:impl Into<String>|vec![value.into()])
11713    )]
11714    pub generator: Option<Vec<String>>,
11715    ///Property: Detected IBANs
11716    #[serde(skip_serializing_if = "Option::is_none")]
11717    #[cfg_attr(
11718        feature = "builder",
11719        builder(with = |value:impl Into<String>|vec![value.into()])
11720    )]
11721    pub iban_mentioned: Option<Vec<String>>,
11722    ///Property: In Reply To
11723    #[serde(skip_serializing_if = "Option::is_none")]
11724    #[cfg_attr(
11725        feature = "builder",
11726        builder(with = |value:impl Into<String>|vec![value.into()])
11727    )]
11728    pub in_reply_to: Option<Vec<String>>,
11729    ///Property: Responding to
11730    #[serde(skip_serializing_if = "Option::is_none")]
11731    #[cfg_attr(
11732        feature = "builder",
11733        builder(with = |value:impl Into<String>|vec![value.into()])
11734    )]
11735    pub in_reply_to_message: Option<Vec<String>>,
11736    ///Property: Index text
11737    #[serde(skip_serializing_if = "Option::is_none")]
11738    #[cfg_attr(
11739        feature = "builder",
11740        builder(with = |value:impl Into<String>|vec![value.into()])
11741    )]
11742    pub index_text: Option<Vec<String>>,
11743    ///Property: Detected IP addresses
11744    #[serde(skip_serializing_if = "Option::is_none")]
11745    #[cfg_attr(
11746        feature = "builder",
11747        builder(with = |value:impl Into<String>|vec![value.into()])
11748    )]
11749    pub ip_mentioned: Option<Vec<String>>,
11750    ///Property: Keywords
11751    #[serde(skip_serializing_if = "Option::is_none")]
11752    #[cfg_attr(
11753        feature = "builder",
11754        builder(with = |value:impl Into<String>|vec![value.into()])
11755    )]
11756    pub keywords: Option<Vec<String>>,
11757    ///Property: Language
11758    #[serde(skip_serializing_if = "Option::is_none")]
11759    #[cfg_attr(
11760        feature = "builder",
11761        builder(with = |value:impl Into<String>|vec![value.into()])
11762    )]
11763    pub language: Option<Vec<String>>,
11764    ///Property: Detected locations
11765    #[serde(skip_serializing_if = "Option::is_none")]
11766    #[cfg_attr(
11767        feature = "builder",
11768        builder(with = |value:impl Into<String>|vec![value.into()])
11769    )]
11770    pub location_mentioned: Option<Vec<String>>,
11771    ///Property: Message ID
11772    #[serde(skip_serializing_if = "Option::is_none")]
11773    #[cfg_attr(
11774        feature = "builder",
11775        builder(with = |value:impl Into<String>|vec![value.into()])
11776    )]
11777    pub message_id: Option<Vec<String>>,
11778    ///Property: Metadata
11779    #[serde(skip_serializing_if = "Option::is_none")]
11780    pub metadata: Option<serde_json::Value>,
11781    ///Property: MIME type
11782    #[serde(skip_serializing_if = "Option::is_none")]
11783    #[cfg_attr(
11784        feature = "builder",
11785        builder(with = |value:impl Into<String>|vec![value.into()])
11786    )]
11787    pub mime_type: Option<Vec<String>>,
11788    ///Property: Modified on
11789    #[serde(skip_serializing_if = "Option::is_none")]
11790    #[cfg_attr(
11791        feature = "builder",
11792        builder(with = |value:impl Into<String>|vec![value.into()])
11793    )]
11794    pub modified_at: Option<Vec<String>>,
11795    ///Property: Name
11796    #[serde(default)]
11797    #[cfg_attr(
11798        feature = "builder",
11799        builder(with = |value:impl Into<String>|vec![value.into()])
11800    )]
11801    pub name: Vec<String>,
11802    ///Property: Detected names
11803    #[serde(skip_serializing_if = "Option::is_none")]
11804    #[cfg_attr(
11805        feature = "builder",
11806        builder(with = |value:impl Into<String>|vec![value.into()])
11807    )]
11808    pub names_mentioned: Option<Vec<String>>,
11809    ///Property: Notes
11810    #[serde(skip_serializing_if = "Option::is_none")]
11811    #[cfg_attr(
11812        feature = "builder",
11813        builder(with = |value:impl Into<String>|vec![value.into()])
11814    )]
11815    pub notes: Option<Vec<String>>,
11816    ///Property: Folder
11817    #[serde(skip_serializing_if = "Option::is_none")]
11818    #[cfg_attr(
11819        feature = "builder",
11820        builder(with = |value:impl Into<String>|vec![value.into()])
11821    )]
11822    pub parent: Option<Vec<String>>,
11823    ///Property: Detected people
11824    #[serde(skip_serializing_if = "Option::is_none")]
11825    #[cfg_attr(
11826        feature = "builder",
11827        builder(with = |value:impl Into<String>|vec![value.into()])
11828    )]
11829    pub people_mentioned: Option<Vec<String>>,
11830    ///Property: Detected phones
11831    #[serde(skip_serializing_if = "Option::is_none")]
11832    #[cfg_attr(
11833        feature = "builder",
11834        builder(with = |value:impl Into<String>|vec![value.into()])
11835    )]
11836    pub phone_mentioned: Option<Vec<String>>,
11837    ///Property: Previous name
11838    #[serde(skip_serializing_if = "Option::is_none")]
11839    #[cfg_attr(
11840        feature = "builder",
11841        builder(with = |value:impl Into<String>|vec![value.into()])
11842    )]
11843    pub previous_name: Option<Vec<String>>,
11844    ///Property: Processed at
11845    #[serde(skip_serializing_if = "Option::is_none")]
11846    #[cfg_attr(
11847        feature = "builder",
11848        builder(with = |value:impl Into<String>|vec![value.into()])
11849    )]
11850    pub processed_at: Option<Vec<String>>,
11851    ///Property: Processing agent
11852    #[serde(skip_serializing_if = "Option::is_none")]
11853    #[cfg_attr(
11854        feature = "builder",
11855        builder(with = |value:impl Into<String>|vec![value.into()])
11856    )]
11857    pub processing_agent: Option<Vec<String>>,
11858    ///Property: Processing error
11859    #[serde(skip_serializing_if = "Option::is_none")]
11860    #[cfg_attr(
11861        feature = "builder",
11862        builder(with = |value:impl Into<String>|vec![value.into()])
11863    )]
11864    pub processing_error: Option<Vec<String>>,
11865    ///Property: Processing status
11866    #[serde(skip_serializing_if = "Option::is_none")]
11867    #[cfg_attr(
11868        feature = "builder",
11869        builder(with = |value:impl Into<String>|vec![value.into()])
11870    )]
11871    pub processing_status: Option<Vec<String>>,
11872    ///Property: Program
11873    #[serde(skip_serializing_if = "Option::is_none")]
11874    #[cfg_attr(
11875        feature = "builder",
11876        builder(with = |value:impl Into<String>|vec![value.into()])
11877    )]
11878    pub program: Option<Vec<String>>,
11879    ///Property: Program ID
11880    #[serde(skip_serializing_if = "Option::is_none")]
11881    #[cfg_attr(
11882        feature = "builder",
11883        builder(with = |value:impl Into<String>|vec![value.into()])
11884    )]
11885    pub program_id: Option<Vec<String>>,
11886    ///Property: Source document
11887    #[serde(skip_serializing_if = "Option::is_none")]
11888    #[cfg_attr(
11889        feature = "builder",
11890        builder(with = |value:impl Into<String>|vec![value.into()])
11891    )]
11892    pub proof: Option<Vec<String>>,
11893    ///Property: Published on
11894    #[serde(skip_serializing_if = "Option::is_none")]
11895    #[cfg_attr(
11896        feature = "builder",
11897        builder(with = |value:impl Into<String>|vec![value.into()])
11898    )]
11899    pub published_at: Option<Vec<String>>,
11900    ///Property: Publishing source
11901    #[serde(skip_serializing_if = "Option::is_none")]
11902    #[cfg_attr(
11903        feature = "builder",
11904        builder(with = |value:impl Into<String>|vec![value.into()])
11905    )]
11906    pub publisher: Option<Vec<String>>,
11907    ///Property: Publishing source URL
11908    #[serde(skip_serializing_if = "Option::is_none")]
11909    #[cfg_attr(
11910        feature = "builder",
11911        builder(with = |value:impl Into<String>|vec![value.into()])
11912    )]
11913    pub publisher_url: Option<Vec<String>>,
11914    ///Property: Recipient Account
11915    #[serde(skip_serializing_if = "Option::is_none")]
11916    #[cfg_attr(
11917        feature = "builder",
11918        builder(with = |value:impl Into<String>|vec![value.into()])
11919    )]
11920    pub recipient_account: Option<Vec<String>>,
11921    ///Property: Recipients
11922    #[serde(skip_serializing_if = "Option::is_none")]
11923    #[cfg_attr(
11924        feature = "builder",
11925        builder(with = |value:impl Into<String>|vec![value.into()])
11926    )]
11927    pub recipients: Option<Vec<String>>,
11928    ///Property: Record ID
11929    #[serde(skip_serializing_if = "Option::is_none")]
11930    #[cfg_attr(
11931        feature = "builder",
11932        builder(with = |value:impl Into<String>|vec![value.into()])
11933    )]
11934    pub record_id: Option<Vec<String>>,
11935    ///Property: Retrieved on
11936    #[serde(skip_serializing_if = "Option::is_none")]
11937    #[cfg_attr(
11938        feature = "builder",
11939        builder(with = |value:impl Into<String>|vec![value.into()])
11940    )]
11941    pub retrieved_at: Option<Vec<String>>,
11942    ///Property: Sender
11943    #[serde(default)]
11944    #[cfg_attr(
11945        feature = "builder",
11946        builder(with = |value:impl Into<String>|vec![value.into()])
11947    )]
11948    pub sender: Vec<String>,
11949    ///Property: Sender Account
11950    #[serde(skip_serializing_if = "Option::is_none")]
11951    #[cfg_attr(
11952        feature = "builder",
11953        builder(with = |value:impl Into<String>|vec![value.into()])
11954    )]
11955    pub sender_account: Option<Vec<String>>,
11956    ///Property: Source link
11957    #[serde(skip_serializing_if = "Option::is_none")]
11958    #[cfg_attr(
11959        feature = "builder",
11960        builder(with = |value:impl Into<String>|vec![value.into()])
11961    )]
11962    pub source_url: Option<Vec<String>>,
11963    ///Property: Start date
11964    #[serde(skip_serializing_if = "Option::is_none")]
11965    #[cfg_attr(
11966        feature = "builder",
11967        builder(with = |value:impl Into<String>|vec![value.into()])
11968    )]
11969    pub start_date: Option<Vec<String>>,
11970    ///Property: Subject
11971    #[serde(skip_serializing_if = "Option::is_none")]
11972    #[cfg_attr(
11973        feature = "builder",
11974        builder(with = |value:impl Into<String>|vec![value.into()])
11975    )]
11976    pub subject: Option<Vec<String>>,
11977    ///Property: Summary
11978    #[serde(skip_serializing_if = "Option::is_none")]
11979    #[cfg_attr(
11980        feature = "builder",
11981        builder(with = |value:impl Into<String>|vec![value.into()])
11982    )]
11983    pub summary: Option<Vec<String>>,
11984    ///Property: Thread topic
11985    #[serde(skip_serializing_if = "Option::is_none")]
11986    #[cfg_attr(
11987        feature = "builder",
11988        builder(with = |value:impl Into<String>|vec![value.into()])
11989    )]
11990    pub thread_topic: Option<Vec<String>>,
11991    ///Property: Title
11992    #[serde(skip_serializing_if = "Option::is_none")]
11993    #[cfg_attr(
11994        feature = "builder",
11995        builder(with = |value:impl Into<String>|vec![value.into()])
11996    )]
11997    pub title: Option<Vec<String>>,
11998    ///Property: Topics
11999    #[serde(skip_serializing_if = "Option::is_none")]
12000    #[cfg_attr(
12001        feature = "builder",
12002        builder(with = |value:impl Into<String>|vec![value.into()])
12003    )]
12004    pub topics: Option<Vec<String>>,
12005    ///Property: The language of the translated text
12006    #[serde(skip_serializing_if = "Option::is_none")]
12007    #[cfg_attr(
12008        feature = "builder",
12009        builder(with = |value:impl Into<String>|vec![value.into()])
12010    )]
12011    pub translated_language: Option<Vec<String>>,
12012    ///Property: Translated version of the body text
12013    #[serde(skip_serializing_if = "Option::is_none")]
12014    #[cfg_attr(
12015        feature = "builder",
12016        builder(with = |value:impl Into<String>|vec![value.into()])
12017    )]
12018    pub translated_text: Option<Vec<String>>,
12019    ///Property: Weak alias
12020    #[serde(skip_serializing_if = "Option::is_none")]
12021    #[cfg_attr(
12022        feature = "builder",
12023        builder(with = |value:impl Into<String>|vec![value.into()])
12024    )]
12025    pub weak_alias: Option<Vec<String>>,
12026    ///Property: Wikidata ID
12027    #[serde(skip_serializing_if = "Option::is_none")]
12028    #[cfg_attr(
12029        feature = "builder",
12030        builder(with = |value:impl Into<String>|vec![value.into()])
12031    )]
12032    pub wikidata_id: Option<Vec<String>>,
12033    ///Property: Wikipedia Article
12034    #[serde(skip_serializing_if = "Option::is_none")]
12035    #[cfg_attr(
12036        feature = "builder",
12037        builder(with = |value:impl Into<String>|vec![value.into()])
12038    )]
12039    pub wikipedia_url: Option<Vec<String>>,
12040}
12041impl Message {
12042    /// Create a new entity with the given ID
12043    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
12044    pub fn new(id: impl Into<String>) -> Self {
12045        Self {
12046            id: id.into(),
12047            schema: "Message".to_string(),
12048            address: None,
12049            address_entity: None,
12050            aleph_url: None,
12051            alias: None,
12052            ancestors: None,
12053            author: None,
12054            authored_at: None,
12055            body_html: None,
12056            body_text: Vec::new(),
12057            companies_mentioned: None,
12058            content_hash: None,
12059            country: None,
12060            crawler: None,
12061            created_at: None,
12062            date: None,
12063            description: None,
12064            detected_country: None,
12065            detected_language: None,
12066            email_mentioned: None,
12067            encoding: None,
12068            end_date: None,
12069            extension: None,
12070            file_name: Vec::new(),
12071            file_size: None,
12072            generator: None,
12073            iban_mentioned: None,
12074            in_reply_to: None,
12075            in_reply_to_message: None,
12076            index_text: None,
12077            ip_mentioned: None,
12078            keywords: None,
12079            language: None,
12080            location_mentioned: None,
12081            message_id: None,
12082            metadata: None,
12083            mime_type: None,
12084            modified_at: None,
12085            name: Vec::new(),
12086            names_mentioned: None,
12087            notes: None,
12088            parent: None,
12089            people_mentioned: None,
12090            phone_mentioned: None,
12091            previous_name: None,
12092            processed_at: None,
12093            processing_agent: None,
12094            processing_error: None,
12095            processing_status: None,
12096            program: None,
12097            program_id: None,
12098            proof: None,
12099            published_at: None,
12100            publisher: None,
12101            publisher_url: None,
12102            recipient_account: None,
12103            recipients: None,
12104            record_id: None,
12105            retrieved_at: None,
12106            sender: Vec::new(),
12107            sender_account: None,
12108            source_url: None,
12109            start_date: None,
12110            subject: None,
12111            summary: None,
12112            thread_topic: None,
12113            title: None,
12114            topics: None,
12115            translated_language: None,
12116            translated_text: None,
12117            weak_alias: None,
12118            wikidata_id: None,
12119            wikipedia_url: None,
12120        }
12121    }
12122    /// Get the schema name
12123    pub fn schema_name() -> &'static str {
12124        "Message"
12125    }
12126    /// Serialize to standard FTM nested JSON format
12127    ///
12128    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
12129    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
12130        let mut value = serde_json::to_value(self)?;
12131        if let Some(obj) = value.as_object_mut() {
12132            let id = obj.remove("id");
12133            let schema = obj.remove("schema");
12134            let properties = serde_json::Value::Object(std::mem::take(obj));
12135            if let Some(id) = id {
12136                obj.insert("id".into(), id);
12137            }
12138            if let Some(schema) = schema {
12139                obj.insert("schema".into(), schema);
12140            }
12141            obj.insert("properties".into(), properties);
12142        }
12143        serde_json::to_string(&value)
12144    }
12145}
12146///FTM Schema: Note
12147#[derive(Debug, Clone, Serialize, Deserialize)]
12148#[cfg_attr(feature = "builder", derive(Builder))]
12149#[serde(rename_all = "camelCase")]
12150pub struct Note {
12151    pub id: String,
12152    #[cfg_attr(feature = "builder", builder(default = "Note".to_string()))]
12153    pub schema: String,
12154    ///Property: Address
12155    #[serde(skip_serializing_if = "Option::is_none")]
12156    #[cfg_attr(
12157        feature = "builder",
12158        builder(with = |value:impl Into<String>|vec![value.into()])
12159    )]
12160    pub address: Option<Vec<String>>,
12161    ///Property: Address
12162    #[serde(skip_serializing_if = "Option::is_none")]
12163    #[cfg_attr(
12164        feature = "builder",
12165        builder(with = |value:impl Into<String>|vec![value.into()])
12166    )]
12167    pub address_entity: Option<Vec<String>>,
12168    ///Property: Aleph URL
12169    #[serde(skip_serializing_if = "Option::is_none")]
12170    #[cfg_attr(
12171        feature = "builder",
12172        builder(with = |value:impl Into<String>|vec![value.into()])
12173    )]
12174    pub aleph_url: Option<Vec<String>>,
12175    ///Property: Alias
12176    #[serde(skip_serializing_if = "Option::is_none")]
12177    #[cfg_attr(
12178        feature = "builder",
12179        builder(with = |value:impl Into<String>|vec![value.into()])
12180    )]
12181    pub alias: Option<Vec<String>>,
12182    ///Property: Detected companies
12183    #[serde(skip_serializing_if = "Option::is_none")]
12184    #[cfg_attr(
12185        feature = "builder",
12186        builder(with = |value:impl Into<String>|vec![value.into()])
12187    )]
12188    pub companies_mentioned: Option<Vec<String>>,
12189    ///Property: Country
12190    #[serde(skip_serializing_if = "Option::is_none")]
12191    #[cfg_attr(
12192        feature = "builder",
12193        builder(with = |value:impl Into<String>|vec![value.into()])
12194    )]
12195    pub country: Option<Vec<String>>,
12196    ///Property: Created at
12197    #[serde(skip_serializing_if = "Option::is_none")]
12198    #[cfg_attr(
12199        feature = "builder",
12200        builder(with = |value:impl Into<String>|vec![value.into()])
12201    )]
12202    pub created_at: Option<Vec<String>>,
12203    ///Property: Description
12204    #[serde(skip_serializing_if = "Option::is_none")]
12205    #[cfg_attr(
12206        feature = "builder",
12207        builder(with = |value:impl Into<String>|vec![value.into()])
12208    )]
12209    pub description: Option<Vec<String>>,
12210    ///Property: Detected country
12211    #[serde(skip_serializing_if = "Option::is_none")]
12212    #[cfg_attr(
12213        feature = "builder",
12214        builder(with = |value:impl Into<String>|vec![value.into()])
12215    )]
12216    pub detected_country: Option<Vec<String>>,
12217    ///Property: Detected language
12218    #[serde(skip_serializing_if = "Option::is_none")]
12219    #[cfg_attr(
12220        feature = "builder",
12221        builder(with = |value:impl Into<String>|vec![value.into()])
12222    )]
12223    pub detected_language: Option<Vec<String>>,
12224    ///Property: Detected e-mail addresses
12225    #[serde(skip_serializing_if = "Option::is_none")]
12226    #[cfg_attr(
12227        feature = "builder",
12228        builder(with = |value:impl Into<String>|vec![value.into()])
12229    )]
12230    pub email_mentioned: Option<Vec<String>>,
12231    ///Property: Entity
12232    #[serde(skip_serializing_if = "Option::is_none")]
12233    #[cfg_attr(
12234        feature = "builder",
12235        builder(with = |value:impl Into<String>|vec![value.into()])
12236    )]
12237    pub entity: Option<Vec<String>>,
12238    ///Property: Detected IBANs
12239    #[serde(skip_serializing_if = "Option::is_none")]
12240    #[cfg_attr(
12241        feature = "builder",
12242        builder(with = |value:impl Into<String>|vec![value.into()])
12243    )]
12244    pub iban_mentioned: Option<Vec<String>>,
12245    ///Property: Index text
12246    #[serde(skip_serializing_if = "Option::is_none")]
12247    #[cfg_attr(
12248        feature = "builder",
12249        builder(with = |value:impl Into<String>|vec![value.into()])
12250    )]
12251    pub index_text: Option<Vec<String>>,
12252    ///Property: Detected IP addresses
12253    #[serde(skip_serializing_if = "Option::is_none")]
12254    #[cfg_attr(
12255        feature = "builder",
12256        builder(with = |value:impl Into<String>|vec![value.into()])
12257    )]
12258    pub ip_mentioned: Option<Vec<String>>,
12259    ///Property: Keywords
12260    #[serde(skip_serializing_if = "Option::is_none")]
12261    #[cfg_attr(
12262        feature = "builder",
12263        builder(with = |value:impl Into<String>|vec![value.into()])
12264    )]
12265    pub keywords: Option<Vec<String>>,
12266    ///Property: Detected locations
12267    #[serde(skip_serializing_if = "Option::is_none")]
12268    #[cfg_attr(
12269        feature = "builder",
12270        builder(with = |value:impl Into<String>|vec![value.into()])
12271    )]
12272    pub location_mentioned: Option<Vec<String>>,
12273    ///Property: Modified on
12274    #[serde(skip_serializing_if = "Option::is_none")]
12275    #[cfg_attr(
12276        feature = "builder",
12277        builder(with = |value:impl Into<String>|vec![value.into()])
12278    )]
12279    pub modified_at: Option<Vec<String>>,
12280    ///Property: Name
12281    #[serde(default)]
12282    #[cfg_attr(
12283        feature = "builder",
12284        builder(with = |value:impl Into<String>|vec![value.into()])
12285    )]
12286    pub name: Vec<String>,
12287    ///Property: Detected names
12288    #[serde(skip_serializing_if = "Option::is_none")]
12289    #[cfg_attr(
12290        feature = "builder",
12291        builder(with = |value:impl Into<String>|vec![value.into()])
12292    )]
12293    pub names_mentioned: Option<Vec<String>>,
12294    ///Property: Notes
12295    #[serde(skip_serializing_if = "Option::is_none")]
12296    #[cfg_attr(
12297        feature = "builder",
12298        builder(with = |value:impl Into<String>|vec![value.into()])
12299    )]
12300    pub notes: Option<Vec<String>>,
12301    ///Property: Detected people
12302    #[serde(skip_serializing_if = "Option::is_none")]
12303    #[cfg_attr(
12304        feature = "builder",
12305        builder(with = |value:impl Into<String>|vec![value.into()])
12306    )]
12307    pub people_mentioned: Option<Vec<String>>,
12308    ///Property: Detected phones
12309    #[serde(skip_serializing_if = "Option::is_none")]
12310    #[cfg_attr(
12311        feature = "builder",
12312        builder(with = |value:impl Into<String>|vec![value.into()])
12313    )]
12314    pub phone_mentioned: Option<Vec<String>>,
12315    ///Property: Previous name
12316    #[serde(skip_serializing_if = "Option::is_none")]
12317    #[cfg_attr(
12318        feature = "builder",
12319        builder(with = |value:impl Into<String>|vec![value.into()])
12320    )]
12321    pub previous_name: Option<Vec<String>>,
12322    ///Property: Program
12323    #[serde(skip_serializing_if = "Option::is_none")]
12324    #[cfg_attr(
12325        feature = "builder",
12326        builder(with = |value:impl Into<String>|vec![value.into()])
12327    )]
12328    pub program: Option<Vec<String>>,
12329    ///Property: Program ID
12330    #[serde(skip_serializing_if = "Option::is_none")]
12331    #[cfg_attr(
12332        feature = "builder",
12333        builder(with = |value:impl Into<String>|vec![value.into()])
12334    )]
12335    pub program_id: Option<Vec<String>>,
12336    ///Property: Source document
12337    #[serde(skip_serializing_if = "Option::is_none")]
12338    #[cfg_attr(
12339        feature = "builder",
12340        builder(with = |value:impl Into<String>|vec![value.into()])
12341    )]
12342    pub proof: Option<Vec<String>>,
12343    ///Property: Publishing source
12344    #[serde(skip_serializing_if = "Option::is_none")]
12345    #[cfg_attr(
12346        feature = "builder",
12347        builder(with = |value:impl Into<String>|vec![value.into()])
12348    )]
12349    pub publisher: Option<Vec<String>>,
12350    ///Property: Publishing source URL
12351    #[serde(skip_serializing_if = "Option::is_none")]
12352    #[cfg_attr(
12353        feature = "builder",
12354        builder(with = |value:impl Into<String>|vec![value.into()])
12355    )]
12356    pub publisher_url: Option<Vec<String>>,
12357    ///Property: Retrieved on
12358    #[serde(skip_serializing_if = "Option::is_none")]
12359    #[cfg_attr(
12360        feature = "builder",
12361        builder(with = |value:impl Into<String>|vec![value.into()])
12362    )]
12363    pub retrieved_at: Option<Vec<String>>,
12364    ///Property: Source link
12365    #[serde(skip_serializing_if = "Option::is_none")]
12366    #[cfg_attr(
12367        feature = "builder",
12368        builder(with = |value:impl Into<String>|vec![value.into()])
12369    )]
12370    pub source_url: Option<Vec<String>>,
12371    ///Property: Summary
12372    #[serde(skip_serializing_if = "Option::is_none")]
12373    #[cfg_attr(
12374        feature = "builder",
12375        builder(with = |value:impl Into<String>|vec![value.into()])
12376    )]
12377    pub summary: Option<Vec<String>>,
12378    ///Property: Topics
12379    #[serde(skip_serializing_if = "Option::is_none")]
12380    #[cfg_attr(
12381        feature = "builder",
12382        builder(with = |value:impl Into<String>|vec![value.into()])
12383    )]
12384    pub topics: Option<Vec<String>>,
12385    ///Property: Weak alias
12386    #[serde(skip_serializing_if = "Option::is_none")]
12387    #[cfg_attr(
12388        feature = "builder",
12389        builder(with = |value:impl Into<String>|vec![value.into()])
12390    )]
12391    pub weak_alias: Option<Vec<String>>,
12392    ///Property: Wikidata ID
12393    #[serde(skip_serializing_if = "Option::is_none")]
12394    #[cfg_attr(
12395        feature = "builder",
12396        builder(with = |value:impl Into<String>|vec![value.into()])
12397    )]
12398    pub wikidata_id: Option<Vec<String>>,
12399    ///Property: Wikipedia Article
12400    #[serde(skip_serializing_if = "Option::is_none")]
12401    #[cfg_attr(
12402        feature = "builder",
12403        builder(with = |value:impl Into<String>|vec![value.into()])
12404    )]
12405    pub wikipedia_url: Option<Vec<String>>,
12406}
12407impl Note {
12408    /// Create a new entity with the given ID
12409    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
12410    pub fn new(id: impl Into<String>) -> Self {
12411        Self {
12412            id: id.into(),
12413            schema: "Note".to_string(),
12414            address: None,
12415            address_entity: None,
12416            aleph_url: None,
12417            alias: None,
12418            companies_mentioned: None,
12419            country: None,
12420            created_at: None,
12421            description: None,
12422            detected_country: None,
12423            detected_language: None,
12424            email_mentioned: None,
12425            entity: None,
12426            iban_mentioned: None,
12427            index_text: None,
12428            ip_mentioned: None,
12429            keywords: None,
12430            location_mentioned: None,
12431            modified_at: None,
12432            name: Vec::new(),
12433            names_mentioned: None,
12434            notes: None,
12435            people_mentioned: None,
12436            phone_mentioned: None,
12437            previous_name: None,
12438            program: None,
12439            program_id: None,
12440            proof: None,
12441            publisher: None,
12442            publisher_url: None,
12443            retrieved_at: None,
12444            source_url: None,
12445            summary: None,
12446            topics: None,
12447            weak_alias: None,
12448            wikidata_id: None,
12449            wikipedia_url: None,
12450        }
12451    }
12452    /// Get the schema name
12453    pub fn schema_name() -> &'static str {
12454        "Note"
12455    }
12456    /// Serialize to standard FTM nested JSON format
12457    ///
12458    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
12459    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
12460        let mut value = serde_json::to_value(self)?;
12461        if let Some(obj) = value.as_object_mut() {
12462            let id = obj.remove("id");
12463            let schema = obj.remove("schema");
12464            let properties = serde_json::Value::Object(std::mem::take(obj));
12465            if let Some(id) = id {
12466                obj.insert("id".into(), id);
12467            }
12468            if let Some(schema) = schema {
12469                obj.insert("schema".into(), schema);
12470            }
12471            obj.insert("properties".into(), properties);
12472        }
12473        serde_json::to_string(&value)
12474    }
12475}
12476///FTM Schema: Occupancy
12477#[derive(Debug, Clone, Serialize, Deserialize)]
12478#[cfg_attr(feature = "builder", derive(Builder))]
12479#[serde(rename_all = "camelCase")]
12480pub struct Occupancy {
12481    pub id: String,
12482    #[cfg_attr(feature = "builder", builder(default = "Occupancy".to_string()))]
12483    pub schema: String,
12484    ///Property: Aleph URL
12485    #[serde(skip_serializing_if = "Option::is_none")]
12486    #[cfg_attr(
12487        feature = "builder",
12488        builder(with = |value:impl Into<String>|vec![value.into()])
12489    )]
12490    pub aleph_url: Option<Vec<String>>,
12491    ///Property: Constituency
12492    #[serde(skip_serializing_if = "Option::is_none")]
12493    #[cfg_attr(
12494        feature = "builder",
12495        builder(with = |value:impl Into<String>|vec![value.into()])
12496    )]
12497    pub constituency: Option<Vec<String>>,
12498    ///Property: Date
12499    #[serde(skip_serializing_if = "Option::is_none")]
12500    #[cfg_attr(
12501        feature = "builder",
12502        builder(with = |value:impl Into<String>|vec![value.into()])
12503    )]
12504    pub date: Option<Vec<String>>,
12505    ///Property: Declaration date
12506    #[serde(skip_serializing_if = "Option::is_none")]
12507    #[cfg_attr(
12508        feature = "builder",
12509        builder(with = |value:impl Into<String>|vec![value.into()])
12510    )]
12511    pub declaration_date: Option<Vec<String>>,
12512    ///Property: Description
12513    #[serde(skip_serializing_if = "Option::is_none")]
12514    #[cfg_attr(
12515        feature = "builder",
12516        builder(with = |value:impl Into<String>|vec![value.into()])
12517    )]
12518    pub description: Option<Vec<String>>,
12519    ///Property: Election date
12520    #[serde(skip_serializing_if = "Option::is_none")]
12521    #[cfg_attr(
12522        feature = "builder",
12523        builder(with = |value:impl Into<String>|vec![value.into()])
12524    )]
12525    pub election_date: Option<Vec<String>>,
12526    ///Property: End date
12527    #[serde(skip_serializing_if = "Option::is_none")]
12528    #[cfg_attr(
12529        feature = "builder",
12530        builder(with = |value:impl Into<String>|vec![value.into()])
12531    )]
12532    pub end_date: Option<Vec<String>>,
12533    ///Property: Holder
12534    #[serde(default)]
12535    #[cfg_attr(
12536        feature = "builder",
12537        builder(with = |value:impl Into<String>|vec![value.into()])
12538    )]
12539    pub holder: Vec<String>,
12540    ///Property: Index text
12541    #[serde(skip_serializing_if = "Option::is_none")]
12542    #[cfg_attr(
12543        feature = "builder",
12544        builder(with = |value:impl Into<String>|vec![value.into()])
12545    )]
12546    pub index_text: Option<Vec<String>>,
12547    ///Property: Modified on
12548    #[serde(skip_serializing_if = "Option::is_none")]
12549    #[cfg_attr(
12550        feature = "builder",
12551        builder(with = |value:impl Into<String>|vec![value.into()])
12552    )]
12553    pub modified_at: Option<Vec<String>>,
12554    ///Property: Detected names
12555    #[serde(skip_serializing_if = "Option::is_none")]
12556    #[cfg_attr(
12557        feature = "builder",
12558        builder(with = |value:impl Into<String>|vec![value.into()])
12559    )]
12560    pub names_mentioned: Option<Vec<String>>,
12561    ///Property: Period end
12562    #[serde(skip_serializing_if = "Option::is_none")]
12563    #[cfg_attr(
12564        feature = "builder",
12565        builder(with = |value:impl Into<String>|vec![value.into()])
12566    )]
12567    pub period_end: Option<Vec<String>>,
12568    ///Property: Period start
12569    #[serde(skip_serializing_if = "Option::is_none")]
12570    #[cfg_attr(
12571        feature = "builder",
12572        builder(with = |value:impl Into<String>|vec![value.into()])
12573    )]
12574    pub period_start: Option<Vec<String>>,
12575    ///Property: Political group
12576    #[serde(skip_serializing_if = "Option::is_none")]
12577    #[cfg_attr(
12578        feature = "builder",
12579        builder(with = |value:impl Into<String>|vec![value.into()])
12580    )]
12581    pub political_group: Option<Vec<String>>,
12582    ///Property: Position occupied
12583    #[serde(default)]
12584    #[cfg_attr(
12585        feature = "builder",
12586        builder(with = |value:impl Into<String>|vec![value.into()])
12587    )]
12588    pub post: Vec<String>,
12589    ///Property: Source document
12590    #[serde(skip_serializing_if = "Option::is_none")]
12591    #[cfg_attr(
12592        feature = "builder",
12593        builder(with = |value:impl Into<String>|vec![value.into()])
12594    )]
12595    pub proof: Option<Vec<String>>,
12596    ///Property: Publishing source
12597    #[serde(skip_serializing_if = "Option::is_none")]
12598    #[cfg_attr(
12599        feature = "builder",
12600        builder(with = |value:impl Into<String>|vec![value.into()])
12601    )]
12602    pub publisher: Option<Vec<String>>,
12603    ///Property: Publishing source URL
12604    #[serde(skip_serializing_if = "Option::is_none")]
12605    #[cfg_attr(
12606        feature = "builder",
12607        builder(with = |value:impl Into<String>|vec![value.into()])
12608    )]
12609    pub publisher_url: Option<Vec<String>>,
12610    ///Property: Record ID
12611    #[serde(skip_serializing_if = "Option::is_none")]
12612    #[cfg_attr(
12613        feature = "builder",
12614        builder(with = |value:impl Into<String>|vec![value.into()])
12615    )]
12616    pub record_id: Option<Vec<String>>,
12617    ///Property: Retrieved on
12618    #[serde(skip_serializing_if = "Option::is_none")]
12619    #[cfg_attr(
12620        feature = "builder",
12621        builder(with = |value:impl Into<String>|vec![value.into()])
12622    )]
12623    pub retrieved_at: Option<Vec<String>>,
12624    ///Property: Source link
12625    #[serde(skip_serializing_if = "Option::is_none")]
12626    #[cfg_attr(
12627        feature = "builder",
12628        builder(with = |value:impl Into<String>|vec![value.into()])
12629    )]
12630    pub source_url: Option<Vec<String>>,
12631    ///Property: Start date
12632    #[serde(skip_serializing_if = "Option::is_none")]
12633    #[cfg_attr(
12634        feature = "builder",
12635        builder(with = |value:impl Into<String>|vec![value.into()])
12636    )]
12637    pub start_date: Option<Vec<String>>,
12638    ///Property: Status
12639    #[serde(skip_serializing_if = "Option::is_none")]
12640    #[cfg_attr(
12641        feature = "builder",
12642        builder(with = |value:impl Into<String>|vec![value.into()])
12643    )]
12644    pub status: Option<Vec<String>>,
12645    ///Property: Summary
12646    #[serde(skip_serializing_if = "Option::is_none")]
12647    #[cfg_attr(
12648        feature = "builder",
12649        builder(with = |value:impl Into<String>|vec![value.into()])
12650    )]
12651    pub summary: Option<Vec<String>>,
12652}
12653impl Occupancy {
12654    /// Create a new entity with the given ID
12655    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
12656    pub fn new(id: impl Into<String>) -> Self {
12657        Self {
12658            id: id.into(),
12659            schema: "Occupancy".to_string(),
12660            aleph_url: None,
12661            constituency: None,
12662            date: None,
12663            declaration_date: None,
12664            description: None,
12665            election_date: None,
12666            end_date: None,
12667            holder: Vec::new(),
12668            index_text: None,
12669            modified_at: None,
12670            names_mentioned: None,
12671            period_end: None,
12672            period_start: None,
12673            political_group: None,
12674            post: Vec::new(),
12675            proof: None,
12676            publisher: None,
12677            publisher_url: None,
12678            record_id: None,
12679            retrieved_at: None,
12680            source_url: None,
12681            start_date: None,
12682            status: None,
12683            summary: None,
12684        }
12685    }
12686    /// Get the schema name
12687    pub fn schema_name() -> &'static str {
12688        "Occupancy"
12689    }
12690    /// Serialize to standard FTM nested JSON format
12691    ///
12692    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
12693    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
12694        let mut value = serde_json::to_value(self)?;
12695        if let Some(obj) = value.as_object_mut() {
12696            let id = obj.remove("id");
12697            let schema = obj.remove("schema");
12698            let properties = serde_json::Value::Object(std::mem::take(obj));
12699            if let Some(id) = id {
12700                obj.insert("id".into(), id);
12701            }
12702            if let Some(schema) = schema {
12703                obj.insert("schema".into(), schema);
12704            }
12705            obj.insert("properties".into(), properties);
12706        }
12707        serde_json::to_string(&value)
12708    }
12709}
12710///FTM Schema: Organization
12711#[derive(Debug, Clone, Serialize, Deserialize)]
12712#[cfg_attr(feature = "builder", derive(Builder))]
12713#[serde(rename_all = "camelCase")]
12714pub struct Organization {
12715    pub id: String,
12716    #[cfg_attr(feature = "builder", builder(default = "Organization".to_string()))]
12717    pub schema: String,
12718    ///Property: Abbreviation
12719    #[serde(skip_serializing_if = "Option::is_none")]
12720    #[cfg_attr(
12721        feature = "builder",
12722        builder(with = |value:impl Into<String>|vec![value.into()])
12723    )]
12724    pub abbreviation: Option<Vec<String>>,
12725    ///Property: Address
12726    #[serde(skip_serializing_if = "Option::is_none")]
12727    #[cfg_attr(
12728        feature = "builder",
12729        builder(with = |value:impl Into<String>|vec![value.into()])
12730    )]
12731    pub address: Option<Vec<String>>,
12732    ///Property: Address
12733    #[serde(skip_serializing_if = "Option::is_none")]
12734    #[cfg_attr(
12735        feature = "builder",
12736        builder(with = |value:impl Into<String>|vec![value.into()])
12737    )]
12738    pub address_entity: Option<Vec<String>>,
12739    ///Property: Aleph URL
12740    #[serde(skip_serializing_if = "Option::is_none")]
12741    #[cfg_attr(
12742        feature = "builder",
12743        builder(with = |value:impl Into<String>|vec![value.into()])
12744    )]
12745    pub aleph_url: Option<Vec<String>>,
12746    ///Property: Alias
12747    #[serde(skip_serializing_if = "Option::is_none")]
12748    #[cfg_attr(
12749        feature = "builder",
12750        builder(with = |value:impl Into<String>|vec![value.into()])
12751    )]
12752    pub alias: Option<Vec<String>>,
12753    ///Property: BrightQuery ID
12754    #[serde(skip_serializing_if = "Option::is_none")]
12755    #[cfg_attr(
12756        feature = "builder",
12757        builder(with = |value:impl Into<String>|vec![value.into()])
12758    )]
12759    pub bright_query_id: Option<Vec<String>>,
12760    ///Property: BrightQuery Organization ID
12761    #[serde(skip_serializing_if = "Option::is_none")]
12762    #[cfg_attr(
12763        feature = "builder",
12764        builder(with = |value:impl Into<String>|vec![value.into()])
12765    )]
12766    pub bright_query_org_id: Option<Vec<String>>,
12767    ///Property: Bureau van Dijk ID
12768    #[serde(skip_serializing_if = "Option::is_none")]
12769    #[cfg_attr(
12770        feature = "builder",
12771        builder(with = |value:impl Into<String>|vec![value.into()])
12772    )]
12773    pub bvd_id: Option<Vec<String>>,
12774    ///Property: CAGE
12775    #[serde(skip_serializing_if = "Option::is_none")]
12776    #[cfg_attr(
12777        feature = "builder",
12778        builder(with = |value:impl Into<String>|vec![value.into()])
12779    )]
12780    pub cage_code: Option<Vec<String>>,
12781    ///Property: Classification
12782    #[serde(skip_serializing_if = "Option::is_none")]
12783    #[cfg_attr(
12784        feature = "builder",
12785        builder(with = |value:impl Into<String>|vec![value.into()])
12786    )]
12787    pub classification: Option<Vec<String>>,
12788    ///Property: Country
12789    #[serde(skip_serializing_if = "Option::is_none")]
12790    #[cfg_attr(
12791        feature = "builder",
12792        builder(with = |value:impl Into<String>|vec![value.into()])
12793    )]
12794    pub country: Option<Vec<String>>,
12795    ///Property: Created at
12796    #[serde(skip_serializing_if = "Option::is_none")]
12797    #[cfg_attr(
12798        feature = "builder",
12799        builder(with = |value:impl Into<String>|vec![value.into()])
12800    )]
12801    pub created_at: Option<Vec<String>>,
12802    ///Property: Description
12803    #[serde(skip_serializing_if = "Option::is_none")]
12804    #[cfg_attr(
12805        feature = "builder",
12806        builder(with = |value:impl Into<String>|vec![value.into()])
12807    )]
12808    pub description: Option<Vec<String>>,
12809    ///Property: Dissolution date
12810    #[serde(skip_serializing_if = "Option::is_none")]
12811    #[cfg_attr(
12812        feature = "builder",
12813        builder(with = |value:impl Into<String>|vec![value.into()])
12814    )]
12815    pub dissolution_date: Option<Vec<String>>,
12816    ///Property: DUNS
12817    #[serde(skip_serializing_if = "Option::is_none")]
12818    #[cfg_attr(
12819        feature = "builder",
12820        builder(with = |value:impl Into<String>|vec![value.into()])
12821    )]
12822    pub duns_code: Option<Vec<String>>,
12823    ///Property: Email
12824    #[serde(skip_serializing_if = "Option::is_none")]
12825    #[cfg_attr(
12826        feature = "builder",
12827        builder(with = |value:impl Into<String>|vec![value.into()])
12828    )]
12829    pub email: Option<Vec<String>>,
12830    ///Property: GIIN
12831    #[serde(skip_serializing_if = "Option::is_none")]
12832    #[cfg_attr(
12833        feature = "builder",
12834        builder(with = |value:impl Into<String>|vec![value.into()])
12835    )]
12836    pub gii_number: Option<Vec<String>>,
12837    ///Property: ICIJ ID
12838    #[serde(skip_serializing_if = "Option::is_none")]
12839    #[cfg_attr(
12840        feature = "builder",
12841        builder(with = |value:impl Into<String>|vec![value.into()])
12842    )]
12843    pub icij_id: Option<Vec<String>>,
12844    ///Property: ID Number
12845    #[serde(skip_serializing_if = "Option::is_none")]
12846    #[cfg_attr(
12847        feature = "builder",
12848        builder(with = |value:impl Into<String>|vec![value.into()])
12849    )]
12850    pub id_number: Option<Vec<String>>,
12851    ///Property: IMO Number
12852    #[serde(skip_serializing_if = "Option::is_none")]
12853    #[cfg_attr(
12854        feature = "builder",
12855        builder(with = |value:impl Into<String>|vec![value.into()])
12856    )]
12857    pub imo_number: Option<Vec<String>>,
12858    ///Property: Incorporation date
12859    #[serde(skip_serializing_if = "Option::is_none")]
12860    #[cfg_attr(
12861        feature = "builder",
12862        builder(with = |value:impl Into<String>|vec![value.into()])
12863    )]
12864    pub incorporation_date: Option<Vec<String>>,
12865    ///Property: Index text
12866    #[serde(skip_serializing_if = "Option::is_none")]
12867    #[cfg_attr(
12868        feature = "builder",
12869        builder(with = |value:impl Into<String>|vec![value.into()])
12870    )]
12871    pub index_text: Option<Vec<String>>,
12872    ///Property: INN
12873    #[serde(skip_serializing_if = "Option::is_none")]
12874    #[cfg_attr(
12875        feature = "builder",
12876        builder(with = |value:impl Into<String>|vec![value.into()])
12877    )]
12878    pub inn_code: Option<Vec<String>>,
12879    ///Property: Jurisdiction
12880    #[serde(skip_serializing_if = "Option::is_none")]
12881    #[cfg_attr(
12882        feature = "builder",
12883        builder(with = |value:impl Into<String>|vec![value.into()])
12884    )]
12885    pub jurisdiction: Option<Vec<String>>,
12886    ///Property: Keywords
12887    #[serde(skip_serializing_if = "Option::is_none")]
12888    #[cfg_attr(
12889        feature = "builder",
12890        builder(with = |value:impl Into<String>|vec![value.into()])
12891    )]
12892    pub keywords: Option<Vec<String>>,
12893    ///Property: Legal form
12894    #[serde(skip_serializing_if = "Option::is_none")]
12895    #[cfg_attr(
12896        feature = "builder",
12897        builder(with = |value:impl Into<String>|vec![value.into()])
12898    )]
12899    pub legal_form: Option<Vec<String>>,
12900    ///Property: LEI
12901    #[serde(skip_serializing_if = "Option::is_none")]
12902    #[cfg_attr(
12903        feature = "builder",
12904        builder(with = |value:impl Into<String>|vec![value.into()])
12905    )]
12906    pub lei_code: Option<Vec<String>>,
12907    ///Property: License Number
12908    #[serde(skip_serializing_if = "Option::is_none")]
12909    #[cfg_attr(
12910        feature = "builder",
12911        builder(with = |value:impl Into<String>|vec![value.into()])
12912    )]
12913    pub license_number: Option<Vec<String>>,
12914    ///Property: Country of origin
12915    #[serde(skip_serializing_if = "Option::is_none")]
12916    #[cfg_attr(
12917        feature = "builder",
12918        builder(with = |value:impl Into<String>|vec![value.into()])
12919    )]
12920    pub main_country: Option<Vec<String>>,
12921    ///Property: Modified on
12922    #[serde(skip_serializing_if = "Option::is_none")]
12923    #[cfg_attr(
12924        feature = "builder",
12925        builder(with = |value:impl Into<String>|vec![value.into()])
12926    )]
12927    pub modified_at: Option<Vec<String>>,
12928    ///Property: Name
12929    #[serde(default)]
12930    #[cfg_attr(
12931        feature = "builder",
12932        builder(with = |value:impl Into<String>|vec![value.into()])
12933    )]
12934    pub name: Vec<String>,
12935    ///Property: Notes
12936    #[serde(skip_serializing_if = "Option::is_none")]
12937    #[cfg_attr(
12938        feature = "builder",
12939        builder(with = |value:impl Into<String>|vec![value.into()])
12940    )]
12941    pub notes: Option<Vec<String>>,
12942    ///Property: NPI
12943    #[serde(skip_serializing_if = "Option::is_none")]
12944    #[cfg_attr(
12945        feature = "builder",
12946        builder(with = |value:impl Into<String>|vec![value.into()])
12947    )]
12948    pub npi_code: Option<Vec<String>>,
12949    ///Property: OGRN
12950    #[serde(skip_serializing_if = "Option::is_none")]
12951    #[cfg_attr(
12952        feature = "builder",
12953        builder(with = |value:impl Into<String>|vec![value.into()])
12954    )]
12955    pub ogrn_code: Option<Vec<String>>,
12956    ///Property: OKPO
12957    #[serde(skip_serializing_if = "Option::is_none")]
12958    #[cfg_attr(
12959        feature = "builder",
12960        builder(with = |value:impl Into<String>|vec![value.into()])
12961    )]
12962    pub okpo_code: Option<Vec<String>>,
12963    ///Property: OpenCorporates URL
12964    #[serde(skip_serializing_if = "Option::is_none")]
12965    #[cfg_attr(
12966        feature = "builder",
12967        builder(with = |value:impl Into<String>|vec![value.into()])
12968    )]
12969    pub opencorporates_url: Option<Vec<String>>,
12970    ///Property: Parent company
12971    #[serde(skip_serializing_if = "Option::is_none")]
12972    #[cfg_attr(
12973        feature = "builder",
12974        builder(with = |value:impl Into<String>|vec![value.into()])
12975    )]
12976    pub parent: Option<Vec<String>>,
12977    ///Property: PermID
12978    #[serde(skip_serializing_if = "Option::is_none")]
12979    #[cfg_attr(
12980        feature = "builder",
12981        builder(with = |value:impl Into<String>|vec![value.into()])
12982    )]
12983    pub perm_id: Option<Vec<String>>,
12984    ///Property: Phone
12985    #[serde(skip_serializing_if = "Option::is_none")]
12986    #[cfg_attr(
12987        feature = "builder",
12988        builder(with = |value:impl Into<String>|vec![value.into()])
12989    )]
12990    pub phone: Option<Vec<String>>,
12991    ///Property: Previous name
12992    #[serde(skip_serializing_if = "Option::is_none")]
12993    #[cfg_attr(
12994        feature = "builder",
12995        builder(with = |value:impl Into<String>|vec![value.into()])
12996    )]
12997    pub previous_name: Option<Vec<String>>,
12998    ///Property: Program
12999    #[serde(skip_serializing_if = "Option::is_none")]
13000    #[cfg_attr(
13001        feature = "builder",
13002        builder(with = |value:impl Into<String>|vec![value.into()])
13003    )]
13004    pub program: Option<Vec<String>>,
13005    ///Property: Program ID
13006    #[serde(skip_serializing_if = "Option::is_none")]
13007    #[cfg_attr(
13008        feature = "builder",
13009        builder(with = |value:impl Into<String>|vec![value.into()])
13010    )]
13011    pub program_id: Option<Vec<String>>,
13012    ///Property: Source document
13013    #[serde(skip_serializing_if = "Option::is_none")]
13014    #[cfg_attr(
13015        feature = "builder",
13016        builder(with = |value:impl Into<String>|vec![value.into()])
13017    )]
13018    pub proof: Option<Vec<String>>,
13019    ///Property: Publishing source
13020    #[serde(skip_serializing_if = "Option::is_none")]
13021    #[cfg_attr(
13022        feature = "builder",
13023        builder(with = |value:impl Into<String>|vec![value.into()])
13024    )]
13025    pub publisher: Option<Vec<String>>,
13026    ///Property: Publishing source URL
13027    #[serde(skip_serializing_if = "Option::is_none")]
13028    #[cfg_attr(
13029        feature = "builder",
13030        builder(with = |value:impl Into<String>|vec![value.into()])
13031    )]
13032    pub publisher_url: Option<Vec<String>>,
13033    ///Property: Registration number
13034    #[serde(skip_serializing_if = "Option::is_none")]
13035    #[cfg_attr(
13036        feature = "builder",
13037        builder(with = |value:impl Into<String>|vec![value.into()])
13038    )]
13039    pub registration_number: Option<Vec<String>>,
13040    ///Property: Retrieved on
13041    #[serde(skip_serializing_if = "Option::is_none")]
13042    #[cfg_attr(
13043        feature = "builder",
13044        builder(with = |value:impl Into<String>|vec![value.into()])
13045    )]
13046    pub retrieved_at: Option<Vec<String>>,
13047    ///Property: Sayari Entity ID
13048    #[serde(skip_serializing_if = "Option::is_none")]
13049    #[cfg_attr(
13050        feature = "builder",
13051        builder(with = |value:impl Into<String>|vec![value.into()])
13052    )]
13053    pub sayari_id: Option<Vec<String>>,
13054    ///Property: Sector
13055    #[serde(skip_serializing_if = "Option::is_none")]
13056    #[cfg_attr(
13057        feature = "builder",
13058        builder(with = |value:impl Into<String>|vec![value.into()])
13059    )]
13060    pub sector: Option<Vec<String>>,
13061    ///Property: Source link
13062    #[serde(skip_serializing_if = "Option::is_none")]
13063    #[cfg_attr(
13064        feature = "builder",
13065        builder(with = |value:impl Into<String>|vec![value.into()])
13066    )]
13067    pub source_url: Option<Vec<String>>,
13068    ///Property: Status
13069    #[serde(skip_serializing_if = "Option::is_none")]
13070    #[cfg_attr(
13071        feature = "builder",
13072        builder(with = |value:impl Into<String>|vec![value.into()])
13073    )]
13074    pub status: Option<Vec<String>>,
13075    ///Property: Summary
13076    #[serde(skip_serializing_if = "Option::is_none")]
13077    #[cfg_attr(
13078        feature = "builder",
13079        builder(with = |value:impl Into<String>|vec![value.into()])
13080    )]
13081    pub summary: Option<Vec<String>>,
13082    ///Property: SWIFT/BIC
13083    #[serde(skip_serializing_if = "Option::is_none")]
13084    #[cfg_attr(
13085        feature = "builder",
13086        builder(with = |value:impl Into<String>|vec![value.into()])
13087    )]
13088    pub swift_bic: Option<Vec<String>>,
13089    ///Property: Tax Number
13090    #[serde(skip_serializing_if = "Option::is_none")]
13091    #[cfg_attr(
13092        feature = "builder",
13093        builder(with = |value:impl Into<String>|vec![value.into()])
13094    )]
13095    pub tax_number: Option<Vec<String>>,
13096    ///Property: Tax status
13097    #[serde(skip_serializing_if = "Option::is_none")]
13098    #[cfg_attr(
13099        feature = "builder",
13100        builder(with = |value:impl Into<String>|vec![value.into()])
13101    )]
13102    pub tax_status: Option<Vec<String>>,
13103    ///Property: Topics
13104    #[serde(skip_serializing_if = "Option::is_none")]
13105    #[cfg_attr(
13106        feature = "builder",
13107        builder(with = |value:impl Into<String>|vec![value.into()])
13108    )]
13109    pub topics: Option<Vec<String>>,
13110    ///Property: Unique Entity ID
13111    #[serde(skip_serializing_if = "Option::is_none")]
13112    #[cfg_attr(
13113        feature = "builder",
13114        builder(with = |value:impl Into<String>|vec![value.into()])
13115    )]
13116    pub unique_entity_id: Option<Vec<String>>,
13117    ///Property: USCC
13118    #[serde(skip_serializing_if = "Option::is_none")]
13119    #[cfg_attr(
13120        feature = "builder",
13121        builder(with = |value:impl Into<String>|vec![value.into()])
13122    )]
13123    pub usc_code: Option<Vec<String>>,
13124    ///Property: V.A.T. Identifier
13125    #[serde(skip_serializing_if = "Option::is_none")]
13126    #[cfg_attr(
13127        feature = "builder",
13128        builder(with = |value:impl Into<String>|vec![value.into()])
13129    )]
13130    pub vat_code: Option<Vec<String>>,
13131    ///Property: Weak alias
13132    #[serde(skip_serializing_if = "Option::is_none")]
13133    #[cfg_attr(
13134        feature = "builder",
13135        builder(with = |value:impl Into<String>|vec![value.into()])
13136    )]
13137    pub weak_alias: Option<Vec<String>>,
13138    ///Property: Website
13139    #[serde(skip_serializing_if = "Option::is_none")]
13140    #[cfg_attr(
13141        feature = "builder",
13142        builder(with = |value:impl Into<String>|vec![value.into()])
13143    )]
13144    pub website: Option<Vec<String>>,
13145    ///Property: Wikidata ID
13146    #[serde(skip_serializing_if = "Option::is_none")]
13147    #[cfg_attr(
13148        feature = "builder",
13149        builder(with = |value:impl Into<String>|vec![value.into()])
13150    )]
13151    pub wikidata_id: Option<Vec<String>>,
13152    ///Property: Wikipedia Article
13153    #[serde(skip_serializing_if = "Option::is_none")]
13154    #[cfg_attr(
13155        feature = "builder",
13156        builder(with = |value:impl Into<String>|vec![value.into()])
13157    )]
13158    pub wikipedia_url: Option<Vec<String>>,
13159}
13160impl Organization {
13161    /// Create a new entity with the given ID
13162    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
13163    pub fn new(id: impl Into<String>) -> Self {
13164        Self {
13165            id: id.into(),
13166            schema: "Organization".to_string(),
13167            abbreviation: None,
13168            address: None,
13169            address_entity: None,
13170            aleph_url: None,
13171            alias: None,
13172            bright_query_id: None,
13173            bright_query_org_id: None,
13174            bvd_id: None,
13175            cage_code: None,
13176            classification: None,
13177            country: None,
13178            created_at: None,
13179            description: None,
13180            dissolution_date: None,
13181            duns_code: None,
13182            email: None,
13183            gii_number: None,
13184            icij_id: None,
13185            id_number: None,
13186            imo_number: None,
13187            incorporation_date: None,
13188            index_text: None,
13189            inn_code: None,
13190            jurisdiction: None,
13191            keywords: None,
13192            legal_form: None,
13193            lei_code: None,
13194            license_number: None,
13195            main_country: None,
13196            modified_at: None,
13197            name: Vec::new(),
13198            notes: None,
13199            npi_code: None,
13200            ogrn_code: None,
13201            okpo_code: None,
13202            opencorporates_url: None,
13203            parent: None,
13204            perm_id: None,
13205            phone: None,
13206            previous_name: None,
13207            program: None,
13208            program_id: None,
13209            proof: None,
13210            publisher: None,
13211            publisher_url: None,
13212            registration_number: None,
13213            retrieved_at: None,
13214            sayari_id: None,
13215            sector: None,
13216            source_url: None,
13217            status: None,
13218            summary: None,
13219            swift_bic: None,
13220            tax_number: None,
13221            tax_status: None,
13222            topics: None,
13223            unique_entity_id: None,
13224            usc_code: None,
13225            vat_code: None,
13226            weak_alias: None,
13227            website: None,
13228            wikidata_id: None,
13229            wikipedia_url: None,
13230        }
13231    }
13232    /// Get the schema name
13233    pub fn schema_name() -> &'static str {
13234        "Organization"
13235    }
13236    /// Serialize to standard FTM nested JSON format
13237    ///
13238    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
13239    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
13240        let mut value = serde_json::to_value(self)?;
13241        if let Some(obj) = value.as_object_mut() {
13242            let id = obj.remove("id");
13243            let schema = obj.remove("schema");
13244            let properties = serde_json::Value::Object(std::mem::take(obj));
13245            if let Some(id) = id {
13246                obj.insert("id".into(), id);
13247            }
13248            if let Some(schema) = schema {
13249                obj.insert("schema".into(), schema);
13250            }
13251            obj.insert("properties".into(), properties);
13252        }
13253        serde_json::to_string(&value)
13254    }
13255}
13256///FTM Schema: Ownership
13257#[derive(Debug, Clone, Serialize, Deserialize)]
13258#[cfg_attr(feature = "builder", derive(Builder))]
13259#[serde(rename_all = "camelCase")]
13260pub struct Ownership {
13261    pub id: String,
13262    #[cfg_attr(feature = "builder", builder(default = "Ownership".to_string()))]
13263    pub schema: String,
13264    ///Property: Aleph URL
13265    #[serde(skip_serializing_if = "Option::is_none")]
13266    #[cfg_attr(
13267        feature = "builder",
13268        builder(with = |value:impl Into<String>|vec![value.into()])
13269    )]
13270    pub aleph_url: Option<Vec<String>>,
13271    ///Property: Asset
13272    #[serde(default)]
13273    #[cfg_attr(
13274        feature = "builder",
13275        builder(with = |value:impl Into<String>|vec![value.into()])
13276    )]
13277    pub asset: Vec<String>,
13278    ///Property: Date
13279    #[serde(skip_serializing_if = "Option::is_none")]
13280    #[cfg_attr(
13281        feature = "builder",
13282        builder(with = |value:impl Into<String>|vec![value.into()])
13283    )]
13284    pub date: Option<Vec<String>>,
13285    ///Property: Description
13286    #[serde(skip_serializing_if = "Option::is_none")]
13287    #[cfg_attr(
13288        feature = "builder",
13289        builder(with = |value:impl Into<String>|vec![value.into()])
13290    )]
13291    pub description: Option<Vec<String>>,
13292    ///Property: End date
13293    #[serde(skip_serializing_if = "Option::is_none")]
13294    #[cfg_attr(
13295        feature = "builder",
13296        builder(with = |value:impl Into<String>|vec![value.into()])
13297    )]
13298    pub end_date: Option<Vec<String>>,
13299    ///Property: Index text
13300    #[serde(skip_serializing_if = "Option::is_none")]
13301    #[cfg_attr(
13302        feature = "builder",
13303        builder(with = |value:impl Into<String>|vec![value.into()])
13304    )]
13305    pub index_text: Option<Vec<String>>,
13306    ///Property: Legal basis
13307    #[serde(skip_serializing_if = "Option::is_none")]
13308    #[cfg_attr(
13309        feature = "builder",
13310        builder(with = |value:impl Into<String>|vec![value.into()])
13311    )]
13312    pub legal_basis: Option<Vec<String>>,
13313    ///Property: Modified on
13314    #[serde(skip_serializing_if = "Option::is_none")]
13315    #[cfg_attr(
13316        feature = "builder",
13317        builder(with = |value:impl Into<String>|vec![value.into()])
13318    )]
13319    pub modified_at: Option<Vec<String>>,
13320    ///Property: Detected names
13321    #[serde(skip_serializing_if = "Option::is_none")]
13322    #[cfg_attr(
13323        feature = "builder",
13324        builder(with = |value:impl Into<String>|vec![value.into()])
13325    )]
13326    pub names_mentioned: Option<Vec<String>>,
13327    ///Property: Owner
13328    #[serde(default)]
13329    #[cfg_attr(
13330        feature = "builder",
13331        builder(with = |value:impl Into<String>|vec![value.into()])
13332    )]
13333    pub owner: Vec<String>,
13334    ///Property: Type of ownership
13335    #[serde(skip_serializing_if = "Option::is_none")]
13336    #[cfg_attr(
13337        feature = "builder",
13338        builder(with = |value:impl Into<String>|vec![value.into()])
13339    )]
13340    pub ownership_type: Option<Vec<String>>,
13341    ///Property: Percentage held
13342    #[serde(skip_serializing_if = "Option::is_none")]
13343    #[cfg_attr(
13344        feature = "builder",
13345        builder(with = |value:impl Into<String>|vec![value.into()])
13346    )]
13347    pub percentage: Option<Vec<String>>,
13348    ///Property: Source document
13349    #[serde(skip_serializing_if = "Option::is_none")]
13350    #[cfg_attr(
13351        feature = "builder",
13352        builder(with = |value:impl Into<String>|vec![value.into()])
13353    )]
13354    pub proof: Option<Vec<String>>,
13355    ///Property: Publishing source
13356    #[serde(skip_serializing_if = "Option::is_none")]
13357    #[cfg_attr(
13358        feature = "builder",
13359        builder(with = |value:impl Into<String>|vec![value.into()])
13360    )]
13361    pub publisher: Option<Vec<String>>,
13362    ///Property: Publishing source URL
13363    #[serde(skip_serializing_if = "Option::is_none")]
13364    #[cfg_attr(
13365        feature = "builder",
13366        builder(with = |value:impl Into<String>|vec![value.into()])
13367    )]
13368    pub publisher_url: Option<Vec<String>>,
13369    ///Property: Record ID
13370    #[serde(skip_serializing_if = "Option::is_none")]
13371    #[cfg_attr(
13372        feature = "builder",
13373        builder(with = |value:impl Into<String>|vec![value.into()])
13374    )]
13375    pub record_id: Option<Vec<String>>,
13376    ///Property: Retrieved on
13377    #[serde(skip_serializing_if = "Option::is_none")]
13378    #[cfg_attr(
13379        feature = "builder",
13380        builder(with = |value:impl Into<String>|vec![value.into()])
13381    )]
13382    pub retrieved_at: Option<Vec<String>>,
13383    ///Property: Role
13384    #[serde(skip_serializing_if = "Option::is_none")]
13385    #[cfg_attr(
13386        feature = "builder",
13387        builder(with = |value:impl Into<String>|vec![value.into()])
13388    )]
13389    pub role: Option<Vec<String>>,
13390    ///Property: Number of shares
13391    #[serde(skip_serializing_if = "Option::is_none")]
13392    #[cfg_attr(
13393        feature = "builder",
13394        builder(with = |value:impl Into<String>|vec![value.into()])
13395    )]
13396    pub shares_count: Option<Vec<String>>,
13397    ///Property: Currency of shares
13398    #[serde(skip_serializing_if = "Option::is_none")]
13399    #[cfg_attr(
13400        feature = "builder",
13401        builder(with = |value:impl Into<String>|vec![value.into()])
13402    )]
13403    pub shares_currency: Option<Vec<String>>,
13404    ///Property: Type of shares
13405    #[serde(skip_serializing_if = "Option::is_none")]
13406    #[cfg_attr(
13407        feature = "builder",
13408        builder(with = |value:impl Into<String>|vec![value.into()])
13409    )]
13410    pub shares_type: Option<Vec<String>>,
13411    ///Property: Value of shares
13412    #[serde(skip_serializing_if = "Option::is_none")]
13413    #[cfg_attr(
13414        feature = "builder",
13415        builder(with = |value:impl Into<String>|vec![value.into()])
13416    )]
13417    pub shares_value: Option<Vec<String>>,
13418    ///Property: Source link
13419    #[serde(skip_serializing_if = "Option::is_none")]
13420    #[cfg_attr(
13421        feature = "builder",
13422        builder(with = |value:impl Into<String>|vec![value.into()])
13423    )]
13424    pub source_url: Option<Vec<String>>,
13425    ///Property: Start date
13426    #[serde(skip_serializing_if = "Option::is_none")]
13427    #[cfg_attr(
13428        feature = "builder",
13429        builder(with = |value:impl Into<String>|vec![value.into()])
13430    )]
13431    pub start_date: Option<Vec<String>>,
13432    ///Property: Status
13433    #[serde(skip_serializing_if = "Option::is_none")]
13434    #[cfg_attr(
13435        feature = "builder",
13436        builder(with = |value:impl Into<String>|vec![value.into()])
13437    )]
13438    pub status: Option<Vec<String>>,
13439    ///Property: Summary
13440    #[serde(skip_serializing_if = "Option::is_none")]
13441    #[cfg_attr(
13442        feature = "builder",
13443        builder(with = |value:impl Into<String>|vec![value.into()])
13444    )]
13445    pub summary: Option<Vec<String>>,
13446}
13447impl Ownership {
13448    /// Create a new entity with the given ID
13449    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
13450    pub fn new(id: impl Into<String>) -> Self {
13451        Self {
13452            id: id.into(),
13453            schema: "Ownership".to_string(),
13454            aleph_url: None,
13455            asset: Vec::new(),
13456            date: None,
13457            description: None,
13458            end_date: None,
13459            index_text: None,
13460            legal_basis: None,
13461            modified_at: None,
13462            names_mentioned: None,
13463            owner: Vec::new(),
13464            ownership_type: None,
13465            percentage: None,
13466            proof: None,
13467            publisher: None,
13468            publisher_url: None,
13469            record_id: None,
13470            retrieved_at: None,
13471            role: None,
13472            shares_count: None,
13473            shares_currency: None,
13474            shares_type: None,
13475            shares_value: None,
13476            source_url: None,
13477            start_date: None,
13478            status: None,
13479            summary: None,
13480        }
13481    }
13482    /// Get the schema name
13483    pub fn schema_name() -> &'static str {
13484        "Ownership"
13485    }
13486    /// Serialize to standard FTM nested JSON format
13487    ///
13488    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
13489    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
13490        let mut value = serde_json::to_value(self)?;
13491        if let Some(obj) = value.as_object_mut() {
13492            let id = obj.remove("id");
13493            let schema = obj.remove("schema");
13494            let properties = serde_json::Value::Object(std::mem::take(obj));
13495            if let Some(id) = id {
13496                obj.insert("id".into(), id);
13497            }
13498            if let Some(schema) = schema {
13499                obj.insert("schema".into(), schema);
13500            }
13501            obj.insert("properties".into(), properties);
13502        }
13503        serde_json::to_string(&value)
13504    }
13505}
13506///FTM Schema: Package
13507#[derive(Debug, Clone, Serialize, Deserialize)]
13508#[cfg_attr(feature = "builder", derive(Builder))]
13509#[serde(rename_all = "camelCase")]
13510pub struct Package {
13511    pub id: String,
13512    #[cfg_attr(feature = "builder", builder(default = "Package".to_string()))]
13513    pub schema: String,
13514    ///Property: Address
13515    #[serde(skip_serializing_if = "Option::is_none")]
13516    #[cfg_attr(
13517        feature = "builder",
13518        builder(with = |value:impl Into<String>|vec![value.into()])
13519    )]
13520    pub address: Option<Vec<String>>,
13521    ///Property: Address
13522    #[serde(skip_serializing_if = "Option::is_none")]
13523    #[cfg_attr(
13524        feature = "builder",
13525        builder(with = |value:impl Into<String>|vec![value.into()])
13526    )]
13527    pub address_entity: Option<Vec<String>>,
13528    ///Property: Aleph URL
13529    #[serde(skip_serializing_if = "Option::is_none")]
13530    #[cfg_attr(
13531        feature = "builder",
13532        builder(with = |value:impl Into<String>|vec![value.into()])
13533    )]
13534    pub aleph_url: Option<Vec<String>>,
13535    ///Property: Alias
13536    #[serde(skip_serializing_if = "Option::is_none")]
13537    #[cfg_attr(
13538        feature = "builder",
13539        builder(with = |value:impl Into<String>|vec![value.into()])
13540    )]
13541    pub alias: Option<Vec<String>>,
13542    ///Property: Ancestors
13543    #[serde(skip_serializing_if = "Option::is_none")]
13544    #[cfg_attr(
13545        feature = "builder",
13546        builder(with = |value:impl Into<String>|vec![value.into()])
13547    )]
13548    pub ancestors: Option<Vec<String>>,
13549    ///Property: Author
13550    #[serde(skip_serializing_if = "Option::is_none")]
13551    #[cfg_attr(
13552        feature = "builder",
13553        builder(with = |value:impl Into<String>|vec![value.into()])
13554    )]
13555    pub author: Option<Vec<String>>,
13556    ///Property: Authored on
13557    #[serde(skip_serializing_if = "Option::is_none")]
13558    #[cfg_attr(
13559        feature = "builder",
13560        builder(with = |value:impl Into<String>|vec![value.into()])
13561    )]
13562    pub authored_at: Option<Vec<String>>,
13563    ///Property: Text
13564    #[serde(skip_serializing_if = "Option::is_none")]
13565    #[cfg_attr(
13566        feature = "builder",
13567        builder(with = |value:impl Into<String>|vec![value.into()])
13568    )]
13569    pub body_text: Option<Vec<String>>,
13570    ///Property: Detected companies
13571    #[serde(skip_serializing_if = "Option::is_none")]
13572    #[cfg_attr(
13573        feature = "builder",
13574        builder(with = |value:impl Into<String>|vec![value.into()])
13575    )]
13576    pub companies_mentioned: Option<Vec<String>>,
13577    ///Property: Checksum
13578    #[serde(skip_serializing_if = "Option::is_none")]
13579    #[cfg_attr(
13580        feature = "builder",
13581        builder(with = |value:impl Into<String>|vec![value.into()])
13582    )]
13583    pub content_hash: Option<Vec<String>>,
13584    ///Property: Country
13585    #[serde(skip_serializing_if = "Option::is_none")]
13586    #[cfg_attr(
13587        feature = "builder",
13588        builder(with = |value:impl Into<String>|vec![value.into()])
13589    )]
13590    pub country: Option<Vec<String>>,
13591    ///Property: Crawler
13592    #[serde(skip_serializing_if = "Option::is_none")]
13593    #[cfg_attr(
13594        feature = "builder",
13595        builder(with = |value:impl Into<String>|vec![value.into()])
13596    )]
13597    pub crawler: Option<Vec<String>>,
13598    ///Property: Created at
13599    #[serde(skip_serializing_if = "Option::is_none")]
13600    #[cfg_attr(
13601        feature = "builder",
13602        builder(with = |value:impl Into<String>|vec![value.into()])
13603    )]
13604    pub created_at: Option<Vec<String>>,
13605    ///Property: Date
13606    #[serde(skip_serializing_if = "Option::is_none")]
13607    #[cfg_attr(
13608        feature = "builder",
13609        builder(with = |value:impl Into<String>|vec![value.into()])
13610    )]
13611    pub date: Option<Vec<String>>,
13612    ///Property: Description
13613    #[serde(skip_serializing_if = "Option::is_none")]
13614    #[cfg_attr(
13615        feature = "builder",
13616        builder(with = |value:impl Into<String>|vec![value.into()])
13617    )]
13618    pub description: Option<Vec<String>>,
13619    ///Property: Detected country
13620    #[serde(skip_serializing_if = "Option::is_none")]
13621    #[cfg_attr(
13622        feature = "builder",
13623        builder(with = |value:impl Into<String>|vec![value.into()])
13624    )]
13625    pub detected_country: Option<Vec<String>>,
13626    ///Property: Detected language
13627    #[serde(skip_serializing_if = "Option::is_none")]
13628    #[cfg_attr(
13629        feature = "builder",
13630        builder(with = |value:impl Into<String>|vec![value.into()])
13631    )]
13632    pub detected_language: Option<Vec<String>>,
13633    ///Property: Detected e-mail addresses
13634    #[serde(skip_serializing_if = "Option::is_none")]
13635    #[cfg_attr(
13636        feature = "builder",
13637        builder(with = |value:impl Into<String>|vec![value.into()])
13638    )]
13639    pub email_mentioned: Option<Vec<String>>,
13640    ///Property: File encoding
13641    #[serde(skip_serializing_if = "Option::is_none")]
13642    #[cfg_attr(
13643        feature = "builder",
13644        builder(with = |value:impl Into<String>|vec![value.into()])
13645    )]
13646    pub encoding: Option<Vec<String>>,
13647    ///Property: File extension
13648    #[serde(skip_serializing_if = "Option::is_none")]
13649    #[cfg_attr(
13650        feature = "builder",
13651        builder(with = |value:impl Into<String>|vec![value.into()])
13652    )]
13653    pub extension: Option<Vec<String>>,
13654    ///Property: File name
13655    #[serde(default)]
13656    #[cfg_attr(
13657        feature = "builder",
13658        builder(with = |value:impl Into<String>|vec![value.into()])
13659    )]
13660    pub file_name: Vec<String>,
13661    ///Property: File size
13662    #[serde(
13663        skip_serializing_if = "Option::is_none",
13664        deserialize_with = "deserialize_opt_f64_vec",
13665        default
13666    )]
13667    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
13668    pub file_size: Option<Vec<f64>>,
13669    ///Property: Generator
13670    #[serde(skip_serializing_if = "Option::is_none")]
13671    #[cfg_attr(
13672        feature = "builder",
13673        builder(with = |value:impl Into<String>|vec![value.into()])
13674    )]
13675    pub generator: Option<Vec<String>>,
13676    ///Property: Detected IBANs
13677    #[serde(skip_serializing_if = "Option::is_none")]
13678    #[cfg_attr(
13679        feature = "builder",
13680        builder(with = |value:impl Into<String>|vec![value.into()])
13681    )]
13682    pub iban_mentioned: Option<Vec<String>>,
13683    ///Property: Index text
13684    #[serde(skip_serializing_if = "Option::is_none")]
13685    #[cfg_attr(
13686        feature = "builder",
13687        builder(with = |value:impl Into<String>|vec![value.into()])
13688    )]
13689    pub index_text: Option<Vec<String>>,
13690    ///Property: Detected IP addresses
13691    #[serde(skip_serializing_if = "Option::is_none")]
13692    #[cfg_attr(
13693        feature = "builder",
13694        builder(with = |value:impl Into<String>|vec![value.into()])
13695    )]
13696    pub ip_mentioned: Option<Vec<String>>,
13697    ///Property: Keywords
13698    #[serde(skip_serializing_if = "Option::is_none")]
13699    #[cfg_attr(
13700        feature = "builder",
13701        builder(with = |value:impl Into<String>|vec![value.into()])
13702    )]
13703    pub keywords: Option<Vec<String>>,
13704    ///Property: Language
13705    #[serde(skip_serializing_if = "Option::is_none")]
13706    #[cfg_attr(
13707        feature = "builder",
13708        builder(with = |value:impl Into<String>|vec![value.into()])
13709    )]
13710    pub language: Option<Vec<String>>,
13711    ///Property: Detected locations
13712    #[serde(skip_serializing_if = "Option::is_none")]
13713    #[cfg_attr(
13714        feature = "builder",
13715        builder(with = |value:impl Into<String>|vec![value.into()])
13716    )]
13717    pub location_mentioned: Option<Vec<String>>,
13718    ///Property: Message ID
13719    #[serde(skip_serializing_if = "Option::is_none")]
13720    #[cfg_attr(
13721        feature = "builder",
13722        builder(with = |value:impl Into<String>|vec![value.into()])
13723    )]
13724    pub message_id: Option<Vec<String>>,
13725    ///Property: MIME type
13726    #[serde(skip_serializing_if = "Option::is_none")]
13727    #[cfg_attr(
13728        feature = "builder",
13729        builder(with = |value:impl Into<String>|vec![value.into()])
13730    )]
13731    pub mime_type: Option<Vec<String>>,
13732    ///Property: Modified on
13733    #[serde(skip_serializing_if = "Option::is_none")]
13734    #[cfg_attr(
13735        feature = "builder",
13736        builder(with = |value:impl Into<String>|vec![value.into()])
13737    )]
13738    pub modified_at: Option<Vec<String>>,
13739    ///Property: Name
13740    #[serde(default)]
13741    #[cfg_attr(
13742        feature = "builder",
13743        builder(with = |value:impl Into<String>|vec![value.into()])
13744    )]
13745    pub name: Vec<String>,
13746    ///Property: Detected names
13747    #[serde(skip_serializing_if = "Option::is_none")]
13748    #[cfg_attr(
13749        feature = "builder",
13750        builder(with = |value:impl Into<String>|vec![value.into()])
13751    )]
13752    pub names_mentioned: Option<Vec<String>>,
13753    ///Property: Notes
13754    #[serde(skip_serializing_if = "Option::is_none")]
13755    #[cfg_attr(
13756        feature = "builder",
13757        builder(with = |value:impl Into<String>|vec![value.into()])
13758    )]
13759    pub notes: Option<Vec<String>>,
13760    ///Property: Folder
13761    #[serde(skip_serializing_if = "Option::is_none")]
13762    #[cfg_attr(
13763        feature = "builder",
13764        builder(with = |value:impl Into<String>|vec![value.into()])
13765    )]
13766    pub parent: Option<Vec<String>>,
13767    ///Property: Detected people
13768    #[serde(skip_serializing_if = "Option::is_none")]
13769    #[cfg_attr(
13770        feature = "builder",
13771        builder(with = |value:impl Into<String>|vec![value.into()])
13772    )]
13773    pub people_mentioned: Option<Vec<String>>,
13774    ///Property: Detected phones
13775    #[serde(skip_serializing_if = "Option::is_none")]
13776    #[cfg_attr(
13777        feature = "builder",
13778        builder(with = |value:impl Into<String>|vec![value.into()])
13779    )]
13780    pub phone_mentioned: Option<Vec<String>>,
13781    ///Property: Previous name
13782    #[serde(skip_serializing_if = "Option::is_none")]
13783    #[cfg_attr(
13784        feature = "builder",
13785        builder(with = |value:impl Into<String>|vec![value.into()])
13786    )]
13787    pub previous_name: Option<Vec<String>>,
13788    ///Property: Processed at
13789    #[serde(skip_serializing_if = "Option::is_none")]
13790    #[cfg_attr(
13791        feature = "builder",
13792        builder(with = |value:impl Into<String>|vec![value.into()])
13793    )]
13794    pub processed_at: Option<Vec<String>>,
13795    ///Property: Processing agent
13796    #[serde(skip_serializing_if = "Option::is_none")]
13797    #[cfg_attr(
13798        feature = "builder",
13799        builder(with = |value:impl Into<String>|vec![value.into()])
13800    )]
13801    pub processing_agent: Option<Vec<String>>,
13802    ///Property: Processing error
13803    #[serde(skip_serializing_if = "Option::is_none")]
13804    #[cfg_attr(
13805        feature = "builder",
13806        builder(with = |value:impl Into<String>|vec![value.into()])
13807    )]
13808    pub processing_error: Option<Vec<String>>,
13809    ///Property: Processing status
13810    #[serde(skip_serializing_if = "Option::is_none")]
13811    #[cfg_attr(
13812        feature = "builder",
13813        builder(with = |value:impl Into<String>|vec![value.into()])
13814    )]
13815    pub processing_status: Option<Vec<String>>,
13816    ///Property: Program
13817    #[serde(skip_serializing_if = "Option::is_none")]
13818    #[cfg_attr(
13819        feature = "builder",
13820        builder(with = |value:impl Into<String>|vec![value.into()])
13821    )]
13822    pub program: Option<Vec<String>>,
13823    ///Property: Program ID
13824    #[serde(skip_serializing_if = "Option::is_none")]
13825    #[cfg_attr(
13826        feature = "builder",
13827        builder(with = |value:impl Into<String>|vec![value.into()])
13828    )]
13829    pub program_id: Option<Vec<String>>,
13830    ///Property: Source document
13831    #[serde(skip_serializing_if = "Option::is_none")]
13832    #[cfg_attr(
13833        feature = "builder",
13834        builder(with = |value:impl Into<String>|vec![value.into()])
13835    )]
13836    pub proof: Option<Vec<String>>,
13837    ///Property: Published on
13838    #[serde(skip_serializing_if = "Option::is_none")]
13839    #[cfg_attr(
13840        feature = "builder",
13841        builder(with = |value:impl Into<String>|vec![value.into()])
13842    )]
13843    pub published_at: Option<Vec<String>>,
13844    ///Property: Publishing source
13845    #[serde(skip_serializing_if = "Option::is_none")]
13846    #[cfg_attr(
13847        feature = "builder",
13848        builder(with = |value:impl Into<String>|vec![value.into()])
13849    )]
13850    pub publisher: Option<Vec<String>>,
13851    ///Property: Publishing source URL
13852    #[serde(skip_serializing_if = "Option::is_none")]
13853    #[cfg_attr(
13854        feature = "builder",
13855        builder(with = |value:impl Into<String>|vec![value.into()])
13856    )]
13857    pub publisher_url: Option<Vec<String>>,
13858    ///Property: Retrieved on
13859    #[serde(skip_serializing_if = "Option::is_none")]
13860    #[cfg_attr(
13861        feature = "builder",
13862        builder(with = |value:impl Into<String>|vec![value.into()])
13863    )]
13864    pub retrieved_at: Option<Vec<String>>,
13865    ///Property: Source link
13866    #[serde(skip_serializing_if = "Option::is_none")]
13867    #[cfg_attr(
13868        feature = "builder",
13869        builder(with = |value:impl Into<String>|vec![value.into()])
13870    )]
13871    pub source_url: Option<Vec<String>>,
13872    ///Property: Summary
13873    #[serde(skip_serializing_if = "Option::is_none")]
13874    #[cfg_attr(
13875        feature = "builder",
13876        builder(with = |value:impl Into<String>|vec![value.into()])
13877    )]
13878    pub summary: Option<Vec<String>>,
13879    ///Property: Title
13880    #[serde(skip_serializing_if = "Option::is_none")]
13881    #[cfg_attr(
13882        feature = "builder",
13883        builder(with = |value:impl Into<String>|vec![value.into()])
13884    )]
13885    pub title: Option<Vec<String>>,
13886    ///Property: Topics
13887    #[serde(skip_serializing_if = "Option::is_none")]
13888    #[cfg_attr(
13889        feature = "builder",
13890        builder(with = |value:impl Into<String>|vec![value.into()])
13891    )]
13892    pub topics: Option<Vec<String>>,
13893    ///Property: The language of the translated text
13894    #[serde(skip_serializing_if = "Option::is_none")]
13895    #[cfg_attr(
13896        feature = "builder",
13897        builder(with = |value:impl Into<String>|vec![value.into()])
13898    )]
13899    pub translated_language: Option<Vec<String>>,
13900    ///Property: Translated version of the body text
13901    #[serde(skip_serializing_if = "Option::is_none")]
13902    #[cfg_attr(
13903        feature = "builder",
13904        builder(with = |value:impl Into<String>|vec![value.into()])
13905    )]
13906    pub translated_text: Option<Vec<String>>,
13907    ///Property: Weak alias
13908    #[serde(skip_serializing_if = "Option::is_none")]
13909    #[cfg_attr(
13910        feature = "builder",
13911        builder(with = |value:impl Into<String>|vec![value.into()])
13912    )]
13913    pub weak_alias: Option<Vec<String>>,
13914    ///Property: Wikidata ID
13915    #[serde(skip_serializing_if = "Option::is_none")]
13916    #[cfg_attr(
13917        feature = "builder",
13918        builder(with = |value:impl Into<String>|vec![value.into()])
13919    )]
13920    pub wikidata_id: Option<Vec<String>>,
13921    ///Property: Wikipedia Article
13922    #[serde(skip_serializing_if = "Option::is_none")]
13923    #[cfg_attr(
13924        feature = "builder",
13925        builder(with = |value:impl Into<String>|vec![value.into()])
13926    )]
13927    pub wikipedia_url: Option<Vec<String>>,
13928}
13929impl Package {
13930    /// Create a new entity with the given ID
13931    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
13932    pub fn new(id: impl Into<String>) -> Self {
13933        Self {
13934            id: id.into(),
13935            schema: "Package".to_string(),
13936            address: None,
13937            address_entity: None,
13938            aleph_url: None,
13939            alias: None,
13940            ancestors: None,
13941            author: None,
13942            authored_at: None,
13943            body_text: None,
13944            companies_mentioned: None,
13945            content_hash: None,
13946            country: None,
13947            crawler: None,
13948            created_at: None,
13949            date: None,
13950            description: None,
13951            detected_country: None,
13952            detected_language: None,
13953            email_mentioned: None,
13954            encoding: None,
13955            extension: None,
13956            file_name: Vec::new(),
13957            file_size: None,
13958            generator: None,
13959            iban_mentioned: None,
13960            index_text: None,
13961            ip_mentioned: None,
13962            keywords: None,
13963            language: None,
13964            location_mentioned: None,
13965            message_id: None,
13966            mime_type: None,
13967            modified_at: None,
13968            name: Vec::new(),
13969            names_mentioned: None,
13970            notes: None,
13971            parent: None,
13972            people_mentioned: None,
13973            phone_mentioned: None,
13974            previous_name: None,
13975            processed_at: None,
13976            processing_agent: None,
13977            processing_error: None,
13978            processing_status: None,
13979            program: None,
13980            program_id: None,
13981            proof: None,
13982            published_at: None,
13983            publisher: None,
13984            publisher_url: None,
13985            retrieved_at: None,
13986            source_url: None,
13987            summary: None,
13988            title: None,
13989            topics: None,
13990            translated_language: None,
13991            translated_text: None,
13992            weak_alias: None,
13993            wikidata_id: None,
13994            wikipedia_url: None,
13995        }
13996    }
13997    /// Get the schema name
13998    pub fn schema_name() -> &'static str {
13999        "Package"
14000    }
14001    /// Serialize to standard FTM nested JSON format
14002    ///
14003    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
14004    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
14005        let mut value = serde_json::to_value(self)?;
14006        if let Some(obj) = value.as_object_mut() {
14007            let id = obj.remove("id");
14008            let schema = obj.remove("schema");
14009            let properties = serde_json::Value::Object(std::mem::take(obj));
14010            if let Some(id) = id {
14011                obj.insert("id".into(), id);
14012            }
14013            if let Some(schema) = schema {
14014                obj.insert("schema".into(), schema);
14015            }
14016            obj.insert("properties".into(), properties);
14017        }
14018        serde_json::to_string(&value)
14019    }
14020}
14021///FTM Schema: Page
14022#[derive(Debug, Clone, Serialize, Deserialize)]
14023#[cfg_attr(feature = "builder", derive(Builder))]
14024#[serde(rename_all = "camelCase")]
14025pub struct Page {
14026    pub id: String,
14027    #[cfg_attr(feature = "builder", builder(default = "Page".to_string()))]
14028    pub schema: String,
14029    ///Property: Text
14030    #[serde(skip_serializing_if = "Option::is_none")]
14031    #[cfg_attr(
14032        feature = "builder",
14033        builder(with = |value:impl Into<String>|vec![value.into()])
14034    )]
14035    pub body_text: Option<Vec<String>>,
14036    ///Property: Detected language
14037    #[serde(skip_serializing_if = "Option::is_none")]
14038    #[cfg_attr(
14039        feature = "builder",
14040        builder(with = |value:impl Into<String>|vec![value.into()])
14041    )]
14042    pub detected_language: Option<Vec<String>>,
14043    ///Property: Document
14044    #[serde(skip_serializing_if = "Option::is_none")]
14045    #[cfg_attr(
14046        feature = "builder",
14047        builder(with = |value:impl Into<String>|vec![value.into()])
14048    )]
14049    pub document: Option<Vec<String>>,
14050    ///Property: Index
14051    #[serde(
14052        skip_serializing_if = "Option::is_none",
14053        deserialize_with = "deserialize_opt_f64_vec",
14054        default
14055    )]
14056    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
14057    pub index: Option<Vec<f64>>,
14058    ///Property: Index text
14059    #[serde(skip_serializing_if = "Option::is_none")]
14060    #[cfg_attr(
14061        feature = "builder",
14062        builder(with = |value:impl Into<String>|vec![value.into()])
14063    )]
14064    pub index_text: Option<Vec<String>>,
14065    ///Property: Translated version of the body text
14066    #[serde(skip_serializing_if = "Option::is_none")]
14067    #[cfg_attr(
14068        feature = "builder",
14069        builder(with = |value:impl Into<String>|vec![value.into()])
14070    )]
14071    pub translated_text: Option<Vec<String>>,
14072    ///Property: The language of the translated text
14073    #[serde(skip_serializing_if = "Option::is_none")]
14074    #[cfg_attr(
14075        feature = "builder",
14076        builder(with = |value:impl Into<String>|vec![value.into()])
14077    )]
14078    pub translated_text_language: Option<Vec<String>>,
14079}
14080impl Page {
14081    /// Create a new entity with the given ID
14082    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
14083    pub fn new(id: impl Into<String>) -> Self {
14084        Self {
14085            id: id.into(),
14086            schema: "Page".to_string(),
14087            body_text: None,
14088            detected_language: None,
14089            document: None,
14090            index: None,
14091            index_text: None,
14092            translated_text: None,
14093            translated_text_language: None,
14094        }
14095    }
14096    /// Get the schema name
14097    pub fn schema_name() -> &'static str {
14098        "Page"
14099    }
14100    /// Serialize to standard FTM nested JSON format
14101    ///
14102    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
14103    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
14104        let mut value = serde_json::to_value(self)?;
14105        if let Some(obj) = value.as_object_mut() {
14106            let id = obj.remove("id");
14107            let schema = obj.remove("schema");
14108            let properties = serde_json::Value::Object(std::mem::take(obj));
14109            if let Some(id) = id {
14110                obj.insert("id".into(), id);
14111            }
14112            if let Some(schema) = schema {
14113                obj.insert("schema".into(), schema);
14114            }
14115            obj.insert("properties".into(), properties);
14116        }
14117        serde_json::to_string(&value)
14118    }
14119}
14120///FTM Schema: Document
14121#[derive(Debug, Clone, Serialize, Deserialize)]
14122#[cfg_attr(feature = "builder", derive(Builder))]
14123#[serde(rename_all = "camelCase")]
14124pub struct Pages {
14125    pub id: String,
14126    #[cfg_attr(feature = "builder", builder(default = "Pages".to_string()))]
14127    pub schema: String,
14128    ///Property: Address
14129    #[serde(skip_serializing_if = "Option::is_none")]
14130    #[cfg_attr(
14131        feature = "builder",
14132        builder(with = |value:impl Into<String>|vec![value.into()])
14133    )]
14134    pub address: Option<Vec<String>>,
14135    ///Property: Address
14136    #[serde(skip_serializing_if = "Option::is_none")]
14137    #[cfg_attr(
14138        feature = "builder",
14139        builder(with = |value:impl Into<String>|vec![value.into()])
14140    )]
14141    pub address_entity: Option<Vec<String>>,
14142    ///Property: Aleph URL
14143    #[serde(skip_serializing_if = "Option::is_none")]
14144    #[cfg_attr(
14145        feature = "builder",
14146        builder(with = |value:impl Into<String>|vec![value.into()])
14147    )]
14148    pub aleph_url: Option<Vec<String>>,
14149    ///Property: Alias
14150    #[serde(skip_serializing_if = "Option::is_none")]
14151    #[cfg_attr(
14152        feature = "builder",
14153        builder(with = |value:impl Into<String>|vec![value.into()])
14154    )]
14155    pub alias: Option<Vec<String>>,
14156    ///Property: Ancestors
14157    #[serde(skip_serializing_if = "Option::is_none")]
14158    #[cfg_attr(
14159        feature = "builder",
14160        builder(with = |value:impl Into<String>|vec![value.into()])
14161    )]
14162    pub ancestors: Option<Vec<String>>,
14163    ///Property: Author
14164    #[serde(skip_serializing_if = "Option::is_none")]
14165    #[cfg_attr(
14166        feature = "builder",
14167        builder(with = |value:impl Into<String>|vec![value.into()])
14168    )]
14169    pub author: Option<Vec<String>>,
14170    ///Property: Authored on
14171    #[serde(skip_serializing_if = "Option::is_none")]
14172    #[cfg_attr(
14173        feature = "builder",
14174        builder(with = |value:impl Into<String>|vec![value.into()])
14175    )]
14176    pub authored_at: Option<Vec<String>>,
14177    ///Property: Text
14178    #[serde(skip_serializing_if = "Option::is_none")]
14179    #[cfg_attr(
14180        feature = "builder",
14181        builder(with = |value:impl Into<String>|vec![value.into()])
14182    )]
14183    pub body_text: Option<Vec<String>>,
14184    ///Property: Detected companies
14185    #[serde(skip_serializing_if = "Option::is_none")]
14186    #[cfg_attr(
14187        feature = "builder",
14188        builder(with = |value:impl Into<String>|vec![value.into()])
14189    )]
14190    pub companies_mentioned: Option<Vec<String>>,
14191    ///Property: Checksum
14192    #[serde(skip_serializing_if = "Option::is_none")]
14193    #[cfg_attr(
14194        feature = "builder",
14195        builder(with = |value:impl Into<String>|vec![value.into()])
14196    )]
14197    pub content_hash: Option<Vec<String>>,
14198    ///Property: Country
14199    #[serde(skip_serializing_if = "Option::is_none")]
14200    #[cfg_attr(
14201        feature = "builder",
14202        builder(with = |value:impl Into<String>|vec![value.into()])
14203    )]
14204    pub country: Option<Vec<String>>,
14205    ///Property: Crawler
14206    #[serde(skip_serializing_if = "Option::is_none")]
14207    #[cfg_attr(
14208        feature = "builder",
14209        builder(with = |value:impl Into<String>|vec![value.into()])
14210    )]
14211    pub crawler: Option<Vec<String>>,
14212    ///Property: Created at
14213    #[serde(skip_serializing_if = "Option::is_none")]
14214    #[cfg_attr(
14215        feature = "builder",
14216        builder(with = |value:impl Into<String>|vec![value.into()])
14217    )]
14218    pub created_at: Option<Vec<String>>,
14219    ///Property: Date
14220    #[serde(skip_serializing_if = "Option::is_none")]
14221    #[cfg_attr(
14222        feature = "builder",
14223        builder(with = |value:impl Into<String>|vec![value.into()])
14224    )]
14225    pub date: Option<Vec<String>>,
14226    ///Property: Description
14227    #[serde(skip_serializing_if = "Option::is_none")]
14228    #[cfg_attr(
14229        feature = "builder",
14230        builder(with = |value:impl Into<String>|vec![value.into()])
14231    )]
14232    pub description: Option<Vec<String>>,
14233    ///Property: Detected country
14234    #[serde(skip_serializing_if = "Option::is_none")]
14235    #[cfg_attr(
14236        feature = "builder",
14237        builder(with = |value:impl Into<String>|vec![value.into()])
14238    )]
14239    pub detected_country: Option<Vec<String>>,
14240    ///Property: Detected language
14241    #[serde(skip_serializing_if = "Option::is_none")]
14242    #[cfg_attr(
14243        feature = "builder",
14244        builder(with = |value:impl Into<String>|vec![value.into()])
14245    )]
14246    pub detected_language: Option<Vec<String>>,
14247    ///Property: Detected e-mail addresses
14248    #[serde(skip_serializing_if = "Option::is_none")]
14249    #[cfg_attr(
14250        feature = "builder",
14251        builder(with = |value:impl Into<String>|vec![value.into()])
14252    )]
14253    pub email_mentioned: Option<Vec<String>>,
14254    ///Property: File encoding
14255    #[serde(skip_serializing_if = "Option::is_none")]
14256    #[cfg_attr(
14257        feature = "builder",
14258        builder(with = |value:impl Into<String>|vec![value.into()])
14259    )]
14260    pub encoding: Option<Vec<String>>,
14261    ///Property: File extension
14262    #[serde(skip_serializing_if = "Option::is_none")]
14263    #[cfg_attr(
14264        feature = "builder",
14265        builder(with = |value:impl Into<String>|vec![value.into()])
14266    )]
14267    pub extension: Option<Vec<String>>,
14268    ///Property: File name
14269    #[serde(default)]
14270    #[cfg_attr(
14271        feature = "builder",
14272        builder(with = |value:impl Into<String>|vec![value.into()])
14273    )]
14274    pub file_name: Vec<String>,
14275    ///Property: File size
14276    #[serde(
14277        skip_serializing_if = "Option::is_none",
14278        deserialize_with = "deserialize_opt_f64_vec",
14279        default
14280    )]
14281    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
14282    pub file_size: Option<Vec<f64>>,
14283    ///Property: Generator
14284    #[serde(skip_serializing_if = "Option::is_none")]
14285    #[cfg_attr(
14286        feature = "builder",
14287        builder(with = |value:impl Into<String>|vec![value.into()])
14288    )]
14289    pub generator: Option<Vec<String>>,
14290    ///Property: Detected IBANs
14291    #[serde(skip_serializing_if = "Option::is_none")]
14292    #[cfg_attr(
14293        feature = "builder",
14294        builder(with = |value:impl Into<String>|vec![value.into()])
14295    )]
14296    pub iban_mentioned: Option<Vec<String>>,
14297    ///Property: Index text
14298    #[serde(skip_serializing_if = "Option::is_none")]
14299    #[cfg_attr(
14300        feature = "builder",
14301        builder(with = |value:impl Into<String>|vec![value.into()])
14302    )]
14303    pub index_text: Option<Vec<String>>,
14304    ///Property: Detected IP addresses
14305    #[serde(skip_serializing_if = "Option::is_none")]
14306    #[cfg_attr(
14307        feature = "builder",
14308        builder(with = |value:impl Into<String>|vec![value.into()])
14309    )]
14310    pub ip_mentioned: Option<Vec<String>>,
14311    ///Property: Keywords
14312    #[serde(skip_serializing_if = "Option::is_none")]
14313    #[cfg_attr(
14314        feature = "builder",
14315        builder(with = |value:impl Into<String>|vec![value.into()])
14316    )]
14317    pub keywords: Option<Vec<String>>,
14318    ///Property: Language
14319    #[serde(skip_serializing_if = "Option::is_none")]
14320    #[cfg_attr(
14321        feature = "builder",
14322        builder(with = |value:impl Into<String>|vec![value.into()])
14323    )]
14324    pub language: Option<Vec<String>>,
14325    ///Property: Detected locations
14326    #[serde(skip_serializing_if = "Option::is_none")]
14327    #[cfg_attr(
14328        feature = "builder",
14329        builder(with = |value:impl Into<String>|vec![value.into()])
14330    )]
14331    pub location_mentioned: Option<Vec<String>>,
14332    ///Property: Message ID
14333    #[serde(skip_serializing_if = "Option::is_none")]
14334    #[cfg_attr(
14335        feature = "builder",
14336        builder(with = |value:impl Into<String>|vec![value.into()])
14337    )]
14338    pub message_id: Option<Vec<String>>,
14339    ///Property: MIME type
14340    #[serde(skip_serializing_if = "Option::is_none")]
14341    #[cfg_attr(
14342        feature = "builder",
14343        builder(with = |value:impl Into<String>|vec![value.into()])
14344    )]
14345    pub mime_type: Option<Vec<String>>,
14346    ///Property: Modified on
14347    #[serde(skip_serializing_if = "Option::is_none")]
14348    #[cfg_attr(
14349        feature = "builder",
14350        builder(with = |value:impl Into<String>|vec![value.into()])
14351    )]
14352    pub modified_at: Option<Vec<String>>,
14353    ///Property: Name
14354    #[serde(default)]
14355    #[cfg_attr(
14356        feature = "builder",
14357        builder(with = |value:impl Into<String>|vec![value.into()])
14358    )]
14359    pub name: Vec<String>,
14360    ///Property: Detected names
14361    #[serde(skip_serializing_if = "Option::is_none")]
14362    #[cfg_attr(
14363        feature = "builder",
14364        builder(with = |value:impl Into<String>|vec![value.into()])
14365    )]
14366    pub names_mentioned: Option<Vec<String>>,
14367    ///Property: Notes
14368    #[serde(skip_serializing_if = "Option::is_none")]
14369    #[cfg_attr(
14370        feature = "builder",
14371        builder(with = |value:impl Into<String>|vec![value.into()])
14372    )]
14373    pub notes: Option<Vec<String>>,
14374    ///Property: Folder
14375    #[serde(skip_serializing_if = "Option::is_none")]
14376    #[cfg_attr(
14377        feature = "builder",
14378        builder(with = |value:impl Into<String>|vec![value.into()])
14379    )]
14380    pub parent: Option<Vec<String>>,
14381    ///Property: PDF alternative version checksum
14382    #[serde(skip_serializing_if = "Option::is_none")]
14383    #[cfg_attr(
14384        feature = "builder",
14385        builder(with = |value:impl Into<String>|vec![value.into()])
14386    )]
14387    pub pdf_hash: Option<Vec<String>>,
14388    ///Property: Detected people
14389    #[serde(skip_serializing_if = "Option::is_none")]
14390    #[cfg_attr(
14391        feature = "builder",
14392        builder(with = |value:impl Into<String>|vec![value.into()])
14393    )]
14394    pub people_mentioned: Option<Vec<String>>,
14395    ///Property: Detected phones
14396    #[serde(skip_serializing_if = "Option::is_none")]
14397    #[cfg_attr(
14398        feature = "builder",
14399        builder(with = |value:impl Into<String>|vec![value.into()])
14400    )]
14401    pub phone_mentioned: Option<Vec<String>>,
14402    ///Property: Previous name
14403    #[serde(skip_serializing_if = "Option::is_none")]
14404    #[cfg_attr(
14405        feature = "builder",
14406        builder(with = |value:impl Into<String>|vec![value.into()])
14407    )]
14408    pub previous_name: Option<Vec<String>>,
14409    ///Property: Processed at
14410    #[serde(skip_serializing_if = "Option::is_none")]
14411    #[cfg_attr(
14412        feature = "builder",
14413        builder(with = |value:impl Into<String>|vec![value.into()])
14414    )]
14415    pub processed_at: Option<Vec<String>>,
14416    ///Property: Processing agent
14417    #[serde(skip_serializing_if = "Option::is_none")]
14418    #[cfg_attr(
14419        feature = "builder",
14420        builder(with = |value:impl Into<String>|vec![value.into()])
14421    )]
14422    pub processing_agent: Option<Vec<String>>,
14423    ///Property: Processing error
14424    #[serde(skip_serializing_if = "Option::is_none")]
14425    #[cfg_attr(
14426        feature = "builder",
14427        builder(with = |value:impl Into<String>|vec![value.into()])
14428    )]
14429    pub processing_error: Option<Vec<String>>,
14430    ///Property: Processing status
14431    #[serde(skip_serializing_if = "Option::is_none")]
14432    #[cfg_attr(
14433        feature = "builder",
14434        builder(with = |value:impl Into<String>|vec![value.into()])
14435    )]
14436    pub processing_status: Option<Vec<String>>,
14437    ///Property: Program
14438    #[serde(skip_serializing_if = "Option::is_none")]
14439    #[cfg_attr(
14440        feature = "builder",
14441        builder(with = |value:impl Into<String>|vec![value.into()])
14442    )]
14443    pub program: Option<Vec<String>>,
14444    ///Property: Program ID
14445    #[serde(skip_serializing_if = "Option::is_none")]
14446    #[cfg_attr(
14447        feature = "builder",
14448        builder(with = |value:impl Into<String>|vec![value.into()])
14449    )]
14450    pub program_id: Option<Vec<String>>,
14451    ///Property: Source document
14452    #[serde(skip_serializing_if = "Option::is_none")]
14453    #[cfg_attr(
14454        feature = "builder",
14455        builder(with = |value:impl Into<String>|vec![value.into()])
14456    )]
14457    pub proof: Option<Vec<String>>,
14458    ///Property: Published on
14459    #[serde(skip_serializing_if = "Option::is_none")]
14460    #[cfg_attr(
14461        feature = "builder",
14462        builder(with = |value:impl Into<String>|vec![value.into()])
14463    )]
14464    pub published_at: Option<Vec<String>>,
14465    ///Property: Publishing source
14466    #[serde(skip_serializing_if = "Option::is_none")]
14467    #[cfg_attr(
14468        feature = "builder",
14469        builder(with = |value:impl Into<String>|vec![value.into()])
14470    )]
14471    pub publisher: Option<Vec<String>>,
14472    ///Property: Publishing source URL
14473    #[serde(skip_serializing_if = "Option::is_none")]
14474    #[cfg_attr(
14475        feature = "builder",
14476        builder(with = |value:impl Into<String>|vec![value.into()])
14477    )]
14478    pub publisher_url: Option<Vec<String>>,
14479    ///Property: Retrieved on
14480    #[serde(skip_serializing_if = "Option::is_none")]
14481    #[cfg_attr(
14482        feature = "builder",
14483        builder(with = |value:impl Into<String>|vec![value.into()])
14484    )]
14485    pub retrieved_at: Option<Vec<String>>,
14486    ///Property: Source link
14487    #[serde(skip_serializing_if = "Option::is_none")]
14488    #[cfg_attr(
14489        feature = "builder",
14490        builder(with = |value:impl Into<String>|vec![value.into()])
14491    )]
14492    pub source_url: Option<Vec<String>>,
14493    ///Property: Summary
14494    #[serde(skip_serializing_if = "Option::is_none")]
14495    #[cfg_attr(
14496        feature = "builder",
14497        builder(with = |value:impl Into<String>|vec![value.into()])
14498    )]
14499    pub summary: Option<Vec<String>>,
14500    ///Property: Title
14501    #[serde(skip_serializing_if = "Option::is_none")]
14502    #[cfg_attr(
14503        feature = "builder",
14504        builder(with = |value:impl Into<String>|vec![value.into()])
14505    )]
14506    pub title: Option<Vec<String>>,
14507    ///Property: Topics
14508    #[serde(skip_serializing_if = "Option::is_none")]
14509    #[cfg_attr(
14510        feature = "builder",
14511        builder(with = |value:impl Into<String>|vec![value.into()])
14512    )]
14513    pub topics: Option<Vec<String>>,
14514    ///Property: The language of the translated text
14515    #[serde(skip_serializing_if = "Option::is_none")]
14516    #[cfg_attr(
14517        feature = "builder",
14518        builder(with = |value:impl Into<String>|vec![value.into()])
14519    )]
14520    pub translated_language: Option<Vec<String>>,
14521    ///Property: Translated version of the body text
14522    #[serde(skip_serializing_if = "Option::is_none")]
14523    #[cfg_attr(
14524        feature = "builder",
14525        builder(with = |value:impl Into<String>|vec![value.into()])
14526    )]
14527    pub translated_text: Option<Vec<String>>,
14528    ///Property: Weak alias
14529    #[serde(skip_serializing_if = "Option::is_none")]
14530    #[cfg_attr(
14531        feature = "builder",
14532        builder(with = |value:impl Into<String>|vec![value.into()])
14533    )]
14534    pub weak_alias: Option<Vec<String>>,
14535    ///Property: Wikidata ID
14536    #[serde(skip_serializing_if = "Option::is_none")]
14537    #[cfg_attr(
14538        feature = "builder",
14539        builder(with = |value:impl Into<String>|vec![value.into()])
14540    )]
14541    pub wikidata_id: Option<Vec<String>>,
14542    ///Property: Wikipedia Article
14543    #[serde(skip_serializing_if = "Option::is_none")]
14544    #[cfg_attr(
14545        feature = "builder",
14546        builder(with = |value:impl Into<String>|vec![value.into()])
14547    )]
14548    pub wikipedia_url: Option<Vec<String>>,
14549}
14550impl Pages {
14551    /// Create a new entity with the given ID
14552    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
14553    pub fn new(id: impl Into<String>) -> Self {
14554        Self {
14555            id: id.into(),
14556            schema: "Pages".to_string(),
14557            address: None,
14558            address_entity: None,
14559            aleph_url: None,
14560            alias: None,
14561            ancestors: None,
14562            author: None,
14563            authored_at: None,
14564            body_text: None,
14565            companies_mentioned: None,
14566            content_hash: None,
14567            country: None,
14568            crawler: None,
14569            created_at: None,
14570            date: None,
14571            description: None,
14572            detected_country: None,
14573            detected_language: None,
14574            email_mentioned: None,
14575            encoding: None,
14576            extension: None,
14577            file_name: Vec::new(),
14578            file_size: None,
14579            generator: None,
14580            iban_mentioned: None,
14581            index_text: None,
14582            ip_mentioned: None,
14583            keywords: None,
14584            language: None,
14585            location_mentioned: None,
14586            message_id: None,
14587            mime_type: None,
14588            modified_at: None,
14589            name: Vec::new(),
14590            names_mentioned: None,
14591            notes: None,
14592            parent: None,
14593            pdf_hash: None,
14594            people_mentioned: None,
14595            phone_mentioned: None,
14596            previous_name: None,
14597            processed_at: None,
14598            processing_agent: None,
14599            processing_error: None,
14600            processing_status: None,
14601            program: None,
14602            program_id: None,
14603            proof: None,
14604            published_at: None,
14605            publisher: None,
14606            publisher_url: None,
14607            retrieved_at: None,
14608            source_url: None,
14609            summary: None,
14610            title: None,
14611            topics: None,
14612            translated_language: None,
14613            translated_text: None,
14614            weak_alias: None,
14615            wikidata_id: None,
14616            wikipedia_url: None,
14617        }
14618    }
14619    /// Get the schema name
14620    pub fn schema_name() -> &'static str {
14621        "Pages"
14622    }
14623    /// Serialize to standard FTM nested JSON format
14624    ///
14625    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
14626    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
14627        let mut value = serde_json::to_value(self)?;
14628        if let Some(obj) = value.as_object_mut() {
14629            let id = obj.remove("id");
14630            let schema = obj.remove("schema");
14631            let properties = serde_json::Value::Object(std::mem::take(obj));
14632            if let Some(id) = id {
14633                obj.insert("id".into(), id);
14634            }
14635            if let Some(schema) = schema {
14636                obj.insert("schema".into(), schema);
14637            }
14638            obj.insert("properties".into(), properties);
14639        }
14640        serde_json::to_string(&value)
14641    }
14642}
14643///FTM Schema: Passport
14644#[derive(Debug, Clone, Serialize, Deserialize)]
14645#[cfg_attr(feature = "builder", derive(Builder))]
14646#[serde(rename_all = "camelCase")]
14647pub struct Passport {
14648    pub id: String,
14649    #[cfg_attr(feature = "builder", builder(default = "Passport".to_string()))]
14650    pub schema: String,
14651    ///Property: Aleph URL
14652    #[serde(skip_serializing_if = "Option::is_none")]
14653    #[cfg_attr(
14654        feature = "builder",
14655        builder(with = |value:impl Into<String>|vec![value.into()])
14656    )]
14657    pub aleph_url: Option<Vec<String>>,
14658    ///Property: Authority
14659    #[serde(skip_serializing_if = "Option::is_none")]
14660    #[cfg_attr(
14661        feature = "builder",
14662        builder(with = |value:impl Into<String>|vec![value.into()])
14663    )]
14664    pub authority: Option<Vec<String>>,
14665    ///Property: Birth date
14666    #[serde(skip_serializing_if = "Option::is_none")]
14667    #[cfg_attr(
14668        feature = "builder",
14669        builder(with = |value:impl Into<String>|vec![value.into()])
14670    )]
14671    pub birth_date: Option<Vec<String>>,
14672    ///Property: Place of birth
14673    #[serde(skip_serializing_if = "Option::is_none")]
14674    #[cfg_attr(
14675        feature = "builder",
14676        builder(with = |value:impl Into<String>|vec![value.into()])
14677    )]
14678    pub birth_place: Option<Vec<String>>,
14679    ///Property: Country
14680    #[serde(skip_serializing_if = "Option::is_none")]
14681    #[cfg_attr(
14682        feature = "builder",
14683        builder(with = |value:impl Into<String>|vec![value.into()])
14684    )]
14685    pub country: Option<Vec<String>>,
14686    ///Property: Date
14687    #[serde(skip_serializing_if = "Option::is_none")]
14688    #[cfg_attr(
14689        feature = "builder",
14690        builder(with = |value:impl Into<String>|vec![value.into()])
14691    )]
14692    pub date: Option<Vec<String>>,
14693    ///Property: Description
14694    #[serde(skip_serializing_if = "Option::is_none")]
14695    #[cfg_attr(
14696        feature = "builder",
14697        builder(with = |value:impl Into<String>|vec![value.into()])
14698    )]
14699    pub description: Option<Vec<String>>,
14700    ///Property: End date
14701    #[serde(skip_serializing_if = "Option::is_none")]
14702    #[cfg_attr(
14703        feature = "builder",
14704        builder(with = |value:impl Into<String>|vec![value.into()])
14705    )]
14706    pub end_date: Option<Vec<String>>,
14707    ///Property: Gender
14708    #[serde(skip_serializing_if = "Option::is_none")]
14709    #[cfg_attr(
14710        feature = "builder",
14711        builder(with = |value:impl Into<String>|vec![value.into()])
14712    )]
14713    pub gender: Option<Vec<String>>,
14714    ///Property: Given name
14715    #[serde(skip_serializing_if = "Option::is_none")]
14716    #[cfg_attr(
14717        feature = "builder",
14718        builder(with = |value:impl Into<String>|vec![value.into()])
14719    )]
14720    pub given_name: Option<Vec<String>>,
14721    ///Property: Identification holder
14722    #[serde(default)]
14723    #[cfg_attr(
14724        feature = "builder",
14725        builder(with = |value:impl Into<String>|vec![value.into()])
14726    )]
14727    pub holder: Vec<String>,
14728    ///Property: Index text
14729    #[serde(skip_serializing_if = "Option::is_none")]
14730    #[cfg_attr(
14731        feature = "builder",
14732        builder(with = |value:impl Into<String>|vec![value.into()])
14733    )]
14734    pub index_text: Option<Vec<String>>,
14735    ///Property: Modified on
14736    #[serde(skip_serializing_if = "Option::is_none")]
14737    #[cfg_attr(
14738        feature = "builder",
14739        builder(with = |value:impl Into<String>|vec![value.into()])
14740    )]
14741    pub modified_at: Option<Vec<String>>,
14742    ///Property: Detected names
14743    #[serde(skip_serializing_if = "Option::is_none")]
14744    #[cfg_attr(
14745        feature = "builder",
14746        builder(with = |value:impl Into<String>|vec![value.into()])
14747    )]
14748    pub names_mentioned: Option<Vec<String>>,
14749    ///Property: Document number
14750    #[serde(default)]
14751    #[cfg_attr(
14752        feature = "builder",
14753        builder(with = |value:impl Into<String>|vec![value.into()])
14754    )]
14755    pub number: Vec<String>,
14756    ///Property: Passport number
14757    #[serde(skip_serializing_if = "Option::is_none")]
14758    #[cfg_attr(
14759        feature = "builder",
14760        builder(with = |value:impl Into<String>|vec![value.into()])
14761    )]
14762    pub passport_number: Option<Vec<String>>,
14763    ///Property: Personal number
14764    #[serde(skip_serializing_if = "Option::is_none")]
14765    #[cfg_attr(
14766        feature = "builder",
14767        builder(with = |value:impl Into<String>|vec![value.into()])
14768    )]
14769    pub personal_number: Option<Vec<String>>,
14770    ///Property: Source document
14771    #[serde(skip_serializing_if = "Option::is_none")]
14772    #[cfg_attr(
14773        feature = "builder",
14774        builder(with = |value:impl Into<String>|vec![value.into()])
14775    )]
14776    pub proof: Option<Vec<String>>,
14777    ///Property: Publishing source
14778    #[serde(skip_serializing_if = "Option::is_none")]
14779    #[cfg_attr(
14780        feature = "builder",
14781        builder(with = |value:impl Into<String>|vec![value.into()])
14782    )]
14783    pub publisher: Option<Vec<String>>,
14784    ///Property: Publishing source URL
14785    #[serde(skip_serializing_if = "Option::is_none")]
14786    #[cfg_attr(
14787        feature = "builder",
14788        builder(with = |value:impl Into<String>|vec![value.into()])
14789    )]
14790    pub publisher_url: Option<Vec<String>>,
14791    ///Property: Record ID
14792    #[serde(skip_serializing_if = "Option::is_none")]
14793    #[cfg_attr(
14794        feature = "builder",
14795        builder(with = |value:impl Into<String>|vec![value.into()])
14796    )]
14797    pub record_id: Option<Vec<String>>,
14798    ///Property: Retrieved on
14799    #[serde(skip_serializing_if = "Option::is_none")]
14800    #[cfg_attr(
14801        feature = "builder",
14802        builder(with = |value:impl Into<String>|vec![value.into()])
14803    )]
14804    pub retrieved_at: Option<Vec<String>>,
14805    ///Property: Source link
14806    #[serde(skip_serializing_if = "Option::is_none")]
14807    #[cfg_attr(
14808        feature = "builder",
14809        builder(with = |value:impl Into<String>|vec![value.into()])
14810    )]
14811    pub source_url: Option<Vec<String>>,
14812    ///Property: Start date
14813    #[serde(skip_serializing_if = "Option::is_none")]
14814    #[cfg_attr(
14815        feature = "builder",
14816        builder(with = |value:impl Into<String>|vec![value.into()])
14817    )]
14818    pub start_date: Option<Vec<String>>,
14819    ///Property: Summary
14820    #[serde(skip_serializing_if = "Option::is_none")]
14821    #[cfg_attr(
14822        feature = "builder",
14823        builder(with = |value:impl Into<String>|vec![value.into()])
14824    )]
14825    pub summary: Option<Vec<String>>,
14826    ///Property: Surname
14827    #[serde(skip_serializing_if = "Option::is_none")]
14828    #[cfg_attr(
14829        feature = "builder",
14830        builder(with = |value:impl Into<String>|vec![value.into()])
14831    )]
14832    pub surname: Option<Vec<String>>,
14833    ///Property: Type
14834    #[serde(skip_serializing_if = "Option::is_none")]
14835    #[cfg_attr(
14836        feature = "builder",
14837        builder(with = |value:impl Into<String>|vec![value.into()])
14838    )]
14839    pub type_: Option<Vec<String>>,
14840}
14841impl Passport {
14842    /// Create a new entity with the given ID
14843    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
14844    pub fn new(id: impl Into<String>) -> Self {
14845        Self {
14846            id: id.into(),
14847            schema: "Passport".to_string(),
14848            aleph_url: None,
14849            authority: None,
14850            birth_date: None,
14851            birth_place: None,
14852            country: None,
14853            date: None,
14854            description: None,
14855            end_date: None,
14856            gender: None,
14857            given_name: None,
14858            holder: Vec::new(),
14859            index_text: None,
14860            modified_at: None,
14861            names_mentioned: None,
14862            number: Vec::new(),
14863            passport_number: None,
14864            personal_number: None,
14865            proof: None,
14866            publisher: None,
14867            publisher_url: None,
14868            record_id: None,
14869            retrieved_at: None,
14870            source_url: None,
14871            start_date: None,
14872            summary: None,
14873            surname: None,
14874            type_: None,
14875        }
14876    }
14877    /// Get the schema name
14878    pub fn schema_name() -> &'static str {
14879        "Passport"
14880    }
14881    /// Serialize to standard FTM nested JSON format
14882    ///
14883    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
14884    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
14885        let mut value = serde_json::to_value(self)?;
14886        if let Some(obj) = value.as_object_mut() {
14887            let id = obj.remove("id");
14888            let schema = obj.remove("schema");
14889            let properties = serde_json::Value::Object(std::mem::take(obj));
14890            if let Some(id) = id {
14891                obj.insert("id".into(), id);
14892            }
14893            if let Some(schema) = schema {
14894                obj.insert("schema".into(), schema);
14895            }
14896            obj.insert("properties".into(), properties);
14897        }
14898        serde_json::to_string(&value)
14899    }
14900}
14901///FTM Schema: Payment
14902#[derive(Debug, Clone, Serialize, Deserialize)]
14903#[cfg_attr(feature = "builder", derive(Builder))]
14904#[serde(rename_all = "camelCase")]
14905pub struct Payment {
14906    pub id: String,
14907    #[cfg_attr(feature = "builder", builder(default = "Payment".to_string()))]
14908    pub schema: String,
14909    ///Property: Aleph URL
14910    #[serde(skip_serializing_if = "Option::is_none")]
14911    #[cfg_attr(
14912        feature = "builder",
14913        builder(with = |value:impl Into<String>|vec![value.into()])
14914    )]
14915    pub aleph_url: Option<Vec<String>>,
14916    ///Property: Amount
14917    #[serde(
14918        skip_serializing_if = "Option::is_none",
14919        deserialize_with = "deserialize_opt_f64_vec",
14920        default
14921    )]
14922    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
14923    pub amount: Option<Vec<f64>>,
14924    ///Property: Amount in EUR
14925    #[serde(
14926        skip_serializing_if = "Option::is_none",
14927        deserialize_with = "deserialize_opt_f64_vec",
14928        default
14929    )]
14930    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
14931    pub amount_eur: Option<Vec<f64>>,
14932    ///Property: Amount in USD
14933    #[serde(
14934        skip_serializing_if = "Option::is_none",
14935        deserialize_with = "deserialize_opt_f64_vec",
14936        default
14937    )]
14938    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
14939    pub amount_usd: Option<Vec<f64>>,
14940    ///Property: Beneficiary
14941    #[serde(default)]
14942    #[cfg_attr(
14943        feature = "builder",
14944        builder(with = |value:impl Into<String>|vec![value.into()])
14945    )]
14946    pub beneficiary: Vec<String>,
14947    ///Property: Beneficiary bank account
14948    #[serde(skip_serializing_if = "Option::is_none")]
14949    #[cfg_attr(
14950        feature = "builder",
14951        builder(with = |value:impl Into<String>|vec![value.into()])
14952    )]
14953    pub beneficiary_account: Option<Vec<String>>,
14954    ///Property: Contract
14955    #[serde(skip_serializing_if = "Option::is_none")]
14956    #[cfg_attr(
14957        feature = "builder",
14958        builder(with = |value:impl Into<String>|vec![value.into()])
14959    )]
14960    pub contract: Option<Vec<String>>,
14961    ///Property: Currency
14962    #[serde(skip_serializing_if = "Option::is_none")]
14963    #[cfg_attr(
14964        feature = "builder",
14965        builder(with = |value:impl Into<String>|vec![value.into()])
14966    )]
14967    pub currency: Option<Vec<String>>,
14968    ///Property: Date
14969    #[serde(skip_serializing_if = "Option::is_none")]
14970    #[cfg_attr(
14971        feature = "builder",
14972        builder(with = |value:impl Into<String>|vec![value.into()])
14973    )]
14974    pub date: Option<Vec<String>>,
14975    ///Property: Description
14976    #[serde(skip_serializing_if = "Option::is_none")]
14977    #[cfg_attr(
14978        feature = "builder",
14979        builder(with = |value:impl Into<String>|vec![value.into()])
14980    )]
14981    pub description: Option<Vec<String>>,
14982    ///Property: End date
14983    #[serde(skip_serializing_if = "Option::is_none")]
14984    #[cfg_attr(
14985        feature = "builder",
14986        builder(with = |value:impl Into<String>|vec![value.into()])
14987    )]
14988    pub end_date: Option<Vec<String>>,
14989    ///Property: Index text
14990    #[serde(skip_serializing_if = "Option::is_none")]
14991    #[cfg_attr(
14992        feature = "builder",
14993        builder(with = |value:impl Into<String>|vec![value.into()])
14994    )]
14995    pub index_text: Option<Vec<String>>,
14996    ///Property: Modified on
14997    #[serde(skip_serializing_if = "Option::is_none")]
14998    #[cfg_attr(
14999        feature = "builder",
15000        builder(with = |value:impl Into<String>|vec![value.into()])
15001    )]
15002    pub modified_at: Option<Vec<String>>,
15003    ///Property: Detected names
15004    #[serde(skip_serializing_if = "Option::is_none")]
15005    #[cfg_attr(
15006        feature = "builder",
15007        builder(with = |value:impl Into<String>|vec![value.into()])
15008    )]
15009    pub names_mentioned: Option<Vec<String>>,
15010    ///Property: Payer
15011    #[serde(default)]
15012    #[cfg_attr(
15013        feature = "builder",
15014        builder(with = |value:impl Into<String>|vec![value.into()])
15015    )]
15016    pub payer: Vec<String>,
15017    ///Property: Payer bank account
15018    #[serde(skip_serializing_if = "Option::is_none")]
15019    #[cfg_attr(
15020        feature = "builder",
15021        builder(with = |value:impl Into<String>|vec![value.into()])
15022    )]
15023    pub payer_account: Option<Vec<String>>,
15024    ///Property: Payment programme
15025    #[serde(skip_serializing_if = "Option::is_none")]
15026    #[cfg_attr(
15027        feature = "builder",
15028        builder(with = |value:impl Into<String>|vec![value.into()])
15029    )]
15030    pub programme: Option<Vec<String>>,
15031    ///Property: Project
15032    #[serde(skip_serializing_if = "Option::is_none")]
15033    #[cfg_attr(
15034        feature = "builder",
15035        builder(with = |value:impl Into<String>|vec![value.into()])
15036    )]
15037    pub project: Option<Vec<String>>,
15038    ///Property: Source document
15039    #[serde(skip_serializing_if = "Option::is_none")]
15040    #[cfg_attr(
15041        feature = "builder",
15042        builder(with = |value:impl Into<String>|vec![value.into()])
15043    )]
15044    pub proof: Option<Vec<String>>,
15045    ///Property: Publishing source
15046    #[serde(skip_serializing_if = "Option::is_none")]
15047    #[cfg_attr(
15048        feature = "builder",
15049        builder(with = |value:impl Into<String>|vec![value.into()])
15050    )]
15051    pub publisher: Option<Vec<String>>,
15052    ///Property: Publishing source URL
15053    #[serde(skip_serializing_if = "Option::is_none")]
15054    #[cfg_attr(
15055        feature = "builder",
15056        builder(with = |value:impl Into<String>|vec![value.into()])
15057    )]
15058    pub publisher_url: Option<Vec<String>>,
15059    ///Property: Payment purpose
15060    #[serde(skip_serializing_if = "Option::is_none")]
15061    #[cfg_attr(
15062        feature = "builder",
15063        builder(with = |value:impl Into<String>|vec![value.into()])
15064    )]
15065    pub purpose: Option<Vec<String>>,
15066    ///Property: Record ID
15067    #[serde(skip_serializing_if = "Option::is_none")]
15068    #[cfg_attr(
15069        feature = "builder",
15070        builder(with = |value:impl Into<String>|vec![value.into()])
15071    )]
15072    pub record_id: Option<Vec<String>>,
15073    ///Property: Retrieved on
15074    #[serde(skip_serializing_if = "Option::is_none")]
15075    #[cfg_attr(
15076        feature = "builder",
15077        builder(with = |value:impl Into<String>|vec![value.into()])
15078    )]
15079    pub retrieved_at: Option<Vec<String>>,
15080    ///Property: Sequence number
15081    #[serde(skip_serializing_if = "Option::is_none")]
15082    #[cfg_attr(
15083        feature = "builder",
15084        builder(with = |value:impl Into<String>|vec![value.into()])
15085    )]
15086    pub sequence_number: Option<Vec<String>>,
15087    ///Property: Source link
15088    #[serde(skip_serializing_if = "Option::is_none")]
15089    #[cfg_attr(
15090        feature = "builder",
15091        builder(with = |value:impl Into<String>|vec![value.into()])
15092    )]
15093    pub source_url: Option<Vec<String>>,
15094    ///Property: Start date
15095    #[serde(skip_serializing_if = "Option::is_none")]
15096    #[cfg_attr(
15097        feature = "builder",
15098        builder(with = |value:impl Into<String>|vec![value.into()])
15099    )]
15100    pub start_date: Option<Vec<String>>,
15101    ///Property: Summary
15102    #[serde(skip_serializing_if = "Option::is_none")]
15103    #[cfg_attr(
15104        feature = "builder",
15105        builder(with = |value:impl Into<String>|vec![value.into()])
15106    )]
15107    pub summary: Option<Vec<String>>,
15108    ///Property: Transaction number
15109    #[serde(skip_serializing_if = "Option::is_none")]
15110    #[cfg_attr(
15111        feature = "builder",
15112        builder(with = |value:impl Into<String>|vec![value.into()])
15113    )]
15114    pub transaction_number: Option<Vec<String>>,
15115}
15116impl Payment {
15117    /// Create a new entity with the given ID
15118    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
15119    pub fn new(id: impl Into<String>) -> Self {
15120        Self {
15121            id: id.into(),
15122            schema: "Payment".to_string(),
15123            aleph_url: None,
15124            amount: None,
15125            amount_eur: None,
15126            amount_usd: None,
15127            beneficiary: Vec::new(),
15128            beneficiary_account: None,
15129            contract: None,
15130            currency: None,
15131            date: None,
15132            description: None,
15133            end_date: None,
15134            index_text: None,
15135            modified_at: None,
15136            names_mentioned: None,
15137            payer: Vec::new(),
15138            payer_account: None,
15139            programme: None,
15140            project: None,
15141            proof: None,
15142            publisher: None,
15143            publisher_url: None,
15144            purpose: None,
15145            record_id: None,
15146            retrieved_at: None,
15147            sequence_number: None,
15148            source_url: None,
15149            start_date: None,
15150            summary: None,
15151            transaction_number: None,
15152        }
15153    }
15154    /// Get the schema name
15155    pub fn schema_name() -> &'static str {
15156        "Payment"
15157    }
15158    /// Serialize to standard FTM nested JSON format
15159    ///
15160    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
15161    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
15162        let mut value = serde_json::to_value(self)?;
15163        if let Some(obj) = value.as_object_mut() {
15164            let id = obj.remove("id");
15165            let schema = obj.remove("schema");
15166            let properties = serde_json::Value::Object(std::mem::take(obj));
15167            if let Some(id) = id {
15168                obj.insert("id".into(), id);
15169            }
15170            if let Some(schema) = schema {
15171                obj.insert("schema".into(), schema);
15172            }
15173            obj.insert("properties".into(), properties);
15174        }
15175        serde_json::to_string(&value)
15176    }
15177}
15178///FTM Schema: Person
15179#[derive(Debug, Clone, Serialize, Deserialize)]
15180#[cfg_attr(feature = "builder", derive(Builder))]
15181#[serde(rename_all = "camelCase")]
15182pub struct Person {
15183    pub id: String,
15184    #[cfg_attr(feature = "builder", builder(default = "Person".to_string()))]
15185    pub schema: String,
15186    ///Property: Abbreviation
15187    #[serde(skip_serializing_if = "Option::is_none")]
15188    #[cfg_attr(
15189        feature = "builder",
15190        builder(with = |value:impl Into<String>|vec![value.into()])
15191    )]
15192    pub abbreviation: Option<Vec<String>>,
15193    ///Property: Address
15194    #[serde(skip_serializing_if = "Option::is_none")]
15195    #[cfg_attr(
15196        feature = "builder",
15197        builder(with = |value:impl Into<String>|vec![value.into()])
15198    )]
15199    pub address: Option<Vec<String>>,
15200    ///Property: Address
15201    #[serde(skip_serializing_if = "Option::is_none")]
15202    #[cfg_attr(
15203        feature = "builder",
15204        builder(with = |value:impl Into<String>|vec![value.into()])
15205    )]
15206    pub address_entity: Option<Vec<String>>,
15207    ///Property: Aleph URL
15208    #[serde(skip_serializing_if = "Option::is_none")]
15209    #[cfg_attr(
15210        feature = "builder",
15211        builder(with = |value:impl Into<String>|vec![value.into()])
15212    )]
15213    pub aleph_url: Option<Vec<String>>,
15214    ///Property: Alias
15215    #[serde(skip_serializing_if = "Option::is_none")]
15216    #[cfg_attr(
15217        feature = "builder",
15218        builder(with = |value:impl Into<String>|vec![value.into()])
15219    )]
15220    pub alias: Option<Vec<String>>,
15221    ///Property: Physical appearance
15222    #[serde(skip_serializing_if = "Option::is_none")]
15223    #[cfg_attr(
15224        feature = "builder",
15225        builder(with = |value:impl Into<String>|vec![value.into()])
15226    )]
15227    pub appearance: Option<Vec<String>>,
15228    ///Property: Country of birth
15229    #[serde(skip_serializing_if = "Option::is_none")]
15230    #[cfg_attr(
15231        feature = "builder",
15232        builder(with = |value:impl Into<String>|vec![value.into()])
15233    )]
15234    pub birth_country: Option<Vec<String>>,
15235    ///Property: Birth date
15236    #[serde(skip_serializing_if = "Option::is_none")]
15237    #[cfg_attr(
15238        feature = "builder",
15239        builder(with = |value:impl Into<String>|vec![value.into()])
15240    )]
15241    pub birth_date: Option<Vec<String>>,
15242    ///Property: Place of birth
15243    #[serde(skip_serializing_if = "Option::is_none")]
15244    #[cfg_attr(
15245        feature = "builder",
15246        builder(with = |value:impl Into<String>|vec![value.into()])
15247    )]
15248    pub birth_place: Option<Vec<String>>,
15249    ///Property: BrightQuery ID
15250    #[serde(skip_serializing_if = "Option::is_none")]
15251    #[cfg_attr(
15252        feature = "builder",
15253        builder(with = |value:impl Into<String>|vec![value.into()])
15254    )]
15255    pub bright_query_id: Option<Vec<String>>,
15256    ///Property: BrightQuery Organization ID
15257    #[serde(skip_serializing_if = "Option::is_none")]
15258    #[cfg_attr(
15259        feature = "builder",
15260        builder(with = |value:impl Into<String>|vec![value.into()])
15261    )]
15262    pub bright_query_org_id: Option<Vec<String>>,
15263    ///Property: Bureau van Dijk ID
15264    #[serde(skip_serializing_if = "Option::is_none")]
15265    #[cfg_attr(
15266        feature = "builder",
15267        builder(with = |value:impl Into<String>|vec![value.into()])
15268    )]
15269    pub bvd_id: Option<Vec<String>>,
15270    ///Property: Citizenship
15271    #[serde(skip_serializing_if = "Option::is_none")]
15272    #[cfg_attr(
15273        feature = "builder",
15274        builder(with = |value:impl Into<String>|vec![value.into()])
15275    )]
15276    pub citizenship: Option<Vec<String>>,
15277    ///Property: Classification
15278    #[serde(skip_serializing_if = "Option::is_none")]
15279    #[cfg_attr(
15280        feature = "builder",
15281        builder(with = |value:impl Into<String>|vec![value.into()])
15282    )]
15283    pub classification: Option<Vec<String>>,
15284    ///Property: Country
15285    #[serde(skip_serializing_if = "Option::is_none")]
15286    #[cfg_attr(
15287        feature = "builder",
15288        builder(with = |value:impl Into<String>|vec![value.into()])
15289    )]
15290    pub country: Option<Vec<String>>,
15291    ///Property: Created at
15292    #[serde(skip_serializing_if = "Option::is_none")]
15293    #[cfg_attr(
15294        feature = "builder",
15295        builder(with = |value:impl Into<String>|vec![value.into()])
15296    )]
15297    pub created_at: Option<Vec<String>>,
15298    ///Property: Death date
15299    #[serde(skip_serializing_if = "Option::is_none")]
15300    #[cfg_attr(
15301        feature = "builder",
15302        builder(with = |value:impl Into<String>|vec![value.into()])
15303    )]
15304    pub death_date: Option<Vec<String>>,
15305    ///Property: Description
15306    #[serde(skip_serializing_if = "Option::is_none")]
15307    #[cfg_attr(
15308        feature = "builder",
15309        builder(with = |value:impl Into<String>|vec![value.into()])
15310    )]
15311    pub description: Option<Vec<String>>,
15312    ///Property: Dissolution date
15313    #[serde(skip_serializing_if = "Option::is_none")]
15314    #[cfg_attr(
15315        feature = "builder",
15316        builder(with = |value:impl Into<String>|vec![value.into()])
15317    )]
15318    pub dissolution_date: Option<Vec<String>>,
15319    ///Property: DUNS
15320    #[serde(skip_serializing_if = "Option::is_none")]
15321    #[cfg_attr(
15322        feature = "builder",
15323        builder(with = |value:impl Into<String>|vec![value.into()])
15324    )]
15325    pub duns_code: Option<Vec<String>>,
15326    ///Property: Education
15327    #[serde(skip_serializing_if = "Option::is_none")]
15328    #[cfg_attr(
15329        feature = "builder",
15330        builder(with = |value:impl Into<String>|vec![value.into()])
15331    )]
15332    pub education: Option<Vec<String>>,
15333    ///Property: Email
15334    #[serde(skip_serializing_if = "Option::is_none")]
15335    #[cfg_attr(
15336        feature = "builder",
15337        builder(with = |value:impl Into<String>|vec![value.into()])
15338    )]
15339    pub email: Option<Vec<String>>,
15340    ///Property: Ethnicity
15341    #[serde(skip_serializing_if = "Option::is_none")]
15342    #[cfg_attr(
15343        feature = "builder",
15344        builder(with = |value:impl Into<String>|vec![value.into()])
15345    )]
15346    pub ethnicity: Option<Vec<String>>,
15347    ///Property: Eye color
15348    #[serde(skip_serializing_if = "Option::is_none")]
15349    #[cfg_attr(
15350        feature = "builder",
15351        builder(with = |value:impl Into<String>|vec![value.into()])
15352    )]
15353    pub eye_color: Option<Vec<String>>,
15354    ///Property: Patronymic
15355    #[serde(skip_serializing_if = "Option::is_none")]
15356    #[cfg_attr(
15357        feature = "builder",
15358        builder(with = |value:impl Into<String>|vec![value.into()])
15359    )]
15360    pub father_name: Option<Vec<String>>,
15361    ///Property: First name
15362    #[serde(skip_serializing_if = "Option::is_none")]
15363    #[cfg_attr(
15364        feature = "builder",
15365        builder(with = |value:impl Into<String>|vec![value.into()])
15366    )]
15367    pub first_name: Option<Vec<String>>,
15368    ///Property: Gender
15369    #[serde(skip_serializing_if = "Option::is_none")]
15370    #[cfg_attr(
15371        feature = "builder",
15372        builder(with = |value:impl Into<String>|vec![value.into()])
15373    )]
15374    pub gender: Option<Vec<String>>,
15375    ///Property: Hair color
15376    #[serde(skip_serializing_if = "Option::is_none")]
15377    #[cfg_attr(
15378        feature = "builder",
15379        builder(with = |value:impl Into<String>|vec![value.into()])
15380    )]
15381    pub hair_color: Option<Vec<String>>,
15382    ///Property: Height
15383    #[serde(
15384        skip_serializing_if = "Option::is_none",
15385        deserialize_with = "deserialize_opt_f64_vec",
15386        default
15387    )]
15388    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
15389    pub height: Option<Vec<f64>>,
15390    ///Property: ICIJ ID
15391    #[serde(skip_serializing_if = "Option::is_none")]
15392    #[cfg_attr(
15393        feature = "builder",
15394        builder(with = |value:impl Into<String>|vec![value.into()])
15395    )]
15396    pub icij_id: Option<Vec<String>>,
15397    ///Property: ID Number
15398    #[serde(skip_serializing_if = "Option::is_none")]
15399    #[cfg_attr(
15400        feature = "builder",
15401        builder(with = |value:impl Into<String>|vec![value.into()])
15402    )]
15403    pub id_number: Option<Vec<String>>,
15404    ///Property: Incorporation date
15405    #[serde(skip_serializing_if = "Option::is_none")]
15406    #[cfg_attr(
15407        feature = "builder",
15408        builder(with = |value:impl Into<String>|vec![value.into()])
15409    )]
15410    pub incorporation_date: Option<Vec<String>>,
15411    ///Property: Index text
15412    #[serde(skip_serializing_if = "Option::is_none")]
15413    #[cfg_attr(
15414        feature = "builder",
15415        builder(with = |value:impl Into<String>|vec![value.into()])
15416    )]
15417    pub index_text: Option<Vec<String>>,
15418    ///Property: INN
15419    #[serde(skip_serializing_if = "Option::is_none")]
15420    #[cfg_attr(
15421        feature = "builder",
15422        builder(with = |value:impl Into<String>|vec![value.into()])
15423    )]
15424    pub inn_code: Option<Vec<String>>,
15425    ///Property: Jurisdiction
15426    #[serde(skip_serializing_if = "Option::is_none")]
15427    #[cfg_attr(
15428        feature = "builder",
15429        builder(with = |value:impl Into<String>|vec![value.into()])
15430    )]
15431    pub jurisdiction: Option<Vec<String>>,
15432    ///Property: Keywords
15433    #[serde(skip_serializing_if = "Option::is_none")]
15434    #[cfg_attr(
15435        feature = "builder",
15436        builder(with = |value:impl Into<String>|vec![value.into()])
15437    )]
15438    pub keywords: Option<Vec<String>>,
15439    ///Property: Last name
15440    #[serde(skip_serializing_if = "Option::is_none")]
15441    #[cfg_attr(
15442        feature = "builder",
15443        builder(with = |value:impl Into<String>|vec![value.into()])
15444    )]
15445    pub last_name: Option<Vec<String>>,
15446    ///Property: Legal form
15447    #[serde(skip_serializing_if = "Option::is_none")]
15448    #[cfg_attr(
15449        feature = "builder",
15450        builder(with = |value:impl Into<String>|vec![value.into()])
15451    )]
15452    pub legal_form: Option<Vec<String>>,
15453    ///Property: LEI
15454    #[serde(skip_serializing_if = "Option::is_none")]
15455    #[cfg_attr(
15456        feature = "builder",
15457        builder(with = |value:impl Into<String>|vec![value.into()])
15458    )]
15459    pub lei_code: Option<Vec<String>>,
15460    ///Property: License Number
15461    #[serde(skip_serializing_if = "Option::is_none")]
15462    #[cfg_attr(
15463        feature = "builder",
15464        builder(with = |value:impl Into<String>|vec![value.into()])
15465    )]
15466    pub license_number: Option<Vec<String>>,
15467    ///Property: Country of origin
15468    #[serde(skip_serializing_if = "Option::is_none")]
15469    #[cfg_attr(
15470        feature = "builder",
15471        builder(with = |value:impl Into<String>|vec![value.into()])
15472    )]
15473    pub main_country: Option<Vec<String>>,
15474    ///Property: Middle name
15475    #[serde(skip_serializing_if = "Option::is_none")]
15476    #[cfg_attr(
15477        feature = "builder",
15478        builder(with = |value:impl Into<String>|vec![value.into()])
15479    )]
15480    pub middle_name: Option<Vec<String>>,
15481    ///Property: Modified on
15482    #[serde(skip_serializing_if = "Option::is_none")]
15483    #[cfg_attr(
15484        feature = "builder",
15485        builder(with = |value:impl Into<String>|vec![value.into()])
15486    )]
15487    pub modified_at: Option<Vec<String>>,
15488    ///Property: Matronymic
15489    #[serde(skip_serializing_if = "Option::is_none")]
15490    #[cfg_attr(
15491        feature = "builder",
15492        builder(with = |value:impl Into<String>|vec![value.into()])
15493    )]
15494    pub mother_name: Option<Vec<String>>,
15495    ///Property: Name
15496    #[serde(default)]
15497    #[cfg_attr(
15498        feature = "builder",
15499        builder(with = |value:impl Into<String>|vec![value.into()])
15500    )]
15501    pub name: Vec<String>,
15502    ///Property: Name suffix
15503    #[serde(skip_serializing_if = "Option::is_none")]
15504    #[cfg_attr(
15505        feature = "builder",
15506        builder(with = |value:impl Into<String>|vec![value.into()])
15507    )]
15508    pub name_suffix: Option<Vec<String>>,
15509    ///Property: Nationality
15510    #[serde(skip_serializing_if = "Option::is_none")]
15511    #[cfg_attr(
15512        feature = "builder",
15513        builder(with = |value:impl Into<String>|vec![value.into()])
15514    )]
15515    pub nationality: Option<Vec<String>>,
15516    ///Property: Notes
15517    #[serde(skip_serializing_if = "Option::is_none")]
15518    #[cfg_attr(
15519        feature = "builder",
15520        builder(with = |value:impl Into<String>|vec![value.into()])
15521    )]
15522    pub notes: Option<Vec<String>>,
15523    ///Property: NPI
15524    #[serde(skip_serializing_if = "Option::is_none")]
15525    #[cfg_attr(
15526        feature = "builder",
15527        builder(with = |value:impl Into<String>|vec![value.into()])
15528    )]
15529    pub npi_code: Option<Vec<String>>,
15530    ///Property: OGRN
15531    #[serde(skip_serializing_if = "Option::is_none")]
15532    #[cfg_attr(
15533        feature = "builder",
15534        builder(with = |value:impl Into<String>|vec![value.into()])
15535    )]
15536    pub ogrn_code: Option<Vec<String>>,
15537    ///Property: OKPO
15538    #[serde(skip_serializing_if = "Option::is_none")]
15539    #[cfg_attr(
15540        feature = "builder",
15541        builder(with = |value:impl Into<String>|vec![value.into()])
15542    )]
15543    pub okpo_code: Option<Vec<String>>,
15544    ///Property: OpenCorporates URL
15545    #[serde(skip_serializing_if = "Option::is_none")]
15546    #[cfg_attr(
15547        feature = "builder",
15548        builder(with = |value:impl Into<String>|vec![value.into()])
15549    )]
15550    pub opencorporates_url: Option<Vec<String>>,
15551    ///Property: Parent company
15552    #[serde(skip_serializing_if = "Option::is_none")]
15553    #[cfg_attr(
15554        feature = "builder",
15555        builder(with = |value:impl Into<String>|vec![value.into()])
15556    )]
15557    pub parent: Option<Vec<String>>,
15558    ///Property: Passport number
15559    #[serde(skip_serializing_if = "Option::is_none")]
15560    #[cfg_attr(
15561        feature = "builder",
15562        builder(with = |value:impl Into<String>|vec![value.into()])
15563    )]
15564    pub passport_number: Option<Vec<String>>,
15565    ///Property: Phone
15566    #[serde(skip_serializing_if = "Option::is_none")]
15567    #[cfg_attr(
15568        feature = "builder",
15569        builder(with = |value:impl Into<String>|vec![value.into()])
15570    )]
15571    pub phone: Option<Vec<String>>,
15572    ///Property: Political association
15573    #[serde(skip_serializing_if = "Option::is_none")]
15574    #[cfg_attr(
15575        feature = "builder",
15576        builder(with = |value:impl Into<String>|vec![value.into()])
15577    )]
15578    pub political: Option<Vec<String>>,
15579    ///Property: Position
15580    #[serde(skip_serializing_if = "Option::is_none")]
15581    #[cfg_attr(
15582        feature = "builder",
15583        builder(with = |value:impl Into<String>|vec![value.into()])
15584    )]
15585    pub position: Option<Vec<String>>,
15586    ///Property: Previous name
15587    #[serde(skip_serializing_if = "Option::is_none")]
15588    #[cfg_attr(
15589        feature = "builder",
15590        builder(with = |value:impl Into<String>|vec![value.into()])
15591    )]
15592    pub previous_name: Option<Vec<String>>,
15593    ///Property: Profession
15594    #[serde(skip_serializing_if = "Option::is_none")]
15595    #[cfg_attr(
15596        feature = "builder",
15597        builder(with = |value:impl Into<String>|vec![value.into()])
15598    )]
15599    pub profession: Option<Vec<String>>,
15600    ///Property: Program
15601    #[serde(skip_serializing_if = "Option::is_none")]
15602    #[cfg_attr(
15603        feature = "builder",
15604        builder(with = |value:impl Into<String>|vec![value.into()])
15605    )]
15606    pub program: Option<Vec<String>>,
15607    ///Property: Program ID
15608    #[serde(skip_serializing_if = "Option::is_none")]
15609    #[cfg_attr(
15610        feature = "builder",
15611        builder(with = |value:impl Into<String>|vec![value.into()])
15612    )]
15613    pub program_id: Option<Vec<String>>,
15614    ///Property: Source document
15615    #[serde(skip_serializing_if = "Option::is_none")]
15616    #[cfg_attr(
15617        feature = "builder",
15618        builder(with = |value:impl Into<String>|vec![value.into()])
15619    )]
15620    pub proof: Option<Vec<String>>,
15621    ///Property: Publishing source
15622    #[serde(skip_serializing_if = "Option::is_none")]
15623    #[cfg_attr(
15624        feature = "builder",
15625        builder(with = |value:impl Into<String>|vec![value.into()])
15626    )]
15627    pub publisher: Option<Vec<String>>,
15628    ///Property: Publishing source URL
15629    #[serde(skip_serializing_if = "Option::is_none")]
15630    #[cfg_attr(
15631        feature = "builder",
15632        builder(with = |value:impl Into<String>|vec![value.into()])
15633    )]
15634    pub publisher_url: Option<Vec<String>>,
15635    ///Property: Registration number
15636    #[serde(skip_serializing_if = "Option::is_none")]
15637    #[cfg_attr(
15638        feature = "builder",
15639        builder(with = |value:impl Into<String>|vec![value.into()])
15640    )]
15641    pub registration_number: Option<Vec<String>>,
15642    ///Property: Religion
15643    #[serde(skip_serializing_if = "Option::is_none")]
15644    #[cfg_attr(
15645        feature = "builder",
15646        builder(with = |value:impl Into<String>|vec![value.into()])
15647    )]
15648    pub religion: Option<Vec<String>>,
15649    ///Property: Retrieved on
15650    #[serde(skip_serializing_if = "Option::is_none")]
15651    #[cfg_attr(
15652        feature = "builder",
15653        builder(with = |value:impl Into<String>|vec![value.into()])
15654    )]
15655    pub retrieved_at: Option<Vec<String>>,
15656    ///Property: Sayari Entity ID
15657    #[serde(skip_serializing_if = "Option::is_none")]
15658    #[cfg_attr(
15659        feature = "builder",
15660        builder(with = |value:impl Into<String>|vec![value.into()])
15661    )]
15662    pub sayari_id: Option<Vec<String>>,
15663    ///Property: Second name
15664    #[serde(skip_serializing_if = "Option::is_none")]
15665    #[cfg_attr(
15666        feature = "builder",
15667        builder(with = |value:impl Into<String>|vec![value.into()])
15668    )]
15669    pub second_name: Option<Vec<String>>,
15670    ///Property: Sector
15671    #[serde(skip_serializing_if = "Option::is_none")]
15672    #[cfg_attr(
15673        feature = "builder",
15674        builder(with = |value:impl Into<String>|vec![value.into()])
15675    )]
15676    pub sector: Option<Vec<String>>,
15677    ///Property: Social security number
15678    #[serde(skip_serializing_if = "Option::is_none")]
15679    #[cfg_attr(
15680        feature = "builder",
15681        builder(with = |value:impl Into<String>|vec![value.into()])
15682    )]
15683    pub social_security_number: Option<Vec<String>>,
15684    ///Property: Source link
15685    #[serde(skip_serializing_if = "Option::is_none")]
15686    #[cfg_attr(
15687        feature = "builder",
15688        builder(with = |value:impl Into<String>|vec![value.into()])
15689    )]
15690    pub source_url: Option<Vec<String>>,
15691    ///Property: Spoken language
15692    #[serde(skip_serializing_if = "Option::is_none")]
15693    #[cfg_attr(
15694        feature = "builder",
15695        builder(with = |value:impl Into<String>|vec![value.into()])
15696    )]
15697    pub spoken_language: Option<Vec<String>>,
15698    ///Property: Status
15699    #[serde(skip_serializing_if = "Option::is_none")]
15700    #[cfg_attr(
15701        feature = "builder",
15702        builder(with = |value:impl Into<String>|vec![value.into()])
15703    )]
15704    pub status: Option<Vec<String>>,
15705    ///Property: Summary
15706    #[serde(skip_serializing_if = "Option::is_none")]
15707    #[cfg_attr(
15708        feature = "builder",
15709        builder(with = |value:impl Into<String>|vec![value.into()])
15710    )]
15711    pub summary: Option<Vec<String>>,
15712    ///Property: SWIFT/BIC
15713    #[serde(skip_serializing_if = "Option::is_none")]
15714    #[cfg_attr(
15715        feature = "builder",
15716        builder(with = |value:impl Into<String>|vec![value.into()])
15717    )]
15718    pub swift_bic: Option<Vec<String>>,
15719    ///Property: Tax Number
15720    #[serde(skip_serializing_if = "Option::is_none")]
15721    #[cfg_attr(
15722        feature = "builder",
15723        builder(with = |value:impl Into<String>|vec![value.into()])
15724    )]
15725    pub tax_number: Option<Vec<String>>,
15726    ///Property: Tax status
15727    #[serde(skip_serializing_if = "Option::is_none")]
15728    #[cfg_attr(
15729        feature = "builder",
15730        builder(with = |value:impl Into<String>|vec![value.into()])
15731    )]
15732    pub tax_status: Option<Vec<String>>,
15733    ///Property: Title
15734    #[serde(skip_serializing_if = "Option::is_none")]
15735    #[cfg_attr(
15736        feature = "builder",
15737        builder(with = |value:impl Into<String>|vec![value.into()])
15738    )]
15739    pub title: Option<Vec<String>>,
15740    ///Property: Topics
15741    #[serde(skip_serializing_if = "Option::is_none")]
15742    #[cfg_attr(
15743        feature = "builder",
15744        builder(with = |value:impl Into<String>|vec![value.into()])
15745    )]
15746    pub topics: Option<Vec<String>>,
15747    ///Property: Unique Entity ID
15748    #[serde(skip_serializing_if = "Option::is_none")]
15749    #[cfg_attr(
15750        feature = "builder",
15751        builder(with = |value:impl Into<String>|vec![value.into()])
15752    )]
15753    pub unique_entity_id: Option<Vec<String>>,
15754    ///Property: USCC
15755    #[serde(skip_serializing_if = "Option::is_none")]
15756    #[cfg_attr(
15757        feature = "builder",
15758        builder(with = |value:impl Into<String>|vec![value.into()])
15759    )]
15760    pub usc_code: Option<Vec<String>>,
15761    ///Property: V.A.T. Identifier
15762    #[serde(skip_serializing_if = "Option::is_none")]
15763    #[cfg_attr(
15764        feature = "builder",
15765        builder(with = |value:impl Into<String>|vec![value.into()])
15766    )]
15767    pub vat_code: Option<Vec<String>>,
15768    ///Property: Weak alias
15769    #[serde(skip_serializing_if = "Option::is_none")]
15770    #[cfg_attr(
15771        feature = "builder",
15772        builder(with = |value:impl Into<String>|vec![value.into()])
15773    )]
15774    pub weak_alias: Option<Vec<String>>,
15775    ///Property: Website
15776    #[serde(skip_serializing_if = "Option::is_none")]
15777    #[cfg_attr(
15778        feature = "builder",
15779        builder(with = |value:impl Into<String>|vec![value.into()])
15780    )]
15781    pub website: Option<Vec<String>>,
15782    ///Property: Weight
15783    #[serde(
15784        skip_serializing_if = "Option::is_none",
15785        deserialize_with = "deserialize_opt_f64_vec",
15786        default
15787    )]
15788    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
15789    pub weight: Option<Vec<f64>>,
15790    ///Property: Wikidata ID
15791    #[serde(skip_serializing_if = "Option::is_none")]
15792    #[cfg_attr(
15793        feature = "builder",
15794        builder(with = |value:impl Into<String>|vec![value.into()])
15795    )]
15796    pub wikidata_id: Option<Vec<String>>,
15797    ///Property: Wikipedia Article
15798    #[serde(skip_serializing_if = "Option::is_none")]
15799    #[cfg_attr(
15800        feature = "builder",
15801        builder(with = |value:impl Into<String>|vec![value.into()])
15802    )]
15803    pub wikipedia_url: Option<Vec<String>>,
15804}
15805impl Person {
15806    /// Create a new entity with the given ID
15807    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
15808    pub fn new(id: impl Into<String>) -> Self {
15809        Self {
15810            id: id.into(),
15811            schema: "Person".to_string(),
15812            abbreviation: None,
15813            address: None,
15814            address_entity: None,
15815            aleph_url: None,
15816            alias: None,
15817            appearance: None,
15818            birth_country: None,
15819            birth_date: None,
15820            birth_place: None,
15821            bright_query_id: None,
15822            bright_query_org_id: None,
15823            bvd_id: None,
15824            citizenship: None,
15825            classification: None,
15826            country: None,
15827            created_at: None,
15828            death_date: None,
15829            description: None,
15830            dissolution_date: None,
15831            duns_code: None,
15832            education: None,
15833            email: None,
15834            ethnicity: None,
15835            eye_color: None,
15836            father_name: None,
15837            first_name: None,
15838            gender: None,
15839            hair_color: None,
15840            height: None,
15841            icij_id: None,
15842            id_number: None,
15843            incorporation_date: None,
15844            index_text: None,
15845            inn_code: None,
15846            jurisdiction: None,
15847            keywords: None,
15848            last_name: None,
15849            legal_form: None,
15850            lei_code: None,
15851            license_number: None,
15852            main_country: None,
15853            middle_name: None,
15854            modified_at: None,
15855            mother_name: None,
15856            name: Vec::new(),
15857            name_suffix: None,
15858            nationality: None,
15859            notes: None,
15860            npi_code: None,
15861            ogrn_code: None,
15862            okpo_code: None,
15863            opencorporates_url: None,
15864            parent: None,
15865            passport_number: None,
15866            phone: None,
15867            political: None,
15868            position: None,
15869            previous_name: None,
15870            profession: None,
15871            program: None,
15872            program_id: None,
15873            proof: None,
15874            publisher: None,
15875            publisher_url: None,
15876            registration_number: None,
15877            religion: None,
15878            retrieved_at: None,
15879            sayari_id: None,
15880            second_name: None,
15881            sector: None,
15882            social_security_number: None,
15883            source_url: None,
15884            spoken_language: None,
15885            status: None,
15886            summary: None,
15887            swift_bic: None,
15888            tax_number: None,
15889            tax_status: None,
15890            title: None,
15891            topics: None,
15892            unique_entity_id: None,
15893            usc_code: None,
15894            vat_code: None,
15895            weak_alias: None,
15896            website: None,
15897            weight: None,
15898            wikidata_id: None,
15899            wikipedia_url: None,
15900        }
15901    }
15902    /// Get the schema name
15903    pub fn schema_name() -> &'static str {
15904        "Person"
15905    }
15906    /// Serialize to standard FTM nested JSON format
15907    ///
15908    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
15909    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
15910        let mut value = serde_json::to_value(self)?;
15911        if let Some(obj) = value.as_object_mut() {
15912            let id = obj.remove("id");
15913            let schema = obj.remove("schema");
15914            let properties = serde_json::Value::Object(std::mem::take(obj));
15915            if let Some(id) = id {
15916                obj.insert("id".into(), id);
15917            }
15918            if let Some(schema) = schema {
15919                obj.insert("schema".into(), schema);
15920            }
15921            obj.insert("properties".into(), properties);
15922        }
15923        serde_json::to_string(&value)
15924    }
15925}
15926///FTM Schema: Text file
15927#[derive(Debug, Clone, Serialize, Deserialize)]
15928#[cfg_attr(feature = "builder", derive(Builder))]
15929#[serde(rename_all = "camelCase")]
15930pub struct PlainText {
15931    pub id: String,
15932    #[cfg_attr(feature = "builder", builder(default = "PlainText".to_string()))]
15933    pub schema: String,
15934    ///Property: Address
15935    #[serde(skip_serializing_if = "Option::is_none")]
15936    #[cfg_attr(
15937        feature = "builder",
15938        builder(with = |value:impl Into<String>|vec![value.into()])
15939    )]
15940    pub address: Option<Vec<String>>,
15941    ///Property: Address
15942    #[serde(skip_serializing_if = "Option::is_none")]
15943    #[cfg_attr(
15944        feature = "builder",
15945        builder(with = |value:impl Into<String>|vec![value.into()])
15946    )]
15947    pub address_entity: Option<Vec<String>>,
15948    ///Property: Aleph URL
15949    #[serde(skip_serializing_if = "Option::is_none")]
15950    #[cfg_attr(
15951        feature = "builder",
15952        builder(with = |value:impl Into<String>|vec![value.into()])
15953    )]
15954    pub aleph_url: Option<Vec<String>>,
15955    ///Property: Alias
15956    #[serde(skip_serializing_if = "Option::is_none")]
15957    #[cfg_attr(
15958        feature = "builder",
15959        builder(with = |value:impl Into<String>|vec![value.into()])
15960    )]
15961    pub alias: Option<Vec<String>>,
15962    ///Property: Ancestors
15963    #[serde(skip_serializing_if = "Option::is_none")]
15964    #[cfg_attr(
15965        feature = "builder",
15966        builder(with = |value:impl Into<String>|vec![value.into()])
15967    )]
15968    pub ancestors: Option<Vec<String>>,
15969    ///Property: Author
15970    #[serde(skip_serializing_if = "Option::is_none")]
15971    #[cfg_attr(
15972        feature = "builder",
15973        builder(with = |value:impl Into<String>|vec![value.into()])
15974    )]
15975    pub author: Option<Vec<String>>,
15976    ///Property: Authored on
15977    #[serde(skip_serializing_if = "Option::is_none")]
15978    #[cfg_attr(
15979        feature = "builder",
15980        builder(with = |value:impl Into<String>|vec![value.into()])
15981    )]
15982    pub authored_at: Option<Vec<String>>,
15983    ///Property: Text
15984    #[serde(skip_serializing_if = "Option::is_none")]
15985    #[cfg_attr(
15986        feature = "builder",
15987        builder(with = |value:impl Into<String>|vec![value.into()])
15988    )]
15989    pub body_text: Option<Vec<String>>,
15990    ///Property: Detected companies
15991    #[serde(skip_serializing_if = "Option::is_none")]
15992    #[cfg_attr(
15993        feature = "builder",
15994        builder(with = |value:impl Into<String>|vec![value.into()])
15995    )]
15996    pub companies_mentioned: Option<Vec<String>>,
15997    ///Property: Checksum
15998    #[serde(skip_serializing_if = "Option::is_none")]
15999    #[cfg_attr(
16000        feature = "builder",
16001        builder(with = |value:impl Into<String>|vec![value.into()])
16002    )]
16003    pub content_hash: Option<Vec<String>>,
16004    ///Property: Country
16005    #[serde(skip_serializing_if = "Option::is_none")]
16006    #[cfg_attr(
16007        feature = "builder",
16008        builder(with = |value:impl Into<String>|vec![value.into()])
16009    )]
16010    pub country: Option<Vec<String>>,
16011    ///Property: Crawler
16012    #[serde(skip_serializing_if = "Option::is_none")]
16013    #[cfg_attr(
16014        feature = "builder",
16015        builder(with = |value:impl Into<String>|vec![value.into()])
16016    )]
16017    pub crawler: Option<Vec<String>>,
16018    ///Property: Created at
16019    #[serde(skip_serializing_if = "Option::is_none")]
16020    #[cfg_attr(
16021        feature = "builder",
16022        builder(with = |value:impl Into<String>|vec![value.into()])
16023    )]
16024    pub created_at: Option<Vec<String>>,
16025    ///Property: Date
16026    #[serde(skip_serializing_if = "Option::is_none")]
16027    #[cfg_attr(
16028        feature = "builder",
16029        builder(with = |value:impl Into<String>|vec![value.into()])
16030    )]
16031    pub date: Option<Vec<String>>,
16032    ///Property: Description
16033    #[serde(skip_serializing_if = "Option::is_none")]
16034    #[cfg_attr(
16035        feature = "builder",
16036        builder(with = |value:impl Into<String>|vec![value.into()])
16037    )]
16038    pub description: Option<Vec<String>>,
16039    ///Property: Detected country
16040    #[serde(skip_serializing_if = "Option::is_none")]
16041    #[cfg_attr(
16042        feature = "builder",
16043        builder(with = |value:impl Into<String>|vec![value.into()])
16044    )]
16045    pub detected_country: Option<Vec<String>>,
16046    ///Property: Detected language
16047    #[serde(skip_serializing_if = "Option::is_none")]
16048    #[cfg_attr(
16049        feature = "builder",
16050        builder(with = |value:impl Into<String>|vec![value.into()])
16051    )]
16052    pub detected_language: Option<Vec<String>>,
16053    ///Property: Detected e-mail addresses
16054    #[serde(skip_serializing_if = "Option::is_none")]
16055    #[cfg_attr(
16056        feature = "builder",
16057        builder(with = |value:impl Into<String>|vec![value.into()])
16058    )]
16059    pub email_mentioned: Option<Vec<String>>,
16060    ///Property: File encoding
16061    #[serde(skip_serializing_if = "Option::is_none")]
16062    #[cfg_attr(
16063        feature = "builder",
16064        builder(with = |value:impl Into<String>|vec![value.into()])
16065    )]
16066    pub encoding: Option<Vec<String>>,
16067    ///Property: File extension
16068    #[serde(skip_serializing_if = "Option::is_none")]
16069    #[cfg_attr(
16070        feature = "builder",
16071        builder(with = |value:impl Into<String>|vec![value.into()])
16072    )]
16073    pub extension: Option<Vec<String>>,
16074    ///Property: File name
16075    #[serde(default)]
16076    #[cfg_attr(
16077        feature = "builder",
16078        builder(with = |value:impl Into<String>|vec![value.into()])
16079    )]
16080    pub file_name: Vec<String>,
16081    ///Property: File size
16082    #[serde(
16083        skip_serializing_if = "Option::is_none",
16084        deserialize_with = "deserialize_opt_f64_vec",
16085        default
16086    )]
16087    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
16088    pub file_size: Option<Vec<f64>>,
16089    ///Property: Generator
16090    #[serde(skip_serializing_if = "Option::is_none")]
16091    #[cfg_attr(
16092        feature = "builder",
16093        builder(with = |value:impl Into<String>|vec![value.into()])
16094    )]
16095    pub generator: Option<Vec<String>>,
16096    ///Property: Detected IBANs
16097    #[serde(skip_serializing_if = "Option::is_none")]
16098    #[cfg_attr(
16099        feature = "builder",
16100        builder(with = |value:impl Into<String>|vec![value.into()])
16101    )]
16102    pub iban_mentioned: Option<Vec<String>>,
16103    ///Property: Index text
16104    #[serde(skip_serializing_if = "Option::is_none")]
16105    #[cfg_attr(
16106        feature = "builder",
16107        builder(with = |value:impl Into<String>|vec![value.into()])
16108    )]
16109    pub index_text: Option<Vec<String>>,
16110    ///Property: Detected IP addresses
16111    #[serde(skip_serializing_if = "Option::is_none")]
16112    #[cfg_attr(
16113        feature = "builder",
16114        builder(with = |value:impl Into<String>|vec![value.into()])
16115    )]
16116    pub ip_mentioned: Option<Vec<String>>,
16117    ///Property: Keywords
16118    #[serde(skip_serializing_if = "Option::is_none")]
16119    #[cfg_attr(
16120        feature = "builder",
16121        builder(with = |value:impl Into<String>|vec![value.into()])
16122    )]
16123    pub keywords: Option<Vec<String>>,
16124    ///Property: Language
16125    #[serde(skip_serializing_if = "Option::is_none")]
16126    #[cfg_attr(
16127        feature = "builder",
16128        builder(with = |value:impl Into<String>|vec![value.into()])
16129    )]
16130    pub language: Option<Vec<String>>,
16131    ///Property: Detected locations
16132    #[serde(skip_serializing_if = "Option::is_none")]
16133    #[cfg_attr(
16134        feature = "builder",
16135        builder(with = |value:impl Into<String>|vec![value.into()])
16136    )]
16137    pub location_mentioned: Option<Vec<String>>,
16138    ///Property: Message ID
16139    #[serde(skip_serializing_if = "Option::is_none")]
16140    #[cfg_attr(
16141        feature = "builder",
16142        builder(with = |value:impl Into<String>|vec![value.into()])
16143    )]
16144    pub message_id: Option<Vec<String>>,
16145    ///Property: MIME type
16146    #[serde(skip_serializing_if = "Option::is_none")]
16147    #[cfg_attr(
16148        feature = "builder",
16149        builder(with = |value:impl Into<String>|vec![value.into()])
16150    )]
16151    pub mime_type: Option<Vec<String>>,
16152    ///Property: Modified on
16153    #[serde(skip_serializing_if = "Option::is_none")]
16154    #[cfg_attr(
16155        feature = "builder",
16156        builder(with = |value:impl Into<String>|vec![value.into()])
16157    )]
16158    pub modified_at: Option<Vec<String>>,
16159    ///Property: Name
16160    #[serde(default)]
16161    #[cfg_attr(
16162        feature = "builder",
16163        builder(with = |value:impl Into<String>|vec![value.into()])
16164    )]
16165    pub name: Vec<String>,
16166    ///Property: Detected names
16167    #[serde(skip_serializing_if = "Option::is_none")]
16168    #[cfg_attr(
16169        feature = "builder",
16170        builder(with = |value:impl Into<String>|vec![value.into()])
16171    )]
16172    pub names_mentioned: Option<Vec<String>>,
16173    ///Property: Notes
16174    #[serde(skip_serializing_if = "Option::is_none")]
16175    #[cfg_attr(
16176        feature = "builder",
16177        builder(with = |value:impl Into<String>|vec![value.into()])
16178    )]
16179    pub notes: Option<Vec<String>>,
16180    ///Property: Folder
16181    #[serde(skip_serializing_if = "Option::is_none")]
16182    #[cfg_attr(
16183        feature = "builder",
16184        builder(with = |value:impl Into<String>|vec![value.into()])
16185    )]
16186    pub parent: Option<Vec<String>>,
16187    ///Property: Detected people
16188    #[serde(skip_serializing_if = "Option::is_none")]
16189    #[cfg_attr(
16190        feature = "builder",
16191        builder(with = |value:impl Into<String>|vec![value.into()])
16192    )]
16193    pub people_mentioned: Option<Vec<String>>,
16194    ///Property: Detected phones
16195    #[serde(skip_serializing_if = "Option::is_none")]
16196    #[cfg_attr(
16197        feature = "builder",
16198        builder(with = |value:impl Into<String>|vec![value.into()])
16199    )]
16200    pub phone_mentioned: Option<Vec<String>>,
16201    ///Property: Previous name
16202    #[serde(skip_serializing_if = "Option::is_none")]
16203    #[cfg_attr(
16204        feature = "builder",
16205        builder(with = |value:impl Into<String>|vec![value.into()])
16206    )]
16207    pub previous_name: Option<Vec<String>>,
16208    ///Property: Processed at
16209    #[serde(skip_serializing_if = "Option::is_none")]
16210    #[cfg_attr(
16211        feature = "builder",
16212        builder(with = |value:impl Into<String>|vec![value.into()])
16213    )]
16214    pub processed_at: Option<Vec<String>>,
16215    ///Property: Processing agent
16216    #[serde(skip_serializing_if = "Option::is_none")]
16217    #[cfg_attr(
16218        feature = "builder",
16219        builder(with = |value:impl Into<String>|vec![value.into()])
16220    )]
16221    pub processing_agent: Option<Vec<String>>,
16222    ///Property: Processing error
16223    #[serde(skip_serializing_if = "Option::is_none")]
16224    #[cfg_attr(
16225        feature = "builder",
16226        builder(with = |value:impl Into<String>|vec![value.into()])
16227    )]
16228    pub processing_error: Option<Vec<String>>,
16229    ///Property: Processing status
16230    #[serde(skip_serializing_if = "Option::is_none")]
16231    #[cfg_attr(
16232        feature = "builder",
16233        builder(with = |value:impl Into<String>|vec![value.into()])
16234    )]
16235    pub processing_status: Option<Vec<String>>,
16236    ///Property: Program
16237    #[serde(skip_serializing_if = "Option::is_none")]
16238    #[cfg_attr(
16239        feature = "builder",
16240        builder(with = |value:impl Into<String>|vec![value.into()])
16241    )]
16242    pub program: Option<Vec<String>>,
16243    ///Property: Program ID
16244    #[serde(skip_serializing_if = "Option::is_none")]
16245    #[cfg_attr(
16246        feature = "builder",
16247        builder(with = |value:impl Into<String>|vec![value.into()])
16248    )]
16249    pub program_id: Option<Vec<String>>,
16250    ///Property: Source document
16251    #[serde(skip_serializing_if = "Option::is_none")]
16252    #[cfg_attr(
16253        feature = "builder",
16254        builder(with = |value:impl Into<String>|vec![value.into()])
16255    )]
16256    pub proof: Option<Vec<String>>,
16257    ///Property: Published on
16258    #[serde(skip_serializing_if = "Option::is_none")]
16259    #[cfg_attr(
16260        feature = "builder",
16261        builder(with = |value:impl Into<String>|vec![value.into()])
16262    )]
16263    pub published_at: Option<Vec<String>>,
16264    ///Property: Publishing source
16265    #[serde(skip_serializing_if = "Option::is_none")]
16266    #[cfg_attr(
16267        feature = "builder",
16268        builder(with = |value:impl Into<String>|vec![value.into()])
16269    )]
16270    pub publisher: Option<Vec<String>>,
16271    ///Property: Publishing source URL
16272    #[serde(skip_serializing_if = "Option::is_none")]
16273    #[cfg_attr(
16274        feature = "builder",
16275        builder(with = |value:impl Into<String>|vec![value.into()])
16276    )]
16277    pub publisher_url: Option<Vec<String>>,
16278    ///Property: Retrieved on
16279    #[serde(skip_serializing_if = "Option::is_none")]
16280    #[cfg_attr(
16281        feature = "builder",
16282        builder(with = |value:impl Into<String>|vec![value.into()])
16283    )]
16284    pub retrieved_at: Option<Vec<String>>,
16285    ///Property: Source link
16286    #[serde(skip_serializing_if = "Option::is_none")]
16287    #[cfg_attr(
16288        feature = "builder",
16289        builder(with = |value:impl Into<String>|vec![value.into()])
16290    )]
16291    pub source_url: Option<Vec<String>>,
16292    ///Property: Summary
16293    #[serde(skip_serializing_if = "Option::is_none")]
16294    #[cfg_attr(
16295        feature = "builder",
16296        builder(with = |value:impl Into<String>|vec![value.into()])
16297    )]
16298    pub summary: Option<Vec<String>>,
16299    ///Property: Title
16300    #[serde(skip_serializing_if = "Option::is_none")]
16301    #[cfg_attr(
16302        feature = "builder",
16303        builder(with = |value:impl Into<String>|vec![value.into()])
16304    )]
16305    pub title: Option<Vec<String>>,
16306    ///Property: Topics
16307    #[serde(skip_serializing_if = "Option::is_none")]
16308    #[cfg_attr(
16309        feature = "builder",
16310        builder(with = |value:impl Into<String>|vec![value.into()])
16311    )]
16312    pub topics: Option<Vec<String>>,
16313    ///Property: The language of the translated text
16314    #[serde(skip_serializing_if = "Option::is_none")]
16315    #[cfg_attr(
16316        feature = "builder",
16317        builder(with = |value:impl Into<String>|vec![value.into()])
16318    )]
16319    pub translated_language: Option<Vec<String>>,
16320    ///Property: Translated version of the body text
16321    #[serde(skip_serializing_if = "Option::is_none")]
16322    #[cfg_attr(
16323        feature = "builder",
16324        builder(with = |value:impl Into<String>|vec![value.into()])
16325    )]
16326    pub translated_text: Option<Vec<String>>,
16327    ///Property: Weak alias
16328    #[serde(skip_serializing_if = "Option::is_none")]
16329    #[cfg_attr(
16330        feature = "builder",
16331        builder(with = |value:impl Into<String>|vec![value.into()])
16332    )]
16333    pub weak_alias: Option<Vec<String>>,
16334    ///Property: Wikidata ID
16335    #[serde(skip_serializing_if = "Option::is_none")]
16336    #[cfg_attr(
16337        feature = "builder",
16338        builder(with = |value:impl Into<String>|vec![value.into()])
16339    )]
16340    pub wikidata_id: Option<Vec<String>>,
16341    ///Property: Wikipedia Article
16342    #[serde(skip_serializing_if = "Option::is_none")]
16343    #[cfg_attr(
16344        feature = "builder",
16345        builder(with = |value:impl Into<String>|vec![value.into()])
16346    )]
16347    pub wikipedia_url: Option<Vec<String>>,
16348}
16349impl PlainText {
16350    /// Create a new entity with the given ID
16351    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
16352    pub fn new(id: impl Into<String>) -> Self {
16353        Self {
16354            id: id.into(),
16355            schema: "PlainText".to_string(),
16356            address: None,
16357            address_entity: None,
16358            aleph_url: None,
16359            alias: None,
16360            ancestors: None,
16361            author: None,
16362            authored_at: None,
16363            body_text: None,
16364            companies_mentioned: None,
16365            content_hash: None,
16366            country: None,
16367            crawler: None,
16368            created_at: None,
16369            date: None,
16370            description: None,
16371            detected_country: None,
16372            detected_language: None,
16373            email_mentioned: None,
16374            encoding: None,
16375            extension: None,
16376            file_name: Vec::new(),
16377            file_size: None,
16378            generator: None,
16379            iban_mentioned: None,
16380            index_text: None,
16381            ip_mentioned: None,
16382            keywords: None,
16383            language: None,
16384            location_mentioned: None,
16385            message_id: None,
16386            mime_type: None,
16387            modified_at: None,
16388            name: Vec::new(),
16389            names_mentioned: None,
16390            notes: None,
16391            parent: None,
16392            people_mentioned: None,
16393            phone_mentioned: None,
16394            previous_name: None,
16395            processed_at: None,
16396            processing_agent: None,
16397            processing_error: None,
16398            processing_status: None,
16399            program: None,
16400            program_id: None,
16401            proof: None,
16402            published_at: None,
16403            publisher: None,
16404            publisher_url: None,
16405            retrieved_at: None,
16406            source_url: None,
16407            summary: None,
16408            title: None,
16409            topics: None,
16410            translated_language: None,
16411            translated_text: None,
16412            weak_alias: None,
16413            wikidata_id: None,
16414            wikipedia_url: None,
16415        }
16416    }
16417    /// Get the schema name
16418    pub fn schema_name() -> &'static str {
16419        "PlainText"
16420    }
16421    /// Serialize to standard FTM nested JSON format
16422    ///
16423    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
16424    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
16425        let mut value = serde_json::to_value(self)?;
16426        if let Some(obj) = value.as_object_mut() {
16427            let id = obj.remove("id");
16428            let schema = obj.remove("schema");
16429            let properties = serde_json::Value::Object(std::mem::take(obj));
16430            if let Some(id) = id {
16431                obj.insert("id".into(), id);
16432            }
16433            if let Some(schema) = schema {
16434                obj.insert("schema".into(), schema);
16435            }
16436            obj.insert("properties".into(), properties);
16437        }
16438        serde_json::to_string(&value)
16439    }
16440}
16441///FTM Schema: Position
16442#[derive(Debug, Clone, Serialize, Deserialize)]
16443#[cfg_attr(feature = "builder", derive(Builder))]
16444#[serde(rename_all = "camelCase")]
16445pub struct Position {
16446    pub id: String,
16447    #[cfg_attr(feature = "builder", builder(default = "Position".to_string()))]
16448    pub schema: String,
16449    ///Property: Address
16450    #[serde(skip_serializing_if = "Option::is_none")]
16451    #[cfg_attr(
16452        feature = "builder",
16453        builder(with = |value:impl Into<String>|vec![value.into()])
16454    )]
16455    pub address: Option<Vec<String>>,
16456    ///Property: Address
16457    #[serde(skip_serializing_if = "Option::is_none")]
16458    #[cfg_attr(
16459        feature = "builder",
16460        builder(with = |value:impl Into<String>|vec![value.into()])
16461    )]
16462    pub address_entity: Option<Vec<String>>,
16463    ///Property: Aleph URL
16464    #[serde(skip_serializing_if = "Option::is_none")]
16465    #[cfg_attr(
16466        feature = "builder",
16467        builder(with = |value:impl Into<String>|vec![value.into()])
16468    )]
16469    pub aleph_url: Option<Vec<String>>,
16470    ///Property: Alias
16471    #[serde(skip_serializing_if = "Option::is_none")]
16472    #[cfg_attr(
16473        feature = "builder",
16474        builder(with = |value:impl Into<String>|vec![value.into()])
16475    )]
16476    pub alias: Option<Vec<String>>,
16477    ///Property: Country
16478    #[serde(skip_serializing_if = "Option::is_none")]
16479    #[cfg_attr(
16480        feature = "builder",
16481        builder(with = |value:impl Into<String>|vec![value.into()])
16482    )]
16483    pub country: Option<Vec<String>>,
16484    ///Property: Created at
16485    #[serde(skip_serializing_if = "Option::is_none")]
16486    #[cfg_attr(
16487        feature = "builder",
16488        builder(with = |value:impl Into<String>|vec![value.into()])
16489    )]
16490    pub created_at: Option<Vec<String>>,
16491    ///Property: Description
16492    #[serde(skip_serializing_if = "Option::is_none")]
16493    #[cfg_attr(
16494        feature = "builder",
16495        builder(with = |value:impl Into<String>|vec![value.into()])
16496    )]
16497    pub description: Option<Vec<String>>,
16498    ///Property: Dissolution date
16499    #[serde(skip_serializing_if = "Option::is_none")]
16500    #[cfg_attr(
16501        feature = "builder",
16502        builder(with = |value:impl Into<String>|vec![value.into()])
16503    )]
16504    pub dissolution_date: Option<Vec<String>>,
16505    ///Property: Inception date
16506    #[serde(skip_serializing_if = "Option::is_none")]
16507    #[cfg_attr(
16508        feature = "builder",
16509        builder(with = |value:impl Into<String>|vec![value.into()])
16510    )]
16511    pub inception_date: Option<Vec<String>>,
16512    ///Property: Index text
16513    #[serde(skip_serializing_if = "Option::is_none")]
16514    #[cfg_attr(
16515        feature = "builder",
16516        builder(with = |value:impl Into<String>|vec![value.into()])
16517    )]
16518    pub index_text: Option<Vec<String>>,
16519    ///Property: Keywords
16520    #[serde(skip_serializing_if = "Option::is_none")]
16521    #[cfg_attr(
16522        feature = "builder",
16523        builder(with = |value:impl Into<String>|vec![value.into()])
16524    )]
16525    pub keywords: Option<Vec<String>>,
16526    ///Property: Modified on
16527    #[serde(skip_serializing_if = "Option::is_none")]
16528    #[cfg_attr(
16529        feature = "builder",
16530        builder(with = |value:impl Into<String>|vec![value.into()])
16531    )]
16532    pub modified_at: Option<Vec<String>>,
16533    ///Property: Name
16534    #[serde(default)]
16535    #[cfg_attr(
16536        feature = "builder",
16537        builder(with = |value:impl Into<String>|vec![value.into()])
16538    )]
16539    pub name: Vec<String>,
16540    ///Property: Notes
16541    #[serde(skip_serializing_if = "Option::is_none")]
16542    #[cfg_attr(
16543        feature = "builder",
16544        builder(with = |value:impl Into<String>|vec![value.into()])
16545    )]
16546    pub notes: Option<Vec<String>>,
16547    ///Property: Total number of seats
16548    #[serde(
16549        skip_serializing_if = "Option::is_none",
16550        deserialize_with = "deserialize_opt_f64_vec",
16551        default
16552    )]
16553    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
16554    pub number_of_seats: Option<Vec<f64>>,
16555    ///Property: Organization
16556    #[serde(skip_serializing_if = "Option::is_none")]
16557    #[cfg_attr(
16558        feature = "builder",
16559        builder(with = |value:impl Into<String>|vec![value.into()])
16560    )]
16561    pub organization: Option<Vec<String>>,
16562    ///Property: Previous name
16563    #[serde(skip_serializing_if = "Option::is_none")]
16564    #[cfg_attr(
16565        feature = "builder",
16566        builder(with = |value:impl Into<String>|vec![value.into()])
16567    )]
16568    pub previous_name: Option<Vec<String>>,
16569    ///Property: Program
16570    #[serde(skip_serializing_if = "Option::is_none")]
16571    #[cfg_attr(
16572        feature = "builder",
16573        builder(with = |value:impl Into<String>|vec![value.into()])
16574    )]
16575    pub program: Option<Vec<String>>,
16576    ///Property: Program ID
16577    #[serde(skip_serializing_if = "Option::is_none")]
16578    #[cfg_attr(
16579        feature = "builder",
16580        builder(with = |value:impl Into<String>|vec![value.into()])
16581    )]
16582    pub program_id: Option<Vec<String>>,
16583    ///Property: Source document
16584    #[serde(skip_serializing_if = "Option::is_none")]
16585    #[cfg_attr(
16586        feature = "builder",
16587        builder(with = |value:impl Into<String>|vec![value.into()])
16588    )]
16589    pub proof: Option<Vec<String>>,
16590    ///Property: Publishing source
16591    #[serde(skip_serializing_if = "Option::is_none")]
16592    #[cfg_attr(
16593        feature = "builder",
16594        builder(with = |value:impl Into<String>|vec![value.into()])
16595    )]
16596    pub publisher: Option<Vec<String>>,
16597    ///Property: Publishing source URL
16598    #[serde(skip_serializing_if = "Option::is_none")]
16599    #[cfg_attr(
16600        feature = "builder",
16601        builder(with = |value:impl Into<String>|vec![value.into()])
16602    )]
16603    pub publisher_url: Option<Vec<String>>,
16604    ///Property: Retrieved on
16605    #[serde(skip_serializing_if = "Option::is_none")]
16606    #[cfg_attr(
16607        feature = "builder",
16608        builder(with = |value:impl Into<String>|vec![value.into()])
16609    )]
16610    pub retrieved_at: Option<Vec<String>>,
16611    ///Property: Source link
16612    #[serde(skip_serializing_if = "Option::is_none")]
16613    #[cfg_attr(
16614        feature = "builder",
16615        builder(with = |value:impl Into<String>|vec![value.into()])
16616    )]
16617    pub source_url: Option<Vec<String>>,
16618    ///Property: Subnational area
16619    #[serde(skip_serializing_if = "Option::is_none")]
16620    #[cfg_attr(
16621        feature = "builder",
16622        builder(with = |value:impl Into<String>|vec![value.into()])
16623    )]
16624    pub subnational_area: Option<Vec<String>>,
16625    ///Property: Summary
16626    #[serde(skip_serializing_if = "Option::is_none")]
16627    #[cfg_attr(
16628        feature = "builder",
16629        builder(with = |value:impl Into<String>|vec![value.into()])
16630    )]
16631    pub summary: Option<Vec<String>>,
16632    ///Property: Topics
16633    #[serde(skip_serializing_if = "Option::is_none")]
16634    #[cfg_attr(
16635        feature = "builder",
16636        builder(with = |value:impl Into<String>|vec![value.into()])
16637    )]
16638    pub topics: Option<Vec<String>>,
16639    ///Property: Weak alias
16640    #[serde(skip_serializing_if = "Option::is_none")]
16641    #[cfg_attr(
16642        feature = "builder",
16643        builder(with = |value:impl Into<String>|vec![value.into()])
16644    )]
16645    pub weak_alias: Option<Vec<String>>,
16646    ///Property: Wikidata ID
16647    #[serde(skip_serializing_if = "Option::is_none")]
16648    #[cfg_attr(
16649        feature = "builder",
16650        builder(with = |value:impl Into<String>|vec![value.into()])
16651    )]
16652    pub wikidata_id: Option<Vec<String>>,
16653    ///Property: Wikipedia Article
16654    #[serde(skip_serializing_if = "Option::is_none")]
16655    #[cfg_attr(
16656        feature = "builder",
16657        builder(with = |value:impl Into<String>|vec![value.into()])
16658    )]
16659    pub wikipedia_url: Option<Vec<String>>,
16660}
16661impl Position {
16662    /// Create a new entity with the given ID
16663    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
16664    pub fn new(id: impl Into<String>) -> Self {
16665        Self {
16666            id: id.into(),
16667            schema: "Position".to_string(),
16668            address: None,
16669            address_entity: None,
16670            aleph_url: None,
16671            alias: None,
16672            country: None,
16673            created_at: None,
16674            description: None,
16675            dissolution_date: None,
16676            inception_date: None,
16677            index_text: None,
16678            keywords: None,
16679            modified_at: None,
16680            name: Vec::new(),
16681            notes: None,
16682            number_of_seats: None,
16683            organization: None,
16684            previous_name: None,
16685            program: None,
16686            program_id: None,
16687            proof: None,
16688            publisher: None,
16689            publisher_url: None,
16690            retrieved_at: None,
16691            source_url: None,
16692            subnational_area: None,
16693            summary: None,
16694            topics: None,
16695            weak_alias: None,
16696            wikidata_id: None,
16697            wikipedia_url: None,
16698        }
16699    }
16700    /// Get the schema name
16701    pub fn schema_name() -> &'static str {
16702        "Position"
16703    }
16704    /// Serialize to standard FTM nested JSON format
16705    ///
16706    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
16707    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
16708        let mut value = serde_json::to_value(self)?;
16709        if let Some(obj) = value.as_object_mut() {
16710            let id = obj.remove("id");
16711            let schema = obj.remove("schema");
16712            let properties = serde_json::Value::Object(std::mem::take(obj));
16713            if let Some(id) = id {
16714                obj.insert("id".into(), id);
16715            }
16716            if let Some(schema) = schema {
16717                obj.insert("schema".into(), schema);
16718            }
16719            obj.insert("properties".into(), properties);
16720        }
16721        serde_json::to_string(&value)
16722    }
16723}
16724///FTM Schema: Project
16725#[derive(Debug, Clone, Serialize, Deserialize)]
16726#[cfg_attr(feature = "builder", derive(Builder))]
16727#[serde(rename_all = "camelCase")]
16728pub struct Project {
16729    pub id: String,
16730    #[cfg_attr(feature = "builder", builder(default = "Project".to_string()))]
16731    pub schema: String,
16732    ///Property: Address
16733    #[serde(skip_serializing_if = "Option::is_none")]
16734    #[cfg_attr(
16735        feature = "builder",
16736        builder(with = |value:impl Into<String>|vec![value.into()])
16737    )]
16738    pub address: Option<Vec<String>>,
16739    ///Property: Address
16740    #[serde(skip_serializing_if = "Option::is_none")]
16741    #[cfg_attr(
16742        feature = "builder",
16743        builder(with = |value:impl Into<String>|vec![value.into()])
16744    )]
16745    pub address_entity: Option<Vec<String>>,
16746    ///Property: Aleph URL
16747    #[serde(skip_serializing_if = "Option::is_none")]
16748    #[cfg_attr(
16749        feature = "builder",
16750        builder(with = |value:impl Into<String>|vec![value.into()])
16751    )]
16752    pub aleph_url: Option<Vec<String>>,
16753    ///Property: Alias
16754    #[serde(skip_serializing_if = "Option::is_none")]
16755    #[cfg_attr(
16756        feature = "builder",
16757        builder(with = |value:impl Into<String>|vec![value.into()])
16758    )]
16759    pub alias: Option<Vec<String>>,
16760    ///Property: Amount
16761    #[serde(
16762        skip_serializing_if = "Option::is_none",
16763        deserialize_with = "deserialize_opt_f64_vec",
16764        default
16765    )]
16766    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
16767    pub amount: Option<Vec<f64>>,
16768    ///Property: Amount in EUR
16769    #[serde(
16770        skip_serializing_if = "Option::is_none",
16771        deserialize_with = "deserialize_opt_f64_vec",
16772        default
16773    )]
16774    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
16775    pub amount_eur: Option<Vec<f64>>,
16776    ///Property: Amount in USD
16777    #[serde(
16778        skip_serializing_if = "Option::is_none",
16779        deserialize_with = "deserialize_opt_f64_vec",
16780        default
16781    )]
16782    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
16783    pub amount_usd: Option<Vec<f64>>,
16784    ///Property: Country
16785    #[serde(skip_serializing_if = "Option::is_none")]
16786    #[cfg_attr(
16787        feature = "builder",
16788        builder(with = |value:impl Into<String>|vec![value.into()])
16789    )]
16790    pub country: Option<Vec<String>>,
16791    ///Property: Created at
16792    #[serde(skip_serializing_if = "Option::is_none")]
16793    #[cfg_attr(
16794        feature = "builder",
16795        builder(with = |value:impl Into<String>|vec![value.into()])
16796    )]
16797    pub created_at: Option<Vec<String>>,
16798    ///Property: Currency
16799    #[serde(skip_serializing_if = "Option::is_none")]
16800    #[cfg_attr(
16801        feature = "builder",
16802        builder(with = |value:impl Into<String>|vec![value.into()])
16803    )]
16804    pub currency: Option<Vec<String>>,
16805    ///Property: Date
16806    #[serde(skip_serializing_if = "Option::is_none")]
16807    #[cfg_attr(
16808        feature = "builder",
16809        builder(with = |value:impl Into<String>|vec![value.into()])
16810    )]
16811    pub date: Option<Vec<String>>,
16812    ///Property: Description
16813    #[serde(skip_serializing_if = "Option::is_none")]
16814    #[cfg_attr(
16815        feature = "builder",
16816        builder(with = |value:impl Into<String>|vec![value.into()])
16817    )]
16818    pub description: Option<Vec<String>>,
16819    ///Property: End date
16820    #[serde(skip_serializing_if = "Option::is_none")]
16821    #[cfg_attr(
16822        feature = "builder",
16823        builder(with = |value:impl Into<String>|vec![value.into()])
16824    )]
16825    pub end_date: Option<Vec<String>>,
16826    ///Property: Project goal
16827    #[serde(skip_serializing_if = "Option::is_none")]
16828    #[cfg_attr(
16829        feature = "builder",
16830        builder(with = |value:impl Into<String>|vec![value.into()])
16831    )]
16832    pub goal: Option<Vec<String>>,
16833    ///Property: Index text
16834    #[serde(skip_serializing_if = "Option::is_none")]
16835    #[cfg_attr(
16836        feature = "builder",
16837        builder(with = |value:impl Into<String>|vec![value.into()])
16838    )]
16839    pub index_text: Option<Vec<String>>,
16840    ///Property: Keywords
16841    #[serde(skip_serializing_if = "Option::is_none")]
16842    #[cfg_attr(
16843        feature = "builder",
16844        builder(with = |value:impl Into<String>|vec![value.into()])
16845    )]
16846    pub keywords: Option<Vec<String>>,
16847    ///Property: Modified on
16848    #[serde(skip_serializing_if = "Option::is_none")]
16849    #[cfg_attr(
16850        feature = "builder",
16851        builder(with = |value:impl Into<String>|vec![value.into()])
16852    )]
16853    pub modified_at: Option<Vec<String>>,
16854    ///Property: Name
16855    #[serde(default)]
16856    #[cfg_attr(
16857        feature = "builder",
16858        builder(with = |value:impl Into<String>|vec![value.into()])
16859    )]
16860    pub name: Vec<String>,
16861    ///Property: Detected names
16862    #[serde(skip_serializing_if = "Option::is_none")]
16863    #[cfg_attr(
16864        feature = "builder",
16865        builder(with = |value:impl Into<String>|vec![value.into()])
16866    )]
16867    pub names_mentioned: Option<Vec<String>>,
16868    ///Property: Notes
16869    #[serde(skip_serializing_if = "Option::is_none")]
16870    #[cfg_attr(
16871        feature = "builder",
16872        builder(with = |value:impl Into<String>|vec![value.into()])
16873    )]
16874    pub notes: Option<Vec<String>>,
16875    ///Property: Phase
16876    #[serde(skip_serializing_if = "Option::is_none")]
16877    #[cfg_attr(
16878        feature = "builder",
16879        builder(with = |value:impl Into<String>|vec![value.into()])
16880    )]
16881    pub phase: Option<Vec<String>>,
16882    ///Property: Previous name
16883    #[serde(skip_serializing_if = "Option::is_none")]
16884    #[cfg_attr(
16885        feature = "builder",
16886        builder(with = |value:impl Into<String>|vec![value.into()])
16887    )]
16888    pub previous_name: Option<Vec<String>>,
16889    ///Property: Program
16890    #[serde(skip_serializing_if = "Option::is_none")]
16891    #[cfg_attr(
16892        feature = "builder",
16893        builder(with = |value:impl Into<String>|vec![value.into()])
16894    )]
16895    pub program: Option<Vec<String>>,
16896    ///Property: Program ID
16897    #[serde(skip_serializing_if = "Option::is_none")]
16898    #[cfg_attr(
16899        feature = "builder",
16900        builder(with = |value:impl Into<String>|vec![value.into()])
16901    )]
16902    pub program_id: Option<Vec<String>>,
16903    ///Property: Project ID
16904    #[serde(skip_serializing_if = "Option::is_none")]
16905    #[cfg_attr(
16906        feature = "builder",
16907        builder(with = |value:impl Into<String>|vec![value.into()])
16908    )]
16909    pub project_id: Option<Vec<String>>,
16910    ///Property: Source document
16911    #[serde(skip_serializing_if = "Option::is_none")]
16912    #[cfg_attr(
16913        feature = "builder",
16914        builder(with = |value:impl Into<String>|vec![value.into()])
16915    )]
16916    pub proof: Option<Vec<String>>,
16917    ///Property: Publishing source
16918    #[serde(skip_serializing_if = "Option::is_none")]
16919    #[cfg_attr(
16920        feature = "builder",
16921        builder(with = |value:impl Into<String>|vec![value.into()])
16922    )]
16923    pub publisher: Option<Vec<String>>,
16924    ///Property: Publishing source URL
16925    #[serde(skip_serializing_if = "Option::is_none")]
16926    #[cfg_attr(
16927        feature = "builder",
16928        builder(with = |value:impl Into<String>|vec![value.into()])
16929    )]
16930    pub publisher_url: Option<Vec<String>>,
16931    ///Property: Record ID
16932    #[serde(skip_serializing_if = "Option::is_none")]
16933    #[cfg_attr(
16934        feature = "builder",
16935        builder(with = |value:impl Into<String>|vec![value.into()])
16936    )]
16937    pub record_id: Option<Vec<String>>,
16938    ///Property: Retrieved on
16939    #[serde(skip_serializing_if = "Option::is_none")]
16940    #[cfg_attr(
16941        feature = "builder",
16942        builder(with = |value:impl Into<String>|vec![value.into()])
16943    )]
16944    pub retrieved_at: Option<Vec<String>>,
16945    ///Property: Source link
16946    #[serde(skip_serializing_if = "Option::is_none")]
16947    #[cfg_attr(
16948        feature = "builder",
16949        builder(with = |value:impl Into<String>|vec![value.into()])
16950    )]
16951    pub source_url: Option<Vec<String>>,
16952    ///Property: Start date
16953    #[serde(skip_serializing_if = "Option::is_none")]
16954    #[cfg_attr(
16955        feature = "builder",
16956        builder(with = |value:impl Into<String>|vec![value.into()])
16957    )]
16958    pub start_date: Option<Vec<String>>,
16959    ///Property: Status
16960    #[serde(skip_serializing_if = "Option::is_none")]
16961    #[cfg_attr(
16962        feature = "builder",
16963        builder(with = |value:impl Into<String>|vec![value.into()])
16964    )]
16965    pub status: Option<Vec<String>>,
16966    ///Property: Summary
16967    #[serde(skip_serializing_if = "Option::is_none")]
16968    #[cfg_attr(
16969        feature = "builder",
16970        builder(with = |value:impl Into<String>|vec![value.into()])
16971    )]
16972    pub summary: Option<Vec<String>>,
16973    ///Property: Topics
16974    #[serde(skip_serializing_if = "Option::is_none")]
16975    #[cfg_attr(
16976        feature = "builder",
16977        builder(with = |value:impl Into<String>|vec![value.into()])
16978    )]
16979    pub topics: Option<Vec<String>>,
16980    ///Property: Weak alias
16981    #[serde(skip_serializing_if = "Option::is_none")]
16982    #[cfg_attr(
16983        feature = "builder",
16984        builder(with = |value:impl Into<String>|vec![value.into()])
16985    )]
16986    pub weak_alias: Option<Vec<String>>,
16987    ///Property: Wikidata ID
16988    #[serde(skip_serializing_if = "Option::is_none")]
16989    #[cfg_attr(
16990        feature = "builder",
16991        builder(with = |value:impl Into<String>|vec![value.into()])
16992    )]
16993    pub wikidata_id: Option<Vec<String>>,
16994    ///Property: Wikipedia Article
16995    #[serde(skip_serializing_if = "Option::is_none")]
16996    #[cfg_attr(
16997        feature = "builder",
16998        builder(with = |value:impl Into<String>|vec![value.into()])
16999    )]
17000    pub wikipedia_url: Option<Vec<String>>,
17001}
17002impl Project {
17003    /// Create a new entity with the given ID
17004    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
17005    pub fn new(id: impl Into<String>) -> Self {
17006        Self {
17007            id: id.into(),
17008            schema: "Project".to_string(),
17009            address: None,
17010            address_entity: None,
17011            aleph_url: None,
17012            alias: None,
17013            amount: None,
17014            amount_eur: None,
17015            amount_usd: None,
17016            country: None,
17017            created_at: None,
17018            currency: None,
17019            date: None,
17020            description: None,
17021            end_date: None,
17022            goal: None,
17023            index_text: None,
17024            keywords: None,
17025            modified_at: None,
17026            name: Vec::new(),
17027            names_mentioned: None,
17028            notes: None,
17029            phase: None,
17030            previous_name: None,
17031            program: None,
17032            program_id: None,
17033            project_id: None,
17034            proof: None,
17035            publisher: None,
17036            publisher_url: None,
17037            record_id: None,
17038            retrieved_at: None,
17039            source_url: None,
17040            start_date: None,
17041            status: None,
17042            summary: None,
17043            topics: None,
17044            weak_alias: None,
17045            wikidata_id: None,
17046            wikipedia_url: None,
17047        }
17048    }
17049    /// Get the schema name
17050    pub fn schema_name() -> &'static str {
17051        "Project"
17052    }
17053    /// Serialize to standard FTM nested JSON format
17054    ///
17055    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
17056    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
17057        let mut value = serde_json::to_value(self)?;
17058        if let Some(obj) = value.as_object_mut() {
17059            let id = obj.remove("id");
17060            let schema = obj.remove("schema");
17061            let properties = serde_json::Value::Object(std::mem::take(obj));
17062            if let Some(id) = id {
17063                obj.insert("id".into(), id);
17064            }
17065            if let Some(schema) = schema {
17066                obj.insert("schema".into(), schema);
17067            }
17068            obj.insert("properties".into(), properties);
17069        }
17070        serde_json::to_string(&value)
17071    }
17072}
17073///FTM Schema: Project participant
17074#[derive(Debug, Clone, Serialize, Deserialize)]
17075#[cfg_attr(feature = "builder", derive(Builder))]
17076#[serde(rename_all = "camelCase")]
17077pub struct ProjectParticipant {
17078    pub id: String,
17079    #[cfg_attr(feature = "builder", builder(default = "ProjectParticipant".to_string()))]
17080    pub schema: String,
17081    ///Property: Aleph URL
17082    #[serde(skip_serializing_if = "Option::is_none")]
17083    #[cfg_attr(
17084        feature = "builder",
17085        builder(with = |value:impl Into<String>|vec![value.into()])
17086    )]
17087    pub aleph_url: Option<Vec<String>>,
17088    ///Property: Date
17089    #[serde(skip_serializing_if = "Option::is_none")]
17090    #[cfg_attr(
17091        feature = "builder",
17092        builder(with = |value:impl Into<String>|vec![value.into()])
17093    )]
17094    pub date: Option<Vec<String>>,
17095    ///Property: Description
17096    #[serde(skip_serializing_if = "Option::is_none")]
17097    #[cfg_attr(
17098        feature = "builder",
17099        builder(with = |value:impl Into<String>|vec![value.into()])
17100    )]
17101    pub description: Option<Vec<String>>,
17102    ///Property: End date
17103    #[serde(skip_serializing_if = "Option::is_none")]
17104    #[cfg_attr(
17105        feature = "builder",
17106        builder(with = |value:impl Into<String>|vec![value.into()])
17107    )]
17108    pub end_date: Option<Vec<String>>,
17109    ///Property: Index text
17110    #[serde(skip_serializing_if = "Option::is_none")]
17111    #[cfg_attr(
17112        feature = "builder",
17113        builder(with = |value:impl Into<String>|vec![value.into()])
17114    )]
17115    pub index_text: Option<Vec<String>>,
17116    ///Property: Modified on
17117    #[serde(skip_serializing_if = "Option::is_none")]
17118    #[cfg_attr(
17119        feature = "builder",
17120        builder(with = |value:impl Into<String>|vec![value.into()])
17121    )]
17122    pub modified_at: Option<Vec<String>>,
17123    ///Property: Detected names
17124    #[serde(skip_serializing_if = "Option::is_none")]
17125    #[cfg_attr(
17126        feature = "builder",
17127        builder(with = |value:impl Into<String>|vec![value.into()])
17128    )]
17129    pub names_mentioned: Option<Vec<String>>,
17130    ///Property: Participant
17131    #[serde(skip_serializing_if = "Option::is_none")]
17132    #[cfg_attr(
17133        feature = "builder",
17134        builder(with = |value:impl Into<String>|vec![value.into()])
17135    )]
17136    pub participant: Option<Vec<String>>,
17137    ///Property: Project
17138    #[serde(skip_serializing_if = "Option::is_none")]
17139    #[cfg_attr(
17140        feature = "builder",
17141        builder(with = |value:impl Into<String>|vec![value.into()])
17142    )]
17143    pub project: Option<Vec<String>>,
17144    ///Property: Source document
17145    #[serde(skip_serializing_if = "Option::is_none")]
17146    #[cfg_attr(
17147        feature = "builder",
17148        builder(with = |value:impl Into<String>|vec![value.into()])
17149    )]
17150    pub proof: Option<Vec<String>>,
17151    ///Property: Publishing source
17152    #[serde(skip_serializing_if = "Option::is_none")]
17153    #[cfg_attr(
17154        feature = "builder",
17155        builder(with = |value:impl Into<String>|vec![value.into()])
17156    )]
17157    pub publisher: Option<Vec<String>>,
17158    ///Property: Publishing source URL
17159    #[serde(skip_serializing_if = "Option::is_none")]
17160    #[cfg_attr(
17161        feature = "builder",
17162        builder(with = |value:impl Into<String>|vec![value.into()])
17163    )]
17164    pub publisher_url: Option<Vec<String>>,
17165    ///Property: Record ID
17166    #[serde(skip_serializing_if = "Option::is_none")]
17167    #[cfg_attr(
17168        feature = "builder",
17169        builder(with = |value:impl Into<String>|vec![value.into()])
17170    )]
17171    pub record_id: Option<Vec<String>>,
17172    ///Property: Retrieved on
17173    #[serde(skip_serializing_if = "Option::is_none")]
17174    #[cfg_attr(
17175        feature = "builder",
17176        builder(with = |value:impl Into<String>|vec![value.into()])
17177    )]
17178    pub retrieved_at: Option<Vec<String>>,
17179    ///Property: Role
17180    #[serde(skip_serializing_if = "Option::is_none")]
17181    #[cfg_attr(
17182        feature = "builder",
17183        builder(with = |value:impl Into<String>|vec![value.into()])
17184    )]
17185    pub role: Option<Vec<String>>,
17186    ///Property: Source link
17187    #[serde(skip_serializing_if = "Option::is_none")]
17188    #[cfg_attr(
17189        feature = "builder",
17190        builder(with = |value:impl Into<String>|vec![value.into()])
17191    )]
17192    pub source_url: Option<Vec<String>>,
17193    ///Property: Start date
17194    #[serde(skip_serializing_if = "Option::is_none")]
17195    #[cfg_attr(
17196        feature = "builder",
17197        builder(with = |value:impl Into<String>|vec![value.into()])
17198    )]
17199    pub start_date: Option<Vec<String>>,
17200    ///Property: Status
17201    #[serde(skip_serializing_if = "Option::is_none")]
17202    #[cfg_attr(
17203        feature = "builder",
17204        builder(with = |value:impl Into<String>|vec![value.into()])
17205    )]
17206    pub status: Option<Vec<String>>,
17207    ///Property: Summary
17208    #[serde(skip_serializing_if = "Option::is_none")]
17209    #[cfg_attr(
17210        feature = "builder",
17211        builder(with = |value:impl Into<String>|vec![value.into()])
17212    )]
17213    pub summary: Option<Vec<String>>,
17214}
17215impl ProjectParticipant {
17216    /// Create a new entity with the given ID
17217    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
17218    pub fn new(id: impl Into<String>) -> Self {
17219        Self {
17220            id: id.into(),
17221            schema: "ProjectParticipant".to_string(),
17222            aleph_url: None,
17223            date: None,
17224            description: None,
17225            end_date: None,
17226            index_text: None,
17227            modified_at: None,
17228            names_mentioned: None,
17229            participant: None,
17230            project: None,
17231            proof: None,
17232            publisher: None,
17233            publisher_url: None,
17234            record_id: None,
17235            retrieved_at: None,
17236            role: None,
17237            source_url: None,
17238            start_date: None,
17239            status: None,
17240            summary: None,
17241        }
17242    }
17243    /// Get the schema name
17244    pub fn schema_name() -> &'static str {
17245        "ProjectParticipant"
17246    }
17247    /// Serialize to standard FTM nested JSON format
17248    ///
17249    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
17250    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
17251        let mut value = serde_json::to_value(self)?;
17252        if let Some(obj) = value.as_object_mut() {
17253            let id = obj.remove("id");
17254            let schema = obj.remove("schema");
17255            let properties = serde_json::Value::Object(std::mem::take(obj));
17256            if let Some(id) = id {
17257                obj.insert("id".into(), id);
17258            }
17259            if let Some(schema) = schema {
17260                obj.insert("schema".into(), schema);
17261            }
17262            obj.insert("properties".into(), properties);
17263        }
17264        serde_json::to_string(&value)
17265    }
17266}
17267///FTM Schema: Public body
17268#[derive(Debug, Clone, Serialize, Deserialize)]
17269#[cfg_attr(feature = "builder", derive(Builder))]
17270#[serde(rename_all = "camelCase")]
17271pub struct PublicBody {
17272    pub id: String,
17273    #[cfg_attr(feature = "builder", builder(default = "PublicBody".to_string()))]
17274    pub schema: String,
17275    ///Property: Abbreviation
17276    #[serde(skip_serializing_if = "Option::is_none")]
17277    #[cfg_attr(
17278        feature = "builder",
17279        builder(with = |value:impl Into<String>|vec![value.into()])
17280    )]
17281    pub abbreviation: Option<Vec<String>>,
17282    ///Property: Address
17283    #[serde(skip_serializing_if = "Option::is_none")]
17284    #[cfg_attr(
17285        feature = "builder",
17286        builder(with = |value:impl Into<String>|vec![value.into()])
17287    )]
17288    pub address: Option<Vec<String>>,
17289    ///Property: Address
17290    #[serde(skip_serializing_if = "Option::is_none")]
17291    #[cfg_attr(
17292        feature = "builder",
17293        builder(with = |value:impl Into<String>|vec![value.into()])
17294    )]
17295    pub address_entity: Option<Vec<String>>,
17296    ///Property: Aleph URL
17297    #[serde(skip_serializing_if = "Option::is_none")]
17298    #[cfg_attr(
17299        feature = "builder",
17300        builder(with = |value:impl Into<String>|vec![value.into()])
17301    )]
17302    pub aleph_url: Option<Vec<String>>,
17303    ///Property: Alias
17304    #[serde(skip_serializing_if = "Option::is_none")]
17305    #[cfg_attr(
17306        feature = "builder",
17307        builder(with = |value:impl Into<String>|vec![value.into()])
17308    )]
17309    pub alias: Option<Vec<String>>,
17310    ///Property: BrightQuery ID
17311    #[serde(skip_serializing_if = "Option::is_none")]
17312    #[cfg_attr(
17313        feature = "builder",
17314        builder(with = |value:impl Into<String>|vec![value.into()])
17315    )]
17316    pub bright_query_id: Option<Vec<String>>,
17317    ///Property: BrightQuery Organization ID
17318    #[serde(skip_serializing_if = "Option::is_none")]
17319    #[cfg_attr(
17320        feature = "builder",
17321        builder(with = |value:impl Into<String>|vec![value.into()])
17322    )]
17323    pub bright_query_org_id: Option<Vec<String>>,
17324    ///Property: Bureau van Dijk ID
17325    #[serde(skip_serializing_if = "Option::is_none")]
17326    #[cfg_attr(
17327        feature = "builder",
17328        builder(with = |value:impl Into<String>|vec![value.into()])
17329    )]
17330    pub bvd_id: Option<Vec<String>>,
17331    ///Property: CAGE
17332    #[serde(skip_serializing_if = "Option::is_none")]
17333    #[cfg_attr(
17334        feature = "builder",
17335        builder(with = |value:impl Into<String>|vec![value.into()])
17336    )]
17337    pub cage_code: Option<Vec<String>>,
17338    ///Property: Classification
17339    #[serde(skip_serializing_if = "Option::is_none")]
17340    #[cfg_attr(
17341        feature = "builder",
17342        builder(with = |value:impl Into<String>|vec![value.into()])
17343    )]
17344    pub classification: Option<Vec<String>>,
17345    ///Property: Country
17346    #[serde(skip_serializing_if = "Option::is_none")]
17347    #[cfg_attr(
17348        feature = "builder",
17349        builder(with = |value:impl Into<String>|vec![value.into()])
17350    )]
17351    pub country: Option<Vec<String>>,
17352    ///Property: Created at
17353    #[serde(skip_serializing_if = "Option::is_none")]
17354    #[cfg_attr(
17355        feature = "builder",
17356        builder(with = |value:impl Into<String>|vec![value.into()])
17357    )]
17358    pub created_at: Option<Vec<String>>,
17359    ///Property: Description
17360    #[serde(skip_serializing_if = "Option::is_none")]
17361    #[cfg_attr(
17362        feature = "builder",
17363        builder(with = |value:impl Into<String>|vec![value.into()])
17364    )]
17365    pub description: Option<Vec<String>>,
17366    ///Property: Dissolution date
17367    #[serde(skip_serializing_if = "Option::is_none")]
17368    #[cfg_attr(
17369        feature = "builder",
17370        builder(with = |value:impl Into<String>|vec![value.into()])
17371    )]
17372    pub dissolution_date: Option<Vec<String>>,
17373    ///Property: DUNS
17374    #[serde(skip_serializing_if = "Option::is_none")]
17375    #[cfg_attr(
17376        feature = "builder",
17377        builder(with = |value:impl Into<String>|vec![value.into()])
17378    )]
17379    pub duns_code: Option<Vec<String>>,
17380    ///Property: Email
17381    #[serde(skip_serializing_if = "Option::is_none")]
17382    #[cfg_attr(
17383        feature = "builder",
17384        builder(with = |value:impl Into<String>|vec![value.into()])
17385    )]
17386    pub email: Option<Vec<String>>,
17387    ///Property: GIIN
17388    #[serde(skip_serializing_if = "Option::is_none")]
17389    #[cfg_attr(
17390        feature = "builder",
17391        builder(with = |value:impl Into<String>|vec![value.into()])
17392    )]
17393    pub gii_number: Option<Vec<String>>,
17394    ///Property: ICIJ ID
17395    #[serde(skip_serializing_if = "Option::is_none")]
17396    #[cfg_attr(
17397        feature = "builder",
17398        builder(with = |value:impl Into<String>|vec![value.into()])
17399    )]
17400    pub icij_id: Option<Vec<String>>,
17401    ///Property: ID Number
17402    #[serde(skip_serializing_if = "Option::is_none")]
17403    #[cfg_attr(
17404        feature = "builder",
17405        builder(with = |value:impl Into<String>|vec![value.into()])
17406    )]
17407    pub id_number: Option<Vec<String>>,
17408    ///Property: IMO Number
17409    #[serde(skip_serializing_if = "Option::is_none")]
17410    #[cfg_attr(
17411        feature = "builder",
17412        builder(with = |value:impl Into<String>|vec![value.into()])
17413    )]
17414    pub imo_number: Option<Vec<String>>,
17415    ///Property: Incorporation date
17416    #[serde(skip_serializing_if = "Option::is_none")]
17417    #[cfg_attr(
17418        feature = "builder",
17419        builder(with = |value:impl Into<String>|vec![value.into()])
17420    )]
17421    pub incorporation_date: Option<Vec<String>>,
17422    ///Property: Index text
17423    #[serde(skip_serializing_if = "Option::is_none")]
17424    #[cfg_attr(
17425        feature = "builder",
17426        builder(with = |value:impl Into<String>|vec![value.into()])
17427    )]
17428    pub index_text: Option<Vec<String>>,
17429    ///Property: INN
17430    #[serde(skip_serializing_if = "Option::is_none")]
17431    #[cfg_attr(
17432        feature = "builder",
17433        builder(with = |value:impl Into<String>|vec![value.into()])
17434    )]
17435    pub inn_code: Option<Vec<String>>,
17436    ///Property: Jurisdiction
17437    #[serde(skip_serializing_if = "Option::is_none")]
17438    #[cfg_attr(
17439        feature = "builder",
17440        builder(with = |value:impl Into<String>|vec![value.into()])
17441    )]
17442    pub jurisdiction: Option<Vec<String>>,
17443    ///Property: Keywords
17444    #[serde(skip_serializing_if = "Option::is_none")]
17445    #[cfg_attr(
17446        feature = "builder",
17447        builder(with = |value:impl Into<String>|vec![value.into()])
17448    )]
17449    pub keywords: Option<Vec<String>>,
17450    ///Property: Legal form
17451    #[serde(skip_serializing_if = "Option::is_none")]
17452    #[cfg_attr(
17453        feature = "builder",
17454        builder(with = |value:impl Into<String>|vec![value.into()])
17455    )]
17456    pub legal_form: Option<Vec<String>>,
17457    ///Property: LEI
17458    #[serde(skip_serializing_if = "Option::is_none")]
17459    #[cfg_attr(
17460        feature = "builder",
17461        builder(with = |value:impl Into<String>|vec![value.into()])
17462    )]
17463    pub lei_code: Option<Vec<String>>,
17464    ///Property: License Number
17465    #[serde(skip_serializing_if = "Option::is_none")]
17466    #[cfg_attr(
17467        feature = "builder",
17468        builder(with = |value:impl Into<String>|vec![value.into()])
17469    )]
17470    pub license_number: Option<Vec<String>>,
17471    ///Property: Country of origin
17472    #[serde(skip_serializing_if = "Option::is_none")]
17473    #[cfg_attr(
17474        feature = "builder",
17475        builder(with = |value:impl Into<String>|vec![value.into()])
17476    )]
17477    pub main_country: Option<Vec<String>>,
17478    ///Property: Modified on
17479    #[serde(skip_serializing_if = "Option::is_none")]
17480    #[cfg_attr(
17481        feature = "builder",
17482        builder(with = |value:impl Into<String>|vec![value.into()])
17483    )]
17484    pub modified_at: Option<Vec<String>>,
17485    ///Property: Name
17486    #[serde(default)]
17487    #[cfg_attr(
17488        feature = "builder",
17489        builder(with = |value:impl Into<String>|vec![value.into()])
17490    )]
17491    pub name: Vec<String>,
17492    ///Property: Notes
17493    #[serde(skip_serializing_if = "Option::is_none")]
17494    #[cfg_attr(
17495        feature = "builder",
17496        builder(with = |value:impl Into<String>|vec![value.into()])
17497    )]
17498    pub notes: Option<Vec<String>>,
17499    ///Property: NPI
17500    #[serde(skip_serializing_if = "Option::is_none")]
17501    #[cfg_attr(
17502        feature = "builder",
17503        builder(with = |value:impl Into<String>|vec![value.into()])
17504    )]
17505    pub npi_code: Option<Vec<String>>,
17506    ///Property: OGRN
17507    #[serde(skip_serializing_if = "Option::is_none")]
17508    #[cfg_attr(
17509        feature = "builder",
17510        builder(with = |value:impl Into<String>|vec![value.into()])
17511    )]
17512    pub ogrn_code: Option<Vec<String>>,
17513    ///Property: OKPO
17514    #[serde(skip_serializing_if = "Option::is_none")]
17515    #[cfg_attr(
17516        feature = "builder",
17517        builder(with = |value:impl Into<String>|vec![value.into()])
17518    )]
17519    pub okpo_code: Option<Vec<String>>,
17520    ///Property: OpenCorporates URL
17521    #[serde(skip_serializing_if = "Option::is_none")]
17522    #[cfg_attr(
17523        feature = "builder",
17524        builder(with = |value:impl Into<String>|vec![value.into()])
17525    )]
17526    pub opencorporates_url: Option<Vec<String>>,
17527    ///Property: Parent company
17528    #[serde(skip_serializing_if = "Option::is_none")]
17529    #[cfg_attr(
17530        feature = "builder",
17531        builder(with = |value:impl Into<String>|vec![value.into()])
17532    )]
17533    pub parent: Option<Vec<String>>,
17534    ///Property: PermID
17535    #[serde(skip_serializing_if = "Option::is_none")]
17536    #[cfg_attr(
17537        feature = "builder",
17538        builder(with = |value:impl Into<String>|vec![value.into()])
17539    )]
17540    pub perm_id: Option<Vec<String>>,
17541    ///Property: Phone
17542    #[serde(skip_serializing_if = "Option::is_none")]
17543    #[cfg_attr(
17544        feature = "builder",
17545        builder(with = |value:impl Into<String>|vec![value.into()])
17546    )]
17547    pub phone: Option<Vec<String>>,
17548    ///Property: Previous name
17549    #[serde(skip_serializing_if = "Option::is_none")]
17550    #[cfg_attr(
17551        feature = "builder",
17552        builder(with = |value:impl Into<String>|vec![value.into()])
17553    )]
17554    pub previous_name: Option<Vec<String>>,
17555    ///Property: Program
17556    #[serde(skip_serializing_if = "Option::is_none")]
17557    #[cfg_attr(
17558        feature = "builder",
17559        builder(with = |value:impl Into<String>|vec![value.into()])
17560    )]
17561    pub program: Option<Vec<String>>,
17562    ///Property: Program ID
17563    #[serde(skip_serializing_if = "Option::is_none")]
17564    #[cfg_attr(
17565        feature = "builder",
17566        builder(with = |value:impl Into<String>|vec![value.into()])
17567    )]
17568    pub program_id: Option<Vec<String>>,
17569    ///Property: Source document
17570    #[serde(skip_serializing_if = "Option::is_none")]
17571    #[cfg_attr(
17572        feature = "builder",
17573        builder(with = |value:impl Into<String>|vec![value.into()])
17574    )]
17575    pub proof: Option<Vec<String>>,
17576    ///Property: Publishing source
17577    #[serde(skip_serializing_if = "Option::is_none")]
17578    #[cfg_attr(
17579        feature = "builder",
17580        builder(with = |value:impl Into<String>|vec![value.into()])
17581    )]
17582    pub publisher: Option<Vec<String>>,
17583    ///Property: Publishing source URL
17584    #[serde(skip_serializing_if = "Option::is_none")]
17585    #[cfg_attr(
17586        feature = "builder",
17587        builder(with = |value:impl Into<String>|vec![value.into()])
17588    )]
17589    pub publisher_url: Option<Vec<String>>,
17590    ///Property: Registration number
17591    #[serde(skip_serializing_if = "Option::is_none")]
17592    #[cfg_attr(
17593        feature = "builder",
17594        builder(with = |value:impl Into<String>|vec![value.into()])
17595    )]
17596    pub registration_number: Option<Vec<String>>,
17597    ///Property: Retrieved on
17598    #[serde(skip_serializing_if = "Option::is_none")]
17599    #[cfg_attr(
17600        feature = "builder",
17601        builder(with = |value:impl Into<String>|vec![value.into()])
17602    )]
17603    pub retrieved_at: Option<Vec<String>>,
17604    ///Property: Sayari Entity ID
17605    #[serde(skip_serializing_if = "Option::is_none")]
17606    #[cfg_attr(
17607        feature = "builder",
17608        builder(with = |value:impl Into<String>|vec![value.into()])
17609    )]
17610    pub sayari_id: Option<Vec<String>>,
17611    ///Property: Sector
17612    #[serde(skip_serializing_if = "Option::is_none")]
17613    #[cfg_attr(
17614        feature = "builder",
17615        builder(with = |value:impl Into<String>|vec![value.into()])
17616    )]
17617    pub sector: Option<Vec<String>>,
17618    ///Property: Source link
17619    #[serde(skip_serializing_if = "Option::is_none")]
17620    #[cfg_attr(
17621        feature = "builder",
17622        builder(with = |value:impl Into<String>|vec![value.into()])
17623    )]
17624    pub source_url: Option<Vec<String>>,
17625    ///Property: Status
17626    #[serde(skip_serializing_if = "Option::is_none")]
17627    #[cfg_attr(
17628        feature = "builder",
17629        builder(with = |value:impl Into<String>|vec![value.into()])
17630    )]
17631    pub status: Option<Vec<String>>,
17632    ///Property: Summary
17633    #[serde(skip_serializing_if = "Option::is_none")]
17634    #[cfg_attr(
17635        feature = "builder",
17636        builder(with = |value:impl Into<String>|vec![value.into()])
17637    )]
17638    pub summary: Option<Vec<String>>,
17639    ///Property: SWIFT/BIC
17640    #[serde(skip_serializing_if = "Option::is_none")]
17641    #[cfg_attr(
17642        feature = "builder",
17643        builder(with = |value:impl Into<String>|vec![value.into()])
17644    )]
17645    pub swift_bic: Option<Vec<String>>,
17646    ///Property: Tax Number
17647    #[serde(skip_serializing_if = "Option::is_none")]
17648    #[cfg_attr(
17649        feature = "builder",
17650        builder(with = |value:impl Into<String>|vec![value.into()])
17651    )]
17652    pub tax_number: Option<Vec<String>>,
17653    ///Property: Tax status
17654    #[serde(skip_serializing_if = "Option::is_none")]
17655    #[cfg_attr(
17656        feature = "builder",
17657        builder(with = |value:impl Into<String>|vec![value.into()])
17658    )]
17659    pub tax_status: Option<Vec<String>>,
17660    ///Property: Topics
17661    #[serde(skip_serializing_if = "Option::is_none")]
17662    #[cfg_attr(
17663        feature = "builder",
17664        builder(with = |value:impl Into<String>|vec![value.into()])
17665    )]
17666    pub topics: Option<Vec<String>>,
17667    ///Property: Unique Entity ID
17668    #[serde(skip_serializing_if = "Option::is_none")]
17669    #[cfg_attr(
17670        feature = "builder",
17671        builder(with = |value:impl Into<String>|vec![value.into()])
17672    )]
17673    pub unique_entity_id: Option<Vec<String>>,
17674    ///Property: USCC
17675    #[serde(skip_serializing_if = "Option::is_none")]
17676    #[cfg_attr(
17677        feature = "builder",
17678        builder(with = |value:impl Into<String>|vec![value.into()])
17679    )]
17680    pub usc_code: Option<Vec<String>>,
17681    ///Property: V.A.T. Identifier
17682    #[serde(skip_serializing_if = "Option::is_none")]
17683    #[cfg_attr(
17684        feature = "builder",
17685        builder(with = |value:impl Into<String>|vec![value.into()])
17686    )]
17687    pub vat_code: Option<Vec<String>>,
17688    ///Property: Weak alias
17689    #[serde(skip_serializing_if = "Option::is_none")]
17690    #[cfg_attr(
17691        feature = "builder",
17692        builder(with = |value:impl Into<String>|vec![value.into()])
17693    )]
17694    pub weak_alias: Option<Vec<String>>,
17695    ///Property: Website
17696    #[serde(skip_serializing_if = "Option::is_none")]
17697    #[cfg_attr(
17698        feature = "builder",
17699        builder(with = |value:impl Into<String>|vec![value.into()])
17700    )]
17701    pub website: Option<Vec<String>>,
17702    ///Property: Wikidata ID
17703    #[serde(skip_serializing_if = "Option::is_none")]
17704    #[cfg_attr(
17705        feature = "builder",
17706        builder(with = |value:impl Into<String>|vec![value.into()])
17707    )]
17708    pub wikidata_id: Option<Vec<String>>,
17709    ///Property: Wikipedia Article
17710    #[serde(skip_serializing_if = "Option::is_none")]
17711    #[cfg_attr(
17712        feature = "builder",
17713        builder(with = |value:impl Into<String>|vec![value.into()])
17714    )]
17715    pub wikipedia_url: Option<Vec<String>>,
17716}
17717impl PublicBody {
17718    /// Create a new entity with the given ID
17719    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
17720    pub fn new(id: impl Into<String>) -> Self {
17721        Self {
17722            id: id.into(),
17723            schema: "PublicBody".to_string(),
17724            abbreviation: None,
17725            address: None,
17726            address_entity: None,
17727            aleph_url: None,
17728            alias: None,
17729            bright_query_id: None,
17730            bright_query_org_id: None,
17731            bvd_id: None,
17732            cage_code: None,
17733            classification: None,
17734            country: None,
17735            created_at: None,
17736            description: None,
17737            dissolution_date: None,
17738            duns_code: None,
17739            email: None,
17740            gii_number: None,
17741            icij_id: None,
17742            id_number: None,
17743            imo_number: None,
17744            incorporation_date: None,
17745            index_text: None,
17746            inn_code: None,
17747            jurisdiction: None,
17748            keywords: None,
17749            legal_form: None,
17750            lei_code: None,
17751            license_number: None,
17752            main_country: None,
17753            modified_at: None,
17754            name: Vec::new(),
17755            notes: None,
17756            npi_code: None,
17757            ogrn_code: None,
17758            okpo_code: None,
17759            opencorporates_url: None,
17760            parent: None,
17761            perm_id: None,
17762            phone: None,
17763            previous_name: None,
17764            program: None,
17765            program_id: None,
17766            proof: None,
17767            publisher: None,
17768            publisher_url: None,
17769            registration_number: None,
17770            retrieved_at: None,
17771            sayari_id: None,
17772            sector: None,
17773            source_url: None,
17774            status: None,
17775            summary: None,
17776            swift_bic: None,
17777            tax_number: None,
17778            tax_status: None,
17779            topics: None,
17780            unique_entity_id: None,
17781            usc_code: None,
17782            vat_code: None,
17783            weak_alias: None,
17784            website: None,
17785            wikidata_id: None,
17786            wikipedia_url: None,
17787        }
17788    }
17789    /// Get the schema name
17790    pub fn schema_name() -> &'static str {
17791        "PublicBody"
17792    }
17793    /// Serialize to standard FTM nested JSON format
17794    ///
17795    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
17796    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
17797        let mut value = serde_json::to_value(self)?;
17798        if let Some(obj) = value.as_object_mut() {
17799            let id = obj.remove("id");
17800            let schema = obj.remove("schema");
17801            let properties = serde_json::Value::Object(std::mem::take(obj));
17802            if let Some(id) = id {
17803                obj.insert("id".into(), id);
17804            }
17805            if let Some(schema) = schema {
17806                obj.insert("schema".into(), schema);
17807            }
17808            obj.insert("properties".into(), properties);
17809        }
17810        serde_json::to_string(&value)
17811    }
17812}
17813///FTM Schema: Real estate
17814#[derive(Debug, Clone, Serialize, Deserialize)]
17815#[cfg_attr(feature = "builder", derive(Builder))]
17816#[serde(rename_all = "camelCase")]
17817pub struct RealEstate {
17818    pub id: String,
17819    #[cfg_attr(feature = "builder", builder(default = "RealEstate".to_string()))]
17820    pub schema: String,
17821    ///Property: Address
17822    #[serde(skip_serializing_if = "Option::is_none")]
17823    #[cfg_attr(
17824        feature = "builder",
17825        builder(with = |value:impl Into<String>|vec![value.into()])
17826    )]
17827    pub address: Option<Vec<String>>,
17828    ///Property: Address
17829    #[serde(skip_serializing_if = "Option::is_none")]
17830    #[cfg_attr(
17831        feature = "builder",
17832        builder(with = |value:impl Into<String>|vec![value.into()])
17833    )]
17834    pub address_entity: Option<Vec<String>>,
17835    ///Property: Aleph URL
17836    #[serde(skip_serializing_if = "Option::is_none")]
17837    #[cfg_attr(
17838        feature = "builder",
17839        builder(with = |value:impl Into<String>|vec![value.into()])
17840    )]
17841    pub aleph_url: Option<Vec<String>>,
17842    ///Property: Alias
17843    #[serde(skip_serializing_if = "Option::is_none")]
17844    #[cfg_attr(
17845        feature = "builder",
17846        builder(with = |value:impl Into<String>|vec![value.into()])
17847    )]
17848    pub alias: Option<Vec<String>>,
17849    ///Property: Amount
17850    #[serde(
17851        skip_serializing_if = "Option::is_none",
17852        deserialize_with = "deserialize_opt_f64_vec",
17853        default
17854    )]
17855    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17856    pub amount: Option<Vec<f64>>,
17857    ///Property: Amount in EUR
17858    #[serde(
17859        skip_serializing_if = "Option::is_none",
17860        deserialize_with = "deserialize_opt_f64_vec",
17861        default
17862    )]
17863    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17864    pub amount_eur: Option<Vec<f64>>,
17865    ///Property: Amount in USD
17866    #[serde(
17867        skip_serializing_if = "Option::is_none",
17868        deserialize_with = "deserialize_opt_f64_vec",
17869        default
17870    )]
17871    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17872    pub amount_usd: Option<Vec<f64>>,
17873    ///Property: Area
17874    #[serde(
17875        skip_serializing_if = "Option::is_none",
17876        deserialize_with = "deserialize_opt_f64_vec",
17877        default
17878    )]
17879    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17880    pub area: Option<Vec<f64>>,
17881    ///Property: Cadastral code
17882    #[serde(skip_serializing_if = "Option::is_none")]
17883    #[cfg_attr(
17884        feature = "builder",
17885        builder(with = |value:impl Into<String>|vec![value.into()])
17886    )]
17887    pub cadastral_code: Option<Vec<String>>,
17888    ///Property: Census block
17889    #[serde(skip_serializing_if = "Option::is_none")]
17890    #[cfg_attr(
17891        feature = "builder",
17892        builder(with = |value:impl Into<String>|vec![value.into()])
17893    )]
17894    pub census_block: Option<Vec<String>>,
17895    ///Property: Country
17896    #[serde(skip_serializing_if = "Option::is_none")]
17897    #[cfg_attr(
17898        feature = "builder",
17899        builder(with = |value:impl Into<String>|vec![value.into()])
17900    )]
17901    pub country: Option<Vec<String>>,
17902    ///Property: Record date
17903    #[serde(skip_serializing_if = "Option::is_none")]
17904    #[cfg_attr(
17905        feature = "builder",
17906        builder(with = |value:impl Into<String>|vec![value.into()])
17907    )]
17908    pub create_date: Option<Vec<String>>,
17909    ///Property: Created at
17910    #[serde(skip_serializing_if = "Option::is_none")]
17911    #[cfg_attr(
17912        feature = "builder",
17913        builder(with = |value:impl Into<String>|vec![value.into()])
17914    )]
17915    pub created_at: Option<Vec<String>>,
17916    ///Property: Currency
17917    #[serde(skip_serializing_if = "Option::is_none")]
17918    #[cfg_attr(
17919        feature = "builder",
17920        builder(with = |value:impl Into<String>|vec![value.into()])
17921    )]
17922    pub currency: Option<Vec<String>>,
17923    ///Property: Description
17924    #[serde(skip_serializing_if = "Option::is_none")]
17925    #[cfg_attr(
17926        feature = "builder",
17927        builder(with = |value:impl Into<String>|vec![value.into()])
17928    )]
17929    pub description: Option<Vec<String>>,
17930    ///Property: Encumbrance
17931    #[serde(skip_serializing_if = "Option::is_none")]
17932    #[cfg_attr(
17933        feature = "builder",
17934        builder(with = |value:impl Into<String>|vec![value.into()])
17935    )]
17936    pub encumbrance: Option<Vec<String>>,
17937    ///Property: Index text
17938    #[serde(skip_serializing_if = "Option::is_none")]
17939    #[cfg_attr(
17940        feature = "builder",
17941        builder(with = |value:impl Into<String>|vec![value.into()])
17942    )]
17943    pub index_text: Option<Vec<String>>,
17944    ///Property: Keywords
17945    #[serde(skip_serializing_if = "Option::is_none")]
17946    #[cfg_attr(
17947        feature = "builder",
17948        builder(with = |value:impl Into<String>|vec![value.into()])
17949    )]
17950    pub keywords: Option<Vec<String>>,
17951    ///Property: Land type
17952    #[serde(skip_serializing_if = "Option::is_none")]
17953    #[cfg_attr(
17954        feature = "builder",
17955        builder(with = |value:impl Into<String>|vec![value.into()])
17956    )]
17957    pub land_type: Option<Vec<String>>,
17958    ///Property: Latitude
17959    #[serde(
17960        skip_serializing_if = "Option::is_none",
17961        deserialize_with = "deserialize_opt_f64_vec",
17962        default
17963    )]
17964    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17965    pub latitude: Option<Vec<f64>>,
17966    ///Property: Longitude
17967    #[serde(
17968        skip_serializing_if = "Option::is_none",
17969        deserialize_with = "deserialize_opt_f64_vec",
17970        default
17971    )]
17972    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17973    pub longitude: Option<Vec<f64>>,
17974    ///Property: Modified on
17975    #[serde(skip_serializing_if = "Option::is_none")]
17976    #[cfg_attr(
17977        feature = "builder",
17978        builder(with = |value:impl Into<String>|vec![value.into()])
17979    )]
17980    pub modified_at: Option<Vec<String>>,
17981    ///Property: Name
17982    #[serde(default)]
17983    #[cfg_attr(
17984        feature = "builder",
17985        builder(with = |value:impl Into<String>|vec![value.into()])
17986    )]
17987    pub name: Vec<String>,
17988    ///Property: Notes
17989    #[serde(skip_serializing_if = "Option::is_none")]
17990    #[cfg_attr(
17991        feature = "builder",
17992        builder(with = |value:impl Into<String>|vec![value.into()])
17993    )]
17994    pub notes: Option<Vec<String>>,
17995    ///Property: Parent unit
17996    #[serde(skip_serializing_if = "Option::is_none")]
17997    #[cfg_attr(
17998        feature = "builder",
17999        builder(with = |value:impl Into<String>|vec![value.into()])
18000    )]
18001    pub parent: Option<Vec<String>>,
18002    ///Property: Previous name
18003    #[serde(skip_serializing_if = "Option::is_none")]
18004    #[cfg_attr(
18005        feature = "builder",
18006        builder(with = |value:impl Into<String>|vec![value.into()])
18007    )]
18008    pub previous_name: Option<Vec<String>>,
18009    ///Property: Program
18010    #[serde(skip_serializing_if = "Option::is_none")]
18011    #[cfg_attr(
18012        feature = "builder",
18013        builder(with = |value:impl Into<String>|vec![value.into()])
18014    )]
18015    pub program: Option<Vec<String>>,
18016    ///Property: Program ID
18017    #[serde(skip_serializing_if = "Option::is_none")]
18018    #[cfg_attr(
18019        feature = "builder",
18020        builder(with = |value:impl Into<String>|vec![value.into()])
18021    )]
18022    pub program_id: Option<Vec<String>>,
18023    ///Property: Source document
18024    #[serde(skip_serializing_if = "Option::is_none")]
18025    #[cfg_attr(
18026        feature = "builder",
18027        builder(with = |value:impl Into<String>|vec![value.into()])
18028    )]
18029    pub proof: Option<Vec<String>>,
18030    ///Property: Property type
18031    #[serde(skip_serializing_if = "Option::is_none")]
18032    #[cfg_attr(
18033        feature = "builder",
18034        builder(with = |value:impl Into<String>|vec![value.into()])
18035    )]
18036    pub property_type: Option<Vec<String>>,
18037    ///Property: Publishing source
18038    #[serde(skip_serializing_if = "Option::is_none")]
18039    #[cfg_attr(
18040        feature = "builder",
18041        builder(with = |value:impl Into<String>|vec![value.into()])
18042    )]
18043    pub publisher: Option<Vec<String>>,
18044    ///Property: Publishing source URL
18045    #[serde(skip_serializing_if = "Option::is_none")]
18046    #[cfg_attr(
18047        feature = "builder",
18048        builder(with = |value:impl Into<String>|vec![value.into()])
18049    )]
18050    pub publisher_url: Option<Vec<String>>,
18051    ///Property: Registration number
18052    #[serde(skip_serializing_if = "Option::is_none")]
18053    #[cfg_attr(
18054        feature = "builder",
18055        builder(with = |value:impl Into<String>|vec![value.into()])
18056    )]
18057    pub registration_number: Option<Vec<String>>,
18058    ///Property: Retrieved on
18059    #[serde(skip_serializing_if = "Option::is_none")]
18060    #[cfg_attr(
18061        feature = "builder",
18062        builder(with = |value:impl Into<String>|vec![value.into()])
18063    )]
18064    pub retrieved_at: Option<Vec<String>>,
18065    ///Property: Source link
18066    #[serde(skip_serializing_if = "Option::is_none")]
18067    #[cfg_attr(
18068        feature = "builder",
18069        builder(with = |value:impl Into<String>|vec![value.into()])
18070    )]
18071    pub source_url: Option<Vec<String>>,
18072    ///Property: Summary
18073    #[serde(skip_serializing_if = "Option::is_none")]
18074    #[cfg_attr(
18075        feature = "builder",
18076        builder(with = |value:impl Into<String>|vec![value.into()])
18077    )]
18078    pub summary: Option<Vec<String>>,
18079    ///Property: Tenure
18080    #[serde(skip_serializing_if = "Option::is_none")]
18081    #[cfg_attr(
18082        feature = "builder",
18083        builder(with = |value:impl Into<String>|vec![value.into()])
18084    )]
18085    pub tenure: Option<Vec<String>>,
18086    ///Property: Title number
18087    #[serde(skip_serializing_if = "Option::is_none")]
18088    #[cfg_attr(
18089        feature = "builder",
18090        builder(with = |value:impl Into<String>|vec![value.into()])
18091    )]
18092    pub title_number: Option<Vec<String>>,
18093    ///Property: Topics
18094    #[serde(skip_serializing_if = "Option::is_none")]
18095    #[cfg_attr(
18096        feature = "builder",
18097        builder(with = |value:impl Into<String>|vec![value.into()])
18098    )]
18099    pub topics: Option<Vec<String>>,
18100    ///Property: Weak alias
18101    #[serde(skip_serializing_if = "Option::is_none")]
18102    #[cfg_attr(
18103        feature = "builder",
18104        builder(with = |value:impl Into<String>|vec![value.into()])
18105    )]
18106    pub weak_alias: Option<Vec<String>>,
18107    ///Property: Wikidata ID
18108    #[serde(skip_serializing_if = "Option::is_none")]
18109    #[cfg_attr(
18110        feature = "builder",
18111        builder(with = |value:impl Into<String>|vec![value.into()])
18112    )]
18113    pub wikidata_id: Option<Vec<String>>,
18114    ///Property: Wikipedia Article
18115    #[serde(skip_serializing_if = "Option::is_none")]
18116    #[cfg_attr(
18117        feature = "builder",
18118        builder(with = |value:impl Into<String>|vec![value.into()])
18119    )]
18120    pub wikipedia_url: Option<Vec<String>>,
18121}
18122impl RealEstate {
18123    /// Create a new entity with the given ID
18124    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
18125    pub fn new(id: impl Into<String>) -> Self {
18126        Self {
18127            id: id.into(),
18128            schema: "RealEstate".to_string(),
18129            address: None,
18130            address_entity: None,
18131            aleph_url: None,
18132            alias: None,
18133            amount: None,
18134            amount_eur: None,
18135            amount_usd: None,
18136            area: None,
18137            cadastral_code: None,
18138            census_block: None,
18139            country: None,
18140            create_date: None,
18141            created_at: None,
18142            currency: None,
18143            description: None,
18144            encumbrance: None,
18145            index_text: None,
18146            keywords: None,
18147            land_type: None,
18148            latitude: None,
18149            longitude: None,
18150            modified_at: None,
18151            name: Vec::new(),
18152            notes: None,
18153            parent: None,
18154            previous_name: None,
18155            program: None,
18156            program_id: None,
18157            proof: None,
18158            property_type: None,
18159            publisher: None,
18160            publisher_url: None,
18161            registration_number: None,
18162            retrieved_at: None,
18163            source_url: None,
18164            summary: None,
18165            tenure: None,
18166            title_number: None,
18167            topics: None,
18168            weak_alias: None,
18169            wikidata_id: None,
18170            wikipedia_url: None,
18171        }
18172    }
18173    /// Get the schema name
18174    pub fn schema_name() -> &'static str {
18175        "RealEstate"
18176    }
18177    /// Serialize to standard FTM nested JSON format
18178    ///
18179    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
18180    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
18181        let mut value = serde_json::to_value(self)?;
18182        if let Some(obj) = value.as_object_mut() {
18183            let id = obj.remove("id");
18184            let schema = obj.remove("schema");
18185            let properties = serde_json::Value::Object(std::mem::take(obj));
18186            if let Some(id) = id {
18187                obj.insert("id".into(), id);
18188            }
18189            if let Some(schema) = schema {
18190                obj.insert("schema".into(), schema);
18191            }
18192            obj.insert("properties".into(), properties);
18193        }
18194        serde_json::to_string(&value)
18195    }
18196}
18197///FTM Schema: Representation
18198#[derive(Debug, Clone, Serialize, Deserialize)]
18199#[cfg_attr(feature = "builder", derive(Builder))]
18200#[serde(rename_all = "camelCase")]
18201pub struct Representation {
18202    pub id: String,
18203    #[cfg_attr(feature = "builder", builder(default = "Representation".to_string()))]
18204    pub schema: String,
18205    ///Property: Agent
18206    #[serde(default)]
18207    #[cfg_attr(
18208        feature = "builder",
18209        builder(with = |value:impl Into<String>|vec![value.into()])
18210    )]
18211    pub agent: Vec<String>,
18212    ///Property: Aleph URL
18213    #[serde(skip_serializing_if = "Option::is_none")]
18214    #[cfg_attr(
18215        feature = "builder",
18216        builder(with = |value:impl Into<String>|vec![value.into()])
18217    )]
18218    pub aleph_url: Option<Vec<String>>,
18219    ///Property: Client
18220    #[serde(default)]
18221    #[cfg_attr(
18222        feature = "builder",
18223        builder(with = |value:impl Into<String>|vec![value.into()])
18224    )]
18225    pub client: Vec<String>,
18226    ///Property: Date
18227    #[serde(skip_serializing_if = "Option::is_none")]
18228    #[cfg_attr(
18229        feature = "builder",
18230        builder(with = |value:impl Into<String>|vec![value.into()])
18231    )]
18232    pub date: Option<Vec<String>>,
18233    ///Property: Description
18234    #[serde(skip_serializing_if = "Option::is_none")]
18235    #[cfg_attr(
18236        feature = "builder",
18237        builder(with = |value:impl Into<String>|vec![value.into()])
18238    )]
18239    pub description: Option<Vec<String>>,
18240    ///Property: End date
18241    #[serde(skip_serializing_if = "Option::is_none")]
18242    #[cfg_attr(
18243        feature = "builder",
18244        builder(with = |value:impl Into<String>|vec![value.into()])
18245    )]
18246    pub end_date: Option<Vec<String>>,
18247    ///Property: Index text
18248    #[serde(skip_serializing_if = "Option::is_none")]
18249    #[cfg_attr(
18250        feature = "builder",
18251        builder(with = |value:impl Into<String>|vec![value.into()])
18252    )]
18253    pub index_text: Option<Vec<String>>,
18254    ///Property: Modified on
18255    #[serde(skip_serializing_if = "Option::is_none")]
18256    #[cfg_attr(
18257        feature = "builder",
18258        builder(with = |value:impl Into<String>|vec![value.into()])
18259    )]
18260    pub modified_at: Option<Vec<String>>,
18261    ///Property: Detected names
18262    #[serde(skip_serializing_if = "Option::is_none")]
18263    #[cfg_attr(
18264        feature = "builder",
18265        builder(with = |value:impl Into<String>|vec![value.into()])
18266    )]
18267    pub names_mentioned: Option<Vec<String>>,
18268    ///Property: Source document
18269    #[serde(skip_serializing_if = "Option::is_none")]
18270    #[cfg_attr(
18271        feature = "builder",
18272        builder(with = |value:impl Into<String>|vec![value.into()])
18273    )]
18274    pub proof: Option<Vec<String>>,
18275    ///Property: Publishing source
18276    #[serde(skip_serializing_if = "Option::is_none")]
18277    #[cfg_attr(
18278        feature = "builder",
18279        builder(with = |value:impl Into<String>|vec![value.into()])
18280    )]
18281    pub publisher: Option<Vec<String>>,
18282    ///Property: Publishing source URL
18283    #[serde(skip_serializing_if = "Option::is_none")]
18284    #[cfg_attr(
18285        feature = "builder",
18286        builder(with = |value:impl Into<String>|vec![value.into()])
18287    )]
18288    pub publisher_url: Option<Vec<String>>,
18289    ///Property: Record ID
18290    #[serde(skip_serializing_if = "Option::is_none")]
18291    #[cfg_attr(
18292        feature = "builder",
18293        builder(with = |value:impl Into<String>|vec![value.into()])
18294    )]
18295    pub record_id: Option<Vec<String>>,
18296    ///Property: Retrieved on
18297    #[serde(skip_serializing_if = "Option::is_none")]
18298    #[cfg_attr(
18299        feature = "builder",
18300        builder(with = |value:impl Into<String>|vec![value.into()])
18301    )]
18302    pub retrieved_at: Option<Vec<String>>,
18303    ///Property: Role
18304    #[serde(skip_serializing_if = "Option::is_none")]
18305    #[cfg_attr(
18306        feature = "builder",
18307        builder(with = |value:impl Into<String>|vec![value.into()])
18308    )]
18309    pub role: Option<Vec<String>>,
18310    ///Property: Source link
18311    #[serde(skip_serializing_if = "Option::is_none")]
18312    #[cfg_attr(
18313        feature = "builder",
18314        builder(with = |value:impl Into<String>|vec![value.into()])
18315    )]
18316    pub source_url: Option<Vec<String>>,
18317    ///Property: Start date
18318    #[serde(skip_serializing_if = "Option::is_none")]
18319    #[cfg_attr(
18320        feature = "builder",
18321        builder(with = |value:impl Into<String>|vec![value.into()])
18322    )]
18323    pub start_date: Option<Vec<String>>,
18324    ///Property: Status
18325    #[serde(skip_serializing_if = "Option::is_none")]
18326    #[cfg_attr(
18327        feature = "builder",
18328        builder(with = |value:impl Into<String>|vec![value.into()])
18329    )]
18330    pub status: Option<Vec<String>>,
18331    ///Property: Summary
18332    #[serde(skip_serializing_if = "Option::is_none")]
18333    #[cfg_attr(
18334        feature = "builder",
18335        builder(with = |value:impl Into<String>|vec![value.into()])
18336    )]
18337    pub summary: Option<Vec<String>>,
18338}
18339impl Representation {
18340    /// Create a new entity with the given ID
18341    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
18342    pub fn new(id: impl Into<String>) -> Self {
18343        Self {
18344            id: id.into(),
18345            schema: "Representation".to_string(),
18346            agent: Vec::new(),
18347            aleph_url: None,
18348            client: Vec::new(),
18349            date: None,
18350            description: None,
18351            end_date: None,
18352            index_text: None,
18353            modified_at: None,
18354            names_mentioned: None,
18355            proof: None,
18356            publisher: None,
18357            publisher_url: None,
18358            record_id: None,
18359            retrieved_at: None,
18360            role: None,
18361            source_url: None,
18362            start_date: None,
18363            status: None,
18364            summary: None,
18365        }
18366    }
18367    /// Get the schema name
18368    pub fn schema_name() -> &'static str {
18369        "Representation"
18370    }
18371    /// Serialize to standard FTM nested JSON format
18372    ///
18373    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
18374    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
18375        let mut value = serde_json::to_value(self)?;
18376        if let Some(obj) = value.as_object_mut() {
18377            let id = obj.remove("id");
18378            let schema = obj.remove("schema");
18379            let properties = serde_json::Value::Object(std::mem::take(obj));
18380            if let Some(id) = id {
18381                obj.insert("id".into(), id);
18382            }
18383            if let Some(schema) = schema {
18384                obj.insert("schema".into(), schema);
18385            }
18386            obj.insert("properties".into(), properties);
18387        }
18388        serde_json::to_string(&value)
18389    }
18390}
18391///FTM Schema: Risk
18392#[derive(Debug, Clone, Serialize, Deserialize)]
18393#[cfg_attr(feature = "builder", derive(Builder))]
18394#[serde(rename_all = "camelCase")]
18395pub struct Risk {
18396    pub id: String,
18397    #[cfg_attr(feature = "builder", builder(default = "Risk".to_string()))]
18398    pub schema: String,
18399    ///Property: Aleph URL
18400    #[serde(skip_serializing_if = "Option::is_none")]
18401    #[cfg_attr(
18402        feature = "builder",
18403        builder(with = |value:impl Into<String>|vec![value.into()])
18404    )]
18405    pub aleph_url: Option<Vec<String>>,
18406    ///Property: Country
18407    #[serde(skip_serializing_if = "Option::is_none")]
18408    #[cfg_attr(
18409        feature = "builder",
18410        builder(with = |value:impl Into<String>|vec![value.into()])
18411    )]
18412    pub country: Option<Vec<String>>,
18413    ///Property: Date
18414    #[serde(skip_serializing_if = "Option::is_none")]
18415    #[cfg_attr(
18416        feature = "builder",
18417        builder(with = |value:impl Into<String>|vec![value.into()])
18418    )]
18419    pub date: Option<Vec<String>>,
18420    ///Property: Description
18421    #[serde(skip_serializing_if = "Option::is_none")]
18422    #[cfg_attr(
18423        feature = "builder",
18424        builder(with = |value:impl Into<String>|vec![value.into()])
18425    )]
18426    pub description: Option<Vec<String>>,
18427    ///Property: Duration
18428    #[serde(
18429        skip_serializing_if = "Option::is_none",
18430        deserialize_with = "deserialize_opt_f64_vec",
18431        default
18432    )]
18433    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
18434    pub duration: Option<Vec<f64>>,
18435    ///Property: End date
18436    #[serde(skip_serializing_if = "Option::is_none")]
18437    #[cfg_attr(
18438        feature = "builder",
18439        builder(with = |value:impl Into<String>|vec![value.into()])
18440    )]
18441    pub end_date: Option<Vec<String>>,
18442    ///Property: Entity
18443    #[serde(default)]
18444    #[cfg_attr(
18445        feature = "builder",
18446        builder(with = |value:impl Into<String>|vec![value.into()])
18447    )]
18448    pub entity: Vec<String>,
18449    ///Property: Index text
18450    #[serde(skip_serializing_if = "Option::is_none")]
18451    #[cfg_attr(
18452        feature = "builder",
18453        builder(with = |value:impl Into<String>|vec![value.into()])
18454    )]
18455    pub index_text: Option<Vec<String>>,
18456    ///Property: Listing date
18457    #[serde(skip_serializing_if = "Option::is_none")]
18458    #[cfg_attr(
18459        feature = "builder",
18460        builder(with = |value:impl Into<String>|vec![value.into()])
18461    )]
18462    pub listing_date: Option<Vec<String>>,
18463    ///Property: Modified on
18464    #[serde(skip_serializing_if = "Option::is_none")]
18465    #[cfg_attr(
18466        feature = "builder",
18467        builder(with = |value:impl Into<String>|vec![value.into()])
18468    )]
18469    pub modified_at: Option<Vec<String>>,
18470    ///Property: Detected names
18471    #[serde(skip_serializing_if = "Option::is_none")]
18472    #[cfg_attr(
18473        feature = "builder",
18474        builder(with = |value:impl Into<String>|vec![value.into()])
18475    )]
18476    pub names_mentioned: Option<Vec<String>>,
18477    ///Property: Source document
18478    #[serde(skip_serializing_if = "Option::is_none")]
18479    #[cfg_attr(
18480        feature = "builder",
18481        builder(with = |value:impl Into<String>|vec![value.into()])
18482    )]
18483    pub proof: Option<Vec<String>>,
18484    ///Property: Publishing source
18485    #[serde(skip_serializing_if = "Option::is_none")]
18486    #[cfg_attr(
18487        feature = "builder",
18488        builder(with = |value:impl Into<String>|vec![value.into()])
18489    )]
18490    pub publisher: Option<Vec<String>>,
18491    ///Property: Publishing source URL
18492    #[serde(skip_serializing_if = "Option::is_none")]
18493    #[cfg_attr(
18494        feature = "builder",
18495        builder(with = |value:impl Into<String>|vec![value.into()])
18496    )]
18497    pub publisher_url: Option<Vec<String>>,
18498    ///Property: Reason
18499    #[serde(skip_serializing_if = "Option::is_none")]
18500    #[cfg_attr(
18501        feature = "builder",
18502        builder(with = |value:impl Into<String>|vec![value.into()])
18503    )]
18504    pub reason: Option<Vec<String>>,
18505    ///Property: Record ID
18506    #[serde(skip_serializing_if = "Option::is_none")]
18507    #[cfg_attr(
18508        feature = "builder",
18509        builder(with = |value:impl Into<String>|vec![value.into()])
18510    )]
18511    pub record_id: Option<Vec<String>>,
18512    ///Property: Retrieved on
18513    #[serde(skip_serializing_if = "Option::is_none")]
18514    #[cfg_attr(
18515        feature = "builder",
18516        builder(with = |value:impl Into<String>|vec![value.into()])
18517    )]
18518    pub retrieved_at: Option<Vec<String>>,
18519    ///Property: Source link
18520    #[serde(skip_serializing_if = "Option::is_none")]
18521    #[cfg_attr(
18522        feature = "builder",
18523        builder(with = |value:impl Into<String>|vec![value.into()])
18524    )]
18525    pub source_url: Option<Vec<String>>,
18526    ///Property: Start date
18527    #[serde(skip_serializing_if = "Option::is_none")]
18528    #[cfg_attr(
18529        feature = "builder",
18530        builder(with = |value:impl Into<String>|vec![value.into()])
18531    )]
18532    pub start_date: Option<Vec<String>>,
18533    ///Property: Status
18534    #[serde(skip_serializing_if = "Option::is_none")]
18535    #[cfg_attr(
18536        feature = "builder",
18537        builder(with = |value:impl Into<String>|vec![value.into()])
18538    )]
18539    pub status: Option<Vec<String>>,
18540    ///Property: Summary
18541    #[serde(skip_serializing_if = "Option::is_none")]
18542    #[cfg_attr(
18543        feature = "builder",
18544        builder(with = |value:impl Into<String>|vec![value.into()])
18545    )]
18546    pub summary: Option<Vec<String>>,
18547    ///Property: Topics
18548    #[serde(skip_serializing_if = "Option::is_none")]
18549    #[cfg_attr(
18550        feature = "builder",
18551        builder(with = |value:impl Into<String>|vec![value.into()])
18552    )]
18553    pub topics: Option<Vec<String>>,
18554}
18555impl Risk {
18556    /// Create a new entity with the given ID
18557    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
18558    pub fn new(id: impl Into<String>) -> Self {
18559        Self {
18560            id: id.into(),
18561            schema: "Risk".to_string(),
18562            aleph_url: None,
18563            country: None,
18564            date: None,
18565            description: None,
18566            duration: None,
18567            end_date: None,
18568            entity: Vec::new(),
18569            index_text: None,
18570            listing_date: None,
18571            modified_at: None,
18572            names_mentioned: None,
18573            proof: None,
18574            publisher: None,
18575            publisher_url: None,
18576            reason: None,
18577            record_id: None,
18578            retrieved_at: None,
18579            source_url: None,
18580            start_date: None,
18581            status: None,
18582            summary: None,
18583            topics: None,
18584        }
18585    }
18586    /// Get the schema name
18587    pub fn schema_name() -> &'static str {
18588        "Risk"
18589    }
18590    /// Serialize to standard FTM nested JSON format
18591    ///
18592    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
18593    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
18594        let mut value = serde_json::to_value(self)?;
18595        if let Some(obj) = value.as_object_mut() {
18596            let id = obj.remove("id");
18597            let schema = obj.remove("schema");
18598            let properties = serde_json::Value::Object(std::mem::take(obj));
18599            if let Some(id) = id {
18600                obj.insert("id".into(), id);
18601            }
18602            if let Some(schema) = schema {
18603                obj.insert("schema".into(), schema);
18604            }
18605            obj.insert("properties".into(), properties);
18606        }
18607        serde_json::to_string(&value)
18608    }
18609}
18610///FTM Schema: Sanction
18611#[derive(Debug, Clone, Serialize, Deserialize)]
18612#[cfg_attr(feature = "builder", derive(Builder))]
18613#[serde(rename_all = "camelCase")]
18614pub struct Sanction {
18615    pub id: String,
18616    #[cfg_attr(feature = "builder", builder(default = "Sanction".to_string()))]
18617    pub schema: String,
18618    ///Property: Aleph URL
18619    #[serde(skip_serializing_if = "Option::is_none")]
18620    #[cfg_attr(
18621        feature = "builder",
18622        builder(with = |value:impl Into<String>|vec![value.into()])
18623    )]
18624    pub aleph_url: Option<Vec<String>>,
18625    ///Property: Authority
18626    #[serde(skip_serializing_if = "Option::is_none")]
18627    #[cfg_attr(
18628        feature = "builder",
18629        builder(with = |value:impl Into<String>|vec![value.into()])
18630    )]
18631    pub authority: Option<Vec<String>>,
18632    ///Property: Authority-issued identifier
18633    #[serde(skip_serializing_if = "Option::is_none")]
18634    #[cfg_attr(
18635        feature = "builder",
18636        builder(with = |value:impl Into<String>|vec![value.into()])
18637    )]
18638    pub authority_id: Option<Vec<String>>,
18639    ///Property: Country
18640    #[serde(skip_serializing_if = "Option::is_none")]
18641    #[cfg_attr(
18642        feature = "builder",
18643        builder(with = |value:impl Into<String>|vec![value.into()])
18644    )]
18645    pub country: Option<Vec<String>>,
18646    ///Property: Date
18647    #[serde(skip_serializing_if = "Option::is_none")]
18648    #[cfg_attr(
18649        feature = "builder",
18650        builder(with = |value:impl Into<String>|vec![value.into()])
18651    )]
18652    pub date: Option<Vec<String>>,
18653    ///Property: Description
18654    #[serde(skip_serializing_if = "Option::is_none")]
18655    #[cfg_attr(
18656        feature = "builder",
18657        builder(with = |value:impl Into<String>|vec![value.into()])
18658    )]
18659    pub description: Option<Vec<String>>,
18660    ///Property: Duration
18661    #[serde(
18662        skip_serializing_if = "Option::is_none",
18663        deserialize_with = "deserialize_opt_f64_vec",
18664        default
18665    )]
18666    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
18667    pub duration: Option<Vec<f64>>,
18668    ///Property: End date
18669    #[serde(skip_serializing_if = "Option::is_none")]
18670    #[cfg_attr(
18671        feature = "builder",
18672        builder(with = |value:impl Into<String>|vec![value.into()])
18673    )]
18674    pub end_date: Option<Vec<String>>,
18675    ///Property: Entity
18676    #[serde(default)]
18677    #[cfg_attr(
18678        feature = "builder",
18679        builder(with = |value:impl Into<String>|vec![value.into()])
18680    )]
18681    pub entity: Vec<String>,
18682    ///Property: Index text
18683    #[serde(skip_serializing_if = "Option::is_none")]
18684    #[cfg_attr(
18685        feature = "builder",
18686        builder(with = |value:impl Into<String>|vec![value.into()])
18687    )]
18688    pub index_text: Option<Vec<String>>,
18689    ///Property: Listing date
18690    #[serde(skip_serializing_if = "Option::is_none")]
18691    #[cfg_attr(
18692        feature = "builder",
18693        builder(with = |value:impl Into<String>|vec![value.into()])
18694    )]
18695    pub listing_date: Option<Vec<String>>,
18696    ///Property: Modified on
18697    #[serde(skip_serializing_if = "Option::is_none")]
18698    #[cfg_attr(
18699        feature = "builder",
18700        builder(with = |value:impl Into<String>|vec![value.into()])
18701    )]
18702    pub modified_at: Option<Vec<String>>,
18703    ///Property: Detected names
18704    #[serde(skip_serializing_if = "Option::is_none")]
18705    #[cfg_attr(
18706        feature = "builder",
18707        builder(with = |value:impl Into<String>|vec![value.into()])
18708    )]
18709    pub names_mentioned: Option<Vec<String>>,
18710    ///Property: Program
18711    #[serde(skip_serializing_if = "Option::is_none")]
18712    #[cfg_attr(
18713        feature = "builder",
18714        builder(with = |value:impl Into<String>|vec![value.into()])
18715    )]
18716    pub program: Option<Vec<String>>,
18717    ///Property: Program ID
18718    #[serde(skip_serializing_if = "Option::is_none")]
18719    #[cfg_attr(
18720        feature = "builder",
18721        builder(with = |value:impl Into<String>|vec![value.into()])
18722    )]
18723    pub program_id: Option<Vec<String>>,
18724    ///Property: Program URL
18725    #[serde(skip_serializing_if = "Option::is_none")]
18726    #[cfg_attr(
18727        feature = "builder",
18728        builder(with = |value:impl Into<String>|vec![value.into()])
18729    )]
18730    pub program_url: Option<Vec<String>>,
18731    ///Property: Source document
18732    #[serde(skip_serializing_if = "Option::is_none")]
18733    #[cfg_attr(
18734        feature = "builder",
18735        builder(with = |value:impl Into<String>|vec![value.into()])
18736    )]
18737    pub proof: Option<Vec<String>>,
18738    ///Property: Scope of sanctions
18739    #[serde(skip_serializing_if = "Option::is_none")]
18740    #[cfg_attr(
18741        feature = "builder",
18742        builder(with = |value:impl Into<String>|vec![value.into()])
18743    )]
18744    pub provisions: Option<Vec<String>>,
18745    ///Property: Publishing source
18746    #[serde(skip_serializing_if = "Option::is_none")]
18747    #[cfg_attr(
18748        feature = "builder",
18749        builder(with = |value:impl Into<String>|vec![value.into()])
18750    )]
18751    pub publisher: Option<Vec<String>>,
18752    ///Property: Publishing source URL
18753    #[serde(skip_serializing_if = "Option::is_none")]
18754    #[cfg_attr(
18755        feature = "builder",
18756        builder(with = |value:impl Into<String>|vec![value.into()])
18757    )]
18758    pub publisher_url: Option<Vec<String>>,
18759    ///Property: Reason
18760    #[serde(skip_serializing_if = "Option::is_none")]
18761    #[cfg_attr(
18762        feature = "builder",
18763        builder(with = |value:impl Into<String>|vec![value.into()])
18764    )]
18765    pub reason: Option<Vec<String>>,
18766    ///Property: Record ID
18767    #[serde(skip_serializing_if = "Option::is_none")]
18768    #[cfg_attr(
18769        feature = "builder",
18770        builder(with = |value:impl Into<String>|vec![value.into()])
18771    )]
18772    pub record_id: Option<Vec<String>>,
18773    ///Property: Retrieved on
18774    #[serde(skip_serializing_if = "Option::is_none")]
18775    #[cfg_attr(
18776        feature = "builder",
18777        builder(with = |value:impl Into<String>|vec![value.into()])
18778    )]
18779    pub retrieved_at: Option<Vec<String>>,
18780    ///Property: Source link
18781    #[serde(skip_serializing_if = "Option::is_none")]
18782    #[cfg_attr(
18783        feature = "builder",
18784        builder(with = |value:impl Into<String>|vec![value.into()])
18785    )]
18786    pub source_url: Option<Vec<String>>,
18787    ///Property: Start date
18788    #[serde(skip_serializing_if = "Option::is_none")]
18789    #[cfg_attr(
18790        feature = "builder",
18791        builder(with = |value:impl Into<String>|vec![value.into()])
18792    )]
18793    pub start_date: Option<Vec<String>>,
18794    ///Property: Status
18795    #[serde(skip_serializing_if = "Option::is_none")]
18796    #[cfg_attr(
18797        feature = "builder",
18798        builder(with = |value:impl Into<String>|vec![value.into()])
18799    )]
18800    pub status: Option<Vec<String>>,
18801    ///Property: Summary
18802    #[serde(skip_serializing_if = "Option::is_none")]
18803    #[cfg_attr(
18804        feature = "builder",
18805        builder(with = |value:impl Into<String>|vec![value.into()])
18806    )]
18807    pub summary: Option<Vec<String>>,
18808    ///Property: UN SC identifier
18809    #[serde(skip_serializing_if = "Option::is_none")]
18810    #[cfg_attr(
18811        feature = "builder",
18812        builder(with = |value:impl Into<String>|vec![value.into()])
18813    )]
18814    pub unsc_id: Option<Vec<String>>,
18815}
18816impl Sanction {
18817    /// Create a new entity with the given ID
18818    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
18819    pub fn new(id: impl Into<String>) -> Self {
18820        Self {
18821            id: id.into(),
18822            schema: "Sanction".to_string(),
18823            aleph_url: None,
18824            authority: None,
18825            authority_id: None,
18826            country: None,
18827            date: None,
18828            description: None,
18829            duration: None,
18830            end_date: None,
18831            entity: Vec::new(),
18832            index_text: None,
18833            listing_date: None,
18834            modified_at: None,
18835            names_mentioned: None,
18836            program: None,
18837            program_id: None,
18838            program_url: None,
18839            proof: None,
18840            provisions: None,
18841            publisher: None,
18842            publisher_url: None,
18843            reason: None,
18844            record_id: None,
18845            retrieved_at: None,
18846            source_url: None,
18847            start_date: None,
18848            status: None,
18849            summary: None,
18850            unsc_id: None,
18851        }
18852    }
18853    /// Get the schema name
18854    pub fn schema_name() -> &'static str {
18855        "Sanction"
18856    }
18857    /// Serialize to standard FTM nested JSON format
18858    ///
18859    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
18860    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
18861        let mut value = serde_json::to_value(self)?;
18862        if let Some(obj) = value.as_object_mut() {
18863            let id = obj.remove("id");
18864            let schema = obj.remove("schema");
18865            let properties = serde_json::Value::Object(std::mem::take(obj));
18866            if let Some(id) = id {
18867                obj.insert("id".into(), id);
18868            }
18869            if let Some(schema) = schema {
18870                obj.insert("schema".into(), schema);
18871            }
18872            obj.insert("properties".into(), properties);
18873        }
18874        serde_json::to_string(&value)
18875    }
18876}
18877///FTM Schema: Security
18878#[derive(Debug, Clone, Serialize, Deserialize)]
18879#[cfg_attr(feature = "builder", derive(Builder))]
18880#[serde(rename_all = "camelCase")]
18881pub struct Security {
18882    pub id: String,
18883    #[cfg_attr(feature = "builder", builder(default = "Security".to_string()))]
18884    pub schema: String,
18885    ///Property: Address
18886    #[serde(skip_serializing_if = "Option::is_none")]
18887    #[cfg_attr(
18888        feature = "builder",
18889        builder(with = |value:impl Into<String>|vec![value.into()])
18890    )]
18891    pub address: Option<Vec<String>>,
18892    ///Property: Address
18893    #[serde(skip_serializing_if = "Option::is_none")]
18894    #[cfg_attr(
18895        feature = "builder",
18896        builder(with = |value:impl Into<String>|vec![value.into()])
18897    )]
18898    pub address_entity: Option<Vec<String>>,
18899    ///Property: Aleph URL
18900    #[serde(skip_serializing_if = "Option::is_none")]
18901    #[cfg_attr(
18902        feature = "builder",
18903        builder(with = |value:impl Into<String>|vec![value.into()])
18904    )]
18905    pub aleph_url: Option<Vec<String>>,
18906    ///Property: Alias
18907    #[serde(skip_serializing_if = "Option::is_none")]
18908    #[cfg_attr(
18909        feature = "builder",
18910        builder(with = |value:impl Into<String>|vec![value.into()])
18911    )]
18912    pub alias: Option<Vec<String>>,
18913    ///Property: Amount
18914    #[serde(
18915        skip_serializing_if = "Option::is_none",
18916        deserialize_with = "deserialize_opt_f64_vec",
18917        default
18918    )]
18919    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
18920    pub amount: Option<Vec<f64>>,
18921    ///Property: Amount in EUR
18922    #[serde(
18923        skip_serializing_if = "Option::is_none",
18924        deserialize_with = "deserialize_opt_f64_vec",
18925        default
18926    )]
18927    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
18928    pub amount_eur: Option<Vec<f64>>,
18929    ///Property: Amount in USD
18930    #[serde(
18931        skip_serializing_if = "Option::is_none",
18932        deserialize_with = "deserialize_opt_f64_vec",
18933        default
18934    )]
18935    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
18936    pub amount_usd: Option<Vec<f64>>,
18937    ///Property: Classification
18938    #[serde(skip_serializing_if = "Option::is_none")]
18939    #[cfg_attr(
18940        feature = "builder",
18941        builder(with = |value:impl Into<String>|vec![value.into()])
18942    )]
18943    pub classification: Option<Vec<String>>,
18944    ///Property: Collateral
18945    #[serde(skip_serializing_if = "Option::is_none")]
18946    #[cfg_attr(
18947        feature = "builder",
18948        builder(with = |value:impl Into<String>|vec![value.into()])
18949    )]
18950    pub collateral: Option<Vec<String>>,
18951    ///Property: Country
18952    #[serde(skip_serializing_if = "Option::is_none")]
18953    #[cfg_attr(
18954        feature = "builder",
18955        builder(with = |value:impl Into<String>|vec![value.into()])
18956    )]
18957    pub country: Option<Vec<String>>,
18958    ///Property: Created at
18959    #[serde(skip_serializing_if = "Option::is_none")]
18960    #[cfg_attr(
18961        feature = "builder",
18962        builder(with = |value:impl Into<String>|vec![value.into()])
18963    )]
18964    pub created_at: Option<Vec<String>>,
18965    ///Property: Currency
18966    #[serde(skip_serializing_if = "Option::is_none")]
18967    #[cfg_attr(
18968        feature = "builder",
18969        builder(with = |value:impl Into<String>|vec![value.into()])
18970    )]
18971    pub currency: Option<Vec<String>>,
18972    ///Property: Description
18973    #[serde(skip_serializing_if = "Option::is_none")]
18974    #[cfg_attr(
18975        feature = "builder",
18976        builder(with = |value:impl Into<String>|vec![value.into()])
18977    )]
18978    pub description: Option<Vec<String>>,
18979    ///Property: Financial Instrument Global Identifier
18980    #[serde(skip_serializing_if = "Option::is_none")]
18981    #[cfg_attr(
18982        feature = "builder",
18983        builder(with = |value:impl Into<String>|vec![value.into()])
18984    )]
18985    pub figi_code: Option<Vec<String>>,
18986    ///Property: Index text
18987    #[serde(skip_serializing_if = "Option::is_none")]
18988    #[cfg_attr(
18989        feature = "builder",
18990        builder(with = |value:impl Into<String>|vec![value.into()])
18991    )]
18992    pub index_text: Option<Vec<String>>,
18993    ///Property: ISIN
18994    #[serde(skip_serializing_if = "Option::is_none")]
18995    #[cfg_attr(
18996        feature = "builder",
18997        builder(with = |value:impl Into<String>|vec![value.into()])
18998    )]
18999    pub isin: Option<Vec<String>>,
19000    ///Property: Date issued
19001    #[serde(skip_serializing_if = "Option::is_none")]
19002    #[cfg_attr(
19003        feature = "builder",
19004        builder(with = |value:impl Into<String>|vec![value.into()])
19005    )]
19006    pub issue_date: Option<Vec<String>>,
19007    ///Property: Issuer
19008    #[serde(skip_serializing_if = "Option::is_none")]
19009    #[cfg_attr(
19010        feature = "builder",
19011        builder(with = |value:impl Into<String>|vec![value.into()])
19012    )]
19013    pub issuer: Option<Vec<String>>,
19014    ///Property: Keywords
19015    #[serde(skip_serializing_if = "Option::is_none")]
19016    #[cfg_attr(
19017        feature = "builder",
19018        builder(with = |value:impl Into<String>|vec![value.into()])
19019    )]
19020    pub keywords: Option<Vec<String>>,
19021    ///Property: Maturity date
19022    #[serde(skip_serializing_if = "Option::is_none")]
19023    #[cfg_attr(
19024        feature = "builder",
19025        builder(with = |value:impl Into<String>|vec![value.into()])
19026    )]
19027    pub maturity_date: Option<Vec<String>>,
19028    ///Property: Modified on
19029    #[serde(skip_serializing_if = "Option::is_none")]
19030    #[cfg_attr(
19031        feature = "builder",
19032        builder(with = |value:impl Into<String>|vec![value.into()])
19033    )]
19034    pub modified_at: Option<Vec<String>>,
19035    ///Property: Name
19036    #[serde(default)]
19037    #[cfg_attr(
19038        feature = "builder",
19039        builder(with = |value:impl Into<String>|vec![value.into()])
19040    )]
19041    pub name: Vec<String>,
19042    ///Property: Notes
19043    #[serde(skip_serializing_if = "Option::is_none")]
19044    #[cfg_attr(
19045        feature = "builder",
19046        builder(with = |value:impl Into<String>|vec![value.into()])
19047    )]
19048    pub notes: Option<Vec<String>>,
19049    ///Property: Previous name
19050    #[serde(skip_serializing_if = "Option::is_none")]
19051    #[cfg_attr(
19052        feature = "builder",
19053        builder(with = |value:impl Into<String>|vec![value.into()])
19054    )]
19055    pub previous_name: Option<Vec<String>>,
19056    ///Property: Program
19057    #[serde(skip_serializing_if = "Option::is_none")]
19058    #[cfg_attr(
19059        feature = "builder",
19060        builder(with = |value:impl Into<String>|vec![value.into()])
19061    )]
19062    pub program: Option<Vec<String>>,
19063    ///Property: Program ID
19064    #[serde(skip_serializing_if = "Option::is_none")]
19065    #[cfg_attr(
19066        feature = "builder",
19067        builder(with = |value:impl Into<String>|vec![value.into()])
19068    )]
19069    pub program_id: Option<Vec<String>>,
19070    ///Property: Source document
19071    #[serde(skip_serializing_if = "Option::is_none")]
19072    #[cfg_attr(
19073        feature = "builder",
19074        builder(with = |value:impl Into<String>|vec![value.into()])
19075    )]
19076    pub proof: Option<Vec<String>>,
19077    ///Property: Publishing source
19078    #[serde(skip_serializing_if = "Option::is_none")]
19079    #[cfg_attr(
19080        feature = "builder",
19081        builder(with = |value:impl Into<String>|vec![value.into()])
19082    )]
19083    pub publisher: Option<Vec<String>>,
19084    ///Property: Publishing source URL
19085    #[serde(skip_serializing_if = "Option::is_none")]
19086    #[cfg_attr(
19087        feature = "builder",
19088        builder(with = |value:impl Into<String>|vec![value.into()])
19089    )]
19090    pub publisher_url: Option<Vec<String>>,
19091    ///Property: Registration number
19092    #[serde(skip_serializing_if = "Option::is_none")]
19093    #[cfg_attr(
19094        feature = "builder",
19095        builder(with = |value:impl Into<String>|vec![value.into()])
19096    )]
19097    pub registration_number: Option<Vec<String>>,
19098    ///Property: Retrieved on
19099    #[serde(skip_serializing_if = "Option::is_none")]
19100    #[cfg_attr(
19101        feature = "builder",
19102        builder(with = |value:impl Into<String>|vec![value.into()])
19103    )]
19104    pub retrieved_at: Option<Vec<String>>,
19105    ///Property: Source link
19106    #[serde(skip_serializing_if = "Option::is_none")]
19107    #[cfg_attr(
19108        feature = "builder",
19109        builder(with = |value:impl Into<String>|vec![value.into()])
19110    )]
19111    pub source_url: Option<Vec<String>>,
19112    ///Property: Summary
19113    #[serde(skip_serializing_if = "Option::is_none")]
19114    #[cfg_attr(
19115        feature = "builder",
19116        builder(with = |value:impl Into<String>|vec![value.into()])
19117    )]
19118    pub summary: Option<Vec<String>>,
19119    ///Property: Stock ticker symbol
19120    #[serde(skip_serializing_if = "Option::is_none")]
19121    #[cfg_attr(
19122        feature = "builder",
19123        builder(with = |value:impl Into<String>|vec![value.into()])
19124    )]
19125    pub ticker: Option<Vec<String>>,
19126    ///Property: Topics
19127    #[serde(skip_serializing_if = "Option::is_none")]
19128    #[cfg_attr(
19129        feature = "builder",
19130        builder(with = |value:impl Into<String>|vec![value.into()])
19131    )]
19132    pub topics: Option<Vec<String>>,
19133    ///Property: Type
19134    #[serde(skip_serializing_if = "Option::is_none")]
19135    #[cfg_attr(
19136        feature = "builder",
19137        builder(with = |value:impl Into<String>|vec![value.into()])
19138    )]
19139    pub type_: Option<Vec<String>>,
19140    ///Property: Weak alias
19141    #[serde(skip_serializing_if = "Option::is_none")]
19142    #[cfg_attr(
19143        feature = "builder",
19144        builder(with = |value:impl Into<String>|vec![value.into()])
19145    )]
19146    pub weak_alias: Option<Vec<String>>,
19147    ///Property: Wikidata ID
19148    #[serde(skip_serializing_if = "Option::is_none")]
19149    #[cfg_attr(
19150        feature = "builder",
19151        builder(with = |value:impl Into<String>|vec![value.into()])
19152    )]
19153    pub wikidata_id: Option<Vec<String>>,
19154    ///Property: Wikipedia Article
19155    #[serde(skip_serializing_if = "Option::is_none")]
19156    #[cfg_attr(
19157        feature = "builder",
19158        builder(with = |value:impl Into<String>|vec![value.into()])
19159    )]
19160    pub wikipedia_url: Option<Vec<String>>,
19161}
19162impl Security {
19163    /// Create a new entity with the given ID
19164    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
19165    pub fn new(id: impl Into<String>) -> Self {
19166        Self {
19167            id: id.into(),
19168            schema: "Security".to_string(),
19169            address: None,
19170            address_entity: None,
19171            aleph_url: None,
19172            alias: None,
19173            amount: None,
19174            amount_eur: None,
19175            amount_usd: None,
19176            classification: None,
19177            collateral: None,
19178            country: None,
19179            created_at: None,
19180            currency: None,
19181            description: None,
19182            figi_code: None,
19183            index_text: None,
19184            isin: None,
19185            issue_date: None,
19186            issuer: None,
19187            keywords: None,
19188            maturity_date: None,
19189            modified_at: None,
19190            name: Vec::new(),
19191            notes: None,
19192            previous_name: None,
19193            program: None,
19194            program_id: None,
19195            proof: None,
19196            publisher: None,
19197            publisher_url: None,
19198            registration_number: None,
19199            retrieved_at: None,
19200            source_url: None,
19201            summary: None,
19202            ticker: None,
19203            topics: None,
19204            type_: None,
19205            weak_alias: None,
19206            wikidata_id: None,
19207            wikipedia_url: None,
19208        }
19209    }
19210    /// Get the schema name
19211    pub fn schema_name() -> &'static str {
19212        "Security"
19213    }
19214    /// Serialize to standard FTM nested JSON format
19215    ///
19216    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
19217    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
19218        let mut value = serde_json::to_value(self)?;
19219        if let Some(obj) = value.as_object_mut() {
19220            let id = obj.remove("id");
19221            let schema = obj.remove("schema");
19222            let properties = serde_json::Value::Object(std::mem::take(obj));
19223            if let Some(id) = id {
19224                obj.insert("id".into(), id);
19225            }
19226            if let Some(schema) = schema {
19227                obj.insert("schema".into(), schema);
19228            }
19229            obj.insert("properties".into(), properties);
19230        }
19231        serde_json::to_string(&value)
19232    }
19233}
19234///FTM Schema: Similar
19235#[derive(Debug, Clone, Serialize, Deserialize)]
19236#[cfg_attr(feature = "builder", derive(Builder))]
19237#[serde(rename_all = "camelCase")]
19238pub struct Similar {
19239    pub id: String,
19240    #[cfg_attr(feature = "builder", builder(default = "Similar".to_string()))]
19241    pub schema: String,
19242    ///Property: Candidate
19243    #[serde(skip_serializing_if = "Option::is_none")]
19244    #[cfg_attr(
19245        feature = "builder",
19246        builder(with = |value:impl Into<String>|vec![value.into()])
19247    )]
19248    pub candidate: Option<Vec<String>>,
19249    ///Property: Confidence score
19250    #[serde(
19251        skip_serializing_if = "Option::is_none",
19252        deserialize_with = "deserialize_opt_f64_vec",
19253        default
19254    )]
19255    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
19256    pub confidence_score: Option<Vec<f64>>,
19257    ///Property: Matching criteria
19258    #[serde(skip_serializing_if = "Option::is_none")]
19259    #[cfg_attr(
19260        feature = "builder",
19261        builder(with = |value:impl Into<String>|vec![value.into()])
19262    )]
19263    pub criteria: Option<Vec<String>>,
19264    ///Property: Match
19265    #[serde(skip_serializing_if = "Option::is_none")]
19266    #[cfg_attr(
19267        feature = "builder",
19268        builder(with = |value:impl Into<String>|vec![value.into()])
19269    )]
19270    pub match_: Option<Vec<String>>,
19271    ///Property: Matcher
19272    #[serde(skip_serializing_if = "Option::is_none")]
19273    #[cfg_attr(
19274        feature = "builder",
19275        builder(with = |value:impl Into<String>|vec![value.into()])
19276    )]
19277    pub matcher: Option<Vec<String>>,
19278}
19279impl Similar {
19280    /// Create a new entity with the given ID
19281    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
19282    pub fn new(id: impl Into<String>) -> Self {
19283        Self {
19284            id: id.into(),
19285            schema: "Similar".to_string(),
19286            candidate: None,
19287            confidence_score: None,
19288            criteria: None,
19289            match_: None,
19290            matcher: None,
19291        }
19292    }
19293    /// Get the schema name
19294    pub fn schema_name() -> &'static str {
19295        "Similar"
19296    }
19297    /// Serialize to standard FTM nested JSON format
19298    ///
19299    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
19300    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
19301        let mut value = serde_json::to_value(self)?;
19302        if let Some(obj) = value.as_object_mut() {
19303            let id = obj.remove("id");
19304            let schema = obj.remove("schema");
19305            let properties = serde_json::Value::Object(std::mem::take(obj));
19306            if let Some(id) = id {
19307                obj.insert("id".into(), id);
19308            }
19309            if let Some(schema) = schema {
19310                obj.insert("schema".into(), schema);
19311            }
19312            obj.insert("properties".into(), properties);
19313        }
19314        serde_json::to_string(&value)
19315    }
19316}
19317///FTM Schema: Succession
19318#[derive(Debug, Clone, Serialize, Deserialize)]
19319#[cfg_attr(feature = "builder", derive(Builder))]
19320#[serde(rename_all = "camelCase")]
19321pub struct Succession {
19322    pub id: String,
19323    #[cfg_attr(feature = "builder", builder(default = "Succession".to_string()))]
19324    pub schema: String,
19325    ///Property: Aleph URL
19326    #[serde(skip_serializing_if = "Option::is_none")]
19327    #[cfg_attr(
19328        feature = "builder",
19329        builder(with = |value:impl Into<String>|vec![value.into()])
19330    )]
19331    pub aleph_url: Option<Vec<String>>,
19332    ///Property: Date
19333    #[serde(skip_serializing_if = "Option::is_none")]
19334    #[cfg_attr(
19335        feature = "builder",
19336        builder(with = |value:impl Into<String>|vec![value.into()])
19337    )]
19338    pub date: Option<Vec<String>>,
19339    ///Property: Description
19340    #[serde(skip_serializing_if = "Option::is_none")]
19341    #[cfg_attr(
19342        feature = "builder",
19343        builder(with = |value:impl Into<String>|vec![value.into()])
19344    )]
19345    pub description: Option<Vec<String>>,
19346    ///Property: End date
19347    #[serde(skip_serializing_if = "Option::is_none")]
19348    #[cfg_attr(
19349        feature = "builder",
19350        builder(with = |value:impl Into<String>|vec![value.into()])
19351    )]
19352    pub end_date: Option<Vec<String>>,
19353    ///Property: Index text
19354    #[serde(skip_serializing_if = "Option::is_none")]
19355    #[cfg_attr(
19356        feature = "builder",
19357        builder(with = |value:impl Into<String>|vec![value.into()])
19358    )]
19359    pub index_text: Option<Vec<String>>,
19360    ///Property: Modified on
19361    #[serde(skip_serializing_if = "Option::is_none")]
19362    #[cfg_attr(
19363        feature = "builder",
19364        builder(with = |value:impl Into<String>|vec![value.into()])
19365    )]
19366    pub modified_at: Option<Vec<String>>,
19367    ///Property: Detected names
19368    #[serde(skip_serializing_if = "Option::is_none")]
19369    #[cfg_attr(
19370        feature = "builder",
19371        builder(with = |value:impl Into<String>|vec![value.into()])
19372    )]
19373    pub names_mentioned: Option<Vec<String>>,
19374    ///Property: Predecessor
19375    #[serde(default)]
19376    #[cfg_attr(
19377        feature = "builder",
19378        builder(with = |value:impl Into<String>|vec![value.into()])
19379    )]
19380    pub predecessor: Vec<String>,
19381    ///Property: Source document
19382    #[serde(skip_serializing_if = "Option::is_none")]
19383    #[cfg_attr(
19384        feature = "builder",
19385        builder(with = |value:impl Into<String>|vec![value.into()])
19386    )]
19387    pub proof: Option<Vec<String>>,
19388    ///Property: Publishing source
19389    #[serde(skip_serializing_if = "Option::is_none")]
19390    #[cfg_attr(
19391        feature = "builder",
19392        builder(with = |value:impl Into<String>|vec![value.into()])
19393    )]
19394    pub publisher: Option<Vec<String>>,
19395    ///Property: Publishing source URL
19396    #[serde(skip_serializing_if = "Option::is_none")]
19397    #[cfg_attr(
19398        feature = "builder",
19399        builder(with = |value:impl Into<String>|vec![value.into()])
19400    )]
19401    pub publisher_url: Option<Vec<String>>,
19402    ///Property: Record ID
19403    #[serde(skip_serializing_if = "Option::is_none")]
19404    #[cfg_attr(
19405        feature = "builder",
19406        builder(with = |value:impl Into<String>|vec![value.into()])
19407    )]
19408    pub record_id: Option<Vec<String>>,
19409    ///Property: Retrieved on
19410    #[serde(skip_serializing_if = "Option::is_none")]
19411    #[cfg_attr(
19412        feature = "builder",
19413        builder(with = |value:impl Into<String>|vec![value.into()])
19414    )]
19415    pub retrieved_at: Option<Vec<String>>,
19416    ///Property: Role
19417    #[serde(skip_serializing_if = "Option::is_none")]
19418    #[cfg_attr(
19419        feature = "builder",
19420        builder(with = |value:impl Into<String>|vec![value.into()])
19421    )]
19422    pub role: Option<Vec<String>>,
19423    ///Property: Source link
19424    #[serde(skip_serializing_if = "Option::is_none")]
19425    #[cfg_attr(
19426        feature = "builder",
19427        builder(with = |value:impl Into<String>|vec![value.into()])
19428    )]
19429    pub source_url: Option<Vec<String>>,
19430    ///Property: Start date
19431    #[serde(skip_serializing_if = "Option::is_none")]
19432    #[cfg_attr(
19433        feature = "builder",
19434        builder(with = |value:impl Into<String>|vec![value.into()])
19435    )]
19436    pub start_date: Option<Vec<String>>,
19437    ///Property: Status
19438    #[serde(skip_serializing_if = "Option::is_none")]
19439    #[cfg_attr(
19440        feature = "builder",
19441        builder(with = |value:impl Into<String>|vec![value.into()])
19442    )]
19443    pub status: Option<Vec<String>>,
19444    ///Property: Successor
19445    #[serde(default)]
19446    #[cfg_attr(
19447        feature = "builder",
19448        builder(with = |value:impl Into<String>|vec![value.into()])
19449    )]
19450    pub successor: Vec<String>,
19451    ///Property: Summary
19452    #[serde(skip_serializing_if = "Option::is_none")]
19453    #[cfg_attr(
19454        feature = "builder",
19455        builder(with = |value:impl Into<String>|vec![value.into()])
19456    )]
19457    pub summary: Option<Vec<String>>,
19458}
19459impl Succession {
19460    /// Create a new entity with the given ID
19461    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
19462    pub fn new(id: impl Into<String>) -> Self {
19463        Self {
19464            id: id.into(),
19465            schema: "Succession".to_string(),
19466            aleph_url: None,
19467            date: None,
19468            description: None,
19469            end_date: None,
19470            index_text: None,
19471            modified_at: None,
19472            names_mentioned: None,
19473            predecessor: Vec::new(),
19474            proof: None,
19475            publisher: None,
19476            publisher_url: None,
19477            record_id: None,
19478            retrieved_at: None,
19479            role: None,
19480            source_url: None,
19481            start_date: None,
19482            status: None,
19483            successor: Vec::new(),
19484            summary: None,
19485        }
19486    }
19487    /// Get the schema name
19488    pub fn schema_name() -> &'static str {
19489        "Succession"
19490    }
19491    /// Serialize to standard FTM nested JSON format
19492    ///
19493    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
19494    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
19495        let mut value = serde_json::to_value(self)?;
19496        if let Some(obj) = value.as_object_mut() {
19497            let id = obj.remove("id");
19498            let schema = obj.remove("schema");
19499            let properties = serde_json::Value::Object(std::mem::take(obj));
19500            if let Some(id) = id {
19501                obj.insert("id".into(), id);
19502            }
19503            if let Some(schema) = schema {
19504                obj.insert("schema".into(), schema);
19505            }
19506            obj.insert("properties".into(), properties);
19507        }
19508        serde_json::to_string(&value)
19509    }
19510}
19511///FTM Schema: Table
19512#[derive(Debug, Clone, Serialize, Deserialize)]
19513#[cfg_attr(feature = "builder", derive(Builder))]
19514#[serde(rename_all = "camelCase")]
19515pub struct Table {
19516    pub id: String,
19517    #[cfg_attr(feature = "builder", builder(default = "Table".to_string()))]
19518    pub schema: String,
19519    ///Property: Address
19520    #[serde(skip_serializing_if = "Option::is_none")]
19521    #[cfg_attr(
19522        feature = "builder",
19523        builder(with = |value:impl Into<String>|vec![value.into()])
19524    )]
19525    pub address: Option<Vec<String>>,
19526    ///Property: Address
19527    #[serde(skip_serializing_if = "Option::is_none")]
19528    #[cfg_attr(
19529        feature = "builder",
19530        builder(with = |value:impl Into<String>|vec![value.into()])
19531    )]
19532    pub address_entity: Option<Vec<String>>,
19533    ///Property: Aleph URL
19534    #[serde(skip_serializing_if = "Option::is_none")]
19535    #[cfg_attr(
19536        feature = "builder",
19537        builder(with = |value:impl Into<String>|vec![value.into()])
19538    )]
19539    pub aleph_url: Option<Vec<String>>,
19540    ///Property: Alias
19541    #[serde(skip_serializing_if = "Option::is_none")]
19542    #[cfg_attr(
19543        feature = "builder",
19544        builder(with = |value:impl Into<String>|vec![value.into()])
19545    )]
19546    pub alias: Option<Vec<String>>,
19547    ///Property: Ancestors
19548    #[serde(skip_serializing_if = "Option::is_none")]
19549    #[cfg_attr(
19550        feature = "builder",
19551        builder(with = |value:impl Into<String>|vec![value.into()])
19552    )]
19553    pub ancestors: Option<Vec<String>>,
19554    ///Property: Author
19555    #[serde(skip_serializing_if = "Option::is_none")]
19556    #[cfg_attr(
19557        feature = "builder",
19558        builder(with = |value:impl Into<String>|vec![value.into()])
19559    )]
19560    pub author: Option<Vec<String>>,
19561    ///Property: Authored on
19562    #[serde(skip_serializing_if = "Option::is_none")]
19563    #[cfg_attr(
19564        feature = "builder",
19565        builder(with = |value:impl Into<String>|vec![value.into()])
19566    )]
19567    pub authored_at: Option<Vec<String>>,
19568    ///Property: Text
19569    #[serde(skip_serializing_if = "Option::is_none")]
19570    #[cfg_attr(
19571        feature = "builder",
19572        builder(with = |value:impl Into<String>|vec![value.into()])
19573    )]
19574    pub body_text: Option<Vec<String>>,
19575    ///Property: Column headings
19576    #[serde(skip_serializing_if = "Option::is_none")]
19577    pub columns: Option<serde_json::Value>,
19578    ///Property: Detected companies
19579    #[serde(skip_serializing_if = "Option::is_none")]
19580    #[cfg_attr(
19581        feature = "builder",
19582        builder(with = |value:impl Into<String>|vec![value.into()])
19583    )]
19584    pub companies_mentioned: Option<Vec<String>>,
19585    ///Property: Checksum
19586    #[serde(skip_serializing_if = "Option::is_none")]
19587    #[cfg_attr(
19588        feature = "builder",
19589        builder(with = |value:impl Into<String>|vec![value.into()])
19590    )]
19591    pub content_hash: Option<Vec<String>>,
19592    ///Property: Country
19593    #[serde(skip_serializing_if = "Option::is_none")]
19594    #[cfg_attr(
19595        feature = "builder",
19596        builder(with = |value:impl Into<String>|vec![value.into()])
19597    )]
19598    pub country: Option<Vec<String>>,
19599    ///Property: Crawler
19600    #[serde(skip_serializing_if = "Option::is_none")]
19601    #[cfg_attr(
19602        feature = "builder",
19603        builder(with = |value:impl Into<String>|vec![value.into()])
19604    )]
19605    pub crawler: Option<Vec<String>>,
19606    ///Property: Created at
19607    #[serde(skip_serializing_if = "Option::is_none")]
19608    #[cfg_attr(
19609        feature = "builder",
19610        builder(with = |value:impl Into<String>|vec![value.into()])
19611    )]
19612    pub created_at: Option<Vec<String>>,
19613    ///Property: CSV alternative version checksum
19614    #[serde(skip_serializing_if = "Option::is_none")]
19615    #[cfg_attr(
19616        feature = "builder",
19617        builder(with = |value:impl Into<String>|vec![value.into()])
19618    )]
19619    pub csv_hash: Option<Vec<String>>,
19620    ///Property: Date
19621    #[serde(skip_serializing_if = "Option::is_none")]
19622    #[cfg_attr(
19623        feature = "builder",
19624        builder(with = |value:impl Into<String>|vec![value.into()])
19625    )]
19626    pub date: Option<Vec<String>>,
19627    ///Property: Description
19628    #[serde(skip_serializing_if = "Option::is_none")]
19629    #[cfg_attr(
19630        feature = "builder",
19631        builder(with = |value:impl Into<String>|vec![value.into()])
19632    )]
19633    pub description: Option<Vec<String>>,
19634    ///Property: Detected country
19635    #[serde(skip_serializing_if = "Option::is_none")]
19636    #[cfg_attr(
19637        feature = "builder",
19638        builder(with = |value:impl Into<String>|vec![value.into()])
19639    )]
19640    pub detected_country: Option<Vec<String>>,
19641    ///Property: Detected language
19642    #[serde(skip_serializing_if = "Option::is_none")]
19643    #[cfg_attr(
19644        feature = "builder",
19645        builder(with = |value:impl Into<String>|vec![value.into()])
19646    )]
19647    pub detected_language: Option<Vec<String>>,
19648    ///Property: Detected e-mail addresses
19649    #[serde(skip_serializing_if = "Option::is_none")]
19650    #[cfg_attr(
19651        feature = "builder",
19652        builder(with = |value:impl Into<String>|vec![value.into()])
19653    )]
19654    pub email_mentioned: Option<Vec<String>>,
19655    ///Property: File encoding
19656    #[serde(skip_serializing_if = "Option::is_none")]
19657    #[cfg_attr(
19658        feature = "builder",
19659        builder(with = |value:impl Into<String>|vec![value.into()])
19660    )]
19661    pub encoding: Option<Vec<String>>,
19662    ///Property: File extension
19663    #[serde(skip_serializing_if = "Option::is_none")]
19664    #[cfg_attr(
19665        feature = "builder",
19666        builder(with = |value:impl Into<String>|vec![value.into()])
19667    )]
19668    pub extension: Option<Vec<String>>,
19669    ///Property: File name
19670    #[serde(default)]
19671    #[cfg_attr(
19672        feature = "builder",
19673        builder(with = |value:impl Into<String>|vec![value.into()])
19674    )]
19675    pub file_name: Vec<String>,
19676    ///Property: File size
19677    #[serde(
19678        skip_serializing_if = "Option::is_none",
19679        deserialize_with = "deserialize_opt_f64_vec",
19680        default
19681    )]
19682    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
19683    pub file_size: Option<Vec<f64>>,
19684    ///Property: Generator
19685    #[serde(skip_serializing_if = "Option::is_none")]
19686    #[cfg_attr(
19687        feature = "builder",
19688        builder(with = |value:impl Into<String>|vec![value.into()])
19689    )]
19690    pub generator: Option<Vec<String>>,
19691    ///Property: Detected IBANs
19692    #[serde(skip_serializing_if = "Option::is_none")]
19693    #[cfg_attr(
19694        feature = "builder",
19695        builder(with = |value:impl Into<String>|vec![value.into()])
19696    )]
19697    pub iban_mentioned: Option<Vec<String>>,
19698    ///Property: Index text
19699    #[serde(skip_serializing_if = "Option::is_none")]
19700    #[cfg_attr(
19701        feature = "builder",
19702        builder(with = |value:impl Into<String>|vec![value.into()])
19703    )]
19704    pub index_text: Option<Vec<String>>,
19705    ///Property: Detected IP addresses
19706    #[serde(skip_serializing_if = "Option::is_none")]
19707    #[cfg_attr(
19708        feature = "builder",
19709        builder(with = |value:impl Into<String>|vec![value.into()])
19710    )]
19711    pub ip_mentioned: Option<Vec<String>>,
19712    ///Property: Keywords
19713    #[serde(skip_serializing_if = "Option::is_none")]
19714    #[cfg_attr(
19715        feature = "builder",
19716        builder(with = |value:impl Into<String>|vec![value.into()])
19717    )]
19718    pub keywords: Option<Vec<String>>,
19719    ///Property: Language
19720    #[serde(skip_serializing_if = "Option::is_none")]
19721    #[cfg_attr(
19722        feature = "builder",
19723        builder(with = |value:impl Into<String>|vec![value.into()])
19724    )]
19725    pub language: Option<Vec<String>>,
19726    ///Property: Detected locations
19727    #[serde(skip_serializing_if = "Option::is_none")]
19728    #[cfg_attr(
19729        feature = "builder",
19730        builder(with = |value:impl Into<String>|vec![value.into()])
19731    )]
19732    pub location_mentioned: Option<Vec<String>>,
19733    ///Property: Message ID
19734    #[serde(skip_serializing_if = "Option::is_none")]
19735    #[cfg_attr(
19736        feature = "builder",
19737        builder(with = |value:impl Into<String>|vec![value.into()])
19738    )]
19739    pub message_id: Option<Vec<String>>,
19740    ///Property: MIME type
19741    #[serde(skip_serializing_if = "Option::is_none")]
19742    #[cfg_attr(
19743        feature = "builder",
19744        builder(with = |value:impl Into<String>|vec![value.into()])
19745    )]
19746    pub mime_type: Option<Vec<String>>,
19747    ///Property: Modified on
19748    #[serde(skip_serializing_if = "Option::is_none")]
19749    #[cfg_attr(
19750        feature = "builder",
19751        builder(with = |value:impl Into<String>|vec![value.into()])
19752    )]
19753    pub modified_at: Option<Vec<String>>,
19754    ///Property: Name
19755    #[serde(default)]
19756    #[cfg_attr(
19757        feature = "builder",
19758        builder(with = |value:impl Into<String>|vec![value.into()])
19759    )]
19760    pub name: Vec<String>,
19761    ///Property: Detected names
19762    #[serde(skip_serializing_if = "Option::is_none")]
19763    #[cfg_attr(
19764        feature = "builder",
19765        builder(with = |value:impl Into<String>|vec![value.into()])
19766    )]
19767    pub names_mentioned: Option<Vec<String>>,
19768    ///Property: Notes
19769    #[serde(skip_serializing_if = "Option::is_none")]
19770    #[cfg_attr(
19771        feature = "builder",
19772        builder(with = |value:impl Into<String>|vec![value.into()])
19773    )]
19774    pub notes: Option<Vec<String>>,
19775    ///Property: Folder
19776    #[serde(skip_serializing_if = "Option::is_none")]
19777    #[cfg_attr(
19778        feature = "builder",
19779        builder(with = |value:impl Into<String>|vec![value.into()])
19780    )]
19781    pub parent: Option<Vec<String>>,
19782    ///Property: Detected people
19783    #[serde(skip_serializing_if = "Option::is_none")]
19784    #[cfg_attr(
19785        feature = "builder",
19786        builder(with = |value:impl Into<String>|vec![value.into()])
19787    )]
19788    pub people_mentioned: Option<Vec<String>>,
19789    ///Property: Detected phones
19790    #[serde(skip_serializing_if = "Option::is_none")]
19791    #[cfg_attr(
19792        feature = "builder",
19793        builder(with = |value:impl Into<String>|vec![value.into()])
19794    )]
19795    pub phone_mentioned: Option<Vec<String>>,
19796    ///Property: Previous name
19797    #[serde(skip_serializing_if = "Option::is_none")]
19798    #[cfg_attr(
19799        feature = "builder",
19800        builder(with = |value:impl Into<String>|vec![value.into()])
19801    )]
19802    pub previous_name: Option<Vec<String>>,
19803    ///Property: Processed at
19804    #[serde(skip_serializing_if = "Option::is_none")]
19805    #[cfg_attr(
19806        feature = "builder",
19807        builder(with = |value:impl Into<String>|vec![value.into()])
19808    )]
19809    pub processed_at: Option<Vec<String>>,
19810    ///Property: Processing agent
19811    #[serde(skip_serializing_if = "Option::is_none")]
19812    #[cfg_attr(
19813        feature = "builder",
19814        builder(with = |value:impl Into<String>|vec![value.into()])
19815    )]
19816    pub processing_agent: Option<Vec<String>>,
19817    ///Property: Processing error
19818    #[serde(skip_serializing_if = "Option::is_none")]
19819    #[cfg_attr(
19820        feature = "builder",
19821        builder(with = |value:impl Into<String>|vec![value.into()])
19822    )]
19823    pub processing_error: Option<Vec<String>>,
19824    ///Property: Processing status
19825    #[serde(skip_serializing_if = "Option::is_none")]
19826    #[cfg_attr(
19827        feature = "builder",
19828        builder(with = |value:impl Into<String>|vec![value.into()])
19829    )]
19830    pub processing_status: Option<Vec<String>>,
19831    ///Property: Program
19832    #[serde(skip_serializing_if = "Option::is_none")]
19833    #[cfg_attr(
19834        feature = "builder",
19835        builder(with = |value:impl Into<String>|vec![value.into()])
19836    )]
19837    pub program: Option<Vec<String>>,
19838    ///Property: Program ID
19839    #[serde(skip_serializing_if = "Option::is_none")]
19840    #[cfg_attr(
19841        feature = "builder",
19842        builder(with = |value:impl Into<String>|vec![value.into()])
19843    )]
19844    pub program_id: Option<Vec<String>>,
19845    ///Property: Source document
19846    #[serde(skip_serializing_if = "Option::is_none")]
19847    #[cfg_attr(
19848        feature = "builder",
19849        builder(with = |value:impl Into<String>|vec![value.into()])
19850    )]
19851    pub proof: Option<Vec<String>>,
19852    ///Property: Published on
19853    #[serde(skip_serializing_if = "Option::is_none")]
19854    #[cfg_attr(
19855        feature = "builder",
19856        builder(with = |value:impl Into<String>|vec![value.into()])
19857    )]
19858    pub published_at: Option<Vec<String>>,
19859    ///Property: Publishing source
19860    #[serde(skip_serializing_if = "Option::is_none")]
19861    #[cfg_attr(
19862        feature = "builder",
19863        builder(with = |value:impl Into<String>|vec![value.into()])
19864    )]
19865    pub publisher: Option<Vec<String>>,
19866    ///Property: Publishing source URL
19867    #[serde(skip_serializing_if = "Option::is_none")]
19868    #[cfg_attr(
19869        feature = "builder",
19870        builder(with = |value:impl Into<String>|vec![value.into()])
19871    )]
19872    pub publisher_url: Option<Vec<String>>,
19873    ///Property: Retrieved on
19874    #[serde(skip_serializing_if = "Option::is_none")]
19875    #[cfg_attr(
19876        feature = "builder",
19877        builder(with = |value:impl Into<String>|vec![value.into()])
19878    )]
19879    pub retrieved_at: Option<Vec<String>>,
19880    ///Property: Number of rows
19881    #[serde(
19882        skip_serializing_if = "Option::is_none",
19883        deserialize_with = "deserialize_opt_f64_vec",
19884        default
19885    )]
19886    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
19887    pub row_count: Option<Vec<f64>>,
19888    ///Property: Source link
19889    #[serde(skip_serializing_if = "Option::is_none")]
19890    #[cfg_attr(
19891        feature = "builder",
19892        builder(with = |value:impl Into<String>|vec![value.into()])
19893    )]
19894    pub source_url: Option<Vec<String>>,
19895    ///Property: Summary
19896    #[serde(skip_serializing_if = "Option::is_none")]
19897    #[cfg_attr(
19898        feature = "builder",
19899        builder(with = |value:impl Into<String>|vec![value.into()])
19900    )]
19901    pub summary: Option<Vec<String>>,
19902    ///Property: Title
19903    #[serde(skip_serializing_if = "Option::is_none")]
19904    #[cfg_attr(
19905        feature = "builder",
19906        builder(with = |value:impl Into<String>|vec![value.into()])
19907    )]
19908    pub title: Option<Vec<String>>,
19909    ///Property: Topics
19910    #[serde(skip_serializing_if = "Option::is_none")]
19911    #[cfg_attr(
19912        feature = "builder",
19913        builder(with = |value:impl Into<String>|vec![value.into()])
19914    )]
19915    pub topics: Option<Vec<String>>,
19916    ///Property: The language of the translated text
19917    #[serde(skip_serializing_if = "Option::is_none")]
19918    #[cfg_attr(
19919        feature = "builder",
19920        builder(with = |value:impl Into<String>|vec![value.into()])
19921    )]
19922    pub translated_language: Option<Vec<String>>,
19923    ///Property: Translated version of the body text
19924    #[serde(skip_serializing_if = "Option::is_none")]
19925    #[cfg_attr(
19926        feature = "builder",
19927        builder(with = |value:impl Into<String>|vec![value.into()])
19928    )]
19929    pub translated_text: Option<Vec<String>>,
19930    ///Property: Weak alias
19931    #[serde(skip_serializing_if = "Option::is_none")]
19932    #[cfg_attr(
19933        feature = "builder",
19934        builder(with = |value:impl Into<String>|vec![value.into()])
19935    )]
19936    pub weak_alias: Option<Vec<String>>,
19937    ///Property: Wikidata ID
19938    #[serde(skip_serializing_if = "Option::is_none")]
19939    #[cfg_attr(
19940        feature = "builder",
19941        builder(with = |value:impl Into<String>|vec![value.into()])
19942    )]
19943    pub wikidata_id: Option<Vec<String>>,
19944    ///Property: Wikipedia Article
19945    #[serde(skip_serializing_if = "Option::is_none")]
19946    #[cfg_attr(
19947        feature = "builder",
19948        builder(with = |value:impl Into<String>|vec![value.into()])
19949    )]
19950    pub wikipedia_url: Option<Vec<String>>,
19951}
19952impl Table {
19953    /// Create a new entity with the given ID
19954    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
19955    pub fn new(id: impl Into<String>) -> Self {
19956        Self {
19957            id: id.into(),
19958            schema: "Table".to_string(),
19959            address: None,
19960            address_entity: None,
19961            aleph_url: None,
19962            alias: None,
19963            ancestors: None,
19964            author: None,
19965            authored_at: None,
19966            body_text: None,
19967            columns: None,
19968            companies_mentioned: None,
19969            content_hash: None,
19970            country: None,
19971            crawler: None,
19972            created_at: None,
19973            csv_hash: None,
19974            date: None,
19975            description: None,
19976            detected_country: None,
19977            detected_language: None,
19978            email_mentioned: None,
19979            encoding: None,
19980            extension: None,
19981            file_name: Vec::new(),
19982            file_size: None,
19983            generator: None,
19984            iban_mentioned: None,
19985            index_text: None,
19986            ip_mentioned: None,
19987            keywords: None,
19988            language: None,
19989            location_mentioned: None,
19990            message_id: None,
19991            mime_type: None,
19992            modified_at: None,
19993            name: Vec::new(),
19994            names_mentioned: None,
19995            notes: None,
19996            parent: None,
19997            people_mentioned: None,
19998            phone_mentioned: None,
19999            previous_name: None,
20000            processed_at: None,
20001            processing_agent: None,
20002            processing_error: None,
20003            processing_status: None,
20004            program: None,
20005            program_id: None,
20006            proof: None,
20007            published_at: None,
20008            publisher: None,
20009            publisher_url: None,
20010            retrieved_at: None,
20011            row_count: None,
20012            source_url: None,
20013            summary: None,
20014            title: None,
20015            topics: None,
20016            translated_language: None,
20017            translated_text: None,
20018            weak_alias: None,
20019            wikidata_id: None,
20020            wikipedia_url: None,
20021        }
20022    }
20023    /// Get the schema name
20024    pub fn schema_name() -> &'static str {
20025        "Table"
20026    }
20027    /// Serialize to standard FTM nested JSON format
20028    ///
20029    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
20030    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
20031        let mut value = serde_json::to_value(self)?;
20032        if let Some(obj) = value.as_object_mut() {
20033            let id = obj.remove("id");
20034            let schema = obj.remove("schema");
20035            let properties = serde_json::Value::Object(std::mem::take(obj));
20036            if let Some(id) = id {
20037                obj.insert("id".into(), id);
20038            }
20039            if let Some(schema) = schema {
20040                obj.insert("schema".into(), schema);
20041            }
20042            obj.insert("properties".into(), properties);
20043        }
20044        serde_json::to_string(&value)
20045    }
20046}
20047///FTM Schema: Tax roll
20048#[derive(Debug, Clone, Serialize, Deserialize)]
20049#[cfg_attr(feature = "builder", derive(Builder))]
20050#[serde(rename_all = "camelCase")]
20051pub struct TaxRoll {
20052    pub id: String,
20053    #[cfg_attr(feature = "builder", builder(default = "TaxRoll".to_string()))]
20054    pub schema: String,
20055    ///Property: Aleph URL
20056    #[serde(skip_serializing_if = "Option::is_none")]
20057    #[cfg_attr(
20058        feature = "builder",
20059        builder(with = |value:impl Into<String>|vec![value.into()])
20060    )]
20061    pub aleph_url: Option<Vec<String>>,
20062    ///Property: Birth date
20063    #[serde(skip_serializing_if = "Option::is_none")]
20064    #[cfg_attr(
20065        feature = "builder",
20066        builder(with = |value:impl Into<String>|vec![value.into()])
20067    )]
20068    pub birth_date: Option<Vec<String>>,
20069    ///Property: Country
20070    #[serde(skip_serializing_if = "Option::is_none")]
20071    #[cfg_attr(
20072        feature = "builder",
20073        builder(with = |value:impl Into<String>|vec![value.into()])
20074    )]
20075    pub country: Option<Vec<String>>,
20076    ///Property: Date
20077    #[serde(skip_serializing_if = "Option::is_none")]
20078    #[cfg_attr(
20079        feature = "builder",
20080        builder(with = |value:impl Into<String>|vec![value.into()])
20081    )]
20082    pub date: Option<Vec<String>>,
20083    ///Property: Description
20084    #[serde(skip_serializing_if = "Option::is_none")]
20085    #[cfg_attr(
20086        feature = "builder",
20087        builder(with = |value:impl Into<String>|vec![value.into()])
20088    )]
20089    pub description: Option<Vec<String>>,
20090    ///Property: End date
20091    #[serde(skip_serializing_if = "Option::is_none")]
20092    #[cfg_attr(
20093        feature = "builder",
20094        builder(with = |value:impl Into<String>|vec![value.into()])
20095    )]
20096    pub end_date: Option<Vec<String>>,
20097    ///Property: Given name
20098    #[serde(skip_serializing_if = "Option::is_none")]
20099    #[cfg_attr(
20100        feature = "builder",
20101        builder(with = |value:impl Into<String>|vec![value.into()])
20102    )]
20103    pub given_name: Option<Vec<String>>,
20104    ///Property: Registered income
20105    #[serde(skip_serializing_if = "Option::is_none")]
20106    #[cfg_attr(
20107        feature = "builder",
20108        builder(with = |value:impl Into<String>|vec![value.into()])
20109    )]
20110    pub income: Option<Vec<String>>,
20111    ///Property: Index text
20112    #[serde(skip_serializing_if = "Option::is_none")]
20113    #[cfg_attr(
20114        feature = "builder",
20115        builder(with = |value:impl Into<String>|vec![value.into()])
20116    )]
20117    pub index_text: Option<Vec<String>>,
20118    ///Property: Modified on
20119    #[serde(skip_serializing_if = "Option::is_none")]
20120    #[cfg_attr(
20121        feature = "builder",
20122        builder(with = |value:impl Into<String>|vec![value.into()])
20123    )]
20124    pub modified_at: Option<Vec<String>>,
20125    ///Property: Detected names
20126    #[serde(skip_serializing_if = "Option::is_none")]
20127    #[cfg_attr(
20128        feature = "builder",
20129        builder(with = |value:impl Into<String>|vec![value.into()])
20130    )]
20131    pub names_mentioned: Option<Vec<String>>,
20132    ///Property: Source document
20133    #[serde(skip_serializing_if = "Option::is_none")]
20134    #[cfg_attr(
20135        feature = "builder",
20136        builder(with = |value:impl Into<String>|vec![value.into()])
20137    )]
20138    pub proof: Option<Vec<String>>,
20139    ///Property: Publishing source
20140    #[serde(skip_serializing_if = "Option::is_none")]
20141    #[cfg_attr(
20142        feature = "builder",
20143        builder(with = |value:impl Into<String>|vec![value.into()])
20144    )]
20145    pub publisher: Option<Vec<String>>,
20146    ///Property: Publishing source URL
20147    #[serde(skip_serializing_if = "Option::is_none")]
20148    #[cfg_attr(
20149        feature = "builder",
20150        builder(with = |value:impl Into<String>|vec![value.into()])
20151    )]
20152    pub publisher_url: Option<Vec<String>>,
20153    ///Property: Record ID
20154    #[serde(skip_serializing_if = "Option::is_none")]
20155    #[cfg_attr(
20156        feature = "builder",
20157        builder(with = |value:impl Into<String>|vec![value.into()])
20158    )]
20159    pub record_id: Option<Vec<String>>,
20160    ///Property: Retrieved on
20161    #[serde(skip_serializing_if = "Option::is_none")]
20162    #[cfg_attr(
20163        feature = "builder",
20164        builder(with = |value:impl Into<String>|vec![value.into()])
20165    )]
20166    pub retrieved_at: Option<Vec<String>>,
20167    ///Property: Source link
20168    #[serde(skip_serializing_if = "Option::is_none")]
20169    #[cfg_attr(
20170        feature = "builder",
20171        builder(with = |value:impl Into<String>|vec![value.into()])
20172    )]
20173    pub source_url: Option<Vec<String>>,
20174    ///Property: Start date
20175    #[serde(skip_serializing_if = "Option::is_none")]
20176    #[cfg_attr(
20177        feature = "builder",
20178        builder(with = |value:impl Into<String>|vec![value.into()])
20179    )]
20180    pub start_date: Option<Vec<String>>,
20181    ///Property: Summary
20182    #[serde(skip_serializing_if = "Option::is_none")]
20183    #[cfg_attr(
20184        feature = "builder",
20185        builder(with = |value:impl Into<String>|vec![value.into()])
20186    )]
20187    pub summary: Option<Vec<String>>,
20188    ///Property: Surname
20189    #[serde(skip_serializing_if = "Option::is_none")]
20190    #[cfg_attr(
20191        feature = "builder",
20192        builder(with = |value:impl Into<String>|vec![value.into()])
20193    )]
20194    pub surname: Option<Vec<String>>,
20195    ///Property: Amount of tax paid
20196    #[serde(skip_serializing_if = "Option::is_none")]
20197    #[cfg_attr(
20198        feature = "builder",
20199        builder(with = |value:impl Into<String>|vec![value.into()])
20200    )]
20201    pub tax_paid: Option<Vec<String>>,
20202    ///Property: Taxee
20203    #[serde(default)]
20204    #[cfg_attr(
20205        feature = "builder",
20206        builder(with = |value:impl Into<String>|vec![value.into()])
20207    )]
20208    pub taxee: Vec<String>,
20209    ///Property: Registered wealth
20210    #[serde(skip_serializing_if = "Option::is_none")]
20211    #[cfg_attr(
20212        feature = "builder",
20213        builder(with = |value:impl Into<String>|vec![value.into()])
20214    )]
20215    pub wealth: Option<Vec<String>>,
20216}
20217impl TaxRoll {
20218    /// Create a new entity with the given ID
20219    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
20220    pub fn new(id: impl Into<String>) -> Self {
20221        Self {
20222            id: id.into(),
20223            schema: "TaxRoll".to_string(),
20224            aleph_url: None,
20225            birth_date: None,
20226            country: None,
20227            date: None,
20228            description: None,
20229            end_date: None,
20230            given_name: None,
20231            income: None,
20232            index_text: None,
20233            modified_at: None,
20234            names_mentioned: None,
20235            proof: None,
20236            publisher: None,
20237            publisher_url: None,
20238            record_id: None,
20239            retrieved_at: None,
20240            source_url: None,
20241            start_date: None,
20242            summary: None,
20243            surname: None,
20244            tax_paid: None,
20245            taxee: Vec::new(),
20246            wealth: None,
20247        }
20248    }
20249    /// Get the schema name
20250    pub fn schema_name() -> &'static str {
20251        "TaxRoll"
20252    }
20253    /// Serialize to standard FTM nested JSON format
20254    ///
20255    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
20256    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
20257        let mut value = serde_json::to_value(self)?;
20258        if let Some(obj) = value.as_object_mut() {
20259            let id = obj.remove("id");
20260            let schema = obj.remove("schema");
20261            let properties = serde_json::Value::Object(std::mem::take(obj));
20262            if let Some(id) = id {
20263                obj.insert("id".into(), id);
20264            }
20265            if let Some(schema) = schema {
20266                obj.insert("schema".into(), schema);
20267            }
20268            obj.insert("properties".into(), properties);
20269        }
20270        serde_json::to_string(&value)
20271    }
20272}
20273///FTM Schema: Trip
20274#[derive(Debug, Clone, Serialize, Deserialize)]
20275#[cfg_attr(feature = "builder", derive(Builder))]
20276#[serde(rename_all = "camelCase")]
20277pub struct Trip {
20278    pub id: String,
20279    #[cfg_attr(feature = "builder", builder(default = "Trip".to_string()))]
20280    pub schema: String,
20281    ///Property: Address
20282    #[serde(skip_serializing_if = "Option::is_none")]
20283    #[cfg_attr(
20284        feature = "builder",
20285        builder(with = |value:impl Into<String>|vec![value.into()])
20286    )]
20287    pub address: Option<Vec<String>>,
20288    ///Property: Address
20289    #[serde(skip_serializing_if = "Option::is_none")]
20290    #[cfg_attr(
20291        feature = "builder",
20292        builder(with = |value:impl Into<String>|vec![value.into()])
20293    )]
20294    pub address_entity: Option<Vec<String>>,
20295    ///Property: Aleph URL
20296    #[serde(skip_serializing_if = "Option::is_none")]
20297    #[cfg_attr(
20298        feature = "builder",
20299        builder(with = |value:impl Into<String>|vec![value.into()])
20300    )]
20301    pub aleph_url: Option<Vec<String>>,
20302    ///Property: Alias
20303    #[serde(skip_serializing_if = "Option::is_none")]
20304    #[cfg_attr(
20305        feature = "builder",
20306        builder(with = |value:impl Into<String>|vec![value.into()])
20307    )]
20308    pub alias: Option<Vec<String>>,
20309    ///Property: Detected companies
20310    #[serde(skip_serializing_if = "Option::is_none")]
20311    #[cfg_attr(
20312        feature = "builder",
20313        builder(with = |value:impl Into<String>|vec![value.into()])
20314    )]
20315    pub companies_mentioned: Option<Vec<String>>,
20316    ///Property: Country
20317    #[serde(skip_serializing_if = "Option::is_none")]
20318    #[cfg_attr(
20319        feature = "builder",
20320        builder(with = |value:impl Into<String>|vec![value.into()])
20321    )]
20322    pub country: Option<Vec<String>>,
20323    ///Property: Created at
20324    #[serde(skip_serializing_if = "Option::is_none")]
20325    #[cfg_attr(
20326        feature = "builder",
20327        builder(with = |value:impl Into<String>|vec![value.into()])
20328    )]
20329    pub created_at: Option<Vec<String>>,
20330    ///Property: Date
20331    #[serde(skip_serializing_if = "Option::is_none")]
20332    #[cfg_attr(
20333        feature = "builder",
20334        builder(with = |value:impl Into<String>|vec![value.into()])
20335    )]
20336    pub date: Option<Vec<String>>,
20337    ///Property: Description
20338    #[serde(skip_serializing_if = "Option::is_none")]
20339    #[cfg_attr(
20340        feature = "builder",
20341        builder(with = |value:impl Into<String>|vec![value.into()])
20342    )]
20343    pub description: Option<Vec<String>>,
20344    ///Property: Detected country
20345    #[serde(skip_serializing_if = "Option::is_none")]
20346    #[cfg_attr(
20347        feature = "builder",
20348        builder(with = |value:impl Into<String>|vec![value.into()])
20349    )]
20350    pub detected_country: Option<Vec<String>>,
20351    ///Property: Detected language
20352    #[serde(skip_serializing_if = "Option::is_none")]
20353    #[cfg_attr(
20354        feature = "builder",
20355        builder(with = |value:impl Into<String>|vec![value.into()])
20356    )]
20357    pub detected_language: Option<Vec<String>>,
20358    ///Property: Detected e-mail addresses
20359    #[serde(skip_serializing_if = "Option::is_none")]
20360    #[cfg_attr(
20361        feature = "builder",
20362        builder(with = |value:impl Into<String>|vec![value.into()])
20363    )]
20364    pub email_mentioned: Option<Vec<String>>,
20365    ///Property: End date
20366    #[serde(skip_serializing_if = "Option::is_none")]
20367    #[cfg_attr(
20368        feature = "builder",
20369        builder(with = |value:impl Into<String>|vec![value.into()])
20370    )]
20371    pub end_date: Option<Vec<String>>,
20372    ///Property: End location
20373    #[serde(default)]
20374    #[cfg_attr(
20375        feature = "builder",
20376        builder(with = |value:impl Into<String>|vec![value.into()])
20377    )]
20378    pub end_location: Vec<String>,
20379    ///Property: Detected IBANs
20380    #[serde(skip_serializing_if = "Option::is_none")]
20381    #[cfg_attr(
20382        feature = "builder",
20383        builder(with = |value:impl Into<String>|vec![value.into()])
20384    )]
20385    pub iban_mentioned: Option<Vec<String>>,
20386    ///Property: Important
20387    #[serde(skip_serializing_if = "Option::is_none")]
20388    #[cfg_attr(
20389        feature = "builder",
20390        builder(with = |value:impl Into<String>|vec![value.into()])
20391    )]
20392    pub important: Option<Vec<String>>,
20393    ///Property: Index text
20394    #[serde(skip_serializing_if = "Option::is_none")]
20395    #[cfg_attr(
20396        feature = "builder",
20397        builder(with = |value:impl Into<String>|vec![value.into()])
20398    )]
20399    pub index_text: Option<Vec<String>>,
20400    ///Property: Involved
20401    #[serde(skip_serializing_if = "Option::is_none")]
20402    #[cfg_attr(
20403        feature = "builder",
20404        builder(with = |value:impl Into<String>|vec![value.into()])
20405    )]
20406    pub involved: Option<Vec<String>>,
20407    ///Property: Detected IP addresses
20408    #[serde(skip_serializing_if = "Option::is_none")]
20409    #[cfg_attr(
20410        feature = "builder",
20411        builder(with = |value:impl Into<String>|vec![value.into()])
20412    )]
20413    pub ip_mentioned: Option<Vec<String>>,
20414    ///Property: Keywords
20415    #[serde(skip_serializing_if = "Option::is_none")]
20416    #[cfg_attr(
20417        feature = "builder",
20418        builder(with = |value:impl Into<String>|vec![value.into()])
20419    )]
20420    pub keywords: Option<Vec<String>>,
20421    ///Property: Location
20422    #[serde(skip_serializing_if = "Option::is_none")]
20423    #[cfg_attr(
20424        feature = "builder",
20425        builder(with = |value:impl Into<String>|vec![value.into()])
20426    )]
20427    pub location: Option<Vec<String>>,
20428    ///Property: Detected locations
20429    #[serde(skip_serializing_if = "Option::is_none")]
20430    #[cfg_attr(
20431        feature = "builder",
20432        builder(with = |value:impl Into<String>|vec![value.into()])
20433    )]
20434    pub location_mentioned: Option<Vec<String>>,
20435    ///Property: Modified on
20436    #[serde(skip_serializing_if = "Option::is_none")]
20437    #[cfg_attr(
20438        feature = "builder",
20439        builder(with = |value:impl Into<String>|vec![value.into()])
20440    )]
20441    pub modified_at: Option<Vec<String>>,
20442    ///Property: Name
20443    #[serde(default)]
20444    #[cfg_attr(
20445        feature = "builder",
20446        builder(with = |value:impl Into<String>|vec![value.into()])
20447    )]
20448    pub name: Vec<String>,
20449    ///Property: Detected names
20450    #[serde(skip_serializing_if = "Option::is_none")]
20451    #[cfg_attr(
20452        feature = "builder",
20453        builder(with = |value:impl Into<String>|vec![value.into()])
20454    )]
20455    pub names_mentioned: Option<Vec<String>>,
20456    ///Property: Notes
20457    #[serde(skip_serializing_if = "Option::is_none")]
20458    #[cfg_attr(
20459        feature = "builder",
20460        builder(with = |value:impl Into<String>|vec![value.into()])
20461    )]
20462    pub notes: Option<Vec<String>>,
20463    ///Property: Organizer
20464    #[serde(skip_serializing_if = "Option::is_none")]
20465    #[cfg_attr(
20466        feature = "builder",
20467        builder(with = |value:impl Into<String>|vec![value.into()])
20468    )]
20469    pub organizer: Option<Vec<String>>,
20470    ///Property: Detected people
20471    #[serde(skip_serializing_if = "Option::is_none")]
20472    #[cfg_attr(
20473        feature = "builder",
20474        builder(with = |value:impl Into<String>|vec![value.into()])
20475    )]
20476    pub people_mentioned: Option<Vec<String>>,
20477    ///Property: Detected phones
20478    #[serde(skip_serializing_if = "Option::is_none")]
20479    #[cfg_attr(
20480        feature = "builder",
20481        builder(with = |value:impl Into<String>|vec![value.into()])
20482    )]
20483    pub phone_mentioned: Option<Vec<String>>,
20484    ///Property: Previous name
20485    #[serde(skip_serializing_if = "Option::is_none")]
20486    #[cfg_attr(
20487        feature = "builder",
20488        builder(with = |value:impl Into<String>|vec![value.into()])
20489    )]
20490    pub previous_name: Option<Vec<String>>,
20491    ///Property: Program
20492    #[serde(skip_serializing_if = "Option::is_none")]
20493    #[cfg_attr(
20494        feature = "builder",
20495        builder(with = |value:impl Into<String>|vec![value.into()])
20496    )]
20497    pub program: Option<Vec<String>>,
20498    ///Property: Program ID
20499    #[serde(skip_serializing_if = "Option::is_none")]
20500    #[cfg_attr(
20501        feature = "builder",
20502        builder(with = |value:impl Into<String>|vec![value.into()])
20503    )]
20504    pub program_id: Option<Vec<String>>,
20505    ///Property: Source document
20506    #[serde(skip_serializing_if = "Option::is_none")]
20507    #[cfg_attr(
20508        feature = "builder",
20509        builder(with = |value:impl Into<String>|vec![value.into()])
20510    )]
20511    pub proof: Option<Vec<String>>,
20512    ///Property: Publishing source
20513    #[serde(skip_serializing_if = "Option::is_none")]
20514    #[cfg_attr(
20515        feature = "builder",
20516        builder(with = |value:impl Into<String>|vec![value.into()])
20517    )]
20518    pub publisher: Option<Vec<String>>,
20519    ///Property: Publishing source URL
20520    #[serde(skip_serializing_if = "Option::is_none")]
20521    #[cfg_attr(
20522        feature = "builder",
20523        builder(with = |value:impl Into<String>|vec![value.into()])
20524    )]
20525    pub publisher_url: Option<Vec<String>>,
20526    ///Property: Record ID
20527    #[serde(skip_serializing_if = "Option::is_none")]
20528    #[cfg_attr(
20529        feature = "builder",
20530        builder(with = |value:impl Into<String>|vec![value.into()])
20531    )]
20532    pub record_id: Option<Vec<String>>,
20533    ///Property: Retrieved on
20534    #[serde(skip_serializing_if = "Option::is_none")]
20535    #[cfg_attr(
20536        feature = "builder",
20537        builder(with = |value:impl Into<String>|vec![value.into()])
20538    )]
20539    pub retrieved_at: Option<Vec<String>>,
20540    ///Property: Source link
20541    #[serde(skip_serializing_if = "Option::is_none")]
20542    #[cfg_attr(
20543        feature = "builder",
20544        builder(with = |value:impl Into<String>|vec![value.into()])
20545    )]
20546    pub source_url: Option<Vec<String>>,
20547    ///Property: Start date
20548    #[serde(skip_serializing_if = "Option::is_none")]
20549    #[cfg_attr(
20550        feature = "builder",
20551        builder(with = |value:impl Into<String>|vec![value.into()])
20552    )]
20553    pub start_date: Option<Vec<String>>,
20554    ///Property: Start location
20555    #[serde(default)]
20556    #[cfg_attr(
20557        feature = "builder",
20558        builder(with = |value:impl Into<String>|vec![value.into()])
20559    )]
20560    pub start_location: Vec<String>,
20561    ///Property: Summary
20562    #[serde(skip_serializing_if = "Option::is_none")]
20563    #[cfg_attr(
20564        feature = "builder",
20565        builder(with = |value:impl Into<String>|vec![value.into()])
20566    )]
20567    pub summary: Option<Vec<String>>,
20568    ///Property: Topics
20569    #[serde(skip_serializing_if = "Option::is_none")]
20570    #[cfg_attr(
20571        feature = "builder",
20572        builder(with = |value:impl Into<String>|vec![value.into()])
20573    )]
20574    pub topics: Option<Vec<String>>,
20575    ///Property: Vehicle
20576    #[serde(skip_serializing_if = "Option::is_none")]
20577    #[cfg_attr(
20578        feature = "builder",
20579        builder(with = |value:impl Into<String>|vec![value.into()])
20580    )]
20581    pub vehicle: Option<Vec<String>>,
20582    ///Property: Weak alias
20583    #[serde(skip_serializing_if = "Option::is_none")]
20584    #[cfg_attr(
20585        feature = "builder",
20586        builder(with = |value:impl Into<String>|vec![value.into()])
20587    )]
20588    pub weak_alias: Option<Vec<String>>,
20589    ///Property: Wikidata ID
20590    #[serde(skip_serializing_if = "Option::is_none")]
20591    #[cfg_attr(
20592        feature = "builder",
20593        builder(with = |value:impl Into<String>|vec![value.into()])
20594    )]
20595    pub wikidata_id: Option<Vec<String>>,
20596    ///Property: Wikipedia Article
20597    #[serde(skip_serializing_if = "Option::is_none")]
20598    #[cfg_attr(
20599        feature = "builder",
20600        builder(with = |value:impl Into<String>|vec![value.into()])
20601    )]
20602    pub wikipedia_url: Option<Vec<String>>,
20603}
20604impl Trip {
20605    /// Create a new entity with the given ID
20606    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
20607    pub fn new(id: impl Into<String>) -> Self {
20608        Self {
20609            id: id.into(),
20610            schema: "Trip".to_string(),
20611            address: None,
20612            address_entity: None,
20613            aleph_url: None,
20614            alias: None,
20615            companies_mentioned: None,
20616            country: None,
20617            created_at: None,
20618            date: None,
20619            description: None,
20620            detected_country: None,
20621            detected_language: None,
20622            email_mentioned: None,
20623            end_date: None,
20624            end_location: Vec::new(),
20625            iban_mentioned: None,
20626            important: None,
20627            index_text: None,
20628            involved: None,
20629            ip_mentioned: None,
20630            keywords: None,
20631            location: None,
20632            location_mentioned: None,
20633            modified_at: None,
20634            name: Vec::new(),
20635            names_mentioned: None,
20636            notes: None,
20637            organizer: None,
20638            people_mentioned: None,
20639            phone_mentioned: None,
20640            previous_name: None,
20641            program: None,
20642            program_id: None,
20643            proof: None,
20644            publisher: None,
20645            publisher_url: None,
20646            record_id: None,
20647            retrieved_at: None,
20648            source_url: None,
20649            start_date: None,
20650            start_location: Vec::new(),
20651            summary: None,
20652            topics: None,
20653            vehicle: None,
20654            weak_alias: None,
20655            wikidata_id: None,
20656            wikipedia_url: None,
20657        }
20658    }
20659    /// Get the schema name
20660    pub fn schema_name() -> &'static str {
20661        "Trip"
20662    }
20663    /// Serialize to standard FTM nested JSON format
20664    ///
20665    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
20666    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
20667        let mut value = serde_json::to_value(self)?;
20668        if let Some(obj) = value.as_object_mut() {
20669            let id = obj.remove("id");
20670            let schema = obj.remove("schema");
20671            let properties = serde_json::Value::Object(std::mem::take(obj));
20672            if let Some(id) = id {
20673                obj.insert("id".into(), id);
20674            }
20675            if let Some(schema) = schema {
20676                obj.insert("schema".into(), schema);
20677            }
20678            obj.insert("properties".into(), properties);
20679        }
20680        serde_json::to_string(&value)
20681    }
20682}
20683///FTM Schema: Other link
20684#[derive(Debug, Clone, Serialize, Deserialize)]
20685#[cfg_attr(feature = "builder", derive(Builder))]
20686#[serde(rename_all = "camelCase")]
20687pub struct UnknownLink {
20688    pub id: String,
20689    #[cfg_attr(feature = "builder", builder(default = "UnknownLink".to_string()))]
20690    pub schema: String,
20691    ///Property: Aleph URL
20692    #[serde(skip_serializing_if = "Option::is_none")]
20693    #[cfg_attr(
20694        feature = "builder",
20695        builder(with = |value:impl Into<String>|vec![value.into()])
20696    )]
20697    pub aleph_url: Option<Vec<String>>,
20698    ///Property: Date
20699    #[serde(skip_serializing_if = "Option::is_none")]
20700    #[cfg_attr(
20701        feature = "builder",
20702        builder(with = |value:impl Into<String>|vec![value.into()])
20703    )]
20704    pub date: Option<Vec<String>>,
20705    ///Property: Description
20706    #[serde(skip_serializing_if = "Option::is_none")]
20707    #[cfg_attr(
20708        feature = "builder",
20709        builder(with = |value:impl Into<String>|vec![value.into()])
20710    )]
20711    pub description: Option<Vec<String>>,
20712    ///Property: End date
20713    #[serde(skip_serializing_if = "Option::is_none")]
20714    #[cfg_attr(
20715        feature = "builder",
20716        builder(with = |value:impl Into<String>|vec![value.into()])
20717    )]
20718    pub end_date: Option<Vec<String>>,
20719    ///Property: Index text
20720    #[serde(skip_serializing_if = "Option::is_none")]
20721    #[cfg_attr(
20722        feature = "builder",
20723        builder(with = |value:impl Into<String>|vec![value.into()])
20724    )]
20725    pub index_text: Option<Vec<String>>,
20726    ///Property: Modified on
20727    #[serde(skip_serializing_if = "Option::is_none")]
20728    #[cfg_attr(
20729        feature = "builder",
20730        builder(with = |value:impl Into<String>|vec![value.into()])
20731    )]
20732    pub modified_at: Option<Vec<String>>,
20733    ///Property: Detected names
20734    #[serde(skip_serializing_if = "Option::is_none")]
20735    #[cfg_attr(
20736        feature = "builder",
20737        builder(with = |value:impl Into<String>|vec![value.into()])
20738    )]
20739    pub names_mentioned: Option<Vec<String>>,
20740    ///Property: Object
20741    #[serde(default)]
20742    #[cfg_attr(
20743        feature = "builder",
20744        builder(with = |value:impl Into<String>|vec![value.into()])
20745    )]
20746    pub object: Vec<String>,
20747    ///Property: Source document
20748    #[serde(skip_serializing_if = "Option::is_none")]
20749    #[cfg_attr(
20750        feature = "builder",
20751        builder(with = |value:impl Into<String>|vec![value.into()])
20752    )]
20753    pub proof: Option<Vec<String>>,
20754    ///Property: Publishing source
20755    #[serde(skip_serializing_if = "Option::is_none")]
20756    #[cfg_attr(
20757        feature = "builder",
20758        builder(with = |value:impl Into<String>|vec![value.into()])
20759    )]
20760    pub publisher: Option<Vec<String>>,
20761    ///Property: Publishing source URL
20762    #[serde(skip_serializing_if = "Option::is_none")]
20763    #[cfg_attr(
20764        feature = "builder",
20765        builder(with = |value:impl Into<String>|vec![value.into()])
20766    )]
20767    pub publisher_url: Option<Vec<String>>,
20768    ///Property: Record ID
20769    #[serde(skip_serializing_if = "Option::is_none")]
20770    #[cfg_attr(
20771        feature = "builder",
20772        builder(with = |value:impl Into<String>|vec![value.into()])
20773    )]
20774    pub record_id: Option<Vec<String>>,
20775    ///Property: Retrieved on
20776    #[serde(skip_serializing_if = "Option::is_none")]
20777    #[cfg_attr(
20778        feature = "builder",
20779        builder(with = |value:impl Into<String>|vec![value.into()])
20780    )]
20781    pub retrieved_at: Option<Vec<String>>,
20782    ///Property: Role
20783    #[serde(skip_serializing_if = "Option::is_none")]
20784    #[cfg_attr(
20785        feature = "builder",
20786        builder(with = |value:impl Into<String>|vec![value.into()])
20787    )]
20788    pub role: Option<Vec<String>>,
20789    ///Property: Source link
20790    #[serde(skip_serializing_if = "Option::is_none")]
20791    #[cfg_attr(
20792        feature = "builder",
20793        builder(with = |value:impl Into<String>|vec![value.into()])
20794    )]
20795    pub source_url: Option<Vec<String>>,
20796    ///Property: Start date
20797    #[serde(skip_serializing_if = "Option::is_none")]
20798    #[cfg_attr(
20799        feature = "builder",
20800        builder(with = |value:impl Into<String>|vec![value.into()])
20801    )]
20802    pub start_date: Option<Vec<String>>,
20803    ///Property: Status
20804    #[serde(skip_serializing_if = "Option::is_none")]
20805    #[cfg_attr(
20806        feature = "builder",
20807        builder(with = |value:impl Into<String>|vec![value.into()])
20808    )]
20809    pub status: Option<Vec<String>>,
20810    ///Property: Subject
20811    #[serde(default)]
20812    #[cfg_attr(
20813        feature = "builder",
20814        builder(with = |value:impl Into<String>|vec![value.into()])
20815    )]
20816    pub subject: Vec<String>,
20817    ///Property: Summary
20818    #[serde(skip_serializing_if = "Option::is_none")]
20819    #[cfg_attr(
20820        feature = "builder",
20821        builder(with = |value:impl Into<String>|vec![value.into()])
20822    )]
20823    pub summary: Option<Vec<String>>,
20824}
20825impl UnknownLink {
20826    /// Create a new entity with the given ID
20827    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
20828    pub fn new(id: impl Into<String>) -> Self {
20829        Self {
20830            id: id.into(),
20831            schema: "UnknownLink".to_string(),
20832            aleph_url: None,
20833            date: None,
20834            description: None,
20835            end_date: None,
20836            index_text: None,
20837            modified_at: None,
20838            names_mentioned: None,
20839            object: Vec::new(),
20840            proof: None,
20841            publisher: None,
20842            publisher_url: None,
20843            record_id: None,
20844            retrieved_at: None,
20845            role: None,
20846            source_url: None,
20847            start_date: None,
20848            status: None,
20849            subject: Vec::new(),
20850            summary: None,
20851        }
20852    }
20853    /// Get the schema name
20854    pub fn schema_name() -> &'static str {
20855        "UnknownLink"
20856    }
20857    /// Serialize to standard FTM nested JSON format
20858    ///
20859    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
20860    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
20861        let mut value = serde_json::to_value(self)?;
20862        if let Some(obj) = value.as_object_mut() {
20863            let id = obj.remove("id");
20864            let schema = obj.remove("schema");
20865            let properties = serde_json::Value::Object(std::mem::take(obj));
20866            if let Some(id) = id {
20867                obj.insert("id".into(), id);
20868            }
20869            if let Some(schema) = schema {
20870                obj.insert("schema".into(), schema);
20871            }
20872            obj.insert("properties".into(), properties);
20873        }
20874        serde_json::to_string(&value)
20875    }
20876}
20877///FTM Schema: User account
20878#[derive(Debug, Clone, Serialize, Deserialize)]
20879#[cfg_attr(feature = "builder", derive(Builder))]
20880#[serde(rename_all = "camelCase")]
20881pub struct UserAccount {
20882    pub id: String,
20883    #[cfg_attr(feature = "builder", builder(default = "UserAccount".to_string()))]
20884    pub schema: String,
20885    ///Property: Address
20886    #[serde(skip_serializing_if = "Option::is_none")]
20887    #[cfg_attr(
20888        feature = "builder",
20889        builder(with = |value:impl Into<String>|vec![value.into()])
20890    )]
20891    pub address: Option<Vec<String>>,
20892    ///Property: Address
20893    #[serde(skip_serializing_if = "Option::is_none")]
20894    #[cfg_attr(
20895        feature = "builder",
20896        builder(with = |value:impl Into<String>|vec![value.into()])
20897    )]
20898    pub address_entity: Option<Vec<String>>,
20899    ///Property: Aleph URL
20900    #[serde(skip_serializing_if = "Option::is_none")]
20901    #[cfg_attr(
20902        feature = "builder",
20903        builder(with = |value:impl Into<String>|vec![value.into()])
20904    )]
20905    pub aleph_url: Option<Vec<String>>,
20906    ///Property: Alias
20907    #[serde(skip_serializing_if = "Option::is_none")]
20908    #[cfg_attr(
20909        feature = "builder",
20910        builder(with = |value:impl Into<String>|vec![value.into()])
20911    )]
20912    pub alias: Option<Vec<String>>,
20913    ///Property: Country
20914    #[serde(skip_serializing_if = "Option::is_none")]
20915    #[cfg_attr(
20916        feature = "builder",
20917        builder(with = |value:impl Into<String>|vec![value.into()])
20918    )]
20919    pub country: Option<Vec<String>>,
20920    ///Property: Created at
20921    #[serde(skip_serializing_if = "Option::is_none")]
20922    #[cfg_attr(
20923        feature = "builder",
20924        builder(with = |value:impl Into<String>|vec![value.into()])
20925    )]
20926    pub created_at: Option<Vec<String>>,
20927    ///Property: Description
20928    #[serde(skip_serializing_if = "Option::is_none")]
20929    #[cfg_attr(
20930        feature = "builder",
20931        builder(with = |value:impl Into<String>|vec![value.into()])
20932    )]
20933    pub description: Option<Vec<String>>,
20934    ///Property: Email
20935    #[serde(skip_serializing_if = "Option::is_none")]
20936    #[cfg_attr(
20937        feature = "builder",
20938        builder(with = |value:impl Into<String>|vec![value.into()])
20939    )]
20940    pub email: Option<Vec<String>>,
20941    ///Property: Index text
20942    #[serde(skip_serializing_if = "Option::is_none")]
20943    #[cfg_attr(
20944        feature = "builder",
20945        builder(with = |value:impl Into<String>|vec![value.into()])
20946    )]
20947    pub index_text: Option<Vec<String>>,
20948    ///Property: IP address
20949    #[serde(skip_serializing_if = "Option::is_none")]
20950    #[cfg_attr(
20951        feature = "builder",
20952        builder(with = |value:impl Into<String>|vec![value.into()])
20953    )]
20954    pub ip_address: Option<Vec<String>>,
20955    ///Property: Keywords
20956    #[serde(skip_serializing_if = "Option::is_none")]
20957    #[cfg_attr(
20958        feature = "builder",
20959        builder(with = |value:impl Into<String>|vec![value.into()])
20960    )]
20961    pub keywords: Option<Vec<String>>,
20962    ///Property: Modified on
20963    #[serde(skip_serializing_if = "Option::is_none")]
20964    #[cfg_attr(
20965        feature = "builder",
20966        builder(with = |value:impl Into<String>|vec![value.into()])
20967    )]
20968    pub modified_at: Option<Vec<String>>,
20969    ///Property: Name
20970    #[serde(default)]
20971    #[cfg_attr(
20972        feature = "builder",
20973        builder(with = |value:impl Into<String>|vec![value.into()])
20974    )]
20975    pub name: Vec<String>,
20976    ///Property: Notes
20977    #[serde(skip_serializing_if = "Option::is_none")]
20978    #[cfg_attr(
20979        feature = "builder",
20980        builder(with = |value:impl Into<String>|vec![value.into()])
20981    )]
20982    pub notes: Option<Vec<String>>,
20983    ///Property: Owner
20984    #[serde(skip_serializing_if = "Option::is_none")]
20985    #[cfg_attr(
20986        feature = "builder",
20987        builder(with = |value:impl Into<String>|vec![value.into()])
20988    )]
20989    pub owner: Option<Vec<String>>,
20990    ///Property: Password
20991    #[serde(skip_serializing_if = "Option::is_none")]
20992    #[cfg_attr(
20993        feature = "builder",
20994        builder(with = |value:impl Into<String>|vec![value.into()])
20995    )]
20996    pub password: Option<Vec<String>>,
20997    ///Property: Phone
20998    #[serde(skip_serializing_if = "Option::is_none")]
20999    #[cfg_attr(
21000        feature = "builder",
21001        builder(with = |value:impl Into<String>|vec![value.into()])
21002    )]
21003    pub phone: Option<Vec<String>>,
21004    ///Property: Previous name
21005    #[serde(skip_serializing_if = "Option::is_none")]
21006    #[cfg_attr(
21007        feature = "builder",
21008        builder(with = |value:impl Into<String>|vec![value.into()])
21009    )]
21010    pub previous_name: Option<Vec<String>>,
21011    ///Property: Program
21012    #[serde(skip_serializing_if = "Option::is_none")]
21013    #[cfg_attr(
21014        feature = "builder",
21015        builder(with = |value:impl Into<String>|vec![value.into()])
21016    )]
21017    pub program: Option<Vec<String>>,
21018    ///Property: Program ID
21019    #[serde(skip_serializing_if = "Option::is_none")]
21020    #[cfg_attr(
21021        feature = "builder",
21022        builder(with = |value:impl Into<String>|vec![value.into()])
21023    )]
21024    pub program_id: Option<Vec<String>>,
21025    ///Property: Source document
21026    #[serde(skip_serializing_if = "Option::is_none")]
21027    #[cfg_attr(
21028        feature = "builder",
21029        builder(with = |value:impl Into<String>|vec![value.into()])
21030    )]
21031    pub proof: Option<Vec<String>>,
21032    ///Property: Publishing source
21033    #[serde(skip_serializing_if = "Option::is_none")]
21034    #[cfg_attr(
21035        feature = "builder",
21036        builder(with = |value:impl Into<String>|vec![value.into()])
21037    )]
21038    pub publisher: Option<Vec<String>>,
21039    ///Property: Publishing source URL
21040    #[serde(skip_serializing_if = "Option::is_none")]
21041    #[cfg_attr(
21042        feature = "builder",
21043        builder(with = |value:impl Into<String>|vec![value.into()])
21044    )]
21045    pub publisher_url: Option<Vec<String>>,
21046    ///Property: Retrieved on
21047    #[serde(skip_serializing_if = "Option::is_none")]
21048    #[cfg_attr(
21049        feature = "builder",
21050        builder(with = |value:impl Into<String>|vec![value.into()])
21051    )]
21052    pub retrieved_at: Option<Vec<String>>,
21053    ///Property: Service
21054    #[serde(skip_serializing_if = "Option::is_none")]
21055    #[cfg_attr(
21056        feature = "builder",
21057        builder(with = |value:impl Into<String>|vec![value.into()])
21058    )]
21059    pub service: Option<Vec<String>>,
21060    ///Property: Source link
21061    #[serde(skip_serializing_if = "Option::is_none")]
21062    #[cfg_attr(
21063        feature = "builder",
21064        builder(with = |value:impl Into<String>|vec![value.into()])
21065    )]
21066    pub source_url: Option<Vec<String>>,
21067    ///Property: Summary
21068    #[serde(skip_serializing_if = "Option::is_none")]
21069    #[cfg_attr(
21070        feature = "builder",
21071        builder(with = |value:impl Into<String>|vec![value.into()])
21072    )]
21073    pub summary: Option<Vec<String>>,
21074    ///Property: Topics
21075    #[serde(skip_serializing_if = "Option::is_none")]
21076    #[cfg_attr(
21077        feature = "builder",
21078        builder(with = |value:impl Into<String>|vec![value.into()])
21079    )]
21080    pub topics: Option<Vec<String>>,
21081    ///Property: Username
21082    #[serde(default)]
21083    #[cfg_attr(
21084        feature = "builder",
21085        builder(with = |value:impl Into<String>|vec![value.into()])
21086    )]
21087    pub username: Vec<String>,
21088    ///Property: Weak alias
21089    #[serde(skip_serializing_if = "Option::is_none")]
21090    #[cfg_attr(
21091        feature = "builder",
21092        builder(with = |value:impl Into<String>|vec![value.into()])
21093    )]
21094    pub weak_alias: Option<Vec<String>>,
21095    ///Property: Wikidata ID
21096    #[serde(skip_serializing_if = "Option::is_none")]
21097    #[cfg_attr(
21098        feature = "builder",
21099        builder(with = |value:impl Into<String>|vec![value.into()])
21100    )]
21101    pub wikidata_id: Option<Vec<String>>,
21102    ///Property: Wikipedia Article
21103    #[serde(skip_serializing_if = "Option::is_none")]
21104    #[cfg_attr(
21105        feature = "builder",
21106        builder(with = |value:impl Into<String>|vec![value.into()])
21107    )]
21108    pub wikipedia_url: Option<Vec<String>>,
21109}
21110impl UserAccount {
21111    /// Create a new entity with the given ID
21112    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
21113    pub fn new(id: impl Into<String>) -> Self {
21114        Self {
21115            id: id.into(),
21116            schema: "UserAccount".to_string(),
21117            address: None,
21118            address_entity: None,
21119            aleph_url: None,
21120            alias: None,
21121            country: None,
21122            created_at: None,
21123            description: None,
21124            email: None,
21125            index_text: None,
21126            ip_address: None,
21127            keywords: None,
21128            modified_at: None,
21129            name: Vec::new(),
21130            notes: None,
21131            owner: None,
21132            password: None,
21133            phone: None,
21134            previous_name: None,
21135            program: None,
21136            program_id: None,
21137            proof: None,
21138            publisher: None,
21139            publisher_url: None,
21140            retrieved_at: None,
21141            service: None,
21142            source_url: None,
21143            summary: None,
21144            topics: None,
21145            username: Vec::new(),
21146            weak_alias: None,
21147            wikidata_id: None,
21148            wikipedia_url: None,
21149        }
21150    }
21151    /// Get the schema name
21152    pub fn schema_name() -> &'static str {
21153        "UserAccount"
21154    }
21155    /// Serialize to standard FTM nested JSON format
21156    ///
21157    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
21158    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
21159        let mut value = serde_json::to_value(self)?;
21160        if let Some(obj) = value.as_object_mut() {
21161            let id = obj.remove("id");
21162            let schema = obj.remove("schema");
21163            let properties = serde_json::Value::Object(std::mem::take(obj));
21164            if let Some(id) = id {
21165                obj.insert("id".into(), id);
21166            }
21167            if let Some(schema) = schema {
21168                obj.insert("schema".into(), schema);
21169            }
21170            obj.insert("properties".into(), properties);
21171        }
21172        serde_json::to_string(&value)
21173    }
21174}
21175///FTM Schema: Vehicle
21176#[derive(Debug, Clone, Serialize, Deserialize)]
21177#[cfg_attr(feature = "builder", derive(Builder))]
21178#[serde(rename_all = "camelCase")]
21179pub struct Vehicle {
21180    pub id: String,
21181    #[cfg_attr(feature = "builder", builder(default = "Vehicle".to_string()))]
21182    pub schema: String,
21183    ///Property: Address
21184    #[serde(skip_serializing_if = "Option::is_none")]
21185    #[cfg_attr(
21186        feature = "builder",
21187        builder(with = |value:impl Into<String>|vec![value.into()])
21188    )]
21189    pub address: Option<Vec<String>>,
21190    ///Property: Address
21191    #[serde(skip_serializing_if = "Option::is_none")]
21192    #[cfg_attr(
21193        feature = "builder",
21194        builder(with = |value:impl Into<String>|vec![value.into()])
21195    )]
21196    pub address_entity: Option<Vec<String>>,
21197    ///Property: Aleph URL
21198    #[serde(skip_serializing_if = "Option::is_none")]
21199    #[cfg_attr(
21200        feature = "builder",
21201        builder(with = |value:impl Into<String>|vec![value.into()])
21202    )]
21203    pub aleph_url: Option<Vec<String>>,
21204    ///Property: Alias
21205    #[serde(skip_serializing_if = "Option::is_none")]
21206    #[cfg_attr(
21207        feature = "builder",
21208        builder(with = |value:impl Into<String>|vec![value.into()])
21209    )]
21210    pub alias: Option<Vec<String>>,
21211    ///Property: Amount
21212    #[serde(
21213        skip_serializing_if = "Option::is_none",
21214        deserialize_with = "deserialize_opt_f64_vec",
21215        default
21216    )]
21217    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21218    pub amount: Option<Vec<f64>>,
21219    ///Property: Amount in EUR
21220    #[serde(
21221        skip_serializing_if = "Option::is_none",
21222        deserialize_with = "deserialize_opt_f64_vec",
21223        default
21224    )]
21225    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21226    pub amount_eur: Option<Vec<f64>>,
21227    ///Property: Amount in USD
21228    #[serde(
21229        skip_serializing_if = "Option::is_none",
21230        deserialize_with = "deserialize_opt_f64_vec",
21231        default
21232    )]
21233    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21234    pub amount_usd: Option<Vec<f64>>,
21235    ///Property: Build Date
21236    #[serde(skip_serializing_if = "Option::is_none")]
21237    #[cfg_attr(
21238        feature = "builder",
21239        builder(with = |value:impl Into<String>|vec![value.into()])
21240    )]
21241    pub build_date: Option<Vec<String>>,
21242    ///Property: Country
21243    #[serde(skip_serializing_if = "Option::is_none")]
21244    #[cfg_attr(
21245        feature = "builder",
21246        builder(with = |value:impl Into<String>|vec![value.into()])
21247    )]
21248    pub country: Option<Vec<String>>,
21249    ///Property: Created at
21250    #[serde(skip_serializing_if = "Option::is_none")]
21251    #[cfg_attr(
21252        feature = "builder",
21253        builder(with = |value:impl Into<String>|vec![value.into()])
21254    )]
21255    pub created_at: Option<Vec<String>>,
21256    ///Property: Currency
21257    #[serde(skip_serializing_if = "Option::is_none")]
21258    #[cfg_attr(
21259        feature = "builder",
21260        builder(with = |value:impl Into<String>|vec![value.into()])
21261    )]
21262    pub currency: Option<Vec<String>>,
21263    ///Property: De-registration Date
21264    #[serde(skip_serializing_if = "Option::is_none")]
21265    #[cfg_attr(
21266        feature = "builder",
21267        builder(with = |value:impl Into<String>|vec![value.into()])
21268    )]
21269    pub deregistration_date: Option<Vec<String>>,
21270    ///Property: Description
21271    #[serde(skip_serializing_if = "Option::is_none")]
21272    #[cfg_attr(
21273        feature = "builder",
21274        builder(with = |value:impl Into<String>|vec![value.into()])
21275    )]
21276    pub description: Option<Vec<String>>,
21277    ///Property: Index text
21278    #[serde(skip_serializing_if = "Option::is_none")]
21279    #[cfg_attr(
21280        feature = "builder",
21281        builder(with = |value:impl Into<String>|vec![value.into()])
21282    )]
21283    pub index_text: Option<Vec<String>>,
21284    ///Property: Keywords
21285    #[serde(skip_serializing_if = "Option::is_none")]
21286    #[cfg_attr(
21287        feature = "builder",
21288        builder(with = |value:impl Into<String>|vec![value.into()])
21289    )]
21290    pub keywords: Option<Vec<String>>,
21291    ///Property: Model
21292    #[serde(skip_serializing_if = "Option::is_none")]
21293    #[cfg_attr(
21294        feature = "builder",
21295        builder(with = |value:impl Into<String>|vec![value.into()])
21296    )]
21297    pub model: Option<Vec<String>>,
21298    ///Property: Modified on
21299    #[serde(skip_serializing_if = "Option::is_none")]
21300    #[cfg_attr(
21301        feature = "builder",
21302        builder(with = |value:impl Into<String>|vec![value.into()])
21303    )]
21304    pub modified_at: Option<Vec<String>>,
21305    ///Property: Name
21306    #[serde(default)]
21307    #[cfg_attr(
21308        feature = "builder",
21309        builder(with = |value:impl Into<String>|vec![value.into()])
21310    )]
21311    pub name: Vec<String>,
21312    ///Property: Notes
21313    #[serde(skip_serializing_if = "Option::is_none")]
21314    #[cfg_attr(
21315        feature = "builder",
21316        builder(with = |value:impl Into<String>|vec![value.into()])
21317    )]
21318    pub notes: Option<Vec<String>>,
21319    ///Property: Operator
21320    #[serde(skip_serializing_if = "Option::is_none")]
21321    #[cfg_attr(
21322        feature = "builder",
21323        builder(with = |value:impl Into<String>|vec![value.into()])
21324    )]
21325    pub operator: Option<Vec<String>>,
21326    ///Property: Owner
21327    #[serde(skip_serializing_if = "Option::is_none")]
21328    #[cfg_attr(
21329        feature = "builder",
21330        builder(with = |value:impl Into<String>|vec![value.into()])
21331    )]
21332    pub owner: Option<Vec<String>>,
21333    ///Property: Previous name
21334    #[serde(skip_serializing_if = "Option::is_none")]
21335    #[cfg_attr(
21336        feature = "builder",
21337        builder(with = |value:impl Into<String>|vec![value.into()])
21338    )]
21339    pub previous_name: Option<Vec<String>>,
21340    ///Property: Program
21341    #[serde(skip_serializing_if = "Option::is_none")]
21342    #[cfg_attr(
21343        feature = "builder",
21344        builder(with = |value:impl Into<String>|vec![value.into()])
21345    )]
21346    pub program: Option<Vec<String>>,
21347    ///Property: Program ID
21348    #[serde(skip_serializing_if = "Option::is_none")]
21349    #[cfg_attr(
21350        feature = "builder",
21351        builder(with = |value:impl Into<String>|vec![value.into()])
21352    )]
21353    pub program_id: Option<Vec<String>>,
21354    ///Property: Source document
21355    #[serde(skip_serializing_if = "Option::is_none")]
21356    #[cfg_attr(
21357        feature = "builder",
21358        builder(with = |value:impl Into<String>|vec![value.into()])
21359    )]
21360    pub proof: Option<Vec<String>>,
21361    ///Property: Publishing source
21362    #[serde(skip_serializing_if = "Option::is_none")]
21363    #[cfg_attr(
21364        feature = "builder",
21365        builder(with = |value:impl Into<String>|vec![value.into()])
21366    )]
21367    pub publisher: Option<Vec<String>>,
21368    ///Property: Publishing source URL
21369    #[serde(skip_serializing_if = "Option::is_none")]
21370    #[cfg_attr(
21371        feature = "builder",
21372        builder(with = |value:impl Into<String>|vec![value.into()])
21373    )]
21374    pub publisher_url: Option<Vec<String>>,
21375    ///Property: Registration Date
21376    #[serde(skip_serializing_if = "Option::is_none")]
21377    #[cfg_attr(
21378        feature = "builder",
21379        builder(with = |value:impl Into<String>|vec![value.into()])
21380    )]
21381    pub registration_date: Option<Vec<String>>,
21382    ///Property: Registration number
21383    #[serde(skip_serializing_if = "Option::is_none")]
21384    #[cfg_attr(
21385        feature = "builder",
21386        builder(with = |value:impl Into<String>|vec![value.into()])
21387    )]
21388    pub registration_number: Option<Vec<String>>,
21389    ///Property: Retrieved on
21390    #[serde(skip_serializing_if = "Option::is_none")]
21391    #[cfg_attr(
21392        feature = "builder",
21393        builder(with = |value:impl Into<String>|vec![value.into()])
21394    )]
21395    pub retrieved_at: Option<Vec<String>>,
21396    ///Property: Source link
21397    #[serde(skip_serializing_if = "Option::is_none")]
21398    #[cfg_attr(
21399        feature = "builder",
21400        builder(with = |value:impl Into<String>|vec![value.into()])
21401    )]
21402    pub source_url: Option<Vec<String>>,
21403    ///Property: Summary
21404    #[serde(skip_serializing_if = "Option::is_none")]
21405    #[cfg_attr(
21406        feature = "builder",
21407        builder(with = |value:impl Into<String>|vec![value.into()])
21408    )]
21409    pub summary: Option<Vec<String>>,
21410    ///Property: Topics
21411    #[serde(skip_serializing_if = "Option::is_none")]
21412    #[cfg_attr(
21413        feature = "builder",
21414        builder(with = |value:impl Into<String>|vec![value.into()])
21415    )]
21416    pub topics: Option<Vec<String>>,
21417    ///Property: Type
21418    #[serde(skip_serializing_if = "Option::is_none")]
21419    #[cfg_attr(
21420        feature = "builder",
21421        builder(with = |value:impl Into<String>|vec![value.into()])
21422    )]
21423    pub type_: Option<Vec<String>>,
21424    ///Property: Weak alias
21425    #[serde(skip_serializing_if = "Option::is_none")]
21426    #[cfg_attr(
21427        feature = "builder",
21428        builder(with = |value:impl Into<String>|vec![value.into()])
21429    )]
21430    pub weak_alias: Option<Vec<String>>,
21431    ///Property: Wikidata ID
21432    #[serde(skip_serializing_if = "Option::is_none")]
21433    #[cfg_attr(
21434        feature = "builder",
21435        builder(with = |value:impl Into<String>|vec![value.into()])
21436    )]
21437    pub wikidata_id: Option<Vec<String>>,
21438    ///Property: Wikipedia Article
21439    #[serde(skip_serializing_if = "Option::is_none")]
21440    #[cfg_attr(
21441        feature = "builder",
21442        builder(with = |value:impl Into<String>|vec![value.into()])
21443    )]
21444    pub wikipedia_url: Option<Vec<String>>,
21445}
21446impl Vehicle {
21447    /// Create a new entity with the given ID
21448    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
21449    pub fn new(id: impl Into<String>) -> Self {
21450        Self {
21451            id: id.into(),
21452            schema: "Vehicle".to_string(),
21453            address: None,
21454            address_entity: None,
21455            aleph_url: None,
21456            alias: None,
21457            amount: None,
21458            amount_eur: None,
21459            amount_usd: None,
21460            build_date: None,
21461            country: None,
21462            created_at: None,
21463            currency: None,
21464            deregistration_date: None,
21465            description: None,
21466            index_text: None,
21467            keywords: None,
21468            model: None,
21469            modified_at: None,
21470            name: Vec::new(),
21471            notes: None,
21472            operator: None,
21473            owner: None,
21474            previous_name: None,
21475            program: None,
21476            program_id: None,
21477            proof: None,
21478            publisher: None,
21479            publisher_url: None,
21480            registration_date: None,
21481            registration_number: None,
21482            retrieved_at: None,
21483            source_url: None,
21484            summary: None,
21485            topics: None,
21486            type_: None,
21487            weak_alias: None,
21488            wikidata_id: None,
21489            wikipedia_url: None,
21490        }
21491    }
21492    /// Get the schema name
21493    pub fn schema_name() -> &'static str {
21494        "Vehicle"
21495    }
21496    /// Serialize to standard FTM nested JSON format
21497    ///
21498    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
21499    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
21500        let mut value = serde_json::to_value(self)?;
21501        if let Some(obj) = value.as_object_mut() {
21502            let id = obj.remove("id");
21503            let schema = obj.remove("schema");
21504            let properties = serde_json::Value::Object(std::mem::take(obj));
21505            if let Some(id) = id {
21506                obj.insert("id".into(), id);
21507            }
21508            if let Some(schema) = schema {
21509                obj.insert("schema".into(), schema);
21510            }
21511            obj.insert("properties".into(), properties);
21512        }
21513        serde_json::to_string(&value)
21514    }
21515}
21516///FTM Schema: Vessel
21517#[derive(Debug, Clone, Serialize, Deserialize)]
21518#[cfg_attr(feature = "builder", derive(Builder))]
21519#[serde(rename_all = "camelCase")]
21520pub struct Vessel {
21521    pub id: String,
21522    #[cfg_attr(feature = "builder", builder(default = "Vessel".to_string()))]
21523    pub schema: String,
21524    ///Property: Address
21525    #[serde(skip_serializing_if = "Option::is_none")]
21526    #[cfg_attr(
21527        feature = "builder",
21528        builder(with = |value:impl Into<String>|vec![value.into()])
21529    )]
21530    pub address: Option<Vec<String>>,
21531    ///Property: Address
21532    #[serde(skip_serializing_if = "Option::is_none")]
21533    #[cfg_attr(
21534        feature = "builder",
21535        builder(with = |value:impl Into<String>|vec![value.into()])
21536    )]
21537    pub address_entity: Option<Vec<String>>,
21538    ///Property: Aleph URL
21539    #[serde(skip_serializing_if = "Option::is_none")]
21540    #[cfg_attr(
21541        feature = "builder",
21542        builder(with = |value:impl Into<String>|vec![value.into()])
21543    )]
21544    pub aleph_url: Option<Vec<String>>,
21545    ///Property: Alias
21546    #[serde(skip_serializing_if = "Option::is_none")]
21547    #[cfg_attr(
21548        feature = "builder",
21549        builder(with = |value:impl Into<String>|vec![value.into()])
21550    )]
21551    pub alias: Option<Vec<String>>,
21552    ///Property: Amount
21553    #[serde(
21554        skip_serializing_if = "Option::is_none",
21555        deserialize_with = "deserialize_opt_f64_vec",
21556        default
21557    )]
21558    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21559    pub amount: Option<Vec<f64>>,
21560    ///Property: Amount in EUR
21561    #[serde(
21562        skip_serializing_if = "Option::is_none",
21563        deserialize_with = "deserialize_opt_f64_vec",
21564        default
21565    )]
21566    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21567    pub amount_eur: Option<Vec<f64>>,
21568    ///Property: Amount in USD
21569    #[serde(
21570        skip_serializing_if = "Option::is_none",
21571        deserialize_with = "deserialize_opt_f64_vec",
21572        default
21573    )]
21574    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21575    pub amount_usd: Option<Vec<f64>>,
21576    ///Property: Build Date
21577    #[serde(skip_serializing_if = "Option::is_none")]
21578    #[cfg_attr(
21579        feature = "builder",
21580        builder(with = |value:impl Into<String>|vec![value.into()])
21581    )]
21582    pub build_date: Option<Vec<String>>,
21583    ///Property: Call Sign
21584    #[serde(skip_serializing_if = "Option::is_none")]
21585    #[cfg_attr(
21586        feature = "builder",
21587        builder(with = |value:impl Into<String>|vec![value.into()])
21588    )]
21589    pub call_sign: Option<Vec<String>>,
21590    ///Property: Country
21591    #[serde(skip_serializing_if = "Option::is_none")]
21592    #[cfg_attr(
21593        feature = "builder",
21594        builder(with = |value:impl Into<String>|vec![value.into()])
21595    )]
21596    pub country: Option<Vec<String>>,
21597    ///Property: Created at
21598    #[serde(skip_serializing_if = "Option::is_none")]
21599    #[cfg_attr(
21600        feature = "builder",
21601        builder(with = |value:impl Into<String>|vec![value.into()])
21602    )]
21603    pub created_at: Option<Vec<String>>,
21604    ///Property: CRS Number
21605    #[serde(skip_serializing_if = "Option::is_none")]
21606    #[cfg_attr(
21607        feature = "builder",
21608        builder(with = |value:impl Into<String>|vec![value.into()])
21609    )]
21610    pub crs_number: Option<Vec<String>>,
21611    ///Property: Currency
21612    #[serde(skip_serializing_if = "Option::is_none")]
21613    #[cfg_attr(
21614        feature = "builder",
21615        builder(with = |value:impl Into<String>|vec![value.into()])
21616    )]
21617    pub currency: Option<Vec<String>>,
21618    ///Property: Deadweight Tonnage
21619    #[serde(
21620        skip_serializing_if = "Option::is_none",
21621        deserialize_with = "deserialize_opt_f64_vec",
21622        default
21623    )]
21624    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21625    pub deadweight_tonnage: Option<Vec<f64>>,
21626    ///Property: De-registration Date
21627    #[serde(skip_serializing_if = "Option::is_none")]
21628    #[cfg_attr(
21629        feature = "builder",
21630        builder(with = |value:impl Into<String>|vec![value.into()])
21631    )]
21632    pub deregistration_date: Option<Vec<String>>,
21633    ///Property: Description
21634    #[serde(skip_serializing_if = "Option::is_none")]
21635    #[cfg_attr(
21636        feature = "builder",
21637        builder(with = |value:impl Into<String>|vec![value.into()])
21638    )]
21639    pub description: Option<Vec<String>>,
21640    ///Property: Flag
21641    #[serde(skip_serializing_if = "Option::is_none")]
21642    #[cfg_attr(
21643        feature = "builder",
21644        builder(with = |value:impl Into<String>|vec![value.into()])
21645    )]
21646    pub flag: Option<Vec<String>>,
21647    ///Property: Gross Registered Tonnage
21648    #[serde(
21649        skip_serializing_if = "Option::is_none",
21650        deserialize_with = "deserialize_opt_f64_vec",
21651        default
21652    )]
21653    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21654    pub gross_registered_tonnage: Option<Vec<f64>>,
21655    ///Property: IMO Number
21656    #[serde(skip_serializing_if = "Option::is_none")]
21657    #[cfg_attr(
21658        feature = "builder",
21659        builder(with = |value:impl Into<String>|vec![value.into()])
21660    )]
21661    pub imo_number: Option<Vec<String>>,
21662    ///Property: Index text
21663    #[serde(skip_serializing_if = "Option::is_none")]
21664    #[cfg_attr(
21665        feature = "builder",
21666        builder(with = |value:impl Into<String>|vec![value.into()])
21667    )]
21668    pub index_text: Option<Vec<String>>,
21669    ///Property: Keywords
21670    #[serde(skip_serializing_if = "Option::is_none")]
21671    #[cfg_attr(
21672        feature = "builder",
21673        builder(with = |value:impl Into<String>|vec![value.into()])
21674    )]
21675    pub keywords: Option<Vec<String>>,
21676    ///Property: MMSI
21677    #[serde(skip_serializing_if = "Option::is_none")]
21678    #[cfg_attr(
21679        feature = "builder",
21680        builder(with = |value:impl Into<String>|vec![value.into()])
21681    )]
21682    pub mmsi: Option<Vec<String>>,
21683    ///Property: Model
21684    #[serde(skip_serializing_if = "Option::is_none")]
21685    #[cfg_attr(
21686        feature = "builder",
21687        builder(with = |value:impl Into<String>|vec![value.into()])
21688    )]
21689    pub model: Option<Vec<String>>,
21690    ///Property: Modified on
21691    #[serde(skip_serializing_if = "Option::is_none")]
21692    #[cfg_attr(
21693        feature = "builder",
21694        builder(with = |value:impl Into<String>|vec![value.into()])
21695    )]
21696    pub modified_at: Option<Vec<String>>,
21697    ///Property: Name
21698    #[serde(default)]
21699    #[cfg_attr(
21700        feature = "builder",
21701        builder(with = |value:impl Into<String>|vec![value.into()])
21702    )]
21703    pub name: Vec<String>,
21704    ///Property: Date of Name Change
21705    #[serde(skip_serializing_if = "Option::is_none")]
21706    #[cfg_attr(
21707        feature = "builder",
21708        builder(with = |value:impl Into<String>|vec![value.into()])
21709    )]
21710    pub name_change_date: Option<Vec<String>>,
21711    ///Property: Navigation Area
21712    #[serde(skip_serializing_if = "Option::is_none")]
21713    #[cfg_attr(
21714        feature = "builder",
21715        builder(with = |value:impl Into<String>|vec![value.into()])
21716    )]
21717    pub navigation_area: Option<Vec<String>>,
21718    ///Property: Notes
21719    #[serde(skip_serializing_if = "Option::is_none")]
21720    #[cfg_attr(
21721        feature = "builder",
21722        builder(with = |value:impl Into<String>|vec![value.into()])
21723    )]
21724    pub notes: Option<Vec<String>>,
21725    ///Property: Operator
21726    #[serde(skip_serializing_if = "Option::is_none")]
21727    #[cfg_attr(
21728        feature = "builder",
21729        builder(with = |value:impl Into<String>|vec![value.into()])
21730    )]
21731    pub operator: Option<Vec<String>>,
21732    ///Property: Owner
21733    #[serde(skip_serializing_if = "Option::is_none")]
21734    #[cfg_attr(
21735        feature = "builder",
21736        builder(with = |value:impl Into<String>|vec![value.into()])
21737    )]
21738    pub owner: Option<Vec<String>>,
21739    ///Property: Past Flags
21740    #[serde(skip_serializing_if = "Option::is_none")]
21741    #[cfg_attr(
21742        feature = "builder",
21743        builder(with = |value:impl Into<String>|vec![value.into()])
21744    )]
21745    pub past_flags: Option<Vec<String>>,
21746    ///Property: Past Types
21747    #[serde(skip_serializing_if = "Option::is_none")]
21748    #[cfg_attr(
21749        feature = "builder",
21750        builder(with = |value:impl Into<String>|vec![value.into()])
21751    )]
21752    pub past_types: Option<Vec<String>>,
21753    ///Property: Previous name
21754    #[serde(skip_serializing_if = "Option::is_none")]
21755    #[cfg_attr(
21756        feature = "builder",
21757        builder(with = |value:impl Into<String>|vec![value.into()])
21758    )]
21759    pub previous_name: Option<Vec<String>>,
21760    ///Property: Program
21761    #[serde(skip_serializing_if = "Option::is_none")]
21762    #[cfg_attr(
21763        feature = "builder",
21764        builder(with = |value:impl Into<String>|vec![value.into()])
21765    )]
21766    pub program: Option<Vec<String>>,
21767    ///Property: Program ID
21768    #[serde(skip_serializing_if = "Option::is_none")]
21769    #[cfg_attr(
21770        feature = "builder",
21771        builder(with = |value:impl Into<String>|vec![value.into()])
21772    )]
21773    pub program_id: Option<Vec<String>>,
21774    ///Property: Source document
21775    #[serde(skip_serializing_if = "Option::is_none")]
21776    #[cfg_attr(
21777        feature = "builder",
21778        builder(with = |value:impl Into<String>|vec![value.into()])
21779    )]
21780    pub proof: Option<Vec<String>>,
21781    ///Property: Publishing source
21782    #[serde(skip_serializing_if = "Option::is_none")]
21783    #[cfg_attr(
21784        feature = "builder",
21785        builder(with = |value:impl Into<String>|vec![value.into()])
21786    )]
21787    pub publisher: Option<Vec<String>>,
21788    ///Property: Publishing source URL
21789    #[serde(skip_serializing_if = "Option::is_none")]
21790    #[cfg_attr(
21791        feature = "builder",
21792        builder(with = |value:impl Into<String>|vec![value.into()])
21793    )]
21794    pub publisher_url: Option<Vec<String>>,
21795    ///Property: Registration Date
21796    #[serde(skip_serializing_if = "Option::is_none")]
21797    #[cfg_attr(
21798        feature = "builder",
21799        builder(with = |value:impl Into<String>|vec![value.into()])
21800    )]
21801    pub registration_date: Option<Vec<String>>,
21802    ///Property: Registration number
21803    #[serde(skip_serializing_if = "Option::is_none")]
21804    #[cfg_attr(
21805        feature = "builder",
21806        builder(with = |value:impl Into<String>|vec![value.into()])
21807    )]
21808    pub registration_number: Option<Vec<String>>,
21809    ///Property: Port of Registration
21810    #[serde(skip_serializing_if = "Option::is_none")]
21811    #[cfg_attr(
21812        feature = "builder",
21813        builder(with = |value:impl Into<String>|vec![value.into()])
21814    )]
21815    pub registration_port: Option<Vec<String>>,
21816    ///Property: Retrieved on
21817    #[serde(skip_serializing_if = "Option::is_none")]
21818    #[cfg_attr(
21819        feature = "builder",
21820        builder(with = |value:impl Into<String>|vec![value.into()])
21821    )]
21822    pub retrieved_at: Option<Vec<String>>,
21823    ///Property: Source link
21824    #[serde(skip_serializing_if = "Option::is_none")]
21825    #[cfg_attr(
21826        feature = "builder",
21827        builder(with = |value:impl Into<String>|vec![value.into()])
21828    )]
21829    pub source_url: Option<Vec<String>>,
21830    ///Property: Summary
21831    #[serde(skip_serializing_if = "Option::is_none")]
21832    #[cfg_attr(
21833        feature = "builder",
21834        builder(with = |value:impl Into<String>|vec![value.into()])
21835    )]
21836    pub summary: Option<Vec<String>>,
21837    ///Property: Tonnage
21838    #[serde(
21839        skip_serializing_if = "Option::is_none",
21840        deserialize_with = "deserialize_opt_f64_vec",
21841        default
21842    )]
21843    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21844    pub tonnage: Option<Vec<f64>>,
21845    ///Property: Topics
21846    #[serde(skip_serializing_if = "Option::is_none")]
21847    #[cfg_attr(
21848        feature = "builder",
21849        builder(with = |value:impl Into<String>|vec![value.into()])
21850    )]
21851    pub topics: Option<Vec<String>>,
21852    ///Property: Type
21853    #[serde(skip_serializing_if = "Option::is_none")]
21854    #[cfg_attr(
21855        feature = "builder",
21856        builder(with = |value:impl Into<String>|vec![value.into()])
21857    )]
21858    pub type_: Option<Vec<String>>,
21859    ///Property: Weak alias
21860    #[serde(skip_serializing_if = "Option::is_none")]
21861    #[cfg_attr(
21862        feature = "builder",
21863        builder(with = |value:impl Into<String>|vec![value.into()])
21864    )]
21865    pub weak_alias: Option<Vec<String>>,
21866    ///Property: Wikidata ID
21867    #[serde(skip_serializing_if = "Option::is_none")]
21868    #[cfg_attr(
21869        feature = "builder",
21870        builder(with = |value:impl Into<String>|vec![value.into()])
21871    )]
21872    pub wikidata_id: Option<Vec<String>>,
21873    ///Property: Wikipedia Article
21874    #[serde(skip_serializing_if = "Option::is_none")]
21875    #[cfg_attr(
21876        feature = "builder",
21877        builder(with = |value:impl Into<String>|vec![value.into()])
21878    )]
21879    pub wikipedia_url: Option<Vec<String>>,
21880}
21881impl Vessel {
21882    /// Create a new entity with the given ID
21883    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
21884    pub fn new(id: impl Into<String>) -> Self {
21885        Self {
21886            id: id.into(),
21887            schema: "Vessel".to_string(),
21888            address: None,
21889            address_entity: None,
21890            aleph_url: None,
21891            alias: None,
21892            amount: None,
21893            amount_eur: None,
21894            amount_usd: None,
21895            build_date: None,
21896            call_sign: None,
21897            country: None,
21898            created_at: None,
21899            crs_number: None,
21900            currency: None,
21901            deadweight_tonnage: None,
21902            deregistration_date: None,
21903            description: None,
21904            flag: None,
21905            gross_registered_tonnage: None,
21906            imo_number: None,
21907            index_text: None,
21908            keywords: None,
21909            mmsi: None,
21910            model: None,
21911            modified_at: None,
21912            name: Vec::new(),
21913            name_change_date: None,
21914            navigation_area: None,
21915            notes: None,
21916            operator: None,
21917            owner: None,
21918            past_flags: None,
21919            past_types: None,
21920            previous_name: None,
21921            program: None,
21922            program_id: None,
21923            proof: None,
21924            publisher: None,
21925            publisher_url: None,
21926            registration_date: None,
21927            registration_number: None,
21928            registration_port: None,
21929            retrieved_at: None,
21930            source_url: None,
21931            summary: None,
21932            tonnage: None,
21933            topics: None,
21934            type_: None,
21935            weak_alias: None,
21936            wikidata_id: None,
21937            wikipedia_url: None,
21938        }
21939    }
21940    /// Get the schema name
21941    pub fn schema_name() -> &'static str {
21942        "Vessel"
21943    }
21944    /// Serialize to standard FTM nested JSON format
21945    ///
21946    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
21947    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
21948        let mut value = serde_json::to_value(self)?;
21949        if let Some(obj) = value.as_object_mut() {
21950            let id = obj.remove("id");
21951            let schema = obj.remove("schema");
21952            let properties = serde_json::Value::Object(std::mem::take(obj));
21953            if let Some(id) = id {
21954                obj.insert("id".into(), id);
21955            }
21956            if let Some(schema) = schema {
21957                obj.insert("schema".into(), schema);
21958            }
21959            obj.insert("properties".into(), properties);
21960        }
21961        serde_json::to_string(&value)
21962    }
21963}
21964///FTM Schema: Video
21965#[derive(Debug, Clone, Serialize, Deserialize)]
21966#[cfg_attr(feature = "builder", derive(Builder))]
21967#[serde(rename_all = "camelCase")]
21968pub struct Video {
21969    pub id: String,
21970    #[cfg_attr(feature = "builder", builder(default = "Video".to_string()))]
21971    pub schema: String,
21972    ///Property: Address
21973    #[serde(skip_serializing_if = "Option::is_none")]
21974    #[cfg_attr(
21975        feature = "builder",
21976        builder(with = |value:impl Into<String>|vec![value.into()])
21977    )]
21978    pub address: Option<Vec<String>>,
21979    ///Property: Address
21980    #[serde(skip_serializing_if = "Option::is_none")]
21981    #[cfg_attr(
21982        feature = "builder",
21983        builder(with = |value:impl Into<String>|vec![value.into()])
21984    )]
21985    pub address_entity: Option<Vec<String>>,
21986    ///Property: Aleph URL
21987    #[serde(skip_serializing_if = "Option::is_none")]
21988    #[cfg_attr(
21989        feature = "builder",
21990        builder(with = |value:impl Into<String>|vec![value.into()])
21991    )]
21992    pub aleph_url: Option<Vec<String>>,
21993    ///Property: Alias
21994    #[serde(skip_serializing_if = "Option::is_none")]
21995    #[cfg_attr(
21996        feature = "builder",
21997        builder(with = |value:impl Into<String>|vec![value.into()])
21998    )]
21999    pub alias: Option<Vec<String>>,
22000    ///Property: Ancestors
22001    #[serde(skip_serializing_if = "Option::is_none")]
22002    #[cfg_attr(
22003        feature = "builder",
22004        builder(with = |value:impl Into<String>|vec![value.into()])
22005    )]
22006    pub ancestors: Option<Vec<String>>,
22007    ///Property: Author
22008    #[serde(skip_serializing_if = "Option::is_none")]
22009    #[cfg_attr(
22010        feature = "builder",
22011        builder(with = |value:impl Into<String>|vec![value.into()])
22012    )]
22013    pub author: Option<Vec<String>>,
22014    ///Property: Authored on
22015    #[serde(skip_serializing_if = "Option::is_none")]
22016    #[cfg_attr(
22017        feature = "builder",
22018        builder(with = |value:impl Into<String>|vec![value.into()])
22019    )]
22020    pub authored_at: Option<Vec<String>>,
22021    ///Property: Text
22022    #[serde(skip_serializing_if = "Option::is_none")]
22023    #[cfg_attr(
22024        feature = "builder",
22025        builder(with = |value:impl Into<String>|vec![value.into()])
22026    )]
22027    pub body_text: Option<Vec<String>>,
22028    ///Property: Detected companies
22029    #[serde(skip_serializing_if = "Option::is_none")]
22030    #[cfg_attr(
22031        feature = "builder",
22032        builder(with = |value:impl Into<String>|vec![value.into()])
22033    )]
22034    pub companies_mentioned: Option<Vec<String>>,
22035    ///Property: Checksum
22036    #[serde(skip_serializing_if = "Option::is_none")]
22037    #[cfg_attr(
22038        feature = "builder",
22039        builder(with = |value:impl Into<String>|vec![value.into()])
22040    )]
22041    pub content_hash: Option<Vec<String>>,
22042    ///Property: Country
22043    #[serde(skip_serializing_if = "Option::is_none")]
22044    #[cfg_attr(
22045        feature = "builder",
22046        builder(with = |value:impl Into<String>|vec![value.into()])
22047    )]
22048    pub country: Option<Vec<String>>,
22049    ///Property: Crawler
22050    #[serde(skip_serializing_if = "Option::is_none")]
22051    #[cfg_attr(
22052        feature = "builder",
22053        builder(with = |value:impl Into<String>|vec![value.into()])
22054    )]
22055    pub crawler: Option<Vec<String>>,
22056    ///Property: Created at
22057    #[serde(skip_serializing_if = "Option::is_none")]
22058    #[cfg_attr(
22059        feature = "builder",
22060        builder(with = |value:impl Into<String>|vec![value.into()])
22061    )]
22062    pub created_at: Option<Vec<String>>,
22063    ///Property: Date
22064    #[serde(skip_serializing_if = "Option::is_none")]
22065    #[cfg_attr(
22066        feature = "builder",
22067        builder(with = |value:impl Into<String>|vec![value.into()])
22068    )]
22069    pub date: Option<Vec<String>>,
22070    ///Property: Description
22071    #[serde(skip_serializing_if = "Option::is_none")]
22072    #[cfg_attr(
22073        feature = "builder",
22074        builder(with = |value:impl Into<String>|vec![value.into()])
22075    )]
22076    pub description: Option<Vec<String>>,
22077    ///Property: Detected country
22078    #[serde(skip_serializing_if = "Option::is_none")]
22079    #[cfg_attr(
22080        feature = "builder",
22081        builder(with = |value:impl Into<String>|vec![value.into()])
22082    )]
22083    pub detected_country: Option<Vec<String>>,
22084    ///Property: Detected language
22085    #[serde(skip_serializing_if = "Option::is_none")]
22086    #[cfg_attr(
22087        feature = "builder",
22088        builder(with = |value:impl Into<String>|vec![value.into()])
22089    )]
22090    pub detected_language: Option<Vec<String>>,
22091    ///Property: Duration
22092    #[serde(
22093        skip_serializing_if = "Option::is_none",
22094        deserialize_with = "deserialize_opt_f64_vec",
22095        default
22096    )]
22097    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
22098    pub duration: Option<Vec<f64>>,
22099    ///Property: Detected e-mail addresses
22100    #[serde(skip_serializing_if = "Option::is_none")]
22101    #[cfg_attr(
22102        feature = "builder",
22103        builder(with = |value:impl Into<String>|vec![value.into()])
22104    )]
22105    pub email_mentioned: Option<Vec<String>>,
22106    ///Property: File encoding
22107    #[serde(skip_serializing_if = "Option::is_none")]
22108    #[cfg_attr(
22109        feature = "builder",
22110        builder(with = |value:impl Into<String>|vec![value.into()])
22111    )]
22112    pub encoding: Option<Vec<String>>,
22113    ///Property: File extension
22114    #[serde(skip_serializing_if = "Option::is_none")]
22115    #[cfg_attr(
22116        feature = "builder",
22117        builder(with = |value:impl Into<String>|vec![value.into()])
22118    )]
22119    pub extension: Option<Vec<String>>,
22120    ///Property: File name
22121    #[serde(default)]
22122    #[cfg_attr(
22123        feature = "builder",
22124        builder(with = |value:impl Into<String>|vec![value.into()])
22125    )]
22126    pub file_name: Vec<String>,
22127    ///Property: File size
22128    #[serde(
22129        skip_serializing_if = "Option::is_none",
22130        deserialize_with = "deserialize_opt_f64_vec",
22131        default
22132    )]
22133    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
22134    pub file_size: Option<Vec<f64>>,
22135    ///Property: Generator
22136    #[serde(skip_serializing_if = "Option::is_none")]
22137    #[cfg_attr(
22138        feature = "builder",
22139        builder(with = |value:impl Into<String>|vec![value.into()])
22140    )]
22141    pub generator: Option<Vec<String>>,
22142    ///Property: Detected IBANs
22143    #[serde(skip_serializing_if = "Option::is_none")]
22144    #[cfg_attr(
22145        feature = "builder",
22146        builder(with = |value:impl Into<String>|vec![value.into()])
22147    )]
22148    pub iban_mentioned: Option<Vec<String>>,
22149    ///Property: Index text
22150    #[serde(skip_serializing_if = "Option::is_none")]
22151    #[cfg_attr(
22152        feature = "builder",
22153        builder(with = |value:impl Into<String>|vec![value.into()])
22154    )]
22155    pub index_text: Option<Vec<String>>,
22156    ///Property: Detected IP addresses
22157    #[serde(skip_serializing_if = "Option::is_none")]
22158    #[cfg_attr(
22159        feature = "builder",
22160        builder(with = |value:impl Into<String>|vec![value.into()])
22161    )]
22162    pub ip_mentioned: Option<Vec<String>>,
22163    ///Property: Keywords
22164    #[serde(skip_serializing_if = "Option::is_none")]
22165    #[cfg_attr(
22166        feature = "builder",
22167        builder(with = |value:impl Into<String>|vec![value.into()])
22168    )]
22169    pub keywords: Option<Vec<String>>,
22170    ///Property: Language
22171    #[serde(skip_serializing_if = "Option::is_none")]
22172    #[cfg_attr(
22173        feature = "builder",
22174        builder(with = |value:impl Into<String>|vec![value.into()])
22175    )]
22176    pub language: Option<Vec<String>>,
22177    ///Property: Detected locations
22178    #[serde(skip_serializing_if = "Option::is_none")]
22179    #[cfg_attr(
22180        feature = "builder",
22181        builder(with = |value:impl Into<String>|vec![value.into()])
22182    )]
22183    pub location_mentioned: Option<Vec<String>>,
22184    ///Property: Message ID
22185    #[serde(skip_serializing_if = "Option::is_none")]
22186    #[cfg_attr(
22187        feature = "builder",
22188        builder(with = |value:impl Into<String>|vec![value.into()])
22189    )]
22190    pub message_id: Option<Vec<String>>,
22191    ///Property: MIME type
22192    #[serde(skip_serializing_if = "Option::is_none")]
22193    #[cfg_attr(
22194        feature = "builder",
22195        builder(with = |value:impl Into<String>|vec![value.into()])
22196    )]
22197    pub mime_type: Option<Vec<String>>,
22198    ///Property: Modified on
22199    #[serde(skip_serializing_if = "Option::is_none")]
22200    #[cfg_attr(
22201        feature = "builder",
22202        builder(with = |value:impl Into<String>|vec![value.into()])
22203    )]
22204    pub modified_at: Option<Vec<String>>,
22205    ///Property: Name
22206    #[serde(default)]
22207    #[cfg_attr(
22208        feature = "builder",
22209        builder(with = |value:impl Into<String>|vec![value.into()])
22210    )]
22211    pub name: Vec<String>,
22212    ///Property: Detected names
22213    #[serde(skip_serializing_if = "Option::is_none")]
22214    #[cfg_attr(
22215        feature = "builder",
22216        builder(with = |value:impl Into<String>|vec![value.into()])
22217    )]
22218    pub names_mentioned: Option<Vec<String>>,
22219    ///Property: Notes
22220    #[serde(skip_serializing_if = "Option::is_none")]
22221    #[cfg_attr(
22222        feature = "builder",
22223        builder(with = |value:impl Into<String>|vec![value.into()])
22224    )]
22225    pub notes: Option<Vec<String>>,
22226    ///Property: Folder
22227    #[serde(skip_serializing_if = "Option::is_none")]
22228    #[cfg_attr(
22229        feature = "builder",
22230        builder(with = |value:impl Into<String>|vec![value.into()])
22231    )]
22232    pub parent: Option<Vec<String>>,
22233    ///Property: Detected people
22234    #[serde(skip_serializing_if = "Option::is_none")]
22235    #[cfg_attr(
22236        feature = "builder",
22237        builder(with = |value:impl Into<String>|vec![value.into()])
22238    )]
22239    pub people_mentioned: Option<Vec<String>>,
22240    ///Property: Detected phones
22241    #[serde(skip_serializing_if = "Option::is_none")]
22242    #[cfg_attr(
22243        feature = "builder",
22244        builder(with = |value:impl Into<String>|vec![value.into()])
22245    )]
22246    pub phone_mentioned: Option<Vec<String>>,
22247    ///Property: Previous name
22248    #[serde(skip_serializing_if = "Option::is_none")]
22249    #[cfg_attr(
22250        feature = "builder",
22251        builder(with = |value:impl Into<String>|vec![value.into()])
22252    )]
22253    pub previous_name: Option<Vec<String>>,
22254    ///Property: Processed at
22255    #[serde(skip_serializing_if = "Option::is_none")]
22256    #[cfg_attr(
22257        feature = "builder",
22258        builder(with = |value:impl Into<String>|vec![value.into()])
22259    )]
22260    pub processed_at: Option<Vec<String>>,
22261    ///Property: Processing agent
22262    #[serde(skip_serializing_if = "Option::is_none")]
22263    #[cfg_attr(
22264        feature = "builder",
22265        builder(with = |value:impl Into<String>|vec![value.into()])
22266    )]
22267    pub processing_agent: Option<Vec<String>>,
22268    ///Property: Processing error
22269    #[serde(skip_serializing_if = "Option::is_none")]
22270    #[cfg_attr(
22271        feature = "builder",
22272        builder(with = |value:impl Into<String>|vec![value.into()])
22273    )]
22274    pub processing_error: Option<Vec<String>>,
22275    ///Property: Processing status
22276    #[serde(skip_serializing_if = "Option::is_none")]
22277    #[cfg_attr(
22278        feature = "builder",
22279        builder(with = |value:impl Into<String>|vec![value.into()])
22280    )]
22281    pub processing_status: Option<Vec<String>>,
22282    ///Property: Program
22283    #[serde(skip_serializing_if = "Option::is_none")]
22284    #[cfg_attr(
22285        feature = "builder",
22286        builder(with = |value:impl Into<String>|vec![value.into()])
22287    )]
22288    pub program: Option<Vec<String>>,
22289    ///Property: Program ID
22290    #[serde(skip_serializing_if = "Option::is_none")]
22291    #[cfg_attr(
22292        feature = "builder",
22293        builder(with = |value:impl Into<String>|vec![value.into()])
22294    )]
22295    pub program_id: Option<Vec<String>>,
22296    ///Property: Source document
22297    #[serde(skip_serializing_if = "Option::is_none")]
22298    #[cfg_attr(
22299        feature = "builder",
22300        builder(with = |value:impl Into<String>|vec![value.into()])
22301    )]
22302    pub proof: Option<Vec<String>>,
22303    ///Property: Published on
22304    #[serde(skip_serializing_if = "Option::is_none")]
22305    #[cfg_attr(
22306        feature = "builder",
22307        builder(with = |value:impl Into<String>|vec![value.into()])
22308    )]
22309    pub published_at: Option<Vec<String>>,
22310    ///Property: Publishing source
22311    #[serde(skip_serializing_if = "Option::is_none")]
22312    #[cfg_attr(
22313        feature = "builder",
22314        builder(with = |value:impl Into<String>|vec![value.into()])
22315    )]
22316    pub publisher: Option<Vec<String>>,
22317    ///Property: Publishing source URL
22318    #[serde(skip_serializing_if = "Option::is_none")]
22319    #[cfg_attr(
22320        feature = "builder",
22321        builder(with = |value:impl Into<String>|vec![value.into()])
22322    )]
22323    pub publisher_url: Option<Vec<String>>,
22324    ///Property: Retrieved on
22325    #[serde(skip_serializing_if = "Option::is_none")]
22326    #[cfg_attr(
22327        feature = "builder",
22328        builder(with = |value:impl Into<String>|vec![value.into()])
22329    )]
22330    pub retrieved_at: Option<Vec<String>>,
22331    ///Property: Source link
22332    #[serde(skip_serializing_if = "Option::is_none")]
22333    #[cfg_attr(
22334        feature = "builder",
22335        builder(with = |value:impl Into<String>|vec![value.into()])
22336    )]
22337    pub source_url: Option<Vec<String>>,
22338    ///Property: Summary
22339    #[serde(skip_serializing_if = "Option::is_none")]
22340    #[cfg_attr(
22341        feature = "builder",
22342        builder(with = |value:impl Into<String>|vec![value.into()])
22343    )]
22344    pub summary: Option<Vec<String>>,
22345    ///Property: Title
22346    #[serde(skip_serializing_if = "Option::is_none")]
22347    #[cfg_attr(
22348        feature = "builder",
22349        builder(with = |value:impl Into<String>|vec![value.into()])
22350    )]
22351    pub title: Option<Vec<String>>,
22352    ///Property: Topics
22353    #[serde(skip_serializing_if = "Option::is_none")]
22354    #[cfg_attr(
22355        feature = "builder",
22356        builder(with = |value:impl Into<String>|vec![value.into()])
22357    )]
22358    pub topics: Option<Vec<String>>,
22359    ///Property: The language of the translated text
22360    #[serde(skip_serializing_if = "Option::is_none")]
22361    #[cfg_attr(
22362        feature = "builder",
22363        builder(with = |value:impl Into<String>|vec![value.into()])
22364    )]
22365    pub translated_language: Option<Vec<String>>,
22366    ///Property: Translated version of the body text
22367    #[serde(skip_serializing_if = "Option::is_none")]
22368    #[cfg_attr(
22369        feature = "builder",
22370        builder(with = |value:impl Into<String>|vec![value.into()])
22371    )]
22372    pub translated_text: Option<Vec<String>>,
22373    ///Property: Weak alias
22374    #[serde(skip_serializing_if = "Option::is_none")]
22375    #[cfg_attr(
22376        feature = "builder",
22377        builder(with = |value:impl Into<String>|vec![value.into()])
22378    )]
22379    pub weak_alias: Option<Vec<String>>,
22380    ///Property: Wikidata ID
22381    #[serde(skip_serializing_if = "Option::is_none")]
22382    #[cfg_attr(
22383        feature = "builder",
22384        builder(with = |value:impl Into<String>|vec![value.into()])
22385    )]
22386    pub wikidata_id: Option<Vec<String>>,
22387    ///Property: Wikipedia Article
22388    #[serde(skip_serializing_if = "Option::is_none")]
22389    #[cfg_attr(
22390        feature = "builder",
22391        builder(with = |value:impl Into<String>|vec![value.into()])
22392    )]
22393    pub wikipedia_url: Option<Vec<String>>,
22394}
22395impl Video {
22396    /// Create a new entity with the given ID
22397    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
22398    pub fn new(id: impl Into<String>) -> Self {
22399        Self {
22400            id: id.into(),
22401            schema: "Video".to_string(),
22402            address: None,
22403            address_entity: None,
22404            aleph_url: None,
22405            alias: None,
22406            ancestors: None,
22407            author: None,
22408            authored_at: None,
22409            body_text: None,
22410            companies_mentioned: None,
22411            content_hash: None,
22412            country: None,
22413            crawler: None,
22414            created_at: None,
22415            date: None,
22416            description: None,
22417            detected_country: None,
22418            detected_language: None,
22419            duration: None,
22420            email_mentioned: None,
22421            encoding: None,
22422            extension: None,
22423            file_name: Vec::new(),
22424            file_size: None,
22425            generator: None,
22426            iban_mentioned: None,
22427            index_text: None,
22428            ip_mentioned: None,
22429            keywords: None,
22430            language: None,
22431            location_mentioned: None,
22432            message_id: None,
22433            mime_type: None,
22434            modified_at: None,
22435            name: Vec::new(),
22436            names_mentioned: None,
22437            notes: None,
22438            parent: None,
22439            people_mentioned: None,
22440            phone_mentioned: None,
22441            previous_name: None,
22442            processed_at: None,
22443            processing_agent: None,
22444            processing_error: None,
22445            processing_status: None,
22446            program: None,
22447            program_id: None,
22448            proof: None,
22449            published_at: None,
22450            publisher: None,
22451            publisher_url: None,
22452            retrieved_at: None,
22453            source_url: None,
22454            summary: None,
22455            title: None,
22456            topics: None,
22457            translated_language: None,
22458            translated_text: None,
22459            weak_alias: None,
22460            wikidata_id: None,
22461            wikipedia_url: None,
22462        }
22463    }
22464    /// Get the schema name
22465    pub fn schema_name() -> &'static str {
22466        "Video"
22467    }
22468    /// Serialize to standard FTM nested JSON format
22469    ///
22470    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
22471    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
22472        let mut value = serde_json::to_value(self)?;
22473        if let Some(obj) = value.as_object_mut() {
22474            let id = obj.remove("id");
22475            let schema = obj.remove("schema");
22476            let properties = serde_json::Value::Object(std::mem::take(obj));
22477            if let Some(id) = id {
22478                obj.insert("id".into(), id);
22479            }
22480            if let Some(schema) = schema {
22481                obj.insert("schema".into(), schema);
22482            }
22483            obj.insert("properties".into(), properties);
22484        }
22485        serde_json::to_string(&value)
22486    }
22487}
22488///FTM Schema: Workbook
22489#[derive(Debug, Clone, Serialize, Deserialize)]
22490#[cfg_attr(feature = "builder", derive(Builder))]
22491#[serde(rename_all = "camelCase")]
22492pub struct Workbook {
22493    pub id: String,
22494    #[cfg_attr(feature = "builder", builder(default = "Workbook".to_string()))]
22495    pub schema: String,
22496    ///Property: Address
22497    #[serde(skip_serializing_if = "Option::is_none")]
22498    #[cfg_attr(
22499        feature = "builder",
22500        builder(with = |value:impl Into<String>|vec![value.into()])
22501    )]
22502    pub address: Option<Vec<String>>,
22503    ///Property: Address
22504    #[serde(skip_serializing_if = "Option::is_none")]
22505    #[cfg_attr(
22506        feature = "builder",
22507        builder(with = |value:impl Into<String>|vec![value.into()])
22508    )]
22509    pub address_entity: Option<Vec<String>>,
22510    ///Property: Aleph URL
22511    #[serde(skip_serializing_if = "Option::is_none")]
22512    #[cfg_attr(
22513        feature = "builder",
22514        builder(with = |value:impl Into<String>|vec![value.into()])
22515    )]
22516    pub aleph_url: Option<Vec<String>>,
22517    ///Property: Alias
22518    #[serde(skip_serializing_if = "Option::is_none")]
22519    #[cfg_attr(
22520        feature = "builder",
22521        builder(with = |value:impl Into<String>|vec![value.into()])
22522    )]
22523    pub alias: Option<Vec<String>>,
22524    ///Property: Ancestors
22525    #[serde(skip_serializing_if = "Option::is_none")]
22526    #[cfg_attr(
22527        feature = "builder",
22528        builder(with = |value:impl Into<String>|vec![value.into()])
22529    )]
22530    pub ancestors: Option<Vec<String>>,
22531    ///Property: Author
22532    #[serde(skip_serializing_if = "Option::is_none")]
22533    #[cfg_attr(
22534        feature = "builder",
22535        builder(with = |value:impl Into<String>|vec![value.into()])
22536    )]
22537    pub author: Option<Vec<String>>,
22538    ///Property: Authored on
22539    #[serde(skip_serializing_if = "Option::is_none")]
22540    #[cfg_attr(
22541        feature = "builder",
22542        builder(with = |value:impl Into<String>|vec![value.into()])
22543    )]
22544    pub authored_at: Option<Vec<String>>,
22545    ///Property: Text
22546    #[serde(skip_serializing_if = "Option::is_none")]
22547    #[cfg_attr(
22548        feature = "builder",
22549        builder(with = |value:impl Into<String>|vec![value.into()])
22550    )]
22551    pub body_text: Option<Vec<String>>,
22552    ///Property: Detected companies
22553    #[serde(skip_serializing_if = "Option::is_none")]
22554    #[cfg_attr(
22555        feature = "builder",
22556        builder(with = |value:impl Into<String>|vec![value.into()])
22557    )]
22558    pub companies_mentioned: Option<Vec<String>>,
22559    ///Property: Checksum
22560    #[serde(skip_serializing_if = "Option::is_none")]
22561    #[cfg_attr(
22562        feature = "builder",
22563        builder(with = |value:impl Into<String>|vec![value.into()])
22564    )]
22565    pub content_hash: Option<Vec<String>>,
22566    ///Property: Country
22567    #[serde(skip_serializing_if = "Option::is_none")]
22568    #[cfg_attr(
22569        feature = "builder",
22570        builder(with = |value:impl Into<String>|vec![value.into()])
22571    )]
22572    pub country: Option<Vec<String>>,
22573    ///Property: Crawler
22574    #[serde(skip_serializing_if = "Option::is_none")]
22575    #[cfg_attr(
22576        feature = "builder",
22577        builder(with = |value:impl Into<String>|vec![value.into()])
22578    )]
22579    pub crawler: Option<Vec<String>>,
22580    ///Property: Created at
22581    #[serde(skip_serializing_if = "Option::is_none")]
22582    #[cfg_attr(
22583        feature = "builder",
22584        builder(with = |value:impl Into<String>|vec![value.into()])
22585    )]
22586    pub created_at: Option<Vec<String>>,
22587    ///Property: Date
22588    #[serde(skip_serializing_if = "Option::is_none")]
22589    #[cfg_attr(
22590        feature = "builder",
22591        builder(with = |value:impl Into<String>|vec![value.into()])
22592    )]
22593    pub date: Option<Vec<String>>,
22594    ///Property: Description
22595    #[serde(skip_serializing_if = "Option::is_none")]
22596    #[cfg_attr(
22597        feature = "builder",
22598        builder(with = |value:impl Into<String>|vec![value.into()])
22599    )]
22600    pub description: Option<Vec<String>>,
22601    ///Property: Detected country
22602    #[serde(skip_serializing_if = "Option::is_none")]
22603    #[cfg_attr(
22604        feature = "builder",
22605        builder(with = |value:impl Into<String>|vec![value.into()])
22606    )]
22607    pub detected_country: Option<Vec<String>>,
22608    ///Property: Detected language
22609    #[serde(skip_serializing_if = "Option::is_none")]
22610    #[cfg_attr(
22611        feature = "builder",
22612        builder(with = |value:impl Into<String>|vec![value.into()])
22613    )]
22614    pub detected_language: Option<Vec<String>>,
22615    ///Property: Detected e-mail addresses
22616    #[serde(skip_serializing_if = "Option::is_none")]
22617    #[cfg_attr(
22618        feature = "builder",
22619        builder(with = |value:impl Into<String>|vec![value.into()])
22620    )]
22621    pub email_mentioned: Option<Vec<String>>,
22622    ///Property: File encoding
22623    #[serde(skip_serializing_if = "Option::is_none")]
22624    #[cfg_attr(
22625        feature = "builder",
22626        builder(with = |value:impl Into<String>|vec![value.into()])
22627    )]
22628    pub encoding: Option<Vec<String>>,
22629    ///Property: File extension
22630    #[serde(skip_serializing_if = "Option::is_none")]
22631    #[cfg_attr(
22632        feature = "builder",
22633        builder(with = |value:impl Into<String>|vec![value.into()])
22634    )]
22635    pub extension: Option<Vec<String>>,
22636    ///Property: File name
22637    #[serde(default)]
22638    #[cfg_attr(
22639        feature = "builder",
22640        builder(with = |value:impl Into<String>|vec![value.into()])
22641    )]
22642    pub file_name: Vec<String>,
22643    ///Property: File size
22644    #[serde(
22645        skip_serializing_if = "Option::is_none",
22646        deserialize_with = "deserialize_opt_f64_vec",
22647        default
22648    )]
22649    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
22650    pub file_size: Option<Vec<f64>>,
22651    ///Property: Generator
22652    #[serde(skip_serializing_if = "Option::is_none")]
22653    #[cfg_attr(
22654        feature = "builder",
22655        builder(with = |value:impl Into<String>|vec![value.into()])
22656    )]
22657    pub generator: Option<Vec<String>>,
22658    ///Property: Detected IBANs
22659    #[serde(skip_serializing_if = "Option::is_none")]
22660    #[cfg_attr(
22661        feature = "builder",
22662        builder(with = |value:impl Into<String>|vec![value.into()])
22663    )]
22664    pub iban_mentioned: Option<Vec<String>>,
22665    ///Property: Index text
22666    #[serde(skip_serializing_if = "Option::is_none")]
22667    #[cfg_attr(
22668        feature = "builder",
22669        builder(with = |value:impl Into<String>|vec![value.into()])
22670    )]
22671    pub index_text: Option<Vec<String>>,
22672    ///Property: Detected IP addresses
22673    #[serde(skip_serializing_if = "Option::is_none")]
22674    #[cfg_attr(
22675        feature = "builder",
22676        builder(with = |value:impl Into<String>|vec![value.into()])
22677    )]
22678    pub ip_mentioned: Option<Vec<String>>,
22679    ///Property: Keywords
22680    #[serde(skip_serializing_if = "Option::is_none")]
22681    #[cfg_attr(
22682        feature = "builder",
22683        builder(with = |value:impl Into<String>|vec![value.into()])
22684    )]
22685    pub keywords: Option<Vec<String>>,
22686    ///Property: Language
22687    #[serde(skip_serializing_if = "Option::is_none")]
22688    #[cfg_attr(
22689        feature = "builder",
22690        builder(with = |value:impl Into<String>|vec![value.into()])
22691    )]
22692    pub language: Option<Vec<String>>,
22693    ///Property: Detected locations
22694    #[serde(skip_serializing_if = "Option::is_none")]
22695    #[cfg_attr(
22696        feature = "builder",
22697        builder(with = |value:impl Into<String>|vec![value.into()])
22698    )]
22699    pub location_mentioned: Option<Vec<String>>,
22700    ///Property: Message ID
22701    #[serde(skip_serializing_if = "Option::is_none")]
22702    #[cfg_attr(
22703        feature = "builder",
22704        builder(with = |value:impl Into<String>|vec![value.into()])
22705    )]
22706    pub message_id: Option<Vec<String>>,
22707    ///Property: MIME type
22708    #[serde(skip_serializing_if = "Option::is_none")]
22709    #[cfg_attr(
22710        feature = "builder",
22711        builder(with = |value:impl Into<String>|vec![value.into()])
22712    )]
22713    pub mime_type: Option<Vec<String>>,
22714    ///Property: Modified on
22715    #[serde(skip_serializing_if = "Option::is_none")]
22716    #[cfg_attr(
22717        feature = "builder",
22718        builder(with = |value:impl Into<String>|vec![value.into()])
22719    )]
22720    pub modified_at: Option<Vec<String>>,
22721    ///Property: Name
22722    #[serde(default)]
22723    #[cfg_attr(
22724        feature = "builder",
22725        builder(with = |value:impl Into<String>|vec![value.into()])
22726    )]
22727    pub name: Vec<String>,
22728    ///Property: Detected names
22729    #[serde(skip_serializing_if = "Option::is_none")]
22730    #[cfg_attr(
22731        feature = "builder",
22732        builder(with = |value:impl Into<String>|vec![value.into()])
22733    )]
22734    pub names_mentioned: Option<Vec<String>>,
22735    ///Property: Notes
22736    #[serde(skip_serializing_if = "Option::is_none")]
22737    #[cfg_attr(
22738        feature = "builder",
22739        builder(with = |value:impl Into<String>|vec![value.into()])
22740    )]
22741    pub notes: Option<Vec<String>>,
22742    ///Property: Folder
22743    #[serde(skip_serializing_if = "Option::is_none")]
22744    #[cfg_attr(
22745        feature = "builder",
22746        builder(with = |value:impl Into<String>|vec![value.into()])
22747    )]
22748    pub parent: Option<Vec<String>>,
22749    ///Property: Detected people
22750    #[serde(skip_serializing_if = "Option::is_none")]
22751    #[cfg_attr(
22752        feature = "builder",
22753        builder(with = |value:impl Into<String>|vec![value.into()])
22754    )]
22755    pub people_mentioned: Option<Vec<String>>,
22756    ///Property: Detected phones
22757    #[serde(skip_serializing_if = "Option::is_none")]
22758    #[cfg_attr(
22759        feature = "builder",
22760        builder(with = |value:impl Into<String>|vec![value.into()])
22761    )]
22762    pub phone_mentioned: Option<Vec<String>>,
22763    ///Property: Previous name
22764    #[serde(skip_serializing_if = "Option::is_none")]
22765    #[cfg_attr(
22766        feature = "builder",
22767        builder(with = |value:impl Into<String>|vec![value.into()])
22768    )]
22769    pub previous_name: Option<Vec<String>>,
22770    ///Property: Processed at
22771    #[serde(skip_serializing_if = "Option::is_none")]
22772    #[cfg_attr(
22773        feature = "builder",
22774        builder(with = |value:impl Into<String>|vec![value.into()])
22775    )]
22776    pub processed_at: Option<Vec<String>>,
22777    ///Property: Processing agent
22778    #[serde(skip_serializing_if = "Option::is_none")]
22779    #[cfg_attr(
22780        feature = "builder",
22781        builder(with = |value:impl Into<String>|vec![value.into()])
22782    )]
22783    pub processing_agent: Option<Vec<String>>,
22784    ///Property: Processing error
22785    #[serde(skip_serializing_if = "Option::is_none")]
22786    #[cfg_attr(
22787        feature = "builder",
22788        builder(with = |value:impl Into<String>|vec![value.into()])
22789    )]
22790    pub processing_error: Option<Vec<String>>,
22791    ///Property: Processing status
22792    #[serde(skip_serializing_if = "Option::is_none")]
22793    #[cfg_attr(
22794        feature = "builder",
22795        builder(with = |value:impl Into<String>|vec![value.into()])
22796    )]
22797    pub processing_status: Option<Vec<String>>,
22798    ///Property: Program
22799    #[serde(skip_serializing_if = "Option::is_none")]
22800    #[cfg_attr(
22801        feature = "builder",
22802        builder(with = |value:impl Into<String>|vec![value.into()])
22803    )]
22804    pub program: Option<Vec<String>>,
22805    ///Property: Program ID
22806    #[serde(skip_serializing_if = "Option::is_none")]
22807    #[cfg_attr(
22808        feature = "builder",
22809        builder(with = |value:impl Into<String>|vec![value.into()])
22810    )]
22811    pub program_id: Option<Vec<String>>,
22812    ///Property: Source document
22813    #[serde(skip_serializing_if = "Option::is_none")]
22814    #[cfg_attr(
22815        feature = "builder",
22816        builder(with = |value:impl Into<String>|vec![value.into()])
22817    )]
22818    pub proof: Option<Vec<String>>,
22819    ///Property: Published on
22820    #[serde(skip_serializing_if = "Option::is_none")]
22821    #[cfg_attr(
22822        feature = "builder",
22823        builder(with = |value:impl Into<String>|vec![value.into()])
22824    )]
22825    pub published_at: Option<Vec<String>>,
22826    ///Property: Publishing source
22827    #[serde(skip_serializing_if = "Option::is_none")]
22828    #[cfg_attr(
22829        feature = "builder",
22830        builder(with = |value:impl Into<String>|vec![value.into()])
22831    )]
22832    pub publisher: Option<Vec<String>>,
22833    ///Property: Publishing source URL
22834    #[serde(skip_serializing_if = "Option::is_none")]
22835    #[cfg_attr(
22836        feature = "builder",
22837        builder(with = |value:impl Into<String>|vec![value.into()])
22838    )]
22839    pub publisher_url: Option<Vec<String>>,
22840    ///Property: Retrieved on
22841    #[serde(skip_serializing_if = "Option::is_none")]
22842    #[cfg_attr(
22843        feature = "builder",
22844        builder(with = |value:impl Into<String>|vec![value.into()])
22845    )]
22846    pub retrieved_at: Option<Vec<String>>,
22847    ///Property: Source link
22848    #[serde(skip_serializing_if = "Option::is_none")]
22849    #[cfg_attr(
22850        feature = "builder",
22851        builder(with = |value:impl Into<String>|vec![value.into()])
22852    )]
22853    pub source_url: Option<Vec<String>>,
22854    ///Property: Summary
22855    #[serde(skip_serializing_if = "Option::is_none")]
22856    #[cfg_attr(
22857        feature = "builder",
22858        builder(with = |value:impl Into<String>|vec![value.into()])
22859    )]
22860    pub summary: Option<Vec<String>>,
22861    ///Property: Title
22862    #[serde(skip_serializing_if = "Option::is_none")]
22863    #[cfg_attr(
22864        feature = "builder",
22865        builder(with = |value:impl Into<String>|vec![value.into()])
22866    )]
22867    pub title: Option<Vec<String>>,
22868    ///Property: Topics
22869    #[serde(skip_serializing_if = "Option::is_none")]
22870    #[cfg_attr(
22871        feature = "builder",
22872        builder(with = |value:impl Into<String>|vec![value.into()])
22873    )]
22874    pub topics: Option<Vec<String>>,
22875    ///Property: The language of the translated text
22876    #[serde(skip_serializing_if = "Option::is_none")]
22877    #[cfg_attr(
22878        feature = "builder",
22879        builder(with = |value:impl Into<String>|vec![value.into()])
22880    )]
22881    pub translated_language: Option<Vec<String>>,
22882    ///Property: Translated version of the body text
22883    #[serde(skip_serializing_if = "Option::is_none")]
22884    #[cfg_attr(
22885        feature = "builder",
22886        builder(with = |value:impl Into<String>|vec![value.into()])
22887    )]
22888    pub translated_text: Option<Vec<String>>,
22889    ///Property: Weak alias
22890    #[serde(skip_serializing_if = "Option::is_none")]
22891    #[cfg_attr(
22892        feature = "builder",
22893        builder(with = |value:impl Into<String>|vec![value.into()])
22894    )]
22895    pub weak_alias: Option<Vec<String>>,
22896    ///Property: Wikidata ID
22897    #[serde(skip_serializing_if = "Option::is_none")]
22898    #[cfg_attr(
22899        feature = "builder",
22900        builder(with = |value:impl Into<String>|vec![value.into()])
22901    )]
22902    pub wikidata_id: Option<Vec<String>>,
22903    ///Property: Wikipedia Article
22904    #[serde(skip_serializing_if = "Option::is_none")]
22905    #[cfg_attr(
22906        feature = "builder",
22907        builder(with = |value:impl Into<String>|vec![value.into()])
22908    )]
22909    pub wikipedia_url: Option<Vec<String>>,
22910}
22911impl Workbook {
22912    /// Create a new entity with the given ID
22913    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
22914    pub fn new(id: impl Into<String>) -> Self {
22915        Self {
22916            id: id.into(),
22917            schema: "Workbook".to_string(),
22918            address: None,
22919            address_entity: None,
22920            aleph_url: None,
22921            alias: None,
22922            ancestors: None,
22923            author: None,
22924            authored_at: None,
22925            body_text: None,
22926            companies_mentioned: None,
22927            content_hash: None,
22928            country: None,
22929            crawler: None,
22930            created_at: None,
22931            date: None,
22932            description: None,
22933            detected_country: None,
22934            detected_language: None,
22935            email_mentioned: None,
22936            encoding: None,
22937            extension: None,
22938            file_name: Vec::new(),
22939            file_size: None,
22940            generator: None,
22941            iban_mentioned: None,
22942            index_text: None,
22943            ip_mentioned: None,
22944            keywords: None,
22945            language: None,
22946            location_mentioned: None,
22947            message_id: None,
22948            mime_type: None,
22949            modified_at: None,
22950            name: Vec::new(),
22951            names_mentioned: None,
22952            notes: None,
22953            parent: None,
22954            people_mentioned: None,
22955            phone_mentioned: None,
22956            previous_name: None,
22957            processed_at: None,
22958            processing_agent: None,
22959            processing_error: None,
22960            processing_status: None,
22961            program: None,
22962            program_id: None,
22963            proof: None,
22964            published_at: None,
22965            publisher: None,
22966            publisher_url: None,
22967            retrieved_at: None,
22968            source_url: None,
22969            summary: None,
22970            title: None,
22971            topics: None,
22972            translated_language: None,
22973            translated_text: None,
22974            weak_alias: None,
22975            wikidata_id: None,
22976            wikipedia_url: None,
22977        }
22978    }
22979    /// Get the schema name
22980    pub fn schema_name() -> &'static str {
22981        "Workbook"
22982    }
22983    /// Serialize to standard FTM nested JSON format
22984    ///
22985    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
22986    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
22987        let mut value = serde_json::to_value(self)?;
22988        if let Some(obj) = value.as_object_mut() {
22989            let id = obj.remove("id");
22990            let schema = obj.remove("schema");
22991            let properties = serde_json::Value::Object(std::mem::take(obj));
22992            if let Some(id) = id {
22993                obj.insert("id".into(), id);
22994            }
22995            if let Some(schema) = schema {
22996                obj.insert("schema".into(), schema);
22997            }
22998            obj.insert("properties".into(), properties);
22999        }
23000        serde_json::to_string(&value)
23001    }
23002}