d06039463b218ffc16ce998cfcedd6727849c3c1
[govpp.git] / binapi / pot / pot.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5
6 // Package pot contains generated bindings for API file pot.api.
7 //
8 // Contents:
9 //   8 messages
10 //
11 package pot
12
13 import (
14         api "git.fd.io/govpp.git/api"
15         codec "git.fd.io/govpp.git/codec"
16 )
17
18 // This is a compile-time assertion to ensure that this generated file
19 // is compatible with the GoVPP api package it is being compiled against.
20 // A compilation error at this line likely means your copy of the
21 // GoVPP api package needs to be updated.
22 const _ = api.GoVppAPIPackageIsVersion2
23
24 const (
25         APIFile    = "pot"
26         APIVersion = "1.0.0"
27         VersionCrc = 0xa9d8e55c
28 )
29
30 // PotProfileActivate defines message 'pot_profile_activate'.
31 type PotProfileActivate struct {
32         ID       uint8  `binapi:"u8,name=id" json:"id,omitempty"`
33         ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
34 }
35
36 func (m *PotProfileActivate) Reset()               { *m = PotProfileActivate{} }
37 func (*PotProfileActivate) GetMessageName() string { return "pot_profile_activate" }
38 func (*PotProfileActivate) GetCrcString() string   { return "0770af98" }
39 func (*PotProfileActivate) GetMessageType() api.MessageType {
40         return api.RequestMessage
41 }
42
43 func (m *PotProfileActivate) Size() (size int) {
44         if m == nil {
45                 return 0
46         }
47         size += 1                   // m.ID
48         size += 4 + len(m.ListName) // m.ListName
49         return size
50 }
51 func (m *PotProfileActivate) Marshal(b []byte) ([]byte, error) {
52         if b == nil {
53                 b = make([]byte, m.Size())
54         }
55         buf := codec.NewBuffer(b)
56         buf.EncodeUint8(m.ID)
57         buf.EncodeString(m.ListName, 0)
58         return buf.Bytes(), nil
59 }
60 func (m *PotProfileActivate) Unmarshal(b []byte) error {
61         buf := codec.NewBuffer(b)
62         m.ID = buf.DecodeUint8()
63         m.ListName = buf.DecodeString(0)
64         return nil
65 }
66
67 // PotProfileActivateReply defines message 'pot_profile_activate_reply'.
68 type PotProfileActivateReply struct {
69         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
70 }
71
72 func (m *PotProfileActivateReply) Reset()               { *m = PotProfileActivateReply{} }
73 func (*PotProfileActivateReply) GetMessageName() string { return "pot_profile_activate_reply" }
74 func (*PotProfileActivateReply) GetCrcString() string   { return "e8d4e804" }
75 func (*PotProfileActivateReply) GetMessageType() api.MessageType {
76         return api.ReplyMessage
77 }
78
79 func (m *PotProfileActivateReply) Size() (size int) {
80         if m == nil {
81                 return 0
82         }
83         size += 4 // m.Retval
84         return size
85 }
86 func (m *PotProfileActivateReply) Marshal(b []byte) ([]byte, error) {
87         if b == nil {
88                 b = make([]byte, m.Size())
89         }
90         buf := codec.NewBuffer(b)
91         buf.EncodeInt32(m.Retval)
92         return buf.Bytes(), nil
93 }
94 func (m *PotProfileActivateReply) Unmarshal(b []byte) error {
95         buf := codec.NewBuffer(b)
96         m.Retval = buf.DecodeInt32()
97         return nil
98 }
99
100 // PotProfileAdd defines message 'pot_profile_add'.
101 type PotProfileAdd struct {
102         ID               uint8  `binapi:"u8,name=id" json:"id,omitempty"`
103         Validator        uint8  `binapi:"u8,name=validator" json:"validator,omitempty"`
104         SecretKey        uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
105         SecretShare      uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
106         Prime            uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
107         MaxBits          uint8  `binapi:"u8,name=max_bits" json:"max_bits,omitempty"`
108         Lpc              uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
109         PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
110         ListName         string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
111 }
112
113 func (m *PotProfileAdd) Reset()               { *m = PotProfileAdd{} }
114 func (*PotProfileAdd) GetMessageName() string { return "pot_profile_add" }
115 func (*PotProfileAdd) GetCrcString() string   { return "ad5da3a3" }
116 func (*PotProfileAdd) GetMessageType() api.MessageType {
117         return api.RequestMessage
118 }
119
120 func (m *PotProfileAdd) Size() (size int) {
121         if m == nil {
122                 return 0
123         }
124         size += 1                   // m.ID
125         size += 1                   // m.Validator
126         size += 8                   // m.SecretKey
127         size += 8                   // m.SecretShare
128         size += 8                   // m.Prime
129         size += 1                   // m.MaxBits
130         size += 8                   // m.Lpc
131         size += 8                   // m.PolynomialPublic
132         size += 4 + len(m.ListName) // m.ListName
133         return size
134 }
135 func (m *PotProfileAdd) Marshal(b []byte) ([]byte, error) {
136         if b == nil {
137                 b = make([]byte, m.Size())
138         }
139         buf := codec.NewBuffer(b)
140         buf.EncodeUint8(m.ID)
141         buf.EncodeUint8(m.Validator)
142         buf.EncodeUint64(m.SecretKey)
143         buf.EncodeUint64(m.SecretShare)
144         buf.EncodeUint64(m.Prime)
145         buf.EncodeUint8(m.MaxBits)
146         buf.EncodeUint64(m.Lpc)
147         buf.EncodeUint64(m.PolynomialPublic)
148         buf.EncodeString(m.ListName, 0)
149         return buf.Bytes(), nil
150 }
151 func (m *PotProfileAdd) Unmarshal(b []byte) error {
152         buf := codec.NewBuffer(b)
153         m.ID = buf.DecodeUint8()
154         m.Validator = buf.DecodeUint8()
155         m.SecretKey = buf.DecodeUint64()
156         m.SecretShare = buf.DecodeUint64()
157         m.Prime = buf.DecodeUint64()
158         m.MaxBits = buf.DecodeUint8()
159         m.Lpc = buf.DecodeUint64()
160         m.PolynomialPublic = buf.DecodeUint64()
161         m.ListName = buf.DecodeString(0)
162         return nil
163 }
164
165 // PotProfileAddReply defines message 'pot_profile_add_reply'.
166 type PotProfileAddReply struct {
167         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
168 }
169
170 func (m *PotProfileAddReply) Reset()               { *m = PotProfileAddReply{} }
171 func (*PotProfileAddReply) GetMessageName() string { return "pot_profile_add_reply" }
172 func (*PotProfileAddReply) GetCrcString() string   { return "e8d4e804" }
173 func (*PotProfileAddReply) GetMessageType() api.MessageType {
174         return api.ReplyMessage
175 }
176
177 func (m *PotProfileAddReply) Size() (size int) {
178         if m == nil {
179                 return 0
180         }
181         size += 4 // m.Retval
182         return size
183 }
184 func (m *PotProfileAddReply) Marshal(b []byte) ([]byte, error) {
185         if b == nil {
186                 b = make([]byte, m.Size())
187         }
188         buf := codec.NewBuffer(b)
189         buf.EncodeInt32(m.Retval)
190         return buf.Bytes(), nil
191 }
192 func (m *PotProfileAddReply) Unmarshal(b []byte) error {
193         buf := codec.NewBuffer(b)
194         m.Retval = buf.DecodeInt32()
195         return nil
196 }
197
198 // PotProfileDel defines message 'pot_profile_del'.
199 type PotProfileDel struct {
200         ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
201 }
202
203 func (m *PotProfileDel) Reset()               { *m = PotProfileDel{} }
204 func (*PotProfileDel) GetMessageName() string { return "pot_profile_del" }
205 func (*PotProfileDel) GetCrcString() string   { return "cd63f53b" }
206 func (*PotProfileDel) GetMessageType() api.MessageType {
207         return api.RequestMessage
208 }
209
210 func (m *PotProfileDel) Size() (size int) {
211         if m == nil {
212                 return 0
213         }
214         size += 4 + len(m.ListName) // m.ListName
215         return size
216 }
217 func (m *PotProfileDel) Marshal(b []byte) ([]byte, error) {
218         if b == nil {
219                 b = make([]byte, m.Size())
220         }
221         buf := codec.NewBuffer(b)
222         buf.EncodeString(m.ListName, 0)
223         return buf.Bytes(), nil
224 }
225 func (m *PotProfileDel) Unmarshal(b []byte) error {
226         buf := codec.NewBuffer(b)
227         m.ListName = buf.DecodeString(0)
228         return nil
229 }
230
231 // PotProfileDelReply defines message 'pot_profile_del_reply'.
232 type PotProfileDelReply struct {
233         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
234 }
235
236 func (m *PotProfileDelReply) Reset()               { *m = PotProfileDelReply{} }
237 func (*PotProfileDelReply) GetMessageName() string { return "pot_profile_del_reply" }
238 func (*PotProfileDelReply) GetCrcString() string   { return "e8d4e804" }
239 func (*PotProfileDelReply) GetMessageType() api.MessageType {
240         return api.ReplyMessage
241 }
242
243 func (m *PotProfileDelReply) Size() (size int) {
244         if m == nil {
245                 return 0
246         }
247         size += 4 // m.Retval
248         return size
249 }
250 func (m *PotProfileDelReply) Marshal(b []byte) ([]byte, error) {
251         if b == nil {
252                 b = make([]byte, m.Size())
253         }
254         buf := codec.NewBuffer(b)
255         buf.EncodeInt32(m.Retval)
256         return buf.Bytes(), nil
257 }
258 func (m *PotProfileDelReply) Unmarshal(b []byte) error {
259         buf := codec.NewBuffer(b)
260         m.Retval = buf.DecodeInt32()
261         return nil
262 }
263
264 // PotProfileShowConfigDetails defines message 'pot_profile_show_config_details'.
265 type PotProfileShowConfigDetails struct {
266         Retval           int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
267         ID               uint8  `binapi:"u8,name=id" json:"id,omitempty"`
268         Validator        uint8  `binapi:"u8,name=validator" json:"validator,omitempty"`
269         SecretKey        uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
270         SecretShare      uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
271         Prime            uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
272         BitMask          uint64 `binapi:"u64,name=bit_mask" json:"bit_mask,omitempty"`
273         Lpc              uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
274         PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
275 }
276
277 func (m *PotProfileShowConfigDetails) Reset()               { *m = PotProfileShowConfigDetails{} }
278 func (*PotProfileShowConfigDetails) GetMessageName() string { return "pot_profile_show_config_details" }
279 func (*PotProfileShowConfigDetails) GetCrcString() string   { return "b7ce0618" }
280 func (*PotProfileShowConfigDetails) GetMessageType() api.MessageType {
281         return api.ReplyMessage
282 }
283
284 func (m *PotProfileShowConfigDetails) Size() (size int) {
285         if m == nil {
286                 return 0
287         }
288         size += 4 // m.Retval
289         size += 1 // m.ID
290         size += 1 // m.Validator
291         size += 8 // m.SecretKey
292         size += 8 // m.SecretShare
293         size += 8 // m.Prime
294         size += 8 // m.BitMask
295         size += 8 // m.Lpc
296         size += 8 // m.PolynomialPublic
297         return size
298 }
299 func (m *PotProfileShowConfigDetails) Marshal(b []byte) ([]byte, error) {
300         if b == nil {
301                 b = make([]byte, m.Size())
302         }
303         buf := codec.NewBuffer(b)
304         buf.EncodeInt32(m.Retval)
305         buf.EncodeUint8(m.ID)
306         buf.EncodeUint8(m.Validator)
307         buf.EncodeUint64(m.SecretKey)
308         buf.EncodeUint64(m.SecretShare)
309         buf.EncodeUint64(m.Prime)
310         buf.EncodeUint64(m.BitMask)
311         buf.EncodeUint64(m.Lpc)
312         buf.EncodeUint64(m.PolynomialPublic)
313         return buf.Bytes(), nil
314 }
315 func (m *PotProfileShowConfigDetails) Unmarshal(b []byte) error {
316         buf := codec.NewBuffer(b)
317         m.Retval = buf.DecodeInt32()
318         m.ID = buf.DecodeUint8()
319         m.Validator = buf.DecodeUint8()
320         m.SecretKey = buf.DecodeUint64()
321         m.SecretShare = buf.DecodeUint64()
322         m.Prime = buf.DecodeUint64()
323         m.BitMask = buf.DecodeUint64()
324         m.Lpc = buf.DecodeUint64()
325         m.PolynomialPublic = buf.DecodeUint64()
326         return nil
327 }
328
329 // PotProfileShowConfigDump defines message 'pot_profile_show_config_dump'.
330 type PotProfileShowConfigDump struct {
331         ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
332 }
333
334 func (m *PotProfileShowConfigDump) Reset()               { *m = PotProfileShowConfigDump{} }
335 func (*PotProfileShowConfigDump) GetMessageName() string { return "pot_profile_show_config_dump" }
336 func (*PotProfileShowConfigDump) GetCrcString() string   { return "005b7d59" }
337 func (*PotProfileShowConfigDump) GetMessageType() api.MessageType {
338         return api.RequestMessage
339 }
340
341 func (m *PotProfileShowConfigDump) Size() (size int) {
342         if m == nil {
343                 return 0
344         }
345         size += 1 // m.ID
346         return size
347 }
348 func (m *PotProfileShowConfigDump) Marshal(b []byte) ([]byte, error) {
349         if b == nil {
350                 b = make([]byte, m.Size())
351         }
352         buf := codec.NewBuffer(b)
353         buf.EncodeUint8(m.ID)
354         return buf.Bytes(), nil
355 }
356 func (m *PotProfileShowConfigDump) Unmarshal(b []byte) error {
357         buf := codec.NewBuffer(b)
358         m.ID = buf.DecodeUint8()
359         return nil
360 }
361
362 func init() { file_pot_binapi_init() }
363 func file_pot_binapi_init() {
364         api.RegisterMessage((*PotProfileActivate)(nil), "pot_profile_activate_0770af98")
365         api.RegisterMessage((*PotProfileActivateReply)(nil), "pot_profile_activate_reply_e8d4e804")
366         api.RegisterMessage((*PotProfileAdd)(nil), "pot_profile_add_ad5da3a3")
367         api.RegisterMessage((*PotProfileAddReply)(nil), "pot_profile_add_reply_e8d4e804")
368         api.RegisterMessage((*PotProfileDel)(nil), "pot_profile_del_cd63f53b")
369         api.RegisterMessage((*PotProfileDelReply)(nil), "pot_profile_del_reply_e8d4e804")
370         api.RegisterMessage((*PotProfileShowConfigDetails)(nil), "pot_profile_show_config_details_b7ce0618")
371         api.RegisterMessage((*PotProfileShowConfigDump)(nil), "pot_profile_show_config_dump_005b7d59")
372 }
373
374 // Messages returns list of all messages in this module.
375 func AllMessages() []api.Message {
376         return []api.Message{
377                 (*PotProfileActivate)(nil),
378                 (*PotProfileActivateReply)(nil),
379                 (*PotProfileAdd)(nil),
380                 (*PotProfileAddReply)(nil),
381                 (*PotProfileDel)(nil),
382                 (*PotProfileDelReply)(nil),
383                 (*PotProfileShowConfigDetails)(nil),
384                 (*PotProfileShowConfigDump)(nil),
385         }
386 }