binapigen: fix union size
[govpp.git] / binapi / vpe_types / vpe_types.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/vpe_types.api.json
6
7 // Package vpe_types contains generated bindings for API file vpe_types.api.
8 //
9 // Contents:
10 //   2 aliases
11 //   1 enum
12 //   1 struct
13 //
14 package vpe_types
15
16 import (
17         "strconv"
18
19         api "git.fd.io/govpp.git/api"
20 )
21
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
27
28 // LogLevel defines enum 'log_level'.
29 type LogLevel uint32
30
31 const (
32         VPE_API_LOG_LEVEL_EMERG    LogLevel = 0
33         VPE_API_LOG_LEVEL_ALERT    LogLevel = 1
34         VPE_API_LOG_LEVEL_CRIT     LogLevel = 2
35         VPE_API_LOG_LEVEL_ERR      LogLevel = 3
36         VPE_API_LOG_LEVEL_WARNING  LogLevel = 4
37         VPE_API_LOG_LEVEL_NOTICE   LogLevel = 5
38         VPE_API_LOG_LEVEL_INFO     LogLevel = 6
39         VPE_API_LOG_LEVEL_DEBUG    LogLevel = 7
40         VPE_API_LOG_LEVEL_DISABLED LogLevel = 8
41 )
42
43 var (
44         LogLevel_name = map[uint32]string{
45                 0: "VPE_API_LOG_LEVEL_EMERG",
46                 1: "VPE_API_LOG_LEVEL_ALERT",
47                 2: "VPE_API_LOG_LEVEL_CRIT",
48                 3: "VPE_API_LOG_LEVEL_ERR",
49                 4: "VPE_API_LOG_LEVEL_WARNING",
50                 5: "VPE_API_LOG_LEVEL_NOTICE",
51                 6: "VPE_API_LOG_LEVEL_INFO",
52                 7: "VPE_API_LOG_LEVEL_DEBUG",
53                 8: "VPE_API_LOG_LEVEL_DISABLED",
54         }
55         LogLevel_value = map[string]uint32{
56                 "VPE_API_LOG_LEVEL_EMERG":    0,
57                 "VPE_API_LOG_LEVEL_ALERT":    1,
58                 "VPE_API_LOG_LEVEL_CRIT":     2,
59                 "VPE_API_LOG_LEVEL_ERR":      3,
60                 "VPE_API_LOG_LEVEL_WARNING":  4,
61                 "VPE_API_LOG_LEVEL_NOTICE":   5,
62                 "VPE_API_LOG_LEVEL_INFO":     6,
63                 "VPE_API_LOG_LEVEL_DEBUG":    7,
64                 "VPE_API_LOG_LEVEL_DISABLED": 8,
65         }
66 )
67
68 func (x LogLevel) String() string {
69         s, ok := LogLevel_name[uint32(x)]
70         if ok {
71                 return s
72         }
73         return "LogLevel(" + strconv.Itoa(int(x)) + ")"
74 }
75
76 // Timedelta defines alias 'timedelta'.
77 type Timedelta float64
78
79 // Timestamp defines alias 'timestamp'.
80 type Timestamp float64
81
82 // Version defines type 'version'.
83 type Version struct {
84         Major         uint32 `binapi:"u32,name=major" json:"major,omitempty"`
85         Minor         uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
86         Patch         uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
87         PreRelease    []byte `binapi:"u8[17],name=pre_release" json:"pre_release,omitempty"`
88         BuildMetadata []byte `binapi:"u8[17],name=build_metadata" json:"build_metadata,omitempty"`
89 }