Skip to main content

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