forked from alpacahq/quickfix
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ListCancelRequest.generated.go
191 lines (160 loc) · 5.16 KB
/
ListCancelRequest.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
package listcancelrequest
import (
"time"
"github.com/cryptogarageinc/quickfix-go"
"github.com/cryptogarageinc/quickfix-go/field"
"github.com/cryptogarageinc/quickfix-go/fix44"
"github.com/cryptogarageinc/quickfix-go/tag"
)
//ListCancelRequest is the fix44 ListCancelRequest type, MsgType = K
type ListCancelRequest struct {
fix44.Header
*quickfix.Body
fix44.Trailer
Message *quickfix.Message
}
//FromMessage creates a ListCancelRequest from a quickfix.Message instance
func FromMessage(m *quickfix.Message) ListCancelRequest {
return ListCancelRequest{
Header: fix44.Header{&m.Header},
Body: &m.Body,
Trailer: fix44.Trailer{&m.Trailer},
Message: m,
}
}
//ToMessage returns a quickfix.Message instance
func (m ListCancelRequest) ToMessage() *quickfix.Message {
return m.Message
}
//New returns a ListCancelRequest initialized with the required fields for ListCancelRequest
func New(listid field.ListIDField, transacttime field.TransactTimeField) (m ListCancelRequest) {
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("K"))
m.Set(listid)
m.Set(transacttime)
return
}
//A RouteOut is the callback type that should be implemented for routing Message
type RouteOut func(msg ListCancelRequest, 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", "K", r
}
//SetText sets Text, Tag 58
func (m ListCancelRequest) SetText(v string) {
m.Set(field.NewText(v))
}
//SetTransactTime sets TransactTime, Tag 60
func (m ListCancelRequest) SetTransactTime(v time.Time) {
m.Set(field.NewTransactTime(v))
}
//SetListID sets ListID, Tag 66
func (m ListCancelRequest) SetListID(v string) {
m.Set(field.NewListID(v))
}
//SetTradeDate sets TradeDate, Tag 75
func (m ListCancelRequest) SetTradeDate(v string) {
m.Set(field.NewTradeDate(v))
}
//SetTradeOriginationDate sets TradeOriginationDate, Tag 229
func (m ListCancelRequest) SetTradeOriginationDate(v string) {
m.Set(field.NewTradeOriginationDate(v))
}
//SetEncodedTextLen sets EncodedTextLen, Tag 354
func (m ListCancelRequest) SetEncodedTextLen(v int) {
m.Set(field.NewEncodedTextLen(v))
}
//SetEncodedText sets EncodedText, Tag 355
func (m ListCancelRequest) SetEncodedText(v string) {
m.Set(field.NewEncodedText(v))
}
//GetText gets Text, Tag 58
func (m ListCancelRequest) 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 ListCancelRequest) 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 ListCancelRequest) 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 ListCancelRequest) GetTradeDate() (v string, err quickfix.MessageRejectError) {
var f field.TradeDateField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//GetTradeOriginationDate gets TradeOriginationDate, Tag 229
func (m ListCancelRequest) 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 ListCancelRequest) 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 ListCancelRequest) GetEncodedText() (v string, err quickfix.MessageRejectError) {
var f field.EncodedTextField
if err = m.Get(&f); err == nil {
v = f.Value()
}
return
}
//HasText returns true if Text is present, Tag 58
func (m ListCancelRequest) HasText() bool {
return m.Has(tag.Text)
}
//HasTransactTime returns true if TransactTime is present, Tag 60
func (m ListCancelRequest) HasTransactTime() bool {
return m.Has(tag.TransactTime)
}
//HasListID returns true if ListID is present, Tag 66
func (m ListCancelRequest) HasListID() bool {
return m.Has(tag.ListID)
}
//HasTradeDate returns true if TradeDate is present, Tag 75
func (m ListCancelRequest) HasTradeDate() bool {
return m.Has(tag.TradeDate)
}
//HasTradeOriginationDate returns true if TradeOriginationDate is present, Tag 229
func (m ListCancelRequest) HasTradeOriginationDate() bool {
return m.Has(tag.TradeOriginationDate)
}
//HasEncodedTextLen returns true if EncodedTextLen is present, Tag 354
func (m ListCancelRequest) HasEncodedTextLen() bool {
return m.Has(tag.EncodedTextLen)
}
//HasEncodedText returns true if EncodedText is present, Tag 355
func (m ListCancelRequest) HasEncodedText() bool {
return m.Has(tag.EncodedText)
}