Skip to main content

fixer_fix/fix44/
assignment_report.rs

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