refix-fix44 0.12.0

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

use refix_message::{
    Date, Decimal, Instances, InvalidValue, LazyKnownTags, MultipleValues, RawMessage, Tag,
    UtcTimestamp,
};

use super::super::components::{
    CommissionData, ContAmtGrp, ContraGrp, DiscretionInstructions, FinancingDetails, Header,
    InstrmtLegExecGrp, Instrument, MiscFeesGrp, OrderQtyData, Parties, PegInstructions,
    SpreadOrBenchmarkCurveData, Stipulations, Trailer, UndInstrmtGrp, YieldData,
};
use super::super::enums::{
    AccountType, AcctIDSource, BookingType, BookingUnit, CancellationRights, CashMargin,
    ClearingFeeIndicator, CrossType, CustOrderCapacity, DayBookingInst, ExecInst, ExecPriceType,
    ExecRestatementReason, ExecType, GTBookingInst, HandlInst, LastCapacity, LastLiquidityInd,
    MoneyLaunderingStatus, MultiLegReportingType, OrdRejReason, OrdStatus, OrdType, OrderCapacity,
    OrderRestrictions, PositionEffect, PreallocMethod, PriceType, PriorityIndicator, QtyType,
    SettlCurrFxRateCalc, SettlType, Side, TargetStrategy, TimeInForce,
};

/// The `ExecutionReport` (35=8) message.
pub struct ExecutionReport(RawMessage);

impl ExecutionReport {
    pub const MSG_TYPE: &[u8] = b"8";

    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
        static TAGS: LazyKnownTags = LazyKnownTags::new(
            &[
                Tag(37), Tag(198), Tag(526), Tag(527), Tag(11), Tag(41), Tag(583), Tag(693),
                Tag(790), Tag(584), Tag(911), Tag(912), Tag(453), Tag(229), Tag(382), Tag(66),
                Tag(548), Tag(551), Tag(549), Tag(17), Tag(19), Tag(150), Tag(39), Tag(636),
                Tag(103), Tag(378), Tag(1), Tag(660), Tag(581), Tag(589), Tag(590), Tag(591),
                Tag(63), Tag(64), Tag(544), Tag(635), Tag(711), Tag(54), Tag(232), Tag(854),
                Tag(40), Tag(423), Tag(44), Tag(99), Tag(839), Tag(845), Tag(847), Tag(848),
                Tag(849), Tag(850), Tag(15), Tag(376), Tag(377), Tag(59), Tag(168), Tag(432),
                Tag(126), Tag(18), Tag(528), Tag(529), Tag(582), Tag(32), Tag(652), Tag(31),
                Tag(651), Tag(669), Tag(194), Tag(195), Tag(30), Tag(336), Tag(625), Tag(943),
                Tag(29), Tag(151), Tag(14), Tag(6), Tag(424), Tag(425), Tag(426), Tag(427), Tag(75),
                Tag(60), Tag(113), Tag(381), Tag(157), Tag(230), Tag(158), Tag(159), Tag(738),
                Tag(920), Tag(921), Tag(922), Tag(258), Tag(259), Tag(260), Tag(238), Tag(237),
                Tag(118), Tag(119), Tag(120), Tag(155), Tag(156), Tag(21), Tag(110), Tag(111),
                Tag(77), Tag(210), Tag(775), Tag(58), Tag(354), Tag(355), Tag(193), Tag(192),
                Tag(641), Tag(442), Tag(480), Tag(481), Tag(513), Tag(494), Tag(483), Tag(515),
                Tag(484), Tag(485), Tag(638), Tag(639), Tag(851), Tag(518), Tag(555), Tag(797),
                Tag(136),
            ],
            &[
                Header::known_tags(), Trailer::known_tags(), Parties::known_tags(),
                ContraGrp::known_tags(), Instrument::known_tags(), FinancingDetails::known_tags(),
                UndInstrmtGrp::known_tags(), Stipulations::known_tags(), OrderQtyData::known_tags(),
                PegInstructions::known_tags(), DiscretionInstructions::known_tags(),
                CommissionData::known_tags(), SpreadOrBenchmarkCurveData::known_tags(),
                YieldData::known_tags(), ContAmtGrp::known_tags(), InstrmtLegExecGrp::known_tags(),
                MiscFeesGrp::known_tags(),
            ],
        );
        &TAGS
    }

    pub fn from_raw(raw: RawMessage) -> Self {
        Self(raw)
    }

    pub fn raw(&self) -> &RawMessage {
        &self.0
    }

    pub fn header(&self) -> Header<'_> {
        Header(self.0.scope(), Self::known_tags().get())
    }

    pub fn trailer(&self) -> Trailer<'_> {
        Trailer(self.0.scope())
    }

    /// The `OrderID` (37) field.
    #[doc(alias = "OrderID")]
    pub fn order_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(37))
    }

    /// The `SecondaryOrderID` (198) field.
    #[doc(alias = "SecondaryOrderID")]
    pub fn secondary_order_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(198))
    }

    /// The `SecondaryClOrdID` (526) field.
    #[doc(alias = "SecondaryClOrdID")]
    pub fn secondary_cl_ord_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(526))
    }

    /// The `SecondaryExecID` (527) field.
    #[doc(alias = "SecondaryExecID")]
    pub fn secondary_exec_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(527))
    }

    /// The `ClOrdID` (11) field.
    #[doc(alias = "ClOrdID")]
    pub fn cl_ord_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(11))
    }

    /// The `OrigClOrdID` (41) field.
    #[doc(alias = "OrigClOrdID")]
    pub fn orig_cl_ord_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(41))
    }

    /// The `ClOrdLinkID` (583) field.
    #[doc(alias = "ClOrdLinkID")]
    pub fn cl_ord_link_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(583))
    }

    /// The `QuoteRespID` (693) field.
    #[doc(alias = "QuoteRespID")]
    pub fn quote_resp_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(693))
    }

    /// The `OrdStatusReqID` (790) field.
    #[doc(alias = "OrdStatusReqID")]
    pub fn ord_status_req_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(790))
    }

    /// The `MassStatusReqID` (584) field.
    #[doc(alias = "MassStatusReqID")]
    pub fn mass_status_req_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(584))
    }

    /// The `TotNumReports` (911) field.
    #[doc(alias = "TotNumReports")]
    pub fn tot_num_reports(&self) -> Result<Option<i64>, InvalidValue> {
        self.0.get_int(Tag(911))
    }

    /// The `LastRptRequested` (912) field.
    #[doc(alias = "LastRptRequested")]
    pub fn last_rpt_requested(&self) -> Result<Option<bool>, InvalidValue> {
        self.0.get_bool(Tag(912))
    }

    /// The instances of the `NoPartyIDs` (453) group.
    #[doc(alias = "NoPartyIDs")]
    pub fn party_ids(&self) -> Result<Instances<'_, Parties<'_>>, InvalidValue> {
        self.0.get_group(&Parties::TABLE, &Self::known_tags().get()).map(Instances::from)
    }

    /// The `TradeOriginationDate` (229) field.
    #[doc(alias = "TradeOriginationDate")]
    pub fn trade_origination_date(&self) -> Result<Option<Date>, InvalidValue> {
        self.0.get_date(Tag(229))
    }

    /// The instances of the `NoContraBrokers` (382) group.
    #[doc(alias = "NoContraBrokers")]
    pub fn contra_brokers(&self) -> Result<Instances<'_, ContraGrp<'_>>, InvalidValue> {
        self.0.get_group(&ContraGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
    }

    /// The `ListID` (66) field.
    #[doc(alias = "ListID")]
    pub fn list_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(66))
    }

    /// The `CrossID` (548) field.
    #[doc(alias = "CrossID")]
    pub fn cross_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(548))
    }

    /// The `OrigCrossID` (551) field.
    #[doc(alias = "OrigCrossID")]
    pub fn orig_cross_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(551))
    }

    /// The `CrossType` (549) field.
    #[doc(alias = "CrossType")]
    pub fn cross_type(&self) -> Result<Option<CrossType>, InvalidValue> {
        Ok(self.0.get_int(Tag(549))?.map(CrossType::from_value))
    }

    /// The `ExecID` (17) field.
    #[doc(alias = "ExecID")]
    pub fn exec_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(17))
    }

    /// The `ExecRefID` (19) field.
    #[doc(alias = "ExecRefID")]
    pub fn exec_ref_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(19))
    }

    /// The `ExecType` (150) field.
    #[doc(alias = "ExecType")]
    pub fn exec_type(&self) -> Result<Option<ExecType<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(150))?.map(ExecType::from_value))
    }

    /// The `OrdStatus` (39) field.
    #[doc(alias = "OrdStatus")]
    pub fn ord_status(&self) -> Result<Option<OrdStatus<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(39))?.map(OrdStatus::from_value))
    }

    /// The `WorkingIndicator` (636) field.
    #[doc(alias = "WorkingIndicator")]
    pub fn working_indicator(&self) -> Result<Option<bool>, InvalidValue> {
        self.0.get_bool(Tag(636))
    }

    /// The `OrdRejReason` (103) field.
    #[doc(alias = "OrdRejReason")]
    pub fn ord_rej_reason(&self) -> Result<Option<OrdRejReason>, InvalidValue> {
        Ok(self.0.get_int(Tag(103))?.map(OrdRejReason::from_value))
    }

    /// The `ExecRestatementReason` (378) field.
    #[doc(alias = "ExecRestatementReason")]
    pub fn exec_restatement_reason(&self) -> Result<Option<ExecRestatementReason>, InvalidValue> {
        Ok(self.0.get_int(Tag(378))?.map(ExecRestatementReason::from_value))
    }

    /// The `Account` (1) field.
    #[doc(alias = "Account")]
    pub fn account(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(1))
    }

    /// The `AcctIDSource` (660) field.
    #[doc(alias = "AcctIDSource")]
    pub fn acct_id_source(&self) -> Result<Option<AcctIDSource>, InvalidValue> {
        Ok(self.0.get_int(Tag(660))?.map(AcctIDSource::from_value))
    }

    /// The `AccountType` (581) field.
    #[doc(alias = "AccountType")]
    pub fn account_type(&self) -> Result<Option<AccountType>, InvalidValue> {
        Ok(self.0.get_int(Tag(581))?.map(AccountType::from_value))
    }

    /// The `DayBookingInst` (589) field.
    #[doc(alias = "DayBookingInst")]
    pub fn day_booking_inst(&self) -> Result<Option<DayBookingInst<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(589))?.map(DayBookingInst::from_value))
    }

    /// The `BookingUnit` (590) field.
    #[doc(alias = "BookingUnit")]
    pub fn booking_unit(&self) -> Result<Option<BookingUnit<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(590))?.map(BookingUnit::from_value))
    }

    /// The `PreallocMethod` (591) field.
    #[doc(alias = "PreallocMethod")]
    pub fn prealloc_method(&self) -> Result<Option<PreallocMethod<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(591))?.map(PreallocMethod::from_value))
    }

    /// The `SettlType` (63) field.
    #[doc(alias = "SettlType")]
    pub fn settl_type(&self) -> Result<Option<SettlType<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(63))?.map(SettlType::from_value))
    }

    /// The `SettlDate` (64) field.
    #[doc(alias = "SettlDate")]
    pub fn settl_date(&self) -> Result<Option<Date>, InvalidValue> {
        self.0.get_date(Tag(64))
    }

    /// The `CashMargin` (544) field.
    #[doc(alias = "CashMargin")]
    pub fn cash_margin(&self) -> Result<Option<CashMargin<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(544))?.map(CashMargin::from_value))
    }

    /// The `ClearingFeeIndicator` (635) field.
    #[doc(alias = "ClearingFeeIndicator")]
    pub fn clearing_fee_indicator(&self) -> Result<Option<ClearingFeeIndicator<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(635))?.map(ClearingFeeIndicator::from_value))
    }

    /// The `Instrument` component.
    pub fn instrument(&self) -> Instrument<'_> {
        Instrument(self.0.scope(), Self::known_tags().get())
    }

    /// The `FinancingDetails` component.
    pub fn financing_details(&self) -> FinancingDetails<'_> {
        FinancingDetails(self.0.scope())
    }

    /// The instances of the `NoUnderlyings` (711) group.
    #[doc(alias = "NoUnderlyings")]
    pub fn underlyings(&self) -> Result<Instances<'_, UndInstrmtGrp<'_>>, InvalidValue> {
        self.0.get_group(&UndInstrmtGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
    }

    /// The `Side` (54) field.
    #[doc(alias = "Side")]
    pub fn side(&self) -> Result<Option<Side<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(54))?.map(Side::from_value))
    }

    /// The instances of the `NoStipulations` (232) group.
    #[doc(alias = "NoStipulations")]
    pub fn stipulations(&self) -> Result<Instances<'_, Stipulations<'_>>, InvalidValue> {
        self.0.get_group(&Stipulations::TABLE, &Self::known_tags().get()).map(Instances::from)
    }

    /// The `QtyType` (854) field.
    #[doc(alias = "QtyType")]
    pub fn qty_type(&self) -> Result<Option<QtyType>, InvalidValue> {
        Ok(self.0.get_int(Tag(854))?.map(QtyType::from_value))
    }

    /// The `OrderQtyData` component.
    pub fn order_qty_data(&self) -> OrderQtyData<'_> {
        OrderQtyData(self.0.scope())
    }

    /// The `OrdType` (40) field.
    #[doc(alias = "OrdType")]
    pub fn ord_type(&self) -> Result<Option<OrdType<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(40))?.map(OrdType::from_value))
    }

    /// The `PriceType` (423) field.
    #[doc(alias = "PriceType")]
    pub fn price_type(&self) -> Result<Option<PriceType>, InvalidValue> {
        Ok(self.0.get_int(Tag(423))?.map(PriceType::from_value))
    }

    /// The `Price` (44) field.
    #[doc(alias = "Price")]
    pub fn price(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(44))
    }

    /// The `StopPx` (99) field.
    #[doc(alias = "StopPx")]
    pub fn stop_px(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(99))
    }

    /// The `PegInstructions` component.
    pub fn peg_instructions(&self) -> PegInstructions<'_> {
        PegInstructions(self.0.scope())
    }

    /// The `DiscretionInstructions` component.
    pub fn discretion_instructions(&self) -> DiscretionInstructions<'_> {
        DiscretionInstructions(self.0.scope())
    }

    /// The `PeggedPrice` (839) field.
    #[doc(alias = "PeggedPrice")]
    pub fn pegged_price(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(839))
    }

    /// The `DiscretionPrice` (845) field.
    #[doc(alias = "DiscretionPrice")]
    pub fn discretion_price(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(845))
    }

    /// The `TargetStrategy` (847) field.
    #[doc(alias = "TargetStrategy")]
    pub fn target_strategy(&self) -> Result<Option<TargetStrategy>, InvalidValue> {
        Ok(self.0.get_int(Tag(847))?.map(TargetStrategy::from_value))
    }

    /// The `TargetStrategyParameters` (848) field.
    #[doc(alias = "TargetStrategyParameters")]
    pub fn target_strategy_parameters(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(848))
    }

    /// The `ParticipationRate` (849) field.
    #[doc(alias = "ParticipationRate")]
    pub fn participation_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(849))
    }

    /// The `TargetStrategyPerformance` (850) field.
    #[doc(alias = "TargetStrategyPerformance")]
    pub fn target_strategy_performance(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(850))
    }

    /// The `Currency` (15) field.
    #[doc(alias = "Currency")]
    pub fn currency(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(15))
    }

    /// The `ComplianceID` (376) field.
    #[doc(alias = "ComplianceID")]
    pub fn compliance_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(376))
    }

    /// The `SolicitedFlag` (377) field.
    #[doc(alias = "SolicitedFlag")]
    pub fn solicited_flag(&self) -> Result<Option<bool>, InvalidValue> {
        self.0.get_bool(Tag(377))
    }

    /// The `TimeInForce` (59) field.
    #[doc(alias = "TimeInForce")]
    pub fn time_in_force(&self) -> Result<Option<TimeInForce<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(59))?.map(TimeInForce::from_value))
    }

    /// The `EffectiveTime` (168) field.
    #[doc(alias = "EffectiveTime")]
    pub fn effective_time(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
        self.0.get_utc_timestamp(Tag(168))
    }

    /// The `ExpireDate` (432) field.
    #[doc(alias = "ExpireDate")]
    pub fn expire_date(&self) -> Result<Option<Date>, InvalidValue> {
        self.0.get_date(Tag(432))
    }

    /// The `ExpireTime` (126) field.
    #[doc(alias = "ExpireTime")]
    pub fn expire_time(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
        self.0.get_utc_timestamp(Tag(126))
    }

    /// The `ExecInst` (18) field.
    #[doc(alias = "ExecInst")]
    pub fn exec_inst(&self) -> Result<Option<MultipleValues<'_, ExecInst<'_>>>, InvalidValue> {
        self.0.get_multiple_values(Tag(18))
    }

    /// The `OrderCapacity` (528) field.
    #[doc(alias = "OrderCapacity")]
    pub fn order_capacity(&self) -> Result<Option<OrderCapacity<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(528))?.map(OrderCapacity::from_value))
    }

    /// The `OrderRestrictions` (529) field.
    #[doc(alias = "OrderRestrictions")]
    pub fn order_restrictions(&self) -> Result<Option<MultipleValues<'_, OrderRestrictions<'_>>>, InvalidValue> {
        self.0.get_multiple_values(Tag(529))
    }

    /// The `CustOrderCapacity` (582) field.
    #[doc(alias = "CustOrderCapacity")]
    pub fn cust_order_capacity(&self) -> Result<Option<CustOrderCapacity>, InvalidValue> {
        Ok(self.0.get_int(Tag(582))?.map(CustOrderCapacity::from_value))
    }

    /// The `LastQty` (32) field.
    #[doc(alias = "LastQty")]
    pub fn last_qty(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(32))
    }

    /// The `UnderlyingLastQty` (652) field.
    #[doc(alias = "UnderlyingLastQty")]
    pub fn underlying_last_qty(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(652))
    }

    /// The `LastPx` (31) field.
    #[doc(alias = "LastPx")]
    pub fn last_px(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(31))
    }

    /// The `UnderlyingLastPx` (651) field.
    #[doc(alias = "UnderlyingLastPx")]
    pub fn underlying_last_px(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(651))
    }

    /// The `LastParPx` (669) field.
    #[doc(alias = "LastParPx")]
    pub fn last_par_px(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(669))
    }

    /// The `LastSpotRate` (194) field.
    #[doc(alias = "LastSpotRate")]
    pub fn last_spot_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(194))
    }

    /// The `LastForwardPoints` (195) field.
    #[doc(alias = "LastForwardPoints")]
    pub fn last_forward_points(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(195))
    }

    /// The `LastMkt` (30) field.
    #[doc(alias = "LastMkt")]
    pub fn last_mkt(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(30))
    }

    /// The `TradingSessionID` (336) field.
    #[doc(alias = "TradingSessionID")]
    pub fn trading_session_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(336))
    }

    /// The `TradingSessionSubID` (625) field.
    #[doc(alias = "TradingSessionSubID")]
    pub fn trading_session_sub_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(625))
    }

    /// The `TimeBracket` (943) field.
    #[doc(alias = "TimeBracket")]
    pub fn time_bracket(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(943))
    }

    /// The `LastCapacity` (29) field.
    #[doc(alias = "LastCapacity")]
    pub fn last_capacity(&self) -> Result<Option<LastCapacity<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(29))?.map(LastCapacity::from_value))
    }

    /// The `LeavesQty` (151) field.
    #[doc(alias = "LeavesQty")]
    pub fn leaves_qty(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(151))
    }

    /// The `CumQty` (14) field.
    #[doc(alias = "CumQty")]
    pub fn cum_qty(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(14))
    }

    /// The `AvgPx` (6) field.
    #[doc(alias = "AvgPx")]
    pub fn avg_px(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(6))
    }

    /// The `DayOrderQty` (424) field.
    #[doc(alias = "DayOrderQty")]
    pub fn day_order_qty(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(424))
    }

    /// The `DayCumQty` (425) field.
    #[doc(alias = "DayCumQty")]
    pub fn day_cum_qty(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(425))
    }

    /// The `DayAvgPx` (426) field.
    #[doc(alias = "DayAvgPx")]
    pub fn day_avg_px(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(426))
    }

    /// The `GTBookingInst` (427) field.
    #[doc(alias = "GTBookingInst")]
    pub fn gt_booking_inst(&self) -> Result<Option<GTBookingInst>, InvalidValue> {
        Ok(self.0.get_int(Tag(427))?.map(GTBookingInst::from_value))
    }

    /// The `TradeDate` (75) field.
    #[doc(alias = "TradeDate")]
    pub fn trade_date(&self) -> Result<Option<Date>, InvalidValue> {
        self.0.get_date(Tag(75))
    }

    /// The `TransactTime` (60) field.
    #[doc(alias = "TransactTime")]
    pub fn transact_time(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
        self.0.get_utc_timestamp(Tag(60))
    }

    /// The `ReportToExch` (113) field.
    #[doc(alias = "ReportToExch")]
    pub fn report_to_exch(&self) -> Result<Option<bool>, InvalidValue> {
        self.0.get_bool(Tag(113))
    }

    /// The `CommissionData` component.
    pub fn commission_data(&self) -> CommissionData<'_> {
        CommissionData(self.0.scope())
    }

    /// The `SpreadOrBenchmarkCurveData` component.
    pub fn spread_or_benchmark_curve_data(&self) -> SpreadOrBenchmarkCurveData<'_> {
        SpreadOrBenchmarkCurveData(self.0.scope())
    }

    /// The `YieldData` component.
    pub fn yield_data(&self) -> YieldData<'_> {
        YieldData(self.0.scope())
    }

    /// The `GrossTradeAmt` (381) field.
    #[doc(alias = "GrossTradeAmt")]
    pub fn gross_trade_amt(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(381))
    }

    /// The `NumDaysInterest` (157) field.
    #[doc(alias = "NumDaysInterest")]
    pub fn num_days_interest(&self) -> Result<Option<i64>, InvalidValue> {
        self.0.get_int(Tag(157))
    }

    /// The `ExDate` (230) field.
    #[doc(alias = "ExDate")]
    pub fn ex_date(&self) -> Result<Option<Date>, InvalidValue> {
        self.0.get_date(Tag(230))
    }

    /// The `AccruedInterestRate` (158) field.
    #[doc(alias = "AccruedInterestRate")]
    pub fn accrued_interest_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(158))
    }

    /// The `AccruedInterestAmt` (159) field.
    #[doc(alias = "AccruedInterestAmt")]
    pub fn accrued_interest_amt(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(159))
    }

    /// The `InterestAtMaturity` (738) field.
    #[doc(alias = "InterestAtMaturity")]
    pub fn interest_at_maturity(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(738))
    }

    /// The `EndAccruedInterestAmt` (920) field.
    #[doc(alias = "EndAccruedInterestAmt")]
    pub fn end_accrued_interest_amt(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(920))
    }

    /// The `StartCash` (921) field.
    #[doc(alias = "StartCash")]
    pub fn start_cash(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(921))
    }

    /// The `EndCash` (922) field.
    #[doc(alias = "EndCash")]
    pub fn end_cash(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(922))
    }

    /// The `TradedFlatSwitch` (258) field.
    #[doc(alias = "TradedFlatSwitch")]
    pub fn traded_flat_switch(&self) -> Result<Option<bool>, InvalidValue> {
        self.0.get_bool(Tag(258))
    }

    /// The `BasisFeatureDate` (259) field.
    #[doc(alias = "BasisFeatureDate")]
    pub fn basis_feature_date(&self) -> Result<Option<Date>, InvalidValue> {
        self.0.get_date(Tag(259))
    }

    /// The `BasisFeaturePrice` (260) field.
    #[doc(alias = "BasisFeaturePrice")]
    pub fn basis_feature_price(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(260))
    }

    /// The `Concession` (238) field.
    #[doc(alias = "Concession")]
    pub fn concession(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(238))
    }

    /// The `TotalTakedown` (237) field.
    #[doc(alias = "TotalTakedown")]
    pub fn total_takedown(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(237))
    }

    /// The `NetMoney` (118) field.
    #[doc(alias = "NetMoney")]
    pub fn net_money(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(118))
    }

    /// The `SettlCurrAmt` (119) field.
    #[doc(alias = "SettlCurrAmt")]
    pub fn settl_curr_amt(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(119))
    }

    /// The `SettlCurrency` (120) field.
    #[doc(alias = "SettlCurrency")]
    pub fn settl_currency(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(120))
    }

    /// The `SettlCurrFxRate` (155) field.
    #[doc(alias = "SettlCurrFxRate")]
    pub fn settl_curr_fx_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(155))
    }

    /// The `SettlCurrFxRateCalc` (156) field.
    #[doc(alias = "SettlCurrFxRateCalc")]
    pub fn settl_curr_fx_rate_calc(&self) -> Result<Option<SettlCurrFxRateCalc<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(156))?.map(SettlCurrFxRateCalc::from_value))
    }

    /// The `HandlInst` (21) field.
    #[doc(alias = "HandlInst")]
    pub fn handl_inst(&self) -> Result<Option<HandlInst<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(21))?.map(HandlInst::from_value))
    }

    /// The `MinQty` (110) field.
    #[doc(alias = "MinQty")]
    pub fn min_qty(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(110))
    }

    /// The `MaxFloor` (111) field.
    #[doc(alias = "MaxFloor")]
    pub fn max_floor(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(111))
    }

    /// The `PositionEffect` (77) field.
    #[doc(alias = "PositionEffect")]
    pub fn position_effect(&self) -> Result<Option<PositionEffect<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(77))?.map(PositionEffect::from_value))
    }

    /// The `MaxShow` (210) field.
    #[doc(alias = "MaxShow")]
    pub fn max_show(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(210))
    }

    /// The `BookingType` (775) field.
    #[doc(alias = "BookingType")]
    pub fn booking_type(&self) -> Result<Option<BookingType>, InvalidValue> {
        Ok(self.0.get_int(Tag(775))?.map(BookingType::from_value))
    }

    /// The `Text` (58) field.
    #[doc(alias = "Text")]
    pub fn text(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(58))
    }

    /// The `EncodedTextLen` (354) field.
    #[doc(alias = "EncodedTextLen")]
    pub fn encoded_text_len(&self) -> Result<Option<i64>, InvalidValue> {
        self.0.get_int(Tag(354))
    }

    /// The `EncodedText` (355) field.
    #[doc(alias = "EncodedText")]
    pub fn encoded_text(&self) -> Option<&[u8]> {
        self.0.get(Tag(355))
    }

    /// The `SettlDate2` (193) field.
    #[doc(alias = "SettlDate2")]
    pub fn settl_date2(&self) -> Result<Option<Date>, InvalidValue> {
        self.0.get_date(Tag(193))
    }

    /// The `OrderQty2` (192) field.
    #[doc(alias = "OrderQty2")]
    pub fn order_qty2(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(192))
    }

    /// The `LastForwardPoints2` (641) field.
    #[doc(alias = "LastForwardPoints2")]
    pub fn last_forward_points2(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(641))
    }

    /// The `MultiLegReportingType` (442) field.
    #[doc(alias = "MultiLegReportingType")]
    pub fn multi_leg_reporting_type(&self) -> Result<Option<MultiLegReportingType<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(442))?.map(MultiLegReportingType::from_value))
    }

    /// The `CancellationRights` (480) field.
    #[doc(alias = "CancellationRights")]
    pub fn cancellation_rights(&self) -> Result<Option<CancellationRights<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(480))?.map(CancellationRights::from_value))
    }

    /// The `MoneyLaunderingStatus` (481) field.
    #[doc(alias = "MoneyLaunderingStatus")]
    pub fn money_laundering_status(&self) -> Result<Option<MoneyLaunderingStatus<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(481))?.map(MoneyLaunderingStatus::from_value))
    }

    /// The `RegistID` (513) field.
    #[doc(alias = "RegistID")]
    pub fn regist_id(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(513))
    }

    /// The `Designation` (494) field.
    #[doc(alias = "Designation")]
    pub fn designation(&self) -> Result<Option<&str>, InvalidValue> {
        self.0.get_str(Tag(494))
    }

    /// The `TransBkdTime` (483) field.
    #[doc(alias = "TransBkdTime")]
    pub fn trans_bkd_time(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
        self.0.get_utc_timestamp(Tag(483))
    }

    /// The `ExecValuationPoint` (515) field.
    #[doc(alias = "ExecValuationPoint")]
    pub fn exec_valuation_point(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
        self.0.get_utc_timestamp(Tag(515))
    }

    /// The `ExecPriceType` (484) field.
    #[doc(alias = "ExecPriceType")]
    pub fn exec_price_type(&self) -> Result<Option<ExecPriceType<'_>>, InvalidValue> {
        Ok(self.0.get_str(Tag(484))?.map(ExecPriceType::from_value))
    }

    /// The `ExecPriceAdjustment` (485) field.
    #[doc(alias = "ExecPriceAdjustment")]
    pub fn exec_price_adjustment(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(485))
    }

    /// The `PriorityIndicator` (638) field.
    #[doc(alias = "PriorityIndicator")]
    pub fn priority_indicator(&self) -> Result<Option<PriorityIndicator>, InvalidValue> {
        Ok(self.0.get_int(Tag(638))?.map(PriorityIndicator::from_value))
    }

    /// The `PriceImprovement` (639) field.
    #[doc(alias = "PriceImprovement")]
    pub fn price_improvement(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(639))
    }

    /// The `LastLiquidityInd` (851) field.
    #[doc(alias = "LastLiquidityInd")]
    pub fn last_liquidity_ind(&self) -> Result<Option<LastLiquidityInd>, InvalidValue> {
        Ok(self.0.get_int(Tag(851))?.map(LastLiquidityInd::from_value))
    }

    /// The instances of the `NoContAmts` (518) group.
    #[doc(alias = "NoContAmts")]
    pub fn cont_amts(&self) -> Result<Instances<'_, ContAmtGrp<'_>>, InvalidValue> {
        self.0.get_group(&ContAmtGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
    }

    /// The instances of the `NoLegs` (555) group.
    #[doc(alias = "NoLegs")]
    pub fn legs(&self) -> Result<Instances<'_, InstrmtLegExecGrp<'_>>, InvalidValue> {
        self.0.get_group(&InstrmtLegExecGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
    }

    /// The `CopyMsgIndicator` (797) field.
    #[doc(alias = "CopyMsgIndicator")]
    pub fn copy_msg_indicator(&self) -> Result<Option<bool>, InvalidValue> {
        self.0.get_bool(Tag(797))
    }

    /// The instances of the `NoMiscFees` (136) group.
    #[doc(alias = "NoMiscFees")]
    pub fn misc_fees(&self) -> Result<Instances<'_, MiscFeesGrp<'_>>, InvalidValue> {
        self.0.get_group(&MiscFeesGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
    }
}

impl std::fmt::Debug for ExecutionReport {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "ExecutionReport({})", self.0)
    }
}

impl std::fmt::Display for ExecutionReport {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(&self.0, f)
    }
}