099443f1e34dcd3311091ba7a4f7540891317b40
[govpp.git] / binapi / vxlan_gpe_ioam_export / vxlan_gpe_ioam_export.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 vxlan_gpe_ioam_export contains generated bindings for API file vxlan_gpe_ioam_export.api.
7 //
8 // Contents:
9 //   2 messages
10 //
11 package vxlan_gpe_ioam_export
12
13 import (
14         api "git.fd.io/govpp.git/api"
15         ip_types "git.fd.io/govpp.git/binapi/ip_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    = "vxlan_gpe_ioam_export"
27         APIVersion = "1.0.0"
28         VersionCrc = 0x56bd3b73
29 )
30
31 // VxlanGpeIoamExportEnableDisable defines message 'vxlan_gpe_ioam_export_enable_disable'.
32 type VxlanGpeIoamExportEnableDisable struct {
33         IsDisable        bool                `binapi:"bool,name=is_disable" json:"is_disable,omitempty"`
34         CollectorAddress ip_types.IP4Address `binapi:"ip4_address,name=collector_address" json:"collector_address,omitempty"`
35         SrcAddress       ip_types.IP4Address `binapi:"ip4_address,name=src_address" json:"src_address,omitempty"`
36 }
37
38 func (m *VxlanGpeIoamExportEnableDisable) Reset() { *m = VxlanGpeIoamExportEnableDisable{} }
39 func (*VxlanGpeIoamExportEnableDisable) GetMessageName() string {
40         return "vxlan_gpe_ioam_export_enable_disable"
41 }
42 func (*VxlanGpeIoamExportEnableDisable) GetCrcString() string { return "e4d4ebfa" }
43 func (*VxlanGpeIoamExportEnableDisable) GetMessageType() api.MessageType {
44         return api.RequestMessage
45 }
46
47 func (m *VxlanGpeIoamExportEnableDisable) Size() (size int) {
48         if m == nil {
49                 return 0
50         }
51         size += 1     // m.IsDisable
52         size += 1 * 4 // m.CollectorAddress
53         size += 1 * 4 // m.SrcAddress
54         return size
55 }
56 func (m *VxlanGpeIoamExportEnableDisable) Marshal(b []byte) ([]byte, error) {
57         if b == nil {
58                 b = make([]byte, m.Size())
59         }
60         buf := codec.NewBuffer(b)
61         buf.EncodeBool(m.IsDisable)
62         buf.EncodeBytes(m.CollectorAddress[:], 4)
63         buf.EncodeBytes(m.SrcAddress[:], 4)
64         return buf.Bytes(), nil
65 }
66 func (m *VxlanGpeIoamExportEnableDisable) Unmarshal(b []byte) error {
67         buf := codec.NewBuffer(b)
68         m.IsDisable = buf.DecodeBool()
69         copy(m.CollectorAddress[:], buf.DecodeBytes(4))
70         copy(m.SrcAddress[:], buf.DecodeBytes(4))
71         return nil
72 }
73
74 // VxlanGpeIoamExportEnableDisableReply defines message 'vxlan_gpe_ioam_export_enable_disable_reply'.
75 type VxlanGpeIoamExportEnableDisableReply struct {
76         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
77 }
78
79 func (m *VxlanGpeIoamExportEnableDisableReply) Reset() { *m = VxlanGpeIoamExportEnableDisableReply{} }
80 func (*VxlanGpeIoamExportEnableDisableReply) GetMessageName() string {
81         return "vxlan_gpe_ioam_export_enable_disable_reply"
82 }
83 func (*VxlanGpeIoamExportEnableDisableReply) GetCrcString() string { return "e8d4e804" }
84 func (*VxlanGpeIoamExportEnableDisableReply) GetMessageType() api.MessageType {
85         return api.ReplyMessage
86 }
87
88 func (m *VxlanGpeIoamExportEnableDisableReply) Size() (size int) {
89         if m == nil {
90                 return 0
91         }
92         size += 4 // m.Retval
93         return size
94 }
95 func (m *VxlanGpeIoamExportEnableDisableReply) Marshal(b []byte) ([]byte, error) {
96         if b == nil {
97                 b = make([]byte, m.Size())
98         }
99         buf := codec.NewBuffer(b)
100         buf.EncodeInt32(m.Retval)
101         return buf.Bytes(), nil
102 }
103 func (m *VxlanGpeIoamExportEnableDisableReply) Unmarshal(b []byte) error {
104         buf := codec.NewBuffer(b)
105         m.Retval = buf.DecodeInt32()
106         return nil
107 }
108
109 func init() { file_vxlan_gpe_ioam_export_binapi_init() }
110 func file_vxlan_gpe_ioam_export_binapi_init() {
111         api.RegisterMessage((*VxlanGpeIoamExportEnableDisable)(nil), "vxlan_gpe_ioam_export_enable_disable_e4d4ebfa")
112         api.RegisterMessage((*VxlanGpeIoamExportEnableDisableReply)(nil), "vxlan_gpe_ioam_export_enable_disable_reply_e8d4e804")
113 }
114
115 // Messages returns list of all messages in this module.
116 func AllMessages() []api.Message {
117         return []api.Message{
118                 (*VxlanGpeIoamExportEnableDisable)(nil),
119                 (*VxlanGpeIoamExportEnableDisableReply)(nil),
120         }
121 }