Skip to main content

fixer_fix/fix42/
execution_report.rs

1// Code generated by fixer-gen. DO NOT EDIT.
2#![allow(clippy::new_without_default)]
3#![allow(clippy::needless_pass_by_value)]
4#![allow(clippy::too_many_arguments)]
5#![allow(unused_imports)]
6
7use fixer::message::Message;
8use fixer::fix_string::FIXString;
9use fixer::errors::MessageRejectErrorEnum;
10use fixer::session::session_id::SessionID;
11
12use rust_decimal::Decimal;
13
14
15use jiff::Timestamp;
16
17use crate::field;
18use crate::tag;
19
20/// `ExecutionReport` is the `fix42` `ExecutionReport` type, `MsgType` = 8.
21pub struct ExecutionReport {
22    pub message: Message,
23}
24
25impl ExecutionReport {
26    /// Creates a new `ExecutionReport` with required fields.
27    pub fn new(order_id: field::OrderIDField, exec_id: field::ExecIDField, exec_trans_type: field::ExecTransTypeField, exec_type: field::ExecTypeField, ord_status: field::OrdStatusField, symbol: field::SymbolField, side: field::SideField, leaves_qty: field::LeavesQtyField, cum_qty: field::CumQtyField, avg_px: field::AvgPxField) -> Self {
28        let mut msg = Message::new();
29        msg.header.set_field(tag::MSG_TYPE, FIXString::from("8".to_string()));
30
31        msg.body.set_field(tag::ORDER_ID, order_id.0);
32
33        msg.body.set_field(tag::EXEC_ID, exec_id.0);
34
35        msg.body.set_field(tag::EXEC_TRANS_TYPE, exec_trans_type.0);
36
37        msg.body.set_field(tag::EXEC_TYPE, exec_type.0);
38
39        msg.body.set_field(tag::ORD_STATUS, ord_status.0);
40
41        msg.body.set_field(tag::SYMBOL, symbol.0);
42
43        msg.body.set_field(tag::SIDE, side.0);
44
45        msg.body.set_field(tag::LEAVES_QTY, leaves_qty.0);
46
47        msg.body.set_field(tag::CUM_QTY, cum_qty.0);
48
49        msg.body.set_field(tag::AVG_PX, avg_px.0);
50
51        Self { message: msg }
52    }
53
54    /// Creates a `ExecutionReport` from an existing `Message`.
55    pub fn from_message(msg: Message) -> Self {
56        Self { message: msg }
57    }
58
59    /// Returns the underlying `Message`.
60    pub fn to_message(self) -> Message {
61        self.message
62    }
63
64
65
66
67    /// Sets `Account`, Tag 1.
68    pub fn set_account(&mut self, v: String) {
69        self.message.body.set_field(tag::ACCOUNT, FIXString::from(v));
70    }
71
72    /// Gets `Account`, Tag 1.
73    pub fn get_account(&self) -> Result<String, MessageRejectErrorEnum> {
74        let mut fld = field::AccountField::new(String::new());
75        self.message.body.get_field(tag::ACCOUNT, &mut fld.0)?;
76        Ok(fld.value().to_string())
77    }
78
79
80    /// Returns true if `Account` is present, Tag 1.
81    pub fn has_account(&self) -> bool {
82        self.message.body.has(tag::ACCOUNT)
83    }
84
85
86
87
88    /// Sets `AvgPx`, Tag 6.
89    pub fn set_avg_px(&mut self, val: Decimal, scale: i32) {
90        self.message.body.set_field(tag::AVG_PX, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
91    }
92
93    /// Gets `AvgPx`, Tag 6.
94    pub fn get_avg_px(&self) -> Result<Decimal, MessageRejectErrorEnum> {
95        let mut fld = field::AvgPxField::new(Decimal::ZERO, 0);
96        self.message.body.get_field(tag::AVG_PX, &mut fld.0)?;
97        Ok(fld.value())
98    }
99
100
101    /// Returns true if `AvgPx` is present, Tag 6.
102    pub fn has_avg_px(&self) -> bool {
103        self.message.body.has(tag::AVG_PX)
104    }
105
106
107
108
109    /// Sets `CashOrderQty`, Tag 152.
110    pub fn set_cash_order_qty(&mut self, val: Decimal, scale: i32) {
111        self.message.body.set_field(tag::CASH_ORDER_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
112    }
113
114    /// Gets `CashOrderQty`, Tag 152.
115    pub fn get_cash_order_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
116        let mut fld = field::CashOrderQtyField::new(Decimal::ZERO, 0);
117        self.message.body.get_field(tag::CASH_ORDER_QTY, &mut fld.0)?;
118        Ok(fld.value())
119    }
120
121
122    /// Returns true if `CashOrderQty` is present, Tag 152.
123    pub fn has_cash_order_qty(&self) -> bool {
124        self.message.body.has(tag::CASH_ORDER_QTY)
125    }
126
127
128
129
130    /// Sets `ClOrdID`, Tag 11.
131    pub fn set_cl_ord_id(&mut self, v: String) {
132        self.message.body.set_field(tag::CL_ORD_ID, FIXString::from(v));
133    }
134
135    /// Gets `ClOrdID`, Tag 11.
136    pub fn get_cl_ord_id(&self) -> Result<String, MessageRejectErrorEnum> {
137        let mut fld = field::ClOrdIDField::new(String::new());
138        self.message.body.get_field(tag::CL_ORD_ID, &mut fld.0)?;
139        Ok(fld.value().to_string())
140    }
141
142
143    /// Returns true if `ClOrdID` is present, Tag 11.
144    pub fn has_cl_ord_id(&self) -> bool {
145        self.message.body.has(tag::CL_ORD_ID)
146    }
147
148
149
150
151    /// Sets `ClearingAccount`, Tag 440.
152    pub fn set_clearing_account(&mut self, v: String) {
153        self.message.body.set_field(tag::CLEARING_ACCOUNT, FIXString::from(v));
154    }
155
156    /// Gets `ClearingAccount`, Tag 440.
157    pub fn get_clearing_account(&self) -> Result<String, MessageRejectErrorEnum> {
158        let mut fld = field::ClearingAccountField::new(String::new());
159        self.message.body.get_field(tag::CLEARING_ACCOUNT, &mut fld.0)?;
160        Ok(fld.value().to_string())
161    }
162
163
164    /// Returns true if `ClearingAccount` is present, Tag 440.
165    pub fn has_clearing_account(&self) -> bool {
166        self.message.body.has(tag::CLEARING_ACCOUNT)
167    }
168
169
170
171
172    /// Sets `ClearingFirm`, Tag 439.
173    pub fn set_clearing_firm(&mut self, v: String) {
174        self.message.body.set_field(tag::CLEARING_FIRM, FIXString::from(v));
175    }
176
177    /// Gets `ClearingFirm`, Tag 439.
178    pub fn get_clearing_firm(&self) -> Result<String, MessageRejectErrorEnum> {
179        let mut fld = field::ClearingFirmField::new(String::new());
180        self.message.body.get_field(tag::CLEARING_FIRM, &mut fld.0)?;
181        Ok(fld.value().to_string())
182    }
183
184
185    /// Returns true if `ClearingFirm` is present, Tag 439.
186    pub fn has_clearing_firm(&self) -> bool {
187        self.message.body.has(tag::CLEARING_FIRM)
188    }
189
190
191
192
193    /// Sets `ClientID`, Tag 109.
194    pub fn set_client_id(&mut self, v: String) {
195        self.message.body.set_field(tag::CLIENT_ID, FIXString::from(v));
196    }
197
198    /// Gets `ClientID`, Tag 109.
199    pub fn get_client_id(&self) -> Result<String, MessageRejectErrorEnum> {
200        let mut fld = field::ClientIDField::new(String::new());
201        self.message.body.get_field(tag::CLIENT_ID, &mut fld.0)?;
202        Ok(fld.value().to_string())
203    }
204
205
206    /// Returns true if `ClientID` is present, Tag 109.
207    pub fn has_client_id(&self) -> bool {
208        self.message.body.has(tag::CLIENT_ID)
209    }
210
211
212
213
214    /// Sets `CommType`, Tag 13.
215    pub fn set_comm_type(&mut self, v: String) {
216        self.message.body.set_field(tag::COMM_TYPE, FIXString::from(v));
217    }
218
219    /// Gets `CommType`, Tag 13.
220    pub fn get_comm_type(&self) -> Result<String, MessageRejectErrorEnum> {
221        let mut fld = field::CommTypeField::new(String::new());
222        self.message.body.get_field(tag::COMM_TYPE, &mut fld.0)?;
223        Ok(fld.value().to_string())
224    }
225
226
227    /// Returns true if `CommType` is present, Tag 13.
228    pub fn has_comm_type(&self) -> bool {
229        self.message.body.has(tag::COMM_TYPE)
230    }
231
232
233
234
235    /// Sets `Commission`, Tag 12.
236    pub fn set_commission(&mut self, val: Decimal, scale: i32) {
237        self.message.body.set_field(tag::COMMISSION, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
238    }
239
240    /// Gets `Commission`, Tag 12.
241    pub fn get_commission(&self) -> Result<Decimal, MessageRejectErrorEnum> {
242        let mut fld = field::CommissionField::new(Decimal::ZERO, 0);
243        self.message.body.get_field(tag::COMMISSION, &mut fld.0)?;
244        Ok(fld.value())
245    }
246
247
248    /// Returns true if `Commission` is present, Tag 12.
249    pub fn has_commission(&self) -> bool {
250        self.message.body.has(tag::COMMISSION)
251    }
252
253
254
255
256    /// Sets `ComplianceID`, Tag 376.
257    pub fn set_compliance_id(&mut self, v: String) {
258        self.message.body.set_field(tag::COMPLIANCE_ID, FIXString::from(v));
259    }
260
261    /// Gets `ComplianceID`, Tag 376.
262    pub fn get_compliance_id(&self) -> Result<String, MessageRejectErrorEnum> {
263        let mut fld = field::ComplianceIDField::new(String::new());
264        self.message.body.get_field(tag::COMPLIANCE_ID, &mut fld.0)?;
265        Ok(fld.value().to_string())
266    }
267
268
269    /// Returns true if `ComplianceID` is present, Tag 376.
270    pub fn has_compliance_id(&self) -> bool {
271        self.message.body.has(tag::COMPLIANCE_ID)
272    }
273
274
275
276
277    /// Sets `ContractMultiplier`, Tag 231.
278    pub fn set_contract_multiplier(&mut self, val: Decimal, scale: i32) {
279        self.message.body.set_field(tag::CONTRACT_MULTIPLIER, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
280    }
281
282    /// Gets `ContractMultiplier`, Tag 231.
283    pub fn get_contract_multiplier(&self) -> Result<Decimal, MessageRejectErrorEnum> {
284        let mut fld = field::ContractMultiplierField::new(Decimal::ZERO, 0);
285        self.message.body.get_field(tag::CONTRACT_MULTIPLIER, &mut fld.0)?;
286        Ok(fld.value())
287    }
288
289
290    /// Returns true if `ContractMultiplier` is present, Tag 231.
291    pub fn has_contract_multiplier(&self) -> bool {
292        self.message.body.has(tag::CONTRACT_MULTIPLIER)
293    }
294
295
296
297
298    /// Sets `CouponRate`, Tag 223.
299    pub fn set_coupon_rate(&mut self, val: Decimal, scale: i32) {
300        self.message.body.set_field(tag::COUPON_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
301    }
302
303    /// Gets `CouponRate`, Tag 223.
304    pub fn get_coupon_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
305        let mut fld = field::CouponRateField::new(Decimal::ZERO, 0);
306        self.message.body.get_field(tag::COUPON_RATE, &mut fld.0)?;
307        Ok(fld.value())
308    }
309
310
311    /// Returns true if `CouponRate` is present, Tag 223.
312    pub fn has_coupon_rate(&self) -> bool {
313        self.message.body.has(tag::COUPON_RATE)
314    }
315
316
317
318
319    /// Sets `CumQty`, Tag 14.
320    pub fn set_cum_qty(&mut self, val: Decimal, scale: i32) {
321        self.message.body.set_field(tag::CUM_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
322    }
323
324    /// Gets `CumQty`, Tag 14.
325    pub fn get_cum_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
326        let mut fld = field::CumQtyField::new(Decimal::ZERO, 0);
327        self.message.body.get_field(tag::CUM_QTY, &mut fld.0)?;
328        Ok(fld.value())
329    }
330
331
332    /// Returns true if `CumQty` is present, Tag 14.
333    pub fn has_cum_qty(&self) -> bool {
334        self.message.body.has(tag::CUM_QTY)
335    }
336
337
338
339
340    /// Sets `Currency`, Tag 15.
341    pub fn set_currency(&mut self, v: String) {
342        self.message.body.set_field(tag::CURRENCY, FIXString::from(v));
343    }
344
345    /// Gets `Currency`, Tag 15.
346    pub fn get_currency(&self) -> Result<String, MessageRejectErrorEnum> {
347        let mut fld = field::CurrencyField::new(String::new());
348        self.message.body.get_field(tag::CURRENCY, &mut fld.0)?;
349        Ok(fld.value().to_string())
350    }
351
352
353    /// Returns true if `Currency` is present, Tag 15.
354    pub fn has_currency(&self) -> bool {
355        self.message.body.has(tag::CURRENCY)
356    }
357
358
359
360
361    /// Sets `DayAvgPx`, Tag 426.
362    pub fn set_day_avg_px(&mut self, val: Decimal, scale: i32) {
363        self.message.body.set_field(tag::DAY_AVG_PX, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
364    }
365
366    /// Gets `DayAvgPx`, Tag 426.
367    pub fn get_day_avg_px(&self) -> Result<Decimal, MessageRejectErrorEnum> {
368        let mut fld = field::DayAvgPxField::new(Decimal::ZERO, 0);
369        self.message.body.get_field(tag::DAY_AVG_PX, &mut fld.0)?;
370        Ok(fld.value())
371    }
372
373
374    /// Returns true if `DayAvgPx` is present, Tag 426.
375    pub fn has_day_avg_px(&self) -> bool {
376        self.message.body.has(tag::DAY_AVG_PX)
377    }
378
379
380
381
382    /// Sets `DayCumQty`, Tag 425.
383    pub fn set_day_cum_qty(&mut self, val: Decimal, scale: i32) {
384        self.message.body.set_field(tag::DAY_CUM_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
385    }
386
387    /// Gets `DayCumQty`, Tag 425.
388    pub fn get_day_cum_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
389        let mut fld = field::DayCumQtyField::new(Decimal::ZERO, 0);
390        self.message.body.get_field(tag::DAY_CUM_QTY, &mut fld.0)?;
391        Ok(fld.value())
392    }
393
394
395    /// Returns true if `DayCumQty` is present, Tag 425.
396    pub fn has_day_cum_qty(&self) -> bool {
397        self.message.body.has(tag::DAY_CUM_QTY)
398    }
399
400
401
402
403    /// Sets `DayOrderQty`, Tag 424.
404    pub fn set_day_order_qty(&mut self, val: Decimal, scale: i32) {
405        self.message.body.set_field(tag::DAY_ORDER_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
406    }
407
408    /// Gets `DayOrderQty`, Tag 424.
409    pub fn get_day_order_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
410        let mut fld = field::DayOrderQtyField::new(Decimal::ZERO, 0);
411        self.message.body.get_field(tag::DAY_ORDER_QTY, &mut fld.0)?;
412        Ok(fld.value())
413    }
414
415
416    /// Returns true if `DayOrderQty` is present, Tag 424.
417    pub fn has_day_order_qty(&self) -> bool {
418        self.message.body.has(tag::DAY_ORDER_QTY)
419    }
420
421
422
423
424    /// Sets `DiscretionInst`, Tag 388.
425    pub fn set_discretion_inst(&mut self, v: String) {
426        self.message.body.set_field(tag::DISCRETION_INST, FIXString::from(v));
427    }
428
429    /// Gets `DiscretionInst`, Tag 388.
430    pub fn get_discretion_inst(&self) -> Result<String, MessageRejectErrorEnum> {
431        let mut fld = field::DiscretionInstField::new(String::new());
432        self.message.body.get_field(tag::DISCRETION_INST, &mut fld.0)?;
433        Ok(fld.value().to_string())
434    }
435
436
437    /// Returns true if `DiscretionInst` is present, Tag 388.
438    pub fn has_discretion_inst(&self) -> bool {
439        self.message.body.has(tag::DISCRETION_INST)
440    }
441
442
443
444
445    /// Sets `DiscretionOffset`, Tag 389.
446    pub fn set_discretion_offset(&mut self, val: Decimal, scale: i32) {
447        self.message.body.set_field(tag::DISCRETION_OFFSET, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
448    }
449
450    /// Gets `DiscretionOffset`, Tag 389.
451    pub fn get_discretion_offset(&self) -> Result<Decimal, MessageRejectErrorEnum> {
452        let mut fld = field::DiscretionOffsetField::new(Decimal::ZERO, 0);
453        self.message.body.get_field(tag::DISCRETION_OFFSET, &mut fld.0)?;
454        Ok(fld.value())
455    }
456
457
458    /// Returns true if `DiscretionOffset` is present, Tag 389.
459    pub fn has_discretion_offset(&self) -> bool {
460        self.message.body.has(tag::DISCRETION_OFFSET)
461    }
462
463
464
465
466    /// Sets `EffectiveTime`, Tag 168.
467    pub fn set_effective_time(&mut self, v: Timestamp) {
468        self.message.body.set_field(tag::EFFECTIVE_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
469            time: v,
470            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
471        });
472    }
473
474    /// Gets `EffectiveTime`, Tag 168.
475    pub fn get_effective_time(&self) -> Result<Timestamp, MessageRejectErrorEnum> {
476        let mut fld = field::EffectiveTimeField::new(Timestamp::UNIX_EPOCH);
477        self.message.body.get_field(tag::EFFECTIVE_TIME, &mut fld.0)?;
478        Ok(fld.value())
479    }
480
481
482    /// Returns true if `EffectiveTime` is present, Tag 168.
483    pub fn has_effective_time(&self) -> bool {
484        self.message.body.has(tag::EFFECTIVE_TIME)
485    }
486
487
488
489
490    /// Sets `EncodedIssuer`, Tag 349.
491    pub fn set_encoded_issuer(&mut self, v: String) {
492        self.message.body.set_field(tag::ENCODED_ISSUER, FIXString::from(v));
493    }
494
495    /// Gets `EncodedIssuer`, Tag 349.
496    pub fn get_encoded_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
497        let mut fld = field::EncodedIssuerField::new(String::new());
498        self.message.body.get_field(tag::ENCODED_ISSUER, &mut fld.0)?;
499        Ok(fld.value().to_string())
500    }
501
502
503    /// Returns true if `EncodedIssuer` is present, Tag 349.
504    pub fn has_encoded_issuer(&self) -> bool {
505        self.message.body.has(tag::ENCODED_ISSUER)
506    }
507
508
509
510
511    /// Sets `EncodedIssuerLen`, Tag 348.
512    pub fn set_encoded_issuer_len(&mut self, v: isize) {
513        self.message.body.set_field(tag::ENCODED_ISSUER_LEN, fixer::fix_int::FIXInt::from(v));
514    }
515
516    /// Gets `EncodedIssuerLen`, Tag 348.
517    pub fn get_encoded_issuer_len(&self) -> Result<isize, MessageRejectErrorEnum> {
518        let mut fld = field::EncodedIssuerLenField::new(0);
519        self.message.body.get_field(tag::ENCODED_ISSUER_LEN, &mut fld.0)?;
520        Ok(fld.value())
521    }
522
523
524    /// Returns true if `EncodedIssuerLen` is present, Tag 348.
525    pub fn has_encoded_issuer_len(&self) -> bool {
526        self.message.body.has(tag::ENCODED_ISSUER_LEN)
527    }
528
529
530
531
532    /// Sets `EncodedSecurityDesc`, Tag 351.
533    pub fn set_encoded_security_desc(&mut self, v: String) {
534        self.message.body.set_field(tag::ENCODED_SECURITY_DESC, FIXString::from(v));
535    }
536
537    /// Gets `EncodedSecurityDesc`, Tag 351.
538    pub fn get_encoded_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
539        let mut fld = field::EncodedSecurityDescField::new(String::new());
540        self.message.body.get_field(tag::ENCODED_SECURITY_DESC, &mut fld.0)?;
541        Ok(fld.value().to_string())
542    }
543
544
545    /// Returns true if `EncodedSecurityDesc` is present, Tag 351.
546    pub fn has_encoded_security_desc(&self) -> bool {
547        self.message.body.has(tag::ENCODED_SECURITY_DESC)
548    }
549
550
551
552
553    /// Sets `EncodedSecurityDescLen`, Tag 350.
554    pub fn set_encoded_security_desc_len(&mut self, v: isize) {
555        self.message.body.set_field(tag::ENCODED_SECURITY_DESC_LEN, fixer::fix_int::FIXInt::from(v));
556    }
557
558    /// Gets `EncodedSecurityDescLen`, Tag 350.
559    pub fn get_encoded_security_desc_len(&self) -> Result<isize, MessageRejectErrorEnum> {
560        let mut fld = field::EncodedSecurityDescLenField::new(0);
561        self.message.body.get_field(tag::ENCODED_SECURITY_DESC_LEN, &mut fld.0)?;
562        Ok(fld.value())
563    }
564
565
566    /// Returns true if `EncodedSecurityDescLen` is present, Tag 350.
567    pub fn has_encoded_security_desc_len(&self) -> bool {
568        self.message.body.has(tag::ENCODED_SECURITY_DESC_LEN)
569    }
570
571
572
573
574    /// Sets `EncodedText`, Tag 355.
575    pub fn set_encoded_text(&mut self, v: String) {
576        self.message.body.set_field(tag::ENCODED_TEXT, FIXString::from(v));
577    }
578
579    /// Gets `EncodedText`, Tag 355.
580    pub fn get_encoded_text(&self) -> Result<String, MessageRejectErrorEnum> {
581        let mut fld = field::EncodedTextField::new(String::new());
582        self.message.body.get_field(tag::ENCODED_TEXT, &mut fld.0)?;
583        Ok(fld.value().to_string())
584    }
585
586
587    /// Returns true if `EncodedText` is present, Tag 355.
588    pub fn has_encoded_text(&self) -> bool {
589        self.message.body.has(tag::ENCODED_TEXT)
590    }
591
592
593
594
595    /// Sets `EncodedTextLen`, Tag 354.
596    pub fn set_encoded_text_len(&mut self, v: isize) {
597        self.message.body.set_field(tag::ENCODED_TEXT_LEN, fixer::fix_int::FIXInt::from(v));
598    }
599
600    /// Gets `EncodedTextLen`, Tag 354.
601    pub fn get_encoded_text_len(&self) -> Result<isize, MessageRejectErrorEnum> {
602        let mut fld = field::EncodedTextLenField::new(0);
603        self.message.body.get_field(tag::ENCODED_TEXT_LEN, &mut fld.0)?;
604        Ok(fld.value())
605    }
606
607
608    /// Returns true if `EncodedTextLen` is present, Tag 354.
609    pub fn has_encoded_text_len(&self) -> bool {
610        self.message.body.has(tag::ENCODED_TEXT_LEN)
611    }
612
613
614
615
616    /// Sets `ExecBroker`, Tag 76.
617    pub fn set_exec_broker(&mut self, v: String) {
618        self.message.body.set_field(tag::EXEC_BROKER, FIXString::from(v));
619    }
620
621    /// Gets `ExecBroker`, Tag 76.
622    pub fn get_exec_broker(&self) -> Result<String, MessageRejectErrorEnum> {
623        let mut fld = field::ExecBrokerField::new(String::new());
624        self.message.body.get_field(tag::EXEC_BROKER, &mut fld.0)?;
625        Ok(fld.value().to_string())
626    }
627
628
629    /// Returns true if `ExecBroker` is present, Tag 76.
630    pub fn has_exec_broker(&self) -> bool {
631        self.message.body.has(tag::EXEC_BROKER)
632    }
633
634
635
636
637    /// Sets `ExecID`, Tag 17.
638    pub fn set_exec_id(&mut self, v: String) {
639        self.message.body.set_field(tag::EXEC_ID, FIXString::from(v));
640    }
641
642    /// Gets `ExecID`, Tag 17.
643    pub fn get_exec_id(&self) -> Result<String, MessageRejectErrorEnum> {
644        let mut fld = field::ExecIDField::new(String::new());
645        self.message.body.get_field(tag::EXEC_ID, &mut fld.0)?;
646        Ok(fld.value().to_string())
647    }
648
649
650    /// Returns true if `ExecID` is present, Tag 17.
651    pub fn has_exec_id(&self) -> bool {
652        self.message.body.has(tag::EXEC_ID)
653    }
654
655
656
657
658    /// Sets `ExecInst`, Tag 18.
659    pub fn set_exec_inst(&mut self, v: String) {
660        self.message.body.set_field(tag::EXEC_INST, FIXString::from(v));
661    }
662
663    /// Gets `ExecInst`, Tag 18.
664    pub fn get_exec_inst(&self) -> Result<String, MessageRejectErrorEnum> {
665        let mut fld = field::ExecInstField::new(String::new());
666        self.message.body.get_field(tag::EXEC_INST, &mut fld.0)?;
667        Ok(fld.value().to_string())
668    }
669
670
671    /// Returns true if `ExecInst` is present, Tag 18.
672    pub fn has_exec_inst(&self) -> bool {
673        self.message.body.has(tag::EXEC_INST)
674    }
675
676
677
678
679    /// Sets `ExecRefID`, Tag 19.
680    pub fn set_exec_ref_id(&mut self, v: String) {
681        self.message.body.set_field(tag::EXEC_REF_ID, FIXString::from(v));
682    }
683
684    /// Gets `ExecRefID`, Tag 19.
685    pub fn get_exec_ref_id(&self) -> Result<String, MessageRejectErrorEnum> {
686        let mut fld = field::ExecRefIDField::new(String::new());
687        self.message.body.get_field(tag::EXEC_REF_ID, &mut fld.0)?;
688        Ok(fld.value().to_string())
689    }
690
691
692    /// Returns true if `ExecRefID` is present, Tag 19.
693    pub fn has_exec_ref_id(&self) -> bool {
694        self.message.body.has(tag::EXEC_REF_ID)
695    }
696
697
698
699
700    /// Sets `ExecRestatementReason`, Tag 378.
701    pub fn set_exec_restatement_reason(&mut self, v: isize) {
702        self.message.body.set_field(tag::EXEC_RESTATEMENT_REASON, fixer::fix_int::FIXInt::from(v));
703    }
704
705    /// Gets `ExecRestatementReason`, Tag 378.
706    pub fn get_exec_restatement_reason(&self) -> Result<isize, MessageRejectErrorEnum> {
707        let mut fld = field::ExecRestatementReasonField::new(0);
708        self.message.body.get_field(tag::EXEC_RESTATEMENT_REASON, &mut fld.0)?;
709        Ok(fld.value())
710    }
711
712
713    /// Returns true if `ExecRestatementReason` is present, Tag 378.
714    pub fn has_exec_restatement_reason(&self) -> bool {
715        self.message.body.has(tag::EXEC_RESTATEMENT_REASON)
716    }
717
718
719
720
721    /// Sets `ExecTransType`, Tag 20.
722    pub fn set_exec_trans_type(&mut self, v: String) {
723        self.message.body.set_field(tag::EXEC_TRANS_TYPE, FIXString::from(v));
724    }
725
726    /// Gets `ExecTransType`, Tag 20.
727    pub fn get_exec_trans_type(&self) -> Result<String, MessageRejectErrorEnum> {
728        let mut fld = field::ExecTransTypeField::new(String::new());
729        self.message.body.get_field(tag::EXEC_TRANS_TYPE, &mut fld.0)?;
730        Ok(fld.value().to_string())
731    }
732
733
734    /// Returns true if `ExecTransType` is present, Tag 20.
735    pub fn has_exec_trans_type(&self) -> bool {
736        self.message.body.has(tag::EXEC_TRANS_TYPE)
737    }
738
739
740
741
742    /// Sets `ExecType`, Tag 150.
743    pub fn set_exec_type(&mut self, v: String) {
744        self.message.body.set_field(tag::EXEC_TYPE, FIXString::from(v));
745    }
746
747    /// Gets `ExecType`, Tag 150.
748    pub fn get_exec_type(&self) -> Result<String, MessageRejectErrorEnum> {
749        let mut fld = field::ExecTypeField::new(String::new());
750        self.message.body.get_field(tag::EXEC_TYPE, &mut fld.0)?;
751        Ok(fld.value().to_string())
752    }
753
754
755    /// Returns true if `ExecType` is present, Tag 150.
756    pub fn has_exec_type(&self) -> bool {
757        self.message.body.has(tag::EXEC_TYPE)
758    }
759
760
761
762
763    /// Sets `ExpireDate`, Tag 432.
764    pub fn set_expire_date(&mut self, v: String) {
765        self.message.body.set_field(tag::EXPIRE_DATE, FIXString::from(v));
766    }
767
768    /// Gets `ExpireDate`, Tag 432.
769    pub fn get_expire_date(&self) -> Result<String, MessageRejectErrorEnum> {
770        let mut fld = field::ExpireDateField::new(String::new());
771        self.message.body.get_field(tag::EXPIRE_DATE, &mut fld.0)?;
772        Ok(fld.value().to_string())
773    }
774
775
776    /// Returns true if `ExpireDate` is present, Tag 432.
777    pub fn has_expire_date(&self) -> bool {
778        self.message.body.has(tag::EXPIRE_DATE)
779    }
780
781
782
783
784    /// Sets `ExpireTime`, Tag 126.
785    pub fn set_expire_time(&mut self, v: Timestamp) {
786        self.message.body.set_field(tag::EXPIRE_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
787            time: v,
788            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
789        });
790    }
791
792    /// Gets `ExpireTime`, Tag 126.
793    pub fn get_expire_time(&self) -> Result<Timestamp, MessageRejectErrorEnum> {
794        let mut fld = field::ExpireTimeField::new(Timestamp::UNIX_EPOCH);
795        self.message.body.get_field(tag::EXPIRE_TIME, &mut fld.0)?;
796        Ok(fld.value())
797    }
798
799
800    /// Returns true if `ExpireTime` is present, Tag 126.
801    pub fn has_expire_time(&self) -> bool {
802        self.message.body.has(tag::EXPIRE_TIME)
803    }
804
805
806
807
808    /// Sets `FutSettDate`, Tag 64.
809    pub fn set_fut_sett_date(&mut self, v: String) {
810        self.message.body.set_field(tag::FUT_SETT_DATE, FIXString::from(v));
811    }
812
813    /// Gets `FutSettDate`, Tag 64.
814    pub fn get_fut_sett_date(&self) -> Result<String, MessageRejectErrorEnum> {
815        let mut fld = field::FutSettDateField::new(String::new());
816        self.message.body.get_field(tag::FUT_SETT_DATE, &mut fld.0)?;
817        Ok(fld.value().to_string())
818    }
819
820
821    /// Returns true if `FutSettDate` is present, Tag 64.
822    pub fn has_fut_sett_date(&self) -> bool {
823        self.message.body.has(tag::FUT_SETT_DATE)
824    }
825
826
827
828
829    /// Sets `FutSettDate2`, Tag 193.
830    pub fn set_fut_sett_date2(&mut self, v: String) {
831        self.message.body.set_field(tag::FUT_SETT_DATE2, FIXString::from(v));
832    }
833
834    /// Gets `FutSettDate2`, Tag 193.
835    pub fn get_fut_sett_date2(&self) -> Result<String, MessageRejectErrorEnum> {
836        let mut fld = field::FutSettDate2Field::new(String::new());
837        self.message.body.get_field(tag::FUT_SETT_DATE2, &mut fld.0)?;
838        Ok(fld.value().to_string())
839    }
840
841
842    /// Returns true if `FutSettDate2` is present, Tag 193.
843    pub fn has_fut_sett_date2(&self) -> bool {
844        self.message.body.has(tag::FUT_SETT_DATE2)
845    }
846
847
848
849
850    /// Sets `GTBookingInst`, Tag 427.
851    pub fn set_gt_booking_inst(&mut self, v: isize) {
852        self.message.body.set_field(tag::GT_BOOKING_INST, fixer::fix_int::FIXInt::from(v));
853    }
854
855    /// Gets `GTBookingInst`, Tag 427.
856    pub fn get_gt_booking_inst(&self) -> Result<isize, MessageRejectErrorEnum> {
857        let mut fld = field::GTBookingInstField::new(0);
858        self.message.body.get_field(tag::GT_BOOKING_INST, &mut fld.0)?;
859        Ok(fld.value())
860    }
861
862
863    /// Returns true if `GTBookingInst` is present, Tag 427.
864    pub fn has_gt_booking_inst(&self) -> bool {
865        self.message.body.has(tag::GT_BOOKING_INST)
866    }
867
868
869
870
871    /// Sets `GrossTradeAmt`, Tag 381.
872    pub fn set_gross_trade_amt(&mut self, val: Decimal, scale: i32) {
873        self.message.body.set_field(tag::GROSS_TRADE_AMT, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
874    }
875
876    /// Gets `GrossTradeAmt`, Tag 381.
877    pub fn get_gross_trade_amt(&self) -> Result<Decimal, MessageRejectErrorEnum> {
878        let mut fld = field::GrossTradeAmtField::new(Decimal::ZERO, 0);
879        self.message.body.get_field(tag::GROSS_TRADE_AMT, &mut fld.0)?;
880        Ok(fld.value())
881    }
882
883
884    /// Returns true if `GrossTradeAmt` is present, Tag 381.
885    pub fn has_gross_trade_amt(&self) -> bool {
886        self.message.body.has(tag::GROSS_TRADE_AMT)
887    }
888
889
890
891
892    /// Sets `HandlInst`, Tag 21.
893    pub fn set_handl_inst(&mut self, v: String) {
894        self.message.body.set_field(tag::HANDL_INST, FIXString::from(v));
895    }
896
897    /// Gets `HandlInst`, Tag 21.
898    pub fn get_handl_inst(&self) -> Result<String, MessageRejectErrorEnum> {
899        let mut fld = field::HandlInstField::new(String::new());
900        self.message.body.get_field(tag::HANDL_INST, &mut fld.0)?;
901        Ok(fld.value().to_string())
902    }
903
904
905    /// Returns true if `HandlInst` is present, Tag 21.
906    pub fn has_handl_inst(&self) -> bool {
907        self.message.body.has(tag::HANDL_INST)
908    }
909
910
911
912
913    /// Sets `IDSource`, Tag 22.
914    pub fn set_id_source(&mut self, v: String) {
915        self.message.body.set_field(tag::ID_SOURCE, FIXString::from(v));
916    }
917
918    /// Gets `IDSource`, Tag 22.
919    pub fn get_id_source(&self) -> Result<String, MessageRejectErrorEnum> {
920        let mut fld = field::IDSourceField::new(String::new());
921        self.message.body.get_field(tag::ID_SOURCE, &mut fld.0)?;
922        Ok(fld.value().to_string())
923    }
924
925
926    /// Returns true if `IDSource` is present, Tag 22.
927    pub fn has_id_source(&self) -> bool {
928        self.message.body.has(tag::ID_SOURCE)
929    }
930
931
932
933
934    /// Sets `Issuer`, Tag 106.
935    pub fn set_issuer(&mut self, v: String) {
936        self.message.body.set_field(tag::ISSUER, FIXString::from(v));
937    }
938
939    /// Gets `Issuer`, Tag 106.
940    pub fn get_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
941        let mut fld = field::IssuerField::new(String::new());
942        self.message.body.get_field(tag::ISSUER, &mut fld.0)?;
943        Ok(fld.value().to_string())
944    }
945
946
947    /// Returns true if `Issuer` is present, Tag 106.
948    pub fn has_issuer(&self) -> bool {
949        self.message.body.has(tag::ISSUER)
950    }
951
952
953
954
955    /// Sets `LastCapacity`, Tag 29.
956    pub fn set_last_capacity(&mut self, v: String) {
957        self.message.body.set_field(tag::LAST_CAPACITY, FIXString::from(v));
958    }
959
960    /// Gets `LastCapacity`, Tag 29.
961    pub fn get_last_capacity(&self) -> Result<String, MessageRejectErrorEnum> {
962        let mut fld = field::LastCapacityField::new(String::new());
963        self.message.body.get_field(tag::LAST_CAPACITY, &mut fld.0)?;
964        Ok(fld.value().to_string())
965    }
966
967
968    /// Returns true if `LastCapacity` is present, Tag 29.
969    pub fn has_last_capacity(&self) -> bool {
970        self.message.body.has(tag::LAST_CAPACITY)
971    }
972
973
974
975
976    /// Sets `LastForwardPoints`, Tag 195.
977    pub fn set_last_forward_points(&mut self, val: Decimal, scale: i32) {
978        self.message.body.set_field(tag::LAST_FORWARD_POINTS, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
979    }
980
981    /// Gets `LastForwardPoints`, Tag 195.
982    pub fn get_last_forward_points(&self) -> Result<Decimal, MessageRejectErrorEnum> {
983        let mut fld = field::LastForwardPointsField::new(Decimal::ZERO, 0);
984        self.message.body.get_field(tag::LAST_FORWARD_POINTS, &mut fld.0)?;
985        Ok(fld.value())
986    }
987
988
989    /// Returns true if `LastForwardPoints` is present, Tag 195.
990    pub fn has_last_forward_points(&self) -> bool {
991        self.message.body.has(tag::LAST_FORWARD_POINTS)
992    }
993
994
995
996
997    /// Sets `LastMkt`, Tag 30.
998    pub fn set_last_mkt(&mut self, v: String) {
999        self.message.body.set_field(tag::LAST_MKT, FIXString::from(v));
1000    }
1001
1002    /// Gets `LastMkt`, Tag 30.
1003    pub fn get_last_mkt(&self) -> Result<String, MessageRejectErrorEnum> {
1004        let mut fld = field::LastMktField::new(String::new());
1005        self.message.body.get_field(tag::LAST_MKT, &mut fld.0)?;
1006        Ok(fld.value().to_string())
1007    }
1008
1009
1010    /// Returns true if `LastMkt` is present, Tag 30.
1011    pub fn has_last_mkt(&self) -> bool {
1012        self.message.body.has(tag::LAST_MKT)
1013    }
1014
1015
1016
1017
1018    /// Sets `LastPx`, Tag 31.
1019    pub fn set_last_px(&mut self, val: Decimal, scale: i32) {
1020        self.message.body.set_field(tag::LAST_PX, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1021    }
1022
1023    /// Gets `LastPx`, Tag 31.
1024    pub fn get_last_px(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1025        let mut fld = field::LastPxField::new(Decimal::ZERO, 0);
1026        self.message.body.get_field(tag::LAST_PX, &mut fld.0)?;
1027        Ok(fld.value())
1028    }
1029
1030
1031    /// Returns true if `LastPx` is present, Tag 31.
1032    pub fn has_last_px(&self) -> bool {
1033        self.message.body.has(tag::LAST_PX)
1034    }
1035
1036
1037
1038
1039    /// Sets `LastShares`, Tag 32.
1040    pub fn set_last_shares(&mut self, val: Decimal, scale: i32) {
1041        self.message.body.set_field(tag::LAST_SHARES, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1042    }
1043
1044    /// Gets `LastShares`, Tag 32.
1045    pub fn get_last_shares(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1046        let mut fld = field::LastSharesField::new(Decimal::ZERO, 0);
1047        self.message.body.get_field(tag::LAST_SHARES, &mut fld.0)?;
1048        Ok(fld.value())
1049    }
1050
1051
1052    /// Returns true if `LastShares` is present, Tag 32.
1053    pub fn has_last_shares(&self) -> bool {
1054        self.message.body.has(tag::LAST_SHARES)
1055    }
1056
1057
1058
1059
1060    /// Sets `LastSpotRate`, Tag 194.
1061    pub fn set_last_spot_rate(&mut self, val: Decimal, scale: i32) {
1062        self.message.body.set_field(tag::LAST_SPOT_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1063    }
1064
1065    /// Gets `LastSpotRate`, Tag 194.
1066    pub fn get_last_spot_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1067        let mut fld = field::LastSpotRateField::new(Decimal::ZERO, 0);
1068        self.message.body.get_field(tag::LAST_SPOT_RATE, &mut fld.0)?;
1069        Ok(fld.value())
1070    }
1071
1072
1073    /// Returns true if `LastSpotRate` is present, Tag 194.
1074    pub fn has_last_spot_rate(&self) -> bool {
1075        self.message.body.has(tag::LAST_SPOT_RATE)
1076    }
1077
1078
1079
1080
1081    /// Sets `LeavesQty`, Tag 151.
1082    pub fn set_leaves_qty(&mut self, val: Decimal, scale: i32) {
1083        self.message.body.set_field(tag::LEAVES_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1084    }
1085
1086    /// Gets `LeavesQty`, Tag 151.
1087    pub fn get_leaves_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1088        let mut fld = field::LeavesQtyField::new(Decimal::ZERO, 0);
1089        self.message.body.get_field(tag::LEAVES_QTY, &mut fld.0)?;
1090        Ok(fld.value())
1091    }
1092
1093
1094    /// Returns true if `LeavesQty` is present, Tag 151.
1095    pub fn has_leaves_qty(&self) -> bool {
1096        self.message.body.has(tag::LEAVES_QTY)
1097    }
1098
1099
1100
1101
1102    /// Sets `ListID`, Tag 66.
1103    pub fn set_list_id(&mut self, v: String) {
1104        self.message.body.set_field(tag::LIST_ID, FIXString::from(v));
1105    }
1106
1107    /// Gets `ListID`, Tag 66.
1108    pub fn get_list_id(&self) -> Result<String, MessageRejectErrorEnum> {
1109        let mut fld = field::ListIDField::new(String::new());
1110        self.message.body.get_field(tag::LIST_ID, &mut fld.0)?;
1111        Ok(fld.value().to_string())
1112    }
1113
1114
1115    /// Returns true if `ListID` is present, Tag 66.
1116    pub fn has_list_id(&self) -> bool {
1117        self.message.body.has(tag::LIST_ID)
1118    }
1119
1120
1121
1122
1123    /// Sets `MaturityDay`, Tag 205.
1124    pub fn set_maturity_day(&mut self, v: isize) {
1125        self.message.body.set_field(tag::MATURITY_DAY, fixer::fix_int::FIXInt::from(v));
1126    }
1127
1128    /// Gets `MaturityDay`, Tag 205.
1129    pub fn get_maturity_day(&self) -> Result<isize, MessageRejectErrorEnum> {
1130        let mut fld = field::MaturityDayField::new(0);
1131        self.message.body.get_field(tag::MATURITY_DAY, &mut fld.0)?;
1132        Ok(fld.value())
1133    }
1134
1135
1136    /// Returns true if `MaturityDay` is present, Tag 205.
1137    pub fn has_maturity_day(&self) -> bool {
1138        self.message.body.has(tag::MATURITY_DAY)
1139    }
1140
1141
1142
1143
1144    /// Sets `MaturityMonthYear`, Tag 200.
1145    pub fn set_maturity_month_year(&mut self, v: String) {
1146        self.message.body.set_field(tag::MATURITY_MONTH_YEAR, FIXString::from(v));
1147    }
1148
1149    /// Gets `MaturityMonthYear`, Tag 200.
1150    pub fn get_maturity_month_year(&self) -> Result<String, MessageRejectErrorEnum> {
1151        let mut fld = field::MaturityMonthYearField::new(String::new());
1152        self.message.body.get_field(tag::MATURITY_MONTH_YEAR, &mut fld.0)?;
1153        Ok(fld.value().to_string())
1154    }
1155
1156
1157    /// Returns true if `MaturityMonthYear` is present, Tag 200.
1158    pub fn has_maturity_month_year(&self) -> bool {
1159        self.message.body.has(tag::MATURITY_MONTH_YEAR)
1160    }
1161
1162
1163
1164
1165    /// Sets `MaxFloor`, Tag 111.
1166    pub fn set_max_floor(&mut self, val: Decimal, scale: i32) {
1167        self.message.body.set_field(tag::MAX_FLOOR, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1168    }
1169
1170    /// Gets `MaxFloor`, Tag 111.
1171    pub fn get_max_floor(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1172        let mut fld = field::MaxFloorField::new(Decimal::ZERO, 0);
1173        self.message.body.get_field(tag::MAX_FLOOR, &mut fld.0)?;
1174        Ok(fld.value())
1175    }
1176
1177
1178    /// Returns true if `MaxFloor` is present, Tag 111.
1179    pub fn has_max_floor(&self) -> bool {
1180        self.message.body.has(tag::MAX_FLOOR)
1181    }
1182
1183
1184
1185
1186    /// Sets `MaxShow`, Tag 210.
1187    pub fn set_max_show(&mut self, val: Decimal, scale: i32) {
1188        self.message.body.set_field(tag::MAX_SHOW, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1189    }
1190
1191    /// Gets `MaxShow`, Tag 210.
1192    pub fn get_max_show(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1193        let mut fld = field::MaxShowField::new(Decimal::ZERO, 0);
1194        self.message.body.get_field(tag::MAX_SHOW, &mut fld.0)?;
1195        Ok(fld.value())
1196    }
1197
1198
1199    /// Returns true if `MaxShow` is present, Tag 210.
1200    pub fn has_max_show(&self) -> bool {
1201        self.message.body.has(tag::MAX_SHOW)
1202    }
1203
1204
1205
1206
1207    /// Sets `MinQty`, Tag 110.
1208    pub fn set_min_qty(&mut self, val: Decimal, scale: i32) {
1209        self.message.body.set_field(tag::MIN_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1210    }
1211
1212    /// Gets `MinQty`, Tag 110.
1213    pub fn get_min_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1214        let mut fld = field::MinQtyField::new(Decimal::ZERO, 0);
1215        self.message.body.get_field(tag::MIN_QTY, &mut fld.0)?;
1216        Ok(fld.value())
1217    }
1218
1219
1220    /// Returns true if `MinQty` is present, Tag 110.
1221    pub fn has_min_qty(&self) -> bool {
1222        self.message.body.has(tag::MIN_QTY)
1223    }
1224
1225
1226
1227
1228    /// Sets `MultiLegReportingType`, Tag 442.
1229    pub fn set_multi_leg_reporting_type(&mut self, v: String) {
1230        self.message.body.set_field(tag::MULTI_LEG_REPORTING_TYPE, FIXString::from(v));
1231    }
1232
1233    /// Gets `MultiLegReportingType`, Tag 442.
1234    pub fn get_multi_leg_reporting_type(&self) -> Result<String, MessageRejectErrorEnum> {
1235        let mut fld = field::MultiLegReportingTypeField::new(String::new());
1236        self.message.body.get_field(tag::MULTI_LEG_REPORTING_TYPE, &mut fld.0)?;
1237        Ok(fld.value().to_string())
1238    }
1239
1240
1241    /// Returns true if `MultiLegReportingType` is present, Tag 442.
1242    pub fn has_multi_leg_reporting_type(&self) -> bool {
1243        self.message.body.has(tag::MULTI_LEG_REPORTING_TYPE)
1244    }
1245
1246
1247
1248
1249    /// Sets `NoContraBrokers`, Tag 382.
1250    pub fn set_no_contra_brokers(&mut self, v: isize) {
1251        self.message.body.set_field(tag::NO_CONTRA_BROKERS, fixer::fix_int::FIXInt::from(v));
1252    }
1253
1254    /// Gets `NoContraBrokers`, Tag 382.
1255    pub fn get_no_contra_brokers(&self) -> Result<isize, MessageRejectErrorEnum> {
1256        let mut fld = field::NoContraBrokersField::new(0);
1257        self.message.body.get_field(tag::NO_CONTRA_BROKERS, &mut fld.0)?;
1258        Ok(fld.value())
1259    }
1260
1261
1262    /// Returns true if `NoContraBrokers` is present, Tag 382.
1263    pub fn has_no_contra_brokers(&self) -> bool {
1264        self.message.body.has(tag::NO_CONTRA_BROKERS)
1265    }
1266
1267
1268
1269
1270    /// Sets `OpenClose`, Tag 77.
1271    pub fn set_open_close(&mut self, v: String) {
1272        self.message.body.set_field(tag::OPEN_CLOSE, FIXString::from(v));
1273    }
1274
1275    /// Gets `OpenClose`, Tag 77.
1276    pub fn get_open_close(&self) -> Result<String, MessageRejectErrorEnum> {
1277        let mut fld = field::OpenCloseField::new(String::new());
1278        self.message.body.get_field(tag::OPEN_CLOSE, &mut fld.0)?;
1279        Ok(fld.value().to_string())
1280    }
1281
1282
1283    /// Returns true if `OpenClose` is present, Tag 77.
1284    pub fn has_open_close(&self) -> bool {
1285        self.message.body.has(tag::OPEN_CLOSE)
1286    }
1287
1288
1289
1290
1291    /// Sets `OptAttribute`, Tag 206.
1292    pub fn set_opt_attribute(&mut self, v: String) {
1293        self.message.body.set_field(tag::OPT_ATTRIBUTE, FIXString::from(v));
1294    }
1295
1296    /// Gets `OptAttribute`, Tag 206.
1297    pub fn get_opt_attribute(&self) -> Result<String, MessageRejectErrorEnum> {
1298        let mut fld = field::OptAttributeField::new(String::new());
1299        self.message.body.get_field(tag::OPT_ATTRIBUTE, &mut fld.0)?;
1300        Ok(fld.value().to_string())
1301    }
1302
1303
1304    /// Returns true if `OptAttribute` is present, Tag 206.
1305    pub fn has_opt_attribute(&self) -> bool {
1306        self.message.body.has(tag::OPT_ATTRIBUTE)
1307    }
1308
1309
1310
1311
1312    /// Sets `OrdRejReason`, Tag 103.
1313    pub fn set_ord_rej_reason(&mut self, v: isize) {
1314        self.message.body.set_field(tag::ORD_REJ_REASON, fixer::fix_int::FIXInt::from(v));
1315    }
1316
1317    /// Gets `OrdRejReason`, Tag 103.
1318    pub fn get_ord_rej_reason(&self) -> Result<isize, MessageRejectErrorEnum> {
1319        let mut fld = field::OrdRejReasonField::new(0);
1320        self.message.body.get_field(tag::ORD_REJ_REASON, &mut fld.0)?;
1321        Ok(fld.value())
1322    }
1323
1324
1325    /// Returns true if `OrdRejReason` is present, Tag 103.
1326    pub fn has_ord_rej_reason(&self) -> bool {
1327        self.message.body.has(tag::ORD_REJ_REASON)
1328    }
1329
1330
1331
1332
1333    /// Sets `OrdStatus`, Tag 39.
1334    pub fn set_ord_status(&mut self, v: String) {
1335        self.message.body.set_field(tag::ORD_STATUS, FIXString::from(v));
1336    }
1337
1338    /// Gets `OrdStatus`, Tag 39.
1339    pub fn get_ord_status(&self) -> Result<String, MessageRejectErrorEnum> {
1340        let mut fld = field::OrdStatusField::new(String::new());
1341        self.message.body.get_field(tag::ORD_STATUS, &mut fld.0)?;
1342        Ok(fld.value().to_string())
1343    }
1344
1345
1346    /// Returns true if `OrdStatus` is present, Tag 39.
1347    pub fn has_ord_status(&self) -> bool {
1348        self.message.body.has(tag::ORD_STATUS)
1349    }
1350
1351
1352
1353
1354    /// Sets `OrdType`, Tag 40.
1355    pub fn set_ord_type(&mut self, v: String) {
1356        self.message.body.set_field(tag::ORD_TYPE, FIXString::from(v));
1357    }
1358
1359    /// Gets `OrdType`, Tag 40.
1360    pub fn get_ord_type(&self) -> Result<String, MessageRejectErrorEnum> {
1361        let mut fld = field::OrdTypeField::new(String::new());
1362        self.message.body.get_field(tag::ORD_TYPE, &mut fld.0)?;
1363        Ok(fld.value().to_string())
1364    }
1365
1366
1367    /// Returns true if `OrdType` is present, Tag 40.
1368    pub fn has_ord_type(&self) -> bool {
1369        self.message.body.has(tag::ORD_TYPE)
1370    }
1371
1372
1373
1374
1375    /// Sets `OrderID`, Tag 37.
1376    pub fn set_order_id(&mut self, v: String) {
1377        self.message.body.set_field(tag::ORDER_ID, FIXString::from(v));
1378    }
1379
1380    /// Gets `OrderID`, Tag 37.
1381    pub fn get_order_id(&self) -> Result<String, MessageRejectErrorEnum> {
1382        let mut fld = field::OrderIDField::new(String::new());
1383        self.message.body.get_field(tag::ORDER_ID, &mut fld.0)?;
1384        Ok(fld.value().to_string())
1385    }
1386
1387
1388    /// Returns true if `OrderID` is present, Tag 37.
1389    pub fn has_order_id(&self) -> bool {
1390        self.message.body.has(tag::ORDER_ID)
1391    }
1392
1393
1394
1395
1396    /// Sets `OrderQty`, Tag 38.
1397    pub fn set_order_qty(&mut self, val: Decimal, scale: i32) {
1398        self.message.body.set_field(tag::ORDER_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1399    }
1400
1401    /// Gets `OrderQty`, Tag 38.
1402    pub fn get_order_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1403        let mut fld = field::OrderQtyField::new(Decimal::ZERO, 0);
1404        self.message.body.get_field(tag::ORDER_QTY, &mut fld.0)?;
1405        Ok(fld.value())
1406    }
1407
1408
1409    /// Returns true if `OrderQty` is present, Tag 38.
1410    pub fn has_order_qty(&self) -> bool {
1411        self.message.body.has(tag::ORDER_QTY)
1412    }
1413
1414
1415
1416
1417    /// Sets `OrderQty2`, Tag 192.
1418    pub fn set_order_qty2(&mut self, val: Decimal, scale: i32) {
1419        self.message.body.set_field(tag::ORDER_QTY2, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1420    }
1421
1422    /// Gets `OrderQty2`, Tag 192.
1423    pub fn get_order_qty2(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1424        let mut fld = field::OrderQty2Field::new(Decimal::ZERO, 0);
1425        self.message.body.get_field(tag::ORDER_QTY2, &mut fld.0)?;
1426        Ok(fld.value())
1427    }
1428
1429
1430    /// Returns true if `OrderQty2` is present, Tag 192.
1431    pub fn has_order_qty2(&self) -> bool {
1432        self.message.body.has(tag::ORDER_QTY2)
1433    }
1434
1435
1436
1437
1438    /// Sets `OrigClOrdID`, Tag 41.
1439    pub fn set_orig_cl_ord_id(&mut self, v: String) {
1440        self.message.body.set_field(tag::ORIG_CL_ORD_ID, FIXString::from(v));
1441    }
1442
1443    /// Gets `OrigClOrdID`, Tag 41.
1444    pub fn get_orig_cl_ord_id(&self) -> Result<String, MessageRejectErrorEnum> {
1445        let mut fld = field::OrigClOrdIDField::new(String::new());
1446        self.message.body.get_field(tag::ORIG_CL_ORD_ID, &mut fld.0)?;
1447        Ok(fld.value().to_string())
1448    }
1449
1450
1451    /// Returns true if `OrigClOrdID` is present, Tag 41.
1452    pub fn has_orig_cl_ord_id(&self) -> bool {
1453        self.message.body.has(tag::ORIG_CL_ORD_ID)
1454    }
1455
1456
1457
1458
1459    /// Sets `PegDifference`, Tag 211.
1460    pub fn set_peg_difference(&mut self, val: Decimal, scale: i32) {
1461        self.message.body.set_field(tag::PEG_DIFFERENCE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1462    }
1463
1464    /// Gets `PegDifference`, Tag 211.
1465    pub fn get_peg_difference(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1466        let mut fld = field::PegDifferenceField::new(Decimal::ZERO, 0);
1467        self.message.body.get_field(tag::PEG_DIFFERENCE, &mut fld.0)?;
1468        Ok(fld.value())
1469    }
1470
1471
1472    /// Returns true if `PegDifference` is present, Tag 211.
1473    pub fn has_peg_difference(&self) -> bool {
1474        self.message.body.has(tag::PEG_DIFFERENCE)
1475    }
1476
1477
1478
1479
1480    /// Sets `Price`, Tag 44.
1481    pub fn set_price(&mut self, val: Decimal, scale: i32) {
1482        self.message.body.set_field(tag::PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1483    }
1484
1485    /// Gets `Price`, Tag 44.
1486    pub fn get_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1487        let mut fld = field::PriceField::new(Decimal::ZERO, 0);
1488        self.message.body.get_field(tag::PRICE, &mut fld.0)?;
1489        Ok(fld.value())
1490    }
1491
1492
1493    /// Returns true if `Price` is present, Tag 44.
1494    pub fn has_price(&self) -> bool {
1495        self.message.body.has(tag::PRICE)
1496    }
1497
1498
1499
1500
1501    /// Sets `PutOrCall`, Tag 201.
1502    pub fn set_put_or_call(&mut self, v: isize) {
1503        self.message.body.set_field(tag::PUT_OR_CALL, fixer::fix_int::FIXInt::from(v));
1504    }
1505
1506    /// Gets `PutOrCall`, Tag 201.
1507    pub fn get_put_or_call(&self) -> Result<isize, MessageRejectErrorEnum> {
1508        let mut fld = field::PutOrCallField::new(0);
1509        self.message.body.get_field(tag::PUT_OR_CALL, &mut fld.0)?;
1510        Ok(fld.value())
1511    }
1512
1513
1514    /// Returns true if `PutOrCall` is present, Tag 201.
1515    pub fn has_put_or_call(&self) -> bool {
1516        self.message.body.has(tag::PUT_OR_CALL)
1517    }
1518
1519
1520
1521
1522    /// Sets `ReportToExch`, Tag 113.
1523    pub fn set_report_to_exch(&mut self, v: bool) {
1524        self.message.body.set_field(tag::REPORT_TO_EXCH, fixer::fix_boolean::FIXBoolean::from(v));
1525    }
1526
1527    /// Gets `ReportToExch`, Tag 113.
1528    pub fn get_report_to_exch(&self) -> Result<bool, MessageRejectErrorEnum> {
1529        let mut fld = field::ReportToExchField::new(false);
1530        self.message.body.get_field(tag::REPORT_TO_EXCH, &mut fld.0)?;
1531        Ok(fld.value())
1532    }
1533
1534
1535    /// Returns true if `ReportToExch` is present, Tag 113.
1536    pub fn has_report_to_exch(&self) -> bool {
1537        self.message.body.has(tag::REPORT_TO_EXCH)
1538    }
1539
1540
1541
1542
1543    /// Sets `Rule80A`, Tag 47.
1544    pub fn set_rule80_a(&mut self, v: String) {
1545        self.message.body.set_field(tag::RULE80_A, FIXString::from(v));
1546    }
1547
1548    /// Gets `Rule80A`, Tag 47.
1549    pub fn get_rule80_a(&self) -> Result<String, MessageRejectErrorEnum> {
1550        let mut fld = field::Rule80AField::new(String::new());
1551        self.message.body.get_field(tag::RULE80_A, &mut fld.0)?;
1552        Ok(fld.value().to_string())
1553    }
1554
1555
1556    /// Returns true if `Rule80A` is present, Tag 47.
1557    pub fn has_rule80_a(&self) -> bool {
1558        self.message.body.has(tag::RULE80_A)
1559    }
1560
1561
1562
1563
1564    /// Sets `SecondaryOrderID`, Tag 198.
1565    pub fn set_secondary_order_id(&mut self, v: String) {
1566        self.message.body.set_field(tag::SECONDARY_ORDER_ID, FIXString::from(v));
1567    }
1568
1569    /// Gets `SecondaryOrderID`, Tag 198.
1570    pub fn get_secondary_order_id(&self) -> Result<String, MessageRejectErrorEnum> {
1571        let mut fld = field::SecondaryOrderIDField::new(String::new());
1572        self.message.body.get_field(tag::SECONDARY_ORDER_ID, &mut fld.0)?;
1573        Ok(fld.value().to_string())
1574    }
1575
1576
1577    /// Returns true if `SecondaryOrderID` is present, Tag 198.
1578    pub fn has_secondary_order_id(&self) -> bool {
1579        self.message.body.has(tag::SECONDARY_ORDER_ID)
1580    }
1581
1582
1583
1584
1585    /// Sets `SecurityDesc`, Tag 107.
1586    pub fn set_security_desc(&mut self, v: String) {
1587        self.message.body.set_field(tag::SECURITY_DESC, FIXString::from(v));
1588    }
1589
1590    /// Gets `SecurityDesc`, Tag 107.
1591    pub fn get_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
1592        let mut fld = field::SecurityDescField::new(String::new());
1593        self.message.body.get_field(tag::SECURITY_DESC, &mut fld.0)?;
1594        Ok(fld.value().to_string())
1595    }
1596
1597
1598    /// Returns true if `SecurityDesc` is present, Tag 107.
1599    pub fn has_security_desc(&self) -> bool {
1600        self.message.body.has(tag::SECURITY_DESC)
1601    }
1602
1603
1604
1605
1606    /// Sets `SecurityExchange`, Tag 207.
1607    pub fn set_security_exchange(&mut self, v: String) {
1608        self.message.body.set_field(tag::SECURITY_EXCHANGE, FIXString::from(v));
1609    }
1610
1611    /// Gets `SecurityExchange`, Tag 207.
1612    pub fn get_security_exchange(&self) -> Result<String, MessageRejectErrorEnum> {
1613        let mut fld = field::SecurityExchangeField::new(String::new());
1614        self.message.body.get_field(tag::SECURITY_EXCHANGE, &mut fld.0)?;
1615        Ok(fld.value().to_string())
1616    }
1617
1618
1619    /// Returns true if `SecurityExchange` is present, Tag 207.
1620    pub fn has_security_exchange(&self) -> bool {
1621        self.message.body.has(tag::SECURITY_EXCHANGE)
1622    }
1623
1624
1625
1626
1627    /// Sets `SecurityID`, Tag 48.
1628    pub fn set_security_id(&mut self, v: String) {
1629        self.message.body.set_field(tag::SECURITY_ID, FIXString::from(v));
1630    }
1631
1632    /// Gets `SecurityID`, Tag 48.
1633    pub fn get_security_id(&self) -> Result<String, MessageRejectErrorEnum> {
1634        let mut fld = field::SecurityIDField::new(String::new());
1635        self.message.body.get_field(tag::SECURITY_ID, &mut fld.0)?;
1636        Ok(fld.value().to_string())
1637    }
1638
1639
1640    /// Returns true if `SecurityID` is present, Tag 48.
1641    pub fn has_security_id(&self) -> bool {
1642        self.message.body.has(tag::SECURITY_ID)
1643    }
1644
1645
1646
1647
1648    /// Sets `SecurityType`, Tag 167.
1649    pub fn set_security_type(&mut self, v: String) {
1650        self.message.body.set_field(tag::SECURITY_TYPE, FIXString::from(v));
1651    }
1652
1653    /// Gets `SecurityType`, Tag 167.
1654    pub fn get_security_type(&self) -> Result<String, MessageRejectErrorEnum> {
1655        let mut fld = field::SecurityTypeField::new(String::new());
1656        self.message.body.get_field(tag::SECURITY_TYPE, &mut fld.0)?;
1657        Ok(fld.value().to_string())
1658    }
1659
1660
1661    /// Returns true if `SecurityType` is present, Tag 167.
1662    pub fn has_security_type(&self) -> bool {
1663        self.message.body.has(tag::SECURITY_TYPE)
1664    }
1665
1666
1667
1668
1669    /// Sets `SettlCurrAmt`, Tag 119.
1670    pub fn set_settl_curr_amt(&mut self, val: Decimal, scale: i32) {
1671        self.message.body.set_field(tag::SETTL_CURR_AMT, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1672    }
1673
1674    /// Gets `SettlCurrAmt`, Tag 119.
1675    pub fn get_settl_curr_amt(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1676        let mut fld = field::SettlCurrAmtField::new(Decimal::ZERO, 0);
1677        self.message.body.get_field(tag::SETTL_CURR_AMT, &mut fld.0)?;
1678        Ok(fld.value())
1679    }
1680
1681
1682    /// Returns true if `SettlCurrAmt` is present, Tag 119.
1683    pub fn has_settl_curr_amt(&self) -> bool {
1684        self.message.body.has(tag::SETTL_CURR_AMT)
1685    }
1686
1687
1688
1689
1690    /// Sets `SettlCurrFxRate`, Tag 155.
1691    pub fn set_settl_curr_fx_rate(&mut self, val: Decimal, scale: i32) {
1692        self.message.body.set_field(tag::SETTL_CURR_FX_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1693    }
1694
1695    /// Gets `SettlCurrFxRate`, Tag 155.
1696    pub fn get_settl_curr_fx_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1697        let mut fld = field::SettlCurrFxRateField::new(Decimal::ZERO, 0);
1698        self.message.body.get_field(tag::SETTL_CURR_FX_RATE, &mut fld.0)?;
1699        Ok(fld.value())
1700    }
1701
1702
1703    /// Returns true if `SettlCurrFxRate` is present, Tag 155.
1704    pub fn has_settl_curr_fx_rate(&self) -> bool {
1705        self.message.body.has(tag::SETTL_CURR_FX_RATE)
1706    }
1707
1708
1709
1710
1711    /// Sets `SettlCurrFxRateCalc`, Tag 156.
1712    pub fn set_settl_curr_fx_rate_calc(&mut self, v: String) {
1713        self.message.body.set_field(tag::SETTL_CURR_FX_RATE_CALC, FIXString::from(v));
1714    }
1715
1716    /// Gets `SettlCurrFxRateCalc`, Tag 156.
1717    pub fn get_settl_curr_fx_rate_calc(&self) -> Result<String, MessageRejectErrorEnum> {
1718        let mut fld = field::SettlCurrFxRateCalcField::new(String::new());
1719        self.message.body.get_field(tag::SETTL_CURR_FX_RATE_CALC, &mut fld.0)?;
1720        Ok(fld.value().to_string())
1721    }
1722
1723
1724    /// Returns true if `SettlCurrFxRateCalc` is present, Tag 156.
1725    pub fn has_settl_curr_fx_rate_calc(&self) -> bool {
1726        self.message.body.has(tag::SETTL_CURR_FX_RATE_CALC)
1727    }
1728
1729
1730
1731
1732    /// Sets `SettlCurrency`, Tag 120.
1733    pub fn set_settl_currency(&mut self, v: String) {
1734        self.message.body.set_field(tag::SETTL_CURRENCY, FIXString::from(v));
1735    }
1736
1737    /// Gets `SettlCurrency`, Tag 120.
1738    pub fn get_settl_currency(&self) -> Result<String, MessageRejectErrorEnum> {
1739        let mut fld = field::SettlCurrencyField::new(String::new());
1740        self.message.body.get_field(tag::SETTL_CURRENCY, &mut fld.0)?;
1741        Ok(fld.value().to_string())
1742    }
1743
1744
1745    /// Returns true if `SettlCurrency` is present, Tag 120.
1746    pub fn has_settl_currency(&self) -> bool {
1747        self.message.body.has(tag::SETTL_CURRENCY)
1748    }
1749
1750
1751
1752
1753    /// Sets `SettlmntTyp`, Tag 63.
1754    pub fn set_settlmnt_typ(&mut self, v: String) {
1755        self.message.body.set_field(tag::SETTLMNT_TYP, FIXString::from(v));
1756    }
1757
1758    /// Gets `SettlmntTyp`, Tag 63.
1759    pub fn get_settlmnt_typ(&self) -> Result<String, MessageRejectErrorEnum> {
1760        let mut fld = field::SettlmntTypField::new(String::new());
1761        self.message.body.get_field(tag::SETTLMNT_TYP, &mut fld.0)?;
1762        Ok(fld.value().to_string())
1763    }
1764
1765
1766    /// Returns true if `SettlmntTyp` is present, Tag 63.
1767    pub fn has_settlmnt_typ(&self) -> bool {
1768        self.message.body.has(tag::SETTLMNT_TYP)
1769    }
1770
1771
1772
1773
1774    /// Sets `Side`, Tag 54.
1775    pub fn set_side(&mut self, v: String) {
1776        self.message.body.set_field(tag::SIDE, FIXString::from(v));
1777    }
1778
1779    /// Gets `Side`, Tag 54.
1780    pub fn get_side(&self) -> Result<String, MessageRejectErrorEnum> {
1781        let mut fld = field::SideField::new(String::new());
1782        self.message.body.get_field(tag::SIDE, &mut fld.0)?;
1783        Ok(fld.value().to_string())
1784    }
1785
1786
1787    /// Returns true if `Side` is present, Tag 54.
1788    pub fn has_side(&self) -> bool {
1789        self.message.body.has(tag::SIDE)
1790    }
1791
1792
1793
1794
1795    /// Sets `SolicitedFlag`, Tag 377.
1796    pub fn set_solicited_flag(&mut self, v: bool) {
1797        self.message.body.set_field(tag::SOLICITED_FLAG, fixer::fix_boolean::FIXBoolean::from(v));
1798    }
1799
1800    /// Gets `SolicitedFlag`, Tag 377.
1801    pub fn get_solicited_flag(&self) -> Result<bool, MessageRejectErrorEnum> {
1802        let mut fld = field::SolicitedFlagField::new(false);
1803        self.message.body.get_field(tag::SOLICITED_FLAG, &mut fld.0)?;
1804        Ok(fld.value())
1805    }
1806
1807
1808    /// Returns true if `SolicitedFlag` is present, Tag 377.
1809    pub fn has_solicited_flag(&self) -> bool {
1810        self.message.body.has(tag::SOLICITED_FLAG)
1811    }
1812
1813
1814
1815
1816    /// Sets `StopPx`, Tag 99.
1817    pub fn set_stop_px(&mut self, val: Decimal, scale: i32) {
1818        self.message.body.set_field(tag::STOP_PX, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1819    }
1820
1821    /// Gets `StopPx`, Tag 99.
1822    pub fn get_stop_px(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1823        let mut fld = field::StopPxField::new(Decimal::ZERO, 0);
1824        self.message.body.get_field(tag::STOP_PX, &mut fld.0)?;
1825        Ok(fld.value())
1826    }
1827
1828
1829    /// Returns true if `StopPx` is present, Tag 99.
1830    pub fn has_stop_px(&self) -> bool {
1831        self.message.body.has(tag::STOP_PX)
1832    }
1833
1834
1835
1836
1837    /// Sets `StrikePrice`, Tag 202.
1838    pub fn set_strike_price(&mut self, val: Decimal, scale: i32) {
1839        self.message.body.set_field(tag::STRIKE_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1840    }
1841
1842    /// Gets `StrikePrice`, Tag 202.
1843    pub fn get_strike_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1844        let mut fld = field::StrikePriceField::new(Decimal::ZERO, 0);
1845        self.message.body.get_field(tag::STRIKE_PRICE, &mut fld.0)?;
1846        Ok(fld.value())
1847    }
1848
1849
1850    /// Returns true if `StrikePrice` is present, Tag 202.
1851    pub fn has_strike_price(&self) -> bool {
1852        self.message.body.has(tag::STRIKE_PRICE)
1853    }
1854
1855
1856
1857
1858    /// Sets `Symbol`, Tag 55.
1859    pub fn set_symbol(&mut self, v: String) {
1860        self.message.body.set_field(tag::SYMBOL, FIXString::from(v));
1861    }
1862
1863    /// Gets `Symbol`, Tag 55.
1864    pub fn get_symbol(&self) -> Result<String, MessageRejectErrorEnum> {
1865        let mut fld = field::SymbolField::new(String::new());
1866        self.message.body.get_field(tag::SYMBOL, &mut fld.0)?;
1867        Ok(fld.value().to_string())
1868    }
1869
1870
1871    /// Returns true if `Symbol` is present, Tag 55.
1872    pub fn has_symbol(&self) -> bool {
1873        self.message.body.has(tag::SYMBOL)
1874    }
1875
1876
1877
1878
1879    /// Sets `SymbolSfx`, Tag 65.
1880    pub fn set_symbol_sfx(&mut self, v: String) {
1881        self.message.body.set_field(tag::SYMBOL_SFX, FIXString::from(v));
1882    }
1883
1884    /// Gets `SymbolSfx`, Tag 65.
1885    pub fn get_symbol_sfx(&self) -> Result<String, MessageRejectErrorEnum> {
1886        let mut fld = field::SymbolSfxField::new(String::new());
1887        self.message.body.get_field(tag::SYMBOL_SFX, &mut fld.0)?;
1888        Ok(fld.value().to_string())
1889    }
1890
1891
1892    /// Returns true if `SymbolSfx` is present, Tag 65.
1893    pub fn has_symbol_sfx(&self) -> bool {
1894        self.message.body.has(tag::SYMBOL_SFX)
1895    }
1896
1897
1898
1899
1900    /// Sets `Text`, Tag 58.
1901    pub fn set_text(&mut self, v: String) {
1902        self.message.body.set_field(tag::TEXT, FIXString::from(v));
1903    }
1904
1905    /// Gets `Text`, Tag 58.
1906    pub fn get_text(&self) -> Result<String, MessageRejectErrorEnum> {
1907        let mut fld = field::TextField::new(String::new());
1908        self.message.body.get_field(tag::TEXT, &mut fld.0)?;
1909        Ok(fld.value().to_string())
1910    }
1911
1912
1913    /// Returns true if `Text` is present, Tag 58.
1914    pub fn has_text(&self) -> bool {
1915        self.message.body.has(tag::TEXT)
1916    }
1917
1918
1919
1920
1921    /// Sets `TimeInForce`, Tag 59.
1922    pub fn set_time_in_force(&mut self, v: String) {
1923        self.message.body.set_field(tag::TIME_IN_FORCE, FIXString::from(v));
1924    }
1925
1926    /// Gets `TimeInForce`, Tag 59.
1927    pub fn get_time_in_force(&self) -> Result<String, MessageRejectErrorEnum> {
1928        let mut fld = field::TimeInForceField::new(String::new());
1929        self.message.body.get_field(tag::TIME_IN_FORCE, &mut fld.0)?;
1930        Ok(fld.value().to_string())
1931    }
1932
1933
1934    /// Returns true if `TimeInForce` is present, Tag 59.
1935    pub fn has_time_in_force(&self) -> bool {
1936        self.message.body.has(tag::TIME_IN_FORCE)
1937    }
1938
1939
1940
1941
1942    /// Sets `TradeDate`, Tag 75.
1943    pub fn set_trade_date(&mut self, v: String) {
1944        self.message.body.set_field(tag::TRADE_DATE, FIXString::from(v));
1945    }
1946
1947    /// Gets `TradeDate`, Tag 75.
1948    pub fn get_trade_date(&self) -> Result<String, MessageRejectErrorEnum> {
1949        let mut fld = field::TradeDateField::new(String::new());
1950        self.message.body.get_field(tag::TRADE_DATE, &mut fld.0)?;
1951        Ok(fld.value().to_string())
1952    }
1953
1954
1955    /// Returns true if `TradeDate` is present, Tag 75.
1956    pub fn has_trade_date(&self) -> bool {
1957        self.message.body.has(tag::TRADE_DATE)
1958    }
1959
1960
1961
1962
1963    /// Sets `TradingSessionID`, Tag 336.
1964    pub fn set_trading_session_id(&mut self, v: String) {
1965        self.message.body.set_field(tag::TRADING_SESSION_ID, FIXString::from(v));
1966    }
1967
1968    /// Gets `TradingSessionID`, Tag 336.
1969    pub fn get_trading_session_id(&self) -> Result<String, MessageRejectErrorEnum> {
1970        let mut fld = field::TradingSessionIDField::new(String::new());
1971        self.message.body.get_field(tag::TRADING_SESSION_ID, &mut fld.0)?;
1972        Ok(fld.value().to_string())
1973    }
1974
1975
1976    /// Returns true if `TradingSessionID` is present, Tag 336.
1977    pub fn has_trading_session_id(&self) -> bool {
1978        self.message.body.has(tag::TRADING_SESSION_ID)
1979    }
1980
1981
1982
1983
1984    /// Sets `TransactTime`, Tag 60.
1985    pub fn set_transact_time(&mut self, v: Timestamp) {
1986        self.message.body.set_field(tag::TRANSACT_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
1987            time: v,
1988            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
1989        });
1990    }
1991
1992    /// Gets `TransactTime`, Tag 60.
1993    pub fn get_transact_time(&self) -> Result<Timestamp, MessageRejectErrorEnum> {
1994        let mut fld = field::TransactTimeField::new(Timestamp::UNIX_EPOCH);
1995        self.message.body.get_field(tag::TRANSACT_TIME, &mut fld.0)?;
1996        Ok(fld.value())
1997    }
1998
1999
2000    /// Returns true if `TransactTime` is present, Tag 60.
2001    pub fn has_transact_time(&self) -> bool {
2002        self.message.body.has(tag::TRANSACT_TIME)
2003    }
2004
2005
2006}
2007
2008/// `RouteOut` is the callback type for routing `ExecutionReport` messages.
2009pub type RouteOut = fn(msg: ExecutionReport, session_id: SessionID) -> Result<(), MessageRejectErrorEnum>;
2010
2011/// Route type returned by the `route` function.
2012pub type Route = (&'static str, &'static str, Box<dyn Fn(&Message, SessionID) -> Result<(), MessageRejectErrorEnum> + Send>);
2013
2014/// Returns the begin string, message type, and route function for `ExecutionReport`.
2015pub fn route(router: RouteOut) -> Route {
2016    let r = move |msg: &Message, session_id: SessionID| -> Result<(), MessageRejectErrorEnum> {
2017        router(ExecutionReport::from_message(msg.clone()), session_id)
2018    };
2019    ("FIX.4.2", "8", Box::new(r))
2020}