-
Notifications
You must be signed in to change notification settings - Fork 31
/
data.pb.go
239 lines (213 loc) · 6.63 KB
/
data.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
// Code generated by protoc-gen-go.
// source: data.proto
// DO NOT EDIT!
package models
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type Data struct {
Uuid *string `protobuf:"bytes,1,opt,name=uuid" json:"uuid,omitempty"`
Key *string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
Value *string `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
Timestamps *Timestamp `protobuf:"bytes,5,opt,name=timestamps" json:"timestamps,omitempty"`
// Types that are valid to be assigned to Type:
// *Data_Short
// *Data_Text
// *Data_Multiple
Type IsData_Type `protobuf_oneof:"type"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Data) Reset() { *m = Data{} }
func (m *Data) String() string { return proto.CompactTextString(m) }
func (*Data) ProtoMessage() {}
func (*Data) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
type IsData_Type interface {
IsData_Type()
}
type Data_Short struct {
Short *ContentString `protobuf:"bytes,11,opt,name=short,oneof"`
}
type Data_Text struct {
Text *ContentText `protobuf:"bytes,12,opt,name=text,oneof"`
}
type Data_Multiple struct {
Multiple *ContentMultiple `protobuf:"bytes,13,opt,name=multiple,oneof"`
}
func (*Data_Short) IsData_Type() {}
func (*Data_Text) IsData_Type() {}
func (*Data_Multiple) IsData_Type() {}
func (m *Data) GetType() IsData_Type {
if m != nil {
return m.Type
}
return nil
}
func (m *Data) GetUuid() string {
if m != nil && m.Uuid != nil {
return *m.Uuid
}
return ""
}
func (m *Data) GetKey() string {
if m != nil && m.Key != nil {
return *m.Key
}
return ""
}
func (m *Data) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
func (m *Data) GetTimestamps() *Timestamp {
if m != nil {
return m.Timestamps
}
return nil
}
func (m *Data) GetShort() *ContentString {
if x, ok := m.GetType().(*Data_Short); ok {
return x.Short
}
return nil
}
func (m *Data) GetText() *ContentText {
if x, ok := m.GetType().(*Data_Text); ok {
return x.Text
}
return nil
}
func (m *Data) GetMultiple() *ContentMultiple {
if x, ok := m.GetType().(*Data_Multiple); ok {
return x.Multiple
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Data) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Data_OneofMarshaler, _Data_OneofUnmarshaler, _Data_OneofSizer, []interface{}{
(*Data_Short)(nil),
(*Data_Text)(nil),
(*Data_Multiple)(nil),
}
}
func _Data_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Data)
// type
switch x := m.Type.(type) {
case *Data_Short:
b.EncodeVarint(11<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Short); err != nil {
return err
}
case *Data_Text:
b.EncodeVarint(12<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Text); err != nil {
return err
}
case *Data_Multiple:
b.EncodeVarint(13<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Multiple); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Data.Type has unexpected type %T", x)
}
return nil
}
func _Data_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Data)
switch tag {
case 11: // type.short
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ContentString)
err := b.DecodeMessage(msg)
m.Type = &Data_Short{msg}
return true, err
case 12: // type.text
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ContentText)
err := b.DecodeMessage(msg)
m.Type = &Data_Text{msg}
return true, err
case 13: // type.multiple
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ContentMultiple)
err := b.DecodeMessage(msg)
m.Type = &Data_Multiple{msg}
return true, err
default:
return false, nil
}
}
func _Data_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Data)
// type
switch x := m.Type.(type) {
case *Data_Short:
s := proto.Size(x.Short)
n += proto.SizeVarint(11<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Data_Text:
s := proto.Size(x.Text)
n += proto.SizeVarint(12<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Data_Multiple:
s := proto.Size(x.Multiple)
n += proto.SizeVarint(13<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
proto.RegisterType((*Data)(nil), "ketchup.models.Data")
}
func (m *Data) SetUuid(v *string) {
m.Uuid = v
}
func (m *Data) SetKey(v *string) {
m.Key = v
}
func (m *Data) SetValue(v *string) {
m.Value = v
}
func (m *Data) SetTimestamps(v *Timestamp) {
m.Timestamps = v
}
func init() { proto.RegisterFile("data.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{
// 240 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