OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / genproto / googleapis / spanner / v1 / keys.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/spanner/v1/keys.proto
3
4 /*
5 Package spanner is a generated protocol buffer package.
6
7 It is generated from these files:
8         google/spanner/v1/keys.proto
9         google/spanner/v1/mutation.proto
10         google/spanner/v1/query_plan.proto
11         google/spanner/v1/result_set.proto
12         google/spanner/v1/spanner.proto
13         google/spanner/v1/transaction.proto
14         google/spanner/v1/type.proto
15
16 It has these top-level messages:
17         KeyRange
18         KeySet
19         Mutation
20         PlanNode
21         QueryPlan
22         ResultSet
23         PartialResultSet
24         ResultSetMetadata
25         ResultSetStats
26         CreateSessionRequest
27         Session
28         GetSessionRequest
29         DeleteSessionRequest
30         ExecuteSqlRequest
31         ReadRequest
32         BeginTransactionRequest
33         CommitRequest
34         CommitResponse
35         RollbackRequest
36         TransactionOptions
37         Transaction
38         TransactionSelector
39         Type
40         StructType
41 */
42 package spanner
43
44 import proto "github.com/golang/protobuf/proto"
45 import fmt "fmt"
46 import math "math"
47 import _ "google.golang.org/genproto/googleapis/api/annotations"
48 import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
49
50 // Reference imports to suppress errors if they are not otherwise used.
51 var _ = proto.Marshal
52 var _ = fmt.Errorf
53 var _ = math.Inf
54
55 // This is a compile-time assertion to ensure that this generated file
56 // is compatible with the proto package it is being compiled against.
57 // A compilation error at this line likely means your copy of the
58 // proto package needs to be updated.
59 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
60
61 // KeyRange represents a range of rows in a table or index.
62 //
63 // A range has a start key and an end key. These keys can be open or
64 // closed, indicating if the range includes rows with that key.
65 //
66 // Keys are represented by lists, where the ith value in the list
67 // corresponds to the ith component of the table or index primary key.
68 // Individual values are encoded as described [here][google.spanner.v1.TypeCode].
69 //
70 // For example, consider the following table definition:
71 //
72 //     CREATE TABLE UserEvents (
73 //       UserName STRING(MAX),
74 //       EventDate STRING(10)
75 //     ) PRIMARY KEY(UserName, EventDate);
76 //
77 // The following keys name rows in this table:
78 //
79 //     ["Bob", "2014-09-23"]
80 //     ["Alfred", "2015-06-12"]
81 //
82 // Since the `UserEvents` table's `PRIMARY KEY` clause names two
83 // columns, each `UserEvents` key has two elements; the first is the
84 // `UserName`, and the second is the `EventDate`.
85 //
86 // Key ranges with multiple components are interpreted
87 // lexicographically by component using the table or index key's declared
88 // sort order. For example, the following range returns all events for
89 // user `"Bob"` that occurred in the year 2015:
90 //
91 //     "start_closed": ["Bob", "2015-01-01"]
92 //     "end_closed": ["Bob", "2015-12-31"]
93 //
94 // Start and end keys can omit trailing key components. This affects the
95 // inclusion and exclusion of rows that exactly match the provided key
96 // components: if the key is closed, then rows that exactly match the
97 // provided components are included; if the key is open, then rows
98 // that exactly match are not included.
99 //
100 // For example, the following range includes all events for `"Bob"` that
101 // occurred during and after the year 2000:
102 //
103 //     "start_closed": ["Bob", "2000-01-01"]
104 //     "end_closed": ["Bob"]
105 //
106 // The next example retrieves all events for `"Bob"`:
107 //
108 //     "start_closed": ["Bob"]
109 //     "end_closed": ["Bob"]
110 //
111 // To retrieve events before the year 2000:
112 //
113 //     "start_closed": ["Bob"]
114 //     "end_open": ["Bob", "2000-01-01"]
115 //
116 // The following range includes all rows in the table:
117 //
118 //     "start_closed": []
119 //     "end_closed": []
120 //
121 // This range returns all users whose `UserName` begins with any
122 // character from A to C:
123 //
124 //     "start_closed": ["A"]
125 //     "end_open": ["D"]
126 //
127 // This range returns all users whose `UserName` begins with B:
128 //
129 //     "start_closed": ["B"]
130 //     "end_open": ["C"]
131 //
132 // Key ranges honor column sort order. For example, suppose a table is
133 // defined as follows:
134 //
135 //     CREATE TABLE DescendingSortedTable {
136 //       Key INT64,
137 //       ...
138 //     ) PRIMARY KEY(Key DESC);
139 //
140 // The following range retrieves all rows with key values between 1
141 // and 100 inclusive:
142 //
143 //     "start_closed": ["100"]
144 //     "end_closed": ["1"]
145 //
146 // Note that 100 is passed as the start, and 1 is passed as the end,
147 // because `Key` is a descending column in the schema.
148 type KeyRange struct {
149         // The start key must be provided. It can be either closed or open.
150         //
151         // Types that are valid to be assigned to StartKeyType:
152         //      *KeyRange_StartClosed
153         //      *KeyRange_StartOpen
154         StartKeyType isKeyRange_StartKeyType `protobuf_oneof:"start_key_type"`
155         // The end key must be provided. It can be either closed or open.
156         //
157         // Types that are valid to be assigned to EndKeyType:
158         //      *KeyRange_EndClosed
159         //      *KeyRange_EndOpen
160         EndKeyType isKeyRange_EndKeyType `protobuf_oneof:"end_key_type"`
161 }
162
163 func (m *KeyRange) Reset()                    { *m = KeyRange{} }
164 func (m *KeyRange) String() string            { return proto.CompactTextString(m) }
165 func (*KeyRange) ProtoMessage()               {}
166 func (*KeyRange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
167
168 type isKeyRange_StartKeyType interface {
169         isKeyRange_StartKeyType()
170 }
171 type isKeyRange_EndKeyType interface {
172         isKeyRange_EndKeyType()
173 }
174
175 type KeyRange_StartClosed struct {
176         StartClosed *google_protobuf1.ListValue `protobuf:"bytes,1,opt,name=start_closed,json=startClosed,oneof"`
177 }
178 type KeyRange_StartOpen struct {
179         StartOpen *google_protobuf1.ListValue `protobuf:"bytes,2,opt,name=start_open,json=startOpen,oneof"`
180 }
181 type KeyRange_EndClosed struct {
182         EndClosed *google_protobuf1.ListValue `protobuf:"bytes,3,opt,name=end_closed,json=endClosed,oneof"`
183 }
184 type KeyRange_EndOpen struct {
185         EndOpen *google_protobuf1.ListValue `protobuf:"bytes,4,opt,name=end_open,json=endOpen,oneof"`
186 }
187
188 func (*KeyRange_StartClosed) isKeyRange_StartKeyType() {}
189 func (*KeyRange_StartOpen) isKeyRange_StartKeyType()   {}
190 func (*KeyRange_EndClosed) isKeyRange_EndKeyType()     {}
191 func (*KeyRange_EndOpen) isKeyRange_EndKeyType()       {}
192
193 func (m *KeyRange) GetStartKeyType() isKeyRange_StartKeyType {
194         if m != nil {
195                 return m.StartKeyType
196         }
197         return nil
198 }
199 func (m *KeyRange) GetEndKeyType() isKeyRange_EndKeyType {
200         if m != nil {
201                 return m.EndKeyType
202         }
203         return nil
204 }
205
206 func (m *KeyRange) GetStartClosed() *google_protobuf1.ListValue {
207         if x, ok := m.GetStartKeyType().(*KeyRange_StartClosed); ok {
208                 return x.StartClosed
209         }
210         return nil
211 }
212
213 func (m *KeyRange) GetStartOpen() *google_protobuf1.ListValue {
214         if x, ok := m.GetStartKeyType().(*KeyRange_StartOpen); ok {
215                 return x.StartOpen
216         }
217         return nil
218 }
219
220 func (m *KeyRange) GetEndClosed() *google_protobuf1.ListValue {
221         if x, ok := m.GetEndKeyType().(*KeyRange_EndClosed); ok {
222                 return x.EndClosed
223         }
224         return nil
225 }
226
227 func (m *KeyRange) GetEndOpen() *google_protobuf1.ListValue {
228         if x, ok := m.GetEndKeyType().(*KeyRange_EndOpen); ok {
229                 return x.EndOpen
230         }
231         return nil
232 }
233
234 // XXX_OneofFuncs is for the internal use of the proto package.
235 func (*KeyRange) 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{}) {
236         return _KeyRange_OneofMarshaler, _KeyRange_OneofUnmarshaler, _KeyRange_OneofSizer, []interface{}{
237                 (*KeyRange_StartClosed)(nil),
238                 (*KeyRange_StartOpen)(nil),
239                 (*KeyRange_EndClosed)(nil),
240                 (*KeyRange_EndOpen)(nil),
241         }
242 }
243
244 func _KeyRange_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
245         m := msg.(*KeyRange)
246         // start_key_type
247         switch x := m.StartKeyType.(type) {
248         case *KeyRange_StartClosed:
249                 b.EncodeVarint(1<<3 | proto.WireBytes)
250                 if err := b.EncodeMessage(x.StartClosed); err != nil {
251                         return err
252                 }
253         case *KeyRange_StartOpen:
254                 b.EncodeVarint(2<<3 | proto.WireBytes)
255                 if err := b.EncodeMessage(x.StartOpen); err != nil {
256                         return err
257                 }
258         case nil:
259         default:
260                 return fmt.Errorf("KeyRange.StartKeyType has unexpected type %T", x)
261         }
262         // end_key_type
263         switch x := m.EndKeyType.(type) {
264         case *KeyRange_EndClosed:
265                 b.EncodeVarint(3<<3 | proto.WireBytes)
266                 if err := b.EncodeMessage(x.EndClosed); err != nil {
267                         return err
268                 }
269         case *KeyRange_EndOpen:
270                 b.EncodeVarint(4<<3 | proto.WireBytes)
271                 if err := b.EncodeMessage(x.EndOpen); err != nil {
272                         return err
273                 }
274         case nil:
275         default:
276                 return fmt.Errorf("KeyRange.EndKeyType has unexpected type %T", x)
277         }
278         return nil
279 }
280
281 func _KeyRange_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
282         m := msg.(*KeyRange)
283         switch tag {
284         case 1: // start_key_type.start_closed
285                 if wire != proto.WireBytes {
286                         return true, proto.ErrInternalBadWireType
287                 }
288                 msg := new(google_protobuf1.ListValue)
289                 err := b.DecodeMessage(msg)
290                 m.StartKeyType = &KeyRange_StartClosed{msg}
291                 return true, err
292         case 2: // start_key_type.start_open
293                 if wire != proto.WireBytes {
294                         return true, proto.ErrInternalBadWireType
295                 }
296                 msg := new(google_protobuf1.ListValue)
297                 err := b.DecodeMessage(msg)
298                 m.StartKeyType = &KeyRange_StartOpen{msg}
299                 return true, err
300         case 3: // end_key_type.end_closed
301                 if wire != proto.WireBytes {
302                         return true, proto.ErrInternalBadWireType
303                 }
304                 msg := new(google_protobuf1.ListValue)
305                 err := b.DecodeMessage(msg)
306                 m.EndKeyType = &KeyRange_EndClosed{msg}
307                 return true, err
308         case 4: // end_key_type.end_open
309                 if wire != proto.WireBytes {
310                         return true, proto.ErrInternalBadWireType
311                 }
312                 msg := new(google_protobuf1.ListValue)
313                 err := b.DecodeMessage(msg)
314                 m.EndKeyType = &KeyRange_EndOpen{msg}
315                 return true, err
316         default:
317                 return false, nil
318         }
319 }
320
321 func _KeyRange_OneofSizer(msg proto.Message) (n int) {
322         m := msg.(*KeyRange)
323         // start_key_type
324         switch x := m.StartKeyType.(type) {
325         case *KeyRange_StartClosed:
326                 s := proto.Size(x.StartClosed)
327                 n += proto.SizeVarint(1<<3 | proto.WireBytes)
328                 n += proto.SizeVarint(uint64(s))
329                 n += s
330         case *KeyRange_StartOpen:
331                 s := proto.Size(x.StartOpen)
332                 n += proto.SizeVarint(2<<3 | proto.WireBytes)
333                 n += proto.SizeVarint(uint64(s))
334                 n += s
335         case nil:
336         default:
337                 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
338         }
339         // end_key_type
340         switch x := m.EndKeyType.(type) {
341         case *KeyRange_EndClosed:
342                 s := proto.Size(x.EndClosed)
343                 n += proto.SizeVarint(3<<3 | proto.WireBytes)
344                 n += proto.SizeVarint(uint64(s))
345                 n += s
346         case *KeyRange_EndOpen:
347                 s := proto.Size(x.EndOpen)
348                 n += proto.SizeVarint(4<<3 | proto.WireBytes)
349                 n += proto.SizeVarint(uint64(s))
350                 n += s
351         case nil:
352         default:
353                 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
354         }
355         return n
356 }
357
358 // `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All
359 // the keys are expected to be in the same table or index. The keys need
360 // not be sorted in any particular way.
361 //
362 // If the same key is specified multiple times in the set (for example
363 // if two ranges, two keys, or a key and a range overlap), Cloud Spanner
364 // behaves as if the key were only specified once.
365 type KeySet struct {
366         // A list of specific keys. Entries in `keys` should have exactly as
367         // many elements as there are columns in the primary or index key
368         // with which this `KeySet` is used.  Individual key values are
369         // encoded as described [here][google.spanner.v1.TypeCode].
370         Keys []*google_protobuf1.ListValue `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
371         // A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about
372         // key range specifications.
373         Ranges []*KeyRange `protobuf:"bytes,2,rep,name=ranges" json:"ranges,omitempty"`
374         // For convenience `all` can be set to `true` to indicate that this
375         // `KeySet` matches all keys in the table or index. Note that any keys
376         // specified in `keys` or `ranges` are only yielded once.
377         All bool `protobuf:"varint,3,opt,name=all" json:"all,omitempty"`
378 }
379
380 func (m *KeySet) Reset()                    { *m = KeySet{} }
381 func (m *KeySet) String() string            { return proto.CompactTextString(m) }
382 func (*KeySet) ProtoMessage()               {}
383 func (*KeySet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
384
385 func (m *KeySet) GetKeys() []*google_protobuf1.ListValue {
386         if m != nil {
387                 return m.Keys
388         }
389         return nil
390 }
391
392 func (m *KeySet) GetRanges() []*KeyRange {
393         if m != nil {
394                 return m.Ranges
395         }
396         return nil
397 }
398
399 func (m *KeySet) GetAll() bool {
400         if m != nil {
401                 return m.All
402         }
403         return false
404 }
405
406 func init() {
407         proto.RegisterType((*KeyRange)(nil), "google.spanner.v1.KeyRange")
408         proto.RegisterType((*KeySet)(nil), "google.spanner.v1.KeySet")
409 }
410
411 func init() { proto.RegisterFile("google/spanner/v1/keys.proto", fileDescriptor0) }
412
413 var fileDescriptor0 = []byte{
414         // 356 bytes of a gzipped FileDescriptorProto
415         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x6b, 0xf2, 0x30,
416         0x18, 0xc7, 0xdf, 0x56, 0xf1, 0xd5, 0x28, 0xe2, 0x5b, 0x78, 0x59, 0x71, 0x3b, 0x88, 0xa7, 0x9d,
417         0x52, 0x9c, 0x87, 0x0d, 0x3c, 0x0c, 0xea, 0x61, 0x03, 0x07, 0x93, 0x0a, 0x1e, 0x76, 0x91, 0x68,
418         0x9f, 0x85, 0x62, 0x96, 0x84, 0x26, 0x95, 0xf5, 0xb4, 0xaf, 0xb2, 0xf3, 0x3e, 0xe5, 0x48, 0x9a,
419         0x8e, 0x81, 0xb0, 0x79, 0x4b, 0xf8, 0x3f, 0xbf, 0xe7, 0x97, 0x3e, 0x4f, 0xd1, 0x05, 0x15, 0x82,
420         0x32, 0x88, 0x94, 0x24, 0x9c, 0x43, 0x1e, 0x1d, 0x26, 0xd1, 0x1e, 0x4a, 0x85, 0x65, 0x2e, 0xb4,
421         0x08, 0xfe, 0x55, 0x29, 0x76, 0x29, 0x3e, 0x4c, 0x86, 0x35, 0x40, 0x64, 0x16, 0x11, 0xce, 0x85,
422         0x26, 0x3a, 0x13, 0xdc, 0x01, 0x5f, 0xa9, 0xbd, 0x6d, 0x8b, 0xe7, 0x48, 0xe9, 0xbc, 0xd8, 0xe9,
423         0x2a, 0x1d, 0xbf, 0xfb, 0xa8, 0xbd, 0x80, 0x32, 0x21, 0x9c, 0x42, 0x70, 0x8b, 0x7a, 0x4a, 0x93,
424         0x5c, 0x6f, 0x76, 0x4c, 0x28, 0x48, 0x43, 0x6f, 0xe4, 0x5d, 0x76, 0xaf, 0x86, 0xd8, 0x29, 0xeb,
425         0x0e, 0xf8, 0x21, 0x53, 0x7a, 0x4d, 0x58, 0x01, 0xf7, 0x7f, 0x92, 0xae, 0x25, 0xe6, 0x16, 0x08,
426         0x66, 0x08, 0x55, 0x0d, 0x84, 0x04, 0x1e, 0xfa, 0x27, 0xe0, 0x1d, 0x5b, 0xff, 0x28, 0x81, 0x1b,
427         0x18, 0x78, 0x5a, 0xbb, 0x1b, 0xbf, 0xc2, 0x5e, 0xd2, 0x01, 0x9e, 0x3a, 0xf3, 0x35, 0x6a, 0x1b,
428         0xd8, 0x7a, 0x9b, 0x27, 0xa0, 0x7f, 0x81, 0xa7, 0xc6, 0x1a, 0x0f, 0x50, 0xbf, 0x7a, 0xf2, 0x1e,
429         0xca, 0x8d, 0x2e, 0x25, 0xc4, 0x7d, 0xd4, 0x33, 0xad, 0xea, 0xfb, 0xf8, 0x0d, 0xb5, 0x16, 0x50,
430         0xae, 0x40, 0x07, 0x18, 0x35, 0xcd, 0x26, 0x42, 0x6f, 0xd4, 0xf8, 0x59, 0x90, 0xd8, 0xba, 0x60,
431         0x8a, 0x5a, 0xb9, 0x19, 0xac, 0x0a, 0x7d, 0x4b, 0x9c, 0xe3, 0xa3, 0xe5, 0xe1, 0x7a, 0xf8, 0x89,
432         0x2b, 0x0d, 0x06, 0xa8, 0x41, 0x18, 0xb3, 0xdf, 0xdf, 0x4e, 0xcc, 0x31, 0x7e, 0x45, 0xff, 0x77,
433         0xe2, 0xe5, 0x98, 0x8d, 0x3b, 0x0b, 0x28, 0xd5, 0xd2, 0xd8, 0x97, 0xde, 0xd3, 0x8d, 0xcb, 0xa9,
434         0x60, 0x84, 0x53, 0x2c, 0x72, 0x1a, 0x51, 0xe0, 0xf6, 0x6d, 0x51, 0x15, 0x11, 0x99, 0xa9, 0x6f,
435         0x7f, 0xd5, 0xcc, 0x1d, 0x3f, 0xfc, 0xb3, 0xbb, 0x0a, 0x9d, 0x33, 0x51, 0xa4, 0x78, 0xe5, 0x04,
436         0xeb, 0xc9, 0xb6, 0x65, 0xf1, 0xe9, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x78, 0x80, 0x47,
437         0x93, 0x02, 0x00, 0x00,
438 }