#![cfg_attr(rustfmt, rustfmt::skip)]
use refix_message::{GroupTable, InvalidValue, LazyKnownTags, Tag};
#[derive(Clone, Copy)]
pub struct SecAltIDGrp<'a>(refix_message::Scope<'a>);
impl<'a> From<refix_message::Scope<'a>> for SecAltIDGrp<'a> {
fn from(scope: refix_message::Scope<'a>) -> Self {
Self(scope)
}
}
impl<'a> SecAltIDGrp<'a> {
pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
Tag(454),
Tag(455),
&[Tag(455), Tag(456)],
&[],
);
pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
static TAGS: LazyKnownTags = LazyKnownTags::new(&[Tag(455), Tag(456)], &[]);
&TAGS
}
pub fn raw(&self) -> refix_message::Scope<'a> {
self.0
}
#[doc(alias = "SecurityAltID")]
pub fn security_alt_id(&self) -> Result<Option<&'a str>, InvalidValue> {
self.0.get_str(Tag(455))
}
#[doc(alias = "SecurityAltIDSource")]
pub fn security_alt_id_source(&self) -> Result<Option<&'a str>, InvalidValue> {
self.0.get_str(Tag(456))
}
}
impl std::fmt::Debug for SecAltIDGrp<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SecAltIDGrp({})", self.0)
}
}