Skip to main content

fixer_fix/fix42/
order_cancel_replace_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/// `OrderCancelReplaceRequest` is the `fix42` `OrderCancelReplaceRequest` type, `MsgType` = G.
21pub struct OrderCancelReplaceRequest {
22    pub message: Message,
23}
24
25impl OrderCancelReplaceRequest {
26    /// Creates a new `OrderCancelReplaceRequest` with required fields.
27    pub fn new(orig_cl_ord_id: field::OrigClOrdIDField, cl_ord_id: field::ClOrdIDField, handl_inst: field::HandlInstField, symbol: field::SymbolField, side: field::SideField, transact_time: field::TransactTimeField, ord_type: field::OrdTypeField) -> Self {
28        let mut msg = Message::new();
29        msg.header.set_field(tag::MSG_TYPE, FIXString::from("G".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::HANDL_INST, handl_inst.0);
36
37        msg.body.set_field(tag::SYMBOL, symbol.0);
38
39        msg.body.set_field(tag::SIDE, side.0);
40
41        msg.body.set_field(tag::TRANSACT_TIME, transact_time.0);
42
43        msg.body.set_field(tag::ORD_TYPE, ord_type.0);
44
45        Self { message: msg }
46    }
47
48    /// Creates a `OrderCancelReplaceRequest` from an existing `Message`.
49    pub fn from_message(msg: Message) -> Self {
50        Self { message: msg }
51    }
52
53    /// Returns the underlying `Message`.
54    pub fn to_message(self) -> Message {
55        self.message
56    }
57
58
59
60
61    /// Sets `Account`, Tag 1.
62    pub fn set_account(&mut self, v: String) {
63        self.message.body.set_field(tag::ACCOUNT, FIXString::from(v));
64    }
65
66    /// Gets `Account`, Tag 1.
67    pub fn get_account(&self) -> Result<String, MessageRejectErrorEnum> {
68        let mut fld = field::AccountField::new(String::new());
69        self.message.body.get_field(tag::ACCOUNT, &mut fld.0)?;
70        Ok(fld.value().to_string())
71    }
72
73
74    /// Returns true if `Account` is present, Tag 1.
75    pub fn has_account(&self) -> bool {
76        self.message.body.has(tag::ACCOUNT)
77    }
78
79
80
81
82    /// Sets `CashOrderQty`, Tag 152.
83    pub fn set_cash_order_qty(&mut self, val: Decimal, scale: i32) {
84        self.message.body.set_field(tag::CASH_ORDER_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
85    }
86
87    /// Gets `CashOrderQty`, Tag 152.
88    pub fn get_cash_order_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
89        let mut fld = field::CashOrderQtyField::new(Decimal::ZERO, 0);
90        self.message.body.get_field(tag::CASH_ORDER_QTY, &mut fld.0)?;
91        Ok(fld.value())
92    }
93
94
95    /// Returns true if `CashOrderQty` is present, Tag 152.
96    pub fn has_cash_order_qty(&self) -> bool {
97        self.message.body.has(tag::CASH_ORDER_QTY)
98    }
99
100
101
102
103    /// Sets `ClOrdID`, Tag 11.
104    pub fn set_cl_ord_id(&mut self, v: String) {
105        self.message.body.set_field(tag::CL_ORD_ID, FIXString::from(v));
106    }
107
108    /// Gets `ClOrdID`, Tag 11.
109    pub fn get_cl_ord_id(&self) -> Result<String, MessageRejectErrorEnum> {
110        let mut fld = field::ClOrdIDField::new(String::new());
111        self.message.body.get_field(tag::CL_ORD_ID, &mut fld.0)?;
112        Ok(fld.value().to_string())
113    }
114
115
116    /// Returns true if `ClOrdID` is present, Tag 11.
117    pub fn has_cl_ord_id(&self) -> bool {
118        self.message.body.has(tag::CL_ORD_ID)
119    }
120
121
122
123
124    /// Sets `ClearingAccount`, Tag 440.
125    pub fn set_clearing_account(&mut self, v: String) {
126        self.message.body.set_field(tag::CLEARING_ACCOUNT, FIXString::from(v));
127    }
128
129    /// Gets `ClearingAccount`, Tag 440.
130    pub fn get_clearing_account(&self) -> Result<String, MessageRejectErrorEnum> {
131        let mut fld = field::ClearingAccountField::new(String::new());
132        self.message.body.get_field(tag::CLEARING_ACCOUNT, &mut fld.0)?;
133        Ok(fld.value().to_string())
134    }
135
136
137    /// Returns true if `ClearingAccount` is present, Tag 440.
138    pub fn has_clearing_account(&self) -> bool {
139        self.message.body.has(tag::CLEARING_ACCOUNT)
140    }
141
142
143
144
145    /// Sets `ClearingFirm`, Tag 439.
146    pub fn set_clearing_firm(&mut self, v: String) {
147        self.message.body.set_field(tag::CLEARING_FIRM, FIXString::from(v));
148    }
149
150    /// Gets `ClearingFirm`, Tag 439.
151    pub fn get_clearing_firm(&self) -> Result<String, MessageRejectErrorEnum> {
152        let mut fld = field::ClearingFirmField::new(String::new());
153        self.message.body.get_field(tag::CLEARING_FIRM, &mut fld.0)?;
154        Ok(fld.value().to_string())
155    }
156
157
158    /// Returns true if `ClearingFirm` is present, Tag 439.
159    pub fn has_clearing_firm(&self) -> bool {
160        self.message.body.has(tag::CLEARING_FIRM)
161    }
162
163
164
165
166    /// Sets `ClientID`, Tag 109.
167    pub fn set_client_id(&mut self, v: String) {
168        self.message.body.set_field(tag::CLIENT_ID, FIXString::from(v));
169    }
170
171    /// Gets `ClientID`, Tag 109.
172    pub fn get_client_id(&self) -> Result<String, MessageRejectErrorEnum> {
173        let mut fld = field::ClientIDField::new(String::new());
174        self.message.body.get_field(tag::CLIENT_ID, &mut fld.0)?;
175        Ok(fld.value().to_string())
176    }
177
178
179    /// Returns true if `ClientID` is present, Tag 109.
180    pub fn has_client_id(&self) -> bool {
181        self.message.body.has(tag::CLIENT_ID)
182    }
183
184
185
186
187    /// Sets `CommType`, Tag 13.
188    pub fn set_comm_type(&mut self, v: String) {
189        self.message.body.set_field(tag::COMM_TYPE, FIXString::from(v));
190    }
191
192    /// Gets `CommType`, Tag 13.
193    pub fn get_comm_type(&self) -> Result<String, MessageRejectErrorEnum> {
194        let mut fld = field::CommTypeField::new(String::new());
195        self.message.body.get_field(tag::COMM_TYPE, &mut fld.0)?;
196        Ok(fld.value().to_string())
197    }
198
199
200    /// Returns true if `CommType` is present, Tag 13.
201    pub fn has_comm_type(&self) -> bool {
202        self.message.body.has(tag::COMM_TYPE)
203    }
204
205
206
207
208    /// Sets `Commission`, Tag 12.
209    pub fn set_commission(&mut self, val: Decimal, scale: i32) {
210        self.message.body.set_field(tag::COMMISSION, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
211    }
212
213    /// Gets `Commission`, Tag 12.
214    pub fn get_commission(&self) -> Result<Decimal, MessageRejectErrorEnum> {
215        let mut fld = field::CommissionField::new(Decimal::ZERO, 0);
216        self.message.body.get_field(tag::COMMISSION, &mut fld.0)?;
217        Ok(fld.value())
218    }
219
220
221    /// Returns true if `Commission` is present, Tag 12.
222    pub fn has_commission(&self) -> bool {
223        self.message.body.has(tag::COMMISSION)
224    }
225
226
227
228
229    /// Sets `ComplianceID`, Tag 376.
230    pub fn set_compliance_id(&mut self, v: String) {
231        self.message.body.set_field(tag::COMPLIANCE_ID, FIXString::from(v));
232    }
233
234    /// Gets `ComplianceID`, Tag 376.
235    pub fn get_compliance_id(&self) -> Result<String, MessageRejectErrorEnum> {
236        let mut fld = field::ComplianceIDField::new(String::new());
237        self.message.body.get_field(tag::COMPLIANCE_ID, &mut fld.0)?;
238        Ok(fld.value().to_string())
239    }
240
241
242    /// Returns true if `ComplianceID` is present, Tag 376.
243    pub fn has_compliance_id(&self) -> bool {
244        self.message.body.has(tag::COMPLIANCE_ID)
245    }
246
247
248
249
250    /// Sets `ContractMultiplier`, Tag 231.
251    pub fn set_contract_multiplier(&mut self, val: Decimal, scale: i32) {
252        self.message.body.set_field(tag::CONTRACT_MULTIPLIER, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
253    }
254
255    /// Gets `ContractMultiplier`, Tag 231.
256    pub fn get_contract_multiplier(&self) -> Result<Decimal, MessageRejectErrorEnum> {
257        let mut fld = field::ContractMultiplierField::new(Decimal::ZERO, 0);
258        self.message.body.get_field(tag::CONTRACT_MULTIPLIER, &mut fld.0)?;
259        Ok(fld.value())
260    }
261
262
263    /// Returns true if `ContractMultiplier` is present, Tag 231.
264    pub fn has_contract_multiplier(&self) -> bool {
265        self.message.body.has(tag::CONTRACT_MULTIPLIER)
266    }
267
268
269
270
271    /// Sets `CouponRate`, Tag 223.
272    pub fn set_coupon_rate(&mut self, val: Decimal, scale: i32) {
273        self.message.body.set_field(tag::COUPON_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
274    }
275
276    /// Gets `CouponRate`, Tag 223.
277    pub fn get_coupon_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
278        let mut fld = field::CouponRateField::new(Decimal::ZERO, 0);
279        self.message.body.get_field(tag::COUPON_RATE, &mut fld.0)?;
280        Ok(fld.value())
281    }
282
283
284    /// Returns true if `CouponRate` is present, Tag 223.
285    pub fn has_coupon_rate(&self) -> bool {
286        self.message.body.has(tag::COUPON_RATE)
287    }
288
289
290
291
292    /// Sets `CoveredOrUncovered`, Tag 203.
293    pub fn set_covered_or_uncovered(&mut self, v: isize) {
294        self.message.body.set_field(tag::COVERED_OR_UNCOVERED, fixer::fix_int::FIXInt::from(v));
295    }
296
297    /// Gets `CoveredOrUncovered`, Tag 203.
298    pub fn get_covered_or_uncovered(&self) -> Result<isize, MessageRejectErrorEnum> {
299        let mut fld = field::CoveredOrUncoveredField::new(0);
300        self.message.body.get_field(tag::COVERED_OR_UNCOVERED, &mut fld.0)?;
301        Ok(fld.value())
302    }
303
304
305    /// Returns true if `CoveredOrUncovered` is present, Tag 203.
306    pub fn has_covered_or_uncovered(&self) -> bool {
307        self.message.body.has(tag::COVERED_OR_UNCOVERED)
308    }
309
310
311
312
313    /// Sets `Currency`, Tag 15.
314    pub fn set_currency(&mut self, v: String) {
315        self.message.body.set_field(tag::CURRENCY, FIXString::from(v));
316    }
317
318    /// Gets `Currency`, Tag 15.
319    pub fn get_currency(&self) -> Result<String, MessageRejectErrorEnum> {
320        let mut fld = field::CurrencyField::new(String::new());
321        self.message.body.get_field(tag::CURRENCY, &mut fld.0)?;
322        Ok(fld.value().to_string())
323    }
324
325
326    /// Returns true if `Currency` is present, Tag 15.
327    pub fn has_currency(&self) -> bool {
328        self.message.body.has(tag::CURRENCY)
329    }
330
331
332
333
334    /// Sets `CustomerOrFirm`, Tag 204.
335    pub fn set_customer_or_firm(&mut self, v: isize) {
336        self.message.body.set_field(tag::CUSTOMER_OR_FIRM, fixer::fix_int::FIXInt::from(v));
337    }
338
339    /// Gets `CustomerOrFirm`, Tag 204.
340    pub fn get_customer_or_firm(&self) -> Result<isize, MessageRejectErrorEnum> {
341        let mut fld = field::CustomerOrFirmField::new(0);
342        self.message.body.get_field(tag::CUSTOMER_OR_FIRM, &mut fld.0)?;
343        Ok(fld.value())
344    }
345
346
347    /// Returns true if `CustomerOrFirm` is present, Tag 204.
348    pub fn has_customer_or_firm(&self) -> bool {
349        self.message.body.has(tag::CUSTOMER_OR_FIRM)
350    }
351
352
353
354
355    /// Sets `DiscretionInst`, Tag 388.
356    pub fn set_discretion_inst(&mut self, v: String) {
357        self.message.body.set_field(tag::DISCRETION_INST, FIXString::from(v));
358    }
359
360    /// Gets `DiscretionInst`, Tag 388.
361    pub fn get_discretion_inst(&self) -> Result<String, MessageRejectErrorEnum> {
362        let mut fld = field::DiscretionInstField::new(String::new());
363        self.message.body.get_field(tag::DISCRETION_INST, &mut fld.0)?;
364        Ok(fld.value().to_string())
365    }
366
367
368    /// Returns true if `DiscretionInst` is present, Tag 388.
369    pub fn has_discretion_inst(&self) -> bool {
370        self.message.body.has(tag::DISCRETION_INST)
371    }
372
373
374
375
376    /// Sets `DiscretionOffset`, Tag 389.
377    pub fn set_discretion_offset(&mut self, val: Decimal, scale: i32) {
378        self.message.body.set_field(tag::DISCRETION_OFFSET, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
379    }
380
381    /// Gets `DiscretionOffset`, Tag 389.
382    pub fn get_discretion_offset(&self) -> Result<Decimal, MessageRejectErrorEnum> {
383        let mut fld = field::DiscretionOffsetField::new(Decimal::ZERO, 0);
384        self.message.body.get_field(tag::DISCRETION_OFFSET, &mut fld.0)?;
385        Ok(fld.value())
386    }
387
388
389    /// Returns true if `DiscretionOffset` is present, Tag 389.
390    pub fn has_discretion_offset(&self) -> bool {
391        self.message.body.has(tag::DISCRETION_OFFSET)
392    }
393
394
395
396
397    /// Sets `EffectiveTime`, Tag 168.
398    pub fn set_effective_time(&mut self, v: Timestamp) {
399        self.message.body.set_field(tag::EFFECTIVE_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
400            time: v,
401            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
402        });
403    }
404
405    /// Gets `EffectiveTime`, Tag 168.
406    pub fn get_effective_time(&self) -> Result<Timestamp, MessageRejectErrorEnum> {
407        let mut fld = field::EffectiveTimeField::new(Timestamp::UNIX_EPOCH);
408        self.message.body.get_field(tag::EFFECTIVE_TIME, &mut fld.0)?;
409        Ok(fld.value())
410    }
411
412
413    /// Returns true if `EffectiveTime` is present, Tag 168.
414    pub fn has_effective_time(&self) -> bool {
415        self.message.body.has(tag::EFFECTIVE_TIME)
416    }
417
418
419
420
421    /// Sets `EncodedIssuer`, Tag 349.
422    pub fn set_encoded_issuer(&mut self, v: String) {
423        self.message.body.set_field(tag::ENCODED_ISSUER, FIXString::from(v));
424    }
425
426    /// Gets `EncodedIssuer`, Tag 349.
427    pub fn get_encoded_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
428        let mut fld = field::EncodedIssuerField::new(String::new());
429        self.message.body.get_field(tag::ENCODED_ISSUER, &mut fld.0)?;
430        Ok(fld.value().to_string())
431    }
432
433
434    /// Returns true if `EncodedIssuer` is present, Tag 349.
435    pub fn has_encoded_issuer(&self) -> bool {
436        self.message.body.has(tag::ENCODED_ISSUER)
437    }
438
439
440
441
442    /// Sets `EncodedIssuerLen`, Tag 348.
443    pub fn set_encoded_issuer_len(&mut self, v: isize) {
444        self.message.body.set_field(tag::ENCODED_ISSUER_LEN, fixer::fix_int::FIXInt::from(v));
445    }
446
447    /// Gets `EncodedIssuerLen`, Tag 348.
448    pub fn get_encoded_issuer_len(&self) -> Result<isize, MessageRejectErrorEnum> {
449        let mut fld = field::EncodedIssuerLenField::new(0);
450        self.message.body.get_field(tag::ENCODED_ISSUER_LEN, &mut fld.0)?;
451        Ok(fld.value())
452    }
453
454
455    /// Returns true if `EncodedIssuerLen` is present, Tag 348.
456    pub fn has_encoded_issuer_len(&self) -> bool {
457        self.message.body.has(tag::ENCODED_ISSUER_LEN)
458    }
459
460
461
462
463    /// Sets `EncodedSecurityDesc`, Tag 351.
464    pub fn set_encoded_security_desc(&mut self, v: String) {
465        self.message.body.set_field(tag::ENCODED_SECURITY_DESC, FIXString::from(v));
466    }
467
468    /// Gets `EncodedSecurityDesc`, Tag 351.
469    pub fn get_encoded_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
470        let mut fld = field::EncodedSecurityDescField::new(String::new());
471        self.message.body.get_field(tag::ENCODED_SECURITY_DESC, &mut fld.0)?;
472        Ok(fld.value().to_string())
473    }
474
475
476    /// Returns true if `EncodedSecurityDesc` is present, Tag 351.
477    pub fn has_encoded_security_desc(&self) -> bool {
478        self.message.body.has(tag::ENCODED_SECURITY_DESC)
479    }
480
481
482
483
484    /// Sets `EncodedSecurityDescLen`, Tag 350.
485    pub fn set_encoded_security_desc_len(&mut self, v: isize) {
486        self.message.body.set_field(tag::ENCODED_SECURITY_DESC_LEN, fixer::fix_int::FIXInt::from(v));
487    }
488
489    /// Gets `EncodedSecurityDescLen`, Tag 350.
490    pub fn get_encoded_security_desc_len(&self) -> Result<isize, MessageRejectErrorEnum> {
491        let mut fld = field::EncodedSecurityDescLenField::new(0);
492        self.message.body.get_field(tag::ENCODED_SECURITY_DESC_LEN, &mut fld.0)?;
493        Ok(fld.value())
494    }
495
496
497    /// Returns true if `EncodedSecurityDescLen` is present, Tag 350.
498    pub fn has_encoded_security_desc_len(&self) -> bool {
499        self.message.body.has(tag::ENCODED_SECURITY_DESC_LEN)
500    }
501
502
503
504
505    /// Sets `EncodedText`, Tag 355.
506    pub fn set_encoded_text(&mut self, v: String) {
507        self.message.body.set_field(tag::ENCODED_TEXT, FIXString::from(v));
508    }
509
510    /// Gets `EncodedText`, Tag 355.
511    pub fn get_encoded_text(&self) -> Result<String, MessageRejectErrorEnum> {
512        let mut fld = field::EncodedTextField::new(String::new());
513        self.message.body.get_field(tag::ENCODED_TEXT, &mut fld.0)?;
514        Ok(fld.value().to_string())
515    }
516
517
518    /// Returns true if `EncodedText` is present, Tag 355.
519    pub fn has_encoded_text(&self) -> bool {
520        self.message.body.has(tag::ENCODED_TEXT)
521    }
522
523
524
525
526    /// Sets `EncodedTextLen`, Tag 354.
527    pub fn set_encoded_text_len(&mut self, v: isize) {
528        self.message.body.set_field(tag::ENCODED_TEXT_LEN, fixer::fix_int::FIXInt::from(v));
529    }
530
531    /// Gets `EncodedTextLen`, Tag 354.
532    pub fn get_encoded_text_len(&self) -> Result<isize, MessageRejectErrorEnum> {
533        let mut fld = field::EncodedTextLenField::new(0);
534        self.message.body.get_field(tag::ENCODED_TEXT_LEN, &mut fld.0)?;
535        Ok(fld.value())
536    }
537
538
539    /// Returns true if `EncodedTextLen` is present, Tag 354.
540    pub fn has_encoded_text_len(&self) -> bool {
541        self.message.body.has(tag::ENCODED_TEXT_LEN)
542    }
543
544
545
546
547    /// Sets `ExDestination`, Tag 100.
548    pub fn set_ex_destination(&mut self, v: String) {
549        self.message.body.set_field(tag::EX_DESTINATION, FIXString::from(v));
550    }
551
552    /// Gets `ExDestination`, Tag 100.
553    pub fn get_ex_destination(&self) -> Result<String, MessageRejectErrorEnum> {
554        let mut fld = field::ExDestinationField::new(String::new());
555        self.message.body.get_field(tag::EX_DESTINATION, &mut fld.0)?;
556        Ok(fld.value().to_string())
557    }
558
559
560    /// Returns true if `ExDestination` is present, Tag 100.
561    pub fn has_ex_destination(&self) -> bool {
562        self.message.body.has(tag::EX_DESTINATION)
563    }
564
565
566
567
568    /// Sets `ExecBroker`, Tag 76.
569    pub fn set_exec_broker(&mut self, v: String) {
570        self.message.body.set_field(tag::EXEC_BROKER, FIXString::from(v));
571    }
572
573    /// Gets `ExecBroker`, Tag 76.
574    pub fn get_exec_broker(&self) -> Result<String, MessageRejectErrorEnum> {
575        let mut fld = field::ExecBrokerField::new(String::new());
576        self.message.body.get_field(tag::EXEC_BROKER, &mut fld.0)?;
577        Ok(fld.value().to_string())
578    }
579
580
581    /// Returns true if `ExecBroker` is present, Tag 76.
582    pub fn has_exec_broker(&self) -> bool {
583        self.message.body.has(tag::EXEC_BROKER)
584    }
585
586
587
588
589    /// Sets `ExecInst`, Tag 18.
590    pub fn set_exec_inst(&mut self, v: String) {
591        self.message.body.set_field(tag::EXEC_INST, FIXString::from(v));
592    }
593
594    /// Gets `ExecInst`, Tag 18.
595    pub fn get_exec_inst(&self) -> Result<String, MessageRejectErrorEnum> {
596        let mut fld = field::ExecInstField::new(String::new());
597        self.message.body.get_field(tag::EXEC_INST, &mut fld.0)?;
598        Ok(fld.value().to_string())
599    }
600
601
602    /// Returns true if `ExecInst` is present, Tag 18.
603    pub fn has_exec_inst(&self) -> bool {
604        self.message.body.has(tag::EXEC_INST)
605    }
606
607
608
609
610    /// Sets `ExpireDate`, Tag 432.
611    pub fn set_expire_date(&mut self, v: String) {
612        self.message.body.set_field(tag::EXPIRE_DATE, FIXString::from(v));
613    }
614
615    /// Gets `ExpireDate`, Tag 432.
616    pub fn get_expire_date(&self) -> Result<String, MessageRejectErrorEnum> {
617        let mut fld = field::ExpireDateField::new(String::new());
618        self.message.body.get_field(tag::EXPIRE_DATE, &mut fld.0)?;
619        Ok(fld.value().to_string())
620    }
621
622
623    /// Returns true if `ExpireDate` is present, Tag 432.
624    pub fn has_expire_date(&self) -> bool {
625        self.message.body.has(tag::EXPIRE_DATE)
626    }
627
628
629
630
631    /// Sets `ExpireTime`, Tag 126.
632    pub fn set_expire_time(&mut self, v: Timestamp) {
633        self.message.body.set_field(tag::EXPIRE_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
634            time: v,
635            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
636        });
637    }
638
639    /// Gets `ExpireTime`, Tag 126.
640    pub fn get_expire_time(&self) -> Result<Timestamp, MessageRejectErrorEnum> {
641        let mut fld = field::ExpireTimeField::new(Timestamp::UNIX_EPOCH);
642        self.message.body.get_field(tag::EXPIRE_TIME, &mut fld.0)?;
643        Ok(fld.value())
644    }
645
646
647    /// Returns true if `ExpireTime` is present, Tag 126.
648    pub fn has_expire_time(&self) -> bool {
649        self.message.body.has(tag::EXPIRE_TIME)
650    }
651
652
653
654
655    /// Sets `ForexReq`, Tag 121.
656    pub fn set_forex_req(&mut self, v: bool) {
657        self.message.body.set_field(tag::FOREX_REQ, fixer::fix_boolean::FIXBoolean::from(v));
658    }
659
660    /// Gets `ForexReq`, Tag 121.
661    pub fn get_forex_req(&self) -> Result<bool, MessageRejectErrorEnum> {
662        let mut fld = field::ForexReqField::new(false);
663        self.message.body.get_field(tag::FOREX_REQ, &mut fld.0)?;
664        Ok(fld.value())
665    }
666
667
668    /// Returns true if `ForexReq` is present, Tag 121.
669    pub fn has_forex_req(&self) -> bool {
670        self.message.body.has(tag::FOREX_REQ)
671    }
672
673
674
675
676    /// Sets `FutSettDate`, Tag 64.
677    pub fn set_fut_sett_date(&mut self, v: String) {
678        self.message.body.set_field(tag::FUT_SETT_DATE, FIXString::from(v));
679    }
680
681    /// Gets `FutSettDate`, Tag 64.
682    pub fn get_fut_sett_date(&self) -> Result<String, MessageRejectErrorEnum> {
683        let mut fld = field::FutSettDateField::new(String::new());
684        self.message.body.get_field(tag::FUT_SETT_DATE, &mut fld.0)?;
685        Ok(fld.value().to_string())
686    }
687
688
689    /// Returns true if `FutSettDate` is present, Tag 64.
690    pub fn has_fut_sett_date(&self) -> bool {
691        self.message.body.has(tag::FUT_SETT_DATE)
692    }
693
694
695
696
697    /// Sets `FutSettDate2`, Tag 193.
698    pub fn set_fut_sett_date2(&mut self, v: String) {
699        self.message.body.set_field(tag::FUT_SETT_DATE2, FIXString::from(v));
700    }
701
702    /// Gets `FutSettDate2`, Tag 193.
703    pub fn get_fut_sett_date2(&self) -> Result<String, MessageRejectErrorEnum> {
704        let mut fld = field::FutSettDate2Field::new(String::new());
705        self.message.body.get_field(tag::FUT_SETT_DATE2, &mut fld.0)?;
706        Ok(fld.value().to_string())
707    }
708
709
710    /// Returns true if `FutSettDate2` is present, Tag 193.
711    pub fn has_fut_sett_date2(&self) -> bool {
712        self.message.body.has(tag::FUT_SETT_DATE2)
713    }
714
715
716
717
718    /// Sets `GTBookingInst`, Tag 427.
719    pub fn set_gt_booking_inst(&mut self, v: isize) {
720        self.message.body.set_field(tag::GT_BOOKING_INST, fixer::fix_int::FIXInt::from(v));
721    }
722
723    /// Gets `GTBookingInst`, Tag 427.
724    pub fn get_gt_booking_inst(&self) -> Result<isize, MessageRejectErrorEnum> {
725        let mut fld = field::GTBookingInstField::new(0);
726        self.message.body.get_field(tag::GT_BOOKING_INST, &mut fld.0)?;
727        Ok(fld.value())
728    }
729
730
731    /// Returns true if `GTBookingInst` is present, Tag 427.
732    pub fn has_gt_booking_inst(&self) -> bool {
733        self.message.body.has(tag::GT_BOOKING_INST)
734    }
735
736
737
738
739    /// Sets `HandlInst`, Tag 21.
740    pub fn set_handl_inst(&mut self, v: String) {
741        self.message.body.set_field(tag::HANDL_INST, FIXString::from(v));
742    }
743
744    /// Gets `HandlInst`, Tag 21.
745    pub fn get_handl_inst(&self) -> Result<String, MessageRejectErrorEnum> {
746        let mut fld = field::HandlInstField::new(String::new());
747        self.message.body.get_field(tag::HANDL_INST, &mut fld.0)?;
748        Ok(fld.value().to_string())
749    }
750
751
752    /// Returns true if `HandlInst` is present, Tag 21.
753    pub fn has_handl_inst(&self) -> bool {
754        self.message.body.has(tag::HANDL_INST)
755    }
756
757
758
759
760    /// Sets `IDSource`, Tag 22.
761    pub fn set_id_source(&mut self, v: String) {
762        self.message.body.set_field(tag::ID_SOURCE, FIXString::from(v));
763    }
764
765    /// Gets `IDSource`, Tag 22.
766    pub fn get_id_source(&self) -> Result<String, MessageRejectErrorEnum> {
767        let mut fld = field::IDSourceField::new(String::new());
768        self.message.body.get_field(tag::ID_SOURCE, &mut fld.0)?;
769        Ok(fld.value().to_string())
770    }
771
772
773    /// Returns true if `IDSource` is present, Tag 22.
774    pub fn has_id_source(&self) -> bool {
775        self.message.body.has(tag::ID_SOURCE)
776    }
777
778
779
780
781    /// Sets `Issuer`, Tag 106.
782    pub fn set_issuer(&mut self, v: String) {
783        self.message.body.set_field(tag::ISSUER, FIXString::from(v));
784    }
785
786    /// Gets `Issuer`, Tag 106.
787    pub fn get_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
788        let mut fld = field::IssuerField::new(String::new());
789        self.message.body.get_field(tag::ISSUER, &mut fld.0)?;
790        Ok(fld.value().to_string())
791    }
792
793
794    /// Returns true if `Issuer` is present, Tag 106.
795    pub fn has_issuer(&self) -> bool {
796        self.message.body.has(tag::ISSUER)
797    }
798
799
800
801
802    /// Sets `ListID`, Tag 66.
803    pub fn set_list_id(&mut self, v: String) {
804        self.message.body.set_field(tag::LIST_ID, FIXString::from(v));
805    }
806
807    /// Gets `ListID`, Tag 66.
808    pub fn get_list_id(&self) -> Result<String, MessageRejectErrorEnum> {
809        let mut fld = field::ListIDField::new(String::new());
810        self.message.body.get_field(tag::LIST_ID, &mut fld.0)?;
811        Ok(fld.value().to_string())
812    }
813
814
815    /// Returns true if `ListID` is present, Tag 66.
816    pub fn has_list_id(&self) -> bool {
817        self.message.body.has(tag::LIST_ID)
818    }
819
820
821
822
823    /// Sets `LocateReqd`, Tag 114.
824    pub fn set_locate_reqd(&mut self, v: bool) {
825        self.message.body.set_field(tag::LOCATE_REQD, fixer::fix_boolean::FIXBoolean::from(v));
826    }
827
828    /// Gets `LocateReqd`, Tag 114.
829    pub fn get_locate_reqd(&self) -> Result<bool, MessageRejectErrorEnum> {
830        let mut fld = field::LocateReqdField::new(false);
831        self.message.body.get_field(tag::LOCATE_REQD, &mut fld.0)?;
832        Ok(fld.value())
833    }
834
835
836    /// Returns true if `LocateReqd` is present, Tag 114.
837    pub fn has_locate_reqd(&self) -> bool {
838        self.message.body.has(tag::LOCATE_REQD)
839    }
840
841
842
843
844    /// Sets `MaturityDay`, Tag 205.
845    pub fn set_maturity_day(&mut self, v: isize) {
846        self.message.body.set_field(tag::MATURITY_DAY, fixer::fix_int::FIXInt::from(v));
847    }
848
849    /// Gets `MaturityDay`, Tag 205.
850    pub fn get_maturity_day(&self) -> Result<isize, MessageRejectErrorEnum> {
851        let mut fld = field::MaturityDayField::new(0);
852        self.message.body.get_field(tag::MATURITY_DAY, &mut fld.0)?;
853        Ok(fld.value())
854    }
855
856
857    /// Returns true if `MaturityDay` is present, Tag 205.
858    pub fn has_maturity_day(&self) -> bool {
859        self.message.body.has(tag::MATURITY_DAY)
860    }
861
862
863
864
865    /// Sets `MaturityMonthYear`, Tag 200.
866    pub fn set_maturity_month_year(&mut self, v: String) {
867        self.message.body.set_field(tag::MATURITY_MONTH_YEAR, FIXString::from(v));
868    }
869
870    /// Gets `MaturityMonthYear`, Tag 200.
871    pub fn get_maturity_month_year(&self) -> Result<String, MessageRejectErrorEnum> {
872        let mut fld = field::MaturityMonthYearField::new(String::new());
873        self.message.body.get_field(tag::MATURITY_MONTH_YEAR, &mut fld.0)?;
874        Ok(fld.value().to_string())
875    }
876
877
878    /// Returns true if `MaturityMonthYear` is present, Tag 200.
879    pub fn has_maturity_month_year(&self) -> bool {
880        self.message.body.has(tag::MATURITY_MONTH_YEAR)
881    }
882
883
884
885
886    /// Sets `MaxFloor`, Tag 111.
887    pub fn set_max_floor(&mut self, val: Decimal, scale: i32) {
888        self.message.body.set_field(tag::MAX_FLOOR, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
889    }
890
891    /// Gets `MaxFloor`, Tag 111.
892    pub fn get_max_floor(&self) -> Result<Decimal, MessageRejectErrorEnum> {
893        let mut fld = field::MaxFloorField::new(Decimal::ZERO, 0);
894        self.message.body.get_field(tag::MAX_FLOOR, &mut fld.0)?;
895        Ok(fld.value())
896    }
897
898
899    /// Returns true if `MaxFloor` is present, Tag 111.
900    pub fn has_max_floor(&self) -> bool {
901        self.message.body.has(tag::MAX_FLOOR)
902    }
903
904
905
906
907    /// Sets `MaxShow`, Tag 210.
908    pub fn set_max_show(&mut self, val: Decimal, scale: i32) {
909        self.message.body.set_field(tag::MAX_SHOW, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
910    }
911
912    /// Gets `MaxShow`, Tag 210.
913    pub fn get_max_show(&self) -> Result<Decimal, MessageRejectErrorEnum> {
914        let mut fld = field::MaxShowField::new(Decimal::ZERO, 0);
915        self.message.body.get_field(tag::MAX_SHOW, &mut fld.0)?;
916        Ok(fld.value())
917    }
918
919
920    /// Returns true if `MaxShow` is present, Tag 210.
921    pub fn has_max_show(&self) -> bool {
922        self.message.body.has(tag::MAX_SHOW)
923    }
924
925
926
927
928    /// Sets `MinQty`, Tag 110.
929    pub fn set_min_qty(&mut self, val: Decimal, scale: i32) {
930        self.message.body.set_field(tag::MIN_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
931    }
932
933    /// Gets `MinQty`, Tag 110.
934    pub fn get_min_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
935        let mut fld = field::MinQtyField::new(Decimal::ZERO, 0);
936        self.message.body.get_field(tag::MIN_QTY, &mut fld.0)?;
937        Ok(fld.value())
938    }
939
940
941    /// Returns true if `MinQty` is present, Tag 110.
942    pub fn has_min_qty(&self) -> bool {
943        self.message.body.has(tag::MIN_QTY)
944    }
945
946
947
948
949    /// Sets `NoAllocs`, Tag 78.
950    pub fn set_no_allocs(&mut self, v: isize) {
951        self.message.body.set_field(tag::NO_ALLOCS, fixer::fix_int::FIXInt::from(v));
952    }
953
954    /// Gets `NoAllocs`, Tag 78.
955    pub fn get_no_allocs(&self) -> Result<isize, MessageRejectErrorEnum> {
956        let mut fld = field::NoAllocsField::new(0);
957        self.message.body.get_field(tag::NO_ALLOCS, &mut fld.0)?;
958        Ok(fld.value())
959    }
960
961
962    /// Returns true if `NoAllocs` is present, Tag 78.
963    pub fn has_no_allocs(&self) -> bool {
964        self.message.body.has(tag::NO_ALLOCS)
965    }
966
967
968
969
970    /// Sets `NoTradingSessions`, Tag 386.
971    pub fn set_no_trading_sessions(&mut self, v: isize) {
972        self.message.body.set_field(tag::NO_TRADING_SESSIONS, fixer::fix_int::FIXInt::from(v));
973    }
974
975    /// Gets `NoTradingSessions`, Tag 386.
976    pub fn get_no_trading_sessions(&self) -> Result<isize, MessageRejectErrorEnum> {
977        let mut fld = field::NoTradingSessionsField::new(0);
978        self.message.body.get_field(tag::NO_TRADING_SESSIONS, &mut fld.0)?;
979        Ok(fld.value())
980    }
981
982
983    /// Returns true if `NoTradingSessions` is present, Tag 386.
984    pub fn has_no_trading_sessions(&self) -> bool {
985        self.message.body.has(tag::NO_TRADING_SESSIONS)
986    }
987
988
989
990
991    /// Sets `OpenClose`, Tag 77.
992    pub fn set_open_close(&mut self, v: String) {
993        self.message.body.set_field(tag::OPEN_CLOSE, FIXString::from(v));
994    }
995
996    /// Gets `OpenClose`, Tag 77.
997    pub fn get_open_close(&self) -> Result<String, MessageRejectErrorEnum> {
998        let mut fld = field::OpenCloseField::new(String::new());
999        self.message.body.get_field(tag::OPEN_CLOSE, &mut fld.0)?;
1000        Ok(fld.value().to_string())
1001    }
1002
1003
1004    /// Returns true if `OpenClose` is present, Tag 77.
1005    pub fn has_open_close(&self) -> bool {
1006        self.message.body.has(tag::OPEN_CLOSE)
1007    }
1008
1009
1010
1011
1012    /// Sets `OptAttribute`, Tag 206.
1013    pub fn set_opt_attribute(&mut self, v: String) {
1014        self.message.body.set_field(tag::OPT_ATTRIBUTE, FIXString::from(v));
1015    }
1016
1017    /// Gets `OptAttribute`, Tag 206.
1018    pub fn get_opt_attribute(&self) -> Result<String, MessageRejectErrorEnum> {
1019        let mut fld = field::OptAttributeField::new(String::new());
1020        self.message.body.get_field(tag::OPT_ATTRIBUTE, &mut fld.0)?;
1021        Ok(fld.value().to_string())
1022    }
1023
1024
1025    /// Returns true if `OptAttribute` is present, Tag 206.
1026    pub fn has_opt_attribute(&self) -> bool {
1027        self.message.body.has(tag::OPT_ATTRIBUTE)
1028    }
1029
1030
1031
1032
1033    /// Sets `OrdType`, Tag 40.
1034    pub fn set_ord_type(&mut self, v: String) {
1035        self.message.body.set_field(tag::ORD_TYPE, FIXString::from(v));
1036    }
1037
1038    /// Gets `OrdType`, Tag 40.
1039    pub fn get_ord_type(&self) -> Result<String, MessageRejectErrorEnum> {
1040        let mut fld = field::OrdTypeField::new(String::new());
1041        self.message.body.get_field(tag::ORD_TYPE, &mut fld.0)?;
1042        Ok(fld.value().to_string())
1043    }
1044
1045
1046    /// Returns true if `OrdType` is present, Tag 40.
1047    pub fn has_ord_type(&self) -> bool {
1048        self.message.body.has(tag::ORD_TYPE)
1049    }
1050
1051
1052
1053
1054    /// Sets `OrderID`, Tag 37.
1055    pub fn set_order_id(&mut self, v: String) {
1056        self.message.body.set_field(tag::ORDER_ID, FIXString::from(v));
1057    }
1058
1059    /// Gets `OrderID`, Tag 37.
1060    pub fn get_order_id(&self) -> Result<String, MessageRejectErrorEnum> {
1061        let mut fld = field::OrderIDField::new(String::new());
1062        self.message.body.get_field(tag::ORDER_ID, &mut fld.0)?;
1063        Ok(fld.value().to_string())
1064    }
1065
1066
1067    /// Returns true if `OrderID` is present, Tag 37.
1068    pub fn has_order_id(&self) -> bool {
1069        self.message.body.has(tag::ORDER_ID)
1070    }
1071
1072
1073
1074
1075    /// Sets `OrderQty`, Tag 38.
1076    pub fn set_order_qty(&mut self, val: Decimal, scale: i32) {
1077        self.message.body.set_field(tag::ORDER_QTY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1078    }
1079
1080    /// Gets `OrderQty`, Tag 38.
1081    pub fn get_order_qty(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1082        let mut fld = field::OrderQtyField::new(Decimal::ZERO, 0);
1083        self.message.body.get_field(tag::ORDER_QTY, &mut fld.0)?;
1084        Ok(fld.value())
1085    }
1086
1087
1088    /// Returns true if `OrderQty` is present, Tag 38.
1089    pub fn has_order_qty(&self) -> bool {
1090        self.message.body.has(tag::ORDER_QTY)
1091    }
1092
1093
1094
1095
1096    /// Sets `OrderQty2`, Tag 192.
1097    pub fn set_order_qty2(&mut self, val: Decimal, scale: i32) {
1098        self.message.body.set_field(tag::ORDER_QTY2, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1099    }
1100
1101    /// Gets `OrderQty2`, Tag 192.
1102    pub fn get_order_qty2(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1103        let mut fld = field::OrderQty2Field::new(Decimal::ZERO, 0);
1104        self.message.body.get_field(tag::ORDER_QTY2, &mut fld.0)?;
1105        Ok(fld.value())
1106    }
1107
1108
1109    /// Returns true if `OrderQty2` is present, Tag 192.
1110    pub fn has_order_qty2(&self) -> bool {
1111        self.message.body.has(tag::ORDER_QTY2)
1112    }
1113
1114
1115
1116
1117    /// Sets `OrigClOrdID`, Tag 41.
1118    pub fn set_orig_cl_ord_id(&mut self, v: String) {
1119        self.message.body.set_field(tag::ORIG_CL_ORD_ID, FIXString::from(v));
1120    }
1121
1122    /// Gets `OrigClOrdID`, Tag 41.
1123    pub fn get_orig_cl_ord_id(&self) -> Result<String, MessageRejectErrorEnum> {
1124        let mut fld = field::OrigClOrdIDField::new(String::new());
1125        self.message.body.get_field(tag::ORIG_CL_ORD_ID, &mut fld.0)?;
1126        Ok(fld.value().to_string())
1127    }
1128
1129
1130    /// Returns true if `OrigClOrdID` is present, Tag 41.
1131    pub fn has_orig_cl_ord_id(&self) -> bool {
1132        self.message.body.has(tag::ORIG_CL_ORD_ID)
1133    }
1134
1135
1136
1137
1138    /// Sets `PegDifference`, Tag 211.
1139    pub fn set_peg_difference(&mut self, val: Decimal, scale: i32) {
1140        self.message.body.set_field(tag::PEG_DIFFERENCE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1141    }
1142
1143    /// Gets `PegDifference`, Tag 211.
1144    pub fn get_peg_difference(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1145        let mut fld = field::PegDifferenceField::new(Decimal::ZERO, 0);
1146        self.message.body.get_field(tag::PEG_DIFFERENCE, &mut fld.0)?;
1147        Ok(fld.value())
1148    }
1149
1150
1151    /// Returns true if `PegDifference` is present, Tag 211.
1152    pub fn has_peg_difference(&self) -> bool {
1153        self.message.body.has(tag::PEG_DIFFERENCE)
1154    }
1155
1156
1157
1158
1159    /// Sets `Price`, Tag 44.
1160    pub fn set_price(&mut self, val: Decimal, scale: i32) {
1161        self.message.body.set_field(tag::PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1162    }
1163
1164    /// Gets `Price`, Tag 44.
1165    pub fn get_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1166        let mut fld = field::PriceField::new(Decimal::ZERO, 0);
1167        self.message.body.get_field(tag::PRICE, &mut fld.0)?;
1168        Ok(fld.value())
1169    }
1170
1171
1172    /// Returns true if `Price` is present, Tag 44.
1173    pub fn has_price(&self) -> bool {
1174        self.message.body.has(tag::PRICE)
1175    }
1176
1177
1178
1179
1180    /// Sets `PutOrCall`, Tag 201.
1181    pub fn set_put_or_call(&mut self, v: isize) {
1182        self.message.body.set_field(tag::PUT_OR_CALL, fixer::fix_int::FIXInt::from(v));
1183    }
1184
1185    /// Gets `PutOrCall`, Tag 201.
1186    pub fn get_put_or_call(&self) -> Result<isize, MessageRejectErrorEnum> {
1187        let mut fld = field::PutOrCallField::new(0);
1188        self.message.body.get_field(tag::PUT_OR_CALL, &mut fld.0)?;
1189        Ok(fld.value())
1190    }
1191
1192
1193    /// Returns true if `PutOrCall` is present, Tag 201.
1194    pub fn has_put_or_call(&self) -> bool {
1195        self.message.body.has(tag::PUT_OR_CALL)
1196    }
1197
1198
1199
1200
1201    /// Sets `Rule80A`, Tag 47.
1202    pub fn set_rule80_a(&mut self, v: String) {
1203        self.message.body.set_field(tag::RULE80_A, FIXString::from(v));
1204    }
1205
1206    /// Gets `Rule80A`, Tag 47.
1207    pub fn get_rule80_a(&self) -> Result<String, MessageRejectErrorEnum> {
1208        let mut fld = field::Rule80AField::new(String::new());
1209        self.message.body.get_field(tag::RULE80_A, &mut fld.0)?;
1210        Ok(fld.value().to_string())
1211    }
1212
1213
1214    /// Returns true if `Rule80A` is present, Tag 47.
1215    pub fn has_rule80_a(&self) -> bool {
1216        self.message.body.has(tag::RULE80_A)
1217    }
1218
1219
1220
1221
1222    /// Sets `SecurityDesc`, Tag 107.
1223    pub fn set_security_desc(&mut self, v: String) {
1224        self.message.body.set_field(tag::SECURITY_DESC, FIXString::from(v));
1225    }
1226
1227    /// Gets `SecurityDesc`, Tag 107.
1228    pub fn get_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
1229        let mut fld = field::SecurityDescField::new(String::new());
1230        self.message.body.get_field(tag::SECURITY_DESC, &mut fld.0)?;
1231        Ok(fld.value().to_string())
1232    }
1233
1234
1235    /// Returns true if `SecurityDesc` is present, Tag 107.
1236    pub fn has_security_desc(&self) -> bool {
1237        self.message.body.has(tag::SECURITY_DESC)
1238    }
1239
1240
1241
1242
1243    /// Sets `SecurityExchange`, Tag 207.
1244    pub fn set_security_exchange(&mut self, v: String) {
1245        self.message.body.set_field(tag::SECURITY_EXCHANGE, FIXString::from(v));
1246    }
1247
1248    /// Gets `SecurityExchange`, Tag 207.
1249    pub fn get_security_exchange(&self) -> Result<String, MessageRejectErrorEnum> {
1250        let mut fld = field::SecurityExchangeField::new(String::new());
1251        self.message.body.get_field(tag::SECURITY_EXCHANGE, &mut fld.0)?;
1252        Ok(fld.value().to_string())
1253    }
1254
1255
1256    /// Returns true if `SecurityExchange` is present, Tag 207.
1257    pub fn has_security_exchange(&self) -> bool {
1258        self.message.body.has(tag::SECURITY_EXCHANGE)
1259    }
1260
1261
1262
1263
1264    /// Sets `SecurityID`, Tag 48.
1265    pub fn set_security_id(&mut self, v: String) {
1266        self.message.body.set_field(tag::SECURITY_ID, FIXString::from(v));
1267    }
1268
1269    /// Gets `SecurityID`, Tag 48.
1270    pub fn get_security_id(&self) -> Result<String, MessageRejectErrorEnum> {
1271        let mut fld = field::SecurityIDField::new(String::new());
1272        self.message.body.get_field(tag::SECURITY_ID, &mut fld.0)?;
1273        Ok(fld.value().to_string())
1274    }
1275
1276
1277    /// Returns true if `SecurityID` is present, Tag 48.
1278    pub fn has_security_id(&self) -> bool {
1279        self.message.body.has(tag::SECURITY_ID)
1280    }
1281
1282
1283
1284
1285    /// Sets `SecurityType`, Tag 167.
1286    pub fn set_security_type(&mut self, v: String) {
1287        self.message.body.set_field(tag::SECURITY_TYPE, FIXString::from(v));
1288    }
1289
1290    /// Gets `SecurityType`, Tag 167.
1291    pub fn get_security_type(&self) -> Result<String, MessageRejectErrorEnum> {
1292        let mut fld = field::SecurityTypeField::new(String::new());
1293        self.message.body.get_field(tag::SECURITY_TYPE, &mut fld.0)?;
1294        Ok(fld.value().to_string())
1295    }
1296
1297
1298    /// Returns true if `SecurityType` is present, Tag 167.
1299    pub fn has_security_type(&self) -> bool {
1300        self.message.body.has(tag::SECURITY_TYPE)
1301    }
1302
1303
1304
1305
1306    /// Sets `SettlCurrency`, Tag 120.
1307    pub fn set_settl_currency(&mut self, v: String) {
1308        self.message.body.set_field(tag::SETTL_CURRENCY, FIXString::from(v));
1309    }
1310
1311    /// Gets `SettlCurrency`, Tag 120.
1312    pub fn get_settl_currency(&self) -> Result<String, MessageRejectErrorEnum> {
1313        let mut fld = field::SettlCurrencyField::new(String::new());
1314        self.message.body.get_field(tag::SETTL_CURRENCY, &mut fld.0)?;
1315        Ok(fld.value().to_string())
1316    }
1317
1318
1319    /// Returns true if `SettlCurrency` is present, Tag 120.
1320    pub fn has_settl_currency(&self) -> bool {
1321        self.message.body.has(tag::SETTL_CURRENCY)
1322    }
1323
1324
1325
1326
1327    /// Sets `SettlmntTyp`, Tag 63.
1328    pub fn set_settlmnt_typ(&mut self, v: String) {
1329        self.message.body.set_field(tag::SETTLMNT_TYP, FIXString::from(v));
1330    }
1331
1332    /// Gets `SettlmntTyp`, Tag 63.
1333    pub fn get_settlmnt_typ(&self) -> Result<String, MessageRejectErrorEnum> {
1334        let mut fld = field::SettlmntTypField::new(String::new());
1335        self.message.body.get_field(tag::SETTLMNT_TYP, &mut fld.0)?;
1336        Ok(fld.value().to_string())
1337    }
1338
1339
1340    /// Returns true if `SettlmntTyp` is present, Tag 63.
1341    pub fn has_settlmnt_typ(&self) -> bool {
1342        self.message.body.has(tag::SETTLMNT_TYP)
1343    }
1344
1345
1346
1347
1348    /// Sets `Side`, Tag 54.
1349    pub fn set_side(&mut self, v: String) {
1350        self.message.body.set_field(tag::SIDE, FIXString::from(v));
1351    }
1352
1353    /// Gets `Side`, Tag 54.
1354    pub fn get_side(&self) -> Result<String, MessageRejectErrorEnum> {
1355        let mut fld = field::SideField::new(String::new());
1356        self.message.body.get_field(tag::SIDE, &mut fld.0)?;
1357        Ok(fld.value().to_string())
1358    }
1359
1360
1361    /// Returns true if `Side` is present, Tag 54.
1362    pub fn has_side(&self) -> bool {
1363        self.message.body.has(tag::SIDE)
1364    }
1365
1366
1367
1368
1369    /// Sets `SolicitedFlag`, Tag 377.
1370    pub fn set_solicited_flag(&mut self, v: bool) {
1371        self.message.body.set_field(tag::SOLICITED_FLAG, fixer::fix_boolean::FIXBoolean::from(v));
1372    }
1373
1374    /// Gets `SolicitedFlag`, Tag 377.
1375    pub fn get_solicited_flag(&self) -> Result<bool, MessageRejectErrorEnum> {
1376        let mut fld = field::SolicitedFlagField::new(false);
1377        self.message.body.get_field(tag::SOLICITED_FLAG, &mut fld.0)?;
1378        Ok(fld.value())
1379    }
1380
1381
1382    /// Returns true if `SolicitedFlag` is present, Tag 377.
1383    pub fn has_solicited_flag(&self) -> bool {
1384        self.message.body.has(tag::SOLICITED_FLAG)
1385    }
1386
1387
1388
1389
1390    /// Sets `StopPx`, Tag 99.
1391    pub fn set_stop_px(&mut self, val: Decimal, scale: i32) {
1392        self.message.body.set_field(tag::STOP_PX, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1393    }
1394
1395    /// Gets `StopPx`, Tag 99.
1396    pub fn get_stop_px(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1397        let mut fld = field::StopPxField::new(Decimal::ZERO, 0);
1398        self.message.body.get_field(tag::STOP_PX, &mut fld.0)?;
1399        Ok(fld.value())
1400    }
1401
1402
1403    /// Returns true if `StopPx` is present, Tag 99.
1404    pub fn has_stop_px(&self) -> bool {
1405        self.message.body.has(tag::STOP_PX)
1406    }
1407
1408
1409
1410
1411    /// Sets `StrikePrice`, Tag 202.
1412    pub fn set_strike_price(&mut self, val: Decimal, scale: i32) {
1413        self.message.body.set_field(tag::STRIKE_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1414    }
1415
1416    /// Gets `StrikePrice`, Tag 202.
1417    pub fn get_strike_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1418        let mut fld = field::StrikePriceField::new(Decimal::ZERO, 0);
1419        self.message.body.get_field(tag::STRIKE_PRICE, &mut fld.0)?;
1420        Ok(fld.value())
1421    }
1422
1423
1424    /// Returns true if `StrikePrice` is present, Tag 202.
1425    pub fn has_strike_price(&self) -> bool {
1426        self.message.body.has(tag::STRIKE_PRICE)
1427    }
1428
1429
1430
1431
1432    /// Sets `Symbol`, Tag 55.
1433    pub fn set_symbol(&mut self, v: String) {
1434        self.message.body.set_field(tag::SYMBOL, FIXString::from(v));
1435    }
1436
1437    /// Gets `Symbol`, Tag 55.
1438    pub fn get_symbol(&self) -> Result<String, MessageRejectErrorEnum> {
1439        let mut fld = field::SymbolField::new(String::new());
1440        self.message.body.get_field(tag::SYMBOL, &mut fld.0)?;
1441        Ok(fld.value().to_string())
1442    }
1443
1444
1445    /// Returns true if `Symbol` is present, Tag 55.
1446    pub fn has_symbol(&self) -> bool {
1447        self.message.body.has(tag::SYMBOL)
1448    }
1449
1450
1451
1452
1453    /// Sets `SymbolSfx`, Tag 65.
1454    pub fn set_symbol_sfx(&mut self, v: String) {
1455        self.message.body.set_field(tag::SYMBOL_SFX, FIXString::from(v));
1456    }
1457
1458    /// Gets `SymbolSfx`, Tag 65.
1459    pub fn get_symbol_sfx(&self) -> Result<String, MessageRejectErrorEnum> {
1460        let mut fld = field::SymbolSfxField::new(String::new());
1461        self.message.body.get_field(tag::SYMBOL_SFX, &mut fld.0)?;
1462        Ok(fld.value().to_string())
1463    }
1464
1465
1466    /// Returns true if `SymbolSfx` is present, Tag 65.
1467    pub fn has_symbol_sfx(&self) -> bool {
1468        self.message.body.has(tag::SYMBOL_SFX)
1469    }
1470
1471
1472
1473
1474    /// Sets `Text`, Tag 58.
1475    pub fn set_text(&mut self, v: String) {
1476        self.message.body.set_field(tag::TEXT, FIXString::from(v));
1477    }
1478
1479    /// Gets `Text`, Tag 58.
1480    pub fn get_text(&self) -> Result<String, MessageRejectErrorEnum> {
1481        let mut fld = field::TextField::new(String::new());
1482        self.message.body.get_field(tag::TEXT, &mut fld.0)?;
1483        Ok(fld.value().to_string())
1484    }
1485
1486
1487    /// Returns true if `Text` is present, Tag 58.
1488    pub fn has_text(&self) -> bool {
1489        self.message.body.has(tag::TEXT)
1490    }
1491
1492
1493
1494
1495    /// Sets `TimeInForce`, Tag 59.
1496    pub fn set_time_in_force(&mut self, v: String) {
1497        self.message.body.set_field(tag::TIME_IN_FORCE, FIXString::from(v));
1498    }
1499
1500    /// Gets `TimeInForce`, Tag 59.
1501    pub fn get_time_in_force(&self) -> Result<String, MessageRejectErrorEnum> {
1502        let mut fld = field::TimeInForceField::new(String::new());
1503        self.message.body.get_field(tag::TIME_IN_FORCE, &mut fld.0)?;
1504        Ok(fld.value().to_string())
1505    }
1506
1507
1508    /// Returns true if `TimeInForce` is present, Tag 59.
1509    pub fn has_time_in_force(&self) -> bool {
1510        self.message.body.has(tag::TIME_IN_FORCE)
1511    }
1512
1513
1514
1515
1516    /// Sets `TransactTime`, Tag 60.
1517    pub fn set_transact_time(&mut self, v: Timestamp) {
1518        self.message.body.set_field(tag::TRANSACT_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
1519            time: v,
1520            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
1521        });
1522    }
1523
1524    /// Gets `TransactTime`, Tag 60.
1525    pub fn get_transact_time(&self) -> Result<Timestamp, MessageRejectErrorEnum> {
1526        let mut fld = field::TransactTimeField::new(Timestamp::UNIX_EPOCH);
1527        self.message.body.get_field(tag::TRANSACT_TIME, &mut fld.0)?;
1528        Ok(fld.value())
1529    }
1530
1531
1532    /// Returns true if `TransactTime` is present, Tag 60.
1533    pub fn has_transact_time(&self) -> bool {
1534        self.message.body.has(tag::TRANSACT_TIME)
1535    }
1536
1537
1538}
1539
1540/// `RouteOut` is the callback type for routing `OrderCancelReplaceRequest` messages.
1541pub type RouteOut = fn(msg: OrderCancelReplaceRequest, session_id: SessionID) -> Result<(), MessageRejectErrorEnum>;
1542
1543/// Route type returned by the `route` function.
1544pub type Route = (&'static str, &'static str, Box<dyn Fn(&Message, SessionID) -> Result<(), MessageRejectErrorEnum> + Send>);
1545
1546/// Returns the begin string, message type, and route function for `OrderCancelReplaceRequest`.
1547pub fn route(router: RouteOut) -> Route {
1548    let r = move |msg: &Message, session_id: SessionID| -> Result<(), MessageRejectErrorEnum> {
1549        router(OrderCancelReplaceRequest::from_message(msg.clone()), session_id)
1550    };
1551    ("FIX.4.2", "G", Box::new(r))
1552}