fixer-fix 0.10.1

Generated FIX protocol types for fixer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
// Code generated by fixer-gen. DO NOT EDIT.
#![allow(clippy::new_without_default)]
#![allow(clippy::needless_pass_by_value)]
#![allow(clippy::too_many_arguments)]
#![allow(unused_imports)]

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


use jiff::Timestamp;

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

/// `SecurityListUpdateReport` is the `fix50sp2` `SecurityListUpdateReport` type, `MsgType` = BK.
pub struct SecurityListUpdateReport {
    pub message: Message,
}

impl SecurityListUpdateReport {
    /// Creates a new `SecurityListUpdateReport` with required fields.
    pub fn new() -> Self {
        let mut msg = Message::new();
        msg.header.set_field(tag::MSG_TYPE, FIXString::from("BK".to_string()));

        Self { message: msg }
    }

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

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




    /// Sets `ApplID`, Tag 1180.
    pub fn set_appl_id(&mut self, v: String) {
        self.message.body.set_field(tag::APPL_ID, FIXString::from(v));
    }

    /// Gets `ApplID`, Tag 1180.
    pub fn get_appl_id(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::ApplIDField::new(String::new());
        self.message.body.get_field(tag::APPL_ID, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `ApplID` is present, Tag 1180.
    pub fn has_appl_id(&self) -> bool {
        self.message.body.has(tag::APPL_ID)
    }




    /// Sets `ApplLastSeqNum`, Tag 1350.
    pub fn set_appl_last_seq_num(&mut self, v: isize) {
        self.message.body.set_field(tag::APPL_LAST_SEQ_NUM, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `ApplLastSeqNum`, Tag 1350.
    pub fn get_appl_last_seq_num(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::ApplLastSeqNumField::new(0);
        self.message.body.get_field(tag::APPL_LAST_SEQ_NUM, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `ApplLastSeqNum` is present, Tag 1350.
    pub fn has_appl_last_seq_num(&self) -> bool {
        self.message.body.has(tag::APPL_LAST_SEQ_NUM)
    }




    /// Sets `ApplResendFlag`, Tag 1352.
    pub fn set_appl_resend_flag(&mut self, v: bool) {
        self.message.body.set_field(tag::APPL_RESEND_FLAG, fixer::fix_boolean::FIXBoolean::from(v));
    }

    /// Gets `ApplResendFlag`, Tag 1352.
    pub fn get_appl_resend_flag(&self) -> Result<bool, MessageRejectErrorEnum> {
        let mut fld = field::ApplResendFlagField::new(false);
        self.message.body.get_field(tag::APPL_RESEND_FLAG, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `ApplResendFlag` is present, Tag 1352.
    pub fn has_appl_resend_flag(&self) -> bool {
        self.message.body.has(tag::APPL_RESEND_FLAG)
    }




    /// Sets `ApplSeqNum`, Tag 1181.
    pub fn set_appl_seq_num(&mut self, v: isize) {
        self.message.body.set_field(tag::APPL_SEQ_NUM, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `ApplSeqNum`, Tag 1181.
    pub fn get_appl_seq_num(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::ApplSeqNumField::new(0);
        self.message.body.get_field(tag::APPL_SEQ_NUM, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `ApplSeqNum` is present, Tag 1181.
    pub fn has_appl_seq_num(&self) -> bool {
        self.message.body.has(tag::APPL_SEQ_NUM)
    }




    /// Sets `ClearingBusinessDate`, Tag 715.
    pub fn set_clearing_business_date(&mut self, v: String) {
        self.message.body.set_field(tag::CLEARING_BUSINESS_DATE, FIXString::from(v));
    }

    /// Gets `ClearingBusinessDate`, Tag 715.
    pub fn get_clearing_business_date(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::ClearingBusinessDateField::new(String::new());
        self.message.body.get_field(tag::CLEARING_BUSINESS_DATE, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `ClearingBusinessDate` is present, Tag 715.
    pub fn has_clearing_business_date(&self) -> bool {
        self.message.body.has(tag::CLEARING_BUSINESS_DATE)
    }




    /// Sets `CorporateAction`, Tag 292.
    pub fn set_corporate_action(&mut self, v: String) {
        self.message.body.set_field(tag::CORPORATE_ACTION, FIXString::from(v));
    }

    /// Gets `CorporateAction`, Tag 292.
    pub fn get_corporate_action(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::CorporateActionField::new(String::new());
        self.message.body.get_field(tag::CORPORATE_ACTION, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `CorporateAction` is present, Tag 292.
    pub fn has_corporate_action(&self) -> bool {
        self.message.body.has(tag::CORPORATE_ACTION)
    }




    /// Sets `EncodedSecurityListDesc`, Tag 1469.
    pub fn set_encoded_security_list_desc(&mut self, v: String) {
        self.message.body.set_field(tag::ENCODED_SECURITY_LIST_DESC, FIXString::from(v));
    }

    /// Gets `EncodedSecurityListDesc`, Tag 1469.
    pub fn get_encoded_security_list_desc(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::EncodedSecurityListDescField::new(String::new());
        self.message.body.get_field(tag::ENCODED_SECURITY_LIST_DESC, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `EncodedSecurityListDesc` is present, Tag 1469.
    pub fn has_encoded_security_list_desc(&self) -> bool {
        self.message.body.has(tag::ENCODED_SECURITY_LIST_DESC)
    }




    /// Sets `EncodedSecurityListDescLen`, Tag 1468.
    pub fn set_encoded_security_list_desc_len(&mut self, v: isize) {
        self.message.body.set_field(tag::ENCODED_SECURITY_LIST_DESC_LEN, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `EncodedSecurityListDescLen`, Tag 1468.
    pub fn get_encoded_security_list_desc_len(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::EncodedSecurityListDescLenField::new(0);
        self.message.body.get_field(tag::ENCODED_SECURITY_LIST_DESC_LEN, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `EncodedSecurityListDescLen` is present, Tag 1468.
    pub fn has_encoded_security_list_desc_len(&self) -> bool {
        self.message.body.has(tag::ENCODED_SECURITY_LIST_DESC_LEN)
    }




    /// Sets `LastFragment`, Tag 893.
    pub fn set_last_fragment(&mut self, v: bool) {
        self.message.body.set_field(tag::LAST_FRAGMENT, fixer::fix_boolean::FIXBoolean::from(v));
    }

    /// Gets `LastFragment`, Tag 893.
    pub fn get_last_fragment(&self) -> Result<bool, MessageRejectErrorEnum> {
        let mut fld = field::LastFragmentField::new(false);
        self.message.body.get_field(tag::LAST_FRAGMENT, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `LastFragment` is present, Tag 893.
    pub fn has_last_fragment(&self) -> bool {
        self.message.body.has(tag::LAST_FRAGMENT)
    }




    /// Sets `MarketID`, Tag 1301.
    pub fn set_market_id(&mut self, v: String) {
        self.message.body.set_field(tag::MARKET_ID, FIXString::from(v));
    }

    /// Gets `MarketID`, Tag 1301.
    pub fn get_market_id(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::MarketIDField::new(String::new());
        self.message.body.get_field(tag::MARKET_ID, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `MarketID` is present, Tag 1301.
    pub fn has_market_id(&self) -> bool {
        self.message.body.has(tag::MARKET_ID)
    }




    /// Sets `MarketSegmentID`, Tag 1300.
    pub fn set_market_segment_id(&mut self, v: String) {
        self.message.body.set_field(tag::MARKET_SEGMENT_ID, FIXString::from(v));
    }

    /// Gets `MarketSegmentID`, Tag 1300.
    pub fn get_market_segment_id(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::MarketSegmentIDField::new(String::new());
        self.message.body.get_field(tag::MARKET_SEGMENT_ID, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `MarketSegmentID` is present, Tag 1300.
    pub fn has_market_segment_id(&self) -> bool {
        self.message.body.has(tag::MARKET_SEGMENT_ID)
    }




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

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


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




    /// Sets `SecurityListDesc`, Tag 1467.
    pub fn set_security_list_desc(&mut self, v: String) {
        self.message.body.set_field(tag::SECURITY_LIST_DESC, FIXString::from(v));
    }

    /// Gets `SecurityListDesc`, Tag 1467.
    pub fn get_security_list_desc(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::SecurityListDescField::new(String::new());
        self.message.body.get_field(tag::SECURITY_LIST_DESC, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `SecurityListDesc` is present, Tag 1467.
    pub fn has_security_list_desc(&self) -> bool {
        self.message.body.has(tag::SECURITY_LIST_DESC)
    }




    /// Sets `SecurityListID`, Tag 1465.
    pub fn set_security_list_id(&mut self, v: String) {
        self.message.body.set_field(tag::SECURITY_LIST_ID, FIXString::from(v));
    }

    /// Gets `SecurityListID`, Tag 1465.
    pub fn get_security_list_id(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::SecurityListIDField::new(String::new());
        self.message.body.get_field(tag::SECURITY_LIST_ID, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `SecurityListID` is present, Tag 1465.
    pub fn has_security_list_id(&self) -> bool {
        self.message.body.has(tag::SECURITY_LIST_ID)
    }




    /// Sets `SecurityListRefID`, Tag 1466.
    pub fn set_security_list_ref_id(&mut self, v: String) {
        self.message.body.set_field(tag::SECURITY_LIST_REF_ID, FIXString::from(v));
    }

    /// Gets `SecurityListRefID`, Tag 1466.
    pub fn get_security_list_ref_id(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::SecurityListRefIDField::new(String::new());
        self.message.body.get_field(tag::SECURITY_LIST_REF_ID, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `SecurityListRefID` is present, Tag 1466.
    pub fn has_security_list_ref_id(&self) -> bool {
        self.message.body.has(tag::SECURITY_LIST_REF_ID)
    }




    /// Sets `SecurityListType`, Tag 1470.
    pub fn set_security_list_type(&mut self, v: isize) {
        self.message.body.set_field(tag::SECURITY_LIST_TYPE, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `SecurityListType`, Tag 1470.
    pub fn get_security_list_type(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::SecurityListTypeField::new(0);
        self.message.body.get_field(tag::SECURITY_LIST_TYPE, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `SecurityListType` is present, Tag 1470.
    pub fn has_security_list_type(&self) -> bool {
        self.message.body.has(tag::SECURITY_LIST_TYPE)
    }




    /// Sets `SecurityListTypeSource`, Tag 1471.
    pub fn set_security_list_type_source(&mut self, v: isize) {
        self.message.body.set_field(tag::SECURITY_LIST_TYPE_SOURCE, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `SecurityListTypeSource`, Tag 1471.
    pub fn get_security_list_type_source(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::SecurityListTypeSourceField::new(0);
        self.message.body.get_field(tag::SECURITY_LIST_TYPE_SOURCE, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `SecurityListTypeSource` is present, Tag 1471.
    pub fn has_security_list_type_source(&self) -> bool {
        self.message.body.has(tag::SECURITY_LIST_TYPE_SOURCE)
    }




    /// Sets `SecurityReportID`, Tag 964.
    pub fn set_security_report_id(&mut self, v: isize) {
        self.message.body.set_field(tag::SECURITY_REPORT_ID, fixer::fix_int::FIXInt::from(v));
    }

    /// Gets `SecurityReportID`, Tag 964.
    pub fn get_security_report_id(&self) -> Result<isize, MessageRejectErrorEnum> {
        let mut fld = field::SecurityReportIDField::new(0);
        self.message.body.get_field(tag::SECURITY_REPORT_ID, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `SecurityReportID` is present, Tag 964.
    pub fn has_security_report_id(&self) -> bool {
        self.message.body.has(tag::SECURITY_REPORT_ID)
    }




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

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


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




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

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


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




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

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


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




    /// Sets `SecurityUpdateAction`, Tag 980.
    pub fn set_security_update_action(&mut self, v: String) {
        self.message.body.set_field(tag::SECURITY_UPDATE_ACTION, FIXString::from(v));
    }

    /// Gets `SecurityUpdateAction`, Tag 980.
    pub fn get_security_update_action(&self) -> Result<String, MessageRejectErrorEnum> {
        let mut fld = field::SecurityUpdateActionField::new(String::new());
        self.message.body.get_field(tag::SECURITY_UPDATE_ACTION, &mut fld.0)?;
        Ok(fld.value().to_string())
    }


    /// Returns true if `SecurityUpdateAction` is present, Tag 980.
    pub fn has_security_update_action(&self) -> bool {
        self.message.body.has(tag::SECURITY_UPDATE_ACTION)
    }




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

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


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




    /// Sets `TransactTime`, Tag 60.
    pub fn set_transact_time(&mut self, v: Timestamp) {
        self.message.body.set_field(tag::TRANSACT_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
            time: v,
            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
        });
    }

    /// Gets `TransactTime`, Tag 60.
    pub fn get_transact_time(&self) -> Result<Timestamp, MessageRejectErrorEnum> {
        let mut fld = field::TransactTimeField::new(Timestamp::UNIX_EPOCH);
        self.message.body.get_field(tag::TRANSACT_TIME, &mut fld.0)?;
        Ok(fld.value())
    }


    /// Returns true if `TransactTime` is present, Tag 60.
    pub fn has_transact_time(&self) -> bool {
        self.message.body.has(tag::TRANSACT_TIME)
    }


}

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

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

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