Skip to main content

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