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
// Code generated by fixer-gen. DO NOT EDIT.
#![allow(clippy::new_without_default)]
#![allow(unused_imports)]

use fixer::field_map::FieldMap;
use fixer::fix_string::FIXString;
use crate::tag;

/// `Header` is the `fix42` Header type.
pub struct Header<'a> {
    pub header: &'a mut FieldMap,
}

impl Header<'_> {
    /// Creates a new `Header` wrapping the given message header.
    pub fn new(header: &mut FieldMap) -> Header<'_> {
        header.set_field(tag::BEGIN_STRING, FIXString::from("FIX.4.2".to_string()));
        Header { header }
    }




    /// Sets `BeginString`, Tag 8.
    pub fn set_begin_string(&mut self, v: String) {
        self.header.set_field(tag::BEGIN_STRING, FIXString::from(v));
    }


    /// Returns true if `BeginString` is present, Tag 8.
    pub fn has_begin_string(&self) -> bool {
        self.header.has(tag::BEGIN_STRING)
    }




    /// Sets `BodyLength`, Tag 9.
    pub fn set_body_length(&mut self, v: isize) {
        self.header.set_field(tag::BODY_LENGTH, fixer::fix_int::FIXInt::from(v));
    }


    /// Returns true if `BodyLength` is present, Tag 9.
    pub fn has_body_length(&self) -> bool {
        self.header.has(tag::BODY_LENGTH)
    }




    /// Sets `DeliverToCompID`, Tag 128.
    pub fn set_deliver_to_comp_id(&mut self, v: String) {
        self.header.set_field(tag::DELIVER_TO_COMP_ID, FIXString::from(v));
    }


    /// Returns true if `DeliverToCompID` is present, Tag 128.
    pub fn has_deliver_to_comp_id(&self) -> bool {
        self.header.has(tag::DELIVER_TO_COMP_ID)
    }




    /// Sets `DeliverToLocationID`, Tag 145.
    pub fn set_deliver_to_location_id(&mut self, v: String) {
        self.header.set_field(tag::DELIVER_TO_LOCATION_ID, FIXString::from(v));
    }


    /// Returns true if `DeliverToLocationID` is present, Tag 145.
    pub fn has_deliver_to_location_id(&self) -> bool {
        self.header.has(tag::DELIVER_TO_LOCATION_ID)
    }




    /// Sets `DeliverToSubID`, Tag 129.
    pub fn set_deliver_to_sub_id(&mut self, v: String) {
        self.header.set_field(tag::DELIVER_TO_SUB_ID, FIXString::from(v));
    }


    /// Returns true if `DeliverToSubID` is present, Tag 129.
    pub fn has_deliver_to_sub_id(&self) -> bool {
        self.header.has(tag::DELIVER_TO_SUB_ID)
    }




    /// Sets `LastMsgSeqNumProcessed`, Tag 369.
    pub fn set_last_msg_seq_num_processed(&mut self, v: isize) {
        self.header.set_field(tag::LAST_MSG_SEQ_NUM_PROCESSED, fixer::fix_int::FIXInt::from(v));
    }


    /// Returns true if `LastMsgSeqNumProcessed` is present, Tag 369.
    pub fn has_last_msg_seq_num_processed(&self) -> bool {
        self.header.has(tag::LAST_MSG_SEQ_NUM_PROCESSED)
    }




    /// Sets `MessageEncoding`, Tag 347.
    pub fn set_message_encoding(&mut self, v: String) {
        self.header.set_field(tag::MESSAGE_ENCODING, FIXString::from(v));
    }


    /// Returns true if `MessageEncoding` is present, Tag 347.
    pub fn has_message_encoding(&self) -> bool {
        self.header.has(tag::MESSAGE_ENCODING)
    }




    /// Sets `MsgSeqNum`, Tag 34.
    pub fn set_msg_seq_num(&mut self, v: isize) {
        self.header.set_field(tag::MSG_SEQ_NUM, fixer::fix_int::FIXInt::from(v));
    }


    /// Returns true if `MsgSeqNum` is present, Tag 34.
    pub fn has_msg_seq_num(&self) -> bool {
        self.header.has(tag::MSG_SEQ_NUM)
    }




    /// Sets `MsgType`, Tag 35.
    pub fn set_msg_type(&mut self, v: String) {
        self.header.set_field(tag::MSG_TYPE, FIXString::from(v));
    }


    /// Returns true if `MsgType` is present, Tag 35.
    pub fn has_msg_type(&self) -> bool {
        self.header.has(tag::MSG_TYPE)
    }




    /// Sets `OnBehalfOfCompID`, Tag 115.
    pub fn set_on_behalf_of_comp_id(&mut self, v: String) {
        self.header.set_field(tag::ON_BEHALF_OF_COMP_ID, FIXString::from(v));
    }


    /// Returns true if `OnBehalfOfCompID` is present, Tag 115.
    pub fn has_on_behalf_of_comp_id(&self) -> bool {
        self.header.has(tag::ON_BEHALF_OF_COMP_ID)
    }




    /// Sets `OnBehalfOfLocationID`, Tag 144.
    pub fn set_on_behalf_of_location_id(&mut self, v: String) {
        self.header.set_field(tag::ON_BEHALF_OF_LOCATION_ID, FIXString::from(v));
    }


    /// Returns true if `OnBehalfOfLocationID` is present, Tag 144.
    pub fn has_on_behalf_of_location_id(&self) -> bool {
        self.header.has(tag::ON_BEHALF_OF_LOCATION_ID)
    }




    /// Sets `OnBehalfOfSendingTime`, Tag 370.
    pub fn set_on_behalf_of_sending_time(&mut self, v: jiff::Timestamp) {
        self.header.set_field(tag::ON_BEHALF_OF_SENDING_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
            time: v,
            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
        });
    }


    /// Returns true if `OnBehalfOfSendingTime` is present, Tag 370.
    pub fn has_on_behalf_of_sending_time(&self) -> bool {
        self.header.has(tag::ON_BEHALF_OF_SENDING_TIME)
    }




    /// Sets `OnBehalfOfSubID`, Tag 116.
    pub fn set_on_behalf_of_sub_id(&mut self, v: String) {
        self.header.set_field(tag::ON_BEHALF_OF_SUB_ID, FIXString::from(v));
    }


    /// Returns true if `OnBehalfOfSubID` is present, Tag 116.
    pub fn has_on_behalf_of_sub_id(&self) -> bool {
        self.header.has(tag::ON_BEHALF_OF_SUB_ID)
    }




    /// Sets `OrigSendingTime`, Tag 122.
    pub fn set_orig_sending_time(&mut self, v: jiff::Timestamp) {
        self.header.set_field(tag::ORIG_SENDING_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
            time: v,
            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
        });
    }


    /// Returns true if `OrigSendingTime` is present, Tag 122.
    pub fn has_orig_sending_time(&self) -> bool {
        self.header.has(tag::ORIG_SENDING_TIME)
    }




    /// Sets `PossDupFlag`, Tag 43.
    pub fn set_poss_dup_flag(&mut self, v: bool) {
        self.header.set_field(tag::POSS_DUP_FLAG, fixer::fix_boolean::FIXBoolean::from(v));
    }


    /// Returns true if `PossDupFlag` is present, Tag 43.
    pub fn has_poss_dup_flag(&self) -> bool {
        self.header.has(tag::POSS_DUP_FLAG)
    }




    /// Sets `PossResend`, Tag 97.
    pub fn set_poss_resend(&mut self, v: bool) {
        self.header.set_field(tag::POSS_RESEND, fixer::fix_boolean::FIXBoolean::from(v));
    }


    /// Returns true if `PossResend` is present, Tag 97.
    pub fn has_poss_resend(&self) -> bool {
        self.header.has(tag::POSS_RESEND)
    }




    /// Sets `SecureData`, Tag 91.
    pub fn set_secure_data(&mut self, v: String) {
        self.header.set_field(tag::SECURE_DATA, FIXString::from(v));
    }


    /// Returns true if `SecureData` is present, Tag 91.
    pub fn has_secure_data(&self) -> bool {
        self.header.has(tag::SECURE_DATA)
    }




    /// Sets `SecureDataLen`, Tag 90.
    pub fn set_secure_data_len(&mut self, v: isize) {
        self.header.set_field(tag::SECURE_DATA_LEN, fixer::fix_int::FIXInt::from(v));
    }


    /// Returns true if `SecureDataLen` is present, Tag 90.
    pub fn has_secure_data_len(&self) -> bool {
        self.header.has(tag::SECURE_DATA_LEN)
    }




    /// Sets `SenderCompID`, Tag 49.
    pub fn set_sender_comp_id(&mut self, v: String) {
        self.header.set_field(tag::SENDER_COMP_ID, FIXString::from(v));
    }


    /// Returns true if `SenderCompID` is present, Tag 49.
    pub fn has_sender_comp_id(&self) -> bool {
        self.header.has(tag::SENDER_COMP_ID)
    }




    /// Sets `SenderLocationID`, Tag 142.
    pub fn set_sender_location_id(&mut self, v: String) {
        self.header.set_field(tag::SENDER_LOCATION_ID, FIXString::from(v));
    }


    /// Returns true if `SenderLocationID` is present, Tag 142.
    pub fn has_sender_location_id(&self) -> bool {
        self.header.has(tag::SENDER_LOCATION_ID)
    }




    /// Sets `SenderSubID`, Tag 50.
    pub fn set_sender_sub_id(&mut self, v: String) {
        self.header.set_field(tag::SENDER_SUB_ID, FIXString::from(v));
    }


    /// Returns true if `SenderSubID` is present, Tag 50.
    pub fn has_sender_sub_id(&self) -> bool {
        self.header.has(tag::SENDER_SUB_ID)
    }




    /// Sets `SendingTime`, Tag 52.
    pub fn set_sending_time(&mut self, v: jiff::Timestamp) {
        self.header.set_field(tag::SENDING_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
            time: v,
            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
        });
    }


    /// Returns true if `SendingTime` is present, Tag 52.
    pub fn has_sending_time(&self) -> bool {
        self.header.has(tag::SENDING_TIME)
    }




    /// Sets `TargetCompID`, Tag 56.
    pub fn set_target_comp_id(&mut self, v: String) {
        self.header.set_field(tag::TARGET_COMP_ID, FIXString::from(v));
    }


    /// Returns true if `TargetCompID` is present, Tag 56.
    pub fn has_target_comp_id(&self) -> bool {
        self.header.has(tag::TARGET_COMP_ID)
    }




    /// Sets `TargetLocationID`, Tag 143.
    pub fn set_target_location_id(&mut self, v: String) {
        self.header.set_field(tag::TARGET_LOCATION_ID, FIXString::from(v));
    }


    /// Returns true if `TargetLocationID` is present, Tag 143.
    pub fn has_target_location_id(&self) -> bool {
        self.header.has(tag::TARGET_LOCATION_ID)
    }




    /// Sets `TargetSubID`, Tag 57.
    pub fn set_target_sub_id(&mut self, v: String) {
        self.header.set_field(tag::TARGET_SUB_ID, FIXString::from(v));
    }


    /// Returns true if `TargetSubID` is present, Tag 57.
    pub fn has_target_sub_id(&self) -> bool {
        self.header.has(tag::TARGET_SUB_ID)
    }




    /// Sets `XmlData`, Tag 213.
    pub fn set_xml_data(&mut self, v: String) {
        self.header.set_field(tag::XML_DATA, FIXString::from(v));
    }


    /// Returns true if `XmlData` is present, Tag 213.
    pub fn has_xml_data(&self) -> bool {
        self.header.has(tag::XML_DATA)
    }




    /// Sets `XmlDataLen`, Tag 212.
    pub fn set_xml_data_len(&mut self, v: isize) {
        self.header.set_field(tag::XML_DATA_LEN, fixer::fix_int::FIXInt::from(v));
    }


    /// Returns true if `XmlDataLen` is present, Tag 212.
    pub fn has_xml_data_len(&self) -> bool {
        self.header.has(tag::XML_DATA_LEN)
    }


}