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