Skip to main content

fixer_fix/fix44/
collateral_request.rs

1// Code generated by fixer-gen. DO NOT EDIT.
2#![allow(clippy::new_without_default)]
3#![allow(clippy::needless_pass_by_value)]
4#![allow(clippy::too_many_arguments)]
5#![allow(unused_imports)]
6
7use fixer::message::Message;
8use fixer::fix_string::FIXString;
9use fixer::errors::MessageRejectErrorEnum;
10use fixer::session::session_id::SessionID;
11
12use rust_decimal::Decimal;
13
14
15use jiff::Timestamp;
16
17use crate::field;
18use crate::tag;
19
20/// `CollateralRequest` is the `fix44` `CollateralRequest` type, `MsgType` = AX.
21pub struct CollateralRequest {
22    pub message: Message,
23}
24
25impl CollateralRequest {
26    /// Creates a new `CollateralRequest` with required fields.
27    pub fn new(coll_req_id: field::CollReqIDField, coll_asgn_reason: field::CollAsgnReasonField, transact_time: field::TransactTimeField) -> Self {
28        let mut msg = Message::new();
29        msg.header.set_field(tag::MSG_TYPE, FIXString::from("AX".to_string()));
30
31        msg.body.set_field(tag::COLL_REQ_ID, coll_req_id.0);
32
33        msg.body.set_field(tag::COLL_ASGN_REASON, coll_asgn_reason.0);
34
35        msg.body.set_field(tag::TRANSACT_TIME, transact_time.0);
36
37        Self { message: msg }
38    }
39
40    /// Creates a `CollateralRequest` 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 `CollAsgnReason`, Tag 895.
474    pub fn set_coll_asgn_reason(&mut self, v: isize) {
475        self.message.body.set_field(tag::COLL_ASGN_REASON, fixer::fix_int::FIXInt::from(v));
476    }
477
478    /// Gets `CollAsgnReason`, Tag 895.
479    pub fn get_coll_asgn_reason(&self) -> Result<isize, MessageRejectErrorEnum> {
480        let mut fld = field::CollAsgnReasonField::new(0);
481        self.message.body.get_field(tag::COLL_ASGN_REASON, &mut fld.0)?;
482        Ok(fld.value())
483    }
484
485
486    /// Returns true if `CollAsgnReason` is present, Tag 895.
487    pub fn has_coll_asgn_reason(&self) -> bool {
488        self.message.body.has(tag::COLL_ASGN_REASON)
489    }
490
491
492
493
494    /// Sets `CollReqID`, Tag 894.
495    pub fn set_coll_req_id(&mut self, v: String) {
496        self.message.body.set_field(tag::COLL_REQ_ID, FIXString::from(v));
497    }
498
499    /// Gets `CollReqID`, Tag 894.
500    pub fn get_coll_req_id(&self) -> Result<String, MessageRejectErrorEnum> {
501        let mut fld = field::CollReqIDField::new(String::new());
502        self.message.body.get_field(tag::COLL_REQ_ID, &mut fld.0)?;
503        Ok(fld.value().to_string())
504    }
505
506
507    /// Returns true if `CollReqID` is present, Tag 894.
508    pub fn has_coll_req_id(&self) -> bool {
509        self.message.body.has(tag::COLL_REQ_ID)
510    }
511
512
513
514
515    /// Sets `ContractMultiplier`, Tag 231.
516    pub fn set_contract_multiplier(&mut self, val: Decimal, scale: i32) {
517        self.message.body.set_field(tag::CONTRACT_MULTIPLIER, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
518    }
519
520    /// Gets `ContractMultiplier`, Tag 231.
521    pub fn get_contract_multiplier(&self) -> Result<Decimal, MessageRejectErrorEnum> {
522        let mut fld = field::ContractMultiplierField::new(Decimal::ZERO, 0);
523        self.message.body.get_field(tag::CONTRACT_MULTIPLIER, &mut fld.0)?;
524        Ok(fld.value())
525    }
526
527
528    /// Returns true if `ContractMultiplier` is present, Tag 231.
529    pub fn has_contract_multiplier(&self) -> bool {
530        self.message.body.has(tag::CONTRACT_MULTIPLIER)
531    }
532
533
534
535
536    /// Sets `ContractSettlMonth`, Tag 667.
537    pub fn set_contract_settl_month(&mut self, v: String) {
538        self.message.body.set_field(tag::CONTRACT_SETTL_MONTH, FIXString::from(v));
539    }
540
541    /// Gets `ContractSettlMonth`, Tag 667.
542    pub fn get_contract_settl_month(&self) -> Result<String, MessageRejectErrorEnum> {
543        let mut fld = field::ContractSettlMonthField::new(String::new());
544        self.message.body.get_field(tag::CONTRACT_SETTL_MONTH, &mut fld.0)?;
545        Ok(fld.value().to_string())
546    }
547
548
549    /// Returns true if `ContractSettlMonth` is present, Tag 667.
550    pub fn has_contract_settl_month(&self) -> bool {
551        self.message.body.has(tag::CONTRACT_SETTL_MONTH)
552    }
553
554
555
556
557    /// Sets `CountryOfIssue`, Tag 470.
558    pub fn set_country_of_issue(&mut self, v: String) {
559        self.message.body.set_field(tag::COUNTRY_OF_ISSUE, FIXString::from(v));
560    }
561
562    /// Gets `CountryOfIssue`, Tag 470.
563    pub fn get_country_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
564        let mut fld = field::CountryOfIssueField::new(String::new());
565        self.message.body.get_field(tag::COUNTRY_OF_ISSUE, &mut fld.0)?;
566        Ok(fld.value().to_string())
567    }
568
569
570    /// Returns true if `CountryOfIssue` is present, Tag 470.
571    pub fn has_country_of_issue(&self) -> bool {
572        self.message.body.has(tag::COUNTRY_OF_ISSUE)
573    }
574
575
576
577
578    /// Sets `CouponPaymentDate`, Tag 224.
579    pub fn set_coupon_payment_date(&mut self, v: String) {
580        self.message.body.set_field(tag::COUPON_PAYMENT_DATE, FIXString::from(v));
581    }
582
583    /// Gets `CouponPaymentDate`, Tag 224.
584    pub fn get_coupon_payment_date(&self) -> Result<String, MessageRejectErrorEnum> {
585        let mut fld = field::CouponPaymentDateField::new(String::new());
586        self.message.body.get_field(tag::COUPON_PAYMENT_DATE, &mut fld.0)?;
587        Ok(fld.value().to_string())
588    }
589
590
591    /// Returns true if `CouponPaymentDate` is present, Tag 224.
592    pub fn has_coupon_payment_date(&self) -> bool {
593        self.message.body.has(tag::COUPON_PAYMENT_DATE)
594    }
595
596
597
598
599    /// Sets `CouponRate`, Tag 223.
600    pub fn set_coupon_rate(&mut self, val: Decimal, scale: i32) {
601        self.message.body.set_field(tag::COUPON_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
602    }
603
604    /// Gets `CouponRate`, Tag 223.
605    pub fn get_coupon_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
606        let mut fld = field::CouponRateField::new(Decimal::ZERO, 0);
607        self.message.body.get_field(tag::COUPON_RATE, &mut fld.0)?;
608        Ok(fld.value())
609    }
610
611
612    /// Returns true if `CouponRate` is present, Tag 223.
613    pub fn has_coupon_rate(&self) -> bool {
614        self.message.body.has(tag::COUPON_RATE)
615    }
616
617
618
619
620    /// Sets `CreditRating`, Tag 255.
621    pub fn set_credit_rating(&mut self, v: String) {
622        self.message.body.set_field(tag::CREDIT_RATING, FIXString::from(v));
623    }
624
625    /// Gets `CreditRating`, Tag 255.
626    pub fn get_credit_rating(&self) -> Result<String, MessageRejectErrorEnum> {
627        let mut fld = field::CreditRatingField::new(String::new());
628        self.message.body.get_field(tag::CREDIT_RATING, &mut fld.0)?;
629        Ok(fld.value().to_string())
630    }
631
632
633    /// Returns true if `CreditRating` is present, Tag 255.
634    pub fn has_credit_rating(&self) -> bool {
635        self.message.body.has(tag::CREDIT_RATING)
636    }
637
638
639
640
641    /// Sets `Currency`, Tag 15.
642    pub fn set_currency(&mut self, v: String) {
643        self.message.body.set_field(tag::CURRENCY, FIXString::from(v));
644    }
645
646    /// Gets `Currency`, Tag 15.
647    pub fn get_currency(&self) -> Result<String, MessageRejectErrorEnum> {
648        let mut fld = field::CurrencyField::new(String::new());
649        self.message.body.get_field(tag::CURRENCY, &mut fld.0)?;
650        Ok(fld.value().to_string())
651    }
652
653
654    /// Returns true if `Currency` is present, Tag 15.
655    pub fn has_currency(&self) -> bool {
656        self.message.body.has(tag::CURRENCY)
657    }
658
659
660
661
662    /// Sets `DatedDate`, Tag 873.
663    pub fn set_dated_date(&mut self, v: String) {
664        self.message.body.set_field(tag::DATED_DATE, FIXString::from(v));
665    }
666
667    /// Gets `DatedDate`, Tag 873.
668    pub fn get_dated_date(&self) -> Result<String, MessageRejectErrorEnum> {
669        let mut fld = field::DatedDateField::new(String::new());
670        self.message.body.get_field(tag::DATED_DATE, &mut fld.0)?;
671        Ok(fld.value().to_string())
672    }
673
674
675    /// Returns true if `DatedDate` is present, Tag 873.
676    pub fn has_dated_date(&self) -> bool {
677        self.message.body.has(tag::DATED_DATE)
678    }
679
680
681
682
683    /// Sets `DeliveryType`, Tag 919.
684    pub fn set_delivery_type(&mut self, v: isize) {
685        self.message.body.set_field(tag::DELIVERY_TYPE, fixer::fix_int::FIXInt::from(v));
686    }
687
688    /// Gets `DeliveryType`, Tag 919.
689    pub fn get_delivery_type(&self) -> Result<isize, MessageRejectErrorEnum> {
690        let mut fld = field::DeliveryTypeField::new(0);
691        self.message.body.get_field(tag::DELIVERY_TYPE, &mut fld.0)?;
692        Ok(fld.value())
693    }
694
695
696    /// Returns true if `DeliveryType` is present, Tag 919.
697    pub fn has_delivery_type(&self) -> bool {
698        self.message.body.has(tag::DELIVERY_TYPE)
699    }
700
701
702
703
704    /// Sets `EncodedIssuer`, Tag 349.
705    pub fn set_encoded_issuer(&mut self, v: String) {
706        self.message.body.set_field(tag::ENCODED_ISSUER, FIXString::from(v));
707    }
708
709    /// Gets `EncodedIssuer`, Tag 349.
710    pub fn get_encoded_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
711        let mut fld = field::EncodedIssuerField::new(String::new());
712        self.message.body.get_field(tag::ENCODED_ISSUER, &mut fld.0)?;
713        Ok(fld.value().to_string())
714    }
715
716
717    /// Returns true if `EncodedIssuer` is present, Tag 349.
718    pub fn has_encoded_issuer(&self) -> bool {
719        self.message.body.has(tag::ENCODED_ISSUER)
720    }
721
722
723
724
725    /// Sets `EncodedIssuerLen`, Tag 348.
726    pub fn set_encoded_issuer_len(&mut self, v: isize) {
727        self.message.body.set_field(tag::ENCODED_ISSUER_LEN, fixer::fix_int::FIXInt::from(v));
728    }
729
730    /// Gets `EncodedIssuerLen`, Tag 348.
731    pub fn get_encoded_issuer_len(&self) -> Result<isize, MessageRejectErrorEnum> {
732        let mut fld = field::EncodedIssuerLenField::new(0);
733        self.message.body.get_field(tag::ENCODED_ISSUER_LEN, &mut fld.0)?;
734        Ok(fld.value())
735    }
736
737
738    /// Returns true if `EncodedIssuerLen` is present, Tag 348.
739    pub fn has_encoded_issuer_len(&self) -> bool {
740        self.message.body.has(tag::ENCODED_ISSUER_LEN)
741    }
742
743
744
745
746    /// Sets `EncodedSecurityDesc`, Tag 351.
747    pub fn set_encoded_security_desc(&mut self, v: String) {
748        self.message.body.set_field(tag::ENCODED_SECURITY_DESC, FIXString::from(v));
749    }
750
751    /// Gets `EncodedSecurityDesc`, Tag 351.
752    pub fn get_encoded_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
753        let mut fld = field::EncodedSecurityDescField::new(String::new());
754        self.message.body.get_field(tag::ENCODED_SECURITY_DESC, &mut fld.0)?;
755        Ok(fld.value().to_string())
756    }
757
758
759    /// Returns true if `EncodedSecurityDesc` is present, Tag 351.
760    pub fn has_encoded_security_desc(&self) -> bool {
761        self.message.body.has(tag::ENCODED_SECURITY_DESC)
762    }
763
764
765
766
767    /// Sets `EncodedSecurityDescLen`, Tag 350.
768    pub fn set_encoded_security_desc_len(&mut self, v: isize) {
769        self.message.body.set_field(tag::ENCODED_SECURITY_DESC_LEN, fixer::fix_int::FIXInt::from(v));
770    }
771
772    /// Gets `EncodedSecurityDescLen`, Tag 350.
773    pub fn get_encoded_security_desc_len(&self) -> Result<isize, MessageRejectErrorEnum> {
774        let mut fld = field::EncodedSecurityDescLenField::new(0);
775        self.message.body.get_field(tag::ENCODED_SECURITY_DESC_LEN, &mut fld.0)?;
776        Ok(fld.value())
777    }
778
779
780    /// Returns true if `EncodedSecurityDescLen` is present, Tag 350.
781    pub fn has_encoded_security_desc_len(&self) -> bool {
782        self.message.body.has(tag::ENCODED_SECURITY_DESC_LEN)
783    }
784
785
786
787
788    /// Sets `EncodedText`, Tag 355.
789    pub fn set_encoded_text(&mut self, v: String) {
790        self.message.body.set_field(tag::ENCODED_TEXT, FIXString::from(v));
791    }
792
793    /// Gets `EncodedText`, Tag 355.
794    pub fn get_encoded_text(&self) -> Result<String, MessageRejectErrorEnum> {
795        let mut fld = field::EncodedTextField::new(String::new());
796        self.message.body.get_field(tag::ENCODED_TEXT, &mut fld.0)?;
797        Ok(fld.value().to_string())
798    }
799
800
801    /// Returns true if `EncodedText` is present, Tag 355.
802    pub fn has_encoded_text(&self) -> bool {
803        self.message.body.has(tag::ENCODED_TEXT)
804    }
805
806
807
808
809    /// Sets `EncodedTextLen`, Tag 354.
810    pub fn set_encoded_text_len(&mut self, v: isize) {
811        self.message.body.set_field(tag::ENCODED_TEXT_LEN, fixer::fix_int::FIXInt::from(v));
812    }
813
814    /// Gets `EncodedTextLen`, Tag 354.
815    pub fn get_encoded_text_len(&self) -> Result<isize, MessageRejectErrorEnum> {
816        let mut fld = field::EncodedTextLenField::new(0);
817        self.message.body.get_field(tag::ENCODED_TEXT_LEN, &mut fld.0)?;
818        Ok(fld.value())
819    }
820
821
822    /// Returns true if `EncodedTextLen` is present, Tag 354.
823    pub fn has_encoded_text_len(&self) -> bool {
824        self.message.body.has(tag::ENCODED_TEXT_LEN)
825    }
826
827
828
829
830    /// Sets `EndAccruedInterestAmt`, Tag 920.
831    pub fn set_end_accrued_interest_amt(&mut self, val: Decimal, scale: i32) {
832        self.message.body.set_field(tag::END_ACCRUED_INTEREST_AMT, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
833    }
834
835    /// Gets `EndAccruedInterestAmt`, Tag 920.
836    pub fn get_end_accrued_interest_amt(&self) -> Result<Decimal, MessageRejectErrorEnum> {
837        let mut fld = field::EndAccruedInterestAmtField::new(Decimal::ZERO, 0);
838        self.message.body.get_field(tag::END_ACCRUED_INTEREST_AMT, &mut fld.0)?;
839        Ok(fld.value())
840    }
841
842
843    /// Returns true if `EndAccruedInterestAmt` is present, Tag 920.
844    pub fn has_end_accrued_interest_amt(&self) -> bool {
845        self.message.body.has(tag::END_ACCRUED_INTEREST_AMT)
846    }
847
848
849
850
851    /// Sets `EndCash`, Tag 922.
852    pub fn set_end_cash(&mut self, val: Decimal, scale: i32) {
853        self.message.body.set_field(tag::END_CASH, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
854    }
855
856    /// Gets `EndCash`, Tag 922.
857    pub fn get_end_cash(&self) -> Result<Decimal, MessageRejectErrorEnum> {
858        let mut fld = field::EndCashField::new(Decimal::ZERO, 0);
859        self.message.body.get_field(tag::END_CASH, &mut fld.0)?;
860        Ok(fld.value())
861    }
862
863
864    /// Returns true if `EndCash` is present, Tag 922.
865    pub fn has_end_cash(&self) -> bool {
866        self.message.body.has(tag::END_CASH)
867    }
868
869
870
871
872    /// Sets `EndDate`, Tag 917.
873    pub fn set_end_date(&mut self, v: String) {
874        self.message.body.set_field(tag::END_DATE, FIXString::from(v));
875    }
876
877    /// Gets `EndDate`, Tag 917.
878    pub fn get_end_date(&self) -> Result<String, MessageRejectErrorEnum> {
879        let mut fld = field::EndDateField::new(String::new());
880        self.message.body.get_field(tag::END_DATE, &mut fld.0)?;
881        Ok(fld.value().to_string())
882    }
883
884
885    /// Returns true if `EndDate` is present, Tag 917.
886    pub fn has_end_date(&self) -> bool {
887        self.message.body.has(tag::END_DATE)
888    }
889
890
891
892
893    /// Sets `ExpireTime`, Tag 126.
894    pub fn set_expire_time(&mut self, v: Timestamp) {
895        self.message.body.set_field(tag::EXPIRE_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
896            time: v,
897            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
898        });
899    }
900
901    /// Gets `ExpireTime`, Tag 126.
902    pub fn get_expire_time(&self) -> Result<Timestamp, MessageRejectErrorEnum> {
903        let mut fld = field::ExpireTimeField::new(Timestamp::UNIX_EPOCH);
904        self.message.body.get_field(tag::EXPIRE_TIME, &mut fld.0)?;
905        Ok(fld.value())
906    }
907
908
909    /// Returns true if `ExpireTime` is present, Tag 126.
910    pub fn has_expire_time(&self) -> bool {
911        self.message.body.has(tag::EXPIRE_TIME)
912    }
913
914
915
916
917    /// Sets `Factor`, Tag 228.
918    pub fn set_factor(&mut self, val: Decimal, scale: i32) {
919        self.message.body.set_field(tag::FACTOR, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
920    }
921
922    /// Gets `Factor`, Tag 228.
923    pub fn get_factor(&self) -> Result<Decimal, MessageRejectErrorEnum> {
924        let mut fld = field::FactorField::new(Decimal::ZERO, 0);
925        self.message.body.get_field(tag::FACTOR, &mut fld.0)?;
926        Ok(fld.value())
927    }
928
929
930    /// Returns true if `Factor` is present, Tag 228.
931    pub fn has_factor(&self) -> bool {
932        self.message.body.has(tag::FACTOR)
933    }
934
935
936
937
938    /// Sets `InstrRegistry`, Tag 543.
939    pub fn set_instr_registry(&mut self, v: String) {
940        self.message.body.set_field(tag::INSTR_REGISTRY, FIXString::from(v));
941    }
942
943    /// Gets `InstrRegistry`, Tag 543.
944    pub fn get_instr_registry(&self) -> Result<String, MessageRejectErrorEnum> {
945        let mut fld = field::InstrRegistryField::new(String::new());
946        self.message.body.get_field(tag::INSTR_REGISTRY, &mut fld.0)?;
947        Ok(fld.value().to_string())
948    }
949
950
951    /// Returns true if `InstrRegistry` is present, Tag 543.
952    pub fn has_instr_registry(&self) -> bool {
953        self.message.body.has(tag::INSTR_REGISTRY)
954    }
955
956
957
958
959    /// Sets `InterestAccrualDate`, Tag 874.
960    pub fn set_interest_accrual_date(&mut self, v: String) {
961        self.message.body.set_field(tag::INTEREST_ACCRUAL_DATE, FIXString::from(v));
962    }
963
964    /// Gets `InterestAccrualDate`, Tag 874.
965    pub fn get_interest_accrual_date(&self) -> Result<String, MessageRejectErrorEnum> {
966        let mut fld = field::InterestAccrualDateField::new(String::new());
967        self.message.body.get_field(tag::INTEREST_ACCRUAL_DATE, &mut fld.0)?;
968        Ok(fld.value().to_string())
969    }
970
971
972    /// Returns true if `InterestAccrualDate` is present, Tag 874.
973    pub fn has_interest_accrual_date(&self) -> bool {
974        self.message.body.has(tag::INTEREST_ACCRUAL_DATE)
975    }
976
977
978
979
980    /// Sets `IssueDate`, Tag 225.
981    pub fn set_issue_date(&mut self, v: String) {
982        self.message.body.set_field(tag::ISSUE_DATE, FIXString::from(v));
983    }
984
985    /// Gets `IssueDate`, Tag 225.
986    pub fn get_issue_date(&self) -> Result<String, MessageRejectErrorEnum> {
987        let mut fld = field::IssueDateField::new(String::new());
988        self.message.body.get_field(tag::ISSUE_DATE, &mut fld.0)?;
989        Ok(fld.value().to_string())
990    }
991
992
993    /// Returns true if `IssueDate` is present, Tag 225.
994    pub fn has_issue_date(&self) -> bool {
995        self.message.body.has(tag::ISSUE_DATE)
996    }
997
998
999
1000
1001    /// Sets `Issuer`, Tag 106.
1002    pub fn set_issuer(&mut self, v: String) {
1003        self.message.body.set_field(tag::ISSUER, FIXString::from(v));
1004    }
1005
1006    /// Gets `Issuer`, Tag 106.
1007    pub fn get_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
1008        let mut fld = field::IssuerField::new(String::new());
1009        self.message.body.get_field(tag::ISSUER, &mut fld.0)?;
1010        Ok(fld.value().to_string())
1011    }
1012
1013
1014    /// Returns true if `Issuer` is present, Tag 106.
1015    pub fn has_issuer(&self) -> bool {
1016        self.message.body.has(tag::ISSUER)
1017    }
1018
1019
1020
1021
1022    /// Sets `LocaleOfIssue`, Tag 472.
1023    pub fn set_locale_of_issue(&mut self, v: String) {
1024        self.message.body.set_field(tag::LOCALE_OF_ISSUE, FIXString::from(v));
1025    }
1026
1027    /// Gets `LocaleOfIssue`, Tag 472.
1028    pub fn get_locale_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
1029        let mut fld = field::LocaleOfIssueField::new(String::new());
1030        self.message.body.get_field(tag::LOCALE_OF_ISSUE, &mut fld.0)?;
1031        Ok(fld.value().to_string())
1032    }
1033
1034
1035    /// Returns true if `LocaleOfIssue` is present, Tag 472.
1036    pub fn has_locale_of_issue(&self) -> bool {
1037        self.message.body.has(tag::LOCALE_OF_ISSUE)
1038    }
1039
1040
1041
1042
1043    /// Sets `MarginExcess`, Tag 899.
1044    pub fn set_margin_excess(&mut self, val: Decimal, scale: i32) {
1045        self.message.body.set_field(tag::MARGIN_EXCESS, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1046    }
1047
1048    /// Gets `MarginExcess`, Tag 899.
1049    pub fn get_margin_excess(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1050        let mut fld = field::MarginExcessField::new(Decimal::ZERO, 0);
1051        self.message.body.get_field(tag::MARGIN_EXCESS, &mut fld.0)?;
1052        Ok(fld.value())
1053    }
1054
1055
1056    /// Returns true if `MarginExcess` is present, Tag 899.
1057    pub fn has_margin_excess(&self) -> bool {
1058        self.message.body.has(tag::MARGIN_EXCESS)
1059    }
1060
1061
1062
1063
1064    /// Sets `MarginRatio`, Tag 898.
1065    pub fn set_margin_ratio(&mut self, val: Decimal, scale: i32) {
1066        self.message.body.set_field(tag::MARGIN_RATIO, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1067    }
1068
1069    /// Gets `MarginRatio`, Tag 898.
1070    pub fn get_margin_ratio(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1071        let mut fld = field::MarginRatioField::new(Decimal::ZERO, 0);
1072        self.message.body.get_field(tag::MARGIN_RATIO, &mut fld.0)?;
1073        Ok(fld.value())
1074    }
1075
1076
1077    /// Returns true if `MarginRatio` is present, Tag 898.
1078    pub fn has_margin_ratio(&self) -> bool {
1079        self.message.body.has(tag::MARGIN_RATIO)
1080    }
1081
1082
1083
1084
1085    /// Sets `MaturityDate`, Tag 541.
1086    pub fn set_maturity_date(&mut self, v: String) {
1087        self.message.body.set_field(tag::MATURITY_DATE, FIXString::from(v));
1088    }
1089
1090    /// Gets `MaturityDate`, Tag 541.
1091    pub fn get_maturity_date(&self) -> Result<String, MessageRejectErrorEnum> {
1092        let mut fld = field::MaturityDateField::new(String::new());
1093        self.message.body.get_field(tag::MATURITY_DATE, &mut fld.0)?;
1094        Ok(fld.value().to_string())
1095    }
1096
1097
1098    /// Returns true if `MaturityDate` is present, Tag 541.
1099    pub fn has_maturity_date(&self) -> bool {
1100        self.message.body.has(tag::MATURITY_DATE)
1101    }
1102
1103
1104
1105
1106    /// Sets `MaturityMonthYear`, Tag 200.
1107    pub fn set_maturity_month_year(&mut self, v: String) {
1108        self.message.body.set_field(tag::MATURITY_MONTH_YEAR, FIXString::from(v));
1109    }
1110
1111    /// Gets `MaturityMonthYear`, Tag 200.
1112    pub fn get_maturity_month_year(&self) -> Result<String, MessageRejectErrorEnum> {
1113        let mut fld = field::MaturityMonthYearField::new(String::new());
1114        self.message.body.get_field(tag::MATURITY_MONTH_YEAR, &mut fld.0)?;
1115        Ok(fld.value().to_string())
1116    }
1117
1118
1119    /// Returns true if `MaturityMonthYear` is present, Tag 200.
1120    pub fn has_maturity_month_year(&self) -> bool {
1121        self.message.body.has(tag::MATURITY_MONTH_YEAR)
1122    }
1123
1124
1125
1126
1127    /// Sets `NoEvents`, Tag 864.
1128    pub fn set_no_events(&mut self, v: isize) {
1129        self.message.body.set_field(tag::NO_EVENTS, fixer::fix_int::FIXInt::from(v));
1130    }
1131
1132    /// Gets `NoEvents`, Tag 864.
1133    pub fn get_no_events(&self) -> Result<isize, MessageRejectErrorEnum> {
1134        let mut fld = field::NoEventsField::new(0);
1135        self.message.body.get_field(tag::NO_EVENTS, &mut fld.0)?;
1136        Ok(fld.value())
1137    }
1138
1139
1140    /// Returns true if `NoEvents` is present, Tag 864.
1141    pub fn has_no_events(&self) -> bool {
1142        self.message.body.has(tag::NO_EVENTS)
1143    }
1144
1145
1146
1147
1148    /// Sets `NoExecs`, Tag 124.
1149    pub fn set_no_execs(&mut self, v: isize) {
1150        self.message.body.set_field(tag::NO_EXECS, fixer::fix_int::FIXInt::from(v));
1151    }
1152
1153    /// Gets `NoExecs`, Tag 124.
1154    pub fn get_no_execs(&self) -> Result<isize, MessageRejectErrorEnum> {
1155        let mut fld = field::NoExecsField::new(0);
1156        self.message.body.get_field(tag::NO_EXECS, &mut fld.0)?;
1157        Ok(fld.value())
1158    }
1159
1160
1161    /// Returns true if `NoExecs` is present, Tag 124.
1162    pub fn has_no_execs(&self) -> bool {
1163        self.message.body.has(tag::NO_EXECS)
1164    }
1165
1166
1167
1168
1169    /// Sets `NoLegs`, Tag 555.
1170    pub fn set_no_legs(&mut self, v: isize) {
1171        self.message.body.set_field(tag::NO_LEGS, fixer::fix_int::FIXInt::from(v));
1172    }
1173
1174    /// Gets `NoLegs`, Tag 555.
1175    pub fn get_no_legs(&self) -> Result<isize, MessageRejectErrorEnum> {
1176        let mut fld = field::NoLegsField::new(0);
1177        self.message.body.get_field(tag::NO_LEGS, &mut fld.0)?;
1178        Ok(fld.value())
1179    }
1180
1181
1182    /// Returns true if `NoLegs` is present, Tag 555.
1183    pub fn has_no_legs(&self) -> bool {
1184        self.message.body.has(tag::NO_LEGS)
1185    }
1186
1187
1188
1189
1190    /// Sets `NoMiscFees`, Tag 136.
1191    pub fn set_no_misc_fees(&mut self, v: isize) {
1192        self.message.body.set_field(tag::NO_MISC_FEES, fixer::fix_int::FIXInt::from(v));
1193    }
1194
1195    /// Gets `NoMiscFees`, Tag 136.
1196    pub fn get_no_misc_fees(&self) -> Result<isize, MessageRejectErrorEnum> {
1197        let mut fld = field::NoMiscFeesField::new(0);
1198        self.message.body.get_field(tag::NO_MISC_FEES, &mut fld.0)?;
1199        Ok(fld.value())
1200    }
1201
1202
1203    /// Returns true if `NoMiscFees` is present, Tag 136.
1204    pub fn has_no_misc_fees(&self) -> bool {
1205        self.message.body.has(tag::NO_MISC_FEES)
1206    }
1207
1208
1209
1210
1211    /// Sets `NoPartyIDs`, Tag 453.
1212    pub fn set_no_party_i_ds(&mut self, v: isize) {
1213        self.message.body.set_field(tag::NO_PARTY_I_DS, fixer::fix_int::FIXInt::from(v));
1214    }
1215
1216    /// Gets `NoPartyIDs`, Tag 453.
1217    pub fn get_no_party_i_ds(&self) -> Result<isize, MessageRejectErrorEnum> {
1218        let mut fld = field::NoPartyIDsField::new(0);
1219        self.message.body.get_field(tag::NO_PARTY_I_DS, &mut fld.0)?;
1220        Ok(fld.value())
1221    }
1222
1223
1224    /// Returns true if `NoPartyIDs` is present, Tag 453.
1225    pub fn has_no_party_i_ds(&self) -> bool {
1226        self.message.body.has(tag::NO_PARTY_I_DS)
1227    }
1228
1229
1230
1231
1232    /// Sets `NoSecurityAltID`, Tag 454.
1233    pub fn set_no_security_alt_id(&mut self, v: isize) {
1234        self.message.body.set_field(tag::NO_SECURITY_ALT_ID, fixer::fix_int::FIXInt::from(v));
1235    }
1236
1237    /// Gets `NoSecurityAltID`, Tag 454.
1238    pub fn get_no_security_alt_id(&self) -> Result<isize, MessageRejectErrorEnum> {
1239        let mut fld = field::NoSecurityAltIDField::new(0);
1240        self.message.body.get_field(tag::NO_SECURITY_ALT_ID, &mut fld.0)?;
1241        Ok(fld.value())
1242    }
1243
1244
1245    /// Returns true if `NoSecurityAltID` is present, Tag 454.
1246    pub fn has_no_security_alt_id(&self) -> bool {
1247        self.message.body.has(tag::NO_SECURITY_ALT_ID)
1248    }
1249
1250
1251
1252
1253    /// Sets `NoStipulations`, Tag 232.
1254    pub fn set_no_stipulations(&mut self, v: isize) {
1255        self.message.body.set_field(tag::NO_STIPULATIONS, fixer::fix_int::FIXInt::from(v));
1256    }
1257
1258    /// Gets `NoStipulations`, Tag 232.
1259    pub fn get_no_stipulations(&self) -> Result<isize, MessageRejectErrorEnum> {
1260        let mut fld = field::NoStipulationsField::new(0);
1261        self.message.body.get_field(tag::NO_STIPULATIONS, &mut fld.0)?;
1262        Ok(fld.value())
1263    }
1264
1265
1266    /// Returns true if `NoStipulations` is present, Tag 232.
1267    pub fn has_no_stipulations(&self) -> bool {
1268        self.message.body.has(tag::NO_STIPULATIONS)
1269    }
1270
1271
1272
1273
1274    /// Sets `NoTrades`, Tag 897.
1275    pub fn set_no_trades(&mut self, v: isize) {
1276        self.message.body.set_field(tag::NO_TRADES, fixer::fix_int::FIXInt::from(v));
1277    }
1278
1279    /// Gets `NoTrades`, Tag 897.
1280    pub fn get_no_trades(&self) -> Result<isize, MessageRejectErrorEnum> {
1281        let mut fld = field::NoTradesField::new(0);
1282        self.message.body.get_field(tag::NO_TRADES, &mut fld.0)?;
1283        Ok(fld.value())
1284    }
1285
1286
1287    /// Returns true if `NoTrades` is present, Tag 897.
1288    pub fn has_no_trades(&self) -> bool {
1289        self.message.body.has(tag::NO_TRADES)
1290    }
1291
1292
1293
1294
1295    /// Sets `NoTrdRegTimestamps`, Tag 768.
1296    pub fn set_no_trd_reg_timestamps(&mut self, v: isize) {
1297        self.message.body.set_field(tag::NO_TRD_REG_TIMESTAMPS, fixer::fix_int::FIXInt::from(v));
1298    }
1299
1300    /// Gets `NoTrdRegTimestamps`, Tag 768.
1301    pub fn get_no_trd_reg_timestamps(&self) -> Result<isize, MessageRejectErrorEnum> {
1302        let mut fld = field::NoTrdRegTimestampsField::new(0);
1303        self.message.body.get_field(tag::NO_TRD_REG_TIMESTAMPS, &mut fld.0)?;
1304        Ok(fld.value())
1305    }
1306
1307
1308    /// Returns true if `NoTrdRegTimestamps` is present, Tag 768.
1309    pub fn has_no_trd_reg_timestamps(&self) -> bool {
1310        self.message.body.has(tag::NO_TRD_REG_TIMESTAMPS)
1311    }
1312
1313
1314
1315
1316    /// Sets `NoUnderlyings`, Tag 711.
1317    pub fn set_no_underlyings(&mut self, v: isize) {
1318        self.message.body.set_field(tag::NO_UNDERLYINGS, fixer::fix_int::FIXInt::from(v));
1319    }
1320
1321    /// Gets `NoUnderlyings`, Tag 711.
1322    pub fn get_no_underlyings(&self) -> Result<isize, MessageRejectErrorEnum> {
1323        let mut fld = field::NoUnderlyingsField::new(0);
1324        self.message.body.get_field(tag::NO_UNDERLYINGS, &mut fld.0)?;
1325        Ok(fld.value())
1326    }
1327
1328
1329    /// Returns true if `NoUnderlyings` is present, Tag 711.
1330    pub fn has_no_underlyings(&self) -> bool {
1331        self.message.body.has(tag::NO_UNDERLYINGS)
1332    }
1333
1334
1335
1336
1337    /// Sets `OptAttribute`, Tag 206.
1338    pub fn set_opt_attribute(&mut self, v: String) {
1339        self.message.body.set_field(tag::OPT_ATTRIBUTE, FIXString::from(v));
1340    }
1341
1342    /// Gets `OptAttribute`, Tag 206.
1343    pub fn get_opt_attribute(&self) -> Result<String, MessageRejectErrorEnum> {
1344        let mut fld = field::OptAttributeField::new(String::new());
1345        self.message.body.get_field(tag::OPT_ATTRIBUTE, &mut fld.0)?;
1346        Ok(fld.value().to_string())
1347    }
1348
1349
1350    /// Returns true if `OptAttribute` is present, Tag 206.
1351    pub fn has_opt_attribute(&self) -> bool {
1352        self.message.body.has(tag::OPT_ATTRIBUTE)
1353    }
1354
1355
1356
1357
1358    /// Sets `OrderID`, Tag 37.
1359    pub fn set_order_id(&mut self, v: String) {
1360        self.message.body.set_field(tag::ORDER_ID, FIXString::from(v));
1361    }
1362
1363    /// Gets `OrderID`, Tag 37.
1364    pub fn get_order_id(&self) -> Result<String, MessageRejectErrorEnum> {
1365        let mut fld = field::OrderIDField::new(String::new());
1366        self.message.body.get_field(tag::ORDER_ID, &mut fld.0)?;
1367        Ok(fld.value().to_string())
1368    }
1369
1370
1371    /// Returns true if `OrderID` is present, Tag 37.
1372    pub fn has_order_id(&self) -> bool {
1373        self.message.body.has(tag::ORDER_ID)
1374    }
1375
1376
1377
1378
1379    /// Sets `Pool`, Tag 691.
1380    pub fn set_pool(&mut self, v: String) {
1381        self.message.body.set_field(tag::POOL, FIXString::from(v));
1382    }
1383
1384    /// Gets `Pool`, Tag 691.
1385    pub fn get_pool(&self) -> Result<String, MessageRejectErrorEnum> {
1386        let mut fld = field::PoolField::new(String::new());
1387        self.message.body.get_field(tag::POOL, &mut fld.0)?;
1388        Ok(fld.value().to_string())
1389    }
1390
1391
1392    /// Returns true if `Pool` is present, Tag 691.
1393    pub fn has_pool(&self) -> bool {
1394        self.message.body.has(tag::POOL)
1395    }
1396
1397
1398
1399
1400    /// Sets `Price`, Tag 44.
1401    pub fn set_price(&mut self, val: Decimal, scale: i32) {
1402        self.message.body.set_field(tag::PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1403    }
1404
1405    /// Gets `Price`, Tag 44.
1406    pub fn get_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1407        let mut fld = field::PriceField::new(Decimal::ZERO, 0);
1408        self.message.body.get_field(tag::PRICE, &mut fld.0)?;
1409        Ok(fld.value())
1410    }
1411
1412
1413    /// Returns true if `Price` is present, Tag 44.
1414    pub fn has_price(&self) -> bool {
1415        self.message.body.has(tag::PRICE)
1416    }
1417
1418
1419
1420
1421    /// Sets `PriceType`, Tag 423.
1422    pub fn set_price_type(&mut self, v: isize) {
1423        self.message.body.set_field(tag::PRICE_TYPE, fixer::fix_int::FIXInt::from(v));
1424    }
1425
1426    /// Gets `PriceType`, Tag 423.
1427    pub fn get_price_type(&self) -> Result<isize, MessageRejectErrorEnum> {
1428        let mut fld = field::PriceTypeField::new(0);
1429        self.message.body.get_field(tag::PRICE_TYPE, &mut fld.0)?;
1430        Ok(fld.value())
1431    }
1432
1433
1434    /// Returns true if `PriceType` is present, Tag 423.
1435    pub fn has_price_type(&self) -> bool {
1436        self.message.body.has(tag::PRICE_TYPE)
1437    }
1438
1439
1440
1441
1442    /// Sets `Product`, Tag 460.
1443    pub fn set_product(&mut self, v: isize) {
1444        self.message.body.set_field(tag::PRODUCT, fixer::fix_int::FIXInt::from(v));
1445    }
1446
1447    /// Gets `Product`, Tag 460.
1448    pub fn get_product(&self) -> Result<isize, MessageRejectErrorEnum> {
1449        let mut fld = field::ProductField::new(0);
1450        self.message.body.get_field(tag::PRODUCT, &mut fld.0)?;
1451        Ok(fld.value())
1452    }
1453
1454
1455    /// Returns true if `Product` is present, Tag 460.
1456    pub fn has_product(&self) -> bool {
1457        self.message.body.has(tag::PRODUCT)
1458    }
1459
1460
1461
1462
1463    /// Sets `QtyType`, Tag 854.
1464    pub fn set_qty_type(&mut self, v: isize) {
1465        self.message.body.set_field(tag::QTY_TYPE, fixer::fix_int::FIXInt::from(v));
1466    }
1467
1468    /// Gets `QtyType`, Tag 854.
1469    pub fn get_qty_type(&self) -> Result<isize, MessageRejectErrorEnum> {
1470        let mut fld = field::QtyTypeField::new(0);
1471        self.message.body.get_field(tag::QTY_TYPE, &mut fld.0)?;
1472        Ok(fld.value())
1473    }
1474
1475
1476    /// Returns true if `QtyType` is present, Tag 854.
1477    pub fn has_qty_type(&self) -> bool {
1478        self.message.body.has(tag::QTY_TYPE)
1479    }
1480
1481
1482
1483
1484    /// Sets `Quantity`, Tag 53.
1485    pub fn set_quantity(&mut self, val: Decimal, scale: i32) {
1486        self.message.body.set_field(tag::QUANTITY, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1487    }
1488
1489    /// Gets `Quantity`, Tag 53.
1490    pub fn get_quantity(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1491        let mut fld = field::QuantityField::new(Decimal::ZERO, 0);
1492        self.message.body.get_field(tag::QUANTITY, &mut fld.0)?;
1493        Ok(fld.value())
1494    }
1495
1496
1497    /// Returns true if `Quantity` is present, Tag 53.
1498    pub fn has_quantity(&self) -> bool {
1499        self.message.body.has(tag::QUANTITY)
1500    }
1501
1502
1503
1504
1505    /// Sets `RedemptionDate`, Tag 240.
1506    pub fn set_redemption_date(&mut self, v: String) {
1507        self.message.body.set_field(tag::REDEMPTION_DATE, FIXString::from(v));
1508    }
1509
1510    /// Gets `RedemptionDate`, Tag 240.
1511    pub fn get_redemption_date(&self) -> Result<String, MessageRejectErrorEnum> {
1512        let mut fld = field::RedemptionDateField::new(String::new());
1513        self.message.body.get_field(tag::REDEMPTION_DATE, &mut fld.0)?;
1514        Ok(fld.value().to_string())
1515    }
1516
1517
1518    /// Returns true if `RedemptionDate` is present, Tag 240.
1519    pub fn has_redemption_date(&self) -> bool {
1520        self.message.body.has(tag::REDEMPTION_DATE)
1521    }
1522
1523
1524
1525
1526    /// Sets `RepoCollateralSecurityType`, Tag 239.
1527    pub fn set_repo_collateral_security_type(&mut self, v: isize) {
1528        self.message.body.set_field(tag::REPO_COLLATERAL_SECURITY_TYPE, fixer::fix_int::FIXInt::from(v));
1529    }
1530
1531    /// Gets `RepoCollateralSecurityType`, Tag 239.
1532    pub fn get_repo_collateral_security_type(&self) -> Result<isize, MessageRejectErrorEnum> {
1533        let mut fld = field::RepoCollateralSecurityTypeField::new(0);
1534        self.message.body.get_field(tag::REPO_COLLATERAL_SECURITY_TYPE, &mut fld.0)?;
1535        Ok(fld.value())
1536    }
1537
1538
1539    /// Returns true if `RepoCollateralSecurityType` is present, Tag 239.
1540    pub fn has_repo_collateral_security_type(&self) -> bool {
1541        self.message.body.has(tag::REPO_COLLATERAL_SECURITY_TYPE)
1542    }
1543
1544
1545
1546
1547    /// Sets `RepurchaseRate`, Tag 227.
1548    pub fn set_repurchase_rate(&mut self, val: Decimal, scale: i32) {
1549        self.message.body.set_field(tag::REPURCHASE_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1550    }
1551
1552    /// Gets `RepurchaseRate`, Tag 227.
1553    pub fn get_repurchase_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1554        let mut fld = field::RepurchaseRateField::new(Decimal::ZERO, 0);
1555        self.message.body.get_field(tag::REPURCHASE_RATE, &mut fld.0)?;
1556        Ok(fld.value())
1557    }
1558
1559
1560    /// Returns true if `RepurchaseRate` is present, Tag 227.
1561    pub fn has_repurchase_rate(&self) -> bool {
1562        self.message.body.has(tag::REPURCHASE_RATE)
1563    }
1564
1565
1566
1567
1568    /// Sets `RepurchaseTerm`, Tag 226.
1569    pub fn set_repurchase_term(&mut self, v: isize) {
1570        self.message.body.set_field(tag::REPURCHASE_TERM, fixer::fix_int::FIXInt::from(v));
1571    }
1572
1573    /// Gets `RepurchaseTerm`, Tag 226.
1574    pub fn get_repurchase_term(&self) -> Result<isize, MessageRejectErrorEnum> {
1575        let mut fld = field::RepurchaseTermField::new(0);
1576        self.message.body.get_field(tag::REPURCHASE_TERM, &mut fld.0)?;
1577        Ok(fld.value())
1578    }
1579
1580
1581    /// Returns true if `RepurchaseTerm` is present, Tag 226.
1582    pub fn has_repurchase_term(&self) -> bool {
1583        self.message.body.has(tag::REPURCHASE_TERM)
1584    }
1585
1586
1587
1588
1589    /// Sets `SecondaryClOrdID`, Tag 526.
1590    pub fn set_secondary_cl_ord_id(&mut self, v: String) {
1591        self.message.body.set_field(tag::SECONDARY_CL_ORD_ID, FIXString::from(v));
1592    }
1593
1594    /// Gets `SecondaryClOrdID`, Tag 526.
1595    pub fn get_secondary_cl_ord_id(&self) -> Result<String, MessageRejectErrorEnum> {
1596        let mut fld = field::SecondaryClOrdIDField::new(String::new());
1597        self.message.body.get_field(tag::SECONDARY_CL_ORD_ID, &mut fld.0)?;
1598        Ok(fld.value().to_string())
1599    }
1600
1601
1602    /// Returns true if `SecondaryClOrdID` is present, Tag 526.
1603    pub fn has_secondary_cl_ord_id(&self) -> bool {
1604        self.message.body.has(tag::SECONDARY_CL_ORD_ID)
1605    }
1606
1607
1608
1609
1610    /// Sets `SecondaryOrderID`, Tag 198.
1611    pub fn set_secondary_order_id(&mut self, v: String) {
1612        self.message.body.set_field(tag::SECONDARY_ORDER_ID, FIXString::from(v));
1613    }
1614
1615    /// Gets `SecondaryOrderID`, Tag 198.
1616    pub fn get_secondary_order_id(&self) -> Result<String, MessageRejectErrorEnum> {
1617        let mut fld = field::SecondaryOrderIDField::new(String::new());
1618        self.message.body.get_field(tag::SECONDARY_ORDER_ID, &mut fld.0)?;
1619        Ok(fld.value().to_string())
1620    }
1621
1622
1623    /// Returns true if `SecondaryOrderID` is present, Tag 198.
1624    pub fn has_secondary_order_id(&self) -> bool {
1625        self.message.body.has(tag::SECONDARY_ORDER_ID)
1626    }
1627
1628
1629
1630
1631    /// Sets `SecurityDesc`, Tag 107.
1632    pub fn set_security_desc(&mut self, v: String) {
1633        self.message.body.set_field(tag::SECURITY_DESC, FIXString::from(v));
1634    }
1635
1636    /// Gets `SecurityDesc`, Tag 107.
1637    pub fn get_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
1638        let mut fld = field::SecurityDescField::new(String::new());
1639        self.message.body.get_field(tag::SECURITY_DESC, &mut fld.0)?;
1640        Ok(fld.value().to_string())
1641    }
1642
1643
1644    /// Returns true if `SecurityDesc` is present, Tag 107.
1645    pub fn has_security_desc(&self) -> bool {
1646        self.message.body.has(tag::SECURITY_DESC)
1647    }
1648
1649
1650
1651
1652    /// Sets `SecurityExchange`, Tag 207.
1653    pub fn set_security_exchange(&mut self, v: String) {
1654        self.message.body.set_field(tag::SECURITY_EXCHANGE, FIXString::from(v));
1655    }
1656
1657    /// Gets `SecurityExchange`, Tag 207.
1658    pub fn get_security_exchange(&self) -> Result<String, MessageRejectErrorEnum> {
1659        let mut fld = field::SecurityExchangeField::new(String::new());
1660        self.message.body.get_field(tag::SECURITY_EXCHANGE, &mut fld.0)?;
1661        Ok(fld.value().to_string())
1662    }
1663
1664
1665    /// Returns true if `SecurityExchange` is present, Tag 207.
1666    pub fn has_security_exchange(&self) -> bool {
1667        self.message.body.has(tag::SECURITY_EXCHANGE)
1668    }
1669
1670
1671
1672
1673    /// Sets `SecurityID`, Tag 48.
1674    pub fn set_security_id(&mut self, v: String) {
1675        self.message.body.set_field(tag::SECURITY_ID, FIXString::from(v));
1676    }
1677
1678    /// Gets `SecurityID`, Tag 48.
1679    pub fn get_security_id(&self) -> Result<String, MessageRejectErrorEnum> {
1680        let mut fld = field::SecurityIDField::new(String::new());
1681        self.message.body.get_field(tag::SECURITY_ID, &mut fld.0)?;
1682        Ok(fld.value().to_string())
1683    }
1684
1685
1686    /// Returns true if `SecurityID` is present, Tag 48.
1687    pub fn has_security_id(&self) -> bool {
1688        self.message.body.has(tag::SECURITY_ID)
1689    }
1690
1691
1692
1693
1694    /// Sets `SecurityIDSource`, Tag 22.
1695    pub fn set_security_id_source(&mut self, v: String) {
1696        self.message.body.set_field(tag::SECURITY_ID_SOURCE, FIXString::from(v));
1697    }
1698
1699    /// Gets `SecurityIDSource`, Tag 22.
1700    pub fn get_security_id_source(&self) -> Result<String, MessageRejectErrorEnum> {
1701        let mut fld = field::SecurityIDSourceField::new(String::new());
1702        self.message.body.get_field(tag::SECURITY_ID_SOURCE, &mut fld.0)?;
1703        Ok(fld.value().to_string())
1704    }
1705
1706
1707    /// Returns true if `SecurityIDSource` is present, Tag 22.
1708    pub fn has_security_id_source(&self) -> bool {
1709        self.message.body.has(tag::SECURITY_ID_SOURCE)
1710    }
1711
1712
1713
1714
1715    /// Sets `SecuritySubType`, Tag 762.
1716    pub fn set_security_sub_type(&mut self, v: String) {
1717        self.message.body.set_field(tag::SECURITY_SUB_TYPE, FIXString::from(v));
1718    }
1719
1720    /// Gets `SecuritySubType`, Tag 762.
1721    pub fn get_security_sub_type(&self) -> Result<String, MessageRejectErrorEnum> {
1722        let mut fld = field::SecuritySubTypeField::new(String::new());
1723        self.message.body.get_field(tag::SECURITY_SUB_TYPE, &mut fld.0)?;
1724        Ok(fld.value().to_string())
1725    }
1726
1727
1728    /// Returns true if `SecuritySubType` is present, Tag 762.
1729    pub fn has_security_sub_type(&self) -> bool {
1730        self.message.body.has(tag::SECURITY_SUB_TYPE)
1731    }
1732
1733
1734
1735
1736    /// Sets `SecurityType`, Tag 167.
1737    pub fn set_security_type(&mut self, v: String) {
1738        self.message.body.set_field(tag::SECURITY_TYPE, FIXString::from(v));
1739    }
1740
1741    /// Gets `SecurityType`, Tag 167.
1742    pub fn get_security_type(&self) -> Result<String, MessageRejectErrorEnum> {
1743        let mut fld = field::SecurityTypeField::new(String::new());
1744        self.message.body.get_field(tag::SECURITY_TYPE, &mut fld.0)?;
1745        Ok(fld.value().to_string())
1746    }
1747
1748
1749    /// Returns true if `SecurityType` is present, Tag 167.
1750    pub fn has_security_type(&self) -> bool {
1751        self.message.body.has(tag::SECURITY_TYPE)
1752    }
1753
1754
1755
1756
1757    /// Sets `SettlDate`, Tag 64.
1758    pub fn set_settl_date(&mut self, v: String) {
1759        self.message.body.set_field(tag::SETTL_DATE, FIXString::from(v));
1760    }
1761
1762    /// Gets `SettlDate`, Tag 64.
1763    pub fn get_settl_date(&self) -> Result<String, MessageRejectErrorEnum> {
1764        let mut fld = field::SettlDateField::new(String::new());
1765        self.message.body.get_field(tag::SETTL_DATE, &mut fld.0)?;
1766        Ok(fld.value().to_string())
1767    }
1768
1769
1770    /// Returns true if `SettlDate` is present, Tag 64.
1771    pub fn has_settl_date(&self) -> bool {
1772        self.message.body.has(tag::SETTL_DATE)
1773    }
1774
1775
1776
1777
1778    /// Sets `SettlSessID`, Tag 716.
1779    pub fn set_settl_sess_id(&mut self, v: String) {
1780        self.message.body.set_field(tag::SETTL_SESS_ID, FIXString::from(v));
1781    }
1782
1783    /// Gets `SettlSessID`, Tag 716.
1784    pub fn get_settl_sess_id(&self) -> Result<String, MessageRejectErrorEnum> {
1785        let mut fld = field::SettlSessIDField::new(String::new());
1786        self.message.body.get_field(tag::SETTL_SESS_ID, &mut fld.0)?;
1787        Ok(fld.value().to_string())
1788    }
1789
1790
1791    /// Returns true if `SettlSessID` is present, Tag 716.
1792    pub fn has_settl_sess_id(&self) -> bool {
1793        self.message.body.has(tag::SETTL_SESS_ID)
1794    }
1795
1796
1797
1798
1799    /// Sets `SettlSessSubID`, Tag 717.
1800    pub fn set_settl_sess_sub_id(&mut self, v: String) {
1801        self.message.body.set_field(tag::SETTL_SESS_SUB_ID, FIXString::from(v));
1802    }
1803
1804    /// Gets `SettlSessSubID`, Tag 717.
1805    pub fn get_settl_sess_sub_id(&self) -> Result<String, MessageRejectErrorEnum> {
1806        let mut fld = field::SettlSessSubIDField::new(String::new());
1807        self.message.body.get_field(tag::SETTL_SESS_SUB_ID, &mut fld.0)?;
1808        Ok(fld.value().to_string())
1809    }
1810
1811
1812    /// Returns true if `SettlSessSubID` is present, Tag 717.
1813    pub fn has_settl_sess_sub_id(&self) -> bool {
1814        self.message.body.has(tag::SETTL_SESS_SUB_ID)
1815    }
1816
1817
1818
1819
1820    /// Sets `Side`, Tag 54.
1821    pub fn set_side(&mut self, v: String) {
1822        self.message.body.set_field(tag::SIDE, FIXString::from(v));
1823    }
1824
1825    /// Gets `Side`, Tag 54.
1826    pub fn get_side(&self) -> Result<String, MessageRejectErrorEnum> {
1827        let mut fld = field::SideField::new(String::new());
1828        self.message.body.get_field(tag::SIDE, &mut fld.0)?;
1829        Ok(fld.value().to_string())
1830    }
1831
1832
1833    /// Returns true if `Side` is present, Tag 54.
1834    pub fn has_side(&self) -> bool {
1835        self.message.body.has(tag::SIDE)
1836    }
1837
1838
1839
1840
1841    /// Sets `Spread`, Tag 218.
1842    pub fn set_spread(&mut self, val: Decimal, scale: i32) {
1843        self.message.body.set_field(tag::SPREAD, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1844    }
1845
1846    /// Gets `Spread`, Tag 218.
1847    pub fn get_spread(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1848        let mut fld = field::SpreadField::new(Decimal::ZERO, 0);
1849        self.message.body.get_field(tag::SPREAD, &mut fld.0)?;
1850        Ok(fld.value())
1851    }
1852
1853
1854    /// Returns true if `Spread` is present, Tag 218.
1855    pub fn has_spread(&self) -> bool {
1856        self.message.body.has(tag::SPREAD)
1857    }
1858
1859
1860
1861
1862    /// Sets `StartCash`, Tag 921.
1863    pub fn set_start_cash(&mut self, val: Decimal, scale: i32) {
1864        self.message.body.set_field(tag::START_CASH, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1865    }
1866
1867    /// Gets `StartCash`, Tag 921.
1868    pub fn get_start_cash(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1869        let mut fld = field::StartCashField::new(Decimal::ZERO, 0);
1870        self.message.body.get_field(tag::START_CASH, &mut fld.0)?;
1871        Ok(fld.value())
1872    }
1873
1874
1875    /// Returns true if `StartCash` is present, Tag 921.
1876    pub fn has_start_cash(&self) -> bool {
1877        self.message.body.has(tag::START_CASH)
1878    }
1879
1880
1881
1882
1883    /// Sets `StartDate`, Tag 916.
1884    pub fn set_start_date(&mut self, v: String) {
1885        self.message.body.set_field(tag::START_DATE, FIXString::from(v));
1886    }
1887
1888    /// Gets `StartDate`, Tag 916.
1889    pub fn get_start_date(&self) -> Result<String, MessageRejectErrorEnum> {
1890        let mut fld = field::StartDateField::new(String::new());
1891        self.message.body.get_field(tag::START_DATE, &mut fld.0)?;
1892        Ok(fld.value().to_string())
1893    }
1894
1895
1896    /// Returns true if `StartDate` is present, Tag 916.
1897    pub fn has_start_date(&self) -> bool {
1898        self.message.body.has(tag::START_DATE)
1899    }
1900
1901
1902
1903
1904    /// Sets `StateOrProvinceOfIssue`, Tag 471.
1905    pub fn set_state_or_province_of_issue(&mut self, v: String) {
1906        self.message.body.set_field(tag::STATE_OR_PROVINCE_OF_ISSUE, FIXString::from(v));
1907    }
1908
1909    /// Gets `StateOrProvinceOfIssue`, Tag 471.
1910    pub fn get_state_or_province_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
1911        let mut fld = field::StateOrProvinceOfIssueField::new(String::new());
1912        self.message.body.get_field(tag::STATE_OR_PROVINCE_OF_ISSUE, &mut fld.0)?;
1913        Ok(fld.value().to_string())
1914    }
1915
1916
1917    /// Returns true if `StateOrProvinceOfIssue` is present, Tag 471.
1918    pub fn has_state_or_province_of_issue(&self) -> bool {
1919        self.message.body.has(tag::STATE_OR_PROVINCE_OF_ISSUE)
1920    }
1921
1922
1923
1924
1925    /// Sets `StrikeCurrency`, Tag 947.
1926    pub fn set_strike_currency(&mut self, v: String) {
1927        self.message.body.set_field(tag::STRIKE_CURRENCY, FIXString::from(v));
1928    }
1929
1930    /// Gets `StrikeCurrency`, Tag 947.
1931    pub fn get_strike_currency(&self) -> Result<String, MessageRejectErrorEnum> {
1932        let mut fld = field::StrikeCurrencyField::new(String::new());
1933        self.message.body.get_field(tag::STRIKE_CURRENCY, &mut fld.0)?;
1934        Ok(fld.value().to_string())
1935    }
1936
1937
1938    /// Returns true if `StrikeCurrency` is present, Tag 947.
1939    pub fn has_strike_currency(&self) -> bool {
1940        self.message.body.has(tag::STRIKE_CURRENCY)
1941    }
1942
1943
1944
1945
1946    /// Sets `StrikePrice`, Tag 202.
1947    pub fn set_strike_price(&mut self, val: Decimal, scale: i32) {
1948        self.message.body.set_field(tag::STRIKE_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
1949    }
1950
1951    /// Gets `StrikePrice`, Tag 202.
1952    pub fn get_strike_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
1953        let mut fld = field::StrikePriceField::new(Decimal::ZERO, 0);
1954        self.message.body.get_field(tag::STRIKE_PRICE, &mut fld.0)?;
1955        Ok(fld.value())
1956    }
1957
1958
1959    /// Returns true if `StrikePrice` is present, Tag 202.
1960    pub fn has_strike_price(&self) -> bool {
1961        self.message.body.has(tag::STRIKE_PRICE)
1962    }
1963
1964
1965
1966
1967    /// Sets `Symbol`, Tag 55.
1968    pub fn set_symbol(&mut self, v: String) {
1969        self.message.body.set_field(tag::SYMBOL, FIXString::from(v));
1970    }
1971
1972    /// Gets `Symbol`, Tag 55.
1973    pub fn get_symbol(&self) -> Result<String, MessageRejectErrorEnum> {
1974        let mut fld = field::SymbolField::new(String::new());
1975        self.message.body.get_field(tag::SYMBOL, &mut fld.0)?;
1976        Ok(fld.value().to_string())
1977    }
1978
1979
1980    /// Returns true if `Symbol` is present, Tag 55.
1981    pub fn has_symbol(&self) -> bool {
1982        self.message.body.has(tag::SYMBOL)
1983    }
1984
1985
1986
1987
1988    /// Sets `SymbolSfx`, Tag 65.
1989    pub fn set_symbol_sfx(&mut self, v: String) {
1990        self.message.body.set_field(tag::SYMBOL_SFX, FIXString::from(v));
1991    }
1992
1993    /// Gets `SymbolSfx`, Tag 65.
1994    pub fn get_symbol_sfx(&self) -> Result<String, MessageRejectErrorEnum> {
1995        let mut fld = field::SymbolSfxField::new(String::new());
1996        self.message.body.get_field(tag::SYMBOL_SFX, &mut fld.0)?;
1997        Ok(fld.value().to_string())
1998    }
1999
2000
2001    /// Returns true if `SymbolSfx` is present, Tag 65.
2002    pub fn has_symbol_sfx(&self) -> bool {
2003        self.message.body.has(tag::SYMBOL_SFX)
2004    }
2005
2006
2007
2008
2009    /// Sets `TerminationType`, Tag 788.
2010    pub fn set_termination_type(&mut self, v: isize) {
2011        self.message.body.set_field(tag::TERMINATION_TYPE, fixer::fix_int::FIXInt::from(v));
2012    }
2013
2014    /// Gets `TerminationType`, Tag 788.
2015    pub fn get_termination_type(&self) -> Result<isize, MessageRejectErrorEnum> {
2016        let mut fld = field::TerminationTypeField::new(0);
2017        self.message.body.get_field(tag::TERMINATION_TYPE, &mut fld.0)?;
2018        Ok(fld.value())
2019    }
2020
2021
2022    /// Returns true if `TerminationType` is present, Tag 788.
2023    pub fn has_termination_type(&self) -> bool {
2024        self.message.body.has(tag::TERMINATION_TYPE)
2025    }
2026
2027
2028
2029
2030    /// Sets `Text`, Tag 58.
2031    pub fn set_text(&mut self, v: String) {
2032        self.message.body.set_field(tag::TEXT, FIXString::from(v));
2033    }
2034
2035    /// Gets `Text`, Tag 58.
2036    pub fn get_text(&self) -> Result<String, MessageRejectErrorEnum> {
2037        let mut fld = field::TextField::new(String::new());
2038        self.message.body.get_field(tag::TEXT, &mut fld.0)?;
2039        Ok(fld.value().to_string())
2040    }
2041
2042
2043    /// Returns true if `Text` is present, Tag 58.
2044    pub fn has_text(&self) -> bool {
2045        self.message.body.has(tag::TEXT)
2046    }
2047
2048
2049
2050
2051    /// Sets `TotalNetValue`, Tag 900.
2052    pub fn set_total_net_value(&mut self, val: Decimal, scale: i32) {
2053        self.message.body.set_field(tag::TOTAL_NET_VALUE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
2054    }
2055
2056    /// Gets `TotalNetValue`, Tag 900.
2057    pub fn get_total_net_value(&self) -> Result<Decimal, MessageRejectErrorEnum> {
2058        let mut fld = field::TotalNetValueField::new(Decimal::ZERO, 0);
2059        self.message.body.get_field(tag::TOTAL_NET_VALUE, &mut fld.0)?;
2060        Ok(fld.value())
2061    }
2062
2063
2064    /// Returns true if `TotalNetValue` is present, Tag 900.
2065    pub fn has_total_net_value(&self) -> bool {
2066        self.message.body.has(tag::TOTAL_NET_VALUE)
2067    }
2068
2069
2070
2071
2072    /// Sets `TradingSessionID`, Tag 336.
2073    pub fn set_trading_session_id(&mut self, v: String) {
2074        self.message.body.set_field(tag::TRADING_SESSION_ID, FIXString::from(v));
2075    }
2076
2077    /// Gets `TradingSessionID`, Tag 336.
2078    pub fn get_trading_session_id(&self) -> Result<String, MessageRejectErrorEnum> {
2079        let mut fld = field::TradingSessionIDField::new(String::new());
2080        self.message.body.get_field(tag::TRADING_SESSION_ID, &mut fld.0)?;
2081        Ok(fld.value().to_string())
2082    }
2083
2084
2085    /// Returns true if `TradingSessionID` is present, Tag 336.
2086    pub fn has_trading_session_id(&self) -> bool {
2087        self.message.body.has(tag::TRADING_SESSION_ID)
2088    }
2089
2090
2091
2092
2093    /// Sets `TradingSessionSubID`, Tag 625.
2094    pub fn set_trading_session_sub_id(&mut self, v: String) {
2095        self.message.body.set_field(tag::TRADING_SESSION_SUB_ID, FIXString::from(v));
2096    }
2097
2098    /// Gets `TradingSessionSubID`, Tag 625.
2099    pub fn get_trading_session_sub_id(&self) -> Result<String, MessageRejectErrorEnum> {
2100        let mut fld = field::TradingSessionSubIDField::new(String::new());
2101        self.message.body.get_field(tag::TRADING_SESSION_SUB_ID, &mut fld.0)?;
2102        Ok(fld.value().to_string())
2103    }
2104
2105
2106    /// Returns true if `TradingSessionSubID` is present, Tag 625.
2107    pub fn has_trading_session_sub_id(&self) -> bool {
2108        self.message.body.has(tag::TRADING_SESSION_SUB_ID)
2109    }
2110
2111
2112
2113
2114    /// Sets `TransactTime`, Tag 60.
2115    pub fn set_transact_time(&mut self, v: Timestamp) {
2116        self.message.body.set_field(tag::TRANSACT_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
2117            time: v,
2118            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
2119        });
2120    }
2121
2122    /// Gets `TransactTime`, Tag 60.
2123    pub fn get_transact_time(&self) -> Result<Timestamp, MessageRejectErrorEnum> {
2124        let mut fld = field::TransactTimeField::new(Timestamp::UNIX_EPOCH);
2125        self.message.body.get_field(tag::TRANSACT_TIME, &mut fld.0)?;
2126        Ok(fld.value())
2127    }
2128
2129
2130    /// Returns true if `TransactTime` is present, Tag 60.
2131    pub fn has_transact_time(&self) -> bool {
2132        self.message.body.has(tag::TRANSACT_TIME)
2133    }
2134
2135
2136}
2137
2138/// `RouteOut` is the callback type for routing `CollateralRequest` messages.
2139pub type RouteOut = fn(msg: CollateralRequest, session_id: SessionID) -> Result<(), MessageRejectErrorEnum>;
2140
2141/// Route type returned by the `route` function.
2142pub type Route = (&'static str, &'static str, Box<dyn Fn(&Message, SessionID) -> Result<(), MessageRejectErrorEnum> + Send>);
2143
2144/// Returns the begin string, message type, and route function for `CollateralRequest`.
2145pub fn route(router: RouteOut) -> Route {
2146    let r = move |msg: &Message, session_id: SessionID| -> Result<(), MessageRejectErrorEnum> {
2147        router(CollateralRequest::from_message(msg.clone()), session_id)
2148    };
2149    ("FIX.4.4", "AX", Box::new(r))
2150}