Skip to main content

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