forked from quickfixgo/quickfix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OrderCancelReject.generated.go
461 lines (388 loc) · 12.7 KB
/
OrderCancelReject.generated.go
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
package ordercancelreject
import (
"time"
"github.com/Boklazhenko/quickfix"
"github.com/Boklazhenko/quickfix/gen/enum"
"github.com/Boklazhenko/quickfix/gen/field"
"github.com/Boklazhenko/quickfix/gen/fixt11"
"github.com/Boklazhenko/quickfix/gen/tag"
)
// OrderCancelReject is the fix50 OrderCancelReject type, MsgType = 9.
type OrderCancelReject struct {
fixt11.Header
*quickfix.Body
fixt11.Trailer
Message *quickfix.Message
}
// FromMessage creates a OrderCancelReject from a quickfix.Message instance.
func FromMessage(m *quickfix.Message) OrderCancelReject {
return OrderCancelReject{
Header: fixt11.Header{&m.Header},
Body: &m.Body,
Trailer: fixt11.Trailer{&m.Trailer},
Message: m,
}
}
// ToMessage returns a quickfix.Message instance.
func (m OrderCancelReject) ToMessage() *quickfix.Message {
return m.Message
}
// New returns a OrderCancelReject initialized with the required fields for OrderCancelReject.
func New(orderid field.OrderIDField, clordid field.ClOrdIDField, origclordid field.OrigClOrdIDField, ordstatus field.OrdStatusField, cxlrejresponseto field.CxlRejResponseToField) (m OrderCancelReject) {
m.Message = quickfix.NewMessage()
m.Header = fixt11.NewHeader(&m.Message.Header)
m.Body = &m.Message.Body
m.Trailer.Trailer = &m.Message.Trailer
m.Header.Set(field.NewMsgType("9"))
m.Set(orderid)
m.Set(clordid)
m.Set(origclordid)
m.Set(ordstatus)
m.Set(cxlrejresponseto)
return
}
// A RouteOut is the callback type that should be implemented for routing Message.
type RouteOut func(msg OrderCancelReject, sessionID quickfix.SessionID) quickfix.MessageRejectError
// Route returns the beginstring, message type, and MessageRoute for this Message type.
func Route(router RouteOut) (string, string, quickfix.MessageRoute) {
r := func(msg *quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
return router(FromMessage(msg), sessionID)
}
return "7", "9", r
}
// SetAccount sets Account, Tag 1.
func (m OrderCancelReject) SetAccount(v string) {
m.Set(field.NewAccount(v))
}
// SetClOrdID sets ClOrdID, Tag 11.
func (m OrderCancelReject) SetClOrdID(v string) {
m.Set(field.NewClOrdID(v))
}
// SetOrderID sets OrderID, Tag 37.
func (m OrderCancelReject) SetOrderID(v string) {
m.Set(field.NewOrderID(v))
}
// SetOrdStatus sets OrdStatus, Tag 39.
func (m OrderCancelReject) SetOrdStatus(v enum.OrdStatus) {
m.Set(field.NewOrdStatus(v))
}
// SetOrigClOrdID sets OrigClOrdID, Tag 41.
func (m OrderCancelReject) SetOrigClOrdID(v string) {
m.Set(field.NewOrigClOrdID(v))
}
// SetText sets Text, Tag 58.
func (m OrderCancelReject) SetText(v string) {
m.Set(field.NewText(v))
}
// SetTransactTime sets TransactTime, Tag 60.
func (m OrderCancelReject) SetTransactTime(v time.Time) {
m.Set(field.NewTransactTime(v))
}
// SetListID sets ListID, Tag 66.
func (m OrderCancelReject) SetListID(v string) {
m.Set(field.NewListID(v))
}
// SetTradeDate sets TradeDate, Tag 75.
func (m OrderCancelReject) SetTradeDate(v string) {
m.Set(field.NewTradeDate(v))
}
// SetCxlRejReason sets CxlRejReason, Tag 102.
func (m OrderCancelReject) SetCxlRejReason(v enum.CxlRejReason) {
m.Set(field.NewCxlRejReason(v))
}
// SetSecondaryOrderID sets SecondaryOrderID, Tag 198.
func (m OrderCancelReject) SetSecondaryOrderID(v string) {
m.Set(field.NewSecondaryOrderID(v))
}
// SetTradeOriginationDate sets TradeOriginationDate, Tag 229.
func (m OrderCancelReject) SetTradeOriginationDate(v string) {
m.Set(field.NewTradeOriginationDate(v))
}
// SetEncodedTextLen sets EncodedTextLen, Tag 354.
func (m OrderCancelReject) SetEncodedTextLen(v int) {
m.Set(field.NewEncodedTextLen(v))
}
// SetEncodedText sets EncodedText, Tag 355.
func (m OrderCancelReject) SetEncodedText(v string) {
m.Set(field.NewEncodedText(v))
}
// SetCxlRejResponseTo sets CxlRejResponseTo, Tag 434.
func (m OrderCancelReject) SetCxlRejResponseTo(v enum.CxlRejResponseTo) {
m.Set(field.NewCxlRejResponseTo(v))
}
// SetSecondaryClOrdID sets SecondaryClOrdID, Tag 526.
func (m OrderCancelReject) SetSecondaryClOrdID(v string) {
m.Set(field.NewSecondaryClOrdID(v))
}
// SetAccountType sets AccountType, Tag 581.
func (m OrderCancelReject) SetAccountType(v enum.AccountType) {
m.Set(field.NewAccountType(v))
}
// SetClOrdLinkID sets ClOrdLinkID, Tag 583.
func (m OrderCancelReject) SetClOrdLinkID(v string) {
m.Set(field.NewClOrdLinkID(v))
}
// SetOrigOrdModTime sets OrigOrdModTime, Tag 586.
func (m OrderCancelReject) SetOrigOrdModTime(v time.Time) {
m.Set(field.NewOrigOrdModTime(v))
}
// SetWorkingIndicator sets WorkingIndicator, Tag 636.
func (m OrderCancelReject) SetWorkingIndicator(v bool) {
m.Set(field.NewWorkingIndicator(v))
}
// SetAcctIDSource sets AcctIDSource, Tag 660.
func (m OrderCancelReject) SetAcctIDSource(v enum.AcctIDSource) {
m.Set(field.NewAcctIDSource(v))
}
// GetAccount gets Account, Tag 1.
func (m OrderCancelReject) GetAccount() (v string, err quickfix.MessageRejectError) {
var f field.AccountField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetClOrdID gets ClOrdID, Tag 11.
func (m OrderCancelReject) GetClOrdID() (v string, err quickfix.MessageRejectError) {
var f field.ClOrdIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetOrderID gets OrderID, Tag 37.
func (m OrderCancelReject) GetOrderID() (v string, err quickfix.MessageRejectError) {
var f field.OrderIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetOrdStatus gets OrdStatus, Tag 39.
func (m OrderCancelReject) GetOrdStatus() (v enum.OrdStatus, err quickfix.MessageRejectError) {
var f field.OrdStatusField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetOrigClOrdID gets OrigClOrdID, Tag 41.
func (m OrderCancelReject) GetOrigClOrdID() (v string, err quickfix.MessageRejectError) {
var f field.OrigClOrdIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetText gets Text, Tag 58.
func (m OrderCancelReject) GetText() (v string, err quickfix.MessageRejectError) {
var f field.TextField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetTransactTime gets TransactTime, Tag 60.
func (m OrderCancelReject) GetTransactTime() (v time.Time, err quickfix.MessageRejectError) {
var f field.TransactTimeField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetListID gets ListID, Tag 66.
func (m OrderCancelReject) GetListID() (v string, err quickfix.MessageRejectError) {
var f field.ListIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetTradeDate gets TradeDate, Tag 75.
func (m OrderCancelReject) GetTradeDate() (v string, err quickfix.MessageRejectError) {
var f field.TradeDateField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetCxlRejReason gets CxlRejReason, Tag 102.
func (m OrderCancelReject) GetCxlRejReason() (v enum.CxlRejReason, err quickfix.MessageRejectError) {
var f field.CxlRejReasonField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetSecondaryOrderID gets SecondaryOrderID, Tag 198.
func (m OrderCancelReject) GetSecondaryOrderID() (v string, err quickfix.MessageRejectError) {
var f field.SecondaryOrderIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetTradeOriginationDate gets TradeOriginationDate, Tag 229.
func (m OrderCancelReject) GetTradeOriginationDate() (v string, err quickfix.MessageRejectError) {
var f field.TradeOriginationDateField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetEncodedTextLen gets EncodedTextLen, Tag 354.
func (m OrderCancelReject) GetEncodedTextLen() (v int, err quickfix.MessageRejectError) {
var f field.EncodedTextLenField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetEncodedText gets EncodedText, Tag 355.
func (m OrderCancelReject) GetEncodedText() (v string, err quickfix.MessageRejectError) {
var f field.EncodedTextField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetCxlRejResponseTo gets CxlRejResponseTo, Tag 434.
func (m OrderCancelReject) GetCxlRejResponseTo() (v enum.CxlRejResponseTo, err quickfix.MessageRejectError) {
var f field.CxlRejResponseToField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetSecondaryClOrdID gets SecondaryClOrdID, Tag 526.
func (m OrderCancelReject) GetSecondaryClOrdID() (v string, err quickfix.MessageRejectError) {
var f field.SecondaryClOrdIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetAccountType gets AccountType, Tag 581.
func (m OrderCancelReject) GetAccountType() (v enum.AccountType, err quickfix.MessageRejectError) {
var f field.AccountTypeField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetClOrdLinkID gets ClOrdLinkID, Tag 583.
func (m OrderCancelReject) GetClOrdLinkID() (v string, err quickfix.MessageRejectError) {
var f field.ClOrdLinkIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetOrigOrdModTime gets OrigOrdModTime, Tag 586.
func (m OrderCancelReject) GetOrigOrdModTime() (v time.Time, err quickfix.MessageRejectError) {
var f field.OrigOrdModTimeField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetWorkingIndicator gets WorkingIndicator, Tag 636.
func (m OrderCancelReject) GetWorkingIndicator() (v bool, err quickfix.MessageRejectError) {
var f field.WorkingIndicatorField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// GetAcctIDSource gets AcctIDSource, Tag 660.
func (m OrderCancelReject) GetAcctIDSource() (v enum.AcctIDSource, err quickfix.MessageRejectError) {
var f field.AcctIDSourceField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
// HasAccount returns true if Account is present, Tag 1.
func (m OrderCancelReject) HasAccount() bool {
return m.Has(tag.Account)
}
// HasClOrdID returns true if ClOrdID is present, Tag 11.
func (m OrderCancelReject) HasClOrdID() bool {
return m.Has(tag.ClOrdID)
}
// HasOrderID returns true if OrderID is present, Tag 37.
func (m OrderCancelReject) HasOrderID() bool {
return m.Has(tag.OrderID)
}
// HasOrdStatus returns true if OrdStatus is present, Tag 39.
func (m OrderCancelReject) HasOrdStatus() bool {
return m.Has(tag.OrdStatus)
}
// HasOrigClOrdID returns true if OrigClOrdID is present, Tag 41.
func (m OrderCancelReject) HasOrigClOrdID() bool {
return m.Has(tag.OrigClOrdID)
}
// HasText returns true if Text is present, Tag 58.
func (m OrderCancelReject) HasText() bool {
return m.Has(tag.Text)
}
// HasTransactTime returns true if TransactTime is present, Tag 60.
func (m OrderCancelReject) HasTransactTime() bool {
return m.Has(tag.TransactTime)
}
// HasListID returns true if ListID is present, Tag 66.
func (m OrderCancelReject) HasListID() bool {
return m.Has(tag.ListID)
}
// HasTradeDate returns true if TradeDate is present, Tag 75.
func (m OrderCancelReject) HasTradeDate() bool {
return m.Has(tag.TradeDate)
}
// HasCxlRejReason returns true if CxlRejReason is present, Tag 102.
func (m OrderCancelReject) HasCxlRejReason() bool {
return m.Has(tag.CxlRejReason)
}
// HasSecondaryOrderID returns true if SecondaryOrderID is present, Tag 198.
func (m OrderCancelReject) HasSecondaryOrderID() bool {
return m.Has(tag.SecondaryOrderID)
}
// HasTradeOriginationDate returns true if TradeOriginationDate is present, Tag 229.
func (m OrderCancelReject) HasTradeOriginationDate() bool {
return m.Has(tag.TradeOriginationDate)
}
// HasEncodedTextLen returns true if EncodedTextLen is present, Tag 354.
func (m OrderCancelReject) HasEncodedTextLen() bool {
return m.Has(tag.EncodedTextLen)
}
// HasEncodedText returns true if EncodedText is present, Tag 355.
func (m OrderCancelReject) HasEncodedText() bool {
return m.Has(tag.EncodedText)
}
// HasCxlRejResponseTo returns true if CxlRejResponseTo is present, Tag 434.
func (m OrderCancelReject) HasCxlRejResponseTo() bool {
return m.Has(tag.CxlRejResponseTo)
}
// HasSecondaryClOrdID returns true if SecondaryClOrdID is present, Tag 526.
func (m OrderCancelReject) HasSecondaryClOrdID() bool {
return m.Has(tag.SecondaryClOrdID)
}
// HasAccountType returns true if AccountType is present, Tag 581.
func (m OrderCancelReject) HasAccountType() bool {
return m.Has(tag.AccountType)
}
// HasClOrdLinkID returns true if ClOrdLinkID is present, Tag 583.
func (m OrderCancelReject) HasClOrdLinkID() bool {
return m.Has(tag.ClOrdLinkID)
}
// HasOrigOrdModTime returns true if OrigOrdModTime is present, Tag 586.
func (m OrderCancelReject) HasOrigOrdModTime() bool {
return m.Has(tag.OrigOrdModTime)
}
// HasWorkingIndicator returns true if WorkingIndicator is present, Tag 636.
func (m OrderCancelReject) HasWorkingIndicator() bool {
return m.Has(tag.WorkingIndicator)
}
// HasAcctIDSource returns true if AcctIDSource is present, Tag 660.
func (m OrderCancelReject) HasAcctIDSource() bool {
return m.Has(tag.AcctIDSource)
}