Skip to main content

fixer_fix/fix50/
collateral_response.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/// `CollateralResponse` is the `fix50` `CollateralResponse` type, `MsgType` = AZ.
21pub struct CollateralResponse {
22    pub message: Message,
23}
24
25impl CollateralResponse {
26    /// Creates a new `CollateralResponse` with required fields.
27    pub fn new(coll_resp_id: field::CollRespIDField, coll_asgn_resp_type: field::CollAsgnRespTypeField, transact_time: field::TransactTimeField) -> Self {
28        let mut msg = Message::new();
29        msg.header.set_field(tag::MSG_TYPE, FIXString::from("AZ".to_string()));
30
31        msg.body.set_field(tag::COLL_RESP_ID, coll_resp_id.0);
32
33        msg.body.set_field(tag::COLL_ASGN_RESP_TYPE, coll_asgn_resp_type.0);
34
35        msg.body.set_field(tag::TRANSACT_TIME, transact_time.0);
36
37        Self { message: msg }
38    }
39
40    /// Creates a `CollateralResponse` from an existing `Message`.
41    pub fn from_message(msg: Message) -> Self {
42        Self { message: msg }
43    }
44
45    /// Returns the underlying `Message`.
46    pub fn to_message(self) -> Message {
47        self.message
48    }
49
50
51
52
53    /// Sets `Account`, Tag 1.
54    pub fn set_account(&mut self, v: String) {
55        self.message.body.set_field(tag::ACCOUNT, FIXString::from(v));
56    }
57
58    /// Gets `Account`, Tag 1.
59    pub fn get_account(&self) -> Result<String, MessageRejectErrorEnum> {
60        let mut fld = field::AccountField::new(String::new());
61        self.message.body.get_field(tag::ACCOUNT, &mut fld.0)?;
62        Ok(fld.value().to_string())
63    }
64
65
66    /// Returns true if `Account` is present, Tag 1.
67    pub fn has_account(&self) -> bool {
68        self.message.body.has(tag::ACCOUNT)
69    }
70
71
72
73
74    /// Sets `AccountType`, Tag 581.
75    pub fn set_account_type(&mut self, v: isize) {
76        self.message.body.set_field(tag::ACCOUNT_TYPE, fixer::fix_int::FIXInt::from(v));
77    }
78
79    /// Gets `AccountType`, Tag 581.
80    pub fn get_account_type(&self) -> Result<isize, MessageRejectErrorEnum> {
81        let mut fld = field::AccountTypeField::new(0);
82        self.message.body.get_field(tag::ACCOUNT_TYPE, &mut fld.0)?;
83        Ok(fld.value())
84    }
85
86
87    /// Returns true if `AccountType` is present, Tag 581.
88    pub fn has_account_type(&self) -> bool {
89        self.message.body.has(tag::ACCOUNT_TYPE)
90    }
91
92
93
94
95    /// Sets `AccruedInterestAmt`, Tag 159.
96    pub fn set_accrued_interest_amt(&mut self, val: Decimal, scale: i32) {
97        self.message.body.set_field(tag::ACCRUED_INTEREST_AMT, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
98    }
99
100    /// Gets `AccruedInterestAmt`, Tag 159.
101    pub fn get_accrued_interest_amt(&self) -> Result<Decimal, MessageRejectErrorEnum> {
102        let mut fld = field::AccruedInterestAmtField::new(Decimal::ZERO, 0);
103        self.message.body.get_field(tag::ACCRUED_INTEREST_AMT, &mut fld.0)?;
104        Ok(fld.value())
105    }
106
107
108    /// Returns true if `AccruedInterestAmt` is present, Tag 159.
109    pub fn has_accrued_interest_amt(&self) -> bool {
110        self.message.body.has(tag::ACCRUED_INTEREST_AMT)
111    }
112
113
114
115
116    /// Sets `AgreementCurrency`, Tag 918.
117    pub fn set_agreement_currency(&mut self, v: String) {
118        self.message.body.set_field(tag::AGREEMENT_CURRENCY, FIXString::from(v));
119    }
120
121    /// Gets `AgreementCurrency`, Tag 918.
122    pub fn get_agreement_currency(&self) -> Result<String, MessageRejectErrorEnum> {
123        let mut fld = field::AgreementCurrencyField::new(String::new());
124        self.message.body.get_field(tag::AGREEMENT_CURRENCY, &mut fld.0)?;
125        Ok(fld.value().to_string())
126    }
127
128
129    /// Returns true if `AgreementCurrency` is present, Tag 918.
130    pub fn has_agreement_currency(&self) -> bool {
131        self.message.body.has(tag::AGREEMENT_CURRENCY)
132    }
133
134
135
136
137    /// Sets `AgreementDate`, Tag 915.
138    pub fn set_agreement_date(&mut self, v: String) {
139        self.message.body.set_field(tag::AGREEMENT_DATE, FIXString::from(v));
140    }
141
142    /// Gets `AgreementDate`, Tag 915.
143    pub fn get_agreement_date(&self) -> Result<String, MessageRejectErrorEnum> {
144        let mut fld = field::AgreementDateField::new(String::new());
145        self.message.body.get_field(tag::AGREEMENT_DATE, &mut fld.0)?;
146        Ok(fld.value().to_string())
147    }
148
149
150    /// Returns true if `AgreementDate` is present, Tag 915.
151    pub fn has_agreement_date(&self) -> bool {
152        self.message.body.has(tag::AGREEMENT_DATE)
153    }
154
155
156
157
158    /// Sets `AgreementDesc`, Tag 913.
159    pub fn set_agreement_desc(&mut self, v: String) {
160        self.message.body.set_field(tag::AGREEMENT_DESC, FIXString::from(v));
161    }
162
163    /// Gets `AgreementDesc`, Tag 913.
164    pub fn get_agreement_desc(&self) -> Result<String, MessageRejectErrorEnum> {
165        let mut fld = field::AgreementDescField::new(String::new());
166        self.message.body.get_field(tag::AGREEMENT_DESC, &mut fld.0)?;
167        Ok(fld.value().to_string())
168    }
169
170
171    /// Returns true if `AgreementDesc` is present, Tag 913.
172    pub fn has_agreement_desc(&self) -> bool {
173        self.message.body.has(tag::AGREEMENT_DESC)
174    }
175
176
177
178
179    /// Sets `AgreementID`, Tag 914.
180    pub fn set_agreement_id(&mut self, v: String) {
181        self.message.body.set_field(tag::AGREEMENT_ID, FIXString::from(v));
182    }
183
184    /// Gets `AgreementID`, Tag 914.
185    pub fn get_agreement_id(&self) -> Result<String, MessageRejectErrorEnum> {
186        let mut fld = field::AgreementIDField::new(String::new());
187        self.message.body.get_field(tag::AGREEMENT_ID, &mut fld.0)?;
188        Ok(fld.value().to_string())
189    }
190
191
192    /// Returns true if `AgreementID` is present, Tag 914.
193    pub fn has_agreement_id(&self) -> bool {
194        self.message.body.has(tag::AGREEMENT_ID)
195    }
196
197
198
199
200    /// Sets `BenchmarkCurveCurrency`, Tag 220.
201    pub fn set_benchmark_curve_currency(&mut self, v: String) {
202        self.message.body.set_field(tag::BENCHMARK_CURVE_CURRENCY, FIXString::from(v));
203    }
204
205    /// Gets `BenchmarkCurveCurrency`, Tag 220.
206    pub fn get_benchmark_curve_currency(&self) -> Result<String, MessageRejectErrorEnum> {
207        let mut fld = field::BenchmarkCurveCurrencyField::new(String::new());
208        self.message.body.get_field(tag::BENCHMARK_CURVE_CURRENCY, &mut fld.0)?;
209        Ok(fld.value().to_string())
210    }
211
212
213    /// Returns true if `BenchmarkCurveCurrency` is present, Tag 220.
214    pub fn has_benchmark_curve_currency(&self) -> bool {
215        self.message.body.has(tag::BENCHMARK_CURVE_CURRENCY)
216    }
217
218
219
220
221    /// Sets `BenchmarkCurveName`, Tag 221.
222    pub fn set_benchmark_curve_name(&mut self, v: String) {
223        self.message.body.set_field(tag::BENCHMARK_CURVE_NAME, FIXString::from(v));
224    }
225
226    /// Gets `BenchmarkCurveName`, Tag 221.
227    pub fn get_benchmark_curve_name(&self) -> Result<String, MessageRejectErrorEnum> {
228        let mut fld = field::BenchmarkCurveNameField::new(String::new());
229        self.message.body.get_field(tag::BENCHMARK_CURVE_NAME, &mut fld.0)?;
230        Ok(fld.value().to_string())
231    }
232
233
234    /// Returns true if `BenchmarkCurveName` is present, Tag 221.
235    pub fn has_benchmark_curve_name(&self) -> bool {
236        self.message.body.has(tag::BENCHMARK_CURVE_NAME)
237    }
238
239
240
241
242    /// Sets `BenchmarkCurvePoint`, Tag 222.
243    pub fn set_benchmark_curve_point(&mut self, v: String) {
244        self.message.body.set_field(tag::BENCHMARK_CURVE_POINT, FIXString::from(v));
245    }
246
247    /// Gets `BenchmarkCurvePoint`, Tag 222.
248    pub fn get_benchmark_curve_point(&self) -> Result<String, MessageRejectErrorEnum> {
249        let mut fld = field::BenchmarkCurvePointField::new(String::new());
250        self.message.body.get_field(tag::BENCHMARK_CURVE_POINT, &mut fld.0)?;
251        Ok(fld.value().to_string())
252    }
253
254
255    /// Returns true if `BenchmarkCurvePoint` is present, Tag 222.
256    pub fn has_benchmark_curve_point(&self) -> bool {
257        self.message.body.has(tag::BENCHMARK_CURVE_POINT)
258    }
259
260
261
262
263    /// Sets `BenchmarkPrice`, Tag 662.
264    pub fn set_benchmark_price(&mut self, val: Decimal, scale: i32) {
265        self.message.body.set_field(tag::BENCHMARK_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
266    }
267
268    /// Gets `BenchmarkPrice`, Tag 662.
269    pub fn get_benchmark_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
270        let mut fld = field::BenchmarkPriceField::new(Decimal::ZERO, 0);
271        self.message.body.get_field(tag::BENCHMARK_PRICE, &mut fld.0)?;
272        Ok(fld.value())
273    }
274
275
276    /// Returns true if `BenchmarkPrice` is present, Tag 662.
277    pub fn has_benchmark_price(&self) -> bool {
278        self.message.body.has(tag::BENCHMARK_PRICE)
279    }
280
281
282
283
284    /// Sets `BenchmarkPriceType`, Tag 663.
285    pub fn set_benchmark_price_type(&mut self, v: isize) {
286        self.message.body.set_field(tag::BENCHMARK_PRICE_TYPE, fixer::fix_int::FIXInt::from(v));
287    }
288
289    /// Gets `BenchmarkPriceType`, Tag 663.
290    pub fn get_benchmark_price_type(&self) -> Result<isize, MessageRejectErrorEnum> {
291        let mut fld = field::BenchmarkPriceTypeField::new(0);
292        self.message.body.get_field(tag::BENCHMARK_PRICE_TYPE, &mut fld.0)?;
293        Ok(fld.value())
294    }
295
296
297    /// Returns true if `BenchmarkPriceType` is present, Tag 663.
298    pub fn has_benchmark_price_type(&self) -> bool {
299        self.message.body.has(tag::BENCHMARK_PRICE_TYPE)
300    }
301
302
303
304
305    /// Sets `BenchmarkSecurityID`, Tag 699.
306    pub fn set_benchmark_security_id(&mut self, v: String) {
307        self.message.body.set_field(tag::BENCHMARK_SECURITY_ID, FIXString::from(v));
308    }
309
310    /// Gets `BenchmarkSecurityID`, Tag 699.
311    pub fn get_benchmark_security_id(&self) -> Result<String, MessageRejectErrorEnum> {
312        let mut fld = field::BenchmarkSecurityIDField::new(String::new());
313        self.message.body.get_field(tag::BENCHMARK_SECURITY_ID, &mut fld.0)?;
314        Ok(fld.value().to_string())
315    }
316
317
318    /// Returns true if `BenchmarkSecurityID` is present, Tag 699.
319    pub fn has_benchmark_security_id(&self) -> bool {
320        self.message.body.has(tag::BENCHMARK_SECURITY_ID)
321    }
322
323
324
325
326    /// Sets `BenchmarkSecurityIDSource`, Tag 761.
327    pub fn set_benchmark_security_id_source(&mut self, v: String) {
328        self.message.body.set_field(tag::BENCHMARK_SECURITY_ID_SOURCE, FIXString::from(v));
329    }
330
331    /// Gets `BenchmarkSecurityIDSource`, Tag 761.
332    pub fn get_benchmark_security_id_source(&self) -> Result<String, MessageRejectErrorEnum> {
333        let mut fld = field::BenchmarkSecurityIDSourceField::new(String::new());
334        self.message.body.get_field(tag::BENCHMARK_SECURITY_ID_SOURCE, &mut fld.0)?;
335        Ok(fld.value().to_string())
336    }
337
338
339    /// Returns true if `BenchmarkSecurityIDSource` is present, Tag 761.
340    pub fn has_benchmark_security_id_source(&self) -> bool {
341        self.message.body.has(tag::BENCHMARK_SECURITY_ID_SOURCE)
342    }
343
344
345
346
347    /// Sets `CFICode`, Tag 461.
348    pub fn set_cfi_code(&mut self, v: String) {
349        self.message.body.set_field(tag::CFI_CODE, FIXString::from(v));
350    }
351
352    /// Gets `CFICode`, Tag 461.
353    pub fn get_cfi_code(&self) -> Result<String, MessageRejectErrorEnum> {
354        let mut fld = field::CFICodeField::new(String::new());
355        self.message.body.get_field(tag::CFI_CODE, &mut fld.0)?;
356        Ok(fld.value().to_string())
357    }
358
359
360    /// Returns true if `CFICode` is present, Tag 461.
361    pub fn has_cfi_code(&self) -> bool {
362        self.message.body.has(tag::CFI_CODE)
363    }
364
365
366
367
368    /// Sets `CPProgram`, Tag 875.
369    pub fn set_cp_program(&mut self, v: isize) {
370        self.message.body.set_field(tag::CP_PROGRAM, fixer::fix_int::FIXInt::from(v));
371    }
372
373    /// Gets `CPProgram`, Tag 875.
374    pub fn get_cp_program(&self) -> Result<isize, MessageRejectErrorEnum> {
375        let mut fld = field::CPProgramField::new(0);
376        self.message.body.get_field(tag::CP_PROGRAM, &mut fld.0)?;
377        Ok(fld.value())
378    }
379
380
381    /// Returns true if `CPProgram` is present, Tag 875.
382    pub fn has_cp_program(&self) -> bool {
383        self.message.body.has(tag::CP_PROGRAM)
384    }
385
386
387
388
389    /// Sets `CPRegType`, Tag 876.
390    pub fn set_cp_reg_type(&mut self, v: String) {
391        self.message.body.set_field(tag::CP_REG_TYPE, FIXString::from(v));
392    }
393
394    /// Gets `CPRegType`, Tag 876.
395    pub fn get_cp_reg_type(&self) -> Result<String, MessageRejectErrorEnum> {
396        let mut fld = field::CPRegTypeField::new(String::new());
397        self.message.body.get_field(tag::CP_REG_TYPE, &mut fld.0)?;
398        Ok(fld.value().to_string())
399    }
400
401
402    /// Returns true if `CPRegType` is present, Tag 876.
403    pub fn has_cp_reg_type(&self) -> bool {
404        self.message.body.has(tag::CP_REG_TYPE)
405    }
406
407
408
409
410    /// Sets `CashOutstanding`, Tag 901.
411    pub fn set_cash_outstanding(&mut self, val: Decimal, scale: i32) {
412        self.message.body.set_field(tag::CASH_OUTSTANDING, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
413    }
414
415    /// Gets `CashOutstanding`, Tag 901.
416    pub fn get_cash_outstanding(&self) -> Result<Decimal, MessageRejectErrorEnum> {
417        let mut fld = field::CashOutstandingField::new(Decimal::ZERO, 0);
418        self.message.body.get_field(tag::CASH_OUTSTANDING, &mut fld.0)?;
419        Ok(fld.value())
420    }
421
422
423    /// Returns true if `CashOutstanding` is present, Tag 901.
424    pub fn has_cash_outstanding(&self) -> bool {
425        self.message.body.has(tag::CASH_OUTSTANDING)
426    }
427
428
429
430
431    /// Sets `ClOrdID`, Tag 11.
432    pub fn set_cl_ord_id(&mut self, v: String) {
433        self.message.body.set_field(tag::CL_ORD_ID, FIXString::from(v));
434    }
435
436    /// Gets `ClOrdID`, Tag 11.
437    pub fn get_cl_ord_id(&self) -> Result<String, MessageRejectErrorEnum> {
438        let mut fld = field::ClOrdIDField::new(String::new());
439        self.message.body.get_field(tag::CL_ORD_ID, &mut fld.0)?;
440        Ok(fld.value().to_string())
441    }
442
443
444    /// Returns true if `ClOrdID` is present, Tag 11.
445    pub fn has_cl_ord_id(&self) -> bool {
446        self.message.body.has(tag::CL_ORD_ID)
447    }
448
449
450
451
452    /// Sets `ClearingBusinessDate`, Tag 715.
453    pub fn set_clearing_business_date(&mut self, v: String) {
454        self.message.body.set_field(tag::CLEARING_BUSINESS_DATE, FIXString::from(v));
455    }
456
457    /// Gets `ClearingBusinessDate`, Tag 715.
458    pub fn get_clearing_business_date(&self) -> Result<String, MessageRejectErrorEnum> {
459        let mut fld = field::ClearingBusinessDateField::new(String::new());
460        self.message.body.get_field(tag::CLEARING_BUSINESS_DATE, &mut fld.0)?;
461        Ok(fld.value().to_string())
462    }
463
464
465    /// Returns true if `ClearingBusinessDate` is present, Tag 715.
466    pub fn has_clearing_business_date(&self) -> bool {
467        self.message.body.has(tag::CLEARING_BUSINESS_DATE)
468    }
469
470
471
472
473    /// Sets `CollApplType`, Tag 1043.
474    pub fn set_coll_appl_type(&mut self, v: isize) {
475        self.message.body.set_field(tag::COLL_APPL_TYPE, fixer::fix_int::FIXInt::from(v));
476    }
477
478    /// Gets `CollApplType`, Tag 1043.
479    pub fn get_coll_appl_type(&self) -> Result<isize, MessageRejectErrorEnum> {
480        let mut fld = field::CollApplTypeField::new(0);
481        self.message.body.get_field(tag::COLL_APPL_TYPE, &mut fld.0)?;
482        Ok(fld.value())
483    }
484
485
486    /// Returns true if `CollApplType` is present, Tag 1043.
487    pub fn has_coll_appl_type(&self) -> bool {
488        self.message.body.has(tag::COLL_APPL_TYPE)
489    }
490
491
492
493
494    /// Sets `CollAsgnID`, Tag 902.
495    pub fn set_coll_asgn_id(&mut self, v: String) {
496        self.message.body.set_field(tag::COLL_ASGN_ID, FIXString::from(v));
497    }
498
499    /// Gets `CollAsgnID`, Tag 902.
500    pub fn get_coll_asgn_id(&self) -> Result<String, MessageRejectErrorEnum> {
501        let mut fld = field::CollAsgnIDField::new(String::new());
502        self.message.body.get_field(tag::COLL_ASGN_ID, &mut fld.0)?;
503        Ok(fld.value().to_string())
504    }
505
506
507    /// Returns true if `CollAsgnID` is present, Tag 902.
508    pub fn has_coll_asgn_id(&self) -> bool {
509        self.message.body.has(tag::COLL_ASGN_ID)
510    }
511
512
513
514
515    /// Sets `CollAsgnReason`, Tag 895.
516    pub fn set_coll_asgn_reason(&mut self, v: isize) {
517        self.message.body.set_field(tag::COLL_ASGN_REASON, fixer::fix_int::FIXInt::from(v));
518    }
519
520    /// Gets `CollAsgnReason`, Tag 895.
521    pub fn get_coll_asgn_reason(&self) -> Result<isize, MessageRejectErrorEnum> {
522        let mut fld = field::CollAsgnReasonField::new(0);
523        self.message.body.get_field(tag::COLL_ASGN_REASON, &mut fld.0)?;
524        Ok(fld.value())
525    }
526
527
528    /// Returns true if `CollAsgnReason` is present, Tag 895.
529    pub fn has_coll_asgn_reason(&self) -> bool {
530        self.message.body.has(tag::COLL_ASGN_REASON)
531    }
532
533
534
535
536    /// Sets `CollAsgnRejectReason`, Tag 906.
537    pub fn set_coll_asgn_reject_reason(&mut self, v: isize) {
538        self.message.body.set_field(tag::COLL_ASGN_REJECT_REASON, fixer::fix_int::FIXInt::from(v));
539    }
540
541    /// Gets `CollAsgnRejectReason`, Tag 906.
542    pub fn get_coll_asgn_reject_reason(&self) -> Result<isize, MessageRejectErrorEnum> {
543        let mut fld = field::CollAsgnRejectReasonField::new(0);
544        self.message.body.get_field(tag::COLL_ASGN_REJECT_REASON, &mut fld.0)?;
545        Ok(fld.value())
546    }
547
548
549    /// Returns true if `CollAsgnRejectReason` is present, Tag 906.
550    pub fn has_coll_asgn_reject_reason(&self) -> bool {
551        self.message.body.has(tag::COLL_ASGN_REJECT_REASON)
552    }
553
554
555
556
557    /// Sets `CollAsgnRespType`, Tag 905.
558    pub fn set_coll_asgn_resp_type(&mut self, v: isize) {
559        self.message.body.set_field(tag::COLL_ASGN_RESP_TYPE, fixer::fix_int::FIXInt::from(v));
560    }
561
562    /// Gets `CollAsgnRespType`, Tag 905.
563    pub fn get_coll_asgn_resp_type(&self) -> Result<isize, MessageRejectErrorEnum> {
564        let mut fld = field::CollAsgnRespTypeField::new(0);
565        self.message.body.get_field(tag::COLL_ASGN_RESP_TYPE, &mut fld.0)?;
566        Ok(fld.value())
567    }
568
569
570    /// Returns true if `CollAsgnRespType` is present, Tag 905.
571    pub fn has_coll_asgn_resp_type(&self) -> bool {
572        self.message.body.has(tag::COLL_ASGN_RESP_TYPE)
573    }
574
575
576
577
578    /// Sets `CollAsgnTransType`, Tag 903.
579    pub fn set_coll_asgn_trans_type(&mut self, v: isize) {
580        self.message.body.set_field(tag::COLL_ASGN_TRANS_TYPE, fixer::fix_int::FIXInt::from(v));
581    }
582
583    /// Gets `CollAsgnTransType`, Tag 903.
584    pub fn get_coll_asgn_trans_type(&self) -> Result<isize, MessageRejectErrorEnum> {
585        let mut fld = field::CollAsgnTransTypeField::new(0);
586        self.message.body.get_field(tag::COLL_ASGN_TRANS_TYPE, &mut fld.0)?;
587        Ok(fld.value())
588    }
589
590
591    /// Returns true if `CollAsgnTransType` is present, Tag 903.
592    pub fn has_coll_asgn_trans_type(&self) -> bool {
593        self.message.body.has(tag::COLL_ASGN_TRANS_TYPE)
594    }
595
596
597
598
599    /// Sets `CollReqID`, Tag 894.
600    pub fn set_coll_req_id(&mut self, v: String) {
601        self.message.body.set_field(tag::COLL_REQ_ID, FIXString::from(v));
602    }
603
604    /// Gets `CollReqID`, Tag 894.
605    pub fn get_coll_req_id(&self) -> Result<String, MessageRejectErrorEnum> {
606        let mut fld = field::CollReqIDField::new(String::new());
607        self.message.body.get_field(tag::COLL_REQ_ID, &mut fld.0)?;
608        Ok(fld.value().to_string())
609    }
610
611
612    /// Returns true if `CollReqID` is present, Tag 894.
613    pub fn has_coll_req_id(&self) -> bool {
614        self.message.body.has(tag::COLL_REQ_ID)
615    }
616
617
618
619
620    /// Sets `CollRespID`, Tag 904.
621    pub fn set_coll_resp_id(&mut self, v: String) {
622        self.message.body.set_field(tag::COLL_RESP_ID, FIXString::from(v));
623    }
624
625    /// Gets `CollRespID`, Tag 904.
626    pub fn get_coll_resp_id(&self) -> Result<String, MessageRejectErrorEnum> {
627        let mut fld = field::CollRespIDField::new(String::new());
628        self.message.body.get_field(tag::COLL_RESP_ID, &mut fld.0)?;
629        Ok(fld.value().to_string())
630    }
631
632
633    /// Returns true if `CollRespID` is present, Tag 904.
634    pub fn has_coll_resp_id(&self) -> bool {
635        self.message.body.has(tag::COLL_RESP_ID)
636    }
637
638
639
640
641    /// Sets `ContractMultiplier`, Tag 231.
642    pub fn set_contract_multiplier(&mut self, val: Decimal, scale: i32) {
643        self.message.body.set_field(tag::CONTRACT_MULTIPLIER, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
644    }
645
646    /// Gets `ContractMultiplier`, Tag 231.
647    pub fn get_contract_multiplier(&self) -> Result<Decimal, MessageRejectErrorEnum> {
648        let mut fld = field::ContractMultiplierField::new(Decimal::ZERO, 0);
649        self.message.body.get_field(tag::CONTRACT_MULTIPLIER, &mut fld.0)?;
650        Ok(fld.value())
651    }
652
653
654    /// Returns true if `ContractMultiplier` is present, Tag 231.
655    pub fn has_contract_multiplier(&self) -> bool {
656        self.message.body.has(tag::CONTRACT_MULTIPLIER)
657    }
658
659
660
661
662    /// Sets `ContractSettlMonth`, Tag 667.
663    pub fn set_contract_settl_month(&mut self, v: String) {
664        self.message.body.set_field(tag::CONTRACT_SETTL_MONTH, FIXString::from(v));
665    }
666
667    /// Gets `ContractSettlMonth`, Tag 667.
668    pub fn get_contract_settl_month(&self) -> Result<String, MessageRejectErrorEnum> {
669        let mut fld = field::ContractSettlMonthField::new(String::new());
670        self.message.body.get_field(tag::CONTRACT_SETTL_MONTH, &mut fld.0)?;
671        Ok(fld.value().to_string())
672    }
673
674
675    /// Returns true if `ContractSettlMonth` is present, Tag 667.
676    pub fn has_contract_settl_month(&self) -> bool {
677        self.message.body.has(tag::CONTRACT_SETTL_MONTH)
678    }
679
680
681
682
683    /// Sets `CountryOfIssue`, Tag 470.
684    pub fn set_country_of_issue(&mut self, v: String) {
685        self.message.body.set_field(tag::COUNTRY_OF_ISSUE, FIXString::from(v));
686    }
687
688    /// Gets `CountryOfIssue`, Tag 470.
689    pub fn get_country_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
690        let mut fld = field::CountryOfIssueField::new(String::new());
691        self.message.body.get_field(tag::COUNTRY_OF_ISSUE, &mut fld.0)?;
692        Ok(fld.value().to_string())
693    }
694
695
696    /// Returns true if `CountryOfIssue` is present, Tag 470.
697    pub fn has_country_of_issue(&self) -> bool {
698        self.message.body.has(tag::COUNTRY_OF_ISSUE)
699    }
700
701
702
703
704    /// Sets `CouponPaymentDate`, Tag 224.
705    pub fn set_coupon_payment_date(&mut self, v: String) {
706        self.message.body.set_field(tag::COUPON_PAYMENT_DATE, FIXString::from(v));
707    }
708
709    /// Gets `CouponPaymentDate`, Tag 224.
710    pub fn get_coupon_payment_date(&self) -> Result<String, MessageRejectErrorEnum> {
711        let mut fld = field::CouponPaymentDateField::new(String::new());
712        self.message.body.get_field(tag::COUPON_PAYMENT_DATE, &mut fld.0)?;
713        Ok(fld.value().to_string())
714    }
715
716
717    /// Returns true if `CouponPaymentDate` is present, Tag 224.
718    pub fn has_coupon_payment_date(&self) -> bool {
719        self.message.body.has(tag::COUPON_PAYMENT_DATE)
720    }
721
722
723
724
725    /// Sets `CouponRate`, Tag 223.
726    pub fn set_coupon_rate(&mut self, val: Decimal, scale: i32) {
727        self.message.body.set_field(tag::COUPON_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
728    }
729
730    /// Gets `CouponRate`, Tag 223.
731    pub fn get_coupon_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
732        let mut fld = field::CouponRateField::new(Decimal::ZERO, 0);
733        self.message.body.get_field(tag::COUPON_RATE, &mut fld.0)?;
734        Ok(fld.value())
735    }
736
737
738    /// Returns true if `CouponRate` is present, Tag 223.
739    pub fn has_coupon_rate(&self) -> bool {
740        self.message.body.has(tag::COUPON_RATE)
741    }
742
743
744
745
746    /// Sets `CreditRating`, Tag 255.
747    pub fn set_credit_rating(&mut self, v: String) {
748        self.message.body.set_field(tag::CREDIT_RATING, FIXString::from(v));
749    }
750
751    /// Gets `CreditRating`, Tag 255.
752    pub fn get_credit_rating(&self) -> Result<String, MessageRejectErrorEnum> {
753        let mut fld = field::CreditRatingField::new(String::new());
754        self.message.body.get_field(tag::CREDIT_RATING, &mut fld.0)?;
755        Ok(fld.value().to_string())
756    }
757
758
759    /// Returns true if `CreditRating` is present, Tag 255.
760    pub fn has_credit_rating(&self) -> bool {
761        self.message.body.has(tag::CREDIT_RATING)
762    }
763
764
765
766
767    /// Sets `Currency`, Tag 15.
768    pub fn set_currency(&mut self, v: String) {
769        self.message.body.set_field(tag::CURRENCY, FIXString::from(v));
770    }
771
772    /// Gets `Currency`, Tag 15.
773    pub fn get_currency(&self) -> Result<String, MessageRejectErrorEnum> {
774        let mut fld = field::CurrencyField::new(String::new());
775        self.message.body.get_field(tag::CURRENCY, &mut fld.0)?;
776        Ok(fld.value().to_string())
777    }
778
779
780    /// Returns true if `Currency` is present, Tag 15.
781    pub fn has_currency(&self) -> bool {
782        self.message.body.has(tag::CURRENCY)
783    }
784
785
786
787
788    /// Sets `DatedDate`, Tag 873.
789    pub fn set_dated_date(&mut self, v: String) {
790        self.message.body.set_field(tag::DATED_DATE, FIXString::from(v));
791    }
792
793    /// Gets `DatedDate`, Tag 873.
794    pub fn get_dated_date(&self) -> Result<String, MessageRejectErrorEnum> {
795        let mut fld = field::DatedDateField::new(String::new());
796        self.message.body.get_field(tag::DATED_DATE, &mut fld.0)?;
797        Ok(fld.value().to_string())
798    }
799
800
801    /// Returns true if `DatedDate` is present, Tag 873.
802    pub fn has_dated_date(&self) -> bool {
803        self.message.body.has(tag::DATED_DATE)
804    }
805
806
807
808
809    /// Sets `DeliveryType`, Tag 919.
810    pub fn set_delivery_type(&mut self, v: isize) {
811        self.message.body.set_field(tag::DELIVERY_TYPE, fixer::fix_int::FIXInt::from(v));
812    }
813
814    /// Gets `DeliveryType`, Tag 919.
815    pub fn get_delivery_type(&self) -> Result<isize, MessageRejectErrorEnum> {
816        let mut fld = field::DeliveryTypeField::new(0);
817        self.message.body.get_field(tag::DELIVERY_TYPE, &mut fld.0)?;
818        Ok(fld.value())
819    }
820
821
822    /// Returns true if `DeliveryType` is present, Tag 919.
823    pub fn has_delivery_type(&self) -> bool {
824        self.message.body.has(tag::DELIVERY_TYPE)
825    }
826
827
828
829
830    /// Sets `EncodedIssuer`, Tag 349.
831    pub fn set_encoded_issuer(&mut self, v: String) {
832        self.message.body.set_field(tag::ENCODED_ISSUER, FIXString::from(v));
833    }
834
835    /// Gets `EncodedIssuer`, Tag 349.
836    pub fn get_encoded_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
837        let mut fld = field::EncodedIssuerField::new(String::new());
838        self.message.body.get_field(tag::ENCODED_ISSUER, &mut fld.0)?;
839        Ok(fld.value().to_string())
840    }
841
842
843    /// Returns true if `EncodedIssuer` is present, Tag 349.
844    pub fn has_encoded_issuer(&self) -> bool {
845        self.message.body.has(tag::ENCODED_ISSUER)
846    }
847
848
849
850
851    /// Sets `EncodedIssuerLen`, Tag 348.
852    pub fn set_encoded_issuer_len(&mut self, v: isize) {
853        self.message.body.set_field(tag::ENCODED_ISSUER_LEN, fixer::fix_int::FIXInt::from(v));
854    }
855
856    /// Gets `EncodedIssuerLen`, Tag 348.
857    pub fn get_encoded_issuer_len(&self) -> Result<isize, MessageRejectErrorEnum> {
858        let mut fld = field::EncodedIssuerLenField::new(0);
859        self.message.body.get_field(tag::ENCODED_ISSUER_LEN, &mut fld.0)?;
860        Ok(fld.value())
861    }
862
863
864    /// Returns true if `EncodedIssuerLen` is present, Tag 348.
865    pub fn has_encoded_issuer_len(&self) -> bool {
866        self.message.body.has(tag::ENCODED_ISSUER_LEN)
867    }
868
869
870
871
872    /// Sets `EncodedSecurityDesc`, Tag 351.
873    pub fn set_encoded_security_desc(&mut self, v: String) {
874        self.message.body.set_field(tag::ENCODED_SECURITY_DESC, FIXString::from(v));
875    }
876
877    /// Gets `EncodedSecurityDesc`, Tag 351.
878    pub fn get_encoded_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
879        let mut fld = field::EncodedSecurityDescField::new(String::new());
880        self.message.body.get_field(tag::ENCODED_SECURITY_DESC, &mut fld.0)?;
881        Ok(fld.value().to_string())
882    }
883
884
885    /// Returns true if `EncodedSecurityDesc` is present, Tag 351.
886    pub fn has_encoded_security_desc(&self) -> bool {
887        self.message.body.has(tag::ENCODED_SECURITY_DESC)
888    }
889
890
891
892
893    /// Sets `EncodedSecurityDescLen`, Tag 350.
894    pub fn set_encoded_security_desc_len(&mut self, v: isize) {
895        self.message.body.set_field(tag::ENCODED_SECURITY_DESC_LEN, fixer::fix_int::FIXInt::from(v));
896    }
897
898    /// Gets `EncodedSecurityDescLen`, Tag 350.
899    pub fn get_encoded_security_desc_len(&self) -> Result<isize, MessageRejectErrorEnum> {
900        let mut fld = field::EncodedSecurityDescLenField::new(0);
901        self.message.body.get_field(tag::ENCODED_SECURITY_DESC_LEN, &mut fld.0)?;
902        Ok(fld.value())
903    }
904
905
906    /// Returns true if `EncodedSecurityDescLen` is present, Tag 350.
907    pub fn has_encoded_security_desc_len(&self) -> bool {
908        self.message.body.has(tag::ENCODED_SECURITY_DESC_LEN)
909    }
910
911
912
913
914    /// Sets `EncodedText`, Tag 355.
915    pub fn set_encoded_text(&mut self, v: String) {
916        self.message.body.set_field(tag::ENCODED_TEXT, FIXString::from(v));
917    }
918
919    /// Gets `EncodedText`, Tag 355.
920    pub fn get_encoded_text(&self) -> Result<String, MessageRejectErrorEnum> {
921        let mut fld = field::EncodedTextField::new(String::new());
922        self.message.body.get_field(tag::ENCODED_TEXT, &mut fld.0)?;
923        Ok(fld.value().to_string())
924    }
925
926
927    /// Returns true if `EncodedText` is present, Tag 355.
928    pub fn has_encoded_text(&self) -> bool {
929        self.message.body.has(tag::ENCODED_TEXT)
930    }
931
932
933
934
935    /// Sets `EncodedTextLen`, Tag 354.
936    pub fn set_encoded_text_len(&mut self, v: isize) {
937        self.message.body.set_field(tag::ENCODED_TEXT_LEN, fixer::fix_int::FIXInt::from(v));
938    }
939
940    /// Gets `EncodedTextLen`, Tag 354.
941    pub fn get_encoded_text_len(&self) -> Result<isize, MessageRejectErrorEnum> {
942        let mut fld = field::EncodedTextLenField::new(0);
943        self.message.body.get_field(tag::ENCODED_TEXT_LEN, &mut fld.0)?;
944        Ok(fld.value())
945    }
946
947
948    /// Returns true if `EncodedTextLen` is present, Tag 354.
949    pub fn has_encoded_text_len(&self) -> bool {
950        self.message.body.has(tag::ENCODED_TEXT_LEN)
951    }
952
953
954
955
956    /// Sets `EndAccruedInterestAmt`, Tag 920.
957    pub fn set_end_accrued_interest_amt(&mut self, val: Decimal, scale: i32) {
958        self.message.body.set_field(tag::END_ACCRUED_INTEREST_AMT, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
959    }
960
961    /// Gets `EndAccruedInterestAmt`, Tag 920.
962    pub fn get_end_accrued_interest_amt(&self) -> Result<Decimal, MessageRejectErrorEnum> {
963        let mut fld = field::EndAccruedInterestAmtField::new(Decimal::ZERO, 0);
964        self.message.body.get_field(tag::END_ACCRUED_INTEREST_AMT, &mut fld.0)?;
965        Ok(fld.value())
966    }
967
968
969    /// Returns true if `EndAccruedInterestAmt` is present, Tag 920.
970    pub fn has_end_accrued_interest_amt(&self) -> bool {
971        self.message.body.has(tag::END_ACCRUED_INTEREST_AMT)
972    }
973
974
975
976
977    /// Sets `EndCash`, Tag 922.
978    pub fn set_end_cash(&mut self, val: Decimal, scale: i32) {
979        self.message.body.set_field(tag::END_CASH, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
980    }
981
982    /// Gets `EndCash`, Tag 922.
983    pub fn get_end_cash(&self) -> Result<Decimal, MessageRejectErrorEnum> {
984        let mut fld = field::EndCashField::new(Decimal::ZERO, 0);
985        self.message.body.get_field(tag::END_CASH, &mut fld.0)?;
986        Ok(fld.value())
987    }
988
989
990    /// Returns true if `EndCash` is present, Tag 922.
991    pub fn has_end_cash(&self) -> bool {
992        self.message.body.has(tag::END_CASH)
993    }
994
995
996
997
998    /// Sets `EndDate`, Tag 917.
999    pub fn set_end_date(&mut self, v: String) {
1000        self.message.body.set_field(tag::END_DATE, FIXString::from(v));
1001    }
1002
1003    /// Gets `EndDate`, Tag 917.
1004    pub fn get_end_date(&self) -> Result<String, MessageRejectErrorEnum> {
1005        let mut fld = field::EndDateField::new(String::new());
1006        self.message.body.get_field(tag::END_DATE, &mut fld.0)?;
1007        Ok(fld.value().to_string())
1008    }
1009
1010
1011    /// Returns true if `EndDate` is present, Tag 917.
1012    pub fn has_end_date(&self) -> bool {
1013        self.message.body.has(tag::END_DATE)
1014    }
1015
1016
1017
1018
1019    /// Sets `Factor`, Tag 228.
1020    pub fn set_factor(&mut self, val: Decimal, scale: i32) {
1021        self.message.body.set_field(tag::FACTOR, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1022    }
1023
1024    /// Gets `Factor`, Tag 228.
1025    pub fn get_factor(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1026        let mut fld = field::FactorField::new(Decimal::ZERO, 0);
1027        self.message.body.get_field(tag::FACTOR, &mut fld.0)?;
1028        Ok(fld.value())
1029    }
1030
1031
1032    /// Returns true if `Factor` is present, Tag 228.
1033    pub fn has_factor(&self) -> bool {
1034        self.message.body.has(tag::FACTOR)
1035    }
1036
1037
1038
1039
1040    /// Sets `FinancialStatus`, Tag 291.
1041    pub fn set_financial_status(&mut self, v: String) {
1042        self.message.body.set_field(tag::FINANCIAL_STATUS, FIXString::from(v));
1043    }
1044
1045    /// Gets `FinancialStatus`, Tag 291.
1046    pub fn get_financial_status(&self) -> Result<String, MessageRejectErrorEnum> {
1047        let mut fld = field::FinancialStatusField::new(String::new());
1048        self.message.body.get_field(tag::FINANCIAL_STATUS, &mut fld.0)?;
1049        Ok(fld.value().to_string())
1050    }
1051
1052
1053    /// Returns true if `FinancialStatus` is present, Tag 291.
1054    pub fn has_financial_status(&self) -> bool {
1055        self.message.body.has(tag::FINANCIAL_STATUS)
1056    }
1057
1058
1059
1060
1061    /// Sets `InstrRegistry`, Tag 543.
1062    pub fn set_instr_registry(&mut self, v: String) {
1063        self.message.body.set_field(tag::INSTR_REGISTRY, FIXString::from(v));
1064    }
1065
1066    /// Gets `InstrRegistry`, Tag 543.
1067    pub fn get_instr_registry(&self) -> Result<String, MessageRejectErrorEnum> {
1068        let mut fld = field::InstrRegistryField::new(String::new());
1069        self.message.body.get_field(tag::INSTR_REGISTRY, &mut fld.0)?;
1070        Ok(fld.value().to_string())
1071    }
1072
1073
1074    /// Returns true if `InstrRegistry` is present, Tag 543.
1075    pub fn has_instr_registry(&self) -> bool {
1076        self.message.body.has(tag::INSTR_REGISTRY)
1077    }
1078
1079
1080
1081
1082    /// Sets `InstrmtAssignmentMethod`, Tag 1049.
1083    pub fn set_instrmt_assignment_method(&mut self, v: String) {
1084        self.message.body.set_field(tag::INSTRMT_ASSIGNMENT_METHOD, FIXString::from(v));
1085    }
1086
1087    /// Gets `InstrmtAssignmentMethod`, Tag 1049.
1088    pub fn get_instrmt_assignment_method(&self) -> Result<String, MessageRejectErrorEnum> {
1089        let mut fld = field::InstrmtAssignmentMethodField::new(String::new());
1090        self.message.body.get_field(tag::INSTRMT_ASSIGNMENT_METHOD, &mut fld.0)?;
1091        Ok(fld.value().to_string())
1092    }
1093
1094
1095    /// Returns true if `InstrmtAssignmentMethod` is present, Tag 1049.
1096    pub fn has_instrmt_assignment_method(&self) -> bool {
1097        self.message.body.has(tag::INSTRMT_ASSIGNMENT_METHOD)
1098    }
1099
1100
1101
1102
1103    /// Sets `InterestAccrualDate`, Tag 874.
1104    pub fn set_interest_accrual_date(&mut self, v: String) {
1105        self.message.body.set_field(tag::INTEREST_ACCRUAL_DATE, FIXString::from(v));
1106    }
1107
1108    /// Gets `InterestAccrualDate`, Tag 874.
1109    pub fn get_interest_accrual_date(&self) -> Result<String, MessageRejectErrorEnum> {
1110        let mut fld = field::InterestAccrualDateField::new(String::new());
1111        self.message.body.get_field(tag::INTEREST_ACCRUAL_DATE, &mut fld.0)?;
1112        Ok(fld.value().to_string())
1113    }
1114
1115
1116    /// Returns true if `InterestAccrualDate` is present, Tag 874.
1117    pub fn has_interest_accrual_date(&self) -> bool {
1118        self.message.body.has(tag::INTEREST_ACCRUAL_DATE)
1119    }
1120
1121
1122
1123
1124    /// Sets `IssueDate`, Tag 225.
1125    pub fn set_issue_date(&mut self, v: String) {
1126        self.message.body.set_field(tag::ISSUE_DATE, FIXString::from(v));
1127    }
1128
1129    /// Gets `IssueDate`, Tag 225.
1130    pub fn get_issue_date(&self) -> Result<String, MessageRejectErrorEnum> {
1131        let mut fld = field::IssueDateField::new(String::new());
1132        self.message.body.get_field(tag::ISSUE_DATE, &mut fld.0)?;
1133        Ok(fld.value().to_string())
1134    }
1135
1136
1137    /// Returns true if `IssueDate` is present, Tag 225.
1138    pub fn has_issue_date(&self) -> bool {
1139        self.message.body.has(tag::ISSUE_DATE)
1140    }
1141
1142
1143
1144
1145    /// Sets `Issuer`, Tag 106.
1146    pub fn set_issuer(&mut self, v: String) {
1147        self.message.body.set_field(tag::ISSUER, FIXString::from(v));
1148    }
1149
1150    /// Gets `Issuer`, Tag 106.
1151    pub fn get_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
1152        let mut fld = field::IssuerField::new(String::new());
1153        self.message.body.get_field(tag::ISSUER, &mut fld.0)?;
1154        Ok(fld.value().to_string())
1155    }
1156
1157
1158    /// Returns true if `Issuer` is present, Tag 106.
1159    pub fn has_issuer(&self) -> bool {
1160        self.message.body.has(tag::ISSUER)
1161    }
1162
1163
1164
1165
1166    /// Sets `LocaleOfIssue`, Tag 472.
1167    pub fn set_locale_of_issue(&mut self, v: String) {
1168        self.message.body.set_field(tag::LOCALE_OF_ISSUE, FIXString::from(v));
1169    }
1170
1171    /// Gets `LocaleOfIssue`, Tag 472.
1172    pub fn get_locale_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
1173        let mut fld = field::LocaleOfIssueField::new(String::new());
1174        self.message.body.get_field(tag::LOCALE_OF_ISSUE, &mut fld.0)?;
1175        Ok(fld.value().to_string())
1176    }
1177
1178
1179    /// Returns true if `LocaleOfIssue` is present, Tag 472.
1180    pub fn has_locale_of_issue(&self) -> bool {
1181        self.message.body.has(tag::LOCALE_OF_ISSUE)
1182    }
1183
1184
1185
1186
1187    /// Sets `MarginExcess`, Tag 899.
1188    pub fn set_margin_excess(&mut self, val: Decimal, scale: i32) {
1189        self.message.body.set_field(tag::MARGIN_EXCESS, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1190    }
1191
1192    /// Gets `MarginExcess`, Tag 899.
1193    pub fn get_margin_excess(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1194        let mut fld = field::MarginExcessField::new(Decimal::ZERO, 0);
1195        self.message.body.get_field(tag::MARGIN_EXCESS, &mut fld.0)?;
1196        Ok(fld.value())
1197    }
1198
1199
1200    /// Returns true if `MarginExcess` is present, Tag 899.
1201    pub fn has_margin_excess(&self) -> bool {
1202        self.message.body.has(tag::MARGIN_EXCESS)
1203    }
1204
1205
1206
1207
1208    /// Sets `MarginRatio`, Tag 898.
1209    pub fn set_margin_ratio(&mut self, val: Decimal, scale: i32) {
1210        self.message.body.set_field(tag::MARGIN_RATIO, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1211    }
1212
1213    /// Gets `MarginRatio`, Tag 898.
1214    pub fn get_margin_ratio(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1215        let mut fld = field::MarginRatioField::new(Decimal::ZERO, 0);
1216        self.message.body.get_field(tag::MARGIN_RATIO, &mut fld.0)?;
1217        Ok(fld.value())
1218    }
1219
1220
1221    /// Returns true if `MarginRatio` is present, Tag 898.
1222    pub fn has_margin_ratio(&self) -> bool {
1223        self.message.body.has(tag::MARGIN_RATIO)
1224    }
1225
1226
1227
1228
1229    /// Sets `MaturityDate`, Tag 541.
1230    pub fn set_maturity_date(&mut self, v: String) {
1231        self.message.body.set_field(tag::MATURITY_DATE, FIXString::from(v));
1232    }
1233
1234    /// Gets `MaturityDate`, Tag 541.
1235    pub fn get_maturity_date(&self) -> Result<String, MessageRejectErrorEnum> {
1236        let mut fld = field::MaturityDateField::new(String::new());
1237        self.message.body.get_field(tag::MATURITY_DATE, &mut fld.0)?;
1238        Ok(fld.value().to_string())
1239    }
1240
1241
1242    /// Returns true if `MaturityDate` is present, Tag 541.
1243    pub fn has_maturity_date(&self) -> bool {
1244        self.message.body.has(tag::MATURITY_DATE)
1245    }
1246
1247
1248
1249
1250    /// Sets `MaturityMonthYear`, Tag 200.
1251    pub fn set_maturity_month_year(&mut self, v: String) {
1252        self.message.body.set_field(tag::MATURITY_MONTH_YEAR, FIXString::from(v));
1253    }
1254
1255    /// Gets `MaturityMonthYear`, Tag 200.
1256    pub fn get_maturity_month_year(&self) -> Result<String, MessageRejectErrorEnum> {
1257        let mut fld = field::MaturityMonthYearField::new(String::new());
1258        self.message.body.get_field(tag::MATURITY_MONTH_YEAR, &mut fld.0)?;
1259        Ok(fld.value().to_string())
1260    }
1261
1262
1263    /// Returns true if `MaturityMonthYear` is present, Tag 200.
1264    pub fn has_maturity_month_year(&self) -> bool {
1265        self.message.body.has(tag::MATURITY_MONTH_YEAR)
1266    }
1267
1268
1269
1270
1271    /// Sets `MaturityTime`, Tag 1079.
1272    pub fn set_maturity_time(&mut self, v: String) {
1273        self.message.body.set_field(tag::MATURITY_TIME, FIXString::from(v));
1274    }
1275
1276    /// Gets `MaturityTime`, Tag 1079.
1277    pub fn get_maturity_time(&self) -> Result<String, MessageRejectErrorEnum> {
1278        let mut fld = field::MaturityTimeField::new(String::new());
1279        self.message.body.get_field(tag::MATURITY_TIME, &mut fld.0)?;
1280        Ok(fld.value().to_string())
1281    }
1282
1283
1284    /// Returns true if `MaturityTime` is present, Tag 1079.
1285    pub fn has_maturity_time(&self) -> bool {
1286        self.message.body.has(tag::MATURITY_TIME)
1287    }
1288
1289
1290
1291
1292    /// Sets `MinPriceIncrement`, Tag 969.
1293    pub fn set_min_price_increment(&mut self, val: Decimal, scale: i32) {
1294        self.message.body.set_field(tag::MIN_PRICE_INCREMENT, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1295    }
1296
1297    /// Gets `MinPriceIncrement`, Tag 969.
1298    pub fn get_min_price_increment(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1299        let mut fld = field::MinPriceIncrementField::new(Decimal::ZERO, 0);
1300        self.message.body.get_field(tag::MIN_PRICE_INCREMENT, &mut fld.0)?;
1301        Ok(fld.value())
1302    }
1303
1304
1305    /// Returns true if `MinPriceIncrement` is present, Tag 969.
1306    pub fn has_min_price_increment(&self) -> bool {
1307        self.message.body.has(tag::MIN_PRICE_INCREMENT)
1308    }
1309
1310
1311
1312
1313    /// Sets `NTPositionLimit`, Tag 971.
1314    pub fn set_nt_position_limit(&mut self, v: isize) {
1315        self.message.body.set_field(tag::NT_POSITION_LIMIT, fixer::fix_int::FIXInt::from(v));
1316    }
1317
1318    /// Gets `NTPositionLimit`, Tag 971.
1319    pub fn get_nt_position_limit(&self) -> Result<isize, MessageRejectErrorEnum> {
1320        let mut fld = field::NTPositionLimitField::new(0);
1321        self.message.body.get_field(tag::NT_POSITION_LIMIT, &mut fld.0)?;
1322        Ok(fld.value())
1323    }
1324
1325
1326    /// Returns true if `NTPositionLimit` is present, Tag 971.
1327    pub fn has_nt_position_limit(&self) -> bool {
1328        self.message.body.has(tag::NT_POSITION_LIMIT)
1329    }
1330
1331
1332
1333
1334    /// Sets `NoEvents`, Tag 864.
1335    pub fn set_no_events(&mut self, v: isize) {
1336        self.message.body.set_field(tag::NO_EVENTS, fixer::fix_int::FIXInt::from(v));
1337    }
1338
1339    /// Gets `NoEvents`, Tag 864.
1340    pub fn get_no_events(&self) -> Result<isize, MessageRejectErrorEnum> {
1341        let mut fld = field::NoEventsField::new(0);
1342        self.message.body.get_field(tag::NO_EVENTS, &mut fld.0)?;
1343        Ok(fld.value())
1344    }
1345
1346
1347    /// Returns true if `NoEvents` is present, Tag 864.
1348    pub fn has_no_events(&self) -> bool {
1349        self.message.body.has(tag::NO_EVENTS)
1350    }
1351
1352
1353
1354
1355    /// Sets `NoExecs`, Tag 124.
1356    pub fn set_no_execs(&mut self, v: isize) {
1357        self.message.body.set_field(tag::NO_EXECS, fixer::fix_int::FIXInt::from(v));
1358    }
1359
1360    /// Gets `NoExecs`, Tag 124.
1361    pub fn get_no_execs(&self) -> Result<isize, MessageRejectErrorEnum> {
1362        let mut fld = field::NoExecsField::new(0);
1363        self.message.body.get_field(tag::NO_EXECS, &mut fld.0)?;
1364        Ok(fld.value())
1365    }
1366
1367
1368    /// Returns true if `NoExecs` is present, Tag 124.
1369    pub fn has_no_execs(&self) -> bool {
1370        self.message.body.has(tag::NO_EXECS)
1371    }
1372
1373
1374
1375
1376    /// Sets `NoInstrumentParties`, Tag 1018.
1377    pub fn set_no_instrument_parties(&mut self, v: isize) {
1378        self.message.body.set_field(tag::NO_INSTRUMENT_PARTIES, fixer::fix_int::FIXInt::from(v));
1379    }
1380
1381    /// Gets `NoInstrumentParties`, Tag 1018.
1382    pub fn get_no_instrument_parties(&self) -> Result<isize, MessageRejectErrorEnum> {
1383        let mut fld = field::NoInstrumentPartiesField::new(0);
1384        self.message.body.get_field(tag::NO_INSTRUMENT_PARTIES, &mut fld.0)?;
1385        Ok(fld.value())
1386    }
1387
1388
1389    /// Returns true if `NoInstrumentParties` is present, Tag 1018.
1390    pub fn has_no_instrument_parties(&self) -> bool {
1391        self.message.body.has(tag::NO_INSTRUMENT_PARTIES)
1392    }
1393
1394
1395
1396
1397    /// Sets `NoLegs`, Tag 555.
1398    pub fn set_no_legs(&mut self, v: isize) {
1399        self.message.body.set_field(tag::NO_LEGS, fixer::fix_int::FIXInt::from(v));
1400    }
1401
1402    /// Gets `NoLegs`, Tag 555.
1403    pub fn get_no_legs(&self) -> Result<isize, MessageRejectErrorEnum> {
1404        let mut fld = field::NoLegsField::new(0);
1405        self.message.body.get_field(tag::NO_LEGS, &mut fld.0)?;
1406        Ok(fld.value())
1407    }
1408
1409
1410    /// Returns true if `NoLegs` is present, Tag 555.
1411    pub fn has_no_legs(&self) -> bool {
1412        self.message.body.has(tag::NO_LEGS)
1413    }
1414
1415
1416
1417
1418    /// Sets `NoMiscFees`, Tag 136.
1419    pub fn set_no_misc_fees(&mut self, v: isize) {
1420        self.message.body.set_field(tag::NO_MISC_FEES, fixer::fix_int::FIXInt::from(v));
1421    }
1422
1423    /// Gets `NoMiscFees`, Tag 136.
1424    pub fn get_no_misc_fees(&self) -> Result<isize, MessageRejectErrorEnum> {
1425        let mut fld = field::NoMiscFeesField::new(0);
1426        self.message.body.get_field(tag::NO_MISC_FEES, &mut fld.0)?;
1427        Ok(fld.value())
1428    }
1429
1430
1431    /// Returns true if `NoMiscFees` is present, Tag 136.
1432    pub fn has_no_misc_fees(&self) -> bool {
1433        self.message.body.has(tag::NO_MISC_FEES)
1434    }
1435
1436
1437
1438
1439    /// Sets `NoPartyIDs`, Tag 453.
1440    pub fn set_no_party_i_ds(&mut self, v: isize) {
1441        self.message.body.set_field(tag::NO_PARTY_I_DS, fixer::fix_int::FIXInt::from(v));
1442    }
1443
1444    /// Gets `NoPartyIDs`, Tag 453.
1445    pub fn get_no_party_i_ds(&self) -> Result<isize, MessageRejectErrorEnum> {
1446        let mut fld = field::NoPartyIDsField::new(0);
1447        self.message.body.get_field(tag::NO_PARTY_I_DS, &mut fld.0)?;
1448        Ok(fld.value())
1449    }
1450
1451
1452    /// Returns true if `NoPartyIDs` is present, Tag 453.
1453    pub fn has_no_party_i_ds(&self) -> bool {
1454        self.message.body.has(tag::NO_PARTY_I_DS)
1455    }
1456
1457
1458
1459
1460    /// Sets `NoSecurityAltID`, Tag 454.
1461    pub fn set_no_security_alt_id(&mut self, v: isize) {
1462        self.message.body.set_field(tag::NO_SECURITY_ALT_ID, fixer::fix_int::FIXInt::from(v));
1463    }
1464
1465    /// Gets `NoSecurityAltID`, Tag 454.
1466    pub fn get_no_security_alt_id(&self) -> Result<isize, MessageRejectErrorEnum> {
1467        let mut fld = field::NoSecurityAltIDField::new(0);
1468        self.message.body.get_field(tag::NO_SECURITY_ALT_ID, &mut fld.0)?;
1469        Ok(fld.value())
1470    }
1471
1472
1473    /// Returns true if `NoSecurityAltID` is present, Tag 454.
1474    pub fn has_no_security_alt_id(&self) -> bool {
1475        self.message.body.has(tag::NO_SECURITY_ALT_ID)
1476    }
1477
1478
1479
1480
1481    /// Sets `NoStipulations`, Tag 232.
1482    pub fn set_no_stipulations(&mut self, v: isize) {
1483        self.message.body.set_field(tag::NO_STIPULATIONS, fixer::fix_int::FIXInt::from(v));
1484    }
1485
1486    /// Gets `NoStipulations`, Tag 232.
1487    pub fn get_no_stipulations(&self) -> Result<isize, MessageRejectErrorEnum> {
1488        let mut fld = field::NoStipulationsField::new(0);
1489        self.message.body.get_field(tag::NO_STIPULATIONS, &mut fld.0)?;
1490        Ok(fld.value())
1491    }
1492
1493
1494    /// Returns true if `NoStipulations` is present, Tag 232.
1495    pub fn has_no_stipulations(&self) -> bool {
1496        self.message.body.has(tag::NO_STIPULATIONS)
1497    }
1498
1499
1500
1501
1502    /// Sets `NoTrades`, Tag 897.
1503    pub fn set_no_trades(&mut self, v: isize) {
1504        self.message.body.set_field(tag::NO_TRADES, fixer::fix_int::FIXInt::from(v));
1505    }
1506
1507    /// Gets `NoTrades`, Tag 897.
1508    pub fn get_no_trades(&self) -> Result<isize, MessageRejectErrorEnum> {
1509        let mut fld = field::NoTradesField::new(0);
1510        self.message.body.get_field(tag::NO_TRADES, &mut fld.0)?;
1511        Ok(fld.value())
1512    }
1513
1514
1515    /// Returns true if `NoTrades` is present, Tag 897.
1516    pub fn has_no_trades(&self) -> bool {
1517        self.message.body.has(tag::NO_TRADES)
1518    }
1519
1520
1521
1522
1523    /// Sets `NoTrdRegTimestamps`, Tag 768.
1524    pub fn set_no_trd_reg_timestamps(&mut self, v: isize) {
1525        self.message.body.set_field(tag::NO_TRD_REG_TIMESTAMPS, fixer::fix_int::FIXInt::from(v));
1526    }
1527
1528    /// Gets `NoTrdRegTimestamps`, Tag 768.
1529    pub fn get_no_trd_reg_timestamps(&self) -> Result<isize, MessageRejectErrorEnum> {
1530        let mut fld = field::NoTrdRegTimestampsField::new(0);
1531        self.message.body.get_field(tag::NO_TRD_REG_TIMESTAMPS, &mut fld.0)?;
1532        Ok(fld.value())
1533    }
1534
1535
1536    /// Returns true if `NoTrdRegTimestamps` is present, Tag 768.
1537    pub fn has_no_trd_reg_timestamps(&self) -> bool {
1538        self.message.body.has(tag::NO_TRD_REG_TIMESTAMPS)
1539    }
1540
1541
1542
1543
1544    /// Sets `NoUnderlyings`, Tag 711.
1545    pub fn set_no_underlyings(&mut self, v: isize) {
1546        self.message.body.set_field(tag::NO_UNDERLYINGS, fixer::fix_int::FIXInt::from(v));
1547    }
1548
1549    /// Gets `NoUnderlyings`, Tag 711.
1550    pub fn get_no_underlyings(&self) -> Result<isize, MessageRejectErrorEnum> {
1551        let mut fld = field::NoUnderlyingsField::new(0);
1552        self.message.body.get_field(tag::NO_UNDERLYINGS, &mut fld.0)?;
1553        Ok(fld.value())
1554    }
1555
1556
1557    /// Returns true if `NoUnderlyings` is present, Tag 711.
1558    pub fn has_no_underlyings(&self) -> bool {
1559        self.message.body.has(tag::NO_UNDERLYINGS)
1560    }
1561
1562
1563
1564
1565    /// Sets `OptAttribute`, Tag 206.
1566    pub fn set_opt_attribute(&mut self, v: String) {
1567        self.message.body.set_field(tag::OPT_ATTRIBUTE, FIXString::from(v));
1568    }
1569
1570    /// Gets `OptAttribute`, Tag 206.
1571    pub fn get_opt_attribute(&self) -> Result<String, MessageRejectErrorEnum> {
1572        let mut fld = field::OptAttributeField::new(String::new());
1573        self.message.body.get_field(tag::OPT_ATTRIBUTE, &mut fld.0)?;
1574        Ok(fld.value().to_string())
1575    }
1576
1577
1578    /// Returns true if `OptAttribute` is present, Tag 206.
1579    pub fn has_opt_attribute(&self) -> bool {
1580        self.message.body.has(tag::OPT_ATTRIBUTE)
1581    }
1582
1583
1584
1585
1586    /// Sets `OrderID`, Tag 37.
1587    pub fn set_order_id(&mut self, v: String) {
1588        self.message.body.set_field(tag::ORDER_ID, FIXString::from(v));
1589    }
1590
1591    /// Gets `OrderID`, Tag 37.
1592    pub fn get_order_id(&self) -> Result<String, MessageRejectErrorEnum> {
1593        let mut fld = field::OrderIDField::new(String::new());
1594        self.message.body.get_field(tag::ORDER_ID, &mut fld.0)?;
1595        Ok(fld.value().to_string())
1596    }
1597
1598
1599    /// Returns true if `OrderID` is present, Tag 37.
1600    pub fn has_order_id(&self) -> bool {
1601        self.message.body.has(tag::ORDER_ID)
1602    }
1603
1604
1605
1606
1607    /// Sets `Pool`, Tag 691.
1608    pub fn set_pool(&mut self, v: String) {
1609        self.message.body.set_field(tag::POOL, FIXString::from(v));
1610    }
1611
1612    /// Gets `Pool`, Tag 691.
1613    pub fn get_pool(&self) -> Result<String, MessageRejectErrorEnum> {
1614        let mut fld = field::PoolField::new(String::new());
1615        self.message.body.get_field(tag::POOL, &mut fld.0)?;
1616        Ok(fld.value().to_string())
1617    }
1618
1619
1620    /// Returns true if `Pool` is present, Tag 691.
1621    pub fn has_pool(&self) -> bool {
1622        self.message.body.has(tag::POOL)
1623    }
1624
1625
1626
1627
1628    /// Sets `PositionLimit`, Tag 970.
1629    pub fn set_position_limit(&mut self, v: isize) {
1630        self.message.body.set_field(tag::POSITION_LIMIT, fixer::fix_int::FIXInt::from(v));
1631    }
1632
1633    /// Gets `PositionLimit`, Tag 970.
1634    pub fn get_position_limit(&self) -> Result<isize, MessageRejectErrorEnum> {
1635        let mut fld = field::PositionLimitField::new(0);
1636        self.message.body.get_field(tag::POSITION_LIMIT, &mut fld.0)?;
1637        Ok(fld.value())
1638    }
1639
1640
1641    /// Returns true if `PositionLimit` is present, Tag 970.
1642    pub fn has_position_limit(&self) -> bool {
1643        self.message.body.has(tag::POSITION_LIMIT)
1644    }
1645
1646
1647
1648
1649    /// Sets `Price`, Tag 44.
1650    pub fn set_price(&mut self, val: Decimal, scale: i32) {
1651        self.message.body.set_field(tag::PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1652    }
1653
1654    /// Gets `Price`, Tag 44.
1655    pub fn get_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1656        let mut fld = field::PriceField::new(Decimal::ZERO, 0);
1657        self.message.body.get_field(tag::PRICE, &mut fld.0)?;
1658        Ok(fld.value())
1659    }
1660
1661
1662    /// Returns true if `Price` is present, Tag 44.
1663    pub fn has_price(&self) -> bool {
1664        self.message.body.has(tag::PRICE)
1665    }
1666
1667
1668
1669
1670    /// Sets `PriceType`, Tag 423.
1671    pub fn set_price_type(&mut self, v: isize) {
1672        self.message.body.set_field(tag::PRICE_TYPE, fixer::fix_int::FIXInt::from(v));
1673    }
1674
1675    /// Gets `PriceType`, Tag 423.
1676    pub fn get_price_type(&self) -> Result<isize, MessageRejectErrorEnum> {
1677        let mut fld = field::PriceTypeField::new(0);
1678        self.message.body.get_field(tag::PRICE_TYPE, &mut fld.0)?;
1679        Ok(fld.value())
1680    }
1681
1682
1683    /// Returns true if `PriceType` is present, Tag 423.
1684    pub fn has_price_type(&self) -> bool {
1685        self.message.body.has(tag::PRICE_TYPE)
1686    }
1687
1688
1689
1690
1691    /// Sets `Product`, Tag 460.
1692    pub fn set_product(&mut self, v: isize) {
1693        self.message.body.set_field(tag::PRODUCT, fixer::fix_int::FIXInt::from(v));
1694    }
1695
1696    /// Gets `Product`, Tag 460.
1697    pub fn get_product(&self) -> Result<isize, MessageRejectErrorEnum> {
1698        let mut fld = field::ProductField::new(0);
1699        self.message.body.get_field(tag::PRODUCT, &mut fld.0)?;
1700        Ok(fld.value())
1701    }
1702
1703
1704    /// Returns true if `Product` is present, Tag 460.
1705    pub fn has_product(&self) -> bool {
1706        self.message.body.has(tag::PRODUCT)
1707    }
1708
1709
1710
1711
1712    /// Sets `QtyType`, Tag 854.
1713    pub fn set_qty_type(&mut self, v: isize) {
1714        self.message.body.set_field(tag::QTY_TYPE, fixer::fix_int::FIXInt::from(v));
1715    }
1716
1717    /// Gets `QtyType`, Tag 854.
1718    pub fn get_qty_type(&self) -> Result<isize, MessageRejectErrorEnum> {
1719        let mut fld = field::QtyTypeField::new(0);
1720        self.message.body.get_field(tag::QTY_TYPE, &mut fld.0)?;
1721        Ok(fld.value())
1722    }
1723
1724
1725    /// Returns true if `QtyType` is present, Tag 854.
1726    pub fn has_qty_type(&self) -> bool {
1727        self.message.body.has(tag::QTY_TYPE)
1728    }
1729
1730
1731
1732
1733    /// Sets `Quantity`, Tag 53.
1734    pub fn set_quantity(&mut self, val: Decimal, scale: i32) {
1735        self.message.body.set_field(tag::QUANTITY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1736    }
1737
1738    /// Gets `Quantity`, Tag 53.
1739    pub fn get_quantity(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1740        let mut fld = field::QuantityField::new(Decimal::ZERO, 0);
1741        self.message.body.get_field(tag::QUANTITY, &mut fld.0)?;
1742        Ok(fld.value())
1743    }
1744
1745
1746    /// Returns true if `Quantity` is present, Tag 53.
1747    pub fn has_quantity(&self) -> bool {
1748        self.message.body.has(tag::QUANTITY)
1749    }
1750
1751
1752
1753
1754    /// Sets `RedemptionDate`, Tag 240.
1755    pub fn set_redemption_date(&mut self, v: String) {
1756        self.message.body.set_field(tag::REDEMPTION_DATE, FIXString::from(v));
1757    }
1758
1759    /// Gets `RedemptionDate`, Tag 240.
1760    pub fn get_redemption_date(&self) -> Result<String, MessageRejectErrorEnum> {
1761        let mut fld = field::RedemptionDateField::new(String::new());
1762        self.message.body.get_field(tag::REDEMPTION_DATE, &mut fld.0)?;
1763        Ok(fld.value().to_string())
1764    }
1765
1766
1767    /// Returns true if `RedemptionDate` is present, Tag 240.
1768    pub fn has_redemption_date(&self) -> bool {
1769        self.message.body.has(tag::REDEMPTION_DATE)
1770    }
1771
1772
1773
1774
1775    /// Sets `RepoCollateralSecurityType`, Tag 239.
1776    pub fn set_repo_collateral_security_type(&mut self, v: isize) {
1777        self.message.body.set_field(tag::REPO_COLLATERAL_SECURITY_TYPE, fixer::fix_int::FIXInt::from(v));
1778    }
1779
1780    /// Gets `RepoCollateralSecurityType`, Tag 239.
1781    pub fn get_repo_collateral_security_type(&self) -> Result<isize, MessageRejectErrorEnum> {
1782        let mut fld = field::RepoCollateralSecurityTypeField::new(0);
1783        self.message.body.get_field(tag::REPO_COLLATERAL_SECURITY_TYPE, &mut fld.0)?;
1784        Ok(fld.value())
1785    }
1786
1787
1788    /// Returns true if `RepoCollateralSecurityType` is present, Tag 239.
1789    pub fn has_repo_collateral_security_type(&self) -> bool {
1790        self.message.body.has(tag::REPO_COLLATERAL_SECURITY_TYPE)
1791    }
1792
1793
1794
1795
1796    /// Sets `RepurchaseRate`, Tag 227.
1797    pub fn set_repurchase_rate(&mut self, val: Decimal, scale: i32) {
1798        self.message.body.set_field(tag::REPURCHASE_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1799    }
1800
1801    /// Gets `RepurchaseRate`, Tag 227.
1802    pub fn get_repurchase_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1803        let mut fld = field::RepurchaseRateField::new(Decimal::ZERO, 0);
1804        self.message.body.get_field(tag::REPURCHASE_RATE, &mut fld.0)?;
1805        Ok(fld.value())
1806    }
1807
1808
1809    /// Returns true if `RepurchaseRate` is present, Tag 227.
1810    pub fn has_repurchase_rate(&self) -> bool {
1811        self.message.body.has(tag::REPURCHASE_RATE)
1812    }
1813
1814
1815
1816
1817    /// Sets `RepurchaseTerm`, Tag 226.
1818    pub fn set_repurchase_term(&mut self, v: isize) {
1819        self.message.body.set_field(tag::REPURCHASE_TERM, fixer::fix_int::FIXInt::from(v));
1820    }
1821
1822    /// Gets `RepurchaseTerm`, Tag 226.
1823    pub fn get_repurchase_term(&self) -> Result<isize, MessageRejectErrorEnum> {
1824        let mut fld = field::RepurchaseTermField::new(0);
1825        self.message.body.get_field(tag::REPURCHASE_TERM, &mut fld.0)?;
1826        Ok(fld.value())
1827    }
1828
1829
1830    /// Returns true if `RepurchaseTerm` is present, Tag 226.
1831    pub fn has_repurchase_term(&self) -> bool {
1832        self.message.body.has(tag::REPURCHASE_TERM)
1833    }
1834
1835
1836
1837
1838    /// Sets `SecondaryClOrdID`, Tag 526.
1839    pub fn set_secondary_cl_ord_id(&mut self, v: String) {
1840        self.message.body.set_field(tag::SECONDARY_CL_ORD_ID, FIXString::from(v));
1841    }
1842
1843    /// Gets `SecondaryClOrdID`, Tag 526.
1844    pub fn get_secondary_cl_ord_id(&self) -> Result<String, MessageRejectErrorEnum> {
1845        let mut fld = field::SecondaryClOrdIDField::new(String::new());
1846        self.message.body.get_field(tag::SECONDARY_CL_ORD_ID, &mut fld.0)?;
1847        Ok(fld.value().to_string())
1848    }
1849
1850
1851    /// Returns true if `SecondaryClOrdID` is present, Tag 526.
1852    pub fn has_secondary_cl_ord_id(&self) -> bool {
1853        self.message.body.has(tag::SECONDARY_CL_ORD_ID)
1854    }
1855
1856
1857
1858
1859    /// Sets `SecondaryOrderID`, Tag 198.
1860    pub fn set_secondary_order_id(&mut self, v: String) {
1861        self.message.body.set_field(tag::SECONDARY_ORDER_ID, FIXString::from(v));
1862    }
1863
1864    /// Gets `SecondaryOrderID`, Tag 198.
1865    pub fn get_secondary_order_id(&self) -> Result<String, MessageRejectErrorEnum> {
1866        let mut fld = field::SecondaryOrderIDField::new(String::new());
1867        self.message.body.get_field(tag::SECONDARY_ORDER_ID, &mut fld.0)?;
1868        Ok(fld.value().to_string())
1869    }
1870
1871
1872    /// Returns true if `SecondaryOrderID` is present, Tag 198.
1873    pub fn has_secondary_order_id(&self) -> bool {
1874        self.message.body.has(tag::SECONDARY_ORDER_ID)
1875    }
1876
1877
1878
1879
1880    /// Sets `SecurityDesc`, Tag 107.
1881    pub fn set_security_desc(&mut self, v: String) {
1882        self.message.body.set_field(tag::SECURITY_DESC, FIXString::from(v));
1883    }
1884
1885    /// Gets `SecurityDesc`, Tag 107.
1886    pub fn get_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
1887        let mut fld = field::SecurityDescField::new(String::new());
1888        self.message.body.get_field(tag::SECURITY_DESC, &mut fld.0)?;
1889        Ok(fld.value().to_string())
1890    }
1891
1892
1893    /// Returns true if `SecurityDesc` is present, Tag 107.
1894    pub fn has_security_desc(&self) -> bool {
1895        self.message.body.has(tag::SECURITY_DESC)
1896    }
1897
1898
1899
1900
1901    /// Sets `SecurityExchange`, Tag 207.
1902    pub fn set_security_exchange(&mut self, v: String) {
1903        self.message.body.set_field(tag::SECURITY_EXCHANGE, FIXString::from(v));
1904    }
1905
1906    /// Gets `SecurityExchange`, Tag 207.
1907    pub fn get_security_exchange(&self) -> Result<String, MessageRejectErrorEnum> {
1908        let mut fld = field::SecurityExchangeField::new(String::new());
1909        self.message.body.get_field(tag::SECURITY_EXCHANGE, &mut fld.0)?;
1910        Ok(fld.value().to_string())
1911    }
1912
1913
1914    /// Returns true if `SecurityExchange` is present, Tag 207.
1915    pub fn has_security_exchange(&self) -> bool {
1916        self.message.body.has(tag::SECURITY_EXCHANGE)
1917    }
1918
1919
1920
1921
1922    /// Sets `SecurityID`, Tag 48.
1923    pub fn set_security_id(&mut self, v: String) {
1924        self.message.body.set_field(tag::SECURITY_ID, FIXString::from(v));
1925    }
1926
1927    /// Gets `SecurityID`, Tag 48.
1928    pub fn get_security_id(&self) -> Result<String, MessageRejectErrorEnum> {
1929        let mut fld = field::SecurityIDField::new(String::new());
1930        self.message.body.get_field(tag::SECURITY_ID, &mut fld.0)?;
1931        Ok(fld.value().to_string())
1932    }
1933
1934
1935    /// Returns true if `SecurityID` is present, Tag 48.
1936    pub fn has_security_id(&self) -> bool {
1937        self.message.body.has(tag::SECURITY_ID)
1938    }
1939
1940
1941
1942
1943    /// Sets `SecurityIDSource`, Tag 22.
1944    pub fn set_security_id_source(&mut self, v: String) {
1945        self.message.body.set_field(tag::SECURITY_ID_SOURCE, FIXString::from(v));
1946    }
1947
1948    /// Gets `SecurityIDSource`, Tag 22.
1949    pub fn get_security_id_source(&self) -> Result<String, MessageRejectErrorEnum> {
1950        let mut fld = field::SecurityIDSourceField::new(String::new());
1951        self.message.body.get_field(tag::SECURITY_ID_SOURCE, &mut fld.0)?;
1952        Ok(fld.value().to_string())
1953    }
1954
1955
1956    /// Returns true if `SecurityIDSource` is present, Tag 22.
1957    pub fn has_security_id_source(&self) -> bool {
1958        self.message.body.has(tag::SECURITY_ID_SOURCE)
1959    }
1960
1961
1962
1963
1964    /// Sets `SecurityStatus`, Tag 965.
1965    pub fn set_security_status(&mut self, v: String) {
1966        self.message.body.set_field(tag::SECURITY_STATUS, FIXString::from(v));
1967    }
1968
1969    /// Gets `SecurityStatus`, Tag 965.
1970    pub fn get_security_status(&self) -> Result<String, MessageRejectErrorEnum> {
1971        let mut fld = field::SecurityStatusField::new(String::new());
1972        self.message.body.get_field(tag::SECURITY_STATUS, &mut fld.0)?;
1973        Ok(fld.value().to_string())
1974    }
1975
1976
1977    /// Returns true if `SecurityStatus` is present, Tag 965.
1978    pub fn has_security_status(&self) -> bool {
1979        self.message.body.has(tag::SECURITY_STATUS)
1980    }
1981
1982
1983
1984
1985    /// Sets `SecuritySubType`, Tag 762.
1986    pub fn set_security_sub_type(&mut self, v: String) {
1987        self.message.body.set_field(tag::SECURITY_SUB_TYPE, FIXString::from(v));
1988    }
1989
1990    /// Gets `SecuritySubType`, Tag 762.
1991    pub fn get_security_sub_type(&self) -> Result<String, MessageRejectErrorEnum> {
1992        let mut fld = field::SecuritySubTypeField::new(String::new());
1993        self.message.body.get_field(tag::SECURITY_SUB_TYPE, &mut fld.0)?;
1994        Ok(fld.value().to_string())
1995    }
1996
1997
1998    /// Returns true if `SecuritySubType` is present, Tag 762.
1999    pub fn has_security_sub_type(&self) -> bool {
2000        self.message.body.has(tag::SECURITY_SUB_TYPE)
2001    }
2002
2003
2004
2005
2006    /// Sets `SecurityType`, Tag 167.
2007    pub fn set_security_type(&mut self, v: String) {
2008        self.message.body.set_field(tag::SECURITY_TYPE, FIXString::from(v));
2009    }
2010
2011    /// Gets `SecurityType`, Tag 167.
2012    pub fn get_security_type(&self) -> Result<String, MessageRejectErrorEnum> {
2013        let mut fld = field::SecurityTypeField::new(String::new());
2014        self.message.body.get_field(tag::SECURITY_TYPE, &mut fld.0)?;
2015        Ok(fld.value().to_string())
2016    }
2017
2018
2019    /// Returns true if `SecurityType` is present, Tag 167.
2020    pub fn has_security_type(&self) -> bool {
2021        self.message.body.has(tag::SECURITY_TYPE)
2022    }
2023
2024
2025
2026
2027    /// Sets `SettlDate`, Tag 64.
2028    pub fn set_settl_date(&mut self, v: String) {
2029        self.message.body.set_field(tag::SETTL_DATE, FIXString::from(v));
2030    }
2031
2032    /// Gets `SettlDate`, Tag 64.
2033    pub fn get_settl_date(&self) -> Result<String, MessageRejectErrorEnum> {
2034        let mut fld = field::SettlDateField::new(String::new());
2035        self.message.body.get_field(tag::SETTL_DATE, &mut fld.0)?;
2036        Ok(fld.value().to_string())
2037    }
2038
2039
2040    /// Returns true if `SettlDate` is present, Tag 64.
2041    pub fn has_settl_date(&self) -> bool {
2042        self.message.body.has(tag::SETTL_DATE)
2043    }
2044
2045
2046
2047
2048    /// Sets `SettleOnOpenFlag`, Tag 966.
2049    pub fn set_settle_on_open_flag(&mut self, v: String) {
2050        self.message.body.set_field(tag::SETTLE_ON_OPEN_FLAG, FIXString::from(v));
2051    }
2052
2053    /// Gets `SettleOnOpenFlag`, Tag 966.
2054    pub fn get_settle_on_open_flag(&self) -> Result<String, MessageRejectErrorEnum> {
2055        let mut fld = field::SettleOnOpenFlagField::new(String::new());
2056        self.message.body.get_field(tag::SETTLE_ON_OPEN_FLAG, &mut fld.0)?;
2057        Ok(fld.value().to_string())
2058    }
2059
2060
2061    /// Returns true if `SettleOnOpenFlag` is present, Tag 966.
2062    pub fn has_settle_on_open_flag(&self) -> bool {
2063        self.message.body.has(tag::SETTLE_ON_OPEN_FLAG)
2064    }
2065
2066
2067
2068
2069    /// Sets `Side`, Tag 54.
2070    pub fn set_side(&mut self, v: String) {
2071        self.message.body.set_field(tag::SIDE, FIXString::from(v));
2072    }
2073
2074    /// Gets `Side`, Tag 54.
2075    pub fn get_side(&self) -> Result<String, MessageRejectErrorEnum> {
2076        let mut fld = field::SideField::new(String::new());
2077        self.message.body.get_field(tag::SIDE, &mut fld.0)?;
2078        Ok(fld.value().to_string())
2079    }
2080
2081
2082    /// Returns true if `Side` is present, Tag 54.
2083    pub fn has_side(&self) -> bool {
2084        self.message.body.has(tag::SIDE)
2085    }
2086
2087
2088
2089
2090    /// Sets `Spread`, Tag 218.
2091    pub fn set_spread(&mut self, val: Decimal, scale: i32) {
2092        self.message.body.set_field(tag::SPREAD, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
2093    }
2094
2095    /// Gets `Spread`, Tag 218.
2096    pub fn get_spread(&self) -> Result<Decimal, MessageRejectErrorEnum> {
2097        let mut fld = field::SpreadField::new(Decimal::ZERO, 0);
2098        self.message.body.get_field(tag::SPREAD, &mut fld.0)?;
2099        Ok(fld.value())
2100    }
2101
2102
2103    /// Returns true if `Spread` is present, Tag 218.
2104    pub fn has_spread(&self) -> bool {
2105        self.message.body.has(tag::SPREAD)
2106    }
2107
2108
2109
2110
2111    /// Sets `StartCash`, Tag 921.
2112    pub fn set_start_cash(&mut self, val: Decimal, scale: i32) {
2113        self.message.body.set_field(tag::START_CASH, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
2114    }
2115
2116    /// Gets `StartCash`, Tag 921.
2117    pub fn get_start_cash(&self) -> Result<Decimal, MessageRejectErrorEnum> {
2118        let mut fld = field::StartCashField::new(Decimal::ZERO, 0);
2119        self.message.body.get_field(tag::START_CASH, &mut fld.0)?;
2120        Ok(fld.value())
2121    }
2122
2123
2124    /// Returns true if `StartCash` is present, Tag 921.
2125    pub fn has_start_cash(&self) -> bool {
2126        self.message.body.has(tag::START_CASH)
2127    }
2128
2129
2130
2131
2132    /// Sets `StartDate`, Tag 916.
2133    pub fn set_start_date(&mut self, v: String) {
2134        self.message.body.set_field(tag::START_DATE, FIXString::from(v));
2135    }
2136
2137    /// Gets `StartDate`, Tag 916.
2138    pub fn get_start_date(&self) -> Result<String, MessageRejectErrorEnum> {
2139        let mut fld = field::StartDateField::new(String::new());
2140        self.message.body.get_field(tag::START_DATE, &mut fld.0)?;
2141        Ok(fld.value().to_string())
2142    }
2143
2144
2145    /// Returns true if `StartDate` is present, Tag 916.
2146    pub fn has_start_date(&self) -> bool {
2147        self.message.body.has(tag::START_DATE)
2148    }
2149
2150
2151
2152
2153    /// Sets `StateOrProvinceOfIssue`, Tag 471.
2154    pub fn set_state_or_province_of_issue(&mut self, v: String) {
2155        self.message.body.set_field(tag::STATE_OR_PROVINCE_OF_ISSUE, FIXString::from(v));
2156    }
2157
2158    /// Gets `StateOrProvinceOfIssue`, Tag 471.
2159    pub fn get_state_or_province_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
2160        let mut fld = field::StateOrProvinceOfIssueField::new(String::new());
2161        self.message.body.get_field(tag::STATE_OR_PROVINCE_OF_ISSUE, &mut fld.0)?;
2162        Ok(fld.value().to_string())
2163    }
2164
2165
2166    /// Returns true if `StateOrProvinceOfIssue` is present, Tag 471.
2167    pub fn has_state_or_province_of_issue(&self) -> bool {
2168        self.message.body.has(tag::STATE_OR_PROVINCE_OF_ISSUE)
2169    }
2170
2171
2172
2173
2174    /// Sets `StrikeCurrency`, Tag 947.
2175    pub fn set_strike_currency(&mut self, v: String) {
2176        self.message.body.set_field(tag::STRIKE_CURRENCY, FIXString::from(v));
2177    }
2178
2179    /// Gets `StrikeCurrency`, Tag 947.
2180    pub fn get_strike_currency(&self) -> Result<String, MessageRejectErrorEnum> {
2181        let mut fld = field::StrikeCurrencyField::new(String::new());
2182        self.message.body.get_field(tag::STRIKE_CURRENCY, &mut fld.0)?;
2183        Ok(fld.value().to_string())
2184    }
2185
2186
2187    /// Returns true if `StrikeCurrency` is present, Tag 947.
2188    pub fn has_strike_currency(&self) -> bool {
2189        self.message.body.has(tag::STRIKE_CURRENCY)
2190    }
2191
2192
2193
2194
2195    /// Sets `StrikeMultiplier`, Tag 967.
2196    pub fn set_strike_multiplier(&mut self, val: Decimal, scale: i32) {
2197        self.message.body.set_field(tag::STRIKE_MULTIPLIER, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
2198    }
2199
2200    /// Gets `StrikeMultiplier`, Tag 967.
2201    pub fn get_strike_multiplier(&self) -> Result<Decimal, MessageRejectErrorEnum> {
2202        let mut fld = field::StrikeMultiplierField::new(Decimal::ZERO, 0);
2203        self.message.body.get_field(tag::STRIKE_MULTIPLIER, &mut fld.0)?;
2204        Ok(fld.value())
2205    }
2206
2207
2208    /// Returns true if `StrikeMultiplier` is present, Tag 967.
2209    pub fn has_strike_multiplier(&self) -> bool {
2210        self.message.body.has(tag::STRIKE_MULTIPLIER)
2211    }
2212
2213
2214
2215
2216    /// Sets `StrikePrice`, Tag 202.
2217    pub fn set_strike_price(&mut self, val: Decimal, scale: i32) {
2218        self.message.body.set_field(tag::STRIKE_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
2219    }
2220
2221    /// Gets `StrikePrice`, Tag 202.
2222    pub fn get_strike_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
2223        let mut fld = field::StrikePriceField::new(Decimal::ZERO, 0);
2224        self.message.body.get_field(tag::STRIKE_PRICE, &mut fld.0)?;
2225        Ok(fld.value())
2226    }
2227
2228
2229    /// Returns true if `StrikePrice` is present, Tag 202.
2230    pub fn has_strike_price(&self) -> bool {
2231        self.message.body.has(tag::STRIKE_PRICE)
2232    }
2233
2234
2235
2236
2237    /// Sets `StrikeValue`, Tag 968.
2238    pub fn set_strike_value(&mut self, val: Decimal, scale: i32) {
2239        self.message.body.set_field(tag::STRIKE_VALUE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
2240    }
2241
2242    /// Gets `StrikeValue`, Tag 968.
2243    pub fn get_strike_value(&self) -> Result<Decimal, MessageRejectErrorEnum> {
2244        let mut fld = field::StrikeValueField::new(Decimal::ZERO, 0);
2245        self.message.body.get_field(tag::STRIKE_VALUE, &mut fld.0)?;
2246        Ok(fld.value())
2247    }
2248
2249
2250    /// Returns true if `StrikeValue` is present, Tag 968.
2251    pub fn has_strike_value(&self) -> bool {
2252        self.message.body.has(tag::STRIKE_VALUE)
2253    }
2254
2255
2256
2257
2258    /// Sets `Symbol`, Tag 55.
2259    pub fn set_symbol(&mut self, v: String) {
2260        self.message.body.set_field(tag::SYMBOL, FIXString::from(v));
2261    }
2262
2263    /// Gets `Symbol`, Tag 55.
2264    pub fn get_symbol(&self) -> Result<String, MessageRejectErrorEnum> {
2265        let mut fld = field::SymbolField::new(String::new());
2266        self.message.body.get_field(tag::SYMBOL, &mut fld.0)?;
2267        Ok(fld.value().to_string())
2268    }
2269
2270
2271    /// Returns true if `Symbol` is present, Tag 55.
2272    pub fn has_symbol(&self) -> bool {
2273        self.message.body.has(tag::SYMBOL)
2274    }
2275
2276
2277
2278
2279    /// Sets `SymbolSfx`, Tag 65.
2280    pub fn set_symbol_sfx(&mut self, v: String) {
2281        self.message.body.set_field(tag::SYMBOL_SFX, FIXString::from(v));
2282    }
2283
2284    /// Gets `SymbolSfx`, Tag 65.
2285    pub fn get_symbol_sfx(&self) -> Result<String, MessageRejectErrorEnum> {
2286        let mut fld = field::SymbolSfxField::new(String::new());
2287        self.message.body.get_field(tag::SYMBOL_SFX, &mut fld.0)?;
2288        Ok(fld.value().to_string())
2289    }
2290
2291
2292    /// Returns true if `SymbolSfx` is present, Tag 65.
2293    pub fn has_symbol_sfx(&self) -> bool {
2294        self.message.body.has(tag::SYMBOL_SFX)
2295    }
2296
2297
2298
2299
2300    /// Sets `TerminationType`, Tag 788.
2301    pub fn set_termination_type(&mut self, v: isize) {
2302        self.message.body.set_field(tag::TERMINATION_TYPE, fixer::fix_int::FIXInt::from(v));
2303    }
2304
2305    /// Gets `TerminationType`, Tag 788.
2306    pub fn get_termination_type(&self) -> Result<isize, MessageRejectErrorEnum> {
2307        let mut fld = field::TerminationTypeField::new(0);
2308        self.message.body.get_field(tag::TERMINATION_TYPE, &mut fld.0)?;
2309        Ok(fld.value())
2310    }
2311
2312
2313    /// Returns true if `TerminationType` is present, Tag 788.
2314    pub fn has_termination_type(&self) -> bool {
2315        self.message.body.has(tag::TERMINATION_TYPE)
2316    }
2317
2318
2319
2320
2321    /// Sets `Text`, Tag 58.
2322    pub fn set_text(&mut self, v: String) {
2323        self.message.body.set_field(tag::TEXT, FIXString::from(v));
2324    }
2325
2326    /// Gets `Text`, Tag 58.
2327    pub fn get_text(&self) -> Result<String, MessageRejectErrorEnum> {
2328        let mut fld = field::TextField::new(String::new());
2329        self.message.body.get_field(tag::TEXT, &mut fld.0)?;
2330        Ok(fld.value().to_string())
2331    }
2332
2333
2334    /// Returns true if `Text` is present, Tag 58.
2335    pub fn has_text(&self) -> bool {
2336        self.message.body.has(tag::TEXT)
2337    }
2338
2339
2340
2341
2342    /// Sets `TimeUnit`, Tag 997.
2343    pub fn set_time_unit(&mut self, v: String) {
2344        self.message.body.set_field(tag::TIME_UNIT, FIXString::from(v));
2345    }
2346
2347    /// Gets `TimeUnit`, Tag 997.
2348    pub fn get_time_unit(&self) -> Result<String, MessageRejectErrorEnum> {
2349        let mut fld = field::TimeUnitField::new(String::new());
2350        self.message.body.get_field(tag::TIME_UNIT, &mut fld.0)?;
2351        Ok(fld.value().to_string())
2352    }
2353
2354
2355    /// Returns true if `TimeUnit` is present, Tag 997.
2356    pub fn has_time_unit(&self) -> bool {
2357        self.message.body.has(tag::TIME_UNIT)
2358    }
2359
2360
2361
2362
2363    /// Sets `TotalNetValue`, Tag 900.
2364    pub fn set_total_net_value(&mut self, val: Decimal, scale: i32) {
2365        self.message.body.set_field(tag::TOTAL_NET_VALUE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
2366    }
2367
2368    /// Gets `TotalNetValue`, Tag 900.
2369    pub fn get_total_net_value(&self) -> Result<Decimal, MessageRejectErrorEnum> {
2370        let mut fld = field::TotalNetValueField::new(Decimal::ZERO, 0);
2371        self.message.body.get_field(tag::TOTAL_NET_VALUE, &mut fld.0)?;
2372        Ok(fld.value())
2373    }
2374
2375
2376    /// Returns true if `TotalNetValue` is present, Tag 900.
2377    pub fn has_total_net_value(&self) -> bool {
2378        self.message.body.has(tag::TOTAL_NET_VALUE)
2379    }
2380
2381
2382
2383
2384    /// Sets `TransactTime`, Tag 60.
2385    pub fn set_transact_time(&mut self, v: Timestamp) {
2386        self.message.body.set_field(tag::TRANSACT_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
2387            time: v,
2388            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
2389        });
2390    }
2391
2392    /// Gets `TransactTime`, Tag 60.
2393    pub fn get_transact_time(&self) -> Result<Timestamp, MessageRejectErrorEnum> {
2394        let mut fld = field::TransactTimeField::new(Timestamp::UNIX_EPOCH);
2395        self.message.body.get_field(tag::TRANSACT_TIME, &mut fld.0)?;
2396        Ok(fld.value())
2397    }
2398
2399
2400    /// Returns true if `TransactTime` is present, Tag 60.
2401    pub fn has_transact_time(&self) -> bool {
2402        self.message.body.has(tag::TRANSACT_TIME)
2403    }
2404
2405
2406
2407
2408    /// Sets `UnitOfMeasure`, Tag 996.
2409    pub fn set_unit_of_measure(&mut self, v: String) {
2410        self.message.body.set_field(tag::UNIT_OF_MEASURE, FIXString::from(v));
2411    }
2412
2413    /// Gets `UnitOfMeasure`, Tag 996.
2414    pub fn get_unit_of_measure(&self) -> Result<String, MessageRejectErrorEnum> {
2415        let mut fld = field::UnitOfMeasureField::new(String::new());
2416        self.message.body.get_field(tag::UNIT_OF_MEASURE, &mut fld.0)?;
2417        Ok(fld.value().to_string())
2418    }
2419
2420
2421    /// Returns true if `UnitOfMeasure` is present, Tag 996.
2422    pub fn has_unit_of_measure(&self) -> bool {
2423        self.message.body.has(tag::UNIT_OF_MEASURE)
2424    }
2425
2426
2427}
2428
2429/// `RouteOut` is the callback type for routing `CollateralResponse` messages.
2430pub type RouteOut = fn(msg: CollateralResponse, session_id: SessionID) -> Result<(), MessageRejectErrorEnum>;
2431
2432/// Route type returned by the `route` function.
2433pub type Route = (&'static str, &'static str, Box<dyn Fn(&Message, SessionID) -> Result<(), MessageRejectErrorEnum> + Send>);
2434
2435/// Returns the begin string, message type, and route function for `CollateralResponse`.
2436pub fn route(router: RouteOut) -> Route {
2437    let r = move |msg: &Message, session_id: SessionID| -> Result<(), MessageRejectErrorEnum> {
2438        router(CollateralResponse::from_message(msg.clone()), session_id)
2439    };
2440    ("7", "AZ", Box::new(r))
2441}