21201f0bc4c70328ae9a07152423173d8285381a
[govpp.git] / binapi / qos / qos.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 qos contains generated bindings for API file qos.api.
7 //
8 // Contents:
9 //   1 enum
10 //   5 structs
11 //  19 messages
12 //
13 package qos
14
15 import (
16         "strconv"
17
18         api "git.fd.io/govpp.git/api"
19         interface_types "git.fd.io/govpp.git/binapi/interface_types"
20         _ "git.fd.io/govpp.git/binapi/ip_types"
21         codec "git.fd.io/govpp.git/codec"
22 )
23
24 // This is a compile-time assertion to ensure that this generated file
25 // is compatible with the GoVPP api package it is being compiled against.
26 // A compilation error at this line likely means your copy of the
27 // GoVPP api package needs to be updated.
28 const _ = api.GoVppAPIPackageIsVersion2
29
30 const (
31         APIFile    = "qos"
32         APIVersion = "1.1.1"
33         VersionCrc = 0x1749d12c
34 )
35
36 // QosSource defines enum 'qos_source'.
37 type QosSource uint8
38
39 const (
40         QOS_API_SOURCE_EXT  QosSource = 0
41         QOS_API_SOURCE_VLAN QosSource = 1
42         QOS_API_SOURCE_MPLS QosSource = 2
43         QOS_API_SOURCE_IP   QosSource = 3
44 )
45
46 var (
47         QosSource_name = map[uint8]string{
48                 0: "QOS_API_SOURCE_EXT",
49                 1: "QOS_API_SOURCE_VLAN",
50                 2: "QOS_API_SOURCE_MPLS",
51                 3: "QOS_API_SOURCE_IP",
52         }
53         QosSource_value = map[string]uint8{
54                 "QOS_API_SOURCE_EXT":  0,
55                 "QOS_API_SOURCE_VLAN": 1,
56                 "QOS_API_SOURCE_MPLS": 2,
57                 "QOS_API_SOURCE_IP":   3,
58         }
59 )
60
61 func (x QosSource) String() string {
62         s, ok := QosSource_name[uint8(x)]
63         if ok {
64                 return s
65         }
66         return "QosSource(" + strconv.Itoa(int(x)) + ")"
67 }
68
69 // QosEgressMap defines type 'qos_egress_map'.
70 type QosEgressMap struct {
71         ID   uint32             `binapi:"u32,name=id" json:"id,omitempty"`
72         Rows [4]QosEgressMapRow `binapi:"qos_egress_map_row[4],name=rows" json:"rows,omitempty"`
73 }
74
75 // QosEgressMapRow defines type 'qos_egress_map_row'.
76 type QosEgressMapRow struct {
77         Outputs []byte `binapi:"u8[256],name=outputs" json:"outputs,omitempty"`
78 }
79
80 // QosMark defines type 'qos_mark'.
81 type QosMark struct {
82         SwIfIndex    uint32    `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
83         MapID        uint32    `binapi:"u32,name=map_id" json:"map_id,omitempty"`
84         OutputSource QosSource `binapi:"qos_source,name=output_source" json:"output_source,omitempty"`
85 }
86
87 // QosRecord defines type 'qos_record'.
88 type QosRecord struct {
89         SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
90         InputSource QosSource                      `binapi:"qos_source,name=input_source" json:"input_source,omitempty"`
91 }
92
93 // QosStore defines type 'qos_store'.
94 type QosStore struct {
95         SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
96         InputSource QosSource                      `binapi:"qos_source,name=input_source" json:"input_source,omitempty"`
97         Value       uint8                          `binapi:"u8,name=value" json:"value,omitempty"`
98 }
99
100 // QosEgressMapDelete defines message 'qos_egress_map_delete'.
101 type QosEgressMapDelete struct {
102         ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
103 }
104
105 func (m *QosEgressMapDelete) Reset()               { *m = QosEgressMapDelete{} }
106 func (*QosEgressMapDelete) GetMessageName() string { return "qos_egress_map_delete" }
107 func (*QosEgressMapDelete) GetCrcString() string   { return "3a91bde5" }
108 func (*QosEgressMapDelete) GetMessageType() api.MessageType {
109         return api.RequestMessage
110 }
111
112 func (m *QosEgressMapDelete) Size() (size int) {
113         if m == nil {
114                 return 0
115         }
116         size += 4 // m.ID
117         return size
118 }
119 func (m *QosEgressMapDelete) Marshal(b []byte) ([]byte, error) {
120         if b == nil {
121                 b = make([]byte, m.Size())
122         }
123         buf := codec.NewBuffer(b)
124         buf.EncodeUint32(m.ID)
125         return buf.Bytes(), nil
126 }
127 func (m *QosEgressMapDelete) Unmarshal(b []byte) error {
128         buf := codec.NewBuffer(b)
129         m.ID = buf.DecodeUint32()
130         return nil
131 }
132
133 // QosEgressMapDeleteReply defines message 'qos_egress_map_delete_reply'.
134 type QosEgressMapDeleteReply struct {
135         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
136 }
137
138 func (m *QosEgressMapDeleteReply) Reset()               { *m = QosEgressMapDeleteReply{} }
139 func (*QosEgressMapDeleteReply) GetMessageName() string { return "qos_egress_map_delete_reply" }
140 func (*QosEgressMapDeleteReply) GetCrcString() string   { return "e8d4e804" }
141 func (*QosEgressMapDeleteReply) GetMessageType() api.MessageType {
142         return api.ReplyMessage
143 }
144
145 func (m *QosEgressMapDeleteReply) Size() (size int) {
146         if m == nil {
147                 return 0
148         }
149         size += 4 // m.Retval
150         return size
151 }
152 func (m *QosEgressMapDeleteReply) Marshal(b []byte) ([]byte, error) {
153         if b == nil {
154                 b = make([]byte, m.Size())
155         }
156         buf := codec.NewBuffer(b)
157         buf.EncodeInt32(m.Retval)
158         return buf.Bytes(), nil
159 }
160 func (m *QosEgressMapDeleteReply) Unmarshal(b []byte) error {
161         buf := codec.NewBuffer(b)
162         m.Retval = buf.DecodeInt32()
163         return nil
164 }
165
166 // QosEgressMapDetails defines message 'qos_egress_map_details'.
167 type QosEgressMapDetails struct {
168         Map QosEgressMap `binapi:"qos_egress_map,name=map" json:"map,omitempty"`
169 }
170
171 func (m *QosEgressMapDetails) Reset()               { *m = QosEgressMapDetails{} }
172 func (*QosEgressMapDetails) GetMessageName() string { return "qos_egress_map_details" }
173 func (*QosEgressMapDetails) GetCrcString() string   { return "46c5653c" }
174 func (*QosEgressMapDetails) GetMessageType() api.MessageType {
175         return api.ReplyMessage
176 }
177
178 func (m *QosEgressMapDetails) Size() (size int) {
179         if m == nil {
180                 return 0
181         }
182         size += 4 // m.Map.ID
183         for j2 := 0; j2 < 4; j2++ {
184                 size += 1 * 256 // m.Map.Rows[j2].Outputs
185         }
186         return size
187 }
188 func (m *QosEgressMapDetails) Marshal(b []byte) ([]byte, error) {
189         if b == nil {
190                 b = make([]byte, m.Size())
191         }
192         buf := codec.NewBuffer(b)
193         buf.EncodeUint32(m.Map.ID)
194         for j1 := 0; j1 < 4; j1++ {
195                 buf.EncodeBytes(m.Map.Rows[j1].Outputs, 256)
196         }
197         return buf.Bytes(), nil
198 }
199 func (m *QosEgressMapDetails) Unmarshal(b []byte) error {
200         buf := codec.NewBuffer(b)
201         m.Map.ID = buf.DecodeUint32()
202         for j1 := 0; j1 < 4; j1++ {
203                 m.Map.Rows[j1].Outputs = make([]byte, 256)
204                 copy(m.Map.Rows[j1].Outputs, buf.DecodeBytes(len(m.Map.Rows[j1].Outputs)))
205         }
206         return nil
207 }
208
209 // QosEgressMapDump defines message 'qos_egress_map_dump'.
210 type QosEgressMapDump struct{}
211
212 func (m *QosEgressMapDump) Reset()               { *m = QosEgressMapDump{} }
213 func (*QosEgressMapDump) GetMessageName() string { return "qos_egress_map_dump" }
214 func (*QosEgressMapDump) GetCrcString() string   { return "51077d14" }
215 func (*QosEgressMapDump) GetMessageType() api.MessageType {
216         return api.RequestMessage
217 }
218
219 func (m *QosEgressMapDump) Size() (size int) {
220         if m == nil {
221                 return 0
222         }
223         return size
224 }
225 func (m *QosEgressMapDump) Marshal(b []byte) ([]byte, error) {
226         if b == nil {
227                 b = make([]byte, m.Size())
228         }
229         buf := codec.NewBuffer(b)
230         return buf.Bytes(), nil
231 }
232 func (m *QosEgressMapDump) Unmarshal(b []byte) error {
233         return nil
234 }
235
236 // QosEgressMapUpdate defines message 'qos_egress_map_update'.
237 type QosEgressMapUpdate struct {
238         Map QosEgressMap `binapi:"qos_egress_map,name=map" json:"map,omitempty"`
239 }
240
241 func (m *QosEgressMapUpdate) Reset()               { *m = QosEgressMapUpdate{} }
242 func (*QosEgressMapUpdate) GetMessageName() string { return "qos_egress_map_update" }
243 func (*QosEgressMapUpdate) GetCrcString() string   { return "6d1c065f" }
244 func (*QosEgressMapUpdate) GetMessageType() api.MessageType {
245         return api.RequestMessage
246 }
247
248 func (m *QosEgressMapUpdate) Size() (size int) {
249         if m == nil {
250                 return 0
251         }
252         size += 4 // m.Map.ID
253         for j2 := 0; j2 < 4; j2++ {
254                 size += 1 * 256 // m.Map.Rows[j2].Outputs
255         }
256         return size
257 }
258 func (m *QosEgressMapUpdate) Marshal(b []byte) ([]byte, error) {
259         if b == nil {
260                 b = make([]byte, m.Size())
261         }
262         buf := codec.NewBuffer(b)
263         buf.EncodeUint32(m.Map.ID)
264         for j1 := 0; j1 < 4; j1++ {
265                 buf.EncodeBytes(m.Map.Rows[j1].Outputs, 256)
266         }
267         return buf.Bytes(), nil
268 }
269 func (m *QosEgressMapUpdate) Unmarshal(b []byte) error {
270         buf := codec.NewBuffer(b)
271         m.Map.ID = buf.DecodeUint32()
272         for j1 := 0; j1 < 4; j1++ {
273                 m.Map.Rows[j1].Outputs = make([]byte, 256)
274                 copy(m.Map.Rows[j1].Outputs, buf.DecodeBytes(len(m.Map.Rows[j1].Outputs)))
275         }
276         return nil
277 }
278
279 // QosEgressMapUpdateReply defines message 'qos_egress_map_update_reply'.
280 type QosEgressMapUpdateReply struct {
281         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
282 }
283
284 func (m *QosEgressMapUpdateReply) Reset()               { *m = QosEgressMapUpdateReply{} }
285 func (*QosEgressMapUpdateReply) GetMessageName() string { return "qos_egress_map_update_reply" }
286 func (*QosEgressMapUpdateReply) GetCrcString() string   { return "e8d4e804" }
287 func (*QosEgressMapUpdateReply) GetMessageType() api.MessageType {
288         return api.ReplyMessage
289 }
290
291 func (m *QosEgressMapUpdateReply) Size() (size int) {
292         if m == nil {
293                 return 0
294         }
295         size += 4 // m.Retval
296         return size
297 }
298 func (m *QosEgressMapUpdateReply) Marshal(b []byte) ([]byte, error) {
299         if b == nil {
300                 b = make([]byte, m.Size())
301         }
302         buf := codec.NewBuffer(b)
303         buf.EncodeInt32(m.Retval)
304         return buf.Bytes(), nil
305 }
306 func (m *QosEgressMapUpdateReply) Unmarshal(b []byte) error {
307         buf := codec.NewBuffer(b)
308         m.Retval = buf.DecodeInt32()
309         return nil
310 }
311
312 // QosMarkDetails defines message 'qos_mark_details'.
313 type QosMarkDetails struct {
314         Mark QosMark `binapi:"qos_mark,name=mark" json:"mark,omitempty"`
315 }
316
317 func (m *QosMarkDetails) Reset()               { *m = QosMarkDetails{} }
318 func (*QosMarkDetails) GetMessageName() string { return "qos_mark_details" }
319 func (*QosMarkDetails) GetCrcString() string   { return "89fe81a9" }
320 func (*QosMarkDetails) GetMessageType() api.MessageType {
321         return api.ReplyMessage
322 }
323
324 func (m *QosMarkDetails) Size() (size int) {
325         if m == nil {
326                 return 0
327         }
328         size += 4 // m.Mark.SwIfIndex
329         size += 4 // m.Mark.MapID
330         size += 1 // m.Mark.OutputSource
331         return size
332 }
333 func (m *QosMarkDetails) Marshal(b []byte) ([]byte, error) {
334         if b == nil {
335                 b = make([]byte, m.Size())
336         }
337         buf := codec.NewBuffer(b)
338         buf.EncodeUint32(m.Mark.SwIfIndex)
339         buf.EncodeUint32(m.Mark.MapID)
340         buf.EncodeUint8(uint8(m.Mark.OutputSource))
341         return buf.Bytes(), nil
342 }
343 func (m *QosMarkDetails) Unmarshal(b []byte) error {
344         buf := codec.NewBuffer(b)
345         m.Mark.SwIfIndex = buf.DecodeUint32()
346         m.Mark.MapID = buf.DecodeUint32()
347         m.Mark.OutputSource = QosSource(buf.DecodeUint8())
348         return nil
349 }
350
351 // QosMarkDetailsReply defines message 'qos_mark_details_reply'.
352 type QosMarkDetailsReply struct {
353         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
354 }
355
356 func (m *QosMarkDetailsReply) Reset()               { *m = QosMarkDetailsReply{} }
357 func (*QosMarkDetailsReply) GetMessageName() string { return "qos_mark_details_reply" }
358 func (*QosMarkDetailsReply) GetCrcString() string   { return "e8d4e804" }
359 func (*QosMarkDetailsReply) GetMessageType() api.MessageType {
360         return api.ReplyMessage
361 }
362
363 func (m *QosMarkDetailsReply) Size() (size int) {
364         if m == nil {
365                 return 0
366         }
367         size += 4 // m.Retval
368         return size
369 }
370 func (m *QosMarkDetailsReply) Marshal(b []byte) ([]byte, error) {
371         if b == nil {
372                 b = make([]byte, m.Size())
373         }
374         buf := codec.NewBuffer(b)
375         buf.EncodeInt32(m.Retval)
376         return buf.Bytes(), nil
377 }
378 func (m *QosMarkDetailsReply) Unmarshal(b []byte) error {
379         buf := codec.NewBuffer(b)
380         m.Retval = buf.DecodeInt32()
381         return nil
382 }
383
384 // QosMarkDump defines message 'qos_mark_dump'.
385 type QosMarkDump struct {
386         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
387 }
388
389 func (m *QosMarkDump) Reset()               { *m = QosMarkDump{} }
390 func (*QosMarkDump) GetMessageName() string { return "qos_mark_dump" }
391 func (*QosMarkDump) GetCrcString() string   { return "f9e6675e" }
392 func (*QosMarkDump) GetMessageType() api.MessageType {
393         return api.RequestMessage
394 }
395
396 func (m *QosMarkDump) Size() (size int) {
397         if m == nil {
398                 return 0
399         }
400         size += 4 // m.SwIfIndex
401         return size
402 }
403 func (m *QosMarkDump) Marshal(b []byte) ([]byte, error) {
404         if b == nil {
405                 b = make([]byte, m.Size())
406         }
407         buf := codec.NewBuffer(b)
408         buf.EncodeUint32(uint32(m.SwIfIndex))
409         return buf.Bytes(), nil
410 }
411 func (m *QosMarkDump) Unmarshal(b []byte) error {
412         buf := codec.NewBuffer(b)
413         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
414         return nil
415 }
416
417 // QosMarkEnableDisable defines message 'qos_mark_enable_disable'.
418 type QosMarkEnableDisable struct {
419         Enable bool    `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
420         Mark   QosMark `binapi:"qos_mark,name=mark" json:"mark,omitempty"`
421 }
422
423 func (m *QosMarkEnableDisable) Reset()               { *m = QosMarkEnableDisable{} }
424 func (*QosMarkEnableDisable) GetMessageName() string { return "qos_mark_enable_disable" }
425 func (*QosMarkEnableDisable) GetCrcString() string   { return "1a010f74" }
426 func (*QosMarkEnableDisable) GetMessageType() api.MessageType {
427         return api.RequestMessage
428 }
429
430 func (m *QosMarkEnableDisable) Size() (size int) {
431         if m == nil {
432                 return 0
433         }
434         size += 1 // m.Enable
435         size += 4 // m.Mark.SwIfIndex
436         size += 4 // m.Mark.MapID
437         size += 1 // m.Mark.OutputSource
438         return size
439 }
440 func (m *QosMarkEnableDisable) Marshal(b []byte) ([]byte, error) {
441         if b == nil {
442                 b = make([]byte, m.Size())
443         }
444         buf := codec.NewBuffer(b)
445         buf.EncodeBool(m.Enable)
446         buf.EncodeUint32(m.Mark.SwIfIndex)
447         buf.EncodeUint32(m.Mark.MapID)
448         buf.EncodeUint8(uint8(m.Mark.OutputSource))
449         return buf.Bytes(), nil
450 }
451 func (m *QosMarkEnableDisable) Unmarshal(b []byte) error {
452         buf := codec.NewBuffer(b)
453         m.Enable = buf.DecodeBool()
454         m.Mark.SwIfIndex = buf.DecodeUint32()
455         m.Mark.MapID = buf.DecodeUint32()
456         m.Mark.OutputSource = QosSource(buf.DecodeUint8())
457         return nil
458 }
459
460 // QosMarkEnableDisableReply defines message 'qos_mark_enable_disable_reply'.
461 type QosMarkEnableDisableReply struct {
462         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
463 }
464
465 func (m *QosMarkEnableDisableReply) Reset()               { *m = QosMarkEnableDisableReply{} }
466 func (*QosMarkEnableDisableReply) GetMessageName() string { return "qos_mark_enable_disable_reply" }
467 func (*QosMarkEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
468 func (*QosMarkEnableDisableReply) GetMessageType() api.MessageType {
469         return api.ReplyMessage
470 }
471
472 func (m *QosMarkEnableDisableReply) Size() (size int) {
473         if m == nil {
474                 return 0
475         }
476         size += 4 // m.Retval
477         return size
478 }
479 func (m *QosMarkEnableDisableReply) Marshal(b []byte) ([]byte, error) {
480         if b == nil {
481                 b = make([]byte, m.Size())
482         }
483         buf := codec.NewBuffer(b)
484         buf.EncodeInt32(m.Retval)
485         return buf.Bytes(), nil
486 }
487 func (m *QosMarkEnableDisableReply) Unmarshal(b []byte) error {
488         buf := codec.NewBuffer(b)
489         m.Retval = buf.DecodeInt32()
490         return nil
491 }
492
493 // QosRecordDetails defines message 'qos_record_details'.
494 type QosRecordDetails struct {
495         Record QosRecord `binapi:"qos_record,name=record" json:"record,omitempty"`
496 }
497
498 func (m *QosRecordDetails) Reset()               { *m = QosRecordDetails{} }
499 func (*QosRecordDetails) GetMessageName() string { return "qos_record_details" }
500 func (*QosRecordDetails) GetCrcString() string   { return "4956ccdd" }
501 func (*QosRecordDetails) GetMessageType() api.MessageType {
502         return api.ReplyMessage
503 }
504
505 func (m *QosRecordDetails) Size() (size int) {
506         if m == nil {
507                 return 0
508         }
509         size += 4 // m.Record.SwIfIndex
510         size += 1 // m.Record.InputSource
511         return size
512 }
513 func (m *QosRecordDetails) Marshal(b []byte) ([]byte, error) {
514         if b == nil {
515                 b = make([]byte, m.Size())
516         }
517         buf := codec.NewBuffer(b)
518         buf.EncodeUint32(uint32(m.Record.SwIfIndex))
519         buf.EncodeUint8(uint8(m.Record.InputSource))
520         return buf.Bytes(), nil
521 }
522 func (m *QosRecordDetails) Unmarshal(b []byte) error {
523         buf := codec.NewBuffer(b)
524         m.Record.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
525         m.Record.InputSource = QosSource(buf.DecodeUint8())
526         return nil
527 }
528
529 // QosRecordDump defines message 'qos_record_dump'.
530 type QosRecordDump struct{}
531
532 func (m *QosRecordDump) Reset()               { *m = QosRecordDump{} }
533 func (*QosRecordDump) GetMessageName() string { return "qos_record_dump" }
534 func (*QosRecordDump) GetCrcString() string   { return "51077d14" }
535 func (*QosRecordDump) GetMessageType() api.MessageType {
536         return api.RequestMessage
537 }
538
539 func (m *QosRecordDump) Size() (size int) {
540         if m == nil {
541                 return 0
542         }
543         return size
544 }
545 func (m *QosRecordDump) Marshal(b []byte) ([]byte, error) {
546         if b == nil {
547                 b = make([]byte, m.Size())
548         }
549         buf := codec.NewBuffer(b)
550         return buf.Bytes(), nil
551 }
552 func (m *QosRecordDump) Unmarshal(b []byte) error {
553         return nil
554 }
555
556 // QosRecordEnableDisable defines message 'qos_record_enable_disable'.
557 type QosRecordEnableDisable struct {
558         Enable bool      `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
559         Record QosRecord `binapi:"qos_record,name=record" json:"record,omitempty"`
560 }
561
562 func (m *QosRecordEnableDisable) Reset()               { *m = QosRecordEnableDisable{} }
563 func (*QosRecordEnableDisable) GetMessageName() string { return "qos_record_enable_disable" }
564 func (*QosRecordEnableDisable) GetCrcString() string   { return "25b33f88" }
565 func (*QosRecordEnableDisable) GetMessageType() api.MessageType {
566         return api.RequestMessage
567 }
568
569 func (m *QosRecordEnableDisable) Size() (size int) {
570         if m == nil {
571                 return 0
572         }
573         size += 1 // m.Enable
574         size += 4 // m.Record.SwIfIndex
575         size += 1 // m.Record.InputSource
576         return size
577 }
578 func (m *QosRecordEnableDisable) Marshal(b []byte) ([]byte, error) {
579         if b == nil {
580                 b = make([]byte, m.Size())
581         }
582         buf := codec.NewBuffer(b)
583         buf.EncodeBool(m.Enable)
584         buf.EncodeUint32(uint32(m.Record.SwIfIndex))
585         buf.EncodeUint8(uint8(m.Record.InputSource))
586         return buf.Bytes(), nil
587 }
588 func (m *QosRecordEnableDisable) Unmarshal(b []byte) error {
589         buf := codec.NewBuffer(b)
590         m.Enable = buf.DecodeBool()
591         m.Record.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
592         m.Record.InputSource = QosSource(buf.DecodeUint8())
593         return nil
594 }
595
596 // QosRecordEnableDisableReply defines message 'qos_record_enable_disable_reply'.
597 type QosRecordEnableDisableReply struct {
598         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
599 }
600
601 func (m *QosRecordEnableDisableReply) Reset()               { *m = QosRecordEnableDisableReply{} }
602 func (*QosRecordEnableDisableReply) GetMessageName() string { return "qos_record_enable_disable_reply" }
603 func (*QosRecordEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
604 func (*QosRecordEnableDisableReply) GetMessageType() api.MessageType {
605         return api.ReplyMessage
606 }
607
608 func (m *QosRecordEnableDisableReply) Size() (size int) {
609         if m == nil {
610                 return 0
611         }
612         size += 4 // m.Retval
613         return size
614 }
615 func (m *QosRecordEnableDisableReply) Marshal(b []byte) ([]byte, error) {
616         if b == nil {
617                 b = make([]byte, m.Size())
618         }
619         buf := codec.NewBuffer(b)
620         buf.EncodeInt32(m.Retval)
621         return buf.Bytes(), nil
622 }
623 func (m *QosRecordEnableDisableReply) Unmarshal(b []byte) error {
624         buf := codec.NewBuffer(b)
625         m.Retval = buf.DecodeInt32()
626         return nil
627 }
628
629 // QosStoreDetails defines message 'qos_store_details'.
630 type QosStoreDetails struct {
631         Store QosStore `binapi:"qos_store,name=store" json:"store,omitempty"`
632 }
633
634 func (m *QosStoreDetails) Reset()               { *m = QosStoreDetails{} }
635 func (*QosStoreDetails) GetMessageName() string { return "qos_store_details" }
636 func (*QosStoreDetails) GetCrcString() string   { return "038a6d48" }
637 func (*QosStoreDetails) GetMessageType() api.MessageType {
638         return api.ReplyMessage
639 }
640
641 func (m *QosStoreDetails) Size() (size int) {
642         if m == nil {
643                 return 0
644         }
645         size += 4 // m.Store.SwIfIndex
646         size += 1 // m.Store.InputSource
647         size += 1 // m.Store.Value
648         return size
649 }
650 func (m *QosStoreDetails) Marshal(b []byte) ([]byte, error) {
651         if b == nil {
652                 b = make([]byte, m.Size())
653         }
654         buf := codec.NewBuffer(b)
655         buf.EncodeUint32(uint32(m.Store.SwIfIndex))
656         buf.EncodeUint8(uint8(m.Store.InputSource))
657         buf.EncodeUint8(m.Store.Value)
658         return buf.Bytes(), nil
659 }
660 func (m *QosStoreDetails) Unmarshal(b []byte) error {
661         buf := codec.NewBuffer(b)
662         m.Store.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
663         m.Store.InputSource = QosSource(buf.DecodeUint8())
664         m.Store.Value = buf.DecodeUint8()
665         return nil
666 }
667
668 // QosStoreDump defines message 'qos_store_dump'.
669 type QosStoreDump struct{}
670
671 func (m *QosStoreDump) Reset()               { *m = QosStoreDump{} }
672 func (*QosStoreDump) GetMessageName() string { return "qos_store_dump" }
673 func (*QosStoreDump) GetCrcString() string   { return "51077d14" }
674 func (*QosStoreDump) GetMessageType() api.MessageType {
675         return api.RequestMessage
676 }
677
678 func (m *QosStoreDump) Size() (size int) {
679         if m == nil {
680                 return 0
681         }
682         return size
683 }
684 func (m *QosStoreDump) Marshal(b []byte) ([]byte, error) {
685         if b == nil {
686                 b = make([]byte, m.Size())
687         }
688         buf := codec.NewBuffer(b)
689         return buf.Bytes(), nil
690 }
691 func (m *QosStoreDump) Unmarshal(b []byte) error {
692         return nil
693 }
694
695 // QosStoreEnableDisable defines message 'qos_store_enable_disable'.
696 type QosStoreEnableDisable struct {
697         Enable bool     `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
698         Store  QosStore `binapi:"qos_store,name=store" json:"store,omitempty"`
699 }
700
701 func (m *QosStoreEnableDisable) Reset()               { *m = QosStoreEnableDisable{} }
702 func (*QosStoreEnableDisable) GetMessageName() string { return "qos_store_enable_disable" }
703 func (*QosStoreEnableDisable) GetCrcString() string   { return "3507235e" }
704 func (*QosStoreEnableDisable) GetMessageType() api.MessageType {
705         return api.RequestMessage
706 }
707
708 func (m *QosStoreEnableDisable) Size() (size int) {
709         if m == nil {
710                 return 0
711         }
712         size += 1 // m.Enable
713         size += 4 // m.Store.SwIfIndex
714         size += 1 // m.Store.InputSource
715         size += 1 // m.Store.Value
716         return size
717 }
718 func (m *QosStoreEnableDisable) Marshal(b []byte) ([]byte, error) {
719         if b == nil {
720                 b = make([]byte, m.Size())
721         }
722         buf := codec.NewBuffer(b)
723         buf.EncodeBool(m.Enable)
724         buf.EncodeUint32(uint32(m.Store.SwIfIndex))
725         buf.EncodeUint8(uint8(m.Store.InputSource))
726         buf.EncodeUint8(m.Store.Value)
727         return buf.Bytes(), nil
728 }
729 func (m *QosStoreEnableDisable) Unmarshal(b []byte) error {
730         buf := codec.NewBuffer(b)
731         m.Enable = buf.DecodeBool()
732         m.Store.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
733         m.Store.InputSource = QosSource(buf.DecodeUint8())
734         m.Store.Value = buf.DecodeUint8()
735         return nil
736 }
737
738 // QosStoreEnableDisableReply defines message 'qos_store_enable_disable_reply'.
739 type QosStoreEnableDisableReply struct {
740         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
741 }
742
743 func (m *QosStoreEnableDisableReply) Reset()               { *m = QosStoreEnableDisableReply{} }
744 func (*QosStoreEnableDisableReply) GetMessageName() string { return "qos_store_enable_disable_reply" }
745 func (*QosStoreEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
746 func (*QosStoreEnableDisableReply) GetMessageType() api.MessageType {
747         return api.ReplyMessage
748 }
749
750 func (m *QosStoreEnableDisableReply) Size() (size int) {
751         if m == nil {
752                 return 0
753         }
754         size += 4 // m.Retval
755         return size
756 }
757 func (m *QosStoreEnableDisableReply) Marshal(b []byte) ([]byte, error) {
758         if b == nil {
759                 b = make([]byte, m.Size())
760         }
761         buf := codec.NewBuffer(b)
762         buf.EncodeInt32(m.Retval)
763         return buf.Bytes(), nil
764 }
765 func (m *QosStoreEnableDisableReply) Unmarshal(b []byte) error {
766         buf := codec.NewBuffer(b)
767         m.Retval = buf.DecodeInt32()
768         return nil
769 }
770
771 func init() { file_qos_binapi_init() }
772 func file_qos_binapi_init() {
773         api.RegisterMessage((*QosEgressMapDelete)(nil), "qos_egress_map_delete_3a91bde5")
774         api.RegisterMessage((*QosEgressMapDeleteReply)(nil), "qos_egress_map_delete_reply_e8d4e804")
775         api.RegisterMessage((*QosEgressMapDetails)(nil), "qos_egress_map_details_46c5653c")
776         api.RegisterMessage((*QosEgressMapDump)(nil), "qos_egress_map_dump_51077d14")
777         api.RegisterMessage((*QosEgressMapUpdate)(nil), "qos_egress_map_update_6d1c065f")
778         api.RegisterMessage((*QosEgressMapUpdateReply)(nil), "qos_egress_map_update_reply_e8d4e804")
779         api.RegisterMessage((*QosMarkDetails)(nil), "qos_mark_details_89fe81a9")
780         api.RegisterMessage((*QosMarkDetailsReply)(nil), "qos_mark_details_reply_e8d4e804")
781         api.RegisterMessage((*QosMarkDump)(nil), "qos_mark_dump_f9e6675e")
782         api.RegisterMessage((*QosMarkEnableDisable)(nil), "qos_mark_enable_disable_1a010f74")
783         api.RegisterMessage((*QosMarkEnableDisableReply)(nil), "qos_mark_enable_disable_reply_e8d4e804")
784         api.RegisterMessage((*QosRecordDetails)(nil), "qos_record_details_4956ccdd")
785         api.RegisterMessage((*QosRecordDump)(nil), "qos_record_dump_51077d14")
786         api.RegisterMessage((*QosRecordEnableDisable)(nil), "qos_record_enable_disable_25b33f88")
787         api.RegisterMessage((*QosRecordEnableDisableReply)(nil), "qos_record_enable_disable_reply_e8d4e804")
788         api.RegisterMessage((*QosStoreDetails)(nil), "qos_store_details_038a6d48")
789         api.RegisterMessage((*QosStoreDump)(nil), "qos_store_dump_51077d14")
790         api.RegisterMessage((*QosStoreEnableDisable)(nil), "qos_store_enable_disable_3507235e")
791         api.RegisterMessage((*QosStoreEnableDisableReply)(nil), "qos_store_enable_disable_reply_e8d4e804")
792 }
793
794 // Messages returns list of all messages in this module.
795 func AllMessages() []api.Message {
796         return []api.Message{
797                 (*QosEgressMapDelete)(nil),
798                 (*QosEgressMapDeleteReply)(nil),
799                 (*QosEgressMapDetails)(nil),
800                 (*QosEgressMapDump)(nil),
801                 (*QosEgressMapUpdate)(nil),
802                 (*QosEgressMapUpdateReply)(nil),
803                 (*QosMarkDetails)(nil),
804                 (*QosMarkDetailsReply)(nil),
805                 (*QosMarkDump)(nil),
806                 (*QosMarkEnableDisable)(nil),
807                 (*QosMarkEnableDisableReply)(nil),
808                 (*QosRecordDetails)(nil),
809                 (*QosRecordDump)(nil),
810                 (*QosRecordEnableDisable)(nil),
811                 (*QosRecordEnableDisableReply)(nil),
812                 (*QosStoreDetails)(nil),
813                 (*QosStoreDump)(nil),
814                 (*QosStoreEnableDisable)(nil),
815                 (*QosStoreEnableDisableReply)(nil),
816         }
817 }