fixer-fix 0.10.1

Generated FIX protocol types for fixer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
// Code generated by fixer-gen. DO NOT EDIT.
#![allow(clippy::new_without_default)]
#![allow(clippy::needless_pass_by_value)]
#![allow(clippy::too_many_arguments)]
#![allow(unused_imports)]

use fixer::message::Message;
use fixer::fix_string::FIXString;
use fixer::errors::MessageRejectErrorEnum;
use fixer::session::session_id::SessionID;

use rust_decimal::Decimal;


use crate::field;
use crate::tag;

/// `DerivativeSecurityList` is the `fix43` `DerivativeSecurityList` type, `MsgType` = AA.
pub struct DerivativeSecurityList {
    pub message: Message,
}

impl DerivativeSecurityList {
    /// Creates a new `DerivativeSecurityList` with required fields.
    pub fn new(security_req_id: field::SecurityReqIDField, security_response_id: field::SecurityResponseIDField, security_request_result: field::SecurityRequestResultField) -> Self {
        let mut msg = Message::new();
        msg.header.set_field(tag::MSG_TYPE, FIXString::from("AA".to_string()));

        msg.body.set_field(tag::SECURITY_REQ_ID, security_req_id.0);

        msg.body.set_field(tag::SECURITY_RESPONSE_ID, security_response_id.0);

        msg.body.set_field(tag::SECURITY_REQUEST_RESULT, security_request_result.0);

        Self { message: msg }
    }

    /// Creates a `DerivativeSecurityList` from an existing `Message`.
    pub fn from_message(msg: Message) -> Self {
        Self { message: msg }
    }

    /// Returns the underlying `Message`.
    pub fn to_message(self) -> Message {
        self.message
    }




    /// Sets `EncodedUnderlyingIssuer`, Tag 363.
    pub fn set_encoded_underlying_issuer(&mut self, v: String) {
        self.message.body.set_field(tag::ENCODED_UNDERLYING_ISSUER, FIXString::from(v));
    }

    /// Gets `EncodedUnderlyingIssuer`, Tag 363.
    pub fn get_encoded_underlying_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::EncodedUnderlyingIssuerField::new(String::new());
        self.message.body.get_field(tag::ENCODED_UNDERLYING_ISSUER, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `EncodedUnderlyingIssuer` is present, Tag 363.
    pub fn has_encoded_underlying_issuer(&self) -> bool {
        self.message.body.has(tag::ENCODED_UNDERLYING_ISSUER)
    }




    /// Sets `EncodedUnderlyingIssuerLen`, Tag 362.
    pub fn set_encoded_underlying_issuer_len(&mut self, v: isize) {
        self.message.body.set_field(tag::ENCODED_UNDERLYING_ISSUER_LEN, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `EncodedUnderlyingIssuerLen`, Tag 362.
    pub fn get_encoded_underlying_issuer_len(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::EncodedUnderlyingIssuerLenField::new(0);
        self.message.body.get_field(tag::ENCODED_UNDERLYING_ISSUER_LEN, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `EncodedUnderlyingIssuerLen` is present, Tag 362.
    pub fn has_encoded_underlying_issuer_len(&self) -> bool {
        self.message.body.has(tag::ENCODED_UNDERLYING_ISSUER_LEN)
    }




    /// Sets `EncodedUnderlyingSecurityDesc`, Tag 365.
    pub fn set_encoded_underlying_security_desc(&mut self, v: String) {
        self.message.body.set_field(tag::ENCODED_UNDERLYING_SECURITY_DESC, FIXString::from(v));
    }

    /// Gets `EncodedUnderlyingSecurityDesc`, Tag 365.
    pub fn get_encoded_underlying_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::EncodedUnderlyingSecurityDescField::new(String::new());
        self.message.body.get_field(tag::ENCODED_UNDERLYING_SECURITY_DESC, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `EncodedUnderlyingSecurityDesc` is present, Tag 365.
    pub fn has_encoded_underlying_security_desc(&self) -> bool {
        self.message.body.has(tag::ENCODED_UNDERLYING_SECURITY_DESC)
    }




    /// Sets `EncodedUnderlyingSecurityDescLen`, Tag 364.
    pub fn set_encoded_underlying_security_desc_len(&mut self, v: isize) {
        self.message.body.set_field(tag::ENCODED_UNDERLYING_SECURITY_DESC_LEN, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `EncodedUnderlyingSecurityDescLen`, Tag 364.
    pub fn get_encoded_underlying_security_desc_len(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::EncodedUnderlyingSecurityDescLenField::new(0);
        self.message.body.get_field(tag::ENCODED_UNDERLYING_SECURITY_DESC_LEN, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `EncodedUnderlyingSecurityDescLen` is present, Tag 364.
    pub fn has_encoded_underlying_security_desc_len(&self) -> bool {
        self.message.body.has(tag::ENCODED_UNDERLYING_SECURITY_DESC_LEN)
    }




    /// Sets `NoRelatedSym`, Tag 146.
    pub fn set_no_related_sym(&mut self, v: isize) {
        self.message.body.set_field(tag::NO_RELATED_SYM, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `NoRelatedSym`, Tag 146.
    pub fn get_no_related_sym(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::NoRelatedSymField::new(0);
        self.message.body.get_field(tag::NO_RELATED_SYM, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `NoRelatedSym` is present, Tag 146.
    pub fn has_no_related_sym(&self) -> bool {
        self.message.body.has(tag::NO_RELATED_SYM)
    }




    /// Sets `NoUnderlyingSecurityAltID`, Tag 457.
    pub fn set_no_underlying_security_alt_id(&mut self, v: isize) {
        self.message.body.set_field(tag::NO_UNDERLYING_SECURITY_ALT_ID, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `NoUnderlyingSecurityAltID`, Tag 457.
    pub fn get_no_underlying_security_alt_id(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::NoUnderlyingSecurityAltIDField::new(0);
        self.message.body.get_field(tag::NO_UNDERLYING_SECURITY_ALT_ID, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `NoUnderlyingSecurityAltID` is present, Tag 457.
    pub fn has_no_underlying_security_alt_id(&self) -> bool {
        self.message.body.has(tag::NO_UNDERLYING_SECURITY_ALT_ID)
    }




    /// Sets `SecurityReqID`, Tag 320.
    pub fn set_security_req_id(&mut self, v: String) {
        self.message.body.set_field(tag::SECURITY_REQ_ID, FIXString::from(v));
    }

    /// Gets `SecurityReqID`, Tag 320.
    pub fn get_security_req_id(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::SecurityReqIDField::new(String::new());
        self.message.body.get_field(tag::SECURITY_REQ_ID, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `SecurityReqID` is present, Tag 320.
    pub fn has_security_req_id(&self) -> bool {
        self.message.body.has(tag::SECURITY_REQ_ID)
    }




    /// Sets `SecurityRequestResult`, Tag 560.
    pub fn set_security_request_result(&mut self, v: isize) {
        self.message.body.set_field(tag::SECURITY_REQUEST_RESULT, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `SecurityRequestResult`, Tag 560.
    pub fn get_security_request_result(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::SecurityRequestResultField::new(0);
        self.message.body.get_field(tag::SECURITY_REQUEST_RESULT, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `SecurityRequestResult` is present, Tag 560.
    pub fn has_security_request_result(&self) -> bool {
        self.message.body.has(tag::SECURITY_REQUEST_RESULT)
    }




    /// Sets `SecurityResponseID`, Tag 322.
    pub fn set_security_response_id(&mut self, v: String) {
        self.message.body.set_field(tag::SECURITY_RESPONSE_ID, FIXString::from(v));
    }

    /// Gets `SecurityResponseID`, Tag 322.
    pub fn get_security_response_id(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::SecurityResponseIDField::new(String::new());
        self.message.body.get_field(tag::SECURITY_RESPONSE_ID, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `SecurityResponseID` is present, Tag 322.
    pub fn has_security_response_id(&self) -> bool {
        self.message.body.has(tag::SECURITY_RESPONSE_ID)
    }




    /// Sets `TotalNumSecurities`, Tag 393.
    pub fn set_total_num_securities(&mut self, v: isize) {
        self.message.body.set_field(tag::TOTAL_NUM_SECURITIES, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `TotalNumSecurities`, Tag 393.
    pub fn get_total_num_securities(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::TotalNumSecuritiesField::new(0);
        self.message.body.get_field(tag::TOTAL_NUM_SECURITIES, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `TotalNumSecurities` is present, Tag 393.
    pub fn has_total_num_securities(&self) -> bool {
        self.message.body.has(tag::TOTAL_NUM_SECURITIES)
    }




    /// Sets `UnderlyingCFICode`, Tag 463.
    pub fn set_underlying_cfi_code(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_CFI_CODE, FIXString::from(v));
    }

    /// Gets `UnderlyingCFICode`, Tag 463.
    pub fn get_underlying_cfi_code(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingCFICodeField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_CFI_CODE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingCFICode` is present, Tag 463.
    pub fn has_underlying_cfi_code(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_CFI_CODE)
    }




    /// Sets `UnderlyingContractMultiplier`, Tag 436.
    pub fn set_underlying_contract_multiplier(&mut self, val: Decimal, scale: i32) {
        self.message.body.set_field(tag::UNDERLYING_CONTRACT_MULTIPLIER, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
    }

    /// Gets `UnderlyingContractMultiplier`, Tag 436.
    pub fn get_underlying_contract_multiplier(&self) -> Result<Decimal, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingContractMultiplierField::new(Decimal::ZERO, 0);
        self.message.body.get_field(tag::UNDERLYING_CONTRACT_MULTIPLIER, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `UnderlyingContractMultiplier` is present, Tag 436.
    pub fn has_underlying_contract_multiplier(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_CONTRACT_MULTIPLIER)
    }




    /// Sets `UnderlyingCountryOfIssue`, Tag 592.
    pub fn set_underlying_country_of_issue(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_COUNTRY_OF_ISSUE, FIXString::from(v));
    }

    /// Gets `UnderlyingCountryOfIssue`, Tag 592.
    pub fn get_underlying_country_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingCountryOfIssueField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_COUNTRY_OF_ISSUE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingCountryOfIssue` is present, Tag 592.
    pub fn has_underlying_country_of_issue(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_COUNTRY_OF_ISSUE)
    }




    /// Sets `UnderlyingCouponPaymentDate`, Tag 241.
    pub fn set_underlying_coupon_payment_date(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_COUPON_PAYMENT_DATE, FIXString::from(v));
    }

    /// Gets `UnderlyingCouponPaymentDate`, Tag 241.
    pub fn get_underlying_coupon_payment_date(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingCouponPaymentDateField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_COUPON_PAYMENT_DATE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingCouponPaymentDate` is present, Tag 241.
    pub fn has_underlying_coupon_payment_date(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_COUPON_PAYMENT_DATE)
    }




    /// Sets `UnderlyingCouponRate`, Tag 435.
    pub fn set_underlying_coupon_rate(&mut self, val: Decimal, scale: i32) {
        self.message.body.set_field(tag::UNDERLYING_COUPON_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
    }

    /// Gets `UnderlyingCouponRate`, Tag 435.
    pub fn get_underlying_coupon_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingCouponRateField::new(Decimal::ZERO, 0);
        self.message.body.get_field(tag::UNDERLYING_COUPON_RATE, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `UnderlyingCouponRate` is present, Tag 435.
    pub fn has_underlying_coupon_rate(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_COUPON_RATE)
    }




    /// Sets `UnderlyingCreditRating`, Tag 256.
    pub fn set_underlying_credit_rating(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_CREDIT_RATING, FIXString::from(v));
    }

    /// Gets `UnderlyingCreditRating`, Tag 256.
    pub fn get_underlying_credit_rating(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingCreditRatingField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_CREDIT_RATING, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingCreditRating` is present, Tag 256.
    pub fn has_underlying_credit_rating(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_CREDIT_RATING)
    }




    /// Sets `UnderlyingFactor`, Tag 246.
    pub fn set_underlying_factor(&mut self, val: Decimal, scale: i32) {
        self.message.body.set_field(tag::UNDERLYING_FACTOR, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
    }

    /// Gets `UnderlyingFactor`, Tag 246.
    pub fn get_underlying_factor(&self) -> Result<Decimal, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingFactorField::new(Decimal::ZERO, 0);
        self.message.body.get_field(tag::UNDERLYING_FACTOR, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `UnderlyingFactor` is present, Tag 246.
    pub fn has_underlying_factor(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_FACTOR)
    }




    /// Sets `UnderlyingInstrRegistry`, Tag 595.
    pub fn set_underlying_instr_registry(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_INSTR_REGISTRY, FIXString::from(v));
    }

    /// Gets `UnderlyingInstrRegistry`, Tag 595.
    pub fn get_underlying_instr_registry(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingInstrRegistryField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_INSTR_REGISTRY, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingInstrRegistry` is present, Tag 595.
    pub fn has_underlying_instr_registry(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_INSTR_REGISTRY)
    }




    /// Sets `UnderlyingIssueDate`, Tag 242.
    pub fn set_underlying_issue_date(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_ISSUE_DATE, FIXString::from(v));
    }

    /// Gets `UnderlyingIssueDate`, Tag 242.
    pub fn get_underlying_issue_date(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingIssueDateField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_ISSUE_DATE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingIssueDate` is present, Tag 242.
    pub fn has_underlying_issue_date(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_ISSUE_DATE)
    }




    /// Sets `UnderlyingIssuer`, Tag 306.
    pub fn set_underlying_issuer(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_ISSUER, FIXString::from(v));
    }

    /// Gets `UnderlyingIssuer`, Tag 306.
    pub fn get_underlying_issuer(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingIssuerField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_ISSUER, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingIssuer` is present, Tag 306.
    pub fn has_underlying_issuer(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_ISSUER)
    }




    /// Sets `UnderlyingLocaleOfIssue`, Tag 594.
    pub fn set_underlying_locale_of_issue(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_LOCALE_OF_ISSUE, FIXString::from(v));
    }

    /// Gets `UnderlyingLocaleOfIssue`, Tag 594.
    pub fn get_underlying_locale_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingLocaleOfIssueField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_LOCALE_OF_ISSUE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingLocaleOfIssue` is present, Tag 594.
    pub fn has_underlying_locale_of_issue(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_LOCALE_OF_ISSUE)
    }




    /// Sets `UnderlyingMaturityDate`, Tag 542.
    pub fn set_underlying_maturity_date(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_MATURITY_DATE, FIXString::from(v));
    }

    /// Gets `UnderlyingMaturityDate`, Tag 542.
    pub fn get_underlying_maturity_date(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingMaturityDateField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_MATURITY_DATE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingMaturityDate` is present, Tag 542.
    pub fn has_underlying_maturity_date(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_MATURITY_DATE)
    }




    /// Sets `UnderlyingMaturityMonthYear`, Tag 313.
    pub fn set_underlying_maturity_month_year(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_MATURITY_MONTH_YEAR, FIXString::from(v));
    }

    /// Gets `UnderlyingMaturityMonthYear`, Tag 313.
    pub fn get_underlying_maturity_month_year(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingMaturityMonthYearField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_MATURITY_MONTH_YEAR, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingMaturityMonthYear` is present, Tag 313.
    pub fn has_underlying_maturity_month_year(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_MATURITY_MONTH_YEAR)
    }




    /// Sets `UnderlyingOptAttribute`, Tag 317.
    pub fn set_underlying_opt_attribute(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_OPT_ATTRIBUTE, FIXString::from(v));
    }

    /// Gets `UnderlyingOptAttribute`, Tag 317.
    pub fn get_underlying_opt_attribute(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingOptAttributeField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_OPT_ATTRIBUTE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingOptAttribute` is present, Tag 317.
    pub fn has_underlying_opt_attribute(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_OPT_ATTRIBUTE)
    }




    /// Sets `UnderlyingProduct`, Tag 462.
    pub fn set_underlying_product(&mut self, v: isize) {
        self.message.body.set_field(tag::UNDERLYING_PRODUCT, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `UnderlyingProduct`, Tag 462.
    pub fn get_underlying_product(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingProductField::new(0);
        self.message.body.get_field(tag::UNDERLYING_PRODUCT, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `UnderlyingProduct` is present, Tag 462.
    pub fn has_underlying_product(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_PRODUCT)
    }




    /// Sets `UnderlyingRedemptionDate`, Tag 247.
    pub fn set_underlying_redemption_date(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_REDEMPTION_DATE, FIXString::from(v));
    }

    /// Gets `UnderlyingRedemptionDate`, Tag 247.
    pub fn get_underlying_redemption_date(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingRedemptionDateField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_REDEMPTION_DATE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingRedemptionDate` is present, Tag 247.
    pub fn has_underlying_redemption_date(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_REDEMPTION_DATE)
    }




    /// Sets `UnderlyingRepoCollateralSecurityType`, Tag 243.
    pub fn set_underlying_repo_collateral_security_type(&mut self, v: isize) {
        self.message.body.set_field(tag::UNDERLYING_REPO_COLLATERAL_SECURITY_TYPE, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `UnderlyingRepoCollateralSecurityType`, Tag 243.
    pub fn get_underlying_repo_collateral_security_type(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingRepoCollateralSecurityTypeField::new(0);
        self.message.body.get_field(tag::UNDERLYING_REPO_COLLATERAL_SECURITY_TYPE, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `UnderlyingRepoCollateralSecurityType` is present, Tag 243.
    pub fn has_underlying_repo_collateral_security_type(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_REPO_COLLATERAL_SECURITY_TYPE)
    }




    /// Sets `UnderlyingRepurchaseRate`, Tag 245.
    pub fn set_underlying_repurchase_rate(&mut self, val: Decimal, scale: i32) {
        self.message.body.set_field(tag::UNDERLYING_REPURCHASE_RATE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
    }

    /// Gets `UnderlyingRepurchaseRate`, Tag 245.
    pub fn get_underlying_repurchase_rate(&self) -> Result<Decimal, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingRepurchaseRateField::new(Decimal::ZERO, 0);
        self.message.body.get_field(tag::UNDERLYING_REPURCHASE_RATE, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `UnderlyingRepurchaseRate` is present, Tag 245.
    pub fn has_underlying_repurchase_rate(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_REPURCHASE_RATE)
    }




    /// Sets `UnderlyingRepurchaseTerm`, Tag 244.
    pub fn set_underlying_repurchase_term(&mut self, v: isize) {
        self.message.body.set_field(tag::UNDERLYING_REPURCHASE_TERM, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `UnderlyingRepurchaseTerm`, Tag 244.
    pub fn get_underlying_repurchase_term(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingRepurchaseTermField::new(0);
        self.message.body.get_field(tag::UNDERLYING_REPURCHASE_TERM, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `UnderlyingRepurchaseTerm` is present, Tag 244.
    pub fn has_underlying_repurchase_term(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_REPURCHASE_TERM)
    }




    /// Sets `UnderlyingSecurityDesc`, Tag 307.
    pub fn set_underlying_security_desc(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_SECURITY_DESC, FIXString::from(v));
    }

    /// Gets `UnderlyingSecurityDesc`, Tag 307.
    pub fn get_underlying_security_desc(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingSecurityDescField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_SECURITY_DESC, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingSecurityDesc` is present, Tag 307.
    pub fn has_underlying_security_desc(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_SECURITY_DESC)
    }




    /// Sets `UnderlyingSecurityExchange`, Tag 308.
    pub fn set_underlying_security_exchange(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_SECURITY_EXCHANGE, FIXString::from(v));
    }

    /// Gets `UnderlyingSecurityExchange`, Tag 308.
    pub fn get_underlying_security_exchange(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingSecurityExchangeField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_SECURITY_EXCHANGE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingSecurityExchange` is present, Tag 308.
    pub fn has_underlying_security_exchange(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_SECURITY_EXCHANGE)
    }




    /// Sets `UnderlyingSecurityID`, Tag 309.
    pub fn set_underlying_security_id(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_SECURITY_ID, FIXString::from(v));
    }

    /// Gets `UnderlyingSecurityID`, Tag 309.
    pub fn get_underlying_security_id(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingSecurityIDField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_SECURITY_ID, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingSecurityID` is present, Tag 309.
    pub fn has_underlying_security_id(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_SECURITY_ID)
    }




    /// Sets `UnderlyingSecurityIDSource`, Tag 305.
    pub fn set_underlying_security_id_source(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_SECURITY_ID_SOURCE, FIXString::from(v));
    }

    /// Gets `UnderlyingSecurityIDSource`, Tag 305.
    pub fn get_underlying_security_id_source(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingSecurityIDSourceField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_SECURITY_ID_SOURCE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingSecurityIDSource` is present, Tag 305.
    pub fn has_underlying_security_id_source(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_SECURITY_ID_SOURCE)
    }




    /// Sets `UnderlyingSecurityType`, Tag 310.
    pub fn set_underlying_security_type(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_SECURITY_TYPE, FIXString::from(v));
    }

    /// Gets `UnderlyingSecurityType`, Tag 310.
    pub fn get_underlying_security_type(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingSecurityTypeField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_SECURITY_TYPE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingSecurityType` is present, Tag 310.
    pub fn has_underlying_security_type(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_SECURITY_TYPE)
    }




    /// Sets `UnderlyingStateOrProvinceOfIssue`, Tag 593.
    pub fn set_underlying_state_or_province_of_issue(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_STATE_OR_PROVINCE_OF_ISSUE, FIXString::from(v));
    }

    /// Gets `UnderlyingStateOrProvinceOfIssue`, Tag 593.
    pub fn get_underlying_state_or_province_of_issue(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingStateOrProvinceOfIssueField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_STATE_OR_PROVINCE_OF_ISSUE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingStateOrProvinceOfIssue` is present, Tag 593.
    pub fn has_underlying_state_or_province_of_issue(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_STATE_OR_PROVINCE_OF_ISSUE)
    }




    /// Sets `UnderlyingStrikePrice`, Tag 316.
    pub fn set_underlying_strike_price(&mut self, val: Decimal, scale: i32) {
        self.message.body.set_field(tag::UNDERLYING_STRIKE_PRICE, fixer::fix_decimal::FIXDecimal { decimal: val, scale });
    }

    /// Gets `UnderlyingStrikePrice`, Tag 316.
    pub fn get_underlying_strike_price(&self) -> Result<Decimal, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingStrikePriceField::new(Decimal::ZERO, 0);
        self.message.body.get_field(tag::UNDERLYING_STRIKE_PRICE, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `UnderlyingStrikePrice` is present, Tag 316.
    pub fn has_underlying_strike_price(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_STRIKE_PRICE)
    }




    /// Sets `UnderlyingSymbol`, Tag 311.
    pub fn set_underlying_symbol(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_SYMBOL, FIXString::from(v));
    }

    /// Gets `UnderlyingSymbol`, Tag 311.
    pub fn get_underlying_symbol(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingSymbolField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_SYMBOL, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingSymbol` is present, Tag 311.
    pub fn has_underlying_symbol(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_SYMBOL)
    }




    /// Sets `UnderlyingSymbolSfx`, Tag 312.
    pub fn set_underlying_symbol_sfx(&mut self, v: String) {
        self.message.body.set_field(tag::UNDERLYING_SYMBOL_SFX, FIXString::from(v));
    }

    /// Gets `UnderlyingSymbolSfx`, Tag 312.
    pub fn get_underlying_symbol_sfx(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::UnderlyingSymbolSfxField::new(String::new());
        self.message.body.get_field(tag::UNDERLYING_SYMBOL_SFX, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `UnderlyingSymbolSfx` is present, Tag 312.
    pub fn has_underlying_symbol_sfx(&self) -> bool {
        self.message.body.has(tag::UNDERLYING_SYMBOL_SFX)
    }


}

/// `RouteOut` is the callback type for routing `DerivativeSecurityList` messages.
pub type RouteOut = fn(msg: DerivativeSecurityList, session_id: SessionID) -> Result<(), MessageRejectErrorEnum>;

/// Route type returned by the `route` function.
pub type Route = (&'static str, &'static str, Box<dyn Fn(&Message, SessionID) -> Result<(), MessageRejectErrorEnum> + Send>);

/// Returns the begin string, message type, and route function for `DerivativeSecurityList`.
pub fn route(router: RouteOut) -> Route {
    let r = move |msg: &Message, session_id: SessionID| -> Result<(), MessageRejectErrorEnum> {
        router(DerivativeSecurityList::from_message(msg.clone()), session_id)
    };
    ("FIX.4.3", "AA", Box::new(r))
}