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: Country
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 country: Option<Vec<String>>,
5396    ///Property: Created at
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 created_at: Option<Vec<String>>,
5403    ///Property: Creation date
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 creation_date: Option<Vec<String>>,
5410    ///Property: Currency
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 currency: Option<Vec<String>>,
5417    ///Property: Currency short code
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 currency_symbol: Option<Vec<String>>,
5424    ///Property: Description
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 description: Option<Vec<String>>,
5431    ///Property: Wallet holder
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 holder: Option<Vec<String>>,
5438    ///Property: Index text
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 index_text: Option<Vec<String>>,
5445    ///Property: Keywords
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 keywords: Option<Vec<String>>,
5452    ///Property: Managing exchange
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 managing_exchange: Option<Vec<String>>,
5459    ///Property: Modified on
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 modified_at: Option<Vec<String>>,
5466    ///Property: Name
5467    #[serde(default)]
5468    #[cfg_attr(
5469        feature = "builder",
5470        builder(with = |value:impl Into<String>|vec![value.into()])
5471    )]
5472    pub name: Vec<String>,
5473    ///Property: Notes
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 notes: Option<Vec<String>>,
5480    ///Property: Previous name
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 previous_name: Option<Vec<String>>,
5487    ///Property: Private key
5488    #[serde(skip_serializing_if = "Option::is_none")]
5489    #[cfg_attr(
5490        feature = "builder",
5491        builder(with = |value:impl Into<String>|vec![value.into()])
5492    )]
5493    pub private_key: Option<Vec<String>>,
5494    ///Property: Program
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 program: Option<Vec<String>>,
5501    ///Property: Program ID
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 program_id: Option<Vec<String>>,
5508    ///Property: Source document
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 proof: Option<Vec<String>>,
5515    ///Property: Address
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 public_key: Option<Vec<String>>,
5522    ///Property: Publishing source
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 publisher: Option<Vec<String>>,
5529    ///Property: Publishing source URL
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 publisher_url: Option<Vec<String>>,
5536    ///Property: Retrieved on
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 retrieved_at: Option<Vec<String>>,
5543    ///Property: Source link
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 source_url: Option<Vec<String>>,
5550    ///Property: Summary
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 summary: Option<Vec<String>>,
5557    ///Property: Topics
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 topics: Option<Vec<String>>,
5564    ///Property: Weak alias
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 weak_alias: Option<Vec<String>>,
5571    ///Property: Wikidata ID
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 wikidata_id: Option<Vec<String>>,
5578    ///Property: Wikipedia Article
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 wikipedia_url: Option<Vec<String>>,
5585}
5586impl CryptoWallet {
5587    /// Create a new entity with the given ID
5588    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
5589    pub fn new(id: impl Into<String>) -> Self {
5590        Self {
5591            id: id.into(),
5592            schema: "CryptoWallet".to_string(),
5593            account_id: None,
5594            address: None,
5595            address_entity: None,
5596            aleph_url: None,
5597            alias: None,
5598            amount: None,
5599            amount_eur: None,
5600            amount_usd: None,
5601            balance: None,
5602            balance_date: None,
5603            country: None,
5604            created_at: None,
5605            creation_date: None,
5606            currency: None,
5607            currency_symbol: None,
5608            description: None,
5609            holder: None,
5610            index_text: None,
5611            keywords: None,
5612            managing_exchange: None,
5613            modified_at: None,
5614            name: Vec::new(),
5615            notes: None,
5616            previous_name: None,
5617            private_key: None,
5618            program: None,
5619            program_id: None,
5620            proof: None,
5621            public_key: None,
5622            publisher: None,
5623            publisher_url: None,
5624            retrieved_at: None,
5625            source_url: None,
5626            summary: None,
5627            topics: None,
5628            weak_alias: None,
5629            wikidata_id: None,
5630            wikipedia_url: None,
5631        }
5632    }
5633    /// Get the schema name
5634    pub fn schema_name() -> &'static str {
5635        "CryptoWallet"
5636    }
5637    /// Serialize to standard FTM nested JSON format
5638    ///
5639    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
5640    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
5641        let mut value = serde_json::to_value(self)?;
5642        if let Some(obj) = value.as_object_mut() {
5643            let id = obj.remove("id");
5644            let schema = obj.remove("schema");
5645            let properties = serde_json::Value::Object(std::mem::take(obj));
5646            if let Some(id) = id {
5647                obj.insert("id".into(), id);
5648            }
5649            if let Some(schema) = schema {
5650                obj.insert("schema".into(), schema);
5651            }
5652            obj.insert("properties".into(), properties);
5653        }
5654        serde_json::to_string(&value)
5655    }
5656}
5657///FTM Schema: Debt
5658#[derive(Debug, Clone, Serialize, Deserialize)]
5659#[cfg_attr(feature = "builder", derive(Builder))]
5660#[serde(rename_all = "camelCase")]
5661pub struct Debt {
5662    pub id: String,
5663    #[cfg_attr(feature = "builder", builder(default = "Debt".to_string()))]
5664    pub schema: String,
5665    ///Property: Aleph URL
5666    #[serde(skip_serializing_if = "Option::is_none")]
5667    #[cfg_attr(
5668        feature = "builder",
5669        builder(with = |value:impl Into<String>|vec![value.into()])
5670    )]
5671    pub aleph_url: Option<Vec<String>>,
5672    ///Property: Amount
5673    #[serde(
5674        skip_serializing_if = "Option::is_none",
5675        deserialize_with = "deserialize_opt_f64_vec",
5676        default
5677    )]
5678    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
5679    pub amount: Option<Vec<f64>>,
5680    ///Property: Amount in EUR
5681    #[serde(
5682        skip_serializing_if = "Option::is_none",
5683        deserialize_with = "deserialize_opt_f64_vec",
5684        default
5685    )]
5686    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
5687    pub amount_eur: Option<Vec<f64>>,
5688    ///Property: Amount in USD
5689    #[serde(
5690        skip_serializing_if = "Option::is_none",
5691        deserialize_with = "deserialize_opt_f64_vec",
5692        default
5693    )]
5694    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
5695    pub amount_usd: Option<Vec<f64>>,
5696    ///Property: Creditor
5697    #[serde(skip_serializing_if = "Option::is_none")]
5698    #[cfg_attr(
5699        feature = "builder",
5700        builder(with = |value:impl Into<String>|vec![value.into()])
5701    )]
5702    pub creditor: Option<Vec<String>>,
5703    ///Property: Currency
5704    #[serde(skip_serializing_if = "Option::is_none")]
5705    #[cfg_attr(
5706        feature = "builder",
5707        builder(with = |value:impl Into<String>|vec![value.into()])
5708    )]
5709    pub currency: Option<Vec<String>>,
5710    ///Property: Date
5711    #[serde(skip_serializing_if = "Option::is_none")]
5712    #[cfg_attr(
5713        feature = "builder",
5714        builder(with = |value:impl Into<String>|vec![value.into()])
5715    )]
5716    pub date: Option<Vec<String>>,
5717    ///Property: Debtor
5718    #[serde(default)]
5719    #[cfg_attr(
5720        feature = "builder",
5721        builder(with = |value:impl Into<String>|vec![value.into()])
5722    )]
5723    pub debtor: Vec<String>,
5724    ///Property: Description
5725    #[serde(skip_serializing_if = "Option::is_none")]
5726    #[cfg_attr(
5727        feature = "builder",
5728        builder(with = |value:impl Into<String>|vec![value.into()])
5729    )]
5730    pub description: Option<Vec<String>>,
5731    ///Property: End date
5732    #[serde(skip_serializing_if = "Option::is_none")]
5733    #[cfg_attr(
5734        feature = "builder",
5735        builder(with = |value:impl Into<String>|vec![value.into()])
5736    )]
5737    pub end_date: Option<Vec<String>>,
5738    ///Property: Index text
5739    #[serde(skip_serializing_if = "Option::is_none")]
5740    #[cfg_attr(
5741        feature = "builder",
5742        builder(with = |value:impl Into<String>|vec![value.into()])
5743    )]
5744    pub index_text: Option<Vec<String>>,
5745    ///Property: Modified on
5746    #[serde(skip_serializing_if = "Option::is_none")]
5747    #[cfg_attr(
5748        feature = "builder",
5749        builder(with = |value:impl Into<String>|vec![value.into()])
5750    )]
5751    pub modified_at: Option<Vec<String>>,
5752    ///Property: Detected names
5753    #[serde(skip_serializing_if = "Option::is_none")]
5754    #[cfg_attr(
5755        feature = "builder",
5756        builder(with = |value:impl Into<String>|vec![value.into()])
5757    )]
5758    pub names_mentioned: Option<Vec<String>>,
5759    ///Property: Source document
5760    #[serde(skip_serializing_if = "Option::is_none")]
5761    #[cfg_attr(
5762        feature = "builder",
5763        builder(with = |value:impl Into<String>|vec![value.into()])
5764    )]
5765    pub proof: Option<Vec<String>>,
5766    ///Property: Publishing source
5767    #[serde(skip_serializing_if = "Option::is_none")]
5768    #[cfg_attr(
5769        feature = "builder",
5770        builder(with = |value:impl Into<String>|vec![value.into()])
5771    )]
5772    pub publisher: Option<Vec<String>>,
5773    ///Property: Publishing source URL
5774    #[serde(skip_serializing_if = "Option::is_none")]
5775    #[cfg_attr(
5776        feature = "builder",
5777        builder(with = |value:impl Into<String>|vec![value.into()])
5778    )]
5779    pub publisher_url: Option<Vec<String>>,
5780    ///Property: Record ID
5781    #[serde(skip_serializing_if = "Option::is_none")]
5782    #[cfg_attr(
5783        feature = "builder",
5784        builder(with = |value:impl Into<String>|vec![value.into()])
5785    )]
5786    pub record_id: Option<Vec<String>>,
5787    ///Property: Retrieved on
5788    #[serde(skip_serializing_if = "Option::is_none")]
5789    #[cfg_attr(
5790        feature = "builder",
5791        builder(with = |value:impl Into<String>|vec![value.into()])
5792    )]
5793    pub retrieved_at: Option<Vec<String>>,
5794    ///Property: Source link
5795    #[serde(skip_serializing_if = "Option::is_none")]
5796    #[cfg_attr(
5797        feature = "builder",
5798        builder(with = |value:impl Into<String>|vec![value.into()])
5799    )]
5800    pub source_url: Option<Vec<String>>,
5801    ///Property: Start date
5802    #[serde(skip_serializing_if = "Option::is_none")]
5803    #[cfg_attr(
5804        feature = "builder",
5805        builder(with = |value:impl Into<String>|vec![value.into()])
5806    )]
5807    pub start_date: Option<Vec<String>>,
5808    ///Property: Summary
5809    #[serde(skip_serializing_if = "Option::is_none")]
5810    #[cfg_attr(
5811        feature = "builder",
5812        builder(with = |value:impl Into<String>|vec![value.into()])
5813    )]
5814    pub summary: Option<Vec<String>>,
5815}
5816impl Debt {
5817    /// Create a new entity with the given ID
5818    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
5819    pub fn new(id: impl Into<String>) -> Self {
5820        Self {
5821            id: id.into(),
5822            schema: "Debt".to_string(),
5823            aleph_url: None,
5824            amount: None,
5825            amount_eur: None,
5826            amount_usd: None,
5827            creditor: None,
5828            currency: None,
5829            date: None,
5830            debtor: Vec::new(),
5831            description: None,
5832            end_date: None,
5833            index_text: None,
5834            modified_at: None,
5835            names_mentioned: None,
5836            proof: None,
5837            publisher: None,
5838            publisher_url: None,
5839            record_id: None,
5840            retrieved_at: None,
5841            source_url: None,
5842            start_date: None,
5843            summary: None,
5844        }
5845    }
5846    /// Get the schema name
5847    pub fn schema_name() -> &'static str {
5848        "Debt"
5849    }
5850    /// Serialize to standard FTM nested JSON format
5851    ///
5852    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
5853    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
5854        let mut value = serde_json::to_value(self)?;
5855        if let Some(obj) = value.as_object_mut() {
5856            let id = obj.remove("id");
5857            let schema = obj.remove("schema");
5858            let properties = serde_json::Value::Object(std::mem::take(obj));
5859            if let Some(id) = id {
5860                obj.insert("id".into(), id);
5861            }
5862            if let Some(schema) = schema {
5863                obj.insert("schema".into(), schema);
5864            }
5865            obj.insert("properties".into(), properties);
5866        }
5867        serde_json::to_string(&value)
5868    }
5869}
5870///FTM Schema: Directorship
5871#[derive(Debug, Clone, Serialize, Deserialize)]
5872#[cfg_attr(feature = "builder", derive(Builder))]
5873#[serde(rename_all = "camelCase")]
5874pub struct Directorship {
5875    pub id: String,
5876    #[cfg_attr(feature = "builder", builder(default = "Directorship".to_string()))]
5877    pub schema: String,
5878    ///Property: Aleph URL
5879    #[serde(skip_serializing_if = "Option::is_none")]
5880    #[cfg_attr(
5881        feature = "builder",
5882        builder(with = |value:impl Into<String>|vec![value.into()])
5883    )]
5884    pub aleph_url: Option<Vec<String>>,
5885    ///Property: Date
5886    #[serde(skip_serializing_if = "Option::is_none")]
5887    #[cfg_attr(
5888        feature = "builder",
5889        builder(with = |value:impl Into<String>|vec![value.into()])
5890    )]
5891    pub date: Option<Vec<String>>,
5892    ///Property: Description
5893    #[serde(skip_serializing_if = "Option::is_none")]
5894    #[cfg_attr(
5895        feature = "builder",
5896        builder(with = |value:impl Into<String>|vec![value.into()])
5897    )]
5898    pub description: Option<Vec<String>>,
5899    ///Property: Director
5900    #[serde(default)]
5901    #[cfg_attr(
5902        feature = "builder",
5903        builder(with = |value:impl Into<String>|vec![value.into()])
5904    )]
5905    pub director: Vec<String>,
5906    ///Property: End date
5907    #[serde(skip_serializing_if = "Option::is_none")]
5908    #[cfg_attr(
5909        feature = "builder",
5910        builder(with = |value:impl Into<String>|vec![value.into()])
5911    )]
5912    pub end_date: Option<Vec<String>>,
5913    ///Property: Index text
5914    #[serde(skip_serializing_if = "Option::is_none")]
5915    #[cfg_attr(
5916        feature = "builder",
5917        builder(with = |value:impl Into<String>|vec![value.into()])
5918    )]
5919    pub index_text: Option<Vec<String>>,
5920    ///Property: Modified on
5921    #[serde(skip_serializing_if = "Option::is_none")]
5922    #[cfg_attr(
5923        feature = "builder",
5924        builder(with = |value:impl Into<String>|vec![value.into()])
5925    )]
5926    pub modified_at: Option<Vec<String>>,
5927    ///Property: Detected names
5928    #[serde(skip_serializing_if = "Option::is_none")]
5929    #[cfg_attr(
5930        feature = "builder",
5931        builder(with = |value:impl Into<String>|vec![value.into()])
5932    )]
5933    pub names_mentioned: Option<Vec<String>>,
5934    ///Property: Organization
5935    #[serde(default)]
5936    #[cfg_attr(
5937        feature = "builder",
5938        builder(with = |value:impl Into<String>|vec![value.into()])
5939    )]
5940    pub organization: Vec<String>,
5941    ///Property: Source document
5942    #[serde(skip_serializing_if = "Option::is_none")]
5943    #[cfg_attr(
5944        feature = "builder",
5945        builder(with = |value:impl Into<String>|vec![value.into()])
5946    )]
5947    pub proof: Option<Vec<String>>,
5948    ///Property: Publishing source
5949    #[serde(skip_serializing_if = "Option::is_none")]
5950    #[cfg_attr(
5951        feature = "builder",
5952        builder(with = |value:impl Into<String>|vec![value.into()])
5953    )]
5954    pub publisher: Option<Vec<String>>,
5955    ///Property: Publishing source URL
5956    #[serde(skip_serializing_if = "Option::is_none")]
5957    #[cfg_attr(
5958        feature = "builder",
5959        builder(with = |value:impl Into<String>|vec![value.into()])
5960    )]
5961    pub publisher_url: Option<Vec<String>>,
5962    ///Property: Record ID
5963    #[serde(skip_serializing_if = "Option::is_none")]
5964    #[cfg_attr(
5965        feature = "builder",
5966        builder(with = |value:impl Into<String>|vec![value.into()])
5967    )]
5968    pub record_id: Option<Vec<String>>,
5969    ///Property: Retrieved on
5970    #[serde(skip_serializing_if = "Option::is_none")]
5971    #[cfg_attr(
5972        feature = "builder",
5973        builder(with = |value:impl Into<String>|vec![value.into()])
5974    )]
5975    pub retrieved_at: Option<Vec<String>>,
5976    ///Property: Role
5977    #[serde(skip_serializing_if = "Option::is_none")]
5978    #[cfg_attr(
5979        feature = "builder",
5980        builder(with = |value:impl Into<String>|vec![value.into()])
5981    )]
5982    pub role: Option<Vec<String>>,
5983    ///Property: Secretary
5984    #[serde(skip_serializing_if = "Option::is_none")]
5985    #[cfg_attr(
5986        feature = "builder",
5987        builder(with = |value:impl Into<String>|vec![value.into()])
5988    )]
5989    pub secretary: Option<Vec<String>>,
5990    ///Property: Source link
5991    #[serde(skip_serializing_if = "Option::is_none")]
5992    #[cfg_attr(
5993        feature = "builder",
5994        builder(with = |value:impl Into<String>|vec![value.into()])
5995    )]
5996    pub source_url: Option<Vec<String>>,
5997    ///Property: Start date
5998    #[serde(skip_serializing_if = "Option::is_none")]
5999    #[cfg_attr(
6000        feature = "builder",
6001        builder(with = |value:impl Into<String>|vec![value.into()])
6002    )]
6003    pub start_date: Option<Vec<String>>,
6004    ///Property: Status
6005    #[serde(skip_serializing_if = "Option::is_none")]
6006    #[cfg_attr(
6007        feature = "builder",
6008        builder(with = |value:impl Into<String>|vec![value.into()])
6009    )]
6010    pub status: Option<Vec<String>>,
6011    ///Property: Summary
6012    #[serde(skip_serializing_if = "Option::is_none")]
6013    #[cfg_attr(
6014        feature = "builder",
6015        builder(with = |value:impl Into<String>|vec![value.into()])
6016    )]
6017    pub summary: Option<Vec<String>>,
6018}
6019impl Directorship {
6020    /// Create a new entity with the given ID
6021    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
6022    pub fn new(id: impl Into<String>) -> Self {
6023        Self {
6024            id: id.into(),
6025            schema: "Directorship".to_string(),
6026            aleph_url: None,
6027            date: None,
6028            description: None,
6029            director: Vec::new(),
6030            end_date: None,
6031            index_text: None,
6032            modified_at: None,
6033            names_mentioned: None,
6034            organization: Vec::new(),
6035            proof: None,
6036            publisher: None,
6037            publisher_url: None,
6038            record_id: None,
6039            retrieved_at: None,
6040            role: None,
6041            secretary: None,
6042            source_url: None,
6043            start_date: None,
6044            status: None,
6045            summary: None,
6046        }
6047    }
6048    /// Get the schema name
6049    pub fn schema_name() -> &'static str {
6050        "Directorship"
6051    }
6052    /// Serialize to standard FTM nested JSON format
6053    ///
6054    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
6055    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
6056        let mut value = serde_json::to_value(self)?;
6057        if let Some(obj) = value.as_object_mut() {
6058            let id = obj.remove("id");
6059            let schema = obj.remove("schema");
6060            let properties = serde_json::Value::Object(std::mem::take(obj));
6061            if let Some(id) = id {
6062                obj.insert("id".into(), id);
6063            }
6064            if let Some(schema) = schema {
6065                obj.insert("schema".into(), schema);
6066            }
6067            obj.insert("properties".into(), properties);
6068        }
6069        serde_json::to_string(&value)
6070    }
6071}
6072///FTM Schema: File
6073#[derive(Debug, Clone, Serialize, Deserialize)]
6074#[cfg_attr(feature = "builder", derive(Builder))]
6075#[serde(rename_all = "camelCase")]
6076pub struct Document {
6077    pub id: String,
6078    #[cfg_attr(feature = "builder", builder(default = "Document".to_string()))]
6079    pub schema: String,
6080    ///Property: Address
6081    #[serde(skip_serializing_if = "Option::is_none")]
6082    #[cfg_attr(
6083        feature = "builder",
6084        builder(with = |value:impl Into<String>|vec![value.into()])
6085    )]
6086    pub address: Option<Vec<String>>,
6087    ///Property: Address
6088    #[serde(skip_serializing_if = "Option::is_none")]
6089    #[cfg_attr(
6090        feature = "builder",
6091        builder(with = |value:impl Into<String>|vec![value.into()])
6092    )]
6093    pub address_entity: Option<Vec<String>>,
6094    ///Property: Aleph URL
6095    #[serde(skip_serializing_if = "Option::is_none")]
6096    #[cfg_attr(
6097        feature = "builder",
6098        builder(with = |value:impl Into<String>|vec![value.into()])
6099    )]
6100    pub aleph_url: Option<Vec<String>>,
6101    ///Property: Alias
6102    #[serde(skip_serializing_if = "Option::is_none")]
6103    #[cfg_attr(
6104        feature = "builder",
6105        builder(with = |value:impl Into<String>|vec![value.into()])
6106    )]
6107    pub alias: Option<Vec<String>>,
6108    ///Property: Ancestors
6109    #[serde(skip_serializing_if = "Option::is_none")]
6110    #[cfg_attr(
6111        feature = "builder",
6112        builder(with = |value:impl Into<String>|vec![value.into()])
6113    )]
6114    pub ancestors: Option<Vec<String>>,
6115    ///Property: Author
6116    #[serde(skip_serializing_if = "Option::is_none")]
6117    #[cfg_attr(
6118        feature = "builder",
6119        builder(with = |value:impl Into<String>|vec![value.into()])
6120    )]
6121    pub author: Option<Vec<String>>,
6122    ///Property: Authored on
6123    #[serde(skip_serializing_if = "Option::is_none")]
6124    #[cfg_attr(
6125        feature = "builder",
6126        builder(with = |value:impl Into<String>|vec![value.into()])
6127    )]
6128    pub authored_at: Option<Vec<String>>,
6129    ///Property: Text
6130    #[serde(skip_serializing_if = "Option::is_none")]
6131    #[cfg_attr(
6132        feature = "builder",
6133        builder(with = |value:impl Into<String>|vec![value.into()])
6134    )]
6135    pub body_text: Option<Vec<String>>,
6136    ///Property: Detected companies
6137    #[serde(skip_serializing_if = "Option::is_none")]
6138    #[cfg_attr(
6139        feature = "builder",
6140        builder(with = |value:impl Into<String>|vec![value.into()])
6141    )]
6142    pub companies_mentioned: Option<Vec<String>>,
6143    ///Property: Checksum
6144    #[serde(skip_serializing_if = "Option::is_none")]
6145    #[cfg_attr(
6146        feature = "builder",
6147        builder(with = |value:impl Into<String>|vec![value.into()])
6148    )]
6149    pub content_hash: Option<Vec<String>>,
6150    ///Property: Country
6151    #[serde(skip_serializing_if = "Option::is_none")]
6152    #[cfg_attr(
6153        feature = "builder",
6154        builder(with = |value:impl Into<String>|vec![value.into()])
6155    )]
6156    pub country: Option<Vec<String>>,
6157    ///Property: Crawler
6158    #[serde(skip_serializing_if = "Option::is_none")]
6159    #[cfg_attr(
6160        feature = "builder",
6161        builder(with = |value:impl Into<String>|vec![value.into()])
6162    )]
6163    pub crawler: Option<Vec<String>>,
6164    ///Property: Created at
6165    #[serde(skip_serializing_if = "Option::is_none")]
6166    #[cfg_attr(
6167        feature = "builder",
6168        builder(with = |value:impl Into<String>|vec![value.into()])
6169    )]
6170    pub created_at: Option<Vec<String>>,
6171    ///Property: Date
6172    #[serde(skip_serializing_if = "Option::is_none")]
6173    #[cfg_attr(
6174        feature = "builder",
6175        builder(with = |value:impl Into<String>|vec![value.into()])
6176    )]
6177    pub date: Option<Vec<String>>,
6178    ///Property: Description
6179    #[serde(skip_serializing_if = "Option::is_none")]
6180    #[cfg_attr(
6181        feature = "builder",
6182        builder(with = |value:impl Into<String>|vec![value.into()])
6183    )]
6184    pub description: Option<Vec<String>>,
6185    ///Property: Detected country
6186    #[serde(skip_serializing_if = "Option::is_none")]
6187    #[cfg_attr(
6188        feature = "builder",
6189        builder(with = |value:impl Into<String>|vec![value.into()])
6190    )]
6191    pub detected_country: Option<Vec<String>>,
6192    ///Property: Detected language
6193    #[serde(skip_serializing_if = "Option::is_none")]
6194    #[cfg_attr(
6195        feature = "builder",
6196        builder(with = |value:impl Into<String>|vec![value.into()])
6197    )]
6198    pub detected_language: Option<Vec<String>>,
6199    ///Property: Detected e-mail addresses
6200    #[serde(skip_serializing_if = "Option::is_none")]
6201    #[cfg_attr(
6202        feature = "builder",
6203        builder(with = |value:impl Into<String>|vec![value.into()])
6204    )]
6205    pub email_mentioned: Option<Vec<String>>,
6206    ///Property: File encoding
6207    #[serde(skip_serializing_if = "Option::is_none")]
6208    #[cfg_attr(
6209        feature = "builder",
6210        builder(with = |value:impl Into<String>|vec![value.into()])
6211    )]
6212    pub encoding: Option<Vec<String>>,
6213    ///Property: File extension
6214    #[serde(skip_serializing_if = "Option::is_none")]
6215    #[cfg_attr(
6216        feature = "builder",
6217        builder(with = |value:impl Into<String>|vec![value.into()])
6218    )]
6219    pub extension: Option<Vec<String>>,
6220    ///Property: File name
6221    #[serde(default)]
6222    #[cfg_attr(
6223        feature = "builder",
6224        builder(with = |value:impl Into<String>|vec![value.into()])
6225    )]
6226    pub file_name: Vec<String>,
6227    ///Property: File size
6228    #[serde(
6229        skip_serializing_if = "Option::is_none",
6230        deserialize_with = "deserialize_opt_f64_vec",
6231        default
6232    )]
6233    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
6234    pub file_size: Option<Vec<f64>>,
6235    ///Property: Generator
6236    #[serde(skip_serializing_if = "Option::is_none")]
6237    #[cfg_attr(
6238        feature = "builder",
6239        builder(with = |value:impl Into<String>|vec![value.into()])
6240    )]
6241    pub generator: Option<Vec<String>>,
6242    ///Property: Detected IBANs
6243    #[serde(skip_serializing_if = "Option::is_none")]
6244    #[cfg_attr(
6245        feature = "builder",
6246        builder(with = |value:impl Into<String>|vec![value.into()])
6247    )]
6248    pub iban_mentioned: Option<Vec<String>>,
6249    ///Property: Index text
6250    #[serde(skip_serializing_if = "Option::is_none")]
6251    #[cfg_attr(
6252        feature = "builder",
6253        builder(with = |value:impl Into<String>|vec![value.into()])
6254    )]
6255    pub index_text: Option<Vec<String>>,
6256    ///Property: Detected IP addresses
6257    #[serde(skip_serializing_if = "Option::is_none")]
6258    #[cfg_attr(
6259        feature = "builder",
6260        builder(with = |value:impl Into<String>|vec![value.into()])
6261    )]
6262    pub ip_mentioned: Option<Vec<String>>,
6263    ///Property: Keywords
6264    #[serde(skip_serializing_if = "Option::is_none")]
6265    #[cfg_attr(
6266        feature = "builder",
6267        builder(with = |value:impl Into<String>|vec![value.into()])
6268    )]
6269    pub keywords: Option<Vec<String>>,
6270    ///Property: Language
6271    #[serde(skip_serializing_if = "Option::is_none")]
6272    #[cfg_attr(
6273        feature = "builder",
6274        builder(with = |value:impl Into<String>|vec![value.into()])
6275    )]
6276    pub language: Option<Vec<String>>,
6277    ///Property: Detected locations
6278    #[serde(skip_serializing_if = "Option::is_none")]
6279    #[cfg_attr(
6280        feature = "builder",
6281        builder(with = |value:impl Into<String>|vec![value.into()])
6282    )]
6283    pub location_mentioned: Option<Vec<String>>,
6284    ///Property: Message ID
6285    #[serde(skip_serializing_if = "Option::is_none")]
6286    #[cfg_attr(
6287        feature = "builder",
6288        builder(with = |value:impl Into<String>|vec![value.into()])
6289    )]
6290    pub message_id: Option<Vec<String>>,
6291    ///Property: MIME type
6292    #[serde(skip_serializing_if = "Option::is_none")]
6293    #[cfg_attr(
6294        feature = "builder",
6295        builder(with = |value:impl Into<String>|vec![value.into()])
6296    )]
6297    pub mime_type: Option<Vec<String>>,
6298    ///Property: Modified on
6299    #[serde(skip_serializing_if = "Option::is_none")]
6300    #[cfg_attr(
6301        feature = "builder",
6302        builder(with = |value:impl Into<String>|vec![value.into()])
6303    )]
6304    pub modified_at: Option<Vec<String>>,
6305    ///Property: Name
6306    #[serde(default)]
6307    #[cfg_attr(
6308        feature = "builder",
6309        builder(with = |value:impl Into<String>|vec![value.into()])
6310    )]
6311    pub name: Vec<String>,
6312    ///Property: Detected names
6313    #[serde(skip_serializing_if = "Option::is_none")]
6314    #[cfg_attr(
6315        feature = "builder",
6316        builder(with = |value:impl Into<String>|vec![value.into()])
6317    )]
6318    pub names_mentioned: Option<Vec<String>>,
6319    ///Property: Notes
6320    #[serde(skip_serializing_if = "Option::is_none")]
6321    #[cfg_attr(
6322        feature = "builder",
6323        builder(with = |value:impl Into<String>|vec![value.into()])
6324    )]
6325    pub notes: Option<Vec<String>>,
6326    ///Property: Folder
6327    #[serde(skip_serializing_if = "Option::is_none")]
6328    #[cfg_attr(
6329        feature = "builder",
6330        builder(with = |value:impl Into<String>|vec![value.into()])
6331    )]
6332    pub parent: Option<Vec<String>>,
6333    ///Property: Detected people
6334    #[serde(skip_serializing_if = "Option::is_none")]
6335    #[cfg_attr(
6336        feature = "builder",
6337        builder(with = |value:impl Into<String>|vec![value.into()])
6338    )]
6339    pub people_mentioned: Option<Vec<String>>,
6340    ///Property: Detected phones
6341    #[serde(skip_serializing_if = "Option::is_none")]
6342    #[cfg_attr(
6343        feature = "builder",
6344        builder(with = |value:impl Into<String>|vec![value.into()])
6345    )]
6346    pub phone_mentioned: Option<Vec<String>>,
6347    ///Property: Previous name
6348    #[serde(skip_serializing_if = "Option::is_none")]
6349    #[cfg_attr(
6350        feature = "builder",
6351        builder(with = |value:impl Into<String>|vec![value.into()])
6352    )]
6353    pub previous_name: Option<Vec<String>>,
6354    ///Property: Processed at
6355    #[serde(skip_serializing_if = "Option::is_none")]
6356    #[cfg_attr(
6357        feature = "builder",
6358        builder(with = |value:impl Into<String>|vec![value.into()])
6359    )]
6360    pub processed_at: Option<Vec<String>>,
6361    ///Property: Processing agent
6362    #[serde(skip_serializing_if = "Option::is_none")]
6363    #[cfg_attr(
6364        feature = "builder",
6365        builder(with = |value:impl Into<String>|vec![value.into()])
6366    )]
6367    pub processing_agent: Option<Vec<String>>,
6368    ///Property: Processing error
6369    #[serde(skip_serializing_if = "Option::is_none")]
6370    #[cfg_attr(
6371        feature = "builder",
6372        builder(with = |value:impl Into<String>|vec![value.into()])
6373    )]
6374    pub processing_error: Option<Vec<String>>,
6375    ///Property: Processing status
6376    #[serde(skip_serializing_if = "Option::is_none")]
6377    #[cfg_attr(
6378        feature = "builder",
6379        builder(with = |value:impl Into<String>|vec![value.into()])
6380    )]
6381    pub processing_status: Option<Vec<String>>,
6382    ///Property: Program
6383    #[serde(skip_serializing_if = "Option::is_none")]
6384    #[cfg_attr(
6385        feature = "builder",
6386        builder(with = |value:impl Into<String>|vec![value.into()])
6387    )]
6388    pub program: Option<Vec<String>>,
6389    ///Property: Program ID
6390    #[serde(skip_serializing_if = "Option::is_none")]
6391    #[cfg_attr(
6392        feature = "builder",
6393        builder(with = |value:impl Into<String>|vec![value.into()])
6394    )]
6395    pub program_id: Option<Vec<String>>,
6396    ///Property: Source document
6397    #[serde(skip_serializing_if = "Option::is_none")]
6398    #[cfg_attr(
6399        feature = "builder",
6400        builder(with = |value:impl Into<String>|vec![value.into()])
6401    )]
6402    pub proof: Option<Vec<String>>,
6403    ///Property: Published on
6404    #[serde(skip_serializing_if = "Option::is_none")]
6405    #[cfg_attr(
6406        feature = "builder",
6407        builder(with = |value:impl Into<String>|vec![value.into()])
6408    )]
6409    pub published_at: Option<Vec<String>>,
6410    ///Property: Publishing source
6411    #[serde(skip_serializing_if = "Option::is_none")]
6412    #[cfg_attr(
6413        feature = "builder",
6414        builder(with = |value:impl Into<String>|vec![value.into()])
6415    )]
6416    pub publisher: Option<Vec<String>>,
6417    ///Property: Publishing source URL
6418    #[serde(skip_serializing_if = "Option::is_none")]
6419    #[cfg_attr(
6420        feature = "builder",
6421        builder(with = |value:impl Into<String>|vec![value.into()])
6422    )]
6423    pub publisher_url: Option<Vec<String>>,
6424    ///Property: Retrieved on
6425    #[serde(skip_serializing_if = "Option::is_none")]
6426    #[cfg_attr(
6427        feature = "builder",
6428        builder(with = |value:impl Into<String>|vec![value.into()])
6429    )]
6430    pub retrieved_at: Option<Vec<String>>,
6431    ///Property: Source link
6432    #[serde(skip_serializing_if = "Option::is_none")]
6433    #[cfg_attr(
6434        feature = "builder",
6435        builder(with = |value:impl Into<String>|vec![value.into()])
6436    )]
6437    pub source_url: Option<Vec<String>>,
6438    ///Property: Summary
6439    #[serde(skip_serializing_if = "Option::is_none")]
6440    #[cfg_attr(
6441        feature = "builder",
6442        builder(with = |value:impl Into<String>|vec![value.into()])
6443    )]
6444    pub summary: Option<Vec<String>>,
6445    ///Property: Title
6446    #[serde(skip_serializing_if = "Option::is_none")]
6447    #[cfg_attr(
6448        feature = "builder",
6449        builder(with = |value:impl Into<String>|vec![value.into()])
6450    )]
6451    pub title: Option<Vec<String>>,
6452    ///Property: Topics
6453    #[serde(skip_serializing_if = "Option::is_none")]
6454    #[cfg_attr(
6455        feature = "builder",
6456        builder(with = |value:impl Into<String>|vec![value.into()])
6457    )]
6458    pub topics: Option<Vec<String>>,
6459    ///Property: The language of the translated text
6460    #[serde(skip_serializing_if = "Option::is_none")]
6461    #[cfg_attr(
6462        feature = "builder",
6463        builder(with = |value:impl Into<String>|vec![value.into()])
6464    )]
6465    pub translated_language: Option<Vec<String>>,
6466    ///Property: Translated version of the body text
6467    #[serde(skip_serializing_if = "Option::is_none")]
6468    #[cfg_attr(
6469        feature = "builder",
6470        builder(with = |value:impl Into<String>|vec![value.into()])
6471    )]
6472    pub translated_text: Option<Vec<String>>,
6473    ///Property: Weak alias
6474    #[serde(skip_serializing_if = "Option::is_none")]
6475    #[cfg_attr(
6476        feature = "builder",
6477        builder(with = |value:impl Into<String>|vec![value.into()])
6478    )]
6479    pub weak_alias: Option<Vec<String>>,
6480    ///Property: Wikidata ID
6481    #[serde(skip_serializing_if = "Option::is_none")]
6482    #[cfg_attr(
6483        feature = "builder",
6484        builder(with = |value:impl Into<String>|vec![value.into()])
6485    )]
6486    pub wikidata_id: Option<Vec<String>>,
6487    ///Property: Wikipedia Article
6488    #[serde(skip_serializing_if = "Option::is_none")]
6489    #[cfg_attr(
6490        feature = "builder",
6491        builder(with = |value:impl Into<String>|vec![value.into()])
6492    )]
6493    pub wikipedia_url: Option<Vec<String>>,
6494}
6495impl Document {
6496    /// Create a new entity with the given ID
6497    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
6498    pub fn new(id: impl Into<String>) -> Self {
6499        Self {
6500            id: id.into(),
6501            schema: "Document".to_string(),
6502            address: None,
6503            address_entity: None,
6504            aleph_url: None,
6505            alias: None,
6506            ancestors: None,
6507            author: None,
6508            authored_at: None,
6509            body_text: None,
6510            companies_mentioned: None,
6511            content_hash: None,
6512            country: None,
6513            crawler: None,
6514            created_at: None,
6515            date: None,
6516            description: None,
6517            detected_country: None,
6518            detected_language: None,
6519            email_mentioned: None,
6520            encoding: None,
6521            extension: None,
6522            file_name: Vec::new(),
6523            file_size: None,
6524            generator: None,
6525            iban_mentioned: None,
6526            index_text: None,
6527            ip_mentioned: None,
6528            keywords: None,
6529            language: None,
6530            location_mentioned: None,
6531            message_id: None,
6532            mime_type: None,
6533            modified_at: None,
6534            name: Vec::new(),
6535            names_mentioned: None,
6536            notes: None,
6537            parent: None,
6538            people_mentioned: None,
6539            phone_mentioned: None,
6540            previous_name: None,
6541            processed_at: None,
6542            processing_agent: None,
6543            processing_error: None,
6544            processing_status: None,
6545            program: None,
6546            program_id: None,
6547            proof: None,
6548            published_at: None,
6549            publisher: None,
6550            publisher_url: None,
6551            retrieved_at: None,
6552            source_url: None,
6553            summary: None,
6554            title: None,
6555            topics: None,
6556            translated_language: None,
6557            translated_text: None,
6558            weak_alias: None,
6559            wikidata_id: None,
6560            wikipedia_url: None,
6561        }
6562    }
6563    /// Get the schema name
6564    pub fn schema_name() -> &'static str {
6565        "Document"
6566    }
6567    /// Serialize to standard FTM nested JSON format
6568    ///
6569    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
6570    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
6571        let mut value = serde_json::to_value(self)?;
6572        if let Some(obj) = value.as_object_mut() {
6573            let id = obj.remove("id");
6574            let schema = obj.remove("schema");
6575            let properties = serde_json::Value::Object(std::mem::take(obj));
6576            if let Some(id) = id {
6577                obj.insert("id".into(), id);
6578            }
6579            if let Some(schema) = schema {
6580                obj.insert("schema".into(), schema);
6581            }
6582            obj.insert("properties".into(), properties);
6583        }
6584        serde_json::to_string(&value)
6585    }
6586}
6587///FTM Schema: Documentation
6588#[derive(Debug, Clone, Serialize, Deserialize)]
6589#[cfg_attr(feature = "builder", derive(Builder))]
6590#[serde(rename_all = "camelCase")]
6591pub struct Documentation {
6592    pub id: String,
6593    #[cfg_attr(feature = "builder", builder(default = "Documentation".to_string()))]
6594    pub schema: String,
6595    ///Property: Aleph URL
6596    #[serde(skip_serializing_if = "Option::is_none")]
6597    #[cfg_attr(
6598        feature = "builder",
6599        builder(with = |value:impl Into<String>|vec![value.into()])
6600    )]
6601    pub aleph_url: Option<Vec<String>>,
6602    ///Property: Date
6603    #[serde(skip_serializing_if = "Option::is_none")]
6604    #[cfg_attr(
6605        feature = "builder",
6606        builder(with = |value:impl Into<String>|vec![value.into()])
6607    )]
6608    pub date: Option<Vec<String>>,
6609    ///Property: Description
6610    #[serde(skip_serializing_if = "Option::is_none")]
6611    #[cfg_attr(
6612        feature = "builder",
6613        builder(with = |value:impl Into<String>|vec![value.into()])
6614    )]
6615    pub description: Option<Vec<String>>,
6616    ///Property: Document
6617    #[serde(default)]
6618    #[cfg_attr(
6619        feature = "builder",
6620        builder(with = |value:impl Into<String>|vec![value.into()])
6621    )]
6622    pub document: Vec<String>,
6623    ///Property: End date
6624    #[serde(skip_serializing_if = "Option::is_none")]
6625    #[cfg_attr(
6626        feature = "builder",
6627        builder(with = |value:impl Into<String>|vec![value.into()])
6628    )]
6629    pub end_date: Option<Vec<String>>,
6630    ///Property: Entity
6631    #[serde(default)]
6632    #[cfg_attr(
6633        feature = "builder",
6634        builder(with = |value:impl Into<String>|vec![value.into()])
6635    )]
6636    pub entity: Vec<String>,
6637    ///Property: Index text
6638    #[serde(skip_serializing_if = "Option::is_none")]
6639    #[cfg_attr(
6640        feature = "builder",
6641        builder(with = |value:impl Into<String>|vec![value.into()])
6642    )]
6643    pub index_text: Option<Vec<String>>,
6644    ///Property: Modified on
6645    #[serde(skip_serializing_if = "Option::is_none")]
6646    #[cfg_attr(
6647        feature = "builder",
6648        builder(with = |value:impl Into<String>|vec![value.into()])
6649    )]
6650    pub modified_at: Option<Vec<String>>,
6651    ///Property: Detected names
6652    #[serde(skip_serializing_if = "Option::is_none")]
6653    #[cfg_attr(
6654        feature = "builder",
6655        builder(with = |value:impl Into<String>|vec![value.into()])
6656    )]
6657    pub names_mentioned: Option<Vec<String>>,
6658    ///Property: Source document
6659    #[serde(skip_serializing_if = "Option::is_none")]
6660    #[cfg_attr(
6661        feature = "builder",
6662        builder(with = |value:impl Into<String>|vec![value.into()])
6663    )]
6664    pub proof: Option<Vec<String>>,
6665    ///Property: Publishing source
6666    #[serde(skip_serializing_if = "Option::is_none")]
6667    #[cfg_attr(
6668        feature = "builder",
6669        builder(with = |value:impl Into<String>|vec![value.into()])
6670    )]
6671    pub publisher: Option<Vec<String>>,
6672    ///Property: Publishing source URL
6673    #[serde(skip_serializing_if = "Option::is_none")]
6674    #[cfg_attr(
6675        feature = "builder",
6676        builder(with = |value:impl Into<String>|vec![value.into()])
6677    )]
6678    pub publisher_url: Option<Vec<String>>,
6679    ///Property: Record ID
6680    #[serde(skip_serializing_if = "Option::is_none")]
6681    #[cfg_attr(
6682        feature = "builder",
6683        builder(with = |value:impl Into<String>|vec![value.into()])
6684    )]
6685    pub record_id: Option<Vec<String>>,
6686    ///Property: Retrieved on
6687    #[serde(skip_serializing_if = "Option::is_none")]
6688    #[cfg_attr(
6689        feature = "builder",
6690        builder(with = |value:impl Into<String>|vec![value.into()])
6691    )]
6692    pub retrieved_at: Option<Vec<String>>,
6693    ///Property: Role
6694    #[serde(skip_serializing_if = "Option::is_none")]
6695    #[cfg_attr(
6696        feature = "builder",
6697        builder(with = |value:impl Into<String>|vec![value.into()])
6698    )]
6699    pub role: Option<Vec<String>>,
6700    ///Property: Source link
6701    #[serde(skip_serializing_if = "Option::is_none")]
6702    #[cfg_attr(
6703        feature = "builder",
6704        builder(with = |value:impl Into<String>|vec![value.into()])
6705    )]
6706    pub source_url: Option<Vec<String>>,
6707    ///Property: Start date
6708    #[serde(skip_serializing_if = "Option::is_none")]
6709    #[cfg_attr(
6710        feature = "builder",
6711        builder(with = |value:impl Into<String>|vec![value.into()])
6712    )]
6713    pub start_date: Option<Vec<String>>,
6714    ///Property: Status
6715    #[serde(skip_serializing_if = "Option::is_none")]
6716    #[cfg_attr(
6717        feature = "builder",
6718        builder(with = |value:impl Into<String>|vec![value.into()])
6719    )]
6720    pub status: Option<Vec<String>>,
6721    ///Property: Summary
6722    #[serde(skip_serializing_if = "Option::is_none")]
6723    #[cfg_attr(
6724        feature = "builder",
6725        builder(with = |value:impl Into<String>|vec![value.into()])
6726    )]
6727    pub summary: Option<Vec<String>>,
6728}
6729impl Documentation {
6730    /// Create a new entity with the given ID
6731    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
6732    pub fn new(id: impl Into<String>) -> Self {
6733        Self {
6734            id: id.into(),
6735            schema: "Documentation".to_string(),
6736            aleph_url: None,
6737            date: None,
6738            description: None,
6739            document: Vec::new(),
6740            end_date: None,
6741            entity: Vec::new(),
6742            index_text: None,
6743            modified_at: None,
6744            names_mentioned: None,
6745            proof: None,
6746            publisher: None,
6747            publisher_url: None,
6748            record_id: None,
6749            retrieved_at: None,
6750            role: None,
6751            source_url: None,
6752            start_date: None,
6753            status: None,
6754            summary: None,
6755        }
6756    }
6757    /// Get the schema name
6758    pub fn schema_name() -> &'static str {
6759        "Documentation"
6760    }
6761    /// Serialize to standard FTM nested JSON format
6762    ///
6763    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
6764    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
6765        let mut value = serde_json::to_value(self)?;
6766        if let Some(obj) = value.as_object_mut() {
6767            let id = obj.remove("id");
6768            let schema = obj.remove("schema");
6769            let properties = serde_json::Value::Object(std::mem::take(obj));
6770            if let Some(id) = id {
6771                obj.insert("id".into(), id);
6772            }
6773            if let Some(schema) = schema {
6774                obj.insert("schema".into(), schema);
6775            }
6776            obj.insert("properties".into(), properties);
6777        }
6778        serde_json::to_string(&value)
6779    }
6780}
6781///FTM Schema: Customs declaration
6782#[derive(Debug, Clone, Serialize, Deserialize)]
6783#[cfg_attr(feature = "builder", derive(Builder))]
6784#[serde(rename_all = "camelCase")]
6785pub struct EconomicActivity {
6786    pub id: String,
6787    #[cfg_attr(feature = "builder", builder(default = "EconomicActivity".to_string()))]
6788    pub schema: String,
6789    ///Property: Aleph URL
6790    #[serde(skip_serializing_if = "Option::is_none")]
6791    #[cfg_attr(
6792        feature = "builder",
6793        builder(with = |value:impl Into<String>|vec![value.into()])
6794    )]
6795    pub aleph_url: Option<Vec<String>>,
6796    ///Property: Bank Account
6797    #[serde(skip_serializing_if = "Option::is_none")]
6798    #[cfg_attr(
6799        feature = "builder",
6800        builder(with = |value:impl Into<String>|vec![value.into()])
6801    )]
6802    pub bank_account: Option<Vec<String>>,
6803    ///Property: Foreign currency bank
6804    #[serde(skip_serializing_if = "Option::is_none")]
6805    #[cfg_attr(
6806        feature = "builder",
6807        builder(with = |value:impl Into<String>|vec![value.into()])
6808    )]
6809    pub bank_foreign: Option<Vec<String>>,
6810    ///Property: Rouble bank
6811    #[serde(skip_serializing_if = "Option::is_none")]
6812    #[cfg_attr(
6813        feature = "builder",
6814        builder(with = |value:impl Into<String>|vec![value.into()])
6815    )]
6816    pub bank_rub: Option<Vec<String>>,
6817    ///Property: Customs Cargo Declaration Number
6818    #[serde(skip_serializing_if = "Option::is_none")]
6819    #[cfg_attr(
6820        feature = "builder",
6821        builder(with = |value:impl Into<String>|vec![value.into()])
6822    )]
6823    pub ccd_number: Option<Vec<String>>,
6824    ///Property: CCD Value
6825    #[serde(skip_serializing_if = "Option::is_none")]
6826    #[cfg_attr(
6827        feature = "builder",
6828        builder(with = |value:impl Into<String>|vec![value.into()])
6829    )]
6830    pub ccd_value: Option<Vec<String>>,
6831    ///Property: Contract
6832    #[serde(skip_serializing_if = "Option::is_none")]
6833    #[cfg_attr(
6834        feature = "builder",
6835        builder(with = |value:impl Into<String>|vec![value.into()])
6836    )]
6837    pub contract: Option<Vec<String>>,
6838    ///Property: Contract holder
6839    #[serde(skip_serializing_if = "Option::is_none")]
6840    #[cfg_attr(
6841        feature = "builder",
6842        builder(with = |value:impl Into<String>|vec![value.into()])
6843    )]
6844    pub contract_holder: Option<Vec<String>>,
6845    ///Property: Customs Value Amount
6846    #[serde(skip_serializing_if = "Option::is_none")]
6847    #[cfg_attr(
6848        feature = "builder",
6849        builder(with = |value:impl Into<String>|vec![value.into()])
6850    )]
6851    pub customs_amount: Option<Vec<String>>,
6852    ///Property: Customs Procedure
6853    #[serde(skip_serializing_if = "Option::is_none")]
6854    #[cfg_attr(
6855        feature = "builder",
6856        builder(with = |value:impl Into<String>|vec![value.into()])
6857    )]
6858    pub customs_procedure: Option<Vec<String>>,
6859    ///Property: Date
6860    #[serde(skip_serializing_if = "Option::is_none")]
6861    #[cfg_attr(
6862        feature = "builder",
6863        builder(with = |value:impl Into<String>|vec![value.into()])
6864    )]
6865    pub date: Option<Vec<String>>,
6866    ///Property: Declarant
6867    #[serde(skip_serializing_if = "Option::is_none")]
6868    #[cfg_attr(
6869        feature = "builder",
6870        builder(with = |value:impl Into<String>|vec![value.into()])
6871    )]
6872    pub declarant: Option<Vec<String>>,
6873    ///Property: Country of departure
6874    #[serde(skip_serializing_if = "Option::is_none")]
6875    #[cfg_attr(
6876        feature = "builder",
6877        builder(with = |value:impl Into<String>|vec![value.into()])
6878    )]
6879    pub departure_country: Option<Vec<String>>,
6880    ///Property: Description
6881    #[serde(skip_serializing_if = "Option::is_none")]
6882    #[cfg_attr(
6883        feature = "builder",
6884        builder(with = |value:impl Into<String>|vec![value.into()])
6885    )]
6886    pub description: Option<Vec<String>>,
6887    ///Property: Country of destination
6888    #[serde(skip_serializing_if = "Option::is_none")]
6889    #[cfg_attr(
6890        feature = "builder",
6891        builder(with = |value:impl Into<String>|vec![value.into()])
6892    )]
6893    pub destination_country: Option<Vec<String>>,
6894    ///Property: Direction of transportation
6895    #[serde(skip_serializing_if = "Option::is_none")]
6896    #[cfg_attr(
6897        feature = "builder",
6898        builder(with = |value:impl Into<String>|vec![value.into()])
6899    )]
6900    pub direction_of_transportation: Option<Vec<String>>,
6901    ///Property: USD Exchange Rate
6902    #[serde(skip_serializing_if = "Option::is_none")]
6903    #[cfg_attr(
6904        feature = "builder",
6905        builder(with = |value:impl Into<String>|vec![value.into()])
6906    )]
6907    pub dollar_exch_rate: Option<Vec<String>>,
6908    ///Property: End date
6909    #[serde(skip_serializing_if = "Option::is_none")]
6910    #[cfg_attr(
6911        feature = "builder",
6912        builder(with = |value:impl Into<String>|vec![value.into()])
6913    )]
6914    pub end_date: Option<Vec<String>>,
6915    ///Property: Description of goods
6916    #[serde(skip_serializing_if = "Option::is_none")]
6917    #[cfg_attr(
6918        feature = "builder",
6919        builder(with = |value:impl Into<String>|vec![value.into()])
6920    )]
6921    pub goods_description: Option<Vec<String>>,
6922    ///Property: Index text
6923    #[serde(skip_serializing_if = "Option::is_none")]
6924    #[cfg_attr(
6925        feature = "builder",
6926        builder(with = |value:impl Into<String>|vec![value.into()])
6927    )]
6928    pub index_text: Option<Vec<String>>,
6929    ///Property: Invoice Value Amount
6930    #[serde(skip_serializing_if = "Option::is_none")]
6931    #[cfg_attr(
6932        feature = "builder",
6933        builder(with = |value:impl Into<String>|vec![value.into()])
6934    )]
6935    pub invoice_amount: Option<Vec<String>>,
6936    ///Property: Modified on
6937    #[serde(skip_serializing_if = "Option::is_none")]
6938    #[cfg_attr(
6939        feature = "builder",
6940        builder(with = |value:impl Into<String>|vec![value.into()])
6941    )]
6942    pub modified_at: Option<Vec<String>>,
6943    ///Property: Detected names
6944    #[serde(skip_serializing_if = "Option::is_none")]
6945    #[cfg_attr(
6946        feature = "builder",
6947        builder(with = |value:impl Into<String>|vec![value.into()])
6948    )]
6949    pub names_mentioned: Option<Vec<String>>,
6950    ///Property: Country of origin
6951    #[serde(skip_serializing_if = "Option::is_none")]
6952    #[cfg_attr(
6953        feature = "builder",
6954        builder(with = |value:impl Into<String>|vec![value.into()])
6955    )]
6956    pub origin_country: Option<Vec<String>>,
6957    ///Property: Source document
6958    #[serde(skip_serializing_if = "Option::is_none")]
6959    #[cfg_attr(
6960        feature = "builder",
6961        builder(with = |value:impl Into<String>|vec![value.into()])
6962    )]
6963    pub proof: Option<Vec<String>>,
6964    ///Property: Publishing source
6965    #[serde(skip_serializing_if = "Option::is_none")]
6966    #[cfg_attr(
6967        feature = "builder",
6968        builder(with = |value:impl Into<String>|vec![value.into()])
6969    )]
6970    pub publisher: Option<Vec<String>>,
6971    ///Property: Publishing source URL
6972    #[serde(skip_serializing_if = "Option::is_none")]
6973    #[cfg_attr(
6974        feature = "builder",
6975        builder(with = |value:impl Into<String>|vec![value.into()])
6976    )]
6977    pub publisher_url: Option<Vec<String>>,
6978    ///Property: Receiver
6979    #[serde(skip_serializing_if = "Option::is_none")]
6980    #[cfg_attr(
6981        feature = "builder",
6982        builder(with = |value:impl Into<String>|vec![value.into()])
6983    )]
6984    pub receiver: Option<Vec<String>>,
6985    ///Property: Record ID
6986    #[serde(skip_serializing_if = "Option::is_none")]
6987    #[cfg_attr(
6988        feature = "builder",
6989        builder(with = |value:impl Into<String>|vec![value.into()])
6990    )]
6991    pub record_id: Option<Vec<String>>,
6992    ///Property: Retrieved on
6993    #[serde(skip_serializing_if = "Option::is_none")]
6994    #[cfg_attr(
6995        feature = "builder",
6996        builder(with = |value:impl Into<String>|vec![value.into()])
6997    )]
6998    pub retrieved_at: Option<Vec<String>>,
6999    ///Property: Sender
7000    #[serde(skip_serializing_if = "Option::is_none")]
7001    #[cfg_attr(
7002        feature = "builder",
7003        builder(with = |value:impl Into<String>|vec![value.into()])
7004    )]
7005    pub sender: Option<Vec<String>>,
7006    ///Property: Source link
7007    #[serde(skip_serializing_if = "Option::is_none")]
7008    #[cfg_attr(
7009        feature = "builder",
7010        builder(with = |value:impl Into<String>|vec![value.into()])
7011    )]
7012    pub source_url: Option<Vec<String>>,
7013    ///Property: Start date
7014    #[serde(skip_serializing_if = "Option::is_none")]
7015    #[cfg_attr(
7016        feature = "builder",
7017        builder(with = |value:impl Into<String>|vec![value.into()])
7018    )]
7019    pub start_date: Option<Vec<String>>,
7020    ///Property: Summary
7021    #[serde(skip_serializing_if = "Option::is_none")]
7022    #[cfg_attr(
7023        feature = "builder",
7024        builder(with = |value:impl Into<String>|vec![value.into()])
7025    )]
7026    pub summary: Option<Vec<String>>,
7027    ///Property: Trading Country
7028    #[serde(skip_serializing_if = "Option::is_none")]
7029    #[cfg_attr(
7030        feature = "builder",
7031        builder(with = |value:impl Into<String>|vec![value.into()])
7032    )]
7033    pub trading_country: Option<Vec<String>>,
7034    ///Property: Transport
7035    #[serde(skip_serializing_if = "Option::is_none")]
7036    #[cfg_attr(
7037        feature = "builder",
7038        builder(with = |value:impl Into<String>|vec![value.into()])
7039    )]
7040    pub transport: Option<Vec<String>>,
7041    ///Property: FEAC Code
7042    #[serde(skip_serializing_if = "Option::is_none")]
7043    #[cfg_attr(
7044        feature = "builder",
7045        builder(with = |value:impl Into<String>|vec![value.into()])
7046    )]
7047    pub ved_code: Option<Vec<String>>,
7048    ///Property: FEAC Code description
7049    #[serde(skip_serializing_if = "Option::is_none")]
7050    #[cfg_attr(
7051        feature = "builder",
7052        builder(with = |value:impl Into<String>|vec![value.into()])
7053    )]
7054    pub ved_code_description: Option<Vec<String>>,
7055}
7056impl EconomicActivity {
7057    /// Create a new entity with the given ID
7058    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
7059    pub fn new(id: impl Into<String>) -> Self {
7060        Self {
7061            id: id.into(),
7062            schema: "EconomicActivity".to_string(),
7063            aleph_url: None,
7064            bank_account: None,
7065            bank_foreign: None,
7066            bank_rub: None,
7067            ccd_number: None,
7068            ccd_value: None,
7069            contract: None,
7070            contract_holder: None,
7071            customs_amount: None,
7072            customs_procedure: None,
7073            date: None,
7074            declarant: None,
7075            departure_country: None,
7076            description: None,
7077            destination_country: None,
7078            direction_of_transportation: None,
7079            dollar_exch_rate: None,
7080            end_date: None,
7081            goods_description: None,
7082            index_text: None,
7083            invoice_amount: None,
7084            modified_at: None,
7085            names_mentioned: None,
7086            origin_country: None,
7087            proof: None,
7088            publisher: None,
7089            publisher_url: None,
7090            receiver: None,
7091            record_id: None,
7092            retrieved_at: None,
7093            sender: None,
7094            source_url: None,
7095            start_date: None,
7096            summary: None,
7097            trading_country: None,
7098            transport: None,
7099            ved_code: None,
7100            ved_code_description: None,
7101        }
7102    }
7103    /// Get the schema name
7104    pub fn schema_name() -> &'static str {
7105        "EconomicActivity"
7106    }
7107    /// Serialize to standard FTM nested JSON format
7108    ///
7109    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
7110    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
7111        let mut value = serde_json::to_value(self)?;
7112        if let Some(obj) = value.as_object_mut() {
7113            let id = obj.remove("id");
7114            let schema = obj.remove("schema");
7115            let properties = serde_json::Value::Object(std::mem::take(obj));
7116            if let Some(id) = id {
7117                obj.insert("id".into(), id);
7118            }
7119            if let Some(schema) = schema {
7120                obj.insert("schema".into(), schema);
7121            }
7122            obj.insert("properties".into(), properties);
7123        }
7124        serde_json::to_string(&value)
7125    }
7126}
7127///FTM Schema: E-Mail
7128#[derive(Debug, Clone, Serialize, Deserialize)]
7129#[cfg_attr(feature = "builder", derive(Builder))]
7130#[serde(rename_all = "camelCase")]
7131pub struct Email {
7132    pub id: String,
7133    #[cfg_attr(feature = "builder", builder(default = "Email".to_string()))]
7134    pub schema: String,
7135    ///Property: Address
7136    #[serde(skip_serializing_if = "Option::is_none")]
7137    #[cfg_attr(
7138        feature = "builder",
7139        builder(with = |value:impl Into<String>|vec![value.into()])
7140    )]
7141    pub address: Option<Vec<String>>,
7142    ///Property: Address
7143    #[serde(skip_serializing_if = "Option::is_none")]
7144    #[cfg_attr(
7145        feature = "builder",
7146        builder(with = |value:impl Into<String>|vec![value.into()])
7147    )]
7148    pub address_entity: Option<Vec<String>>,
7149    ///Property: Aleph URL
7150    #[serde(skip_serializing_if = "Option::is_none")]
7151    #[cfg_attr(
7152        feature = "builder",
7153        builder(with = |value:impl Into<String>|vec![value.into()])
7154    )]
7155    pub aleph_url: Option<Vec<String>>,
7156    ///Property: Alias
7157    #[serde(skip_serializing_if = "Option::is_none")]
7158    #[cfg_attr(
7159        feature = "builder",
7160        builder(with = |value:impl Into<String>|vec![value.into()])
7161    )]
7162    pub alias: Option<Vec<String>>,
7163    ///Property: Ancestors
7164    #[serde(skip_serializing_if = "Option::is_none")]
7165    #[cfg_attr(
7166        feature = "builder",
7167        builder(with = |value:impl Into<String>|vec![value.into()])
7168    )]
7169    pub ancestors: Option<Vec<String>>,
7170    ///Property: Author
7171    #[serde(skip_serializing_if = "Option::is_none")]
7172    #[cfg_attr(
7173        feature = "builder",
7174        builder(with = |value:impl Into<String>|vec![value.into()])
7175    )]
7176    pub author: Option<Vec<String>>,
7177    ///Property: Authored on
7178    #[serde(skip_serializing_if = "Option::is_none")]
7179    #[cfg_attr(
7180        feature = "builder",
7181        builder(with = |value:impl Into<String>|vec![value.into()])
7182    )]
7183    pub authored_at: Option<Vec<String>>,
7184    ///Property: BCC
7185    #[serde(skip_serializing_if = "Option::is_none")]
7186    #[cfg_attr(
7187        feature = "builder",
7188        builder(with = |value:impl Into<String>|vec![value.into()])
7189    )]
7190    pub bcc: Option<Vec<String>>,
7191    ///Property: HTML
7192    #[serde(skip_serializing_if = "Option::is_none")]
7193    #[cfg_attr(
7194        feature = "builder",
7195        builder(with = |value:impl Into<String>|vec![value.into()])
7196    )]
7197    pub body_html: Option<Vec<String>>,
7198    ///Property: Text
7199    #[serde(skip_serializing_if = "Option::is_none")]
7200    #[cfg_attr(
7201        feature = "builder",
7202        builder(with = |value:impl Into<String>|vec![value.into()])
7203    )]
7204    pub body_text: Option<Vec<String>>,
7205    ///Property: CC
7206    #[serde(skip_serializing_if = "Option::is_none")]
7207    #[cfg_attr(
7208        feature = "builder",
7209        builder(with = |value:impl Into<String>|vec![value.into()])
7210    )]
7211    pub cc: Option<Vec<String>>,
7212    ///Property: Detected companies
7213    #[serde(skip_serializing_if = "Option::is_none")]
7214    #[cfg_attr(
7215        feature = "builder",
7216        builder(with = |value:impl Into<String>|vec![value.into()])
7217    )]
7218    pub companies_mentioned: Option<Vec<String>>,
7219    ///Property: Checksum
7220    #[serde(skip_serializing_if = "Option::is_none")]
7221    #[cfg_attr(
7222        feature = "builder",
7223        builder(with = |value:impl Into<String>|vec![value.into()])
7224    )]
7225    pub content_hash: Option<Vec<String>>,
7226    ///Property: Country
7227    #[serde(skip_serializing_if = "Option::is_none")]
7228    #[cfg_attr(
7229        feature = "builder",
7230        builder(with = |value:impl Into<String>|vec![value.into()])
7231    )]
7232    pub country: Option<Vec<String>>,
7233    ///Property: Crawler
7234    #[serde(skip_serializing_if = "Option::is_none")]
7235    #[cfg_attr(
7236        feature = "builder",
7237        builder(with = |value:impl Into<String>|vec![value.into()])
7238    )]
7239    pub crawler: Option<Vec<String>>,
7240    ///Property: Created at
7241    #[serde(skip_serializing_if = "Option::is_none")]
7242    #[cfg_attr(
7243        feature = "builder",
7244        builder(with = |value:impl Into<String>|vec![value.into()])
7245    )]
7246    pub created_at: Option<Vec<String>>,
7247    ///Property: Date
7248    #[serde(skip_serializing_if = "Option::is_none")]
7249    #[cfg_attr(
7250        feature = "builder",
7251        builder(with = |value:impl Into<String>|vec![value.into()])
7252    )]
7253    pub date: Option<Vec<String>>,
7254    ///Property: Description
7255    #[serde(skip_serializing_if = "Option::is_none")]
7256    #[cfg_attr(
7257        feature = "builder",
7258        builder(with = |value:impl Into<String>|vec![value.into()])
7259    )]
7260    pub description: Option<Vec<String>>,
7261    ///Property: Detected country
7262    #[serde(skip_serializing_if = "Option::is_none")]
7263    #[cfg_attr(
7264        feature = "builder",
7265        builder(with = |value:impl Into<String>|vec![value.into()])
7266    )]
7267    pub detected_country: Option<Vec<String>>,
7268    ///Property: Detected language
7269    #[serde(skip_serializing_if = "Option::is_none")]
7270    #[cfg_attr(
7271        feature = "builder",
7272        builder(with = |value:impl Into<String>|vec![value.into()])
7273    )]
7274    pub detected_language: Option<Vec<String>>,
7275    ///Property: Detected e-mail addresses
7276    #[serde(skip_serializing_if = "Option::is_none")]
7277    #[cfg_attr(
7278        feature = "builder",
7279        builder(with = |value:impl Into<String>|vec![value.into()])
7280    )]
7281    pub email_mentioned: Option<Vec<String>>,
7282    ///Property: Emitter
7283    #[serde(skip_serializing_if = "Option::is_none")]
7284    #[cfg_attr(
7285        feature = "builder",
7286        builder(with = |value:impl Into<String>|vec![value.into()])
7287    )]
7288    pub emitters: Option<Vec<String>>,
7289    ///Property: File encoding
7290    #[serde(skip_serializing_if = "Option::is_none")]
7291    #[cfg_attr(
7292        feature = "builder",
7293        builder(with = |value:impl Into<String>|vec![value.into()])
7294    )]
7295    pub encoding: Option<Vec<String>>,
7296    ///Property: File extension
7297    #[serde(skip_serializing_if = "Option::is_none")]
7298    #[cfg_attr(
7299        feature = "builder",
7300        builder(with = |value:impl Into<String>|vec![value.into()])
7301    )]
7302    pub extension: Option<Vec<String>>,
7303    ///Property: File name
7304    #[serde(default)]
7305    #[cfg_attr(
7306        feature = "builder",
7307        builder(with = |value:impl Into<String>|vec![value.into()])
7308    )]
7309    pub file_name: Vec<String>,
7310    ///Property: File size
7311    #[serde(
7312        skip_serializing_if = "Option::is_none",
7313        deserialize_with = "deserialize_opt_f64_vec",
7314        default
7315    )]
7316    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
7317    pub file_size: Option<Vec<f64>>,
7318    ///Property: From
7319    #[serde(skip_serializing_if = "Option::is_none")]
7320    #[cfg_attr(
7321        feature = "builder",
7322        builder(with = |value:impl Into<String>|vec![value.into()])
7323    )]
7324    pub from: Option<Vec<String>>,
7325    ///Property: Generator
7326    #[serde(skip_serializing_if = "Option::is_none")]
7327    #[cfg_attr(
7328        feature = "builder",
7329        builder(with = |value:impl Into<String>|vec![value.into()])
7330    )]
7331    pub generator: Option<Vec<String>>,
7332    ///Property: Raw headers
7333    #[serde(skip_serializing_if = "Option::is_none")]
7334    pub headers: Option<serde_json::Value>,
7335    ///Property: Detected IBANs
7336    #[serde(skip_serializing_if = "Option::is_none")]
7337    #[cfg_attr(
7338        feature = "builder",
7339        builder(with = |value:impl Into<String>|vec![value.into()])
7340    )]
7341    pub iban_mentioned: Option<Vec<String>>,
7342    ///Property: In Reply To
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 in_reply_to: Option<Vec<String>>,
7349    ///Property: Responding to
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 in_reply_to_email: Option<Vec<String>>,
7356    ///Property: Index text
7357    #[serde(skip_serializing_if = "Option::is_none")]
7358    #[cfg_attr(
7359        feature = "builder",
7360        builder(with = |value:impl Into<String>|vec![value.into()])
7361    )]
7362    pub index_text: Option<Vec<String>>,
7363    ///Property: Detected IP addresses
7364    #[serde(skip_serializing_if = "Option::is_none")]
7365    #[cfg_attr(
7366        feature = "builder",
7367        builder(with = |value:impl Into<String>|vec![value.into()])
7368    )]
7369    pub ip_mentioned: Option<Vec<String>>,
7370    ///Property: Keywords
7371    #[serde(skip_serializing_if = "Option::is_none")]
7372    #[cfg_attr(
7373        feature = "builder",
7374        builder(with = |value:impl Into<String>|vec![value.into()])
7375    )]
7376    pub keywords: Option<Vec<String>>,
7377    ///Property: Language
7378    #[serde(skip_serializing_if = "Option::is_none")]
7379    #[cfg_attr(
7380        feature = "builder",
7381        builder(with = |value:impl Into<String>|vec![value.into()])
7382    )]
7383    pub language: Option<Vec<String>>,
7384    ///Property: Detected locations
7385    #[serde(skip_serializing_if = "Option::is_none")]
7386    #[cfg_attr(
7387        feature = "builder",
7388        builder(with = |value:impl Into<String>|vec![value.into()])
7389    )]
7390    pub location_mentioned: Option<Vec<String>>,
7391    ///Property: Message ID
7392    #[serde(skip_serializing_if = "Option::is_none")]
7393    #[cfg_attr(
7394        feature = "builder",
7395        builder(with = |value:impl Into<String>|vec![value.into()])
7396    )]
7397    pub message_id: Option<Vec<String>>,
7398    ///Property: MIME type
7399    #[serde(skip_serializing_if = "Option::is_none")]
7400    #[cfg_attr(
7401        feature = "builder",
7402        builder(with = |value:impl Into<String>|vec![value.into()])
7403    )]
7404    pub mime_type: Option<Vec<String>>,
7405    ///Property: Modified on
7406    #[serde(skip_serializing_if = "Option::is_none")]
7407    #[cfg_attr(
7408        feature = "builder",
7409        builder(with = |value:impl Into<String>|vec![value.into()])
7410    )]
7411    pub modified_at: Option<Vec<String>>,
7412    ///Property: Name
7413    #[serde(default)]
7414    #[cfg_attr(
7415        feature = "builder",
7416        builder(with = |value:impl Into<String>|vec![value.into()])
7417    )]
7418    pub name: Vec<String>,
7419    ///Property: Detected names
7420    #[serde(skip_serializing_if = "Option::is_none")]
7421    #[cfg_attr(
7422        feature = "builder",
7423        builder(with = |value:impl Into<String>|vec![value.into()])
7424    )]
7425    pub names_mentioned: Option<Vec<String>>,
7426    ///Property: Notes
7427    #[serde(skip_serializing_if = "Option::is_none")]
7428    #[cfg_attr(
7429        feature = "builder",
7430        builder(with = |value:impl Into<String>|vec![value.into()])
7431    )]
7432    pub notes: Option<Vec<String>>,
7433    ///Property: Folder
7434    #[serde(skip_serializing_if = "Option::is_none")]
7435    #[cfg_attr(
7436        feature = "builder",
7437        builder(with = |value:impl Into<String>|vec![value.into()])
7438    )]
7439    pub parent: Option<Vec<String>>,
7440    ///Property: Detected people
7441    #[serde(skip_serializing_if = "Option::is_none")]
7442    #[cfg_attr(
7443        feature = "builder",
7444        builder(with = |value:impl Into<String>|vec![value.into()])
7445    )]
7446    pub people_mentioned: Option<Vec<String>>,
7447    ///Property: Detected phones
7448    #[serde(skip_serializing_if = "Option::is_none")]
7449    #[cfg_attr(
7450        feature = "builder",
7451        builder(with = |value:impl Into<String>|vec![value.into()])
7452    )]
7453    pub phone_mentioned: Option<Vec<String>>,
7454    ///Property: Previous name
7455    #[serde(skip_serializing_if = "Option::is_none")]
7456    #[cfg_attr(
7457        feature = "builder",
7458        builder(with = |value:impl Into<String>|vec![value.into()])
7459    )]
7460    pub previous_name: Option<Vec<String>>,
7461    ///Property: Processed at
7462    #[serde(skip_serializing_if = "Option::is_none")]
7463    #[cfg_attr(
7464        feature = "builder",
7465        builder(with = |value:impl Into<String>|vec![value.into()])
7466    )]
7467    pub processed_at: Option<Vec<String>>,
7468    ///Property: Processing agent
7469    #[serde(skip_serializing_if = "Option::is_none")]
7470    #[cfg_attr(
7471        feature = "builder",
7472        builder(with = |value:impl Into<String>|vec![value.into()])
7473    )]
7474    pub processing_agent: Option<Vec<String>>,
7475    ///Property: Processing error
7476    #[serde(skip_serializing_if = "Option::is_none")]
7477    #[cfg_attr(
7478        feature = "builder",
7479        builder(with = |value:impl Into<String>|vec![value.into()])
7480    )]
7481    pub processing_error: Option<Vec<String>>,
7482    ///Property: Processing status
7483    #[serde(skip_serializing_if = "Option::is_none")]
7484    #[cfg_attr(
7485        feature = "builder",
7486        builder(with = |value:impl Into<String>|vec![value.into()])
7487    )]
7488    pub processing_status: Option<Vec<String>>,
7489    ///Property: Program
7490    #[serde(skip_serializing_if = "Option::is_none")]
7491    #[cfg_attr(
7492        feature = "builder",
7493        builder(with = |value:impl Into<String>|vec![value.into()])
7494    )]
7495    pub program: Option<Vec<String>>,
7496    ///Property: Program ID
7497    #[serde(skip_serializing_if = "Option::is_none")]
7498    #[cfg_attr(
7499        feature = "builder",
7500        builder(with = |value:impl Into<String>|vec![value.into()])
7501    )]
7502    pub program_id: Option<Vec<String>>,
7503    ///Property: Source document
7504    #[serde(skip_serializing_if = "Option::is_none")]
7505    #[cfg_attr(
7506        feature = "builder",
7507        builder(with = |value:impl Into<String>|vec![value.into()])
7508    )]
7509    pub proof: Option<Vec<String>>,
7510    ///Property: Published on
7511    #[serde(skip_serializing_if = "Option::is_none")]
7512    #[cfg_attr(
7513        feature = "builder",
7514        builder(with = |value:impl Into<String>|vec![value.into()])
7515    )]
7516    pub published_at: Option<Vec<String>>,
7517    ///Property: Publishing source
7518    #[serde(skip_serializing_if = "Option::is_none")]
7519    #[cfg_attr(
7520        feature = "builder",
7521        builder(with = |value:impl Into<String>|vec![value.into()])
7522    )]
7523    pub publisher: Option<Vec<String>>,
7524    ///Property: Publishing source URL
7525    #[serde(skip_serializing_if = "Option::is_none")]
7526    #[cfg_attr(
7527        feature = "builder",
7528        builder(with = |value:impl Into<String>|vec![value.into()])
7529    )]
7530    pub publisher_url: Option<Vec<String>>,
7531    ///Property: Recipients
7532    #[serde(skip_serializing_if = "Option::is_none")]
7533    #[cfg_attr(
7534        feature = "builder",
7535        builder(with = |value:impl Into<String>|vec![value.into()])
7536    )]
7537    pub recipients: Option<Vec<String>>,
7538    ///Property: Retrieved on
7539    #[serde(skip_serializing_if = "Option::is_none")]
7540    #[cfg_attr(
7541        feature = "builder",
7542        builder(with = |value:impl Into<String>|vec![value.into()])
7543    )]
7544    pub retrieved_at: Option<Vec<String>>,
7545    ///Property: Sender
7546    #[serde(skip_serializing_if = "Option::is_none")]
7547    #[cfg_attr(
7548        feature = "builder",
7549        builder(with = |value:impl Into<String>|vec![value.into()])
7550    )]
7551    pub sender: Option<Vec<String>>,
7552    ///Property: Source link
7553    #[serde(skip_serializing_if = "Option::is_none")]
7554    #[cfg_attr(
7555        feature = "builder",
7556        builder(with = |value:impl Into<String>|vec![value.into()])
7557    )]
7558    pub source_url: Option<Vec<String>>,
7559    ///Property: Subject
7560    #[serde(skip_serializing_if = "Option::is_none")]
7561    #[cfg_attr(
7562        feature = "builder",
7563        builder(with = |value:impl Into<String>|vec![value.into()])
7564    )]
7565    pub subject: Option<Vec<String>>,
7566    ///Property: Summary
7567    #[serde(skip_serializing_if = "Option::is_none")]
7568    #[cfg_attr(
7569        feature = "builder",
7570        builder(with = |value:impl Into<String>|vec![value.into()])
7571    )]
7572    pub summary: Option<Vec<String>>,
7573    ///Property: Thread topic
7574    #[serde(skip_serializing_if = "Option::is_none")]
7575    #[cfg_attr(
7576        feature = "builder",
7577        builder(with = |value:impl Into<String>|vec![value.into()])
7578    )]
7579    pub thread_topic: Option<Vec<String>>,
7580    ///Property: Title
7581    #[serde(skip_serializing_if = "Option::is_none")]
7582    #[cfg_attr(
7583        feature = "builder",
7584        builder(with = |value:impl Into<String>|vec![value.into()])
7585    )]
7586    pub title: Option<Vec<String>>,
7587    ///Property: To
7588    #[serde(skip_serializing_if = "Option::is_none")]
7589    #[cfg_attr(
7590        feature = "builder",
7591        builder(with = |value:impl Into<String>|vec![value.into()])
7592    )]
7593    pub to: Option<Vec<String>>,
7594    ///Property: Topics
7595    #[serde(skip_serializing_if = "Option::is_none")]
7596    #[cfg_attr(
7597        feature = "builder",
7598        builder(with = |value:impl Into<String>|vec![value.into()])
7599    )]
7600    pub topics: Option<Vec<String>>,
7601    ///Property: The language of the translated text
7602    #[serde(skip_serializing_if = "Option::is_none")]
7603    #[cfg_attr(
7604        feature = "builder",
7605        builder(with = |value:impl Into<String>|vec![value.into()])
7606    )]
7607    pub translated_language: Option<Vec<String>>,
7608    ///Property: Translated version of the body text
7609    #[serde(skip_serializing_if = "Option::is_none")]
7610    #[cfg_attr(
7611        feature = "builder",
7612        builder(with = |value:impl Into<String>|vec![value.into()])
7613    )]
7614    pub translated_text: Option<Vec<String>>,
7615    ///Property: Weak alias
7616    #[serde(skip_serializing_if = "Option::is_none")]
7617    #[cfg_attr(
7618        feature = "builder",
7619        builder(with = |value:impl Into<String>|vec![value.into()])
7620    )]
7621    pub weak_alias: Option<Vec<String>>,
7622    ///Property: Wikidata ID
7623    #[serde(skip_serializing_if = "Option::is_none")]
7624    #[cfg_attr(
7625        feature = "builder",
7626        builder(with = |value:impl Into<String>|vec![value.into()])
7627    )]
7628    pub wikidata_id: Option<Vec<String>>,
7629    ///Property: Wikipedia Article
7630    #[serde(skip_serializing_if = "Option::is_none")]
7631    #[cfg_attr(
7632        feature = "builder",
7633        builder(with = |value:impl Into<String>|vec![value.into()])
7634    )]
7635    pub wikipedia_url: Option<Vec<String>>,
7636}
7637impl Email {
7638    /// Create a new entity with the given ID
7639    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
7640    pub fn new(id: impl Into<String>) -> Self {
7641        Self {
7642            id: id.into(),
7643            schema: "Email".to_string(),
7644            address: None,
7645            address_entity: None,
7646            aleph_url: None,
7647            alias: None,
7648            ancestors: None,
7649            author: None,
7650            authored_at: None,
7651            bcc: None,
7652            body_html: None,
7653            body_text: None,
7654            cc: None,
7655            companies_mentioned: None,
7656            content_hash: None,
7657            country: None,
7658            crawler: None,
7659            created_at: None,
7660            date: None,
7661            description: None,
7662            detected_country: None,
7663            detected_language: None,
7664            email_mentioned: None,
7665            emitters: None,
7666            encoding: None,
7667            extension: None,
7668            file_name: Vec::new(),
7669            file_size: None,
7670            from: None,
7671            generator: None,
7672            headers: None,
7673            iban_mentioned: None,
7674            in_reply_to: None,
7675            in_reply_to_email: None,
7676            index_text: None,
7677            ip_mentioned: None,
7678            keywords: None,
7679            language: None,
7680            location_mentioned: None,
7681            message_id: None,
7682            mime_type: None,
7683            modified_at: None,
7684            name: Vec::new(),
7685            names_mentioned: None,
7686            notes: None,
7687            parent: None,
7688            people_mentioned: None,
7689            phone_mentioned: None,
7690            previous_name: None,
7691            processed_at: None,
7692            processing_agent: None,
7693            processing_error: None,
7694            processing_status: None,
7695            program: None,
7696            program_id: None,
7697            proof: None,
7698            published_at: None,
7699            publisher: None,
7700            publisher_url: None,
7701            recipients: None,
7702            retrieved_at: None,
7703            sender: None,
7704            source_url: None,
7705            subject: None,
7706            summary: None,
7707            thread_topic: None,
7708            title: None,
7709            to: None,
7710            topics: None,
7711            translated_language: None,
7712            translated_text: None,
7713            weak_alias: None,
7714            wikidata_id: None,
7715            wikipedia_url: None,
7716        }
7717    }
7718    /// Get the schema name
7719    pub fn schema_name() -> &'static str {
7720        "Email"
7721    }
7722    /// Serialize to standard FTM nested JSON format
7723    ///
7724    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
7725    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
7726        let mut value = serde_json::to_value(self)?;
7727        if let Some(obj) = value.as_object_mut() {
7728            let id = obj.remove("id");
7729            let schema = obj.remove("schema");
7730            let properties = serde_json::Value::Object(std::mem::take(obj));
7731            if let Some(id) = id {
7732                obj.insert("id".into(), id);
7733            }
7734            if let Some(schema) = schema {
7735                obj.insert("schema".into(), schema);
7736            }
7737            obj.insert("properties".into(), properties);
7738        }
7739        serde_json::to_string(&value)
7740    }
7741}
7742///FTM Schema: Employment
7743#[derive(Debug, Clone, Serialize, Deserialize)]
7744#[cfg_attr(feature = "builder", derive(Builder))]
7745#[serde(rename_all = "camelCase")]
7746pub struct Employment {
7747    pub id: String,
7748    #[cfg_attr(feature = "builder", builder(default = "Employment".to_string()))]
7749    pub schema: String,
7750    ///Property: Aleph URL
7751    #[serde(skip_serializing_if = "Option::is_none")]
7752    #[cfg_attr(
7753        feature = "builder",
7754        builder(with = |value:impl Into<String>|vec![value.into()])
7755    )]
7756    pub aleph_url: Option<Vec<String>>,
7757    ///Property: Date
7758    #[serde(skip_serializing_if = "Option::is_none")]
7759    #[cfg_attr(
7760        feature = "builder",
7761        builder(with = |value:impl Into<String>|vec![value.into()])
7762    )]
7763    pub date: Option<Vec<String>>,
7764    ///Property: Description
7765    #[serde(skip_serializing_if = "Option::is_none")]
7766    #[cfg_attr(
7767        feature = "builder",
7768        builder(with = |value:impl Into<String>|vec![value.into()])
7769    )]
7770    pub description: Option<Vec<String>>,
7771    ///Property: Employee
7772    #[serde(default)]
7773    #[cfg_attr(
7774        feature = "builder",
7775        builder(with = |value:impl Into<String>|vec![value.into()])
7776    )]
7777    pub employee: Vec<String>,
7778    ///Property: Employer
7779    #[serde(default)]
7780    #[cfg_attr(
7781        feature = "builder",
7782        builder(with = |value:impl Into<String>|vec![value.into()])
7783    )]
7784    pub employer: Vec<String>,
7785    ///Property: End date
7786    #[serde(skip_serializing_if = "Option::is_none")]
7787    #[cfg_attr(
7788        feature = "builder",
7789        builder(with = |value:impl Into<String>|vec![value.into()])
7790    )]
7791    pub end_date: Option<Vec<String>>,
7792    ///Property: Index text
7793    #[serde(skip_serializing_if = "Option::is_none")]
7794    #[cfg_attr(
7795        feature = "builder",
7796        builder(with = |value:impl Into<String>|vec![value.into()])
7797    )]
7798    pub index_text: Option<Vec<String>>,
7799    ///Property: Modified on
7800    #[serde(skip_serializing_if = "Option::is_none")]
7801    #[cfg_attr(
7802        feature = "builder",
7803        builder(with = |value:impl Into<String>|vec![value.into()])
7804    )]
7805    pub modified_at: Option<Vec<String>>,
7806    ///Property: Detected names
7807    #[serde(skip_serializing_if = "Option::is_none")]
7808    #[cfg_attr(
7809        feature = "builder",
7810        builder(with = |value:impl Into<String>|vec![value.into()])
7811    )]
7812    pub names_mentioned: Option<Vec<String>>,
7813    ///Property: Source document
7814    #[serde(skip_serializing_if = "Option::is_none")]
7815    #[cfg_attr(
7816        feature = "builder",
7817        builder(with = |value:impl Into<String>|vec![value.into()])
7818    )]
7819    pub proof: Option<Vec<String>>,
7820    ///Property: Publishing source
7821    #[serde(skip_serializing_if = "Option::is_none")]
7822    #[cfg_attr(
7823        feature = "builder",
7824        builder(with = |value:impl Into<String>|vec![value.into()])
7825    )]
7826    pub publisher: Option<Vec<String>>,
7827    ///Property: Publishing source URL
7828    #[serde(skip_serializing_if = "Option::is_none")]
7829    #[cfg_attr(
7830        feature = "builder",
7831        builder(with = |value:impl Into<String>|vec![value.into()])
7832    )]
7833    pub publisher_url: Option<Vec<String>>,
7834    ///Property: Record ID
7835    #[serde(skip_serializing_if = "Option::is_none")]
7836    #[cfg_attr(
7837        feature = "builder",
7838        builder(with = |value:impl Into<String>|vec![value.into()])
7839    )]
7840    pub record_id: Option<Vec<String>>,
7841    ///Property: Retrieved on
7842    #[serde(skip_serializing_if = "Option::is_none")]
7843    #[cfg_attr(
7844        feature = "builder",
7845        builder(with = |value:impl Into<String>|vec![value.into()])
7846    )]
7847    pub retrieved_at: Option<Vec<String>>,
7848    ///Property: Role
7849    #[serde(skip_serializing_if = "Option::is_none")]
7850    #[cfg_attr(
7851        feature = "builder",
7852        builder(with = |value:impl Into<String>|vec![value.into()])
7853    )]
7854    pub role: Option<Vec<String>>,
7855    ///Property: Source link
7856    #[serde(skip_serializing_if = "Option::is_none")]
7857    #[cfg_attr(
7858        feature = "builder",
7859        builder(with = |value:impl Into<String>|vec![value.into()])
7860    )]
7861    pub source_url: Option<Vec<String>>,
7862    ///Property: Start date
7863    #[serde(skip_serializing_if = "Option::is_none")]
7864    #[cfg_attr(
7865        feature = "builder",
7866        builder(with = |value:impl Into<String>|vec![value.into()])
7867    )]
7868    pub start_date: Option<Vec<String>>,
7869    ///Property: Status
7870    #[serde(skip_serializing_if = "Option::is_none")]
7871    #[cfg_attr(
7872        feature = "builder",
7873        builder(with = |value:impl Into<String>|vec![value.into()])
7874    )]
7875    pub status: Option<Vec<String>>,
7876    ///Property: Summary
7877    #[serde(skip_serializing_if = "Option::is_none")]
7878    #[cfg_attr(
7879        feature = "builder",
7880        builder(with = |value:impl Into<String>|vec![value.into()])
7881    )]
7882    pub summary: Option<Vec<String>>,
7883}
7884impl Employment {
7885    /// Create a new entity with the given ID
7886    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
7887    pub fn new(id: impl Into<String>) -> Self {
7888        Self {
7889            id: id.into(),
7890            schema: "Employment".to_string(),
7891            aleph_url: None,
7892            date: None,
7893            description: None,
7894            employee: Vec::new(),
7895            employer: Vec::new(),
7896            end_date: None,
7897            index_text: None,
7898            modified_at: None,
7899            names_mentioned: None,
7900            proof: None,
7901            publisher: None,
7902            publisher_url: None,
7903            record_id: None,
7904            retrieved_at: None,
7905            role: None,
7906            source_url: None,
7907            start_date: None,
7908            status: None,
7909            summary: None,
7910        }
7911    }
7912    /// Get the schema name
7913    pub fn schema_name() -> &'static str {
7914        "Employment"
7915    }
7916    /// Serialize to standard FTM nested JSON format
7917    ///
7918    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
7919    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
7920        let mut value = serde_json::to_value(self)?;
7921        if let Some(obj) = value.as_object_mut() {
7922            let id = obj.remove("id");
7923            let schema = obj.remove("schema");
7924            let properties = serde_json::Value::Object(std::mem::take(obj));
7925            if let Some(id) = id {
7926                obj.insert("id".into(), id);
7927            }
7928            if let Some(schema) = schema {
7929                obj.insert("schema".into(), schema);
7930            }
7931            obj.insert("properties".into(), properties);
7932        }
7933        serde_json::to_string(&value)
7934    }
7935}
7936///FTM Schema: Event
7937#[derive(Debug, Clone, Serialize, Deserialize)]
7938#[cfg_attr(feature = "builder", derive(Builder))]
7939#[serde(rename_all = "camelCase")]
7940pub struct Event {
7941    pub id: String,
7942    #[cfg_attr(feature = "builder", builder(default = "Event".to_string()))]
7943    pub schema: String,
7944    ///Property: Address
7945    #[serde(skip_serializing_if = "Option::is_none")]
7946    #[cfg_attr(
7947        feature = "builder",
7948        builder(with = |value:impl Into<String>|vec![value.into()])
7949    )]
7950    pub address: Option<Vec<String>>,
7951    ///Property: Address
7952    #[serde(skip_serializing_if = "Option::is_none")]
7953    #[cfg_attr(
7954        feature = "builder",
7955        builder(with = |value:impl Into<String>|vec![value.into()])
7956    )]
7957    pub address_entity: Option<Vec<String>>,
7958    ///Property: Aleph URL
7959    #[serde(skip_serializing_if = "Option::is_none")]
7960    #[cfg_attr(
7961        feature = "builder",
7962        builder(with = |value:impl Into<String>|vec![value.into()])
7963    )]
7964    pub aleph_url: Option<Vec<String>>,
7965    ///Property: Alias
7966    #[serde(skip_serializing_if = "Option::is_none")]
7967    #[cfg_attr(
7968        feature = "builder",
7969        builder(with = |value:impl Into<String>|vec![value.into()])
7970    )]
7971    pub alias: Option<Vec<String>>,
7972    ///Property: Detected companies
7973    #[serde(skip_serializing_if = "Option::is_none")]
7974    #[cfg_attr(
7975        feature = "builder",
7976        builder(with = |value:impl Into<String>|vec![value.into()])
7977    )]
7978    pub companies_mentioned: Option<Vec<String>>,
7979    ///Property: Country
7980    #[serde(skip_serializing_if = "Option::is_none")]
7981    #[cfg_attr(
7982        feature = "builder",
7983        builder(with = |value:impl Into<String>|vec![value.into()])
7984    )]
7985    pub country: Option<Vec<String>>,
7986    ///Property: Created at
7987    #[serde(skip_serializing_if = "Option::is_none")]
7988    #[cfg_attr(
7989        feature = "builder",
7990        builder(with = |value:impl Into<String>|vec![value.into()])
7991    )]
7992    pub created_at: Option<Vec<String>>,
7993    ///Property: Date
7994    #[serde(skip_serializing_if = "Option::is_none")]
7995    #[cfg_attr(
7996        feature = "builder",
7997        builder(with = |value:impl Into<String>|vec![value.into()])
7998    )]
7999    pub date: Option<Vec<String>>,
8000    ///Property: Description
8001    #[serde(skip_serializing_if = "Option::is_none")]
8002    #[cfg_attr(
8003        feature = "builder",
8004        builder(with = |value:impl Into<String>|vec![value.into()])
8005    )]
8006    pub description: Option<Vec<String>>,
8007    ///Property: Detected country
8008    #[serde(skip_serializing_if = "Option::is_none")]
8009    #[cfg_attr(
8010        feature = "builder",
8011        builder(with = |value:impl Into<String>|vec![value.into()])
8012    )]
8013    pub detected_country: Option<Vec<String>>,
8014    ///Property: Detected language
8015    #[serde(skip_serializing_if = "Option::is_none")]
8016    #[cfg_attr(
8017        feature = "builder",
8018        builder(with = |value:impl Into<String>|vec![value.into()])
8019    )]
8020    pub detected_language: Option<Vec<String>>,
8021    ///Property: Detected e-mail addresses
8022    #[serde(skip_serializing_if = "Option::is_none")]
8023    #[cfg_attr(
8024        feature = "builder",
8025        builder(with = |value:impl Into<String>|vec![value.into()])
8026    )]
8027    pub email_mentioned: Option<Vec<String>>,
8028    ///Property: End date
8029    #[serde(skip_serializing_if = "Option::is_none")]
8030    #[cfg_attr(
8031        feature = "builder",
8032        builder(with = |value:impl Into<String>|vec![value.into()])
8033    )]
8034    pub end_date: Option<Vec<String>>,
8035    ///Property: Detected IBANs
8036    #[serde(skip_serializing_if = "Option::is_none")]
8037    #[cfg_attr(
8038        feature = "builder",
8039        builder(with = |value:impl Into<String>|vec![value.into()])
8040    )]
8041    pub iban_mentioned: Option<Vec<String>>,
8042    ///Property: Important
8043    #[serde(skip_serializing_if = "Option::is_none")]
8044    #[cfg_attr(
8045        feature = "builder",
8046        builder(with = |value:impl Into<String>|vec![value.into()])
8047    )]
8048    pub important: Option<Vec<String>>,
8049    ///Property: Index text
8050    #[serde(skip_serializing_if = "Option::is_none")]
8051    #[cfg_attr(
8052        feature = "builder",
8053        builder(with = |value:impl Into<String>|vec![value.into()])
8054    )]
8055    pub index_text: Option<Vec<String>>,
8056    ///Property: Involved
8057    #[serde(skip_serializing_if = "Option::is_none")]
8058    #[cfg_attr(
8059        feature = "builder",
8060        builder(with = |value:impl Into<String>|vec![value.into()])
8061    )]
8062    pub involved: Option<Vec<String>>,
8063    ///Property: Detected IP addresses
8064    #[serde(skip_serializing_if = "Option::is_none")]
8065    #[cfg_attr(
8066        feature = "builder",
8067        builder(with = |value:impl Into<String>|vec![value.into()])
8068    )]
8069    pub ip_mentioned: Option<Vec<String>>,
8070    ///Property: Keywords
8071    #[serde(skip_serializing_if = "Option::is_none")]
8072    #[cfg_attr(
8073        feature = "builder",
8074        builder(with = |value:impl Into<String>|vec![value.into()])
8075    )]
8076    pub keywords: Option<Vec<String>>,
8077    ///Property: Location
8078    #[serde(skip_serializing_if = "Option::is_none")]
8079    #[cfg_attr(
8080        feature = "builder",
8081        builder(with = |value:impl Into<String>|vec![value.into()])
8082    )]
8083    pub location: Option<Vec<String>>,
8084    ///Property: Detected locations
8085    #[serde(skip_serializing_if = "Option::is_none")]
8086    #[cfg_attr(
8087        feature = "builder",
8088        builder(with = |value:impl Into<String>|vec![value.into()])
8089    )]
8090    pub location_mentioned: Option<Vec<String>>,
8091    ///Property: Modified on
8092    #[serde(skip_serializing_if = "Option::is_none")]
8093    #[cfg_attr(
8094        feature = "builder",
8095        builder(with = |value:impl Into<String>|vec![value.into()])
8096    )]
8097    pub modified_at: Option<Vec<String>>,
8098    ///Property: Name
8099    #[serde(default)]
8100    #[cfg_attr(
8101        feature = "builder",
8102        builder(with = |value:impl Into<String>|vec![value.into()])
8103    )]
8104    pub name: Vec<String>,
8105    ///Property: Detected names
8106    #[serde(skip_serializing_if = "Option::is_none")]
8107    #[cfg_attr(
8108        feature = "builder",
8109        builder(with = |value:impl Into<String>|vec![value.into()])
8110    )]
8111    pub names_mentioned: Option<Vec<String>>,
8112    ///Property: Notes
8113    #[serde(skip_serializing_if = "Option::is_none")]
8114    #[cfg_attr(
8115        feature = "builder",
8116        builder(with = |value:impl Into<String>|vec![value.into()])
8117    )]
8118    pub notes: Option<Vec<String>>,
8119    ///Property: Organizer
8120    #[serde(skip_serializing_if = "Option::is_none")]
8121    #[cfg_attr(
8122        feature = "builder",
8123        builder(with = |value:impl Into<String>|vec![value.into()])
8124    )]
8125    pub organizer: Option<Vec<String>>,
8126    ///Property: Detected people
8127    #[serde(skip_serializing_if = "Option::is_none")]
8128    #[cfg_attr(
8129        feature = "builder",
8130        builder(with = |value:impl Into<String>|vec![value.into()])
8131    )]
8132    pub people_mentioned: Option<Vec<String>>,
8133    ///Property: Detected phones
8134    #[serde(skip_serializing_if = "Option::is_none")]
8135    #[cfg_attr(
8136        feature = "builder",
8137        builder(with = |value:impl Into<String>|vec![value.into()])
8138    )]
8139    pub phone_mentioned: Option<Vec<String>>,
8140    ///Property: Previous name
8141    #[serde(skip_serializing_if = "Option::is_none")]
8142    #[cfg_attr(
8143        feature = "builder",
8144        builder(with = |value:impl Into<String>|vec![value.into()])
8145    )]
8146    pub previous_name: Option<Vec<String>>,
8147    ///Property: Program
8148    #[serde(skip_serializing_if = "Option::is_none")]
8149    #[cfg_attr(
8150        feature = "builder",
8151        builder(with = |value:impl Into<String>|vec![value.into()])
8152    )]
8153    pub program: Option<Vec<String>>,
8154    ///Property: Program ID
8155    #[serde(skip_serializing_if = "Option::is_none")]
8156    #[cfg_attr(
8157        feature = "builder",
8158        builder(with = |value:impl Into<String>|vec![value.into()])
8159    )]
8160    pub program_id: Option<Vec<String>>,
8161    ///Property: Source document
8162    #[serde(skip_serializing_if = "Option::is_none")]
8163    #[cfg_attr(
8164        feature = "builder",
8165        builder(with = |value:impl Into<String>|vec![value.into()])
8166    )]
8167    pub proof: Option<Vec<String>>,
8168    ///Property: Publishing source
8169    #[serde(skip_serializing_if = "Option::is_none")]
8170    #[cfg_attr(
8171        feature = "builder",
8172        builder(with = |value:impl Into<String>|vec![value.into()])
8173    )]
8174    pub publisher: Option<Vec<String>>,
8175    ///Property: Publishing source URL
8176    #[serde(skip_serializing_if = "Option::is_none")]
8177    #[cfg_attr(
8178        feature = "builder",
8179        builder(with = |value:impl Into<String>|vec![value.into()])
8180    )]
8181    pub publisher_url: Option<Vec<String>>,
8182    ///Property: Record ID
8183    #[serde(skip_serializing_if = "Option::is_none")]
8184    #[cfg_attr(
8185        feature = "builder",
8186        builder(with = |value:impl Into<String>|vec![value.into()])
8187    )]
8188    pub record_id: Option<Vec<String>>,
8189    ///Property: Retrieved on
8190    #[serde(skip_serializing_if = "Option::is_none")]
8191    #[cfg_attr(
8192        feature = "builder",
8193        builder(with = |value:impl Into<String>|vec![value.into()])
8194    )]
8195    pub retrieved_at: Option<Vec<String>>,
8196    ///Property: Source link
8197    #[serde(skip_serializing_if = "Option::is_none")]
8198    #[cfg_attr(
8199        feature = "builder",
8200        builder(with = |value:impl Into<String>|vec![value.into()])
8201    )]
8202    pub source_url: Option<Vec<String>>,
8203    ///Property: Start date
8204    #[serde(skip_serializing_if = "Option::is_none")]
8205    #[cfg_attr(
8206        feature = "builder",
8207        builder(with = |value:impl Into<String>|vec![value.into()])
8208    )]
8209    pub start_date: Option<Vec<String>>,
8210    ///Property: Summary
8211    #[serde(skip_serializing_if = "Option::is_none")]
8212    #[cfg_attr(
8213        feature = "builder",
8214        builder(with = |value:impl Into<String>|vec![value.into()])
8215    )]
8216    pub summary: Option<Vec<String>>,
8217    ///Property: Topics
8218    #[serde(skip_serializing_if = "Option::is_none")]
8219    #[cfg_attr(
8220        feature = "builder",
8221        builder(with = |value:impl Into<String>|vec![value.into()])
8222    )]
8223    pub topics: Option<Vec<String>>,
8224    ///Property: Weak alias
8225    #[serde(skip_serializing_if = "Option::is_none")]
8226    #[cfg_attr(
8227        feature = "builder",
8228        builder(with = |value:impl Into<String>|vec![value.into()])
8229    )]
8230    pub weak_alias: Option<Vec<String>>,
8231    ///Property: Wikidata ID
8232    #[serde(skip_serializing_if = "Option::is_none")]
8233    #[cfg_attr(
8234        feature = "builder",
8235        builder(with = |value:impl Into<String>|vec![value.into()])
8236    )]
8237    pub wikidata_id: Option<Vec<String>>,
8238    ///Property: Wikipedia Article
8239    #[serde(skip_serializing_if = "Option::is_none")]
8240    #[cfg_attr(
8241        feature = "builder",
8242        builder(with = |value:impl Into<String>|vec![value.into()])
8243    )]
8244    pub wikipedia_url: Option<Vec<String>>,
8245}
8246impl Event {
8247    /// Create a new entity with the given ID
8248    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
8249    pub fn new(id: impl Into<String>) -> Self {
8250        Self {
8251            id: id.into(),
8252            schema: "Event".to_string(),
8253            address: None,
8254            address_entity: None,
8255            aleph_url: None,
8256            alias: None,
8257            companies_mentioned: None,
8258            country: None,
8259            created_at: None,
8260            date: None,
8261            description: None,
8262            detected_country: None,
8263            detected_language: None,
8264            email_mentioned: None,
8265            end_date: None,
8266            iban_mentioned: None,
8267            important: None,
8268            index_text: None,
8269            involved: None,
8270            ip_mentioned: None,
8271            keywords: None,
8272            location: None,
8273            location_mentioned: None,
8274            modified_at: None,
8275            name: Vec::new(),
8276            names_mentioned: None,
8277            notes: None,
8278            organizer: None,
8279            people_mentioned: None,
8280            phone_mentioned: None,
8281            previous_name: None,
8282            program: None,
8283            program_id: None,
8284            proof: None,
8285            publisher: None,
8286            publisher_url: None,
8287            record_id: None,
8288            retrieved_at: None,
8289            source_url: None,
8290            start_date: None,
8291            summary: None,
8292            topics: None,
8293            weak_alias: None,
8294            wikidata_id: None,
8295            wikipedia_url: None,
8296        }
8297    }
8298    /// Get the schema name
8299    pub fn schema_name() -> &'static str {
8300        "Event"
8301    }
8302    /// Serialize to standard FTM nested JSON format
8303    ///
8304    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
8305    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
8306        let mut value = serde_json::to_value(self)?;
8307        if let Some(obj) = value.as_object_mut() {
8308            let id = obj.remove("id");
8309            let schema = obj.remove("schema");
8310            let properties = serde_json::Value::Object(std::mem::take(obj));
8311            if let Some(id) = id {
8312                obj.insert("id".into(), id);
8313            }
8314            if let Some(schema) = schema {
8315                obj.insert("schema".into(), schema);
8316            }
8317            obj.insert("properties".into(), properties);
8318        }
8319        serde_json::to_string(&value)
8320    }
8321}
8322///FTM Schema: Family
8323#[derive(Debug, Clone, Serialize, Deserialize)]
8324#[cfg_attr(feature = "builder", derive(Builder))]
8325#[serde(rename_all = "camelCase")]
8326pub struct Family {
8327    pub id: String,
8328    #[cfg_attr(feature = "builder", builder(default = "Family".to_string()))]
8329    pub schema: String,
8330    ///Property: Aleph URL
8331    #[serde(skip_serializing_if = "Option::is_none")]
8332    #[cfg_attr(
8333        feature = "builder",
8334        builder(with = |value:impl Into<String>|vec![value.into()])
8335    )]
8336    pub aleph_url: Option<Vec<String>>,
8337    ///Property: Date
8338    #[serde(skip_serializing_if = "Option::is_none")]
8339    #[cfg_attr(
8340        feature = "builder",
8341        builder(with = |value:impl Into<String>|vec![value.into()])
8342    )]
8343    pub date: Option<Vec<String>>,
8344    ///Property: Description
8345    #[serde(skip_serializing_if = "Option::is_none")]
8346    #[cfg_attr(
8347        feature = "builder",
8348        builder(with = |value:impl Into<String>|vec![value.into()])
8349    )]
8350    pub description: Option<Vec<String>>,
8351    ///Property: End date
8352    #[serde(skip_serializing_if = "Option::is_none")]
8353    #[cfg_attr(
8354        feature = "builder",
8355        builder(with = |value:impl Into<String>|vec![value.into()])
8356    )]
8357    pub end_date: Option<Vec<String>>,
8358    ///Property: Index text
8359    #[serde(skip_serializing_if = "Option::is_none")]
8360    #[cfg_attr(
8361        feature = "builder",
8362        builder(with = |value:impl Into<String>|vec![value.into()])
8363    )]
8364    pub index_text: Option<Vec<String>>,
8365    ///Property: Modified on
8366    #[serde(skip_serializing_if = "Option::is_none")]
8367    #[cfg_attr(
8368        feature = "builder",
8369        builder(with = |value:impl Into<String>|vec![value.into()])
8370    )]
8371    pub modified_at: Option<Vec<String>>,
8372    ///Property: Detected names
8373    #[serde(skip_serializing_if = "Option::is_none")]
8374    #[cfg_attr(
8375        feature = "builder",
8376        builder(with = |value:impl Into<String>|vec![value.into()])
8377    )]
8378    pub names_mentioned: Option<Vec<String>>,
8379    ///Property: Person
8380    #[serde(default)]
8381    #[cfg_attr(
8382        feature = "builder",
8383        builder(with = |value:impl Into<String>|vec![value.into()])
8384    )]
8385    pub person: Vec<String>,
8386    ///Property: Source document
8387    #[serde(skip_serializing_if = "Option::is_none")]
8388    #[cfg_attr(
8389        feature = "builder",
8390        builder(with = |value:impl Into<String>|vec![value.into()])
8391    )]
8392    pub proof: Option<Vec<String>>,
8393    ///Property: Publishing source
8394    #[serde(skip_serializing_if = "Option::is_none")]
8395    #[cfg_attr(
8396        feature = "builder",
8397        builder(with = |value:impl Into<String>|vec![value.into()])
8398    )]
8399    pub publisher: Option<Vec<String>>,
8400    ///Property: Publishing source URL
8401    #[serde(skip_serializing_if = "Option::is_none")]
8402    #[cfg_attr(
8403        feature = "builder",
8404        builder(with = |value:impl Into<String>|vec![value.into()])
8405    )]
8406    pub publisher_url: Option<Vec<String>>,
8407    ///Property: Record ID
8408    #[serde(skip_serializing_if = "Option::is_none")]
8409    #[cfg_attr(
8410        feature = "builder",
8411        builder(with = |value:impl Into<String>|vec![value.into()])
8412    )]
8413    pub record_id: Option<Vec<String>>,
8414    ///Property: Relationship
8415    #[serde(skip_serializing_if = "Option::is_none")]
8416    #[cfg_attr(
8417        feature = "builder",
8418        builder(with = |value:impl Into<String>|vec![value.into()])
8419    )]
8420    pub relationship: Option<Vec<String>>,
8421    ///Property: Relative
8422    #[serde(default)]
8423    #[cfg_attr(
8424        feature = "builder",
8425        builder(with = |value:impl Into<String>|vec![value.into()])
8426    )]
8427    pub relative: Vec<String>,
8428    ///Property: Retrieved on
8429    #[serde(skip_serializing_if = "Option::is_none")]
8430    #[cfg_attr(
8431        feature = "builder",
8432        builder(with = |value:impl Into<String>|vec![value.into()])
8433    )]
8434    pub retrieved_at: Option<Vec<String>>,
8435    ///Property: Source link
8436    #[serde(skip_serializing_if = "Option::is_none")]
8437    #[cfg_attr(
8438        feature = "builder",
8439        builder(with = |value:impl Into<String>|vec![value.into()])
8440    )]
8441    pub source_url: Option<Vec<String>>,
8442    ///Property: Start date
8443    #[serde(skip_serializing_if = "Option::is_none")]
8444    #[cfg_attr(
8445        feature = "builder",
8446        builder(with = |value:impl Into<String>|vec![value.into()])
8447    )]
8448    pub start_date: Option<Vec<String>>,
8449    ///Property: Summary
8450    #[serde(skip_serializing_if = "Option::is_none")]
8451    #[cfg_attr(
8452        feature = "builder",
8453        builder(with = |value:impl Into<String>|vec![value.into()])
8454    )]
8455    pub summary: Option<Vec<String>>,
8456}
8457impl Family {
8458    /// Create a new entity with the given ID
8459    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
8460    pub fn new(id: impl Into<String>) -> Self {
8461        Self {
8462            id: id.into(),
8463            schema: "Family".to_string(),
8464            aleph_url: None,
8465            date: None,
8466            description: None,
8467            end_date: None,
8468            index_text: None,
8469            modified_at: None,
8470            names_mentioned: None,
8471            person: Vec::new(),
8472            proof: None,
8473            publisher: None,
8474            publisher_url: None,
8475            record_id: None,
8476            relationship: None,
8477            relative: Vec::new(),
8478            retrieved_at: None,
8479            source_url: None,
8480            start_date: None,
8481            summary: None,
8482        }
8483    }
8484    /// Get the schema name
8485    pub fn schema_name() -> &'static str {
8486        "Family"
8487    }
8488    /// Serialize to standard FTM nested JSON format
8489    ///
8490    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
8491    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
8492        let mut value = serde_json::to_value(self)?;
8493        if let Some(obj) = value.as_object_mut() {
8494            let id = obj.remove("id");
8495            let schema = obj.remove("schema");
8496            let properties = serde_json::Value::Object(std::mem::take(obj));
8497            if let Some(id) = id {
8498                obj.insert("id".into(), id);
8499            }
8500            if let Some(schema) = schema {
8501                obj.insert("schema".into(), schema);
8502            }
8503            obj.insert("properties".into(), properties);
8504        }
8505        serde_json::to_string(&value)
8506    }
8507}
8508///FTM Schema: Folder
8509#[derive(Debug, Clone, Serialize, Deserialize)]
8510#[cfg_attr(feature = "builder", derive(Builder))]
8511#[serde(rename_all = "camelCase")]
8512pub struct Folder {
8513    pub id: String,
8514    #[cfg_attr(feature = "builder", builder(default = "Folder".to_string()))]
8515    pub schema: String,
8516    ///Property: Address
8517    #[serde(skip_serializing_if = "Option::is_none")]
8518    #[cfg_attr(
8519        feature = "builder",
8520        builder(with = |value:impl Into<String>|vec![value.into()])
8521    )]
8522    pub address: Option<Vec<String>>,
8523    ///Property: Address
8524    #[serde(skip_serializing_if = "Option::is_none")]
8525    #[cfg_attr(
8526        feature = "builder",
8527        builder(with = |value:impl Into<String>|vec![value.into()])
8528    )]
8529    pub address_entity: Option<Vec<String>>,
8530    ///Property: Aleph URL
8531    #[serde(skip_serializing_if = "Option::is_none")]
8532    #[cfg_attr(
8533        feature = "builder",
8534        builder(with = |value:impl Into<String>|vec![value.into()])
8535    )]
8536    pub aleph_url: Option<Vec<String>>,
8537    ///Property: Alias
8538    #[serde(skip_serializing_if = "Option::is_none")]
8539    #[cfg_attr(
8540        feature = "builder",
8541        builder(with = |value:impl Into<String>|vec![value.into()])
8542    )]
8543    pub alias: Option<Vec<String>>,
8544    ///Property: Ancestors
8545    #[serde(skip_serializing_if = "Option::is_none")]
8546    #[cfg_attr(
8547        feature = "builder",
8548        builder(with = |value:impl Into<String>|vec![value.into()])
8549    )]
8550    pub ancestors: Option<Vec<String>>,
8551    ///Property: Author
8552    #[serde(skip_serializing_if = "Option::is_none")]
8553    #[cfg_attr(
8554        feature = "builder",
8555        builder(with = |value:impl Into<String>|vec![value.into()])
8556    )]
8557    pub author: Option<Vec<String>>,
8558    ///Property: Authored on
8559    #[serde(skip_serializing_if = "Option::is_none")]
8560    #[cfg_attr(
8561        feature = "builder",
8562        builder(with = |value:impl Into<String>|vec![value.into()])
8563    )]
8564    pub authored_at: Option<Vec<String>>,
8565    ///Property: Text
8566    #[serde(skip_serializing_if = "Option::is_none")]
8567    #[cfg_attr(
8568        feature = "builder",
8569        builder(with = |value:impl Into<String>|vec![value.into()])
8570    )]
8571    pub body_text: Option<Vec<String>>,
8572    ///Property: Detected companies
8573    #[serde(skip_serializing_if = "Option::is_none")]
8574    #[cfg_attr(
8575        feature = "builder",
8576        builder(with = |value:impl Into<String>|vec![value.into()])
8577    )]
8578    pub companies_mentioned: Option<Vec<String>>,
8579    ///Property: Checksum
8580    #[serde(skip_serializing_if = "Option::is_none")]
8581    #[cfg_attr(
8582        feature = "builder",
8583        builder(with = |value:impl Into<String>|vec![value.into()])
8584    )]
8585    pub content_hash: Option<Vec<String>>,
8586    ///Property: Country
8587    #[serde(skip_serializing_if = "Option::is_none")]
8588    #[cfg_attr(
8589        feature = "builder",
8590        builder(with = |value:impl Into<String>|vec![value.into()])
8591    )]
8592    pub country: Option<Vec<String>>,
8593    ///Property: Crawler
8594    #[serde(skip_serializing_if = "Option::is_none")]
8595    #[cfg_attr(
8596        feature = "builder",
8597        builder(with = |value:impl Into<String>|vec![value.into()])
8598    )]
8599    pub crawler: Option<Vec<String>>,
8600    ///Property: Created at
8601    #[serde(skip_serializing_if = "Option::is_none")]
8602    #[cfg_attr(
8603        feature = "builder",
8604        builder(with = |value:impl Into<String>|vec![value.into()])
8605    )]
8606    pub created_at: Option<Vec<String>>,
8607    ///Property: Date
8608    #[serde(skip_serializing_if = "Option::is_none")]
8609    #[cfg_attr(
8610        feature = "builder",
8611        builder(with = |value:impl Into<String>|vec![value.into()])
8612    )]
8613    pub date: Option<Vec<String>>,
8614    ///Property: Description
8615    #[serde(skip_serializing_if = "Option::is_none")]
8616    #[cfg_attr(
8617        feature = "builder",
8618        builder(with = |value:impl Into<String>|vec![value.into()])
8619    )]
8620    pub description: Option<Vec<String>>,
8621    ///Property: Detected country
8622    #[serde(skip_serializing_if = "Option::is_none")]
8623    #[cfg_attr(
8624        feature = "builder",
8625        builder(with = |value:impl Into<String>|vec![value.into()])
8626    )]
8627    pub detected_country: Option<Vec<String>>,
8628    ///Property: Detected language
8629    #[serde(skip_serializing_if = "Option::is_none")]
8630    #[cfg_attr(
8631        feature = "builder",
8632        builder(with = |value:impl Into<String>|vec![value.into()])
8633    )]
8634    pub detected_language: Option<Vec<String>>,
8635    ///Property: Detected e-mail addresses
8636    #[serde(skip_serializing_if = "Option::is_none")]
8637    #[cfg_attr(
8638        feature = "builder",
8639        builder(with = |value:impl Into<String>|vec![value.into()])
8640    )]
8641    pub email_mentioned: Option<Vec<String>>,
8642    ///Property: File encoding
8643    #[serde(skip_serializing_if = "Option::is_none")]
8644    #[cfg_attr(
8645        feature = "builder",
8646        builder(with = |value:impl Into<String>|vec![value.into()])
8647    )]
8648    pub encoding: Option<Vec<String>>,
8649    ///Property: File extension
8650    #[serde(skip_serializing_if = "Option::is_none")]
8651    #[cfg_attr(
8652        feature = "builder",
8653        builder(with = |value:impl Into<String>|vec![value.into()])
8654    )]
8655    pub extension: Option<Vec<String>>,
8656    ///Property: File name
8657    #[serde(default)]
8658    #[cfg_attr(
8659        feature = "builder",
8660        builder(with = |value:impl Into<String>|vec![value.into()])
8661    )]
8662    pub file_name: Vec<String>,
8663    ///Property: File size
8664    #[serde(
8665        skip_serializing_if = "Option::is_none",
8666        deserialize_with = "deserialize_opt_f64_vec",
8667        default
8668    )]
8669    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
8670    pub file_size: Option<Vec<f64>>,
8671    ///Property: Generator
8672    #[serde(skip_serializing_if = "Option::is_none")]
8673    #[cfg_attr(
8674        feature = "builder",
8675        builder(with = |value:impl Into<String>|vec![value.into()])
8676    )]
8677    pub generator: Option<Vec<String>>,
8678    ///Property: Detected IBANs
8679    #[serde(skip_serializing_if = "Option::is_none")]
8680    #[cfg_attr(
8681        feature = "builder",
8682        builder(with = |value:impl Into<String>|vec![value.into()])
8683    )]
8684    pub iban_mentioned: Option<Vec<String>>,
8685    ///Property: Index text
8686    #[serde(skip_serializing_if = "Option::is_none")]
8687    #[cfg_attr(
8688        feature = "builder",
8689        builder(with = |value:impl Into<String>|vec![value.into()])
8690    )]
8691    pub index_text: Option<Vec<String>>,
8692    ///Property: Detected IP addresses
8693    #[serde(skip_serializing_if = "Option::is_none")]
8694    #[cfg_attr(
8695        feature = "builder",
8696        builder(with = |value:impl Into<String>|vec![value.into()])
8697    )]
8698    pub ip_mentioned: Option<Vec<String>>,
8699    ///Property: Keywords
8700    #[serde(skip_serializing_if = "Option::is_none")]
8701    #[cfg_attr(
8702        feature = "builder",
8703        builder(with = |value:impl Into<String>|vec![value.into()])
8704    )]
8705    pub keywords: Option<Vec<String>>,
8706    ///Property: Language
8707    #[serde(skip_serializing_if = "Option::is_none")]
8708    #[cfg_attr(
8709        feature = "builder",
8710        builder(with = |value:impl Into<String>|vec![value.into()])
8711    )]
8712    pub language: Option<Vec<String>>,
8713    ///Property: Detected locations
8714    #[serde(skip_serializing_if = "Option::is_none")]
8715    #[cfg_attr(
8716        feature = "builder",
8717        builder(with = |value:impl Into<String>|vec![value.into()])
8718    )]
8719    pub location_mentioned: Option<Vec<String>>,
8720    ///Property: Message ID
8721    #[serde(skip_serializing_if = "Option::is_none")]
8722    #[cfg_attr(
8723        feature = "builder",
8724        builder(with = |value:impl Into<String>|vec![value.into()])
8725    )]
8726    pub message_id: Option<Vec<String>>,
8727    ///Property: MIME type
8728    #[serde(skip_serializing_if = "Option::is_none")]
8729    #[cfg_attr(
8730        feature = "builder",
8731        builder(with = |value:impl Into<String>|vec![value.into()])
8732    )]
8733    pub mime_type: Option<Vec<String>>,
8734    ///Property: Modified on
8735    #[serde(skip_serializing_if = "Option::is_none")]
8736    #[cfg_attr(
8737        feature = "builder",
8738        builder(with = |value:impl Into<String>|vec![value.into()])
8739    )]
8740    pub modified_at: Option<Vec<String>>,
8741    ///Property: Name
8742    #[serde(default)]
8743    #[cfg_attr(
8744        feature = "builder",
8745        builder(with = |value:impl Into<String>|vec![value.into()])
8746    )]
8747    pub name: Vec<String>,
8748    ///Property: Detected names
8749    #[serde(skip_serializing_if = "Option::is_none")]
8750    #[cfg_attr(
8751        feature = "builder",
8752        builder(with = |value:impl Into<String>|vec![value.into()])
8753    )]
8754    pub names_mentioned: Option<Vec<String>>,
8755    ///Property: Notes
8756    #[serde(skip_serializing_if = "Option::is_none")]
8757    #[cfg_attr(
8758        feature = "builder",
8759        builder(with = |value:impl Into<String>|vec![value.into()])
8760    )]
8761    pub notes: Option<Vec<String>>,
8762    ///Property: Folder
8763    #[serde(skip_serializing_if = "Option::is_none")]
8764    #[cfg_attr(
8765        feature = "builder",
8766        builder(with = |value:impl Into<String>|vec![value.into()])
8767    )]
8768    pub parent: Option<Vec<String>>,
8769    ///Property: Detected people
8770    #[serde(skip_serializing_if = "Option::is_none")]
8771    #[cfg_attr(
8772        feature = "builder",
8773        builder(with = |value:impl Into<String>|vec![value.into()])
8774    )]
8775    pub people_mentioned: Option<Vec<String>>,
8776    ///Property: Detected phones
8777    #[serde(skip_serializing_if = "Option::is_none")]
8778    #[cfg_attr(
8779        feature = "builder",
8780        builder(with = |value:impl Into<String>|vec![value.into()])
8781    )]
8782    pub phone_mentioned: Option<Vec<String>>,
8783    ///Property: Previous name
8784    #[serde(skip_serializing_if = "Option::is_none")]
8785    #[cfg_attr(
8786        feature = "builder",
8787        builder(with = |value:impl Into<String>|vec![value.into()])
8788    )]
8789    pub previous_name: Option<Vec<String>>,
8790    ///Property: Processed at
8791    #[serde(skip_serializing_if = "Option::is_none")]
8792    #[cfg_attr(
8793        feature = "builder",
8794        builder(with = |value:impl Into<String>|vec![value.into()])
8795    )]
8796    pub processed_at: Option<Vec<String>>,
8797    ///Property: Processing agent
8798    #[serde(skip_serializing_if = "Option::is_none")]
8799    #[cfg_attr(
8800        feature = "builder",
8801        builder(with = |value:impl Into<String>|vec![value.into()])
8802    )]
8803    pub processing_agent: Option<Vec<String>>,
8804    ///Property: Processing error
8805    #[serde(skip_serializing_if = "Option::is_none")]
8806    #[cfg_attr(
8807        feature = "builder",
8808        builder(with = |value:impl Into<String>|vec![value.into()])
8809    )]
8810    pub processing_error: Option<Vec<String>>,
8811    ///Property: Processing status
8812    #[serde(skip_serializing_if = "Option::is_none")]
8813    #[cfg_attr(
8814        feature = "builder",
8815        builder(with = |value:impl Into<String>|vec![value.into()])
8816    )]
8817    pub processing_status: Option<Vec<String>>,
8818    ///Property: Program
8819    #[serde(skip_serializing_if = "Option::is_none")]
8820    #[cfg_attr(
8821        feature = "builder",
8822        builder(with = |value:impl Into<String>|vec![value.into()])
8823    )]
8824    pub program: Option<Vec<String>>,
8825    ///Property: Program ID
8826    #[serde(skip_serializing_if = "Option::is_none")]
8827    #[cfg_attr(
8828        feature = "builder",
8829        builder(with = |value:impl Into<String>|vec![value.into()])
8830    )]
8831    pub program_id: Option<Vec<String>>,
8832    ///Property: Source document
8833    #[serde(skip_serializing_if = "Option::is_none")]
8834    #[cfg_attr(
8835        feature = "builder",
8836        builder(with = |value:impl Into<String>|vec![value.into()])
8837    )]
8838    pub proof: Option<Vec<String>>,
8839    ///Property: Published on
8840    #[serde(skip_serializing_if = "Option::is_none")]
8841    #[cfg_attr(
8842        feature = "builder",
8843        builder(with = |value:impl Into<String>|vec![value.into()])
8844    )]
8845    pub published_at: Option<Vec<String>>,
8846    ///Property: Publishing source
8847    #[serde(skip_serializing_if = "Option::is_none")]
8848    #[cfg_attr(
8849        feature = "builder",
8850        builder(with = |value:impl Into<String>|vec![value.into()])
8851    )]
8852    pub publisher: Option<Vec<String>>,
8853    ///Property: Publishing source URL
8854    #[serde(skip_serializing_if = "Option::is_none")]
8855    #[cfg_attr(
8856        feature = "builder",
8857        builder(with = |value:impl Into<String>|vec![value.into()])
8858    )]
8859    pub publisher_url: Option<Vec<String>>,
8860    ///Property: Retrieved on
8861    #[serde(skip_serializing_if = "Option::is_none")]
8862    #[cfg_attr(
8863        feature = "builder",
8864        builder(with = |value:impl Into<String>|vec![value.into()])
8865    )]
8866    pub retrieved_at: Option<Vec<String>>,
8867    ///Property: Source link
8868    #[serde(skip_serializing_if = "Option::is_none")]
8869    #[cfg_attr(
8870        feature = "builder",
8871        builder(with = |value:impl Into<String>|vec![value.into()])
8872    )]
8873    pub source_url: Option<Vec<String>>,
8874    ///Property: Summary
8875    #[serde(skip_serializing_if = "Option::is_none")]
8876    #[cfg_attr(
8877        feature = "builder",
8878        builder(with = |value:impl Into<String>|vec![value.into()])
8879    )]
8880    pub summary: Option<Vec<String>>,
8881    ///Property: Title
8882    #[serde(skip_serializing_if = "Option::is_none")]
8883    #[cfg_attr(
8884        feature = "builder",
8885        builder(with = |value:impl Into<String>|vec![value.into()])
8886    )]
8887    pub title: Option<Vec<String>>,
8888    ///Property: Topics
8889    #[serde(skip_serializing_if = "Option::is_none")]
8890    #[cfg_attr(
8891        feature = "builder",
8892        builder(with = |value:impl Into<String>|vec![value.into()])
8893    )]
8894    pub topics: Option<Vec<String>>,
8895    ///Property: The language of the translated text
8896    #[serde(skip_serializing_if = "Option::is_none")]
8897    #[cfg_attr(
8898        feature = "builder",
8899        builder(with = |value:impl Into<String>|vec![value.into()])
8900    )]
8901    pub translated_language: Option<Vec<String>>,
8902    ///Property: Translated version of the body text
8903    #[serde(skip_serializing_if = "Option::is_none")]
8904    #[cfg_attr(
8905        feature = "builder",
8906        builder(with = |value:impl Into<String>|vec![value.into()])
8907    )]
8908    pub translated_text: Option<Vec<String>>,
8909    ///Property: Weak alias
8910    #[serde(skip_serializing_if = "Option::is_none")]
8911    #[cfg_attr(
8912        feature = "builder",
8913        builder(with = |value:impl Into<String>|vec![value.into()])
8914    )]
8915    pub weak_alias: Option<Vec<String>>,
8916    ///Property: Wikidata ID
8917    #[serde(skip_serializing_if = "Option::is_none")]
8918    #[cfg_attr(
8919        feature = "builder",
8920        builder(with = |value:impl Into<String>|vec![value.into()])
8921    )]
8922    pub wikidata_id: Option<Vec<String>>,
8923    ///Property: Wikipedia Article
8924    #[serde(skip_serializing_if = "Option::is_none")]
8925    #[cfg_attr(
8926        feature = "builder",
8927        builder(with = |value:impl Into<String>|vec![value.into()])
8928    )]
8929    pub wikipedia_url: Option<Vec<String>>,
8930}
8931impl Folder {
8932    /// Create a new entity with the given ID
8933    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
8934    pub fn new(id: impl Into<String>) -> Self {
8935        Self {
8936            id: id.into(),
8937            schema: "Folder".to_string(),
8938            address: None,
8939            address_entity: None,
8940            aleph_url: None,
8941            alias: None,
8942            ancestors: None,
8943            author: None,
8944            authored_at: None,
8945            body_text: None,
8946            companies_mentioned: None,
8947            content_hash: None,
8948            country: None,
8949            crawler: None,
8950            created_at: None,
8951            date: None,
8952            description: None,
8953            detected_country: None,
8954            detected_language: None,
8955            email_mentioned: None,
8956            encoding: None,
8957            extension: None,
8958            file_name: Vec::new(),
8959            file_size: None,
8960            generator: None,
8961            iban_mentioned: None,
8962            index_text: None,
8963            ip_mentioned: None,
8964            keywords: None,
8965            language: None,
8966            location_mentioned: None,
8967            message_id: None,
8968            mime_type: None,
8969            modified_at: None,
8970            name: Vec::new(),
8971            names_mentioned: None,
8972            notes: None,
8973            parent: None,
8974            people_mentioned: None,
8975            phone_mentioned: None,
8976            previous_name: None,
8977            processed_at: None,
8978            processing_agent: None,
8979            processing_error: None,
8980            processing_status: None,
8981            program: None,
8982            program_id: None,
8983            proof: None,
8984            published_at: None,
8985            publisher: None,
8986            publisher_url: None,
8987            retrieved_at: None,
8988            source_url: None,
8989            summary: None,
8990            title: None,
8991            topics: None,
8992            translated_language: None,
8993            translated_text: None,
8994            weak_alias: None,
8995            wikidata_id: None,
8996            wikipedia_url: None,
8997        }
8998    }
8999    /// Get the schema name
9000    pub fn schema_name() -> &'static str {
9001        "Folder"
9002    }
9003    /// Serialize to standard FTM nested JSON format
9004    ///
9005    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
9006    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
9007        let mut value = serde_json::to_value(self)?;
9008        if let Some(obj) = value.as_object_mut() {
9009            let id = obj.remove("id");
9010            let schema = obj.remove("schema");
9011            let properties = serde_json::Value::Object(std::mem::take(obj));
9012            if let Some(id) = id {
9013                obj.insert("id".into(), id);
9014            }
9015            if let Some(schema) = schema {
9016                obj.insert("schema".into(), schema);
9017            }
9018            obj.insert("properties".into(), properties);
9019        }
9020        serde_json::to_string(&value)
9021    }
9022}
9023///FTM Schema: Web page
9024#[derive(Debug, Clone, Serialize, Deserialize)]
9025#[cfg_attr(feature = "builder", derive(Builder))]
9026#[serde(rename_all = "camelCase")]
9027pub struct HyperText {
9028    pub id: String,
9029    #[cfg_attr(feature = "builder", builder(default = "HyperText".to_string()))]
9030    pub schema: String,
9031    ///Property: Address
9032    #[serde(skip_serializing_if = "Option::is_none")]
9033    #[cfg_attr(
9034        feature = "builder",
9035        builder(with = |value:impl Into<String>|vec![value.into()])
9036    )]
9037    pub address: Option<Vec<String>>,
9038    ///Property: Address
9039    #[serde(skip_serializing_if = "Option::is_none")]
9040    #[cfg_attr(
9041        feature = "builder",
9042        builder(with = |value:impl Into<String>|vec![value.into()])
9043    )]
9044    pub address_entity: Option<Vec<String>>,
9045    ///Property: Aleph URL
9046    #[serde(skip_serializing_if = "Option::is_none")]
9047    #[cfg_attr(
9048        feature = "builder",
9049        builder(with = |value:impl Into<String>|vec![value.into()])
9050    )]
9051    pub aleph_url: Option<Vec<String>>,
9052    ///Property: Alias
9053    #[serde(skip_serializing_if = "Option::is_none")]
9054    #[cfg_attr(
9055        feature = "builder",
9056        builder(with = |value:impl Into<String>|vec![value.into()])
9057    )]
9058    pub alias: Option<Vec<String>>,
9059    ///Property: Ancestors
9060    #[serde(skip_serializing_if = "Option::is_none")]
9061    #[cfg_attr(
9062        feature = "builder",
9063        builder(with = |value:impl Into<String>|vec![value.into()])
9064    )]
9065    pub ancestors: Option<Vec<String>>,
9066    ///Property: Author
9067    #[serde(skip_serializing_if = "Option::is_none")]
9068    #[cfg_attr(
9069        feature = "builder",
9070        builder(with = |value:impl Into<String>|vec![value.into()])
9071    )]
9072    pub author: Option<Vec<String>>,
9073    ///Property: Authored on
9074    #[serde(skip_serializing_if = "Option::is_none")]
9075    #[cfg_attr(
9076        feature = "builder",
9077        builder(with = |value:impl Into<String>|vec![value.into()])
9078    )]
9079    pub authored_at: Option<Vec<String>>,
9080    ///Property: HTML
9081    #[serde(skip_serializing_if = "Option::is_none")]
9082    #[cfg_attr(
9083        feature = "builder",
9084        builder(with = |value:impl Into<String>|vec![value.into()])
9085    )]
9086    pub body_html: Option<Vec<String>>,
9087    ///Property: Text
9088    #[serde(skip_serializing_if = "Option::is_none")]
9089    #[cfg_attr(
9090        feature = "builder",
9091        builder(with = |value:impl Into<String>|vec![value.into()])
9092    )]
9093    pub body_text: Option<Vec<String>>,
9094    ///Property: Detected companies
9095    #[serde(skip_serializing_if = "Option::is_none")]
9096    #[cfg_attr(
9097        feature = "builder",
9098        builder(with = |value:impl Into<String>|vec![value.into()])
9099    )]
9100    pub companies_mentioned: Option<Vec<String>>,
9101    ///Property: Checksum
9102    #[serde(skip_serializing_if = "Option::is_none")]
9103    #[cfg_attr(
9104        feature = "builder",
9105        builder(with = |value:impl Into<String>|vec![value.into()])
9106    )]
9107    pub content_hash: Option<Vec<String>>,
9108    ///Property: Country
9109    #[serde(skip_serializing_if = "Option::is_none")]
9110    #[cfg_attr(
9111        feature = "builder",
9112        builder(with = |value:impl Into<String>|vec![value.into()])
9113    )]
9114    pub country: Option<Vec<String>>,
9115    ///Property: Crawler
9116    #[serde(skip_serializing_if = "Option::is_none")]
9117    #[cfg_attr(
9118        feature = "builder",
9119        builder(with = |value:impl Into<String>|vec![value.into()])
9120    )]
9121    pub crawler: Option<Vec<String>>,
9122    ///Property: Created at
9123    #[serde(skip_serializing_if = "Option::is_none")]
9124    #[cfg_attr(
9125        feature = "builder",
9126        builder(with = |value:impl Into<String>|vec![value.into()])
9127    )]
9128    pub created_at: Option<Vec<String>>,
9129    ///Property: Date
9130    #[serde(skip_serializing_if = "Option::is_none")]
9131    #[cfg_attr(
9132        feature = "builder",
9133        builder(with = |value:impl Into<String>|vec![value.into()])
9134    )]
9135    pub date: Option<Vec<String>>,
9136    ///Property: Description
9137    #[serde(skip_serializing_if = "Option::is_none")]
9138    #[cfg_attr(
9139        feature = "builder",
9140        builder(with = |value:impl Into<String>|vec![value.into()])
9141    )]
9142    pub description: Option<Vec<String>>,
9143    ///Property: Detected country
9144    #[serde(skip_serializing_if = "Option::is_none")]
9145    #[cfg_attr(
9146        feature = "builder",
9147        builder(with = |value:impl Into<String>|vec![value.into()])
9148    )]
9149    pub detected_country: Option<Vec<String>>,
9150    ///Property: Detected language
9151    #[serde(skip_serializing_if = "Option::is_none")]
9152    #[cfg_attr(
9153        feature = "builder",
9154        builder(with = |value:impl Into<String>|vec![value.into()])
9155    )]
9156    pub detected_language: Option<Vec<String>>,
9157    ///Property: Detected e-mail addresses
9158    #[serde(skip_serializing_if = "Option::is_none")]
9159    #[cfg_attr(
9160        feature = "builder",
9161        builder(with = |value:impl Into<String>|vec![value.into()])
9162    )]
9163    pub email_mentioned: Option<Vec<String>>,
9164    ///Property: File encoding
9165    #[serde(skip_serializing_if = "Option::is_none")]
9166    #[cfg_attr(
9167        feature = "builder",
9168        builder(with = |value:impl Into<String>|vec![value.into()])
9169    )]
9170    pub encoding: Option<Vec<String>>,
9171    ///Property: File extension
9172    #[serde(skip_serializing_if = "Option::is_none")]
9173    #[cfg_attr(
9174        feature = "builder",
9175        builder(with = |value:impl Into<String>|vec![value.into()])
9176    )]
9177    pub extension: Option<Vec<String>>,
9178    ///Property: File name
9179    #[serde(default)]
9180    #[cfg_attr(
9181        feature = "builder",
9182        builder(with = |value:impl Into<String>|vec![value.into()])
9183    )]
9184    pub file_name: Vec<String>,
9185    ///Property: File size
9186    #[serde(
9187        skip_serializing_if = "Option::is_none",
9188        deserialize_with = "deserialize_opt_f64_vec",
9189        default
9190    )]
9191    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
9192    pub file_size: Option<Vec<f64>>,
9193    ///Property: Generator
9194    #[serde(skip_serializing_if = "Option::is_none")]
9195    #[cfg_attr(
9196        feature = "builder",
9197        builder(with = |value:impl Into<String>|vec![value.into()])
9198    )]
9199    pub generator: Option<Vec<String>>,
9200    ///Property: Detected IBANs
9201    #[serde(skip_serializing_if = "Option::is_none")]
9202    #[cfg_attr(
9203        feature = "builder",
9204        builder(with = |value:impl Into<String>|vec![value.into()])
9205    )]
9206    pub iban_mentioned: Option<Vec<String>>,
9207    ///Property: Index text
9208    #[serde(skip_serializing_if = "Option::is_none")]
9209    #[cfg_attr(
9210        feature = "builder",
9211        builder(with = |value:impl Into<String>|vec![value.into()])
9212    )]
9213    pub index_text: Option<Vec<String>>,
9214    ///Property: Detected IP addresses
9215    #[serde(skip_serializing_if = "Option::is_none")]
9216    #[cfg_attr(
9217        feature = "builder",
9218        builder(with = |value:impl Into<String>|vec![value.into()])
9219    )]
9220    pub ip_mentioned: Option<Vec<String>>,
9221    ///Property: Keywords
9222    #[serde(skip_serializing_if = "Option::is_none")]
9223    #[cfg_attr(
9224        feature = "builder",
9225        builder(with = |value:impl Into<String>|vec![value.into()])
9226    )]
9227    pub keywords: Option<Vec<String>>,
9228    ///Property: Language
9229    #[serde(skip_serializing_if = "Option::is_none")]
9230    #[cfg_attr(
9231        feature = "builder",
9232        builder(with = |value:impl Into<String>|vec![value.into()])
9233    )]
9234    pub language: Option<Vec<String>>,
9235    ///Property: Detected locations
9236    #[serde(skip_serializing_if = "Option::is_none")]
9237    #[cfg_attr(
9238        feature = "builder",
9239        builder(with = |value:impl Into<String>|vec![value.into()])
9240    )]
9241    pub location_mentioned: Option<Vec<String>>,
9242    ///Property: Message ID
9243    #[serde(skip_serializing_if = "Option::is_none")]
9244    #[cfg_attr(
9245        feature = "builder",
9246        builder(with = |value:impl Into<String>|vec![value.into()])
9247    )]
9248    pub message_id: Option<Vec<String>>,
9249    ///Property: MIME type
9250    #[serde(skip_serializing_if = "Option::is_none")]
9251    #[cfg_attr(
9252        feature = "builder",
9253        builder(with = |value:impl Into<String>|vec![value.into()])
9254    )]
9255    pub mime_type: Option<Vec<String>>,
9256    ///Property: Modified on
9257    #[serde(skip_serializing_if = "Option::is_none")]
9258    #[cfg_attr(
9259        feature = "builder",
9260        builder(with = |value:impl Into<String>|vec![value.into()])
9261    )]
9262    pub modified_at: Option<Vec<String>>,
9263    ///Property: Name
9264    #[serde(default)]
9265    #[cfg_attr(
9266        feature = "builder",
9267        builder(with = |value:impl Into<String>|vec![value.into()])
9268    )]
9269    pub name: Vec<String>,
9270    ///Property: Detected names
9271    #[serde(skip_serializing_if = "Option::is_none")]
9272    #[cfg_attr(
9273        feature = "builder",
9274        builder(with = |value:impl Into<String>|vec![value.into()])
9275    )]
9276    pub names_mentioned: Option<Vec<String>>,
9277    ///Property: Notes
9278    #[serde(skip_serializing_if = "Option::is_none")]
9279    #[cfg_attr(
9280        feature = "builder",
9281        builder(with = |value:impl Into<String>|vec![value.into()])
9282    )]
9283    pub notes: Option<Vec<String>>,
9284    ///Property: Folder
9285    #[serde(skip_serializing_if = "Option::is_none")]
9286    #[cfg_attr(
9287        feature = "builder",
9288        builder(with = |value:impl Into<String>|vec![value.into()])
9289    )]
9290    pub parent: Option<Vec<String>>,
9291    ///Property: Detected people
9292    #[serde(skip_serializing_if = "Option::is_none")]
9293    #[cfg_attr(
9294        feature = "builder",
9295        builder(with = |value:impl Into<String>|vec![value.into()])
9296    )]
9297    pub people_mentioned: Option<Vec<String>>,
9298    ///Property: Detected phones
9299    #[serde(skip_serializing_if = "Option::is_none")]
9300    #[cfg_attr(
9301        feature = "builder",
9302        builder(with = |value:impl Into<String>|vec![value.into()])
9303    )]
9304    pub phone_mentioned: Option<Vec<String>>,
9305    ///Property: Previous name
9306    #[serde(skip_serializing_if = "Option::is_none")]
9307    #[cfg_attr(
9308        feature = "builder",
9309        builder(with = |value:impl Into<String>|vec![value.into()])
9310    )]
9311    pub previous_name: Option<Vec<String>>,
9312    ///Property: Processed at
9313    #[serde(skip_serializing_if = "Option::is_none")]
9314    #[cfg_attr(
9315        feature = "builder",
9316        builder(with = |value:impl Into<String>|vec![value.into()])
9317    )]
9318    pub processed_at: Option<Vec<String>>,
9319    ///Property: Processing agent
9320    #[serde(skip_serializing_if = "Option::is_none")]
9321    #[cfg_attr(
9322        feature = "builder",
9323        builder(with = |value:impl Into<String>|vec![value.into()])
9324    )]
9325    pub processing_agent: Option<Vec<String>>,
9326    ///Property: Processing error
9327    #[serde(skip_serializing_if = "Option::is_none")]
9328    #[cfg_attr(
9329        feature = "builder",
9330        builder(with = |value:impl Into<String>|vec![value.into()])
9331    )]
9332    pub processing_error: Option<Vec<String>>,
9333    ///Property: Processing status
9334    #[serde(skip_serializing_if = "Option::is_none")]
9335    #[cfg_attr(
9336        feature = "builder",
9337        builder(with = |value:impl Into<String>|vec![value.into()])
9338    )]
9339    pub processing_status: Option<Vec<String>>,
9340    ///Property: Program
9341    #[serde(skip_serializing_if = "Option::is_none")]
9342    #[cfg_attr(
9343        feature = "builder",
9344        builder(with = |value:impl Into<String>|vec![value.into()])
9345    )]
9346    pub program: Option<Vec<String>>,
9347    ///Property: Program ID
9348    #[serde(skip_serializing_if = "Option::is_none")]
9349    #[cfg_attr(
9350        feature = "builder",
9351        builder(with = |value:impl Into<String>|vec![value.into()])
9352    )]
9353    pub program_id: Option<Vec<String>>,
9354    ///Property: Source document
9355    #[serde(skip_serializing_if = "Option::is_none")]
9356    #[cfg_attr(
9357        feature = "builder",
9358        builder(with = |value:impl Into<String>|vec![value.into()])
9359    )]
9360    pub proof: Option<Vec<String>>,
9361    ///Property: Published on
9362    #[serde(skip_serializing_if = "Option::is_none")]
9363    #[cfg_attr(
9364        feature = "builder",
9365        builder(with = |value:impl Into<String>|vec![value.into()])
9366    )]
9367    pub published_at: Option<Vec<String>>,
9368    ///Property: Publishing source
9369    #[serde(skip_serializing_if = "Option::is_none")]
9370    #[cfg_attr(
9371        feature = "builder",
9372        builder(with = |value:impl Into<String>|vec![value.into()])
9373    )]
9374    pub publisher: Option<Vec<String>>,
9375    ///Property: Publishing source URL
9376    #[serde(skip_serializing_if = "Option::is_none")]
9377    #[cfg_attr(
9378        feature = "builder",
9379        builder(with = |value:impl Into<String>|vec![value.into()])
9380    )]
9381    pub publisher_url: Option<Vec<String>>,
9382    ///Property: Retrieved on
9383    #[serde(skip_serializing_if = "Option::is_none")]
9384    #[cfg_attr(
9385        feature = "builder",
9386        builder(with = |value:impl Into<String>|vec![value.into()])
9387    )]
9388    pub retrieved_at: Option<Vec<String>>,
9389    ///Property: Source link
9390    #[serde(skip_serializing_if = "Option::is_none")]
9391    #[cfg_attr(
9392        feature = "builder",
9393        builder(with = |value:impl Into<String>|vec![value.into()])
9394    )]
9395    pub source_url: Option<Vec<String>>,
9396    ///Property: Summary
9397    #[serde(skip_serializing_if = "Option::is_none")]
9398    #[cfg_attr(
9399        feature = "builder",
9400        builder(with = |value:impl Into<String>|vec![value.into()])
9401    )]
9402    pub summary: Option<Vec<String>>,
9403    ///Property: Title
9404    #[serde(skip_serializing_if = "Option::is_none")]
9405    #[cfg_attr(
9406        feature = "builder",
9407        builder(with = |value:impl Into<String>|vec![value.into()])
9408    )]
9409    pub title: Option<Vec<String>>,
9410    ///Property: Topics
9411    #[serde(skip_serializing_if = "Option::is_none")]
9412    #[cfg_attr(
9413        feature = "builder",
9414        builder(with = |value:impl Into<String>|vec![value.into()])
9415    )]
9416    pub topics: Option<Vec<String>>,
9417    ///Property: The language of the translated text
9418    #[serde(skip_serializing_if = "Option::is_none")]
9419    #[cfg_attr(
9420        feature = "builder",
9421        builder(with = |value:impl Into<String>|vec![value.into()])
9422    )]
9423    pub translated_language: Option<Vec<String>>,
9424    ///Property: Translated version of the body text
9425    #[serde(skip_serializing_if = "Option::is_none")]
9426    #[cfg_attr(
9427        feature = "builder",
9428        builder(with = |value:impl Into<String>|vec![value.into()])
9429    )]
9430    pub translated_text: Option<Vec<String>>,
9431    ///Property: Weak alias
9432    #[serde(skip_serializing_if = "Option::is_none")]
9433    #[cfg_attr(
9434        feature = "builder",
9435        builder(with = |value:impl Into<String>|vec![value.into()])
9436    )]
9437    pub weak_alias: Option<Vec<String>>,
9438    ///Property: Wikidata ID
9439    #[serde(skip_serializing_if = "Option::is_none")]
9440    #[cfg_attr(
9441        feature = "builder",
9442        builder(with = |value:impl Into<String>|vec![value.into()])
9443    )]
9444    pub wikidata_id: Option<Vec<String>>,
9445    ///Property: Wikipedia Article
9446    #[serde(skip_serializing_if = "Option::is_none")]
9447    #[cfg_attr(
9448        feature = "builder",
9449        builder(with = |value:impl Into<String>|vec![value.into()])
9450    )]
9451    pub wikipedia_url: Option<Vec<String>>,
9452}
9453impl HyperText {
9454    /// Create a new entity with the given ID
9455    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
9456    pub fn new(id: impl Into<String>) -> Self {
9457        Self {
9458            id: id.into(),
9459            schema: "HyperText".to_string(),
9460            address: None,
9461            address_entity: None,
9462            aleph_url: None,
9463            alias: None,
9464            ancestors: None,
9465            author: None,
9466            authored_at: None,
9467            body_html: None,
9468            body_text: None,
9469            companies_mentioned: None,
9470            content_hash: None,
9471            country: None,
9472            crawler: None,
9473            created_at: None,
9474            date: None,
9475            description: None,
9476            detected_country: None,
9477            detected_language: None,
9478            email_mentioned: None,
9479            encoding: None,
9480            extension: None,
9481            file_name: Vec::new(),
9482            file_size: None,
9483            generator: None,
9484            iban_mentioned: None,
9485            index_text: None,
9486            ip_mentioned: None,
9487            keywords: None,
9488            language: None,
9489            location_mentioned: None,
9490            message_id: None,
9491            mime_type: None,
9492            modified_at: None,
9493            name: Vec::new(),
9494            names_mentioned: None,
9495            notes: None,
9496            parent: None,
9497            people_mentioned: None,
9498            phone_mentioned: None,
9499            previous_name: None,
9500            processed_at: None,
9501            processing_agent: None,
9502            processing_error: None,
9503            processing_status: None,
9504            program: None,
9505            program_id: None,
9506            proof: None,
9507            published_at: None,
9508            publisher: None,
9509            publisher_url: None,
9510            retrieved_at: None,
9511            source_url: None,
9512            summary: None,
9513            title: None,
9514            topics: None,
9515            translated_language: None,
9516            translated_text: None,
9517            weak_alias: None,
9518            wikidata_id: None,
9519            wikipedia_url: None,
9520        }
9521    }
9522    /// Get the schema name
9523    pub fn schema_name() -> &'static str {
9524        "HyperText"
9525    }
9526    /// Serialize to standard FTM nested JSON format
9527    ///
9528    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
9529    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
9530        let mut value = serde_json::to_value(self)?;
9531        if let Some(obj) = value.as_object_mut() {
9532            let id = obj.remove("id");
9533            let schema = obj.remove("schema");
9534            let properties = serde_json::Value::Object(std::mem::take(obj));
9535            if let Some(id) = id {
9536                obj.insert("id".into(), id);
9537            }
9538            if let Some(schema) = schema {
9539                obj.insert("schema".into(), schema);
9540            }
9541            obj.insert("properties".into(), properties);
9542        }
9543        serde_json::to_string(&value)
9544    }
9545}
9546///FTM Schema: Identification
9547#[derive(Debug, Clone, Serialize, Deserialize)]
9548#[cfg_attr(feature = "builder", derive(Builder))]
9549#[serde(rename_all = "camelCase")]
9550pub struct Identification {
9551    pub id: String,
9552    #[cfg_attr(feature = "builder", builder(default = "Identification".to_string()))]
9553    pub schema: String,
9554    ///Property: Aleph URL
9555    #[serde(skip_serializing_if = "Option::is_none")]
9556    #[cfg_attr(
9557        feature = "builder",
9558        builder(with = |value:impl Into<String>|vec![value.into()])
9559    )]
9560    pub aleph_url: Option<Vec<String>>,
9561    ///Property: Authority
9562    #[serde(skip_serializing_if = "Option::is_none")]
9563    #[cfg_attr(
9564        feature = "builder",
9565        builder(with = |value:impl Into<String>|vec![value.into()])
9566    )]
9567    pub authority: Option<Vec<String>>,
9568    ///Property: Country
9569    #[serde(skip_serializing_if = "Option::is_none")]
9570    #[cfg_attr(
9571        feature = "builder",
9572        builder(with = |value:impl Into<String>|vec![value.into()])
9573    )]
9574    pub country: Option<Vec<String>>,
9575    ///Property: Date
9576    #[serde(skip_serializing_if = "Option::is_none")]
9577    #[cfg_attr(
9578        feature = "builder",
9579        builder(with = |value:impl Into<String>|vec![value.into()])
9580    )]
9581    pub date: Option<Vec<String>>,
9582    ///Property: Description
9583    #[serde(skip_serializing_if = "Option::is_none")]
9584    #[cfg_attr(
9585        feature = "builder",
9586        builder(with = |value:impl Into<String>|vec![value.into()])
9587    )]
9588    pub description: Option<Vec<String>>,
9589    ///Property: End date
9590    #[serde(skip_serializing_if = "Option::is_none")]
9591    #[cfg_attr(
9592        feature = "builder",
9593        builder(with = |value:impl Into<String>|vec![value.into()])
9594    )]
9595    pub end_date: Option<Vec<String>>,
9596    ///Property: Identification holder
9597    #[serde(default)]
9598    #[cfg_attr(
9599        feature = "builder",
9600        builder(with = |value:impl Into<String>|vec![value.into()])
9601    )]
9602    pub holder: Vec<String>,
9603    ///Property: Index text
9604    #[serde(skip_serializing_if = "Option::is_none")]
9605    #[cfg_attr(
9606        feature = "builder",
9607        builder(with = |value:impl Into<String>|vec![value.into()])
9608    )]
9609    pub index_text: Option<Vec<String>>,
9610    ///Property: Modified on
9611    #[serde(skip_serializing_if = "Option::is_none")]
9612    #[cfg_attr(
9613        feature = "builder",
9614        builder(with = |value:impl Into<String>|vec![value.into()])
9615    )]
9616    pub modified_at: Option<Vec<String>>,
9617    ///Property: Detected names
9618    #[serde(skip_serializing_if = "Option::is_none")]
9619    #[cfg_attr(
9620        feature = "builder",
9621        builder(with = |value:impl Into<String>|vec![value.into()])
9622    )]
9623    pub names_mentioned: Option<Vec<String>>,
9624    ///Property: Document number
9625    #[serde(default)]
9626    #[cfg_attr(
9627        feature = "builder",
9628        builder(with = |value:impl Into<String>|vec![value.into()])
9629    )]
9630    pub number: Vec<String>,
9631    ///Property: Source document
9632    #[serde(skip_serializing_if = "Option::is_none")]
9633    #[cfg_attr(
9634        feature = "builder",
9635        builder(with = |value:impl Into<String>|vec![value.into()])
9636    )]
9637    pub proof: Option<Vec<String>>,
9638    ///Property: Publishing source
9639    #[serde(skip_serializing_if = "Option::is_none")]
9640    #[cfg_attr(
9641        feature = "builder",
9642        builder(with = |value:impl Into<String>|vec![value.into()])
9643    )]
9644    pub publisher: Option<Vec<String>>,
9645    ///Property: Publishing source URL
9646    #[serde(skip_serializing_if = "Option::is_none")]
9647    #[cfg_attr(
9648        feature = "builder",
9649        builder(with = |value:impl Into<String>|vec![value.into()])
9650    )]
9651    pub publisher_url: Option<Vec<String>>,
9652    ///Property: Record ID
9653    #[serde(skip_serializing_if = "Option::is_none")]
9654    #[cfg_attr(
9655        feature = "builder",
9656        builder(with = |value:impl Into<String>|vec![value.into()])
9657    )]
9658    pub record_id: Option<Vec<String>>,
9659    ///Property: Retrieved on
9660    #[serde(skip_serializing_if = "Option::is_none")]
9661    #[cfg_attr(
9662        feature = "builder",
9663        builder(with = |value:impl Into<String>|vec![value.into()])
9664    )]
9665    pub retrieved_at: Option<Vec<String>>,
9666    ///Property: Source link
9667    #[serde(skip_serializing_if = "Option::is_none")]
9668    #[cfg_attr(
9669        feature = "builder",
9670        builder(with = |value:impl Into<String>|vec![value.into()])
9671    )]
9672    pub source_url: Option<Vec<String>>,
9673    ///Property: Start date
9674    #[serde(skip_serializing_if = "Option::is_none")]
9675    #[cfg_attr(
9676        feature = "builder",
9677        builder(with = |value:impl Into<String>|vec![value.into()])
9678    )]
9679    pub start_date: Option<Vec<String>>,
9680    ///Property: Summary
9681    #[serde(skip_serializing_if = "Option::is_none")]
9682    #[cfg_attr(
9683        feature = "builder",
9684        builder(with = |value:impl Into<String>|vec![value.into()])
9685    )]
9686    pub summary: Option<Vec<String>>,
9687    ///Property: Type
9688    #[serde(skip_serializing_if = "Option::is_none")]
9689    #[cfg_attr(
9690        feature = "builder",
9691        builder(with = |value:impl Into<String>|vec![value.into()])
9692    )]
9693    pub type_: Option<Vec<String>>,
9694}
9695impl Identification {
9696    /// Create a new entity with the given ID
9697    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
9698    pub fn new(id: impl Into<String>) -> Self {
9699        Self {
9700            id: id.into(),
9701            schema: "Identification".to_string(),
9702            aleph_url: None,
9703            authority: None,
9704            country: None,
9705            date: None,
9706            description: None,
9707            end_date: None,
9708            holder: Vec::new(),
9709            index_text: None,
9710            modified_at: None,
9711            names_mentioned: None,
9712            number: Vec::new(),
9713            proof: None,
9714            publisher: None,
9715            publisher_url: None,
9716            record_id: None,
9717            retrieved_at: None,
9718            source_url: None,
9719            start_date: None,
9720            summary: None,
9721            type_: None,
9722        }
9723    }
9724    /// Get the schema name
9725    pub fn schema_name() -> &'static str {
9726        "Identification"
9727    }
9728    /// Serialize to standard FTM nested JSON format
9729    ///
9730    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
9731    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
9732        let mut value = serde_json::to_value(self)?;
9733        if let Some(obj) = value.as_object_mut() {
9734            let id = obj.remove("id");
9735            let schema = obj.remove("schema");
9736            let properties = serde_json::Value::Object(std::mem::take(obj));
9737            if let Some(id) = id {
9738                obj.insert("id".into(), id);
9739            }
9740            if let Some(schema) = schema {
9741                obj.insert("schema".into(), schema);
9742            }
9743            obj.insert("properties".into(), properties);
9744        }
9745        serde_json::to_string(&value)
9746    }
9747}
9748///FTM Schema: Image
9749#[derive(Debug, Clone, Serialize, Deserialize)]
9750#[cfg_attr(feature = "builder", derive(Builder))]
9751#[serde(rename_all = "camelCase")]
9752pub struct Image {
9753    pub id: String,
9754    #[cfg_attr(feature = "builder", builder(default = "Image".to_string()))]
9755    pub schema: String,
9756    ///Property: Address
9757    #[serde(skip_serializing_if = "Option::is_none")]
9758    #[cfg_attr(
9759        feature = "builder",
9760        builder(with = |value:impl Into<String>|vec![value.into()])
9761    )]
9762    pub address: Option<Vec<String>>,
9763    ///Property: Address
9764    #[serde(skip_serializing_if = "Option::is_none")]
9765    #[cfg_attr(
9766        feature = "builder",
9767        builder(with = |value:impl Into<String>|vec![value.into()])
9768    )]
9769    pub address_entity: Option<Vec<String>>,
9770    ///Property: Aleph URL
9771    #[serde(skip_serializing_if = "Option::is_none")]
9772    #[cfg_attr(
9773        feature = "builder",
9774        builder(with = |value:impl Into<String>|vec![value.into()])
9775    )]
9776    pub aleph_url: Option<Vec<String>>,
9777    ///Property: Alias
9778    #[serde(skip_serializing_if = "Option::is_none")]
9779    #[cfg_attr(
9780        feature = "builder",
9781        builder(with = |value:impl Into<String>|vec![value.into()])
9782    )]
9783    pub alias: Option<Vec<String>>,
9784    ///Property: Ancestors
9785    #[serde(skip_serializing_if = "Option::is_none")]
9786    #[cfg_attr(
9787        feature = "builder",
9788        builder(with = |value:impl Into<String>|vec![value.into()])
9789    )]
9790    pub ancestors: Option<Vec<String>>,
9791    ///Property: Author
9792    #[serde(skip_serializing_if = "Option::is_none")]
9793    #[cfg_attr(
9794        feature = "builder",
9795        builder(with = |value:impl Into<String>|vec![value.into()])
9796    )]
9797    pub author: Option<Vec<String>>,
9798    ///Property: Authored on
9799    #[serde(skip_serializing_if = "Option::is_none")]
9800    #[cfg_attr(
9801        feature = "builder",
9802        builder(with = |value:impl Into<String>|vec![value.into()])
9803    )]
9804    pub authored_at: Option<Vec<String>>,
9805    ///Property: Text
9806    #[serde(skip_serializing_if = "Option::is_none")]
9807    #[cfg_attr(
9808        feature = "builder",
9809        builder(with = |value:impl Into<String>|vec![value.into()])
9810    )]
9811    pub body_text: Option<Vec<String>>,
9812    ///Property: Detected companies
9813    #[serde(skip_serializing_if = "Option::is_none")]
9814    #[cfg_attr(
9815        feature = "builder",
9816        builder(with = |value:impl Into<String>|vec![value.into()])
9817    )]
9818    pub companies_mentioned: Option<Vec<String>>,
9819    ///Property: Checksum
9820    #[serde(skip_serializing_if = "Option::is_none")]
9821    #[cfg_attr(
9822        feature = "builder",
9823        builder(with = |value:impl Into<String>|vec![value.into()])
9824    )]
9825    pub content_hash: Option<Vec<String>>,
9826    ///Property: Country
9827    #[serde(skip_serializing_if = "Option::is_none")]
9828    #[cfg_attr(
9829        feature = "builder",
9830        builder(with = |value:impl Into<String>|vec![value.into()])
9831    )]
9832    pub country: Option<Vec<String>>,
9833    ///Property: Crawler
9834    #[serde(skip_serializing_if = "Option::is_none")]
9835    #[cfg_attr(
9836        feature = "builder",
9837        builder(with = |value:impl Into<String>|vec![value.into()])
9838    )]
9839    pub crawler: Option<Vec<String>>,
9840    ///Property: Created at
9841    #[serde(skip_serializing_if = "Option::is_none")]
9842    #[cfg_attr(
9843        feature = "builder",
9844        builder(with = |value:impl Into<String>|vec![value.into()])
9845    )]
9846    pub created_at: Option<Vec<String>>,
9847    ///Property: Credit
9848    #[serde(skip_serializing_if = "Option::is_none")]
9849    #[cfg_attr(
9850        feature = "builder",
9851        builder(with = |value:impl Into<String>|vec![value.into()])
9852    )]
9853    pub credit: Option<Vec<String>>,
9854    ///Property: Date
9855    #[serde(skip_serializing_if = "Option::is_none")]
9856    #[cfg_attr(
9857        feature = "builder",
9858        builder(with = |value:impl Into<String>|vec![value.into()])
9859    )]
9860    pub date: Option<Vec<String>>,
9861    ///Property: Description
9862    #[serde(skip_serializing_if = "Option::is_none")]
9863    #[cfg_attr(
9864        feature = "builder",
9865        builder(with = |value:impl Into<String>|vec![value.into()])
9866    )]
9867    pub description: Option<Vec<String>>,
9868    ///Property: Detected country
9869    #[serde(skip_serializing_if = "Option::is_none")]
9870    #[cfg_attr(
9871        feature = "builder",
9872        builder(with = |value:impl Into<String>|vec![value.into()])
9873    )]
9874    pub detected_country: Option<Vec<String>>,
9875    ///Property: Detected language
9876    #[serde(skip_serializing_if = "Option::is_none")]
9877    #[cfg_attr(
9878        feature = "builder",
9879        builder(with = |value:impl Into<String>|vec![value.into()])
9880    )]
9881    pub detected_language: Option<Vec<String>>,
9882    ///Property: Detected e-mail addresses
9883    #[serde(skip_serializing_if = "Option::is_none")]
9884    #[cfg_attr(
9885        feature = "builder",
9886        builder(with = |value:impl Into<String>|vec![value.into()])
9887    )]
9888    pub email_mentioned: Option<Vec<String>>,
9889    ///Property: File encoding
9890    #[serde(skip_serializing_if = "Option::is_none")]
9891    #[cfg_attr(
9892        feature = "builder",
9893        builder(with = |value:impl Into<String>|vec![value.into()])
9894    )]
9895    pub encoding: Option<Vec<String>>,
9896    ///Property: File extension
9897    #[serde(skip_serializing_if = "Option::is_none")]
9898    #[cfg_attr(
9899        feature = "builder",
9900        builder(with = |value:impl Into<String>|vec![value.into()])
9901    )]
9902    pub extension: Option<Vec<String>>,
9903    ///Property: File name
9904    #[serde(default)]
9905    #[cfg_attr(
9906        feature = "builder",
9907        builder(with = |value:impl Into<String>|vec![value.into()])
9908    )]
9909    pub file_name: Vec<String>,
9910    ///Property: File size
9911    #[serde(
9912        skip_serializing_if = "Option::is_none",
9913        deserialize_with = "deserialize_opt_f64_vec",
9914        default
9915    )]
9916    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
9917    pub file_size: Option<Vec<f64>>,
9918    ///Property: Generator
9919    #[serde(skip_serializing_if = "Option::is_none")]
9920    #[cfg_attr(
9921        feature = "builder",
9922        builder(with = |value:impl Into<String>|vec![value.into()])
9923    )]
9924    pub generator: Option<Vec<String>>,
9925    ///Property: Detected IBANs
9926    #[serde(skip_serializing_if = "Option::is_none")]
9927    #[cfg_attr(
9928        feature = "builder",
9929        builder(with = |value:impl Into<String>|vec![value.into()])
9930    )]
9931    pub iban_mentioned: Option<Vec<String>>,
9932    ///Property: Index text
9933    #[serde(skip_serializing_if = "Option::is_none")]
9934    #[cfg_attr(
9935        feature = "builder",
9936        builder(with = |value:impl Into<String>|vec![value.into()])
9937    )]
9938    pub index_text: Option<Vec<String>>,
9939    ///Property: Detected IP addresses
9940    #[serde(skip_serializing_if = "Option::is_none")]
9941    #[cfg_attr(
9942        feature = "builder",
9943        builder(with = |value:impl Into<String>|vec![value.into()])
9944    )]
9945    pub ip_mentioned: Option<Vec<String>>,
9946    ///Property: Keywords
9947    #[serde(skip_serializing_if = "Option::is_none")]
9948    #[cfg_attr(
9949        feature = "builder",
9950        builder(with = |value:impl Into<String>|vec![value.into()])
9951    )]
9952    pub keywords: Option<Vec<String>>,
9953    ///Property: Language
9954    #[serde(skip_serializing_if = "Option::is_none")]
9955    #[cfg_attr(
9956        feature = "builder",
9957        builder(with = |value:impl Into<String>|vec![value.into()])
9958    )]
9959    pub language: Option<Vec<String>>,
9960    ///Property: Detected locations
9961    #[serde(skip_serializing_if = "Option::is_none")]
9962    #[cfg_attr(
9963        feature = "builder",
9964        builder(with = |value:impl Into<String>|vec![value.into()])
9965    )]
9966    pub location_mentioned: Option<Vec<String>>,
9967    ///Property: Message ID
9968    #[serde(skip_serializing_if = "Option::is_none")]
9969    #[cfg_attr(
9970        feature = "builder",
9971        builder(with = |value:impl Into<String>|vec![value.into()])
9972    )]
9973    pub message_id: Option<Vec<String>>,
9974    ///Property: MIME type
9975    #[serde(skip_serializing_if = "Option::is_none")]
9976    #[cfg_attr(
9977        feature = "builder",
9978        builder(with = |value:impl Into<String>|vec![value.into()])
9979    )]
9980    pub mime_type: Option<Vec<String>>,
9981    ///Property: Modified on
9982    #[serde(skip_serializing_if = "Option::is_none")]
9983    #[cfg_attr(
9984        feature = "builder",
9985        builder(with = |value:impl Into<String>|vec![value.into()])
9986    )]
9987    pub modified_at: Option<Vec<String>>,
9988    ///Property: Name
9989    #[serde(default)]
9990    #[cfg_attr(
9991        feature = "builder",
9992        builder(with = |value:impl Into<String>|vec![value.into()])
9993    )]
9994    pub name: Vec<String>,
9995    ///Property: Detected names
9996    #[serde(skip_serializing_if = "Option::is_none")]
9997    #[cfg_attr(
9998        feature = "builder",
9999        builder(with = |value:impl Into<String>|vec![value.into()])
10000    )]
10001    pub names_mentioned: Option<Vec<String>>,
10002    ///Property: Notes
10003    #[serde(skip_serializing_if = "Option::is_none")]
10004    #[cfg_attr(
10005        feature = "builder",
10006        builder(with = |value:impl Into<String>|vec![value.into()])
10007    )]
10008    pub notes: Option<Vec<String>>,
10009    ///Property: Folder
10010    #[serde(skip_serializing_if = "Option::is_none")]
10011    #[cfg_attr(
10012        feature = "builder",
10013        builder(with = |value:impl Into<String>|vec![value.into()])
10014    )]
10015    pub parent: Option<Vec<String>>,
10016    ///Property: Detected people
10017    #[serde(skip_serializing_if = "Option::is_none")]
10018    #[cfg_attr(
10019        feature = "builder",
10020        builder(with = |value:impl Into<String>|vec![value.into()])
10021    )]
10022    pub people_mentioned: Option<Vec<String>>,
10023    ///Property: Detected phones
10024    #[serde(skip_serializing_if = "Option::is_none")]
10025    #[cfg_attr(
10026        feature = "builder",
10027        builder(with = |value:impl Into<String>|vec![value.into()])
10028    )]
10029    pub phone_mentioned: Option<Vec<String>>,
10030    ///Property: Pictured
10031    #[serde(skip_serializing_if = "Option::is_none")]
10032    #[cfg_attr(
10033        feature = "builder",
10034        builder(with = |value:impl Into<String>|vec![value.into()])
10035    )]
10036    pub pictured: Option<Vec<String>>,
10037    ///Property: Previous name
10038    #[serde(skip_serializing_if = "Option::is_none")]
10039    #[cfg_attr(
10040        feature = "builder",
10041        builder(with = |value:impl Into<String>|vec![value.into()])
10042    )]
10043    pub previous_name: Option<Vec<String>>,
10044    ///Property: Processed at
10045    #[serde(skip_serializing_if = "Option::is_none")]
10046    #[cfg_attr(
10047        feature = "builder",
10048        builder(with = |value:impl Into<String>|vec![value.into()])
10049    )]
10050    pub processed_at: Option<Vec<String>>,
10051    ///Property: Processing agent
10052    #[serde(skip_serializing_if = "Option::is_none")]
10053    #[cfg_attr(
10054        feature = "builder",
10055        builder(with = |value:impl Into<String>|vec![value.into()])
10056    )]
10057    pub processing_agent: Option<Vec<String>>,
10058    ///Property: Processing error
10059    #[serde(skip_serializing_if = "Option::is_none")]
10060    #[cfg_attr(
10061        feature = "builder",
10062        builder(with = |value:impl Into<String>|vec![value.into()])
10063    )]
10064    pub processing_error: Option<Vec<String>>,
10065    ///Property: Processing status
10066    #[serde(skip_serializing_if = "Option::is_none")]
10067    #[cfg_attr(
10068        feature = "builder",
10069        builder(with = |value:impl Into<String>|vec![value.into()])
10070    )]
10071    pub processing_status: Option<Vec<String>>,
10072    ///Property: Program
10073    #[serde(skip_serializing_if = "Option::is_none")]
10074    #[cfg_attr(
10075        feature = "builder",
10076        builder(with = |value:impl Into<String>|vec![value.into()])
10077    )]
10078    pub program: Option<Vec<String>>,
10079    ///Property: Program ID
10080    #[serde(skip_serializing_if = "Option::is_none")]
10081    #[cfg_attr(
10082        feature = "builder",
10083        builder(with = |value:impl Into<String>|vec![value.into()])
10084    )]
10085    pub program_id: Option<Vec<String>>,
10086    ///Property: Source document
10087    #[serde(skip_serializing_if = "Option::is_none")]
10088    #[cfg_attr(
10089        feature = "builder",
10090        builder(with = |value:impl Into<String>|vec![value.into()])
10091    )]
10092    pub proof: Option<Vec<String>>,
10093    ///Property: Published on
10094    #[serde(skip_serializing_if = "Option::is_none")]
10095    #[cfg_attr(
10096        feature = "builder",
10097        builder(with = |value:impl Into<String>|vec![value.into()])
10098    )]
10099    pub published_at: Option<Vec<String>>,
10100    ///Property: Publishing source
10101    #[serde(skip_serializing_if = "Option::is_none")]
10102    #[cfg_attr(
10103        feature = "builder",
10104        builder(with = |value:impl Into<String>|vec![value.into()])
10105    )]
10106    pub publisher: Option<Vec<String>>,
10107    ///Property: Publishing source URL
10108    #[serde(skip_serializing_if = "Option::is_none")]
10109    #[cfg_attr(
10110        feature = "builder",
10111        builder(with = |value:impl Into<String>|vec![value.into()])
10112    )]
10113    pub publisher_url: Option<Vec<String>>,
10114    ///Property: Retrieved on
10115    #[serde(skip_serializing_if = "Option::is_none")]
10116    #[cfg_attr(
10117        feature = "builder",
10118        builder(with = |value:impl Into<String>|vec![value.into()])
10119    )]
10120    pub retrieved_at: Option<Vec<String>>,
10121    ///Property: Source link
10122    #[serde(skip_serializing_if = "Option::is_none")]
10123    #[cfg_attr(
10124        feature = "builder",
10125        builder(with = |value:impl Into<String>|vec![value.into()])
10126    )]
10127    pub source_url: Option<Vec<String>>,
10128    ///Property: Summary
10129    #[serde(skip_serializing_if = "Option::is_none")]
10130    #[cfg_attr(
10131        feature = "builder",
10132        builder(with = |value:impl Into<String>|vec![value.into()])
10133    )]
10134    pub summary: Option<Vec<String>>,
10135    ///Property: Title
10136    #[serde(skip_serializing_if = "Option::is_none")]
10137    #[cfg_attr(
10138        feature = "builder",
10139        builder(with = |value:impl Into<String>|vec![value.into()])
10140    )]
10141    pub title: Option<Vec<String>>,
10142    ///Property: Topics
10143    #[serde(skip_serializing_if = "Option::is_none")]
10144    #[cfg_attr(
10145        feature = "builder",
10146        builder(with = |value:impl Into<String>|vec![value.into()])
10147    )]
10148    pub topics: Option<Vec<String>>,
10149    ///Property: The language of the translated text
10150    #[serde(skip_serializing_if = "Option::is_none")]
10151    #[cfg_attr(
10152        feature = "builder",
10153        builder(with = |value:impl Into<String>|vec![value.into()])
10154    )]
10155    pub translated_language: Option<Vec<String>>,
10156    ///Property: Translated version of the body text
10157    #[serde(skip_serializing_if = "Option::is_none")]
10158    #[cfg_attr(
10159        feature = "builder",
10160        builder(with = |value:impl Into<String>|vec![value.into()])
10161    )]
10162    pub translated_text: Option<Vec<String>>,
10163    ///Property: Weak alias
10164    #[serde(skip_serializing_if = "Option::is_none")]
10165    #[cfg_attr(
10166        feature = "builder",
10167        builder(with = |value:impl Into<String>|vec![value.into()])
10168    )]
10169    pub weak_alias: Option<Vec<String>>,
10170    ///Property: Wikidata ID
10171    #[serde(skip_serializing_if = "Option::is_none")]
10172    #[cfg_attr(
10173        feature = "builder",
10174        builder(with = |value:impl Into<String>|vec![value.into()])
10175    )]
10176    pub wikidata_id: Option<Vec<String>>,
10177    ///Property: Wikipedia Article
10178    #[serde(skip_serializing_if = "Option::is_none")]
10179    #[cfg_attr(
10180        feature = "builder",
10181        builder(with = |value:impl Into<String>|vec![value.into()])
10182    )]
10183    pub wikipedia_url: Option<Vec<String>>,
10184}
10185impl Image {
10186    /// Create a new entity with the given ID
10187    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
10188    pub fn new(id: impl Into<String>) -> Self {
10189        Self {
10190            id: id.into(),
10191            schema: "Image".to_string(),
10192            address: None,
10193            address_entity: None,
10194            aleph_url: None,
10195            alias: None,
10196            ancestors: None,
10197            author: None,
10198            authored_at: None,
10199            body_text: None,
10200            companies_mentioned: None,
10201            content_hash: None,
10202            country: None,
10203            crawler: None,
10204            created_at: None,
10205            credit: None,
10206            date: None,
10207            description: None,
10208            detected_country: None,
10209            detected_language: None,
10210            email_mentioned: None,
10211            encoding: None,
10212            extension: None,
10213            file_name: Vec::new(),
10214            file_size: None,
10215            generator: None,
10216            iban_mentioned: None,
10217            index_text: None,
10218            ip_mentioned: None,
10219            keywords: None,
10220            language: None,
10221            location_mentioned: None,
10222            message_id: None,
10223            mime_type: None,
10224            modified_at: None,
10225            name: Vec::new(),
10226            names_mentioned: None,
10227            notes: None,
10228            parent: None,
10229            people_mentioned: None,
10230            phone_mentioned: None,
10231            pictured: None,
10232            previous_name: None,
10233            processed_at: None,
10234            processing_agent: None,
10235            processing_error: None,
10236            processing_status: None,
10237            program: None,
10238            program_id: None,
10239            proof: None,
10240            published_at: None,
10241            publisher: None,
10242            publisher_url: None,
10243            retrieved_at: None,
10244            source_url: None,
10245            summary: None,
10246            title: None,
10247            topics: None,
10248            translated_language: None,
10249            translated_text: None,
10250            weak_alias: None,
10251            wikidata_id: None,
10252            wikipedia_url: None,
10253        }
10254    }
10255    /// Get the schema name
10256    pub fn schema_name() -> &'static str {
10257        "Image"
10258    }
10259    /// Serialize to standard FTM nested JSON format
10260    ///
10261    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
10262    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
10263        let mut value = serde_json::to_value(self)?;
10264        if let Some(obj) = value.as_object_mut() {
10265            let id = obj.remove("id");
10266            let schema = obj.remove("schema");
10267            let properties = serde_json::Value::Object(std::mem::take(obj));
10268            if let Some(id) = id {
10269                obj.insert("id".into(), id);
10270            }
10271            if let Some(schema) = schema {
10272                obj.insert("schema".into(), schema);
10273            }
10274            obj.insert("properties".into(), properties);
10275        }
10276        serde_json::to_string(&value)
10277    }
10278}
10279///FTM Schema: Legal entity
10280#[derive(Debug, Clone, Serialize, Deserialize)]
10281#[cfg_attr(feature = "builder", derive(Builder))]
10282#[serde(rename_all = "camelCase")]
10283pub struct LegalEntity {
10284    pub id: String,
10285    #[cfg_attr(feature = "builder", builder(default = "LegalEntity".to_string()))]
10286    pub schema: String,
10287    ///Property: Abbreviation
10288    #[serde(skip_serializing_if = "Option::is_none")]
10289    #[cfg_attr(
10290        feature = "builder",
10291        builder(with = |value:impl Into<String>|vec![value.into()])
10292    )]
10293    pub abbreviation: Option<Vec<String>>,
10294    ///Property: Address
10295    #[serde(skip_serializing_if = "Option::is_none")]
10296    #[cfg_attr(
10297        feature = "builder",
10298        builder(with = |value:impl Into<String>|vec![value.into()])
10299    )]
10300    pub address: Option<Vec<String>>,
10301    ///Property: Address
10302    #[serde(skip_serializing_if = "Option::is_none")]
10303    #[cfg_attr(
10304        feature = "builder",
10305        builder(with = |value:impl Into<String>|vec![value.into()])
10306    )]
10307    pub address_entity: Option<Vec<String>>,
10308    ///Property: Aleph URL
10309    #[serde(skip_serializing_if = "Option::is_none")]
10310    #[cfg_attr(
10311        feature = "builder",
10312        builder(with = |value:impl Into<String>|vec![value.into()])
10313    )]
10314    pub aleph_url: Option<Vec<String>>,
10315    ///Property: Alias
10316    #[serde(skip_serializing_if = "Option::is_none")]
10317    #[cfg_attr(
10318        feature = "builder",
10319        builder(with = |value:impl Into<String>|vec![value.into()])
10320    )]
10321    pub alias: Option<Vec<String>>,
10322    ///Property: BrightQuery ID
10323    #[serde(skip_serializing_if = "Option::is_none")]
10324    #[cfg_attr(
10325        feature = "builder",
10326        builder(with = |value:impl Into<String>|vec![value.into()])
10327    )]
10328    pub bright_query_id: Option<Vec<String>>,
10329    ///Property: BrightQuery Organization ID
10330    #[serde(skip_serializing_if = "Option::is_none")]
10331    #[cfg_attr(
10332        feature = "builder",
10333        builder(with = |value:impl Into<String>|vec![value.into()])
10334    )]
10335    pub bright_query_org_id: Option<Vec<String>>,
10336    ///Property: Bureau van Dijk ID
10337    #[serde(skip_serializing_if = "Option::is_none")]
10338    #[cfg_attr(
10339        feature = "builder",
10340        builder(with = |value:impl Into<String>|vec![value.into()])
10341    )]
10342    pub bvd_id: Option<Vec<String>>,
10343    ///Property: Classification
10344    #[serde(skip_serializing_if = "Option::is_none")]
10345    #[cfg_attr(
10346        feature = "builder",
10347        builder(with = |value:impl Into<String>|vec![value.into()])
10348    )]
10349    pub classification: Option<Vec<String>>,
10350    ///Property: Country
10351    #[serde(skip_serializing_if = "Option::is_none")]
10352    #[cfg_attr(
10353        feature = "builder",
10354        builder(with = |value:impl Into<String>|vec![value.into()])
10355    )]
10356    pub country: Option<Vec<String>>,
10357    ///Property: Created at
10358    #[serde(skip_serializing_if = "Option::is_none")]
10359    #[cfg_attr(
10360        feature = "builder",
10361        builder(with = |value:impl Into<String>|vec![value.into()])
10362    )]
10363    pub created_at: Option<Vec<String>>,
10364    ///Property: Description
10365    #[serde(skip_serializing_if = "Option::is_none")]
10366    #[cfg_attr(
10367        feature = "builder",
10368        builder(with = |value:impl Into<String>|vec![value.into()])
10369    )]
10370    pub description: Option<Vec<String>>,
10371    ///Property: Dissolution date
10372    #[serde(skip_serializing_if = "Option::is_none")]
10373    #[cfg_attr(
10374        feature = "builder",
10375        builder(with = |value:impl Into<String>|vec![value.into()])
10376    )]
10377    pub dissolution_date: Option<Vec<String>>,
10378    ///Property: DUNS
10379    #[serde(skip_serializing_if = "Option::is_none")]
10380    #[cfg_attr(
10381        feature = "builder",
10382        builder(with = |value:impl Into<String>|vec![value.into()])
10383    )]
10384    pub duns_code: Option<Vec<String>>,
10385    ///Property: Email
10386    #[serde(skip_serializing_if = "Option::is_none")]
10387    #[cfg_attr(
10388        feature = "builder",
10389        builder(with = |value:impl Into<String>|vec![value.into()])
10390    )]
10391    pub email: Option<Vec<String>>,
10392    ///Property: ICIJ ID
10393    #[serde(skip_serializing_if = "Option::is_none")]
10394    #[cfg_attr(
10395        feature = "builder",
10396        builder(with = |value:impl Into<String>|vec![value.into()])
10397    )]
10398    pub icij_id: Option<Vec<String>>,
10399    ///Property: ID Number
10400    #[serde(skip_serializing_if = "Option::is_none")]
10401    #[cfg_attr(
10402        feature = "builder",
10403        builder(with = |value:impl Into<String>|vec![value.into()])
10404    )]
10405    pub id_number: Option<Vec<String>>,
10406    ///Property: Incorporation date
10407    #[serde(skip_serializing_if = "Option::is_none")]
10408    #[cfg_attr(
10409        feature = "builder",
10410        builder(with = |value:impl Into<String>|vec![value.into()])
10411    )]
10412    pub incorporation_date: Option<Vec<String>>,
10413    ///Property: Index text
10414    #[serde(skip_serializing_if = "Option::is_none")]
10415    #[cfg_attr(
10416        feature = "builder",
10417        builder(with = |value:impl Into<String>|vec![value.into()])
10418    )]
10419    pub index_text: Option<Vec<String>>,
10420    ///Property: INN
10421    #[serde(skip_serializing_if = "Option::is_none")]
10422    #[cfg_attr(
10423        feature = "builder",
10424        builder(with = |value:impl Into<String>|vec![value.into()])
10425    )]
10426    pub inn_code: Option<Vec<String>>,
10427    ///Property: Jurisdiction
10428    #[serde(skip_serializing_if = "Option::is_none")]
10429    #[cfg_attr(
10430        feature = "builder",
10431        builder(with = |value:impl Into<String>|vec![value.into()])
10432    )]
10433    pub jurisdiction: Option<Vec<String>>,
10434    ///Property: Keywords
10435    #[serde(skip_serializing_if = "Option::is_none")]
10436    #[cfg_attr(
10437        feature = "builder",
10438        builder(with = |value:impl Into<String>|vec![value.into()])
10439    )]
10440    pub keywords: Option<Vec<String>>,
10441    ///Property: Legal form
10442    #[serde(skip_serializing_if = "Option::is_none")]
10443    #[cfg_attr(
10444        feature = "builder",
10445        builder(with = |value:impl Into<String>|vec![value.into()])
10446    )]
10447    pub legal_form: Option<Vec<String>>,
10448    ///Property: LEI
10449    #[serde(skip_serializing_if = "Option::is_none")]
10450    #[cfg_attr(
10451        feature = "builder",
10452        builder(with = |value:impl Into<String>|vec![value.into()])
10453    )]
10454    pub lei_code: Option<Vec<String>>,
10455    ///Property: License Number
10456    #[serde(skip_serializing_if = "Option::is_none")]
10457    #[cfg_attr(
10458        feature = "builder",
10459        builder(with = |value:impl Into<String>|vec![value.into()])
10460    )]
10461    pub license_number: Option<Vec<String>>,
10462    ///Property: Country of origin
10463    #[serde(skip_serializing_if = "Option::is_none")]
10464    #[cfg_attr(
10465        feature = "builder",
10466        builder(with = |value:impl Into<String>|vec![value.into()])
10467    )]
10468    pub main_country: Option<Vec<String>>,
10469    ///Property: Modified on
10470    #[serde(skip_serializing_if = "Option::is_none")]
10471    #[cfg_attr(
10472        feature = "builder",
10473        builder(with = |value:impl Into<String>|vec![value.into()])
10474    )]
10475    pub modified_at: Option<Vec<String>>,
10476    ///Property: Name
10477    #[serde(default)]
10478    #[cfg_attr(
10479        feature = "builder",
10480        builder(with = |value:impl Into<String>|vec![value.into()])
10481    )]
10482    pub name: Vec<String>,
10483    ///Property: Notes
10484    #[serde(skip_serializing_if = "Option::is_none")]
10485    #[cfg_attr(
10486        feature = "builder",
10487        builder(with = |value:impl Into<String>|vec![value.into()])
10488    )]
10489    pub notes: Option<Vec<String>>,
10490    ///Property: NPI
10491    #[serde(skip_serializing_if = "Option::is_none")]
10492    #[cfg_attr(
10493        feature = "builder",
10494        builder(with = |value:impl Into<String>|vec![value.into()])
10495    )]
10496    pub npi_code: Option<Vec<String>>,
10497    ///Property: OGRN
10498    #[serde(skip_serializing_if = "Option::is_none")]
10499    #[cfg_attr(
10500        feature = "builder",
10501        builder(with = |value:impl Into<String>|vec![value.into()])
10502    )]
10503    pub ogrn_code: Option<Vec<String>>,
10504    ///Property: OKPO
10505    #[serde(skip_serializing_if = "Option::is_none")]
10506    #[cfg_attr(
10507        feature = "builder",
10508        builder(with = |value:impl Into<String>|vec![value.into()])
10509    )]
10510    pub okpo_code: Option<Vec<String>>,
10511    ///Property: OpenCorporates URL
10512    #[serde(skip_serializing_if = "Option::is_none")]
10513    #[cfg_attr(
10514        feature = "builder",
10515        builder(with = |value:impl Into<String>|vec![value.into()])
10516    )]
10517    pub opencorporates_url: Option<Vec<String>>,
10518    ///Property: Parent company
10519    #[serde(skip_serializing_if = "Option::is_none")]
10520    #[cfg_attr(
10521        feature = "builder",
10522        builder(with = |value:impl Into<String>|vec![value.into()])
10523    )]
10524    pub parent: Option<Vec<String>>,
10525    ///Property: Phone
10526    #[serde(skip_serializing_if = "Option::is_none")]
10527    #[cfg_attr(
10528        feature = "builder",
10529        builder(with = |value:impl Into<String>|vec![value.into()])
10530    )]
10531    pub phone: Option<Vec<String>>,
10532    ///Property: Previous name
10533    #[serde(skip_serializing_if = "Option::is_none")]
10534    #[cfg_attr(
10535        feature = "builder",
10536        builder(with = |value:impl Into<String>|vec![value.into()])
10537    )]
10538    pub previous_name: Option<Vec<String>>,
10539    ///Property: Program
10540    #[serde(skip_serializing_if = "Option::is_none")]
10541    #[cfg_attr(
10542        feature = "builder",
10543        builder(with = |value:impl Into<String>|vec![value.into()])
10544    )]
10545    pub program: Option<Vec<String>>,
10546    ///Property: Program ID
10547    #[serde(skip_serializing_if = "Option::is_none")]
10548    #[cfg_attr(
10549        feature = "builder",
10550        builder(with = |value:impl Into<String>|vec![value.into()])
10551    )]
10552    pub program_id: Option<Vec<String>>,
10553    ///Property: Source document
10554    #[serde(skip_serializing_if = "Option::is_none")]
10555    #[cfg_attr(
10556        feature = "builder",
10557        builder(with = |value:impl Into<String>|vec![value.into()])
10558    )]
10559    pub proof: Option<Vec<String>>,
10560    ///Property: Publishing source
10561    #[serde(skip_serializing_if = "Option::is_none")]
10562    #[cfg_attr(
10563        feature = "builder",
10564        builder(with = |value:impl Into<String>|vec![value.into()])
10565    )]
10566    pub publisher: Option<Vec<String>>,
10567    ///Property: Publishing source URL
10568    #[serde(skip_serializing_if = "Option::is_none")]
10569    #[cfg_attr(
10570        feature = "builder",
10571        builder(with = |value:impl Into<String>|vec![value.into()])
10572    )]
10573    pub publisher_url: Option<Vec<String>>,
10574    ///Property: Registration number
10575    #[serde(skip_serializing_if = "Option::is_none")]
10576    #[cfg_attr(
10577        feature = "builder",
10578        builder(with = |value:impl Into<String>|vec![value.into()])
10579    )]
10580    pub registration_number: Option<Vec<String>>,
10581    ///Property: Retrieved on
10582    #[serde(skip_serializing_if = "Option::is_none")]
10583    #[cfg_attr(
10584        feature = "builder",
10585        builder(with = |value:impl Into<String>|vec![value.into()])
10586    )]
10587    pub retrieved_at: Option<Vec<String>>,
10588    ///Property: Sayari Entity ID
10589    #[serde(skip_serializing_if = "Option::is_none")]
10590    #[cfg_attr(
10591        feature = "builder",
10592        builder(with = |value:impl Into<String>|vec![value.into()])
10593    )]
10594    pub sayari_id: Option<Vec<String>>,
10595    ///Property: Sector
10596    #[serde(skip_serializing_if = "Option::is_none")]
10597    #[cfg_attr(
10598        feature = "builder",
10599        builder(with = |value:impl Into<String>|vec![value.into()])
10600    )]
10601    pub sector: Option<Vec<String>>,
10602    ///Property: Source link
10603    #[serde(skip_serializing_if = "Option::is_none")]
10604    #[cfg_attr(
10605        feature = "builder",
10606        builder(with = |value:impl Into<String>|vec![value.into()])
10607    )]
10608    pub source_url: Option<Vec<String>>,
10609    ///Property: Status
10610    #[serde(skip_serializing_if = "Option::is_none")]
10611    #[cfg_attr(
10612        feature = "builder",
10613        builder(with = |value:impl Into<String>|vec![value.into()])
10614    )]
10615    pub status: Option<Vec<String>>,
10616    ///Property: Summary
10617    #[serde(skip_serializing_if = "Option::is_none")]
10618    #[cfg_attr(
10619        feature = "builder",
10620        builder(with = |value:impl Into<String>|vec![value.into()])
10621    )]
10622    pub summary: Option<Vec<String>>,
10623    ///Property: SWIFT/BIC
10624    #[serde(skip_serializing_if = "Option::is_none")]
10625    #[cfg_attr(
10626        feature = "builder",
10627        builder(with = |value:impl Into<String>|vec![value.into()])
10628    )]
10629    pub swift_bic: Option<Vec<String>>,
10630    ///Property: Tax Number
10631    #[serde(skip_serializing_if = "Option::is_none")]
10632    #[cfg_attr(
10633        feature = "builder",
10634        builder(with = |value:impl Into<String>|vec![value.into()])
10635    )]
10636    pub tax_number: Option<Vec<String>>,
10637    ///Property: Tax status
10638    #[serde(skip_serializing_if = "Option::is_none")]
10639    #[cfg_attr(
10640        feature = "builder",
10641        builder(with = |value:impl Into<String>|vec![value.into()])
10642    )]
10643    pub tax_status: Option<Vec<String>>,
10644    ///Property: Topics
10645    #[serde(skip_serializing_if = "Option::is_none")]
10646    #[cfg_attr(
10647        feature = "builder",
10648        builder(with = |value:impl Into<String>|vec![value.into()])
10649    )]
10650    pub topics: Option<Vec<String>>,
10651    ///Property: Unique Entity ID
10652    #[serde(skip_serializing_if = "Option::is_none")]
10653    #[cfg_attr(
10654        feature = "builder",
10655        builder(with = |value:impl Into<String>|vec![value.into()])
10656    )]
10657    pub unique_entity_id: Option<Vec<String>>,
10658    ///Property: USCC
10659    #[serde(skip_serializing_if = "Option::is_none")]
10660    #[cfg_attr(
10661        feature = "builder",
10662        builder(with = |value:impl Into<String>|vec![value.into()])
10663    )]
10664    pub usc_code: Option<Vec<String>>,
10665    ///Property: V.A.T. Identifier
10666    #[serde(skip_serializing_if = "Option::is_none")]
10667    #[cfg_attr(
10668        feature = "builder",
10669        builder(with = |value:impl Into<String>|vec![value.into()])
10670    )]
10671    pub vat_code: Option<Vec<String>>,
10672    ///Property: Weak alias
10673    #[serde(skip_serializing_if = "Option::is_none")]
10674    #[cfg_attr(
10675        feature = "builder",
10676        builder(with = |value:impl Into<String>|vec![value.into()])
10677    )]
10678    pub weak_alias: Option<Vec<String>>,
10679    ///Property: Website
10680    #[serde(skip_serializing_if = "Option::is_none")]
10681    #[cfg_attr(
10682        feature = "builder",
10683        builder(with = |value:impl Into<String>|vec![value.into()])
10684    )]
10685    pub website: Option<Vec<String>>,
10686    ///Property: Wikidata ID
10687    #[serde(skip_serializing_if = "Option::is_none")]
10688    #[cfg_attr(
10689        feature = "builder",
10690        builder(with = |value:impl Into<String>|vec![value.into()])
10691    )]
10692    pub wikidata_id: Option<Vec<String>>,
10693    ///Property: Wikipedia Article
10694    #[serde(skip_serializing_if = "Option::is_none")]
10695    #[cfg_attr(
10696        feature = "builder",
10697        builder(with = |value:impl Into<String>|vec![value.into()])
10698    )]
10699    pub wikipedia_url: Option<Vec<String>>,
10700}
10701impl LegalEntity {
10702    /// Create a new entity with the given ID
10703    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
10704    pub fn new(id: impl Into<String>) -> Self {
10705        Self {
10706            id: id.into(),
10707            schema: "LegalEntity".to_string(),
10708            abbreviation: None,
10709            address: None,
10710            address_entity: None,
10711            aleph_url: None,
10712            alias: None,
10713            bright_query_id: None,
10714            bright_query_org_id: None,
10715            bvd_id: None,
10716            classification: None,
10717            country: None,
10718            created_at: None,
10719            description: None,
10720            dissolution_date: None,
10721            duns_code: None,
10722            email: None,
10723            icij_id: None,
10724            id_number: None,
10725            incorporation_date: None,
10726            index_text: None,
10727            inn_code: None,
10728            jurisdiction: None,
10729            keywords: None,
10730            legal_form: None,
10731            lei_code: None,
10732            license_number: None,
10733            main_country: None,
10734            modified_at: None,
10735            name: Vec::new(),
10736            notes: None,
10737            npi_code: None,
10738            ogrn_code: None,
10739            okpo_code: None,
10740            opencorporates_url: None,
10741            parent: None,
10742            phone: None,
10743            previous_name: None,
10744            program: None,
10745            program_id: None,
10746            proof: None,
10747            publisher: None,
10748            publisher_url: None,
10749            registration_number: None,
10750            retrieved_at: None,
10751            sayari_id: None,
10752            sector: None,
10753            source_url: None,
10754            status: None,
10755            summary: None,
10756            swift_bic: None,
10757            tax_number: None,
10758            tax_status: None,
10759            topics: None,
10760            unique_entity_id: None,
10761            usc_code: None,
10762            vat_code: None,
10763            weak_alias: None,
10764            website: None,
10765            wikidata_id: None,
10766            wikipedia_url: None,
10767        }
10768    }
10769    /// Get the schema name
10770    pub fn schema_name() -> &'static str {
10771        "LegalEntity"
10772    }
10773    /// Serialize to standard FTM nested JSON format
10774    ///
10775    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
10776    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
10777        let mut value = serde_json::to_value(self)?;
10778        if let Some(obj) = value.as_object_mut() {
10779            let id = obj.remove("id");
10780            let schema = obj.remove("schema");
10781            let properties = serde_json::Value::Object(std::mem::take(obj));
10782            if let Some(id) = id {
10783                obj.insert("id".into(), id);
10784            }
10785            if let Some(schema) = schema {
10786                obj.insert("schema".into(), schema);
10787            }
10788            obj.insert("properties".into(), properties);
10789        }
10790        serde_json::to_string(&value)
10791    }
10792}
10793///FTM Schema: License
10794#[derive(Debug, Clone, Serialize, Deserialize)]
10795#[cfg_attr(feature = "builder", derive(Builder))]
10796#[serde(rename_all = "camelCase")]
10797pub struct License {
10798    pub id: String,
10799    #[cfg_attr(feature = "builder", builder(default = "License".to_string()))]
10800    pub schema: String,
10801    ///Property: Address
10802    #[serde(skip_serializing_if = "Option::is_none")]
10803    #[cfg_attr(
10804        feature = "builder",
10805        builder(with = |value:impl Into<String>|vec![value.into()])
10806    )]
10807    pub address: Option<Vec<String>>,
10808    ///Property: Address
10809    #[serde(skip_serializing_if = "Option::is_none")]
10810    #[cfg_attr(
10811        feature = "builder",
10812        builder(with = |value:impl Into<String>|vec![value.into()])
10813    )]
10814    pub address_entity: Option<Vec<String>>,
10815    ///Property: Aleph URL
10816    #[serde(skip_serializing_if = "Option::is_none")]
10817    #[cfg_attr(
10818        feature = "builder",
10819        builder(with = |value:impl Into<String>|vec![value.into()])
10820    )]
10821    pub aleph_url: Option<Vec<String>>,
10822    ///Property: Alias
10823    #[serde(skip_serializing_if = "Option::is_none")]
10824    #[cfg_attr(
10825        feature = "builder",
10826        builder(with = |value:impl Into<String>|vec![value.into()])
10827    )]
10828    pub alias: Option<Vec<String>>,
10829    ///Property: Amount
10830    #[serde(
10831        skip_serializing_if = "Option::is_none",
10832        deserialize_with = "deserialize_opt_f64_vec",
10833        default
10834    )]
10835    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
10836    pub amount: Option<Vec<f64>>,
10837    ///Property: Amount in EUR
10838    #[serde(
10839        skip_serializing_if = "Option::is_none",
10840        deserialize_with = "deserialize_opt_f64_vec",
10841        default
10842    )]
10843    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
10844    pub amount_eur: Option<Vec<f64>>,
10845    ///Property: Amount in USD
10846    #[serde(
10847        skip_serializing_if = "Option::is_none",
10848        deserialize_with = "deserialize_opt_f64_vec",
10849        default
10850    )]
10851    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
10852    pub amount_usd: Option<Vec<f64>>,
10853    ///Property: Area
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 area: Option<Vec<f64>>,
10861    ///Property: Contract authority
10862    #[serde(default)]
10863    #[cfg_attr(
10864        feature = "builder",
10865        builder(with = |value:impl Into<String>|vec![value.into()])
10866    )]
10867    pub authority: Vec<String>,
10868    ///Property: Cancelled?
10869    #[serde(skip_serializing_if = "Option::is_none")]
10870    #[cfg_attr(
10871        feature = "builder",
10872        builder(with = |value:impl Into<String>|vec![value.into()])
10873    )]
10874    pub cancelled: Option<Vec<String>>,
10875    ///Property: Classification
10876    #[serde(skip_serializing_if = "Option::is_none")]
10877    #[cfg_attr(
10878        feature = "builder",
10879        builder(with = |value:impl Into<String>|vec![value.into()])
10880    )]
10881    pub classification: Option<Vec<String>>,
10882    ///Property: Commodities
10883    #[serde(skip_serializing_if = "Option::is_none")]
10884    #[cfg_attr(
10885        feature = "builder",
10886        builder(with = |value:impl Into<String>|vec![value.into()])
10887    )]
10888    pub commodities: Option<Vec<String>>,
10889    ///Property: Contract date
10890    #[serde(skip_serializing_if = "Option::is_none")]
10891    #[cfg_attr(
10892        feature = "builder",
10893        builder(with = |value:impl Into<String>|vec![value.into()])
10894    )]
10895    pub contract_date: Option<Vec<String>>,
10896    ///Property: Country
10897    #[serde(skip_serializing_if = "Option::is_none")]
10898    #[cfg_attr(
10899        feature = "builder",
10900        builder(with = |value:impl Into<String>|vec![value.into()])
10901    )]
10902    pub country: Option<Vec<String>>,
10903    ///Property: Created at
10904    #[serde(skip_serializing_if = "Option::is_none")]
10905    #[cfg_attr(
10906        feature = "builder",
10907        builder(with = |value:impl Into<String>|vec![value.into()])
10908    )]
10909    pub created_at: Option<Vec<String>>,
10910    ///Property: Contract award criteria
10911    #[serde(skip_serializing_if = "Option::is_none")]
10912    #[cfg_attr(
10913        feature = "builder",
10914        builder(with = |value:impl Into<String>|vec![value.into()])
10915    )]
10916    pub criteria: Option<Vec<String>>,
10917    ///Property: Currency
10918    #[serde(skip_serializing_if = "Option::is_none")]
10919    #[cfg_attr(
10920        feature = "builder",
10921        builder(with = |value:impl Into<String>|vec![value.into()])
10922    )]
10923    pub currency: Option<Vec<String>>,
10924    ///Property: Description
10925    #[serde(skip_serializing_if = "Option::is_none")]
10926    #[cfg_attr(
10927        feature = "builder",
10928        builder(with = |value:impl Into<String>|vec![value.into()])
10929    )]
10930    pub description: Option<Vec<String>>,
10931    ///Property: Index text
10932    #[serde(skip_serializing_if = "Option::is_none")]
10933    #[cfg_attr(
10934        feature = "builder",
10935        builder(with = |value:impl Into<String>|vec![value.into()])
10936    )]
10937    pub index_text: Option<Vec<String>>,
10938    ///Property: Keywords
10939    #[serde(skip_serializing_if = "Option::is_none")]
10940    #[cfg_attr(
10941        feature = "builder",
10942        builder(with = |value:impl Into<String>|vec![value.into()])
10943    )]
10944    pub keywords: Option<Vec<String>>,
10945    ///Property: Language
10946    #[serde(skip_serializing_if = "Option::is_none")]
10947    #[cfg_attr(
10948        feature = "builder",
10949        builder(with = |value:impl Into<String>|vec![value.into()])
10950    )]
10951    pub language: Option<Vec<String>>,
10952    ///Property: Procurement method
10953    #[serde(skip_serializing_if = "Option::is_none")]
10954    #[cfg_attr(
10955        feature = "builder",
10956        builder(with = |value:impl Into<String>|vec![value.into()])
10957    )]
10958    pub method: Option<Vec<String>>,
10959    ///Property: Modified on
10960    #[serde(skip_serializing_if = "Option::is_none")]
10961    #[cfg_attr(
10962        feature = "builder",
10963        builder(with = |value:impl Into<String>|vec![value.into()])
10964    )]
10965    pub modified_at: Option<Vec<String>>,
10966    ///Property: Name
10967    #[serde(default)]
10968    #[cfg_attr(
10969        feature = "builder",
10970        builder(with = |value:impl Into<String>|vec![value.into()])
10971    )]
10972    pub name: Vec<String>,
10973    ///Property: Notes
10974    #[serde(skip_serializing_if = "Option::is_none")]
10975    #[cfg_attr(
10976        feature = "builder",
10977        builder(with = |value:impl Into<String>|vec![value.into()])
10978    )]
10979    pub notes: Option<Vec<String>>,
10980    ///Property: Contract Award Notice ID
10981    #[serde(skip_serializing_if = "Option::is_none")]
10982    #[cfg_attr(
10983        feature = "builder",
10984        builder(with = |value:impl Into<String>|vec![value.into()])
10985    )]
10986    pub notice_id: Option<Vec<String>>,
10987    ///Property: Number of awards
10988    #[serde(skip_serializing_if = "Option::is_none")]
10989    #[cfg_attr(
10990        feature = "builder",
10991        builder(with = |value:impl Into<String>|vec![value.into()])
10992    )]
10993    pub number_awards: Option<Vec<String>>,
10994    ///Property: Previous name
10995    #[serde(skip_serializing_if = "Option::is_none")]
10996    #[cfg_attr(
10997        feature = "builder",
10998        builder(with = |value:impl Into<String>|vec![value.into()])
10999    )]
11000    pub previous_name: Option<Vec<String>>,
11001    ///Property: Contract procedure
11002    #[serde(skip_serializing_if = "Option::is_none")]
11003    #[cfg_attr(
11004        feature = "builder",
11005        builder(with = |value:impl Into<String>|vec![value.into()])
11006    )]
11007    pub procedure: Option<Vec<String>>,
11008    ///Property: Procedure number
11009    #[serde(skip_serializing_if = "Option::is_none")]
11010    #[cfg_attr(
11011        feature = "builder",
11012        builder(with = |value:impl Into<String>|vec![value.into()])
11013    )]
11014    pub procedure_number: Option<Vec<String>>,
11015    ///Property: Program
11016    #[serde(skip_serializing_if = "Option::is_none")]
11017    #[cfg_attr(
11018        feature = "builder",
11019        builder(with = |value:impl Into<String>|vec![value.into()])
11020    )]
11021    pub program: Option<Vec<String>>,
11022    ///Property: Program ID
11023    #[serde(skip_serializing_if = "Option::is_none")]
11024    #[cfg_attr(
11025        feature = "builder",
11026        builder(with = |value:impl Into<String>|vec![value.into()])
11027    )]
11028    pub program_id: Option<Vec<String>>,
11029    ///Property: Project
11030    #[serde(skip_serializing_if = "Option::is_none")]
11031    #[cfg_attr(
11032        feature = "builder",
11033        builder(with = |value:impl Into<String>|vec![value.into()])
11034    )]
11035    pub project: Option<Vec<String>>,
11036    ///Property: Source document
11037    #[serde(skip_serializing_if = "Option::is_none")]
11038    #[cfg_attr(
11039        feature = "builder",
11040        builder(with = |value:impl Into<String>|vec![value.into()])
11041    )]
11042    pub proof: Option<Vec<String>>,
11043    ///Property: Publishing source
11044    #[serde(skip_serializing_if = "Option::is_none")]
11045    #[cfg_attr(
11046        feature = "builder",
11047        builder(with = |value:impl Into<String>|vec![value.into()])
11048    )]
11049    pub publisher: Option<Vec<String>>,
11050    ///Property: Publishing source URL
11051    #[serde(skip_serializing_if = "Option::is_none")]
11052    #[cfg_attr(
11053        feature = "builder",
11054        builder(with = |value:impl Into<String>|vec![value.into()])
11055    )]
11056    pub publisher_url: Option<Vec<String>>,
11057    ///Property: Retrieved on
11058    #[serde(skip_serializing_if = "Option::is_none")]
11059    #[cfg_attr(
11060        feature = "builder",
11061        builder(with = |value:impl Into<String>|vec![value.into()])
11062    )]
11063    pub retrieved_at: Option<Vec<String>>,
11064    ///Property: License review date
11065    #[serde(skip_serializing_if = "Option::is_none")]
11066    #[cfg_attr(
11067        feature = "builder",
11068        builder(with = |value:impl Into<String>|vec![value.into()])
11069    )]
11070    pub review_date: Option<Vec<String>>,
11071    ///Property: Source link
11072    #[serde(skip_serializing_if = "Option::is_none")]
11073    #[cfg_attr(
11074        feature = "builder",
11075        builder(with = |value:impl Into<String>|vec![value.into()])
11076    )]
11077    pub source_url: Option<Vec<String>>,
11078    ///Property: Status
11079    #[serde(skip_serializing_if = "Option::is_none")]
11080    #[cfg_attr(
11081        feature = "builder",
11082        builder(with = |value:impl Into<String>|vec![value.into()])
11083    )]
11084    pub status: Option<Vec<String>>,
11085    ///Property: Summary
11086    #[serde(skip_serializing_if = "Option::is_none")]
11087    #[cfg_attr(
11088        feature = "builder",
11089        builder(with = |value:impl Into<String>|vec![value.into()])
11090    )]
11091    pub summary: Option<Vec<String>>,
11092    ///Property: Title
11093    #[serde(default)]
11094    #[cfg_attr(
11095        feature = "builder",
11096        builder(with = |value:impl Into<String>|vec![value.into()])
11097    )]
11098    pub title: Vec<String>,
11099    ///Property: Topics
11100    #[serde(skip_serializing_if = "Option::is_none")]
11101    #[cfg_attr(
11102        feature = "builder",
11103        builder(with = |value:impl Into<String>|vec![value.into()])
11104    )]
11105    pub topics: Option<Vec<String>>,
11106    ///Property: Type
11107    #[serde(skip_serializing_if = "Option::is_none")]
11108    #[cfg_attr(
11109        feature = "builder",
11110        builder(with = |value:impl Into<String>|vec![value.into()])
11111    )]
11112    pub type_: Option<Vec<String>>,
11113    ///Property: Weak alias
11114    #[serde(skip_serializing_if = "Option::is_none")]
11115    #[cfg_attr(
11116        feature = "builder",
11117        builder(with = |value:impl Into<String>|vec![value.into()])
11118    )]
11119    pub weak_alias: Option<Vec<String>>,
11120    ///Property: Wikidata ID
11121    #[serde(skip_serializing_if = "Option::is_none")]
11122    #[cfg_attr(
11123        feature = "builder",
11124        builder(with = |value:impl Into<String>|vec![value.into()])
11125    )]
11126    pub wikidata_id: Option<Vec<String>>,
11127    ///Property: Wikipedia Article
11128    #[serde(skip_serializing_if = "Option::is_none")]
11129    #[cfg_attr(
11130        feature = "builder",
11131        builder(with = |value:impl Into<String>|vec![value.into()])
11132    )]
11133    pub wikipedia_url: Option<Vec<String>>,
11134}
11135impl License {
11136    /// Create a new entity with the given ID
11137    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
11138    pub fn new(id: impl Into<String>) -> Self {
11139        Self {
11140            id: id.into(),
11141            schema: "License".to_string(),
11142            address: None,
11143            address_entity: None,
11144            aleph_url: None,
11145            alias: None,
11146            amount: None,
11147            amount_eur: None,
11148            amount_usd: None,
11149            area: None,
11150            authority: Vec::new(),
11151            cancelled: None,
11152            classification: None,
11153            commodities: None,
11154            contract_date: None,
11155            country: None,
11156            created_at: None,
11157            criteria: None,
11158            currency: None,
11159            description: None,
11160            index_text: None,
11161            keywords: None,
11162            language: None,
11163            method: None,
11164            modified_at: None,
11165            name: Vec::new(),
11166            notes: None,
11167            notice_id: None,
11168            number_awards: None,
11169            previous_name: None,
11170            procedure: None,
11171            procedure_number: None,
11172            program: None,
11173            program_id: None,
11174            project: None,
11175            proof: None,
11176            publisher: None,
11177            publisher_url: None,
11178            retrieved_at: None,
11179            review_date: None,
11180            source_url: None,
11181            status: None,
11182            summary: None,
11183            title: Vec::new(),
11184            topics: None,
11185            type_: None,
11186            weak_alias: None,
11187            wikidata_id: None,
11188            wikipedia_url: None,
11189        }
11190    }
11191    /// Get the schema name
11192    pub fn schema_name() -> &'static str {
11193        "License"
11194    }
11195    /// Serialize to standard FTM nested JSON format
11196    ///
11197    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
11198    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
11199        let mut value = serde_json::to_value(self)?;
11200        if let Some(obj) = value.as_object_mut() {
11201            let id = obj.remove("id");
11202            let schema = obj.remove("schema");
11203            let properties = serde_json::Value::Object(std::mem::take(obj));
11204            if let Some(id) = id {
11205                obj.insert("id".into(), id);
11206            }
11207            if let Some(schema) = schema {
11208                obj.insert("schema".into(), schema);
11209            }
11210            obj.insert("properties".into(), properties);
11211        }
11212        serde_json::to_string(&value)
11213    }
11214}
11215///FTM Schema: Membership
11216#[derive(Debug, Clone, Serialize, Deserialize)]
11217#[cfg_attr(feature = "builder", derive(Builder))]
11218#[serde(rename_all = "camelCase")]
11219pub struct Membership {
11220    pub id: String,
11221    #[cfg_attr(feature = "builder", builder(default = "Membership".to_string()))]
11222    pub schema: String,
11223    ///Property: Aleph URL
11224    #[serde(skip_serializing_if = "Option::is_none")]
11225    #[cfg_attr(
11226        feature = "builder",
11227        builder(with = |value:impl Into<String>|vec![value.into()])
11228    )]
11229    pub aleph_url: Option<Vec<String>>,
11230    ///Property: Date
11231    #[serde(skip_serializing_if = "Option::is_none")]
11232    #[cfg_attr(
11233        feature = "builder",
11234        builder(with = |value:impl Into<String>|vec![value.into()])
11235    )]
11236    pub date: Option<Vec<String>>,
11237    ///Property: Description
11238    #[serde(skip_serializing_if = "Option::is_none")]
11239    #[cfg_attr(
11240        feature = "builder",
11241        builder(with = |value:impl Into<String>|vec![value.into()])
11242    )]
11243    pub description: Option<Vec<String>>,
11244    ///Property: End date
11245    #[serde(skip_serializing_if = "Option::is_none")]
11246    #[cfg_attr(
11247        feature = "builder",
11248        builder(with = |value:impl Into<String>|vec![value.into()])
11249    )]
11250    pub end_date: Option<Vec<String>>,
11251    ///Property: Index text
11252    #[serde(skip_serializing_if = "Option::is_none")]
11253    #[cfg_attr(
11254        feature = "builder",
11255        builder(with = |value:impl Into<String>|vec![value.into()])
11256    )]
11257    pub index_text: Option<Vec<String>>,
11258    ///Property: Member
11259    #[serde(default)]
11260    #[cfg_attr(
11261        feature = "builder",
11262        builder(with = |value:impl Into<String>|vec![value.into()])
11263    )]
11264    pub member: Vec<String>,
11265    ///Property: Modified on
11266    #[serde(skip_serializing_if = "Option::is_none")]
11267    #[cfg_attr(
11268        feature = "builder",
11269        builder(with = |value:impl Into<String>|vec![value.into()])
11270    )]
11271    pub modified_at: Option<Vec<String>>,
11272    ///Property: Detected names
11273    #[serde(skip_serializing_if = "Option::is_none")]
11274    #[cfg_attr(
11275        feature = "builder",
11276        builder(with = |value:impl Into<String>|vec![value.into()])
11277    )]
11278    pub names_mentioned: Option<Vec<String>>,
11279    ///Property: Organization
11280    #[serde(default)]
11281    #[cfg_attr(
11282        feature = "builder",
11283        builder(with = |value:impl Into<String>|vec![value.into()])
11284    )]
11285    pub organization: Vec<String>,
11286    ///Property: Source document
11287    #[serde(skip_serializing_if = "Option::is_none")]
11288    #[cfg_attr(
11289        feature = "builder",
11290        builder(with = |value:impl Into<String>|vec![value.into()])
11291    )]
11292    pub proof: Option<Vec<String>>,
11293    ///Property: Publishing source
11294    #[serde(skip_serializing_if = "Option::is_none")]
11295    #[cfg_attr(
11296        feature = "builder",
11297        builder(with = |value:impl Into<String>|vec![value.into()])
11298    )]
11299    pub publisher: Option<Vec<String>>,
11300    ///Property: Publishing source URL
11301    #[serde(skip_serializing_if = "Option::is_none")]
11302    #[cfg_attr(
11303        feature = "builder",
11304        builder(with = |value:impl Into<String>|vec![value.into()])
11305    )]
11306    pub publisher_url: Option<Vec<String>>,
11307    ///Property: Record ID
11308    #[serde(skip_serializing_if = "Option::is_none")]
11309    #[cfg_attr(
11310        feature = "builder",
11311        builder(with = |value:impl Into<String>|vec![value.into()])
11312    )]
11313    pub record_id: Option<Vec<String>>,
11314    ///Property: Retrieved on
11315    #[serde(skip_serializing_if = "Option::is_none")]
11316    #[cfg_attr(
11317        feature = "builder",
11318        builder(with = |value:impl Into<String>|vec![value.into()])
11319    )]
11320    pub retrieved_at: Option<Vec<String>>,
11321    ///Property: Role
11322    #[serde(skip_serializing_if = "Option::is_none")]
11323    #[cfg_attr(
11324        feature = "builder",
11325        builder(with = |value:impl Into<String>|vec![value.into()])
11326    )]
11327    pub role: Option<Vec<String>>,
11328    ///Property: Source link
11329    #[serde(skip_serializing_if = "Option::is_none")]
11330    #[cfg_attr(
11331        feature = "builder",
11332        builder(with = |value:impl Into<String>|vec![value.into()])
11333    )]
11334    pub source_url: Option<Vec<String>>,
11335    ///Property: Start date
11336    #[serde(skip_serializing_if = "Option::is_none")]
11337    #[cfg_attr(
11338        feature = "builder",
11339        builder(with = |value:impl Into<String>|vec![value.into()])
11340    )]
11341    pub start_date: Option<Vec<String>>,
11342    ///Property: Status
11343    #[serde(skip_serializing_if = "Option::is_none")]
11344    #[cfg_attr(
11345        feature = "builder",
11346        builder(with = |value:impl Into<String>|vec![value.into()])
11347    )]
11348    pub status: Option<Vec<String>>,
11349    ///Property: Summary
11350    #[serde(skip_serializing_if = "Option::is_none")]
11351    #[cfg_attr(
11352        feature = "builder",
11353        builder(with = |value:impl Into<String>|vec![value.into()])
11354    )]
11355    pub summary: Option<Vec<String>>,
11356}
11357impl Membership {
11358    /// Create a new entity with the given ID
11359    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
11360    pub fn new(id: impl Into<String>) -> Self {
11361        Self {
11362            id: id.into(),
11363            schema: "Membership".to_string(),
11364            aleph_url: None,
11365            date: None,
11366            description: None,
11367            end_date: None,
11368            index_text: None,
11369            member: Vec::new(),
11370            modified_at: None,
11371            names_mentioned: None,
11372            organization: Vec::new(),
11373            proof: None,
11374            publisher: None,
11375            publisher_url: None,
11376            record_id: None,
11377            retrieved_at: None,
11378            role: None,
11379            source_url: None,
11380            start_date: None,
11381            status: None,
11382            summary: None,
11383        }
11384    }
11385    /// Get the schema name
11386    pub fn schema_name() -> &'static str {
11387        "Membership"
11388    }
11389    /// Serialize to standard FTM nested JSON format
11390    ///
11391    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
11392    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
11393        let mut value = serde_json::to_value(self)?;
11394        if let Some(obj) = value.as_object_mut() {
11395            let id = obj.remove("id");
11396            let schema = obj.remove("schema");
11397            let properties = serde_json::Value::Object(std::mem::take(obj));
11398            if let Some(id) = id {
11399                obj.insert("id".into(), id);
11400            }
11401            if let Some(schema) = schema {
11402                obj.insert("schema".into(), schema);
11403            }
11404            obj.insert("properties".into(), properties);
11405        }
11406        serde_json::to_string(&value)
11407    }
11408}
11409///FTM Schema: Mention
11410#[derive(Debug, Clone, Serialize, Deserialize)]
11411#[cfg_attr(feature = "builder", derive(Builder))]
11412#[serde(rename_all = "camelCase")]
11413pub struct Mention {
11414    pub id: String,
11415    #[cfg_attr(feature = "builder", builder(default = "Mention".to_string()))]
11416    pub schema: String,
11417    ///Property: Co-occurring countries
11418    #[serde(skip_serializing_if = "Option::is_none")]
11419    #[cfg_attr(
11420        feature = "builder",
11421        builder(with = |value:impl Into<String>|vec![value.into()])
11422    )]
11423    pub context_country: Option<Vec<String>>,
11424    ///Property: Co-occurring e-mail addresses
11425    #[serde(skip_serializing_if = "Option::is_none")]
11426    #[cfg_attr(
11427        feature = "builder",
11428        builder(with = |value:impl Into<String>|vec![value.into()])
11429    )]
11430    pub context_email: Option<Vec<String>>,
11431    ///Property: Co-occurring phone numbers
11432    #[serde(skip_serializing_if = "Option::is_none")]
11433    #[cfg_attr(
11434        feature = "builder",
11435        builder(with = |value:impl Into<String>|vec![value.into()])
11436    )]
11437    pub context_phone: Option<Vec<String>>,
11438    ///Property: Detected entity type
11439    #[serde(skip_serializing_if = "Option::is_none")]
11440    #[cfg_attr(
11441        feature = "builder",
11442        builder(with = |value:impl Into<String>|vec![value.into()])
11443    )]
11444    pub detected_schema: Option<Vec<String>>,
11445    ///Property: Document
11446    #[serde(default)]
11447    #[cfg_attr(
11448        feature = "builder",
11449        builder(with = |value:impl Into<String>|vec![value.into()])
11450    )]
11451    pub document: Vec<String>,
11452    ///Property: Name
11453    #[serde(default)]
11454    #[cfg_attr(
11455        feature = "builder",
11456        builder(with = |value:impl Into<String>|vec![value.into()])
11457    )]
11458    pub name: Vec<String>,
11459    ///Property: Entity
11460    #[serde(skip_serializing_if = "Option::is_none")]
11461    #[cfg_attr(
11462        feature = "builder",
11463        builder(with = |value:impl Into<String>|vec![value.into()])
11464    )]
11465    pub resolved: Option<Vec<String>>,
11466}
11467impl Mention {
11468    /// Create a new entity with the given ID
11469    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
11470    pub fn new(id: impl Into<String>) -> Self {
11471        Self {
11472            id: id.into(),
11473            schema: "Mention".to_string(),
11474            context_country: None,
11475            context_email: None,
11476            context_phone: None,
11477            detected_schema: None,
11478            document: Vec::new(),
11479            name: Vec::new(),
11480            resolved: None,
11481        }
11482    }
11483    /// Get the schema name
11484    pub fn schema_name() -> &'static str {
11485        "Mention"
11486    }
11487    /// Serialize to standard FTM nested JSON format
11488    ///
11489    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
11490    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
11491        let mut value = serde_json::to_value(self)?;
11492        if let Some(obj) = value.as_object_mut() {
11493            let id = obj.remove("id");
11494            let schema = obj.remove("schema");
11495            let properties = serde_json::Value::Object(std::mem::take(obj));
11496            if let Some(id) = id {
11497                obj.insert("id".into(), id);
11498            }
11499            if let Some(schema) = schema {
11500                obj.insert("schema".into(), schema);
11501            }
11502            obj.insert("properties".into(), properties);
11503        }
11504        serde_json::to_string(&value)
11505    }
11506}
11507///FTM Schema: Message
11508#[derive(Debug, Clone, Serialize, Deserialize)]
11509#[cfg_attr(feature = "builder", derive(Builder))]
11510#[serde(rename_all = "camelCase")]
11511pub struct Message {
11512    pub id: String,
11513    #[cfg_attr(feature = "builder", builder(default = "Message".to_string()))]
11514    pub schema: String,
11515    ///Property: Address
11516    #[serde(skip_serializing_if = "Option::is_none")]
11517    #[cfg_attr(
11518        feature = "builder",
11519        builder(with = |value:impl Into<String>|vec![value.into()])
11520    )]
11521    pub address: Option<Vec<String>>,
11522    ///Property: Address
11523    #[serde(skip_serializing_if = "Option::is_none")]
11524    #[cfg_attr(
11525        feature = "builder",
11526        builder(with = |value:impl Into<String>|vec![value.into()])
11527    )]
11528    pub address_entity: Option<Vec<String>>,
11529    ///Property: Aleph URL
11530    #[serde(skip_serializing_if = "Option::is_none")]
11531    #[cfg_attr(
11532        feature = "builder",
11533        builder(with = |value:impl Into<String>|vec![value.into()])
11534    )]
11535    pub aleph_url: Option<Vec<String>>,
11536    ///Property: Alias
11537    #[serde(skip_serializing_if = "Option::is_none")]
11538    #[cfg_attr(
11539        feature = "builder",
11540        builder(with = |value:impl Into<String>|vec![value.into()])
11541    )]
11542    pub alias: Option<Vec<String>>,
11543    ///Property: Ancestors
11544    #[serde(skip_serializing_if = "Option::is_none")]
11545    #[cfg_attr(
11546        feature = "builder",
11547        builder(with = |value:impl Into<String>|vec![value.into()])
11548    )]
11549    pub ancestors: Option<Vec<String>>,
11550    ///Property: Author
11551    #[serde(skip_serializing_if = "Option::is_none")]
11552    #[cfg_attr(
11553        feature = "builder",
11554        builder(with = |value:impl Into<String>|vec![value.into()])
11555    )]
11556    pub author: Option<Vec<String>>,
11557    ///Property: Authored on
11558    #[serde(skip_serializing_if = "Option::is_none")]
11559    #[cfg_attr(
11560        feature = "builder",
11561        builder(with = |value:impl Into<String>|vec![value.into()])
11562    )]
11563    pub authored_at: Option<Vec<String>>,
11564    ///Property: HTML
11565    #[serde(skip_serializing_if = "Option::is_none")]
11566    #[cfg_attr(
11567        feature = "builder",
11568        builder(with = |value:impl Into<String>|vec![value.into()])
11569    )]
11570    pub body_html: Option<Vec<String>>,
11571    ///Property: Text
11572    #[serde(default)]
11573    #[cfg_attr(
11574        feature = "builder",
11575        builder(with = |value:impl Into<String>|vec![value.into()])
11576    )]
11577    pub body_text: Vec<String>,
11578    ///Property: Detected companies
11579    #[serde(skip_serializing_if = "Option::is_none")]
11580    #[cfg_attr(
11581        feature = "builder",
11582        builder(with = |value:impl Into<String>|vec![value.into()])
11583    )]
11584    pub companies_mentioned: Option<Vec<String>>,
11585    ///Property: Checksum
11586    #[serde(skip_serializing_if = "Option::is_none")]
11587    #[cfg_attr(
11588        feature = "builder",
11589        builder(with = |value:impl Into<String>|vec![value.into()])
11590    )]
11591    pub content_hash: Option<Vec<String>>,
11592    ///Property: Country
11593    #[serde(skip_serializing_if = "Option::is_none")]
11594    #[cfg_attr(
11595        feature = "builder",
11596        builder(with = |value:impl Into<String>|vec![value.into()])
11597    )]
11598    pub country: Option<Vec<String>>,
11599    ///Property: Crawler
11600    #[serde(skip_serializing_if = "Option::is_none")]
11601    #[cfg_attr(
11602        feature = "builder",
11603        builder(with = |value:impl Into<String>|vec![value.into()])
11604    )]
11605    pub crawler: Option<Vec<String>>,
11606    ///Property: Created at
11607    #[serde(skip_serializing_if = "Option::is_none")]
11608    #[cfg_attr(
11609        feature = "builder",
11610        builder(with = |value:impl Into<String>|vec![value.into()])
11611    )]
11612    pub created_at: Option<Vec<String>>,
11613    ///Property: Date
11614    #[serde(skip_serializing_if = "Option::is_none")]
11615    #[cfg_attr(
11616        feature = "builder",
11617        builder(with = |value:impl Into<String>|vec![value.into()])
11618    )]
11619    pub date: Option<Vec<String>>,
11620    ///Property: Description
11621    #[serde(skip_serializing_if = "Option::is_none")]
11622    #[cfg_attr(
11623        feature = "builder",
11624        builder(with = |value:impl Into<String>|vec![value.into()])
11625    )]
11626    pub description: Option<Vec<String>>,
11627    ///Property: Detected country
11628    #[serde(skip_serializing_if = "Option::is_none")]
11629    #[cfg_attr(
11630        feature = "builder",
11631        builder(with = |value:impl Into<String>|vec![value.into()])
11632    )]
11633    pub detected_country: Option<Vec<String>>,
11634    ///Property: Detected language
11635    #[serde(skip_serializing_if = "Option::is_none")]
11636    #[cfg_attr(
11637        feature = "builder",
11638        builder(with = |value:impl Into<String>|vec![value.into()])
11639    )]
11640    pub detected_language: Option<Vec<String>>,
11641    ///Property: Detected e-mail addresses
11642    #[serde(skip_serializing_if = "Option::is_none")]
11643    #[cfg_attr(
11644        feature = "builder",
11645        builder(with = |value:impl Into<String>|vec![value.into()])
11646    )]
11647    pub email_mentioned: Option<Vec<String>>,
11648    ///Property: File encoding
11649    #[serde(skip_serializing_if = "Option::is_none")]
11650    #[cfg_attr(
11651        feature = "builder",
11652        builder(with = |value:impl Into<String>|vec![value.into()])
11653    )]
11654    pub encoding: Option<Vec<String>>,
11655    ///Property: End date
11656    #[serde(skip_serializing_if = "Option::is_none")]
11657    #[cfg_attr(
11658        feature = "builder",
11659        builder(with = |value:impl Into<String>|vec![value.into()])
11660    )]
11661    pub end_date: Option<Vec<String>>,
11662    ///Property: File extension
11663    #[serde(skip_serializing_if = "Option::is_none")]
11664    #[cfg_attr(
11665        feature = "builder",
11666        builder(with = |value:impl Into<String>|vec![value.into()])
11667    )]
11668    pub extension: Option<Vec<String>>,
11669    ///Property: File name
11670    #[serde(default)]
11671    #[cfg_attr(
11672        feature = "builder",
11673        builder(with = |value:impl Into<String>|vec![value.into()])
11674    )]
11675    pub file_name: Vec<String>,
11676    ///Property: File size
11677    #[serde(
11678        skip_serializing_if = "Option::is_none",
11679        deserialize_with = "deserialize_opt_f64_vec",
11680        default
11681    )]
11682    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
11683    pub file_size: Option<Vec<f64>>,
11684    ///Property: Generator
11685    #[serde(skip_serializing_if = "Option::is_none")]
11686    #[cfg_attr(
11687        feature = "builder",
11688        builder(with = |value:impl Into<String>|vec![value.into()])
11689    )]
11690    pub generator: Option<Vec<String>>,
11691    ///Property: Detected IBANs
11692    #[serde(skip_serializing_if = "Option::is_none")]
11693    #[cfg_attr(
11694        feature = "builder",
11695        builder(with = |value:impl Into<String>|vec![value.into()])
11696    )]
11697    pub iban_mentioned: Option<Vec<String>>,
11698    ///Property: In Reply To
11699    #[serde(skip_serializing_if = "Option::is_none")]
11700    #[cfg_attr(
11701        feature = "builder",
11702        builder(with = |value:impl Into<String>|vec![value.into()])
11703    )]
11704    pub in_reply_to: Option<Vec<String>>,
11705    ///Property: Responding to
11706    #[serde(skip_serializing_if = "Option::is_none")]
11707    #[cfg_attr(
11708        feature = "builder",
11709        builder(with = |value:impl Into<String>|vec![value.into()])
11710    )]
11711    pub in_reply_to_message: Option<Vec<String>>,
11712    ///Property: Index text
11713    #[serde(skip_serializing_if = "Option::is_none")]
11714    #[cfg_attr(
11715        feature = "builder",
11716        builder(with = |value:impl Into<String>|vec![value.into()])
11717    )]
11718    pub index_text: Option<Vec<String>>,
11719    ///Property: Detected IP addresses
11720    #[serde(skip_serializing_if = "Option::is_none")]
11721    #[cfg_attr(
11722        feature = "builder",
11723        builder(with = |value:impl Into<String>|vec![value.into()])
11724    )]
11725    pub ip_mentioned: Option<Vec<String>>,
11726    ///Property: Keywords
11727    #[serde(skip_serializing_if = "Option::is_none")]
11728    #[cfg_attr(
11729        feature = "builder",
11730        builder(with = |value:impl Into<String>|vec![value.into()])
11731    )]
11732    pub keywords: Option<Vec<String>>,
11733    ///Property: Language
11734    #[serde(skip_serializing_if = "Option::is_none")]
11735    #[cfg_attr(
11736        feature = "builder",
11737        builder(with = |value:impl Into<String>|vec![value.into()])
11738    )]
11739    pub language: Option<Vec<String>>,
11740    ///Property: Detected locations
11741    #[serde(skip_serializing_if = "Option::is_none")]
11742    #[cfg_attr(
11743        feature = "builder",
11744        builder(with = |value:impl Into<String>|vec![value.into()])
11745    )]
11746    pub location_mentioned: Option<Vec<String>>,
11747    ///Property: Message ID
11748    #[serde(skip_serializing_if = "Option::is_none")]
11749    #[cfg_attr(
11750        feature = "builder",
11751        builder(with = |value:impl Into<String>|vec![value.into()])
11752    )]
11753    pub message_id: Option<Vec<String>>,
11754    ///Property: Metadata
11755    #[serde(skip_serializing_if = "Option::is_none")]
11756    pub metadata: Option<serde_json::Value>,
11757    ///Property: MIME type
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 mime_type: Option<Vec<String>>,
11764    ///Property: Modified on
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 modified_at: Option<Vec<String>>,
11771    ///Property: Name
11772    #[serde(default)]
11773    #[cfg_attr(
11774        feature = "builder",
11775        builder(with = |value:impl Into<String>|vec![value.into()])
11776    )]
11777    pub name: Vec<String>,
11778    ///Property: Detected names
11779    #[serde(skip_serializing_if = "Option::is_none")]
11780    #[cfg_attr(
11781        feature = "builder",
11782        builder(with = |value:impl Into<String>|vec![value.into()])
11783    )]
11784    pub names_mentioned: Option<Vec<String>>,
11785    ///Property: Notes
11786    #[serde(skip_serializing_if = "Option::is_none")]
11787    #[cfg_attr(
11788        feature = "builder",
11789        builder(with = |value:impl Into<String>|vec![value.into()])
11790    )]
11791    pub notes: Option<Vec<String>>,
11792    ///Property: Folder
11793    #[serde(skip_serializing_if = "Option::is_none")]
11794    #[cfg_attr(
11795        feature = "builder",
11796        builder(with = |value:impl Into<String>|vec![value.into()])
11797    )]
11798    pub parent: Option<Vec<String>>,
11799    ///Property: Detected people
11800    #[serde(skip_serializing_if = "Option::is_none")]
11801    #[cfg_attr(
11802        feature = "builder",
11803        builder(with = |value:impl Into<String>|vec![value.into()])
11804    )]
11805    pub people_mentioned: Option<Vec<String>>,
11806    ///Property: Detected phones
11807    #[serde(skip_serializing_if = "Option::is_none")]
11808    #[cfg_attr(
11809        feature = "builder",
11810        builder(with = |value:impl Into<String>|vec![value.into()])
11811    )]
11812    pub phone_mentioned: Option<Vec<String>>,
11813    ///Property: Previous name
11814    #[serde(skip_serializing_if = "Option::is_none")]
11815    #[cfg_attr(
11816        feature = "builder",
11817        builder(with = |value:impl Into<String>|vec![value.into()])
11818    )]
11819    pub previous_name: Option<Vec<String>>,
11820    ///Property: Processed at
11821    #[serde(skip_serializing_if = "Option::is_none")]
11822    #[cfg_attr(
11823        feature = "builder",
11824        builder(with = |value:impl Into<String>|vec![value.into()])
11825    )]
11826    pub processed_at: Option<Vec<String>>,
11827    ///Property: Processing agent
11828    #[serde(skip_serializing_if = "Option::is_none")]
11829    #[cfg_attr(
11830        feature = "builder",
11831        builder(with = |value:impl Into<String>|vec![value.into()])
11832    )]
11833    pub processing_agent: Option<Vec<String>>,
11834    ///Property: Processing error
11835    #[serde(skip_serializing_if = "Option::is_none")]
11836    #[cfg_attr(
11837        feature = "builder",
11838        builder(with = |value:impl Into<String>|vec![value.into()])
11839    )]
11840    pub processing_error: Option<Vec<String>>,
11841    ///Property: Processing status
11842    #[serde(skip_serializing_if = "Option::is_none")]
11843    #[cfg_attr(
11844        feature = "builder",
11845        builder(with = |value:impl Into<String>|vec![value.into()])
11846    )]
11847    pub processing_status: Option<Vec<String>>,
11848    ///Property: Program
11849    #[serde(skip_serializing_if = "Option::is_none")]
11850    #[cfg_attr(
11851        feature = "builder",
11852        builder(with = |value:impl Into<String>|vec![value.into()])
11853    )]
11854    pub program: Option<Vec<String>>,
11855    ///Property: Program ID
11856    #[serde(skip_serializing_if = "Option::is_none")]
11857    #[cfg_attr(
11858        feature = "builder",
11859        builder(with = |value:impl Into<String>|vec![value.into()])
11860    )]
11861    pub program_id: Option<Vec<String>>,
11862    ///Property: Source document
11863    #[serde(skip_serializing_if = "Option::is_none")]
11864    #[cfg_attr(
11865        feature = "builder",
11866        builder(with = |value:impl Into<String>|vec![value.into()])
11867    )]
11868    pub proof: Option<Vec<String>>,
11869    ///Property: Published on
11870    #[serde(skip_serializing_if = "Option::is_none")]
11871    #[cfg_attr(
11872        feature = "builder",
11873        builder(with = |value:impl Into<String>|vec![value.into()])
11874    )]
11875    pub published_at: Option<Vec<String>>,
11876    ///Property: Publishing source
11877    #[serde(skip_serializing_if = "Option::is_none")]
11878    #[cfg_attr(
11879        feature = "builder",
11880        builder(with = |value:impl Into<String>|vec![value.into()])
11881    )]
11882    pub publisher: Option<Vec<String>>,
11883    ///Property: Publishing source URL
11884    #[serde(skip_serializing_if = "Option::is_none")]
11885    #[cfg_attr(
11886        feature = "builder",
11887        builder(with = |value:impl Into<String>|vec![value.into()])
11888    )]
11889    pub publisher_url: Option<Vec<String>>,
11890    ///Property: Recipient Account
11891    #[serde(skip_serializing_if = "Option::is_none")]
11892    #[cfg_attr(
11893        feature = "builder",
11894        builder(with = |value:impl Into<String>|vec![value.into()])
11895    )]
11896    pub recipient_account: Option<Vec<String>>,
11897    ///Property: Recipients
11898    #[serde(skip_serializing_if = "Option::is_none")]
11899    #[cfg_attr(
11900        feature = "builder",
11901        builder(with = |value:impl Into<String>|vec![value.into()])
11902    )]
11903    pub recipients: Option<Vec<String>>,
11904    ///Property: Record ID
11905    #[serde(skip_serializing_if = "Option::is_none")]
11906    #[cfg_attr(
11907        feature = "builder",
11908        builder(with = |value:impl Into<String>|vec![value.into()])
11909    )]
11910    pub record_id: Option<Vec<String>>,
11911    ///Property: Retrieved on
11912    #[serde(skip_serializing_if = "Option::is_none")]
11913    #[cfg_attr(
11914        feature = "builder",
11915        builder(with = |value:impl Into<String>|vec![value.into()])
11916    )]
11917    pub retrieved_at: Option<Vec<String>>,
11918    ///Property: Sender
11919    #[serde(default)]
11920    #[cfg_attr(
11921        feature = "builder",
11922        builder(with = |value:impl Into<String>|vec![value.into()])
11923    )]
11924    pub sender: Vec<String>,
11925    ///Property: Sender Account
11926    #[serde(skip_serializing_if = "Option::is_none")]
11927    #[cfg_attr(
11928        feature = "builder",
11929        builder(with = |value:impl Into<String>|vec![value.into()])
11930    )]
11931    pub sender_account: Option<Vec<String>>,
11932    ///Property: Source link
11933    #[serde(skip_serializing_if = "Option::is_none")]
11934    #[cfg_attr(
11935        feature = "builder",
11936        builder(with = |value:impl Into<String>|vec![value.into()])
11937    )]
11938    pub source_url: Option<Vec<String>>,
11939    ///Property: Start date
11940    #[serde(skip_serializing_if = "Option::is_none")]
11941    #[cfg_attr(
11942        feature = "builder",
11943        builder(with = |value:impl Into<String>|vec![value.into()])
11944    )]
11945    pub start_date: Option<Vec<String>>,
11946    ///Property: Subject
11947    #[serde(skip_serializing_if = "Option::is_none")]
11948    #[cfg_attr(
11949        feature = "builder",
11950        builder(with = |value:impl Into<String>|vec![value.into()])
11951    )]
11952    pub subject: Option<Vec<String>>,
11953    ///Property: Summary
11954    #[serde(skip_serializing_if = "Option::is_none")]
11955    #[cfg_attr(
11956        feature = "builder",
11957        builder(with = |value:impl Into<String>|vec![value.into()])
11958    )]
11959    pub summary: Option<Vec<String>>,
11960    ///Property: Thread topic
11961    #[serde(skip_serializing_if = "Option::is_none")]
11962    #[cfg_attr(
11963        feature = "builder",
11964        builder(with = |value:impl Into<String>|vec![value.into()])
11965    )]
11966    pub thread_topic: Option<Vec<String>>,
11967    ///Property: Title
11968    #[serde(skip_serializing_if = "Option::is_none")]
11969    #[cfg_attr(
11970        feature = "builder",
11971        builder(with = |value:impl Into<String>|vec![value.into()])
11972    )]
11973    pub title: Option<Vec<String>>,
11974    ///Property: Topics
11975    #[serde(skip_serializing_if = "Option::is_none")]
11976    #[cfg_attr(
11977        feature = "builder",
11978        builder(with = |value:impl Into<String>|vec![value.into()])
11979    )]
11980    pub topics: Option<Vec<String>>,
11981    ///Property: The language of the translated text
11982    #[serde(skip_serializing_if = "Option::is_none")]
11983    #[cfg_attr(
11984        feature = "builder",
11985        builder(with = |value:impl Into<String>|vec![value.into()])
11986    )]
11987    pub translated_language: Option<Vec<String>>,
11988    ///Property: Translated version of the body text
11989    #[serde(skip_serializing_if = "Option::is_none")]
11990    #[cfg_attr(
11991        feature = "builder",
11992        builder(with = |value:impl Into<String>|vec![value.into()])
11993    )]
11994    pub translated_text: Option<Vec<String>>,
11995    ///Property: Weak alias
11996    #[serde(skip_serializing_if = "Option::is_none")]
11997    #[cfg_attr(
11998        feature = "builder",
11999        builder(with = |value:impl Into<String>|vec![value.into()])
12000    )]
12001    pub weak_alias: Option<Vec<String>>,
12002    ///Property: Wikidata ID
12003    #[serde(skip_serializing_if = "Option::is_none")]
12004    #[cfg_attr(
12005        feature = "builder",
12006        builder(with = |value:impl Into<String>|vec![value.into()])
12007    )]
12008    pub wikidata_id: Option<Vec<String>>,
12009    ///Property: Wikipedia Article
12010    #[serde(skip_serializing_if = "Option::is_none")]
12011    #[cfg_attr(
12012        feature = "builder",
12013        builder(with = |value:impl Into<String>|vec![value.into()])
12014    )]
12015    pub wikipedia_url: Option<Vec<String>>,
12016}
12017impl Message {
12018    /// Create a new entity with the given ID
12019    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
12020    pub fn new(id: impl Into<String>) -> Self {
12021        Self {
12022            id: id.into(),
12023            schema: "Message".to_string(),
12024            address: None,
12025            address_entity: None,
12026            aleph_url: None,
12027            alias: None,
12028            ancestors: None,
12029            author: None,
12030            authored_at: None,
12031            body_html: None,
12032            body_text: Vec::new(),
12033            companies_mentioned: None,
12034            content_hash: None,
12035            country: None,
12036            crawler: None,
12037            created_at: None,
12038            date: None,
12039            description: None,
12040            detected_country: None,
12041            detected_language: None,
12042            email_mentioned: None,
12043            encoding: None,
12044            end_date: None,
12045            extension: None,
12046            file_name: Vec::new(),
12047            file_size: None,
12048            generator: None,
12049            iban_mentioned: None,
12050            in_reply_to: None,
12051            in_reply_to_message: None,
12052            index_text: None,
12053            ip_mentioned: None,
12054            keywords: None,
12055            language: None,
12056            location_mentioned: None,
12057            message_id: None,
12058            metadata: None,
12059            mime_type: None,
12060            modified_at: None,
12061            name: Vec::new(),
12062            names_mentioned: None,
12063            notes: None,
12064            parent: None,
12065            people_mentioned: None,
12066            phone_mentioned: None,
12067            previous_name: None,
12068            processed_at: None,
12069            processing_agent: None,
12070            processing_error: None,
12071            processing_status: None,
12072            program: None,
12073            program_id: None,
12074            proof: None,
12075            published_at: None,
12076            publisher: None,
12077            publisher_url: None,
12078            recipient_account: None,
12079            recipients: None,
12080            record_id: None,
12081            retrieved_at: None,
12082            sender: Vec::new(),
12083            sender_account: None,
12084            source_url: None,
12085            start_date: None,
12086            subject: None,
12087            summary: None,
12088            thread_topic: None,
12089            title: None,
12090            topics: None,
12091            translated_language: None,
12092            translated_text: None,
12093            weak_alias: None,
12094            wikidata_id: None,
12095            wikipedia_url: None,
12096        }
12097    }
12098    /// Get the schema name
12099    pub fn schema_name() -> &'static str {
12100        "Message"
12101    }
12102    /// Serialize to standard FTM nested JSON format
12103    ///
12104    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
12105    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
12106        let mut value = serde_json::to_value(self)?;
12107        if let Some(obj) = value.as_object_mut() {
12108            let id = obj.remove("id");
12109            let schema = obj.remove("schema");
12110            let properties = serde_json::Value::Object(std::mem::take(obj));
12111            if let Some(id) = id {
12112                obj.insert("id".into(), id);
12113            }
12114            if let Some(schema) = schema {
12115                obj.insert("schema".into(), schema);
12116            }
12117            obj.insert("properties".into(), properties);
12118        }
12119        serde_json::to_string(&value)
12120    }
12121}
12122///FTM Schema: Note
12123#[derive(Debug, Clone, Serialize, Deserialize)]
12124#[cfg_attr(feature = "builder", derive(Builder))]
12125#[serde(rename_all = "camelCase")]
12126pub struct Note {
12127    pub id: String,
12128    #[cfg_attr(feature = "builder", builder(default = "Note".to_string()))]
12129    pub schema: String,
12130    ///Property: Address
12131    #[serde(skip_serializing_if = "Option::is_none")]
12132    #[cfg_attr(
12133        feature = "builder",
12134        builder(with = |value:impl Into<String>|vec![value.into()])
12135    )]
12136    pub address: Option<Vec<String>>,
12137    ///Property: Address
12138    #[serde(skip_serializing_if = "Option::is_none")]
12139    #[cfg_attr(
12140        feature = "builder",
12141        builder(with = |value:impl Into<String>|vec![value.into()])
12142    )]
12143    pub address_entity: Option<Vec<String>>,
12144    ///Property: Aleph URL
12145    #[serde(skip_serializing_if = "Option::is_none")]
12146    #[cfg_attr(
12147        feature = "builder",
12148        builder(with = |value:impl Into<String>|vec![value.into()])
12149    )]
12150    pub aleph_url: Option<Vec<String>>,
12151    ///Property: Alias
12152    #[serde(skip_serializing_if = "Option::is_none")]
12153    #[cfg_attr(
12154        feature = "builder",
12155        builder(with = |value:impl Into<String>|vec![value.into()])
12156    )]
12157    pub alias: Option<Vec<String>>,
12158    ///Property: Detected companies
12159    #[serde(skip_serializing_if = "Option::is_none")]
12160    #[cfg_attr(
12161        feature = "builder",
12162        builder(with = |value:impl Into<String>|vec![value.into()])
12163    )]
12164    pub companies_mentioned: Option<Vec<String>>,
12165    ///Property: Country
12166    #[serde(skip_serializing_if = "Option::is_none")]
12167    #[cfg_attr(
12168        feature = "builder",
12169        builder(with = |value:impl Into<String>|vec![value.into()])
12170    )]
12171    pub country: Option<Vec<String>>,
12172    ///Property: Created at
12173    #[serde(skip_serializing_if = "Option::is_none")]
12174    #[cfg_attr(
12175        feature = "builder",
12176        builder(with = |value:impl Into<String>|vec![value.into()])
12177    )]
12178    pub created_at: Option<Vec<String>>,
12179    ///Property: Description
12180    #[serde(skip_serializing_if = "Option::is_none")]
12181    #[cfg_attr(
12182        feature = "builder",
12183        builder(with = |value:impl Into<String>|vec![value.into()])
12184    )]
12185    pub description: Option<Vec<String>>,
12186    ///Property: Detected country
12187    #[serde(skip_serializing_if = "Option::is_none")]
12188    #[cfg_attr(
12189        feature = "builder",
12190        builder(with = |value:impl Into<String>|vec![value.into()])
12191    )]
12192    pub detected_country: Option<Vec<String>>,
12193    ///Property: Detected language
12194    #[serde(skip_serializing_if = "Option::is_none")]
12195    #[cfg_attr(
12196        feature = "builder",
12197        builder(with = |value:impl Into<String>|vec![value.into()])
12198    )]
12199    pub detected_language: Option<Vec<String>>,
12200    ///Property: Detected e-mail addresses
12201    #[serde(skip_serializing_if = "Option::is_none")]
12202    #[cfg_attr(
12203        feature = "builder",
12204        builder(with = |value:impl Into<String>|vec![value.into()])
12205    )]
12206    pub email_mentioned: Option<Vec<String>>,
12207    ///Property: Entity
12208    #[serde(skip_serializing_if = "Option::is_none")]
12209    #[cfg_attr(
12210        feature = "builder",
12211        builder(with = |value:impl Into<String>|vec![value.into()])
12212    )]
12213    pub entity: Option<Vec<String>>,
12214    ///Property: Detected IBANs
12215    #[serde(skip_serializing_if = "Option::is_none")]
12216    #[cfg_attr(
12217        feature = "builder",
12218        builder(with = |value:impl Into<String>|vec![value.into()])
12219    )]
12220    pub iban_mentioned: Option<Vec<String>>,
12221    ///Property: Index text
12222    #[serde(skip_serializing_if = "Option::is_none")]
12223    #[cfg_attr(
12224        feature = "builder",
12225        builder(with = |value:impl Into<String>|vec![value.into()])
12226    )]
12227    pub index_text: Option<Vec<String>>,
12228    ///Property: Detected IP addresses
12229    #[serde(skip_serializing_if = "Option::is_none")]
12230    #[cfg_attr(
12231        feature = "builder",
12232        builder(with = |value:impl Into<String>|vec![value.into()])
12233    )]
12234    pub ip_mentioned: Option<Vec<String>>,
12235    ///Property: Keywords
12236    #[serde(skip_serializing_if = "Option::is_none")]
12237    #[cfg_attr(
12238        feature = "builder",
12239        builder(with = |value:impl Into<String>|vec![value.into()])
12240    )]
12241    pub keywords: Option<Vec<String>>,
12242    ///Property: Detected locations
12243    #[serde(skip_serializing_if = "Option::is_none")]
12244    #[cfg_attr(
12245        feature = "builder",
12246        builder(with = |value:impl Into<String>|vec![value.into()])
12247    )]
12248    pub location_mentioned: Option<Vec<String>>,
12249    ///Property: Modified on
12250    #[serde(skip_serializing_if = "Option::is_none")]
12251    #[cfg_attr(
12252        feature = "builder",
12253        builder(with = |value:impl Into<String>|vec![value.into()])
12254    )]
12255    pub modified_at: Option<Vec<String>>,
12256    ///Property: Name
12257    #[serde(default)]
12258    #[cfg_attr(
12259        feature = "builder",
12260        builder(with = |value:impl Into<String>|vec![value.into()])
12261    )]
12262    pub name: Vec<String>,
12263    ///Property: Detected names
12264    #[serde(skip_serializing_if = "Option::is_none")]
12265    #[cfg_attr(
12266        feature = "builder",
12267        builder(with = |value:impl Into<String>|vec![value.into()])
12268    )]
12269    pub names_mentioned: Option<Vec<String>>,
12270    ///Property: Notes
12271    #[serde(skip_serializing_if = "Option::is_none")]
12272    #[cfg_attr(
12273        feature = "builder",
12274        builder(with = |value:impl Into<String>|vec![value.into()])
12275    )]
12276    pub notes: Option<Vec<String>>,
12277    ///Property: Detected people
12278    #[serde(skip_serializing_if = "Option::is_none")]
12279    #[cfg_attr(
12280        feature = "builder",
12281        builder(with = |value:impl Into<String>|vec![value.into()])
12282    )]
12283    pub people_mentioned: Option<Vec<String>>,
12284    ///Property: Detected phones
12285    #[serde(skip_serializing_if = "Option::is_none")]
12286    #[cfg_attr(
12287        feature = "builder",
12288        builder(with = |value:impl Into<String>|vec![value.into()])
12289    )]
12290    pub phone_mentioned: Option<Vec<String>>,
12291    ///Property: Previous name
12292    #[serde(skip_serializing_if = "Option::is_none")]
12293    #[cfg_attr(
12294        feature = "builder",
12295        builder(with = |value:impl Into<String>|vec![value.into()])
12296    )]
12297    pub previous_name: Option<Vec<String>>,
12298    ///Property: Program
12299    #[serde(skip_serializing_if = "Option::is_none")]
12300    #[cfg_attr(
12301        feature = "builder",
12302        builder(with = |value:impl Into<String>|vec![value.into()])
12303    )]
12304    pub program: Option<Vec<String>>,
12305    ///Property: Program ID
12306    #[serde(skip_serializing_if = "Option::is_none")]
12307    #[cfg_attr(
12308        feature = "builder",
12309        builder(with = |value:impl Into<String>|vec![value.into()])
12310    )]
12311    pub program_id: Option<Vec<String>>,
12312    ///Property: Source document
12313    #[serde(skip_serializing_if = "Option::is_none")]
12314    #[cfg_attr(
12315        feature = "builder",
12316        builder(with = |value:impl Into<String>|vec![value.into()])
12317    )]
12318    pub proof: Option<Vec<String>>,
12319    ///Property: Publishing source
12320    #[serde(skip_serializing_if = "Option::is_none")]
12321    #[cfg_attr(
12322        feature = "builder",
12323        builder(with = |value:impl Into<String>|vec![value.into()])
12324    )]
12325    pub publisher: Option<Vec<String>>,
12326    ///Property: Publishing source URL
12327    #[serde(skip_serializing_if = "Option::is_none")]
12328    #[cfg_attr(
12329        feature = "builder",
12330        builder(with = |value:impl Into<String>|vec![value.into()])
12331    )]
12332    pub publisher_url: Option<Vec<String>>,
12333    ///Property: Retrieved on
12334    #[serde(skip_serializing_if = "Option::is_none")]
12335    #[cfg_attr(
12336        feature = "builder",
12337        builder(with = |value:impl Into<String>|vec![value.into()])
12338    )]
12339    pub retrieved_at: Option<Vec<String>>,
12340    ///Property: Source link
12341    #[serde(skip_serializing_if = "Option::is_none")]
12342    #[cfg_attr(
12343        feature = "builder",
12344        builder(with = |value:impl Into<String>|vec![value.into()])
12345    )]
12346    pub source_url: Option<Vec<String>>,
12347    ///Property: Summary
12348    #[serde(skip_serializing_if = "Option::is_none")]
12349    #[cfg_attr(
12350        feature = "builder",
12351        builder(with = |value:impl Into<String>|vec![value.into()])
12352    )]
12353    pub summary: Option<Vec<String>>,
12354    ///Property: Topics
12355    #[serde(skip_serializing_if = "Option::is_none")]
12356    #[cfg_attr(
12357        feature = "builder",
12358        builder(with = |value:impl Into<String>|vec![value.into()])
12359    )]
12360    pub topics: Option<Vec<String>>,
12361    ///Property: Weak alias
12362    #[serde(skip_serializing_if = "Option::is_none")]
12363    #[cfg_attr(
12364        feature = "builder",
12365        builder(with = |value:impl Into<String>|vec![value.into()])
12366    )]
12367    pub weak_alias: Option<Vec<String>>,
12368    ///Property: Wikidata ID
12369    #[serde(skip_serializing_if = "Option::is_none")]
12370    #[cfg_attr(
12371        feature = "builder",
12372        builder(with = |value:impl Into<String>|vec![value.into()])
12373    )]
12374    pub wikidata_id: Option<Vec<String>>,
12375    ///Property: Wikipedia Article
12376    #[serde(skip_serializing_if = "Option::is_none")]
12377    #[cfg_attr(
12378        feature = "builder",
12379        builder(with = |value:impl Into<String>|vec![value.into()])
12380    )]
12381    pub wikipedia_url: Option<Vec<String>>,
12382}
12383impl Note {
12384    /// Create a new entity with the given ID
12385    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
12386    pub fn new(id: impl Into<String>) -> Self {
12387        Self {
12388            id: id.into(),
12389            schema: "Note".to_string(),
12390            address: None,
12391            address_entity: None,
12392            aleph_url: None,
12393            alias: None,
12394            companies_mentioned: None,
12395            country: None,
12396            created_at: None,
12397            description: None,
12398            detected_country: None,
12399            detected_language: None,
12400            email_mentioned: None,
12401            entity: None,
12402            iban_mentioned: None,
12403            index_text: None,
12404            ip_mentioned: None,
12405            keywords: None,
12406            location_mentioned: None,
12407            modified_at: None,
12408            name: Vec::new(),
12409            names_mentioned: None,
12410            notes: None,
12411            people_mentioned: None,
12412            phone_mentioned: None,
12413            previous_name: None,
12414            program: None,
12415            program_id: None,
12416            proof: None,
12417            publisher: None,
12418            publisher_url: None,
12419            retrieved_at: None,
12420            source_url: None,
12421            summary: None,
12422            topics: None,
12423            weak_alias: None,
12424            wikidata_id: None,
12425            wikipedia_url: None,
12426        }
12427    }
12428    /// Get the schema name
12429    pub fn schema_name() -> &'static str {
12430        "Note"
12431    }
12432    /// Serialize to standard FTM nested JSON format
12433    ///
12434    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
12435    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
12436        let mut value = serde_json::to_value(self)?;
12437        if let Some(obj) = value.as_object_mut() {
12438            let id = obj.remove("id");
12439            let schema = obj.remove("schema");
12440            let properties = serde_json::Value::Object(std::mem::take(obj));
12441            if let Some(id) = id {
12442                obj.insert("id".into(), id);
12443            }
12444            if let Some(schema) = schema {
12445                obj.insert("schema".into(), schema);
12446            }
12447            obj.insert("properties".into(), properties);
12448        }
12449        serde_json::to_string(&value)
12450    }
12451}
12452///FTM Schema: Occupancy
12453#[derive(Debug, Clone, Serialize, Deserialize)]
12454#[cfg_attr(feature = "builder", derive(Builder))]
12455#[serde(rename_all = "camelCase")]
12456pub struct Occupancy {
12457    pub id: String,
12458    #[cfg_attr(feature = "builder", builder(default = "Occupancy".to_string()))]
12459    pub schema: String,
12460    ///Property: Aleph URL
12461    #[serde(skip_serializing_if = "Option::is_none")]
12462    #[cfg_attr(
12463        feature = "builder",
12464        builder(with = |value:impl Into<String>|vec![value.into()])
12465    )]
12466    pub aleph_url: Option<Vec<String>>,
12467    ///Property: Constituency
12468    #[serde(skip_serializing_if = "Option::is_none")]
12469    #[cfg_attr(
12470        feature = "builder",
12471        builder(with = |value:impl Into<String>|vec![value.into()])
12472    )]
12473    pub constituency: Option<Vec<String>>,
12474    ///Property: Date
12475    #[serde(skip_serializing_if = "Option::is_none")]
12476    #[cfg_attr(
12477        feature = "builder",
12478        builder(with = |value:impl Into<String>|vec![value.into()])
12479    )]
12480    pub date: Option<Vec<String>>,
12481    ///Property: Declaration date
12482    #[serde(skip_serializing_if = "Option::is_none")]
12483    #[cfg_attr(
12484        feature = "builder",
12485        builder(with = |value:impl Into<String>|vec![value.into()])
12486    )]
12487    pub declaration_date: Option<Vec<String>>,
12488    ///Property: Description
12489    #[serde(skip_serializing_if = "Option::is_none")]
12490    #[cfg_attr(
12491        feature = "builder",
12492        builder(with = |value:impl Into<String>|vec![value.into()])
12493    )]
12494    pub description: Option<Vec<String>>,
12495    ///Property: End date
12496    #[serde(skip_serializing_if = "Option::is_none")]
12497    #[cfg_attr(
12498        feature = "builder",
12499        builder(with = |value:impl Into<String>|vec![value.into()])
12500    )]
12501    pub end_date: Option<Vec<String>>,
12502    ///Property: Holder
12503    #[serde(default)]
12504    #[cfg_attr(
12505        feature = "builder",
12506        builder(with = |value:impl Into<String>|vec![value.into()])
12507    )]
12508    pub holder: Vec<String>,
12509    ///Property: Index text
12510    #[serde(skip_serializing_if = "Option::is_none")]
12511    #[cfg_attr(
12512        feature = "builder",
12513        builder(with = |value:impl Into<String>|vec![value.into()])
12514    )]
12515    pub index_text: Option<Vec<String>>,
12516    ///Property: Modified on
12517    #[serde(skip_serializing_if = "Option::is_none")]
12518    #[cfg_attr(
12519        feature = "builder",
12520        builder(with = |value:impl Into<String>|vec![value.into()])
12521    )]
12522    pub modified_at: Option<Vec<String>>,
12523    ///Property: Detected names
12524    #[serde(skip_serializing_if = "Option::is_none")]
12525    #[cfg_attr(
12526        feature = "builder",
12527        builder(with = |value:impl Into<String>|vec![value.into()])
12528    )]
12529    pub names_mentioned: Option<Vec<String>>,
12530    ///Property: Political group
12531    #[serde(skip_serializing_if = "Option::is_none")]
12532    #[cfg_attr(
12533        feature = "builder",
12534        builder(with = |value:impl Into<String>|vec![value.into()])
12535    )]
12536    pub political_group: Option<Vec<String>>,
12537    ///Property: Position occupied
12538    #[serde(default)]
12539    #[cfg_attr(
12540        feature = "builder",
12541        builder(with = |value:impl Into<String>|vec![value.into()])
12542    )]
12543    pub post: Vec<String>,
12544    ///Property: Source document
12545    #[serde(skip_serializing_if = "Option::is_none")]
12546    #[cfg_attr(
12547        feature = "builder",
12548        builder(with = |value:impl Into<String>|vec![value.into()])
12549    )]
12550    pub proof: Option<Vec<String>>,
12551    ///Property: Publishing source
12552    #[serde(skip_serializing_if = "Option::is_none")]
12553    #[cfg_attr(
12554        feature = "builder",
12555        builder(with = |value:impl Into<String>|vec![value.into()])
12556    )]
12557    pub publisher: Option<Vec<String>>,
12558    ///Property: Publishing source URL
12559    #[serde(skip_serializing_if = "Option::is_none")]
12560    #[cfg_attr(
12561        feature = "builder",
12562        builder(with = |value:impl Into<String>|vec![value.into()])
12563    )]
12564    pub publisher_url: Option<Vec<String>>,
12565    ///Property: Record ID
12566    #[serde(skip_serializing_if = "Option::is_none")]
12567    #[cfg_attr(
12568        feature = "builder",
12569        builder(with = |value:impl Into<String>|vec![value.into()])
12570    )]
12571    pub record_id: Option<Vec<String>>,
12572    ///Property: Retrieved on
12573    #[serde(skip_serializing_if = "Option::is_none")]
12574    #[cfg_attr(
12575        feature = "builder",
12576        builder(with = |value:impl Into<String>|vec![value.into()])
12577    )]
12578    pub retrieved_at: Option<Vec<String>>,
12579    ///Property: Source link
12580    #[serde(skip_serializing_if = "Option::is_none")]
12581    #[cfg_attr(
12582        feature = "builder",
12583        builder(with = |value:impl Into<String>|vec![value.into()])
12584    )]
12585    pub source_url: Option<Vec<String>>,
12586    ///Property: Start date
12587    #[serde(skip_serializing_if = "Option::is_none")]
12588    #[cfg_attr(
12589        feature = "builder",
12590        builder(with = |value:impl Into<String>|vec![value.into()])
12591    )]
12592    pub start_date: Option<Vec<String>>,
12593    ///Property: Status
12594    #[serde(skip_serializing_if = "Option::is_none")]
12595    #[cfg_attr(
12596        feature = "builder",
12597        builder(with = |value:impl Into<String>|vec![value.into()])
12598    )]
12599    pub status: Option<Vec<String>>,
12600    ///Property: Summary
12601    #[serde(skip_serializing_if = "Option::is_none")]
12602    #[cfg_attr(
12603        feature = "builder",
12604        builder(with = |value:impl Into<String>|vec![value.into()])
12605    )]
12606    pub summary: Option<Vec<String>>,
12607}
12608impl Occupancy {
12609    /// Create a new entity with the given ID
12610    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
12611    pub fn new(id: impl Into<String>) -> Self {
12612        Self {
12613            id: id.into(),
12614            schema: "Occupancy".to_string(),
12615            aleph_url: None,
12616            constituency: None,
12617            date: None,
12618            declaration_date: None,
12619            description: None,
12620            end_date: None,
12621            holder: Vec::new(),
12622            index_text: None,
12623            modified_at: None,
12624            names_mentioned: None,
12625            political_group: None,
12626            post: Vec::new(),
12627            proof: None,
12628            publisher: None,
12629            publisher_url: None,
12630            record_id: None,
12631            retrieved_at: None,
12632            source_url: None,
12633            start_date: None,
12634            status: None,
12635            summary: None,
12636        }
12637    }
12638    /// Get the schema name
12639    pub fn schema_name() -> &'static str {
12640        "Occupancy"
12641    }
12642    /// Serialize to standard FTM nested JSON format
12643    ///
12644    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
12645    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
12646        let mut value = serde_json::to_value(self)?;
12647        if let Some(obj) = value.as_object_mut() {
12648            let id = obj.remove("id");
12649            let schema = obj.remove("schema");
12650            let properties = serde_json::Value::Object(std::mem::take(obj));
12651            if let Some(id) = id {
12652                obj.insert("id".into(), id);
12653            }
12654            if let Some(schema) = schema {
12655                obj.insert("schema".into(), schema);
12656            }
12657            obj.insert("properties".into(), properties);
12658        }
12659        serde_json::to_string(&value)
12660    }
12661}
12662///FTM Schema: Organization
12663#[derive(Debug, Clone, Serialize, Deserialize)]
12664#[cfg_attr(feature = "builder", derive(Builder))]
12665#[serde(rename_all = "camelCase")]
12666pub struct Organization {
12667    pub id: String,
12668    #[cfg_attr(feature = "builder", builder(default = "Organization".to_string()))]
12669    pub schema: String,
12670    ///Property: Abbreviation
12671    #[serde(skip_serializing_if = "Option::is_none")]
12672    #[cfg_attr(
12673        feature = "builder",
12674        builder(with = |value:impl Into<String>|vec![value.into()])
12675    )]
12676    pub abbreviation: Option<Vec<String>>,
12677    ///Property: Address
12678    #[serde(skip_serializing_if = "Option::is_none")]
12679    #[cfg_attr(
12680        feature = "builder",
12681        builder(with = |value:impl Into<String>|vec![value.into()])
12682    )]
12683    pub address: Option<Vec<String>>,
12684    ///Property: Address
12685    #[serde(skip_serializing_if = "Option::is_none")]
12686    #[cfg_attr(
12687        feature = "builder",
12688        builder(with = |value:impl Into<String>|vec![value.into()])
12689    )]
12690    pub address_entity: Option<Vec<String>>,
12691    ///Property: Aleph URL
12692    #[serde(skip_serializing_if = "Option::is_none")]
12693    #[cfg_attr(
12694        feature = "builder",
12695        builder(with = |value:impl Into<String>|vec![value.into()])
12696    )]
12697    pub aleph_url: Option<Vec<String>>,
12698    ///Property: Alias
12699    #[serde(skip_serializing_if = "Option::is_none")]
12700    #[cfg_attr(
12701        feature = "builder",
12702        builder(with = |value:impl Into<String>|vec![value.into()])
12703    )]
12704    pub alias: Option<Vec<String>>,
12705    ///Property: BrightQuery ID
12706    #[serde(skip_serializing_if = "Option::is_none")]
12707    #[cfg_attr(
12708        feature = "builder",
12709        builder(with = |value:impl Into<String>|vec![value.into()])
12710    )]
12711    pub bright_query_id: Option<Vec<String>>,
12712    ///Property: BrightQuery Organization ID
12713    #[serde(skip_serializing_if = "Option::is_none")]
12714    #[cfg_attr(
12715        feature = "builder",
12716        builder(with = |value:impl Into<String>|vec![value.into()])
12717    )]
12718    pub bright_query_org_id: Option<Vec<String>>,
12719    ///Property: Bureau van Dijk ID
12720    #[serde(skip_serializing_if = "Option::is_none")]
12721    #[cfg_attr(
12722        feature = "builder",
12723        builder(with = |value:impl Into<String>|vec![value.into()])
12724    )]
12725    pub bvd_id: Option<Vec<String>>,
12726    ///Property: CAGE
12727    #[serde(skip_serializing_if = "Option::is_none")]
12728    #[cfg_attr(
12729        feature = "builder",
12730        builder(with = |value:impl Into<String>|vec![value.into()])
12731    )]
12732    pub cage_code: Option<Vec<String>>,
12733    ///Property: Classification
12734    #[serde(skip_serializing_if = "Option::is_none")]
12735    #[cfg_attr(
12736        feature = "builder",
12737        builder(with = |value:impl Into<String>|vec![value.into()])
12738    )]
12739    pub classification: Option<Vec<String>>,
12740    ///Property: Country
12741    #[serde(skip_serializing_if = "Option::is_none")]
12742    #[cfg_attr(
12743        feature = "builder",
12744        builder(with = |value:impl Into<String>|vec![value.into()])
12745    )]
12746    pub country: Option<Vec<String>>,
12747    ///Property: Created at
12748    #[serde(skip_serializing_if = "Option::is_none")]
12749    #[cfg_attr(
12750        feature = "builder",
12751        builder(with = |value:impl Into<String>|vec![value.into()])
12752    )]
12753    pub created_at: Option<Vec<String>>,
12754    ///Property: Description
12755    #[serde(skip_serializing_if = "Option::is_none")]
12756    #[cfg_attr(
12757        feature = "builder",
12758        builder(with = |value:impl Into<String>|vec![value.into()])
12759    )]
12760    pub description: Option<Vec<String>>,
12761    ///Property: Dissolution date
12762    #[serde(skip_serializing_if = "Option::is_none")]
12763    #[cfg_attr(
12764        feature = "builder",
12765        builder(with = |value:impl Into<String>|vec![value.into()])
12766    )]
12767    pub dissolution_date: Option<Vec<String>>,
12768    ///Property: DUNS
12769    #[serde(skip_serializing_if = "Option::is_none")]
12770    #[cfg_attr(
12771        feature = "builder",
12772        builder(with = |value:impl Into<String>|vec![value.into()])
12773    )]
12774    pub duns_code: Option<Vec<String>>,
12775    ///Property: Email
12776    #[serde(skip_serializing_if = "Option::is_none")]
12777    #[cfg_attr(
12778        feature = "builder",
12779        builder(with = |value:impl Into<String>|vec![value.into()])
12780    )]
12781    pub email: Option<Vec<String>>,
12782    ///Property: GIIN
12783    #[serde(skip_serializing_if = "Option::is_none")]
12784    #[cfg_attr(
12785        feature = "builder",
12786        builder(with = |value:impl Into<String>|vec![value.into()])
12787    )]
12788    pub gii_number: Option<Vec<String>>,
12789    ///Property: ICIJ ID
12790    #[serde(skip_serializing_if = "Option::is_none")]
12791    #[cfg_attr(
12792        feature = "builder",
12793        builder(with = |value:impl Into<String>|vec![value.into()])
12794    )]
12795    pub icij_id: Option<Vec<String>>,
12796    ///Property: ID Number
12797    #[serde(skip_serializing_if = "Option::is_none")]
12798    #[cfg_attr(
12799        feature = "builder",
12800        builder(with = |value:impl Into<String>|vec![value.into()])
12801    )]
12802    pub id_number: Option<Vec<String>>,
12803    ///Property: IMO Number
12804    #[serde(skip_serializing_if = "Option::is_none")]
12805    #[cfg_attr(
12806        feature = "builder",
12807        builder(with = |value:impl Into<String>|vec![value.into()])
12808    )]
12809    pub imo_number: Option<Vec<String>>,
12810    ///Property: Incorporation date
12811    #[serde(skip_serializing_if = "Option::is_none")]
12812    #[cfg_attr(
12813        feature = "builder",
12814        builder(with = |value:impl Into<String>|vec![value.into()])
12815    )]
12816    pub incorporation_date: Option<Vec<String>>,
12817    ///Property: Index text
12818    #[serde(skip_serializing_if = "Option::is_none")]
12819    #[cfg_attr(
12820        feature = "builder",
12821        builder(with = |value:impl Into<String>|vec![value.into()])
12822    )]
12823    pub index_text: Option<Vec<String>>,
12824    ///Property: INN
12825    #[serde(skip_serializing_if = "Option::is_none")]
12826    #[cfg_attr(
12827        feature = "builder",
12828        builder(with = |value:impl Into<String>|vec![value.into()])
12829    )]
12830    pub inn_code: Option<Vec<String>>,
12831    ///Property: Jurisdiction
12832    #[serde(skip_serializing_if = "Option::is_none")]
12833    #[cfg_attr(
12834        feature = "builder",
12835        builder(with = |value:impl Into<String>|vec![value.into()])
12836    )]
12837    pub jurisdiction: Option<Vec<String>>,
12838    ///Property: Keywords
12839    #[serde(skip_serializing_if = "Option::is_none")]
12840    #[cfg_attr(
12841        feature = "builder",
12842        builder(with = |value:impl Into<String>|vec![value.into()])
12843    )]
12844    pub keywords: Option<Vec<String>>,
12845    ///Property: Legal form
12846    #[serde(skip_serializing_if = "Option::is_none")]
12847    #[cfg_attr(
12848        feature = "builder",
12849        builder(with = |value:impl Into<String>|vec![value.into()])
12850    )]
12851    pub legal_form: Option<Vec<String>>,
12852    ///Property: LEI
12853    #[serde(skip_serializing_if = "Option::is_none")]
12854    #[cfg_attr(
12855        feature = "builder",
12856        builder(with = |value:impl Into<String>|vec![value.into()])
12857    )]
12858    pub lei_code: Option<Vec<String>>,
12859    ///Property: License Number
12860    #[serde(skip_serializing_if = "Option::is_none")]
12861    #[cfg_attr(
12862        feature = "builder",
12863        builder(with = |value:impl Into<String>|vec![value.into()])
12864    )]
12865    pub license_number: Option<Vec<String>>,
12866    ///Property: Country of origin
12867    #[serde(skip_serializing_if = "Option::is_none")]
12868    #[cfg_attr(
12869        feature = "builder",
12870        builder(with = |value:impl Into<String>|vec![value.into()])
12871    )]
12872    pub main_country: Option<Vec<String>>,
12873    ///Property: Modified on
12874    #[serde(skip_serializing_if = "Option::is_none")]
12875    #[cfg_attr(
12876        feature = "builder",
12877        builder(with = |value:impl Into<String>|vec![value.into()])
12878    )]
12879    pub modified_at: Option<Vec<String>>,
12880    ///Property: Name
12881    #[serde(default)]
12882    #[cfg_attr(
12883        feature = "builder",
12884        builder(with = |value:impl Into<String>|vec![value.into()])
12885    )]
12886    pub name: Vec<String>,
12887    ///Property: Notes
12888    #[serde(skip_serializing_if = "Option::is_none")]
12889    #[cfg_attr(
12890        feature = "builder",
12891        builder(with = |value:impl Into<String>|vec![value.into()])
12892    )]
12893    pub notes: Option<Vec<String>>,
12894    ///Property: NPI
12895    #[serde(skip_serializing_if = "Option::is_none")]
12896    #[cfg_attr(
12897        feature = "builder",
12898        builder(with = |value:impl Into<String>|vec![value.into()])
12899    )]
12900    pub npi_code: Option<Vec<String>>,
12901    ///Property: OGRN
12902    #[serde(skip_serializing_if = "Option::is_none")]
12903    #[cfg_attr(
12904        feature = "builder",
12905        builder(with = |value:impl Into<String>|vec![value.into()])
12906    )]
12907    pub ogrn_code: Option<Vec<String>>,
12908    ///Property: OKPO
12909    #[serde(skip_serializing_if = "Option::is_none")]
12910    #[cfg_attr(
12911        feature = "builder",
12912        builder(with = |value:impl Into<String>|vec![value.into()])
12913    )]
12914    pub okpo_code: Option<Vec<String>>,
12915    ///Property: OpenCorporates URL
12916    #[serde(skip_serializing_if = "Option::is_none")]
12917    #[cfg_attr(
12918        feature = "builder",
12919        builder(with = |value:impl Into<String>|vec![value.into()])
12920    )]
12921    pub opencorporates_url: Option<Vec<String>>,
12922    ///Property: Parent company
12923    #[serde(skip_serializing_if = "Option::is_none")]
12924    #[cfg_attr(
12925        feature = "builder",
12926        builder(with = |value:impl Into<String>|vec![value.into()])
12927    )]
12928    pub parent: Option<Vec<String>>,
12929    ///Property: PermID
12930    #[serde(skip_serializing_if = "Option::is_none")]
12931    #[cfg_attr(
12932        feature = "builder",
12933        builder(with = |value:impl Into<String>|vec![value.into()])
12934    )]
12935    pub perm_id: Option<Vec<String>>,
12936    ///Property: Phone
12937    #[serde(skip_serializing_if = "Option::is_none")]
12938    #[cfg_attr(
12939        feature = "builder",
12940        builder(with = |value:impl Into<String>|vec![value.into()])
12941    )]
12942    pub phone: Option<Vec<String>>,
12943    ///Property: Previous name
12944    #[serde(skip_serializing_if = "Option::is_none")]
12945    #[cfg_attr(
12946        feature = "builder",
12947        builder(with = |value:impl Into<String>|vec![value.into()])
12948    )]
12949    pub previous_name: Option<Vec<String>>,
12950    ///Property: Program
12951    #[serde(skip_serializing_if = "Option::is_none")]
12952    #[cfg_attr(
12953        feature = "builder",
12954        builder(with = |value:impl Into<String>|vec![value.into()])
12955    )]
12956    pub program: Option<Vec<String>>,
12957    ///Property: Program ID
12958    #[serde(skip_serializing_if = "Option::is_none")]
12959    #[cfg_attr(
12960        feature = "builder",
12961        builder(with = |value:impl Into<String>|vec![value.into()])
12962    )]
12963    pub program_id: Option<Vec<String>>,
12964    ///Property: Source document
12965    #[serde(skip_serializing_if = "Option::is_none")]
12966    #[cfg_attr(
12967        feature = "builder",
12968        builder(with = |value:impl Into<String>|vec![value.into()])
12969    )]
12970    pub proof: Option<Vec<String>>,
12971    ///Property: Publishing source
12972    #[serde(skip_serializing_if = "Option::is_none")]
12973    #[cfg_attr(
12974        feature = "builder",
12975        builder(with = |value:impl Into<String>|vec![value.into()])
12976    )]
12977    pub publisher: Option<Vec<String>>,
12978    ///Property: Publishing source URL
12979    #[serde(skip_serializing_if = "Option::is_none")]
12980    #[cfg_attr(
12981        feature = "builder",
12982        builder(with = |value:impl Into<String>|vec![value.into()])
12983    )]
12984    pub publisher_url: Option<Vec<String>>,
12985    ///Property: Registration number
12986    #[serde(skip_serializing_if = "Option::is_none")]
12987    #[cfg_attr(
12988        feature = "builder",
12989        builder(with = |value:impl Into<String>|vec![value.into()])
12990    )]
12991    pub registration_number: Option<Vec<String>>,
12992    ///Property: Retrieved on
12993    #[serde(skip_serializing_if = "Option::is_none")]
12994    #[cfg_attr(
12995        feature = "builder",
12996        builder(with = |value:impl Into<String>|vec![value.into()])
12997    )]
12998    pub retrieved_at: Option<Vec<String>>,
12999    ///Property: Sayari Entity ID
13000    #[serde(skip_serializing_if = "Option::is_none")]
13001    #[cfg_attr(
13002        feature = "builder",
13003        builder(with = |value:impl Into<String>|vec![value.into()])
13004    )]
13005    pub sayari_id: Option<Vec<String>>,
13006    ///Property: Sector
13007    #[serde(skip_serializing_if = "Option::is_none")]
13008    #[cfg_attr(
13009        feature = "builder",
13010        builder(with = |value:impl Into<String>|vec![value.into()])
13011    )]
13012    pub sector: Option<Vec<String>>,
13013    ///Property: Source link
13014    #[serde(skip_serializing_if = "Option::is_none")]
13015    #[cfg_attr(
13016        feature = "builder",
13017        builder(with = |value:impl Into<String>|vec![value.into()])
13018    )]
13019    pub source_url: Option<Vec<String>>,
13020    ///Property: Status
13021    #[serde(skip_serializing_if = "Option::is_none")]
13022    #[cfg_attr(
13023        feature = "builder",
13024        builder(with = |value:impl Into<String>|vec![value.into()])
13025    )]
13026    pub status: Option<Vec<String>>,
13027    ///Property: Summary
13028    #[serde(skip_serializing_if = "Option::is_none")]
13029    #[cfg_attr(
13030        feature = "builder",
13031        builder(with = |value:impl Into<String>|vec![value.into()])
13032    )]
13033    pub summary: Option<Vec<String>>,
13034    ///Property: SWIFT/BIC
13035    #[serde(skip_serializing_if = "Option::is_none")]
13036    #[cfg_attr(
13037        feature = "builder",
13038        builder(with = |value:impl Into<String>|vec![value.into()])
13039    )]
13040    pub swift_bic: Option<Vec<String>>,
13041    ///Property: Tax Number
13042    #[serde(skip_serializing_if = "Option::is_none")]
13043    #[cfg_attr(
13044        feature = "builder",
13045        builder(with = |value:impl Into<String>|vec![value.into()])
13046    )]
13047    pub tax_number: Option<Vec<String>>,
13048    ///Property: Tax status
13049    #[serde(skip_serializing_if = "Option::is_none")]
13050    #[cfg_attr(
13051        feature = "builder",
13052        builder(with = |value:impl Into<String>|vec![value.into()])
13053    )]
13054    pub tax_status: Option<Vec<String>>,
13055    ///Property: Topics
13056    #[serde(skip_serializing_if = "Option::is_none")]
13057    #[cfg_attr(
13058        feature = "builder",
13059        builder(with = |value:impl Into<String>|vec![value.into()])
13060    )]
13061    pub topics: Option<Vec<String>>,
13062    ///Property: Unique Entity ID
13063    #[serde(skip_serializing_if = "Option::is_none")]
13064    #[cfg_attr(
13065        feature = "builder",
13066        builder(with = |value:impl Into<String>|vec![value.into()])
13067    )]
13068    pub unique_entity_id: Option<Vec<String>>,
13069    ///Property: USCC
13070    #[serde(skip_serializing_if = "Option::is_none")]
13071    #[cfg_attr(
13072        feature = "builder",
13073        builder(with = |value:impl Into<String>|vec![value.into()])
13074    )]
13075    pub usc_code: Option<Vec<String>>,
13076    ///Property: V.A.T. Identifier
13077    #[serde(skip_serializing_if = "Option::is_none")]
13078    #[cfg_attr(
13079        feature = "builder",
13080        builder(with = |value:impl Into<String>|vec![value.into()])
13081    )]
13082    pub vat_code: Option<Vec<String>>,
13083    ///Property: Weak alias
13084    #[serde(skip_serializing_if = "Option::is_none")]
13085    #[cfg_attr(
13086        feature = "builder",
13087        builder(with = |value:impl Into<String>|vec![value.into()])
13088    )]
13089    pub weak_alias: Option<Vec<String>>,
13090    ///Property: Website
13091    #[serde(skip_serializing_if = "Option::is_none")]
13092    #[cfg_attr(
13093        feature = "builder",
13094        builder(with = |value:impl Into<String>|vec![value.into()])
13095    )]
13096    pub website: Option<Vec<String>>,
13097    ///Property: Wikidata ID
13098    #[serde(skip_serializing_if = "Option::is_none")]
13099    #[cfg_attr(
13100        feature = "builder",
13101        builder(with = |value:impl Into<String>|vec![value.into()])
13102    )]
13103    pub wikidata_id: Option<Vec<String>>,
13104    ///Property: Wikipedia Article
13105    #[serde(skip_serializing_if = "Option::is_none")]
13106    #[cfg_attr(
13107        feature = "builder",
13108        builder(with = |value:impl Into<String>|vec![value.into()])
13109    )]
13110    pub wikipedia_url: Option<Vec<String>>,
13111}
13112impl Organization {
13113    /// Create a new entity with the given ID
13114    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
13115    pub fn new(id: impl Into<String>) -> Self {
13116        Self {
13117            id: id.into(),
13118            schema: "Organization".to_string(),
13119            abbreviation: None,
13120            address: None,
13121            address_entity: None,
13122            aleph_url: None,
13123            alias: None,
13124            bright_query_id: None,
13125            bright_query_org_id: None,
13126            bvd_id: None,
13127            cage_code: None,
13128            classification: None,
13129            country: None,
13130            created_at: None,
13131            description: None,
13132            dissolution_date: None,
13133            duns_code: None,
13134            email: None,
13135            gii_number: None,
13136            icij_id: None,
13137            id_number: None,
13138            imo_number: None,
13139            incorporation_date: None,
13140            index_text: None,
13141            inn_code: None,
13142            jurisdiction: None,
13143            keywords: None,
13144            legal_form: None,
13145            lei_code: None,
13146            license_number: None,
13147            main_country: None,
13148            modified_at: None,
13149            name: Vec::new(),
13150            notes: None,
13151            npi_code: None,
13152            ogrn_code: None,
13153            okpo_code: None,
13154            opencorporates_url: None,
13155            parent: None,
13156            perm_id: None,
13157            phone: None,
13158            previous_name: None,
13159            program: None,
13160            program_id: None,
13161            proof: None,
13162            publisher: None,
13163            publisher_url: None,
13164            registration_number: None,
13165            retrieved_at: None,
13166            sayari_id: None,
13167            sector: None,
13168            source_url: None,
13169            status: None,
13170            summary: None,
13171            swift_bic: None,
13172            tax_number: None,
13173            tax_status: None,
13174            topics: None,
13175            unique_entity_id: None,
13176            usc_code: None,
13177            vat_code: None,
13178            weak_alias: None,
13179            website: None,
13180            wikidata_id: None,
13181            wikipedia_url: None,
13182        }
13183    }
13184    /// Get the schema name
13185    pub fn schema_name() -> &'static str {
13186        "Organization"
13187    }
13188    /// Serialize to standard FTM nested JSON format
13189    ///
13190    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
13191    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
13192        let mut value = serde_json::to_value(self)?;
13193        if let Some(obj) = value.as_object_mut() {
13194            let id = obj.remove("id");
13195            let schema = obj.remove("schema");
13196            let properties = serde_json::Value::Object(std::mem::take(obj));
13197            if let Some(id) = id {
13198                obj.insert("id".into(), id);
13199            }
13200            if let Some(schema) = schema {
13201                obj.insert("schema".into(), schema);
13202            }
13203            obj.insert("properties".into(), properties);
13204        }
13205        serde_json::to_string(&value)
13206    }
13207}
13208///FTM Schema: Ownership
13209#[derive(Debug, Clone, Serialize, Deserialize)]
13210#[cfg_attr(feature = "builder", derive(Builder))]
13211#[serde(rename_all = "camelCase")]
13212pub struct Ownership {
13213    pub id: String,
13214    #[cfg_attr(feature = "builder", builder(default = "Ownership".to_string()))]
13215    pub schema: String,
13216    ///Property: Aleph URL
13217    #[serde(skip_serializing_if = "Option::is_none")]
13218    #[cfg_attr(
13219        feature = "builder",
13220        builder(with = |value:impl Into<String>|vec![value.into()])
13221    )]
13222    pub aleph_url: Option<Vec<String>>,
13223    ///Property: Asset
13224    #[serde(default)]
13225    #[cfg_attr(
13226        feature = "builder",
13227        builder(with = |value:impl Into<String>|vec![value.into()])
13228    )]
13229    pub asset: Vec<String>,
13230    ///Property: Date
13231    #[serde(skip_serializing_if = "Option::is_none")]
13232    #[cfg_attr(
13233        feature = "builder",
13234        builder(with = |value:impl Into<String>|vec![value.into()])
13235    )]
13236    pub date: Option<Vec<String>>,
13237    ///Property: Description
13238    #[serde(skip_serializing_if = "Option::is_none")]
13239    #[cfg_attr(
13240        feature = "builder",
13241        builder(with = |value:impl Into<String>|vec![value.into()])
13242    )]
13243    pub description: Option<Vec<String>>,
13244    ///Property: End date
13245    #[serde(skip_serializing_if = "Option::is_none")]
13246    #[cfg_attr(
13247        feature = "builder",
13248        builder(with = |value:impl Into<String>|vec![value.into()])
13249    )]
13250    pub end_date: Option<Vec<String>>,
13251    ///Property: Index text
13252    #[serde(skip_serializing_if = "Option::is_none")]
13253    #[cfg_attr(
13254        feature = "builder",
13255        builder(with = |value:impl Into<String>|vec![value.into()])
13256    )]
13257    pub index_text: Option<Vec<String>>,
13258    ///Property: Legal basis
13259    #[serde(skip_serializing_if = "Option::is_none")]
13260    #[cfg_attr(
13261        feature = "builder",
13262        builder(with = |value:impl Into<String>|vec![value.into()])
13263    )]
13264    pub legal_basis: Option<Vec<String>>,
13265    ///Property: Modified on
13266    #[serde(skip_serializing_if = "Option::is_none")]
13267    #[cfg_attr(
13268        feature = "builder",
13269        builder(with = |value:impl Into<String>|vec![value.into()])
13270    )]
13271    pub modified_at: Option<Vec<String>>,
13272    ///Property: Detected names
13273    #[serde(skip_serializing_if = "Option::is_none")]
13274    #[cfg_attr(
13275        feature = "builder",
13276        builder(with = |value:impl Into<String>|vec![value.into()])
13277    )]
13278    pub names_mentioned: Option<Vec<String>>,
13279    ///Property: Owner
13280    #[serde(default)]
13281    #[cfg_attr(
13282        feature = "builder",
13283        builder(with = |value:impl Into<String>|vec![value.into()])
13284    )]
13285    pub owner: Vec<String>,
13286    ///Property: Type of ownership
13287    #[serde(skip_serializing_if = "Option::is_none")]
13288    #[cfg_attr(
13289        feature = "builder",
13290        builder(with = |value:impl Into<String>|vec![value.into()])
13291    )]
13292    pub ownership_type: Option<Vec<String>>,
13293    ///Property: Percentage held
13294    #[serde(skip_serializing_if = "Option::is_none")]
13295    #[cfg_attr(
13296        feature = "builder",
13297        builder(with = |value:impl Into<String>|vec![value.into()])
13298    )]
13299    pub percentage: Option<Vec<String>>,
13300    ///Property: Source document
13301    #[serde(skip_serializing_if = "Option::is_none")]
13302    #[cfg_attr(
13303        feature = "builder",
13304        builder(with = |value:impl Into<String>|vec![value.into()])
13305    )]
13306    pub proof: Option<Vec<String>>,
13307    ///Property: Publishing source
13308    #[serde(skip_serializing_if = "Option::is_none")]
13309    #[cfg_attr(
13310        feature = "builder",
13311        builder(with = |value:impl Into<String>|vec![value.into()])
13312    )]
13313    pub publisher: Option<Vec<String>>,
13314    ///Property: Publishing source URL
13315    #[serde(skip_serializing_if = "Option::is_none")]
13316    #[cfg_attr(
13317        feature = "builder",
13318        builder(with = |value:impl Into<String>|vec![value.into()])
13319    )]
13320    pub publisher_url: Option<Vec<String>>,
13321    ///Property: Record ID
13322    #[serde(skip_serializing_if = "Option::is_none")]
13323    #[cfg_attr(
13324        feature = "builder",
13325        builder(with = |value:impl Into<String>|vec![value.into()])
13326    )]
13327    pub record_id: Option<Vec<String>>,
13328    ///Property: Retrieved on
13329    #[serde(skip_serializing_if = "Option::is_none")]
13330    #[cfg_attr(
13331        feature = "builder",
13332        builder(with = |value:impl Into<String>|vec![value.into()])
13333    )]
13334    pub retrieved_at: Option<Vec<String>>,
13335    ///Property: Role
13336    #[serde(skip_serializing_if = "Option::is_none")]
13337    #[cfg_attr(
13338        feature = "builder",
13339        builder(with = |value:impl Into<String>|vec![value.into()])
13340    )]
13341    pub role: Option<Vec<String>>,
13342    ///Property: Number of shares
13343    #[serde(skip_serializing_if = "Option::is_none")]
13344    #[cfg_attr(
13345        feature = "builder",
13346        builder(with = |value:impl Into<String>|vec![value.into()])
13347    )]
13348    pub shares_count: Option<Vec<String>>,
13349    ///Property: Currency of shares
13350    #[serde(skip_serializing_if = "Option::is_none")]
13351    #[cfg_attr(
13352        feature = "builder",
13353        builder(with = |value:impl Into<String>|vec![value.into()])
13354    )]
13355    pub shares_currency: Option<Vec<String>>,
13356    ///Property: Type of shares
13357    #[serde(skip_serializing_if = "Option::is_none")]
13358    #[cfg_attr(
13359        feature = "builder",
13360        builder(with = |value:impl Into<String>|vec![value.into()])
13361    )]
13362    pub shares_type: Option<Vec<String>>,
13363    ///Property: Value of shares
13364    #[serde(skip_serializing_if = "Option::is_none")]
13365    #[cfg_attr(
13366        feature = "builder",
13367        builder(with = |value:impl Into<String>|vec![value.into()])
13368    )]
13369    pub shares_value: Option<Vec<String>>,
13370    ///Property: Source link
13371    #[serde(skip_serializing_if = "Option::is_none")]
13372    #[cfg_attr(
13373        feature = "builder",
13374        builder(with = |value:impl Into<String>|vec![value.into()])
13375    )]
13376    pub source_url: Option<Vec<String>>,
13377    ///Property: Start date
13378    #[serde(skip_serializing_if = "Option::is_none")]
13379    #[cfg_attr(
13380        feature = "builder",
13381        builder(with = |value:impl Into<String>|vec![value.into()])
13382    )]
13383    pub start_date: Option<Vec<String>>,
13384    ///Property: Status
13385    #[serde(skip_serializing_if = "Option::is_none")]
13386    #[cfg_attr(
13387        feature = "builder",
13388        builder(with = |value:impl Into<String>|vec![value.into()])
13389    )]
13390    pub status: Option<Vec<String>>,
13391    ///Property: Summary
13392    #[serde(skip_serializing_if = "Option::is_none")]
13393    #[cfg_attr(
13394        feature = "builder",
13395        builder(with = |value:impl Into<String>|vec![value.into()])
13396    )]
13397    pub summary: Option<Vec<String>>,
13398}
13399impl Ownership {
13400    /// Create a new entity with the given ID
13401    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
13402    pub fn new(id: impl Into<String>) -> Self {
13403        Self {
13404            id: id.into(),
13405            schema: "Ownership".to_string(),
13406            aleph_url: None,
13407            asset: Vec::new(),
13408            date: None,
13409            description: None,
13410            end_date: None,
13411            index_text: None,
13412            legal_basis: None,
13413            modified_at: None,
13414            names_mentioned: None,
13415            owner: Vec::new(),
13416            ownership_type: None,
13417            percentage: None,
13418            proof: None,
13419            publisher: None,
13420            publisher_url: None,
13421            record_id: None,
13422            retrieved_at: None,
13423            role: None,
13424            shares_count: None,
13425            shares_currency: None,
13426            shares_type: None,
13427            shares_value: None,
13428            source_url: None,
13429            start_date: None,
13430            status: None,
13431            summary: None,
13432        }
13433    }
13434    /// Get the schema name
13435    pub fn schema_name() -> &'static str {
13436        "Ownership"
13437    }
13438    /// Serialize to standard FTM nested JSON format
13439    ///
13440    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
13441    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
13442        let mut value = serde_json::to_value(self)?;
13443        if let Some(obj) = value.as_object_mut() {
13444            let id = obj.remove("id");
13445            let schema = obj.remove("schema");
13446            let properties = serde_json::Value::Object(std::mem::take(obj));
13447            if let Some(id) = id {
13448                obj.insert("id".into(), id);
13449            }
13450            if let Some(schema) = schema {
13451                obj.insert("schema".into(), schema);
13452            }
13453            obj.insert("properties".into(), properties);
13454        }
13455        serde_json::to_string(&value)
13456    }
13457}
13458///FTM Schema: Package
13459#[derive(Debug, Clone, Serialize, Deserialize)]
13460#[cfg_attr(feature = "builder", derive(Builder))]
13461#[serde(rename_all = "camelCase")]
13462pub struct Package {
13463    pub id: String,
13464    #[cfg_attr(feature = "builder", builder(default = "Package".to_string()))]
13465    pub schema: String,
13466    ///Property: Address
13467    #[serde(skip_serializing_if = "Option::is_none")]
13468    #[cfg_attr(
13469        feature = "builder",
13470        builder(with = |value:impl Into<String>|vec![value.into()])
13471    )]
13472    pub address: Option<Vec<String>>,
13473    ///Property: Address
13474    #[serde(skip_serializing_if = "Option::is_none")]
13475    #[cfg_attr(
13476        feature = "builder",
13477        builder(with = |value:impl Into<String>|vec![value.into()])
13478    )]
13479    pub address_entity: Option<Vec<String>>,
13480    ///Property: Aleph URL
13481    #[serde(skip_serializing_if = "Option::is_none")]
13482    #[cfg_attr(
13483        feature = "builder",
13484        builder(with = |value:impl Into<String>|vec![value.into()])
13485    )]
13486    pub aleph_url: Option<Vec<String>>,
13487    ///Property: Alias
13488    #[serde(skip_serializing_if = "Option::is_none")]
13489    #[cfg_attr(
13490        feature = "builder",
13491        builder(with = |value:impl Into<String>|vec![value.into()])
13492    )]
13493    pub alias: Option<Vec<String>>,
13494    ///Property: Ancestors
13495    #[serde(skip_serializing_if = "Option::is_none")]
13496    #[cfg_attr(
13497        feature = "builder",
13498        builder(with = |value:impl Into<String>|vec![value.into()])
13499    )]
13500    pub ancestors: Option<Vec<String>>,
13501    ///Property: Author
13502    #[serde(skip_serializing_if = "Option::is_none")]
13503    #[cfg_attr(
13504        feature = "builder",
13505        builder(with = |value:impl Into<String>|vec![value.into()])
13506    )]
13507    pub author: Option<Vec<String>>,
13508    ///Property: Authored on
13509    #[serde(skip_serializing_if = "Option::is_none")]
13510    #[cfg_attr(
13511        feature = "builder",
13512        builder(with = |value:impl Into<String>|vec![value.into()])
13513    )]
13514    pub authored_at: Option<Vec<String>>,
13515    ///Property: Text
13516    #[serde(skip_serializing_if = "Option::is_none")]
13517    #[cfg_attr(
13518        feature = "builder",
13519        builder(with = |value:impl Into<String>|vec![value.into()])
13520    )]
13521    pub body_text: Option<Vec<String>>,
13522    ///Property: Detected companies
13523    #[serde(skip_serializing_if = "Option::is_none")]
13524    #[cfg_attr(
13525        feature = "builder",
13526        builder(with = |value:impl Into<String>|vec![value.into()])
13527    )]
13528    pub companies_mentioned: Option<Vec<String>>,
13529    ///Property: Checksum
13530    #[serde(skip_serializing_if = "Option::is_none")]
13531    #[cfg_attr(
13532        feature = "builder",
13533        builder(with = |value:impl Into<String>|vec![value.into()])
13534    )]
13535    pub content_hash: Option<Vec<String>>,
13536    ///Property: Country
13537    #[serde(skip_serializing_if = "Option::is_none")]
13538    #[cfg_attr(
13539        feature = "builder",
13540        builder(with = |value:impl Into<String>|vec![value.into()])
13541    )]
13542    pub country: Option<Vec<String>>,
13543    ///Property: Crawler
13544    #[serde(skip_serializing_if = "Option::is_none")]
13545    #[cfg_attr(
13546        feature = "builder",
13547        builder(with = |value:impl Into<String>|vec![value.into()])
13548    )]
13549    pub crawler: Option<Vec<String>>,
13550    ///Property: Created at
13551    #[serde(skip_serializing_if = "Option::is_none")]
13552    #[cfg_attr(
13553        feature = "builder",
13554        builder(with = |value:impl Into<String>|vec![value.into()])
13555    )]
13556    pub created_at: Option<Vec<String>>,
13557    ///Property: Date
13558    #[serde(skip_serializing_if = "Option::is_none")]
13559    #[cfg_attr(
13560        feature = "builder",
13561        builder(with = |value:impl Into<String>|vec![value.into()])
13562    )]
13563    pub date: Option<Vec<String>>,
13564    ///Property: Description
13565    #[serde(skip_serializing_if = "Option::is_none")]
13566    #[cfg_attr(
13567        feature = "builder",
13568        builder(with = |value:impl Into<String>|vec![value.into()])
13569    )]
13570    pub description: Option<Vec<String>>,
13571    ///Property: Detected country
13572    #[serde(skip_serializing_if = "Option::is_none")]
13573    #[cfg_attr(
13574        feature = "builder",
13575        builder(with = |value:impl Into<String>|vec![value.into()])
13576    )]
13577    pub detected_country: Option<Vec<String>>,
13578    ///Property: Detected language
13579    #[serde(skip_serializing_if = "Option::is_none")]
13580    #[cfg_attr(
13581        feature = "builder",
13582        builder(with = |value:impl Into<String>|vec![value.into()])
13583    )]
13584    pub detected_language: Option<Vec<String>>,
13585    ///Property: Detected e-mail addresses
13586    #[serde(skip_serializing_if = "Option::is_none")]
13587    #[cfg_attr(
13588        feature = "builder",
13589        builder(with = |value:impl Into<String>|vec![value.into()])
13590    )]
13591    pub email_mentioned: Option<Vec<String>>,
13592    ///Property: File encoding
13593    #[serde(skip_serializing_if = "Option::is_none")]
13594    #[cfg_attr(
13595        feature = "builder",
13596        builder(with = |value:impl Into<String>|vec![value.into()])
13597    )]
13598    pub encoding: Option<Vec<String>>,
13599    ///Property: File extension
13600    #[serde(skip_serializing_if = "Option::is_none")]
13601    #[cfg_attr(
13602        feature = "builder",
13603        builder(with = |value:impl Into<String>|vec![value.into()])
13604    )]
13605    pub extension: Option<Vec<String>>,
13606    ///Property: File name
13607    #[serde(default)]
13608    #[cfg_attr(
13609        feature = "builder",
13610        builder(with = |value:impl Into<String>|vec![value.into()])
13611    )]
13612    pub file_name: Vec<String>,
13613    ///Property: File size
13614    #[serde(
13615        skip_serializing_if = "Option::is_none",
13616        deserialize_with = "deserialize_opt_f64_vec",
13617        default
13618    )]
13619    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
13620    pub file_size: Option<Vec<f64>>,
13621    ///Property: Generator
13622    #[serde(skip_serializing_if = "Option::is_none")]
13623    #[cfg_attr(
13624        feature = "builder",
13625        builder(with = |value:impl Into<String>|vec![value.into()])
13626    )]
13627    pub generator: Option<Vec<String>>,
13628    ///Property: Detected IBANs
13629    #[serde(skip_serializing_if = "Option::is_none")]
13630    #[cfg_attr(
13631        feature = "builder",
13632        builder(with = |value:impl Into<String>|vec![value.into()])
13633    )]
13634    pub iban_mentioned: Option<Vec<String>>,
13635    ///Property: Index text
13636    #[serde(skip_serializing_if = "Option::is_none")]
13637    #[cfg_attr(
13638        feature = "builder",
13639        builder(with = |value:impl Into<String>|vec![value.into()])
13640    )]
13641    pub index_text: Option<Vec<String>>,
13642    ///Property: Detected IP addresses
13643    #[serde(skip_serializing_if = "Option::is_none")]
13644    #[cfg_attr(
13645        feature = "builder",
13646        builder(with = |value:impl Into<String>|vec![value.into()])
13647    )]
13648    pub ip_mentioned: Option<Vec<String>>,
13649    ///Property: Keywords
13650    #[serde(skip_serializing_if = "Option::is_none")]
13651    #[cfg_attr(
13652        feature = "builder",
13653        builder(with = |value:impl Into<String>|vec![value.into()])
13654    )]
13655    pub keywords: Option<Vec<String>>,
13656    ///Property: Language
13657    #[serde(skip_serializing_if = "Option::is_none")]
13658    #[cfg_attr(
13659        feature = "builder",
13660        builder(with = |value:impl Into<String>|vec![value.into()])
13661    )]
13662    pub language: Option<Vec<String>>,
13663    ///Property: Detected locations
13664    #[serde(skip_serializing_if = "Option::is_none")]
13665    #[cfg_attr(
13666        feature = "builder",
13667        builder(with = |value:impl Into<String>|vec![value.into()])
13668    )]
13669    pub location_mentioned: Option<Vec<String>>,
13670    ///Property: Message ID
13671    #[serde(skip_serializing_if = "Option::is_none")]
13672    #[cfg_attr(
13673        feature = "builder",
13674        builder(with = |value:impl Into<String>|vec![value.into()])
13675    )]
13676    pub message_id: Option<Vec<String>>,
13677    ///Property: MIME type
13678    #[serde(skip_serializing_if = "Option::is_none")]
13679    #[cfg_attr(
13680        feature = "builder",
13681        builder(with = |value:impl Into<String>|vec![value.into()])
13682    )]
13683    pub mime_type: Option<Vec<String>>,
13684    ///Property: Modified on
13685    #[serde(skip_serializing_if = "Option::is_none")]
13686    #[cfg_attr(
13687        feature = "builder",
13688        builder(with = |value:impl Into<String>|vec![value.into()])
13689    )]
13690    pub modified_at: Option<Vec<String>>,
13691    ///Property: Name
13692    #[serde(default)]
13693    #[cfg_attr(
13694        feature = "builder",
13695        builder(with = |value:impl Into<String>|vec![value.into()])
13696    )]
13697    pub name: Vec<String>,
13698    ///Property: Detected names
13699    #[serde(skip_serializing_if = "Option::is_none")]
13700    #[cfg_attr(
13701        feature = "builder",
13702        builder(with = |value:impl Into<String>|vec![value.into()])
13703    )]
13704    pub names_mentioned: Option<Vec<String>>,
13705    ///Property: Notes
13706    #[serde(skip_serializing_if = "Option::is_none")]
13707    #[cfg_attr(
13708        feature = "builder",
13709        builder(with = |value:impl Into<String>|vec![value.into()])
13710    )]
13711    pub notes: Option<Vec<String>>,
13712    ///Property: Folder
13713    #[serde(skip_serializing_if = "Option::is_none")]
13714    #[cfg_attr(
13715        feature = "builder",
13716        builder(with = |value:impl Into<String>|vec![value.into()])
13717    )]
13718    pub parent: Option<Vec<String>>,
13719    ///Property: Detected people
13720    #[serde(skip_serializing_if = "Option::is_none")]
13721    #[cfg_attr(
13722        feature = "builder",
13723        builder(with = |value:impl Into<String>|vec![value.into()])
13724    )]
13725    pub people_mentioned: Option<Vec<String>>,
13726    ///Property: Detected phones
13727    #[serde(skip_serializing_if = "Option::is_none")]
13728    #[cfg_attr(
13729        feature = "builder",
13730        builder(with = |value:impl Into<String>|vec![value.into()])
13731    )]
13732    pub phone_mentioned: Option<Vec<String>>,
13733    ///Property: Previous name
13734    #[serde(skip_serializing_if = "Option::is_none")]
13735    #[cfg_attr(
13736        feature = "builder",
13737        builder(with = |value:impl Into<String>|vec![value.into()])
13738    )]
13739    pub previous_name: Option<Vec<String>>,
13740    ///Property: Processed at
13741    #[serde(skip_serializing_if = "Option::is_none")]
13742    #[cfg_attr(
13743        feature = "builder",
13744        builder(with = |value:impl Into<String>|vec![value.into()])
13745    )]
13746    pub processed_at: Option<Vec<String>>,
13747    ///Property: Processing agent
13748    #[serde(skip_serializing_if = "Option::is_none")]
13749    #[cfg_attr(
13750        feature = "builder",
13751        builder(with = |value:impl Into<String>|vec![value.into()])
13752    )]
13753    pub processing_agent: Option<Vec<String>>,
13754    ///Property: Processing error
13755    #[serde(skip_serializing_if = "Option::is_none")]
13756    #[cfg_attr(
13757        feature = "builder",
13758        builder(with = |value:impl Into<String>|vec![value.into()])
13759    )]
13760    pub processing_error: Option<Vec<String>>,
13761    ///Property: Processing status
13762    #[serde(skip_serializing_if = "Option::is_none")]
13763    #[cfg_attr(
13764        feature = "builder",
13765        builder(with = |value:impl Into<String>|vec![value.into()])
13766    )]
13767    pub processing_status: Option<Vec<String>>,
13768    ///Property: Program
13769    #[serde(skip_serializing_if = "Option::is_none")]
13770    #[cfg_attr(
13771        feature = "builder",
13772        builder(with = |value:impl Into<String>|vec![value.into()])
13773    )]
13774    pub program: Option<Vec<String>>,
13775    ///Property: Program ID
13776    #[serde(skip_serializing_if = "Option::is_none")]
13777    #[cfg_attr(
13778        feature = "builder",
13779        builder(with = |value:impl Into<String>|vec![value.into()])
13780    )]
13781    pub program_id: Option<Vec<String>>,
13782    ///Property: Source document
13783    #[serde(skip_serializing_if = "Option::is_none")]
13784    #[cfg_attr(
13785        feature = "builder",
13786        builder(with = |value:impl Into<String>|vec![value.into()])
13787    )]
13788    pub proof: Option<Vec<String>>,
13789    ///Property: Published on
13790    #[serde(skip_serializing_if = "Option::is_none")]
13791    #[cfg_attr(
13792        feature = "builder",
13793        builder(with = |value:impl Into<String>|vec![value.into()])
13794    )]
13795    pub published_at: Option<Vec<String>>,
13796    ///Property: Publishing source
13797    #[serde(skip_serializing_if = "Option::is_none")]
13798    #[cfg_attr(
13799        feature = "builder",
13800        builder(with = |value:impl Into<String>|vec![value.into()])
13801    )]
13802    pub publisher: Option<Vec<String>>,
13803    ///Property: Publishing source URL
13804    #[serde(skip_serializing_if = "Option::is_none")]
13805    #[cfg_attr(
13806        feature = "builder",
13807        builder(with = |value:impl Into<String>|vec![value.into()])
13808    )]
13809    pub publisher_url: Option<Vec<String>>,
13810    ///Property: Retrieved on
13811    #[serde(skip_serializing_if = "Option::is_none")]
13812    #[cfg_attr(
13813        feature = "builder",
13814        builder(with = |value:impl Into<String>|vec![value.into()])
13815    )]
13816    pub retrieved_at: Option<Vec<String>>,
13817    ///Property: Source link
13818    #[serde(skip_serializing_if = "Option::is_none")]
13819    #[cfg_attr(
13820        feature = "builder",
13821        builder(with = |value:impl Into<String>|vec![value.into()])
13822    )]
13823    pub source_url: Option<Vec<String>>,
13824    ///Property: Summary
13825    #[serde(skip_serializing_if = "Option::is_none")]
13826    #[cfg_attr(
13827        feature = "builder",
13828        builder(with = |value:impl Into<String>|vec![value.into()])
13829    )]
13830    pub summary: Option<Vec<String>>,
13831    ///Property: Title
13832    #[serde(skip_serializing_if = "Option::is_none")]
13833    #[cfg_attr(
13834        feature = "builder",
13835        builder(with = |value:impl Into<String>|vec![value.into()])
13836    )]
13837    pub title: Option<Vec<String>>,
13838    ///Property: Topics
13839    #[serde(skip_serializing_if = "Option::is_none")]
13840    #[cfg_attr(
13841        feature = "builder",
13842        builder(with = |value:impl Into<String>|vec![value.into()])
13843    )]
13844    pub topics: Option<Vec<String>>,
13845    ///Property: The language of the translated text
13846    #[serde(skip_serializing_if = "Option::is_none")]
13847    #[cfg_attr(
13848        feature = "builder",
13849        builder(with = |value:impl Into<String>|vec![value.into()])
13850    )]
13851    pub translated_language: Option<Vec<String>>,
13852    ///Property: Translated version of the body text
13853    #[serde(skip_serializing_if = "Option::is_none")]
13854    #[cfg_attr(
13855        feature = "builder",
13856        builder(with = |value:impl Into<String>|vec![value.into()])
13857    )]
13858    pub translated_text: Option<Vec<String>>,
13859    ///Property: Weak alias
13860    #[serde(skip_serializing_if = "Option::is_none")]
13861    #[cfg_attr(
13862        feature = "builder",
13863        builder(with = |value:impl Into<String>|vec![value.into()])
13864    )]
13865    pub weak_alias: Option<Vec<String>>,
13866    ///Property: Wikidata ID
13867    #[serde(skip_serializing_if = "Option::is_none")]
13868    #[cfg_attr(
13869        feature = "builder",
13870        builder(with = |value:impl Into<String>|vec![value.into()])
13871    )]
13872    pub wikidata_id: Option<Vec<String>>,
13873    ///Property: Wikipedia Article
13874    #[serde(skip_serializing_if = "Option::is_none")]
13875    #[cfg_attr(
13876        feature = "builder",
13877        builder(with = |value:impl Into<String>|vec![value.into()])
13878    )]
13879    pub wikipedia_url: Option<Vec<String>>,
13880}
13881impl Package {
13882    /// Create a new entity with the given ID
13883    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
13884    pub fn new(id: impl Into<String>) -> Self {
13885        Self {
13886            id: id.into(),
13887            schema: "Package".to_string(),
13888            address: None,
13889            address_entity: None,
13890            aleph_url: None,
13891            alias: None,
13892            ancestors: None,
13893            author: None,
13894            authored_at: None,
13895            body_text: None,
13896            companies_mentioned: None,
13897            content_hash: None,
13898            country: None,
13899            crawler: None,
13900            created_at: None,
13901            date: None,
13902            description: None,
13903            detected_country: None,
13904            detected_language: None,
13905            email_mentioned: None,
13906            encoding: None,
13907            extension: None,
13908            file_name: Vec::new(),
13909            file_size: None,
13910            generator: None,
13911            iban_mentioned: None,
13912            index_text: None,
13913            ip_mentioned: None,
13914            keywords: None,
13915            language: None,
13916            location_mentioned: None,
13917            message_id: None,
13918            mime_type: None,
13919            modified_at: None,
13920            name: Vec::new(),
13921            names_mentioned: None,
13922            notes: None,
13923            parent: None,
13924            people_mentioned: None,
13925            phone_mentioned: None,
13926            previous_name: None,
13927            processed_at: None,
13928            processing_agent: None,
13929            processing_error: None,
13930            processing_status: None,
13931            program: None,
13932            program_id: None,
13933            proof: None,
13934            published_at: None,
13935            publisher: None,
13936            publisher_url: None,
13937            retrieved_at: None,
13938            source_url: None,
13939            summary: None,
13940            title: None,
13941            topics: None,
13942            translated_language: None,
13943            translated_text: None,
13944            weak_alias: None,
13945            wikidata_id: None,
13946            wikipedia_url: None,
13947        }
13948    }
13949    /// Get the schema name
13950    pub fn schema_name() -> &'static str {
13951        "Package"
13952    }
13953    /// Serialize to standard FTM nested JSON format
13954    ///
13955    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
13956    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
13957        let mut value = serde_json::to_value(self)?;
13958        if let Some(obj) = value.as_object_mut() {
13959            let id = obj.remove("id");
13960            let schema = obj.remove("schema");
13961            let properties = serde_json::Value::Object(std::mem::take(obj));
13962            if let Some(id) = id {
13963                obj.insert("id".into(), id);
13964            }
13965            if let Some(schema) = schema {
13966                obj.insert("schema".into(), schema);
13967            }
13968            obj.insert("properties".into(), properties);
13969        }
13970        serde_json::to_string(&value)
13971    }
13972}
13973///FTM Schema: Page
13974#[derive(Debug, Clone, Serialize, Deserialize)]
13975#[cfg_attr(feature = "builder", derive(Builder))]
13976#[serde(rename_all = "camelCase")]
13977pub struct Page {
13978    pub id: String,
13979    #[cfg_attr(feature = "builder", builder(default = "Page".to_string()))]
13980    pub schema: String,
13981    ///Property: Text
13982    #[serde(skip_serializing_if = "Option::is_none")]
13983    #[cfg_attr(
13984        feature = "builder",
13985        builder(with = |value:impl Into<String>|vec![value.into()])
13986    )]
13987    pub body_text: Option<Vec<String>>,
13988    ///Property: Detected language
13989    #[serde(skip_serializing_if = "Option::is_none")]
13990    #[cfg_attr(
13991        feature = "builder",
13992        builder(with = |value:impl Into<String>|vec![value.into()])
13993    )]
13994    pub detected_language: Option<Vec<String>>,
13995    ///Property: Document
13996    #[serde(skip_serializing_if = "Option::is_none")]
13997    #[cfg_attr(
13998        feature = "builder",
13999        builder(with = |value:impl Into<String>|vec![value.into()])
14000    )]
14001    pub document: Option<Vec<String>>,
14002    ///Property: Index
14003    #[serde(
14004        skip_serializing_if = "Option::is_none",
14005        deserialize_with = "deserialize_opt_f64_vec",
14006        default
14007    )]
14008    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
14009    pub index: Option<Vec<f64>>,
14010    ///Property: Index text
14011    #[serde(skip_serializing_if = "Option::is_none")]
14012    #[cfg_attr(
14013        feature = "builder",
14014        builder(with = |value:impl Into<String>|vec![value.into()])
14015    )]
14016    pub index_text: Option<Vec<String>>,
14017    ///Property: Translated version of the body text
14018    #[serde(skip_serializing_if = "Option::is_none")]
14019    #[cfg_attr(
14020        feature = "builder",
14021        builder(with = |value:impl Into<String>|vec![value.into()])
14022    )]
14023    pub translated_text: Option<Vec<String>>,
14024    ///Property: The language of the translated text
14025    #[serde(skip_serializing_if = "Option::is_none")]
14026    #[cfg_attr(
14027        feature = "builder",
14028        builder(with = |value:impl Into<String>|vec![value.into()])
14029    )]
14030    pub translated_text_language: Option<Vec<String>>,
14031}
14032impl Page {
14033    /// Create a new entity with the given ID
14034    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
14035    pub fn new(id: impl Into<String>) -> Self {
14036        Self {
14037            id: id.into(),
14038            schema: "Page".to_string(),
14039            body_text: None,
14040            detected_language: None,
14041            document: None,
14042            index: None,
14043            index_text: None,
14044            translated_text: None,
14045            translated_text_language: None,
14046        }
14047    }
14048    /// Get the schema name
14049    pub fn schema_name() -> &'static str {
14050        "Page"
14051    }
14052    /// Serialize to standard FTM nested JSON format
14053    ///
14054    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
14055    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
14056        let mut value = serde_json::to_value(self)?;
14057        if let Some(obj) = value.as_object_mut() {
14058            let id = obj.remove("id");
14059            let schema = obj.remove("schema");
14060            let properties = serde_json::Value::Object(std::mem::take(obj));
14061            if let Some(id) = id {
14062                obj.insert("id".into(), id);
14063            }
14064            if let Some(schema) = schema {
14065                obj.insert("schema".into(), schema);
14066            }
14067            obj.insert("properties".into(), properties);
14068        }
14069        serde_json::to_string(&value)
14070    }
14071}
14072///FTM Schema: Document
14073#[derive(Debug, Clone, Serialize, Deserialize)]
14074#[cfg_attr(feature = "builder", derive(Builder))]
14075#[serde(rename_all = "camelCase")]
14076pub struct Pages {
14077    pub id: String,
14078    #[cfg_attr(feature = "builder", builder(default = "Pages".to_string()))]
14079    pub schema: String,
14080    ///Property: Address
14081    #[serde(skip_serializing_if = "Option::is_none")]
14082    #[cfg_attr(
14083        feature = "builder",
14084        builder(with = |value:impl Into<String>|vec![value.into()])
14085    )]
14086    pub address: Option<Vec<String>>,
14087    ///Property: Address
14088    #[serde(skip_serializing_if = "Option::is_none")]
14089    #[cfg_attr(
14090        feature = "builder",
14091        builder(with = |value:impl Into<String>|vec![value.into()])
14092    )]
14093    pub address_entity: Option<Vec<String>>,
14094    ///Property: Aleph URL
14095    #[serde(skip_serializing_if = "Option::is_none")]
14096    #[cfg_attr(
14097        feature = "builder",
14098        builder(with = |value:impl Into<String>|vec![value.into()])
14099    )]
14100    pub aleph_url: Option<Vec<String>>,
14101    ///Property: Alias
14102    #[serde(skip_serializing_if = "Option::is_none")]
14103    #[cfg_attr(
14104        feature = "builder",
14105        builder(with = |value:impl Into<String>|vec![value.into()])
14106    )]
14107    pub alias: Option<Vec<String>>,
14108    ///Property: Ancestors
14109    #[serde(skip_serializing_if = "Option::is_none")]
14110    #[cfg_attr(
14111        feature = "builder",
14112        builder(with = |value:impl Into<String>|vec![value.into()])
14113    )]
14114    pub ancestors: Option<Vec<String>>,
14115    ///Property: Author
14116    #[serde(skip_serializing_if = "Option::is_none")]
14117    #[cfg_attr(
14118        feature = "builder",
14119        builder(with = |value:impl Into<String>|vec![value.into()])
14120    )]
14121    pub author: Option<Vec<String>>,
14122    ///Property: Authored on
14123    #[serde(skip_serializing_if = "Option::is_none")]
14124    #[cfg_attr(
14125        feature = "builder",
14126        builder(with = |value:impl Into<String>|vec![value.into()])
14127    )]
14128    pub authored_at: Option<Vec<String>>,
14129    ///Property: Text
14130    #[serde(skip_serializing_if = "Option::is_none")]
14131    #[cfg_attr(
14132        feature = "builder",
14133        builder(with = |value:impl Into<String>|vec![value.into()])
14134    )]
14135    pub body_text: Option<Vec<String>>,
14136    ///Property: Detected companies
14137    #[serde(skip_serializing_if = "Option::is_none")]
14138    #[cfg_attr(
14139        feature = "builder",
14140        builder(with = |value:impl Into<String>|vec![value.into()])
14141    )]
14142    pub companies_mentioned: Option<Vec<String>>,
14143    ///Property: Checksum
14144    #[serde(skip_serializing_if = "Option::is_none")]
14145    #[cfg_attr(
14146        feature = "builder",
14147        builder(with = |value:impl Into<String>|vec![value.into()])
14148    )]
14149    pub content_hash: Option<Vec<String>>,
14150    ///Property: Country
14151    #[serde(skip_serializing_if = "Option::is_none")]
14152    #[cfg_attr(
14153        feature = "builder",
14154        builder(with = |value:impl Into<String>|vec![value.into()])
14155    )]
14156    pub country: Option<Vec<String>>,
14157    ///Property: Crawler
14158    #[serde(skip_serializing_if = "Option::is_none")]
14159    #[cfg_attr(
14160        feature = "builder",
14161        builder(with = |value:impl Into<String>|vec![value.into()])
14162    )]
14163    pub crawler: Option<Vec<String>>,
14164    ///Property: Created at
14165    #[serde(skip_serializing_if = "Option::is_none")]
14166    #[cfg_attr(
14167        feature = "builder",
14168        builder(with = |value:impl Into<String>|vec![value.into()])
14169    )]
14170    pub created_at: Option<Vec<String>>,
14171    ///Property: Date
14172    #[serde(skip_serializing_if = "Option::is_none")]
14173    #[cfg_attr(
14174        feature = "builder",
14175        builder(with = |value:impl Into<String>|vec![value.into()])
14176    )]
14177    pub date: Option<Vec<String>>,
14178    ///Property: Description
14179    #[serde(skip_serializing_if = "Option::is_none")]
14180    #[cfg_attr(
14181        feature = "builder",
14182        builder(with = |value:impl Into<String>|vec![value.into()])
14183    )]
14184    pub description: Option<Vec<String>>,
14185    ///Property: Detected country
14186    #[serde(skip_serializing_if = "Option::is_none")]
14187    #[cfg_attr(
14188        feature = "builder",
14189        builder(with = |value:impl Into<String>|vec![value.into()])
14190    )]
14191    pub detected_country: Option<Vec<String>>,
14192    ///Property: Detected language
14193    #[serde(skip_serializing_if = "Option::is_none")]
14194    #[cfg_attr(
14195        feature = "builder",
14196        builder(with = |value:impl Into<String>|vec![value.into()])
14197    )]
14198    pub detected_language: Option<Vec<String>>,
14199    ///Property: Detected e-mail addresses
14200    #[serde(skip_serializing_if = "Option::is_none")]
14201    #[cfg_attr(
14202        feature = "builder",
14203        builder(with = |value:impl Into<String>|vec![value.into()])
14204    )]
14205    pub email_mentioned: Option<Vec<String>>,
14206    ///Property: File encoding
14207    #[serde(skip_serializing_if = "Option::is_none")]
14208    #[cfg_attr(
14209        feature = "builder",
14210        builder(with = |value:impl Into<String>|vec![value.into()])
14211    )]
14212    pub encoding: Option<Vec<String>>,
14213    ///Property: File extension
14214    #[serde(skip_serializing_if = "Option::is_none")]
14215    #[cfg_attr(
14216        feature = "builder",
14217        builder(with = |value:impl Into<String>|vec![value.into()])
14218    )]
14219    pub extension: Option<Vec<String>>,
14220    ///Property: File name
14221    #[serde(default)]
14222    #[cfg_attr(
14223        feature = "builder",
14224        builder(with = |value:impl Into<String>|vec![value.into()])
14225    )]
14226    pub file_name: Vec<String>,
14227    ///Property: File size
14228    #[serde(
14229        skip_serializing_if = "Option::is_none",
14230        deserialize_with = "deserialize_opt_f64_vec",
14231        default
14232    )]
14233    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
14234    pub file_size: Option<Vec<f64>>,
14235    ///Property: Generator
14236    #[serde(skip_serializing_if = "Option::is_none")]
14237    #[cfg_attr(
14238        feature = "builder",
14239        builder(with = |value:impl Into<String>|vec![value.into()])
14240    )]
14241    pub generator: Option<Vec<String>>,
14242    ///Property: Detected IBANs
14243    #[serde(skip_serializing_if = "Option::is_none")]
14244    #[cfg_attr(
14245        feature = "builder",
14246        builder(with = |value:impl Into<String>|vec![value.into()])
14247    )]
14248    pub iban_mentioned: Option<Vec<String>>,
14249    ///Property: Index text
14250    #[serde(skip_serializing_if = "Option::is_none")]
14251    #[cfg_attr(
14252        feature = "builder",
14253        builder(with = |value:impl Into<String>|vec![value.into()])
14254    )]
14255    pub index_text: Option<Vec<String>>,
14256    ///Property: Detected IP addresses
14257    #[serde(skip_serializing_if = "Option::is_none")]
14258    #[cfg_attr(
14259        feature = "builder",
14260        builder(with = |value:impl Into<String>|vec![value.into()])
14261    )]
14262    pub ip_mentioned: Option<Vec<String>>,
14263    ///Property: Keywords
14264    #[serde(skip_serializing_if = "Option::is_none")]
14265    #[cfg_attr(
14266        feature = "builder",
14267        builder(with = |value:impl Into<String>|vec![value.into()])
14268    )]
14269    pub keywords: Option<Vec<String>>,
14270    ///Property: Language
14271    #[serde(skip_serializing_if = "Option::is_none")]
14272    #[cfg_attr(
14273        feature = "builder",
14274        builder(with = |value:impl Into<String>|vec![value.into()])
14275    )]
14276    pub language: Option<Vec<String>>,
14277    ///Property: Detected locations
14278    #[serde(skip_serializing_if = "Option::is_none")]
14279    #[cfg_attr(
14280        feature = "builder",
14281        builder(with = |value:impl Into<String>|vec![value.into()])
14282    )]
14283    pub location_mentioned: Option<Vec<String>>,
14284    ///Property: Message ID
14285    #[serde(skip_serializing_if = "Option::is_none")]
14286    #[cfg_attr(
14287        feature = "builder",
14288        builder(with = |value:impl Into<String>|vec![value.into()])
14289    )]
14290    pub message_id: Option<Vec<String>>,
14291    ///Property: MIME type
14292    #[serde(skip_serializing_if = "Option::is_none")]
14293    #[cfg_attr(
14294        feature = "builder",
14295        builder(with = |value:impl Into<String>|vec![value.into()])
14296    )]
14297    pub mime_type: Option<Vec<String>>,
14298    ///Property: Modified on
14299    #[serde(skip_serializing_if = "Option::is_none")]
14300    #[cfg_attr(
14301        feature = "builder",
14302        builder(with = |value:impl Into<String>|vec![value.into()])
14303    )]
14304    pub modified_at: Option<Vec<String>>,
14305    ///Property: Name
14306    #[serde(default)]
14307    #[cfg_attr(
14308        feature = "builder",
14309        builder(with = |value:impl Into<String>|vec![value.into()])
14310    )]
14311    pub name: Vec<String>,
14312    ///Property: Detected names
14313    #[serde(skip_serializing_if = "Option::is_none")]
14314    #[cfg_attr(
14315        feature = "builder",
14316        builder(with = |value:impl Into<String>|vec![value.into()])
14317    )]
14318    pub names_mentioned: Option<Vec<String>>,
14319    ///Property: Notes
14320    #[serde(skip_serializing_if = "Option::is_none")]
14321    #[cfg_attr(
14322        feature = "builder",
14323        builder(with = |value:impl Into<String>|vec![value.into()])
14324    )]
14325    pub notes: Option<Vec<String>>,
14326    ///Property: Folder
14327    #[serde(skip_serializing_if = "Option::is_none")]
14328    #[cfg_attr(
14329        feature = "builder",
14330        builder(with = |value:impl Into<String>|vec![value.into()])
14331    )]
14332    pub parent: Option<Vec<String>>,
14333    ///Property: PDF alternative version checksum
14334    #[serde(skip_serializing_if = "Option::is_none")]
14335    #[cfg_attr(
14336        feature = "builder",
14337        builder(with = |value:impl Into<String>|vec![value.into()])
14338    )]
14339    pub pdf_hash: Option<Vec<String>>,
14340    ///Property: Detected people
14341    #[serde(skip_serializing_if = "Option::is_none")]
14342    #[cfg_attr(
14343        feature = "builder",
14344        builder(with = |value:impl Into<String>|vec![value.into()])
14345    )]
14346    pub people_mentioned: Option<Vec<String>>,
14347    ///Property: Detected phones
14348    #[serde(skip_serializing_if = "Option::is_none")]
14349    #[cfg_attr(
14350        feature = "builder",
14351        builder(with = |value:impl Into<String>|vec![value.into()])
14352    )]
14353    pub phone_mentioned: Option<Vec<String>>,
14354    ///Property: Previous name
14355    #[serde(skip_serializing_if = "Option::is_none")]
14356    #[cfg_attr(
14357        feature = "builder",
14358        builder(with = |value:impl Into<String>|vec![value.into()])
14359    )]
14360    pub previous_name: Option<Vec<String>>,
14361    ///Property: Processed at
14362    #[serde(skip_serializing_if = "Option::is_none")]
14363    #[cfg_attr(
14364        feature = "builder",
14365        builder(with = |value:impl Into<String>|vec![value.into()])
14366    )]
14367    pub processed_at: Option<Vec<String>>,
14368    ///Property: Processing agent
14369    #[serde(skip_serializing_if = "Option::is_none")]
14370    #[cfg_attr(
14371        feature = "builder",
14372        builder(with = |value:impl Into<String>|vec![value.into()])
14373    )]
14374    pub processing_agent: Option<Vec<String>>,
14375    ///Property: Processing error
14376    #[serde(skip_serializing_if = "Option::is_none")]
14377    #[cfg_attr(
14378        feature = "builder",
14379        builder(with = |value:impl Into<String>|vec![value.into()])
14380    )]
14381    pub processing_error: Option<Vec<String>>,
14382    ///Property: Processing status
14383    #[serde(skip_serializing_if = "Option::is_none")]
14384    #[cfg_attr(
14385        feature = "builder",
14386        builder(with = |value:impl Into<String>|vec![value.into()])
14387    )]
14388    pub processing_status: Option<Vec<String>>,
14389    ///Property: Program
14390    #[serde(skip_serializing_if = "Option::is_none")]
14391    #[cfg_attr(
14392        feature = "builder",
14393        builder(with = |value:impl Into<String>|vec![value.into()])
14394    )]
14395    pub program: Option<Vec<String>>,
14396    ///Property: Program ID
14397    #[serde(skip_serializing_if = "Option::is_none")]
14398    #[cfg_attr(
14399        feature = "builder",
14400        builder(with = |value:impl Into<String>|vec![value.into()])
14401    )]
14402    pub program_id: Option<Vec<String>>,
14403    ///Property: Source document
14404    #[serde(skip_serializing_if = "Option::is_none")]
14405    #[cfg_attr(
14406        feature = "builder",
14407        builder(with = |value:impl Into<String>|vec![value.into()])
14408    )]
14409    pub proof: Option<Vec<String>>,
14410    ///Property: Published on
14411    #[serde(skip_serializing_if = "Option::is_none")]
14412    #[cfg_attr(
14413        feature = "builder",
14414        builder(with = |value:impl Into<String>|vec![value.into()])
14415    )]
14416    pub published_at: Option<Vec<String>>,
14417    ///Property: Publishing source
14418    #[serde(skip_serializing_if = "Option::is_none")]
14419    #[cfg_attr(
14420        feature = "builder",
14421        builder(with = |value:impl Into<String>|vec![value.into()])
14422    )]
14423    pub publisher: Option<Vec<String>>,
14424    ///Property: Publishing source URL
14425    #[serde(skip_serializing_if = "Option::is_none")]
14426    #[cfg_attr(
14427        feature = "builder",
14428        builder(with = |value:impl Into<String>|vec![value.into()])
14429    )]
14430    pub publisher_url: Option<Vec<String>>,
14431    ///Property: Retrieved on
14432    #[serde(skip_serializing_if = "Option::is_none")]
14433    #[cfg_attr(
14434        feature = "builder",
14435        builder(with = |value:impl Into<String>|vec![value.into()])
14436    )]
14437    pub retrieved_at: Option<Vec<String>>,
14438    ///Property: Source link
14439    #[serde(skip_serializing_if = "Option::is_none")]
14440    #[cfg_attr(
14441        feature = "builder",
14442        builder(with = |value:impl Into<String>|vec![value.into()])
14443    )]
14444    pub source_url: Option<Vec<String>>,
14445    ///Property: Summary
14446    #[serde(skip_serializing_if = "Option::is_none")]
14447    #[cfg_attr(
14448        feature = "builder",
14449        builder(with = |value:impl Into<String>|vec![value.into()])
14450    )]
14451    pub summary: Option<Vec<String>>,
14452    ///Property: Title
14453    #[serde(skip_serializing_if = "Option::is_none")]
14454    #[cfg_attr(
14455        feature = "builder",
14456        builder(with = |value:impl Into<String>|vec![value.into()])
14457    )]
14458    pub title: Option<Vec<String>>,
14459    ///Property: Topics
14460    #[serde(skip_serializing_if = "Option::is_none")]
14461    #[cfg_attr(
14462        feature = "builder",
14463        builder(with = |value:impl Into<String>|vec![value.into()])
14464    )]
14465    pub topics: Option<Vec<String>>,
14466    ///Property: The language of the translated text
14467    #[serde(skip_serializing_if = "Option::is_none")]
14468    #[cfg_attr(
14469        feature = "builder",
14470        builder(with = |value:impl Into<String>|vec![value.into()])
14471    )]
14472    pub translated_language: Option<Vec<String>>,
14473    ///Property: Translated version of the body text
14474    #[serde(skip_serializing_if = "Option::is_none")]
14475    #[cfg_attr(
14476        feature = "builder",
14477        builder(with = |value:impl Into<String>|vec![value.into()])
14478    )]
14479    pub translated_text: Option<Vec<String>>,
14480    ///Property: Weak alias
14481    #[serde(skip_serializing_if = "Option::is_none")]
14482    #[cfg_attr(
14483        feature = "builder",
14484        builder(with = |value:impl Into<String>|vec![value.into()])
14485    )]
14486    pub weak_alias: Option<Vec<String>>,
14487    ///Property: Wikidata ID
14488    #[serde(skip_serializing_if = "Option::is_none")]
14489    #[cfg_attr(
14490        feature = "builder",
14491        builder(with = |value:impl Into<String>|vec![value.into()])
14492    )]
14493    pub wikidata_id: Option<Vec<String>>,
14494    ///Property: Wikipedia Article
14495    #[serde(skip_serializing_if = "Option::is_none")]
14496    #[cfg_attr(
14497        feature = "builder",
14498        builder(with = |value:impl Into<String>|vec![value.into()])
14499    )]
14500    pub wikipedia_url: Option<Vec<String>>,
14501}
14502impl Pages {
14503    /// Create a new entity with the given ID
14504    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
14505    pub fn new(id: impl Into<String>) -> Self {
14506        Self {
14507            id: id.into(),
14508            schema: "Pages".to_string(),
14509            address: None,
14510            address_entity: None,
14511            aleph_url: None,
14512            alias: None,
14513            ancestors: None,
14514            author: None,
14515            authored_at: None,
14516            body_text: None,
14517            companies_mentioned: None,
14518            content_hash: None,
14519            country: None,
14520            crawler: None,
14521            created_at: None,
14522            date: None,
14523            description: None,
14524            detected_country: None,
14525            detected_language: None,
14526            email_mentioned: None,
14527            encoding: None,
14528            extension: None,
14529            file_name: Vec::new(),
14530            file_size: None,
14531            generator: None,
14532            iban_mentioned: None,
14533            index_text: None,
14534            ip_mentioned: None,
14535            keywords: None,
14536            language: None,
14537            location_mentioned: None,
14538            message_id: None,
14539            mime_type: None,
14540            modified_at: None,
14541            name: Vec::new(),
14542            names_mentioned: None,
14543            notes: None,
14544            parent: None,
14545            pdf_hash: None,
14546            people_mentioned: None,
14547            phone_mentioned: None,
14548            previous_name: None,
14549            processed_at: None,
14550            processing_agent: None,
14551            processing_error: None,
14552            processing_status: None,
14553            program: None,
14554            program_id: None,
14555            proof: None,
14556            published_at: None,
14557            publisher: None,
14558            publisher_url: None,
14559            retrieved_at: None,
14560            source_url: None,
14561            summary: None,
14562            title: None,
14563            topics: None,
14564            translated_language: None,
14565            translated_text: None,
14566            weak_alias: None,
14567            wikidata_id: None,
14568            wikipedia_url: None,
14569        }
14570    }
14571    /// Get the schema name
14572    pub fn schema_name() -> &'static str {
14573        "Pages"
14574    }
14575    /// Serialize to standard FTM nested JSON format
14576    ///
14577    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
14578    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
14579        let mut value = serde_json::to_value(self)?;
14580        if let Some(obj) = value.as_object_mut() {
14581            let id = obj.remove("id");
14582            let schema = obj.remove("schema");
14583            let properties = serde_json::Value::Object(std::mem::take(obj));
14584            if let Some(id) = id {
14585                obj.insert("id".into(), id);
14586            }
14587            if let Some(schema) = schema {
14588                obj.insert("schema".into(), schema);
14589            }
14590            obj.insert("properties".into(), properties);
14591        }
14592        serde_json::to_string(&value)
14593    }
14594}
14595///FTM Schema: Passport
14596#[derive(Debug, Clone, Serialize, Deserialize)]
14597#[cfg_attr(feature = "builder", derive(Builder))]
14598#[serde(rename_all = "camelCase")]
14599pub struct Passport {
14600    pub id: String,
14601    #[cfg_attr(feature = "builder", builder(default = "Passport".to_string()))]
14602    pub schema: String,
14603    ///Property: Aleph URL
14604    #[serde(skip_serializing_if = "Option::is_none")]
14605    #[cfg_attr(
14606        feature = "builder",
14607        builder(with = |value:impl Into<String>|vec![value.into()])
14608    )]
14609    pub aleph_url: Option<Vec<String>>,
14610    ///Property: Authority
14611    #[serde(skip_serializing_if = "Option::is_none")]
14612    #[cfg_attr(
14613        feature = "builder",
14614        builder(with = |value:impl Into<String>|vec![value.into()])
14615    )]
14616    pub authority: Option<Vec<String>>,
14617    ///Property: Birth date
14618    #[serde(skip_serializing_if = "Option::is_none")]
14619    #[cfg_attr(
14620        feature = "builder",
14621        builder(with = |value:impl Into<String>|vec![value.into()])
14622    )]
14623    pub birth_date: Option<Vec<String>>,
14624    ///Property: Place of birth
14625    #[serde(skip_serializing_if = "Option::is_none")]
14626    #[cfg_attr(
14627        feature = "builder",
14628        builder(with = |value:impl Into<String>|vec![value.into()])
14629    )]
14630    pub birth_place: Option<Vec<String>>,
14631    ///Property: Country
14632    #[serde(skip_serializing_if = "Option::is_none")]
14633    #[cfg_attr(
14634        feature = "builder",
14635        builder(with = |value:impl Into<String>|vec![value.into()])
14636    )]
14637    pub country: Option<Vec<String>>,
14638    ///Property: Date
14639    #[serde(skip_serializing_if = "Option::is_none")]
14640    #[cfg_attr(
14641        feature = "builder",
14642        builder(with = |value:impl Into<String>|vec![value.into()])
14643    )]
14644    pub date: Option<Vec<String>>,
14645    ///Property: Description
14646    #[serde(skip_serializing_if = "Option::is_none")]
14647    #[cfg_attr(
14648        feature = "builder",
14649        builder(with = |value:impl Into<String>|vec![value.into()])
14650    )]
14651    pub description: Option<Vec<String>>,
14652    ///Property: End date
14653    #[serde(skip_serializing_if = "Option::is_none")]
14654    #[cfg_attr(
14655        feature = "builder",
14656        builder(with = |value:impl Into<String>|vec![value.into()])
14657    )]
14658    pub end_date: Option<Vec<String>>,
14659    ///Property: Gender
14660    #[serde(skip_serializing_if = "Option::is_none")]
14661    #[cfg_attr(
14662        feature = "builder",
14663        builder(with = |value:impl Into<String>|vec![value.into()])
14664    )]
14665    pub gender: Option<Vec<String>>,
14666    ///Property: Given name
14667    #[serde(skip_serializing_if = "Option::is_none")]
14668    #[cfg_attr(
14669        feature = "builder",
14670        builder(with = |value:impl Into<String>|vec![value.into()])
14671    )]
14672    pub given_name: Option<Vec<String>>,
14673    ///Property: Identification holder
14674    #[serde(default)]
14675    #[cfg_attr(
14676        feature = "builder",
14677        builder(with = |value:impl Into<String>|vec![value.into()])
14678    )]
14679    pub holder: Vec<String>,
14680    ///Property: Index text
14681    #[serde(skip_serializing_if = "Option::is_none")]
14682    #[cfg_attr(
14683        feature = "builder",
14684        builder(with = |value:impl Into<String>|vec![value.into()])
14685    )]
14686    pub index_text: Option<Vec<String>>,
14687    ///Property: Modified on
14688    #[serde(skip_serializing_if = "Option::is_none")]
14689    #[cfg_attr(
14690        feature = "builder",
14691        builder(with = |value:impl Into<String>|vec![value.into()])
14692    )]
14693    pub modified_at: Option<Vec<String>>,
14694    ///Property: Detected names
14695    #[serde(skip_serializing_if = "Option::is_none")]
14696    #[cfg_attr(
14697        feature = "builder",
14698        builder(with = |value:impl Into<String>|vec![value.into()])
14699    )]
14700    pub names_mentioned: Option<Vec<String>>,
14701    ///Property: Document number
14702    #[serde(default)]
14703    #[cfg_attr(
14704        feature = "builder",
14705        builder(with = |value:impl Into<String>|vec![value.into()])
14706    )]
14707    pub number: Vec<String>,
14708    ///Property: Passport number
14709    #[serde(skip_serializing_if = "Option::is_none")]
14710    #[cfg_attr(
14711        feature = "builder",
14712        builder(with = |value:impl Into<String>|vec![value.into()])
14713    )]
14714    pub passport_number: Option<Vec<String>>,
14715    ///Property: Personal number
14716    #[serde(skip_serializing_if = "Option::is_none")]
14717    #[cfg_attr(
14718        feature = "builder",
14719        builder(with = |value:impl Into<String>|vec![value.into()])
14720    )]
14721    pub personal_number: Option<Vec<String>>,
14722    ///Property: Source document
14723    #[serde(skip_serializing_if = "Option::is_none")]
14724    #[cfg_attr(
14725        feature = "builder",
14726        builder(with = |value:impl Into<String>|vec![value.into()])
14727    )]
14728    pub proof: Option<Vec<String>>,
14729    ///Property: Publishing source
14730    #[serde(skip_serializing_if = "Option::is_none")]
14731    #[cfg_attr(
14732        feature = "builder",
14733        builder(with = |value:impl Into<String>|vec![value.into()])
14734    )]
14735    pub publisher: Option<Vec<String>>,
14736    ///Property: Publishing source URL
14737    #[serde(skip_serializing_if = "Option::is_none")]
14738    #[cfg_attr(
14739        feature = "builder",
14740        builder(with = |value:impl Into<String>|vec![value.into()])
14741    )]
14742    pub publisher_url: Option<Vec<String>>,
14743    ///Property: Record ID
14744    #[serde(skip_serializing_if = "Option::is_none")]
14745    #[cfg_attr(
14746        feature = "builder",
14747        builder(with = |value:impl Into<String>|vec![value.into()])
14748    )]
14749    pub record_id: Option<Vec<String>>,
14750    ///Property: Retrieved on
14751    #[serde(skip_serializing_if = "Option::is_none")]
14752    #[cfg_attr(
14753        feature = "builder",
14754        builder(with = |value:impl Into<String>|vec![value.into()])
14755    )]
14756    pub retrieved_at: Option<Vec<String>>,
14757    ///Property: Source link
14758    #[serde(skip_serializing_if = "Option::is_none")]
14759    #[cfg_attr(
14760        feature = "builder",
14761        builder(with = |value:impl Into<String>|vec![value.into()])
14762    )]
14763    pub source_url: Option<Vec<String>>,
14764    ///Property: Start date
14765    #[serde(skip_serializing_if = "Option::is_none")]
14766    #[cfg_attr(
14767        feature = "builder",
14768        builder(with = |value:impl Into<String>|vec![value.into()])
14769    )]
14770    pub start_date: Option<Vec<String>>,
14771    ///Property: Summary
14772    #[serde(skip_serializing_if = "Option::is_none")]
14773    #[cfg_attr(
14774        feature = "builder",
14775        builder(with = |value:impl Into<String>|vec![value.into()])
14776    )]
14777    pub summary: Option<Vec<String>>,
14778    ///Property: Surname
14779    #[serde(skip_serializing_if = "Option::is_none")]
14780    #[cfg_attr(
14781        feature = "builder",
14782        builder(with = |value:impl Into<String>|vec![value.into()])
14783    )]
14784    pub surname: Option<Vec<String>>,
14785    ///Property: Type
14786    #[serde(skip_serializing_if = "Option::is_none")]
14787    #[cfg_attr(
14788        feature = "builder",
14789        builder(with = |value:impl Into<String>|vec![value.into()])
14790    )]
14791    pub type_: Option<Vec<String>>,
14792}
14793impl Passport {
14794    /// Create a new entity with the given ID
14795    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
14796    pub fn new(id: impl Into<String>) -> Self {
14797        Self {
14798            id: id.into(),
14799            schema: "Passport".to_string(),
14800            aleph_url: None,
14801            authority: None,
14802            birth_date: None,
14803            birth_place: None,
14804            country: None,
14805            date: None,
14806            description: None,
14807            end_date: None,
14808            gender: None,
14809            given_name: None,
14810            holder: Vec::new(),
14811            index_text: None,
14812            modified_at: None,
14813            names_mentioned: None,
14814            number: Vec::new(),
14815            passport_number: None,
14816            personal_number: None,
14817            proof: None,
14818            publisher: None,
14819            publisher_url: None,
14820            record_id: None,
14821            retrieved_at: None,
14822            source_url: None,
14823            start_date: None,
14824            summary: None,
14825            surname: None,
14826            type_: None,
14827        }
14828    }
14829    /// Get the schema name
14830    pub fn schema_name() -> &'static str {
14831        "Passport"
14832    }
14833    /// Serialize to standard FTM nested JSON format
14834    ///
14835    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
14836    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
14837        let mut value = serde_json::to_value(self)?;
14838        if let Some(obj) = value.as_object_mut() {
14839            let id = obj.remove("id");
14840            let schema = obj.remove("schema");
14841            let properties = serde_json::Value::Object(std::mem::take(obj));
14842            if let Some(id) = id {
14843                obj.insert("id".into(), id);
14844            }
14845            if let Some(schema) = schema {
14846                obj.insert("schema".into(), schema);
14847            }
14848            obj.insert("properties".into(), properties);
14849        }
14850        serde_json::to_string(&value)
14851    }
14852}
14853///FTM Schema: Payment
14854#[derive(Debug, Clone, Serialize, Deserialize)]
14855#[cfg_attr(feature = "builder", derive(Builder))]
14856#[serde(rename_all = "camelCase")]
14857pub struct Payment {
14858    pub id: String,
14859    #[cfg_attr(feature = "builder", builder(default = "Payment".to_string()))]
14860    pub schema: String,
14861    ///Property: Aleph URL
14862    #[serde(skip_serializing_if = "Option::is_none")]
14863    #[cfg_attr(
14864        feature = "builder",
14865        builder(with = |value:impl Into<String>|vec![value.into()])
14866    )]
14867    pub aleph_url: Option<Vec<String>>,
14868    ///Property: Amount
14869    #[serde(
14870        skip_serializing_if = "Option::is_none",
14871        deserialize_with = "deserialize_opt_f64_vec",
14872        default
14873    )]
14874    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
14875    pub amount: Option<Vec<f64>>,
14876    ///Property: Amount in EUR
14877    #[serde(
14878        skip_serializing_if = "Option::is_none",
14879        deserialize_with = "deserialize_opt_f64_vec",
14880        default
14881    )]
14882    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
14883    pub amount_eur: Option<Vec<f64>>,
14884    ///Property: Amount in USD
14885    #[serde(
14886        skip_serializing_if = "Option::is_none",
14887        deserialize_with = "deserialize_opt_f64_vec",
14888        default
14889    )]
14890    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
14891    pub amount_usd: Option<Vec<f64>>,
14892    ///Property: Beneficiary
14893    #[serde(default)]
14894    #[cfg_attr(
14895        feature = "builder",
14896        builder(with = |value:impl Into<String>|vec![value.into()])
14897    )]
14898    pub beneficiary: Vec<String>,
14899    ///Property: Beneficiary bank account
14900    #[serde(skip_serializing_if = "Option::is_none")]
14901    #[cfg_attr(
14902        feature = "builder",
14903        builder(with = |value:impl Into<String>|vec![value.into()])
14904    )]
14905    pub beneficiary_account: Option<Vec<String>>,
14906    ///Property: Contract
14907    #[serde(skip_serializing_if = "Option::is_none")]
14908    #[cfg_attr(
14909        feature = "builder",
14910        builder(with = |value:impl Into<String>|vec![value.into()])
14911    )]
14912    pub contract: Option<Vec<String>>,
14913    ///Property: Currency
14914    #[serde(skip_serializing_if = "Option::is_none")]
14915    #[cfg_attr(
14916        feature = "builder",
14917        builder(with = |value:impl Into<String>|vec![value.into()])
14918    )]
14919    pub currency: Option<Vec<String>>,
14920    ///Property: Date
14921    #[serde(skip_serializing_if = "Option::is_none")]
14922    #[cfg_attr(
14923        feature = "builder",
14924        builder(with = |value:impl Into<String>|vec![value.into()])
14925    )]
14926    pub date: Option<Vec<String>>,
14927    ///Property: Description
14928    #[serde(skip_serializing_if = "Option::is_none")]
14929    #[cfg_attr(
14930        feature = "builder",
14931        builder(with = |value:impl Into<String>|vec![value.into()])
14932    )]
14933    pub description: Option<Vec<String>>,
14934    ///Property: End date
14935    #[serde(skip_serializing_if = "Option::is_none")]
14936    #[cfg_attr(
14937        feature = "builder",
14938        builder(with = |value:impl Into<String>|vec![value.into()])
14939    )]
14940    pub end_date: Option<Vec<String>>,
14941    ///Property: Index text
14942    #[serde(skip_serializing_if = "Option::is_none")]
14943    #[cfg_attr(
14944        feature = "builder",
14945        builder(with = |value:impl Into<String>|vec![value.into()])
14946    )]
14947    pub index_text: Option<Vec<String>>,
14948    ///Property: Modified on
14949    #[serde(skip_serializing_if = "Option::is_none")]
14950    #[cfg_attr(
14951        feature = "builder",
14952        builder(with = |value:impl Into<String>|vec![value.into()])
14953    )]
14954    pub modified_at: Option<Vec<String>>,
14955    ///Property: Detected names
14956    #[serde(skip_serializing_if = "Option::is_none")]
14957    #[cfg_attr(
14958        feature = "builder",
14959        builder(with = |value:impl Into<String>|vec![value.into()])
14960    )]
14961    pub names_mentioned: Option<Vec<String>>,
14962    ///Property: Payer
14963    #[serde(default)]
14964    #[cfg_attr(
14965        feature = "builder",
14966        builder(with = |value:impl Into<String>|vec![value.into()])
14967    )]
14968    pub payer: Vec<String>,
14969    ///Property: Payer bank account
14970    #[serde(skip_serializing_if = "Option::is_none")]
14971    #[cfg_attr(
14972        feature = "builder",
14973        builder(with = |value:impl Into<String>|vec![value.into()])
14974    )]
14975    pub payer_account: Option<Vec<String>>,
14976    ///Property: Payment programme
14977    #[serde(skip_serializing_if = "Option::is_none")]
14978    #[cfg_attr(
14979        feature = "builder",
14980        builder(with = |value:impl Into<String>|vec![value.into()])
14981    )]
14982    pub programme: Option<Vec<String>>,
14983    ///Property: Project
14984    #[serde(skip_serializing_if = "Option::is_none")]
14985    #[cfg_attr(
14986        feature = "builder",
14987        builder(with = |value:impl Into<String>|vec![value.into()])
14988    )]
14989    pub project: Option<Vec<String>>,
14990    ///Property: Source document
14991    #[serde(skip_serializing_if = "Option::is_none")]
14992    #[cfg_attr(
14993        feature = "builder",
14994        builder(with = |value:impl Into<String>|vec![value.into()])
14995    )]
14996    pub proof: Option<Vec<String>>,
14997    ///Property: Publishing source
14998    #[serde(skip_serializing_if = "Option::is_none")]
14999    #[cfg_attr(
15000        feature = "builder",
15001        builder(with = |value:impl Into<String>|vec![value.into()])
15002    )]
15003    pub publisher: Option<Vec<String>>,
15004    ///Property: Publishing source URL
15005    #[serde(skip_serializing_if = "Option::is_none")]
15006    #[cfg_attr(
15007        feature = "builder",
15008        builder(with = |value:impl Into<String>|vec![value.into()])
15009    )]
15010    pub publisher_url: Option<Vec<String>>,
15011    ///Property: Payment purpose
15012    #[serde(skip_serializing_if = "Option::is_none")]
15013    #[cfg_attr(
15014        feature = "builder",
15015        builder(with = |value:impl Into<String>|vec![value.into()])
15016    )]
15017    pub purpose: Option<Vec<String>>,
15018    ///Property: Record ID
15019    #[serde(skip_serializing_if = "Option::is_none")]
15020    #[cfg_attr(
15021        feature = "builder",
15022        builder(with = |value:impl Into<String>|vec![value.into()])
15023    )]
15024    pub record_id: Option<Vec<String>>,
15025    ///Property: Retrieved on
15026    #[serde(skip_serializing_if = "Option::is_none")]
15027    #[cfg_attr(
15028        feature = "builder",
15029        builder(with = |value:impl Into<String>|vec![value.into()])
15030    )]
15031    pub retrieved_at: Option<Vec<String>>,
15032    ///Property: Sequence number
15033    #[serde(skip_serializing_if = "Option::is_none")]
15034    #[cfg_attr(
15035        feature = "builder",
15036        builder(with = |value:impl Into<String>|vec![value.into()])
15037    )]
15038    pub sequence_number: Option<Vec<String>>,
15039    ///Property: Source link
15040    #[serde(skip_serializing_if = "Option::is_none")]
15041    #[cfg_attr(
15042        feature = "builder",
15043        builder(with = |value:impl Into<String>|vec![value.into()])
15044    )]
15045    pub source_url: Option<Vec<String>>,
15046    ///Property: Start date
15047    #[serde(skip_serializing_if = "Option::is_none")]
15048    #[cfg_attr(
15049        feature = "builder",
15050        builder(with = |value:impl Into<String>|vec![value.into()])
15051    )]
15052    pub start_date: Option<Vec<String>>,
15053    ///Property: Summary
15054    #[serde(skip_serializing_if = "Option::is_none")]
15055    #[cfg_attr(
15056        feature = "builder",
15057        builder(with = |value:impl Into<String>|vec![value.into()])
15058    )]
15059    pub summary: Option<Vec<String>>,
15060    ///Property: Transaction number
15061    #[serde(skip_serializing_if = "Option::is_none")]
15062    #[cfg_attr(
15063        feature = "builder",
15064        builder(with = |value:impl Into<String>|vec![value.into()])
15065    )]
15066    pub transaction_number: Option<Vec<String>>,
15067}
15068impl Payment {
15069    /// Create a new entity with the given ID
15070    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
15071    pub fn new(id: impl Into<String>) -> Self {
15072        Self {
15073            id: id.into(),
15074            schema: "Payment".to_string(),
15075            aleph_url: None,
15076            amount: None,
15077            amount_eur: None,
15078            amount_usd: None,
15079            beneficiary: Vec::new(),
15080            beneficiary_account: None,
15081            contract: None,
15082            currency: None,
15083            date: None,
15084            description: None,
15085            end_date: None,
15086            index_text: None,
15087            modified_at: None,
15088            names_mentioned: None,
15089            payer: Vec::new(),
15090            payer_account: None,
15091            programme: None,
15092            project: None,
15093            proof: None,
15094            publisher: None,
15095            publisher_url: None,
15096            purpose: None,
15097            record_id: None,
15098            retrieved_at: None,
15099            sequence_number: None,
15100            source_url: None,
15101            start_date: None,
15102            summary: None,
15103            transaction_number: None,
15104        }
15105    }
15106    /// Get the schema name
15107    pub fn schema_name() -> &'static str {
15108        "Payment"
15109    }
15110    /// Serialize to standard FTM nested JSON format
15111    ///
15112    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
15113    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
15114        let mut value = serde_json::to_value(self)?;
15115        if let Some(obj) = value.as_object_mut() {
15116            let id = obj.remove("id");
15117            let schema = obj.remove("schema");
15118            let properties = serde_json::Value::Object(std::mem::take(obj));
15119            if let Some(id) = id {
15120                obj.insert("id".into(), id);
15121            }
15122            if let Some(schema) = schema {
15123                obj.insert("schema".into(), schema);
15124            }
15125            obj.insert("properties".into(), properties);
15126        }
15127        serde_json::to_string(&value)
15128    }
15129}
15130///FTM Schema: Person
15131#[derive(Debug, Clone, Serialize, Deserialize)]
15132#[cfg_attr(feature = "builder", derive(Builder))]
15133#[serde(rename_all = "camelCase")]
15134pub struct Person {
15135    pub id: String,
15136    #[cfg_attr(feature = "builder", builder(default = "Person".to_string()))]
15137    pub schema: String,
15138    ///Property: Abbreviation
15139    #[serde(skip_serializing_if = "Option::is_none")]
15140    #[cfg_attr(
15141        feature = "builder",
15142        builder(with = |value:impl Into<String>|vec![value.into()])
15143    )]
15144    pub abbreviation: Option<Vec<String>>,
15145    ///Property: Address
15146    #[serde(skip_serializing_if = "Option::is_none")]
15147    #[cfg_attr(
15148        feature = "builder",
15149        builder(with = |value:impl Into<String>|vec![value.into()])
15150    )]
15151    pub address: Option<Vec<String>>,
15152    ///Property: Address
15153    #[serde(skip_serializing_if = "Option::is_none")]
15154    #[cfg_attr(
15155        feature = "builder",
15156        builder(with = |value:impl Into<String>|vec![value.into()])
15157    )]
15158    pub address_entity: Option<Vec<String>>,
15159    ///Property: Aleph URL
15160    #[serde(skip_serializing_if = "Option::is_none")]
15161    #[cfg_attr(
15162        feature = "builder",
15163        builder(with = |value:impl Into<String>|vec![value.into()])
15164    )]
15165    pub aleph_url: Option<Vec<String>>,
15166    ///Property: Alias
15167    #[serde(skip_serializing_if = "Option::is_none")]
15168    #[cfg_attr(
15169        feature = "builder",
15170        builder(with = |value:impl Into<String>|vec![value.into()])
15171    )]
15172    pub alias: Option<Vec<String>>,
15173    ///Property: Physical appearance
15174    #[serde(skip_serializing_if = "Option::is_none")]
15175    #[cfg_attr(
15176        feature = "builder",
15177        builder(with = |value:impl Into<String>|vec![value.into()])
15178    )]
15179    pub appearance: Option<Vec<String>>,
15180    ///Property: Country of birth
15181    #[serde(skip_serializing_if = "Option::is_none")]
15182    #[cfg_attr(
15183        feature = "builder",
15184        builder(with = |value:impl Into<String>|vec![value.into()])
15185    )]
15186    pub birth_country: Option<Vec<String>>,
15187    ///Property: Birth date
15188    #[serde(skip_serializing_if = "Option::is_none")]
15189    #[cfg_attr(
15190        feature = "builder",
15191        builder(with = |value:impl Into<String>|vec![value.into()])
15192    )]
15193    pub birth_date: Option<Vec<String>>,
15194    ///Property: Place of birth
15195    #[serde(skip_serializing_if = "Option::is_none")]
15196    #[cfg_attr(
15197        feature = "builder",
15198        builder(with = |value:impl Into<String>|vec![value.into()])
15199    )]
15200    pub birth_place: Option<Vec<String>>,
15201    ///Property: BrightQuery ID
15202    #[serde(skip_serializing_if = "Option::is_none")]
15203    #[cfg_attr(
15204        feature = "builder",
15205        builder(with = |value:impl Into<String>|vec![value.into()])
15206    )]
15207    pub bright_query_id: Option<Vec<String>>,
15208    ///Property: BrightQuery Organization ID
15209    #[serde(skip_serializing_if = "Option::is_none")]
15210    #[cfg_attr(
15211        feature = "builder",
15212        builder(with = |value:impl Into<String>|vec![value.into()])
15213    )]
15214    pub bright_query_org_id: Option<Vec<String>>,
15215    ///Property: Bureau van Dijk ID
15216    #[serde(skip_serializing_if = "Option::is_none")]
15217    #[cfg_attr(
15218        feature = "builder",
15219        builder(with = |value:impl Into<String>|vec![value.into()])
15220    )]
15221    pub bvd_id: Option<Vec<String>>,
15222    ///Property: Citizenship
15223    #[serde(skip_serializing_if = "Option::is_none")]
15224    #[cfg_attr(
15225        feature = "builder",
15226        builder(with = |value:impl Into<String>|vec![value.into()])
15227    )]
15228    pub citizenship: Option<Vec<String>>,
15229    ///Property: Classification
15230    #[serde(skip_serializing_if = "Option::is_none")]
15231    #[cfg_attr(
15232        feature = "builder",
15233        builder(with = |value:impl Into<String>|vec![value.into()])
15234    )]
15235    pub classification: Option<Vec<String>>,
15236    ///Property: Country
15237    #[serde(skip_serializing_if = "Option::is_none")]
15238    #[cfg_attr(
15239        feature = "builder",
15240        builder(with = |value:impl Into<String>|vec![value.into()])
15241    )]
15242    pub country: Option<Vec<String>>,
15243    ///Property: Created at
15244    #[serde(skip_serializing_if = "Option::is_none")]
15245    #[cfg_attr(
15246        feature = "builder",
15247        builder(with = |value:impl Into<String>|vec![value.into()])
15248    )]
15249    pub created_at: Option<Vec<String>>,
15250    ///Property: Death date
15251    #[serde(skip_serializing_if = "Option::is_none")]
15252    #[cfg_attr(
15253        feature = "builder",
15254        builder(with = |value:impl Into<String>|vec![value.into()])
15255    )]
15256    pub death_date: Option<Vec<String>>,
15257    ///Property: Description
15258    #[serde(skip_serializing_if = "Option::is_none")]
15259    #[cfg_attr(
15260        feature = "builder",
15261        builder(with = |value:impl Into<String>|vec![value.into()])
15262    )]
15263    pub description: Option<Vec<String>>,
15264    ///Property: Dissolution date
15265    #[serde(skip_serializing_if = "Option::is_none")]
15266    #[cfg_attr(
15267        feature = "builder",
15268        builder(with = |value:impl Into<String>|vec![value.into()])
15269    )]
15270    pub dissolution_date: Option<Vec<String>>,
15271    ///Property: DUNS
15272    #[serde(skip_serializing_if = "Option::is_none")]
15273    #[cfg_attr(
15274        feature = "builder",
15275        builder(with = |value:impl Into<String>|vec![value.into()])
15276    )]
15277    pub duns_code: Option<Vec<String>>,
15278    ///Property: Education
15279    #[serde(skip_serializing_if = "Option::is_none")]
15280    #[cfg_attr(
15281        feature = "builder",
15282        builder(with = |value:impl Into<String>|vec![value.into()])
15283    )]
15284    pub education: Option<Vec<String>>,
15285    ///Property: Email
15286    #[serde(skip_serializing_if = "Option::is_none")]
15287    #[cfg_attr(
15288        feature = "builder",
15289        builder(with = |value:impl Into<String>|vec![value.into()])
15290    )]
15291    pub email: Option<Vec<String>>,
15292    ///Property: Ethnicity
15293    #[serde(skip_serializing_if = "Option::is_none")]
15294    #[cfg_attr(
15295        feature = "builder",
15296        builder(with = |value:impl Into<String>|vec![value.into()])
15297    )]
15298    pub ethnicity: Option<Vec<String>>,
15299    ///Property: Eye color
15300    #[serde(skip_serializing_if = "Option::is_none")]
15301    #[cfg_attr(
15302        feature = "builder",
15303        builder(with = |value:impl Into<String>|vec![value.into()])
15304    )]
15305    pub eye_color: Option<Vec<String>>,
15306    ///Property: Patronymic
15307    #[serde(skip_serializing_if = "Option::is_none")]
15308    #[cfg_attr(
15309        feature = "builder",
15310        builder(with = |value:impl Into<String>|vec![value.into()])
15311    )]
15312    pub father_name: Option<Vec<String>>,
15313    ///Property: First name
15314    #[serde(skip_serializing_if = "Option::is_none")]
15315    #[cfg_attr(
15316        feature = "builder",
15317        builder(with = |value:impl Into<String>|vec![value.into()])
15318    )]
15319    pub first_name: Option<Vec<String>>,
15320    ///Property: Gender
15321    #[serde(skip_serializing_if = "Option::is_none")]
15322    #[cfg_attr(
15323        feature = "builder",
15324        builder(with = |value:impl Into<String>|vec![value.into()])
15325    )]
15326    pub gender: Option<Vec<String>>,
15327    ///Property: Hair color
15328    #[serde(skip_serializing_if = "Option::is_none")]
15329    #[cfg_attr(
15330        feature = "builder",
15331        builder(with = |value:impl Into<String>|vec![value.into()])
15332    )]
15333    pub hair_color: Option<Vec<String>>,
15334    ///Property: Height
15335    #[serde(
15336        skip_serializing_if = "Option::is_none",
15337        deserialize_with = "deserialize_opt_f64_vec",
15338        default
15339    )]
15340    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
15341    pub height: Option<Vec<f64>>,
15342    ///Property: ICIJ ID
15343    #[serde(skip_serializing_if = "Option::is_none")]
15344    #[cfg_attr(
15345        feature = "builder",
15346        builder(with = |value:impl Into<String>|vec![value.into()])
15347    )]
15348    pub icij_id: Option<Vec<String>>,
15349    ///Property: ID Number
15350    #[serde(skip_serializing_if = "Option::is_none")]
15351    #[cfg_attr(
15352        feature = "builder",
15353        builder(with = |value:impl Into<String>|vec![value.into()])
15354    )]
15355    pub id_number: Option<Vec<String>>,
15356    ///Property: Incorporation date
15357    #[serde(skip_serializing_if = "Option::is_none")]
15358    #[cfg_attr(
15359        feature = "builder",
15360        builder(with = |value:impl Into<String>|vec![value.into()])
15361    )]
15362    pub incorporation_date: Option<Vec<String>>,
15363    ///Property: Index text
15364    #[serde(skip_serializing_if = "Option::is_none")]
15365    #[cfg_attr(
15366        feature = "builder",
15367        builder(with = |value:impl Into<String>|vec![value.into()])
15368    )]
15369    pub index_text: Option<Vec<String>>,
15370    ///Property: INN
15371    #[serde(skip_serializing_if = "Option::is_none")]
15372    #[cfg_attr(
15373        feature = "builder",
15374        builder(with = |value:impl Into<String>|vec![value.into()])
15375    )]
15376    pub inn_code: Option<Vec<String>>,
15377    ///Property: Jurisdiction
15378    #[serde(skip_serializing_if = "Option::is_none")]
15379    #[cfg_attr(
15380        feature = "builder",
15381        builder(with = |value:impl Into<String>|vec![value.into()])
15382    )]
15383    pub jurisdiction: Option<Vec<String>>,
15384    ///Property: Keywords
15385    #[serde(skip_serializing_if = "Option::is_none")]
15386    #[cfg_attr(
15387        feature = "builder",
15388        builder(with = |value:impl Into<String>|vec![value.into()])
15389    )]
15390    pub keywords: Option<Vec<String>>,
15391    ///Property: Last name
15392    #[serde(skip_serializing_if = "Option::is_none")]
15393    #[cfg_attr(
15394        feature = "builder",
15395        builder(with = |value:impl Into<String>|vec![value.into()])
15396    )]
15397    pub last_name: Option<Vec<String>>,
15398    ///Property: Legal form
15399    #[serde(skip_serializing_if = "Option::is_none")]
15400    #[cfg_attr(
15401        feature = "builder",
15402        builder(with = |value:impl Into<String>|vec![value.into()])
15403    )]
15404    pub legal_form: Option<Vec<String>>,
15405    ///Property: LEI
15406    #[serde(skip_serializing_if = "Option::is_none")]
15407    #[cfg_attr(
15408        feature = "builder",
15409        builder(with = |value:impl Into<String>|vec![value.into()])
15410    )]
15411    pub lei_code: Option<Vec<String>>,
15412    ///Property: License Number
15413    #[serde(skip_serializing_if = "Option::is_none")]
15414    #[cfg_attr(
15415        feature = "builder",
15416        builder(with = |value:impl Into<String>|vec![value.into()])
15417    )]
15418    pub license_number: Option<Vec<String>>,
15419    ///Property: Country of origin
15420    #[serde(skip_serializing_if = "Option::is_none")]
15421    #[cfg_attr(
15422        feature = "builder",
15423        builder(with = |value:impl Into<String>|vec![value.into()])
15424    )]
15425    pub main_country: Option<Vec<String>>,
15426    ///Property: Middle name
15427    #[serde(skip_serializing_if = "Option::is_none")]
15428    #[cfg_attr(
15429        feature = "builder",
15430        builder(with = |value:impl Into<String>|vec![value.into()])
15431    )]
15432    pub middle_name: Option<Vec<String>>,
15433    ///Property: Modified on
15434    #[serde(skip_serializing_if = "Option::is_none")]
15435    #[cfg_attr(
15436        feature = "builder",
15437        builder(with = |value:impl Into<String>|vec![value.into()])
15438    )]
15439    pub modified_at: Option<Vec<String>>,
15440    ///Property: Matronymic
15441    #[serde(skip_serializing_if = "Option::is_none")]
15442    #[cfg_attr(
15443        feature = "builder",
15444        builder(with = |value:impl Into<String>|vec![value.into()])
15445    )]
15446    pub mother_name: Option<Vec<String>>,
15447    ///Property: Name
15448    #[serde(default)]
15449    #[cfg_attr(
15450        feature = "builder",
15451        builder(with = |value:impl Into<String>|vec![value.into()])
15452    )]
15453    pub name: Vec<String>,
15454    ///Property: Name suffix
15455    #[serde(skip_serializing_if = "Option::is_none")]
15456    #[cfg_attr(
15457        feature = "builder",
15458        builder(with = |value:impl Into<String>|vec![value.into()])
15459    )]
15460    pub name_suffix: Option<Vec<String>>,
15461    ///Property: Nationality
15462    #[serde(skip_serializing_if = "Option::is_none")]
15463    #[cfg_attr(
15464        feature = "builder",
15465        builder(with = |value:impl Into<String>|vec![value.into()])
15466    )]
15467    pub nationality: Option<Vec<String>>,
15468    ///Property: Notes
15469    #[serde(skip_serializing_if = "Option::is_none")]
15470    #[cfg_attr(
15471        feature = "builder",
15472        builder(with = |value:impl Into<String>|vec![value.into()])
15473    )]
15474    pub notes: Option<Vec<String>>,
15475    ///Property: NPI
15476    #[serde(skip_serializing_if = "Option::is_none")]
15477    #[cfg_attr(
15478        feature = "builder",
15479        builder(with = |value:impl Into<String>|vec![value.into()])
15480    )]
15481    pub npi_code: Option<Vec<String>>,
15482    ///Property: OGRN
15483    #[serde(skip_serializing_if = "Option::is_none")]
15484    #[cfg_attr(
15485        feature = "builder",
15486        builder(with = |value:impl Into<String>|vec![value.into()])
15487    )]
15488    pub ogrn_code: Option<Vec<String>>,
15489    ///Property: OKPO
15490    #[serde(skip_serializing_if = "Option::is_none")]
15491    #[cfg_attr(
15492        feature = "builder",
15493        builder(with = |value:impl Into<String>|vec![value.into()])
15494    )]
15495    pub okpo_code: Option<Vec<String>>,
15496    ///Property: OpenCorporates URL
15497    #[serde(skip_serializing_if = "Option::is_none")]
15498    #[cfg_attr(
15499        feature = "builder",
15500        builder(with = |value:impl Into<String>|vec![value.into()])
15501    )]
15502    pub opencorporates_url: Option<Vec<String>>,
15503    ///Property: Parent company
15504    #[serde(skip_serializing_if = "Option::is_none")]
15505    #[cfg_attr(
15506        feature = "builder",
15507        builder(with = |value:impl Into<String>|vec![value.into()])
15508    )]
15509    pub parent: Option<Vec<String>>,
15510    ///Property: Passport number
15511    #[serde(skip_serializing_if = "Option::is_none")]
15512    #[cfg_attr(
15513        feature = "builder",
15514        builder(with = |value:impl Into<String>|vec![value.into()])
15515    )]
15516    pub passport_number: Option<Vec<String>>,
15517    ///Property: Phone
15518    #[serde(skip_serializing_if = "Option::is_none")]
15519    #[cfg_attr(
15520        feature = "builder",
15521        builder(with = |value:impl Into<String>|vec![value.into()])
15522    )]
15523    pub phone: Option<Vec<String>>,
15524    ///Property: Political association
15525    #[serde(skip_serializing_if = "Option::is_none")]
15526    #[cfg_attr(
15527        feature = "builder",
15528        builder(with = |value:impl Into<String>|vec![value.into()])
15529    )]
15530    pub political: Option<Vec<String>>,
15531    ///Property: Position
15532    #[serde(skip_serializing_if = "Option::is_none")]
15533    #[cfg_attr(
15534        feature = "builder",
15535        builder(with = |value:impl Into<String>|vec![value.into()])
15536    )]
15537    pub position: Option<Vec<String>>,
15538    ///Property: Previous name
15539    #[serde(skip_serializing_if = "Option::is_none")]
15540    #[cfg_attr(
15541        feature = "builder",
15542        builder(with = |value:impl Into<String>|vec![value.into()])
15543    )]
15544    pub previous_name: Option<Vec<String>>,
15545    ///Property: Profession
15546    #[serde(skip_serializing_if = "Option::is_none")]
15547    #[cfg_attr(
15548        feature = "builder",
15549        builder(with = |value:impl Into<String>|vec![value.into()])
15550    )]
15551    pub profession: Option<Vec<String>>,
15552    ///Property: Program
15553    #[serde(skip_serializing_if = "Option::is_none")]
15554    #[cfg_attr(
15555        feature = "builder",
15556        builder(with = |value:impl Into<String>|vec![value.into()])
15557    )]
15558    pub program: Option<Vec<String>>,
15559    ///Property: Program ID
15560    #[serde(skip_serializing_if = "Option::is_none")]
15561    #[cfg_attr(
15562        feature = "builder",
15563        builder(with = |value:impl Into<String>|vec![value.into()])
15564    )]
15565    pub program_id: Option<Vec<String>>,
15566    ///Property: Source document
15567    #[serde(skip_serializing_if = "Option::is_none")]
15568    #[cfg_attr(
15569        feature = "builder",
15570        builder(with = |value:impl Into<String>|vec![value.into()])
15571    )]
15572    pub proof: Option<Vec<String>>,
15573    ///Property: Publishing source
15574    #[serde(skip_serializing_if = "Option::is_none")]
15575    #[cfg_attr(
15576        feature = "builder",
15577        builder(with = |value:impl Into<String>|vec![value.into()])
15578    )]
15579    pub publisher: Option<Vec<String>>,
15580    ///Property: Publishing source URL
15581    #[serde(skip_serializing_if = "Option::is_none")]
15582    #[cfg_attr(
15583        feature = "builder",
15584        builder(with = |value:impl Into<String>|vec![value.into()])
15585    )]
15586    pub publisher_url: Option<Vec<String>>,
15587    ///Property: Registration number
15588    #[serde(skip_serializing_if = "Option::is_none")]
15589    #[cfg_attr(
15590        feature = "builder",
15591        builder(with = |value:impl Into<String>|vec![value.into()])
15592    )]
15593    pub registration_number: Option<Vec<String>>,
15594    ///Property: Religion
15595    #[serde(skip_serializing_if = "Option::is_none")]
15596    #[cfg_attr(
15597        feature = "builder",
15598        builder(with = |value:impl Into<String>|vec![value.into()])
15599    )]
15600    pub religion: Option<Vec<String>>,
15601    ///Property: Retrieved on
15602    #[serde(skip_serializing_if = "Option::is_none")]
15603    #[cfg_attr(
15604        feature = "builder",
15605        builder(with = |value:impl Into<String>|vec![value.into()])
15606    )]
15607    pub retrieved_at: Option<Vec<String>>,
15608    ///Property: Sayari Entity ID
15609    #[serde(skip_serializing_if = "Option::is_none")]
15610    #[cfg_attr(
15611        feature = "builder",
15612        builder(with = |value:impl Into<String>|vec![value.into()])
15613    )]
15614    pub sayari_id: Option<Vec<String>>,
15615    ///Property: Second name
15616    #[serde(skip_serializing_if = "Option::is_none")]
15617    #[cfg_attr(
15618        feature = "builder",
15619        builder(with = |value:impl Into<String>|vec![value.into()])
15620    )]
15621    pub second_name: Option<Vec<String>>,
15622    ///Property: Sector
15623    #[serde(skip_serializing_if = "Option::is_none")]
15624    #[cfg_attr(
15625        feature = "builder",
15626        builder(with = |value:impl Into<String>|vec![value.into()])
15627    )]
15628    pub sector: Option<Vec<String>>,
15629    ///Property: Social security number
15630    #[serde(skip_serializing_if = "Option::is_none")]
15631    #[cfg_attr(
15632        feature = "builder",
15633        builder(with = |value:impl Into<String>|vec![value.into()])
15634    )]
15635    pub social_security_number: Option<Vec<String>>,
15636    ///Property: Source link
15637    #[serde(skip_serializing_if = "Option::is_none")]
15638    #[cfg_attr(
15639        feature = "builder",
15640        builder(with = |value:impl Into<String>|vec![value.into()])
15641    )]
15642    pub source_url: Option<Vec<String>>,
15643    ///Property: Spoken language
15644    #[serde(skip_serializing_if = "Option::is_none")]
15645    #[cfg_attr(
15646        feature = "builder",
15647        builder(with = |value:impl Into<String>|vec![value.into()])
15648    )]
15649    pub spoken_language: Option<Vec<String>>,
15650    ///Property: Status
15651    #[serde(skip_serializing_if = "Option::is_none")]
15652    #[cfg_attr(
15653        feature = "builder",
15654        builder(with = |value:impl Into<String>|vec![value.into()])
15655    )]
15656    pub status: Option<Vec<String>>,
15657    ///Property: Summary
15658    #[serde(skip_serializing_if = "Option::is_none")]
15659    #[cfg_attr(
15660        feature = "builder",
15661        builder(with = |value:impl Into<String>|vec![value.into()])
15662    )]
15663    pub summary: Option<Vec<String>>,
15664    ///Property: SWIFT/BIC
15665    #[serde(skip_serializing_if = "Option::is_none")]
15666    #[cfg_attr(
15667        feature = "builder",
15668        builder(with = |value:impl Into<String>|vec![value.into()])
15669    )]
15670    pub swift_bic: Option<Vec<String>>,
15671    ///Property: Tax Number
15672    #[serde(skip_serializing_if = "Option::is_none")]
15673    #[cfg_attr(
15674        feature = "builder",
15675        builder(with = |value:impl Into<String>|vec![value.into()])
15676    )]
15677    pub tax_number: Option<Vec<String>>,
15678    ///Property: Tax status
15679    #[serde(skip_serializing_if = "Option::is_none")]
15680    #[cfg_attr(
15681        feature = "builder",
15682        builder(with = |value:impl Into<String>|vec![value.into()])
15683    )]
15684    pub tax_status: Option<Vec<String>>,
15685    ///Property: Title
15686    #[serde(skip_serializing_if = "Option::is_none")]
15687    #[cfg_attr(
15688        feature = "builder",
15689        builder(with = |value:impl Into<String>|vec![value.into()])
15690    )]
15691    pub title: Option<Vec<String>>,
15692    ///Property: Topics
15693    #[serde(skip_serializing_if = "Option::is_none")]
15694    #[cfg_attr(
15695        feature = "builder",
15696        builder(with = |value:impl Into<String>|vec![value.into()])
15697    )]
15698    pub topics: Option<Vec<String>>,
15699    ///Property: Unique Entity ID
15700    #[serde(skip_serializing_if = "Option::is_none")]
15701    #[cfg_attr(
15702        feature = "builder",
15703        builder(with = |value:impl Into<String>|vec![value.into()])
15704    )]
15705    pub unique_entity_id: Option<Vec<String>>,
15706    ///Property: USCC
15707    #[serde(skip_serializing_if = "Option::is_none")]
15708    #[cfg_attr(
15709        feature = "builder",
15710        builder(with = |value:impl Into<String>|vec![value.into()])
15711    )]
15712    pub usc_code: Option<Vec<String>>,
15713    ///Property: V.A.T. Identifier
15714    #[serde(skip_serializing_if = "Option::is_none")]
15715    #[cfg_attr(
15716        feature = "builder",
15717        builder(with = |value:impl Into<String>|vec![value.into()])
15718    )]
15719    pub vat_code: Option<Vec<String>>,
15720    ///Property: Weak alias
15721    #[serde(skip_serializing_if = "Option::is_none")]
15722    #[cfg_attr(
15723        feature = "builder",
15724        builder(with = |value:impl Into<String>|vec![value.into()])
15725    )]
15726    pub weak_alias: Option<Vec<String>>,
15727    ///Property: Website
15728    #[serde(skip_serializing_if = "Option::is_none")]
15729    #[cfg_attr(
15730        feature = "builder",
15731        builder(with = |value:impl Into<String>|vec![value.into()])
15732    )]
15733    pub website: Option<Vec<String>>,
15734    ///Property: Weight
15735    #[serde(
15736        skip_serializing_if = "Option::is_none",
15737        deserialize_with = "deserialize_opt_f64_vec",
15738        default
15739    )]
15740    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
15741    pub weight: Option<Vec<f64>>,
15742    ///Property: Wikidata ID
15743    #[serde(skip_serializing_if = "Option::is_none")]
15744    #[cfg_attr(
15745        feature = "builder",
15746        builder(with = |value:impl Into<String>|vec![value.into()])
15747    )]
15748    pub wikidata_id: Option<Vec<String>>,
15749    ///Property: Wikipedia Article
15750    #[serde(skip_serializing_if = "Option::is_none")]
15751    #[cfg_attr(
15752        feature = "builder",
15753        builder(with = |value:impl Into<String>|vec![value.into()])
15754    )]
15755    pub wikipedia_url: Option<Vec<String>>,
15756}
15757impl Person {
15758    /// Create a new entity with the given ID
15759    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
15760    pub fn new(id: impl Into<String>) -> Self {
15761        Self {
15762            id: id.into(),
15763            schema: "Person".to_string(),
15764            abbreviation: None,
15765            address: None,
15766            address_entity: None,
15767            aleph_url: None,
15768            alias: None,
15769            appearance: None,
15770            birth_country: None,
15771            birth_date: None,
15772            birth_place: None,
15773            bright_query_id: None,
15774            bright_query_org_id: None,
15775            bvd_id: None,
15776            citizenship: None,
15777            classification: None,
15778            country: None,
15779            created_at: None,
15780            death_date: None,
15781            description: None,
15782            dissolution_date: None,
15783            duns_code: None,
15784            education: None,
15785            email: None,
15786            ethnicity: None,
15787            eye_color: None,
15788            father_name: None,
15789            first_name: None,
15790            gender: None,
15791            hair_color: None,
15792            height: None,
15793            icij_id: None,
15794            id_number: None,
15795            incorporation_date: None,
15796            index_text: None,
15797            inn_code: None,
15798            jurisdiction: None,
15799            keywords: None,
15800            last_name: None,
15801            legal_form: None,
15802            lei_code: None,
15803            license_number: None,
15804            main_country: None,
15805            middle_name: None,
15806            modified_at: None,
15807            mother_name: None,
15808            name: Vec::new(),
15809            name_suffix: None,
15810            nationality: None,
15811            notes: None,
15812            npi_code: None,
15813            ogrn_code: None,
15814            okpo_code: None,
15815            opencorporates_url: None,
15816            parent: None,
15817            passport_number: None,
15818            phone: None,
15819            political: None,
15820            position: None,
15821            previous_name: None,
15822            profession: None,
15823            program: None,
15824            program_id: None,
15825            proof: None,
15826            publisher: None,
15827            publisher_url: None,
15828            registration_number: None,
15829            religion: None,
15830            retrieved_at: None,
15831            sayari_id: None,
15832            second_name: None,
15833            sector: None,
15834            social_security_number: None,
15835            source_url: None,
15836            spoken_language: None,
15837            status: None,
15838            summary: None,
15839            swift_bic: None,
15840            tax_number: None,
15841            tax_status: None,
15842            title: None,
15843            topics: None,
15844            unique_entity_id: None,
15845            usc_code: None,
15846            vat_code: None,
15847            weak_alias: None,
15848            website: None,
15849            weight: None,
15850            wikidata_id: None,
15851            wikipedia_url: None,
15852        }
15853    }
15854    /// Get the schema name
15855    pub fn schema_name() -> &'static str {
15856        "Person"
15857    }
15858    /// Serialize to standard FTM nested JSON format
15859    ///
15860    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
15861    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
15862        let mut value = serde_json::to_value(self)?;
15863        if let Some(obj) = value.as_object_mut() {
15864            let id = obj.remove("id");
15865            let schema = obj.remove("schema");
15866            let properties = serde_json::Value::Object(std::mem::take(obj));
15867            if let Some(id) = id {
15868                obj.insert("id".into(), id);
15869            }
15870            if let Some(schema) = schema {
15871                obj.insert("schema".into(), schema);
15872            }
15873            obj.insert("properties".into(), properties);
15874        }
15875        serde_json::to_string(&value)
15876    }
15877}
15878///FTM Schema: Text file
15879#[derive(Debug, Clone, Serialize, Deserialize)]
15880#[cfg_attr(feature = "builder", derive(Builder))]
15881#[serde(rename_all = "camelCase")]
15882pub struct PlainText {
15883    pub id: String,
15884    #[cfg_attr(feature = "builder", builder(default = "PlainText".to_string()))]
15885    pub schema: String,
15886    ///Property: Address
15887    #[serde(skip_serializing_if = "Option::is_none")]
15888    #[cfg_attr(
15889        feature = "builder",
15890        builder(with = |value:impl Into<String>|vec![value.into()])
15891    )]
15892    pub address: Option<Vec<String>>,
15893    ///Property: Address
15894    #[serde(skip_serializing_if = "Option::is_none")]
15895    #[cfg_attr(
15896        feature = "builder",
15897        builder(with = |value:impl Into<String>|vec![value.into()])
15898    )]
15899    pub address_entity: Option<Vec<String>>,
15900    ///Property: Aleph URL
15901    #[serde(skip_serializing_if = "Option::is_none")]
15902    #[cfg_attr(
15903        feature = "builder",
15904        builder(with = |value:impl Into<String>|vec![value.into()])
15905    )]
15906    pub aleph_url: Option<Vec<String>>,
15907    ///Property: Alias
15908    #[serde(skip_serializing_if = "Option::is_none")]
15909    #[cfg_attr(
15910        feature = "builder",
15911        builder(with = |value:impl Into<String>|vec![value.into()])
15912    )]
15913    pub alias: Option<Vec<String>>,
15914    ///Property: Ancestors
15915    #[serde(skip_serializing_if = "Option::is_none")]
15916    #[cfg_attr(
15917        feature = "builder",
15918        builder(with = |value:impl Into<String>|vec![value.into()])
15919    )]
15920    pub ancestors: Option<Vec<String>>,
15921    ///Property: Author
15922    #[serde(skip_serializing_if = "Option::is_none")]
15923    #[cfg_attr(
15924        feature = "builder",
15925        builder(with = |value:impl Into<String>|vec![value.into()])
15926    )]
15927    pub author: Option<Vec<String>>,
15928    ///Property: Authored on
15929    #[serde(skip_serializing_if = "Option::is_none")]
15930    #[cfg_attr(
15931        feature = "builder",
15932        builder(with = |value:impl Into<String>|vec![value.into()])
15933    )]
15934    pub authored_at: Option<Vec<String>>,
15935    ///Property: Text
15936    #[serde(skip_serializing_if = "Option::is_none")]
15937    #[cfg_attr(
15938        feature = "builder",
15939        builder(with = |value:impl Into<String>|vec![value.into()])
15940    )]
15941    pub body_text: Option<Vec<String>>,
15942    ///Property: Detected companies
15943    #[serde(skip_serializing_if = "Option::is_none")]
15944    #[cfg_attr(
15945        feature = "builder",
15946        builder(with = |value:impl Into<String>|vec![value.into()])
15947    )]
15948    pub companies_mentioned: Option<Vec<String>>,
15949    ///Property: Checksum
15950    #[serde(skip_serializing_if = "Option::is_none")]
15951    #[cfg_attr(
15952        feature = "builder",
15953        builder(with = |value:impl Into<String>|vec![value.into()])
15954    )]
15955    pub content_hash: Option<Vec<String>>,
15956    ///Property: Country
15957    #[serde(skip_serializing_if = "Option::is_none")]
15958    #[cfg_attr(
15959        feature = "builder",
15960        builder(with = |value:impl Into<String>|vec![value.into()])
15961    )]
15962    pub country: Option<Vec<String>>,
15963    ///Property: Crawler
15964    #[serde(skip_serializing_if = "Option::is_none")]
15965    #[cfg_attr(
15966        feature = "builder",
15967        builder(with = |value:impl Into<String>|vec![value.into()])
15968    )]
15969    pub crawler: Option<Vec<String>>,
15970    ///Property: Created at
15971    #[serde(skip_serializing_if = "Option::is_none")]
15972    #[cfg_attr(
15973        feature = "builder",
15974        builder(with = |value:impl Into<String>|vec![value.into()])
15975    )]
15976    pub created_at: Option<Vec<String>>,
15977    ///Property: Date
15978    #[serde(skip_serializing_if = "Option::is_none")]
15979    #[cfg_attr(
15980        feature = "builder",
15981        builder(with = |value:impl Into<String>|vec![value.into()])
15982    )]
15983    pub date: Option<Vec<String>>,
15984    ///Property: Description
15985    #[serde(skip_serializing_if = "Option::is_none")]
15986    #[cfg_attr(
15987        feature = "builder",
15988        builder(with = |value:impl Into<String>|vec![value.into()])
15989    )]
15990    pub description: Option<Vec<String>>,
15991    ///Property: Detected country
15992    #[serde(skip_serializing_if = "Option::is_none")]
15993    #[cfg_attr(
15994        feature = "builder",
15995        builder(with = |value:impl Into<String>|vec![value.into()])
15996    )]
15997    pub detected_country: Option<Vec<String>>,
15998    ///Property: Detected language
15999    #[serde(skip_serializing_if = "Option::is_none")]
16000    #[cfg_attr(
16001        feature = "builder",
16002        builder(with = |value:impl Into<String>|vec![value.into()])
16003    )]
16004    pub detected_language: Option<Vec<String>>,
16005    ///Property: Detected e-mail addresses
16006    #[serde(skip_serializing_if = "Option::is_none")]
16007    #[cfg_attr(
16008        feature = "builder",
16009        builder(with = |value:impl Into<String>|vec![value.into()])
16010    )]
16011    pub email_mentioned: Option<Vec<String>>,
16012    ///Property: File encoding
16013    #[serde(skip_serializing_if = "Option::is_none")]
16014    #[cfg_attr(
16015        feature = "builder",
16016        builder(with = |value:impl Into<String>|vec![value.into()])
16017    )]
16018    pub encoding: Option<Vec<String>>,
16019    ///Property: File extension
16020    #[serde(skip_serializing_if = "Option::is_none")]
16021    #[cfg_attr(
16022        feature = "builder",
16023        builder(with = |value:impl Into<String>|vec![value.into()])
16024    )]
16025    pub extension: Option<Vec<String>>,
16026    ///Property: File name
16027    #[serde(default)]
16028    #[cfg_attr(
16029        feature = "builder",
16030        builder(with = |value:impl Into<String>|vec![value.into()])
16031    )]
16032    pub file_name: Vec<String>,
16033    ///Property: File size
16034    #[serde(
16035        skip_serializing_if = "Option::is_none",
16036        deserialize_with = "deserialize_opt_f64_vec",
16037        default
16038    )]
16039    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
16040    pub file_size: Option<Vec<f64>>,
16041    ///Property: Generator
16042    #[serde(skip_serializing_if = "Option::is_none")]
16043    #[cfg_attr(
16044        feature = "builder",
16045        builder(with = |value:impl Into<String>|vec![value.into()])
16046    )]
16047    pub generator: Option<Vec<String>>,
16048    ///Property: Detected IBANs
16049    #[serde(skip_serializing_if = "Option::is_none")]
16050    #[cfg_attr(
16051        feature = "builder",
16052        builder(with = |value:impl Into<String>|vec![value.into()])
16053    )]
16054    pub iban_mentioned: Option<Vec<String>>,
16055    ///Property: Index text
16056    #[serde(skip_serializing_if = "Option::is_none")]
16057    #[cfg_attr(
16058        feature = "builder",
16059        builder(with = |value:impl Into<String>|vec![value.into()])
16060    )]
16061    pub index_text: Option<Vec<String>>,
16062    ///Property: Detected IP addresses
16063    #[serde(skip_serializing_if = "Option::is_none")]
16064    #[cfg_attr(
16065        feature = "builder",
16066        builder(with = |value:impl Into<String>|vec![value.into()])
16067    )]
16068    pub ip_mentioned: Option<Vec<String>>,
16069    ///Property: Keywords
16070    #[serde(skip_serializing_if = "Option::is_none")]
16071    #[cfg_attr(
16072        feature = "builder",
16073        builder(with = |value:impl Into<String>|vec![value.into()])
16074    )]
16075    pub keywords: Option<Vec<String>>,
16076    ///Property: Language
16077    #[serde(skip_serializing_if = "Option::is_none")]
16078    #[cfg_attr(
16079        feature = "builder",
16080        builder(with = |value:impl Into<String>|vec![value.into()])
16081    )]
16082    pub language: Option<Vec<String>>,
16083    ///Property: Detected locations
16084    #[serde(skip_serializing_if = "Option::is_none")]
16085    #[cfg_attr(
16086        feature = "builder",
16087        builder(with = |value:impl Into<String>|vec![value.into()])
16088    )]
16089    pub location_mentioned: Option<Vec<String>>,
16090    ///Property: Message ID
16091    #[serde(skip_serializing_if = "Option::is_none")]
16092    #[cfg_attr(
16093        feature = "builder",
16094        builder(with = |value:impl Into<String>|vec![value.into()])
16095    )]
16096    pub message_id: Option<Vec<String>>,
16097    ///Property: MIME type
16098    #[serde(skip_serializing_if = "Option::is_none")]
16099    #[cfg_attr(
16100        feature = "builder",
16101        builder(with = |value:impl Into<String>|vec![value.into()])
16102    )]
16103    pub mime_type: Option<Vec<String>>,
16104    ///Property: Modified on
16105    #[serde(skip_serializing_if = "Option::is_none")]
16106    #[cfg_attr(
16107        feature = "builder",
16108        builder(with = |value:impl Into<String>|vec![value.into()])
16109    )]
16110    pub modified_at: Option<Vec<String>>,
16111    ///Property: Name
16112    #[serde(default)]
16113    #[cfg_attr(
16114        feature = "builder",
16115        builder(with = |value:impl Into<String>|vec![value.into()])
16116    )]
16117    pub name: Vec<String>,
16118    ///Property: Detected names
16119    #[serde(skip_serializing_if = "Option::is_none")]
16120    #[cfg_attr(
16121        feature = "builder",
16122        builder(with = |value:impl Into<String>|vec![value.into()])
16123    )]
16124    pub names_mentioned: Option<Vec<String>>,
16125    ///Property: Notes
16126    #[serde(skip_serializing_if = "Option::is_none")]
16127    #[cfg_attr(
16128        feature = "builder",
16129        builder(with = |value:impl Into<String>|vec![value.into()])
16130    )]
16131    pub notes: Option<Vec<String>>,
16132    ///Property: Folder
16133    #[serde(skip_serializing_if = "Option::is_none")]
16134    #[cfg_attr(
16135        feature = "builder",
16136        builder(with = |value:impl Into<String>|vec![value.into()])
16137    )]
16138    pub parent: Option<Vec<String>>,
16139    ///Property: Detected people
16140    #[serde(skip_serializing_if = "Option::is_none")]
16141    #[cfg_attr(
16142        feature = "builder",
16143        builder(with = |value:impl Into<String>|vec![value.into()])
16144    )]
16145    pub people_mentioned: Option<Vec<String>>,
16146    ///Property: Detected phones
16147    #[serde(skip_serializing_if = "Option::is_none")]
16148    #[cfg_attr(
16149        feature = "builder",
16150        builder(with = |value:impl Into<String>|vec![value.into()])
16151    )]
16152    pub phone_mentioned: Option<Vec<String>>,
16153    ///Property: Previous name
16154    #[serde(skip_serializing_if = "Option::is_none")]
16155    #[cfg_attr(
16156        feature = "builder",
16157        builder(with = |value:impl Into<String>|vec![value.into()])
16158    )]
16159    pub previous_name: Option<Vec<String>>,
16160    ///Property: Processed at
16161    #[serde(skip_serializing_if = "Option::is_none")]
16162    #[cfg_attr(
16163        feature = "builder",
16164        builder(with = |value:impl Into<String>|vec![value.into()])
16165    )]
16166    pub processed_at: Option<Vec<String>>,
16167    ///Property: Processing agent
16168    #[serde(skip_serializing_if = "Option::is_none")]
16169    #[cfg_attr(
16170        feature = "builder",
16171        builder(with = |value:impl Into<String>|vec![value.into()])
16172    )]
16173    pub processing_agent: Option<Vec<String>>,
16174    ///Property: Processing error
16175    #[serde(skip_serializing_if = "Option::is_none")]
16176    #[cfg_attr(
16177        feature = "builder",
16178        builder(with = |value:impl Into<String>|vec![value.into()])
16179    )]
16180    pub processing_error: Option<Vec<String>>,
16181    ///Property: Processing status
16182    #[serde(skip_serializing_if = "Option::is_none")]
16183    #[cfg_attr(
16184        feature = "builder",
16185        builder(with = |value:impl Into<String>|vec![value.into()])
16186    )]
16187    pub processing_status: Option<Vec<String>>,
16188    ///Property: Program
16189    #[serde(skip_serializing_if = "Option::is_none")]
16190    #[cfg_attr(
16191        feature = "builder",
16192        builder(with = |value:impl Into<String>|vec![value.into()])
16193    )]
16194    pub program: Option<Vec<String>>,
16195    ///Property: Program ID
16196    #[serde(skip_serializing_if = "Option::is_none")]
16197    #[cfg_attr(
16198        feature = "builder",
16199        builder(with = |value:impl Into<String>|vec![value.into()])
16200    )]
16201    pub program_id: Option<Vec<String>>,
16202    ///Property: Source document
16203    #[serde(skip_serializing_if = "Option::is_none")]
16204    #[cfg_attr(
16205        feature = "builder",
16206        builder(with = |value:impl Into<String>|vec![value.into()])
16207    )]
16208    pub proof: Option<Vec<String>>,
16209    ///Property: Published on
16210    #[serde(skip_serializing_if = "Option::is_none")]
16211    #[cfg_attr(
16212        feature = "builder",
16213        builder(with = |value:impl Into<String>|vec![value.into()])
16214    )]
16215    pub published_at: Option<Vec<String>>,
16216    ///Property: Publishing source
16217    #[serde(skip_serializing_if = "Option::is_none")]
16218    #[cfg_attr(
16219        feature = "builder",
16220        builder(with = |value:impl Into<String>|vec![value.into()])
16221    )]
16222    pub publisher: Option<Vec<String>>,
16223    ///Property: Publishing source URL
16224    #[serde(skip_serializing_if = "Option::is_none")]
16225    #[cfg_attr(
16226        feature = "builder",
16227        builder(with = |value:impl Into<String>|vec![value.into()])
16228    )]
16229    pub publisher_url: Option<Vec<String>>,
16230    ///Property: Retrieved on
16231    #[serde(skip_serializing_if = "Option::is_none")]
16232    #[cfg_attr(
16233        feature = "builder",
16234        builder(with = |value:impl Into<String>|vec![value.into()])
16235    )]
16236    pub retrieved_at: Option<Vec<String>>,
16237    ///Property: Source link
16238    #[serde(skip_serializing_if = "Option::is_none")]
16239    #[cfg_attr(
16240        feature = "builder",
16241        builder(with = |value:impl Into<String>|vec![value.into()])
16242    )]
16243    pub source_url: Option<Vec<String>>,
16244    ///Property: Summary
16245    #[serde(skip_serializing_if = "Option::is_none")]
16246    #[cfg_attr(
16247        feature = "builder",
16248        builder(with = |value:impl Into<String>|vec![value.into()])
16249    )]
16250    pub summary: Option<Vec<String>>,
16251    ///Property: Title
16252    #[serde(skip_serializing_if = "Option::is_none")]
16253    #[cfg_attr(
16254        feature = "builder",
16255        builder(with = |value:impl Into<String>|vec![value.into()])
16256    )]
16257    pub title: Option<Vec<String>>,
16258    ///Property: Topics
16259    #[serde(skip_serializing_if = "Option::is_none")]
16260    #[cfg_attr(
16261        feature = "builder",
16262        builder(with = |value:impl Into<String>|vec![value.into()])
16263    )]
16264    pub topics: Option<Vec<String>>,
16265    ///Property: The language of the translated text
16266    #[serde(skip_serializing_if = "Option::is_none")]
16267    #[cfg_attr(
16268        feature = "builder",
16269        builder(with = |value:impl Into<String>|vec![value.into()])
16270    )]
16271    pub translated_language: Option<Vec<String>>,
16272    ///Property: Translated version of the body text
16273    #[serde(skip_serializing_if = "Option::is_none")]
16274    #[cfg_attr(
16275        feature = "builder",
16276        builder(with = |value:impl Into<String>|vec![value.into()])
16277    )]
16278    pub translated_text: Option<Vec<String>>,
16279    ///Property: Weak alias
16280    #[serde(skip_serializing_if = "Option::is_none")]
16281    #[cfg_attr(
16282        feature = "builder",
16283        builder(with = |value:impl Into<String>|vec![value.into()])
16284    )]
16285    pub weak_alias: Option<Vec<String>>,
16286    ///Property: Wikidata ID
16287    #[serde(skip_serializing_if = "Option::is_none")]
16288    #[cfg_attr(
16289        feature = "builder",
16290        builder(with = |value:impl Into<String>|vec![value.into()])
16291    )]
16292    pub wikidata_id: Option<Vec<String>>,
16293    ///Property: Wikipedia Article
16294    #[serde(skip_serializing_if = "Option::is_none")]
16295    #[cfg_attr(
16296        feature = "builder",
16297        builder(with = |value:impl Into<String>|vec![value.into()])
16298    )]
16299    pub wikipedia_url: Option<Vec<String>>,
16300}
16301impl PlainText {
16302    /// Create a new entity with the given ID
16303    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
16304    pub fn new(id: impl Into<String>) -> Self {
16305        Self {
16306            id: id.into(),
16307            schema: "PlainText".to_string(),
16308            address: None,
16309            address_entity: None,
16310            aleph_url: None,
16311            alias: None,
16312            ancestors: None,
16313            author: None,
16314            authored_at: None,
16315            body_text: None,
16316            companies_mentioned: None,
16317            content_hash: None,
16318            country: None,
16319            crawler: None,
16320            created_at: None,
16321            date: None,
16322            description: None,
16323            detected_country: None,
16324            detected_language: None,
16325            email_mentioned: None,
16326            encoding: None,
16327            extension: None,
16328            file_name: Vec::new(),
16329            file_size: None,
16330            generator: None,
16331            iban_mentioned: None,
16332            index_text: None,
16333            ip_mentioned: None,
16334            keywords: None,
16335            language: None,
16336            location_mentioned: None,
16337            message_id: None,
16338            mime_type: None,
16339            modified_at: None,
16340            name: Vec::new(),
16341            names_mentioned: None,
16342            notes: None,
16343            parent: None,
16344            people_mentioned: None,
16345            phone_mentioned: None,
16346            previous_name: None,
16347            processed_at: None,
16348            processing_agent: None,
16349            processing_error: None,
16350            processing_status: None,
16351            program: None,
16352            program_id: None,
16353            proof: None,
16354            published_at: None,
16355            publisher: None,
16356            publisher_url: None,
16357            retrieved_at: None,
16358            source_url: None,
16359            summary: None,
16360            title: None,
16361            topics: None,
16362            translated_language: None,
16363            translated_text: None,
16364            weak_alias: None,
16365            wikidata_id: None,
16366            wikipedia_url: None,
16367        }
16368    }
16369    /// Get the schema name
16370    pub fn schema_name() -> &'static str {
16371        "PlainText"
16372    }
16373    /// Serialize to standard FTM nested JSON format
16374    ///
16375    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
16376    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
16377        let mut value = serde_json::to_value(self)?;
16378        if let Some(obj) = value.as_object_mut() {
16379            let id = obj.remove("id");
16380            let schema = obj.remove("schema");
16381            let properties = serde_json::Value::Object(std::mem::take(obj));
16382            if let Some(id) = id {
16383                obj.insert("id".into(), id);
16384            }
16385            if let Some(schema) = schema {
16386                obj.insert("schema".into(), schema);
16387            }
16388            obj.insert("properties".into(), properties);
16389        }
16390        serde_json::to_string(&value)
16391    }
16392}
16393///FTM Schema: Position
16394#[derive(Debug, Clone, Serialize, Deserialize)]
16395#[cfg_attr(feature = "builder", derive(Builder))]
16396#[serde(rename_all = "camelCase")]
16397pub struct Position {
16398    pub id: String,
16399    #[cfg_attr(feature = "builder", builder(default = "Position".to_string()))]
16400    pub schema: String,
16401    ///Property: Address
16402    #[serde(skip_serializing_if = "Option::is_none")]
16403    #[cfg_attr(
16404        feature = "builder",
16405        builder(with = |value:impl Into<String>|vec![value.into()])
16406    )]
16407    pub address: Option<Vec<String>>,
16408    ///Property: Address
16409    #[serde(skip_serializing_if = "Option::is_none")]
16410    #[cfg_attr(
16411        feature = "builder",
16412        builder(with = |value:impl Into<String>|vec![value.into()])
16413    )]
16414    pub address_entity: Option<Vec<String>>,
16415    ///Property: Aleph URL
16416    #[serde(skip_serializing_if = "Option::is_none")]
16417    #[cfg_attr(
16418        feature = "builder",
16419        builder(with = |value:impl Into<String>|vec![value.into()])
16420    )]
16421    pub aleph_url: Option<Vec<String>>,
16422    ///Property: Alias
16423    #[serde(skip_serializing_if = "Option::is_none")]
16424    #[cfg_attr(
16425        feature = "builder",
16426        builder(with = |value:impl Into<String>|vec![value.into()])
16427    )]
16428    pub alias: Option<Vec<String>>,
16429    ///Property: Country
16430    #[serde(skip_serializing_if = "Option::is_none")]
16431    #[cfg_attr(
16432        feature = "builder",
16433        builder(with = |value:impl Into<String>|vec![value.into()])
16434    )]
16435    pub country: Option<Vec<String>>,
16436    ///Property: Created at
16437    #[serde(skip_serializing_if = "Option::is_none")]
16438    #[cfg_attr(
16439        feature = "builder",
16440        builder(with = |value:impl Into<String>|vec![value.into()])
16441    )]
16442    pub created_at: Option<Vec<String>>,
16443    ///Property: Description
16444    #[serde(skip_serializing_if = "Option::is_none")]
16445    #[cfg_attr(
16446        feature = "builder",
16447        builder(with = |value:impl Into<String>|vec![value.into()])
16448    )]
16449    pub description: Option<Vec<String>>,
16450    ///Property: Dissolution date
16451    #[serde(skip_serializing_if = "Option::is_none")]
16452    #[cfg_attr(
16453        feature = "builder",
16454        builder(with = |value:impl Into<String>|vec![value.into()])
16455    )]
16456    pub dissolution_date: Option<Vec<String>>,
16457    ///Property: Inception date
16458    #[serde(skip_serializing_if = "Option::is_none")]
16459    #[cfg_attr(
16460        feature = "builder",
16461        builder(with = |value:impl Into<String>|vec![value.into()])
16462    )]
16463    pub inception_date: Option<Vec<String>>,
16464    ///Property: Index text
16465    #[serde(skip_serializing_if = "Option::is_none")]
16466    #[cfg_attr(
16467        feature = "builder",
16468        builder(with = |value:impl Into<String>|vec![value.into()])
16469    )]
16470    pub index_text: Option<Vec<String>>,
16471    ///Property: Keywords
16472    #[serde(skip_serializing_if = "Option::is_none")]
16473    #[cfg_attr(
16474        feature = "builder",
16475        builder(with = |value:impl Into<String>|vec![value.into()])
16476    )]
16477    pub keywords: Option<Vec<String>>,
16478    ///Property: Modified on
16479    #[serde(skip_serializing_if = "Option::is_none")]
16480    #[cfg_attr(
16481        feature = "builder",
16482        builder(with = |value:impl Into<String>|vec![value.into()])
16483    )]
16484    pub modified_at: Option<Vec<String>>,
16485    ///Property: Name
16486    #[serde(default)]
16487    #[cfg_attr(
16488        feature = "builder",
16489        builder(with = |value:impl Into<String>|vec![value.into()])
16490    )]
16491    pub name: Vec<String>,
16492    ///Property: Notes
16493    #[serde(skip_serializing_if = "Option::is_none")]
16494    #[cfg_attr(
16495        feature = "builder",
16496        builder(with = |value:impl Into<String>|vec![value.into()])
16497    )]
16498    pub notes: Option<Vec<String>>,
16499    ///Property: Total number of seats
16500    #[serde(
16501        skip_serializing_if = "Option::is_none",
16502        deserialize_with = "deserialize_opt_f64_vec",
16503        default
16504    )]
16505    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
16506    pub number_of_seats: Option<Vec<f64>>,
16507    ///Property: Organization
16508    #[serde(skip_serializing_if = "Option::is_none")]
16509    #[cfg_attr(
16510        feature = "builder",
16511        builder(with = |value:impl Into<String>|vec![value.into()])
16512    )]
16513    pub organization: Option<Vec<String>>,
16514    ///Property: Previous name
16515    #[serde(skip_serializing_if = "Option::is_none")]
16516    #[cfg_attr(
16517        feature = "builder",
16518        builder(with = |value:impl Into<String>|vec![value.into()])
16519    )]
16520    pub previous_name: Option<Vec<String>>,
16521    ///Property: Program
16522    #[serde(skip_serializing_if = "Option::is_none")]
16523    #[cfg_attr(
16524        feature = "builder",
16525        builder(with = |value:impl Into<String>|vec![value.into()])
16526    )]
16527    pub program: Option<Vec<String>>,
16528    ///Property: Program ID
16529    #[serde(skip_serializing_if = "Option::is_none")]
16530    #[cfg_attr(
16531        feature = "builder",
16532        builder(with = |value:impl Into<String>|vec![value.into()])
16533    )]
16534    pub program_id: Option<Vec<String>>,
16535    ///Property: Source document
16536    #[serde(skip_serializing_if = "Option::is_none")]
16537    #[cfg_attr(
16538        feature = "builder",
16539        builder(with = |value:impl Into<String>|vec![value.into()])
16540    )]
16541    pub proof: Option<Vec<String>>,
16542    ///Property: Publishing source
16543    #[serde(skip_serializing_if = "Option::is_none")]
16544    #[cfg_attr(
16545        feature = "builder",
16546        builder(with = |value:impl Into<String>|vec![value.into()])
16547    )]
16548    pub publisher: Option<Vec<String>>,
16549    ///Property: Publishing source URL
16550    #[serde(skip_serializing_if = "Option::is_none")]
16551    #[cfg_attr(
16552        feature = "builder",
16553        builder(with = |value:impl Into<String>|vec![value.into()])
16554    )]
16555    pub publisher_url: Option<Vec<String>>,
16556    ///Property: Retrieved on
16557    #[serde(skip_serializing_if = "Option::is_none")]
16558    #[cfg_attr(
16559        feature = "builder",
16560        builder(with = |value:impl Into<String>|vec![value.into()])
16561    )]
16562    pub retrieved_at: Option<Vec<String>>,
16563    ///Property: Source link
16564    #[serde(skip_serializing_if = "Option::is_none")]
16565    #[cfg_attr(
16566        feature = "builder",
16567        builder(with = |value:impl Into<String>|vec![value.into()])
16568    )]
16569    pub source_url: Option<Vec<String>>,
16570    ///Property: Subnational area
16571    #[serde(skip_serializing_if = "Option::is_none")]
16572    #[cfg_attr(
16573        feature = "builder",
16574        builder(with = |value:impl Into<String>|vec![value.into()])
16575    )]
16576    pub subnational_area: Option<Vec<String>>,
16577    ///Property: Summary
16578    #[serde(skip_serializing_if = "Option::is_none")]
16579    #[cfg_attr(
16580        feature = "builder",
16581        builder(with = |value:impl Into<String>|vec![value.into()])
16582    )]
16583    pub summary: Option<Vec<String>>,
16584    ///Property: Topics
16585    #[serde(skip_serializing_if = "Option::is_none")]
16586    #[cfg_attr(
16587        feature = "builder",
16588        builder(with = |value:impl Into<String>|vec![value.into()])
16589    )]
16590    pub topics: Option<Vec<String>>,
16591    ///Property: Weak alias
16592    #[serde(skip_serializing_if = "Option::is_none")]
16593    #[cfg_attr(
16594        feature = "builder",
16595        builder(with = |value:impl Into<String>|vec![value.into()])
16596    )]
16597    pub weak_alias: Option<Vec<String>>,
16598    ///Property: Wikidata ID
16599    #[serde(skip_serializing_if = "Option::is_none")]
16600    #[cfg_attr(
16601        feature = "builder",
16602        builder(with = |value:impl Into<String>|vec![value.into()])
16603    )]
16604    pub wikidata_id: Option<Vec<String>>,
16605    ///Property: Wikipedia Article
16606    #[serde(skip_serializing_if = "Option::is_none")]
16607    #[cfg_attr(
16608        feature = "builder",
16609        builder(with = |value:impl Into<String>|vec![value.into()])
16610    )]
16611    pub wikipedia_url: Option<Vec<String>>,
16612}
16613impl Position {
16614    /// Create a new entity with the given ID
16615    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
16616    pub fn new(id: impl Into<String>) -> Self {
16617        Self {
16618            id: id.into(),
16619            schema: "Position".to_string(),
16620            address: None,
16621            address_entity: None,
16622            aleph_url: None,
16623            alias: None,
16624            country: None,
16625            created_at: None,
16626            description: None,
16627            dissolution_date: None,
16628            inception_date: None,
16629            index_text: None,
16630            keywords: None,
16631            modified_at: None,
16632            name: Vec::new(),
16633            notes: None,
16634            number_of_seats: None,
16635            organization: None,
16636            previous_name: None,
16637            program: None,
16638            program_id: None,
16639            proof: None,
16640            publisher: None,
16641            publisher_url: None,
16642            retrieved_at: None,
16643            source_url: None,
16644            subnational_area: None,
16645            summary: None,
16646            topics: None,
16647            weak_alias: None,
16648            wikidata_id: None,
16649            wikipedia_url: None,
16650        }
16651    }
16652    /// Get the schema name
16653    pub fn schema_name() -> &'static str {
16654        "Position"
16655    }
16656    /// Serialize to standard FTM nested JSON format
16657    ///
16658    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
16659    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
16660        let mut value = serde_json::to_value(self)?;
16661        if let Some(obj) = value.as_object_mut() {
16662            let id = obj.remove("id");
16663            let schema = obj.remove("schema");
16664            let properties = serde_json::Value::Object(std::mem::take(obj));
16665            if let Some(id) = id {
16666                obj.insert("id".into(), id);
16667            }
16668            if let Some(schema) = schema {
16669                obj.insert("schema".into(), schema);
16670            }
16671            obj.insert("properties".into(), properties);
16672        }
16673        serde_json::to_string(&value)
16674    }
16675}
16676///FTM Schema: Project
16677#[derive(Debug, Clone, Serialize, Deserialize)]
16678#[cfg_attr(feature = "builder", derive(Builder))]
16679#[serde(rename_all = "camelCase")]
16680pub struct Project {
16681    pub id: String,
16682    #[cfg_attr(feature = "builder", builder(default = "Project".to_string()))]
16683    pub schema: String,
16684    ///Property: Address
16685    #[serde(skip_serializing_if = "Option::is_none")]
16686    #[cfg_attr(
16687        feature = "builder",
16688        builder(with = |value:impl Into<String>|vec![value.into()])
16689    )]
16690    pub address: Option<Vec<String>>,
16691    ///Property: Address
16692    #[serde(skip_serializing_if = "Option::is_none")]
16693    #[cfg_attr(
16694        feature = "builder",
16695        builder(with = |value:impl Into<String>|vec![value.into()])
16696    )]
16697    pub address_entity: Option<Vec<String>>,
16698    ///Property: Aleph URL
16699    #[serde(skip_serializing_if = "Option::is_none")]
16700    #[cfg_attr(
16701        feature = "builder",
16702        builder(with = |value:impl Into<String>|vec![value.into()])
16703    )]
16704    pub aleph_url: Option<Vec<String>>,
16705    ///Property: Alias
16706    #[serde(skip_serializing_if = "Option::is_none")]
16707    #[cfg_attr(
16708        feature = "builder",
16709        builder(with = |value:impl Into<String>|vec![value.into()])
16710    )]
16711    pub alias: Option<Vec<String>>,
16712    ///Property: Amount
16713    #[serde(
16714        skip_serializing_if = "Option::is_none",
16715        deserialize_with = "deserialize_opt_f64_vec",
16716        default
16717    )]
16718    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
16719    pub amount: Option<Vec<f64>>,
16720    ///Property: Amount in EUR
16721    #[serde(
16722        skip_serializing_if = "Option::is_none",
16723        deserialize_with = "deserialize_opt_f64_vec",
16724        default
16725    )]
16726    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
16727    pub amount_eur: Option<Vec<f64>>,
16728    ///Property: Amount in USD
16729    #[serde(
16730        skip_serializing_if = "Option::is_none",
16731        deserialize_with = "deserialize_opt_f64_vec",
16732        default
16733    )]
16734    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
16735    pub amount_usd: Option<Vec<f64>>,
16736    ///Property: Country
16737    #[serde(skip_serializing_if = "Option::is_none")]
16738    #[cfg_attr(
16739        feature = "builder",
16740        builder(with = |value:impl Into<String>|vec![value.into()])
16741    )]
16742    pub country: Option<Vec<String>>,
16743    ///Property: Created at
16744    #[serde(skip_serializing_if = "Option::is_none")]
16745    #[cfg_attr(
16746        feature = "builder",
16747        builder(with = |value:impl Into<String>|vec![value.into()])
16748    )]
16749    pub created_at: Option<Vec<String>>,
16750    ///Property: Currency
16751    #[serde(skip_serializing_if = "Option::is_none")]
16752    #[cfg_attr(
16753        feature = "builder",
16754        builder(with = |value:impl Into<String>|vec![value.into()])
16755    )]
16756    pub currency: Option<Vec<String>>,
16757    ///Property: Date
16758    #[serde(skip_serializing_if = "Option::is_none")]
16759    #[cfg_attr(
16760        feature = "builder",
16761        builder(with = |value:impl Into<String>|vec![value.into()])
16762    )]
16763    pub date: Option<Vec<String>>,
16764    ///Property: Description
16765    #[serde(skip_serializing_if = "Option::is_none")]
16766    #[cfg_attr(
16767        feature = "builder",
16768        builder(with = |value:impl Into<String>|vec![value.into()])
16769    )]
16770    pub description: Option<Vec<String>>,
16771    ///Property: End date
16772    #[serde(skip_serializing_if = "Option::is_none")]
16773    #[cfg_attr(
16774        feature = "builder",
16775        builder(with = |value:impl Into<String>|vec![value.into()])
16776    )]
16777    pub end_date: Option<Vec<String>>,
16778    ///Property: Project goal
16779    #[serde(skip_serializing_if = "Option::is_none")]
16780    #[cfg_attr(
16781        feature = "builder",
16782        builder(with = |value:impl Into<String>|vec![value.into()])
16783    )]
16784    pub goal: Option<Vec<String>>,
16785    ///Property: Index text
16786    #[serde(skip_serializing_if = "Option::is_none")]
16787    #[cfg_attr(
16788        feature = "builder",
16789        builder(with = |value:impl Into<String>|vec![value.into()])
16790    )]
16791    pub index_text: Option<Vec<String>>,
16792    ///Property: Keywords
16793    #[serde(skip_serializing_if = "Option::is_none")]
16794    #[cfg_attr(
16795        feature = "builder",
16796        builder(with = |value:impl Into<String>|vec![value.into()])
16797    )]
16798    pub keywords: Option<Vec<String>>,
16799    ///Property: Modified on
16800    #[serde(skip_serializing_if = "Option::is_none")]
16801    #[cfg_attr(
16802        feature = "builder",
16803        builder(with = |value:impl Into<String>|vec![value.into()])
16804    )]
16805    pub modified_at: Option<Vec<String>>,
16806    ///Property: Name
16807    #[serde(default)]
16808    #[cfg_attr(
16809        feature = "builder",
16810        builder(with = |value:impl Into<String>|vec![value.into()])
16811    )]
16812    pub name: Vec<String>,
16813    ///Property: Detected names
16814    #[serde(skip_serializing_if = "Option::is_none")]
16815    #[cfg_attr(
16816        feature = "builder",
16817        builder(with = |value:impl Into<String>|vec![value.into()])
16818    )]
16819    pub names_mentioned: Option<Vec<String>>,
16820    ///Property: Notes
16821    #[serde(skip_serializing_if = "Option::is_none")]
16822    #[cfg_attr(
16823        feature = "builder",
16824        builder(with = |value:impl Into<String>|vec![value.into()])
16825    )]
16826    pub notes: Option<Vec<String>>,
16827    ///Property: Phase
16828    #[serde(skip_serializing_if = "Option::is_none")]
16829    #[cfg_attr(
16830        feature = "builder",
16831        builder(with = |value:impl Into<String>|vec![value.into()])
16832    )]
16833    pub phase: Option<Vec<String>>,
16834    ///Property: Previous name
16835    #[serde(skip_serializing_if = "Option::is_none")]
16836    #[cfg_attr(
16837        feature = "builder",
16838        builder(with = |value:impl Into<String>|vec![value.into()])
16839    )]
16840    pub previous_name: Option<Vec<String>>,
16841    ///Property: Program
16842    #[serde(skip_serializing_if = "Option::is_none")]
16843    #[cfg_attr(
16844        feature = "builder",
16845        builder(with = |value:impl Into<String>|vec![value.into()])
16846    )]
16847    pub program: Option<Vec<String>>,
16848    ///Property: Program ID
16849    #[serde(skip_serializing_if = "Option::is_none")]
16850    #[cfg_attr(
16851        feature = "builder",
16852        builder(with = |value:impl Into<String>|vec![value.into()])
16853    )]
16854    pub program_id: Option<Vec<String>>,
16855    ///Property: Project ID
16856    #[serde(skip_serializing_if = "Option::is_none")]
16857    #[cfg_attr(
16858        feature = "builder",
16859        builder(with = |value:impl Into<String>|vec![value.into()])
16860    )]
16861    pub project_id: Option<Vec<String>>,
16862    ///Property: Source document
16863    #[serde(skip_serializing_if = "Option::is_none")]
16864    #[cfg_attr(
16865        feature = "builder",
16866        builder(with = |value:impl Into<String>|vec![value.into()])
16867    )]
16868    pub proof: Option<Vec<String>>,
16869    ///Property: Publishing source
16870    #[serde(skip_serializing_if = "Option::is_none")]
16871    #[cfg_attr(
16872        feature = "builder",
16873        builder(with = |value:impl Into<String>|vec![value.into()])
16874    )]
16875    pub publisher: Option<Vec<String>>,
16876    ///Property: Publishing source URL
16877    #[serde(skip_serializing_if = "Option::is_none")]
16878    #[cfg_attr(
16879        feature = "builder",
16880        builder(with = |value:impl Into<String>|vec![value.into()])
16881    )]
16882    pub publisher_url: Option<Vec<String>>,
16883    ///Property: Record ID
16884    #[serde(skip_serializing_if = "Option::is_none")]
16885    #[cfg_attr(
16886        feature = "builder",
16887        builder(with = |value:impl Into<String>|vec![value.into()])
16888    )]
16889    pub record_id: Option<Vec<String>>,
16890    ///Property: Retrieved on
16891    #[serde(skip_serializing_if = "Option::is_none")]
16892    #[cfg_attr(
16893        feature = "builder",
16894        builder(with = |value:impl Into<String>|vec![value.into()])
16895    )]
16896    pub retrieved_at: Option<Vec<String>>,
16897    ///Property: Source link
16898    #[serde(skip_serializing_if = "Option::is_none")]
16899    #[cfg_attr(
16900        feature = "builder",
16901        builder(with = |value:impl Into<String>|vec![value.into()])
16902    )]
16903    pub source_url: Option<Vec<String>>,
16904    ///Property: Start date
16905    #[serde(skip_serializing_if = "Option::is_none")]
16906    #[cfg_attr(
16907        feature = "builder",
16908        builder(with = |value:impl Into<String>|vec![value.into()])
16909    )]
16910    pub start_date: Option<Vec<String>>,
16911    ///Property: Status
16912    #[serde(skip_serializing_if = "Option::is_none")]
16913    #[cfg_attr(
16914        feature = "builder",
16915        builder(with = |value:impl Into<String>|vec![value.into()])
16916    )]
16917    pub status: Option<Vec<String>>,
16918    ///Property: Summary
16919    #[serde(skip_serializing_if = "Option::is_none")]
16920    #[cfg_attr(
16921        feature = "builder",
16922        builder(with = |value:impl Into<String>|vec![value.into()])
16923    )]
16924    pub summary: Option<Vec<String>>,
16925    ///Property: Topics
16926    #[serde(skip_serializing_if = "Option::is_none")]
16927    #[cfg_attr(
16928        feature = "builder",
16929        builder(with = |value:impl Into<String>|vec![value.into()])
16930    )]
16931    pub topics: Option<Vec<String>>,
16932    ///Property: Weak alias
16933    #[serde(skip_serializing_if = "Option::is_none")]
16934    #[cfg_attr(
16935        feature = "builder",
16936        builder(with = |value:impl Into<String>|vec![value.into()])
16937    )]
16938    pub weak_alias: Option<Vec<String>>,
16939    ///Property: Wikidata ID
16940    #[serde(skip_serializing_if = "Option::is_none")]
16941    #[cfg_attr(
16942        feature = "builder",
16943        builder(with = |value:impl Into<String>|vec![value.into()])
16944    )]
16945    pub wikidata_id: Option<Vec<String>>,
16946    ///Property: Wikipedia Article
16947    #[serde(skip_serializing_if = "Option::is_none")]
16948    #[cfg_attr(
16949        feature = "builder",
16950        builder(with = |value:impl Into<String>|vec![value.into()])
16951    )]
16952    pub wikipedia_url: Option<Vec<String>>,
16953}
16954impl Project {
16955    /// Create a new entity with the given ID
16956    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
16957    pub fn new(id: impl Into<String>) -> Self {
16958        Self {
16959            id: id.into(),
16960            schema: "Project".to_string(),
16961            address: None,
16962            address_entity: None,
16963            aleph_url: None,
16964            alias: None,
16965            amount: None,
16966            amount_eur: None,
16967            amount_usd: None,
16968            country: None,
16969            created_at: None,
16970            currency: None,
16971            date: None,
16972            description: None,
16973            end_date: None,
16974            goal: None,
16975            index_text: None,
16976            keywords: None,
16977            modified_at: None,
16978            name: Vec::new(),
16979            names_mentioned: None,
16980            notes: None,
16981            phase: None,
16982            previous_name: None,
16983            program: None,
16984            program_id: None,
16985            project_id: None,
16986            proof: None,
16987            publisher: None,
16988            publisher_url: None,
16989            record_id: None,
16990            retrieved_at: None,
16991            source_url: None,
16992            start_date: None,
16993            status: None,
16994            summary: None,
16995            topics: None,
16996            weak_alias: None,
16997            wikidata_id: None,
16998            wikipedia_url: None,
16999        }
17000    }
17001    /// Get the schema name
17002    pub fn schema_name() -> &'static str {
17003        "Project"
17004    }
17005    /// Serialize to standard FTM nested JSON format
17006    ///
17007    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
17008    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
17009        let mut value = serde_json::to_value(self)?;
17010        if let Some(obj) = value.as_object_mut() {
17011            let id = obj.remove("id");
17012            let schema = obj.remove("schema");
17013            let properties = serde_json::Value::Object(std::mem::take(obj));
17014            if let Some(id) = id {
17015                obj.insert("id".into(), id);
17016            }
17017            if let Some(schema) = schema {
17018                obj.insert("schema".into(), schema);
17019            }
17020            obj.insert("properties".into(), properties);
17021        }
17022        serde_json::to_string(&value)
17023    }
17024}
17025///FTM Schema: Project participant
17026#[derive(Debug, Clone, Serialize, Deserialize)]
17027#[cfg_attr(feature = "builder", derive(Builder))]
17028#[serde(rename_all = "camelCase")]
17029pub struct ProjectParticipant {
17030    pub id: String,
17031    #[cfg_attr(feature = "builder", builder(default = "ProjectParticipant".to_string()))]
17032    pub schema: String,
17033    ///Property: Aleph URL
17034    #[serde(skip_serializing_if = "Option::is_none")]
17035    #[cfg_attr(
17036        feature = "builder",
17037        builder(with = |value:impl Into<String>|vec![value.into()])
17038    )]
17039    pub aleph_url: Option<Vec<String>>,
17040    ///Property: Date
17041    #[serde(skip_serializing_if = "Option::is_none")]
17042    #[cfg_attr(
17043        feature = "builder",
17044        builder(with = |value:impl Into<String>|vec![value.into()])
17045    )]
17046    pub date: Option<Vec<String>>,
17047    ///Property: Description
17048    #[serde(skip_serializing_if = "Option::is_none")]
17049    #[cfg_attr(
17050        feature = "builder",
17051        builder(with = |value:impl Into<String>|vec![value.into()])
17052    )]
17053    pub description: Option<Vec<String>>,
17054    ///Property: End date
17055    #[serde(skip_serializing_if = "Option::is_none")]
17056    #[cfg_attr(
17057        feature = "builder",
17058        builder(with = |value:impl Into<String>|vec![value.into()])
17059    )]
17060    pub end_date: Option<Vec<String>>,
17061    ///Property: Index text
17062    #[serde(skip_serializing_if = "Option::is_none")]
17063    #[cfg_attr(
17064        feature = "builder",
17065        builder(with = |value:impl Into<String>|vec![value.into()])
17066    )]
17067    pub index_text: Option<Vec<String>>,
17068    ///Property: Modified on
17069    #[serde(skip_serializing_if = "Option::is_none")]
17070    #[cfg_attr(
17071        feature = "builder",
17072        builder(with = |value:impl Into<String>|vec![value.into()])
17073    )]
17074    pub modified_at: Option<Vec<String>>,
17075    ///Property: Detected names
17076    #[serde(skip_serializing_if = "Option::is_none")]
17077    #[cfg_attr(
17078        feature = "builder",
17079        builder(with = |value:impl Into<String>|vec![value.into()])
17080    )]
17081    pub names_mentioned: Option<Vec<String>>,
17082    ///Property: Participant
17083    #[serde(skip_serializing_if = "Option::is_none")]
17084    #[cfg_attr(
17085        feature = "builder",
17086        builder(with = |value:impl Into<String>|vec![value.into()])
17087    )]
17088    pub participant: Option<Vec<String>>,
17089    ///Property: Project
17090    #[serde(skip_serializing_if = "Option::is_none")]
17091    #[cfg_attr(
17092        feature = "builder",
17093        builder(with = |value:impl Into<String>|vec![value.into()])
17094    )]
17095    pub project: Option<Vec<String>>,
17096    ///Property: Source document
17097    #[serde(skip_serializing_if = "Option::is_none")]
17098    #[cfg_attr(
17099        feature = "builder",
17100        builder(with = |value:impl Into<String>|vec![value.into()])
17101    )]
17102    pub proof: Option<Vec<String>>,
17103    ///Property: Publishing source
17104    #[serde(skip_serializing_if = "Option::is_none")]
17105    #[cfg_attr(
17106        feature = "builder",
17107        builder(with = |value:impl Into<String>|vec![value.into()])
17108    )]
17109    pub publisher: Option<Vec<String>>,
17110    ///Property: Publishing source URL
17111    #[serde(skip_serializing_if = "Option::is_none")]
17112    #[cfg_attr(
17113        feature = "builder",
17114        builder(with = |value:impl Into<String>|vec![value.into()])
17115    )]
17116    pub publisher_url: Option<Vec<String>>,
17117    ///Property: Record ID
17118    #[serde(skip_serializing_if = "Option::is_none")]
17119    #[cfg_attr(
17120        feature = "builder",
17121        builder(with = |value:impl Into<String>|vec![value.into()])
17122    )]
17123    pub record_id: Option<Vec<String>>,
17124    ///Property: Retrieved on
17125    #[serde(skip_serializing_if = "Option::is_none")]
17126    #[cfg_attr(
17127        feature = "builder",
17128        builder(with = |value:impl Into<String>|vec![value.into()])
17129    )]
17130    pub retrieved_at: Option<Vec<String>>,
17131    ///Property: Role
17132    #[serde(skip_serializing_if = "Option::is_none")]
17133    #[cfg_attr(
17134        feature = "builder",
17135        builder(with = |value:impl Into<String>|vec![value.into()])
17136    )]
17137    pub role: Option<Vec<String>>,
17138    ///Property: Source link
17139    #[serde(skip_serializing_if = "Option::is_none")]
17140    #[cfg_attr(
17141        feature = "builder",
17142        builder(with = |value:impl Into<String>|vec![value.into()])
17143    )]
17144    pub source_url: Option<Vec<String>>,
17145    ///Property: Start date
17146    #[serde(skip_serializing_if = "Option::is_none")]
17147    #[cfg_attr(
17148        feature = "builder",
17149        builder(with = |value:impl Into<String>|vec![value.into()])
17150    )]
17151    pub start_date: Option<Vec<String>>,
17152    ///Property: Status
17153    #[serde(skip_serializing_if = "Option::is_none")]
17154    #[cfg_attr(
17155        feature = "builder",
17156        builder(with = |value:impl Into<String>|vec![value.into()])
17157    )]
17158    pub status: Option<Vec<String>>,
17159    ///Property: Summary
17160    #[serde(skip_serializing_if = "Option::is_none")]
17161    #[cfg_attr(
17162        feature = "builder",
17163        builder(with = |value:impl Into<String>|vec![value.into()])
17164    )]
17165    pub summary: Option<Vec<String>>,
17166}
17167impl ProjectParticipant {
17168    /// Create a new entity with the given ID
17169    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
17170    pub fn new(id: impl Into<String>) -> Self {
17171        Self {
17172            id: id.into(),
17173            schema: "ProjectParticipant".to_string(),
17174            aleph_url: None,
17175            date: None,
17176            description: None,
17177            end_date: None,
17178            index_text: None,
17179            modified_at: None,
17180            names_mentioned: None,
17181            participant: None,
17182            project: None,
17183            proof: None,
17184            publisher: None,
17185            publisher_url: None,
17186            record_id: None,
17187            retrieved_at: None,
17188            role: None,
17189            source_url: None,
17190            start_date: None,
17191            status: None,
17192            summary: None,
17193        }
17194    }
17195    /// Get the schema name
17196    pub fn schema_name() -> &'static str {
17197        "ProjectParticipant"
17198    }
17199    /// Serialize to standard FTM nested JSON format
17200    ///
17201    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
17202    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
17203        let mut value = serde_json::to_value(self)?;
17204        if let Some(obj) = value.as_object_mut() {
17205            let id = obj.remove("id");
17206            let schema = obj.remove("schema");
17207            let properties = serde_json::Value::Object(std::mem::take(obj));
17208            if let Some(id) = id {
17209                obj.insert("id".into(), id);
17210            }
17211            if let Some(schema) = schema {
17212                obj.insert("schema".into(), schema);
17213            }
17214            obj.insert("properties".into(), properties);
17215        }
17216        serde_json::to_string(&value)
17217    }
17218}
17219///FTM Schema: Public body
17220#[derive(Debug, Clone, Serialize, Deserialize)]
17221#[cfg_attr(feature = "builder", derive(Builder))]
17222#[serde(rename_all = "camelCase")]
17223pub struct PublicBody {
17224    pub id: String,
17225    #[cfg_attr(feature = "builder", builder(default = "PublicBody".to_string()))]
17226    pub schema: String,
17227    ///Property: Abbreviation
17228    #[serde(skip_serializing_if = "Option::is_none")]
17229    #[cfg_attr(
17230        feature = "builder",
17231        builder(with = |value:impl Into<String>|vec![value.into()])
17232    )]
17233    pub abbreviation: Option<Vec<String>>,
17234    ///Property: Address
17235    #[serde(skip_serializing_if = "Option::is_none")]
17236    #[cfg_attr(
17237        feature = "builder",
17238        builder(with = |value:impl Into<String>|vec![value.into()])
17239    )]
17240    pub address: Option<Vec<String>>,
17241    ///Property: Address
17242    #[serde(skip_serializing_if = "Option::is_none")]
17243    #[cfg_attr(
17244        feature = "builder",
17245        builder(with = |value:impl Into<String>|vec![value.into()])
17246    )]
17247    pub address_entity: Option<Vec<String>>,
17248    ///Property: Aleph URL
17249    #[serde(skip_serializing_if = "Option::is_none")]
17250    #[cfg_attr(
17251        feature = "builder",
17252        builder(with = |value:impl Into<String>|vec![value.into()])
17253    )]
17254    pub aleph_url: Option<Vec<String>>,
17255    ///Property: Alias
17256    #[serde(skip_serializing_if = "Option::is_none")]
17257    #[cfg_attr(
17258        feature = "builder",
17259        builder(with = |value:impl Into<String>|vec![value.into()])
17260    )]
17261    pub alias: Option<Vec<String>>,
17262    ///Property: BrightQuery ID
17263    #[serde(skip_serializing_if = "Option::is_none")]
17264    #[cfg_attr(
17265        feature = "builder",
17266        builder(with = |value:impl Into<String>|vec![value.into()])
17267    )]
17268    pub bright_query_id: Option<Vec<String>>,
17269    ///Property: BrightQuery Organization ID
17270    #[serde(skip_serializing_if = "Option::is_none")]
17271    #[cfg_attr(
17272        feature = "builder",
17273        builder(with = |value:impl Into<String>|vec![value.into()])
17274    )]
17275    pub bright_query_org_id: Option<Vec<String>>,
17276    ///Property: Bureau van Dijk ID
17277    #[serde(skip_serializing_if = "Option::is_none")]
17278    #[cfg_attr(
17279        feature = "builder",
17280        builder(with = |value:impl Into<String>|vec![value.into()])
17281    )]
17282    pub bvd_id: Option<Vec<String>>,
17283    ///Property: CAGE
17284    #[serde(skip_serializing_if = "Option::is_none")]
17285    #[cfg_attr(
17286        feature = "builder",
17287        builder(with = |value:impl Into<String>|vec![value.into()])
17288    )]
17289    pub cage_code: Option<Vec<String>>,
17290    ///Property: Classification
17291    #[serde(skip_serializing_if = "Option::is_none")]
17292    #[cfg_attr(
17293        feature = "builder",
17294        builder(with = |value:impl Into<String>|vec![value.into()])
17295    )]
17296    pub classification: Option<Vec<String>>,
17297    ///Property: Country
17298    #[serde(skip_serializing_if = "Option::is_none")]
17299    #[cfg_attr(
17300        feature = "builder",
17301        builder(with = |value:impl Into<String>|vec![value.into()])
17302    )]
17303    pub country: Option<Vec<String>>,
17304    ///Property: Created at
17305    #[serde(skip_serializing_if = "Option::is_none")]
17306    #[cfg_attr(
17307        feature = "builder",
17308        builder(with = |value:impl Into<String>|vec![value.into()])
17309    )]
17310    pub created_at: Option<Vec<String>>,
17311    ///Property: Description
17312    #[serde(skip_serializing_if = "Option::is_none")]
17313    #[cfg_attr(
17314        feature = "builder",
17315        builder(with = |value:impl Into<String>|vec![value.into()])
17316    )]
17317    pub description: Option<Vec<String>>,
17318    ///Property: Dissolution date
17319    #[serde(skip_serializing_if = "Option::is_none")]
17320    #[cfg_attr(
17321        feature = "builder",
17322        builder(with = |value:impl Into<String>|vec![value.into()])
17323    )]
17324    pub dissolution_date: Option<Vec<String>>,
17325    ///Property: DUNS
17326    #[serde(skip_serializing_if = "Option::is_none")]
17327    #[cfg_attr(
17328        feature = "builder",
17329        builder(with = |value:impl Into<String>|vec![value.into()])
17330    )]
17331    pub duns_code: Option<Vec<String>>,
17332    ///Property: Email
17333    #[serde(skip_serializing_if = "Option::is_none")]
17334    #[cfg_attr(
17335        feature = "builder",
17336        builder(with = |value:impl Into<String>|vec![value.into()])
17337    )]
17338    pub email: Option<Vec<String>>,
17339    ///Property: GIIN
17340    #[serde(skip_serializing_if = "Option::is_none")]
17341    #[cfg_attr(
17342        feature = "builder",
17343        builder(with = |value:impl Into<String>|vec![value.into()])
17344    )]
17345    pub gii_number: Option<Vec<String>>,
17346    ///Property: ICIJ ID
17347    #[serde(skip_serializing_if = "Option::is_none")]
17348    #[cfg_attr(
17349        feature = "builder",
17350        builder(with = |value:impl Into<String>|vec![value.into()])
17351    )]
17352    pub icij_id: Option<Vec<String>>,
17353    ///Property: ID Number
17354    #[serde(skip_serializing_if = "Option::is_none")]
17355    #[cfg_attr(
17356        feature = "builder",
17357        builder(with = |value:impl Into<String>|vec![value.into()])
17358    )]
17359    pub id_number: Option<Vec<String>>,
17360    ///Property: IMO Number
17361    #[serde(skip_serializing_if = "Option::is_none")]
17362    #[cfg_attr(
17363        feature = "builder",
17364        builder(with = |value:impl Into<String>|vec![value.into()])
17365    )]
17366    pub imo_number: Option<Vec<String>>,
17367    ///Property: Incorporation date
17368    #[serde(skip_serializing_if = "Option::is_none")]
17369    #[cfg_attr(
17370        feature = "builder",
17371        builder(with = |value:impl Into<String>|vec![value.into()])
17372    )]
17373    pub incorporation_date: Option<Vec<String>>,
17374    ///Property: Index text
17375    #[serde(skip_serializing_if = "Option::is_none")]
17376    #[cfg_attr(
17377        feature = "builder",
17378        builder(with = |value:impl Into<String>|vec![value.into()])
17379    )]
17380    pub index_text: Option<Vec<String>>,
17381    ///Property: INN
17382    #[serde(skip_serializing_if = "Option::is_none")]
17383    #[cfg_attr(
17384        feature = "builder",
17385        builder(with = |value:impl Into<String>|vec![value.into()])
17386    )]
17387    pub inn_code: Option<Vec<String>>,
17388    ///Property: Jurisdiction
17389    #[serde(skip_serializing_if = "Option::is_none")]
17390    #[cfg_attr(
17391        feature = "builder",
17392        builder(with = |value:impl Into<String>|vec![value.into()])
17393    )]
17394    pub jurisdiction: Option<Vec<String>>,
17395    ///Property: Keywords
17396    #[serde(skip_serializing_if = "Option::is_none")]
17397    #[cfg_attr(
17398        feature = "builder",
17399        builder(with = |value:impl Into<String>|vec![value.into()])
17400    )]
17401    pub keywords: Option<Vec<String>>,
17402    ///Property: Legal form
17403    #[serde(skip_serializing_if = "Option::is_none")]
17404    #[cfg_attr(
17405        feature = "builder",
17406        builder(with = |value:impl Into<String>|vec![value.into()])
17407    )]
17408    pub legal_form: Option<Vec<String>>,
17409    ///Property: LEI
17410    #[serde(skip_serializing_if = "Option::is_none")]
17411    #[cfg_attr(
17412        feature = "builder",
17413        builder(with = |value:impl Into<String>|vec![value.into()])
17414    )]
17415    pub lei_code: Option<Vec<String>>,
17416    ///Property: License Number
17417    #[serde(skip_serializing_if = "Option::is_none")]
17418    #[cfg_attr(
17419        feature = "builder",
17420        builder(with = |value:impl Into<String>|vec![value.into()])
17421    )]
17422    pub license_number: Option<Vec<String>>,
17423    ///Property: Country of origin
17424    #[serde(skip_serializing_if = "Option::is_none")]
17425    #[cfg_attr(
17426        feature = "builder",
17427        builder(with = |value:impl Into<String>|vec![value.into()])
17428    )]
17429    pub main_country: Option<Vec<String>>,
17430    ///Property: Modified on
17431    #[serde(skip_serializing_if = "Option::is_none")]
17432    #[cfg_attr(
17433        feature = "builder",
17434        builder(with = |value:impl Into<String>|vec![value.into()])
17435    )]
17436    pub modified_at: Option<Vec<String>>,
17437    ///Property: Name
17438    #[serde(default)]
17439    #[cfg_attr(
17440        feature = "builder",
17441        builder(with = |value:impl Into<String>|vec![value.into()])
17442    )]
17443    pub name: Vec<String>,
17444    ///Property: Notes
17445    #[serde(skip_serializing_if = "Option::is_none")]
17446    #[cfg_attr(
17447        feature = "builder",
17448        builder(with = |value:impl Into<String>|vec![value.into()])
17449    )]
17450    pub notes: Option<Vec<String>>,
17451    ///Property: NPI
17452    #[serde(skip_serializing_if = "Option::is_none")]
17453    #[cfg_attr(
17454        feature = "builder",
17455        builder(with = |value:impl Into<String>|vec![value.into()])
17456    )]
17457    pub npi_code: Option<Vec<String>>,
17458    ///Property: OGRN
17459    #[serde(skip_serializing_if = "Option::is_none")]
17460    #[cfg_attr(
17461        feature = "builder",
17462        builder(with = |value:impl Into<String>|vec![value.into()])
17463    )]
17464    pub ogrn_code: Option<Vec<String>>,
17465    ///Property: OKPO
17466    #[serde(skip_serializing_if = "Option::is_none")]
17467    #[cfg_attr(
17468        feature = "builder",
17469        builder(with = |value:impl Into<String>|vec![value.into()])
17470    )]
17471    pub okpo_code: Option<Vec<String>>,
17472    ///Property: OpenCorporates URL
17473    #[serde(skip_serializing_if = "Option::is_none")]
17474    #[cfg_attr(
17475        feature = "builder",
17476        builder(with = |value:impl Into<String>|vec![value.into()])
17477    )]
17478    pub opencorporates_url: Option<Vec<String>>,
17479    ///Property: Parent company
17480    #[serde(skip_serializing_if = "Option::is_none")]
17481    #[cfg_attr(
17482        feature = "builder",
17483        builder(with = |value:impl Into<String>|vec![value.into()])
17484    )]
17485    pub parent: Option<Vec<String>>,
17486    ///Property: PermID
17487    #[serde(skip_serializing_if = "Option::is_none")]
17488    #[cfg_attr(
17489        feature = "builder",
17490        builder(with = |value:impl Into<String>|vec![value.into()])
17491    )]
17492    pub perm_id: Option<Vec<String>>,
17493    ///Property: Phone
17494    #[serde(skip_serializing_if = "Option::is_none")]
17495    #[cfg_attr(
17496        feature = "builder",
17497        builder(with = |value:impl Into<String>|vec![value.into()])
17498    )]
17499    pub phone: Option<Vec<String>>,
17500    ///Property: Previous name
17501    #[serde(skip_serializing_if = "Option::is_none")]
17502    #[cfg_attr(
17503        feature = "builder",
17504        builder(with = |value:impl Into<String>|vec![value.into()])
17505    )]
17506    pub previous_name: Option<Vec<String>>,
17507    ///Property: Program
17508    #[serde(skip_serializing_if = "Option::is_none")]
17509    #[cfg_attr(
17510        feature = "builder",
17511        builder(with = |value:impl Into<String>|vec![value.into()])
17512    )]
17513    pub program: Option<Vec<String>>,
17514    ///Property: Program ID
17515    #[serde(skip_serializing_if = "Option::is_none")]
17516    #[cfg_attr(
17517        feature = "builder",
17518        builder(with = |value:impl Into<String>|vec![value.into()])
17519    )]
17520    pub program_id: Option<Vec<String>>,
17521    ///Property: Source document
17522    #[serde(skip_serializing_if = "Option::is_none")]
17523    #[cfg_attr(
17524        feature = "builder",
17525        builder(with = |value:impl Into<String>|vec![value.into()])
17526    )]
17527    pub proof: Option<Vec<String>>,
17528    ///Property: Publishing source
17529    #[serde(skip_serializing_if = "Option::is_none")]
17530    #[cfg_attr(
17531        feature = "builder",
17532        builder(with = |value:impl Into<String>|vec![value.into()])
17533    )]
17534    pub publisher: Option<Vec<String>>,
17535    ///Property: Publishing source URL
17536    #[serde(skip_serializing_if = "Option::is_none")]
17537    #[cfg_attr(
17538        feature = "builder",
17539        builder(with = |value:impl Into<String>|vec![value.into()])
17540    )]
17541    pub publisher_url: Option<Vec<String>>,
17542    ///Property: Registration number
17543    #[serde(skip_serializing_if = "Option::is_none")]
17544    #[cfg_attr(
17545        feature = "builder",
17546        builder(with = |value:impl Into<String>|vec![value.into()])
17547    )]
17548    pub registration_number: Option<Vec<String>>,
17549    ///Property: Retrieved on
17550    #[serde(skip_serializing_if = "Option::is_none")]
17551    #[cfg_attr(
17552        feature = "builder",
17553        builder(with = |value:impl Into<String>|vec![value.into()])
17554    )]
17555    pub retrieved_at: Option<Vec<String>>,
17556    ///Property: Sayari Entity ID
17557    #[serde(skip_serializing_if = "Option::is_none")]
17558    #[cfg_attr(
17559        feature = "builder",
17560        builder(with = |value:impl Into<String>|vec![value.into()])
17561    )]
17562    pub sayari_id: Option<Vec<String>>,
17563    ///Property: Sector
17564    #[serde(skip_serializing_if = "Option::is_none")]
17565    #[cfg_attr(
17566        feature = "builder",
17567        builder(with = |value:impl Into<String>|vec![value.into()])
17568    )]
17569    pub sector: Option<Vec<String>>,
17570    ///Property: Source link
17571    #[serde(skip_serializing_if = "Option::is_none")]
17572    #[cfg_attr(
17573        feature = "builder",
17574        builder(with = |value:impl Into<String>|vec![value.into()])
17575    )]
17576    pub source_url: Option<Vec<String>>,
17577    ///Property: Status
17578    #[serde(skip_serializing_if = "Option::is_none")]
17579    #[cfg_attr(
17580        feature = "builder",
17581        builder(with = |value:impl Into<String>|vec![value.into()])
17582    )]
17583    pub status: Option<Vec<String>>,
17584    ///Property: Summary
17585    #[serde(skip_serializing_if = "Option::is_none")]
17586    #[cfg_attr(
17587        feature = "builder",
17588        builder(with = |value:impl Into<String>|vec![value.into()])
17589    )]
17590    pub summary: Option<Vec<String>>,
17591    ///Property: SWIFT/BIC
17592    #[serde(skip_serializing_if = "Option::is_none")]
17593    #[cfg_attr(
17594        feature = "builder",
17595        builder(with = |value:impl Into<String>|vec![value.into()])
17596    )]
17597    pub swift_bic: Option<Vec<String>>,
17598    ///Property: Tax Number
17599    #[serde(skip_serializing_if = "Option::is_none")]
17600    #[cfg_attr(
17601        feature = "builder",
17602        builder(with = |value:impl Into<String>|vec![value.into()])
17603    )]
17604    pub tax_number: Option<Vec<String>>,
17605    ///Property: Tax status
17606    #[serde(skip_serializing_if = "Option::is_none")]
17607    #[cfg_attr(
17608        feature = "builder",
17609        builder(with = |value:impl Into<String>|vec![value.into()])
17610    )]
17611    pub tax_status: Option<Vec<String>>,
17612    ///Property: Topics
17613    #[serde(skip_serializing_if = "Option::is_none")]
17614    #[cfg_attr(
17615        feature = "builder",
17616        builder(with = |value:impl Into<String>|vec![value.into()])
17617    )]
17618    pub topics: Option<Vec<String>>,
17619    ///Property: Unique Entity ID
17620    #[serde(skip_serializing_if = "Option::is_none")]
17621    #[cfg_attr(
17622        feature = "builder",
17623        builder(with = |value:impl Into<String>|vec![value.into()])
17624    )]
17625    pub unique_entity_id: Option<Vec<String>>,
17626    ///Property: USCC
17627    #[serde(skip_serializing_if = "Option::is_none")]
17628    #[cfg_attr(
17629        feature = "builder",
17630        builder(with = |value:impl Into<String>|vec![value.into()])
17631    )]
17632    pub usc_code: Option<Vec<String>>,
17633    ///Property: V.A.T. Identifier
17634    #[serde(skip_serializing_if = "Option::is_none")]
17635    #[cfg_attr(
17636        feature = "builder",
17637        builder(with = |value:impl Into<String>|vec![value.into()])
17638    )]
17639    pub vat_code: Option<Vec<String>>,
17640    ///Property: Weak alias
17641    #[serde(skip_serializing_if = "Option::is_none")]
17642    #[cfg_attr(
17643        feature = "builder",
17644        builder(with = |value:impl Into<String>|vec![value.into()])
17645    )]
17646    pub weak_alias: Option<Vec<String>>,
17647    ///Property: Website
17648    #[serde(skip_serializing_if = "Option::is_none")]
17649    #[cfg_attr(
17650        feature = "builder",
17651        builder(with = |value:impl Into<String>|vec![value.into()])
17652    )]
17653    pub website: Option<Vec<String>>,
17654    ///Property: Wikidata ID
17655    #[serde(skip_serializing_if = "Option::is_none")]
17656    #[cfg_attr(
17657        feature = "builder",
17658        builder(with = |value:impl Into<String>|vec![value.into()])
17659    )]
17660    pub wikidata_id: Option<Vec<String>>,
17661    ///Property: Wikipedia Article
17662    #[serde(skip_serializing_if = "Option::is_none")]
17663    #[cfg_attr(
17664        feature = "builder",
17665        builder(with = |value:impl Into<String>|vec![value.into()])
17666    )]
17667    pub wikipedia_url: Option<Vec<String>>,
17668}
17669impl PublicBody {
17670    /// Create a new entity with the given ID
17671    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
17672    pub fn new(id: impl Into<String>) -> Self {
17673        Self {
17674            id: id.into(),
17675            schema: "PublicBody".to_string(),
17676            abbreviation: None,
17677            address: None,
17678            address_entity: None,
17679            aleph_url: None,
17680            alias: None,
17681            bright_query_id: None,
17682            bright_query_org_id: None,
17683            bvd_id: None,
17684            cage_code: None,
17685            classification: None,
17686            country: None,
17687            created_at: None,
17688            description: None,
17689            dissolution_date: None,
17690            duns_code: None,
17691            email: None,
17692            gii_number: None,
17693            icij_id: None,
17694            id_number: None,
17695            imo_number: None,
17696            incorporation_date: None,
17697            index_text: None,
17698            inn_code: None,
17699            jurisdiction: None,
17700            keywords: None,
17701            legal_form: None,
17702            lei_code: None,
17703            license_number: None,
17704            main_country: None,
17705            modified_at: None,
17706            name: Vec::new(),
17707            notes: None,
17708            npi_code: None,
17709            ogrn_code: None,
17710            okpo_code: None,
17711            opencorporates_url: None,
17712            parent: None,
17713            perm_id: None,
17714            phone: None,
17715            previous_name: None,
17716            program: None,
17717            program_id: None,
17718            proof: None,
17719            publisher: None,
17720            publisher_url: None,
17721            registration_number: None,
17722            retrieved_at: None,
17723            sayari_id: None,
17724            sector: None,
17725            source_url: None,
17726            status: None,
17727            summary: None,
17728            swift_bic: None,
17729            tax_number: None,
17730            tax_status: None,
17731            topics: None,
17732            unique_entity_id: None,
17733            usc_code: None,
17734            vat_code: None,
17735            weak_alias: None,
17736            website: None,
17737            wikidata_id: None,
17738            wikipedia_url: None,
17739        }
17740    }
17741    /// Get the schema name
17742    pub fn schema_name() -> &'static str {
17743        "PublicBody"
17744    }
17745    /// Serialize to standard FTM nested JSON format
17746    ///
17747    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
17748    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
17749        let mut value = serde_json::to_value(self)?;
17750        if let Some(obj) = value.as_object_mut() {
17751            let id = obj.remove("id");
17752            let schema = obj.remove("schema");
17753            let properties = serde_json::Value::Object(std::mem::take(obj));
17754            if let Some(id) = id {
17755                obj.insert("id".into(), id);
17756            }
17757            if let Some(schema) = schema {
17758                obj.insert("schema".into(), schema);
17759            }
17760            obj.insert("properties".into(), properties);
17761        }
17762        serde_json::to_string(&value)
17763    }
17764}
17765///FTM Schema: Real estate
17766#[derive(Debug, Clone, Serialize, Deserialize)]
17767#[cfg_attr(feature = "builder", derive(Builder))]
17768#[serde(rename_all = "camelCase")]
17769pub struct RealEstate {
17770    pub id: String,
17771    #[cfg_attr(feature = "builder", builder(default = "RealEstate".to_string()))]
17772    pub schema: String,
17773    ///Property: Address
17774    #[serde(skip_serializing_if = "Option::is_none")]
17775    #[cfg_attr(
17776        feature = "builder",
17777        builder(with = |value:impl Into<String>|vec![value.into()])
17778    )]
17779    pub address: Option<Vec<String>>,
17780    ///Property: Address
17781    #[serde(skip_serializing_if = "Option::is_none")]
17782    #[cfg_attr(
17783        feature = "builder",
17784        builder(with = |value:impl Into<String>|vec![value.into()])
17785    )]
17786    pub address_entity: Option<Vec<String>>,
17787    ///Property: Aleph URL
17788    #[serde(skip_serializing_if = "Option::is_none")]
17789    #[cfg_attr(
17790        feature = "builder",
17791        builder(with = |value:impl Into<String>|vec![value.into()])
17792    )]
17793    pub aleph_url: Option<Vec<String>>,
17794    ///Property: Alias
17795    #[serde(skip_serializing_if = "Option::is_none")]
17796    #[cfg_attr(
17797        feature = "builder",
17798        builder(with = |value:impl Into<String>|vec![value.into()])
17799    )]
17800    pub alias: Option<Vec<String>>,
17801    ///Property: Amount
17802    #[serde(
17803        skip_serializing_if = "Option::is_none",
17804        deserialize_with = "deserialize_opt_f64_vec",
17805        default
17806    )]
17807    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17808    pub amount: Option<Vec<f64>>,
17809    ///Property: Amount in EUR
17810    #[serde(
17811        skip_serializing_if = "Option::is_none",
17812        deserialize_with = "deserialize_opt_f64_vec",
17813        default
17814    )]
17815    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17816    pub amount_eur: Option<Vec<f64>>,
17817    ///Property: Amount in USD
17818    #[serde(
17819        skip_serializing_if = "Option::is_none",
17820        deserialize_with = "deserialize_opt_f64_vec",
17821        default
17822    )]
17823    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17824    pub amount_usd: Option<Vec<f64>>,
17825    ///Property: Area
17826    #[serde(
17827        skip_serializing_if = "Option::is_none",
17828        deserialize_with = "deserialize_opt_f64_vec",
17829        default
17830    )]
17831    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17832    pub area: Option<Vec<f64>>,
17833    ///Property: Cadastral code
17834    #[serde(skip_serializing_if = "Option::is_none")]
17835    #[cfg_attr(
17836        feature = "builder",
17837        builder(with = |value:impl Into<String>|vec![value.into()])
17838    )]
17839    pub cadastral_code: Option<Vec<String>>,
17840    ///Property: Census block
17841    #[serde(skip_serializing_if = "Option::is_none")]
17842    #[cfg_attr(
17843        feature = "builder",
17844        builder(with = |value:impl Into<String>|vec![value.into()])
17845    )]
17846    pub census_block: Option<Vec<String>>,
17847    ///Property: Country
17848    #[serde(skip_serializing_if = "Option::is_none")]
17849    #[cfg_attr(
17850        feature = "builder",
17851        builder(with = |value:impl Into<String>|vec![value.into()])
17852    )]
17853    pub country: Option<Vec<String>>,
17854    ///Property: Record date
17855    #[serde(skip_serializing_if = "Option::is_none")]
17856    #[cfg_attr(
17857        feature = "builder",
17858        builder(with = |value:impl Into<String>|vec![value.into()])
17859    )]
17860    pub create_date: Option<Vec<String>>,
17861    ///Property: Created at
17862    #[serde(skip_serializing_if = "Option::is_none")]
17863    #[cfg_attr(
17864        feature = "builder",
17865        builder(with = |value:impl Into<String>|vec![value.into()])
17866    )]
17867    pub created_at: Option<Vec<String>>,
17868    ///Property: Currency
17869    #[serde(skip_serializing_if = "Option::is_none")]
17870    #[cfg_attr(
17871        feature = "builder",
17872        builder(with = |value:impl Into<String>|vec![value.into()])
17873    )]
17874    pub currency: Option<Vec<String>>,
17875    ///Property: Description
17876    #[serde(skip_serializing_if = "Option::is_none")]
17877    #[cfg_attr(
17878        feature = "builder",
17879        builder(with = |value:impl Into<String>|vec![value.into()])
17880    )]
17881    pub description: Option<Vec<String>>,
17882    ///Property: Encumbrance
17883    #[serde(skip_serializing_if = "Option::is_none")]
17884    #[cfg_attr(
17885        feature = "builder",
17886        builder(with = |value:impl Into<String>|vec![value.into()])
17887    )]
17888    pub encumbrance: Option<Vec<String>>,
17889    ///Property: Index text
17890    #[serde(skip_serializing_if = "Option::is_none")]
17891    #[cfg_attr(
17892        feature = "builder",
17893        builder(with = |value:impl Into<String>|vec![value.into()])
17894    )]
17895    pub index_text: Option<Vec<String>>,
17896    ///Property: Keywords
17897    #[serde(skip_serializing_if = "Option::is_none")]
17898    #[cfg_attr(
17899        feature = "builder",
17900        builder(with = |value:impl Into<String>|vec![value.into()])
17901    )]
17902    pub keywords: Option<Vec<String>>,
17903    ///Property: Land type
17904    #[serde(skip_serializing_if = "Option::is_none")]
17905    #[cfg_attr(
17906        feature = "builder",
17907        builder(with = |value:impl Into<String>|vec![value.into()])
17908    )]
17909    pub land_type: Option<Vec<String>>,
17910    ///Property: Latitude
17911    #[serde(
17912        skip_serializing_if = "Option::is_none",
17913        deserialize_with = "deserialize_opt_f64_vec",
17914        default
17915    )]
17916    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17917    pub latitude: Option<Vec<f64>>,
17918    ///Property: Longitude
17919    #[serde(
17920        skip_serializing_if = "Option::is_none",
17921        deserialize_with = "deserialize_opt_f64_vec",
17922        default
17923    )]
17924    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
17925    pub longitude: Option<Vec<f64>>,
17926    ///Property: Modified on
17927    #[serde(skip_serializing_if = "Option::is_none")]
17928    #[cfg_attr(
17929        feature = "builder",
17930        builder(with = |value:impl Into<String>|vec![value.into()])
17931    )]
17932    pub modified_at: Option<Vec<String>>,
17933    ///Property: Name
17934    #[serde(default)]
17935    #[cfg_attr(
17936        feature = "builder",
17937        builder(with = |value:impl Into<String>|vec![value.into()])
17938    )]
17939    pub name: Vec<String>,
17940    ///Property: Notes
17941    #[serde(skip_serializing_if = "Option::is_none")]
17942    #[cfg_attr(
17943        feature = "builder",
17944        builder(with = |value:impl Into<String>|vec![value.into()])
17945    )]
17946    pub notes: Option<Vec<String>>,
17947    ///Property: Parent unit
17948    #[serde(skip_serializing_if = "Option::is_none")]
17949    #[cfg_attr(
17950        feature = "builder",
17951        builder(with = |value:impl Into<String>|vec![value.into()])
17952    )]
17953    pub parent: Option<Vec<String>>,
17954    ///Property: Previous name
17955    #[serde(skip_serializing_if = "Option::is_none")]
17956    #[cfg_attr(
17957        feature = "builder",
17958        builder(with = |value:impl Into<String>|vec![value.into()])
17959    )]
17960    pub previous_name: Option<Vec<String>>,
17961    ///Property: Program
17962    #[serde(skip_serializing_if = "Option::is_none")]
17963    #[cfg_attr(
17964        feature = "builder",
17965        builder(with = |value:impl Into<String>|vec![value.into()])
17966    )]
17967    pub program: Option<Vec<String>>,
17968    ///Property: Program ID
17969    #[serde(skip_serializing_if = "Option::is_none")]
17970    #[cfg_attr(
17971        feature = "builder",
17972        builder(with = |value:impl Into<String>|vec![value.into()])
17973    )]
17974    pub program_id: Option<Vec<String>>,
17975    ///Property: Source document
17976    #[serde(skip_serializing_if = "Option::is_none")]
17977    #[cfg_attr(
17978        feature = "builder",
17979        builder(with = |value:impl Into<String>|vec![value.into()])
17980    )]
17981    pub proof: Option<Vec<String>>,
17982    ///Property: Property type
17983    #[serde(skip_serializing_if = "Option::is_none")]
17984    #[cfg_attr(
17985        feature = "builder",
17986        builder(with = |value:impl Into<String>|vec![value.into()])
17987    )]
17988    pub property_type: Option<Vec<String>>,
17989    ///Property: Publishing source
17990    #[serde(skip_serializing_if = "Option::is_none")]
17991    #[cfg_attr(
17992        feature = "builder",
17993        builder(with = |value:impl Into<String>|vec![value.into()])
17994    )]
17995    pub publisher: Option<Vec<String>>,
17996    ///Property: Publishing source URL
17997    #[serde(skip_serializing_if = "Option::is_none")]
17998    #[cfg_attr(
17999        feature = "builder",
18000        builder(with = |value:impl Into<String>|vec![value.into()])
18001    )]
18002    pub publisher_url: Option<Vec<String>>,
18003    ///Property: Registration number
18004    #[serde(skip_serializing_if = "Option::is_none")]
18005    #[cfg_attr(
18006        feature = "builder",
18007        builder(with = |value:impl Into<String>|vec![value.into()])
18008    )]
18009    pub registration_number: Option<Vec<String>>,
18010    ///Property: Retrieved on
18011    #[serde(skip_serializing_if = "Option::is_none")]
18012    #[cfg_attr(
18013        feature = "builder",
18014        builder(with = |value:impl Into<String>|vec![value.into()])
18015    )]
18016    pub retrieved_at: Option<Vec<String>>,
18017    ///Property: Source link
18018    #[serde(skip_serializing_if = "Option::is_none")]
18019    #[cfg_attr(
18020        feature = "builder",
18021        builder(with = |value:impl Into<String>|vec![value.into()])
18022    )]
18023    pub source_url: Option<Vec<String>>,
18024    ///Property: Summary
18025    #[serde(skip_serializing_if = "Option::is_none")]
18026    #[cfg_attr(
18027        feature = "builder",
18028        builder(with = |value:impl Into<String>|vec![value.into()])
18029    )]
18030    pub summary: Option<Vec<String>>,
18031    ///Property: Tenure
18032    #[serde(skip_serializing_if = "Option::is_none")]
18033    #[cfg_attr(
18034        feature = "builder",
18035        builder(with = |value:impl Into<String>|vec![value.into()])
18036    )]
18037    pub tenure: Option<Vec<String>>,
18038    ///Property: Title number
18039    #[serde(skip_serializing_if = "Option::is_none")]
18040    #[cfg_attr(
18041        feature = "builder",
18042        builder(with = |value:impl Into<String>|vec![value.into()])
18043    )]
18044    pub title_number: Option<Vec<String>>,
18045    ///Property: Topics
18046    #[serde(skip_serializing_if = "Option::is_none")]
18047    #[cfg_attr(
18048        feature = "builder",
18049        builder(with = |value:impl Into<String>|vec![value.into()])
18050    )]
18051    pub topics: Option<Vec<String>>,
18052    ///Property: Weak alias
18053    #[serde(skip_serializing_if = "Option::is_none")]
18054    #[cfg_attr(
18055        feature = "builder",
18056        builder(with = |value:impl Into<String>|vec![value.into()])
18057    )]
18058    pub weak_alias: Option<Vec<String>>,
18059    ///Property: Wikidata ID
18060    #[serde(skip_serializing_if = "Option::is_none")]
18061    #[cfg_attr(
18062        feature = "builder",
18063        builder(with = |value:impl Into<String>|vec![value.into()])
18064    )]
18065    pub wikidata_id: Option<Vec<String>>,
18066    ///Property: Wikipedia Article
18067    #[serde(skip_serializing_if = "Option::is_none")]
18068    #[cfg_attr(
18069        feature = "builder",
18070        builder(with = |value:impl Into<String>|vec![value.into()])
18071    )]
18072    pub wikipedia_url: Option<Vec<String>>,
18073}
18074impl RealEstate {
18075    /// Create a new entity with the given ID
18076    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
18077    pub fn new(id: impl Into<String>) -> Self {
18078        Self {
18079            id: id.into(),
18080            schema: "RealEstate".to_string(),
18081            address: None,
18082            address_entity: None,
18083            aleph_url: None,
18084            alias: None,
18085            amount: None,
18086            amount_eur: None,
18087            amount_usd: None,
18088            area: None,
18089            cadastral_code: None,
18090            census_block: None,
18091            country: None,
18092            create_date: None,
18093            created_at: None,
18094            currency: None,
18095            description: None,
18096            encumbrance: None,
18097            index_text: None,
18098            keywords: None,
18099            land_type: None,
18100            latitude: None,
18101            longitude: None,
18102            modified_at: None,
18103            name: Vec::new(),
18104            notes: None,
18105            parent: None,
18106            previous_name: None,
18107            program: None,
18108            program_id: None,
18109            proof: None,
18110            property_type: None,
18111            publisher: None,
18112            publisher_url: None,
18113            registration_number: None,
18114            retrieved_at: None,
18115            source_url: None,
18116            summary: None,
18117            tenure: None,
18118            title_number: None,
18119            topics: None,
18120            weak_alias: None,
18121            wikidata_id: None,
18122            wikipedia_url: None,
18123        }
18124    }
18125    /// Get the schema name
18126    pub fn schema_name() -> &'static str {
18127        "RealEstate"
18128    }
18129    /// Serialize to standard FTM nested JSON format
18130    ///
18131    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
18132    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
18133        let mut value = serde_json::to_value(self)?;
18134        if let Some(obj) = value.as_object_mut() {
18135            let id = obj.remove("id");
18136            let schema = obj.remove("schema");
18137            let properties = serde_json::Value::Object(std::mem::take(obj));
18138            if let Some(id) = id {
18139                obj.insert("id".into(), id);
18140            }
18141            if let Some(schema) = schema {
18142                obj.insert("schema".into(), schema);
18143            }
18144            obj.insert("properties".into(), properties);
18145        }
18146        serde_json::to_string(&value)
18147    }
18148}
18149///FTM Schema: Representation
18150#[derive(Debug, Clone, Serialize, Deserialize)]
18151#[cfg_attr(feature = "builder", derive(Builder))]
18152#[serde(rename_all = "camelCase")]
18153pub struct Representation {
18154    pub id: String,
18155    #[cfg_attr(feature = "builder", builder(default = "Representation".to_string()))]
18156    pub schema: String,
18157    ///Property: Agent
18158    #[serde(default)]
18159    #[cfg_attr(
18160        feature = "builder",
18161        builder(with = |value:impl Into<String>|vec![value.into()])
18162    )]
18163    pub agent: Vec<String>,
18164    ///Property: Aleph URL
18165    #[serde(skip_serializing_if = "Option::is_none")]
18166    #[cfg_attr(
18167        feature = "builder",
18168        builder(with = |value:impl Into<String>|vec![value.into()])
18169    )]
18170    pub aleph_url: Option<Vec<String>>,
18171    ///Property: Client
18172    #[serde(default)]
18173    #[cfg_attr(
18174        feature = "builder",
18175        builder(with = |value:impl Into<String>|vec![value.into()])
18176    )]
18177    pub client: Vec<String>,
18178    ///Property: Date
18179    #[serde(skip_serializing_if = "Option::is_none")]
18180    #[cfg_attr(
18181        feature = "builder",
18182        builder(with = |value:impl Into<String>|vec![value.into()])
18183    )]
18184    pub date: Option<Vec<String>>,
18185    ///Property: Description
18186    #[serde(skip_serializing_if = "Option::is_none")]
18187    #[cfg_attr(
18188        feature = "builder",
18189        builder(with = |value:impl Into<String>|vec![value.into()])
18190    )]
18191    pub description: Option<Vec<String>>,
18192    ///Property: End date
18193    #[serde(skip_serializing_if = "Option::is_none")]
18194    #[cfg_attr(
18195        feature = "builder",
18196        builder(with = |value:impl Into<String>|vec![value.into()])
18197    )]
18198    pub end_date: Option<Vec<String>>,
18199    ///Property: Index text
18200    #[serde(skip_serializing_if = "Option::is_none")]
18201    #[cfg_attr(
18202        feature = "builder",
18203        builder(with = |value:impl Into<String>|vec![value.into()])
18204    )]
18205    pub index_text: Option<Vec<String>>,
18206    ///Property: Modified on
18207    #[serde(skip_serializing_if = "Option::is_none")]
18208    #[cfg_attr(
18209        feature = "builder",
18210        builder(with = |value:impl Into<String>|vec![value.into()])
18211    )]
18212    pub modified_at: Option<Vec<String>>,
18213    ///Property: Detected names
18214    #[serde(skip_serializing_if = "Option::is_none")]
18215    #[cfg_attr(
18216        feature = "builder",
18217        builder(with = |value:impl Into<String>|vec![value.into()])
18218    )]
18219    pub names_mentioned: Option<Vec<String>>,
18220    ///Property: Source document
18221    #[serde(skip_serializing_if = "Option::is_none")]
18222    #[cfg_attr(
18223        feature = "builder",
18224        builder(with = |value:impl Into<String>|vec![value.into()])
18225    )]
18226    pub proof: Option<Vec<String>>,
18227    ///Property: Publishing source
18228    #[serde(skip_serializing_if = "Option::is_none")]
18229    #[cfg_attr(
18230        feature = "builder",
18231        builder(with = |value:impl Into<String>|vec![value.into()])
18232    )]
18233    pub publisher: Option<Vec<String>>,
18234    ///Property: Publishing source URL
18235    #[serde(skip_serializing_if = "Option::is_none")]
18236    #[cfg_attr(
18237        feature = "builder",
18238        builder(with = |value:impl Into<String>|vec![value.into()])
18239    )]
18240    pub publisher_url: Option<Vec<String>>,
18241    ///Property: Record ID
18242    #[serde(skip_serializing_if = "Option::is_none")]
18243    #[cfg_attr(
18244        feature = "builder",
18245        builder(with = |value:impl Into<String>|vec![value.into()])
18246    )]
18247    pub record_id: Option<Vec<String>>,
18248    ///Property: Retrieved on
18249    #[serde(skip_serializing_if = "Option::is_none")]
18250    #[cfg_attr(
18251        feature = "builder",
18252        builder(with = |value:impl Into<String>|vec![value.into()])
18253    )]
18254    pub retrieved_at: Option<Vec<String>>,
18255    ///Property: Role
18256    #[serde(skip_serializing_if = "Option::is_none")]
18257    #[cfg_attr(
18258        feature = "builder",
18259        builder(with = |value:impl Into<String>|vec![value.into()])
18260    )]
18261    pub role: Option<Vec<String>>,
18262    ///Property: Source link
18263    #[serde(skip_serializing_if = "Option::is_none")]
18264    #[cfg_attr(
18265        feature = "builder",
18266        builder(with = |value:impl Into<String>|vec![value.into()])
18267    )]
18268    pub source_url: Option<Vec<String>>,
18269    ///Property: Start date
18270    #[serde(skip_serializing_if = "Option::is_none")]
18271    #[cfg_attr(
18272        feature = "builder",
18273        builder(with = |value:impl Into<String>|vec![value.into()])
18274    )]
18275    pub start_date: Option<Vec<String>>,
18276    ///Property: Status
18277    #[serde(skip_serializing_if = "Option::is_none")]
18278    #[cfg_attr(
18279        feature = "builder",
18280        builder(with = |value:impl Into<String>|vec![value.into()])
18281    )]
18282    pub status: Option<Vec<String>>,
18283    ///Property: Summary
18284    #[serde(skip_serializing_if = "Option::is_none")]
18285    #[cfg_attr(
18286        feature = "builder",
18287        builder(with = |value:impl Into<String>|vec![value.into()])
18288    )]
18289    pub summary: Option<Vec<String>>,
18290}
18291impl Representation {
18292    /// Create a new entity with the given ID
18293    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
18294    pub fn new(id: impl Into<String>) -> Self {
18295        Self {
18296            id: id.into(),
18297            schema: "Representation".to_string(),
18298            agent: Vec::new(),
18299            aleph_url: None,
18300            client: Vec::new(),
18301            date: None,
18302            description: None,
18303            end_date: None,
18304            index_text: None,
18305            modified_at: None,
18306            names_mentioned: None,
18307            proof: None,
18308            publisher: None,
18309            publisher_url: None,
18310            record_id: None,
18311            retrieved_at: None,
18312            role: None,
18313            source_url: None,
18314            start_date: None,
18315            status: None,
18316            summary: None,
18317        }
18318    }
18319    /// Get the schema name
18320    pub fn schema_name() -> &'static str {
18321        "Representation"
18322    }
18323    /// Serialize to standard FTM nested JSON format
18324    ///
18325    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
18326    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
18327        let mut value = serde_json::to_value(self)?;
18328        if let Some(obj) = value.as_object_mut() {
18329            let id = obj.remove("id");
18330            let schema = obj.remove("schema");
18331            let properties = serde_json::Value::Object(std::mem::take(obj));
18332            if let Some(id) = id {
18333                obj.insert("id".into(), id);
18334            }
18335            if let Some(schema) = schema {
18336                obj.insert("schema".into(), schema);
18337            }
18338            obj.insert("properties".into(), properties);
18339        }
18340        serde_json::to_string(&value)
18341    }
18342}
18343///FTM Schema: Risk
18344#[derive(Debug, Clone, Serialize, Deserialize)]
18345#[cfg_attr(feature = "builder", derive(Builder))]
18346#[serde(rename_all = "camelCase")]
18347pub struct Risk {
18348    pub id: String,
18349    #[cfg_attr(feature = "builder", builder(default = "Risk".to_string()))]
18350    pub schema: String,
18351    ///Property: Aleph URL
18352    #[serde(skip_serializing_if = "Option::is_none")]
18353    #[cfg_attr(
18354        feature = "builder",
18355        builder(with = |value:impl Into<String>|vec![value.into()])
18356    )]
18357    pub aleph_url: Option<Vec<String>>,
18358    ///Property: Country
18359    #[serde(skip_serializing_if = "Option::is_none")]
18360    #[cfg_attr(
18361        feature = "builder",
18362        builder(with = |value:impl Into<String>|vec![value.into()])
18363    )]
18364    pub country: Option<Vec<String>>,
18365    ///Property: Date
18366    #[serde(skip_serializing_if = "Option::is_none")]
18367    #[cfg_attr(
18368        feature = "builder",
18369        builder(with = |value:impl Into<String>|vec![value.into()])
18370    )]
18371    pub date: Option<Vec<String>>,
18372    ///Property: Description
18373    #[serde(skip_serializing_if = "Option::is_none")]
18374    #[cfg_attr(
18375        feature = "builder",
18376        builder(with = |value:impl Into<String>|vec![value.into()])
18377    )]
18378    pub description: Option<Vec<String>>,
18379    ///Property: Duration
18380    #[serde(
18381        skip_serializing_if = "Option::is_none",
18382        deserialize_with = "deserialize_opt_f64_vec",
18383        default
18384    )]
18385    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
18386    pub duration: Option<Vec<f64>>,
18387    ///Property: End date
18388    #[serde(skip_serializing_if = "Option::is_none")]
18389    #[cfg_attr(
18390        feature = "builder",
18391        builder(with = |value:impl Into<String>|vec![value.into()])
18392    )]
18393    pub end_date: Option<Vec<String>>,
18394    ///Property: Entity
18395    #[serde(default)]
18396    #[cfg_attr(
18397        feature = "builder",
18398        builder(with = |value:impl Into<String>|vec![value.into()])
18399    )]
18400    pub entity: Vec<String>,
18401    ///Property: Index text
18402    #[serde(skip_serializing_if = "Option::is_none")]
18403    #[cfg_attr(
18404        feature = "builder",
18405        builder(with = |value:impl Into<String>|vec![value.into()])
18406    )]
18407    pub index_text: Option<Vec<String>>,
18408    ///Property: Listing date
18409    #[serde(skip_serializing_if = "Option::is_none")]
18410    #[cfg_attr(
18411        feature = "builder",
18412        builder(with = |value:impl Into<String>|vec![value.into()])
18413    )]
18414    pub listing_date: Option<Vec<String>>,
18415    ///Property: Modified on
18416    #[serde(skip_serializing_if = "Option::is_none")]
18417    #[cfg_attr(
18418        feature = "builder",
18419        builder(with = |value:impl Into<String>|vec![value.into()])
18420    )]
18421    pub modified_at: Option<Vec<String>>,
18422    ///Property: Detected names
18423    #[serde(skip_serializing_if = "Option::is_none")]
18424    #[cfg_attr(
18425        feature = "builder",
18426        builder(with = |value:impl Into<String>|vec![value.into()])
18427    )]
18428    pub names_mentioned: Option<Vec<String>>,
18429    ///Property: Source document
18430    #[serde(skip_serializing_if = "Option::is_none")]
18431    #[cfg_attr(
18432        feature = "builder",
18433        builder(with = |value:impl Into<String>|vec![value.into()])
18434    )]
18435    pub proof: Option<Vec<String>>,
18436    ///Property: Publishing source
18437    #[serde(skip_serializing_if = "Option::is_none")]
18438    #[cfg_attr(
18439        feature = "builder",
18440        builder(with = |value:impl Into<String>|vec![value.into()])
18441    )]
18442    pub publisher: Option<Vec<String>>,
18443    ///Property: Publishing source URL
18444    #[serde(skip_serializing_if = "Option::is_none")]
18445    #[cfg_attr(
18446        feature = "builder",
18447        builder(with = |value:impl Into<String>|vec![value.into()])
18448    )]
18449    pub publisher_url: Option<Vec<String>>,
18450    ///Property: Reason
18451    #[serde(skip_serializing_if = "Option::is_none")]
18452    #[cfg_attr(
18453        feature = "builder",
18454        builder(with = |value:impl Into<String>|vec![value.into()])
18455    )]
18456    pub reason: Option<Vec<String>>,
18457    ///Property: Record ID
18458    #[serde(skip_serializing_if = "Option::is_none")]
18459    #[cfg_attr(
18460        feature = "builder",
18461        builder(with = |value:impl Into<String>|vec![value.into()])
18462    )]
18463    pub record_id: Option<Vec<String>>,
18464    ///Property: Retrieved on
18465    #[serde(skip_serializing_if = "Option::is_none")]
18466    #[cfg_attr(
18467        feature = "builder",
18468        builder(with = |value:impl Into<String>|vec![value.into()])
18469    )]
18470    pub retrieved_at: Option<Vec<String>>,
18471    ///Property: Source link
18472    #[serde(skip_serializing_if = "Option::is_none")]
18473    #[cfg_attr(
18474        feature = "builder",
18475        builder(with = |value:impl Into<String>|vec![value.into()])
18476    )]
18477    pub source_url: Option<Vec<String>>,
18478    ///Property: Start date
18479    #[serde(skip_serializing_if = "Option::is_none")]
18480    #[cfg_attr(
18481        feature = "builder",
18482        builder(with = |value:impl Into<String>|vec![value.into()])
18483    )]
18484    pub start_date: Option<Vec<String>>,
18485    ///Property: Status
18486    #[serde(skip_serializing_if = "Option::is_none")]
18487    #[cfg_attr(
18488        feature = "builder",
18489        builder(with = |value:impl Into<String>|vec![value.into()])
18490    )]
18491    pub status: Option<Vec<String>>,
18492    ///Property: Summary
18493    #[serde(skip_serializing_if = "Option::is_none")]
18494    #[cfg_attr(
18495        feature = "builder",
18496        builder(with = |value:impl Into<String>|vec![value.into()])
18497    )]
18498    pub summary: Option<Vec<String>>,
18499    ///Property: Topics
18500    #[serde(skip_serializing_if = "Option::is_none")]
18501    #[cfg_attr(
18502        feature = "builder",
18503        builder(with = |value:impl Into<String>|vec![value.into()])
18504    )]
18505    pub topics: Option<Vec<String>>,
18506}
18507impl Risk {
18508    /// Create a new entity with the given ID
18509    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
18510    pub fn new(id: impl Into<String>) -> Self {
18511        Self {
18512            id: id.into(),
18513            schema: "Risk".to_string(),
18514            aleph_url: None,
18515            country: None,
18516            date: None,
18517            description: None,
18518            duration: None,
18519            end_date: None,
18520            entity: Vec::new(),
18521            index_text: None,
18522            listing_date: None,
18523            modified_at: None,
18524            names_mentioned: None,
18525            proof: None,
18526            publisher: None,
18527            publisher_url: None,
18528            reason: None,
18529            record_id: None,
18530            retrieved_at: None,
18531            source_url: None,
18532            start_date: None,
18533            status: None,
18534            summary: None,
18535            topics: None,
18536        }
18537    }
18538    /// Get the schema name
18539    pub fn schema_name() -> &'static str {
18540        "Risk"
18541    }
18542    /// Serialize to standard FTM nested JSON format
18543    ///
18544    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
18545    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
18546        let mut value = serde_json::to_value(self)?;
18547        if let Some(obj) = value.as_object_mut() {
18548            let id = obj.remove("id");
18549            let schema = obj.remove("schema");
18550            let properties = serde_json::Value::Object(std::mem::take(obj));
18551            if let Some(id) = id {
18552                obj.insert("id".into(), id);
18553            }
18554            if let Some(schema) = schema {
18555                obj.insert("schema".into(), schema);
18556            }
18557            obj.insert("properties".into(), properties);
18558        }
18559        serde_json::to_string(&value)
18560    }
18561}
18562///FTM Schema: Sanction
18563#[derive(Debug, Clone, Serialize, Deserialize)]
18564#[cfg_attr(feature = "builder", derive(Builder))]
18565#[serde(rename_all = "camelCase")]
18566pub struct Sanction {
18567    pub id: String,
18568    #[cfg_attr(feature = "builder", builder(default = "Sanction".to_string()))]
18569    pub schema: String,
18570    ///Property: Aleph URL
18571    #[serde(skip_serializing_if = "Option::is_none")]
18572    #[cfg_attr(
18573        feature = "builder",
18574        builder(with = |value:impl Into<String>|vec![value.into()])
18575    )]
18576    pub aleph_url: Option<Vec<String>>,
18577    ///Property: Authority
18578    #[serde(skip_serializing_if = "Option::is_none")]
18579    #[cfg_attr(
18580        feature = "builder",
18581        builder(with = |value:impl Into<String>|vec![value.into()])
18582    )]
18583    pub authority: Option<Vec<String>>,
18584    ///Property: Authority-issued identifier
18585    #[serde(skip_serializing_if = "Option::is_none")]
18586    #[cfg_attr(
18587        feature = "builder",
18588        builder(with = |value:impl Into<String>|vec![value.into()])
18589    )]
18590    pub authority_id: Option<Vec<String>>,
18591    ///Property: Country
18592    #[serde(skip_serializing_if = "Option::is_none")]
18593    #[cfg_attr(
18594        feature = "builder",
18595        builder(with = |value:impl Into<String>|vec![value.into()])
18596    )]
18597    pub country: Option<Vec<String>>,
18598    ///Property: Date
18599    #[serde(skip_serializing_if = "Option::is_none")]
18600    #[cfg_attr(
18601        feature = "builder",
18602        builder(with = |value:impl Into<String>|vec![value.into()])
18603    )]
18604    pub date: Option<Vec<String>>,
18605    ///Property: Description
18606    #[serde(skip_serializing_if = "Option::is_none")]
18607    #[cfg_attr(
18608        feature = "builder",
18609        builder(with = |value:impl Into<String>|vec![value.into()])
18610    )]
18611    pub description: Option<Vec<String>>,
18612    ///Property: Duration
18613    #[serde(
18614        skip_serializing_if = "Option::is_none",
18615        deserialize_with = "deserialize_opt_f64_vec",
18616        default
18617    )]
18618    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
18619    pub duration: Option<Vec<f64>>,
18620    ///Property: End date
18621    #[serde(skip_serializing_if = "Option::is_none")]
18622    #[cfg_attr(
18623        feature = "builder",
18624        builder(with = |value:impl Into<String>|vec![value.into()])
18625    )]
18626    pub end_date: Option<Vec<String>>,
18627    ///Property: Entity
18628    #[serde(default)]
18629    #[cfg_attr(
18630        feature = "builder",
18631        builder(with = |value:impl Into<String>|vec![value.into()])
18632    )]
18633    pub entity: Vec<String>,
18634    ///Property: Index text
18635    #[serde(skip_serializing_if = "Option::is_none")]
18636    #[cfg_attr(
18637        feature = "builder",
18638        builder(with = |value:impl Into<String>|vec![value.into()])
18639    )]
18640    pub index_text: Option<Vec<String>>,
18641    ///Property: Listing date
18642    #[serde(skip_serializing_if = "Option::is_none")]
18643    #[cfg_attr(
18644        feature = "builder",
18645        builder(with = |value:impl Into<String>|vec![value.into()])
18646    )]
18647    pub listing_date: Option<Vec<String>>,
18648    ///Property: Modified on
18649    #[serde(skip_serializing_if = "Option::is_none")]
18650    #[cfg_attr(
18651        feature = "builder",
18652        builder(with = |value:impl Into<String>|vec![value.into()])
18653    )]
18654    pub modified_at: Option<Vec<String>>,
18655    ///Property: Detected names
18656    #[serde(skip_serializing_if = "Option::is_none")]
18657    #[cfg_attr(
18658        feature = "builder",
18659        builder(with = |value:impl Into<String>|vec![value.into()])
18660    )]
18661    pub names_mentioned: Option<Vec<String>>,
18662    ///Property: Program
18663    #[serde(skip_serializing_if = "Option::is_none")]
18664    #[cfg_attr(
18665        feature = "builder",
18666        builder(with = |value:impl Into<String>|vec![value.into()])
18667    )]
18668    pub program: Option<Vec<String>>,
18669    ///Property: Program ID
18670    #[serde(skip_serializing_if = "Option::is_none")]
18671    #[cfg_attr(
18672        feature = "builder",
18673        builder(with = |value:impl Into<String>|vec![value.into()])
18674    )]
18675    pub program_id: Option<Vec<String>>,
18676    ///Property: Program URL
18677    #[serde(skip_serializing_if = "Option::is_none")]
18678    #[cfg_attr(
18679        feature = "builder",
18680        builder(with = |value:impl Into<String>|vec![value.into()])
18681    )]
18682    pub program_url: Option<Vec<String>>,
18683    ///Property: Source document
18684    #[serde(skip_serializing_if = "Option::is_none")]
18685    #[cfg_attr(
18686        feature = "builder",
18687        builder(with = |value:impl Into<String>|vec![value.into()])
18688    )]
18689    pub proof: Option<Vec<String>>,
18690    ///Property: Scope of sanctions
18691    #[serde(skip_serializing_if = "Option::is_none")]
18692    #[cfg_attr(
18693        feature = "builder",
18694        builder(with = |value:impl Into<String>|vec![value.into()])
18695    )]
18696    pub provisions: Option<Vec<String>>,
18697    ///Property: Publishing source
18698    #[serde(skip_serializing_if = "Option::is_none")]
18699    #[cfg_attr(
18700        feature = "builder",
18701        builder(with = |value:impl Into<String>|vec![value.into()])
18702    )]
18703    pub publisher: Option<Vec<String>>,
18704    ///Property: Publishing source URL
18705    #[serde(skip_serializing_if = "Option::is_none")]
18706    #[cfg_attr(
18707        feature = "builder",
18708        builder(with = |value:impl Into<String>|vec![value.into()])
18709    )]
18710    pub publisher_url: Option<Vec<String>>,
18711    ///Property: Reason
18712    #[serde(skip_serializing_if = "Option::is_none")]
18713    #[cfg_attr(
18714        feature = "builder",
18715        builder(with = |value:impl Into<String>|vec![value.into()])
18716    )]
18717    pub reason: Option<Vec<String>>,
18718    ///Property: Record ID
18719    #[serde(skip_serializing_if = "Option::is_none")]
18720    #[cfg_attr(
18721        feature = "builder",
18722        builder(with = |value:impl Into<String>|vec![value.into()])
18723    )]
18724    pub record_id: Option<Vec<String>>,
18725    ///Property: Retrieved on
18726    #[serde(skip_serializing_if = "Option::is_none")]
18727    #[cfg_attr(
18728        feature = "builder",
18729        builder(with = |value:impl Into<String>|vec![value.into()])
18730    )]
18731    pub retrieved_at: Option<Vec<String>>,
18732    ///Property: Source link
18733    #[serde(skip_serializing_if = "Option::is_none")]
18734    #[cfg_attr(
18735        feature = "builder",
18736        builder(with = |value:impl Into<String>|vec![value.into()])
18737    )]
18738    pub source_url: Option<Vec<String>>,
18739    ///Property: Start date
18740    #[serde(skip_serializing_if = "Option::is_none")]
18741    #[cfg_attr(
18742        feature = "builder",
18743        builder(with = |value:impl Into<String>|vec![value.into()])
18744    )]
18745    pub start_date: Option<Vec<String>>,
18746    ///Property: Status
18747    #[serde(skip_serializing_if = "Option::is_none")]
18748    #[cfg_attr(
18749        feature = "builder",
18750        builder(with = |value:impl Into<String>|vec![value.into()])
18751    )]
18752    pub status: Option<Vec<String>>,
18753    ///Property: Summary
18754    #[serde(skip_serializing_if = "Option::is_none")]
18755    #[cfg_attr(
18756        feature = "builder",
18757        builder(with = |value:impl Into<String>|vec![value.into()])
18758    )]
18759    pub summary: Option<Vec<String>>,
18760    ///Property: UN SC identifier
18761    #[serde(skip_serializing_if = "Option::is_none")]
18762    #[cfg_attr(
18763        feature = "builder",
18764        builder(with = |value:impl Into<String>|vec![value.into()])
18765    )]
18766    pub unsc_id: Option<Vec<String>>,
18767}
18768impl Sanction {
18769    /// Create a new entity with the given ID
18770    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
18771    pub fn new(id: impl Into<String>) -> Self {
18772        Self {
18773            id: id.into(),
18774            schema: "Sanction".to_string(),
18775            aleph_url: None,
18776            authority: None,
18777            authority_id: None,
18778            country: None,
18779            date: None,
18780            description: None,
18781            duration: None,
18782            end_date: None,
18783            entity: Vec::new(),
18784            index_text: None,
18785            listing_date: None,
18786            modified_at: None,
18787            names_mentioned: None,
18788            program: None,
18789            program_id: None,
18790            program_url: None,
18791            proof: None,
18792            provisions: None,
18793            publisher: None,
18794            publisher_url: None,
18795            reason: None,
18796            record_id: None,
18797            retrieved_at: None,
18798            source_url: None,
18799            start_date: None,
18800            status: None,
18801            summary: None,
18802            unsc_id: None,
18803        }
18804    }
18805    /// Get the schema name
18806    pub fn schema_name() -> &'static str {
18807        "Sanction"
18808    }
18809    /// Serialize to standard FTM nested JSON format
18810    ///
18811    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
18812    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
18813        let mut value = serde_json::to_value(self)?;
18814        if let Some(obj) = value.as_object_mut() {
18815            let id = obj.remove("id");
18816            let schema = obj.remove("schema");
18817            let properties = serde_json::Value::Object(std::mem::take(obj));
18818            if let Some(id) = id {
18819                obj.insert("id".into(), id);
18820            }
18821            if let Some(schema) = schema {
18822                obj.insert("schema".into(), schema);
18823            }
18824            obj.insert("properties".into(), properties);
18825        }
18826        serde_json::to_string(&value)
18827    }
18828}
18829///FTM Schema: Security
18830#[derive(Debug, Clone, Serialize, Deserialize)]
18831#[cfg_attr(feature = "builder", derive(Builder))]
18832#[serde(rename_all = "camelCase")]
18833pub struct Security {
18834    pub id: String,
18835    #[cfg_attr(feature = "builder", builder(default = "Security".to_string()))]
18836    pub schema: String,
18837    ///Property: Address
18838    #[serde(skip_serializing_if = "Option::is_none")]
18839    #[cfg_attr(
18840        feature = "builder",
18841        builder(with = |value:impl Into<String>|vec![value.into()])
18842    )]
18843    pub address: Option<Vec<String>>,
18844    ///Property: Address
18845    #[serde(skip_serializing_if = "Option::is_none")]
18846    #[cfg_attr(
18847        feature = "builder",
18848        builder(with = |value:impl Into<String>|vec![value.into()])
18849    )]
18850    pub address_entity: Option<Vec<String>>,
18851    ///Property: Aleph URL
18852    #[serde(skip_serializing_if = "Option::is_none")]
18853    #[cfg_attr(
18854        feature = "builder",
18855        builder(with = |value:impl Into<String>|vec![value.into()])
18856    )]
18857    pub aleph_url: Option<Vec<String>>,
18858    ///Property: Alias
18859    #[serde(skip_serializing_if = "Option::is_none")]
18860    #[cfg_attr(
18861        feature = "builder",
18862        builder(with = |value:impl Into<String>|vec![value.into()])
18863    )]
18864    pub alias: Option<Vec<String>>,
18865    ///Property: Amount
18866    #[serde(
18867        skip_serializing_if = "Option::is_none",
18868        deserialize_with = "deserialize_opt_f64_vec",
18869        default
18870    )]
18871    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
18872    pub amount: Option<Vec<f64>>,
18873    ///Property: Amount in EUR
18874    #[serde(
18875        skip_serializing_if = "Option::is_none",
18876        deserialize_with = "deserialize_opt_f64_vec",
18877        default
18878    )]
18879    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
18880    pub amount_eur: Option<Vec<f64>>,
18881    ///Property: Amount in USD
18882    #[serde(
18883        skip_serializing_if = "Option::is_none",
18884        deserialize_with = "deserialize_opt_f64_vec",
18885        default
18886    )]
18887    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
18888    pub amount_usd: Option<Vec<f64>>,
18889    ///Property: Classification
18890    #[serde(skip_serializing_if = "Option::is_none")]
18891    #[cfg_attr(
18892        feature = "builder",
18893        builder(with = |value:impl Into<String>|vec![value.into()])
18894    )]
18895    pub classification: Option<Vec<String>>,
18896    ///Property: Collateral
18897    #[serde(skip_serializing_if = "Option::is_none")]
18898    #[cfg_attr(
18899        feature = "builder",
18900        builder(with = |value:impl Into<String>|vec![value.into()])
18901    )]
18902    pub collateral: Option<Vec<String>>,
18903    ///Property: Country
18904    #[serde(skip_serializing_if = "Option::is_none")]
18905    #[cfg_attr(
18906        feature = "builder",
18907        builder(with = |value:impl Into<String>|vec![value.into()])
18908    )]
18909    pub country: Option<Vec<String>>,
18910    ///Property: Created at
18911    #[serde(skip_serializing_if = "Option::is_none")]
18912    #[cfg_attr(
18913        feature = "builder",
18914        builder(with = |value:impl Into<String>|vec![value.into()])
18915    )]
18916    pub created_at: Option<Vec<String>>,
18917    ///Property: Currency
18918    #[serde(skip_serializing_if = "Option::is_none")]
18919    #[cfg_attr(
18920        feature = "builder",
18921        builder(with = |value:impl Into<String>|vec![value.into()])
18922    )]
18923    pub currency: Option<Vec<String>>,
18924    ///Property: Description
18925    #[serde(skip_serializing_if = "Option::is_none")]
18926    #[cfg_attr(
18927        feature = "builder",
18928        builder(with = |value:impl Into<String>|vec![value.into()])
18929    )]
18930    pub description: Option<Vec<String>>,
18931    ///Property: Financial Instrument Global Identifier
18932    #[serde(skip_serializing_if = "Option::is_none")]
18933    #[cfg_attr(
18934        feature = "builder",
18935        builder(with = |value:impl Into<String>|vec![value.into()])
18936    )]
18937    pub figi_code: Option<Vec<String>>,
18938    ///Property: Index text
18939    #[serde(skip_serializing_if = "Option::is_none")]
18940    #[cfg_attr(
18941        feature = "builder",
18942        builder(with = |value:impl Into<String>|vec![value.into()])
18943    )]
18944    pub index_text: Option<Vec<String>>,
18945    ///Property: ISIN
18946    #[serde(skip_serializing_if = "Option::is_none")]
18947    #[cfg_attr(
18948        feature = "builder",
18949        builder(with = |value:impl Into<String>|vec![value.into()])
18950    )]
18951    pub isin: Option<Vec<String>>,
18952    ///Property: Date issued
18953    #[serde(skip_serializing_if = "Option::is_none")]
18954    #[cfg_attr(
18955        feature = "builder",
18956        builder(with = |value:impl Into<String>|vec![value.into()])
18957    )]
18958    pub issue_date: Option<Vec<String>>,
18959    ///Property: Issuer
18960    #[serde(skip_serializing_if = "Option::is_none")]
18961    #[cfg_attr(
18962        feature = "builder",
18963        builder(with = |value:impl Into<String>|vec![value.into()])
18964    )]
18965    pub issuer: Option<Vec<String>>,
18966    ///Property: Keywords
18967    #[serde(skip_serializing_if = "Option::is_none")]
18968    #[cfg_attr(
18969        feature = "builder",
18970        builder(with = |value:impl Into<String>|vec![value.into()])
18971    )]
18972    pub keywords: Option<Vec<String>>,
18973    ///Property: Maturity date
18974    #[serde(skip_serializing_if = "Option::is_none")]
18975    #[cfg_attr(
18976        feature = "builder",
18977        builder(with = |value:impl Into<String>|vec![value.into()])
18978    )]
18979    pub maturity_date: Option<Vec<String>>,
18980    ///Property: Modified on
18981    #[serde(skip_serializing_if = "Option::is_none")]
18982    #[cfg_attr(
18983        feature = "builder",
18984        builder(with = |value:impl Into<String>|vec![value.into()])
18985    )]
18986    pub modified_at: Option<Vec<String>>,
18987    ///Property: Name
18988    #[serde(default)]
18989    #[cfg_attr(
18990        feature = "builder",
18991        builder(with = |value:impl Into<String>|vec![value.into()])
18992    )]
18993    pub name: Vec<String>,
18994    ///Property: Notes
18995    #[serde(skip_serializing_if = "Option::is_none")]
18996    #[cfg_attr(
18997        feature = "builder",
18998        builder(with = |value:impl Into<String>|vec![value.into()])
18999    )]
19000    pub notes: Option<Vec<String>>,
19001    ///Property: Previous name
19002    #[serde(skip_serializing_if = "Option::is_none")]
19003    #[cfg_attr(
19004        feature = "builder",
19005        builder(with = |value:impl Into<String>|vec![value.into()])
19006    )]
19007    pub previous_name: Option<Vec<String>>,
19008    ///Property: Program
19009    #[serde(skip_serializing_if = "Option::is_none")]
19010    #[cfg_attr(
19011        feature = "builder",
19012        builder(with = |value:impl Into<String>|vec![value.into()])
19013    )]
19014    pub program: Option<Vec<String>>,
19015    ///Property: Program ID
19016    #[serde(skip_serializing_if = "Option::is_none")]
19017    #[cfg_attr(
19018        feature = "builder",
19019        builder(with = |value:impl Into<String>|vec![value.into()])
19020    )]
19021    pub program_id: Option<Vec<String>>,
19022    ///Property: Source document
19023    #[serde(skip_serializing_if = "Option::is_none")]
19024    #[cfg_attr(
19025        feature = "builder",
19026        builder(with = |value:impl Into<String>|vec![value.into()])
19027    )]
19028    pub proof: Option<Vec<String>>,
19029    ///Property: Publishing source
19030    #[serde(skip_serializing_if = "Option::is_none")]
19031    #[cfg_attr(
19032        feature = "builder",
19033        builder(with = |value:impl Into<String>|vec![value.into()])
19034    )]
19035    pub publisher: Option<Vec<String>>,
19036    ///Property: Publishing source URL
19037    #[serde(skip_serializing_if = "Option::is_none")]
19038    #[cfg_attr(
19039        feature = "builder",
19040        builder(with = |value:impl Into<String>|vec![value.into()])
19041    )]
19042    pub publisher_url: Option<Vec<String>>,
19043    ///Property: Registration number
19044    #[serde(skip_serializing_if = "Option::is_none")]
19045    #[cfg_attr(
19046        feature = "builder",
19047        builder(with = |value:impl Into<String>|vec![value.into()])
19048    )]
19049    pub registration_number: Option<Vec<String>>,
19050    ///Property: Retrieved on
19051    #[serde(skip_serializing_if = "Option::is_none")]
19052    #[cfg_attr(
19053        feature = "builder",
19054        builder(with = |value:impl Into<String>|vec![value.into()])
19055    )]
19056    pub retrieved_at: Option<Vec<String>>,
19057    ///Property: Source link
19058    #[serde(skip_serializing_if = "Option::is_none")]
19059    #[cfg_attr(
19060        feature = "builder",
19061        builder(with = |value:impl Into<String>|vec![value.into()])
19062    )]
19063    pub source_url: Option<Vec<String>>,
19064    ///Property: Summary
19065    #[serde(skip_serializing_if = "Option::is_none")]
19066    #[cfg_attr(
19067        feature = "builder",
19068        builder(with = |value:impl Into<String>|vec![value.into()])
19069    )]
19070    pub summary: Option<Vec<String>>,
19071    ///Property: Stock ticker symbol
19072    #[serde(skip_serializing_if = "Option::is_none")]
19073    #[cfg_attr(
19074        feature = "builder",
19075        builder(with = |value:impl Into<String>|vec![value.into()])
19076    )]
19077    pub ticker: Option<Vec<String>>,
19078    ///Property: Topics
19079    #[serde(skip_serializing_if = "Option::is_none")]
19080    #[cfg_attr(
19081        feature = "builder",
19082        builder(with = |value:impl Into<String>|vec![value.into()])
19083    )]
19084    pub topics: Option<Vec<String>>,
19085    ///Property: Type
19086    #[serde(skip_serializing_if = "Option::is_none")]
19087    #[cfg_attr(
19088        feature = "builder",
19089        builder(with = |value:impl Into<String>|vec![value.into()])
19090    )]
19091    pub type_: Option<Vec<String>>,
19092    ///Property: Weak alias
19093    #[serde(skip_serializing_if = "Option::is_none")]
19094    #[cfg_attr(
19095        feature = "builder",
19096        builder(with = |value:impl Into<String>|vec![value.into()])
19097    )]
19098    pub weak_alias: Option<Vec<String>>,
19099    ///Property: Wikidata ID
19100    #[serde(skip_serializing_if = "Option::is_none")]
19101    #[cfg_attr(
19102        feature = "builder",
19103        builder(with = |value:impl Into<String>|vec![value.into()])
19104    )]
19105    pub wikidata_id: Option<Vec<String>>,
19106    ///Property: Wikipedia Article
19107    #[serde(skip_serializing_if = "Option::is_none")]
19108    #[cfg_attr(
19109        feature = "builder",
19110        builder(with = |value:impl Into<String>|vec![value.into()])
19111    )]
19112    pub wikipedia_url: Option<Vec<String>>,
19113}
19114impl Security {
19115    /// Create a new entity with the given ID
19116    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
19117    pub fn new(id: impl Into<String>) -> Self {
19118        Self {
19119            id: id.into(),
19120            schema: "Security".to_string(),
19121            address: None,
19122            address_entity: None,
19123            aleph_url: None,
19124            alias: None,
19125            amount: None,
19126            amount_eur: None,
19127            amount_usd: None,
19128            classification: None,
19129            collateral: None,
19130            country: None,
19131            created_at: None,
19132            currency: None,
19133            description: None,
19134            figi_code: None,
19135            index_text: None,
19136            isin: None,
19137            issue_date: None,
19138            issuer: None,
19139            keywords: None,
19140            maturity_date: None,
19141            modified_at: None,
19142            name: Vec::new(),
19143            notes: None,
19144            previous_name: None,
19145            program: None,
19146            program_id: None,
19147            proof: None,
19148            publisher: None,
19149            publisher_url: None,
19150            registration_number: None,
19151            retrieved_at: None,
19152            source_url: None,
19153            summary: None,
19154            ticker: None,
19155            topics: None,
19156            type_: None,
19157            weak_alias: None,
19158            wikidata_id: None,
19159            wikipedia_url: None,
19160        }
19161    }
19162    /// Get the schema name
19163    pub fn schema_name() -> &'static str {
19164        "Security"
19165    }
19166    /// Serialize to standard FTM nested JSON format
19167    ///
19168    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
19169    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
19170        let mut value = serde_json::to_value(self)?;
19171        if let Some(obj) = value.as_object_mut() {
19172            let id = obj.remove("id");
19173            let schema = obj.remove("schema");
19174            let properties = serde_json::Value::Object(std::mem::take(obj));
19175            if let Some(id) = id {
19176                obj.insert("id".into(), id);
19177            }
19178            if let Some(schema) = schema {
19179                obj.insert("schema".into(), schema);
19180            }
19181            obj.insert("properties".into(), properties);
19182        }
19183        serde_json::to_string(&value)
19184    }
19185}
19186///FTM Schema: Similar
19187#[derive(Debug, Clone, Serialize, Deserialize)]
19188#[cfg_attr(feature = "builder", derive(Builder))]
19189#[serde(rename_all = "camelCase")]
19190pub struct Similar {
19191    pub id: String,
19192    #[cfg_attr(feature = "builder", builder(default = "Similar".to_string()))]
19193    pub schema: String,
19194    ///Property: Candidate
19195    #[serde(skip_serializing_if = "Option::is_none")]
19196    #[cfg_attr(
19197        feature = "builder",
19198        builder(with = |value:impl Into<String>|vec![value.into()])
19199    )]
19200    pub candidate: Option<Vec<String>>,
19201    ///Property: Confidence score
19202    #[serde(
19203        skip_serializing_if = "Option::is_none",
19204        deserialize_with = "deserialize_opt_f64_vec",
19205        default
19206    )]
19207    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
19208    pub confidence_score: Option<Vec<f64>>,
19209    ///Property: Matching criteria
19210    #[serde(skip_serializing_if = "Option::is_none")]
19211    #[cfg_attr(
19212        feature = "builder",
19213        builder(with = |value:impl Into<String>|vec![value.into()])
19214    )]
19215    pub criteria: Option<Vec<String>>,
19216    ///Property: Match
19217    #[serde(skip_serializing_if = "Option::is_none")]
19218    #[cfg_attr(
19219        feature = "builder",
19220        builder(with = |value:impl Into<String>|vec![value.into()])
19221    )]
19222    pub match_: Option<Vec<String>>,
19223    ///Property: Matcher
19224    #[serde(skip_serializing_if = "Option::is_none")]
19225    #[cfg_attr(
19226        feature = "builder",
19227        builder(with = |value:impl Into<String>|vec![value.into()])
19228    )]
19229    pub matcher: Option<Vec<String>>,
19230}
19231impl Similar {
19232    /// Create a new entity with the given ID
19233    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
19234    pub fn new(id: impl Into<String>) -> Self {
19235        Self {
19236            id: id.into(),
19237            schema: "Similar".to_string(),
19238            candidate: None,
19239            confidence_score: None,
19240            criteria: None,
19241            match_: None,
19242            matcher: None,
19243        }
19244    }
19245    /// Get the schema name
19246    pub fn schema_name() -> &'static str {
19247        "Similar"
19248    }
19249    /// Serialize to standard FTM nested JSON format
19250    ///
19251    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
19252    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
19253        let mut value = serde_json::to_value(self)?;
19254        if let Some(obj) = value.as_object_mut() {
19255            let id = obj.remove("id");
19256            let schema = obj.remove("schema");
19257            let properties = serde_json::Value::Object(std::mem::take(obj));
19258            if let Some(id) = id {
19259                obj.insert("id".into(), id);
19260            }
19261            if let Some(schema) = schema {
19262                obj.insert("schema".into(), schema);
19263            }
19264            obj.insert("properties".into(), properties);
19265        }
19266        serde_json::to_string(&value)
19267    }
19268}
19269///FTM Schema: Succession
19270#[derive(Debug, Clone, Serialize, Deserialize)]
19271#[cfg_attr(feature = "builder", derive(Builder))]
19272#[serde(rename_all = "camelCase")]
19273pub struct Succession {
19274    pub id: String,
19275    #[cfg_attr(feature = "builder", builder(default = "Succession".to_string()))]
19276    pub schema: String,
19277    ///Property: Aleph URL
19278    #[serde(skip_serializing_if = "Option::is_none")]
19279    #[cfg_attr(
19280        feature = "builder",
19281        builder(with = |value:impl Into<String>|vec![value.into()])
19282    )]
19283    pub aleph_url: Option<Vec<String>>,
19284    ///Property: Date
19285    #[serde(skip_serializing_if = "Option::is_none")]
19286    #[cfg_attr(
19287        feature = "builder",
19288        builder(with = |value:impl Into<String>|vec![value.into()])
19289    )]
19290    pub date: Option<Vec<String>>,
19291    ///Property: Description
19292    #[serde(skip_serializing_if = "Option::is_none")]
19293    #[cfg_attr(
19294        feature = "builder",
19295        builder(with = |value:impl Into<String>|vec![value.into()])
19296    )]
19297    pub description: Option<Vec<String>>,
19298    ///Property: End date
19299    #[serde(skip_serializing_if = "Option::is_none")]
19300    #[cfg_attr(
19301        feature = "builder",
19302        builder(with = |value:impl Into<String>|vec![value.into()])
19303    )]
19304    pub end_date: Option<Vec<String>>,
19305    ///Property: Index text
19306    #[serde(skip_serializing_if = "Option::is_none")]
19307    #[cfg_attr(
19308        feature = "builder",
19309        builder(with = |value:impl Into<String>|vec![value.into()])
19310    )]
19311    pub index_text: Option<Vec<String>>,
19312    ///Property: Modified on
19313    #[serde(skip_serializing_if = "Option::is_none")]
19314    #[cfg_attr(
19315        feature = "builder",
19316        builder(with = |value:impl Into<String>|vec![value.into()])
19317    )]
19318    pub modified_at: Option<Vec<String>>,
19319    ///Property: Detected names
19320    #[serde(skip_serializing_if = "Option::is_none")]
19321    #[cfg_attr(
19322        feature = "builder",
19323        builder(with = |value:impl Into<String>|vec![value.into()])
19324    )]
19325    pub names_mentioned: Option<Vec<String>>,
19326    ///Property: Predecessor
19327    #[serde(default)]
19328    #[cfg_attr(
19329        feature = "builder",
19330        builder(with = |value:impl Into<String>|vec![value.into()])
19331    )]
19332    pub predecessor: Vec<String>,
19333    ///Property: Source document
19334    #[serde(skip_serializing_if = "Option::is_none")]
19335    #[cfg_attr(
19336        feature = "builder",
19337        builder(with = |value:impl Into<String>|vec![value.into()])
19338    )]
19339    pub proof: Option<Vec<String>>,
19340    ///Property: Publishing source
19341    #[serde(skip_serializing_if = "Option::is_none")]
19342    #[cfg_attr(
19343        feature = "builder",
19344        builder(with = |value:impl Into<String>|vec![value.into()])
19345    )]
19346    pub publisher: Option<Vec<String>>,
19347    ///Property: Publishing source URL
19348    #[serde(skip_serializing_if = "Option::is_none")]
19349    #[cfg_attr(
19350        feature = "builder",
19351        builder(with = |value:impl Into<String>|vec![value.into()])
19352    )]
19353    pub publisher_url: Option<Vec<String>>,
19354    ///Property: Record ID
19355    #[serde(skip_serializing_if = "Option::is_none")]
19356    #[cfg_attr(
19357        feature = "builder",
19358        builder(with = |value:impl Into<String>|vec![value.into()])
19359    )]
19360    pub record_id: Option<Vec<String>>,
19361    ///Property: Retrieved on
19362    #[serde(skip_serializing_if = "Option::is_none")]
19363    #[cfg_attr(
19364        feature = "builder",
19365        builder(with = |value:impl Into<String>|vec![value.into()])
19366    )]
19367    pub retrieved_at: Option<Vec<String>>,
19368    ///Property: Role
19369    #[serde(skip_serializing_if = "Option::is_none")]
19370    #[cfg_attr(
19371        feature = "builder",
19372        builder(with = |value:impl Into<String>|vec![value.into()])
19373    )]
19374    pub role: Option<Vec<String>>,
19375    ///Property: Source link
19376    #[serde(skip_serializing_if = "Option::is_none")]
19377    #[cfg_attr(
19378        feature = "builder",
19379        builder(with = |value:impl Into<String>|vec![value.into()])
19380    )]
19381    pub source_url: Option<Vec<String>>,
19382    ///Property: Start date
19383    #[serde(skip_serializing_if = "Option::is_none")]
19384    #[cfg_attr(
19385        feature = "builder",
19386        builder(with = |value:impl Into<String>|vec![value.into()])
19387    )]
19388    pub start_date: Option<Vec<String>>,
19389    ///Property: Status
19390    #[serde(skip_serializing_if = "Option::is_none")]
19391    #[cfg_attr(
19392        feature = "builder",
19393        builder(with = |value:impl Into<String>|vec![value.into()])
19394    )]
19395    pub status: Option<Vec<String>>,
19396    ///Property: Successor
19397    #[serde(default)]
19398    #[cfg_attr(
19399        feature = "builder",
19400        builder(with = |value:impl Into<String>|vec![value.into()])
19401    )]
19402    pub successor: Vec<String>,
19403    ///Property: Summary
19404    #[serde(skip_serializing_if = "Option::is_none")]
19405    #[cfg_attr(
19406        feature = "builder",
19407        builder(with = |value:impl Into<String>|vec![value.into()])
19408    )]
19409    pub summary: Option<Vec<String>>,
19410}
19411impl Succession {
19412    /// Create a new entity with the given ID
19413    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
19414    pub fn new(id: impl Into<String>) -> Self {
19415        Self {
19416            id: id.into(),
19417            schema: "Succession".to_string(),
19418            aleph_url: None,
19419            date: None,
19420            description: None,
19421            end_date: None,
19422            index_text: None,
19423            modified_at: None,
19424            names_mentioned: None,
19425            predecessor: Vec::new(),
19426            proof: None,
19427            publisher: None,
19428            publisher_url: None,
19429            record_id: None,
19430            retrieved_at: None,
19431            role: None,
19432            source_url: None,
19433            start_date: None,
19434            status: None,
19435            successor: Vec::new(),
19436            summary: None,
19437        }
19438    }
19439    /// Get the schema name
19440    pub fn schema_name() -> &'static str {
19441        "Succession"
19442    }
19443    /// Serialize to standard FTM nested JSON format
19444    ///
19445    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
19446    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
19447        let mut value = serde_json::to_value(self)?;
19448        if let Some(obj) = value.as_object_mut() {
19449            let id = obj.remove("id");
19450            let schema = obj.remove("schema");
19451            let properties = serde_json::Value::Object(std::mem::take(obj));
19452            if let Some(id) = id {
19453                obj.insert("id".into(), id);
19454            }
19455            if let Some(schema) = schema {
19456                obj.insert("schema".into(), schema);
19457            }
19458            obj.insert("properties".into(), properties);
19459        }
19460        serde_json::to_string(&value)
19461    }
19462}
19463///FTM Schema: Table
19464#[derive(Debug, Clone, Serialize, Deserialize)]
19465#[cfg_attr(feature = "builder", derive(Builder))]
19466#[serde(rename_all = "camelCase")]
19467pub struct Table {
19468    pub id: String,
19469    #[cfg_attr(feature = "builder", builder(default = "Table".to_string()))]
19470    pub schema: String,
19471    ///Property: Address
19472    #[serde(skip_serializing_if = "Option::is_none")]
19473    #[cfg_attr(
19474        feature = "builder",
19475        builder(with = |value:impl Into<String>|vec![value.into()])
19476    )]
19477    pub address: Option<Vec<String>>,
19478    ///Property: Address
19479    #[serde(skip_serializing_if = "Option::is_none")]
19480    #[cfg_attr(
19481        feature = "builder",
19482        builder(with = |value:impl Into<String>|vec![value.into()])
19483    )]
19484    pub address_entity: Option<Vec<String>>,
19485    ///Property: Aleph URL
19486    #[serde(skip_serializing_if = "Option::is_none")]
19487    #[cfg_attr(
19488        feature = "builder",
19489        builder(with = |value:impl Into<String>|vec![value.into()])
19490    )]
19491    pub aleph_url: Option<Vec<String>>,
19492    ///Property: Alias
19493    #[serde(skip_serializing_if = "Option::is_none")]
19494    #[cfg_attr(
19495        feature = "builder",
19496        builder(with = |value:impl Into<String>|vec![value.into()])
19497    )]
19498    pub alias: Option<Vec<String>>,
19499    ///Property: Ancestors
19500    #[serde(skip_serializing_if = "Option::is_none")]
19501    #[cfg_attr(
19502        feature = "builder",
19503        builder(with = |value:impl Into<String>|vec![value.into()])
19504    )]
19505    pub ancestors: Option<Vec<String>>,
19506    ///Property: Author
19507    #[serde(skip_serializing_if = "Option::is_none")]
19508    #[cfg_attr(
19509        feature = "builder",
19510        builder(with = |value:impl Into<String>|vec![value.into()])
19511    )]
19512    pub author: Option<Vec<String>>,
19513    ///Property: Authored on
19514    #[serde(skip_serializing_if = "Option::is_none")]
19515    #[cfg_attr(
19516        feature = "builder",
19517        builder(with = |value:impl Into<String>|vec![value.into()])
19518    )]
19519    pub authored_at: Option<Vec<String>>,
19520    ///Property: Text
19521    #[serde(skip_serializing_if = "Option::is_none")]
19522    #[cfg_attr(
19523        feature = "builder",
19524        builder(with = |value:impl Into<String>|vec![value.into()])
19525    )]
19526    pub body_text: Option<Vec<String>>,
19527    ///Property: Column headings
19528    #[serde(skip_serializing_if = "Option::is_none")]
19529    pub columns: Option<serde_json::Value>,
19530    ///Property: Detected companies
19531    #[serde(skip_serializing_if = "Option::is_none")]
19532    #[cfg_attr(
19533        feature = "builder",
19534        builder(with = |value:impl Into<String>|vec![value.into()])
19535    )]
19536    pub companies_mentioned: Option<Vec<String>>,
19537    ///Property: Checksum
19538    #[serde(skip_serializing_if = "Option::is_none")]
19539    #[cfg_attr(
19540        feature = "builder",
19541        builder(with = |value:impl Into<String>|vec![value.into()])
19542    )]
19543    pub content_hash: Option<Vec<String>>,
19544    ///Property: Country
19545    #[serde(skip_serializing_if = "Option::is_none")]
19546    #[cfg_attr(
19547        feature = "builder",
19548        builder(with = |value:impl Into<String>|vec![value.into()])
19549    )]
19550    pub country: Option<Vec<String>>,
19551    ///Property: Crawler
19552    #[serde(skip_serializing_if = "Option::is_none")]
19553    #[cfg_attr(
19554        feature = "builder",
19555        builder(with = |value:impl Into<String>|vec![value.into()])
19556    )]
19557    pub crawler: Option<Vec<String>>,
19558    ///Property: Created at
19559    #[serde(skip_serializing_if = "Option::is_none")]
19560    #[cfg_attr(
19561        feature = "builder",
19562        builder(with = |value:impl Into<String>|vec![value.into()])
19563    )]
19564    pub created_at: Option<Vec<String>>,
19565    ///Property: CSV alternative version checksum
19566    #[serde(skip_serializing_if = "Option::is_none")]
19567    #[cfg_attr(
19568        feature = "builder",
19569        builder(with = |value:impl Into<String>|vec![value.into()])
19570    )]
19571    pub csv_hash: Option<Vec<String>>,
19572    ///Property: Date
19573    #[serde(skip_serializing_if = "Option::is_none")]
19574    #[cfg_attr(
19575        feature = "builder",
19576        builder(with = |value:impl Into<String>|vec![value.into()])
19577    )]
19578    pub date: Option<Vec<String>>,
19579    ///Property: Description
19580    #[serde(skip_serializing_if = "Option::is_none")]
19581    #[cfg_attr(
19582        feature = "builder",
19583        builder(with = |value:impl Into<String>|vec![value.into()])
19584    )]
19585    pub description: Option<Vec<String>>,
19586    ///Property: Detected country
19587    #[serde(skip_serializing_if = "Option::is_none")]
19588    #[cfg_attr(
19589        feature = "builder",
19590        builder(with = |value:impl Into<String>|vec![value.into()])
19591    )]
19592    pub detected_country: Option<Vec<String>>,
19593    ///Property: Detected language
19594    #[serde(skip_serializing_if = "Option::is_none")]
19595    #[cfg_attr(
19596        feature = "builder",
19597        builder(with = |value:impl Into<String>|vec![value.into()])
19598    )]
19599    pub detected_language: Option<Vec<String>>,
19600    ///Property: Detected e-mail addresses
19601    #[serde(skip_serializing_if = "Option::is_none")]
19602    #[cfg_attr(
19603        feature = "builder",
19604        builder(with = |value:impl Into<String>|vec![value.into()])
19605    )]
19606    pub email_mentioned: Option<Vec<String>>,
19607    ///Property: File encoding
19608    #[serde(skip_serializing_if = "Option::is_none")]
19609    #[cfg_attr(
19610        feature = "builder",
19611        builder(with = |value:impl Into<String>|vec![value.into()])
19612    )]
19613    pub encoding: Option<Vec<String>>,
19614    ///Property: File extension
19615    #[serde(skip_serializing_if = "Option::is_none")]
19616    #[cfg_attr(
19617        feature = "builder",
19618        builder(with = |value:impl Into<String>|vec![value.into()])
19619    )]
19620    pub extension: Option<Vec<String>>,
19621    ///Property: File name
19622    #[serde(default)]
19623    #[cfg_attr(
19624        feature = "builder",
19625        builder(with = |value:impl Into<String>|vec![value.into()])
19626    )]
19627    pub file_name: Vec<String>,
19628    ///Property: File size
19629    #[serde(
19630        skip_serializing_if = "Option::is_none",
19631        deserialize_with = "deserialize_opt_f64_vec",
19632        default
19633    )]
19634    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
19635    pub file_size: Option<Vec<f64>>,
19636    ///Property: Generator
19637    #[serde(skip_serializing_if = "Option::is_none")]
19638    #[cfg_attr(
19639        feature = "builder",
19640        builder(with = |value:impl Into<String>|vec![value.into()])
19641    )]
19642    pub generator: Option<Vec<String>>,
19643    ///Property: Detected IBANs
19644    #[serde(skip_serializing_if = "Option::is_none")]
19645    #[cfg_attr(
19646        feature = "builder",
19647        builder(with = |value:impl Into<String>|vec![value.into()])
19648    )]
19649    pub iban_mentioned: Option<Vec<String>>,
19650    ///Property: Index text
19651    #[serde(skip_serializing_if = "Option::is_none")]
19652    #[cfg_attr(
19653        feature = "builder",
19654        builder(with = |value:impl Into<String>|vec![value.into()])
19655    )]
19656    pub index_text: Option<Vec<String>>,
19657    ///Property: Detected IP addresses
19658    #[serde(skip_serializing_if = "Option::is_none")]
19659    #[cfg_attr(
19660        feature = "builder",
19661        builder(with = |value:impl Into<String>|vec![value.into()])
19662    )]
19663    pub ip_mentioned: Option<Vec<String>>,
19664    ///Property: Keywords
19665    #[serde(skip_serializing_if = "Option::is_none")]
19666    #[cfg_attr(
19667        feature = "builder",
19668        builder(with = |value:impl Into<String>|vec![value.into()])
19669    )]
19670    pub keywords: Option<Vec<String>>,
19671    ///Property: Language
19672    #[serde(skip_serializing_if = "Option::is_none")]
19673    #[cfg_attr(
19674        feature = "builder",
19675        builder(with = |value:impl Into<String>|vec![value.into()])
19676    )]
19677    pub language: Option<Vec<String>>,
19678    ///Property: Detected locations
19679    #[serde(skip_serializing_if = "Option::is_none")]
19680    #[cfg_attr(
19681        feature = "builder",
19682        builder(with = |value:impl Into<String>|vec![value.into()])
19683    )]
19684    pub location_mentioned: Option<Vec<String>>,
19685    ///Property: Message ID
19686    #[serde(skip_serializing_if = "Option::is_none")]
19687    #[cfg_attr(
19688        feature = "builder",
19689        builder(with = |value:impl Into<String>|vec![value.into()])
19690    )]
19691    pub message_id: Option<Vec<String>>,
19692    ///Property: MIME type
19693    #[serde(skip_serializing_if = "Option::is_none")]
19694    #[cfg_attr(
19695        feature = "builder",
19696        builder(with = |value:impl Into<String>|vec![value.into()])
19697    )]
19698    pub mime_type: Option<Vec<String>>,
19699    ///Property: Modified on
19700    #[serde(skip_serializing_if = "Option::is_none")]
19701    #[cfg_attr(
19702        feature = "builder",
19703        builder(with = |value:impl Into<String>|vec![value.into()])
19704    )]
19705    pub modified_at: Option<Vec<String>>,
19706    ///Property: Name
19707    #[serde(default)]
19708    #[cfg_attr(
19709        feature = "builder",
19710        builder(with = |value:impl Into<String>|vec![value.into()])
19711    )]
19712    pub name: Vec<String>,
19713    ///Property: Detected names
19714    #[serde(skip_serializing_if = "Option::is_none")]
19715    #[cfg_attr(
19716        feature = "builder",
19717        builder(with = |value:impl Into<String>|vec![value.into()])
19718    )]
19719    pub names_mentioned: Option<Vec<String>>,
19720    ///Property: Notes
19721    #[serde(skip_serializing_if = "Option::is_none")]
19722    #[cfg_attr(
19723        feature = "builder",
19724        builder(with = |value:impl Into<String>|vec![value.into()])
19725    )]
19726    pub notes: Option<Vec<String>>,
19727    ///Property: Folder
19728    #[serde(skip_serializing_if = "Option::is_none")]
19729    #[cfg_attr(
19730        feature = "builder",
19731        builder(with = |value:impl Into<String>|vec![value.into()])
19732    )]
19733    pub parent: Option<Vec<String>>,
19734    ///Property: Detected people
19735    #[serde(skip_serializing_if = "Option::is_none")]
19736    #[cfg_attr(
19737        feature = "builder",
19738        builder(with = |value:impl Into<String>|vec![value.into()])
19739    )]
19740    pub people_mentioned: Option<Vec<String>>,
19741    ///Property: Detected phones
19742    #[serde(skip_serializing_if = "Option::is_none")]
19743    #[cfg_attr(
19744        feature = "builder",
19745        builder(with = |value:impl Into<String>|vec![value.into()])
19746    )]
19747    pub phone_mentioned: Option<Vec<String>>,
19748    ///Property: Previous name
19749    #[serde(skip_serializing_if = "Option::is_none")]
19750    #[cfg_attr(
19751        feature = "builder",
19752        builder(with = |value:impl Into<String>|vec![value.into()])
19753    )]
19754    pub previous_name: Option<Vec<String>>,
19755    ///Property: Processed at
19756    #[serde(skip_serializing_if = "Option::is_none")]
19757    #[cfg_attr(
19758        feature = "builder",
19759        builder(with = |value:impl Into<String>|vec![value.into()])
19760    )]
19761    pub processed_at: Option<Vec<String>>,
19762    ///Property: Processing agent
19763    #[serde(skip_serializing_if = "Option::is_none")]
19764    #[cfg_attr(
19765        feature = "builder",
19766        builder(with = |value:impl Into<String>|vec![value.into()])
19767    )]
19768    pub processing_agent: Option<Vec<String>>,
19769    ///Property: Processing error
19770    #[serde(skip_serializing_if = "Option::is_none")]
19771    #[cfg_attr(
19772        feature = "builder",
19773        builder(with = |value:impl Into<String>|vec![value.into()])
19774    )]
19775    pub processing_error: Option<Vec<String>>,
19776    ///Property: Processing status
19777    #[serde(skip_serializing_if = "Option::is_none")]
19778    #[cfg_attr(
19779        feature = "builder",
19780        builder(with = |value:impl Into<String>|vec![value.into()])
19781    )]
19782    pub processing_status: Option<Vec<String>>,
19783    ///Property: Program
19784    #[serde(skip_serializing_if = "Option::is_none")]
19785    #[cfg_attr(
19786        feature = "builder",
19787        builder(with = |value:impl Into<String>|vec![value.into()])
19788    )]
19789    pub program: Option<Vec<String>>,
19790    ///Property: Program ID
19791    #[serde(skip_serializing_if = "Option::is_none")]
19792    #[cfg_attr(
19793        feature = "builder",
19794        builder(with = |value:impl Into<String>|vec![value.into()])
19795    )]
19796    pub program_id: Option<Vec<String>>,
19797    ///Property: Source document
19798    #[serde(skip_serializing_if = "Option::is_none")]
19799    #[cfg_attr(
19800        feature = "builder",
19801        builder(with = |value:impl Into<String>|vec![value.into()])
19802    )]
19803    pub proof: Option<Vec<String>>,
19804    ///Property: Published on
19805    #[serde(skip_serializing_if = "Option::is_none")]
19806    #[cfg_attr(
19807        feature = "builder",
19808        builder(with = |value:impl Into<String>|vec![value.into()])
19809    )]
19810    pub published_at: Option<Vec<String>>,
19811    ///Property: Publishing source
19812    #[serde(skip_serializing_if = "Option::is_none")]
19813    #[cfg_attr(
19814        feature = "builder",
19815        builder(with = |value:impl Into<String>|vec![value.into()])
19816    )]
19817    pub publisher: Option<Vec<String>>,
19818    ///Property: Publishing source URL
19819    #[serde(skip_serializing_if = "Option::is_none")]
19820    #[cfg_attr(
19821        feature = "builder",
19822        builder(with = |value:impl Into<String>|vec![value.into()])
19823    )]
19824    pub publisher_url: Option<Vec<String>>,
19825    ///Property: Retrieved on
19826    #[serde(skip_serializing_if = "Option::is_none")]
19827    #[cfg_attr(
19828        feature = "builder",
19829        builder(with = |value:impl Into<String>|vec![value.into()])
19830    )]
19831    pub retrieved_at: Option<Vec<String>>,
19832    ///Property: Number of rows
19833    #[serde(
19834        skip_serializing_if = "Option::is_none",
19835        deserialize_with = "deserialize_opt_f64_vec",
19836        default
19837    )]
19838    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
19839    pub row_count: Option<Vec<f64>>,
19840    ///Property: Source link
19841    #[serde(skip_serializing_if = "Option::is_none")]
19842    #[cfg_attr(
19843        feature = "builder",
19844        builder(with = |value:impl Into<String>|vec![value.into()])
19845    )]
19846    pub source_url: Option<Vec<String>>,
19847    ///Property: Summary
19848    #[serde(skip_serializing_if = "Option::is_none")]
19849    #[cfg_attr(
19850        feature = "builder",
19851        builder(with = |value:impl Into<String>|vec![value.into()])
19852    )]
19853    pub summary: Option<Vec<String>>,
19854    ///Property: Title
19855    #[serde(skip_serializing_if = "Option::is_none")]
19856    #[cfg_attr(
19857        feature = "builder",
19858        builder(with = |value:impl Into<String>|vec![value.into()])
19859    )]
19860    pub title: Option<Vec<String>>,
19861    ///Property: Topics
19862    #[serde(skip_serializing_if = "Option::is_none")]
19863    #[cfg_attr(
19864        feature = "builder",
19865        builder(with = |value:impl Into<String>|vec![value.into()])
19866    )]
19867    pub topics: Option<Vec<String>>,
19868    ///Property: The language of the translated text
19869    #[serde(skip_serializing_if = "Option::is_none")]
19870    #[cfg_attr(
19871        feature = "builder",
19872        builder(with = |value:impl Into<String>|vec![value.into()])
19873    )]
19874    pub translated_language: Option<Vec<String>>,
19875    ///Property: Translated version of the body text
19876    #[serde(skip_serializing_if = "Option::is_none")]
19877    #[cfg_attr(
19878        feature = "builder",
19879        builder(with = |value:impl Into<String>|vec![value.into()])
19880    )]
19881    pub translated_text: Option<Vec<String>>,
19882    ///Property: Weak alias
19883    #[serde(skip_serializing_if = "Option::is_none")]
19884    #[cfg_attr(
19885        feature = "builder",
19886        builder(with = |value:impl Into<String>|vec![value.into()])
19887    )]
19888    pub weak_alias: Option<Vec<String>>,
19889    ///Property: Wikidata ID
19890    #[serde(skip_serializing_if = "Option::is_none")]
19891    #[cfg_attr(
19892        feature = "builder",
19893        builder(with = |value:impl Into<String>|vec![value.into()])
19894    )]
19895    pub wikidata_id: Option<Vec<String>>,
19896    ///Property: Wikipedia Article
19897    #[serde(skip_serializing_if = "Option::is_none")]
19898    #[cfg_attr(
19899        feature = "builder",
19900        builder(with = |value:impl Into<String>|vec![value.into()])
19901    )]
19902    pub wikipedia_url: Option<Vec<String>>,
19903}
19904impl Table {
19905    /// Create a new entity with the given ID
19906    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
19907    pub fn new(id: impl Into<String>) -> Self {
19908        Self {
19909            id: id.into(),
19910            schema: "Table".to_string(),
19911            address: None,
19912            address_entity: None,
19913            aleph_url: None,
19914            alias: None,
19915            ancestors: None,
19916            author: None,
19917            authored_at: None,
19918            body_text: None,
19919            columns: None,
19920            companies_mentioned: None,
19921            content_hash: None,
19922            country: None,
19923            crawler: None,
19924            created_at: None,
19925            csv_hash: None,
19926            date: None,
19927            description: None,
19928            detected_country: None,
19929            detected_language: None,
19930            email_mentioned: None,
19931            encoding: None,
19932            extension: None,
19933            file_name: Vec::new(),
19934            file_size: None,
19935            generator: None,
19936            iban_mentioned: None,
19937            index_text: None,
19938            ip_mentioned: None,
19939            keywords: None,
19940            language: None,
19941            location_mentioned: None,
19942            message_id: None,
19943            mime_type: None,
19944            modified_at: None,
19945            name: Vec::new(),
19946            names_mentioned: None,
19947            notes: None,
19948            parent: None,
19949            people_mentioned: None,
19950            phone_mentioned: None,
19951            previous_name: None,
19952            processed_at: None,
19953            processing_agent: None,
19954            processing_error: None,
19955            processing_status: None,
19956            program: None,
19957            program_id: None,
19958            proof: None,
19959            published_at: None,
19960            publisher: None,
19961            publisher_url: None,
19962            retrieved_at: None,
19963            row_count: None,
19964            source_url: None,
19965            summary: None,
19966            title: None,
19967            topics: None,
19968            translated_language: None,
19969            translated_text: None,
19970            weak_alias: None,
19971            wikidata_id: None,
19972            wikipedia_url: None,
19973        }
19974    }
19975    /// Get the schema name
19976    pub fn schema_name() -> &'static str {
19977        "Table"
19978    }
19979    /// Serialize to standard FTM nested JSON format
19980    ///
19981    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
19982    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
19983        let mut value = serde_json::to_value(self)?;
19984        if let Some(obj) = value.as_object_mut() {
19985            let id = obj.remove("id");
19986            let schema = obj.remove("schema");
19987            let properties = serde_json::Value::Object(std::mem::take(obj));
19988            if let Some(id) = id {
19989                obj.insert("id".into(), id);
19990            }
19991            if let Some(schema) = schema {
19992                obj.insert("schema".into(), schema);
19993            }
19994            obj.insert("properties".into(), properties);
19995        }
19996        serde_json::to_string(&value)
19997    }
19998}
19999///FTM Schema: Tax roll
20000#[derive(Debug, Clone, Serialize, Deserialize)]
20001#[cfg_attr(feature = "builder", derive(Builder))]
20002#[serde(rename_all = "camelCase")]
20003pub struct TaxRoll {
20004    pub id: String,
20005    #[cfg_attr(feature = "builder", builder(default = "TaxRoll".to_string()))]
20006    pub schema: String,
20007    ///Property: Aleph URL
20008    #[serde(skip_serializing_if = "Option::is_none")]
20009    #[cfg_attr(
20010        feature = "builder",
20011        builder(with = |value:impl Into<String>|vec![value.into()])
20012    )]
20013    pub aleph_url: Option<Vec<String>>,
20014    ///Property: Birth date
20015    #[serde(skip_serializing_if = "Option::is_none")]
20016    #[cfg_attr(
20017        feature = "builder",
20018        builder(with = |value:impl Into<String>|vec![value.into()])
20019    )]
20020    pub birth_date: Option<Vec<String>>,
20021    ///Property: Country
20022    #[serde(skip_serializing_if = "Option::is_none")]
20023    #[cfg_attr(
20024        feature = "builder",
20025        builder(with = |value:impl Into<String>|vec![value.into()])
20026    )]
20027    pub country: Option<Vec<String>>,
20028    ///Property: Date
20029    #[serde(skip_serializing_if = "Option::is_none")]
20030    #[cfg_attr(
20031        feature = "builder",
20032        builder(with = |value:impl Into<String>|vec![value.into()])
20033    )]
20034    pub date: Option<Vec<String>>,
20035    ///Property: Description
20036    #[serde(skip_serializing_if = "Option::is_none")]
20037    #[cfg_attr(
20038        feature = "builder",
20039        builder(with = |value:impl Into<String>|vec![value.into()])
20040    )]
20041    pub description: Option<Vec<String>>,
20042    ///Property: End date
20043    #[serde(skip_serializing_if = "Option::is_none")]
20044    #[cfg_attr(
20045        feature = "builder",
20046        builder(with = |value:impl Into<String>|vec![value.into()])
20047    )]
20048    pub end_date: Option<Vec<String>>,
20049    ///Property: Given name
20050    #[serde(skip_serializing_if = "Option::is_none")]
20051    #[cfg_attr(
20052        feature = "builder",
20053        builder(with = |value:impl Into<String>|vec![value.into()])
20054    )]
20055    pub given_name: Option<Vec<String>>,
20056    ///Property: Registered income
20057    #[serde(skip_serializing_if = "Option::is_none")]
20058    #[cfg_attr(
20059        feature = "builder",
20060        builder(with = |value:impl Into<String>|vec![value.into()])
20061    )]
20062    pub income: Option<Vec<String>>,
20063    ///Property: Index text
20064    #[serde(skip_serializing_if = "Option::is_none")]
20065    #[cfg_attr(
20066        feature = "builder",
20067        builder(with = |value:impl Into<String>|vec![value.into()])
20068    )]
20069    pub index_text: Option<Vec<String>>,
20070    ///Property: Modified on
20071    #[serde(skip_serializing_if = "Option::is_none")]
20072    #[cfg_attr(
20073        feature = "builder",
20074        builder(with = |value:impl Into<String>|vec![value.into()])
20075    )]
20076    pub modified_at: Option<Vec<String>>,
20077    ///Property: Detected names
20078    #[serde(skip_serializing_if = "Option::is_none")]
20079    #[cfg_attr(
20080        feature = "builder",
20081        builder(with = |value:impl Into<String>|vec![value.into()])
20082    )]
20083    pub names_mentioned: Option<Vec<String>>,
20084    ///Property: Source document
20085    #[serde(skip_serializing_if = "Option::is_none")]
20086    #[cfg_attr(
20087        feature = "builder",
20088        builder(with = |value:impl Into<String>|vec![value.into()])
20089    )]
20090    pub proof: Option<Vec<String>>,
20091    ///Property: Publishing source
20092    #[serde(skip_serializing_if = "Option::is_none")]
20093    #[cfg_attr(
20094        feature = "builder",
20095        builder(with = |value:impl Into<String>|vec![value.into()])
20096    )]
20097    pub publisher: Option<Vec<String>>,
20098    ///Property: Publishing source URL
20099    #[serde(skip_serializing_if = "Option::is_none")]
20100    #[cfg_attr(
20101        feature = "builder",
20102        builder(with = |value:impl Into<String>|vec![value.into()])
20103    )]
20104    pub publisher_url: Option<Vec<String>>,
20105    ///Property: Record ID
20106    #[serde(skip_serializing_if = "Option::is_none")]
20107    #[cfg_attr(
20108        feature = "builder",
20109        builder(with = |value:impl Into<String>|vec![value.into()])
20110    )]
20111    pub record_id: Option<Vec<String>>,
20112    ///Property: Retrieved on
20113    #[serde(skip_serializing_if = "Option::is_none")]
20114    #[cfg_attr(
20115        feature = "builder",
20116        builder(with = |value:impl Into<String>|vec![value.into()])
20117    )]
20118    pub retrieved_at: Option<Vec<String>>,
20119    ///Property: Source link
20120    #[serde(skip_serializing_if = "Option::is_none")]
20121    #[cfg_attr(
20122        feature = "builder",
20123        builder(with = |value:impl Into<String>|vec![value.into()])
20124    )]
20125    pub source_url: Option<Vec<String>>,
20126    ///Property: Start date
20127    #[serde(skip_serializing_if = "Option::is_none")]
20128    #[cfg_attr(
20129        feature = "builder",
20130        builder(with = |value:impl Into<String>|vec![value.into()])
20131    )]
20132    pub start_date: Option<Vec<String>>,
20133    ///Property: Summary
20134    #[serde(skip_serializing_if = "Option::is_none")]
20135    #[cfg_attr(
20136        feature = "builder",
20137        builder(with = |value:impl Into<String>|vec![value.into()])
20138    )]
20139    pub summary: Option<Vec<String>>,
20140    ///Property: Surname
20141    #[serde(skip_serializing_if = "Option::is_none")]
20142    #[cfg_attr(
20143        feature = "builder",
20144        builder(with = |value:impl Into<String>|vec![value.into()])
20145    )]
20146    pub surname: Option<Vec<String>>,
20147    ///Property: Amount of tax paid
20148    #[serde(skip_serializing_if = "Option::is_none")]
20149    #[cfg_attr(
20150        feature = "builder",
20151        builder(with = |value:impl Into<String>|vec![value.into()])
20152    )]
20153    pub tax_paid: Option<Vec<String>>,
20154    ///Property: Taxee
20155    #[serde(default)]
20156    #[cfg_attr(
20157        feature = "builder",
20158        builder(with = |value:impl Into<String>|vec![value.into()])
20159    )]
20160    pub taxee: Vec<String>,
20161    ///Property: Registered wealth
20162    #[serde(skip_serializing_if = "Option::is_none")]
20163    #[cfg_attr(
20164        feature = "builder",
20165        builder(with = |value:impl Into<String>|vec![value.into()])
20166    )]
20167    pub wealth: Option<Vec<String>>,
20168}
20169impl TaxRoll {
20170    /// Create a new entity with the given ID
20171    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
20172    pub fn new(id: impl Into<String>) -> Self {
20173        Self {
20174            id: id.into(),
20175            schema: "TaxRoll".to_string(),
20176            aleph_url: None,
20177            birth_date: None,
20178            country: None,
20179            date: None,
20180            description: None,
20181            end_date: None,
20182            given_name: None,
20183            income: None,
20184            index_text: None,
20185            modified_at: None,
20186            names_mentioned: None,
20187            proof: None,
20188            publisher: None,
20189            publisher_url: None,
20190            record_id: None,
20191            retrieved_at: None,
20192            source_url: None,
20193            start_date: None,
20194            summary: None,
20195            surname: None,
20196            tax_paid: None,
20197            taxee: Vec::new(),
20198            wealth: None,
20199        }
20200    }
20201    /// Get the schema name
20202    pub fn schema_name() -> &'static str {
20203        "TaxRoll"
20204    }
20205    /// Serialize to standard FTM nested JSON format
20206    ///
20207    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
20208    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
20209        let mut value = serde_json::to_value(self)?;
20210        if let Some(obj) = value.as_object_mut() {
20211            let id = obj.remove("id");
20212            let schema = obj.remove("schema");
20213            let properties = serde_json::Value::Object(std::mem::take(obj));
20214            if let Some(id) = id {
20215                obj.insert("id".into(), id);
20216            }
20217            if let Some(schema) = schema {
20218                obj.insert("schema".into(), schema);
20219            }
20220            obj.insert("properties".into(), properties);
20221        }
20222        serde_json::to_string(&value)
20223    }
20224}
20225///FTM Schema: Trip
20226#[derive(Debug, Clone, Serialize, Deserialize)]
20227#[cfg_attr(feature = "builder", derive(Builder))]
20228#[serde(rename_all = "camelCase")]
20229pub struct Trip {
20230    pub id: String,
20231    #[cfg_attr(feature = "builder", builder(default = "Trip".to_string()))]
20232    pub schema: String,
20233    ///Property: Address
20234    #[serde(skip_serializing_if = "Option::is_none")]
20235    #[cfg_attr(
20236        feature = "builder",
20237        builder(with = |value:impl Into<String>|vec![value.into()])
20238    )]
20239    pub address: Option<Vec<String>>,
20240    ///Property: Address
20241    #[serde(skip_serializing_if = "Option::is_none")]
20242    #[cfg_attr(
20243        feature = "builder",
20244        builder(with = |value:impl Into<String>|vec![value.into()])
20245    )]
20246    pub address_entity: Option<Vec<String>>,
20247    ///Property: Aleph URL
20248    #[serde(skip_serializing_if = "Option::is_none")]
20249    #[cfg_attr(
20250        feature = "builder",
20251        builder(with = |value:impl Into<String>|vec![value.into()])
20252    )]
20253    pub aleph_url: Option<Vec<String>>,
20254    ///Property: Alias
20255    #[serde(skip_serializing_if = "Option::is_none")]
20256    #[cfg_attr(
20257        feature = "builder",
20258        builder(with = |value:impl Into<String>|vec![value.into()])
20259    )]
20260    pub alias: Option<Vec<String>>,
20261    ///Property: Detected companies
20262    #[serde(skip_serializing_if = "Option::is_none")]
20263    #[cfg_attr(
20264        feature = "builder",
20265        builder(with = |value:impl Into<String>|vec![value.into()])
20266    )]
20267    pub companies_mentioned: Option<Vec<String>>,
20268    ///Property: Country
20269    #[serde(skip_serializing_if = "Option::is_none")]
20270    #[cfg_attr(
20271        feature = "builder",
20272        builder(with = |value:impl Into<String>|vec![value.into()])
20273    )]
20274    pub country: Option<Vec<String>>,
20275    ///Property: Created at
20276    #[serde(skip_serializing_if = "Option::is_none")]
20277    #[cfg_attr(
20278        feature = "builder",
20279        builder(with = |value:impl Into<String>|vec![value.into()])
20280    )]
20281    pub created_at: Option<Vec<String>>,
20282    ///Property: Date
20283    #[serde(skip_serializing_if = "Option::is_none")]
20284    #[cfg_attr(
20285        feature = "builder",
20286        builder(with = |value:impl Into<String>|vec![value.into()])
20287    )]
20288    pub date: Option<Vec<String>>,
20289    ///Property: Description
20290    #[serde(skip_serializing_if = "Option::is_none")]
20291    #[cfg_attr(
20292        feature = "builder",
20293        builder(with = |value:impl Into<String>|vec![value.into()])
20294    )]
20295    pub description: Option<Vec<String>>,
20296    ///Property: Detected country
20297    #[serde(skip_serializing_if = "Option::is_none")]
20298    #[cfg_attr(
20299        feature = "builder",
20300        builder(with = |value:impl Into<String>|vec![value.into()])
20301    )]
20302    pub detected_country: Option<Vec<String>>,
20303    ///Property: Detected language
20304    #[serde(skip_serializing_if = "Option::is_none")]
20305    #[cfg_attr(
20306        feature = "builder",
20307        builder(with = |value:impl Into<String>|vec![value.into()])
20308    )]
20309    pub detected_language: Option<Vec<String>>,
20310    ///Property: Detected e-mail addresses
20311    #[serde(skip_serializing_if = "Option::is_none")]
20312    #[cfg_attr(
20313        feature = "builder",
20314        builder(with = |value:impl Into<String>|vec![value.into()])
20315    )]
20316    pub email_mentioned: Option<Vec<String>>,
20317    ///Property: End date
20318    #[serde(skip_serializing_if = "Option::is_none")]
20319    #[cfg_attr(
20320        feature = "builder",
20321        builder(with = |value:impl Into<String>|vec![value.into()])
20322    )]
20323    pub end_date: Option<Vec<String>>,
20324    ///Property: End location
20325    #[serde(default)]
20326    #[cfg_attr(
20327        feature = "builder",
20328        builder(with = |value:impl Into<String>|vec![value.into()])
20329    )]
20330    pub end_location: Vec<String>,
20331    ///Property: Detected IBANs
20332    #[serde(skip_serializing_if = "Option::is_none")]
20333    #[cfg_attr(
20334        feature = "builder",
20335        builder(with = |value:impl Into<String>|vec![value.into()])
20336    )]
20337    pub iban_mentioned: Option<Vec<String>>,
20338    ///Property: Important
20339    #[serde(skip_serializing_if = "Option::is_none")]
20340    #[cfg_attr(
20341        feature = "builder",
20342        builder(with = |value:impl Into<String>|vec![value.into()])
20343    )]
20344    pub important: Option<Vec<String>>,
20345    ///Property: Index text
20346    #[serde(skip_serializing_if = "Option::is_none")]
20347    #[cfg_attr(
20348        feature = "builder",
20349        builder(with = |value:impl Into<String>|vec![value.into()])
20350    )]
20351    pub index_text: Option<Vec<String>>,
20352    ///Property: Involved
20353    #[serde(skip_serializing_if = "Option::is_none")]
20354    #[cfg_attr(
20355        feature = "builder",
20356        builder(with = |value:impl Into<String>|vec![value.into()])
20357    )]
20358    pub involved: Option<Vec<String>>,
20359    ///Property: Detected IP addresses
20360    #[serde(skip_serializing_if = "Option::is_none")]
20361    #[cfg_attr(
20362        feature = "builder",
20363        builder(with = |value:impl Into<String>|vec![value.into()])
20364    )]
20365    pub ip_mentioned: Option<Vec<String>>,
20366    ///Property: Keywords
20367    #[serde(skip_serializing_if = "Option::is_none")]
20368    #[cfg_attr(
20369        feature = "builder",
20370        builder(with = |value:impl Into<String>|vec![value.into()])
20371    )]
20372    pub keywords: Option<Vec<String>>,
20373    ///Property: Location
20374    #[serde(skip_serializing_if = "Option::is_none")]
20375    #[cfg_attr(
20376        feature = "builder",
20377        builder(with = |value:impl Into<String>|vec![value.into()])
20378    )]
20379    pub location: Option<Vec<String>>,
20380    ///Property: Detected locations
20381    #[serde(skip_serializing_if = "Option::is_none")]
20382    #[cfg_attr(
20383        feature = "builder",
20384        builder(with = |value:impl Into<String>|vec![value.into()])
20385    )]
20386    pub location_mentioned: Option<Vec<String>>,
20387    ///Property: Modified on
20388    #[serde(skip_serializing_if = "Option::is_none")]
20389    #[cfg_attr(
20390        feature = "builder",
20391        builder(with = |value:impl Into<String>|vec![value.into()])
20392    )]
20393    pub modified_at: Option<Vec<String>>,
20394    ///Property: Name
20395    #[serde(default)]
20396    #[cfg_attr(
20397        feature = "builder",
20398        builder(with = |value:impl Into<String>|vec![value.into()])
20399    )]
20400    pub name: Vec<String>,
20401    ///Property: Detected names
20402    #[serde(skip_serializing_if = "Option::is_none")]
20403    #[cfg_attr(
20404        feature = "builder",
20405        builder(with = |value:impl Into<String>|vec![value.into()])
20406    )]
20407    pub names_mentioned: Option<Vec<String>>,
20408    ///Property: Notes
20409    #[serde(skip_serializing_if = "Option::is_none")]
20410    #[cfg_attr(
20411        feature = "builder",
20412        builder(with = |value:impl Into<String>|vec![value.into()])
20413    )]
20414    pub notes: Option<Vec<String>>,
20415    ///Property: Organizer
20416    #[serde(skip_serializing_if = "Option::is_none")]
20417    #[cfg_attr(
20418        feature = "builder",
20419        builder(with = |value:impl Into<String>|vec![value.into()])
20420    )]
20421    pub organizer: Option<Vec<String>>,
20422    ///Property: Detected people
20423    #[serde(skip_serializing_if = "Option::is_none")]
20424    #[cfg_attr(
20425        feature = "builder",
20426        builder(with = |value:impl Into<String>|vec![value.into()])
20427    )]
20428    pub people_mentioned: Option<Vec<String>>,
20429    ///Property: Detected phones
20430    #[serde(skip_serializing_if = "Option::is_none")]
20431    #[cfg_attr(
20432        feature = "builder",
20433        builder(with = |value:impl Into<String>|vec![value.into()])
20434    )]
20435    pub phone_mentioned: Option<Vec<String>>,
20436    ///Property: Previous name
20437    #[serde(skip_serializing_if = "Option::is_none")]
20438    #[cfg_attr(
20439        feature = "builder",
20440        builder(with = |value:impl Into<String>|vec![value.into()])
20441    )]
20442    pub previous_name: Option<Vec<String>>,
20443    ///Property: Program
20444    #[serde(skip_serializing_if = "Option::is_none")]
20445    #[cfg_attr(
20446        feature = "builder",
20447        builder(with = |value:impl Into<String>|vec![value.into()])
20448    )]
20449    pub program: Option<Vec<String>>,
20450    ///Property: Program ID
20451    #[serde(skip_serializing_if = "Option::is_none")]
20452    #[cfg_attr(
20453        feature = "builder",
20454        builder(with = |value:impl Into<String>|vec![value.into()])
20455    )]
20456    pub program_id: Option<Vec<String>>,
20457    ///Property: Source document
20458    #[serde(skip_serializing_if = "Option::is_none")]
20459    #[cfg_attr(
20460        feature = "builder",
20461        builder(with = |value:impl Into<String>|vec![value.into()])
20462    )]
20463    pub proof: Option<Vec<String>>,
20464    ///Property: Publishing source
20465    #[serde(skip_serializing_if = "Option::is_none")]
20466    #[cfg_attr(
20467        feature = "builder",
20468        builder(with = |value:impl Into<String>|vec![value.into()])
20469    )]
20470    pub publisher: Option<Vec<String>>,
20471    ///Property: Publishing source URL
20472    #[serde(skip_serializing_if = "Option::is_none")]
20473    #[cfg_attr(
20474        feature = "builder",
20475        builder(with = |value:impl Into<String>|vec![value.into()])
20476    )]
20477    pub publisher_url: Option<Vec<String>>,
20478    ///Property: Record ID
20479    #[serde(skip_serializing_if = "Option::is_none")]
20480    #[cfg_attr(
20481        feature = "builder",
20482        builder(with = |value:impl Into<String>|vec![value.into()])
20483    )]
20484    pub record_id: Option<Vec<String>>,
20485    ///Property: Retrieved on
20486    #[serde(skip_serializing_if = "Option::is_none")]
20487    #[cfg_attr(
20488        feature = "builder",
20489        builder(with = |value:impl Into<String>|vec![value.into()])
20490    )]
20491    pub retrieved_at: Option<Vec<String>>,
20492    ///Property: Source link
20493    #[serde(skip_serializing_if = "Option::is_none")]
20494    #[cfg_attr(
20495        feature = "builder",
20496        builder(with = |value:impl Into<String>|vec![value.into()])
20497    )]
20498    pub source_url: Option<Vec<String>>,
20499    ///Property: Start date
20500    #[serde(skip_serializing_if = "Option::is_none")]
20501    #[cfg_attr(
20502        feature = "builder",
20503        builder(with = |value:impl Into<String>|vec![value.into()])
20504    )]
20505    pub start_date: Option<Vec<String>>,
20506    ///Property: Start location
20507    #[serde(default)]
20508    #[cfg_attr(
20509        feature = "builder",
20510        builder(with = |value:impl Into<String>|vec![value.into()])
20511    )]
20512    pub start_location: Vec<String>,
20513    ///Property: Summary
20514    #[serde(skip_serializing_if = "Option::is_none")]
20515    #[cfg_attr(
20516        feature = "builder",
20517        builder(with = |value:impl Into<String>|vec![value.into()])
20518    )]
20519    pub summary: Option<Vec<String>>,
20520    ///Property: Topics
20521    #[serde(skip_serializing_if = "Option::is_none")]
20522    #[cfg_attr(
20523        feature = "builder",
20524        builder(with = |value:impl Into<String>|vec![value.into()])
20525    )]
20526    pub topics: Option<Vec<String>>,
20527    ///Property: Vehicle
20528    #[serde(skip_serializing_if = "Option::is_none")]
20529    #[cfg_attr(
20530        feature = "builder",
20531        builder(with = |value:impl Into<String>|vec![value.into()])
20532    )]
20533    pub vehicle: Option<Vec<String>>,
20534    ///Property: Weak alias
20535    #[serde(skip_serializing_if = "Option::is_none")]
20536    #[cfg_attr(
20537        feature = "builder",
20538        builder(with = |value:impl Into<String>|vec![value.into()])
20539    )]
20540    pub weak_alias: Option<Vec<String>>,
20541    ///Property: Wikidata ID
20542    #[serde(skip_serializing_if = "Option::is_none")]
20543    #[cfg_attr(
20544        feature = "builder",
20545        builder(with = |value:impl Into<String>|vec![value.into()])
20546    )]
20547    pub wikidata_id: Option<Vec<String>>,
20548    ///Property: Wikipedia Article
20549    #[serde(skip_serializing_if = "Option::is_none")]
20550    #[cfg_attr(
20551        feature = "builder",
20552        builder(with = |value:impl Into<String>|vec![value.into()])
20553    )]
20554    pub wikipedia_url: Option<Vec<String>>,
20555}
20556impl Trip {
20557    /// Create a new entity with the given ID
20558    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
20559    pub fn new(id: impl Into<String>) -> Self {
20560        Self {
20561            id: id.into(),
20562            schema: "Trip".to_string(),
20563            address: None,
20564            address_entity: None,
20565            aleph_url: None,
20566            alias: None,
20567            companies_mentioned: None,
20568            country: None,
20569            created_at: None,
20570            date: None,
20571            description: None,
20572            detected_country: None,
20573            detected_language: None,
20574            email_mentioned: None,
20575            end_date: None,
20576            end_location: Vec::new(),
20577            iban_mentioned: None,
20578            important: None,
20579            index_text: None,
20580            involved: None,
20581            ip_mentioned: None,
20582            keywords: None,
20583            location: None,
20584            location_mentioned: None,
20585            modified_at: None,
20586            name: Vec::new(),
20587            names_mentioned: None,
20588            notes: None,
20589            organizer: None,
20590            people_mentioned: None,
20591            phone_mentioned: None,
20592            previous_name: None,
20593            program: None,
20594            program_id: None,
20595            proof: None,
20596            publisher: None,
20597            publisher_url: None,
20598            record_id: None,
20599            retrieved_at: None,
20600            source_url: None,
20601            start_date: None,
20602            start_location: Vec::new(),
20603            summary: None,
20604            topics: None,
20605            vehicle: None,
20606            weak_alias: None,
20607            wikidata_id: None,
20608            wikipedia_url: None,
20609        }
20610    }
20611    /// Get the schema name
20612    pub fn schema_name() -> &'static str {
20613        "Trip"
20614    }
20615    /// Serialize to standard FTM nested JSON format
20616    ///
20617    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
20618    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
20619        let mut value = serde_json::to_value(self)?;
20620        if let Some(obj) = value.as_object_mut() {
20621            let id = obj.remove("id");
20622            let schema = obj.remove("schema");
20623            let properties = serde_json::Value::Object(std::mem::take(obj));
20624            if let Some(id) = id {
20625                obj.insert("id".into(), id);
20626            }
20627            if let Some(schema) = schema {
20628                obj.insert("schema".into(), schema);
20629            }
20630            obj.insert("properties".into(), properties);
20631        }
20632        serde_json::to_string(&value)
20633    }
20634}
20635///FTM Schema: Other link
20636#[derive(Debug, Clone, Serialize, Deserialize)]
20637#[cfg_attr(feature = "builder", derive(Builder))]
20638#[serde(rename_all = "camelCase")]
20639pub struct UnknownLink {
20640    pub id: String,
20641    #[cfg_attr(feature = "builder", builder(default = "UnknownLink".to_string()))]
20642    pub schema: String,
20643    ///Property: Aleph URL
20644    #[serde(skip_serializing_if = "Option::is_none")]
20645    #[cfg_attr(
20646        feature = "builder",
20647        builder(with = |value:impl Into<String>|vec![value.into()])
20648    )]
20649    pub aleph_url: Option<Vec<String>>,
20650    ///Property: Date
20651    #[serde(skip_serializing_if = "Option::is_none")]
20652    #[cfg_attr(
20653        feature = "builder",
20654        builder(with = |value:impl Into<String>|vec![value.into()])
20655    )]
20656    pub date: Option<Vec<String>>,
20657    ///Property: Description
20658    #[serde(skip_serializing_if = "Option::is_none")]
20659    #[cfg_attr(
20660        feature = "builder",
20661        builder(with = |value:impl Into<String>|vec![value.into()])
20662    )]
20663    pub description: Option<Vec<String>>,
20664    ///Property: End date
20665    #[serde(skip_serializing_if = "Option::is_none")]
20666    #[cfg_attr(
20667        feature = "builder",
20668        builder(with = |value:impl Into<String>|vec![value.into()])
20669    )]
20670    pub end_date: Option<Vec<String>>,
20671    ///Property: Index text
20672    #[serde(skip_serializing_if = "Option::is_none")]
20673    #[cfg_attr(
20674        feature = "builder",
20675        builder(with = |value:impl Into<String>|vec![value.into()])
20676    )]
20677    pub index_text: Option<Vec<String>>,
20678    ///Property: Modified on
20679    #[serde(skip_serializing_if = "Option::is_none")]
20680    #[cfg_attr(
20681        feature = "builder",
20682        builder(with = |value:impl Into<String>|vec![value.into()])
20683    )]
20684    pub modified_at: Option<Vec<String>>,
20685    ///Property: Detected names
20686    #[serde(skip_serializing_if = "Option::is_none")]
20687    #[cfg_attr(
20688        feature = "builder",
20689        builder(with = |value:impl Into<String>|vec![value.into()])
20690    )]
20691    pub names_mentioned: Option<Vec<String>>,
20692    ///Property: Object
20693    #[serde(default)]
20694    #[cfg_attr(
20695        feature = "builder",
20696        builder(with = |value:impl Into<String>|vec![value.into()])
20697    )]
20698    pub object: Vec<String>,
20699    ///Property: Source document
20700    #[serde(skip_serializing_if = "Option::is_none")]
20701    #[cfg_attr(
20702        feature = "builder",
20703        builder(with = |value:impl Into<String>|vec![value.into()])
20704    )]
20705    pub proof: Option<Vec<String>>,
20706    ///Property: Publishing source
20707    #[serde(skip_serializing_if = "Option::is_none")]
20708    #[cfg_attr(
20709        feature = "builder",
20710        builder(with = |value:impl Into<String>|vec![value.into()])
20711    )]
20712    pub publisher: Option<Vec<String>>,
20713    ///Property: Publishing source URL
20714    #[serde(skip_serializing_if = "Option::is_none")]
20715    #[cfg_attr(
20716        feature = "builder",
20717        builder(with = |value:impl Into<String>|vec![value.into()])
20718    )]
20719    pub publisher_url: Option<Vec<String>>,
20720    ///Property: Record ID
20721    #[serde(skip_serializing_if = "Option::is_none")]
20722    #[cfg_attr(
20723        feature = "builder",
20724        builder(with = |value:impl Into<String>|vec![value.into()])
20725    )]
20726    pub record_id: Option<Vec<String>>,
20727    ///Property: Retrieved on
20728    #[serde(skip_serializing_if = "Option::is_none")]
20729    #[cfg_attr(
20730        feature = "builder",
20731        builder(with = |value:impl Into<String>|vec![value.into()])
20732    )]
20733    pub retrieved_at: Option<Vec<String>>,
20734    ///Property: Role
20735    #[serde(skip_serializing_if = "Option::is_none")]
20736    #[cfg_attr(
20737        feature = "builder",
20738        builder(with = |value:impl Into<String>|vec![value.into()])
20739    )]
20740    pub role: Option<Vec<String>>,
20741    ///Property: Source link
20742    #[serde(skip_serializing_if = "Option::is_none")]
20743    #[cfg_attr(
20744        feature = "builder",
20745        builder(with = |value:impl Into<String>|vec![value.into()])
20746    )]
20747    pub source_url: Option<Vec<String>>,
20748    ///Property: Start date
20749    #[serde(skip_serializing_if = "Option::is_none")]
20750    #[cfg_attr(
20751        feature = "builder",
20752        builder(with = |value:impl Into<String>|vec![value.into()])
20753    )]
20754    pub start_date: Option<Vec<String>>,
20755    ///Property: Status
20756    #[serde(skip_serializing_if = "Option::is_none")]
20757    #[cfg_attr(
20758        feature = "builder",
20759        builder(with = |value:impl Into<String>|vec![value.into()])
20760    )]
20761    pub status: Option<Vec<String>>,
20762    ///Property: Subject
20763    #[serde(default)]
20764    #[cfg_attr(
20765        feature = "builder",
20766        builder(with = |value:impl Into<String>|vec![value.into()])
20767    )]
20768    pub subject: Vec<String>,
20769    ///Property: Summary
20770    #[serde(skip_serializing_if = "Option::is_none")]
20771    #[cfg_attr(
20772        feature = "builder",
20773        builder(with = |value:impl Into<String>|vec![value.into()])
20774    )]
20775    pub summary: Option<Vec<String>>,
20776}
20777impl UnknownLink {
20778    /// Create a new entity with the given ID
20779    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
20780    pub fn new(id: impl Into<String>) -> Self {
20781        Self {
20782            id: id.into(),
20783            schema: "UnknownLink".to_string(),
20784            aleph_url: None,
20785            date: None,
20786            description: None,
20787            end_date: None,
20788            index_text: None,
20789            modified_at: None,
20790            names_mentioned: None,
20791            object: Vec::new(),
20792            proof: None,
20793            publisher: None,
20794            publisher_url: None,
20795            record_id: None,
20796            retrieved_at: None,
20797            role: None,
20798            source_url: None,
20799            start_date: None,
20800            status: None,
20801            subject: Vec::new(),
20802            summary: None,
20803        }
20804    }
20805    /// Get the schema name
20806    pub fn schema_name() -> &'static str {
20807        "UnknownLink"
20808    }
20809    /// Serialize to standard FTM nested JSON format
20810    ///
20811    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
20812    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
20813        let mut value = serde_json::to_value(self)?;
20814        if let Some(obj) = value.as_object_mut() {
20815            let id = obj.remove("id");
20816            let schema = obj.remove("schema");
20817            let properties = serde_json::Value::Object(std::mem::take(obj));
20818            if let Some(id) = id {
20819                obj.insert("id".into(), id);
20820            }
20821            if let Some(schema) = schema {
20822                obj.insert("schema".into(), schema);
20823            }
20824            obj.insert("properties".into(), properties);
20825        }
20826        serde_json::to_string(&value)
20827    }
20828}
20829///FTM Schema: User account
20830#[derive(Debug, Clone, Serialize, Deserialize)]
20831#[cfg_attr(feature = "builder", derive(Builder))]
20832#[serde(rename_all = "camelCase")]
20833pub struct UserAccount {
20834    pub id: String,
20835    #[cfg_attr(feature = "builder", builder(default = "UserAccount".to_string()))]
20836    pub schema: String,
20837    ///Property: Address
20838    #[serde(skip_serializing_if = "Option::is_none")]
20839    #[cfg_attr(
20840        feature = "builder",
20841        builder(with = |value:impl Into<String>|vec![value.into()])
20842    )]
20843    pub address: Option<Vec<String>>,
20844    ///Property: Address
20845    #[serde(skip_serializing_if = "Option::is_none")]
20846    #[cfg_attr(
20847        feature = "builder",
20848        builder(with = |value:impl Into<String>|vec![value.into()])
20849    )]
20850    pub address_entity: Option<Vec<String>>,
20851    ///Property: Aleph URL
20852    #[serde(skip_serializing_if = "Option::is_none")]
20853    #[cfg_attr(
20854        feature = "builder",
20855        builder(with = |value:impl Into<String>|vec![value.into()])
20856    )]
20857    pub aleph_url: Option<Vec<String>>,
20858    ///Property: Alias
20859    #[serde(skip_serializing_if = "Option::is_none")]
20860    #[cfg_attr(
20861        feature = "builder",
20862        builder(with = |value:impl Into<String>|vec![value.into()])
20863    )]
20864    pub alias: Option<Vec<String>>,
20865    ///Property: Country
20866    #[serde(skip_serializing_if = "Option::is_none")]
20867    #[cfg_attr(
20868        feature = "builder",
20869        builder(with = |value:impl Into<String>|vec![value.into()])
20870    )]
20871    pub country: Option<Vec<String>>,
20872    ///Property: Created at
20873    #[serde(skip_serializing_if = "Option::is_none")]
20874    #[cfg_attr(
20875        feature = "builder",
20876        builder(with = |value:impl Into<String>|vec![value.into()])
20877    )]
20878    pub created_at: Option<Vec<String>>,
20879    ///Property: Description
20880    #[serde(skip_serializing_if = "Option::is_none")]
20881    #[cfg_attr(
20882        feature = "builder",
20883        builder(with = |value:impl Into<String>|vec![value.into()])
20884    )]
20885    pub description: Option<Vec<String>>,
20886    ///Property: Email
20887    #[serde(skip_serializing_if = "Option::is_none")]
20888    #[cfg_attr(
20889        feature = "builder",
20890        builder(with = |value:impl Into<String>|vec![value.into()])
20891    )]
20892    pub email: Option<Vec<String>>,
20893    ///Property: Index text
20894    #[serde(skip_serializing_if = "Option::is_none")]
20895    #[cfg_attr(
20896        feature = "builder",
20897        builder(with = |value:impl Into<String>|vec![value.into()])
20898    )]
20899    pub index_text: Option<Vec<String>>,
20900    ///Property: IP address
20901    #[serde(skip_serializing_if = "Option::is_none")]
20902    #[cfg_attr(
20903        feature = "builder",
20904        builder(with = |value:impl Into<String>|vec![value.into()])
20905    )]
20906    pub ip_address: Option<Vec<String>>,
20907    ///Property: Keywords
20908    #[serde(skip_serializing_if = "Option::is_none")]
20909    #[cfg_attr(
20910        feature = "builder",
20911        builder(with = |value:impl Into<String>|vec![value.into()])
20912    )]
20913    pub keywords: Option<Vec<String>>,
20914    ///Property: Modified on
20915    #[serde(skip_serializing_if = "Option::is_none")]
20916    #[cfg_attr(
20917        feature = "builder",
20918        builder(with = |value:impl Into<String>|vec![value.into()])
20919    )]
20920    pub modified_at: Option<Vec<String>>,
20921    ///Property: Name
20922    #[serde(default)]
20923    #[cfg_attr(
20924        feature = "builder",
20925        builder(with = |value:impl Into<String>|vec![value.into()])
20926    )]
20927    pub name: Vec<String>,
20928    ///Property: Notes
20929    #[serde(skip_serializing_if = "Option::is_none")]
20930    #[cfg_attr(
20931        feature = "builder",
20932        builder(with = |value:impl Into<String>|vec![value.into()])
20933    )]
20934    pub notes: Option<Vec<String>>,
20935    ///Property: Owner
20936    #[serde(skip_serializing_if = "Option::is_none")]
20937    #[cfg_attr(
20938        feature = "builder",
20939        builder(with = |value:impl Into<String>|vec![value.into()])
20940    )]
20941    pub owner: Option<Vec<String>>,
20942    ///Property: Password
20943    #[serde(skip_serializing_if = "Option::is_none")]
20944    #[cfg_attr(
20945        feature = "builder",
20946        builder(with = |value:impl Into<String>|vec![value.into()])
20947    )]
20948    pub password: Option<Vec<String>>,
20949    ///Property: Phone
20950    #[serde(skip_serializing_if = "Option::is_none")]
20951    #[cfg_attr(
20952        feature = "builder",
20953        builder(with = |value:impl Into<String>|vec![value.into()])
20954    )]
20955    pub phone: Option<Vec<String>>,
20956    ///Property: Previous name
20957    #[serde(skip_serializing_if = "Option::is_none")]
20958    #[cfg_attr(
20959        feature = "builder",
20960        builder(with = |value:impl Into<String>|vec![value.into()])
20961    )]
20962    pub previous_name: Option<Vec<String>>,
20963    ///Property: Program
20964    #[serde(skip_serializing_if = "Option::is_none")]
20965    #[cfg_attr(
20966        feature = "builder",
20967        builder(with = |value:impl Into<String>|vec![value.into()])
20968    )]
20969    pub program: Option<Vec<String>>,
20970    ///Property: Program ID
20971    #[serde(skip_serializing_if = "Option::is_none")]
20972    #[cfg_attr(
20973        feature = "builder",
20974        builder(with = |value:impl Into<String>|vec![value.into()])
20975    )]
20976    pub program_id: Option<Vec<String>>,
20977    ///Property: Source document
20978    #[serde(skip_serializing_if = "Option::is_none")]
20979    #[cfg_attr(
20980        feature = "builder",
20981        builder(with = |value:impl Into<String>|vec![value.into()])
20982    )]
20983    pub proof: Option<Vec<String>>,
20984    ///Property: Publishing source
20985    #[serde(skip_serializing_if = "Option::is_none")]
20986    #[cfg_attr(
20987        feature = "builder",
20988        builder(with = |value:impl Into<String>|vec![value.into()])
20989    )]
20990    pub publisher: Option<Vec<String>>,
20991    ///Property: Publishing source URL
20992    #[serde(skip_serializing_if = "Option::is_none")]
20993    #[cfg_attr(
20994        feature = "builder",
20995        builder(with = |value:impl Into<String>|vec![value.into()])
20996    )]
20997    pub publisher_url: Option<Vec<String>>,
20998    ///Property: Retrieved on
20999    #[serde(skip_serializing_if = "Option::is_none")]
21000    #[cfg_attr(
21001        feature = "builder",
21002        builder(with = |value:impl Into<String>|vec![value.into()])
21003    )]
21004    pub retrieved_at: Option<Vec<String>>,
21005    ///Property: Service
21006    #[serde(skip_serializing_if = "Option::is_none")]
21007    #[cfg_attr(
21008        feature = "builder",
21009        builder(with = |value:impl Into<String>|vec![value.into()])
21010    )]
21011    pub service: Option<Vec<String>>,
21012    ///Property: Source link
21013    #[serde(skip_serializing_if = "Option::is_none")]
21014    #[cfg_attr(
21015        feature = "builder",
21016        builder(with = |value:impl Into<String>|vec![value.into()])
21017    )]
21018    pub source_url: Option<Vec<String>>,
21019    ///Property: Summary
21020    #[serde(skip_serializing_if = "Option::is_none")]
21021    #[cfg_attr(
21022        feature = "builder",
21023        builder(with = |value:impl Into<String>|vec![value.into()])
21024    )]
21025    pub summary: Option<Vec<String>>,
21026    ///Property: Topics
21027    #[serde(skip_serializing_if = "Option::is_none")]
21028    #[cfg_attr(
21029        feature = "builder",
21030        builder(with = |value:impl Into<String>|vec![value.into()])
21031    )]
21032    pub topics: Option<Vec<String>>,
21033    ///Property: Username
21034    #[serde(default)]
21035    #[cfg_attr(
21036        feature = "builder",
21037        builder(with = |value:impl Into<String>|vec![value.into()])
21038    )]
21039    pub username: Vec<String>,
21040    ///Property: Weak alias
21041    #[serde(skip_serializing_if = "Option::is_none")]
21042    #[cfg_attr(
21043        feature = "builder",
21044        builder(with = |value:impl Into<String>|vec![value.into()])
21045    )]
21046    pub weak_alias: Option<Vec<String>>,
21047    ///Property: Wikidata ID
21048    #[serde(skip_serializing_if = "Option::is_none")]
21049    #[cfg_attr(
21050        feature = "builder",
21051        builder(with = |value:impl Into<String>|vec![value.into()])
21052    )]
21053    pub wikidata_id: Option<Vec<String>>,
21054    ///Property: Wikipedia Article
21055    #[serde(skip_serializing_if = "Option::is_none")]
21056    #[cfg_attr(
21057        feature = "builder",
21058        builder(with = |value:impl Into<String>|vec![value.into()])
21059    )]
21060    pub wikipedia_url: Option<Vec<String>>,
21061}
21062impl UserAccount {
21063    /// Create a new entity with the given ID
21064    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
21065    pub fn new(id: impl Into<String>) -> Self {
21066        Self {
21067            id: id.into(),
21068            schema: "UserAccount".to_string(),
21069            address: None,
21070            address_entity: None,
21071            aleph_url: None,
21072            alias: None,
21073            country: None,
21074            created_at: None,
21075            description: None,
21076            email: None,
21077            index_text: None,
21078            ip_address: None,
21079            keywords: None,
21080            modified_at: None,
21081            name: Vec::new(),
21082            notes: None,
21083            owner: None,
21084            password: None,
21085            phone: None,
21086            previous_name: None,
21087            program: None,
21088            program_id: None,
21089            proof: None,
21090            publisher: None,
21091            publisher_url: None,
21092            retrieved_at: None,
21093            service: None,
21094            source_url: None,
21095            summary: None,
21096            topics: None,
21097            username: Vec::new(),
21098            weak_alias: None,
21099            wikidata_id: None,
21100            wikipedia_url: None,
21101        }
21102    }
21103    /// Get the schema name
21104    pub fn schema_name() -> &'static str {
21105        "UserAccount"
21106    }
21107    /// Serialize to standard FTM nested JSON format
21108    ///
21109    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
21110    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
21111        let mut value = serde_json::to_value(self)?;
21112        if let Some(obj) = value.as_object_mut() {
21113            let id = obj.remove("id");
21114            let schema = obj.remove("schema");
21115            let properties = serde_json::Value::Object(std::mem::take(obj));
21116            if let Some(id) = id {
21117                obj.insert("id".into(), id);
21118            }
21119            if let Some(schema) = schema {
21120                obj.insert("schema".into(), schema);
21121            }
21122            obj.insert("properties".into(), properties);
21123        }
21124        serde_json::to_string(&value)
21125    }
21126}
21127///FTM Schema: Vehicle
21128#[derive(Debug, Clone, Serialize, Deserialize)]
21129#[cfg_attr(feature = "builder", derive(Builder))]
21130#[serde(rename_all = "camelCase")]
21131pub struct Vehicle {
21132    pub id: String,
21133    #[cfg_attr(feature = "builder", builder(default = "Vehicle".to_string()))]
21134    pub schema: String,
21135    ///Property: Address
21136    #[serde(skip_serializing_if = "Option::is_none")]
21137    #[cfg_attr(
21138        feature = "builder",
21139        builder(with = |value:impl Into<String>|vec![value.into()])
21140    )]
21141    pub address: Option<Vec<String>>,
21142    ///Property: Address
21143    #[serde(skip_serializing_if = "Option::is_none")]
21144    #[cfg_attr(
21145        feature = "builder",
21146        builder(with = |value:impl Into<String>|vec![value.into()])
21147    )]
21148    pub address_entity: Option<Vec<String>>,
21149    ///Property: Aleph URL
21150    #[serde(skip_serializing_if = "Option::is_none")]
21151    #[cfg_attr(
21152        feature = "builder",
21153        builder(with = |value:impl Into<String>|vec![value.into()])
21154    )]
21155    pub aleph_url: Option<Vec<String>>,
21156    ///Property: Alias
21157    #[serde(skip_serializing_if = "Option::is_none")]
21158    #[cfg_attr(
21159        feature = "builder",
21160        builder(with = |value:impl Into<String>|vec![value.into()])
21161    )]
21162    pub alias: Option<Vec<String>>,
21163    ///Property: Amount
21164    #[serde(
21165        skip_serializing_if = "Option::is_none",
21166        deserialize_with = "deserialize_opt_f64_vec",
21167        default
21168    )]
21169    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21170    pub amount: Option<Vec<f64>>,
21171    ///Property: Amount in EUR
21172    #[serde(
21173        skip_serializing_if = "Option::is_none",
21174        deserialize_with = "deserialize_opt_f64_vec",
21175        default
21176    )]
21177    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21178    pub amount_eur: Option<Vec<f64>>,
21179    ///Property: Amount in USD
21180    #[serde(
21181        skip_serializing_if = "Option::is_none",
21182        deserialize_with = "deserialize_opt_f64_vec",
21183        default
21184    )]
21185    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21186    pub amount_usd: Option<Vec<f64>>,
21187    ///Property: Build Date
21188    #[serde(skip_serializing_if = "Option::is_none")]
21189    #[cfg_attr(
21190        feature = "builder",
21191        builder(with = |value:impl Into<String>|vec![value.into()])
21192    )]
21193    pub build_date: Option<Vec<String>>,
21194    ///Property: Country
21195    #[serde(skip_serializing_if = "Option::is_none")]
21196    #[cfg_attr(
21197        feature = "builder",
21198        builder(with = |value:impl Into<String>|vec![value.into()])
21199    )]
21200    pub country: Option<Vec<String>>,
21201    ///Property: Created at
21202    #[serde(skip_serializing_if = "Option::is_none")]
21203    #[cfg_attr(
21204        feature = "builder",
21205        builder(with = |value:impl Into<String>|vec![value.into()])
21206    )]
21207    pub created_at: Option<Vec<String>>,
21208    ///Property: Currency
21209    #[serde(skip_serializing_if = "Option::is_none")]
21210    #[cfg_attr(
21211        feature = "builder",
21212        builder(with = |value:impl Into<String>|vec![value.into()])
21213    )]
21214    pub currency: Option<Vec<String>>,
21215    ///Property: De-registration Date
21216    #[serde(skip_serializing_if = "Option::is_none")]
21217    #[cfg_attr(
21218        feature = "builder",
21219        builder(with = |value:impl Into<String>|vec![value.into()])
21220    )]
21221    pub deregistration_date: Option<Vec<String>>,
21222    ///Property: Description
21223    #[serde(skip_serializing_if = "Option::is_none")]
21224    #[cfg_attr(
21225        feature = "builder",
21226        builder(with = |value:impl Into<String>|vec![value.into()])
21227    )]
21228    pub description: Option<Vec<String>>,
21229    ///Property: Index text
21230    #[serde(skip_serializing_if = "Option::is_none")]
21231    #[cfg_attr(
21232        feature = "builder",
21233        builder(with = |value:impl Into<String>|vec![value.into()])
21234    )]
21235    pub index_text: Option<Vec<String>>,
21236    ///Property: Keywords
21237    #[serde(skip_serializing_if = "Option::is_none")]
21238    #[cfg_attr(
21239        feature = "builder",
21240        builder(with = |value:impl Into<String>|vec![value.into()])
21241    )]
21242    pub keywords: Option<Vec<String>>,
21243    ///Property: Model
21244    #[serde(skip_serializing_if = "Option::is_none")]
21245    #[cfg_attr(
21246        feature = "builder",
21247        builder(with = |value:impl Into<String>|vec![value.into()])
21248    )]
21249    pub model: Option<Vec<String>>,
21250    ///Property: Modified on
21251    #[serde(skip_serializing_if = "Option::is_none")]
21252    #[cfg_attr(
21253        feature = "builder",
21254        builder(with = |value:impl Into<String>|vec![value.into()])
21255    )]
21256    pub modified_at: Option<Vec<String>>,
21257    ///Property: Name
21258    #[serde(default)]
21259    #[cfg_attr(
21260        feature = "builder",
21261        builder(with = |value:impl Into<String>|vec![value.into()])
21262    )]
21263    pub name: Vec<String>,
21264    ///Property: Notes
21265    #[serde(skip_serializing_if = "Option::is_none")]
21266    #[cfg_attr(
21267        feature = "builder",
21268        builder(with = |value:impl Into<String>|vec![value.into()])
21269    )]
21270    pub notes: Option<Vec<String>>,
21271    ///Property: Operator
21272    #[serde(skip_serializing_if = "Option::is_none")]
21273    #[cfg_attr(
21274        feature = "builder",
21275        builder(with = |value:impl Into<String>|vec![value.into()])
21276    )]
21277    pub operator: Option<Vec<String>>,
21278    ///Property: Owner
21279    #[serde(skip_serializing_if = "Option::is_none")]
21280    #[cfg_attr(
21281        feature = "builder",
21282        builder(with = |value:impl Into<String>|vec![value.into()])
21283    )]
21284    pub owner: Option<Vec<String>>,
21285    ///Property: Previous name
21286    #[serde(skip_serializing_if = "Option::is_none")]
21287    #[cfg_attr(
21288        feature = "builder",
21289        builder(with = |value:impl Into<String>|vec![value.into()])
21290    )]
21291    pub previous_name: Option<Vec<String>>,
21292    ///Property: Program
21293    #[serde(skip_serializing_if = "Option::is_none")]
21294    #[cfg_attr(
21295        feature = "builder",
21296        builder(with = |value:impl Into<String>|vec![value.into()])
21297    )]
21298    pub program: Option<Vec<String>>,
21299    ///Property: Program ID
21300    #[serde(skip_serializing_if = "Option::is_none")]
21301    #[cfg_attr(
21302        feature = "builder",
21303        builder(with = |value:impl Into<String>|vec![value.into()])
21304    )]
21305    pub program_id: Option<Vec<String>>,
21306    ///Property: Source document
21307    #[serde(skip_serializing_if = "Option::is_none")]
21308    #[cfg_attr(
21309        feature = "builder",
21310        builder(with = |value:impl Into<String>|vec![value.into()])
21311    )]
21312    pub proof: Option<Vec<String>>,
21313    ///Property: Publishing source
21314    #[serde(skip_serializing_if = "Option::is_none")]
21315    #[cfg_attr(
21316        feature = "builder",
21317        builder(with = |value:impl Into<String>|vec![value.into()])
21318    )]
21319    pub publisher: Option<Vec<String>>,
21320    ///Property: Publishing source URL
21321    #[serde(skip_serializing_if = "Option::is_none")]
21322    #[cfg_attr(
21323        feature = "builder",
21324        builder(with = |value:impl Into<String>|vec![value.into()])
21325    )]
21326    pub publisher_url: Option<Vec<String>>,
21327    ///Property: Registration Date
21328    #[serde(skip_serializing_if = "Option::is_none")]
21329    #[cfg_attr(
21330        feature = "builder",
21331        builder(with = |value:impl Into<String>|vec![value.into()])
21332    )]
21333    pub registration_date: Option<Vec<String>>,
21334    ///Property: Registration number
21335    #[serde(skip_serializing_if = "Option::is_none")]
21336    #[cfg_attr(
21337        feature = "builder",
21338        builder(with = |value:impl Into<String>|vec![value.into()])
21339    )]
21340    pub registration_number: Option<Vec<String>>,
21341    ///Property: Retrieved on
21342    #[serde(skip_serializing_if = "Option::is_none")]
21343    #[cfg_attr(
21344        feature = "builder",
21345        builder(with = |value:impl Into<String>|vec![value.into()])
21346    )]
21347    pub retrieved_at: Option<Vec<String>>,
21348    ///Property: Source link
21349    #[serde(skip_serializing_if = "Option::is_none")]
21350    #[cfg_attr(
21351        feature = "builder",
21352        builder(with = |value:impl Into<String>|vec![value.into()])
21353    )]
21354    pub source_url: Option<Vec<String>>,
21355    ///Property: Summary
21356    #[serde(skip_serializing_if = "Option::is_none")]
21357    #[cfg_attr(
21358        feature = "builder",
21359        builder(with = |value:impl Into<String>|vec![value.into()])
21360    )]
21361    pub summary: Option<Vec<String>>,
21362    ///Property: Topics
21363    #[serde(skip_serializing_if = "Option::is_none")]
21364    #[cfg_attr(
21365        feature = "builder",
21366        builder(with = |value:impl Into<String>|vec![value.into()])
21367    )]
21368    pub topics: Option<Vec<String>>,
21369    ///Property: Type
21370    #[serde(skip_serializing_if = "Option::is_none")]
21371    #[cfg_attr(
21372        feature = "builder",
21373        builder(with = |value:impl Into<String>|vec![value.into()])
21374    )]
21375    pub type_: Option<Vec<String>>,
21376    ///Property: Weak alias
21377    #[serde(skip_serializing_if = "Option::is_none")]
21378    #[cfg_attr(
21379        feature = "builder",
21380        builder(with = |value:impl Into<String>|vec![value.into()])
21381    )]
21382    pub weak_alias: Option<Vec<String>>,
21383    ///Property: Wikidata ID
21384    #[serde(skip_serializing_if = "Option::is_none")]
21385    #[cfg_attr(
21386        feature = "builder",
21387        builder(with = |value:impl Into<String>|vec![value.into()])
21388    )]
21389    pub wikidata_id: Option<Vec<String>>,
21390    ///Property: Wikipedia Article
21391    #[serde(skip_serializing_if = "Option::is_none")]
21392    #[cfg_attr(
21393        feature = "builder",
21394        builder(with = |value:impl Into<String>|vec![value.into()])
21395    )]
21396    pub wikipedia_url: Option<Vec<String>>,
21397}
21398impl Vehicle {
21399    /// Create a new entity with the given ID
21400    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
21401    pub fn new(id: impl Into<String>) -> Self {
21402        Self {
21403            id: id.into(),
21404            schema: "Vehicle".to_string(),
21405            address: None,
21406            address_entity: None,
21407            aleph_url: None,
21408            alias: None,
21409            amount: None,
21410            amount_eur: None,
21411            amount_usd: None,
21412            build_date: None,
21413            country: None,
21414            created_at: None,
21415            currency: None,
21416            deregistration_date: None,
21417            description: None,
21418            index_text: None,
21419            keywords: None,
21420            model: None,
21421            modified_at: None,
21422            name: Vec::new(),
21423            notes: None,
21424            operator: None,
21425            owner: None,
21426            previous_name: None,
21427            program: None,
21428            program_id: None,
21429            proof: None,
21430            publisher: None,
21431            publisher_url: None,
21432            registration_date: None,
21433            registration_number: None,
21434            retrieved_at: None,
21435            source_url: None,
21436            summary: None,
21437            topics: None,
21438            type_: None,
21439            weak_alias: None,
21440            wikidata_id: None,
21441            wikipedia_url: None,
21442        }
21443    }
21444    /// Get the schema name
21445    pub fn schema_name() -> &'static str {
21446        "Vehicle"
21447    }
21448    /// Serialize to standard FTM nested JSON format
21449    ///
21450    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
21451    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
21452        let mut value = serde_json::to_value(self)?;
21453        if let Some(obj) = value.as_object_mut() {
21454            let id = obj.remove("id");
21455            let schema = obj.remove("schema");
21456            let properties = serde_json::Value::Object(std::mem::take(obj));
21457            if let Some(id) = id {
21458                obj.insert("id".into(), id);
21459            }
21460            if let Some(schema) = schema {
21461                obj.insert("schema".into(), schema);
21462            }
21463            obj.insert("properties".into(), properties);
21464        }
21465        serde_json::to_string(&value)
21466    }
21467}
21468///FTM Schema: Vessel
21469#[derive(Debug, Clone, Serialize, Deserialize)]
21470#[cfg_attr(feature = "builder", derive(Builder))]
21471#[serde(rename_all = "camelCase")]
21472pub struct Vessel {
21473    pub id: String,
21474    #[cfg_attr(feature = "builder", builder(default = "Vessel".to_string()))]
21475    pub schema: String,
21476    ///Property: Address
21477    #[serde(skip_serializing_if = "Option::is_none")]
21478    #[cfg_attr(
21479        feature = "builder",
21480        builder(with = |value:impl Into<String>|vec![value.into()])
21481    )]
21482    pub address: Option<Vec<String>>,
21483    ///Property: Address
21484    #[serde(skip_serializing_if = "Option::is_none")]
21485    #[cfg_attr(
21486        feature = "builder",
21487        builder(with = |value:impl Into<String>|vec![value.into()])
21488    )]
21489    pub address_entity: Option<Vec<String>>,
21490    ///Property: Aleph URL
21491    #[serde(skip_serializing_if = "Option::is_none")]
21492    #[cfg_attr(
21493        feature = "builder",
21494        builder(with = |value:impl Into<String>|vec![value.into()])
21495    )]
21496    pub aleph_url: Option<Vec<String>>,
21497    ///Property: Alias
21498    #[serde(skip_serializing_if = "Option::is_none")]
21499    #[cfg_attr(
21500        feature = "builder",
21501        builder(with = |value:impl Into<String>|vec![value.into()])
21502    )]
21503    pub alias: Option<Vec<String>>,
21504    ///Property: Amount
21505    #[serde(
21506        skip_serializing_if = "Option::is_none",
21507        deserialize_with = "deserialize_opt_f64_vec",
21508        default
21509    )]
21510    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21511    pub amount: Option<Vec<f64>>,
21512    ///Property: Amount in EUR
21513    #[serde(
21514        skip_serializing_if = "Option::is_none",
21515        deserialize_with = "deserialize_opt_f64_vec",
21516        default
21517    )]
21518    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21519    pub amount_eur: Option<Vec<f64>>,
21520    ///Property: Amount in USD
21521    #[serde(
21522        skip_serializing_if = "Option::is_none",
21523        deserialize_with = "deserialize_opt_f64_vec",
21524        default
21525    )]
21526    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21527    pub amount_usd: Option<Vec<f64>>,
21528    ///Property: Build Date
21529    #[serde(skip_serializing_if = "Option::is_none")]
21530    #[cfg_attr(
21531        feature = "builder",
21532        builder(with = |value:impl Into<String>|vec![value.into()])
21533    )]
21534    pub build_date: Option<Vec<String>>,
21535    ///Property: Call Sign
21536    #[serde(skip_serializing_if = "Option::is_none")]
21537    #[cfg_attr(
21538        feature = "builder",
21539        builder(with = |value:impl Into<String>|vec![value.into()])
21540    )]
21541    pub call_sign: Option<Vec<String>>,
21542    ///Property: Country
21543    #[serde(skip_serializing_if = "Option::is_none")]
21544    #[cfg_attr(
21545        feature = "builder",
21546        builder(with = |value:impl Into<String>|vec![value.into()])
21547    )]
21548    pub country: Option<Vec<String>>,
21549    ///Property: Created at
21550    #[serde(skip_serializing_if = "Option::is_none")]
21551    #[cfg_attr(
21552        feature = "builder",
21553        builder(with = |value:impl Into<String>|vec![value.into()])
21554    )]
21555    pub created_at: Option<Vec<String>>,
21556    ///Property: CRS Number
21557    #[serde(skip_serializing_if = "Option::is_none")]
21558    #[cfg_attr(
21559        feature = "builder",
21560        builder(with = |value:impl Into<String>|vec![value.into()])
21561    )]
21562    pub crs_number: Option<Vec<String>>,
21563    ///Property: Currency
21564    #[serde(skip_serializing_if = "Option::is_none")]
21565    #[cfg_attr(
21566        feature = "builder",
21567        builder(with = |value:impl Into<String>|vec![value.into()])
21568    )]
21569    pub currency: Option<Vec<String>>,
21570    ///Property: Deadweight Tonnage
21571    #[serde(
21572        skip_serializing_if = "Option::is_none",
21573        deserialize_with = "deserialize_opt_f64_vec",
21574        default
21575    )]
21576    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21577    pub deadweight_tonnage: Option<Vec<f64>>,
21578    ///Property: De-registration Date
21579    #[serde(skip_serializing_if = "Option::is_none")]
21580    #[cfg_attr(
21581        feature = "builder",
21582        builder(with = |value:impl Into<String>|vec![value.into()])
21583    )]
21584    pub deregistration_date: Option<Vec<String>>,
21585    ///Property: Description
21586    #[serde(skip_serializing_if = "Option::is_none")]
21587    #[cfg_attr(
21588        feature = "builder",
21589        builder(with = |value:impl Into<String>|vec![value.into()])
21590    )]
21591    pub description: Option<Vec<String>>,
21592    ///Property: Flag
21593    #[serde(skip_serializing_if = "Option::is_none")]
21594    #[cfg_attr(
21595        feature = "builder",
21596        builder(with = |value:impl Into<String>|vec![value.into()])
21597    )]
21598    pub flag: Option<Vec<String>>,
21599    ///Property: Gross Registered Tonnage
21600    #[serde(
21601        skip_serializing_if = "Option::is_none",
21602        deserialize_with = "deserialize_opt_f64_vec",
21603        default
21604    )]
21605    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21606    pub gross_registered_tonnage: Option<Vec<f64>>,
21607    ///Property: IMO Number
21608    #[serde(skip_serializing_if = "Option::is_none")]
21609    #[cfg_attr(
21610        feature = "builder",
21611        builder(with = |value:impl Into<String>|vec![value.into()])
21612    )]
21613    pub imo_number: Option<Vec<String>>,
21614    ///Property: Index text
21615    #[serde(skip_serializing_if = "Option::is_none")]
21616    #[cfg_attr(
21617        feature = "builder",
21618        builder(with = |value:impl Into<String>|vec![value.into()])
21619    )]
21620    pub index_text: Option<Vec<String>>,
21621    ///Property: Keywords
21622    #[serde(skip_serializing_if = "Option::is_none")]
21623    #[cfg_attr(
21624        feature = "builder",
21625        builder(with = |value:impl Into<String>|vec![value.into()])
21626    )]
21627    pub keywords: Option<Vec<String>>,
21628    ///Property: MMSI
21629    #[serde(skip_serializing_if = "Option::is_none")]
21630    #[cfg_attr(
21631        feature = "builder",
21632        builder(with = |value:impl Into<String>|vec![value.into()])
21633    )]
21634    pub mmsi: Option<Vec<String>>,
21635    ///Property: Model
21636    #[serde(skip_serializing_if = "Option::is_none")]
21637    #[cfg_attr(
21638        feature = "builder",
21639        builder(with = |value:impl Into<String>|vec![value.into()])
21640    )]
21641    pub model: Option<Vec<String>>,
21642    ///Property: Modified on
21643    #[serde(skip_serializing_if = "Option::is_none")]
21644    #[cfg_attr(
21645        feature = "builder",
21646        builder(with = |value:impl Into<String>|vec![value.into()])
21647    )]
21648    pub modified_at: Option<Vec<String>>,
21649    ///Property: Name
21650    #[serde(default)]
21651    #[cfg_attr(
21652        feature = "builder",
21653        builder(with = |value:impl Into<String>|vec![value.into()])
21654    )]
21655    pub name: Vec<String>,
21656    ///Property: Date of Name Change
21657    #[serde(skip_serializing_if = "Option::is_none")]
21658    #[cfg_attr(
21659        feature = "builder",
21660        builder(with = |value:impl Into<String>|vec![value.into()])
21661    )]
21662    pub name_change_date: Option<Vec<String>>,
21663    ///Property: Navigation Area
21664    #[serde(skip_serializing_if = "Option::is_none")]
21665    #[cfg_attr(
21666        feature = "builder",
21667        builder(with = |value:impl Into<String>|vec![value.into()])
21668    )]
21669    pub navigation_area: Option<Vec<String>>,
21670    ///Property: Notes
21671    #[serde(skip_serializing_if = "Option::is_none")]
21672    #[cfg_attr(
21673        feature = "builder",
21674        builder(with = |value:impl Into<String>|vec![value.into()])
21675    )]
21676    pub notes: Option<Vec<String>>,
21677    ///Property: Operator
21678    #[serde(skip_serializing_if = "Option::is_none")]
21679    #[cfg_attr(
21680        feature = "builder",
21681        builder(with = |value:impl Into<String>|vec![value.into()])
21682    )]
21683    pub operator: Option<Vec<String>>,
21684    ///Property: Owner
21685    #[serde(skip_serializing_if = "Option::is_none")]
21686    #[cfg_attr(
21687        feature = "builder",
21688        builder(with = |value:impl Into<String>|vec![value.into()])
21689    )]
21690    pub owner: Option<Vec<String>>,
21691    ///Property: Past Flags
21692    #[serde(skip_serializing_if = "Option::is_none")]
21693    #[cfg_attr(
21694        feature = "builder",
21695        builder(with = |value:impl Into<String>|vec![value.into()])
21696    )]
21697    pub past_flags: Option<Vec<String>>,
21698    ///Property: Past Types
21699    #[serde(skip_serializing_if = "Option::is_none")]
21700    #[cfg_attr(
21701        feature = "builder",
21702        builder(with = |value:impl Into<String>|vec![value.into()])
21703    )]
21704    pub past_types: Option<Vec<String>>,
21705    ///Property: Previous name
21706    #[serde(skip_serializing_if = "Option::is_none")]
21707    #[cfg_attr(
21708        feature = "builder",
21709        builder(with = |value:impl Into<String>|vec![value.into()])
21710    )]
21711    pub previous_name: Option<Vec<String>>,
21712    ///Property: Program
21713    #[serde(skip_serializing_if = "Option::is_none")]
21714    #[cfg_attr(
21715        feature = "builder",
21716        builder(with = |value:impl Into<String>|vec![value.into()])
21717    )]
21718    pub program: Option<Vec<String>>,
21719    ///Property: Program ID
21720    #[serde(skip_serializing_if = "Option::is_none")]
21721    #[cfg_attr(
21722        feature = "builder",
21723        builder(with = |value:impl Into<String>|vec![value.into()])
21724    )]
21725    pub program_id: Option<Vec<String>>,
21726    ///Property: Source document
21727    #[serde(skip_serializing_if = "Option::is_none")]
21728    #[cfg_attr(
21729        feature = "builder",
21730        builder(with = |value:impl Into<String>|vec![value.into()])
21731    )]
21732    pub proof: Option<Vec<String>>,
21733    ///Property: Publishing source
21734    #[serde(skip_serializing_if = "Option::is_none")]
21735    #[cfg_attr(
21736        feature = "builder",
21737        builder(with = |value:impl Into<String>|vec![value.into()])
21738    )]
21739    pub publisher: Option<Vec<String>>,
21740    ///Property: Publishing source URL
21741    #[serde(skip_serializing_if = "Option::is_none")]
21742    #[cfg_attr(
21743        feature = "builder",
21744        builder(with = |value:impl Into<String>|vec![value.into()])
21745    )]
21746    pub publisher_url: Option<Vec<String>>,
21747    ///Property: Registration Date
21748    #[serde(skip_serializing_if = "Option::is_none")]
21749    #[cfg_attr(
21750        feature = "builder",
21751        builder(with = |value:impl Into<String>|vec![value.into()])
21752    )]
21753    pub registration_date: Option<Vec<String>>,
21754    ///Property: Registration number
21755    #[serde(skip_serializing_if = "Option::is_none")]
21756    #[cfg_attr(
21757        feature = "builder",
21758        builder(with = |value:impl Into<String>|vec![value.into()])
21759    )]
21760    pub registration_number: Option<Vec<String>>,
21761    ///Property: Port of Registration
21762    #[serde(skip_serializing_if = "Option::is_none")]
21763    #[cfg_attr(
21764        feature = "builder",
21765        builder(with = |value:impl Into<String>|vec![value.into()])
21766    )]
21767    pub registration_port: Option<Vec<String>>,
21768    ///Property: Retrieved on
21769    #[serde(skip_serializing_if = "Option::is_none")]
21770    #[cfg_attr(
21771        feature = "builder",
21772        builder(with = |value:impl Into<String>|vec![value.into()])
21773    )]
21774    pub retrieved_at: Option<Vec<String>>,
21775    ///Property: Source link
21776    #[serde(skip_serializing_if = "Option::is_none")]
21777    #[cfg_attr(
21778        feature = "builder",
21779        builder(with = |value:impl Into<String>|vec![value.into()])
21780    )]
21781    pub source_url: Option<Vec<String>>,
21782    ///Property: Summary
21783    #[serde(skip_serializing_if = "Option::is_none")]
21784    #[cfg_attr(
21785        feature = "builder",
21786        builder(with = |value:impl Into<String>|vec![value.into()])
21787    )]
21788    pub summary: Option<Vec<String>>,
21789    ///Property: Tonnage
21790    #[serde(
21791        skip_serializing_if = "Option::is_none",
21792        deserialize_with = "deserialize_opt_f64_vec",
21793        default
21794    )]
21795    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
21796    pub tonnage: Option<Vec<f64>>,
21797    ///Property: Topics
21798    #[serde(skip_serializing_if = "Option::is_none")]
21799    #[cfg_attr(
21800        feature = "builder",
21801        builder(with = |value:impl Into<String>|vec![value.into()])
21802    )]
21803    pub topics: Option<Vec<String>>,
21804    ///Property: Type
21805    #[serde(skip_serializing_if = "Option::is_none")]
21806    #[cfg_attr(
21807        feature = "builder",
21808        builder(with = |value:impl Into<String>|vec![value.into()])
21809    )]
21810    pub type_: Option<Vec<String>>,
21811    ///Property: Weak alias
21812    #[serde(skip_serializing_if = "Option::is_none")]
21813    #[cfg_attr(
21814        feature = "builder",
21815        builder(with = |value:impl Into<String>|vec![value.into()])
21816    )]
21817    pub weak_alias: Option<Vec<String>>,
21818    ///Property: Wikidata ID
21819    #[serde(skip_serializing_if = "Option::is_none")]
21820    #[cfg_attr(
21821        feature = "builder",
21822        builder(with = |value:impl Into<String>|vec![value.into()])
21823    )]
21824    pub wikidata_id: Option<Vec<String>>,
21825    ///Property: Wikipedia Article
21826    #[serde(skip_serializing_if = "Option::is_none")]
21827    #[cfg_attr(
21828        feature = "builder",
21829        builder(with = |value:impl Into<String>|vec![value.into()])
21830    )]
21831    pub wikipedia_url: Option<Vec<String>>,
21832}
21833impl Vessel {
21834    /// Create a new entity with the given ID
21835    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
21836    pub fn new(id: impl Into<String>) -> Self {
21837        Self {
21838            id: id.into(),
21839            schema: "Vessel".to_string(),
21840            address: None,
21841            address_entity: None,
21842            aleph_url: None,
21843            alias: None,
21844            amount: None,
21845            amount_eur: None,
21846            amount_usd: None,
21847            build_date: None,
21848            call_sign: None,
21849            country: None,
21850            created_at: None,
21851            crs_number: None,
21852            currency: None,
21853            deadweight_tonnage: None,
21854            deregistration_date: None,
21855            description: None,
21856            flag: None,
21857            gross_registered_tonnage: None,
21858            imo_number: None,
21859            index_text: None,
21860            keywords: None,
21861            mmsi: None,
21862            model: None,
21863            modified_at: None,
21864            name: Vec::new(),
21865            name_change_date: None,
21866            navigation_area: None,
21867            notes: None,
21868            operator: None,
21869            owner: None,
21870            past_flags: None,
21871            past_types: None,
21872            previous_name: None,
21873            program: None,
21874            program_id: None,
21875            proof: None,
21876            publisher: None,
21877            publisher_url: None,
21878            registration_date: None,
21879            registration_number: None,
21880            registration_port: None,
21881            retrieved_at: None,
21882            source_url: None,
21883            summary: None,
21884            tonnage: None,
21885            topics: None,
21886            type_: None,
21887            weak_alias: None,
21888            wikidata_id: None,
21889            wikipedia_url: None,
21890        }
21891    }
21892    /// Get the schema name
21893    pub fn schema_name() -> &'static str {
21894        "Vessel"
21895    }
21896    /// Serialize to standard FTM nested JSON format
21897    ///
21898    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
21899    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
21900        let mut value = serde_json::to_value(self)?;
21901        if let Some(obj) = value.as_object_mut() {
21902            let id = obj.remove("id");
21903            let schema = obj.remove("schema");
21904            let properties = serde_json::Value::Object(std::mem::take(obj));
21905            if let Some(id) = id {
21906                obj.insert("id".into(), id);
21907            }
21908            if let Some(schema) = schema {
21909                obj.insert("schema".into(), schema);
21910            }
21911            obj.insert("properties".into(), properties);
21912        }
21913        serde_json::to_string(&value)
21914    }
21915}
21916///FTM Schema: Video
21917#[derive(Debug, Clone, Serialize, Deserialize)]
21918#[cfg_attr(feature = "builder", derive(Builder))]
21919#[serde(rename_all = "camelCase")]
21920pub struct Video {
21921    pub id: String,
21922    #[cfg_attr(feature = "builder", builder(default = "Video".to_string()))]
21923    pub schema: String,
21924    ///Property: Address
21925    #[serde(skip_serializing_if = "Option::is_none")]
21926    #[cfg_attr(
21927        feature = "builder",
21928        builder(with = |value:impl Into<String>|vec![value.into()])
21929    )]
21930    pub address: Option<Vec<String>>,
21931    ///Property: Address
21932    #[serde(skip_serializing_if = "Option::is_none")]
21933    #[cfg_attr(
21934        feature = "builder",
21935        builder(with = |value:impl Into<String>|vec![value.into()])
21936    )]
21937    pub address_entity: Option<Vec<String>>,
21938    ///Property: Aleph URL
21939    #[serde(skip_serializing_if = "Option::is_none")]
21940    #[cfg_attr(
21941        feature = "builder",
21942        builder(with = |value:impl Into<String>|vec![value.into()])
21943    )]
21944    pub aleph_url: Option<Vec<String>>,
21945    ///Property: Alias
21946    #[serde(skip_serializing_if = "Option::is_none")]
21947    #[cfg_attr(
21948        feature = "builder",
21949        builder(with = |value:impl Into<String>|vec![value.into()])
21950    )]
21951    pub alias: Option<Vec<String>>,
21952    ///Property: Ancestors
21953    #[serde(skip_serializing_if = "Option::is_none")]
21954    #[cfg_attr(
21955        feature = "builder",
21956        builder(with = |value:impl Into<String>|vec![value.into()])
21957    )]
21958    pub ancestors: Option<Vec<String>>,
21959    ///Property: Author
21960    #[serde(skip_serializing_if = "Option::is_none")]
21961    #[cfg_attr(
21962        feature = "builder",
21963        builder(with = |value:impl Into<String>|vec![value.into()])
21964    )]
21965    pub author: Option<Vec<String>>,
21966    ///Property: Authored on
21967    #[serde(skip_serializing_if = "Option::is_none")]
21968    #[cfg_attr(
21969        feature = "builder",
21970        builder(with = |value:impl Into<String>|vec![value.into()])
21971    )]
21972    pub authored_at: Option<Vec<String>>,
21973    ///Property: Text
21974    #[serde(skip_serializing_if = "Option::is_none")]
21975    #[cfg_attr(
21976        feature = "builder",
21977        builder(with = |value:impl Into<String>|vec![value.into()])
21978    )]
21979    pub body_text: Option<Vec<String>>,
21980    ///Property: Detected companies
21981    #[serde(skip_serializing_if = "Option::is_none")]
21982    #[cfg_attr(
21983        feature = "builder",
21984        builder(with = |value:impl Into<String>|vec![value.into()])
21985    )]
21986    pub companies_mentioned: Option<Vec<String>>,
21987    ///Property: Checksum
21988    #[serde(skip_serializing_if = "Option::is_none")]
21989    #[cfg_attr(
21990        feature = "builder",
21991        builder(with = |value:impl Into<String>|vec![value.into()])
21992    )]
21993    pub content_hash: Option<Vec<String>>,
21994    ///Property: Country
21995    #[serde(skip_serializing_if = "Option::is_none")]
21996    #[cfg_attr(
21997        feature = "builder",
21998        builder(with = |value:impl Into<String>|vec![value.into()])
21999    )]
22000    pub country: Option<Vec<String>>,
22001    ///Property: Crawler
22002    #[serde(skip_serializing_if = "Option::is_none")]
22003    #[cfg_attr(
22004        feature = "builder",
22005        builder(with = |value:impl Into<String>|vec![value.into()])
22006    )]
22007    pub crawler: Option<Vec<String>>,
22008    ///Property: Created at
22009    #[serde(skip_serializing_if = "Option::is_none")]
22010    #[cfg_attr(
22011        feature = "builder",
22012        builder(with = |value:impl Into<String>|vec![value.into()])
22013    )]
22014    pub created_at: Option<Vec<String>>,
22015    ///Property: Date
22016    #[serde(skip_serializing_if = "Option::is_none")]
22017    #[cfg_attr(
22018        feature = "builder",
22019        builder(with = |value:impl Into<String>|vec![value.into()])
22020    )]
22021    pub date: Option<Vec<String>>,
22022    ///Property: Description
22023    #[serde(skip_serializing_if = "Option::is_none")]
22024    #[cfg_attr(
22025        feature = "builder",
22026        builder(with = |value:impl Into<String>|vec![value.into()])
22027    )]
22028    pub description: Option<Vec<String>>,
22029    ///Property: Detected country
22030    #[serde(skip_serializing_if = "Option::is_none")]
22031    #[cfg_attr(
22032        feature = "builder",
22033        builder(with = |value:impl Into<String>|vec![value.into()])
22034    )]
22035    pub detected_country: Option<Vec<String>>,
22036    ///Property: Detected language
22037    #[serde(skip_serializing_if = "Option::is_none")]
22038    #[cfg_attr(
22039        feature = "builder",
22040        builder(with = |value:impl Into<String>|vec![value.into()])
22041    )]
22042    pub detected_language: Option<Vec<String>>,
22043    ///Property: Duration
22044    #[serde(
22045        skip_serializing_if = "Option::is_none",
22046        deserialize_with = "deserialize_opt_f64_vec",
22047        default
22048    )]
22049    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
22050    pub duration: Option<Vec<f64>>,
22051    ///Property: Detected e-mail addresses
22052    #[serde(skip_serializing_if = "Option::is_none")]
22053    #[cfg_attr(
22054        feature = "builder",
22055        builder(with = |value:impl Into<String>|vec![value.into()])
22056    )]
22057    pub email_mentioned: Option<Vec<String>>,
22058    ///Property: File encoding
22059    #[serde(skip_serializing_if = "Option::is_none")]
22060    #[cfg_attr(
22061        feature = "builder",
22062        builder(with = |value:impl Into<String>|vec![value.into()])
22063    )]
22064    pub encoding: Option<Vec<String>>,
22065    ///Property: File extension
22066    #[serde(skip_serializing_if = "Option::is_none")]
22067    #[cfg_attr(
22068        feature = "builder",
22069        builder(with = |value:impl Into<String>|vec![value.into()])
22070    )]
22071    pub extension: Option<Vec<String>>,
22072    ///Property: File name
22073    #[serde(default)]
22074    #[cfg_attr(
22075        feature = "builder",
22076        builder(with = |value:impl Into<String>|vec![value.into()])
22077    )]
22078    pub file_name: Vec<String>,
22079    ///Property: File size
22080    #[serde(
22081        skip_serializing_if = "Option::is_none",
22082        deserialize_with = "deserialize_opt_f64_vec",
22083        default
22084    )]
22085    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
22086    pub file_size: Option<Vec<f64>>,
22087    ///Property: Generator
22088    #[serde(skip_serializing_if = "Option::is_none")]
22089    #[cfg_attr(
22090        feature = "builder",
22091        builder(with = |value:impl Into<String>|vec![value.into()])
22092    )]
22093    pub generator: Option<Vec<String>>,
22094    ///Property: Detected IBANs
22095    #[serde(skip_serializing_if = "Option::is_none")]
22096    #[cfg_attr(
22097        feature = "builder",
22098        builder(with = |value:impl Into<String>|vec![value.into()])
22099    )]
22100    pub iban_mentioned: Option<Vec<String>>,
22101    ///Property: Index text
22102    #[serde(skip_serializing_if = "Option::is_none")]
22103    #[cfg_attr(
22104        feature = "builder",
22105        builder(with = |value:impl Into<String>|vec![value.into()])
22106    )]
22107    pub index_text: Option<Vec<String>>,
22108    ///Property: Detected IP addresses
22109    #[serde(skip_serializing_if = "Option::is_none")]
22110    #[cfg_attr(
22111        feature = "builder",
22112        builder(with = |value:impl Into<String>|vec![value.into()])
22113    )]
22114    pub ip_mentioned: Option<Vec<String>>,
22115    ///Property: Keywords
22116    #[serde(skip_serializing_if = "Option::is_none")]
22117    #[cfg_attr(
22118        feature = "builder",
22119        builder(with = |value:impl Into<String>|vec![value.into()])
22120    )]
22121    pub keywords: Option<Vec<String>>,
22122    ///Property: Language
22123    #[serde(skip_serializing_if = "Option::is_none")]
22124    #[cfg_attr(
22125        feature = "builder",
22126        builder(with = |value:impl Into<String>|vec![value.into()])
22127    )]
22128    pub language: Option<Vec<String>>,
22129    ///Property: Detected locations
22130    #[serde(skip_serializing_if = "Option::is_none")]
22131    #[cfg_attr(
22132        feature = "builder",
22133        builder(with = |value:impl Into<String>|vec![value.into()])
22134    )]
22135    pub location_mentioned: Option<Vec<String>>,
22136    ///Property: Message ID
22137    #[serde(skip_serializing_if = "Option::is_none")]
22138    #[cfg_attr(
22139        feature = "builder",
22140        builder(with = |value:impl Into<String>|vec![value.into()])
22141    )]
22142    pub message_id: Option<Vec<String>>,
22143    ///Property: MIME type
22144    #[serde(skip_serializing_if = "Option::is_none")]
22145    #[cfg_attr(
22146        feature = "builder",
22147        builder(with = |value:impl Into<String>|vec![value.into()])
22148    )]
22149    pub mime_type: Option<Vec<String>>,
22150    ///Property: Modified on
22151    #[serde(skip_serializing_if = "Option::is_none")]
22152    #[cfg_attr(
22153        feature = "builder",
22154        builder(with = |value:impl Into<String>|vec![value.into()])
22155    )]
22156    pub modified_at: Option<Vec<String>>,
22157    ///Property: Name
22158    #[serde(default)]
22159    #[cfg_attr(
22160        feature = "builder",
22161        builder(with = |value:impl Into<String>|vec![value.into()])
22162    )]
22163    pub name: Vec<String>,
22164    ///Property: Detected names
22165    #[serde(skip_serializing_if = "Option::is_none")]
22166    #[cfg_attr(
22167        feature = "builder",
22168        builder(with = |value:impl Into<String>|vec![value.into()])
22169    )]
22170    pub names_mentioned: Option<Vec<String>>,
22171    ///Property: Notes
22172    #[serde(skip_serializing_if = "Option::is_none")]
22173    #[cfg_attr(
22174        feature = "builder",
22175        builder(with = |value:impl Into<String>|vec![value.into()])
22176    )]
22177    pub notes: Option<Vec<String>>,
22178    ///Property: Folder
22179    #[serde(skip_serializing_if = "Option::is_none")]
22180    #[cfg_attr(
22181        feature = "builder",
22182        builder(with = |value:impl Into<String>|vec![value.into()])
22183    )]
22184    pub parent: Option<Vec<String>>,
22185    ///Property: Detected people
22186    #[serde(skip_serializing_if = "Option::is_none")]
22187    #[cfg_attr(
22188        feature = "builder",
22189        builder(with = |value:impl Into<String>|vec![value.into()])
22190    )]
22191    pub people_mentioned: Option<Vec<String>>,
22192    ///Property: Detected phones
22193    #[serde(skip_serializing_if = "Option::is_none")]
22194    #[cfg_attr(
22195        feature = "builder",
22196        builder(with = |value:impl Into<String>|vec![value.into()])
22197    )]
22198    pub phone_mentioned: Option<Vec<String>>,
22199    ///Property: Previous name
22200    #[serde(skip_serializing_if = "Option::is_none")]
22201    #[cfg_attr(
22202        feature = "builder",
22203        builder(with = |value:impl Into<String>|vec![value.into()])
22204    )]
22205    pub previous_name: Option<Vec<String>>,
22206    ///Property: Processed at
22207    #[serde(skip_serializing_if = "Option::is_none")]
22208    #[cfg_attr(
22209        feature = "builder",
22210        builder(with = |value:impl Into<String>|vec![value.into()])
22211    )]
22212    pub processed_at: Option<Vec<String>>,
22213    ///Property: Processing agent
22214    #[serde(skip_serializing_if = "Option::is_none")]
22215    #[cfg_attr(
22216        feature = "builder",
22217        builder(with = |value:impl Into<String>|vec![value.into()])
22218    )]
22219    pub processing_agent: Option<Vec<String>>,
22220    ///Property: Processing error
22221    #[serde(skip_serializing_if = "Option::is_none")]
22222    #[cfg_attr(
22223        feature = "builder",
22224        builder(with = |value:impl Into<String>|vec![value.into()])
22225    )]
22226    pub processing_error: Option<Vec<String>>,
22227    ///Property: Processing status
22228    #[serde(skip_serializing_if = "Option::is_none")]
22229    #[cfg_attr(
22230        feature = "builder",
22231        builder(with = |value:impl Into<String>|vec![value.into()])
22232    )]
22233    pub processing_status: Option<Vec<String>>,
22234    ///Property: Program
22235    #[serde(skip_serializing_if = "Option::is_none")]
22236    #[cfg_attr(
22237        feature = "builder",
22238        builder(with = |value:impl Into<String>|vec![value.into()])
22239    )]
22240    pub program: Option<Vec<String>>,
22241    ///Property: Program ID
22242    #[serde(skip_serializing_if = "Option::is_none")]
22243    #[cfg_attr(
22244        feature = "builder",
22245        builder(with = |value:impl Into<String>|vec![value.into()])
22246    )]
22247    pub program_id: Option<Vec<String>>,
22248    ///Property: Source document
22249    #[serde(skip_serializing_if = "Option::is_none")]
22250    #[cfg_attr(
22251        feature = "builder",
22252        builder(with = |value:impl Into<String>|vec![value.into()])
22253    )]
22254    pub proof: Option<Vec<String>>,
22255    ///Property: Published on
22256    #[serde(skip_serializing_if = "Option::is_none")]
22257    #[cfg_attr(
22258        feature = "builder",
22259        builder(with = |value:impl Into<String>|vec![value.into()])
22260    )]
22261    pub published_at: Option<Vec<String>>,
22262    ///Property: Publishing source
22263    #[serde(skip_serializing_if = "Option::is_none")]
22264    #[cfg_attr(
22265        feature = "builder",
22266        builder(with = |value:impl Into<String>|vec![value.into()])
22267    )]
22268    pub publisher: Option<Vec<String>>,
22269    ///Property: Publishing source URL
22270    #[serde(skip_serializing_if = "Option::is_none")]
22271    #[cfg_attr(
22272        feature = "builder",
22273        builder(with = |value:impl Into<String>|vec![value.into()])
22274    )]
22275    pub publisher_url: Option<Vec<String>>,
22276    ///Property: Retrieved on
22277    #[serde(skip_serializing_if = "Option::is_none")]
22278    #[cfg_attr(
22279        feature = "builder",
22280        builder(with = |value:impl Into<String>|vec![value.into()])
22281    )]
22282    pub retrieved_at: Option<Vec<String>>,
22283    ///Property: Source link
22284    #[serde(skip_serializing_if = "Option::is_none")]
22285    #[cfg_attr(
22286        feature = "builder",
22287        builder(with = |value:impl Into<String>|vec![value.into()])
22288    )]
22289    pub source_url: Option<Vec<String>>,
22290    ///Property: Summary
22291    #[serde(skip_serializing_if = "Option::is_none")]
22292    #[cfg_attr(
22293        feature = "builder",
22294        builder(with = |value:impl Into<String>|vec![value.into()])
22295    )]
22296    pub summary: Option<Vec<String>>,
22297    ///Property: Title
22298    #[serde(skip_serializing_if = "Option::is_none")]
22299    #[cfg_attr(
22300        feature = "builder",
22301        builder(with = |value:impl Into<String>|vec![value.into()])
22302    )]
22303    pub title: Option<Vec<String>>,
22304    ///Property: Topics
22305    #[serde(skip_serializing_if = "Option::is_none")]
22306    #[cfg_attr(
22307        feature = "builder",
22308        builder(with = |value:impl Into<String>|vec![value.into()])
22309    )]
22310    pub topics: Option<Vec<String>>,
22311    ///Property: The language of the translated text
22312    #[serde(skip_serializing_if = "Option::is_none")]
22313    #[cfg_attr(
22314        feature = "builder",
22315        builder(with = |value:impl Into<String>|vec![value.into()])
22316    )]
22317    pub translated_language: Option<Vec<String>>,
22318    ///Property: Translated version of the body text
22319    #[serde(skip_serializing_if = "Option::is_none")]
22320    #[cfg_attr(
22321        feature = "builder",
22322        builder(with = |value:impl Into<String>|vec![value.into()])
22323    )]
22324    pub translated_text: Option<Vec<String>>,
22325    ///Property: Weak alias
22326    #[serde(skip_serializing_if = "Option::is_none")]
22327    #[cfg_attr(
22328        feature = "builder",
22329        builder(with = |value:impl Into<String>|vec![value.into()])
22330    )]
22331    pub weak_alias: Option<Vec<String>>,
22332    ///Property: Wikidata ID
22333    #[serde(skip_serializing_if = "Option::is_none")]
22334    #[cfg_attr(
22335        feature = "builder",
22336        builder(with = |value:impl Into<String>|vec![value.into()])
22337    )]
22338    pub wikidata_id: Option<Vec<String>>,
22339    ///Property: Wikipedia Article
22340    #[serde(skip_serializing_if = "Option::is_none")]
22341    #[cfg_attr(
22342        feature = "builder",
22343        builder(with = |value:impl Into<String>|vec![value.into()])
22344    )]
22345    pub wikipedia_url: Option<Vec<String>>,
22346}
22347impl Video {
22348    /// Create a new entity with the given ID
22349    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
22350    pub fn new(id: impl Into<String>) -> Self {
22351        Self {
22352            id: id.into(),
22353            schema: "Video".to_string(),
22354            address: None,
22355            address_entity: None,
22356            aleph_url: None,
22357            alias: None,
22358            ancestors: None,
22359            author: None,
22360            authored_at: None,
22361            body_text: None,
22362            companies_mentioned: None,
22363            content_hash: None,
22364            country: None,
22365            crawler: None,
22366            created_at: None,
22367            date: None,
22368            description: None,
22369            detected_country: None,
22370            detected_language: None,
22371            duration: None,
22372            email_mentioned: None,
22373            encoding: None,
22374            extension: None,
22375            file_name: Vec::new(),
22376            file_size: None,
22377            generator: None,
22378            iban_mentioned: None,
22379            index_text: None,
22380            ip_mentioned: None,
22381            keywords: None,
22382            language: None,
22383            location_mentioned: None,
22384            message_id: None,
22385            mime_type: None,
22386            modified_at: None,
22387            name: Vec::new(),
22388            names_mentioned: None,
22389            notes: None,
22390            parent: None,
22391            people_mentioned: None,
22392            phone_mentioned: None,
22393            previous_name: None,
22394            processed_at: None,
22395            processing_agent: None,
22396            processing_error: None,
22397            processing_status: None,
22398            program: None,
22399            program_id: None,
22400            proof: None,
22401            published_at: None,
22402            publisher: None,
22403            publisher_url: None,
22404            retrieved_at: None,
22405            source_url: None,
22406            summary: None,
22407            title: None,
22408            topics: None,
22409            translated_language: None,
22410            translated_text: None,
22411            weak_alias: None,
22412            wikidata_id: None,
22413            wikipedia_url: None,
22414        }
22415    }
22416    /// Get the schema name
22417    pub fn schema_name() -> &'static str {
22418        "Video"
22419    }
22420    /// Serialize to standard FTM nested JSON format
22421    ///
22422    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
22423    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
22424        let mut value = serde_json::to_value(self)?;
22425        if let Some(obj) = value.as_object_mut() {
22426            let id = obj.remove("id");
22427            let schema = obj.remove("schema");
22428            let properties = serde_json::Value::Object(std::mem::take(obj));
22429            if let Some(id) = id {
22430                obj.insert("id".into(), id);
22431            }
22432            if let Some(schema) = schema {
22433                obj.insert("schema".into(), schema);
22434            }
22435            obj.insert("properties".into(), properties);
22436        }
22437        serde_json::to_string(&value)
22438    }
22439}
22440///FTM Schema: Workbook
22441#[derive(Debug, Clone, Serialize, Deserialize)]
22442#[cfg_attr(feature = "builder", derive(Builder))]
22443#[serde(rename_all = "camelCase")]
22444pub struct Workbook {
22445    pub id: String,
22446    #[cfg_attr(feature = "builder", builder(default = "Workbook".to_string()))]
22447    pub schema: String,
22448    ///Property: Address
22449    #[serde(skip_serializing_if = "Option::is_none")]
22450    #[cfg_attr(
22451        feature = "builder",
22452        builder(with = |value:impl Into<String>|vec![value.into()])
22453    )]
22454    pub address: Option<Vec<String>>,
22455    ///Property: Address
22456    #[serde(skip_serializing_if = "Option::is_none")]
22457    #[cfg_attr(
22458        feature = "builder",
22459        builder(with = |value:impl Into<String>|vec![value.into()])
22460    )]
22461    pub address_entity: Option<Vec<String>>,
22462    ///Property: Aleph URL
22463    #[serde(skip_serializing_if = "Option::is_none")]
22464    #[cfg_attr(
22465        feature = "builder",
22466        builder(with = |value:impl Into<String>|vec![value.into()])
22467    )]
22468    pub aleph_url: Option<Vec<String>>,
22469    ///Property: Alias
22470    #[serde(skip_serializing_if = "Option::is_none")]
22471    #[cfg_attr(
22472        feature = "builder",
22473        builder(with = |value:impl Into<String>|vec![value.into()])
22474    )]
22475    pub alias: Option<Vec<String>>,
22476    ///Property: Ancestors
22477    #[serde(skip_serializing_if = "Option::is_none")]
22478    #[cfg_attr(
22479        feature = "builder",
22480        builder(with = |value:impl Into<String>|vec![value.into()])
22481    )]
22482    pub ancestors: Option<Vec<String>>,
22483    ///Property: Author
22484    #[serde(skip_serializing_if = "Option::is_none")]
22485    #[cfg_attr(
22486        feature = "builder",
22487        builder(with = |value:impl Into<String>|vec![value.into()])
22488    )]
22489    pub author: Option<Vec<String>>,
22490    ///Property: Authored on
22491    #[serde(skip_serializing_if = "Option::is_none")]
22492    #[cfg_attr(
22493        feature = "builder",
22494        builder(with = |value:impl Into<String>|vec![value.into()])
22495    )]
22496    pub authored_at: Option<Vec<String>>,
22497    ///Property: Text
22498    #[serde(skip_serializing_if = "Option::is_none")]
22499    #[cfg_attr(
22500        feature = "builder",
22501        builder(with = |value:impl Into<String>|vec![value.into()])
22502    )]
22503    pub body_text: Option<Vec<String>>,
22504    ///Property: Detected companies
22505    #[serde(skip_serializing_if = "Option::is_none")]
22506    #[cfg_attr(
22507        feature = "builder",
22508        builder(with = |value:impl Into<String>|vec![value.into()])
22509    )]
22510    pub companies_mentioned: Option<Vec<String>>,
22511    ///Property: Checksum
22512    #[serde(skip_serializing_if = "Option::is_none")]
22513    #[cfg_attr(
22514        feature = "builder",
22515        builder(with = |value:impl Into<String>|vec![value.into()])
22516    )]
22517    pub content_hash: Option<Vec<String>>,
22518    ///Property: Country
22519    #[serde(skip_serializing_if = "Option::is_none")]
22520    #[cfg_attr(
22521        feature = "builder",
22522        builder(with = |value:impl Into<String>|vec![value.into()])
22523    )]
22524    pub country: Option<Vec<String>>,
22525    ///Property: Crawler
22526    #[serde(skip_serializing_if = "Option::is_none")]
22527    #[cfg_attr(
22528        feature = "builder",
22529        builder(with = |value:impl Into<String>|vec![value.into()])
22530    )]
22531    pub crawler: Option<Vec<String>>,
22532    ///Property: Created at
22533    #[serde(skip_serializing_if = "Option::is_none")]
22534    #[cfg_attr(
22535        feature = "builder",
22536        builder(with = |value:impl Into<String>|vec![value.into()])
22537    )]
22538    pub created_at: Option<Vec<String>>,
22539    ///Property: Date
22540    #[serde(skip_serializing_if = "Option::is_none")]
22541    #[cfg_attr(
22542        feature = "builder",
22543        builder(with = |value:impl Into<String>|vec![value.into()])
22544    )]
22545    pub date: Option<Vec<String>>,
22546    ///Property: Description
22547    #[serde(skip_serializing_if = "Option::is_none")]
22548    #[cfg_attr(
22549        feature = "builder",
22550        builder(with = |value:impl Into<String>|vec![value.into()])
22551    )]
22552    pub description: Option<Vec<String>>,
22553    ///Property: Detected country
22554    #[serde(skip_serializing_if = "Option::is_none")]
22555    #[cfg_attr(
22556        feature = "builder",
22557        builder(with = |value:impl Into<String>|vec![value.into()])
22558    )]
22559    pub detected_country: Option<Vec<String>>,
22560    ///Property: Detected language
22561    #[serde(skip_serializing_if = "Option::is_none")]
22562    #[cfg_attr(
22563        feature = "builder",
22564        builder(with = |value:impl Into<String>|vec![value.into()])
22565    )]
22566    pub detected_language: Option<Vec<String>>,
22567    ///Property: Detected e-mail addresses
22568    #[serde(skip_serializing_if = "Option::is_none")]
22569    #[cfg_attr(
22570        feature = "builder",
22571        builder(with = |value:impl Into<String>|vec![value.into()])
22572    )]
22573    pub email_mentioned: Option<Vec<String>>,
22574    ///Property: File encoding
22575    #[serde(skip_serializing_if = "Option::is_none")]
22576    #[cfg_attr(
22577        feature = "builder",
22578        builder(with = |value:impl Into<String>|vec![value.into()])
22579    )]
22580    pub encoding: Option<Vec<String>>,
22581    ///Property: File extension
22582    #[serde(skip_serializing_if = "Option::is_none")]
22583    #[cfg_attr(
22584        feature = "builder",
22585        builder(with = |value:impl Into<String>|vec![value.into()])
22586    )]
22587    pub extension: Option<Vec<String>>,
22588    ///Property: File name
22589    #[serde(default)]
22590    #[cfg_attr(
22591        feature = "builder",
22592        builder(with = |value:impl Into<String>|vec![value.into()])
22593    )]
22594    pub file_name: Vec<String>,
22595    ///Property: File size
22596    #[serde(
22597        skip_serializing_if = "Option::is_none",
22598        deserialize_with = "deserialize_opt_f64_vec",
22599        default
22600    )]
22601    #[cfg_attr(feature = "builder", builder(with = |value:f64|vec![value]))]
22602    pub file_size: Option<Vec<f64>>,
22603    ///Property: Generator
22604    #[serde(skip_serializing_if = "Option::is_none")]
22605    #[cfg_attr(
22606        feature = "builder",
22607        builder(with = |value:impl Into<String>|vec![value.into()])
22608    )]
22609    pub generator: Option<Vec<String>>,
22610    ///Property: Detected IBANs
22611    #[serde(skip_serializing_if = "Option::is_none")]
22612    #[cfg_attr(
22613        feature = "builder",
22614        builder(with = |value:impl Into<String>|vec![value.into()])
22615    )]
22616    pub iban_mentioned: Option<Vec<String>>,
22617    ///Property: Index text
22618    #[serde(skip_serializing_if = "Option::is_none")]
22619    #[cfg_attr(
22620        feature = "builder",
22621        builder(with = |value:impl Into<String>|vec![value.into()])
22622    )]
22623    pub index_text: Option<Vec<String>>,
22624    ///Property: Detected IP addresses
22625    #[serde(skip_serializing_if = "Option::is_none")]
22626    #[cfg_attr(
22627        feature = "builder",
22628        builder(with = |value:impl Into<String>|vec![value.into()])
22629    )]
22630    pub ip_mentioned: Option<Vec<String>>,
22631    ///Property: Keywords
22632    #[serde(skip_serializing_if = "Option::is_none")]
22633    #[cfg_attr(
22634        feature = "builder",
22635        builder(with = |value:impl Into<String>|vec![value.into()])
22636    )]
22637    pub keywords: Option<Vec<String>>,
22638    ///Property: Language
22639    #[serde(skip_serializing_if = "Option::is_none")]
22640    #[cfg_attr(
22641        feature = "builder",
22642        builder(with = |value:impl Into<String>|vec![value.into()])
22643    )]
22644    pub language: Option<Vec<String>>,
22645    ///Property: Detected locations
22646    #[serde(skip_serializing_if = "Option::is_none")]
22647    #[cfg_attr(
22648        feature = "builder",
22649        builder(with = |value:impl Into<String>|vec![value.into()])
22650    )]
22651    pub location_mentioned: Option<Vec<String>>,
22652    ///Property: Message ID
22653    #[serde(skip_serializing_if = "Option::is_none")]
22654    #[cfg_attr(
22655        feature = "builder",
22656        builder(with = |value:impl Into<String>|vec![value.into()])
22657    )]
22658    pub message_id: Option<Vec<String>>,
22659    ///Property: MIME type
22660    #[serde(skip_serializing_if = "Option::is_none")]
22661    #[cfg_attr(
22662        feature = "builder",
22663        builder(with = |value:impl Into<String>|vec![value.into()])
22664    )]
22665    pub mime_type: Option<Vec<String>>,
22666    ///Property: Modified on
22667    #[serde(skip_serializing_if = "Option::is_none")]
22668    #[cfg_attr(
22669        feature = "builder",
22670        builder(with = |value:impl Into<String>|vec![value.into()])
22671    )]
22672    pub modified_at: Option<Vec<String>>,
22673    ///Property: Name
22674    #[serde(default)]
22675    #[cfg_attr(
22676        feature = "builder",
22677        builder(with = |value:impl Into<String>|vec![value.into()])
22678    )]
22679    pub name: Vec<String>,
22680    ///Property: Detected names
22681    #[serde(skip_serializing_if = "Option::is_none")]
22682    #[cfg_attr(
22683        feature = "builder",
22684        builder(with = |value:impl Into<String>|vec![value.into()])
22685    )]
22686    pub names_mentioned: Option<Vec<String>>,
22687    ///Property: Notes
22688    #[serde(skip_serializing_if = "Option::is_none")]
22689    #[cfg_attr(
22690        feature = "builder",
22691        builder(with = |value:impl Into<String>|vec![value.into()])
22692    )]
22693    pub notes: Option<Vec<String>>,
22694    ///Property: Folder
22695    #[serde(skip_serializing_if = "Option::is_none")]
22696    #[cfg_attr(
22697        feature = "builder",
22698        builder(with = |value:impl Into<String>|vec![value.into()])
22699    )]
22700    pub parent: Option<Vec<String>>,
22701    ///Property: Detected people
22702    #[serde(skip_serializing_if = "Option::is_none")]
22703    #[cfg_attr(
22704        feature = "builder",
22705        builder(with = |value:impl Into<String>|vec![value.into()])
22706    )]
22707    pub people_mentioned: Option<Vec<String>>,
22708    ///Property: Detected phones
22709    #[serde(skip_serializing_if = "Option::is_none")]
22710    #[cfg_attr(
22711        feature = "builder",
22712        builder(with = |value:impl Into<String>|vec![value.into()])
22713    )]
22714    pub phone_mentioned: Option<Vec<String>>,
22715    ///Property: Previous name
22716    #[serde(skip_serializing_if = "Option::is_none")]
22717    #[cfg_attr(
22718        feature = "builder",
22719        builder(with = |value:impl Into<String>|vec![value.into()])
22720    )]
22721    pub previous_name: Option<Vec<String>>,
22722    ///Property: Processed at
22723    #[serde(skip_serializing_if = "Option::is_none")]
22724    #[cfg_attr(
22725        feature = "builder",
22726        builder(with = |value:impl Into<String>|vec![value.into()])
22727    )]
22728    pub processed_at: Option<Vec<String>>,
22729    ///Property: Processing agent
22730    #[serde(skip_serializing_if = "Option::is_none")]
22731    #[cfg_attr(
22732        feature = "builder",
22733        builder(with = |value:impl Into<String>|vec![value.into()])
22734    )]
22735    pub processing_agent: Option<Vec<String>>,
22736    ///Property: Processing error
22737    #[serde(skip_serializing_if = "Option::is_none")]
22738    #[cfg_attr(
22739        feature = "builder",
22740        builder(with = |value:impl Into<String>|vec![value.into()])
22741    )]
22742    pub processing_error: Option<Vec<String>>,
22743    ///Property: Processing status
22744    #[serde(skip_serializing_if = "Option::is_none")]
22745    #[cfg_attr(
22746        feature = "builder",
22747        builder(with = |value:impl Into<String>|vec![value.into()])
22748    )]
22749    pub processing_status: Option<Vec<String>>,
22750    ///Property: Program
22751    #[serde(skip_serializing_if = "Option::is_none")]
22752    #[cfg_attr(
22753        feature = "builder",
22754        builder(with = |value:impl Into<String>|vec![value.into()])
22755    )]
22756    pub program: Option<Vec<String>>,
22757    ///Property: Program ID
22758    #[serde(skip_serializing_if = "Option::is_none")]
22759    #[cfg_attr(
22760        feature = "builder",
22761        builder(with = |value:impl Into<String>|vec![value.into()])
22762    )]
22763    pub program_id: Option<Vec<String>>,
22764    ///Property: Source document
22765    #[serde(skip_serializing_if = "Option::is_none")]
22766    #[cfg_attr(
22767        feature = "builder",
22768        builder(with = |value:impl Into<String>|vec![value.into()])
22769    )]
22770    pub proof: Option<Vec<String>>,
22771    ///Property: Published on
22772    #[serde(skip_serializing_if = "Option::is_none")]
22773    #[cfg_attr(
22774        feature = "builder",
22775        builder(with = |value:impl Into<String>|vec![value.into()])
22776    )]
22777    pub published_at: Option<Vec<String>>,
22778    ///Property: Publishing source
22779    #[serde(skip_serializing_if = "Option::is_none")]
22780    #[cfg_attr(
22781        feature = "builder",
22782        builder(with = |value:impl Into<String>|vec![value.into()])
22783    )]
22784    pub publisher: Option<Vec<String>>,
22785    ///Property: Publishing source URL
22786    #[serde(skip_serializing_if = "Option::is_none")]
22787    #[cfg_attr(
22788        feature = "builder",
22789        builder(with = |value:impl Into<String>|vec![value.into()])
22790    )]
22791    pub publisher_url: Option<Vec<String>>,
22792    ///Property: Retrieved on
22793    #[serde(skip_serializing_if = "Option::is_none")]
22794    #[cfg_attr(
22795        feature = "builder",
22796        builder(with = |value:impl Into<String>|vec![value.into()])
22797    )]
22798    pub retrieved_at: Option<Vec<String>>,
22799    ///Property: Source link
22800    #[serde(skip_serializing_if = "Option::is_none")]
22801    #[cfg_attr(
22802        feature = "builder",
22803        builder(with = |value:impl Into<String>|vec![value.into()])
22804    )]
22805    pub source_url: Option<Vec<String>>,
22806    ///Property: Summary
22807    #[serde(skip_serializing_if = "Option::is_none")]
22808    #[cfg_attr(
22809        feature = "builder",
22810        builder(with = |value:impl Into<String>|vec![value.into()])
22811    )]
22812    pub summary: Option<Vec<String>>,
22813    ///Property: Title
22814    #[serde(skip_serializing_if = "Option::is_none")]
22815    #[cfg_attr(
22816        feature = "builder",
22817        builder(with = |value:impl Into<String>|vec![value.into()])
22818    )]
22819    pub title: Option<Vec<String>>,
22820    ///Property: Topics
22821    #[serde(skip_serializing_if = "Option::is_none")]
22822    #[cfg_attr(
22823        feature = "builder",
22824        builder(with = |value:impl Into<String>|vec![value.into()])
22825    )]
22826    pub topics: Option<Vec<String>>,
22827    ///Property: The language of the translated text
22828    #[serde(skip_serializing_if = "Option::is_none")]
22829    #[cfg_attr(
22830        feature = "builder",
22831        builder(with = |value:impl Into<String>|vec![value.into()])
22832    )]
22833    pub translated_language: Option<Vec<String>>,
22834    ///Property: Translated version of the body text
22835    #[serde(skip_serializing_if = "Option::is_none")]
22836    #[cfg_attr(
22837        feature = "builder",
22838        builder(with = |value:impl Into<String>|vec![value.into()])
22839    )]
22840    pub translated_text: Option<Vec<String>>,
22841    ///Property: Weak alias
22842    #[serde(skip_serializing_if = "Option::is_none")]
22843    #[cfg_attr(
22844        feature = "builder",
22845        builder(with = |value:impl Into<String>|vec![value.into()])
22846    )]
22847    pub weak_alias: Option<Vec<String>>,
22848    ///Property: Wikidata ID
22849    #[serde(skip_serializing_if = "Option::is_none")]
22850    #[cfg_attr(
22851        feature = "builder",
22852        builder(with = |value:impl Into<String>|vec![value.into()])
22853    )]
22854    pub wikidata_id: Option<Vec<String>>,
22855    ///Property: Wikipedia Article
22856    #[serde(skip_serializing_if = "Option::is_none")]
22857    #[cfg_attr(
22858        feature = "builder",
22859        builder(with = |value:impl Into<String>|vec![value.into()])
22860    )]
22861    pub wikipedia_url: Option<Vec<String>>,
22862}
22863impl Workbook {
22864    /// Create a new entity with the given ID
22865    #[deprecated(note = "Use the builder() method instead to ensure required fields are set")]
22866    pub fn new(id: impl Into<String>) -> Self {
22867        Self {
22868            id: id.into(),
22869            schema: "Workbook".to_string(),
22870            address: None,
22871            address_entity: None,
22872            aleph_url: None,
22873            alias: None,
22874            ancestors: None,
22875            author: None,
22876            authored_at: None,
22877            body_text: None,
22878            companies_mentioned: None,
22879            content_hash: None,
22880            country: None,
22881            crawler: None,
22882            created_at: None,
22883            date: None,
22884            description: None,
22885            detected_country: None,
22886            detected_language: None,
22887            email_mentioned: None,
22888            encoding: None,
22889            extension: None,
22890            file_name: Vec::new(),
22891            file_size: None,
22892            generator: None,
22893            iban_mentioned: None,
22894            index_text: None,
22895            ip_mentioned: None,
22896            keywords: None,
22897            language: None,
22898            location_mentioned: None,
22899            message_id: None,
22900            mime_type: None,
22901            modified_at: None,
22902            name: Vec::new(),
22903            names_mentioned: None,
22904            notes: None,
22905            parent: None,
22906            people_mentioned: None,
22907            phone_mentioned: None,
22908            previous_name: None,
22909            processed_at: None,
22910            processing_agent: None,
22911            processing_error: None,
22912            processing_status: None,
22913            program: None,
22914            program_id: None,
22915            proof: None,
22916            published_at: None,
22917            publisher: None,
22918            publisher_url: None,
22919            retrieved_at: None,
22920            source_url: None,
22921            summary: None,
22922            title: None,
22923            topics: None,
22924            translated_language: None,
22925            translated_text: None,
22926            weak_alias: None,
22927            wikidata_id: None,
22928            wikipedia_url: None,
22929        }
22930    }
22931    /// Get the schema name
22932    pub fn schema_name() -> &'static str {
22933        "Workbook"
22934    }
22935    /// Serialize to standard FTM nested JSON format
22936    ///
22937    /// Produces `{"id": "...", "schema": "...", "properties": {...}}`
22938    pub fn to_ftm_json(&self) -> Result<String, serde_json::Error> {
22939        let mut value = serde_json::to_value(self)?;
22940        if let Some(obj) = value.as_object_mut() {
22941            let id = obj.remove("id");
22942            let schema = obj.remove("schema");
22943            let properties = serde_json::Value::Object(std::mem::take(obj));
22944            if let Some(id) = id {
22945                obj.insert("id".into(), id);
22946            }
22947            if let Some(schema) = schema {
22948                obj.insert("schema".into(), schema);
22949            }
22950            obj.insert("properties".into(), properties);
22951        }
22952        serde_json::to_string(&value)
22953    }
22954}