#![cfg_attr(rustfmt, rustfmt::skip)]
use refix_message::{GroupTable, LazyKnownTags, Tag};
use super::{UndSecAltIDGrp, UnderlyingInstrument, UnderlyingStipulations};
#[derive(Clone, Copy)]
pub struct UndInstrmtGrp<'a>(refix_message::Scope<'a>);
impl<'a> From<refix_message::Scope<'a>> for UndInstrmtGrp<'a> {
fn from(scope: refix_message::Scope<'a>) -> Self {
Self(scope)
}
}
impl<'a> UndInstrmtGrp<'a> {
pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
Tag(711),
Tag(311),
&[
Tag(241), Tag(242), Tag(243), Tag(244), Tag(245), Tag(246), Tag(247), Tag(256),
Tag(305), Tag(306), Tag(307), Tag(308), Tag(309), Tag(310), Tag(311), Tag(312),
Tag(313), Tag(315), Tag(316), Tag(317), Tag(318), Tag(362), Tag(363), Tag(364),
Tag(365), Tag(435), Tag(436), Tag(457), Tag(462), Tag(463), Tag(542), Tag(592),
Tag(593), Tag(594), Tag(595), Tag(763), Tag(810), Tag(877), Tag(878), Tag(879),
Tag(882), Tag(883), Tag(884), Tag(885), Tag(886), Tag(887), Tag(941),
],
&[UndSecAltIDGrp::TABLE, UnderlyingStipulations::TABLE],
);
pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
static TAGS: LazyKnownTags = LazyKnownTags::new(
&[],
&[UnderlyingInstrument::known_tags()],
);
&TAGS
}
pub fn raw(&self) -> refix_message::Scope<'a> {
self.0
}
pub fn underlying_instrument(&self) -> UnderlyingInstrument<'a> {
UnderlyingInstrument(self.0, Self::known_tags().get())
}
}
impl std::fmt::Debug for UndInstrmtGrp<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UndInstrmtGrp({})", self.0)
}
}