forked from distribution/distribution
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bigtable_table_data.pb.go
308 lines (273 loc) · 9.73 KB
/
bigtable_table_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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
// Code generated by protoc-gen-go.
// source: google.golang.org/cloud/bigtable/internal/table_data_proto/bigtable_table_data.proto
// DO NOT EDIT!
/*
Package google_bigtable_admin_table_v1 is a generated protocol buffer package.
It is generated from these files:
google.golang.org/cloud/bigtable/internal/table_data_proto/bigtable_table_data.proto
It has these top-level messages:
Table
ColumnFamily
GcRule
*/
package google_bigtable_admin_table_v1
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "google.golang.org/cloud/bigtable/internal/duration_proto"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type Table_TimestampGranularity int32
const (
Table_MILLIS Table_TimestampGranularity = 0
)
var Table_TimestampGranularity_name = map[int32]string{
0: "MILLIS",
}
var Table_TimestampGranularity_value = map[string]int32{
"MILLIS": 0,
}
func (x Table_TimestampGranularity) String() string {
return proto.EnumName(Table_TimestampGranularity_name, int32(x))
}
// A collection of user data indexed by row, column, and timestamp.
// Each table is served using the resources of its parent cluster.
type Table struct {
// A unique identifier of the form
// <cluster_name>/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The column families configured for this table, mapped by column family id.
ColumnFamilies map[string]*ColumnFamily `protobuf:"bytes,3,rep,name=column_families" json:"column_families,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// The granularity (e.g. MILLIS, MICROS) at which timestamps are stored in
// this table. Timestamps not matching the granularity will be rejected.
// Cannot be changed once the table is created.
Granularity Table_TimestampGranularity `protobuf:"varint,4,opt,name=granularity,enum=google.bigtable.admin.table.v1.Table_TimestampGranularity" json:"granularity,omitempty"`
}
func (m *Table) Reset() { *m = Table{} }
func (m *Table) String() string { return proto.CompactTextString(m) }
func (*Table) ProtoMessage() {}
func (m *Table) GetColumnFamilies() map[string]*ColumnFamily {
if m != nil {
return m.ColumnFamilies
}
return nil
}
// A set of columns within a table which share a common configuration.
type ColumnFamily struct {
// A unique identifier of the form <table_name>/columnFamilies/[-_.a-zA-Z0-9]+
// The last segment is the same as the "name" field in
// google.bigtable.v1.Family.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// Garbage collection expression specified by the following grammar:
// GC = EXPR
// | "" ;
// EXPR = EXPR, "||", EXPR (* lowest precedence *)
// | EXPR, "&&", EXPR
// | "(", EXPR, ")" (* highest precedence *)
// | PROP ;
// PROP = "version() >", NUM32
// | "age() >", NUM64, [ UNIT ] ;
// NUM32 = non-zero-digit { digit } ; (* # NUM32 <= 2^32 - 1 *)
// NUM64 = non-zero-digit { digit } ; (* # NUM64 <= 2^63 - 1 *)
// UNIT = "d" | "h" | "m" (* d=days, h=hours, m=minutes, else micros *)
// GC expressions can be up to 500 characters in length
//
// The different types of PROP are defined as follows:
// version() - cell index, counting from most recent and starting at 1
// age() - age of the cell (current time minus cell timestamp)
//
// Example: "version() > 3 || (age() > 3d && version() > 1)"
// drop cells beyond the most recent three, and drop cells older than three
// days unless they're the most recent cell in the row/column
//
// Garbage collection executes opportunistically in the background, and so
// it's possible for reads to return a cell even if it matches the active GC
// expression for its family.
GcExpression string `protobuf:"bytes,2,opt,name=gc_expression" json:"gc_expression,omitempty"`
// Garbage collection rule specified as a protobuf.
// Supersedes `gc_expression`.
// Must serialize to at most 500 bytes.
//
// NOTE: Garbage collection executes opportunistically in the background, and
// so it's possible for reads to return a cell even if it matches the active
// GC expression for its family.
GcRule *GcRule `protobuf:"bytes,3,opt,name=gc_rule" json:"gc_rule,omitempty"`
}
func (m *ColumnFamily) Reset() { *m = ColumnFamily{} }
func (m *ColumnFamily) String() string { return proto.CompactTextString(m) }
func (*ColumnFamily) ProtoMessage() {}
func (m *ColumnFamily) GetGcRule() *GcRule {
if m != nil {
return m.GcRule
}
return nil
}
// Rule for determining which cells to delete during garbage collection.
type GcRule struct {
// Types that are valid to be assigned to Rule:
// *GcRule_MaxNumVersions
// *GcRule_MaxAge
// *GcRule_Intersection_
// *GcRule_Union_
Rule isGcRule_Rule `protobuf_oneof:"rule"`
}
func (m *GcRule) Reset() { *m = GcRule{} }
func (m *GcRule) String() string { return proto.CompactTextString(m) }
func (*GcRule) ProtoMessage() {}
type isGcRule_Rule interface {
isGcRule_Rule()
}
type GcRule_MaxNumVersions struct {
MaxNumVersions int32 `protobuf:"varint,1,opt,name=max_num_versions,oneof"`
}
type GcRule_MaxAge struct {
MaxAge *google_protobuf.Duration `protobuf:"bytes,2,opt,name=max_age,oneof"`
}
type GcRule_Intersection_ struct {
Intersection *GcRule_Intersection `protobuf:"bytes,3,opt,name=intersection,oneof"`
}
type GcRule_Union_ struct {
Union *GcRule_Union `protobuf:"bytes,4,opt,name=union,oneof"`
}
func (*GcRule_MaxNumVersions) isGcRule_Rule() {}
func (*GcRule_MaxAge) isGcRule_Rule() {}
func (*GcRule_Intersection_) isGcRule_Rule() {}
func (*GcRule_Union_) isGcRule_Rule() {}
func (m *GcRule) GetRule() isGcRule_Rule {
if m != nil {
return m.Rule
}
return nil
}
func (m *GcRule) GetMaxNumVersions() int32 {
if x, ok := m.GetRule().(*GcRule_MaxNumVersions); ok {
return x.MaxNumVersions
}
return 0
}
func (m *GcRule) GetMaxAge() *google_protobuf.Duration {
if x, ok := m.GetRule().(*GcRule_MaxAge); ok {
return x.MaxAge
}
return nil
}
func (m *GcRule) GetIntersection() *GcRule_Intersection {
if x, ok := m.GetRule().(*GcRule_Intersection_); ok {
return x.Intersection
}
return nil
}
func (m *GcRule) GetUnion() *GcRule_Union {
if x, ok := m.GetRule().(*GcRule_Union_); ok {
return x.Union
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*GcRule) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) {
return _GcRule_OneofMarshaler, _GcRule_OneofUnmarshaler, []interface{}{
(*GcRule_MaxNumVersions)(nil),
(*GcRule_MaxAge)(nil),
(*GcRule_Intersection_)(nil),
(*GcRule_Union_)(nil),
}
}
func _GcRule_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*GcRule)
// rule
switch x := m.Rule.(type) {
case *GcRule_MaxNumVersions:
b.EncodeVarint(1<<3 | proto.WireVarint)
b.EncodeVarint(uint64(x.MaxNumVersions))
case *GcRule_MaxAge:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.MaxAge); err != nil {
return err
}
case *GcRule_Intersection_:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Intersection); err != nil {
return err
}
case *GcRule_Union_:
b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Union); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("GcRule.Rule has unexpected type %T", x)
}
return nil
}
func _GcRule_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*GcRule)
switch tag {
case 1: // rule.max_num_versions
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.Rule = &GcRule_MaxNumVersions{int32(x)}
return true, err
case 2: // rule.max_age
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf.Duration)
err := b.DecodeMessage(msg)
m.Rule = &GcRule_MaxAge{msg}
return true, err
case 3: // rule.intersection
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(GcRule_Intersection)
err := b.DecodeMessage(msg)
m.Rule = &GcRule_Intersection_{msg}
return true, err
case 4: // rule.union
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(GcRule_Union)
err := b.DecodeMessage(msg)
m.Rule = &GcRule_Union_{msg}
return true, err
default:
return false, nil
}
}
// A GcRule which deletes cells matching all of the given rules.
type GcRule_Intersection struct {
// Only delete cells which would be deleted by every element of `rules`.
Rules []*GcRule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"`
}
func (m *GcRule_Intersection) Reset() { *m = GcRule_Intersection{} }
func (m *GcRule_Intersection) String() string { return proto.CompactTextString(m) }
func (*GcRule_Intersection) ProtoMessage() {}
func (m *GcRule_Intersection) GetRules() []*GcRule {
if m != nil {
return m.Rules
}
return nil
}
// A GcRule which deletes cells matching any of the given rules.
type GcRule_Union struct {
// Delete cells which would be deleted by any element of `rules`.
Rules []*GcRule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"`
}
func (m *GcRule_Union) Reset() { *m = GcRule_Union{} }
func (m *GcRule_Union) String() string { return proto.CompactTextString(m) }
func (*GcRule_Union) ProtoMessage() {}
func (m *GcRule_Union) GetRules() []*GcRule {
if m != nil {
return m.Rules
}
return nil
}
func init() {
proto.RegisterEnum("google.bigtable.admin.table.v1.Table_TimestampGranularity", Table_TimestampGranularity_name, Table_TimestampGranularity_value)
}