Skip to main content

refix_fix44/generated/components/
md_inc_grp.rs

1// @generated by refix codegen from FIX44.xml. Do not edit.
2#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{
5    Date, Decimal, GroupTable, Instances, InvalidValue, LazyKnownTags, MultipleValues, Tag, Time,
6    UtcTimestamp,
7};
8
9use super::super::enums::{
10    CorporateAction, DeleteReason, ExecInst, FinancialStatus, MDEntryType, MDUpdateAction,
11    OpenCloseSettlFlag, QuoteCondition, Scope, TickDirection, TimeInForce, TradeCondition,
12};
13use super::{EvntGrp, InstrmtLegGrp, Instrument, SecAltIDGrp, UndInstrmtGrp};
14
15/// An instance of the `NoMDEntries` (268) group.
16#[derive(Clone, Copy)]
17pub struct MDIncGrp<'a>(refix_message::Scope<'a>);
18
19impl<'a> From<refix_message::Scope<'a>> for MDIncGrp<'a> {
20    fn from(scope: refix_message::Scope<'a>) -> Self {
21        Self(scope)
22    }
23}
24
25impl<'a> MDIncGrp<'a> {
26    pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
27        Tag(268),
28        Tag(279),
29        &[
30            Tag(15), Tag(18), Tag(22), Tag(37), Tag(48), Tag(55), Tag(58), Tag(59), Tag(65),
31            Tag(106), Tag(107), Tag(110), Tag(126), Tag(167), Tag(200), Tag(201), Tag(202),
32            Tag(206), Tag(207), Tag(223), Tag(224), Tag(225), Tag(226), Tag(227), Tag(228),
33            Tag(231), Tag(239), Tag(240), Tag(255), Tag(269), Tag(270), Tag(271), Tag(272),
34            Tag(273), Tag(274), Tag(275), Tag(276), Tag(277), Tag(278), Tag(279), Tag(280),
35            Tag(282), Tag(283), Tag(284), Tag(285), Tag(286), Tag(287), Tag(288), Tag(289),
36            Tag(290), Tag(291), Tag(292), Tag(299), Tag(336), Tag(346), Tag(348), Tag(349),
37            Tag(350), Tag(351), Tag(354), Tag(355), Tag(432), Tag(451), Tag(454), Tag(460),
38            Tag(461), Tag(470), Tag(471), Tag(472), Tag(541), Tag(543), Tag(546), Tag(555),
39            Tag(625), Tag(667), Tag(691), Tag(711), Tag(762), Tag(811), Tag(864), Tag(873),
40            Tag(874), Tag(875), Tag(876), Tag(947),
41        ],
42        &[SecAltIDGrp::TABLE, EvntGrp::TABLE, UndInstrmtGrp::TABLE, InstrmtLegGrp::TABLE],
43    );
44
45    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
46        static TAGS: LazyKnownTags = LazyKnownTags::new(
47            &[
48                Tag(279), Tag(285), Tag(269), Tag(278), Tag(280), Tag(711), Tag(555), Tag(291),
49                Tag(292), Tag(270), Tag(15), Tag(271), Tag(272), Tag(273), Tag(274), Tag(275),
50                Tag(336), Tag(625), Tag(276), Tag(277), Tag(282), Tag(283), Tag(284), Tag(286),
51                Tag(59), Tag(432), Tag(126), Tag(110), Tag(18), Tag(287), Tag(37), Tag(299),
52                Tag(288), Tag(289), Tag(346), Tag(290), Tag(546), Tag(811), Tag(451), Tag(58),
53                Tag(354), Tag(355),
54            ],
55            &[Instrument::known_tags(), UndInstrmtGrp::known_tags(), InstrmtLegGrp::known_tags()],
56        );
57        &TAGS
58    }
59
60    pub fn raw(&self) -> refix_message::Scope<'a> {
61        self.0
62    }
63
64    /// The `MDUpdateAction` (279) field.
65    #[doc(alias = "MDUpdateAction")]
66    pub fn md_update_action(&self) -> Result<Option<MDUpdateAction<'a>>, InvalidValue> {
67        Ok(self.0.get_str(Tag(279))?.map(MDUpdateAction::from_value))
68    }
69
70    /// The `DeleteReason` (285) field.
71    #[doc(alias = "DeleteReason")]
72    pub fn delete_reason(&self) -> Result<Option<DeleteReason<'a>>, InvalidValue> {
73        Ok(self.0.get_str(Tag(285))?.map(DeleteReason::from_value))
74    }
75
76    /// The `MDEntryType` (269) field.
77    #[doc(alias = "MDEntryType")]
78    pub fn md_entry_type(&self) -> Result<Option<MDEntryType<'a>>, InvalidValue> {
79        Ok(self.0.get_str(Tag(269))?.map(MDEntryType::from_value))
80    }
81
82    /// The `MDEntryID` (278) field.
83    #[doc(alias = "MDEntryID")]
84    pub fn md_entry_id(&self) -> Result<Option<&'a str>, InvalidValue> {
85        self.0.get_str(Tag(278))
86    }
87
88    /// The `MDEntryRefID` (280) field.
89    #[doc(alias = "MDEntryRefID")]
90    pub fn md_entry_ref_id(&self) -> Result<Option<&'a str>, InvalidValue> {
91        self.0.get_str(Tag(280))
92    }
93
94    /// The `Instrument` component.
95    pub fn instrument(&self) -> Instrument<'a> {
96        Instrument(self.0, Self::known_tags().get())
97    }
98
99    /// The instances of the `NoUnderlyings` (711) group.
100    #[doc(alias = "NoUnderlyings")]
101    pub fn underlyings(&self) -> Result<Instances<'a, UndInstrmtGrp<'a>>, InvalidValue> {
102        self.0.get_group(&UndInstrmtGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
103    }
104
105    /// The instances of the `NoLegs` (555) group.
106    #[doc(alias = "NoLegs")]
107    pub fn legs(&self) -> Result<Instances<'a, InstrmtLegGrp<'a>>, InvalidValue> {
108        self.0.get_group(&InstrmtLegGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
109    }
110
111    /// The `FinancialStatus` (291) field.
112    #[doc(alias = "FinancialStatus")]
113    pub fn financial_status(&self) -> Result<Option<MultipleValues<'a, FinancialStatus<'a>>>, InvalidValue> {
114        self.0.get_multiple_values(Tag(291))
115    }
116
117    /// The `CorporateAction` (292) field.
118    #[doc(alias = "CorporateAction")]
119    pub fn corporate_action(&self) -> Result<Option<MultipleValues<'a, CorporateAction<'a>>>, InvalidValue> {
120        self.0.get_multiple_values(Tag(292))
121    }
122
123    /// The `MDEntryPx` (270) field.
124    #[doc(alias = "MDEntryPx")]
125    pub fn md_entry_px(&self) -> Result<Option<Decimal>, InvalidValue> {
126        self.0.get_decimal(Tag(270))
127    }
128
129    /// The `Currency` (15) field.
130    #[doc(alias = "Currency")]
131    pub fn currency(&self) -> Result<Option<&'a str>, InvalidValue> {
132        self.0.get_str(Tag(15))
133    }
134
135    /// The `MDEntrySize` (271) field.
136    #[doc(alias = "MDEntrySize")]
137    pub fn md_entry_size(&self) -> Result<Option<Decimal>, InvalidValue> {
138        self.0.get_decimal(Tag(271))
139    }
140
141    /// The `MDEntryDate` (272) field.
142    #[doc(alias = "MDEntryDate")]
143    pub fn md_entry_date(&self) -> Result<Option<Date>, InvalidValue> {
144        self.0.get_date(Tag(272))
145    }
146
147    /// The `MDEntryTime` (273) field.
148    #[doc(alias = "MDEntryTime")]
149    pub fn md_entry_time(&self) -> Result<Option<Time>, InvalidValue> {
150        self.0.get_time(Tag(273))
151    }
152
153    /// The `TickDirection` (274) field.
154    #[doc(alias = "TickDirection")]
155    pub fn tick_direction(&self) -> Result<Option<TickDirection<'a>>, InvalidValue> {
156        Ok(self.0.get_str(Tag(274))?.map(TickDirection::from_value))
157    }
158
159    /// The `MDMkt` (275) field.
160    #[doc(alias = "MDMkt")]
161    pub fn md_mkt(&self) -> Result<Option<&'a str>, InvalidValue> {
162        self.0.get_str(Tag(275))
163    }
164
165    /// The `TradingSessionID` (336) field.
166    #[doc(alias = "TradingSessionID")]
167    pub fn trading_session_id(&self) -> Result<Option<&'a str>, InvalidValue> {
168        self.0.get_str(Tag(336))
169    }
170
171    /// The `TradingSessionSubID` (625) field.
172    #[doc(alias = "TradingSessionSubID")]
173    pub fn trading_session_sub_id(&self) -> Result<Option<&'a str>, InvalidValue> {
174        self.0.get_str(Tag(625))
175    }
176
177    /// The `QuoteCondition` (276) field.
178    #[doc(alias = "QuoteCondition")]
179    pub fn quote_condition(&self) -> Result<Option<MultipleValues<'a, QuoteCondition<'a>>>, InvalidValue> {
180        self.0.get_multiple_values(Tag(276))
181    }
182
183    /// The `TradeCondition` (277) field.
184    #[doc(alias = "TradeCondition")]
185    pub fn trade_condition(&self) -> Result<Option<MultipleValues<'a, TradeCondition<'a>>>, InvalidValue> {
186        self.0.get_multiple_values(Tag(277))
187    }
188
189    /// The `MDEntryOriginator` (282) field.
190    #[doc(alias = "MDEntryOriginator")]
191    pub fn md_entry_originator(&self) -> Result<Option<&'a str>, InvalidValue> {
192        self.0.get_str(Tag(282))
193    }
194
195    /// The `LocationID` (283) field.
196    #[doc(alias = "LocationID")]
197    pub fn location_id(&self) -> Result<Option<&'a str>, InvalidValue> {
198        self.0.get_str(Tag(283))
199    }
200
201    /// The `DeskID` (284) field.
202    #[doc(alias = "DeskID")]
203    pub fn desk_id(&self) -> Result<Option<&'a str>, InvalidValue> {
204        self.0.get_str(Tag(284))
205    }
206
207    /// The `OpenCloseSettlFlag` (286) field.
208    #[doc(alias = "OpenCloseSettlFlag")]
209    pub fn open_close_settl_flag(&self) -> Result<Option<MultipleValues<'a, OpenCloseSettlFlag<'a>>>, InvalidValue> {
210        self.0.get_multiple_values(Tag(286))
211    }
212
213    /// The `TimeInForce` (59) field.
214    #[doc(alias = "TimeInForce")]
215    pub fn time_in_force(&self) -> Result<Option<TimeInForce<'a>>, InvalidValue> {
216        Ok(self.0.get_str(Tag(59))?.map(TimeInForce::from_value))
217    }
218
219    /// The `ExpireDate` (432) field.
220    #[doc(alias = "ExpireDate")]
221    pub fn expire_date(&self) -> Result<Option<Date>, InvalidValue> {
222        self.0.get_date(Tag(432))
223    }
224
225    /// The `ExpireTime` (126) field.
226    #[doc(alias = "ExpireTime")]
227    pub fn expire_time(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
228        self.0.get_utc_timestamp(Tag(126))
229    }
230
231    /// The `MinQty` (110) field.
232    #[doc(alias = "MinQty")]
233    pub fn min_qty(&self) -> Result<Option<Decimal>, InvalidValue> {
234        self.0.get_decimal(Tag(110))
235    }
236
237    /// The `ExecInst` (18) field.
238    #[doc(alias = "ExecInst")]
239    pub fn exec_inst(&self) -> Result<Option<MultipleValues<'a, ExecInst<'a>>>, InvalidValue> {
240        self.0.get_multiple_values(Tag(18))
241    }
242
243    /// The `SellerDays` (287) field.
244    #[doc(alias = "SellerDays")]
245    pub fn seller_days(&self) -> Result<Option<i64>, InvalidValue> {
246        self.0.get_int(Tag(287))
247    }
248
249    /// The `OrderID` (37) field.
250    #[doc(alias = "OrderID")]
251    pub fn order_id(&self) -> Result<Option<&'a str>, InvalidValue> {
252        self.0.get_str(Tag(37))
253    }
254
255    /// The `QuoteEntryID` (299) field.
256    #[doc(alias = "QuoteEntryID")]
257    pub fn quote_entry_id(&self) -> Result<Option<&'a str>, InvalidValue> {
258        self.0.get_str(Tag(299))
259    }
260
261    /// The `MDEntryBuyer` (288) field.
262    #[doc(alias = "MDEntryBuyer")]
263    pub fn md_entry_buyer(&self) -> Result<Option<&'a str>, InvalidValue> {
264        self.0.get_str(Tag(288))
265    }
266
267    /// The `MDEntrySeller` (289) field.
268    #[doc(alias = "MDEntrySeller")]
269    pub fn md_entry_seller(&self) -> Result<Option<&'a str>, InvalidValue> {
270        self.0.get_str(Tag(289))
271    }
272
273    /// The `NumberOfOrders` (346) field.
274    #[doc(alias = "NumberOfOrders")]
275    pub fn number_of_orders(&self) -> Result<Option<i64>, InvalidValue> {
276        self.0.get_int(Tag(346))
277    }
278
279    /// The `MDEntryPositionNo` (290) field.
280    #[doc(alias = "MDEntryPositionNo")]
281    pub fn md_entry_position_no(&self) -> Result<Option<i64>, InvalidValue> {
282        self.0.get_int(Tag(290))
283    }
284
285    /// The `Scope` (546) field.
286    #[doc(alias = "Scope")]
287    pub fn scope(&self) -> Result<Option<MultipleValues<'a, Scope<'a>>>, InvalidValue> {
288        self.0.get_multiple_values(Tag(546))
289    }
290
291    /// The `PriceDelta` (811) field.
292    #[doc(alias = "PriceDelta")]
293    pub fn price_delta(&self) -> Result<Option<Decimal>, InvalidValue> {
294        self.0.get_decimal(Tag(811))
295    }
296
297    /// The `NetChgPrevDay` (451) field.
298    #[doc(alias = "NetChgPrevDay")]
299    pub fn net_chg_prev_day(&self) -> Result<Option<Decimal>, InvalidValue> {
300        self.0.get_decimal(Tag(451))
301    }
302
303    /// The `Text` (58) field.
304    #[doc(alias = "Text")]
305    pub fn text(&self) -> Result<Option<&'a str>, InvalidValue> {
306        self.0.get_str(Tag(58))
307    }
308
309    /// The `EncodedTextLen` (354) field.
310    #[doc(alias = "EncodedTextLen")]
311    pub fn encoded_text_len(&self) -> Result<Option<i64>, InvalidValue> {
312        self.0.get_int(Tag(354))
313    }
314
315    /// The `EncodedText` (355) field.
316    #[doc(alias = "EncodedText")]
317    pub fn encoded_text(&self) -> Option<&'a [u8]> {
318        self.0.get(Tag(355))
319    }
320}
321
322impl std::fmt::Debug for MDIncGrp<'_> {
323    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
324        write!(f, "MDIncGrp({})", self.0)
325    }
326}