Skip to main content

fixer_fix/fixt11/
header.rs

1// Code generated by fixer-gen. DO NOT EDIT.
2#![allow(clippy::new_without_default)]
3#![allow(unused_imports)]
4
5use fixer::field_map::FieldMap;
6use fixer::fix_string::FIXString;
7use crate::tag;
8
9/// `Header` is the `fixt11` Header type.
10pub struct Header<'a> {
11    pub header: &'a mut FieldMap,
12}
13
14impl Header<'_> {
15    /// Creates a new `Header` wrapping the given message header.
16    pub fn new(header: &mut FieldMap) -> Header<'_> {
17        header.set_field(tag::BEGIN_STRING, FIXString::from("FIXT.1.1".to_string()));
18        Header { header }
19    }
20
21
22
23
24    /// Sets `ApplVerID`, Tag 1128.
25    pub fn set_appl_ver_id(&mut self, v: String) {
26        self.header.set_field(tag::APPL_VER_ID, FIXString::from(v));
27    }
28
29
30    /// Returns true if `ApplVerID` is present, Tag 1128.
31    pub fn has_appl_ver_id(&self) -> bool {
32        self.header.has(tag::APPL_VER_ID)
33    }
34
35
36
37
38    /// Sets `BeginString`, Tag 8.
39    pub fn set_begin_string(&mut self, v: String) {
40        self.header.set_field(tag::BEGIN_STRING, FIXString::from(v));
41    }
42
43
44    /// Returns true if `BeginString` is present, Tag 8.
45    pub fn has_begin_string(&self) -> bool {
46        self.header.has(tag::BEGIN_STRING)
47    }
48
49
50
51
52    /// Sets `BodyLength`, Tag 9.
53    pub fn set_body_length(&mut self, v: isize) {
54        self.header.set_field(tag::BODY_LENGTH, fixer::fix_int::FIXInt::from(v));
55    }
56
57
58    /// Returns true if `BodyLength` is present, Tag 9.
59    pub fn has_body_length(&self) -> bool {
60        self.header.has(tag::BODY_LENGTH)
61    }
62
63
64
65
66    /// Sets `CstmApplVerID`, Tag 1129.
67    pub fn set_cstm_appl_ver_id(&mut self, v: String) {
68        self.header.set_field(tag::CSTM_APPL_VER_ID, FIXString::from(v));
69    }
70
71
72    /// Returns true if `CstmApplVerID` is present, Tag 1129.
73    pub fn has_cstm_appl_ver_id(&self) -> bool {
74        self.header.has(tag::CSTM_APPL_VER_ID)
75    }
76
77
78
79
80    /// Sets `DeliverToCompID`, Tag 128.
81    pub fn set_deliver_to_comp_id(&mut self, v: String) {
82        self.header.set_field(tag::DELIVER_TO_COMP_ID, FIXString::from(v));
83    }
84
85
86    /// Returns true if `DeliverToCompID` is present, Tag 128.
87    pub fn has_deliver_to_comp_id(&self) -> bool {
88        self.header.has(tag::DELIVER_TO_COMP_ID)
89    }
90
91
92
93
94    /// Sets `DeliverToLocationID`, Tag 145.
95    pub fn set_deliver_to_location_id(&mut self, v: String) {
96        self.header.set_field(tag::DELIVER_TO_LOCATION_ID, FIXString::from(v));
97    }
98
99
100    /// Returns true if `DeliverToLocationID` is present, Tag 145.
101    pub fn has_deliver_to_location_id(&self) -> bool {
102        self.header.has(tag::DELIVER_TO_LOCATION_ID)
103    }
104
105
106
107
108    /// Sets `DeliverToSubID`, Tag 129.
109    pub fn set_deliver_to_sub_id(&mut self, v: String) {
110        self.header.set_field(tag::DELIVER_TO_SUB_ID, FIXString::from(v));
111    }
112
113
114    /// Returns true if `DeliverToSubID` is present, Tag 129.
115    pub fn has_deliver_to_sub_id(&self) -> bool {
116        self.header.has(tag::DELIVER_TO_SUB_ID)
117    }
118
119
120
121
122    /// Sets `LastMsgSeqNumProcessed`, Tag 369.
123    pub fn set_last_msg_seq_num_processed(&mut self, v: isize) {
124        self.header.set_field(tag::LAST_MSG_SEQ_NUM_PROCESSED, fixer::fix_int::FIXInt::from(v));
125    }
126
127
128    /// Returns true if `LastMsgSeqNumProcessed` is present, Tag 369.
129    pub fn has_last_msg_seq_num_processed(&self) -> bool {
130        self.header.has(tag::LAST_MSG_SEQ_NUM_PROCESSED)
131    }
132
133
134
135
136    /// Sets `MessageEncoding`, Tag 347.
137    pub fn set_message_encoding(&mut self, v: String) {
138        self.header.set_field(tag::MESSAGE_ENCODING, FIXString::from(v));
139    }
140
141
142    /// Returns true if `MessageEncoding` is present, Tag 347.
143    pub fn has_message_encoding(&self) -> bool {
144        self.header.has(tag::MESSAGE_ENCODING)
145    }
146
147
148
149
150    /// Sets `MsgSeqNum`, Tag 34.
151    pub fn set_msg_seq_num(&mut self, v: isize) {
152        self.header.set_field(tag::MSG_SEQ_NUM, fixer::fix_int::FIXInt::from(v));
153    }
154
155
156    /// Returns true if `MsgSeqNum` is present, Tag 34.
157    pub fn has_msg_seq_num(&self) -> bool {
158        self.header.has(tag::MSG_SEQ_NUM)
159    }
160
161
162
163
164    /// Sets `MsgType`, Tag 35.
165    pub fn set_msg_type(&mut self, v: String) {
166        self.header.set_field(tag::MSG_TYPE, FIXString::from(v));
167    }
168
169
170    /// Returns true if `MsgType` is present, Tag 35.
171    pub fn has_msg_type(&self) -> bool {
172        self.header.has(tag::MSG_TYPE)
173    }
174
175
176
177
178    /// Sets `NoHops`, Tag 627.
179    pub fn set_no_hops(&mut self, v: isize) {
180        self.header.set_field(tag::NO_HOPS, fixer::fix_int::FIXInt::from(v));
181    }
182
183
184    /// Returns true if `NoHops` is present, Tag 627.
185    pub fn has_no_hops(&self) -> bool {
186        self.header.has(tag::NO_HOPS)
187    }
188
189
190
191
192    /// Sets `OnBehalfOfCompID`, Tag 115.
193    pub fn set_on_behalf_of_comp_id(&mut self, v: String) {
194        self.header.set_field(tag::ON_BEHALF_OF_COMP_ID, FIXString::from(v));
195    }
196
197
198    /// Returns true if `OnBehalfOfCompID` is present, Tag 115.
199    pub fn has_on_behalf_of_comp_id(&self) -> bool {
200        self.header.has(tag::ON_BEHALF_OF_COMP_ID)
201    }
202
203
204
205
206    /// Sets `OnBehalfOfLocationID`, Tag 144.
207    pub fn set_on_behalf_of_location_id(&mut self, v: String) {
208        self.header.set_field(tag::ON_BEHALF_OF_LOCATION_ID, FIXString::from(v));
209    }
210
211
212    /// Returns true if `OnBehalfOfLocationID` is present, Tag 144.
213    pub fn has_on_behalf_of_location_id(&self) -> bool {
214        self.header.has(tag::ON_BEHALF_OF_LOCATION_ID)
215    }
216
217
218
219
220    /// Sets `OnBehalfOfSubID`, Tag 116.
221    pub fn set_on_behalf_of_sub_id(&mut self, v: String) {
222        self.header.set_field(tag::ON_BEHALF_OF_SUB_ID, FIXString::from(v));
223    }
224
225
226    /// Returns true if `OnBehalfOfSubID` is present, Tag 116.
227    pub fn has_on_behalf_of_sub_id(&self) -> bool {
228        self.header.has(tag::ON_BEHALF_OF_SUB_ID)
229    }
230
231
232
233
234    /// Sets `OrigSendingTime`, Tag 122.
235    pub fn set_orig_sending_time(&mut self, v: jiff::Timestamp) {
236        self.header.set_field(tag::ORIG_SENDING_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
237            time: v,
238            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
239        });
240    }
241
242
243    /// Returns true if `OrigSendingTime` is present, Tag 122.
244    pub fn has_orig_sending_time(&self) -> bool {
245        self.header.has(tag::ORIG_SENDING_TIME)
246    }
247
248
249
250
251    /// Sets `PossDupFlag`, Tag 43.
252    pub fn set_poss_dup_flag(&mut self, v: bool) {
253        self.header.set_field(tag::POSS_DUP_FLAG, fixer::fix_boolean::FIXBoolean::from(v));
254    }
255
256
257    /// Returns true if `PossDupFlag` is present, Tag 43.
258    pub fn has_poss_dup_flag(&self) -> bool {
259        self.header.has(tag::POSS_DUP_FLAG)
260    }
261
262
263
264
265    /// Sets `PossResend`, Tag 97.
266    pub fn set_poss_resend(&mut self, v: bool) {
267        self.header.set_field(tag::POSS_RESEND, fixer::fix_boolean::FIXBoolean::from(v));
268    }
269
270
271    /// Returns true if `PossResend` is present, Tag 97.
272    pub fn has_poss_resend(&self) -> bool {
273        self.header.has(tag::POSS_RESEND)
274    }
275
276
277
278
279    /// Sets `SecureData`, Tag 91.
280    pub fn set_secure_data(&mut self, v: String) {
281        self.header.set_field(tag::SECURE_DATA, FIXString::from(v));
282    }
283
284
285    /// Returns true if `SecureData` is present, Tag 91.
286    pub fn has_secure_data(&self) -> bool {
287        self.header.has(tag::SECURE_DATA)
288    }
289
290
291
292
293    /// Sets `SecureDataLen`, Tag 90.
294    pub fn set_secure_data_len(&mut self, v: isize) {
295        self.header.set_field(tag::SECURE_DATA_LEN, fixer::fix_int::FIXInt::from(v));
296    }
297
298
299    /// Returns true if `SecureDataLen` is present, Tag 90.
300    pub fn has_secure_data_len(&self) -> bool {
301        self.header.has(tag::SECURE_DATA_LEN)
302    }
303
304
305
306
307    /// Sets `SenderCompID`, Tag 49.
308    pub fn set_sender_comp_id(&mut self, v: String) {
309        self.header.set_field(tag::SENDER_COMP_ID, FIXString::from(v));
310    }
311
312
313    /// Returns true if `SenderCompID` is present, Tag 49.
314    pub fn has_sender_comp_id(&self) -> bool {
315        self.header.has(tag::SENDER_COMP_ID)
316    }
317
318
319
320
321    /// Sets `SenderLocationID`, Tag 142.
322    pub fn set_sender_location_id(&mut self, v: String) {
323        self.header.set_field(tag::SENDER_LOCATION_ID, FIXString::from(v));
324    }
325
326
327    /// Returns true if `SenderLocationID` is present, Tag 142.
328    pub fn has_sender_location_id(&self) -> bool {
329        self.header.has(tag::SENDER_LOCATION_ID)
330    }
331
332
333
334
335    /// Sets `SenderSubID`, Tag 50.
336    pub fn set_sender_sub_id(&mut self, v: String) {
337        self.header.set_field(tag::SENDER_SUB_ID, FIXString::from(v));
338    }
339
340
341    /// Returns true if `SenderSubID` is present, Tag 50.
342    pub fn has_sender_sub_id(&self) -> bool {
343        self.header.has(tag::SENDER_SUB_ID)
344    }
345
346
347
348
349    /// Sets `SendingTime`, Tag 52.
350    pub fn set_sending_time(&mut self, v: jiff::Timestamp) {
351        self.header.set_field(tag::SENDING_TIME, fixer::fix_utc_timestamp::FIXUTCTimestamp {
352            time: v,
353            precision: fixer::fix_utc_timestamp::TimestampPrecision::Millis,
354        });
355    }
356
357
358    /// Returns true if `SendingTime` is present, Tag 52.
359    pub fn has_sending_time(&self) -> bool {
360        self.header.has(tag::SENDING_TIME)
361    }
362
363
364
365
366    /// Sets `TargetCompID`, Tag 56.
367    pub fn set_target_comp_id(&mut self, v: String) {
368        self.header.set_field(tag::TARGET_COMP_ID, FIXString::from(v));
369    }
370
371
372    /// Returns true if `TargetCompID` is present, Tag 56.
373    pub fn has_target_comp_id(&self) -> bool {
374        self.header.has(tag::TARGET_COMP_ID)
375    }
376
377
378
379
380    /// Sets `TargetLocationID`, Tag 143.
381    pub fn set_target_location_id(&mut self, v: String) {
382        self.header.set_field(tag::TARGET_LOCATION_ID, FIXString::from(v));
383    }
384
385
386    /// Returns true if `TargetLocationID` is present, Tag 143.
387    pub fn has_target_location_id(&self) -> bool {
388        self.header.has(tag::TARGET_LOCATION_ID)
389    }
390
391
392
393
394    /// Sets `TargetSubID`, Tag 57.
395    pub fn set_target_sub_id(&mut self, v: String) {
396        self.header.set_field(tag::TARGET_SUB_ID, FIXString::from(v));
397    }
398
399
400    /// Returns true if `TargetSubID` is present, Tag 57.
401    pub fn has_target_sub_id(&self) -> bool {
402        self.header.has(tag::TARGET_SUB_ID)
403    }
404
405
406
407
408    /// Sets `XmlData`, Tag 213.
409    pub fn set_xml_data(&mut self, v: String) {
410        self.header.set_field(tag::XML_DATA, FIXString::from(v));
411    }
412
413
414    /// Returns true if `XmlData` is present, Tag 213.
415    pub fn has_xml_data(&self) -> bool {
416        self.header.has(tag::XML_DATA)
417    }
418
419
420
421
422    /// Sets `XmlDataLen`, Tag 212.
423    pub fn set_xml_data_len(&mut self, v: isize) {
424        self.header.set_field(tag::XML_DATA_LEN, fixer::fix_int::FIXInt::from(v));
425    }
426
427
428    /// Returns true if `XmlDataLen` is present, Tag 212.
429    pub fn has_xml_data_len(&self) -> bool {
430        self.header.has(tag::XML_DATA_LEN)
431    }
432
433
434}