Skip to main content

refix_fix44/generated/messages/
quote_status_report.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, Instances, InvalidValue, LazyKnownTags, RawMessage, Tag, UtcTimestamp,
6};
7
8use super::super::components::{
9    FinancingDetails, Header, Instrument, LegQuotStatGrp, OrderQtyData, Parties, QuotQualGrp,
10    SpreadOrBenchmarkCurveData, Stipulations, Trailer, UndInstrmtGrp, YieldData,
11};
12use super::super::enums::{
13    AccountType, AcctIDSource, CommType, CustOrderCapacity, OrdType, PriceType, QuoteStatus,
14    QuoteType, SettlCurrFxRateCalc, SettlType, Side,
15};
16
17/// The `QuoteStatusReport` (35=AI) message.
18pub struct QuoteStatusReport(RawMessage);
19
20impl QuoteStatusReport {
21    pub const MSG_TYPE: &[u8] = b"AI";
22
23    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
24        static TAGS: LazyKnownTags = LazyKnownTags::new(
25            &[
26                Tag(649), Tag(131), Tag(117), Tag(693), Tag(537), Tag(453), Tag(336), Tag(625),
27                Tag(711), Tag(54), Tag(63), Tag(64), Tag(193), Tag(192), Tag(15), Tag(232), Tag(1),
28                Tag(660), Tag(581), Tag(555), Tag(735), Tag(126), Tag(44), Tag(423), Tag(132),
29                Tag(133), Tag(645), Tag(646), Tag(647), Tag(134), Tag(648), Tag(135), Tag(62),
30                Tag(188), Tag(190), Tag(189), Tag(191), Tag(631), Tag(632), Tag(633), Tag(634),
31                Tag(60), Tag(40), Tag(642), Tag(643), Tag(656), Tag(657), Tag(156), Tag(13),
32                Tag(12), Tag(582), Tag(100), Tag(297), Tag(58), Tag(354), Tag(355),
33            ],
34            &[
35                Header::known_tags(), Trailer::known_tags(), Parties::known_tags(),
36                Instrument::known_tags(), FinancingDetails::known_tags(),
37                UndInstrmtGrp::known_tags(), OrderQtyData::known_tags(), Stipulations::known_tags(),
38                LegQuotStatGrp::known_tags(), QuotQualGrp::known_tags(),
39                SpreadOrBenchmarkCurveData::known_tags(), YieldData::known_tags(),
40            ],
41        );
42        &TAGS
43    }
44
45    pub fn from_raw(raw: RawMessage) -> Self {
46        Self(raw)
47    }
48
49    pub fn raw(&self) -> &RawMessage {
50        &self.0
51    }
52
53    pub fn header(&self) -> Header<'_> {
54        Header(self.0.scope(), Self::known_tags().get())
55    }
56
57    pub fn trailer(&self) -> Trailer<'_> {
58        Trailer(self.0.scope())
59    }
60
61    /// The `QuoteStatusReqID` (649) field.
62    #[doc(alias = "QuoteStatusReqID")]
63    pub fn quote_status_req_id(&self) -> Result<Option<&str>, InvalidValue> {
64        self.0.get_str(Tag(649))
65    }
66
67    /// The `QuoteReqID` (131) field.
68    #[doc(alias = "QuoteReqID")]
69    pub fn quote_req_id(&self) -> Result<Option<&str>, InvalidValue> {
70        self.0.get_str(Tag(131))
71    }
72
73    /// The `QuoteID` (117) field.
74    #[doc(alias = "QuoteID")]
75    pub fn quote_id(&self) -> Result<Option<&str>, InvalidValue> {
76        self.0.get_str(Tag(117))
77    }
78
79    /// The `QuoteRespID` (693) field.
80    #[doc(alias = "QuoteRespID")]
81    pub fn quote_resp_id(&self) -> Result<Option<&str>, InvalidValue> {
82        self.0.get_str(Tag(693))
83    }
84
85    /// The `QuoteType` (537) field.
86    #[doc(alias = "QuoteType")]
87    pub fn quote_type(&self) -> Result<Option<QuoteType>, InvalidValue> {
88        Ok(self.0.get_int(Tag(537))?.map(QuoteType::from_value))
89    }
90
91    /// The instances of the `NoPartyIDs` (453) group.
92    #[doc(alias = "NoPartyIDs")]
93    pub fn party_ids(&self) -> Result<Instances<'_, Parties<'_>>, InvalidValue> {
94        self.0.get_group(&Parties::TABLE, &Self::known_tags().get()).map(Instances::from)
95    }
96
97    /// The `TradingSessionID` (336) field.
98    #[doc(alias = "TradingSessionID")]
99    pub fn trading_session_id(&self) -> Result<Option<&str>, InvalidValue> {
100        self.0.get_str(Tag(336))
101    }
102
103    /// The `TradingSessionSubID` (625) field.
104    #[doc(alias = "TradingSessionSubID")]
105    pub fn trading_session_sub_id(&self) -> Result<Option<&str>, InvalidValue> {
106        self.0.get_str(Tag(625))
107    }
108
109    /// The `Instrument` component.
110    pub fn instrument(&self) -> Instrument<'_> {
111        Instrument(self.0.scope(), Self::known_tags().get())
112    }
113
114    /// The `FinancingDetails` component.
115    pub fn financing_details(&self) -> FinancingDetails<'_> {
116        FinancingDetails(self.0.scope())
117    }
118
119    /// The instances of the `NoUnderlyings` (711) group.
120    #[doc(alias = "NoUnderlyings")]
121    pub fn underlyings(&self) -> Result<Instances<'_, UndInstrmtGrp<'_>>, InvalidValue> {
122        self.0.get_group(&UndInstrmtGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
123    }
124
125    /// The `Side` (54) field.
126    #[doc(alias = "Side")]
127    pub fn side(&self) -> Result<Option<Side<'_>>, InvalidValue> {
128        Ok(self.0.get_str(Tag(54))?.map(Side::from_value))
129    }
130
131    /// The `OrderQtyData` component.
132    pub fn order_qty_data(&self) -> OrderQtyData<'_> {
133        OrderQtyData(self.0.scope())
134    }
135
136    /// The `SettlType` (63) field.
137    #[doc(alias = "SettlType")]
138    pub fn settl_type(&self) -> Result<Option<SettlType<'_>>, InvalidValue> {
139        Ok(self.0.get_str(Tag(63))?.map(SettlType::from_value))
140    }
141
142    /// The `SettlDate` (64) field.
143    #[doc(alias = "SettlDate")]
144    pub fn settl_date(&self) -> Result<Option<Date>, InvalidValue> {
145        self.0.get_date(Tag(64))
146    }
147
148    /// The `SettlDate2` (193) field.
149    #[doc(alias = "SettlDate2")]
150    pub fn settl_date2(&self) -> Result<Option<Date>, InvalidValue> {
151        self.0.get_date(Tag(193))
152    }
153
154    /// The `OrderQty2` (192) field.
155    #[doc(alias = "OrderQty2")]
156    pub fn order_qty2(&self) -> Result<Option<Decimal>, InvalidValue> {
157        self.0.get_decimal(Tag(192))
158    }
159
160    /// The `Currency` (15) field.
161    #[doc(alias = "Currency")]
162    pub fn currency(&self) -> Result<Option<&str>, InvalidValue> {
163        self.0.get_str(Tag(15))
164    }
165
166    /// The instances of the `NoStipulations` (232) group.
167    #[doc(alias = "NoStipulations")]
168    pub fn stipulations(&self) -> Result<Instances<'_, Stipulations<'_>>, InvalidValue> {
169        self.0.get_group(&Stipulations::TABLE, &Self::known_tags().get()).map(Instances::from)
170    }
171
172    /// The `Account` (1) field.
173    #[doc(alias = "Account")]
174    pub fn account(&self) -> Result<Option<&str>, InvalidValue> {
175        self.0.get_str(Tag(1))
176    }
177
178    /// The `AcctIDSource` (660) field.
179    #[doc(alias = "AcctIDSource")]
180    pub fn acct_id_source(&self) -> Result<Option<AcctIDSource>, InvalidValue> {
181        Ok(self.0.get_int(Tag(660))?.map(AcctIDSource::from_value))
182    }
183
184    /// The `AccountType` (581) field.
185    #[doc(alias = "AccountType")]
186    pub fn account_type(&self) -> Result<Option<AccountType>, InvalidValue> {
187        Ok(self.0.get_int(Tag(581))?.map(AccountType::from_value))
188    }
189
190    /// The instances of the `NoLegs` (555) group.
191    #[doc(alias = "NoLegs")]
192    pub fn legs(&self) -> Result<Instances<'_, LegQuotStatGrp<'_>>, InvalidValue> {
193        self.0.get_group(&LegQuotStatGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
194    }
195
196    /// The instances of the `NoQuoteQualifiers` (735) group.
197    #[doc(alias = "NoQuoteQualifiers")]
198    pub fn quote_qualifiers(&self) -> Result<Instances<'_, QuotQualGrp<'_>>, InvalidValue> {
199        self.0.get_group(&QuotQualGrp::TABLE, &Self::known_tags().get()).map(Instances::from)
200    }
201
202    /// The `ExpireTime` (126) field.
203    #[doc(alias = "ExpireTime")]
204    pub fn expire_time(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
205        self.0.get_utc_timestamp(Tag(126))
206    }
207
208    /// The `Price` (44) field.
209    #[doc(alias = "Price")]
210    pub fn price(&self) -> Result<Option<Decimal>, InvalidValue> {
211        self.0.get_decimal(Tag(44))
212    }
213
214    /// The `PriceType` (423) field.
215    #[doc(alias = "PriceType")]
216    pub fn price_type(&self) -> Result<Option<PriceType>, InvalidValue> {
217        Ok(self.0.get_int(Tag(423))?.map(PriceType::from_value))
218    }
219
220    /// The `SpreadOrBenchmarkCurveData` component.
221    pub fn spread_or_benchmark_curve_data(&self) -> SpreadOrBenchmarkCurveData<'_> {
222        SpreadOrBenchmarkCurveData(self.0.scope())
223    }
224
225    /// The `YieldData` component.
226    pub fn yield_data(&self) -> YieldData<'_> {
227        YieldData(self.0.scope())
228    }
229
230    /// The `BidPx` (132) field.
231    #[doc(alias = "BidPx")]
232    pub fn bid_px(&self) -> Result<Option<Decimal>, InvalidValue> {
233        self.0.get_decimal(Tag(132))
234    }
235
236    /// The `OfferPx` (133) field.
237    #[doc(alias = "OfferPx")]
238    pub fn offer_px(&self) -> Result<Option<Decimal>, InvalidValue> {
239        self.0.get_decimal(Tag(133))
240    }
241
242    /// The `MktBidPx` (645) field.
243    #[doc(alias = "MktBidPx")]
244    pub fn mkt_bid_px(&self) -> Result<Option<Decimal>, InvalidValue> {
245        self.0.get_decimal(Tag(645))
246    }
247
248    /// The `MktOfferPx` (646) field.
249    #[doc(alias = "MktOfferPx")]
250    pub fn mkt_offer_px(&self) -> Result<Option<Decimal>, InvalidValue> {
251        self.0.get_decimal(Tag(646))
252    }
253
254    /// The `MinBidSize` (647) field.
255    #[doc(alias = "MinBidSize")]
256    pub fn min_bid_size(&self) -> Result<Option<Decimal>, InvalidValue> {
257        self.0.get_decimal(Tag(647))
258    }
259
260    /// The `BidSize` (134) field.
261    #[doc(alias = "BidSize")]
262    pub fn bid_size(&self) -> Result<Option<Decimal>, InvalidValue> {
263        self.0.get_decimal(Tag(134))
264    }
265
266    /// The `MinOfferSize` (648) field.
267    #[doc(alias = "MinOfferSize")]
268    pub fn min_offer_size(&self) -> Result<Option<Decimal>, InvalidValue> {
269        self.0.get_decimal(Tag(648))
270    }
271
272    /// The `OfferSize` (135) field.
273    #[doc(alias = "OfferSize")]
274    pub fn offer_size(&self) -> Result<Option<Decimal>, InvalidValue> {
275        self.0.get_decimal(Tag(135))
276    }
277
278    /// The `ValidUntilTime` (62) field.
279    #[doc(alias = "ValidUntilTime")]
280    pub fn valid_until_time(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
281        self.0.get_utc_timestamp(Tag(62))
282    }
283
284    /// The `BidSpotRate` (188) field.
285    #[doc(alias = "BidSpotRate")]
286    pub fn bid_spot_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
287        self.0.get_decimal(Tag(188))
288    }
289
290    /// The `OfferSpotRate` (190) field.
291    #[doc(alias = "OfferSpotRate")]
292    pub fn offer_spot_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
293        self.0.get_decimal(Tag(190))
294    }
295
296    /// The `BidForwardPoints` (189) field.
297    #[doc(alias = "BidForwardPoints")]
298    pub fn bid_forward_points(&self) -> Result<Option<Decimal>, InvalidValue> {
299        self.0.get_decimal(Tag(189))
300    }
301
302    /// The `OfferForwardPoints` (191) field.
303    #[doc(alias = "OfferForwardPoints")]
304    pub fn offer_forward_points(&self) -> Result<Option<Decimal>, InvalidValue> {
305        self.0.get_decimal(Tag(191))
306    }
307
308    /// The `MidPx` (631) field.
309    #[doc(alias = "MidPx")]
310    pub fn mid_px(&self) -> Result<Option<Decimal>, InvalidValue> {
311        self.0.get_decimal(Tag(631))
312    }
313
314    /// The `BidYield` (632) field.
315    #[doc(alias = "BidYield")]
316    pub fn bid_yield(&self) -> Result<Option<Decimal>, InvalidValue> {
317        self.0.get_decimal(Tag(632))
318    }
319
320    /// The `MidYield` (633) field.
321    #[doc(alias = "MidYield")]
322    pub fn mid_yield(&self) -> Result<Option<Decimal>, InvalidValue> {
323        self.0.get_decimal(Tag(633))
324    }
325
326    /// The `OfferYield` (634) field.
327    #[doc(alias = "OfferYield")]
328    pub fn offer_yield(&self) -> Result<Option<Decimal>, InvalidValue> {
329        self.0.get_decimal(Tag(634))
330    }
331
332    /// The `TransactTime` (60) field.
333    #[doc(alias = "TransactTime")]
334    pub fn transact_time(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
335        self.0.get_utc_timestamp(Tag(60))
336    }
337
338    /// The `OrdType` (40) field.
339    #[doc(alias = "OrdType")]
340    pub fn ord_type(&self) -> Result<Option<OrdType<'_>>, InvalidValue> {
341        Ok(self.0.get_str(Tag(40))?.map(OrdType::from_value))
342    }
343
344    /// The `BidForwardPoints2` (642) field.
345    #[doc(alias = "BidForwardPoints2")]
346    pub fn bid_forward_points2(&self) -> Result<Option<Decimal>, InvalidValue> {
347        self.0.get_decimal(Tag(642))
348    }
349
350    /// The `OfferForwardPoints2` (643) field.
351    #[doc(alias = "OfferForwardPoints2")]
352    pub fn offer_forward_points2(&self) -> Result<Option<Decimal>, InvalidValue> {
353        self.0.get_decimal(Tag(643))
354    }
355
356    /// The `SettlCurrBidFxRate` (656) field.
357    #[doc(alias = "SettlCurrBidFxRate")]
358    pub fn settl_curr_bid_fx_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
359        self.0.get_decimal(Tag(656))
360    }
361
362    /// The `SettlCurrOfferFxRate` (657) field.
363    #[doc(alias = "SettlCurrOfferFxRate")]
364    pub fn settl_curr_offer_fx_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
365        self.0.get_decimal(Tag(657))
366    }
367
368    /// The `SettlCurrFxRateCalc` (156) field.
369    #[doc(alias = "SettlCurrFxRateCalc")]
370    pub fn settl_curr_fx_rate_calc(&self) -> Result<Option<SettlCurrFxRateCalc<'_>>, InvalidValue> {
371        Ok(self.0.get_str(Tag(156))?.map(SettlCurrFxRateCalc::from_value))
372    }
373
374    /// The `CommType` (13) field.
375    #[doc(alias = "CommType")]
376    pub fn comm_type(&self) -> Result<Option<CommType<'_>>, InvalidValue> {
377        Ok(self.0.get_str(Tag(13))?.map(CommType::from_value))
378    }
379
380    /// The `Commission` (12) field.
381    #[doc(alias = "Commission")]
382    pub fn commission(&self) -> Result<Option<Decimal>, InvalidValue> {
383        self.0.get_decimal(Tag(12))
384    }
385
386    /// The `CustOrderCapacity` (582) field.
387    #[doc(alias = "CustOrderCapacity")]
388    pub fn cust_order_capacity(&self) -> Result<Option<CustOrderCapacity>, InvalidValue> {
389        Ok(self.0.get_int(Tag(582))?.map(CustOrderCapacity::from_value))
390    }
391
392    /// The `ExDestination` (100) field.
393    #[doc(alias = "ExDestination")]
394    pub fn ex_destination(&self) -> Result<Option<&str>, InvalidValue> {
395        self.0.get_str(Tag(100))
396    }
397
398    /// The `QuoteStatus` (297) field.
399    #[doc(alias = "QuoteStatus")]
400    pub fn quote_status(&self) -> Result<Option<QuoteStatus>, InvalidValue> {
401        Ok(self.0.get_int(Tag(297))?.map(QuoteStatus::from_value))
402    }
403
404    /// The `Text` (58) field.
405    #[doc(alias = "Text")]
406    pub fn text(&self) -> Result<Option<&str>, InvalidValue> {
407        self.0.get_str(Tag(58))
408    }
409
410    /// The `EncodedTextLen` (354) field.
411    #[doc(alias = "EncodedTextLen")]
412    pub fn encoded_text_len(&self) -> Result<Option<i64>, InvalidValue> {
413        self.0.get_int(Tag(354))
414    }
415
416    /// The `EncodedText` (355) field.
417    #[doc(alias = "EncodedText")]
418    pub fn encoded_text(&self) -> Option<&[u8]> {
419        self.0.get(Tag(355))
420    }
421}
422
423impl std::fmt::Debug for QuoteStatusReport {
424    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
425        write!(f, "QuoteStatusReport({})", self.0)
426    }
427}
428
429impl std::fmt::Display for QuoteStatusReport {
430    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
431        std::fmt::Display::fmt(&self.0, f)
432    }
433}