forked from quickfixgo/quickfix
/
BidResponse.generated.go
482 lines (404 loc) · 13.4 KB
/
BidResponse.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
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
package bidresponse
import (
"github.com/shopspring/decimal"
"github.com/quickfixgo/quickfix"
"github.com/quickfixgo/quickfix/enum"
"github.com/quickfixgo/quickfix/field"
"github.com/quickfixgo/quickfix/fix44"
"github.com/quickfixgo/quickfix/tag"
)
//BidResponse is the fix44 BidResponse type, MsgType = l
type BidResponse struct {
fix44.Header
*quickfix.Body
fix44.Trailer
Message *quickfix.Message
}
//FromMessage creates a BidResponse from a quickfix.Message instance
func FromMessage(m *quickfix.Message) BidResponse {
return BidResponse{
Header: fix44.Header{&m.Header},
Body: &m.Body,
Trailer: fix44.Trailer{&m.Trailer},
Message: m,
}
}
//ToMessage returns a quickfix.Message instance
func (m BidResponse) ToMessage() *quickfix.Message {
return m.Message
}
//New returns a BidResponse initialized with the required fields for BidResponse
func New() (m BidResponse) {
m.Message = quickfix.NewMessage()
m.Header = fix44.NewHeader(&m.Message.Header)
m.Body = &m.Message.Body
m.Trailer.Trailer = &m.Message.Trailer
m.Header.Set(field.NewMsgType("l"))
return
}
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg BidResponse, 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 "FIX.4.4", "l", r
}
//SetBidID sets BidID, Tag 390
func (m BidResponse) SetBidID(v string) {
m.Set(field.NewBidID(v))
}
//SetClientBidID sets ClientBidID, Tag 391
func (m BidResponse) SetClientBidID(v string) {
m.Set(field.NewClientBidID(v))
}
//SetNoBidComponents sets NoBidComponents, Tag 420
func (m BidResponse) SetNoBidComponents(f NoBidComponentsRepeatingGroup) {
m.SetGroup(f)
}
//GetBidID gets BidID, Tag 390
func (m BidResponse) GetBidID() (v string, err quickfix.MessageRejectError) {
var f field.BidIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetClientBidID gets ClientBidID, Tag 391
func (m BidResponse) GetClientBidID() (v string, err quickfix.MessageRejectError) {
var f field.ClientBidIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetNoBidComponents gets NoBidComponents, Tag 420
func (m BidResponse) GetNoBidComponents() (NoBidComponentsRepeatingGroup, quickfix.MessageRejectError) {
f := NewNoBidComponentsRepeatingGroup()
err := m.GetGroup(f)
return f, err
}
//HasBidID returns true if BidID is present, Tag 390
func (m BidResponse) HasBidID() bool {
return m.Has(tag.BidID)
}
//HasClientBidID returns true if ClientBidID is present, Tag 391
func (m BidResponse) HasClientBidID() bool {
return m.Has(tag.ClientBidID)
}
//HasNoBidComponents returns true if NoBidComponents is present, Tag 420
func (m BidResponse) HasNoBidComponents() bool {
return m.Has(tag.NoBidComponents)
}
//NoBidComponents is a repeating group element, Tag 420
type NoBidComponents struct {
*quickfix.Group
}
//SetCommission sets Commission, Tag 12
func (m NoBidComponents) SetCommission(value decimal.Decimal, scale int32) {
m.Set(field.NewCommission(value, scale))
}
//SetCommType sets CommType, Tag 13
func (m NoBidComponents) SetCommType(v enum.CommType) {
m.Set(field.NewCommType(v))
}
//SetCommCurrency sets CommCurrency, Tag 479
func (m NoBidComponents) SetCommCurrency(v string) {
m.Set(field.NewCommCurrency(v))
}
//SetFundRenewWaiv sets FundRenewWaiv, Tag 497
func (m NoBidComponents) SetFundRenewWaiv(v enum.FundRenewWaiv) {
m.Set(field.NewFundRenewWaiv(v))
}
//SetListID sets ListID, Tag 66
func (m NoBidComponents) SetListID(v string) {
m.Set(field.NewListID(v))
}
//SetCountry sets Country, Tag 421
func (m NoBidComponents) SetCountry(v string) {
m.Set(field.NewCountry(v))
}
//SetSide sets Side, Tag 54
func (m NoBidComponents) SetSide(v enum.Side) {
m.Set(field.NewSide(v))
}
//SetPrice sets Price, Tag 44
func (m NoBidComponents) SetPrice(value decimal.Decimal, scale int32) {
m.Set(field.NewPrice(value, scale))
}
//SetPriceType sets PriceType, Tag 423
func (m NoBidComponents) SetPriceType(v enum.PriceType) {
m.Set(field.NewPriceType(v))
}
//SetFairValue sets FairValue, Tag 406
func (m NoBidComponents) SetFairValue(value decimal.Decimal, scale int32) {
m.Set(field.NewFairValue(value, scale))
}
//SetNetGrossInd sets NetGrossInd, Tag 430
func (m NoBidComponents) SetNetGrossInd(v enum.NetGrossInd) {
m.Set(field.NewNetGrossInd(v))
}
//SetSettlType sets SettlType, Tag 63
func (m NoBidComponents) SetSettlType(v enum.SettlType) {
m.Set(field.NewSettlType(v))
}
//SetSettlDate sets SettlDate, Tag 64
func (m NoBidComponents) SetSettlDate(v string) {
m.Set(field.NewSettlDate(v))
}
//SetTradingSessionID sets TradingSessionID, Tag 336
func (m NoBidComponents) SetTradingSessionID(v enum.TradingSessionID) {
m.Set(field.NewTradingSessionID(v))
}
//SetTradingSessionSubID sets TradingSessionSubID, Tag 625
func (m NoBidComponents) SetTradingSessionSubID(v enum.TradingSessionSubID) {
m.Set(field.NewTradingSessionSubID(v))
}
//SetText sets Text, Tag 58
func (m NoBidComponents) SetText(v string) {
m.Set(field.NewText(v))
}
//SetEncodedTextLen sets EncodedTextLen, Tag 354
func (m NoBidComponents) SetEncodedTextLen(v int) {
m.Set(field.NewEncodedTextLen(v))
}
//SetEncodedText sets EncodedText, Tag 355
func (m NoBidComponents) SetEncodedText(v string) {
m.Set(field.NewEncodedText(v))
}
//GetCommission gets Commission, Tag 12
func (m NoBidComponents) GetCommission() (v decimal.Decimal, err quickfix.MessageRejectError) {
var f field.CommissionField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetCommType gets CommType, Tag 13
func (m NoBidComponents) GetCommType() (v enum.CommType, err quickfix.MessageRejectError) {
var f field.CommTypeField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetCommCurrency gets CommCurrency, Tag 479
func (m NoBidComponents) GetCommCurrency() (v string, err quickfix.MessageRejectError) {
var f field.CommCurrencyField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetFundRenewWaiv gets FundRenewWaiv, Tag 497
func (m NoBidComponents) GetFundRenewWaiv() (v enum.FundRenewWaiv, err quickfix.MessageRejectError) {
var f field.FundRenewWaivField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetListID gets ListID, Tag 66
func (m NoBidComponents) GetListID() (v string, err quickfix.MessageRejectError) {
var f field.ListIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetCountry gets Country, Tag 421
func (m NoBidComponents) GetCountry() (v string, err quickfix.MessageRejectError) {
var f field.CountryField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetSide gets Side, Tag 54
func (m NoBidComponents) GetSide() (v enum.Side, err quickfix.MessageRejectError) {
var f field.SideField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetPrice gets Price, Tag 44
func (m NoBidComponents) GetPrice() (v decimal.Decimal, err quickfix.MessageRejectError) {
var f field.PriceField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetPriceType gets PriceType, Tag 423
func (m NoBidComponents) GetPriceType() (v enum.PriceType, err quickfix.MessageRejectError) {
var f field.PriceTypeField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetFairValue gets FairValue, Tag 406
func (m NoBidComponents) GetFairValue() (v decimal.Decimal, err quickfix.MessageRejectError) {
var f field.FairValueField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetNetGrossInd gets NetGrossInd, Tag 430
func (m NoBidComponents) GetNetGrossInd() (v enum.NetGrossInd, err quickfix.MessageRejectError) {
var f field.NetGrossIndField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetSettlType gets SettlType, Tag 63
func (m NoBidComponents) GetSettlType() (v enum.SettlType, err quickfix.MessageRejectError) {
var f field.SettlTypeField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetSettlDate gets SettlDate, Tag 64
func (m NoBidComponents) GetSettlDate() (v string, err quickfix.MessageRejectError) {
var f field.SettlDateField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetTradingSessionID gets TradingSessionID, Tag 336
func (m NoBidComponents) GetTradingSessionID() (v enum.TradingSessionID, err quickfix.MessageRejectError) {
var f field.TradingSessionIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetTradingSessionSubID gets TradingSessionSubID, Tag 625
func (m NoBidComponents) GetTradingSessionSubID() (v enum.TradingSessionSubID, err quickfix.MessageRejectError) {
var f field.TradingSessionSubIDField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetText gets Text, Tag 58
func (m NoBidComponents) GetText() (v string, err quickfix.MessageRejectError) {
var f field.TextField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetEncodedTextLen gets EncodedTextLen, Tag 354
func (m NoBidComponents) 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 NoBidComponents) GetEncodedText() (v string, err quickfix.MessageRejectError) {
var f field.EncodedTextField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//HasCommission returns true if Commission is present, Tag 12
func (m NoBidComponents) HasCommission() bool {
return m.Has(tag.Commission)
}
//HasCommType returns true if CommType is present, Tag 13
func (m NoBidComponents) HasCommType() bool {
return m.Has(tag.CommType)
}
//HasCommCurrency returns true if CommCurrency is present, Tag 479
func (m NoBidComponents) HasCommCurrency() bool {
return m.Has(tag.CommCurrency)
}
//HasFundRenewWaiv returns true if FundRenewWaiv is present, Tag 497
func (m NoBidComponents) HasFundRenewWaiv() bool {
return m.Has(tag.FundRenewWaiv)
}
//HasListID returns true if ListID is present, Tag 66
func (m NoBidComponents) HasListID() bool {
return m.Has(tag.ListID)
}
//HasCountry returns true if Country is present, Tag 421
func (m NoBidComponents) HasCountry() bool {
return m.Has(tag.Country)
}
//HasSide returns true if Side is present, Tag 54
func (m NoBidComponents) HasSide() bool {
return m.Has(tag.Side)
}
//HasPrice returns true if Price is present, Tag 44
func (m NoBidComponents) HasPrice() bool {
return m.Has(tag.Price)
}
//HasPriceType returns true if PriceType is present, Tag 423
func (m NoBidComponents) HasPriceType() bool {
return m.Has(tag.PriceType)
}
//HasFairValue returns true if FairValue is present, Tag 406
func (m NoBidComponents) HasFairValue() bool {
return m.Has(tag.FairValue)
}
//HasNetGrossInd returns true if NetGrossInd is present, Tag 430
func (m NoBidComponents) HasNetGrossInd() bool {
return m.Has(tag.NetGrossInd)
}
//HasSettlType returns true if SettlType is present, Tag 63
func (m NoBidComponents) HasSettlType() bool {
return m.Has(tag.SettlType)
}
//HasSettlDate returns true if SettlDate is present, Tag 64
func (m NoBidComponents) HasSettlDate() bool {
return m.Has(tag.SettlDate)
}
//HasTradingSessionID returns true if TradingSessionID is present, Tag 336
func (m NoBidComponents) HasTradingSessionID() bool {
return m.Has(tag.TradingSessionID)
}
//HasTradingSessionSubID returns true if TradingSessionSubID is present, Tag 625
func (m NoBidComponents) HasTradingSessionSubID() bool {
return m.Has(tag.TradingSessionSubID)
}
//HasText returns true if Text is present, Tag 58
func (m NoBidComponents) HasText() bool {
return m.Has(tag.Text)
}
//HasEncodedTextLen returns true if EncodedTextLen is present, Tag 354
func (m NoBidComponents) HasEncodedTextLen() bool {
return m.Has(tag.EncodedTextLen)
}
//HasEncodedText returns true if EncodedText is present, Tag 355
func (m NoBidComponents) HasEncodedText() bool {
return m.Has(tag.EncodedText)
}
//NoBidComponentsRepeatingGroup is a repeating group, Tag 420
type NoBidComponentsRepeatingGroup struct {
*quickfix.RepeatingGroup
}
//NewNoBidComponentsRepeatingGroup returns an initialized, NoBidComponentsRepeatingGroup
func NewNoBidComponentsRepeatingGroup() NoBidComponentsRepeatingGroup {
return NoBidComponentsRepeatingGroup{
quickfix.NewRepeatingGroup(tag.NoBidComponents,
quickfix.GroupTemplate{quickfix.GroupElement(tag.Commission), quickfix.GroupElement(tag.CommType), quickfix.GroupElement(tag.CommCurrency), quickfix.GroupElement(tag.FundRenewWaiv), quickfix.GroupElement(tag.ListID), quickfix.GroupElement(tag.Country), quickfix.GroupElement(tag.Side), quickfix.GroupElement(tag.Price), quickfix.GroupElement(tag.PriceType), quickfix.GroupElement(tag.FairValue), quickfix.GroupElement(tag.NetGrossInd), quickfix.GroupElement(tag.SettlType), quickfix.GroupElement(tag.SettlDate), quickfix.GroupElement(tag.TradingSessionID), quickfix.GroupElement(tag.TradingSessionSubID), quickfix.GroupElement(tag.Text), quickfix.GroupElement(tag.EncodedTextLen), quickfix.GroupElement(tag.EncodedText)})}
}
//Add create and append a new NoBidComponents to this group
func (m NoBidComponentsRepeatingGroup) Add() NoBidComponents {
g := m.RepeatingGroup.Add()
return NoBidComponents{g}
}
//Get returns the ith NoBidComponents in the NoBidComponentsRepeatinGroup
func (m NoBidComponentsRepeatingGroup) Get(i int) NoBidComponents {
return NoBidComponents{m.RepeatingGroup.Get(i)}
}