Skip to main content

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