Skip to main content

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