#![cfg_attr(rustfmt, rustfmt::skip)]
use refix_message::{GroupTable, Instances, InvalidValue, LazyKnownTags, Tag};
use super::{EvntGrp, FinancingDetails, InstrmtLegGrp, Instrument, SecAltIDGrp, UndInstrmtGrp};
#[derive(Clone, Copy)]
pub struct QuotCxlEntriesGrp<'a>(refix_message::Scope<'a>);
impl<'a> From<refix_message::Scope<'a>> for QuotCxlEntriesGrp<'a> {
fn from(scope: refix_message::Scope<'a>) -> Self {
Self(scope)
}
}
impl<'a> QuotCxlEntriesGrp<'a> {
pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
Tag(295),
Tag(55),
&[
Tag(22), Tag(48), Tag(55), Tag(65), Tag(106), Tag(107), Tag(167), Tag(200), Tag(201),
Tag(202), Tag(206), Tag(207), Tag(223), Tag(224), Tag(225), Tag(226), Tag(227),
Tag(228), Tag(231), Tag(239), Tag(240), Tag(255), Tag(348), Tag(349), Tag(350),
Tag(351), Tag(454), Tag(460), Tag(461), Tag(470), Tag(471), Tag(472), Tag(541),
Tag(543), Tag(555), Tag(667), Tag(691), Tag(711), Tag(762), Tag(788), Tag(864),
Tag(873), Tag(874), Tag(875), Tag(876), Tag(898), Tag(913), Tag(914), Tag(915),
Tag(916), Tag(917), Tag(918), Tag(919), Tag(947),
],
&[SecAltIDGrp::TABLE, EvntGrp::TABLE, UndInstrmtGrp::TABLE, InstrmtLegGrp::TABLE],
);
pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
static TAGS: LazyKnownTags = LazyKnownTags::new(
&[Tag(711), Tag(555)],
&[
Instrument::known_tags(), FinancingDetails::known_tags(),
UndInstrmtGrp::known_tags(), InstrmtLegGrp::known_tags(),
],
);
&TAGS
}
pub fn raw(&self) -> refix_message::Scope<'a> {
self.0
}
pub fn instrument(&self) -> Instrument<'a> {
Instrument(self.0, Self::known_tags().get())
}
pub fn financing_details(&self) -> FinancingDetails<'a> {
FinancingDetails(self.0)
}
#[doc(alias = "NoUnderlyings")]
pub fn underlyings(&self) -> Result<Instances<'a, UndInstrmtGrp<'a>>, InvalidValue> {
self.0.get_group(&UndInstrmtGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
}
#[doc(alias = "NoLegs")]
pub fn legs(&self) -> Result<Instances<'a, InstrmtLegGrp<'a>>, InvalidValue> {
self.0.get_group(&InstrmtLegGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
}
}
impl std::fmt::Debug for QuotCxlEntriesGrp<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "QuotCxlEntriesGrp({})", self.0)
}
}