Skip to main content

refix_fix42/generated/messages/
quote_acknowledgement.rs

1// @generated by refix codegen from FIX42.xml. Do not edit.
2#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{
5    Decimal, GroupTable, Instances, InvalidValue, LazyKnownTags, MonthYear, RawMessage, Tag,
6};
7
8use super::super::components::{Header, Trailer};
9use super::super::enums::{
10    IDSource, PutOrCall, QuoteEntryRejectReason, QuoteRejectReason, QuoteResponseLevel, QuoteStatus,
11    SecurityType,
12};
13
14/// The `QuoteAcknowledgement` (35=b) message.
15pub struct QuoteAcknowledgement(RawMessage);
16
17impl QuoteAcknowledgement {
18    pub const MSG_TYPE: &[u8] = b"b";
19
20    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
21        static TAGS: LazyKnownTags = LazyKnownTags::new(
22            &[Tag(131), Tag(117), Tag(297), Tag(300), Tag(301), Tag(336), Tag(58), Tag(296)],
23            &[
24                Header::known_tags(), Trailer::known_tags(),
25                QuoteAcknowledgementQuoteSets::known_tags(),
26            ],
27        );
28        &TAGS
29    }
30
31    pub fn from_raw(raw: RawMessage) -> Self {
32        Self(raw)
33    }
34
35    pub fn raw(&self) -> &RawMessage {
36        &self.0
37    }
38
39    pub fn header(&self) -> Header<'_> {
40        Header(self.0.scope())
41    }
42
43    pub fn trailer(&self) -> Trailer<'_> {
44        Trailer(self.0.scope())
45    }
46
47    /// The `QuoteReqID` (131) field.
48    #[doc(alias = "QuoteReqID")]
49    pub fn quote_req_id(&self) -> Result<Option<&str>, InvalidValue> {
50        self.0.get_str(Tag(131))
51    }
52
53    /// The `QuoteID` (117) field.
54    #[doc(alias = "QuoteID")]
55    pub fn quote_id(&self) -> Result<Option<&str>, InvalidValue> {
56        self.0.get_str(Tag(117))
57    }
58
59    /// The `QuoteStatus` (297) field.
60    #[doc(alias = "QuoteStatus")]
61    pub fn quote_status(&self) -> Result<Option<QuoteStatus>, InvalidValue> {
62        Ok(self.0.get_int(Tag(297))?.map(QuoteStatus::from_value))
63    }
64
65    /// The `QuoteRejectReason` (300) field.
66    #[doc(alias = "QuoteRejectReason")]
67    pub fn quote_reject_reason(&self) -> Result<Option<QuoteRejectReason>, InvalidValue> {
68        Ok(self.0.get_int(Tag(300))?.map(QuoteRejectReason::from_value))
69    }
70
71    /// The `QuoteResponseLevel` (301) field.
72    #[doc(alias = "QuoteResponseLevel")]
73    pub fn quote_response_level(&self) -> Result<Option<QuoteResponseLevel>, InvalidValue> {
74        Ok(self.0.get_int(Tag(301))?.map(QuoteResponseLevel::from_value))
75    }
76
77    /// The `TradingSessionID` (336) field.
78    #[doc(alias = "TradingSessionID")]
79    pub fn trading_session_id(&self) -> Result<Option<&str>, InvalidValue> {
80        self.0.get_str(Tag(336))
81    }
82
83    /// The `Text` (58) field.
84    #[doc(alias = "Text")]
85    pub fn text(&self) -> Result<Option<&str>, InvalidValue> {
86        self.0.get_str(Tag(58))
87    }
88
89    /// The instances of the `NoQuoteSets` (296) group.
90    #[doc(alias = "NoQuoteSets")]
91    pub fn quote_sets(&self) -> Result<Instances<'_, QuoteAcknowledgementQuoteSets<'_>>, InvalidValue> {
92        self.0.get_group(&QuoteAcknowledgementQuoteSets::TABLE, &Self::known_tags().get()).map(Instances::from)
93    }
94}
95
96impl std::fmt::Debug for QuoteAcknowledgement {
97    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
98        write!(f, "QuoteAcknowledgement({})", self.0)
99    }
100}
101
102impl std::fmt::Display for QuoteAcknowledgement {
103    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
104        std::fmt::Display::fmt(&self.0, f)
105    }
106}
107
108/// An instance of the `NoQuoteSets` (296) group.
109#[derive(Clone, Copy)]
110pub struct QuoteAcknowledgementQuoteSets<'a>(refix_message::Scope<'a>);
111
112impl<'a> From<refix_message::Scope<'a>> for QuoteAcknowledgementQuoteSets<'a> {
113    fn from(scope: refix_message::Scope<'a>) -> Self {
114        Self(scope)
115    }
116}
117
118impl<'a> QuoteAcknowledgementQuoteSets<'a> {
119    pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
120        Tag(296),
121        Tag(302),
122        &[
123            Tag(295), Tag(302), Tag(304), Tag(305), Tag(306), Tag(307), Tag(308), Tag(309),
124            Tag(310), Tag(311), Tag(312), Tag(313), Tag(314), Tag(315), Tag(316), Tag(317),
125            Tag(362), Tag(363), Tag(364), Tag(365), Tag(435), Tag(436),
126        ],
127        &[QuoteAcknowledgementQuoteSetsQuoteEntries::TABLE],
128    );
129
130    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
131        static TAGS: LazyKnownTags = LazyKnownTags::new(
132            &[
133                Tag(302), Tag(311), Tag(312), Tag(309), Tag(305), Tag(310), Tag(313), Tag(314),
134                Tag(315), Tag(316), Tag(317), Tag(436), Tag(435), Tag(308), Tag(306), Tag(362),
135                Tag(363), Tag(307), Tag(364), Tag(365), Tag(304), Tag(295),
136            ],
137            &[QuoteAcknowledgementQuoteSetsQuoteEntries::known_tags()],
138        );
139        &TAGS
140    }
141
142    pub fn raw(&self) -> refix_message::Scope<'a> {
143        self.0
144    }
145
146    /// The `QuoteSetID` (302) field.
147    #[doc(alias = "QuoteSetID")]
148    pub fn quote_set_id(&self) -> Result<Option<&'a str>, InvalidValue> {
149        self.0.get_str(Tag(302))
150    }
151
152    /// The `UnderlyingSymbol` (311) field.
153    #[doc(alias = "UnderlyingSymbol")]
154    pub fn underlying_symbol(&self) -> Result<Option<&'a str>, InvalidValue> {
155        self.0.get_str(Tag(311))
156    }
157
158    /// The `UnderlyingSymbolSfx` (312) field.
159    #[doc(alias = "UnderlyingSymbolSfx")]
160    pub fn underlying_symbol_sfx(&self) -> Result<Option<&'a str>, InvalidValue> {
161        self.0.get_str(Tag(312))
162    }
163
164    /// The `UnderlyingSecurityID` (309) field.
165    #[doc(alias = "UnderlyingSecurityID")]
166    pub fn underlying_security_id(&self) -> Result<Option<&'a str>, InvalidValue> {
167        self.0.get_str(Tag(309))
168    }
169
170    /// The `UnderlyingIDSource` (305) field.
171    #[doc(alias = "UnderlyingIDSource")]
172    pub fn underlying_id_source(&self) -> Result<Option<&'a str>, InvalidValue> {
173        self.0.get_str(Tag(305))
174    }
175
176    /// The `UnderlyingSecurityType` (310) field.
177    #[doc(alias = "UnderlyingSecurityType")]
178    pub fn underlying_security_type(&self) -> Result<Option<&'a str>, InvalidValue> {
179        self.0.get_str(Tag(310))
180    }
181
182    /// The `UnderlyingMaturityMonthYear` (313) field.
183    #[doc(alias = "UnderlyingMaturityMonthYear")]
184    pub fn underlying_maturity_month_year(&self) -> Result<Option<MonthYear>, InvalidValue> {
185        self.0.get_month_year(Tag(313))
186    }
187
188    /// The `UnderlyingMaturityDay` (314) field.
189    #[doc(alias = "UnderlyingMaturityDay")]
190    pub fn underlying_maturity_day(&self) -> Result<Option<i64>, InvalidValue> {
191        self.0.get_int(Tag(314))
192    }
193
194    /// The `UnderlyingPutOrCall` (315) field.
195    #[doc(alias = "UnderlyingPutOrCall")]
196    pub fn underlying_put_or_call(&self) -> Result<Option<i64>, InvalidValue> {
197        self.0.get_int(Tag(315))
198    }
199
200    /// The `UnderlyingStrikePrice` (316) field.
201    #[doc(alias = "UnderlyingStrikePrice")]
202    pub fn underlying_strike_price(&self) -> Result<Option<Decimal>, InvalidValue> {
203        self.0.get_decimal(Tag(316))
204    }
205
206    /// The `UnderlyingOptAttribute` (317) field.
207    #[doc(alias = "UnderlyingOptAttribute")]
208    pub fn underlying_opt_attribute(&self) -> Result<Option<&'a str>, InvalidValue> {
209        self.0.get_str(Tag(317))
210    }
211
212    /// The `UnderlyingContractMultiplier` (436) field.
213    #[doc(alias = "UnderlyingContractMultiplier")]
214    pub fn underlying_contract_multiplier(&self) -> Result<Option<Decimal>, InvalidValue> {
215        self.0.get_decimal(Tag(436))
216    }
217
218    /// The `UnderlyingCouponRate` (435) field.
219    #[doc(alias = "UnderlyingCouponRate")]
220    pub fn underlying_coupon_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
221        self.0.get_decimal(Tag(435))
222    }
223
224    /// The `UnderlyingSecurityExchange` (308) field.
225    #[doc(alias = "UnderlyingSecurityExchange")]
226    pub fn underlying_security_exchange(&self) -> Result<Option<&'a str>, InvalidValue> {
227        self.0.get_str(Tag(308))
228    }
229
230    /// The `UnderlyingIssuer` (306) field.
231    #[doc(alias = "UnderlyingIssuer")]
232    pub fn underlying_issuer(&self) -> Result<Option<&'a str>, InvalidValue> {
233        self.0.get_str(Tag(306))
234    }
235
236    /// The `EncodedUnderlyingIssuerLen` (362) field.
237    #[doc(alias = "EncodedUnderlyingIssuerLen")]
238    pub fn encoded_underlying_issuer_len(&self) -> Result<Option<i64>, InvalidValue> {
239        self.0.get_int(Tag(362))
240    }
241
242    /// The `EncodedUnderlyingIssuer` (363) field.
243    #[doc(alias = "EncodedUnderlyingIssuer")]
244    pub fn encoded_underlying_issuer(&self) -> Option<&'a [u8]> {
245        self.0.get(Tag(363))
246    }
247
248    /// The `UnderlyingSecurityDesc` (307) field.
249    #[doc(alias = "UnderlyingSecurityDesc")]
250    pub fn underlying_security_desc(&self) -> Result<Option<&'a str>, InvalidValue> {
251        self.0.get_str(Tag(307))
252    }
253
254    /// The `EncodedUnderlyingSecurityDescLen` (364) field.
255    #[doc(alias = "EncodedUnderlyingSecurityDescLen")]
256    pub fn encoded_underlying_security_desc_len(&self) -> Result<Option<i64>, InvalidValue> {
257        self.0.get_int(Tag(364))
258    }
259
260    /// The `EncodedUnderlyingSecurityDesc` (365) field.
261    #[doc(alias = "EncodedUnderlyingSecurityDesc")]
262    pub fn encoded_underlying_security_desc(&self) -> Option<&'a [u8]> {
263        self.0.get(Tag(365))
264    }
265
266    /// The `TotQuoteEntries` (304) field.
267    #[doc(alias = "TotQuoteEntries")]
268    pub fn tot_quote_entries(&self) -> Result<Option<i64>, InvalidValue> {
269        self.0.get_int(Tag(304))
270    }
271
272    /// The instances of the `NoQuoteEntries` (295) group.
273    #[doc(alias = "NoQuoteEntries")]
274    pub fn quote_entries(&self) -> Result<Instances<'a, QuoteAcknowledgementQuoteSetsQuoteEntries<'a>>, InvalidValue> {
275        self.0.get_group(&QuoteAcknowledgementQuoteSetsQuoteEntries::TABLE, &Self::known_tags().get()).map(Instances::from)
276    }
277}
278
279impl std::fmt::Debug for QuoteAcknowledgementQuoteSets<'_> {
280    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
281        write!(f, "QuoteAcknowledgementQuoteSets({})", self.0)
282    }
283}
284
285/// An instance of the `NoQuoteEntries` (295) group.
286#[derive(Clone, Copy)]
287pub struct QuoteAcknowledgementQuoteSetsQuoteEntries<'a>(refix_message::Scope<'a>);
288
289impl<'a> From<refix_message::Scope<'a>> for QuoteAcknowledgementQuoteSetsQuoteEntries<'a> {
290    fn from(scope: refix_message::Scope<'a>) -> Self {
291        Self(scope)
292    }
293}
294
295impl<'a> QuoteAcknowledgementQuoteSetsQuoteEntries<'a> {
296    pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
297        Tag(295),
298        Tag(299),
299        &[
300            Tag(22), Tag(48), Tag(55), Tag(65), Tag(106), Tag(107), Tag(167), Tag(200), Tag(201),
301            Tag(202), Tag(205), Tag(206), Tag(207), Tag(223), Tag(231), Tag(299), Tag(348),
302            Tag(349), Tag(350), Tag(351), Tag(368),
303        ],
304        &[],
305    );
306
307    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
308        static TAGS: LazyKnownTags = LazyKnownTags::new(
309            &[
310                Tag(299), Tag(55), Tag(65), Tag(48), Tag(22), Tag(167), Tag(200), Tag(205),
311                Tag(201), Tag(202), Tag(206), Tag(231), Tag(223), Tag(207), Tag(106), Tag(348),
312                Tag(349), Tag(107), Tag(350), Tag(351), Tag(368),
313            ],
314            &[],
315        );
316        &TAGS
317    }
318
319    pub fn raw(&self) -> refix_message::Scope<'a> {
320        self.0
321    }
322
323    /// The `QuoteEntryID` (299) field.
324    #[doc(alias = "QuoteEntryID")]
325    pub fn quote_entry_id(&self) -> Result<Option<&'a str>, InvalidValue> {
326        self.0.get_str(Tag(299))
327    }
328
329    /// The `Symbol` (55) field.
330    #[doc(alias = "Symbol")]
331    pub fn symbol(&self) -> Result<Option<&'a str>, InvalidValue> {
332        self.0.get_str(Tag(55))
333    }
334
335    /// The `SymbolSfx` (65) field.
336    #[doc(alias = "SymbolSfx")]
337    pub fn symbol_sfx(&self) -> Result<Option<&'a str>, InvalidValue> {
338        self.0.get_str(Tag(65))
339    }
340
341    /// The `SecurityID` (48) field.
342    #[doc(alias = "SecurityID")]
343    pub fn security_id(&self) -> Result<Option<&'a str>, InvalidValue> {
344        self.0.get_str(Tag(48))
345    }
346
347    /// The `IDSource` (22) field.
348    #[doc(alias = "IDSource")]
349    pub fn id_source(&self) -> Result<Option<IDSource<'a>>, InvalidValue> {
350        Ok(self.0.get_str(Tag(22))?.map(IDSource::from_value))
351    }
352
353    /// The `SecurityType` (167) field.
354    #[doc(alias = "SecurityType")]
355    pub fn security_type(&self) -> Result<Option<SecurityType<'a>>, InvalidValue> {
356        Ok(self.0.get_str(Tag(167))?.map(SecurityType::from_value))
357    }
358
359    /// The `MaturityMonthYear` (200) field.
360    #[doc(alias = "MaturityMonthYear")]
361    pub fn maturity_month_year(&self) -> Result<Option<MonthYear>, InvalidValue> {
362        self.0.get_month_year(Tag(200))
363    }
364
365    /// The `MaturityDay` (205) field.
366    #[doc(alias = "MaturityDay")]
367    pub fn maturity_day(&self) -> Result<Option<i64>, InvalidValue> {
368        self.0.get_int(Tag(205))
369    }
370
371    /// The `PutOrCall` (201) field.
372    #[doc(alias = "PutOrCall")]
373    pub fn put_or_call(&self) -> Result<Option<PutOrCall>, InvalidValue> {
374        Ok(self.0.get_int(Tag(201))?.map(PutOrCall::from_value))
375    }
376
377    /// The `StrikePrice` (202) field.
378    #[doc(alias = "StrikePrice")]
379    pub fn strike_price(&self) -> Result<Option<Decimal>, InvalidValue> {
380        self.0.get_decimal(Tag(202))
381    }
382
383    /// The `OptAttribute` (206) field.
384    #[doc(alias = "OptAttribute")]
385    pub fn opt_attribute(&self) -> Result<Option<&'a str>, InvalidValue> {
386        self.0.get_str(Tag(206))
387    }
388
389    /// The `ContractMultiplier` (231) field.
390    #[doc(alias = "ContractMultiplier")]
391    pub fn contract_multiplier(&self) -> Result<Option<Decimal>, InvalidValue> {
392        self.0.get_decimal(Tag(231))
393    }
394
395    /// The `CouponRate` (223) field.
396    #[doc(alias = "CouponRate")]
397    pub fn coupon_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
398        self.0.get_decimal(Tag(223))
399    }
400
401    /// The `SecurityExchange` (207) field.
402    #[doc(alias = "SecurityExchange")]
403    pub fn security_exchange(&self) -> Result<Option<&'a str>, InvalidValue> {
404        self.0.get_str(Tag(207))
405    }
406
407    /// The `Issuer` (106) field.
408    #[doc(alias = "Issuer")]
409    pub fn issuer(&self) -> Result<Option<&'a str>, InvalidValue> {
410        self.0.get_str(Tag(106))
411    }
412
413    /// The `EncodedIssuerLen` (348) field.
414    #[doc(alias = "EncodedIssuerLen")]
415    pub fn encoded_issuer_len(&self) -> Result<Option<i64>, InvalidValue> {
416        self.0.get_int(Tag(348))
417    }
418
419    /// The `EncodedIssuer` (349) field.
420    #[doc(alias = "EncodedIssuer")]
421    pub fn encoded_issuer(&self) -> Option<&'a [u8]> {
422        self.0.get(Tag(349))
423    }
424
425    /// The `SecurityDesc` (107) field.
426    #[doc(alias = "SecurityDesc")]
427    pub fn security_desc(&self) -> Result<Option<&'a str>, InvalidValue> {
428        self.0.get_str(Tag(107))
429    }
430
431    /// The `EncodedSecurityDescLen` (350) field.
432    #[doc(alias = "EncodedSecurityDescLen")]
433    pub fn encoded_security_desc_len(&self) -> Result<Option<i64>, InvalidValue> {
434        self.0.get_int(Tag(350))
435    }
436
437    /// The `EncodedSecurityDesc` (351) field.
438    #[doc(alias = "EncodedSecurityDesc")]
439    pub fn encoded_security_desc(&self) -> Option<&'a [u8]> {
440        self.0.get(Tag(351))
441    }
442
443    /// The `QuoteEntryRejectReason` (368) field.
444    #[doc(alias = "QuoteEntryRejectReason")]
445    pub fn quote_entry_reject_reason(&self) -> Result<Option<QuoteEntryRejectReason>, InvalidValue> {
446        Ok(self.0.get_int(Tag(368))?.map(QuoteEntryRejectReason::from_value))
447    }
448}
449
450impl std::fmt::Debug for QuoteAcknowledgementQuoteSetsQuoteEntries<'_> {
451    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
452        write!(f, "QuoteAcknowledgementQuoteSetsQuoteEntries({})", self.0)
453    }
454}