Skip to main content

fixer_fix/fix43/
order_status_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 crate::field;
16use crate::tag;
17
18/// `OrderStatusRequest` is the `fix43` `OrderStatusRequest` type, `MsgType` = H.
19pub struct OrderStatusRequest {
20    pub message: Message,
21}
22
23impl OrderStatusRequest {
24    /// Creates a new `OrderStatusRequest` with required fields.
25    pub fn new(cl_ord_id: field::ClOrdIDField, side: field::SideField) -> Self {
26        let mut msg = Message::new();
27        msg.header.set_field(tag::MSG_TYPE, FIXString::from("H".to_string()));
28
29        msg.body.set_field(tag::CL_ORD_ID, cl_ord_id.0);
30
31        msg.body.set_field(tag::SIDE, side.0);
32
33        Self { message: msg }
34    }
35
36    /// Creates a `OrderStatusRequest` from an existing `Message`.
37    pub fn from_message(msg: Message) -> Self {
38        Self { message: msg }
39    }
40
41    /// Returns the underlying `Message`.
42    pub fn to_message(self) -> Message {
43        self.message
44    }
45
46
47
48
49    /// Sets `Account`, Tag 1.
50    pub fn set_account(&mut self, v: String) {
51        self.message.body.set_field(tag::ACCOUNT, FIXString::from(v));
52    }
53
54    /// Gets `Account`, Tag 1.
55    pub fn get_account(&self) -> Result<String, MessageRejectErrorEnum> {
56        let mut fld = field::AccountField::new(String::new());
57        self.message.body.get_field(tag::ACCOUNT, &mut fld.0)?;
58        Ok(fld.value().to_string())
59    }
60
61
62    /// Returns true if `Account` is present, Tag 1.
63    pub fn has_account(&self) -> bool {
64        self.message.body.has(tag::ACCOUNT)
65    }
66
67
68
69
70    /// Sets `CFICode`, Tag 461.
71    pub fn set_cfi_code(&mut self, v: String) {
72        self.message.body.set_field(tag::CFI_CODE, FIXString::from(v));
73    }
74
75    /// Gets `CFICode`, Tag 461.
76    pub fn get_cfi_code(&self) -> Result<String, MessageRejectErrorEnum> {
77        let mut fld = field::CFICodeField::new(String::new());
78        self.message.body.get_field(tag::CFI_CODE, &mut fld.0)?;
79        Ok(fld.value().to_string())
80    }
81
82
83    /// Returns true if `CFICode` is present, Tag 461.
84    pub fn has_cfi_code(&self) -> bool {
85        self.message.body.has(tag::CFI_CODE)
86    }
87
88
89
90
91    /// Sets `ClOrdID`, Tag 11.
92    pub fn set_cl_ord_id(&mut self, v: String) {
93        self.message.body.set_field(tag::CL_ORD_ID, FIXString::from(v));
94    }
95
96    /// Gets `ClOrdID`, Tag 11.
97    pub fn get_cl_ord_id(&self) -> Result<String, MessageRejectErrorEnum> {
98        let mut fld = field::ClOrdIDField::new(String::new());
99        self.message.body.get_field(tag::CL_ORD_ID, &mut fld.0)?;
100        Ok(fld.value().to_string())
101    }
102
103
104    /// Returns true if `ClOrdID` is present, Tag 11.
105    pub fn has_cl_ord_id(&self) -> bool {
106        self.message.body.has(tag::CL_ORD_ID)
107    }
108
109
110
111
112    /// Sets `ClOrdLinkID`, Tag 583.
113    pub fn set_cl_ord_link_id(&mut self, v: String) {
114        self.message.body.set_field(tag::CL_ORD_LINK_ID, FIXString::from(v));
115    }
116
117    /// Gets `ClOrdLinkID`, Tag 583.
118    pub fn get_cl_ord_link_id(&self) -> Result<String, MessageRejectErrorEnum> {
119        let mut fld = field::ClOrdLinkIDField::new(String::new());
120        self.message.body.get_field(tag::CL_ORD_LINK_ID, &mut fld.0)?;
121        Ok(fld.value().to_string())
122    }
123
124
125    /// Returns true if `ClOrdLinkID` is present, Tag 583.
126    pub fn has_cl_ord_link_id(&self) -> bool {
127        self.message.body.has(tag::CL_ORD_LINK_ID)
128    }
129
130
131
132
133    /// Sets `ContractMultiplier`, Tag 231.
134    pub fn set_contract_multiplier(&mut self, val: Decimal, scale: i32) {
135        self.message.body.set_field(tag::CONTRACT_MULTIPLIER, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
136    }
137
138    /// Gets `ContractMultiplier`, Tag 231.
139    pub fn get_contract_multiplier(&self) -> Result<Decimal, MessageRejectErrorEnum> {
140        let mut fld = field::ContractMultiplierField::new(Decimal::ZERO, 0);
141        self.message.body.get_field(tag::CONTRACT_MULTIPLIER, &mut fld.0)?;
142        Ok(fld.value())
143    }
144
145
146    /// Returns true if `ContractMultiplier` is present, Tag 231.
147    pub fn has_contract_multiplier(&self) -> bool {
148        self.message.body.has(tag::CONTRACT_MULTIPLIER)
149    }
150
151
152
153
154    /// Sets `CountryOfIssue`, Tag 470.
155    pub fn set_country_of_issue(&mut self, v: String) {
156        self.message.body.set_field(tag::COUNTRY_OF_ISSUE, FIXString::from(v));
157    }
158
159    /// Gets `CountryOfIssue`, Tag 470.
160    pub fn get_country_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
161        let mut fld = field::CountryOfIssueField::new(String::new());
162        self.message.body.get_field(tag::COUNTRY_OF_ISSUE, &mut fld.0)?;
163        Ok(fld.value().to_string())
164    }
165
166
167    /// Returns true if `CountryOfIssue` is present, Tag 470.
168    pub fn has_country_of_issue(&self) -> bool {
169        self.message.body.has(tag::COUNTRY_OF_ISSUE)
170    }
171
172
173
174
175    /// Sets `CouponPaymentDate`, Tag 224.
176    pub fn set_coupon_payment_date(&mut self, v: String) {
177        self.message.body.set_field(tag::COUPON_PAYMENT_DATE, FIXString::from(v));
178    }
179
180    /// Gets `CouponPaymentDate`, Tag 224.
181    pub fn get_coupon_payment_date(&self) -> Result<String, MessageRejectErrorEnum> {
182        let mut fld = field::CouponPaymentDateField::new(String::new());
183        self.message.body.get_field(tag::COUPON_PAYMENT_DATE, &mut fld.0)?;
184        Ok(fld.value().to_string())
185    }
186
187
188    /// Returns true if `CouponPaymentDate` is present, Tag 224.
189    pub fn has_coupon_payment_date(&self) -> bool {
190        self.message.body.has(tag::COUPON_PAYMENT_DATE)
191    }
192
193
194
195
196    /// Sets `CouponRate`, Tag 223.
197    pub fn set_coupon_rate(&mut self, val: Decimal, scale: i32) {
198        self.message.body.set_field(tag::COUPON_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
199    }
200
201    /// Gets `CouponRate`, Tag 223.
202    pub fn get_coupon_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
203        let mut fld = field::CouponRateField::new(Decimal::ZERO, 0);
204        self.message.body.get_field(tag::COUPON_RATE, &mut fld.0)?;
205        Ok(fld.value())
206    }
207
208
209    /// Returns true if `CouponRate` is present, Tag 223.
210    pub fn has_coupon_rate(&self) -> bool {
211        self.message.body.has(tag::COUPON_RATE)
212    }
213
214
215
216
217    /// Sets `CreditRating`, Tag 255.
218    pub fn set_credit_rating(&mut self, v: String) {
219        self.message.body.set_field(tag::CREDIT_RATING, FIXString::from(v));
220    }
221
222    /// Gets `CreditRating`, Tag 255.
223    pub fn get_credit_rating(&self) -> Result<String, MessageRejectErrorEnum> {
224        let mut fld = field::CreditRatingField::new(String::new());
225        self.message.body.get_field(tag::CREDIT_RATING, &mut fld.0)?;
226        Ok(fld.value().to_string())
227    }
228
229
230    /// Returns true if `CreditRating` is present, Tag 255.
231    pub fn has_credit_rating(&self) -> bool {
232        self.message.body.has(tag::CREDIT_RATING)
233    }
234
235
236
237
238    /// Sets `EncodedIssuer`, Tag 349.
239    pub fn set_encoded_issuer(&mut self, v: String) {
240        self.message.body.set_field(tag::ENCODED_ISSUER, FIXString::from(v));
241    }
242
243    /// Gets `EncodedIssuer`, Tag 349.
244    pub fn get_encoded_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
245        let mut fld = field::EncodedIssuerField::new(String::new());
246        self.message.body.get_field(tag::ENCODED_ISSUER, &mut fld.0)?;
247        Ok(fld.value().to_string())
248    }
249
250
251    /// Returns true if `EncodedIssuer` is present, Tag 349.
252    pub fn has_encoded_issuer(&self) -> bool {
253        self.message.body.has(tag::ENCODED_ISSUER)
254    }
255
256
257
258
259    /// Sets `EncodedIssuerLen`, Tag 348.
260    pub fn set_encoded_issuer_len(&mut self, v: isize) {
261        self.message.body.set_field(tag::ENCODED_ISSUER_LEN, fixer::fix_int::FIXInt::from(v));
262    }
263
264    /// Gets `EncodedIssuerLen`, Tag 348.
265    pub fn get_encoded_issuer_len(&self) -> Result<isize, MessageRejectErrorEnum> {
266        let mut fld = field::EncodedIssuerLenField::new(0);
267        self.message.body.get_field(tag::ENCODED_ISSUER_LEN, &mut fld.0)?;
268        Ok(fld.value())
269    }
270
271
272    /// Returns true if `EncodedIssuerLen` is present, Tag 348.
273    pub fn has_encoded_issuer_len(&self) -> bool {
274        self.message.body.has(tag::ENCODED_ISSUER_LEN)
275    }
276
277
278
279
280    /// Sets `EncodedSecurityDesc`, Tag 351.
281    pub fn set_encoded_security_desc(&mut self, v: String) {
282        self.message.body.set_field(tag::ENCODED_SECURITY_DESC, FIXString::from(v));
283    }
284
285    /// Gets `EncodedSecurityDesc`, Tag 351.
286    pub fn get_encoded_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
287        let mut fld = field::EncodedSecurityDescField::new(String::new());
288        self.message.body.get_field(tag::ENCODED_SECURITY_DESC, &mut fld.0)?;
289        Ok(fld.value().to_string())
290    }
291
292
293    /// Returns true if `EncodedSecurityDesc` is present, Tag 351.
294    pub fn has_encoded_security_desc(&self) -> bool {
295        self.message.body.has(tag::ENCODED_SECURITY_DESC)
296    }
297
298
299
300
301    /// Sets `EncodedSecurityDescLen`, Tag 350.
302    pub fn set_encoded_security_desc_len(&mut self, v: isize) {
303        self.message.body.set_field(tag::ENCODED_SECURITY_DESC_LEN, fixer::fix_int::FIXInt::from(v));
304    }
305
306    /// Gets `EncodedSecurityDescLen`, Tag 350.
307    pub fn get_encoded_security_desc_len(&self) -> Result<isize, MessageRejectErrorEnum> {
308        let mut fld = field::EncodedSecurityDescLenField::new(0);
309        self.message.body.get_field(tag::ENCODED_SECURITY_DESC_LEN, &mut fld.0)?;
310        Ok(fld.value())
311    }
312
313
314    /// Returns true if `EncodedSecurityDescLen` is present, Tag 350.
315    pub fn has_encoded_security_desc_len(&self) -> bool {
316        self.message.body.has(tag::ENCODED_SECURITY_DESC_LEN)
317    }
318
319
320
321
322    /// Sets `Factor`, Tag 228.
323    pub fn set_factor(&mut self, val: Decimal, scale: i32) {
324        self.message.body.set_field(tag::FACTOR, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
325    }
326
327    /// Gets `Factor`, Tag 228.
328    pub fn get_factor(&self) -> Result<Decimal, MessageRejectErrorEnum> {
329        let mut fld = field::FactorField::new(Decimal::ZERO, 0);
330        self.message.body.get_field(tag::FACTOR, &mut fld.0)?;
331        Ok(fld.value())
332    }
333
334
335    /// Returns true if `Factor` is present, Tag 228.
336    pub fn has_factor(&self) -> bool {
337        self.message.body.has(tag::FACTOR)
338    }
339
340
341
342
343    /// Sets `InstrRegistry`, Tag 543.
344    pub fn set_instr_registry(&mut self, v: String) {
345        self.message.body.set_field(tag::INSTR_REGISTRY, FIXString::from(v));
346    }
347
348    /// Gets `InstrRegistry`, Tag 543.
349    pub fn get_instr_registry(&self) -> Result<String, MessageRejectErrorEnum> {
350        let mut fld = field::InstrRegistryField::new(String::new());
351        self.message.body.get_field(tag::INSTR_REGISTRY, &mut fld.0)?;
352        Ok(fld.value().to_string())
353    }
354
355
356    /// Returns true if `InstrRegistry` is present, Tag 543.
357    pub fn has_instr_registry(&self) -> bool {
358        self.message.body.has(tag::INSTR_REGISTRY)
359    }
360
361
362
363
364    /// Sets `IssueDate`, Tag 225.
365    pub fn set_issue_date(&mut self, v: String) {
366        self.message.body.set_field(tag::ISSUE_DATE, FIXString::from(v));
367    }
368
369    /// Gets `IssueDate`, Tag 225.
370    pub fn get_issue_date(&self) -> Result<String, MessageRejectErrorEnum> {
371        let mut fld = field::IssueDateField::new(String::new());
372        self.message.body.get_field(tag::ISSUE_DATE, &mut fld.0)?;
373        Ok(fld.value().to_string())
374    }
375
376
377    /// Returns true if `IssueDate` is present, Tag 225.
378    pub fn has_issue_date(&self) -> bool {
379        self.message.body.has(tag::ISSUE_DATE)
380    }
381
382
383
384
385    /// Sets `Issuer`, Tag 106.
386    pub fn set_issuer(&mut self, v: String) {
387        self.message.body.set_field(tag::ISSUER, FIXString::from(v));
388    }
389
390    /// Gets `Issuer`, Tag 106.
391    pub fn get_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
392        let mut fld = field::IssuerField::new(String::new());
393        self.message.body.get_field(tag::ISSUER, &mut fld.0)?;
394        Ok(fld.value().to_string())
395    }
396
397
398    /// Returns true if `Issuer` is present, Tag 106.
399    pub fn has_issuer(&self) -> bool {
400        self.message.body.has(tag::ISSUER)
401    }
402
403
404
405
406    /// Sets `LocaleOfIssue`, Tag 472.
407    pub fn set_locale_of_issue(&mut self, v: String) {
408        self.message.body.set_field(tag::LOCALE_OF_ISSUE, FIXString::from(v));
409    }
410
411    /// Gets `LocaleOfIssue`, Tag 472.
412    pub fn get_locale_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
413        let mut fld = field::LocaleOfIssueField::new(String::new());
414        self.message.body.get_field(tag::LOCALE_OF_ISSUE, &mut fld.0)?;
415        Ok(fld.value().to_string())
416    }
417
418
419    /// Returns true if `LocaleOfIssue` is present, Tag 472.
420    pub fn has_locale_of_issue(&self) -> bool {
421        self.message.body.has(tag::LOCALE_OF_ISSUE)
422    }
423
424
425
426
427    /// Sets `MaturityDate`, Tag 541.
428    pub fn set_maturity_date(&mut self, v: String) {
429        self.message.body.set_field(tag::MATURITY_DATE, FIXString::from(v));
430    }
431
432    /// Gets `MaturityDate`, Tag 541.
433    pub fn get_maturity_date(&self) -> Result<String, MessageRejectErrorEnum> {
434        let mut fld = field::MaturityDateField::new(String::new());
435        self.message.body.get_field(tag::MATURITY_DATE, &mut fld.0)?;
436        Ok(fld.value().to_string())
437    }
438
439
440    /// Returns true if `MaturityDate` is present, Tag 541.
441    pub fn has_maturity_date(&self) -> bool {
442        self.message.body.has(tag::MATURITY_DATE)
443    }
444
445
446
447
448    /// Sets `MaturityMonthYear`, Tag 200.
449    pub fn set_maturity_month_year(&mut self, v: String) {
450        self.message.body.set_field(tag::MATURITY_MONTH_YEAR, FIXString::from(v));
451    }
452
453    /// Gets `MaturityMonthYear`, Tag 200.
454    pub fn get_maturity_month_year(&self) -> Result<String, MessageRejectErrorEnum> {
455        let mut fld = field::MaturityMonthYearField::new(String::new());
456        self.message.body.get_field(tag::MATURITY_MONTH_YEAR, &mut fld.0)?;
457        Ok(fld.value().to_string())
458    }
459
460
461    /// Returns true if `MaturityMonthYear` is present, Tag 200.
462    pub fn has_maturity_month_year(&self) -> bool {
463        self.message.body.has(tag::MATURITY_MONTH_YEAR)
464    }
465
466
467
468
469    /// Sets `NoPartyIDs`, Tag 453.
470    pub fn set_no_party_i_ds(&mut self, v: isize) {
471        self.message.body.set_field(tag::NO_PARTY_I_DS, fixer::fix_int::FIXInt::from(v));
472    }
473
474    /// Gets `NoPartyIDs`, Tag 453.
475    pub fn get_no_party_i_ds(&self) -> Result<isize, MessageRejectErrorEnum> {
476        let mut fld = field::NoPartyIDsField::new(0);
477        self.message.body.get_field(tag::NO_PARTY_I_DS, &mut fld.0)?;
478        Ok(fld.value())
479    }
480
481
482    /// Returns true if `NoPartyIDs` is present, Tag 453.
483    pub fn has_no_party_i_ds(&self) -> bool {
484        self.message.body.has(tag::NO_PARTY_I_DS)
485    }
486
487
488
489
490    /// Sets `NoSecurityAltID`, Tag 454.
491    pub fn set_no_security_alt_id(&mut self, v: isize) {
492        self.message.body.set_field(tag::NO_SECURITY_ALT_ID, fixer::fix_int::FIXInt::from(v));
493    }
494
495    /// Gets `NoSecurityAltID`, Tag 454.
496    pub fn get_no_security_alt_id(&self) -> Result<isize, MessageRejectErrorEnum> {
497        let mut fld = field::NoSecurityAltIDField::new(0);
498        self.message.body.get_field(tag::NO_SECURITY_ALT_ID, &mut fld.0)?;
499        Ok(fld.value())
500    }
501
502
503    /// Returns true if `NoSecurityAltID` is present, Tag 454.
504    pub fn has_no_security_alt_id(&self) -> bool {
505        self.message.body.has(tag::NO_SECURITY_ALT_ID)
506    }
507
508
509
510
511    /// Sets `OptAttribute`, Tag 206.
512    pub fn set_opt_attribute(&mut self, v: String) {
513        self.message.body.set_field(tag::OPT_ATTRIBUTE, FIXString::from(v));
514    }
515
516    /// Gets `OptAttribute`, Tag 206.
517    pub fn get_opt_attribute(&self) -> Result<String, MessageRejectErrorEnum> {
518        let mut fld = field::OptAttributeField::new(String::new());
519        self.message.body.get_field(tag::OPT_ATTRIBUTE, &mut fld.0)?;
520        Ok(fld.value().to_string())
521    }
522
523
524    /// Returns true if `OptAttribute` is present, Tag 206.
525    pub fn has_opt_attribute(&self) -> bool {
526        self.message.body.has(tag::OPT_ATTRIBUTE)
527    }
528
529
530
531
532    /// Sets `OrderID`, Tag 37.
533    pub fn set_order_id(&mut self, v: String) {
534        self.message.body.set_field(tag::ORDER_ID, FIXString::from(v));
535    }
536
537    /// Gets `OrderID`, Tag 37.
538    pub fn get_order_id(&self) -> Result<String, MessageRejectErrorEnum> {
539        let mut fld = field::OrderIDField::new(String::new());
540        self.message.body.get_field(tag::ORDER_ID, &mut fld.0)?;
541        Ok(fld.value().to_string())
542    }
543
544
545    /// Returns true if `OrderID` is present, Tag 37.
546    pub fn has_order_id(&self) -> bool {
547        self.message.body.has(tag::ORDER_ID)
548    }
549
550
551
552
553    /// Sets `Product`, Tag 460.
554    pub fn set_product(&mut self, v: isize) {
555        self.message.body.set_field(tag::PRODUCT, fixer::fix_int::FIXInt::from(v));
556    }
557
558    /// Gets `Product`, Tag 460.
559    pub fn get_product(&self) -> Result<isize, MessageRejectErrorEnum> {
560        let mut fld = field::ProductField::new(0);
561        self.message.body.get_field(tag::PRODUCT, &mut fld.0)?;
562        Ok(fld.value())
563    }
564
565
566    /// Returns true if `Product` is present, Tag 460.
567    pub fn has_product(&self) -> bool {
568        self.message.body.has(tag::PRODUCT)
569    }
570
571
572
573
574    /// Sets `RedemptionDate`, Tag 240.
575    pub fn set_redemption_date(&mut self, v: String) {
576        self.message.body.set_field(tag::REDEMPTION_DATE, FIXString::from(v));
577    }
578
579    /// Gets `RedemptionDate`, Tag 240.
580    pub fn get_redemption_date(&self) -> Result<String, MessageRejectErrorEnum> {
581        let mut fld = field::RedemptionDateField::new(String::new());
582        self.message.body.get_field(tag::REDEMPTION_DATE, &mut fld.0)?;
583        Ok(fld.value().to_string())
584    }
585
586
587    /// Returns true if `RedemptionDate` is present, Tag 240.
588    pub fn has_redemption_date(&self) -> bool {
589        self.message.body.has(tag::REDEMPTION_DATE)
590    }
591
592
593
594
595    /// Sets `RepoCollateralSecurityType`, Tag 239.
596    pub fn set_repo_collateral_security_type(&mut self, v: isize) {
597        self.message.body.set_field(tag::REPO_COLLATERAL_SECURITY_TYPE, fixer::fix_int::FIXInt::from(v));
598    }
599
600    /// Gets `RepoCollateralSecurityType`, Tag 239.
601    pub fn get_repo_collateral_security_type(&self) -> Result<isize, MessageRejectErrorEnum> {
602        let mut fld = field::RepoCollateralSecurityTypeField::new(0);
603        self.message.body.get_field(tag::REPO_COLLATERAL_SECURITY_TYPE, &mut fld.0)?;
604        Ok(fld.value())
605    }
606
607
608    /// Returns true if `RepoCollateralSecurityType` is present, Tag 239.
609    pub fn has_repo_collateral_security_type(&self) -> bool {
610        self.message.body.has(tag::REPO_COLLATERAL_SECURITY_TYPE)
611    }
612
613
614
615
616    /// Sets `RepurchaseRate`, Tag 227.
617    pub fn set_repurchase_rate(&mut self, val: Decimal, scale: i32) {
618        self.message.body.set_field(tag::REPURCHASE_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
619    }
620
621    /// Gets `RepurchaseRate`, Tag 227.
622    pub fn get_repurchase_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
623        let mut fld = field::RepurchaseRateField::new(Decimal::ZERO, 0);
624        self.message.body.get_field(tag::REPURCHASE_RATE, &mut fld.0)?;
625        Ok(fld.value())
626    }
627
628
629    /// Returns true if `RepurchaseRate` is present, Tag 227.
630    pub fn has_repurchase_rate(&self) -> bool {
631        self.message.body.has(tag::REPURCHASE_RATE)
632    }
633
634
635
636
637    /// Sets `RepurchaseTerm`, Tag 226.
638    pub fn set_repurchase_term(&mut self, v: isize) {
639        self.message.body.set_field(tag::REPURCHASE_TERM, fixer::fix_int::FIXInt::from(v));
640    }
641
642    /// Gets `RepurchaseTerm`, Tag 226.
643    pub fn get_repurchase_term(&self) -> Result<isize, MessageRejectErrorEnum> {
644        let mut fld = field::RepurchaseTermField::new(0);
645        self.message.body.get_field(tag::REPURCHASE_TERM, &mut fld.0)?;
646        Ok(fld.value())
647    }
648
649
650    /// Returns true if `RepurchaseTerm` is present, Tag 226.
651    pub fn has_repurchase_term(&self) -> bool {
652        self.message.body.has(tag::REPURCHASE_TERM)
653    }
654
655
656
657
658    /// Sets `SecondaryClOrdID`, Tag 526.
659    pub fn set_secondary_cl_ord_id(&mut self, v: String) {
660        self.message.body.set_field(tag::SECONDARY_CL_ORD_ID, FIXString::from(v));
661    }
662
663    /// Gets `SecondaryClOrdID`, Tag 526.
664    pub fn get_secondary_cl_ord_id(&self) -> Result<String, MessageRejectErrorEnum> {
665        let mut fld = field::SecondaryClOrdIDField::new(String::new());
666        self.message.body.get_field(tag::SECONDARY_CL_ORD_ID, &mut fld.0)?;
667        Ok(fld.value().to_string())
668    }
669
670
671    /// Returns true if `SecondaryClOrdID` is present, Tag 526.
672    pub fn has_secondary_cl_ord_id(&self) -> bool {
673        self.message.body.has(tag::SECONDARY_CL_ORD_ID)
674    }
675
676
677
678
679    /// Sets `SecurityDesc`, Tag 107.
680    pub fn set_security_desc(&mut self, v: String) {
681        self.message.body.set_field(tag::SECURITY_DESC, FIXString::from(v));
682    }
683
684    /// Gets `SecurityDesc`, Tag 107.
685    pub fn get_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
686        let mut fld = field::SecurityDescField::new(String::new());
687        self.message.body.get_field(tag::SECURITY_DESC, &mut fld.0)?;
688        Ok(fld.value().to_string())
689    }
690
691
692    /// Returns true if `SecurityDesc` is present, Tag 107.
693    pub fn has_security_desc(&self) -> bool {
694        self.message.body.has(tag::SECURITY_DESC)
695    }
696
697
698
699
700    /// Sets `SecurityExchange`, Tag 207.
701    pub fn set_security_exchange(&mut self, v: String) {
702        self.message.body.set_field(tag::SECURITY_EXCHANGE, FIXString::from(v));
703    }
704
705    /// Gets `SecurityExchange`, Tag 207.
706    pub fn get_security_exchange(&self) -> Result<String, MessageRejectErrorEnum> {
707        let mut fld = field::SecurityExchangeField::new(String::new());
708        self.message.body.get_field(tag::SECURITY_EXCHANGE, &mut fld.0)?;
709        Ok(fld.value().to_string())
710    }
711
712
713    /// Returns true if `SecurityExchange` is present, Tag 207.
714    pub fn has_security_exchange(&self) -> bool {
715        self.message.body.has(tag::SECURITY_EXCHANGE)
716    }
717
718
719
720
721    /// Sets `SecurityID`, Tag 48.
722    pub fn set_security_id(&mut self, v: String) {
723        self.message.body.set_field(tag::SECURITY_ID, FIXString::from(v));
724    }
725
726    /// Gets `SecurityID`, Tag 48.
727    pub fn get_security_id(&self) -> Result<String, MessageRejectErrorEnum> {
728        let mut fld = field::SecurityIDField::new(String::new());
729        self.message.body.get_field(tag::SECURITY_ID, &mut fld.0)?;
730        Ok(fld.value().to_string())
731    }
732
733
734    /// Returns true if `SecurityID` is present, Tag 48.
735    pub fn has_security_id(&self) -> bool {
736        self.message.body.has(tag::SECURITY_ID)
737    }
738
739
740
741
742    /// Sets `SecurityIDSource`, Tag 22.
743    pub fn set_security_id_source(&mut self, v: String) {
744        self.message.body.set_field(tag::SECURITY_ID_SOURCE, FIXString::from(v));
745    }
746
747    /// Gets `SecurityIDSource`, Tag 22.
748    pub fn get_security_id_source(&self) -> Result<String, MessageRejectErrorEnum> {
749        let mut fld = field::SecurityIDSourceField::new(String::new());
750        self.message.body.get_field(tag::SECURITY_ID_SOURCE, &mut fld.0)?;
751        Ok(fld.value().to_string())
752    }
753
754
755    /// Returns true if `SecurityIDSource` is present, Tag 22.
756    pub fn has_security_id_source(&self) -> bool {
757        self.message.body.has(tag::SECURITY_ID_SOURCE)
758    }
759
760
761
762
763    /// Sets `SecurityType`, Tag 167.
764    pub fn set_security_type(&mut self, v: String) {
765        self.message.body.set_field(tag::SECURITY_TYPE, FIXString::from(v));
766    }
767
768    /// Gets `SecurityType`, Tag 167.
769    pub fn get_security_type(&self) -> Result<String, MessageRejectErrorEnum> {
770        let mut fld = field::SecurityTypeField::new(String::new());
771        self.message.body.get_field(tag::SECURITY_TYPE, &mut fld.0)?;
772        Ok(fld.value().to_string())
773    }
774
775
776    /// Returns true if `SecurityType` is present, Tag 167.
777    pub fn has_security_type(&self) -> bool {
778        self.message.body.has(tag::SECURITY_TYPE)
779    }
780
781
782
783
784    /// Sets `Side`, Tag 54.
785    pub fn set_side(&mut self, v: String) {
786        self.message.body.set_field(tag::SIDE, FIXString::from(v));
787    }
788
789    /// Gets `Side`, Tag 54.
790    pub fn get_side(&self) -> Result<String, MessageRejectErrorEnum> {
791        let mut fld = field::SideField::new(String::new());
792        self.message.body.get_field(tag::SIDE, &mut fld.0)?;
793        Ok(fld.value().to_string())
794    }
795
796
797    /// Returns true if `Side` is present, Tag 54.
798    pub fn has_side(&self) -> bool {
799        self.message.body.has(tag::SIDE)
800    }
801
802
803
804
805    /// Sets `StateOrProvinceOfIssue`, Tag 471.
806    pub fn set_state_or_province_of_issue(&mut self, v: String) {
807        self.message.body.set_field(tag::STATE_OR_PROVINCE_OF_ISSUE, FIXString::from(v));
808    }
809
810    /// Gets `StateOrProvinceOfIssue`, Tag 471.
811    pub fn get_state_or_province_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
812        let mut fld = field::StateOrProvinceOfIssueField::new(String::new());
813        self.message.body.get_field(tag::STATE_OR_PROVINCE_OF_ISSUE, &mut fld.0)?;
814        Ok(fld.value().to_string())
815    }
816
817
818    /// Returns true if `StateOrProvinceOfIssue` is present, Tag 471.
819    pub fn has_state_or_province_of_issue(&self) -> bool {
820        self.message.body.has(tag::STATE_OR_PROVINCE_OF_ISSUE)
821    }
822
823
824
825
826    /// Sets `StrikePrice`, Tag 202.
827    pub fn set_strike_price(&mut self, val: Decimal, scale: i32) {
828        self.message.body.set_field(tag::STRIKE_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
829    }
830
831    /// Gets `StrikePrice`, Tag 202.
832    pub fn get_strike_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
833        let mut fld = field::StrikePriceField::new(Decimal::ZERO, 0);
834        self.message.body.get_field(tag::STRIKE_PRICE, &mut fld.0)?;
835        Ok(fld.value())
836    }
837
838
839    /// Returns true if `StrikePrice` is present, Tag 202.
840    pub fn has_strike_price(&self) -> bool {
841        self.message.body.has(tag::STRIKE_PRICE)
842    }
843
844
845
846
847    /// Sets `Symbol`, Tag 55.
848    pub fn set_symbol(&mut self, v: String) {
849        self.message.body.set_field(tag::SYMBOL, FIXString::from(v));
850    }
851
852    /// Gets `Symbol`, Tag 55.
853    pub fn get_symbol(&self) -> Result<String, MessageRejectErrorEnum> {
854        let mut fld = field::SymbolField::new(String::new());
855        self.message.body.get_field(tag::SYMBOL, &mut fld.0)?;
856        Ok(fld.value().to_string())
857    }
858
859
860    /// Returns true if `Symbol` is present, Tag 55.
861    pub fn has_symbol(&self) -> bool {
862        self.message.body.has(tag::SYMBOL)
863    }
864
865
866
867
868    /// Sets `SymbolSfx`, Tag 65.
869    pub fn set_symbol_sfx(&mut self, v: String) {
870        self.message.body.set_field(tag::SYMBOL_SFX, FIXString::from(v));
871    }
872
873    /// Gets `SymbolSfx`, Tag 65.
874    pub fn get_symbol_sfx(&self) -> Result<String, MessageRejectErrorEnum> {
875        let mut fld = field::SymbolSfxField::new(String::new());
876        self.message.body.get_field(tag::SYMBOL_SFX, &mut fld.0)?;
877        Ok(fld.value().to_string())
878    }
879
880
881    /// Returns true if `SymbolSfx` is present, Tag 65.
882    pub fn has_symbol_sfx(&self) -> bool {
883        self.message.body.has(tag::SYMBOL_SFX)
884    }
885
886
887}
888
889/// `RouteOut` is the callback type for routing `OrderStatusRequest` messages.
890pub type RouteOut = fn(msg: OrderStatusRequest, session_id: SessionID) -> Result<(), MessageRejectErrorEnum>;
891
892/// Route type returned by the `route` function.
893pub type Route = (&'static str, &'static str, Box<dyn Fn(&Message, SessionID) -> Result<(), MessageRejectErrorEnum> + Send>);
894
895/// Returns the begin string, message type, and route function for `OrderStatusRequest`.
896pub fn route(router: RouteOut) -> Route {
897    let r = move |msg: &Message, session_id: SessionID| -> Result<(), MessageRejectErrorEnum> {
898        router(OrderStatusRequest::from_message(msg.clone()), session_id)
899    };
900    ("FIX.4.3", "H", Box::new(r))
901}