4a7f74cf4bc018b66fd0366e5686651038263418
[govpp.git] / binapi / mdata / mdata.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 mdata contains generated bindings for API file mdata.api.
7 //
8 // Contents:
9 //   2 messages
10 //
11 package mdata
12
13 import (
14         api "git.fd.io/govpp.git/api"
15         _ "git.fd.io/govpp.git/binapi/interface_types"
16         codec "git.fd.io/govpp.git/codec"
17 )
18
19 // This is a compile-time assertion to ensure that this generated file
20 // is compatible with the GoVPP api package it is being compiled against.
21 // A compilation error at this line likely means your copy of the
22 // GoVPP api package needs to be updated.
23 const _ = api.GoVppAPIPackageIsVersion2
24
25 const (
26         APIFile    = "mdata"
27         APIVersion = "0.1.0"
28         VersionCrc = 0x3a1911dd
29 )
30
31 // MdataEnableDisable defines message 'mdata_enable_disable'.
32 type MdataEnableDisable struct {
33         EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
34 }
35
36 func (m *MdataEnableDisable) Reset()               { *m = MdataEnableDisable{} }
37 func (*MdataEnableDisable) GetMessageName() string { return "mdata_enable_disable" }
38 func (*MdataEnableDisable) GetCrcString() string   { return "2e7b47df" }
39 func (*MdataEnableDisable) GetMessageType() api.MessageType {
40         return api.RequestMessage
41 }
42
43 func (m *MdataEnableDisable) Size() (size int) {
44         if m == nil {
45                 return 0
46         }
47         size += 1 // m.EnableDisable
48         return size
49 }
50 func (m *MdataEnableDisable) Marshal(b []byte) ([]byte, error) {
51         if b == nil {
52                 b = make([]byte, m.Size())
53         }
54         buf := codec.NewBuffer(b)
55         buf.EncodeBool(m.EnableDisable)
56         return buf.Bytes(), nil
57 }
58 func (m *MdataEnableDisable) Unmarshal(b []byte) error {
59         buf := codec.NewBuffer(b)
60         m.EnableDisable = buf.DecodeBool()
61         return nil
62 }
63
64 // MdataEnableDisableReply defines message 'mdata_enable_disable_reply'.
65 type MdataEnableDisableReply struct {
66         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
67 }
68
69 func (m *MdataEnableDisableReply) Reset()               { *m = MdataEnableDisableReply{} }
70 func (*MdataEnableDisableReply) GetMessageName() string { return "mdata_enable_disable_reply" }
71 func (*MdataEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
72 func (*MdataEnableDisableReply) GetMessageType() api.MessageType {
73         return api.ReplyMessage
74 }
75
76 func (m *MdataEnableDisableReply) Size() (size int) {
77         if m == nil {
78                 return 0
79         }
80         size += 4 // m.Retval
81         return size
82 }
83 func (m *MdataEnableDisableReply) Marshal(b []byte) ([]byte, error) {
84         if b == nil {
85                 b = make([]byte, m.Size())
86         }
87         buf := codec.NewBuffer(b)
88         buf.EncodeInt32(m.Retval)
89         return buf.Bytes(), nil
90 }
91 func (m *MdataEnableDisableReply) Unmarshal(b []byte) error {
92         buf := codec.NewBuffer(b)
93         m.Retval = buf.DecodeInt32()
94         return nil
95 }
96
97 func init() { file_mdata_binapi_init() }
98 func file_mdata_binapi_init() {
99         api.RegisterMessage((*MdataEnableDisable)(nil), "mdata_enable_disable_2e7b47df")
100         api.RegisterMessage((*MdataEnableDisableReply)(nil), "mdata_enable_disable_reply_e8d4e804")
101 }
102
103 // Messages returns list of all messages in this module.
104 func AllMessages() []api.Message {
105         return []api.Message{
106                 (*MdataEnableDisable)(nil),
107                 (*MdataEnableDisableReply)(nil),
108         }
109 }