Skip to main content

fixer_fix/fix44/
request_for_positions.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/// `RequestForPositions` is the `fix44` `RequestForPositions` type, `MsgType` = AN.
21pub struct RequestForPositions {
22    pub message: Message,
23}
24
25impl RequestForPositions {
26    /// Creates a new `RequestForPositions` with required fields.
27    pub fn new(pos_req_id: field::PosReqIDField, pos_req_type: field::PosReqTypeField, account: field::AccountField, account_type: field::AccountTypeField, clearing_business_date: field::ClearingBusinessDateField, transact_time: field::TransactTimeField) -> Self {
28        let mut msg = Message::new();
29        msg.header.set_field(tag::MSG_TYPE, FIXString::from("AN".to_string()));
30
31        msg.body.set_field(tag::POS_REQ_ID, pos_req_id.0);
32
33        msg.body.set_field(tag::POS_REQ_TYPE, pos_req_type.0);
34
35        msg.body.set_field(tag::ACCOUNT, account.0);
36
37        msg.body.set_field(tag::ACCOUNT_TYPE, account_type.0);
38
39        msg.body.set_field(tag::CLEARING_BUSINESS_DATE, clearing_business_date.0);
40
41        msg.body.set_field(tag::TRANSACT_TIME, transact_time.0);
42
43        Self { message: msg }
44    }
45
46    /// Creates a `RequestForPositions` from an existing `Message`.
47    pub fn from_message(msg: Message) -> Self {
48        Self { message: msg }
49    }
50
51    /// Returns the underlying `Message`.
52    pub fn to_message(self) -> Message {
53        self.message
54    }
55
56
57
58
59    /// Sets `Account`, Tag 1.
60    pub fn set_account(&mut self, v: String) {
61        self.message.body.set_field(tag::ACCOUNT, FIXString::from(v));
62    }
63
64    /// Gets `Account`, Tag 1.
65    pub fn get_account(&self) -> Result<String, MessageRejectErrorEnum> {
66        let mut fld = field::AccountField::new(String::new());
67        self.message.body.get_field(tag::ACCOUNT, &mut fld.0)?;
68        Ok(fld.value().to_string())
69    }
70
71
72    /// Returns true if `Account` is present, Tag 1.
73    pub fn has_account(&self) -> bool {
74        self.message.body.has(tag::ACCOUNT)
75    }
76
77
78
79
80    /// Sets `AccountType`, Tag 581.
81    pub fn set_account_type(&mut self, v: isize) {
82        self.message.body.set_field(tag::ACCOUNT_TYPE, fixer::fix_int::FIXInt::from(v));
83    }
84
85    /// Gets `AccountType`, Tag 581.
86    pub fn get_account_type(&self) -> Result<isize, MessageRejectErrorEnum> {
87        let mut fld = field::AccountTypeField::new(0);
88        self.message.body.get_field(tag::ACCOUNT_TYPE, &mut fld.0)?;
89        Ok(fld.value())
90    }
91
92
93    /// Returns true if `AccountType` is present, Tag 581.
94    pub fn has_account_type(&self) -> bool {
95        self.message.body.has(tag::ACCOUNT_TYPE)
96    }
97
98
99
100
101    /// Sets `AcctIDSource`, Tag 660.
102    pub fn set_acct_id_source(&mut self, v: isize) {
103        self.message.body.set_field(tag::ACCT_ID_SOURCE, fixer::fix_int::FIXInt::from(v));
104    }
105
106    /// Gets `AcctIDSource`, Tag 660.
107    pub fn get_acct_id_source(&self) -> Result<isize, MessageRejectErrorEnum> {
108        let mut fld = field::AcctIDSourceField::new(0);
109        self.message.body.get_field(tag::ACCT_ID_SOURCE, &mut fld.0)?;
110        Ok(fld.value())
111    }
112
113
114    /// Returns true if `AcctIDSource` is present, Tag 660.
115    pub fn has_acct_id_source(&self) -> bool {
116        self.message.body.has(tag::ACCT_ID_SOURCE)
117    }
118
119
120
121
122    /// Sets `CFICode`, Tag 461.
123    pub fn set_cfi_code(&mut self, v: String) {
124        self.message.body.set_field(tag::CFI_CODE, FIXString::from(v));
125    }
126
127    /// Gets `CFICode`, Tag 461.
128    pub fn get_cfi_code(&self) -> Result<String, MessageRejectErrorEnum> {
129        let mut fld = field::CFICodeField::new(String::new());
130        self.message.body.get_field(tag::CFI_CODE, &mut fld.0)?;
131        Ok(fld.value().to_string())
132    }
133
134
135    /// Returns true if `CFICode` is present, Tag 461.
136    pub fn has_cfi_code(&self) -> bool {
137        self.message.body.has(tag::CFI_CODE)
138    }
139
140
141
142
143    /// Sets `CPProgram`, Tag 875.
144    pub fn set_cp_program(&mut self, v: isize) {
145        self.message.body.set_field(tag::CP_PROGRAM, fixer::fix_int::FIXInt::from(v));
146    }
147
148    /// Gets `CPProgram`, Tag 875.
149    pub fn get_cp_program(&self) -> Result<isize, MessageRejectErrorEnum> {
150        let mut fld = field::CPProgramField::new(0);
151        self.message.body.get_field(tag::CP_PROGRAM, &mut fld.0)?;
152        Ok(fld.value())
153    }
154
155
156    /// Returns true if `CPProgram` is present, Tag 875.
157    pub fn has_cp_program(&self) -> bool {
158        self.message.body.has(tag::CP_PROGRAM)
159    }
160
161
162
163
164    /// Sets `CPRegType`, Tag 876.
165    pub fn set_cp_reg_type(&mut self, v: String) {
166        self.message.body.set_field(tag::CP_REG_TYPE, FIXString::from(v));
167    }
168
169    /// Gets `CPRegType`, Tag 876.
170    pub fn get_cp_reg_type(&self) -> Result<String, MessageRejectErrorEnum> {
171        let mut fld = field::CPRegTypeField::new(String::new());
172        self.message.body.get_field(tag::CP_REG_TYPE, &mut fld.0)?;
173        Ok(fld.value().to_string())
174    }
175
176
177    /// Returns true if `CPRegType` is present, Tag 876.
178    pub fn has_cp_reg_type(&self) -> bool {
179        self.message.body.has(tag::CP_REG_TYPE)
180    }
181
182
183
184
185    /// Sets `ClearingBusinessDate`, Tag 715.
186    pub fn set_clearing_business_date(&mut self, v: String) {
187        self.message.body.set_field(tag::CLEARING_BUSINESS_DATE, FIXString::from(v));
188    }
189
190    /// Gets `ClearingBusinessDate`, Tag 715.
191    pub fn get_clearing_business_date(&self) -> Result<String, MessageRejectErrorEnum> {
192        let mut fld = field::ClearingBusinessDateField::new(String::new());
193        self.message.body.get_field(tag::CLEARING_BUSINESS_DATE, &mut fld.0)?;
194        Ok(fld.value().to_string())
195    }
196
197
198    /// Returns true if `ClearingBusinessDate` is present, Tag 715.
199    pub fn has_clearing_business_date(&self) -> bool {
200        self.message.body.has(tag::CLEARING_BUSINESS_DATE)
201    }
202
203
204
205
206    /// Sets `ContractMultiplier`, Tag 231.
207    pub fn set_contract_multiplier(&mut self, val: Decimal, scale: i32) {
208        self.message.body.set_field(tag::CONTRACT_MULTIPLIER, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
209    }
210
211    /// Gets `ContractMultiplier`, Tag 231.
212    pub fn get_contract_multiplier(&self) -> Result<Decimal, MessageRejectErrorEnum> {
213        let mut fld = field::ContractMultiplierField::new(Decimal::ZERO, 0);
214        self.message.body.get_field(tag::CONTRACT_MULTIPLIER, &mut fld.0)?;
215        Ok(fld.value())
216    }
217
218
219    /// Returns true if `ContractMultiplier` is present, Tag 231.
220    pub fn has_contract_multiplier(&self) -> bool {
221        self.message.body.has(tag::CONTRACT_MULTIPLIER)
222    }
223
224
225
226
227    /// Sets `ContractSettlMonth`, Tag 667.
228    pub fn set_contract_settl_month(&mut self, v: String) {
229        self.message.body.set_field(tag::CONTRACT_SETTL_MONTH, FIXString::from(v));
230    }
231
232    /// Gets `ContractSettlMonth`, Tag 667.
233    pub fn get_contract_settl_month(&self) -> Result<String, MessageRejectErrorEnum> {
234        let mut fld = field::ContractSettlMonthField::new(String::new());
235        self.message.body.get_field(tag::CONTRACT_SETTL_MONTH, &mut fld.0)?;
236        Ok(fld.value().to_string())
237    }
238
239
240    /// Returns true if `ContractSettlMonth` is present, Tag 667.
241    pub fn has_contract_settl_month(&self) -> bool {
242        self.message.body.has(tag::CONTRACT_SETTL_MONTH)
243    }
244
245
246
247
248    /// Sets `CountryOfIssue`, Tag 470.
249    pub fn set_country_of_issue(&mut self, v: String) {
250        self.message.body.set_field(tag::COUNTRY_OF_ISSUE, FIXString::from(v));
251    }
252
253    /// Gets `CountryOfIssue`, Tag 470.
254    pub fn get_country_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
255        let mut fld = field::CountryOfIssueField::new(String::new());
256        self.message.body.get_field(tag::COUNTRY_OF_ISSUE, &mut fld.0)?;
257        Ok(fld.value().to_string())
258    }
259
260
261    /// Returns true if `CountryOfIssue` is present, Tag 470.
262    pub fn has_country_of_issue(&self) -> bool {
263        self.message.body.has(tag::COUNTRY_OF_ISSUE)
264    }
265
266
267
268
269    /// Sets `CouponPaymentDate`, Tag 224.
270    pub fn set_coupon_payment_date(&mut self, v: String) {
271        self.message.body.set_field(tag::COUPON_PAYMENT_DATE, FIXString::from(v));
272    }
273
274    /// Gets `CouponPaymentDate`, Tag 224.
275    pub fn get_coupon_payment_date(&self) -> Result<String, MessageRejectErrorEnum> {
276        let mut fld = field::CouponPaymentDateField::new(String::new());
277        self.message.body.get_field(tag::COUPON_PAYMENT_DATE, &mut fld.0)?;
278        Ok(fld.value().to_string())
279    }
280
281
282    /// Returns true if `CouponPaymentDate` is present, Tag 224.
283    pub fn has_coupon_payment_date(&self) -> bool {
284        self.message.body.has(tag::COUPON_PAYMENT_DATE)
285    }
286
287
288
289
290    /// Sets `CouponRate`, Tag 223.
291    pub fn set_coupon_rate(&mut self, val: Decimal, scale: i32) {
292        self.message.body.set_field(tag::COUPON_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
293    }
294
295    /// Gets `CouponRate`, Tag 223.
296    pub fn get_coupon_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
297        let mut fld = field::CouponRateField::new(Decimal::ZERO, 0);
298        self.message.body.get_field(tag::COUPON_RATE, &mut fld.0)?;
299        Ok(fld.value())
300    }
301
302
303    /// Returns true if `CouponRate` is present, Tag 223.
304    pub fn has_coupon_rate(&self) -> bool {
305        self.message.body.has(tag::COUPON_RATE)
306    }
307
308
309
310
311    /// Sets `CreditRating`, Tag 255.
312    pub fn set_credit_rating(&mut self, v: String) {
313        self.message.body.set_field(tag::CREDIT_RATING, FIXString::from(v));
314    }
315
316    /// Gets `CreditRating`, Tag 255.
317    pub fn get_credit_rating(&self) -> Result<String, MessageRejectErrorEnum> {
318        let mut fld = field::CreditRatingField::new(String::new());
319        self.message.body.get_field(tag::CREDIT_RATING, &mut fld.0)?;
320        Ok(fld.value().to_string())
321    }
322
323
324    /// Returns true if `CreditRating` is present, Tag 255.
325    pub fn has_credit_rating(&self) -> bool {
326        self.message.body.has(tag::CREDIT_RATING)
327    }
328
329
330
331
332    /// Sets `Currency`, Tag 15.
333    pub fn set_currency(&mut self, v: String) {
334        self.message.body.set_field(tag::CURRENCY, FIXString::from(v));
335    }
336
337    /// Gets `Currency`, Tag 15.
338    pub fn get_currency(&self) -> Result<String, MessageRejectErrorEnum> {
339        let mut fld = field::CurrencyField::new(String::new());
340        self.message.body.get_field(tag::CURRENCY, &mut fld.0)?;
341        Ok(fld.value().to_string())
342    }
343
344
345    /// Returns true if `Currency` is present, Tag 15.
346    pub fn has_currency(&self) -> bool {
347        self.message.body.has(tag::CURRENCY)
348    }
349
350
351
352
353    /// Sets `DatedDate`, Tag 873.
354    pub fn set_dated_date(&mut self, v: String) {
355        self.message.body.set_field(tag::DATED_DATE, FIXString::from(v));
356    }
357
358    /// Gets `DatedDate`, Tag 873.
359    pub fn get_dated_date(&self) -> Result<String, MessageRejectErrorEnum> {
360        let mut fld = field::DatedDateField::new(String::new());
361        self.message.body.get_field(tag::DATED_DATE, &mut fld.0)?;
362        Ok(fld.value().to_string())
363    }
364
365
366    /// Returns true if `DatedDate` is present, Tag 873.
367    pub fn has_dated_date(&self) -> bool {
368        self.message.body.has(tag::DATED_DATE)
369    }
370
371
372
373
374    /// Sets `EncodedIssuer`, Tag 349.
375    pub fn set_encoded_issuer(&mut self, v: String) {
376        self.message.body.set_field(tag::ENCODED_ISSUER, FIXString::from(v));
377    }
378
379    /// Gets `EncodedIssuer`, Tag 349.
380    pub fn get_encoded_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
381        let mut fld = field::EncodedIssuerField::new(String::new());
382        self.message.body.get_field(tag::ENCODED_ISSUER, &mut fld.0)?;
383        Ok(fld.value().to_string())
384    }
385
386
387    /// Returns true if `EncodedIssuer` is present, Tag 349.
388    pub fn has_encoded_issuer(&self) -> bool {
389        self.message.body.has(tag::ENCODED_ISSUER)
390    }
391
392
393
394
395    /// Sets `EncodedIssuerLen`, Tag 348.
396    pub fn set_encoded_issuer_len(&mut self, v: isize) {
397        self.message.body.set_field(tag::ENCODED_ISSUER_LEN, fixer::fix_int::FIXInt::from(v));
398    }
399
400    /// Gets `EncodedIssuerLen`, Tag 348.
401    pub fn get_encoded_issuer_len(&self) -> Result<isize, MessageRejectErrorEnum> {
402        let mut fld = field::EncodedIssuerLenField::new(0);
403        self.message.body.get_field(tag::ENCODED_ISSUER_LEN, &mut fld.0)?;
404        Ok(fld.value())
405    }
406
407
408    /// Returns true if `EncodedIssuerLen` is present, Tag 348.
409    pub fn has_encoded_issuer_len(&self) -> bool {
410        self.message.body.has(tag::ENCODED_ISSUER_LEN)
411    }
412
413
414
415
416    /// Sets `EncodedSecurityDesc`, Tag 351.
417    pub fn set_encoded_security_desc(&mut self, v: String) {
418        self.message.body.set_field(tag::ENCODED_SECURITY_DESC, FIXString::from(v));
419    }
420
421    /// Gets `EncodedSecurityDesc`, Tag 351.
422    pub fn get_encoded_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
423        let mut fld = field::EncodedSecurityDescField::new(String::new());
424        self.message.body.get_field(tag::ENCODED_SECURITY_DESC, &mut fld.0)?;
425        Ok(fld.value().to_string())
426    }
427
428
429    /// Returns true if `EncodedSecurityDesc` is present, Tag 351.
430    pub fn has_encoded_security_desc(&self) -> bool {
431        self.message.body.has(tag::ENCODED_SECURITY_DESC)
432    }
433
434
435
436
437    /// Sets `EncodedSecurityDescLen`, Tag 350.
438    pub fn set_encoded_security_desc_len(&mut self, v: isize) {
439        self.message.body.set_field(tag::ENCODED_SECURITY_DESC_LEN, fixer::fix_int::FIXInt::from(v));
440    }
441
442    /// Gets `EncodedSecurityDescLen`, Tag 350.
443    pub fn get_encoded_security_desc_len(&self) -> Result<isize, MessageRejectErrorEnum> {
444        let mut fld = field::EncodedSecurityDescLenField::new(0);
445        self.message.body.get_field(tag::ENCODED_SECURITY_DESC_LEN, &mut fld.0)?;
446        Ok(fld.value())
447    }
448
449
450    /// Returns true if `EncodedSecurityDescLen` is present, Tag 350.
451    pub fn has_encoded_security_desc_len(&self) -> bool {
452        self.message.body.has(tag::ENCODED_SECURITY_DESC_LEN)
453    }
454
455
456
457
458    /// Sets `EncodedText`, Tag 355.
459    pub fn set_encoded_text(&mut self, v: String) {
460        self.message.body.set_field(tag::ENCODED_TEXT, FIXString::from(v));
461    }
462
463    /// Gets `EncodedText`, Tag 355.
464    pub fn get_encoded_text(&self) -> Result<String, MessageRejectErrorEnum> {
465        let mut fld = field::EncodedTextField::new(String::new());
466        self.message.body.get_field(tag::ENCODED_TEXT, &mut fld.0)?;
467        Ok(fld.value().to_string())
468    }
469
470
471    /// Returns true if `EncodedText` is present, Tag 355.
472    pub fn has_encoded_text(&self) -> bool {
473        self.message.body.has(tag::ENCODED_TEXT)
474    }
475
476
477
478
479    /// Sets `EncodedTextLen`, Tag 354.
480    pub fn set_encoded_text_len(&mut self, v: isize) {
481        self.message.body.set_field(tag::ENCODED_TEXT_LEN, fixer::fix_int::FIXInt::from(v));
482    }
483
484    /// Gets `EncodedTextLen`, Tag 354.
485    pub fn get_encoded_text_len(&self) -> Result<isize, MessageRejectErrorEnum> {
486        let mut fld = field::EncodedTextLenField::new(0);
487        self.message.body.get_field(tag::ENCODED_TEXT_LEN, &mut fld.0)?;
488        Ok(fld.value())
489    }
490
491
492    /// Returns true if `EncodedTextLen` is present, Tag 354.
493    pub fn has_encoded_text_len(&self) -> bool {
494        self.message.body.has(tag::ENCODED_TEXT_LEN)
495    }
496
497
498
499
500    /// Sets `Factor`, Tag 228.
501    pub fn set_factor(&mut self, val: Decimal, scale: i32) {
502        self.message.body.set_field(tag::FACTOR, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
503    }
504
505    /// Gets `Factor`, Tag 228.
506    pub fn get_factor(&self) -> Result<Decimal, MessageRejectErrorEnum> {
507        let mut fld = field::FactorField::new(Decimal::ZERO, 0);
508        self.message.body.get_field(tag::FACTOR, &mut fld.0)?;
509        Ok(fld.value())
510    }
511
512
513    /// Returns true if `Factor` is present, Tag 228.
514    pub fn has_factor(&self) -> bool {
515        self.message.body.has(tag::FACTOR)
516    }
517
518
519
520
521    /// Sets `InstrRegistry`, Tag 543.
522    pub fn set_instr_registry(&mut self, v: String) {
523        self.message.body.set_field(tag::INSTR_REGISTRY, FIXString::from(v));
524    }
525
526    /// Gets `InstrRegistry`, Tag 543.
527    pub fn get_instr_registry(&self) -> Result<String, MessageRejectErrorEnum> {
528        let mut fld = field::InstrRegistryField::new(String::new());
529        self.message.body.get_field(tag::INSTR_REGISTRY, &mut fld.0)?;
530        Ok(fld.value().to_string())
531    }
532
533
534    /// Returns true if `InstrRegistry` is present, Tag 543.
535    pub fn has_instr_registry(&self) -> bool {
536        self.message.body.has(tag::INSTR_REGISTRY)
537    }
538
539
540
541
542    /// Sets `InterestAccrualDate`, Tag 874.
543    pub fn set_interest_accrual_date(&mut self, v: String) {
544        self.message.body.set_field(tag::INTEREST_ACCRUAL_DATE, FIXString::from(v));
545    }
546
547    /// Gets `InterestAccrualDate`, Tag 874.
548    pub fn get_interest_accrual_date(&self) -> Result<String, MessageRejectErrorEnum> {
549        let mut fld = field::InterestAccrualDateField::new(String::new());
550        self.message.body.get_field(tag::INTEREST_ACCRUAL_DATE, &mut fld.0)?;
551        Ok(fld.value().to_string())
552    }
553
554
555    /// Returns true if `InterestAccrualDate` is present, Tag 874.
556    pub fn has_interest_accrual_date(&self) -> bool {
557        self.message.body.has(tag::INTEREST_ACCRUAL_DATE)
558    }
559
560
561
562
563    /// Sets `IssueDate`, Tag 225.
564    pub fn set_issue_date(&mut self, v: String) {
565        self.message.body.set_field(tag::ISSUE_DATE, FIXString::from(v));
566    }
567
568    /// Gets `IssueDate`, Tag 225.
569    pub fn get_issue_date(&self) -> Result<String, MessageRejectErrorEnum> {
570        let mut fld = field::IssueDateField::new(String::new());
571        self.message.body.get_field(tag::ISSUE_DATE, &mut fld.0)?;
572        Ok(fld.value().to_string())
573    }
574
575
576    /// Returns true if `IssueDate` is present, Tag 225.
577    pub fn has_issue_date(&self) -> bool {
578        self.message.body.has(tag::ISSUE_DATE)
579    }
580
581
582
583
584    /// Sets `Issuer`, Tag 106.
585    pub fn set_issuer(&mut self, v: String) {
586        self.message.body.set_field(tag::ISSUER, FIXString::from(v));
587    }
588
589    /// Gets `Issuer`, Tag 106.
590    pub fn get_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
591        let mut fld = field::IssuerField::new(String::new());
592        self.message.body.get_field(tag::ISSUER, &mut fld.0)?;
593        Ok(fld.value().to_string())
594    }
595
596
597    /// Returns true if `Issuer` is present, Tag 106.
598    pub fn has_issuer(&self) -> bool {
599        self.message.body.has(tag::ISSUER)
600    }
601
602
603
604
605    /// Sets `LocaleOfIssue`, Tag 472.
606    pub fn set_locale_of_issue(&mut self, v: String) {
607        self.message.body.set_field(tag::LOCALE_OF_ISSUE, FIXString::from(v));
608    }
609
610    /// Gets `LocaleOfIssue`, Tag 472.
611    pub fn get_locale_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
612        let mut fld = field::LocaleOfIssueField::new(String::new());
613        self.message.body.get_field(tag::LOCALE_OF_ISSUE, &mut fld.0)?;
614        Ok(fld.value().to_string())
615    }
616
617
618    /// Returns true if `LocaleOfIssue` is present, Tag 472.
619    pub fn has_locale_of_issue(&self) -> bool {
620        self.message.body.has(tag::LOCALE_OF_ISSUE)
621    }
622
623
624
625
626    /// Sets `MatchStatus`, Tag 573.
627    pub fn set_match_status(&mut self, v: String) {
628        self.message.body.set_field(tag::MATCH_STATUS, FIXString::from(v));
629    }
630
631    /// Gets `MatchStatus`, Tag 573.
632    pub fn get_match_status(&self) -> Result<String, MessageRejectErrorEnum> {
633        let mut fld = field::MatchStatusField::new(String::new());
634        self.message.body.get_field(tag::MATCH_STATUS, &mut fld.0)?;
635        Ok(fld.value().to_string())
636    }
637
638
639    /// Returns true if `MatchStatus` is present, Tag 573.
640    pub fn has_match_status(&self) -> bool {
641        self.message.body.has(tag::MATCH_STATUS)
642    }
643
644
645
646
647    /// Sets `MaturityDate`, Tag 541.
648    pub fn set_maturity_date(&mut self, v: String) {
649        self.message.body.set_field(tag::MATURITY_DATE, FIXString::from(v));
650    }
651
652    /// Gets `MaturityDate`, Tag 541.
653    pub fn get_maturity_date(&self) -> Result<String, MessageRejectErrorEnum> {
654        let mut fld = field::MaturityDateField::new(String::new());
655        self.message.body.get_field(tag::MATURITY_DATE, &mut fld.0)?;
656        Ok(fld.value().to_string())
657    }
658
659
660    /// Returns true if `MaturityDate` is present, Tag 541.
661    pub fn has_maturity_date(&self) -> bool {
662        self.message.body.has(tag::MATURITY_DATE)
663    }
664
665
666
667
668    /// Sets `MaturityMonthYear`, Tag 200.
669    pub fn set_maturity_month_year(&mut self, v: String) {
670        self.message.body.set_field(tag::MATURITY_MONTH_YEAR, FIXString::from(v));
671    }
672
673    /// Gets `MaturityMonthYear`, Tag 200.
674    pub fn get_maturity_month_year(&self) -> Result<String, MessageRejectErrorEnum> {
675        let mut fld = field::MaturityMonthYearField::new(String::new());
676        self.message.body.get_field(tag::MATURITY_MONTH_YEAR, &mut fld.0)?;
677        Ok(fld.value().to_string())
678    }
679
680
681    /// Returns true if `MaturityMonthYear` is present, Tag 200.
682    pub fn has_maturity_month_year(&self) -> bool {
683        self.message.body.has(tag::MATURITY_MONTH_YEAR)
684    }
685
686
687
688
689    /// Sets `NoEvents`, Tag 864.
690    pub fn set_no_events(&mut self, v: isize) {
691        self.message.body.set_field(tag::NO_EVENTS, fixer::fix_int::FIXInt::from(v));
692    }
693
694    /// Gets `NoEvents`, Tag 864.
695    pub fn get_no_events(&self) -> Result<isize, MessageRejectErrorEnum> {
696        let mut fld = field::NoEventsField::new(0);
697        self.message.body.get_field(tag::NO_EVENTS, &mut fld.0)?;
698        Ok(fld.value())
699    }
700
701
702    /// Returns true if `NoEvents` is present, Tag 864.
703    pub fn has_no_events(&self) -> bool {
704        self.message.body.has(tag::NO_EVENTS)
705    }
706
707
708
709
710    /// Sets `NoLegs`, Tag 555.
711    pub fn set_no_legs(&mut self, v: isize) {
712        self.message.body.set_field(tag::NO_LEGS, fixer::fix_int::FIXInt::from(v));
713    }
714
715    /// Gets `NoLegs`, Tag 555.
716    pub fn get_no_legs(&self) -> Result<isize, MessageRejectErrorEnum> {
717        let mut fld = field::NoLegsField::new(0);
718        self.message.body.get_field(tag::NO_LEGS, &mut fld.0)?;
719        Ok(fld.value())
720    }
721
722
723    /// Returns true if `NoLegs` is present, Tag 555.
724    pub fn has_no_legs(&self) -> bool {
725        self.message.body.has(tag::NO_LEGS)
726    }
727
728
729
730
731    /// Sets `NoPartyIDs`, Tag 453.
732    pub fn set_no_party_i_ds(&mut self, v: isize) {
733        self.message.body.set_field(tag::NO_PARTY_I_DS, fixer::fix_int::FIXInt::from(v));
734    }
735
736    /// Gets `NoPartyIDs`, Tag 453.
737    pub fn get_no_party_i_ds(&self) -> Result<isize, MessageRejectErrorEnum> {
738        let mut fld = field::NoPartyIDsField::new(0);
739        self.message.body.get_field(tag::NO_PARTY_I_DS, &mut fld.0)?;
740        Ok(fld.value())
741    }
742
743
744    /// Returns true if `NoPartyIDs` is present, Tag 453.
745    pub fn has_no_party_i_ds(&self) -> bool {
746        self.message.body.has(tag::NO_PARTY_I_DS)
747    }
748
749
750
751
752    /// Sets `NoSecurityAltID`, Tag 454.
753    pub fn set_no_security_alt_id(&mut self, v: isize) {
754        self.message.body.set_field(tag::NO_SECURITY_ALT_ID, fixer::fix_int::FIXInt::from(v));
755    }
756
757    /// Gets `NoSecurityAltID`, Tag 454.
758    pub fn get_no_security_alt_id(&self) -> Result<isize, MessageRejectErrorEnum> {
759        let mut fld = field::NoSecurityAltIDField::new(0);
760        self.message.body.get_field(tag::NO_SECURITY_ALT_ID, &mut fld.0)?;
761        Ok(fld.value())
762    }
763
764
765    /// Returns true if `NoSecurityAltID` is present, Tag 454.
766    pub fn has_no_security_alt_id(&self) -> bool {
767        self.message.body.has(tag::NO_SECURITY_ALT_ID)
768    }
769
770
771
772
773    /// Sets `NoTradingSessions`, Tag 386.
774    pub fn set_no_trading_sessions(&mut self, v: isize) {
775        self.message.body.set_field(tag::NO_TRADING_SESSIONS, fixer::fix_int::FIXInt::from(v));
776    }
777
778    /// Gets `NoTradingSessions`, Tag 386.
779    pub fn get_no_trading_sessions(&self) -> Result<isize, MessageRejectErrorEnum> {
780        let mut fld = field::NoTradingSessionsField::new(0);
781        self.message.body.get_field(tag::NO_TRADING_SESSIONS, &mut fld.0)?;
782        Ok(fld.value())
783    }
784
785
786    /// Returns true if `NoTradingSessions` is present, Tag 386.
787    pub fn has_no_trading_sessions(&self) -> bool {
788        self.message.body.has(tag::NO_TRADING_SESSIONS)
789    }
790
791
792
793
794    /// Sets `NoUnderlyings`, Tag 711.
795    pub fn set_no_underlyings(&mut self, v: isize) {
796        self.message.body.set_field(tag::NO_UNDERLYINGS, fixer::fix_int::FIXInt::from(v));
797    }
798
799    /// Gets `NoUnderlyings`, Tag 711.
800    pub fn get_no_underlyings(&self) -> Result<isize, MessageRejectErrorEnum> {
801        let mut fld = field::NoUnderlyingsField::new(0);
802        self.message.body.get_field(tag::NO_UNDERLYINGS, &mut fld.0)?;
803        Ok(fld.value())
804    }
805
806
807    /// Returns true if `NoUnderlyings` is present, Tag 711.
808    pub fn has_no_underlyings(&self) -> bool {
809        self.message.body.has(tag::NO_UNDERLYINGS)
810    }
811
812
813
814
815    /// Sets `OptAttribute`, Tag 206.
816    pub fn set_opt_attribute(&mut self, v: String) {
817        self.message.body.set_field(tag::OPT_ATTRIBUTE, FIXString::from(v));
818    }
819
820    /// Gets `OptAttribute`, Tag 206.
821    pub fn get_opt_attribute(&self) -> Result<String, MessageRejectErrorEnum> {
822        let mut fld = field::OptAttributeField::new(String::new());
823        self.message.body.get_field(tag::OPT_ATTRIBUTE, &mut fld.0)?;
824        Ok(fld.value().to_string())
825    }
826
827
828    /// Returns true if `OptAttribute` is present, Tag 206.
829    pub fn has_opt_attribute(&self) -> bool {
830        self.message.body.has(tag::OPT_ATTRIBUTE)
831    }
832
833
834
835
836    /// Sets `Pool`, Tag 691.
837    pub fn set_pool(&mut self, v: String) {
838        self.message.body.set_field(tag::POOL, FIXString::from(v));
839    }
840
841    /// Gets `Pool`, Tag 691.
842    pub fn get_pool(&self) -> Result<String, MessageRejectErrorEnum> {
843        let mut fld = field::PoolField::new(String::new());
844        self.message.body.get_field(tag::POOL, &mut fld.0)?;
845        Ok(fld.value().to_string())
846    }
847
848
849    /// Returns true if `Pool` is present, Tag 691.
850    pub fn has_pool(&self) -> bool {
851        self.message.body.has(tag::POOL)
852    }
853
854
855
856
857    /// Sets `PosReqID`, Tag 710.
858    pub fn set_pos_req_id(&mut self, v: String) {
859        self.message.body.set_field(tag::POS_REQ_ID, FIXString::from(v));
860    }
861
862    /// Gets `PosReqID`, Tag 710.
863    pub fn get_pos_req_id(&self) -> Result<String, MessageRejectErrorEnum> {
864        let mut fld = field::PosReqIDField::new(String::new());
865        self.message.body.get_field(tag::POS_REQ_ID, &mut fld.0)?;
866        Ok(fld.value().to_string())
867    }
868
869
870    /// Returns true if `PosReqID` is present, Tag 710.
871    pub fn has_pos_req_id(&self) -> bool {
872        self.message.body.has(tag::POS_REQ_ID)
873    }
874
875
876
877
878    /// Sets `PosReqType`, Tag 724.
879    pub fn set_pos_req_type(&mut self, v: isize) {
880        self.message.body.set_field(tag::POS_REQ_TYPE, fixer::fix_int::FIXInt::from(v));
881    }
882
883    /// Gets `PosReqType`, Tag 724.
884    pub fn get_pos_req_type(&self) -> Result<isize, MessageRejectErrorEnum> {
885        let mut fld = field::PosReqTypeField::new(0);
886        self.message.body.get_field(tag::POS_REQ_TYPE, &mut fld.0)?;
887        Ok(fld.value())
888    }
889
890
891    /// Returns true if `PosReqType` is present, Tag 724.
892    pub fn has_pos_req_type(&self) -> bool {
893        self.message.body.has(tag::POS_REQ_TYPE)
894    }
895
896
897
898
899    /// Sets `Product`, Tag 460.
900    pub fn set_product(&mut self, v: isize) {
901        self.message.body.set_field(tag::PRODUCT, fixer::fix_int::FIXInt::from(v));
902    }
903
904    /// Gets `Product`, Tag 460.
905    pub fn get_product(&self) -> Result<isize, MessageRejectErrorEnum> {
906        let mut fld = field::ProductField::new(0);
907        self.message.body.get_field(tag::PRODUCT, &mut fld.0)?;
908        Ok(fld.value())
909    }
910
911
912    /// Returns true if `Product` is present, Tag 460.
913    pub fn has_product(&self) -> bool {
914        self.message.body.has(tag::PRODUCT)
915    }
916
917
918
919
920    /// Sets `RedemptionDate`, Tag 240.
921    pub fn set_redemption_date(&mut self, v: String) {
922        self.message.body.set_field(tag::REDEMPTION_DATE, FIXString::from(v));
923    }
924
925    /// Gets `RedemptionDate`, Tag 240.
926    pub fn get_redemption_date(&self) -> Result<String, MessageRejectErrorEnum> {
927        let mut fld = field::RedemptionDateField::new(String::new());
928        self.message.body.get_field(tag::REDEMPTION_DATE, &mut fld.0)?;
929        Ok(fld.value().to_string())
930    }
931
932
933    /// Returns true if `RedemptionDate` is present, Tag 240.
934    pub fn has_redemption_date(&self) -> bool {
935        self.message.body.has(tag::REDEMPTION_DATE)
936    }
937
938
939
940
941    /// Sets `RepoCollateralSecurityType`, Tag 239.
942    pub fn set_repo_collateral_security_type(&mut self, v: isize) {
943        self.message.body.set_field(tag::REPO_COLLATERAL_SECURITY_TYPE, fixer::fix_int::FIXInt::from(v));
944    }
945
946    /// Gets `RepoCollateralSecurityType`, Tag 239.
947    pub fn get_repo_collateral_security_type(&self) -> Result<isize, MessageRejectErrorEnum> {
948        let mut fld = field::RepoCollateralSecurityTypeField::new(0);
949        self.message.body.get_field(tag::REPO_COLLATERAL_SECURITY_TYPE, &mut fld.0)?;
950        Ok(fld.value())
951    }
952
953
954    /// Returns true if `RepoCollateralSecurityType` is present, Tag 239.
955    pub fn has_repo_collateral_security_type(&self) -> bool {
956        self.message.body.has(tag::REPO_COLLATERAL_SECURITY_TYPE)
957    }
958
959
960
961
962    /// Sets `RepurchaseRate`, Tag 227.
963    pub fn set_repurchase_rate(&mut self, val: Decimal, scale: i32) {
964        self.message.body.set_field(tag::REPURCHASE_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
965    }
966
967    /// Gets `RepurchaseRate`, Tag 227.
968    pub fn get_repurchase_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
969        let mut fld = field::RepurchaseRateField::new(Decimal::ZERO, 0);
970        self.message.body.get_field(tag::REPURCHASE_RATE, &mut fld.0)?;
971        Ok(fld.value())
972    }
973
974
975    /// Returns true if `RepurchaseRate` is present, Tag 227.
976    pub fn has_repurchase_rate(&self) -> bool {
977        self.message.body.has(tag::REPURCHASE_RATE)
978    }
979
980
981
982
983    /// Sets `RepurchaseTerm`, Tag 226.
984    pub fn set_repurchase_term(&mut self, v: isize) {
985        self.message.body.set_field(tag::REPURCHASE_TERM, fixer::fix_int::FIXInt::from(v));
986    }
987
988    /// Gets `RepurchaseTerm`, Tag 226.
989    pub fn get_repurchase_term(&self) -> Result<isize, MessageRejectErrorEnum> {
990        let mut fld = field::RepurchaseTermField::new(0);
991        self.message.body.get_field(tag::REPURCHASE_TERM, &mut fld.0)?;
992        Ok(fld.value())
993    }
994
995
996    /// Returns true if `RepurchaseTerm` is present, Tag 226.
997    pub fn has_repurchase_term(&self) -> bool {
998        self.message.body.has(tag::REPURCHASE_TERM)
999    }
1000
1001
1002
1003
1004    /// Sets `ResponseDestination`, Tag 726.
1005    pub fn set_response_destination(&mut self, v: String) {
1006        self.message.body.set_field(tag::RESPONSE_DESTINATION, FIXString::from(v));
1007    }
1008
1009    /// Gets `ResponseDestination`, Tag 726.
1010    pub fn get_response_destination(&self) -> Result<String, MessageRejectErrorEnum> {
1011        let mut fld = field::ResponseDestinationField::new(String::new());
1012        self.message.body.get_field(tag::RESPONSE_DESTINATION, &mut fld.0)?;
1013        Ok(fld.value().to_string())
1014    }
1015
1016
1017    /// Returns true if `ResponseDestination` is present, Tag 726.
1018    pub fn has_response_destination(&self) -> bool {
1019        self.message.body.has(tag::RESPONSE_DESTINATION)
1020    }
1021
1022
1023
1024
1025    /// Sets `ResponseTransportType`, Tag 725.
1026    pub fn set_response_transport_type(&mut self, v: isize) {
1027        self.message.body.set_field(tag::RESPONSE_TRANSPORT_TYPE, fixer::fix_int::FIXInt::from(v));
1028    }
1029
1030    /// Gets `ResponseTransportType`, Tag 725.
1031    pub fn get_response_transport_type(&self) -> Result<isize, MessageRejectErrorEnum> {
1032        let mut fld = field::ResponseTransportTypeField::new(0);
1033        self.message.body.get_field(tag::RESPONSE_TRANSPORT_TYPE, &mut fld.0)?;
1034        Ok(fld.value())
1035    }
1036
1037
1038    /// Returns true if `ResponseTransportType` is present, Tag 725.
1039    pub fn has_response_transport_type(&self) -> bool {
1040        self.message.body.has(tag::RESPONSE_TRANSPORT_TYPE)
1041    }
1042
1043
1044
1045
1046    /// Sets `SecurityDesc`, Tag 107.
1047    pub fn set_security_desc(&mut self, v: String) {
1048        self.message.body.set_field(tag::SECURITY_DESC, FIXString::from(v));
1049    }
1050
1051    /// Gets `SecurityDesc`, Tag 107.
1052    pub fn get_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
1053        let mut fld = field::SecurityDescField::new(String::new());
1054        self.message.body.get_field(tag::SECURITY_DESC, &mut fld.0)?;
1055        Ok(fld.value().to_string())
1056    }
1057
1058
1059    /// Returns true if `SecurityDesc` is present, Tag 107.
1060    pub fn has_security_desc(&self) -> bool {
1061        self.message.body.has(tag::SECURITY_DESC)
1062    }
1063
1064
1065
1066
1067    /// Sets `SecurityExchange`, Tag 207.
1068    pub fn set_security_exchange(&mut self, v: String) {
1069        self.message.body.set_field(tag::SECURITY_EXCHANGE, FIXString::from(v));
1070    }
1071
1072    /// Gets `SecurityExchange`, Tag 207.
1073    pub fn get_security_exchange(&self) -> Result<String, MessageRejectErrorEnum> {
1074        let mut fld = field::SecurityExchangeField::new(String::new());
1075        self.message.body.get_field(tag::SECURITY_EXCHANGE, &mut fld.0)?;
1076        Ok(fld.value().to_string())
1077    }
1078
1079
1080    /// Returns true if `SecurityExchange` is present, Tag 207.
1081    pub fn has_security_exchange(&self) -> bool {
1082        self.message.body.has(tag::SECURITY_EXCHANGE)
1083    }
1084
1085
1086
1087
1088    /// Sets `SecurityID`, Tag 48.
1089    pub fn set_security_id(&mut self, v: String) {
1090        self.message.body.set_field(tag::SECURITY_ID, FIXString::from(v));
1091    }
1092
1093    /// Gets `SecurityID`, Tag 48.
1094    pub fn get_security_id(&self) -> Result<String, MessageRejectErrorEnum> {
1095        let mut fld = field::SecurityIDField::new(String::new());
1096        self.message.body.get_field(tag::SECURITY_ID, &mut fld.0)?;
1097        Ok(fld.value().to_string())
1098    }
1099
1100
1101    /// Returns true if `SecurityID` is present, Tag 48.
1102    pub fn has_security_id(&self) -> bool {
1103        self.message.body.has(tag::SECURITY_ID)
1104    }
1105
1106
1107
1108
1109    /// Sets `SecurityIDSource`, Tag 22.
1110    pub fn set_security_id_source(&mut self, v: String) {
1111        self.message.body.set_field(tag::SECURITY_ID_SOURCE, FIXString::from(v));
1112    }
1113
1114    /// Gets `SecurityIDSource`, Tag 22.
1115    pub fn get_security_id_source(&self) -> Result<String, MessageRejectErrorEnum> {
1116        let mut fld = field::SecurityIDSourceField::new(String::new());
1117        self.message.body.get_field(tag::SECURITY_ID_SOURCE, &mut fld.0)?;
1118        Ok(fld.value().to_string())
1119    }
1120
1121
1122    /// Returns true if `SecurityIDSource` is present, Tag 22.
1123    pub fn has_security_id_source(&self) -> bool {
1124        self.message.body.has(tag::SECURITY_ID_SOURCE)
1125    }
1126
1127
1128
1129
1130    /// Sets `SecuritySubType`, Tag 762.
1131    pub fn set_security_sub_type(&mut self, v: String) {
1132        self.message.body.set_field(tag::SECURITY_SUB_TYPE, FIXString::from(v));
1133    }
1134
1135    /// Gets `SecuritySubType`, Tag 762.
1136    pub fn get_security_sub_type(&self) -> Result<String, MessageRejectErrorEnum> {
1137        let mut fld = field::SecuritySubTypeField::new(String::new());
1138        self.message.body.get_field(tag::SECURITY_SUB_TYPE, &mut fld.0)?;
1139        Ok(fld.value().to_string())
1140    }
1141
1142
1143    /// Returns true if `SecuritySubType` is present, Tag 762.
1144    pub fn has_security_sub_type(&self) -> bool {
1145        self.message.body.has(tag::SECURITY_SUB_TYPE)
1146    }
1147
1148
1149
1150
1151    /// Sets `SecurityType`, Tag 167.
1152    pub fn set_security_type(&mut self, v: String) {
1153        self.message.body.set_field(tag::SECURITY_TYPE, FIXString::from(v));
1154    }
1155
1156    /// Gets `SecurityType`, Tag 167.
1157    pub fn get_security_type(&self) -> Result<String, MessageRejectErrorEnum> {
1158        let mut fld = field::SecurityTypeField::new(String::new());
1159        self.message.body.get_field(tag::SECURITY_TYPE, &mut fld.0)?;
1160        Ok(fld.value().to_string())
1161    }
1162
1163
1164    /// Returns true if `SecurityType` is present, Tag 167.
1165    pub fn has_security_type(&self) -> bool {
1166        self.message.body.has(tag::SECURITY_TYPE)
1167    }
1168
1169
1170
1171
1172    /// Sets `SettlSessID`, Tag 716.
1173    pub fn set_settl_sess_id(&mut self, v: String) {
1174        self.message.body.set_field(tag::SETTL_SESS_ID, FIXString::from(v));
1175    }
1176
1177    /// Gets `SettlSessID`, Tag 716.
1178    pub fn get_settl_sess_id(&self) -> Result<String, MessageRejectErrorEnum> {
1179        let mut fld = field::SettlSessIDField::new(String::new());
1180        self.message.body.get_field(tag::SETTL_SESS_ID, &mut fld.0)?;
1181        Ok(fld.value().to_string())
1182    }
1183
1184
1185    /// Returns true if `SettlSessID` is present, Tag 716.
1186    pub fn has_settl_sess_id(&self) -> bool {
1187        self.message.body.has(tag::SETTL_SESS_ID)
1188    }
1189
1190
1191
1192
1193    /// Sets `SettlSessSubID`, Tag 717.
1194    pub fn set_settl_sess_sub_id(&mut self, v: String) {
1195        self.message.body.set_field(tag::SETTL_SESS_SUB_ID, FIXString::from(v));
1196    }
1197
1198    /// Gets `SettlSessSubID`, Tag 717.
1199    pub fn get_settl_sess_sub_id(&self) -> Result<String, MessageRejectErrorEnum> {
1200        let mut fld = field::SettlSessSubIDField::new(String::new());
1201        self.message.body.get_field(tag::SETTL_SESS_SUB_ID, &mut fld.0)?;
1202        Ok(fld.value().to_string())
1203    }
1204
1205
1206    /// Returns true if `SettlSessSubID` is present, Tag 717.
1207    pub fn has_settl_sess_sub_id(&self) -> bool {
1208        self.message.body.has(tag::SETTL_SESS_SUB_ID)
1209    }
1210
1211
1212
1213
1214    /// Sets `StateOrProvinceOfIssue`, Tag 471.
1215    pub fn set_state_or_province_of_issue(&mut self, v: String) {
1216        self.message.body.set_field(tag::STATE_OR_PROVINCE_OF_ISSUE, FIXString::from(v));
1217    }
1218
1219    /// Gets `StateOrProvinceOfIssue`, Tag 471.
1220    pub fn get_state_or_province_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
1221        let mut fld = field::StateOrProvinceOfIssueField::new(String::new());
1222        self.message.body.get_field(tag::STATE_OR_PROVINCE_OF_ISSUE, &mut fld.0)?;
1223        Ok(fld.value().to_string())
1224    }
1225
1226
1227    /// Returns true if `StateOrProvinceOfIssue` is present, Tag 471.
1228    pub fn has_state_or_province_of_issue(&self) -> bool {
1229        self.message.body.has(tag::STATE_OR_PROVINCE_OF_ISSUE)
1230    }
1231
1232
1233
1234
1235    /// Sets `StrikeCurrency`, Tag 947.
1236    pub fn set_strike_currency(&mut self, v: String) {
1237        self.message.body.set_field(tag::STRIKE_CURRENCY, FIXString::from(v));
1238    }
1239
1240    /// Gets `StrikeCurrency`, Tag 947.
1241    pub fn get_strike_currency(&self) -> Result<String, MessageRejectErrorEnum> {
1242        let mut fld = field::StrikeCurrencyField::new(String::new());
1243        self.message.body.get_field(tag::STRIKE_CURRENCY, &mut fld.0)?;
1244        Ok(fld.value().to_string())
1245    }
1246
1247
1248    /// Returns true if `StrikeCurrency` is present, Tag 947.
1249    pub fn has_strike_currency(&self) -> bool {
1250        self.message.body.has(tag::STRIKE_CURRENCY)
1251    }
1252
1253
1254
1255
1256    /// Sets `StrikePrice`, Tag 202.
1257    pub fn set_strike_price(&mut self, val: Decimal, scale: i32) {
1258        self.message.body.set_field(tag::STRIKE_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1259    }
1260
1261    /// Gets `StrikePrice`, Tag 202.
1262    pub fn get_strike_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1263        let mut fld = field::StrikePriceField::new(Decimal::ZERO, 0);
1264        self.message.body.get_field(tag::STRIKE_PRICE, &mut fld.0)?;
1265        Ok(fld.value())
1266    }
1267
1268
1269    /// Returns true if `StrikePrice` is present, Tag 202.
1270    pub fn has_strike_price(&self) -> bool {
1271        self.message.body.has(tag::STRIKE_PRICE)
1272    }
1273
1274
1275
1276
1277    /// Sets `SubscriptionRequestType`, Tag 263.
1278    pub fn set_subscription_request_type(&mut self, v: String) {
1279        self.message.body.set_field(tag::SUBSCRIPTION_REQUEST_TYPE, FIXString::from(v));
1280    }
1281
1282    /// Gets `SubscriptionRequestType`, Tag 263.
1283    pub fn get_subscription_request_type(&self) -> Result<String, MessageRejectErrorEnum> {
1284        let mut fld = field::SubscriptionRequestTypeField::new(String::new());
1285        self.message.body.get_field(tag::SUBSCRIPTION_REQUEST_TYPE, &mut fld.0)?;
1286        Ok(fld.value().to_string())
1287    }
1288
1289
1290    /// Returns true if `SubscriptionRequestType` is present, Tag 263.
1291    pub fn has_subscription_request_type(&self) -> bool {
1292        self.message.body.has(tag::SUBSCRIPTION_REQUEST_TYPE)
1293    }
1294
1295
1296
1297
1298    /// Sets `Symbol`, Tag 55.
1299    pub fn set_symbol(&mut self, v: String) {
1300        self.message.body.set_field(tag::SYMBOL, FIXString::from(v));
1301    }
1302
1303    /// Gets `Symbol`, Tag 55.
1304    pub fn get_symbol(&self) -> Result<String, MessageRejectErrorEnum> {
1305        let mut fld = field::SymbolField::new(String::new());
1306        self.message.body.get_field(tag::SYMBOL, &mut fld.0)?;
1307        Ok(fld.value().to_string())
1308    }
1309
1310
1311    /// Returns true if `Symbol` is present, Tag 55.
1312    pub fn has_symbol(&self) -> bool {
1313        self.message.body.has(tag::SYMBOL)
1314    }
1315
1316
1317
1318
1319    /// Sets `SymbolSfx`, Tag 65.
1320    pub fn set_symbol_sfx(&mut self, v: String) {
1321        self.message.body.set_field(tag::SYMBOL_SFX, FIXString::from(v));
1322    }
1323
1324    /// Gets `SymbolSfx`, Tag 65.
1325    pub fn get_symbol_sfx(&self) -> Result<String, MessageRejectErrorEnum> {
1326        let mut fld = field::SymbolSfxField::new(String::new());
1327        self.message.body.get_field(tag::SYMBOL_SFX, &mut fld.0)?;
1328        Ok(fld.value().to_string())
1329    }
1330
1331
1332    /// Returns true if `SymbolSfx` is present, Tag 65.
1333    pub fn has_symbol_sfx(&self) -> bool {
1334        self.message.body.has(tag::SYMBOL_SFX)
1335    }
1336
1337
1338
1339
1340    /// Sets `Text`, Tag 58.
1341    pub fn set_text(&mut self, v: String) {
1342        self.message.body.set_field(tag::TEXT, FIXString::from(v));
1343    }
1344
1345    /// Gets `Text`, Tag 58.
1346    pub fn get_text(&self) -> Result<String, MessageRejectErrorEnum> {
1347        let mut fld = field::TextField::new(String::new());
1348        self.message.body.get_field(tag::TEXT, &mut fld.0)?;
1349        Ok(fld.value().to_string())
1350    }
1351
1352
1353    /// Returns true if `Text` is present, Tag 58.
1354    pub fn has_text(&self) -> bool {
1355        self.message.body.has(tag::TEXT)
1356    }
1357
1358
1359
1360
1361    /// Sets `TransactTime`, Tag 60.
1362    pub fn set_transact_time(&mut self, v: Timestamp) {
1363        self.message.body.set_field(tag::TRANSACT_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
1364            time: v,
1365            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
1366        });
1367    }
1368
1369    /// Gets `TransactTime`, Tag 60.
1370    pub fn get_transact_time(&self) -> Result<Timestamp, MessageRejectErrorEnum> {
1371        let mut fld = field::TransactTimeField::new(Timestamp::UNIX_EPOCH);
1372        self.message.body.get_field(tag::TRANSACT_TIME, &mut fld.0)?;
1373        Ok(fld.value())
1374    }
1375
1376
1377    /// Returns true if `TransactTime` is present, Tag 60.
1378    pub fn has_transact_time(&self) -> bool {
1379        self.message.body.has(tag::TRANSACT_TIME)
1380    }
1381
1382
1383}
1384
1385/// `RouteOut` is the callback type for routing `RequestForPositions` messages.
1386pub type RouteOut = fn(msg: RequestForPositions, session_id: SessionID) -> Result<(), MessageRejectErrorEnum>;
1387
1388/// Route type returned by the `route` function.
1389pub type Route = (&'static str, &'static str, Box<dyn Fn(&Message, SessionID) -> Result<(), MessageRejectErrorEnum> + Send>);
1390
1391/// Returns the begin string, message type, and route function for `RequestForPositions`.
1392pub fn route(router: RouteOut) -> Route {
1393    let r = move |msg: &Message, session_id: SessionID| -> Result<(), MessageRejectErrorEnum> {
1394        router(RequestForPositions::from_message(msg.clone()), session_id)
1395    };
1396    ("FIX.4.4", "AN", Box::new(r))
1397}