Skip to main content

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