9dd71c9bcd5a3d04a57fbdd6691aa26a9fdcc952
[govpp.git] / binapi / cdp / cdp.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 cdp contains generated bindings for API file cdp.api.
7 //
8 // Contents:
9 //   2 messages
10 //
11 package cdp
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    = "cdp"
26         APIVersion = "1.0.0"
27         VersionCrc = 0x8cfa825e
28 )
29
30 // CdpEnableDisable defines message 'cdp_enable_disable'.
31 type CdpEnableDisable struct {
32         EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
33 }
34
35 func (m *CdpEnableDisable) Reset()               { *m = CdpEnableDisable{} }
36 func (*CdpEnableDisable) GetMessageName() string { return "cdp_enable_disable" }
37 func (*CdpEnableDisable) GetCrcString() string   { return "2e7b47df" }
38 func (*CdpEnableDisable) GetMessageType() api.MessageType {
39         return api.RequestMessage
40 }
41
42 func (m *CdpEnableDisable) Size() (size int) {
43         if m == nil {
44                 return 0
45         }
46         size += 1 // m.EnableDisable
47         return size
48 }
49 func (m *CdpEnableDisable) Marshal(b []byte) ([]byte, error) {
50         if b == nil {
51                 b = make([]byte, m.Size())
52         }
53         buf := codec.NewBuffer(b)
54         buf.EncodeBool(m.EnableDisable)
55         return buf.Bytes(), nil
56 }
57 func (m *CdpEnableDisable) Unmarshal(b []byte) error {
58         buf := codec.NewBuffer(b)
59         m.EnableDisable = buf.DecodeBool()
60         return nil
61 }
62
63 // CdpEnableDisableReply defines message 'cdp_enable_disable_reply'.
64 type CdpEnableDisableReply struct {
65         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
66 }
67
68 func (m *CdpEnableDisableReply) Reset()               { *m = CdpEnableDisableReply{} }
69 func (*CdpEnableDisableReply) GetMessageName() string { return "cdp_enable_disable_reply" }
70 func (*CdpEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
71 func (*CdpEnableDisableReply) GetMessageType() api.MessageType {
72         return api.ReplyMessage
73 }
74
75 func (m *CdpEnableDisableReply) Size() (size int) {
76         if m == nil {
77                 return 0
78         }
79         size += 4 // m.Retval
80         return size
81 }
82 func (m *CdpEnableDisableReply) Marshal(b []byte) ([]byte, error) {
83         if b == nil {
84                 b = make([]byte, m.Size())
85         }
86         buf := codec.NewBuffer(b)
87         buf.EncodeInt32(m.Retval)
88         return buf.Bytes(), nil
89 }
90 func (m *CdpEnableDisableReply) Unmarshal(b []byte) error {
91         buf := codec.NewBuffer(b)
92         m.Retval = buf.DecodeInt32()
93         return nil
94 }
95
96 func init() { file_cdp_binapi_init() }
97 func file_cdp_binapi_init() {
98         api.RegisterMessage((*CdpEnableDisable)(nil), "cdp_enable_disable_2e7b47df")
99         api.RegisterMessage((*CdpEnableDisableReply)(nil), "cdp_enable_disable_reply_e8d4e804")
100 }
101
102 // Messages returns list of all messages in this module.
103 func AllMessages() []api.Message {
104         return []api.Message{
105                 (*CdpEnableDisable)(nil),
106                 (*CdpEnableDisableReply)(nil),
107         }
108 }