1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
use crate::create_new::CreateNew;
use crate::fillable::{Fillable, Filler};
use crate::SchemaExample;
use df_st_derive::{Fillable, Filler, HashAndPartialEqById};
use juniper::GraphQLObject;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

/// An historical event that happened at some point in the world.
/// This is (usually are large) list of things that happened.
#[derive(
    Serialize,
    Deserialize,
    Clone,
    Debug,
    HashAndPartialEqById,
    Fillable,
    Filler,
    Default,
    JsonSchema,
    GraphQLObject,
)]
pub struct HistoricalEvent {
    /// Identifier for the historical event.
    /// `id` must be unique for the whole world.
    pub id: i32,
    #[serde(rename = "type")]
    pub type_: Option<String>,
    pub year: Option<i32>, // TODO Date
    pub seconds72: Option<i32>,

    // All others are optional
    // legends
    /// The attacking squad in squad vs squad
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub a_hf_ids: Vec<i32>,
    /// The attacking leader in squad vs squad
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub a_leader_hf_id: Option<i32>,
    /// The attacking leaders role? in squad vs squad
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub a_leadership_roll: Option<i32>,
    /// The attacking squad in squad vs squad
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub a_squad_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub a_support_merc_en_id: Option<i32>,
    /// The attacking side tactician (commander) in tactical situations
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub a_tactician_hf_id: Option<i32>,
    /// Used in tactical situations
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub a_tactics_roll: Option<i32>,
    /// In a `site died` type, define if the site is abandoned afterwards.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub abandoned: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub account_shift: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub acquirer_en_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub acquirer_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub action: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub actor_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub agreement_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub allotment: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub allotment_index: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub ally_defense_bonus: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub appointer_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub arresting_en_id: Option<i32>,
    /// In a `masterpiece_created_item_improvement` type, id to `art_image_chunk` (not in legends).
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub art_id: Option<i32>,
    /// In a `masterpiece_created_item_improvement` type,
    /// id to `art_image` (together with `art_id`) (not in legends).
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub art_sub_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub artifact_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub attacker_civ_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub attacker_general_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub attacker_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub attacker_merc_en_id: Option<i32>,
    // legends_plus
    #[serde(skip_serializing_if = "Option::is_none")]
    pub abuse_type: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub anon_3: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub anon_4: Option<i32>,

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub body_state: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub builder_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub building_profile_id: Option<i32>,
    // legends_plus
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub bodies_hf_id: Vec<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub body_part: Option<i32>,
    /// In a `masterpiece_created_arch_construct` type, ??.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub building_custom: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub building_type: Option<String>, // TODO check type
    #[serde(skip_serializing_if = "Option::is_none")]
    pub building_subtype: Option<String>, // TODO check type

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub changee_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub changer_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub circumstance: Option<String>, // some kind of type "historical event collection"
    #[serde(skip_serializing_if = "Option::is_none")]
    pub circumstance_id: Option<i32>, // ID for that type "565" -> `historical_event_collection_id`
    #[serde(skip_serializing_if = "Option::is_none")]
    pub civ_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub civ_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub claim: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub coconspirator_bonus: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub coconspirator_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub competitor_hf_id: Vec<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub confessed_after_apb_arrest_en_id: Option<i32>,
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub conspirator_hf_id: Vec<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub contact_hf_id: Option<i32>,
    /// In a `first contact` type event, the side that got contacted (not initiator).
    /// See `contactor_en_id` for the initiator.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub contacted_en_id: Option<i32>,
    /// In a `first contact` type event, the side that initiated the contact.
    /// See `contacted_en_id` for the side that was contacted.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub contactor_en_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub convict_is_contact: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub convicted_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub convicter_en_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub coord: Option<String>, // Change to Coordinate, depends on legends.xml
    #[serde(skip_serializing_if = "Option::is_none")]
    pub corrupt_convicter_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub corruptor_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub corruptor_identity: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub corruptor_seen_as: Option<String>,
    /// In a `masterpiece_lost` type,
    /// the historical event when the masterpiece was created.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub creation_he_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub creator_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub crime: Option<String>,
    // legends_plus
    #[serde(skip_serializing_if = "Option::is_none")]
    pub caste: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub circumstance_obj: Option<HECircumstance>, // similar to `circumstance`
    #[serde(skip_serializing_if = "Option::is_none")]
    pub creator_unit_id: Option<i32>, // Value = -1

    // legends
    /// The ?? on the defending side in squad vs squad
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub d_effect: Option<i32>,
    /// The defending figures of the squad in squad vs squad
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub d_hf_ids: Vec<i32>,
    /// The ?? on the defending side in squad vs squad
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub d_interaction: Option<i32>,
    /// The ?? on the defending side in squad vs squad
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub d_number: Option<i32>,
    /// The ?? on the defending side in squad vs squad
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub d_race: Option<i32>,
    /// The amount?? of killed members on the defending side in squad vs squad
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub d_slain: Option<i32>,
    /// The defending squad in squad vs squad
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub d_squad_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub d_support_merc_en_id: Option<i32>,
    /// The defending side tactician (commander) in tactical situations
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub d_tactician_hf_id: Option<i32>,
    /// Used in tactical situations
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub d_tactics_roll: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub death_penalty: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub defender_civ_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub defender_general_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub defender_merc_en_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub delegated: Option<bool>,
    /// The depot of entity where the merchant traded with?
    /// Used in merchant events.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub depot_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub dest_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub dest_site_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub dest_structure_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub destroyed_structure_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub destroyer_en_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub detected: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub did_not_reveal_all_in_interrogation: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub disturbance: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub dispute: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub doer_hf_id: Option<i32>,
    // legends_plus
    #[serde(skip_serializing_if = "Option::is_none")]
    pub death_cause: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub destination: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub doer: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub dye_mat: Option<String>, // TODO check type
    #[serde(skip_serializing_if = "Option::is_none")]
    pub dye_mat_index: Option<i32>, // TODO check type
    #[serde(skip_serializing_if = "Option::is_none")]
    pub dye_mat_type: Option<i32>, // TODO check type

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub enslaved_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub entity_id_1: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub entity_id_2: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub exiled: Option<bool>,
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub expelled_creature: Vec<i32>, // What does this link to?
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub expelled_hf_id: Vec<i32>,
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub expelled_number: Vec<i32>,
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub expelled_pop_id: Vec<i32>,
    // legends_plus
    #[serde(skip_serializing_if = "Option::is_none")]
    pub eater_hf_id: Option<i32>,

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub failed_judgment_test: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub feature_layer_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub first: Option<bool>,
    /// In a `entity fled site` type event, the civilization id that is going away??
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub fled_civ_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub fooled_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub form_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub framer_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub from_original: Option<bool>,

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub gambler_hf_id: Option<i32>,
    /// The name of the ghost? type of ghost?
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub ghost: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub giver_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub giver_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub group_1_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub group_2_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub group_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub groups_hf_id: Vec<i32>,

    /// In a `merchant` type event, ??
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hardship: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub held_firm_in_interrogation: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hf_rep_1_of_2: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hf_rep_2_of_1: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hf_id1: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hf_id2: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hf_id_target: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub honor_id: Option<i32>,

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub identity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub identity_id1: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub identity_id2: Option<i32>,
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub implicated_hf_id: Vec<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub inherited: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub initiating_en_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub instigator_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub interaction: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub interrogator_hf_id: Option<i32>,
    // legends_plus
    #[serde(skip_serializing_if = "Option::is_none")]
    pub identity_caste: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub identity_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub identity_name: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub identity_nemesis_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub identity_race: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub imp_mat: Option<String>, // TODO check type
    #[serde(skip_serializing_if = "Option::is_none")]
    pub imp_mat_index: Option<i32>, // TODO check type
    #[serde(skip_serializing_if = "Option::is_none")]
    pub imp_mat_type: Option<i32>, // TODO check type
    /// The subtype of the item that was improved
    /// in `masterpiece_created_item_improvement` type event
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub improvement_subtype: Option<String>,
    /// Updated in v0.2.0 from `i32` to `String`
    /// ( Updated in "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub improvement_type: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub injury_type: Option<String>,
    // pub interaction_id: Option<i32>, // Not used at the moment
    #[serde(skip_serializing_if = "Option::is_none")]
    pub interaction_action: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub interaction_string: Option<String>,
    /// The id of the item? Same as `item`?
    /// ID seems to large to refer to artifact id.
    /// Occurs in `masterpiece_created_item` type events
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub item_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub item_mat: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub item_subtype: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub item_type: Option<String>,

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub join_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub joined_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub joiner_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub joining_en_id: Vec<i32>,

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub knowledge: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub last_owner_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub law_add: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub law_remove: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub leader_hf_id: Option<i32>,
    /// A civilization leaving a site in "spotted leaving site"
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub leaver_civ_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub link: Option<String>,
    /// In a `merchant` type event, define if the merchant lost valuables?
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub lost_value: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub lure_hf_id: Option<i32>,
    // legends_plus
    #[serde(skip_serializing_if = "Option::is_none")]
    pub link_type: Option<String>,

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub master_wc_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub method: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub modification: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub modifier_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mood: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub moved_to_site_id: Option<i32>,
    // legends_plus
    /// In a `masterpiece_created_arch_construct` type event, define the maker of the masterpiece.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub maker_hf_id: Option<i32>,
    /// In a `masterpiece_created_arch_construct` type event,
    /// define the entity of the maker that created the masterpiece.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub maker_en_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mat: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mat_type: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mat_index: Option<i32>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub name_only: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub new_ab_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub new_account: Option<i32>,
    /// In a `artifact transformed` type event, the id of the new artifact.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub new_artifact_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub new_caste: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub new_equipment_level: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub new_leader_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub new_race_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub new_site_civ_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub new_job: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub new_structure_id: Option<i32>,
    /// In a `plundered site` type event ??.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub no_defeat_mention: Option<bool>,
    /// On a `hf convicted` type event it tells us that there is no
    /// prison empty for the new criminal.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub no_prison_available: Option<bool>,

    /// Used by `hf_relationship` and others.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub occasion_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub old_ab_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub old_account: Option<i32>,
    /// In a `artifact transformed` type event, the id of the old artifact.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub old_artifact_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub old_caste: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub old_job: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub old_race_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub old_structure_id: Option<i32>,
    /// In a `insurrection started` type event, the outcome of the insurrection.
    /// Example value: "population gone"
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub outcome: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub overthrown_hf_id: Option<i32>,

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub partial_incorporation: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub payer_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub payer_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub persecutor_en_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub persecutor_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub plotter_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub pop_fl_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub pop_number_moved: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub pop_race: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub pop_sr_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub pos_taker_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub position_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub position_profile_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub prison_months: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub production_zone_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub promise_to_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub property_confiscated_from_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub purchased_unowned: Option<bool>,
    // legends_plus
    #[serde(skip_serializing_if = "Option::is_none")]
    pub part_lost: Option<bool>,
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub pets: Vec<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub pile_type: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub position: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub props_item_mat: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub props_item_mat_index: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub props_item_mat_type: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub props_item_subtype: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub props_item_type: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub props_pile_type: Option<i32>,

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub quality: Option<i32>,
    /// In a `entity rampaged in site` type event ??.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub rampage_civ_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub ransomed_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub ransomer_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub reason: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub reason_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub rebuilt_ruined: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub receiver_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub receiver_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub relationship: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub relevant_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub relevant_id_for_method: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub relevant_position_profile_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub religion_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub resident_civ_id: Option<i32>,
    /// In a `entity searched site` type event the result of the site searched.
    /// Example: "found nothing"
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub result: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(rename = "return")]
    pub return_: Option<bool>,
    // legends_plus
    #[serde(skip_serializing_if = "Option::is_none")]
    pub race_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub reason_obj: Option<HEReason>, // TODO in lua. This can be an object and a value
    #[serde(skip_serializing_if = "Option::is_none")]
    pub rebuild: Option<bool>, // See rebuilt
    #[serde(skip_serializing_if = "Option::is_none")]
    pub region_id: Option<i32>,

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub saboteur_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub schedule_id: Option<i32>,
    /// In a `entity searched site` type event the civilization id that searched the site.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub searcher_civ_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub season: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub secret_goal: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub seeker_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub seller_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub shrine_amount_destroyed: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub site_civ_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub site_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub site_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub site_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub site_id_1: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub site_id_2: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub site_property_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub situation: Option<String>,
    /// The skill of the `hf_id` at the time of creating this masterpiece?
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub skill_at_time: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub slayer_caste: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub slayer_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub slayer_item_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub slayer_race: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub slayer_shooter_item_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub snatcher_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub source_entity_id: Option<i32>,
    /// The `hf_id` in a `hf_relationship` type event
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub source_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub source_site_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub source_structure_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub speaker_hf_id: Option<i32>,
    /// A civilization leaving a site was spotted by this
    /// historical figure in "spotted leaving site".
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub spotter_hf_id: Option<i32>,
    /// Start of a tactical situations
    /// If `false` it denotes an ongoing tactical situation.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub start: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub state: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub structure_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub student_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub subregion_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub subtype: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub successful: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub surveiled_coconspirator: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub surveiled_contact: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub surveiled_convicted: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub surveiled_target: Option<bool>,
    // legends_plus
    #[serde(skip_serializing_if = "Option::is_none")]
    pub sanctify_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub secret_text: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub shooter_artifact_id: Option<i32>, // TODO check type
    #[serde(skip_serializing_if = "Option::is_none")]
    pub shooter_item: Option<String>, // TODO check type
    #[serde(skip_serializing_if = "Option::is_none")]
    pub shooter_item_subtype: Option<String>, // TODO check type
    #[serde(skip_serializing_if = "Option::is_none")]
    pub shooter_item_type: Option<String>, // TODO check type
    #[serde(skip_serializing_if = "Option::is_none")]
    pub shooter_mat: Option<String>, // TODO check type (shooter_mattype)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub source: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stash_site_id: Option<i32>,

    // legends
    /// In a `insurrection started` type event,
    /// the civilization that is targeted.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub target_civ_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub target_en_id: Option<i32>,
    /// Used in `hf_relationship` event and others.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub target_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub target_identity: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub target_seen_as: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub teacher_hf_id: Option<i32>,
    /// In a `plundered site` type event, define if the attacker took items with them.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub took_items: Option<bool>,
    /// In a `plundered site` type event, define if the attacker took animals with them.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub took_livestock: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub top_facet: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub top_facet_modifier: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub top_facet_rating: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub top_relationship_factor: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub top_relationship_modifier: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub top_relationship_rating: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub top_value: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub top_value_modifier: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub top_value_rating: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub topic: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub trader_entity_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub trader_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub trickster_hf_id: Option<i32>,
    // legends_plus
    #[serde(skip_serializing_if = "Option::is_none")]
    pub theft_method: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tree: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub trickster: Option<i32>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub unit_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub unit_type: Option<String>,
    /// In a `reclaim site` type event, define if the site is being unretired or never was retired.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub unretire: Option<bool>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub victim: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub victim_entity: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub victim_hf_id: Option<i32>,

    // legends
    #[serde(skip_serializing_if = "Option::is_none")]
    pub wanted_and_recognized: Option<bool>,
    /// In a `plundered site` type event, ??.
    /// ( Since = "0.2.0" )
    #[serde(skip_serializing_if = "Option::is_none")]
    pub was_raid: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub was_torture: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub wc_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub winner_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub woundee_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub wounder_hf_id: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub wrongful_conviction: Option<bool>,
    // legends_plus
    #[serde(skip_serializing_if = "Option::is_none")]
    pub woundee_caste: Option<i32>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub woundee_race: Option<i32>,
}

#[derive(
    Serialize, Deserialize, Clone, Debug, Fillable, Filler, Default, JsonSchema, GraphQLObject,
)]
pub struct HECircumstance {
    #[serde(rename = "type")]
    pub type_: Option<String>,
    pub death: Option<i32>,
    pub prayer: Option<i32>,
    pub dream_about: Option<i32>,
    pub defeated: Option<i32>,
    pub murdered: Option<i32>,
    pub hec_id: Option<i32>,
}

#[derive(
    Serialize, Deserialize, Clone, Debug, Fillable, Filler, Default, JsonSchema, GraphQLObject,
)]
pub struct HEReason {
    #[serde(rename = "type")]
    pub type_: Option<String>,
    pub glorify_hf_id: Option<i32>,
    pub artifact_is_heirloom_of_family_hf_id: Option<i32>,
    pub artifact_is_symbol_of_entity_position: Option<i32>,
}

impl PartialEq for HECircumstance {
    fn eq(&self, other: &Self) -> bool {
        self.type_ == other.type_
    }
}

impl std::hash::Hash for HECircumstance {
    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
        self.type_.hash(state);
    }
}

impl PartialEq for HEReason {
    fn eq(&self, other: &Self) -> bool {
        self.type_ == other.type_
    }
}

impl std::hash::Hash for HEReason {
    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
        self.type_.hash(state);
    }
}

impl HistoricalEvent {
    pub fn new() -> Self {
        Self::default()
    }
}

impl CreateNew for HistoricalEvent {
    fn new_by_id(id: i32) -> Self {
        Self {
            id,
            ..Default::default()
        }
    }
}

impl SchemaExample for HistoricalEvent {
    fn example() -> Self {
        Self::default()
    }
}

impl HECircumstance {
    pub fn new() -> Self {
        Self::default()
    }
}

impl SchemaExample for HECircumstance {
    fn example() -> Self {
        Self::default()
    }
}

impl HEReason {
    pub fn new() -> Self {
        Self::default()
    }
}

impl SchemaExample for HEReason {
    fn example() -> Self {
        Self::default()
    }
}