Skip to main content

refix_fix44/generated/components/
instrmt_leg_ioi_grp.rs

1// @generated by refix codegen from FIX44.xml. Do not edit.
2#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{GroupTable, Instances, InvalidValue, LazyKnownTags, Tag};
5
6use super::{InstrumentLeg, LegSecAltIDGrp, LegStipulations};
7
8/// An instance of the `NoLegs` (555) group.
9#[derive(Clone, Copy)]
10pub struct InstrmtLegIOIGrp<'a>(refix_message::Scope<'a>);
11
12impl<'a> From<refix_message::Scope<'a>> for InstrmtLegIOIGrp<'a> {
13    fn from(scope: refix_message::Scope<'a>) -> Self {
14        Self(scope)
15    }
16}
17
18impl<'a> InstrmtLegIOIGrp<'a> {
19    pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
20        Tag(555),
21        Tag(600),
22        &[
23            Tag(248), Tag(249), Tag(250), Tag(251), Tag(252), Tag(253), Tag(254), Tag(257),
24            Tag(556), Tag(596), Tag(597), Tag(598), Tag(599), Tag(600), Tag(601), Tag(602),
25            Tag(603), Tag(604), Tag(607), Tag(608), Tag(609), Tag(610), Tag(611), Tag(612),
26            Tag(613), Tag(614), Tag(615), Tag(616), Tag(617), Tag(618), Tag(619), Tag(620),
27            Tag(621), Tag(622), Tag(623), Tag(624), Tag(682), Tag(683), Tag(739), Tag(740),
28            Tag(764), Tag(942), Tag(955), Tag(956),
29        ],
30        &[LegSecAltIDGrp::TABLE, LegStipulations::TABLE],
31    );
32
33    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
34        static TAGS: LazyKnownTags = LazyKnownTags::new(
35            &[Tag(682), Tag(683)],
36            &[InstrumentLeg::known_tags(), LegStipulations::known_tags()],
37        );
38        &TAGS
39    }
40
41    pub fn raw(&self) -> refix_message::Scope<'a> {
42        self.0
43    }
44
45    /// The `InstrumentLeg` component.
46    pub fn instrument_leg(&self) -> InstrumentLeg<'a> {
47        InstrumentLeg(self.0, Self::known_tags().get())
48    }
49
50    /// The `LegIOIQty` (682) field.
51    #[doc(alias = "LegIOIQty")]
52    pub fn leg_ioi_qty(&self) -> Result<Option<&'a str>, InvalidValue> {
53        self.0.get_str(Tag(682))
54    }
55
56    /// The instances of the `NoLegStipulations` (683) group.
57    #[doc(alias = "NoLegStipulations")]
58    pub fn leg_stipulations(&self) -> Result<Instances<'a, LegStipulations<'a>>, InvalidValue> {
59        self.0.get_group(&LegStipulations::TABLE, &Self::known_tags().get()).map(Instances::from)
60    }
61}
62
63impl std::fmt::Debug for InstrmtLegIOIGrp<'_> {
64    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
65        write!(f, "InstrmtLegIOIGrp({})", self.0)
66    }
67}