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