Skip to main content

fixer_fix/fix50/
execution_acknowledgement.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 crate::field;
16use crate::tag;
17
18/// `ExecutionAcknowledgement` is the `fix50` `ExecutionAcknowledgement` type, `MsgType` = BN.
19pub struct ExecutionAcknowledgement {
20    pub message: Message,
21}
22
23impl ExecutionAcknowledgement {
24    /// Creates a new `ExecutionAcknowledgement` with required fields.
25    pub fn new(order_id: field::OrderIDField, exec_ack_status: field::ExecAckStatusField, exec_id: field::ExecIDField, side: field::SideField) -> Self {
26        let mut msg = Message::new();
27        msg.header.set_field(tag::MSG_TYPE, FIXString::from("BN".to_string()));
28
29        msg.body.set_field(tag::ORDER_ID, order_id.0);
30
31        msg.body.set_field(tag::EXEC_ACK_STATUS, exec_ack_status.0);
32
33        msg.body.set_field(tag::EXEC_ID, exec_id.0);
34
35        msg.body.set_field(tag::SIDE, side.0);
36
37        Self { message: msg }
38    }
39
40    /// Creates a `ExecutionAcknowledgement` from an existing `Message`.
41    pub fn from_message(msg: Message) -> Self {
42        Self { message: msg }
43    }
44
45    /// Returns the underlying `Message`.
46    pub fn to_message(self) -> Message {
47        self.message
48    }
49
50
51
52
53    /// Sets `AvgPx`, Tag 6.
54    pub fn set_avg_px(&mut self, val: Decimal, scale: i32) {
55        self.message.body.set_field(tag::AVG_PX, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
56    }
57
58    /// Gets `AvgPx`, Tag 6.
59    pub fn get_avg_px(&self) -> Result<Decimal, MessageRejectErrorEnum> {
60        let mut fld = field::AvgPxField::new(Decimal::ZERO, 0);
61        self.message.body.get_field(tag::AVG_PX, &mut fld.0)?;
62        Ok(fld.value())
63    }
64
65
66    /// Returns true if `AvgPx` is present, Tag 6.
67    pub fn has_avg_px(&self) -> bool {
68        self.message.body.has(tag::AVG_PX)
69    }
70
71
72
73
74    /// Sets `CFICode`, Tag 461.
75    pub fn set_cfi_code(&mut self, v: String) {
76        self.message.body.set_field(tag::CFI_CODE, FIXString::from(v));
77    }
78
79    /// Gets `CFICode`, Tag 461.
80    pub fn get_cfi_code(&self) -> Result<String, MessageRejectErrorEnum> {
81        let mut fld = field::CFICodeField::new(String::new());
82        self.message.body.get_field(tag::CFI_CODE, &mut fld.0)?;
83        Ok(fld.value().to_string())
84    }
85
86
87    /// Returns true if `CFICode` is present, Tag 461.
88    pub fn has_cfi_code(&self) -> bool {
89        self.message.body.has(tag::CFI_CODE)
90    }
91
92
93
94
95    /// Sets `CPProgram`, Tag 875.
96    pub fn set_cp_program(&mut self, v: isize) {
97        self.message.body.set_field(tag::CP_PROGRAM, fixer::fix_int::FIXInt::from(v));
98    }
99
100    /// Gets `CPProgram`, Tag 875.
101    pub fn get_cp_program(&self) -> Result<isize, MessageRejectErrorEnum> {
102        let mut fld = field::CPProgramField::new(0);
103        self.message.body.get_field(tag::CP_PROGRAM, &mut fld.0)?;
104        Ok(fld.value())
105    }
106
107
108    /// Returns true if `CPProgram` is present, Tag 875.
109    pub fn has_cp_program(&self) -> bool {
110        self.message.body.has(tag::CP_PROGRAM)
111    }
112
113
114
115
116    /// Sets `CPRegType`, Tag 876.
117    pub fn set_cp_reg_type(&mut self, v: String) {
118        self.message.body.set_field(tag::CP_REG_TYPE, FIXString::from(v));
119    }
120
121    /// Gets `CPRegType`, Tag 876.
122    pub fn get_cp_reg_type(&self) -> Result<String, MessageRejectErrorEnum> {
123        let mut fld = field::CPRegTypeField::new(String::new());
124        self.message.body.get_field(tag::CP_REG_TYPE, &mut fld.0)?;
125        Ok(fld.value().to_string())
126    }
127
128
129    /// Returns true if `CPRegType` is present, Tag 876.
130    pub fn has_cp_reg_type(&self) -> bool {
131        self.message.body.has(tag::CP_REG_TYPE)
132    }
133
134
135
136
137    /// Sets `CashOrderQty`, Tag 152.
138    pub fn set_cash_order_qty(&mut self, val: Decimal, scale: i32) {
139        self.message.body.set_field(tag::CASH_ORDER_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
140    }
141
142    /// Gets `CashOrderQty`, Tag 152.
143    pub fn get_cash_order_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
144        let mut fld = field::CashOrderQtyField::new(Decimal::ZERO, 0);
145        self.message.body.get_field(tag::CASH_ORDER_QTY, &mut fld.0)?;
146        Ok(fld.value())
147    }
148
149
150    /// Returns true if `CashOrderQty` is present, Tag 152.
151    pub fn has_cash_order_qty(&self) -> bool {
152        self.message.body.has(tag::CASH_ORDER_QTY)
153    }
154
155
156
157
158    /// Sets `ClOrdID`, Tag 11.
159    pub fn set_cl_ord_id(&mut self, v: String) {
160        self.message.body.set_field(tag::CL_ORD_ID, FIXString::from(v));
161    }
162
163    /// Gets `ClOrdID`, Tag 11.
164    pub fn get_cl_ord_id(&self) -> Result<String, MessageRejectErrorEnum> {
165        let mut fld = field::ClOrdIDField::new(String::new());
166        self.message.body.get_field(tag::CL_ORD_ID, &mut fld.0)?;
167        Ok(fld.value().to_string())
168    }
169
170
171    /// Returns true if `ClOrdID` is present, Tag 11.
172    pub fn has_cl_ord_id(&self) -> bool {
173        self.message.body.has(tag::CL_ORD_ID)
174    }
175
176
177
178
179    /// Sets `ContractMultiplier`, Tag 231.
180    pub fn set_contract_multiplier(&mut self, val: Decimal, scale: i32) {
181        self.message.body.set_field(tag::CONTRACT_MULTIPLIER, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
182    }
183
184    /// Gets `ContractMultiplier`, Tag 231.
185    pub fn get_contract_multiplier(&self) -> Result<Decimal, MessageRejectErrorEnum> {
186        let mut fld = field::ContractMultiplierField::new(Decimal::ZERO, 0);
187        self.message.body.get_field(tag::CONTRACT_MULTIPLIER, &mut fld.0)?;
188        Ok(fld.value())
189    }
190
191
192    /// Returns true if `ContractMultiplier` is present, Tag 231.
193    pub fn has_contract_multiplier(&self) -> bool {
194        self.message.body.has(tag::CONTRACT_MULTIPLIER)
195    }
196
197
198
199
200    /// Sets `ContractSettlMonth`, Tag 667.
201    pub fn set_contract_settl_month(&mut self, v: String) {
202        self.message.body.set_field(tag::CONTRACT_SETTL_MONTH, FIXString::from(v));
203    }
204
205    /// Gets `ContractSettlMonth`, Tag 667.
206    pub fn get_contract_settl_month(&self) -> Result<String, MessageRejectErrorEnum> {
207        let mut fld = field::ContractSettlMonthField::new(String::new());
208        self.message.body.get_field(tag::CONTRACT_SETTL_MONTH, &mut fld.0)?;
209        Ok(fld.value().to_string())
210    }
211
212
213    /// Returns true if `ContractSettlMonth` is present, Tag 667.
214    pub fn has_contract_settl_month(&self) -> bool {
215        self.message.body.has(tag::CONTRACT_SETTL_MONTH)
216    }
217
218
219
220
221    /// Sets `CountryOfIssue`, Tag 470.
222    pub fn set_country_of_issue(&mut self, v: String) {
223        self.message.body.set_field(tag::COUNTRY_OF_ISSUE, FIXString::from(v));
224    }
225
226    /// Gets `CountryOfIssue`, Tag 470.
227    pub fn get_country_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
228        let mut fld = field::CountryOfIssueField::new(String::new());
229        self.message.body.get_field(tag::COUNTRY_OF_ISSUE, &mut fld.0)?;
230        Ok(fld.value().to_string())
231    }
232
233
234    /// Returns true if `CountryOfIssue` is present, Tag 470.
235    pub fn has_country_of_issue(&self) -> bool {
236        self.message.body.has(tag::COUNTRY_OF_ISSUE)
237    }
238
239
240
241
242    /// Sets `CouponPaymentDate`, Tag 224.
243    pub fn set_coupon_payment_date(&mut self, v: String) {
244        self.message.body.set_field(tag::COUPON_PAYMENT_DATE, FIXString::from(v));
245    }
246
247    /// Gets `CouponPaymentDate`, Tag 224.
248    pub fn get_coupon_payment_date(&self) -> Result<String, MessageRejectErrorEnum> {
249        let mut fld = field::CouponPaymentDateField::new(String::new());
250        self.message.body.get_field(tag::COUPON_PAYMENT_DATE, &mut fld.0)?;
251        Ok(fld.value().to_string())
252    }
253
254
255    /// Returns true if `CouponPaymentDate` is present, Tag 224.
256    pub fn has_coupon_payment_date(&self) -> bool {
257        self.message.body.has(tag::COUPON_PAYMENT_DATE)
258    }
259
260
261
262
263    /// Sets `CouponRate`, Tag 223.
264    pub fn set_coupon_rate(&mut self, val: Decimal, scale: i32) {
265        self.message.body.set_field(tag::COUPON_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
266    }
267
268    /// Gets `CouponRate`, Tag 223.
269    pub fn get_coupon_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
270        let mut fld = field::CouponRateField::new(Decimal::ZERO, 0);
271        self.message.body.get_field(tag::COUPON_RATE, &mut fld.0)?;
272        Ok(fld.value())
273    }
274
275
276    /// Returns true if `CouponRate` is present, Tag 223.
277    pub fn has_coupon_rate(&self) -> bool {
278        self.message.body.has(tag::COUPON_RATE)
279    }
280
281
282
283
284    /// Sets `CreditRating`, Tag 255.
285    pub fn set_credit_rating(&mut self, v: String) {
286        self.message.body.set_field(tag::CREDIT_RATING, FIXString::from(v));
287    }
288
289    /// Gets `CreditRating`, Tag 255.
290    pub fn get_credit_rating(&self) -> Result<String, MessageRejectErrorEnum> {
291        let mut fld = field::CreditRatingField::new(String::new());
292        self.message.body.get_field(tag::CREDIT_RATING, &mut fld.0)?;
293        Ok(fld.value().to_string())
294    }
295
296
297    /// Returns true if `CreditRating` is present, Tag 255.
298    pub fn has_credit_rating(&self) -> bool {
299        self.message.body.has(tag::CREDIT_RATING)
300    }
301
302
303
304
305    /// Sets `CumQty`, Tag 14.
306    pub fn set_cum_qty(&mut self, val: Decimal, scale: i32) {
307        self.message.body.set_field(tag::CUM_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
308    }
309
310    /// Gets `CumQty`, Tag 14.
311    pub fn get_cum_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
312        let mut fld = field::CumQtyField::new(Decimal::ZERO, 0);
313        self.message.body.get_field(tag::CUM_QTY, &mut fld.0)?;
314        Ok(fld.value())
315    }
316
317
318    /// Returns true if `CumQty` is present, Tag 14.
319    pub fn has_cum_qty(&self) -> bool {
320        self.message.body.has(tag::CUM_QTY)
321    }
322
323
324
325
326    /// Sets `DKReason`, Tag 127.
327    pub fn set_dk_reason(&mut self, v: String) {
328        self.message.body.set_field(tag::DK_REASON, FIXString::from(v));
329    }
330
331    /// Gets `DKReason`, Tag 127.
332    pub fn get_dk_reason(&self) -> Result<String, MessageRejectErrorEnum> {
333        let mut fld = field::DKReasonField::new(String::new());
334        self.message.body.get_field(tag::DK_REASON, &mut fld.0)?;
335        Ok(fld.value().to_string())
336    }
337
338
339    /// Returns true if `DKReason` is present, Tag 127.
340    pub fn has_dk_reason(&self) -> bool {
341        self.message.body.has(tag::DK_REASON)
342    }
343
344
345
346
347    /// Sets `DatedDate`, Tag 873.
348    pub fn set_dated_date(&mut self, v: String) {
349        self.message.body.set_field(tag::DATED_DATE, FIXString::from(v));
350    }
351
352    /// Gets `DatedDate`, Tag 873.
353    pub fn get_dated_date(&self) -> Result<String, MessageRejectErrorEnum> {
354        let mut fld = field::DatedDateField::new(String::new());
355        self.message.body.get_field(tag::DATED_DATE, &mut fld.0)?;
356        Ok(fld.value().to_string())
357    }
358
359
360    /// Returns true if `DatedDate` is present, Tag 873.
361    pub fn has_dated_date(&self) -> bool {
362        self.message.body.has(tag::DATED_DATE)
363    }
364
365
366
367
368    /// Sets `EncodedIssuer`, Tag 349.
369    pub fn set_encoded_issuer(&mut self, v: String) {
370        self.message.body.set_field(tag::ENCODED_ISSUER, FIXString::from(v));
371    }
372
373    /// Gets `EncodedIssuer`, Tag 349.
374    pub fn get_encoded_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
375        let mut fld = field::EncodedIssuerField::new(String::new());
376        self.message.body.get_field(tag::ENCODED_ISSUER, &mut fld.0)?;
377        Ok(fld.value().to_string())
378    }
379
380
381    /// Returns true if `EncodedIssuer` is present, Tag 349.
382    pub fn has_encoded_issuer(&self) -> bool {
383        self.message.body.has(tag::ENCODED_ISSUER)
384    }
385
386
387
388
389    /// Sets `EncodedIssuerLen`, Tag 348.
390    pub fn set_encoded_issuer_len(&mut self, v: isize) {
391        self.message.body.set_field(tag::ENCODED_ISSUER_LEN, fixer::fix_int::FIXInt::from(v));
392    }
393
394    /// Gets `EncodedIssuerLen`, Tag 348.
395    pub fn get_encoded_issuer_len(&self) -> Result<isize, MessageRejectErrorEnum> {
396        let mut fld = field::EncodedIssuerLenField::new(0);
397        self.message.body.get_field(tag::ENCODED_ISSUER_LEN, &mut fld.0)?;
398        Ok(fld.value())
399    }
400
401
402    /// Returns true if `EncodedIssuerLen` is present, Tag 348.
403    pub fn has_encoded_issuer_len(&self) -> bool {
404        self.message.body.has(tag::ENCODED_ISSUER_LEN)
405    }
406
407
408
409
410    /// Sets `EncodedSecurityDesc`, Tag 351.
411    pub fn set_encoded_security_desc(&mut self, v: String) {
412        self.message.body.set_field(tag::ENCODED_SECURITY_DESC, FIXString::from(v));
413    }
414
415    /// Gets `EncodedSecurityDesc`, Tag 351.
416    pub fn get_encoded_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
417        let mut fld = field::EncodedSecurityDescField::new(String::new());
418        self.message.body.get_field(tag::ENCODED_SECURITY_DESC, &mut fld.0)?;
419        Ok(fld.value().to_string())
420    }
421
422
423    /// Returns true if `EncodedSecurityDesc` is present, Tag 351.
424    pub fn has_encoded_security_desc(&self) -> bool {
425        self.message.body.has(tag::ENCODED_SECURITY_DESC)
426    }
427
428
429
430
431    /// Sets `EncodedSecurityDescLen`, Tag 350.
432    pub fn set_encoded_security_desc_len(&mut self, v: isize) {
433        self.message.body.set_field(tag::ENCODED_SECURITY_DESC_LEN, fixer::fix_int::FIXInt::from(v));
434    }
435
436    /// Gets `EncodedSecurityDescLen`, Tag 350.
437    pub fn get_encoded_security_desc_len(&self) -> Result<isize, MessageRejectErrorEnum> {
438        let mut fld = field::EncodedSecurityDescLenField::new(0);
439        self.message.body.get_field(tag::ENCODED_SECURITY_DESC_LEN, &mut fld.0)?;
440        Ok(fld.value())
441    }
442
443
444    /// Returns true if `EncodedSecurityDescLen` is present, Tag 350.
445    pub fn has_encoded_security_desc_len(&self) -> bool {
446        self.message.body.has(tag::ENCODED_SECURITY_DESC_LEN)
447    }
448
449
450
451
452    /// Sets `EncodedText`, Tag 355.
453    pub fn set_encoded_text(&mut self, v: String) {
454        self.message.body.set_field(tag::ENCODED_TEXT, FIXString::from(v));
455    }
456
457    /// Gets `EncodedText`, Tag 355.
458    pub fn get_encoded_text(&self) -> Result<String, MessageRejectErrorEnum> {
459        let mut fld = field::EncodedTextField::new(String::new());
460        self.message.body.get_field(tag::ENCODED_TEXT, &mut fld.0)?;
461        Ok(fld.value().to_string())
462    }
463
464
465    /// Returns true if `EncodedText` is present, Tag 355.
466    pub fn has_encoded_text(&self) -> bool {
467        self.message.body.has(tag::ENCODED_TEXT)
468    }
469
470
471
472
473    /// Sets `EncodedTextLen`, Tag 354.
474    pub fn set_encoded_text_len(&mut self, v: isize) {
475        self.message.body.set_field(tag::ENCODED_TEXT_LEN, fixer::fix_int::FIXInt::from(v));
476    }
477
478    /// Gets `EncodedTextLen`, Tag 354.
479    pub fn get_encoded_text_len(&self) -> Result<isize, MessageRejectErrorEnum> {
480        let mut fld = field::EncodedTextLenField::new(0);
481        self.message.body.get_field(tag::ENCODED_TEXT_LEN, &mut fld.0)?;
482        Ok(fld.value())
483    }
484
485
486    /// Returns true if `EncodedTextLen` is present, Tag 354.
487    pub fn has_encoded_text_len(&self) -> bool {
488        self.message.body.has(tag::ENCODED_TEXT_LEN)
489    }
490
491
492
493
494    /// Sets `ExecAckStatus`, Tag 1036.
495    pub fn set_exec_ack_status(&mut self, v: String) {
496        self.message.body.set_field(tag::EXEC_ACK_STATUS, FIXString::from(v));
497    }
498
499    /// Gets `ExecAckStatus`, Tag 1036.
500    pub fn get_exec_ack_status(&self) -> Result<String, MessageRejectErrorEnum> {
501        let mut fld = field::ExecAckStatusField::new(String::new());
502        self.message.body.get_field(tag::EXEC_ACK_STATUS, &mut fld.0)?;
503        Ok(fld.value().to_string())
504    }
505
506
507    /// Returns true if `ExecAckStatus` is present, Tag 1036.
508    pub fn has_exec_ack_status(&self) -> bool {
509        self.message.body.has(tag::EXEC_ACK_STATUS)
510    }
511
512
513
514
515    /// Sets `ExecID`, Tag 17.
516    pub fn set_exec_id(&mut self, v: String) {
517        self.message.body.set_field(tag::EXEC_ID, FIXString::from(v));
518    }
519
520    /// Gets `ExecID`, Tag 17.
521    pub fn get_exec_id(&self) -> Result<String, MessageRejectErrorEnum> {
522        let mut fld = field::ExecIDField::new(String::new());
523        self.message.body.get_field(tag::EXEC_ID, &mut fld.0)?;
524        Ok(fld.value().to_string())
525    }
526
527
528    /// Returns true if `ExecID` is present, Tag 17.
529    pub fn has_exec_id(&self) -> bool {
530        self.message.body.has(tag::EXEC_ID)
531    }
532
533
534
535
536    /// Sets `Factor`, Tag 228.
537    pub fn set_factor(&mut self, val: Decimal, scale: i32) {
538        self.message.body.set_field(tag::FACTOR, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
539    }
540
541    /// Gets `Factor`, Tag 228.
542    pub fn get_factor(&self) -> Result<Decimal, MessageRejectErrorEnum> {
543        let mut fld = field::FactorField::new(Decimal::ZERO, 0);
544        self.message.body.get_field(tag::FACTOR, &mut fld.0)?;
545        Ok(fld.value())
546    }
547
548
549    /// Returns true if `Factor` is present, Tag 228.
550    pub fn has_factor(&self) -> bool {
551        self.message.body.has(tag::FACTOR)
552    }
553
554
555
556
557    /// Sets `InstrRegistry`, Tag 543.
558    pub fn set_instr_registry(&mut self, v: String) {
559        self.message.body.set_field(tag::INSTR_REGISTRY, FIXString::from(v));
560    }
561
562    /// Gets `InstrRegistry`, Tag 543.
563    pub fn get_instr_registry(&self) -> Result<String, MessageRejectErrorEnum> {
564        let mut fld = field::InstrRegistryField::new(String::new());
565        self.message.body.get_field(tag::INSTR_REGISTRY, &mut fld.0)?;
566        Ok(fld.value().to_string())
567    }
568
569
570    /// Returns true if `InstrRegistry` is present, Tag 543.
571    pub fn has_instr_registry(&self) -> bool {
572        self.message.body.has(tag::INSTR_REGISTRY)
573    }
574
575
576
577
578    /// Sets `InstrmtAssignmentMethod`, Tag 1049.
579    pub fn set_instrmt_assignment_method(&mut self, v: String) {
580        self.message.body.set_field(tag::INSTRMT_ASSIGNMENT_METHOD, FIXString::from(v));
581    }
582
583    /// Gets `InstrmtAssignmentMethod`, Tag 1049.
584    pub fn get_instrmt_assignment_method(&self) -> Result<String, MessageRejectErrorEnum> {
585        let mut fld = field::InstrmtAssignmentMethodField::new(String::new());
586        self.message.body.get_field(tag::INSTRMT_ASSIGNMENT_METHOD, &mut fld.0)?;
587        Ok(fld.value().to_string())
588    }
589
590
591    /// Returns true if `InstrmtAssignmentMethod` is present, Tag 1049.
592    pub fn has_instrmt_assignment_method(&self) -> bool {
593        self.message.body.has(tag::INSTRMT_ASSIGNMENT_METHOD)
594    }
595
596
597
598
599    /// Sets `InterestAccrualDate`, Tag 874.
600    pub fn set_interest_accrual_date(&mut self, v: String) {
601        self.message.body.set_field(tag::INTEREST_ACCRUAL_DATE, FIXString::from(v));
602    }
603
604    /// Gets `InterestAccrualDate`, Tag 874.
605    pub fn get_interest_accrual_date(&self) -> Result<String, MessageRejectErrorEnum> {
606        let mut fld = field::InterestAccrualDateField::new(String::new());
607        self.message.body.get_field(tag::INTEREST_ACCRUAL_DATE, &mut fld.0)?;
608        Ok(fld.value().to_string())
609    }
610
611
612    /// Returns true if `InterestAccrualDate` is present, Tag 874.
613    pub fn has_interest_accrual_date(&self) -> bool {
614        self.message.body.has(tag::INTEREST_ACCRUAL_DATE)
615    }
616
617
618
619
620    /// Sets `IssueDate`, Tag 225.
621    pub fn set_issue_date(&mut self, v: String) {
622        self.message.body.set_field(tag::ISSUE_DATE, FIXString::from(v));
623    }
624
625    /// Gets `IssueDate`, Tag 225.
626    pub fn get_issue_date(&self) -> Result<String, MessageRejectErrorEnum> {
627        let mut fld = field::IssueDateField::new(String::new());
628        self.message.body.get_field(tag::ISSUE_DATE, &mut fld.0)?;
629        Ok(fld.value().to_string())
630    }
631
632
633    /// Returns true if `IssueDate` is present, Tag 225.
634    pub fn has_issue_date(&self) -> bool {
635        self.message.body.has(tag::ISSUE_DATE)
636    }
637
638
639
640
641    /// Sets `Issuer`, Tag 106.
642    pub fn set_issuer(&mut self, v: String) {
643        self.message.body.set_field(tag::ISSUER, FIXString::from(v));
644    }
645
646    /// Gets `Issuer`, Tag 106.
647    pub fn get_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
648        let mut fld = field::IssuerField::new(String::new());
649        self.message.body.get_field(tag::ISSUER, &mut fld.0)?;
650        Ok(fld.value().to_string())
651    }
652
653
654    /// Returns true if `Issuer` is present, Tag 106.
655    pub fn has_issuer(&self) -> bool {
656        self.message.body.has(tag::ISSUER)
657    }
658
659
660
661
662    /// Sets `LastParPx`, Tag 669.
663    pub fn set_last_par_px(&mut self, val: Decimal, scale: i32) {
664        self.message.body.set_field(tag::LAST_PAR_PX, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
665    }
666
667    /// Gets `LastParPx`, Tag 669.
668    pub fn get_last_par_px(&self) -> Result<Decimal, MessageRejectErrorEnum> {
669        let mut fld = field::LastParPxField::new(Decimal::ZERO, 0);
670        self.message.body.get_field(tag::LAST_PAR_PX, &mut fld.0)?;
671        Ok(fld.value())
672    }
673
674
675    /// Returns true if `LastParPx` is present, Tag 669.
676    pub fn has_last_par_px(&self) -> bool {
677        self.message.body.has(tag::LAST_PAR_PX)
678    }
679
680
681
682
683    /// Sets `LastPx`, Tag 31.
684    pub fn set_last_px(&mut self, val: Decimal, scale: i32) {
685        self.message.body.set_field(tag::LAST_PX, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
686    }
687
688    /// Gets `LastPx`, Tag 31.
689    pub fn get_last_px(&self) -> Result<Decimal, MessageRejectErrorEnum> {
690        let mut fld = field::LastPxField::new(Decimal::ZERO, 0);
691        self.message.body.get_field(tag::LAST_PX, &mut fld.0)?;
692        Ok(fld.value())
693    }
694
695
696    /// Returns true if `LastPx` is present, Tag 31.
697    pub fn has_last_px(&self) -> bool {
698        self.message.body.has(tag::LAST_PX)
699    }
700
701
702
703
704    /// Sets `LastQty`, Tag 32.
705    pub fn set_last_qty(&mut self, val: Decimal, scale: i32) {
706        self.message.body.set_field(tag::LAST_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
707    }
708
709    /// Gets `LastQty`, Tag 32.
710    pub fn get_last_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
711        let mut fld = field::LastQtyField::new(Decimal::ZERO, 0);
712        self.message.body.get_field(tag::LAST_QTY, &mut fld.0)?;
713        Ok(fld.value())
714    }
715
716
717    /// Returns true if `LastQty` is present, Tag 32.
718    pub fn has_last_qty(&self) -> bool {
719        self.message.body.has(tag::LAST_QTY)
720    }
721
722
723
724
725    /// Sets `LocaleOfIssue`, Tag 472.
726    pub fn set_locale_of_issue(&mut self, v: String) {
727        self.message.body.set_field(tag::LOCALE_OF_ISSUE, FIXString::from(v));
728    }
729
730    /// Gets `LocaleOfIssue`, Tag 472.
731    pub fn get_locale_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
732        let mut fld = field::LocaleOfIssueField::new(String::new());
733        self.message.body.get_field(tag::LOCALE_OF_ISSUE, &mut fld.0)?;
734        Ok(fld.value().to_string())
735    }
736
737
738    /// Returns true if `LocaleOfIssue` is present, Tag 472.
739    pub fn has_locale_of_issue(&self) -> bool {
740        self.message.body.has(tag::LOCALE_OF_ISSUE)
741    }
742
743
744
745
746    /// Sets `MaturityDate`, Tag 541.
747    pub fn set_maturity_date(&mut self, v: String) {
748        self.message.body.set_field(tag::MATURITY_DATE, FIXString::from(v));
749    }
750
751    /// Gets `MaturityDate`, Tag 541.
752    pub fn get_maturity_date(&self) -> Result<String, MessageRejectErrorEnum> {
753        let mut fld = field::MaturityDateField::new(String::new());
754        self.message.body.get_field(tag::MATURITY_DATE, &mut fld.0)?;
755        Ok(fld.value().to_string())
756    }
757
758
759    /// Returns true if `MaturityDate` is present, Tag 541.
760    pub fn has_maturity_date(&self) -> bool {
761        self.message.body.has(tag::MATURITY_DATE)
762    }
763
764
765
766
767    /// Sets `MaturityMonthYear`, Tag 200.
768    pub fn set_maturity_month_year(&mut self, v: String) {
769        self.message.body.set_field(tag::MATURITY_MONTH_YEAR, FIXString::from(v));
770    }
771
772    /// Gets `MaturityMonthYear`, Tag 200.
773    pub fn get_maturity_month_year(&self) -> Result<String, MessageRejectErrorEnum> {
774        let mut fld = field::MaturityMonthYearField::new(String::new());
775        self.message.body.get_field(tag::MATURITY_MONTH_YEAR, &mut fld.0)?;
776        Ok(fld.value().to_string())
777    }
778
779
780    /// Returns true if `MaturityMonthYear` is present, Tag 200.
781    pub fn has_maturity_month_year(&self) -> bool {
782        self.message.body.has(tag::MATURITY_MONTH_YEAR)
783    }
784
785
786
787
788    /// Sets `MaturityTime`, Tag 1079.
789    pub fn set_maturity_time(&mut self, v: String) {
790        self.message.body.set_field(tag::MATURITY_TIME, FIXString::from(v));
791    }
792
793    /// Gets `MaturityTime`, Tag 1079.
794    pub fn get_maturity_time(&self) -> Result<String, MessageRejectErrorEnum> {
795        let mut fld = field::MaturityTimeField::new(String::new());
796        self.message.body.get_field(tag::MATURITY_TIME, &mut fld.0)?;
797        Ok(fld.value().to_string())
798    }
799
800
801    /// Returns true if `MaturityTime` is present, Tag 1079.
802    pub fn has_maturity_time(&self) -> bool {
803        self.message.body.has(tag::MATURITY_TIME)
804    }
805
806
807
808
809    /// Sets `MinPriceIncrement`, Tag 969.
810    pub fn set_min_price_increment(&mut self, val: Decimal, scale: i32) {
811        self.message.body.set_field(tag::MIN_PRICE_INCREMENT, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
812    }
813
814    /// Gets `MinPriceIncrement`, Tag 969.
815    pub fn get_min_price_increment(&self) -> Result<Decimal, MessageRejectErrorEnum> {
816        let mut fld = field::MinPriceIncrementField::new(Decimal::ZERO, 0);
817        self.message.body.get_field(tag::MIN_PRICE_INCREMENT, &mut fld.0)?;
818        Ok(fld.value())
819    }
820
821
822    /// Returns true if `MinPriceIncrement` is present, Tag 969.
823    pub fn has_min_price_increment(&self) -> bool {
824        self.message.body.has(tag::MIN_PRICE_INCREMENT)
825    }
826
827
828
829
830    /// Sets `NTPositionLimit`, Tag 971.
831    pub fn set_nt_position_limit(&mut self, v: isize) {
832        self.message.body.set_field(tag::NT_POSITION_LIMIT, fixer::fix_int::FIXInt::from(v));
833    }
834
835    /// Gets `NTPositionLimit`, Tag 971.
836    pub fn get_nt_position_limit(&self) -> Result<isize, MessageRejectErrorEnum> {
837        let mut fld = field::NTPositionLimitField::new(0);
838        self.message.body.get_field(tag::NT_POSITION_LIMIT, &mut fld.0)?;
839        Ok(fld.value())
840    }
841
842
843    /// Returns true if `NTPositionLimit` is present, Tag 971.
844    pub fn has_nt_position_limit(&self) -> bool {
845        self.message.body.has(tag::NT_POSITION_LIMIT)
846    }
847
848
849
850
851    /// Sets `NoEvents`, Tag 864.
852    pub fn set_no_events(&mut self, v: isize) {
853        self.message.body.set_field(tag::NO_EVENTS, fixer::fix_int::FIXInt::from(v));
854    }
855
856    /// Gets `NoEvents`, Tag 864.
857    pub fn get_no_events(&self) -> Result<isize, MessageRejectErrorEnum> {
858        let mut fld = field::NoEventsField::new(0);
859        self.message.body.get_field(tag::NO_EVENTS, &mut fld.0)?;
860        Ok(fld.value())
861    }
862
863
864    /// Returns true if `NoEvents` is present, Tag 864.
865    pub fn has_no_events(&self) -> bool {
866        self.message.body.has(tag::NO_EVENTS)
867    }
868
869
870
871
872    /// Sets `NoInstrumentParties`, Tag 1018.
873    pub fn set_no_instrument_parties(&mut self, v: isize) {
874        self.message.body.set_field(tag::NO_INSTRUMENT_PARTIES, fixer::fix_int::FIXInt::from(v));
875    }
876
877    /// Gets `NoInstrumentParties`, Tag 1018.
878    pub fn get_no_instrument_parties(&self) -> Result<isize, MessageRejectErrorEnum> {
879        let mut fld = field::NoInstrumentPartiesField::new(0);
880        self.message.body.get_field(tag::NO_INSTRUMENT_PARTIES, &mut fld.0)?;
881        Ok(fld.value())
882    }
883
884
885    /// Returns true if `NoInstrumentParties` is present, Tag 1018.
886    pub fn has_no_instrument_parties(&self) -> bool {
887        self.message.body.has(tag::NO_INSTRUMENT_PARTIES)
888    }
889
890
891
892
893    /// Sets `NoLegs`, Tag 555.
894    pub fn set_no_legs(&mut self, v: isize) {
895        self.message.body.set_field(tag::NO_LEGS, fixer::fix_int::FIXInt::from(v));
896    }
897
898    /// Gets `NoLegs`, Tag 555.
899    pub fn get_no_legs(&self) -> Result<isize, MessageRejectErrorEnum> {
900        let mut fld = field::NoLegsField::new(0);
901        self.message.body.get_field(tag::NO_LEGS, &mut fld.0)?;
902        Ok(fld.value())
903    }
904
905
906    /// Returns true if `NoLegs` is present, Tag 555.
907    pub fn has_no_legs(&self) -> bool {
908        self.message.body.has(tag::NO_LEGS)
909    }
910
911
912
913
914    /// Sets `NoSecurityAltID`, Tag 454.
915    pub fn set_no_security_alt_id(&mut self, v: isize) {
916        self.message.body.set_field(tag::NO_SECURITY_ALT_ID, fixer::fix_int::FIXInt::from(v));
917    }
918
919    /// Gets `NoSecurityAltID`, Tag 454.
920    pub fn get_no_security_alt_id(&self) -> Result<isize, MessageRejectErrorEnum> {
921        let mut fld = field::NoSecurityAltIDField::new(0);
922        self.message.body.get_field(tag::NO_SECURITY_ALT_ID, &mut fld.0)?;
923        Ok(fld.value())
924    }
925
926
927    /// Returns true if `NoSecurityAltID` is present, Tag 454.
928    pub fn has_no_security_alt_id(&self) -> bool {
929        self.message.body.has(tag::NO_SECURITY_ALT_ID)
930    }
931
932
933
934
935    /// Sets `NoUnderlyings`, Tag 711.
936    pub fn set_no_underlyings(&mut self, v: isize) {
937        self.message.body.set_field(tag::NO_UNDERLYINGS, fixer::fix_int::FIXInt::from(v));
938    }
939
940    /// Gets `NoUnderlyings`, Tag 711.
941    pub fn get_no_underlyings(&self) -> Result<isize, MessageRejectErrorEnum> {
942        let mut fld = field::NoUnderlyingsField::new(0);
943        self.message.body.get_field(tag::NO_UNDERLYINGS, &mut fld.0)?;
944        Ok(fld.value())
945    }
946
947
948    /// Returns true if `NoUnderlyings` is present, Tag 711.
949    pub fn has_no_underlyings(&self) -> bool {
950        self.message.body.has(tag::NO_UNDERLYINGS)
951    }
952
953
954
955
956    /// Sets `OptAttribute`, Tag 206.
957    pub fn set_opt_attribute(&mut self, v: String) {
958        self.message.body.set_field(tag::OPT_ATTRIBUTE, FIXString::from(v));
959    }
960
961    /// Gets `OptAttribute`, Tag 206.
962    pub fn get_opt_attribute(&self) -> Result<String, MessageRejectErrorEnum> {
963        let mut fld = field::OptAttributeField::new(String::new());
964        self.message.body.get_field(tag::OPT_ATTRIBUTE, &mut fld.0)?;
965        Ok(fld.value().to_string())
966    }
967
968
969    /// Returns true if `OptAttribute` is present, Tag 206.
970    pub fn has_opt_attribute(&self) -> bool {
971        self.message.body.has(tag::OPT_ATTRIBUTE)
972    }
973
974
975
976
977    /// Sets `OrderID`, Tag 37.
978    pub fn set_order_id(&mut self, v: String) {
979        self.message.body.set_field(tag::ORDER_ID, FIXString::from(v));
980    }
981
982    /// Gets `OrderID`, Tag 37.
983    pub fn get_order_id(&self) -> Result<String, MessageRejectErrorEnum> {
984        let mut fld = field::OrderIDField::new(String::new());
985        self.message.body.get_field(tag::ORDER_ID, &mut fld.0)?;
986        Ok(fld.value().to_string())
987    }
988
989
990    /// Returns true if `OrderID` is present, Tag 37.
991    pub fn has_order_id(&self) -> bool {
992        self.message.body.has(tag::ORDER_ID)
993    }
994
995
996
997
998    /// Sets `OrderPercent`, Tag 516.
999    pub fn set_order_percent(&mut self, val: Decimal, scale: i32) {
1000        self.message.body.set_field(tag::ORDER_PERCENT, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1001    }
1002
1003    /// Gets `OrderPercent`, Tag 516.
1004    pub fn get_order_percent(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1005        let mut fld = field::OrderPercentField::new(Decimal::ZERO, 0);
1006        self.message.body.get_field(tag::ORDER_PERCENT, &mut fld.0)?;
1007        Ok(fld.value())
1008    }
1009
1010
1011    /// Returns true if `OrderPercent` is present, Tag 516.
1012    pub fn has_order_percent(&self) -> bool {
1013        self.message.body.has(tag::ORDER_PERCENT)
1014    }
1015
1016
1017
1018
1019    /// Sets `OrderQty`, Tag 38.
1020    pub fn set_order_qty(&mut self, val: Decimal, scale: i32) {
1021        self.message.body.set_field(tag::ORDER_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1022    }
1023
1024    /// Gets `OrderQty`, Tag 38.
1025    pub fn get_order_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1026        let mut fld = field::OrderQtyField::new(Decimal::ZERO, 0);
1027        self.message.body.get_field(tag::ORDER_QTY, &mut fld.0)?;
1028        Ok(fld.value())
1029    }
1030
1031
1032    /// Returns true if `OrderQty` is present, Tag 38.
1033    pub fn has_order_qty(&self) -> bool {
1034        self.message.body.has(tag::ORDER_QTY)
1035    }
1036
1037
1038
1039
1040    /// Sets `Pool`, Tag 691.
1041    pub fn set_pool(&mut self, v: String) {
1042        self.message.body.set_field(tag::POOL, FIXString::from(v));
1043    }
1044
1045    /// Gets `Pool`, Tag 691.
1046    pub fn get_pool(&self) -> Result<String, MessageRejectErrorEnum> {
1047        let mut fld = field::PoolField::new(String::new());
1048        self.message.body.get_field(tag::POOL, &mut fld.0)?;
1049        Ok(fld.value().to_string())
1050    }
1051
1052
1053    /// Returns true if `Pool` is present, Tag 691.
1054    pub fn has_pool(&self) -> bool {
1055        self.message.body.has(tag::POOL)
1056    }
1057
1058
1059
1060
1061    /// Sets `PositionLimit`, Tag 970.
1062    pub fn set_position_limit(&mut self, v: isize) {
1063        self.message.body.set_field(tag::POSITION_LIMIT, fixer::fix_int::FIXInt::from(v));
1064    }
1065
1066    /// Gets `PositionLimit`, Tag 970.
1067    pub fn get_position_limit(&self) -> Result<isize, MessageRejectErrorEnum> {
1068        let mut fld = field::PositionLimitField::new(0);
1069        self.message.body.get_field(tag::POSITION_LIMIT, &mut fld.0)?;
1070        Ok(fld.value())
1071    }
1072
1073
1074    /// Returns true if `PositionLimit` is present, Tag 970.
1075    pub fn has_position_limit(&self) -> bool {
1076        self.message.body.has(tag::POSITION_LIMIT)
1077    }
1078
1079
1080
1081
1082    /// Sets `PriceType`, Tag 423.
1083    pub fn set_price_type(&mut self, v: isize) {
1084        self.message.body.set_field(tag::PRICE_TYPE, fixer::fix_int::FIXInt::from(v));
1085    }
1086
1087    /// Gets `PriceType`, Tag 423.
1088    pub fn get_price_type(&self) -> Result<isize, MessageRejectErrorEnum> {
1089        let mut fld = field::PriceTypeField::new(0);
1090        self.message.body.get_field(tag::PRICE_TYPE, &mut fld.0)?;
1091        Ok(fld.value())
1092    }
1093
1094
1095    /// Returns true if `PriceType` is present, Tag 423.
1096    pub fn has_price_type(&self) -> bool {
1097        self.message.body.has(tag::PRICE_TYPE)
1098    }
1099
1100
1101
1102
1103    /// Sets `Product`, Tag 460.
1104    pub fn set_product(&mut self, v: isize) {
1105        self.message.body.set_field(tag::PRODUCT, fixer::fix_int::FIXInt::from(v));
1106    }
1107
1108    /// Gets `Product`, Tag 460.
1109    pub fn get_product(&self) -> Result<isize, MessageRejectErrorEnum> {
1110        let mut fld = field::ProductField::new(0);
1111        self.message.body.get_field(tag::PRODUCT, &mut fld.0)?;
1112        Ok(fld.value())
1113    }
1114
1115
1116    /// Returns true if `Product` is present, Tag 460.
1117    pub fn has_product(&self) -> bool {
1118        self.message.body.has(tag::PRODUCT)
1119    }
1120
1121
1122
1123
1124    /// Sets `RedemptionDate`, Tag 240.
1125    pub fn set_redemption_date(&mut self, v: String) {
1126        self.message.body.set_field(tag::REDEMPTION_DATE, FIXString::from(v));
1127    }
1128
1129    /// Gets `RedemptionDate`, Tag 240.
1130    pub fn get_redemption_date(&self) -> Result<String, MessageRejectErrorEnum> {
1131        let mut fld = field::RedemptionDateField::new(String::new());
1132        self.message.body.get_field(tag::REDEMPTION_DATE, &mut fld.0)?;
1133        Ok(fld.value().to_string())
1134    }
1135
1136
1137    /// Returns true if `RedemptionDate` is present, Tag 240.
1138    pub fn has_redemption_date(&self) -> bool {
1139        self.message.body.has(tag::REDEMPTION_DATE)
1140    }
1141
1142
1143
1144
1145    /// Sets `RepoCollateralSecurityType`, Tag 239.
1146    pub fn set_repo_collateral_security_type(&mut self, v: isize) {
1147        self.message.body.set_field(tag::REPO_COLLATERAL_SECURITY_TYPE, fixer::fix_int::FIXInt::from(v));
1148    }
1149
1150    /// Gets `RepoCollateralSecurityType`, Tag 239.
1151    pub fn get_repo_collateral_security_type(&self) -> Result<isize, MessageRejectErrorEnum> {
1152        let mut fld = field::RepoCollateralSecurityTypeField::new(0);
1153        self.message.body.get_field(tag::REPO_COLLATERAL_SECURITY_TYPE, &mut fld.0)?;
1154        Ok(fld.value())
1155    }
1156
1157
1158    /// Returns true if `RepoCollateralSecurityType` is present, Tag 239.
1159    pub fn has_repo_collateral_security_type(&self) -> bool {
1160        self.message.body.has(tag::REPO_COLLATERAL_SECURITY_TYPE)
1161    }
1162
1163
1164
1165
1166    /// Sets `RepurchaseRate`, Tag 227.
1167    pub fn set_repurchase_rate(&mut self, val: Decimal, scale: i32) {
1168        self.message.body.set_field(tag::REPURCHASE_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1169    }
1170
1171    /// Gets `RepurchaseRate`, Tag 227.
1172    pub fn get_repurchase_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1173        let mut fld = field::RepurchaseRateField::new(Decimal::ZERO, 0);
1174        self.message.body.get_field(tag::REPURCHASE_RATE, &mut fld.0)?;
1175        Ok(fld.value())
1176    }
1177
1178
1179    /// Returns true if `RepurchaseRate` is present, Tag 227.
1180    pub fn has_repurchase_rate(&self) -> bool {
1181        self.message.body.has(tag::REPURCHASE_RATE)
1182    }
1183
1184
1185
1186
1187    /// Sets `RepurchaseTerm`, Tag 226.
1188    pub fn set_repurchase_term(&mut self, v: isize) {
1189        self.message.body.set_field(tag::REPURCHASE_TERM, fixer::fix_int::FIXInt::from(v));
1190    }
1191
1192    /// Gets `RepurchaseTerm`, Tag 226.
1193    pub fn get_repurchase_term(&self) -> Result<isize, MessageRejectErrorEnum> {
1194        let mut fld = field::RepurchaseTermField::new(0);
1195        self.message.body.get_field(tag::REPURCHASE_TERM, &mut fld.0)?;
1196        Ok(fld.value())
1197    }
1198
1199
1200    /// Returns true if `RepurchaseTerm` is present, Tag 226.
1201    pub fn has_repurchase_term(&self) -> bool {
1202        self.message.body.has(tag::REPURCHASE_TERM)
1203    }
1204
1205
1206
1207
1208    /// Sets `RoundingDirection`, Tag 468.
1209    pub fn set_rounding_direction(&mut self, v: String) {
1210        self.message.body.set_field(tag::ROUNDING_DIRECTION, FIXString::from(v));
1211    }
1212
1213    /// Gets `RoundingDirection`, Tag 468.
1214    pub fn get_rounding_direction(&self) -> Result<String, MessageRejectErrorEnum> {
1215        let mut fld = field::RoundingDirectionField::new(String::new());
1216        self.message.body.get_field(tag::ROUNDING_DIRECTION, &mut fld.0)?;
1217        Ok(fld.value().to_string())
1218    }
1219
1220
1221    /// Returns true if `RoundingDirection` is present, Tag 468.
1222    pub fn has_rounding_direction(&self) -> bool {
1223        self.message.body.has(tag::ROUNDING_DIRECTION)
1224    }
1225
1226
1227
1228
1229    /// Sets `RoundingModulus`, Tag 469.
1230    pub fn set_rounding_modulus(&mut self, val: Decimal, scale: i32) {
1231        self.message.body.set_field(tag::ROUNDING_MODULUS, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1232    }
1233
1234    /// Gets `RoundingModulus`, Tag 469.
1235    pub fn get_rounding_modulus(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1236        let mut fld = field::RoundingModulusField::new(Decimal::ZERO, 0);
1237        self.message.body.get_field(tag::ROUNDING_MODULUS, &mut fld.0)?;
1238        Ok(fld.value())
1239    }
1240
1241
1242    /// Returns true if `RoundingModulus` is present, Tag 469.
1243    pub fn has_rounding_modulus(&self) -> bool {
1244        self.message.body.has(tag::ROUNDING_MODULUS)
1245    }
1246
1247
1248
1249
1250    /// Sets `SecondaryOrderID`, Tag 198.
1251    pub fn set_secondary_order_id(&mut self, v: String) {
1252        self.message.body.set_field(tag::SECONDARY_ORDER_ID, FIXString::from(v));
1253    }
1254
1255    /// Gets `SecondaryOrderID`, Tag 198.
1256    pub fn get_secondary_order_id(&self) -> Result<String, MessageRejectErrorEnum> {
1257        let mut fld = field::SecondaryOrderIDField::new(String::new());
1258        self.message.body.get_field(tag::SECONDARY_ORDER_ID, &mut fld.0)?;
1259        Ok(fld.value().to_string())
1260    }
1261
1262
1263    /// Returns true if `SecondaryOrderID` is present, Tag 198.
1264    pub fn has_secondary_order_id(&self) -> bool {
1265        self.message.body.has(tag::SECONDARY_ORDER_ID)
1266    }
1267
1268
1269
1270
1271    /// Sets `SecurityDesc`, Tag 107.
1272    pub fn set_security_desc(&mut self, v: String) {
1273        self.message.body.set_field(tag::SECURITY_DESC, FIXString::from(v));
1274    }
1275
1276    /// Gets `SecurityDesc`, Tag 107.
1277    pub fn get_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
1278        let mut fld = field::SecurityDescField::new(String::new());
1279        self.message.body.get_field(tag::SECURITY_DESC, &mut fld.0)?;
1280        Ok(fld.value().to_string())
1281    }
1282
1283
1284    /// Returns true if `SecurityDesc` is present, Tag 107.
1285    pub fn has_security_desc(&self) -> bool {
1286        self.message.body.has(tag::SECURITY_DESC)
1287    }
1288
1289
1290
1291
1292    /// Sets `SecurityExchange`, Tag 207.
1293    pub fn set_security_exchange(&mut self, v: String) {
1294        self.message.body.set_field(tag::SECURITY_EXCHANGE, FIXString::from(v));
1295    }
1296
1297    /// Gets `SecurityExchange`, Tag 207.
1298    pub fn get_security_exchange(&self) -> Result<String, MessageRejectErrorEnum> {
1299        let mut fld = field::SecurityExchangeField::new(String::new());
1300        self.message.body.get_field(tag::SECURITY_EXCHANGE, &mut fld.0)?;
1301        Ok(fld.value().to_string())
1302    }
1303
1304
1305    /// Returns true if `SecurityExchange` is present, Tag 207.
1306    pub fn has_security_exchange(&self) -> bool {
1307        self.message.body.has(tag::SECURITY_EXCHANGE)
1308    }
1309
1310
1311
1312
1313    /// Sets `SecurityID`, Tag 48.
1314    pub fn set_security_id(&mut self, v: String) {
1315        self.message.body.set_field(tag::SECURITY_ID, FIXString::from(v));
1316    }
1317
1318    /// Gets `SecurityID`, Tag 48.
1319    pub fn get_security_id(&self) -> Result<String, MessageRejectErrorEnum> {
1320        let mut fld = field::SecurityIDField::new(String::new());
1321        self.message.body.get_field(tag::SECURITY_ID, &mut fld.0)?;
1322        Ok(fld.value().to_string())
1323    }
1324
1325
1326    /// Returns true if `SecurityID` is present, Tag 48.
1327    pub fn has_security_id(&self) -> bool {
1328        self.message.body.has(tag::SECURITY_ID)
1329    }
1330
1331
1332
1333
1334    /// Sets `SecurityIDSource`, Tag 22.
1335    pub fn set_security_id_source(&mut self, v: String) {
1336        self.message.body.set_field(tag::SECURITY_ID_SOURCE, FIXString::from(v));
1337    }
1338
1339    /// Gets `SecurityIDSource`, Tag 22.
1340    pub fn get_security_id_source(&self) -> Result<String, MessageRejectErrorEnum> {
1341        let mut fld = field::SecurityIDSourceField::new(String::new());
1342        self.message.body.get_field(tag::SECURITY_ID_SOURCE, &mut fld.0)?;
1343        Ok(fld.value().to_string())
1344    }
1345
1346
1347    /// Returns true if `SecurityIDSource` is present, Tag 22.
1348    pub fn has_security_id_source(&self) -> bool {
1349        self.message.body.has(tag::SECURITY_ID_SOURCE)
1350    }
1351
1352
1353
1354
1355    /// Sets `SecurityStatus`, Tag 965.
1356    pub fn set_security_status(&mut self, v: String) {
1357        self.message.body.set_field(tag::SECURITY_STATUS, FIXString::from(v));
1358    }
1359
1360    /// Gets `SecurityStatus`, Tag 965.
1361    pub fn get_security_status(&self) -> Result<String, MessageRejectErrorEnum> {
1362        let mut fld = field::SecurityStatusField::new(String::new());
1363        self.message.body.get_field(tag::SECURITY_STATUS, &mut fld.0)?;
1364        Ok(fld.value().to_string())
1365    }
1366
1367
1368    /// Returns true if `SecurityStatus` is present, Tag 965.
1369    pub fn has_security_status(&self) -> bool {
1370        self.message.body.has(tag::SECURITY_STATUS)
1371    }
1372
1373
1374
1375
1376    /// Sets `SecuritySubType`, Tag 762.
1377    pub fn set_security_sub_type(&mut self, v: String) {
1378        self.message.body.set_field(tag::SECURITY_SUB_TYPE, FIXString::from(v));
1379    }
1380
1381    /// Gets `SecuritySubType`, Tag 762.
1382    pub fn get_security_sub_type(&self) -> Result<String, MessageRejectErrorEnum> {
1383        let mut fld = field::SecuritySubTypeField::new(String::new());
1384        self.message.body.get_field(tag::SECURITY_SUB_TYPE, &mut fld.0)?;
1385        Ok(fld.value().to_string())
1386    }
1387
1388
1389    /// Returns true if `SecuritySubType` is present, Tag 762.
1390    pub fn has_security_sub_type(&self) -> bool {
1391        self.message.body.has(tag::SECURITY_SUB_TYPE)
1392    }
1393
1394
1395
1396
1397    /// Sets `SecurityType`, Tag 167.
1398    pub fn set_security_type(&mut self, v: String) {
1399        self.message.body.set_field(tag::SECURITY_TYPE, FIXString::from(v));
1400    }
1401
1402    /// Gets `SecurityType`, Tag 167.
1403    pub fn get_security_type(&self) -> Result<String, MessageRejectErrorEnum> {
1404        let mut fld = field::SecurityTypeField::new(String::new());
1405        self.message.body.get_field(tag::SECURITY_TYPE, &mut fld.0)?;
1406        Ok(fld.value().to_string())
1407    }
1408
1409
1410    /// Returns true if `SecurityType` is present, Tag 167.
1411    pub fn has_security_type(&self) -> bool {
1412        self.message.body.has(tag::SECURITY_TYPE)
1413    }
1414
1415
1416
1417
1418    /// Sets `SettleOnOpenFlag`, Tag 966.
1419    pub fn set_settle_on_open_flag(&mut self, v: String) {
1420        self.message.body.set_field(tag::SETTLE_ON_OPEN_FLAG, FIXString::from(v));
1421    }
1422
1423    /// Gets `SettleOnOpenFlag`, Tag 966.
1424    pub fn get_settle_on_open_flag(&self) -> Result<String, MessageRejectErrorEnum> {
1425        let mut fld = field::SettleOnOpenFlagField::new(String::new());
1426        self.message.body.get_field(tag::SETTLE_ON_OPEN_FLAG, &mut fld.0)?;
1427        Ok(fld.value().to_string())
1428    }
1429
1430
1431    /// Returns true if `SettleOnOpenFlag` is present, Tag 966.
1432    pub fn has_settle_on_open_flag(&self) -> bool {
1433        self.message.body.has(tag::SETTLE_ON_OPEN_FLAG)
1434    }
1435
1436
1437
1438
1439    /// Sets `Side`, Tag 54.
1440    pub fn set_side(&mut self, v: String) {
1441        self.message.body.set_field(tag::SIDE, FIXString::from(v));
1442    }
1443
1444    /// Gets `Side`, Tag 54.
1445    pub fn get_side(&self) -> Result<String, MessageRejectErrorEnum> {
1446        let mut fld = field::SideField::new(String::new());
1447        self.message.body.get_field(tag::SIDE, &mut fld.0)?;
1448        Ok(fld.value().to_string())
1449    }
1450
1451
1452    /// Returns true if `Side` is present, Tag 54.
1453    pub fn has_side(&self) -> bool {
1454        self.message.body.has(tag::SIDE)
1455    }
1456
1457
1458
1459
1460    /// Sets `StateOrProvinceOfIssue`, Tag 471.
1461    pub fn set_state_or_province_of_issue(&mut self, v: String) {
1462        self.message.body.set_field(tag::STATE_OR_PROVINCE_OF_ISSUE, FIXString::from(v));
1463    }
1464
1465    /// Gets `StateOrProvinceOfIssue`, Tag 471.
1466    pub fn get_state_or_province_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
1467        let mut fld = field::StateOrProvinceOfIssueField::new(String::new());
1468        self.message.body.get_field(tag::STATE_OR_PROVINCE_OF_ISSUE, &mut fld.0)?;
1469        Ok(fld.value().to_string())
1470    }
1471
1472
1473    /// Returns true if `StateOrProvinceOfIssue` is present, Tag 471.
1474    pub fn has_state_or_province_of_issue(&self) -> bool {
1475        self.message.body.has(tag::STATE_OR_PROVINCE_OF_ISSUE)
1476    }
1477
1478
1479
1480
1481    /// Sets `StrikeCurrency`, Tag 947.
1482    pub fn set_strike_currency(&mut self, v: String) {
1483        self.message.body.set_field(tag::STRIKE_CURRENCY, FIXString::from(v));
1484    }
1485
1486    /// Gets `StrikeCurrency`, Tag 947.
1487    pub fn get_strike_currency(&self) -> Result<String, MessageRejectErrorEnum> {
1488        let mut fld = field::StrikeCurrencyField::new(String::new());
1489        self.message.body.get_field(tag::STRIKE_CURRENCY, &mut fld.0)?;
1490        Ok(fld.value().to_string())
1491    }
1492
1493
1494    /// Returns true if `StrikeCurrency` is present, Tag 947.
1495    pub fn has_strike_currency(&self) -> bool {
1496        self.message.body.has(tag::STRIKE_CURRENCY)
1497    }
1498
1499
1500
1501
1502    /// Sets `StrikeMultiplier`, Tag 967.
1503    pub fn set_strike_multiplier(&mut self, val: Decimal, scale: i32) {
1504        self.message.body.set_field(tag::STRIKE_MULTIPLIER, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1505    }
1506
1507    /// Gets `StrikeMultiplier`, Tag 967.
1508    pub fn get_strike_multiplier(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1509        let mut fld = field::StrikeMultiplierField::new(Decimal::ZERO, 0);
1510        self.message.body.get_field(tag::STRIKE_MULTIPLIER, &mut fld.0)?;
1511        Ok(fld.value())
1512    }
1513
1514
1515    /// Returns true if `StrikeMultiplier` is present, Tag 967.
1516    pub fn has_strike_multiplier(&self) -> bool {
1517        self.message.body.has(tag::STRIKE_MULTIPLIER)
1518    }
1519
1520
1521
1522
1523    /// Sets `StrikePrice`, Tag 202.
1524    pub fn set_strike_price(&mut self, val: Decimal, scale: i32) {
1525        self.message.body.set_field(tag::STRIKE_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1526    }
1527
1528    /// Gets `StrikePrice`, Tag 202.
1529    pub fn get_strike_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1530        let mut fld = field::StrikePriceField::new(Decimal::ZERO, 0);
1531        self.message.body.get_field(tag::STRIKE_PRICE, &mut fld.0)?;
1532        Ok(fld.value())
1533    }
1534
1535
1536    /// Returns true if `StrikePrice` is present, Tag 202.
1537    pub fn has_strike_price(&self) -> bool {
1538        self.message.body.has(tag::STRIKE_PRICE)
1539    }
1540
1541
1542
1543
1544    /// Sets `StrikeValue`, Tag 968.
1545    pub fn set_strike_value(&mut self, val: Decimal, scale: i32) {
1546        self.message.body.set_field(tag::STRIKE_VALUE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1547    }
1548
1549    /// Gets `StrikeValue`, Tag 968.
1550    pub fn get_strike_value(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1551        let mut fld = field::StrikeValueField::new(Decimal::ZERO, 0);
1552        self.message.body.get_field(tag::STRIKE_VALUE, &mut fld.0)?;
1553        Ok(fld.value())
1554    }
1555
1556
1557    /// Returns true if `StrikeValue` is present, Tag 968.
1558    pub fn has_strike_value(&self) -> bool {
1559        self.message.body.has(tag::STRIKE_VALUE)
1560    }
1561
1562
1563
1564
1565    /// Sets `Symbol`, Tag 55.
1566    pub fn set_symbol(&mut self, v: String) {
1567        self.message.body.set_field(tag::SYMBOL, FIXString::from(v));
1568    }
1569
1570    /// Gets `Symbol`, Tag 55.
1571    pub fn get_symbol(&self) -> Result<String, MessageRejectErrorEnum> {
1572        let mut fld = field::SymbolField::new(String::new());
1573        self.message.body.get_field(tag::SYMBOL, &mut fld.0)?;
1574        Ok(fld.value().to_string())
1575    }
1576
1577
1578    /// Returns true if `Symbol` is present, Tag 55.
1579    pub fn has_symbol(&self) -> bool {
1580        self.message.body.has(tag::SYMBOL)
1581    }
1582
1583
1584
1585
1586    /// Sets `SymbolSfx`, Tag 65.
1587    pub fn set_symbol_sfx(&mut self, v: String) {
1588        self.message.body.set_field(tag::SYMBOL_SFX, FIXString::from(v));
1589    }
1590
1591    /// Gets `SymbolSfx`, Tag 65.
1592    pub fn get_symbol_sfx(&self) -> Result<String, MessageRejectErrorEnum> {
1593        let mut fld = field::SymbolSfxField::new(String::new());
1594        self.message.body.get_field(tag::SYMBOL_SFX, &mut fld.0)?;
1595        Ok(fld.value().to_string())
1596    }
1597
1598
1599    /// Returns true if `SymbolSfx` is present, Tag 65.
1600    pub fn has_symbol_sfx(&self) -> bool {
1601        self.message.body.has(tag::SYMBOL_SFX)
1602    }
1603
1604
1605
1606
1607    /// Sets `Text`, Tag 58.
1608    pub fn set_text(&mut self, v: String) {
1609        self.message.body.set_field(tag::TEXT, FIXString::from(v));
1610    }
1611
1612    /// Gets `Text`, Tag 58.
1613    pub fn get_text(&self) -> Result<String, MessageRejectErrorEnum> {
1614        let mut fld = field::TextField::new(String::new());
1615        self.message.body.get_field(tag::TEXT, &mut fld.0)?;
1616        Ok(fld.value().to_string())
1617    }
1618
1619
1620    /// Returns true if `Text` is present, Tag 58.
1621    pub fn has_text(&self) -> bool {
1622        self.message.body.has(tag::TEXT)
1623    }
1624
1625
1626
1627
1628    /// Sets `TimeUnit`, Tag 997.
1629    pub fn set_time_unit(&mut self, v: String) {
1630        self.message.body.set_field(tag::TIME_UNIT, FIXString::from(v));
1631    }
1632
1633    /// Gets `TimeUnit`, Tag 997.
1634    pub fn get_time_unit(&self) -> Result<String, MessageRejectErrorEnum> {
1635        let mut fld = field::TimeUnitField::new(String::new());
1636        self.message.body.get_field(tag::TIME_UNIT, &mut fld.0)?;
1637        Ok(fld.value().to_string())
1638    }
1639
1640
1641    /// Returns true if `TimeUnit` is present, Tag 997.
1642    pub fn has_time_unit(&self) -> bool {
1643        self.message.body.has(tag::TIME_UNIT)
1644    }
1645
1646
1647
1648
1649    /// Sets `UnitOfMeasure`, Tag 996.
1650    pub fn set_unit_of_measure(&mut self, v: String) {
1651        self.message.body.set_field(tag::UNIT_OF_MEASURE, FIXString::from(v));
1652    }
1653
1654    /// Gets `UnitOfMeasure`, Tag 996.
1655    pub fn get_unit_of_measure(&self) -> Result<String, MessageRejectErrorEnum> {
1656        let mut fld = field::UnitOfMeasureField::new(String::new());
1657        self.message.body.get_field(tag::UNIT_OF_MEASURE, &mut fld.0)?;
1658        Ok(fld.value().to_string())
1659    }
1660
1661
1662    /// Returns true if `UnitOfMeasure` is present, Tag 996.
1663    pub fn has_unit_of_measure(&self) -> bool {
1664        self.message.body.has(tag::UNIT_OF_MEASURE)
1665    }
1666
1667
1668}
1669
1670/// `RouteOut` is the callback type for routing `ExecutionAcknowledgement` messages.
1671pub type RouteOut = fn(msg: ExecutionAcknowledgement, session_id: SessionID) -> Result<(), MessageRejectErrorEnum>;
1672
1673/// Route type returned by the `route` function.
1674pub type Route = (&'static str, &'static str, Box<dyn Fn(&Message, SessionID) -> Result<(), MessageRejectErrorEnum> + Send>);
1675
1676/// Returns the begin string, message type, and route function for `ExecutionAcknowledgement`.
1677pub fn route(router: RouteOut) -> Route {
1678    let r = move |msg: &Message, session_id: SessionID| -> Result<(), MessageRejectErrorEnum> {
1679        router(ExecutionAcknowledgement::from_message(msg.clone()), session_id)
1680    };
1681    ("7", "BN", Box::new(r))
1682}