OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / genproto / googleapis / spanner / v1 / mutation.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/spanner/v1/mutation.proto
3
4 package spanner
5
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9 import _ "google.golang.org/genproto/googleapis/api/annotations"
10 import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
11
12 // Reference imports to suppress errors if they are not otherwise used.
13 var _ = proto.Marshal
14 var _ = fmt.Errorf
15 var _ = math.Inf
16
17 // A modification to one or more Cloud Spanner rows.  Mutations can be
18 // applied to a Cloud Spanner database by sending them in a
19 // [Commit][google.spanner.v1.Spanner.Commit] call.
20 type Mutation struct {
21         // Required. The operation to perform.
22         //
23         // Types that are valid to be assigned to Operation:
24         //      *Mutation_Insert
25         //      *Mutation_Update
26         //      *Mutation_InsertOrUpdate
27         //      *Mutation_Replace
28         //      *Mutation_Delete_
29         Operation isMutation_Operation `protobuf_oneof:"operation"`
30 }
31
32 func (m *Mutation) Reset()                    { *m = Mutation{} }
33 func (m *Mutation) String() string            { return proto.CompactTextString(m) }
34 func (*Mutation) ProtoMessage()               {}
35 func (*Mutation) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
36
37 type isMutation_Operation interface {
38         isMutation_Operation()
39 }
40
41 type Mutation_Insert struct {
42         Insert *Mutation_Write `protobuf:"bytes,1,opt,name=insert,oneof"`
43 }
44 type Mutation_Update struct {
45         Update *Mutation_Write `protobuf:"bytes,2,opt,name=update,oneof"`
46 }
47 type Mutation_InsertOrUpdate struct {
48         InsertOrUpdate *Mutation_Write `protobuf:"bytes,3,opt,name=insert_or_update,json=insertOrUpdate,oneof"`
49 }
50 type Mutation_Replace struct {
51         Replace *Mutation_Write `protobuf:"bytes,4,opt,name=replace,oneof"`
52 }
53 type Mutation_Delete_ struct {
54         Delete *Mutation_Delete `protobuf:"bytes,5,opt,name=delete,oneof"`
55 }
56
57 func (*Mutation_Insert) isMutation_Operation()         {}
58 func (*Mutation_Update) isMutation_Operation()         {}
59 func (*Mutation_InsertOrUpdate) isMutation_Operation() {}
60 func (*Mutation_Replace) isMutation_Operation()        {}
61 func (*Mutation_Delete_) isMutation_Operation()        {}
62
63 func (m *Mutation) GetOperation() isMutation_Operation {
64         if m != nil {
65                 return m.Operation
66         }
67         return nil
68 }
69
70 func (m *Mutation) GetInsert() *Mutation_Write {
71         if x, ok := m.GetOperation().(*Mutation_Insert); ok {
72                 return x.Insert
73         }
74         return nil
75 }
76
77 func (m *Mutation) GetUpdate() *Mutation_Write {
78         if x, ok := m.GetOperation().(*Mutation_Update); ok {
79                 return x.Update
80         }
81         return nil
82 }
83
84 func (m *Mutation) GetInsertOrUpdate() *Mutation_Write {
85         if x, ok := m.GetOperation().(*Mutation_InsertOrUpdate); ok {
86                 return x.InsertOrUpdate
87         }
88         return nil
89 }
90
91 func (m *Mutation) GetReplace() *Mutation_Write {
92         if x, ok := m.GetOperation().(*Mutation_Replace); ok {
93                 return x.Replace
94         }
95         return nil
96 }
97
98 func (m *Mutation) GetDelete() *Mutation_Delete {
99         if x, ok := m.GetOperation().(*Mutation_Delete_); ok {
100                 return x.Delete
101         }
102         return nil
103 }
104
105 // XXX_OneofFuncs is for the internal use of the proto package.
106 func (*Mutation) 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{}) {
107         return _Mutation_OneofMarshaler, _Mutation_OneofUnmarshaler, _Mutation_OneofSizer, []interface{}{
108                 (*Mutation_Insert)(nil),
109                 (*Mutation_Update)(nil),
110                 (*Mutation_InsertOrUpdate)(nil),
111                 (*Mutation_Replace)(nil),
112                 (*Mutation_Delete_)(nil),
113         }
114 }
115
116 func _Mutation_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
117         m := msg.(*Mutation)
118         // operation
119         switch x := m.Operation.(type) {
120         case *Mutation_Insert:
121                 b.EncodeVarint(1<<3 | proto.WireBytes)
122                 if err := b.EncodeMessage(x.Insert); err != nil {
123                         return err
124                 }
125         case *Mutation_Update:
126                 b.EncodeVarint(2<<3 | proto.WireBytes)
127                 if err := b.EncodeMessage(x.Update); err != nil {
128                         return err
129                 }
130         case *Mutation_InsertOrUpdate:
131                 b.EncodeVarint(3<<3 | proto.WireBytes)
132                 if err := b.EncodeMessage(x.InsertOrUpdate); err != nil {
133                         return err
134                 }
135         case *Mutation_Replace:
136                 b.EncodeVarint(4<<3 | proto.WireBytes)
137                 if err := b.EncodeMessage(x.Replace); err != nil {
138                         return err
139                 }
140         case *Mutation_Delete_:
141                 b.EncodeVarint(5<<3 | proto.WireBytes)
142                 if err := b.EncodeMessage(x.Delete); err != nil {
143                         return err
144                 }
145         case nil:
146         default:
147                 return fmt.Errorf("Mutation.Operation has unexpected type %T", x)
148         }
149         return nil
150 }
151
152 func _Mutation_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
153         m := msg.(*Mutation)
154         switch tag {
155         case 1: // operation.insert
156                 if wire != proto.WireBytes {
157                         return true, proto.ErrInternalBadWireType
158                 }
159                 msg := new(Mutation_Write)
160                 err := b.DecodeMessage(msg)
161                 m.Operation = &Mutation_Insert{msg}
162                 return true, err
163         case 2: // operation.update
164                 if wire != proto.WireBytes {
165                         return true, proto.ErrInternalBadWireType
166                 }
167                 msg := new(Mutation_Write)
168                 err := b.DecodeMessage(msg)
169                 m.Operation = &Mutation_Update{msg}
170                 return true, err
171         case 3: // operation.insert_or_update
172                 if wire != proto.WireBytes {
173                         return true, proto.ErrInternalBadWireType
174                 }
175                 msg := new(Mutation_Write)
176                 err := b.DecodeMessage(msg)
177                 m.Operation = &Mutation_InsertOrUpdate{msg}
178                 return true, err
179         case 4: // operation.replace
180                 if wire != proto.WireBytes {
181                         return true, proto.ErrInternalBadWireType
182                 }
183                 msg := new(Mutation_Write)
184                 err := b.DecodeMessage(msg)
185                 m.Operation = &Mutation_Replace{msg}
186                 return true, err
187         case 5: // operation.delete
188                 if wire != proto.WireBytes {
189                         return true, proto.ErrInternalBadWireType
190                 }
191                 msg := new(Mutation_Delete)
192                 err := b.DecodeMessage(msg)
193                 m.Operation = &Mutation_Delete_{msg}
194                 return true, err
195         default:
196                 return false, nil
197         }
198 }
199
200 func _Mutation_OneofSizer(msg proto.Message) (n int) {
201         m := msg.(*Mutation)
202         // operation
203         switch x := m.Operation.(type) {
204         case *Mutation_Insert:
205                 s := proto.Size(x.Insert)
206                 n += proto.SizeVarint(1<<3 | proto.WireBytes)
207                 n += proto.SizeVarint(uint64(s))
208                 n += s
209         case *Mutation_Update:
210                 s := proto.Size(x.Update)
211                 n += proto.SizeVarint(2<<3 | proto.WireBytes)
212                 n += proto.SizeVarint(uint64(s))
213                 n += s
214         case *Mutation_InsertOrUpdate:
215                 s := proto.Size(x.InsertOrUpdate)
216                 n += proto.SizeVarint(3<<3 | proto.WireBytes)
217                 n += proto.SizeVarint(uint64(s))
218                 n += s
219         case *Mutation_Replace:
220                 s := proto.Size(x.Replace)
221                 n += proto.SizeVarint(4<<3 | proto.WireBytes)
222                 n += proto.SizeVarint(uint64(s))
223                 n += s
224         case *Mutation_Delete_:
225                 s := proto.Size(x.Delete)
226                 n += proto.SizeVarint(5<<3 | proto.WireBytes)
227                 n += proto.SizeVarint(uint64(s))
228                 n += s
229         case nil:
230         default:
231                 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
232         }
233         return n
234 }
235
236 // Arguments to [insert][google.spanner.v1.Mutation.insert], [update][google.spanner.v1.Mutation.update], [insert_or_update][google.spanner.v1.Mutation.insert_or_update], and
237 // [replace][google.spanner.v1.Mutation.replace] operations.
238 type Mutation_Write struct {
239         // Required. The table whose rows will be written.
240         Table string `protobuf:"bytes,1,opt,name=table" json:"table,omitempty"`
241         // The names of the columns in [table][google.spanner.v1.Mutation.Write.table] to be written.
242         //
243         // The list of columns must contain enough columns to allow
244         // Cloud Spanner to derive values for all primary key columns in the
245         // row(s) to be modified.
246         Columns []string `protobuf:"bytes,2,rep,name=columns" json:"columns,omitempty"`
247         // The values to be written. `values` can contain more than one
248         // list of values. If it does, then multiple rows are written, one
249         // for each entry in `values`. Each list in `values` must have
250         // exactly as many entries as there are entries in [columns][google.spanner.v1.Mutation.Write.columns]
251         // above. Sending multiple lists is equivalent to sending multiple
252         // `Mutation`s, each containing one `values` entry and repeating
253         // [table][google.spanner.v1.Mutation.Write.table] and [columns][google.spanner.v1.Mutation.Write.columns]. Individual values in each list are
254         // encoded as described [here][google.spanner.v1.TypeCode].
255         Values []*google_protobuf1.ListValue `protobuf:"bytes,3,rep,name=values" json:"values,omitempty"`
256 }
257
258 func (m *Mutation_Write) Reset()                    { *m = Mutation_Write{} }
259 func (m *Mutation_Write) String() string            { return proto.CompactTextString(m) }
260 func (*Mutation_Write) ProtoMessage()               {}
261 func (*Mutation_Write) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} }
262
263 func (m *Mutation_Write) GetTable() string {
264         if m != nil {
265                 return m.Table
266         }
267         return ""
268 }
269
270 func (m *Mutation_Write) GetColumns() []string {
271         if m != nil {
272                 return m.Columns
273         }
274         return nil
275 }
276
277 func (m *Mutation_Write) GetValues() []*google_protobuf1.ListValue {
278         if m != nil {
279                 return m.Values
280         }
281         return nil
282 }
283
284 // Arguments to [delete][google.spanner.v1.Mutation.delete] operations.
285 type Mutation_Delete struct {
286         // Required. The table whose rows will be deleted.
287         Table string `protobuf:"bytes,1,opt,name=table" json:"table,omitempty"`
288         // Required. The primary keys of the rows within [table][google.spanner.v1.Mutation.Delete.table] to delete.
289         KeySet *KeySet `protobuf:"bytes,2,opt,name=key_set,json=keySet" json:"key_set,omitempty"`
290 }
291
292 func (m *Mutation_Delete) Reset()                    { *m = Mutation_Delete{} }
293 func (m *Mutation_Delete) String() string            { return proto.CompactTextString(m) }
294 func (*Mutation_Delete) ProtoMessage()               {}
295 func (*Mutation_Delete) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 1} }
296
297 func (m *Mutation_Delete) GetTable() string {
298         if m != nil {
299                 return m.Table
300         }
301         return ""
302 }
303
304 func (m *Mutation_Delete) GetKeySet() *KeySet {
305         if m != nil {
306                 return m.KeySet
307         }
308         return nil
309 }
310
311 func init() {
312         proto.RegisterType((*Mutation)(nil), "google.spanner.v1.Mutation")
313         proto.RegisterType((*Mutation_Write)(nil), "google.spanner.v1.Mutation.Write")
314         proto.RegisterType((*Mutation_Delete)(nil), "google.spanner.v1.Mutation.Delete")
315 }
316
317 func init() { proto.RegisterFile("google/spanner/v1/mutation.proto", fileDescriptor1) }
318
319 var fileDescriptor1 = []byte{
320         // 402 bytes of a gzipped FileDescriptorProto
321         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x41, 0x6b, 0xdb, 0x30,
322         0x14, 0xc7, 0x97, 0x38, 0x71, 0x16, 0x85, 0x8d, 0xcd, 0x6c, 0xcc, 0x33, 0x3b, 0x78, 0x39, 0xe5,
323         0x24, 0x13, 0xef, 0x32, 0xc8, 0x76, 0xc9, 0x06, 0x1b, 0x6c, 0xa1, 0xc1, 0xa1, 0x29, 0xf4, 0x12,
324         0x14, 0xe7, 0xd5, 0x18, 0x2b, 0x92, 0x91, 0xe4, 0x40, 0xa0, 0x9f, 0xa5, 0x1f, 0xa0, 0x9f, 0xb2,
325         0x58, 0x92, 0x4b, 0x68, 0xda, 0x92, 0x9e, 0xec, 0xc7, 0xfb, 0xff, 0xfe, 0xff, 0xf7, 0x24, 0xa1,
326         0x30, 0xe3, 0x3c, 0xa3, 0x10, 0xc9, 0x92, 0x30, 0x06, 0x22, 0xda, 0x8d, 0xa3, 0x6d, 0xa5, 0x88,
327         0xca, 0x39, 0xc3, 0xa5, 0xe0, 0x8a, 0x7b, 0xef, 0x8d, 0x02, 0x5b, 0x05, 0xde, 0x8d, 0x83, 0x2f,
328         0x16, 0x22, 0x65, 0x1e, 0x11, 0xc6, 0xb8, 0xd1, 0x4b, 0x03, 0xdc, 0x77, 0x75, 0xb5, 0xae, 0xae,
329         0x22, 0xa9, 0x44, 0x95, 0xaa, 0x07, 0xdd, 0x83, 0xc0, 0x02, 0xf6, 0x96, 0x1d, 0xde, 0x74, 0xd0,
330         0xeb, 0x99, 0xcd, 0xf7, 0x26, 0xc8, 0xcd, 0x99, 0x04, 0xa1, 0xfc, 0x56, 0xd8, 0x1a, 0x0d, 0xe2,
331         0xaf, 0xf8, 0x68, 0x14, 0xdc, 0x88, 0xf1, 0x85, 0xc8, 0x15, 0xfc, 0x7d, 0x95, 0x58, 0xa4, 0x86,
332         0xab, 0x72, 0x43, 0x14, 0xf8, 0xed, 0x17, 0xc0, 0x06, 0xf1, 0x66, 0xe8, 0x9d, 0xb1, 0x59, 0x71,
333         0xb1, 0xb2, 0x36, 0xce, 0xe9, 0x36, 0x6f, 0x0d, 0x7c, 0x26, 0xce, 0x8d, 0xdd, 0x4f, 0xd4, 0x13,
334         0x50, 0x52, 0x92, 0x82, 0xdf, 0x39, 0xdd, 0xa5, 0x61, 0xbc, 0x1f, 0xc8, 0xdd, 0x00, 0x05, 0x05,
335         0x7e, 0x57, 0xd3, 0xc3, 0xe7, 0xe8, 0xdf, 0x5a, 0x59, 0xef, 0x62, 0x98, 0xa0, 0x40, 0x5d, 0xed,
336         0xe8, 0x7d, 0x40, 0x5d, 0x45, 0xd6, 0x14, 0xf4, 0x69, 0xf6, 0x13, 0x53, 0x78, 0x3e, 0xea, 0xa5,
337         0x9c, 0x56, 0x5b, 0x26, 0xfd, 0x76, 0xe8, 0x8c, 0xfa, 0x49, 0x53, 0x7a, 0x31, 0x72, 0x77, 0x84,
338         0x56, 0x20, 0x7d, 0x27, 0x74, 0x46, 0x83, 0x38, 0x68, 0x62, 0x9b, 0x8b, 0xc5, 0xff, 0x73, 0xa9,
339         0x96, 0xb5, 0x24, 0xb1, 0xca, 0x20, 0x41, 0xae, 0x19, 0xe0, 0x89, 0xb4, 0x18, 0xf5, 0x0a, 0xd8,
340         0xaf, 0x24, 0x28, 0x7b, 0x2d, 0x9f, 0x1f, 0xd9, 0xe5, 0x1f, 0xec, 0x17, 0xa0, 0x12, 0xb7, 0xd0,
341         0xdf, 0xe9, 0x00, 0xf5, 0x79, 0x09, 0x42, 0xaf, 0x37, 0xbd, 0x46, 0x1f, 0x53, 0xbe, 0x3d, 0x86,
342         0xa6, 0x6f, 0x9a, 0x13, 0x98, 0xd7, 0xd3, 0xcd, 0x5b, 0x97, 0xdf, 0xad, 0x26, 0xe3, 0x94, 0xb0,
343         0x0c, 0x73, 0x91, 0x45, 0x19, 0x30, 0x3d, 0x7b, 0x64, 0x5a, 0xa4, 0xcc, 0xe5, 0xc1, 0x3b, 0x9c,
344         0xd8, 0xdf, 0xdb, 0xf6, 0xa7, 0x3f, 0x06, 0xfd, 0x45, 0x79, 0xb5, 0xc1, 0x0b, 0x1b, 0xb2, 0x1c,
345         0xaf, 0x5d, 0x8d, 0x7f, 0xbb, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x94, 0x52, 0x99, 0xf3, 0x36, 0x03,
346         0x00, 0x00,
347 }