refix_fix44/generated/components/
instrmt_md_req_grp.rs1#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{GroupTable, Instances, InvalidValue, LazyKnownTags, Tag};
5
6use super::{EvntGrp, InstrmtLegGrp, Instrument, SecAltIDGrp, UndInstrmtGrp};
7
8#[derive(Clone, Copy)]
10pub struct InstrmtMDReqGrp<'a>(refix_message::Scope<'a>);
11
12impl<'a> From<refix_message::Scope<'a>> for InstrmtMDReqGrp<'a> {
13 fn from(scope: refix_message::Scope<'a>) -> Self {
14 Self(scope)
15 }
16}
17
18impl<'a> InstrmtMDReqGrp<'a> {
19 pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
20 Tag(146),
21 Tag(55),
22 &[
23 Tag(22), Tag(48), Tag(55), Tag(65), Tag(106), Tag(107), Tag(167), Tag(200), Tag(201),
24 Tag(202), Tag(206), Tag(207), Tag(223), Tag(224), Tag(225), Tag(226), Tag(227),
25 Tag(228), Tag(231), Tag(239), Tag(240), Tag(255), Tag(348), Tag(349), Tag(350),
26 Tag(351), Tag(454), Tag(460), Tag(461), Tag(470), Tag(471), Tag(472), Tag(541),
27 Tag(543), Tag(555), Tag(667), Tag(691), Tag(711), Tag(762), Tag(864), Tag(873),
28 Tag(874), Tag(875), Tag(876), Tag(947),
29 ],
30 &[SecAltIDGrp::TABLE, EvntGrp::TABLE, UndInstrmtGrp::TABLE, InstrmtLegGrp::TABLE],
31 );
32
33 pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
34 static TAGS: LazyKnownTags = LazyKnownTags::new(
35 &[Tag(711), Tag(555)],
36 &[Instrument::known_tags(), UndInstrmtGrp::known_tags(), InstrmtLegGrp::known_tags()],
37 );
38 &TAGS
39 }
40
41 pub fn raw(&self) -> refix_message::Scope<'a> {
42 self.0
43 }
44
45 pub fn instrument(&self) -> Instrument<'a> {
47 Instrument(self.0, Self::known_tags().get())
48 }
49
50 #[doc(alias = "NoUnderlyings")]
52 pub fn underlyings(&self) -> Result<Instances<'a, UndInstrmtGrp<'a>>, InvalidValue> {
53 self.0.get_group(&UndInstrmtGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
54 }
55
56 #[doc(alias = "NoLegs")]
58 pub fn legs(&self) -> Result<Instances<'a, InstrmtLegGrp<'a>>, InvalidValue> {
59 self.0.get_group(&InstrmtLegGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
60 }
61}
62
63impl std::fmt::Debug for InstrmtMDReqGrp<'_> {
64 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
65 write!(f, "InstrmtMDReqGrp({})", self.0)
66 }
67}