#![cfg_attr(rustfmt, rustfmt::skip)]
use refix_message::{Decimal, InvalidValue, LazyKnownTags, Tag};
#[derive(Clone, Copy)]
pub struct LegBenchmarkCurveData<'a>(pub(in super::super) refix_message::Scope<'a>);
impl<'a> LegBenchmarkCurveData<'a> {
pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
static TAGS: LazyKnownTags = LazyKnownTags::new(
&[Tag(676), Tag(677), Tag(678), Tag(679), Tag(680)],
&[],
);
&TAGS
}
pub fn raw(&self) -> refix_message::Scope<'a> {
self.0
}
#[doc(alias = "LegBenchmarkCurveCurrency")]
pub fn leg_benchmark_curve_currency(&self) -> Result<Option<&'a str>, InvalidValue> {
self.0.get_str(Tag(676))
}
#[doc(alias = "LegBenchmarkCurveName")]
pub fn leg_benchmark_curve_name(&self) -> Result<Option<&'a str>, InvalidValue> {
self.0.get_str(Tag(677))
}
#[doc(alias = "LegBenchmarkCurvePoint")]
pub fn leg_benchmark_curve_point(&self) -> Result<Option<&'a str>, InvalidValue> {
self.0.get_str(Tag(678))
}
#[doc(alias = "LegBenchmarkPrice")]
pub fn leg_benchmark_price(&self) -> Result<Option<Decimal>, InvalidValue> {
self.0.get_decimal(Tag(679))
}
#[doc(alias = "LegBenchmarkPriceType")]
pub fn leg_benchmark_price_type(&self) -> Result<Option<i64>, InvalidValue> {
self.0.get_int(Tag(680))
}
}
impl std::fmt::Debug for LegBenchmarkCurveData<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LegBenchmarkCurveData({})", self.0.display_known(&Self::known_tags().get()))
}
}