OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / genproto / googleapis / spanner / v1 / spanner.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/spanner/v1/spanner.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.golang.org/genproto/googleapis/api/serviceconfig"
11 import google_protobuf4 "github.com/golang/protobuf/ptypes/empty"
12 import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
13 import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp"
14
15 import (
16         context "golang.org/x/net/context"
17         grpc "google.golang.org/grpc"
18 )
19
20 // Reference imports to suppress errors if they are not otherwise used.
21 var _ = proto.Marshal
22 var _ = fmt.Errorf
23 var _ = math.Inf
24
25 // Mode in which the query must be processed.
26 type ExecuteSqlRequest_QueryMode int32
27
28 const (
29         // The default mode where only the query result, without any information
30         // about the query plan is returned.
31         ExecuteSqlRequest_NORMAL ExecuteSqlRequest_QueryMode = 0
32         // This mode returns only the query plan, without any result rows or
33         // execution statistics information.
34         ExecuteSqlRequest_PLAN ExecuteSqlRequest_QueryMode = 1
35         // This mode returns both the query plan and the execution statistics along
36         // with the result rows.
37         ExecuteSqlRequest_PROFILE ExecuteSqlRequest_QueryMode = 2
38 )
39
40 var ExecuteSqlRequest_QueryMode_name = map[int32]string{
41         0: "NORMAL",
42         1: "PLAN",
43         2: "PROFILE",
44 }
45 var ExecuteSqlRequest_QueryMode_value = map[string]int32{
46         "NORMAL":  0,
47         "PLAN":    1,
48         "PROFILE": 2,
49 }
50
51 func (x ExecuteSqlRequest_QueryMode) String() string {
52         return proto.EnumName(ExecuteSqlRequest_QueryMode_name, int32(x))
53 }
54 func (ExecuteSqlRequest_QueryMode) EnumDescriptor() ([]byte, []int) {
55         return fileDescriptor4, []int{4, 0}
56 }
57
58 // The request for [CreateSession][google.spanner.v1.Spanner.CreateSession].
59 type CreateSessionRequest struct {
60         // Required. The database in which the new session is created.
61         Database string `protobuf:"bytes,1,opt,name=database" json:"database,omitempty"`
62 }
63
64 func (m *CreateSessionRequest) Reset()                    { *m = CreateSessionRequest{} }
65 func (m *CreateSessionRequest) String() string            { return proto.CompactTextString(m) }
66 func (*CreateSessionRequest) ProtoMessage()               {}
67 func (*CreateSessionRequest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} }
68
69 func (m *CreateSessionRequest) GetDatabase() string {
70         if m != nil {
71                 return m.Database
72         }
73         return ""
74 }
75
76 // A session in the Cloud Spanner API.
77 type Session struct {
78         // Required. The name of the session.
79         Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
80 }
81
82 func (m *Session) Reset()                    { *m = Session{} }
83 func (m *Session) String() string            { return proto.CompactTextString(m) }
84 func (*Session) ProtoMessage()               {}
85 func (*Session) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} }
86
87 func (m *Session) GetName() string {
88         if m != nil {
89                 return m.Name
90         }
91         return ""
92 }
93
94 // The request for [GetSession][google.spanner.v1.Spanner.GetSession].
95 type GetSessionRequest struct {
96         // Required. The name of the session to retrieve.
97         Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
98 }
99
100 func (m *GetSessionRequest) Reset()                    { *m = GetSessionRequest{} }
101 func (m *GetSessionRequest) String() string            { return proto.CompactTextString(m) }
102 func (*GetSessionRequest) ProtoMessage()               {}
103 func (*GetSessionRequest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{2} }
104
105 func (m *GetSessionRequest) GetName() string {
106         if m != nil {
107                 return m.Name
108         }
109         return ""
110 }
111
112 // The request for [DeleteSession][google.spanner.v1.Spanner.DeleteSession].
113 type DeleteSessionRequest struct {
114         // Required. The name of the session to delete.
115         Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
116 }
117
118 func (m *DeleteSessionRequest) Reset()                    { *m = DeleteSessionRequest{} }
119 func (m *DeleteSessionRequest) String() string            { return proto.CompactTextString(m) }
120 func (*DeleteSessionRequest) ProtoMessage()               {}
121 func (*DeleteSessionRequest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{3} }
122
123 func (m *DeleteSessionRequest) GetName() string {
124         if m != nil {
125                 return m.Name
126         }
127         return ""
128 }
129
130 // The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
131 // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql].
132 type ExecuteSqlRequest struct {
133         // Required. The session in which the SQL query should be performed.
134         Session string `protobuf:"bytes,1,opt,name=session" json:"session,omitempty"`
135         // The transaction to use. If none is provided, the default is a
136         // temporary read-only transaction with strong concurrency.
137         Transaction *TransactionSelector `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"`
138         // Required. The SQL query string.
139         Sql string `protobuf:"bytes,3,opt,name=sql" json:"sql,omitempty"`
140         // The SQL query string can contain parameter placeholders. A parameter
141         // placeholder consists of `'@'` followed by the parameter
142         // name. Parameter names consist of any combination of letters,
143         // numbers, and underscores.
144         //
145         // Parameters can appear anywhere that a literal value is expected.  The same
146         // parameter name can be used more than once, for example:
147         //   `"WHERE id > @msg_id AND id < @msg_id + 100"`
148         //
149         // It is an error to execute an SQL query with unbound parameters.
150         //
151         // Parameter values are specified using `params`, which is a JSON
152         // object whose keys are parameter names, and whose values are the
153         // corresponding parameter values.
154         Params *google_protobuf1.Struct `protobuf:"bytes,4,opt,name=params" json:"params,omitempty"`
155         // It is not always possible for Cloud Spanner to infer the right SQL type
156         // from a JSON value.  For example, values of type `BYTES` and values
157         // of type `STRING` both appear in [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings.
158         //
159         // In these cases, `param_types` can be used to specify the exact
160         // SQL type for some or all of the SQL query parameters. See the
161         // definition of [Type][google.spanner.v1.Type] for more information
162         // about SQL types.
163         ParamTypes map[string]*Type `protobuf:"bytes,5,rep,name=param_types,json=paramTypes" json:"param_types,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
164         // If this request is resuming a previously interrupted SQL query
165         // execution, `resume_token` should be copied from the last
166         // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this
167         // enables the new SQL query execution to resume where the last one left
168         // off. The rest of the request parameters must exactly match the
169         // request that yielded this token.
170         ResumeToken []byte `protobuf:"bytes,6,opt,name=resume_token,json=resumeToken,proto3" json:"resume_token,omitempty"`
171         // Used to control the amount of debugging information returned in
172         // [ResultSetStats][google.spanner.v1.ResultSetStats].
173         QueryMode ExecuteSqlRequest_QueryMode `protobuf:"varint,7,opt,name=query_mode,json=queryMode,enum=google.spanner.v1.ExecuteSqlRequest_QueryMode" json:"query_mode,omitempty"`
174 }
175
176 func (m *ExecuteSqlRequest) Reset()                    { *m = ExecuteSqlRequest{} }
177 func (m *ExecuteSqlRequest) String() string            { return proto.CompactTextString(m) }
178 func (*ExecuteSqlRequest) ProtoMessage()               {}
179 func (*ExecuteSqlRequest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{4} }
180
181 func (m *ExecuteSqlRequest) GetSession() string {
182         if m != nil {
183                 return m.Session
184         }
185         return ""
186 }
187
188 func (m *ExecuteSqlRequest) GetTransaction() *TransactionSelector {
189         if m != nil {
190                 return m.Transaction
191         }
192         return nil
193 }
194
195 func (m *ExecuteSqlRequest) GetSql() string {
196         if m != nil {
197                 return m.Sql
198         }
199         return ""
200 }
201
202 func (m *ExecuteSqlRequest) GetParams() *google_protobuf1.Struct {
203         if m != nil {
204                 return m.Params
205         }
206         return nil
207 }
208
209 func (m *ExecuteSqlRequest) GetParamTypes() map[string]*Type {
210         if m != nil {
211                 return m.ParamTypes
212         }
213         return nil
214 }
215
216 func (m *ExecuteSqlRequest) GetResumeToken() []byte {
217         if m != nil {
218                 return m.ResumeToken
219         }
220         return nil
221 }
222
223 func (m *ExecuteSqlRequest) GetQueryMode() ExecuteSqlRequest_QueryMode {
224         if m != nil {
225                 return m.QueryMode
226         }
227         return ExecuteSqlRequest_NORMAL
228 }
229
230 // The request for [Read][google.spanner.v1.Spanner.Read] and
231 // [StreamingRead][google.spanner.v1.Spanner.StreamingRead].
232 type ReadRequest struct {
233         // Required. The session in which the read should be performed.
234         Session string `protobuf:"bytes,1,opt,name=session" json:"session,omitempty"`
235         // The transaction to use. If none is provided, the default is a
236         // temporary read-only transaction with strong concurrency.
237         Transaction *TransactionSelector `protobuf:"bytes,2,opt,name=transaction" json:"transaction,omitempty"`
238         // Required. The name of the table in the database to be read.
239         Table string `protobuf:"bytes,3,opt,name=table" json:"table,omitempty"`
240         // If non-empty, the name of an index on [table][google.spanner.v1.ReadRequest.table]. This index is
241         // used instead of the table primary key when interpreting [key_set][google.spanner.v1.ReadRequest.key_set]
242         // and sorting result rows. See [key_set][google.spanner.v1.ReadRequest.key_set] for further information.
243         Index string `protobuf:"bytes,4,opt,name=index" json:"index,omitempty"`
244         // The columns of [table][google.spanner.v1.ReadRequest.table] to be returned for each row matching
245         // this request.
246         Columns []string `protobuf:"bytes,5,rep,name=columns" json:"columns,omitempty"`
247         // Required. `key_set` identifies the rows to be yielded. `key_set` names the
248         // primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to be yielded, unless [index][google.spanner.v1.ReadRequest.index]
249         // is present. If [index][google.spanner.v1.ReadRequest.index] is present, then [key_set][google.spanner.v1.ReadRequest.key_set] instead names
250         // index keys in [index][google.spanner.v1.ReadRequest.index].
251         //
252         // Rows are yielded in table primary key order (if [index][google.spanner.v1.ReadRequest.index] is empty)
253         // or index key order (if [index][google.spanner.v1.ReadRequest.index] is non-empty).
254         //
255         // It is not an error for the `key_set` to name rows that do not
256         // exist in the database. Read yields nothing for nonexistent rows.
257         KeySet *KeySet `protobuf:"bytes,6,opt,name=key_set,json=keySet" json:"key_set,omitempty"`
258         // If greater than zero, only the first `limit` rows are yielded. If `limit`
259         // is zero, the default is no limit.
260         Limit int64 `protobuf:"varint,8,opt,name=limit" json:"limit,omitempty"`
261         // If this request is resuming a previously interrupted read,
262         // `resume_token` should be copied from the last
263         // [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this
264         // enables the new read to resume where the last read left off. The
265         // rest of the request parameters must exactly match the request
266         // that yielded this token.
267         ResumeToken []byte `protobuf:"bytes,9,opt,name=resume_token,json=resumeToken,proto3" json:"resume_token,omitempty"`
268 }
269
270 func (m *ReadRequest) Reset()                    { *m = ReadRequest{} }
271 func (m *ReadRequest) String() string            { return proto.CompactTextString(m) }
272 func (*ReadRequest) ProtoMessage()               {}
273 func (*ReadRequest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{5} }
274
275 func (m *ReadRequest) GetSession() string {
276         if m != nil {
277                 return m.Session
278         }
279         return ""
280 }
281
282 func (m *ReadRequest) GetTransaction() *TransactionSelector {
283         if m != nil {
284                 return m.Transaction
285         }
286         return nil
287 }
288
289 func (m *ReadRequest) GetTable() string {
290         if m != nil {
291                 return m.Table
292         }
293         return ""
294 }
295
296 func (m *ReadRequest) GetIndex() string {
297         if m != nil {
298                 return m.Index
299         }
300         return ""
301 }
302
303 func (m *ReadRequest) GetColumns() []string {
304         if m != nil {
305                 return m.Columns
306         }
307         return nil
308 }
309
310 func (m *ReadRequest) GetKeySet() *KeySet {
311         if m != nil {
312                 return m.KeySet
313         }
314         return nil
315 }
316
317 func (m *ReadRequest) GetLimit() int64 {
318         if m != nil {
319                 return m.Limit
320         }
321         return 0
322 }
323
324 func (m *ReadRequest) GetResumeToken() []byte {
325         if m != nil {
326                 return m.ResumeToken
327         }
328         return nil
329 }
330
331 // The request for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction].
332 type BeginTransactionRequest struct {
333         // Required. The session in which the transaction runs.
334         Session string `protobuf:"bytes,1,opt,name=session" json:"session,omitempty"`
335         // Required. Options for the new transaction.
336         Options *TransactionOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
337 }
338
339 func (m *BeginTransactionRequest) Reset()                    { *m = BeginTransactionRequest{} }
340 func (m *BeginTransactionRequest) String() string            { return proto.CompactTextString(m) }
341 func (*BeginTransactionRequest) ProtoMessage()               {}
342 func (*BeginTransactionRequest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{6} }
343
344 func (m *BeginTransactionRequest) GetSession() string {
345         if m != nil {
346                 return m.Session
347         }
348         return ""
349 }
350
351 func (m *BeginTransactionRequest) GetOptions() *TransactionOptions {
352         if m != nil {
353                 return m.Options
354         }
355         return nil
356 }
357
358 // The request for [Commit][google.spanner.v1.Spanner.Commit].
359 type CommitRequest struct {
360         // Required. The session in which the transaction to be committed is running.
361         Session string `protobuf:"bytes,1,opt,name=session" json:"session,omitempty"`
362         // Required. The transaction in which to commit.
363         //
364         // Types that are valid to be assigned to Transaction:
365         //      *CommitRequest_TransactionId
366         //      *CommitRequest_SingleUseTransaction
367         Transaction isCommitRequest_Transaction `protobuf_oneof:"transaction"`
368         // The mutations to be executed when this transaction commits. All
369         // mutations are applied atomically, in the order they appear in
370         // this list.
371         Mutations []*Mutation `protobuf:"bytes,4,rep,name=mutations" json:"mutations,omitempty"`
372 }
373
374 func (m *CommitRequest) Reset()                    { *m = CommitRequest{} }
375 func (m *CommitRequest) String() string            { return proto.CompactTextString(m) }
376 func (*CommitRequest) ProtoMessage()               {}
377 func (*CommitRequest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{7} }
378
379 type isCommitRequest_Transaction interface {
380         isCommitRequest_Transaction()
381 }
382
383 type CommitRequest_TransactionId struct {
384         TransactionId []byte `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3,oneof"`
385 }
386 type CommitRequest_SingleUseTransaction struct {
387         SingleUseTransaction *TransactionOptions `protobuf:"bytes,3,opt,name=single_use_transaction,json=singleUseTransaction,oneof"`
388 }
389
390 func (*CommitRequest_TransactionId) isCommitRequest_Transaction()        {}
391 func (*CommitRequest_SingleUseTransaction) isCommitRequest_Transaction() {}
392
393 func (m *CommitRequest) GetTransaction() isCommitRequest_Transaction {
394         if m != nil {
395                 return m.Transaction
396         }
397         return nil
398 }
399
400 func (m *CommitRequest) GetSession() string {
401         if m != nil {
402                 return m.Session
403         }
404         return ""
405 }
406
407 func (m *CommitRequest) GetTransactionId() []byte {
408         if x, ok := m.GetTransaction().(*CommitRequest_TransactionId); ok {
409                 return x.TransactionId
410         }
411         return nil
412 }
413
414 func (m *CommitRequest) GetSingleUseTransaction() *TransactionOptions {
415         if x, ok := m.GetTransaction().(*CommitRequest_SingleUseTransaction); ok {
416                 return x.SingleUseTransaction
417         }
418         return nil
419 }
420
421 func (m *CommitRequest) GetMutations() []*Mutation {
422         if m != nil {
423                 return m.Mutations
424         }
425         return nil
426 }
427
428 // XXX_OneofFuncs is for the internal use of the proto package.
429 func (*CommitRequest) 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{}) {
430         return _CommitRequest_OneofMarshaler, _CommitRequest_OneofUnmarshaler, _CommitRequest_OneofSizer, []interface{}{
431                 (*CommitRequest_TransactionId)(nil),
432                 (*CommitRequest_SingleUseTransaction)(nil),
433         }
434 }
435
436 func _CommitRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
437         m := msg.(*CommitRequest)
438         // transaction
439         switch x := m.Transaction.(type) {
440         case *CommitRequest_TransactionId:
441                 b.EncodeVarint(2<<3 | proto.WireBytes)
442                 b.EncodeRawBytes(x.TransactionId)
443         case *CommitRequest_SingleUseTransaction:
444                 b.EncodeVarint(3<<3 | proto.WireBytes)
445                 if err := b.EncodeMessage(x.SingleUseTransaction); err != nil {
446                         return err
447                 }
448         case nil:
449         default:
450                 return fmt.Errorf("CommitRequest.Transaction has unexpected type %T", x)
451         }
452         return nil
453 }
454
455 func _CommitRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
456         m := msg.(*CommitRequest)
457         switch tag {
458         case 2: // transaction.transaction_id
459                 if wire != proto.WireBytes {
460                         return true, proto.ErrInternalBadWireType
461                 }
462                 x, err := b.DecodeRawBytes(true)
463                 m.Transaction = &CommitRequest_TransactionId{x}
464                 return true, err
465         case 3: // transaction.single_use_transaction
466                 if wire != proto.WireBytes {
467                         return true, proto.ErrInternalBadWireType
468                 }
469                 msg := new(TransactionOptions)
470                 err := b.DecodeMessage(msg)
471                 m.Transaction = &CommitRequest_SingleUseTransaction{msg}
472                 return true, err
473         default:
474                 return false, nil
475         }
476 }
477
478 func _CommitRequest_OneofSizer(msg proto.Message) (n int) {
479         m := msg.(*CommitRequest)
480         // transaction
481         switch x := m.Transaction.(type) {
482         case *CommitRequest_TransactionId:
483                 n += proto.SizeVarint(2<<3 | proto.WireBytes)
484                 n += proto.SizeVarint(uint64(len(x.TransactionId)))
485                 n += len(x.TransactionId)
486         case *CommitRequest_SingleUseTransaction:
487                 s := proto.Size(x.SingleUseTransaction)
488                 n += proto.SizeVarint(3<<3 | proto.WireBytes)
489                 n += proto.SizeVarint(uint64(s))
490                 n += s
491         case nil:
492         default:
493                 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
494         }
495         return n
496 }
497
498 // The response for [Commit][google.spanner.v1.Spanner.Commit].
499 type CommitResponse struct {
500         // The Cloud Spanner timestamp at which the transaction committed.
501         CommitTimestamp *google_protobuf3.Timestamp `protobuf:"bytes,1,opt,name=commit_timestamp,json=commitTimestamp" json:"commit_timestamp,omitempty"`
502 }
503
504 func (m *CommitResponse) Reset()                    { *m = CommitResponse{} }
505 func (m *CommitResponse) String() string            { return proto.CompactTextString(m) }
506 func (*CommitResponse) ProtoMessage()               {}
507 func (*CommitResponse) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{8} }
508
509 func (m *CommitResponse) GetCommitTimestamp() *google_protobuf3.Timestamp {
510         if m != nil {
511                 return m.CommitTimestamp
512         }
513         return nil
514 }
515
516 // The request for [Rollback][google.spanner.v1.Spanner.Rollback].
517 type RollbackRequest struct {
518         // Required. The session in which the transaction to roll back is running.
519         Session string `protobuf:"bytes,1,opt,name=session" json:"session,omitempty"`
520         // Required. The transaction to roll back.
521         TransactionId []byte `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
522 }
523
524 func (m *RollbackRequest) Reset()                    { *m = RollbackRequest{} }
525 func (m *RollbackRequest) String() string            { return proto.CompactTextString(m) }
526 func (*RollbackRequest) ProtoMessage()               {}
527 func (*RollbackRequest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{9} }
528
529 func (m *RollbackRequest) GetSession() string {
530         if m != nil {
531                 return m.Session
532         }
533         return ""
534 }
535
536 func (m *RollbackRequest) GetTransactionId() []byte {
537         if m != nil {
538                 return m.TransactionId
539         }
540         return nil
541 }
542
543 func init() {
544         proto.RegisterType((*CreateSessionRequest)(nil), "google.spanner.v1.CreateSessionRequest")
545         proto.RegisterType((*Session)(nil), "google.spanner.v1.Session")
546         proto.RegisterType((*GetSessionRequest)(nil), "google.spanner.v1.GetSessionRequest")
547         proto.RegisterType((*DeleteSessionRequest)(nil), "google.spanner.v1.DeleteSessionRequest")
548         proto.RegisterType((*ExecuteSqlRequest)(nil), "google.spanner.v1.ExecuteSqlRequest")
549         proto.RegisterType((*ReadRequest)(nil), "google.spanner.v1.ReadRequest")
550         proto.RegisterType((*BeginTransactionRequest)(nil), "google.spanner.v1.BeginTransactionRequest")
551         proto.RegisterType((*CommitRequest)(nil), "google.spanner.v1.CommitRequest")
552         proto.RegisterType((*CommitResponse)(nil), "google.spanner.v1.CommitResponse")
553         proto.RegisterType((*RollbackRequest)(nil), "google.spanner.v1.RollbackRequest")
554         proto.RegisterEnum("google.spanner.v1.ExecuteSqlRequest_QueryMode", ExecuteSqlRequest_QueryMode_name, ExecuteSqlRequest_QueryMode_value)
555 }
556
557 // Reference imports to suppress errors if they are not otherwise used.
558 var _ context.Context
559 var _ grpc.ClientConn
560
561 // This is a compile-time assertion to ensure that this generated file
562 // is compatible with the grpc package it is being compiled against.
563 const _ = grpc.SupportPackageIsVersion4
564
565 // Client API for Spanner service
566
567 type SpannerClient interface {
568         // Creates a new session. A session can be used to perform
569         // transactions that read and/or modify data in a Cloud Spanner database.
570         // Sessions are meant to be reused for many consecutive
571         // transactions.
572         //
573         // Sessions can only execute one transaction at a time. To execute
574         // multiple concurrent read-write/write-only transactions, create
575         // multiple sessions. Note that standalone reads and queries use a
576         // transaction internally, and count toward the one transaction
577         // limit.
578         //
579         // Cloud Spanner limits the number of sessions that can exist at any given
580         // time; thus, it is a good idea to delete idle and/or unneeded sessions.
581         // Aside from explicit deletes, Cloud Spanner can delete sessions for which no
582         // operations are sent for more than an hour. If a session is deleted,
583         // requests to it return `NOT_FOUND`.
584         //
585         // Idle sessions can be kept alive by sending a trivial SQL query
586         // periodically, e.g., `"SELECT 1"`.
587         CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*Session, error)
588         // Gets a session. Returns `NOT_FOUND` if the session does not exist.
589         // This is mainly useful for determining whether a session is still
590         // alive.
591         GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*Session, error)
592         // Ends a session, releasing server resources associated with it.
593         DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*google_protobuf4.Empty, error)
594         // Executes an SQL query, returning all rows in a single reply. This
595         // method cannot be used to return a result set larger than 10 MiB;
596         // if the query yields more data than that, the query fails with
597         // a `FAILED_PRECONDITION` error.
598         //
599         // Queries inside read-write transactions might return `ABORTED`. If
600         // this occurs, the application should restart the transaction from
601         // the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
602         //
603         // Larger result sets can be fetched in streaming fashion by calling
604         // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] instead.
605         ExecuteSql(ctx context.Context, in *ExecuteSqlRequest, opts ...grpc.CallOption) (*ResultSet, error)
606         // Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the result
607         // set as a stream. Unlike [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there
608         // is no limit on the size of the returned result set. However, no
609         // individual row in the result set can exceed 100 MiB, and no
610         // column value can exceed 10 MiB.
611         ExecuteStreamingSql(ctx context.Context, in *ExecuteSqlRequest, opts ...grpc.CallOption) (Spanner_ExecuteStreamingSqlClient, error)
612         // Reads rows from the database using key lookups and scans, as a
613         // simple key/value style alternative to
614         // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql].  This method cannot be used to
615         // return a result set larger than 10 MiB; if the read matches more
616         // data than that, the read fails with a `FAILED_PRECONDITION`
617         // error.
618         //
619         // Reads inside read-write transactions might return `ABORTED`. If
620         // this occurs, the application should restart the transaction from
621         // the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
622         //
623         // Larger result sets can be yielded in streaming fashion by calling
624         // [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead.
625         Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ResultSet, error)
626         // Like [Read][google.spanner.v1.Spanner.Read], except returns the result set as a
627         // stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no limit on the
628         // size of the returned result set. However, no individual row in
629         // the result set can exceed 100 MiB, and no column value can exceed
630         // 10 MiB.
631         StreamingRead(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (Spanner_StreamingReadClient, error)
632         // Begins a new transaction. This step can often be skipped:
633         // [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
634         // [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a
635         // side-effect.
636         BeginTransaction(ctx context.Context, in *BeginTransactionRequest, opts ...grpc.CallOption) (*Transaction, error)
637         // Commits a transaction. The request includes the mutations to be
638         // applied to rows in the database.
639         //
640         // `Commit` might return an `ABORTED` error. This can occur at any time;
641         // commonly, the cause is conflicts with concurrent
642         // transactions. However, it can also happen for a variety of other
643         // reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
644         // the transaction from the beginning, re-using the same session.
645         Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*CommitResponse, error)
646         // Rolls back a transaction, releasing any locks it holds. It is a good
647         // idea to call this for any transaction that includes one or more
648         // [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and
649         // ultimately decides not to commit.
650         //
651         // `Rollback` returns `OK` if it successfully aborts the transaction, the
652         // transaction was already aborted, or the transaction is not
653         // found. `Rollback` never returns `ABORTED`.
654         Rollback(ctx context.Context, in *RollbackRequest, opts ...grpc.CallOption) (*google_protobuf4.Empty, error)
655 }
656
657 type spannerClient struct {
658         cc *grpc.ClientConn
659 }
660
661 func NewSpannerClient(cc *grpc.ClientConn) SpannerClient {
662         return &spannerClient{cc}
663 }
664
665 func (c *spannerClient) CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*Session, error) {
666         out := new(Session)
667         err := grpc.Invoke(ctx, "/google.spanner.v1.Spanner/CreateSession", in, out, c.cc, opts...)
668         if err != nil {
669                 return nil, err
670         }
671         return out, nil
672 }
673
674 func (c *spannerClient) GetSession(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*Session, error) {
675         out := new(Session)
676         err := grpc.Invoke(ctx, "/google.spanner.v1.Spanner/GetSession", in, out, c.cc, opts...)
677         if err != nil {
678                 return nil, err
679         }
680         return out, nil
681 }
682
683 func (c *spannerClient) DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*google_protobuf4.Empty, error) {
684         out := new(google_protobuf4.Empty)
685         err := grpc.Invoke(ctx, "/google.spanner.v1.Spanner/DeleteSession", in, out, c.cc, opts...)
686         if err != nil {
687                 return nil, err
688         }
689         return out, nil
690 }
691
692 func (c *spannerClient) ExecuteSql(ctx context.Context, in *ExecuteSqlRequest, opts ...grpc.CallOption) (*ResultSet, error) {
693         out := new(ResultSet)
694         err := grpc.Invoke(ctx, "/google.spanner.v1.Spanner/ExecuteSql", in, out, c.cc, opts...)
695         if err != nil {
696                 return nil, err
697         }
698         return out, nil
699 }
700
701 func (c *spannerClient) ExecuteStreamingSql(ctx context.Context, in *ExecuteSqlRequest, opts ...grpc.CallOption) (Spanner_ExecuteStreamingSqlClient, error) {
702         stream, err := grpc.NewClientStream(ctx, &_Spanner_serviceDesc.Streams[0], c.cc, "/google.spanner.v1.Spanner/ExecuteStreamingSql", opts...)
703         if err != nil {
704                 return nil, err
705         }
706         x := &spannerExecuteStreamingSqlClient{stream}
707         if err := x.ClientStream.SendMsg(in); err != nil {
708                 return nil, err
709         }
710         if err := x.ClientStream.CloseSend(); err != nil {
711                 return nil, err
712         }
713         return x, nil
714 }
715
716 type Spanner_ExecuteStreamingSqlClient interface {
717         Recv() (*PartialResultSet, error)
718         grpc.ClientStream
719 }
720
721 type spannerExecuteStreamingSqlClient struct {
722         grpc.ClientStream
723 }
724
725 func (x *spannerExecuteStreamingSqlClient) Recv() (*PartialResultSet, error) {
726         m := new(PartialResultSet)
727         if err := x.ClientStream.RecvMsg(m); err != nil {
728                 return nil, err
729         }
730         return m, nil
731 }
732
733 func (c *spannerClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ResultSet, error) {
734         out := new(ResultSet)
735         err := grpc.Invoke(ctx, "/google.spanner.v1.Spanner/Read", in, out, c.cc, opts...)
736         if err != nil {
737                 return nil, err
738         }
739         return out, nil
740 }
741
742 func (c *spannerClient) StreamingRead(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (Spanner_StreamingReadClient, error) {
743         stream, err := grpc.NewClientStream(ctx, &_Spanner_serviceDesc.Streams[1], c.cc, "/google.spanner.v1.Spanner/StreamingRead", opts...)
744         if err != nil {
745                 return nil, err
746         }
747         x := &spannerStreamingReadClient{stream}
748         if err := x.ClientStream.SendMsg(in); err != nil {
749                 return nil, err
750         }
751         if err := x.ClientStream.CloseSend(); err != nil {
752                 return nil, err
753         }
754         return x, nil
755 }
756
757 type Spanner_StreamingReadClient interface {
758         Recv() (*PartialResultSet, error)
759         grpc.ClientStream
760 }
761
762 type spannerStreamingReadClient struct {
763         grpc.ClientStream
764 }
765
766 func (x *spannerStreamingReadClient) Recv() (*PartialResultSet, error) {
767         m := new(PartialResultSet)
768         if err := x.ClientStream.RecvMsg(m); err != nil {
769                 return nil, err
770         }
771         return m, nil
772 }
773
774 func (c *spannerClient) BeginTransaction(ctx context.Context, in *BeginTransactionRequest, opts ...grpc.CallOption) (*Transaction, error) {
775         out := new(Transaction)
776         err := grpc.Invoke(ctx, "/google.spanner.v1.Spanner/BeginTransaction", in, out, c.cc, opts...)
777         if err != nil {
778                 return nil, err
779         }
780         return out, nil
781 }
782
783 func (c *spannerClient) Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*CommitResponse, error) {
784         out := new(CommitResponse)
785         err := grpc.Invoke(ctx, "/google.spanner.v1.Spanner/Commit", in, out, c.cc, opts...)
786         if err != nil {
787                 return nil, err
788         }
789         return out, nil
790 }
791
792 func (c *spannerClient) Rollback(ctx context.Context, in *RollbackRequest, opts ...grpc.CallOption) (*google_protobuf4.Empty, error) {
793         out := new(google_protobuf4.Empty)
794         err := grpc.Invoke(ctx, "/google.spanner.v1.Spanner/Rollback", in, out, c.cc, opts...)
795         if err != nil {
796                 return nil, err
797         }
798         return out, nil
799 }
800
801 // Server API for Spanner service
802
803 type SpannerServer interface {
804         // Creates a new session. A session can be used to perform
805         // transactions that read and/or modify data in a Cloud Spanner database.
806         // Sessions are meant to be reused for many consecutive
807         // transactions.
808         //
809         // Sessions can only execute one transaction at a time. To execute
810         // multiple concurrent read-write/write-only transactions, create
811         // multiple sessions. Note that standalone reads and queries use a
812         // transaction internally, and count toward the one transaction
813         // limit.
814         //
815         // Cloud Spanner limits the number of sessions that can exist at any given
816         // time; thus, it is a good idea to delete idle and/or unneeded sessions.
817         // Aside from explicit deletes, Cloud Spanner can delete sessions for which no
818         // operations are sent for more than an hour. If a session is deleted,
819         // requests to it return `NOT_FOUND`.
820         //
821         // Idle sessions can be kept alive by sending a trivial SQL query
822         // periodically, e.g., `"SELECT 1"`.
823         CreateSession(context.Context, *CreateSessionRequest) (*Session, error)
824         // Gets a session. Returns `NOT_FOUND` if the session does not exist.
825         // This is mainly useful for determining whether a session is still
826         // alive.
827         GetSession(context.Context, *GetSessionRequest) (*Session, error)
828         // Ends a session, releasing server resources associated with it.
829         DeleteSession(context.Context, *DeleteSessionRequest) (*google_protobuf4.Empty, error)
830         // Executes an SQL query, returning all rows in a single reply. This
831         // method cannot be used to return a result set larger than 10 MiB;
832         // if the query yields more data than that, the query fails with
833         // a `FAILED_PRECONDITION` error.
834         //
835         // Queries inside read-write transactions might return `ABORTED`. If
836         // this occurs, the application should restart the transaction from
837         // the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
838         //
839         // Larger result sets can be fetched in streaming fashion by calling
840         // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] instead.
841         ExecuteSql(context.Context, *ExecuteSqlRequest) (*ResultSet, error)
842         // Like [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], except returns the result
843         // set as a stream. Unlike [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there
844         // is no limit on the size of the returned result set. However, no
845         // individual row in the result set can exceed 100 MiB, and no
846         // column value can exceed 10 MiB.
847         ExecuteStreamingSql(*ExecuteSqlRequest, Spanner_ExecuteStreamingSqlServer) error
848         // Reads rows from the database using key lookups and scans, as a
849         // simple key/value style alternative to
850         // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql].  This method cannot be used to
851         // return a result set larger than 10 MiB; if the read matches more
852         // data than that, the read fails with a `FAILED_PRECONDITION`
853         // error.
854         //
855         // Reads inside read-write transactions might return `ABORTED`. If
856         // this occurs, the application should restart the transaction from
857         // the beginning. See [Transaction][google.spanner.v1.Transaction] for more details.
858         //
859         // Larger result sets can be yielded in streaming fashion by calling
860         // [StreamingRead][google.spanner.v1.Spanner.StreamingRead] instead.
861         Read(context.Context, *ReadRequest) (*ResultSet, error)
862         // Like [Read][google.spanner.v1.Spanner.Read], except returns the result set as a
863         // stream. Unlike [Read][google.spanner.v1.Spanner.Read], there is no limit on the
864         // size of the returned result set. However, no individual row in
865         // the result set can exceed 100 MiB, and no column value can exceed
866         // 10 MiB.
867         StreamingRead(*ReadRequest, Spanner_StreamingReadServer) error
868         // Begins a new transaction. This step can often be skipped:
869         // [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
870         // [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a
871         // side-effect.
872         BeginTransaction(context.Context, *BeginTransactionRequest) (*Transaction, error)
873         // Commits a transaction. The request includes the mutations to be
874         // applied to rows in the database.
875         //
876         // `Commit` might return an `ABORTED` error. This can occur at any time;
877         // commonly, the cause is conflicts with concurrent
878         // transactions. However, it can also happen for a variety of other
879         // reasons. If `Commit` returns `ABORTED`, the caller should re-attempt
880         // the transaction from the beginning, re-using the same session.
881         Commit(context.Context, *CommitRequest) (*CommitResponse, error)
882         // Rolls back a transaction, releasing any locks it holds. It is a good
883         // idea to call this for any transaction that includes one or more
884         // [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and
885         // ultimately decides not to commit.
886         //
887         // `Rollback` returns `OK` if it successfully aborts the transaction, the
888         // transaction was already aborted, or the transaction is not
889         // found. `Rollback` never returns `ABORTED`.
890         Rollback(context.Context, *RollbackRequest) (*google_protobuf4.Empty, error)
891 }
892
893 func RegisterSpannerServer(s *grpc.Server, srv SpannerServer) {
894         s.RegisterService(&_Spanner_serviceDesc, srv)
895 }
896
897 func _Spanner_CreateSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
898         in := new(CreateSessionRequest)
899         if err := dec(in); err != nil {
900                 return nil, err
901         }
902         if interceptor == nil {
903                 return srv.(SpannerServer).CreateSession(ctx, in)
904         }
905         info := &grpc.UnaryServerInfo{
906                 Server:     srv,
907                 FullMethod: "/google.spanner.v1.Spanner/CreateSession",
908         }
909         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
910                 return srv.(SpannerServer).CreateSession(ctx, req.(*CreateSessionRequest))
911         }
912         return interceptor(ctx, in, info, handler)
913 }
914
915 func _Spanner_GetSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
916         in := new(GetSessionRequest)
917         if err := dec(in); err != nil {
918                 return nil, err
919         }
920         if interceptor == nil {
921                 return srv.(SpannerServer).GetSession(ctx, in)
922         }
923         info := &grpc.UnaryServerInfo{
924                 Server:     srv,
925                 FullMethod: "/google.spanner.v1.Spanner/GetSession",
926         }
927         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
928                 return srv.(SpannerServer).GetSession(ctx, req.(*GetSessionRequest))
929         }
930         return interceptor(ctx, in, info, handler)
931 }
932
933 func _Spanner_DeleteSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
934         in := new(DeleteSessionRequest)
935         if err := dec(in); err != nil {
936                 return nil, err
937         }
938         if interceptor == nil {
939                 return srv.(SpannerServer).DeleteSession(ctx, in)
940         }
941         info := &grpc.UnaryServerInfo{
942                 Server:     srv,
943                 FullMethod: "/google.spanner.v1.Spanner/DeleteSession",
944         }
945         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
946                 return srv.(SpannerServer).DeleteSession(ctx, req.(*DeleteSessionRequest))
947         }
948         return interceptor(ctx, in, info, handler)
949 }
950
951 func _Spanner_ExecuteSql_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
952         in := new(ExecuteSqlRequest)
953         if err := dec(in); err != nil {
954                 return nil, err
955         }
956         if interceptor == nil {
957                 return srv.(SpannerServer).ExecuteSql(ctx, in)
958         }
959         info := &grpc.UnaryServerInfo{
960                 Server:     srv,
961                 FullMethod: "/google.spanner.v1.Spanner/ExecuteSql",
962         }
963         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
964                 return srv.(SpannerServer).ExecuteSql(ctx, req.(*ExecuteSqlRequest))
965         }
966         return interceptor(ctx, in, info, handler)
967 }
968
969 func _Spanner_ExecuteStreamingSql_Handler(srv interface{}, stream grpc.ServerStream) error {
970         m := new(ExecuteSqlRequest)
971         if err := stream.RecvMsg(m); err != nil {
972                 return err
973         }
974         return srv.(SpannerServer).ExecuteStreamingSql(m, &spannerExecuteStreamingSqlServer{stream})
975 }
976
977 type Spanner_ExecuteStreamingSqlServer interface {
978         Send(*PartialResultSet) error
979         grpc.ServerStream
980 }
981
982 type spannerExecuteStreamingSqlServer struct {
983         grpc.ServerStream
984 }
985
986 func (x *spannerExecuteStreamingSqlServer) Send(m *PartialResultSet) error {
987         return x.ServerStream.SendMsg(m)
988 }
989
990 func _Spanner_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
991         in := new(ReadRequest)
992         if err := dec(in); err != nil {
993                 return nil, err
994         }
995         if interceptor == nil {
996                 return srv.(SpannerServer).Read(ctx, in)
997         }
998         info := &grpc.UnaryServerInfo{
999                 Server:     srv,
1000                 FullMethod: "/google.spanner.v1.Spanner/Read",
1001         }
1002         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1003                 return srv.(SpannerServer).Read(ctx, req.(*ReadRequest))
1004         }
1005         return interceptor(ctx, in, info, handler)
1006 }
1007
1008 func _Spanner_StreamingRead_Handler(srv interface{}, stream grpc.ServerStream) error {
1009         m := new(ReadRequest)
1010         if err := stream.RecvMsg(m); err != nil {
1011                 return err
1012         }
1013         return srv.(SpannerServer).StreamingRead(m, &spannerStreamingReadServer{stream})
1014 }
1015
1016 type Spanner_StreamingReadServer interface {
1017         Send(*PartialResultSet) error
1018         grpc.ServerStream
1019 }
1020
1021 type spannerStreamingReadServer struct {
1022         grpc.ServerStream
1023 }
1024
1025 func (x *spannerStreamingReadServer) Send(m *PartialResultSet) error {
1026         return x.ServerStream.SendMsg(m)
1027 }
1028
1029 func _Spanner_BeginTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1030         in := new(BeginTransactionRequest)
1031         if err := dec(in); err != nil {
1032                 return nil, err
1033         }
1034         if interceptor == nil {
1035                 return srv.(SpannerServer).BeginTransaction(ctx, in)
1036         }
1037         info := &grpc.UnaryServerInfo{
1038                 Server:     srv,
1039                 FullMethod: "/google.spanner.v1.Spanner/BeginTransaction",
1040         }
1041         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1042                 return srv.(SpannerServer).BeginTransaction(ctx, req.(*BeginTransactionRequest))
1043         }
1044         return interceptor(ctx, in, info, handler)
1045 }
1046
1047 func _Spanner_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1048         in := new(CommitRequest)
1049         if err := dec(in); err != nil {
1050                 return nil, err
1051         }
1052         if interceptor == nil {
1053                 return srv.(SpannerServer).Commit(ctx, in)
1054         }
1055         info := &grpc.UnaryServerInfo{
1056                 Server:     srv,
1057                 FullMethod: "/google.spanner.v1.Spanner/Commit",
1058         }
1059         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1060                 return srv.(SpannerServer).Commit(ctx, req.(*CommitRequest))
1061         }
1062         return interceptor(ctx, in, info, handler)
1063 }
1064
1065 func _Spanner_Rollback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1066         in := new(RollbackRequest)
1067         if err := dec(in); err != nil {
1068                 return nil, err
1069         }
1070         if interceptor == nil {
1071                 return srv.(SpannerServer).Rollback(ctx, in)
1072         }
1073         info := &grpc.UnaryServerInfo{
1074                 Server:     srv,
1075                 FullMethod: "/google.spanner.v1.Spanner/Rollback",
1076         }
1077         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1078                 return srv.(SpannerServer).Rollback(ctx, req.(*RollbackRequest))
1079         }
1080         return interceptor(ctx, in, info, handler)
1081 }
1082
1083 var _Spanner_serviceDesc = grpc.ServiceDesc{
1084         ServiceName: "google.spanner.v1.Spanner",
1085         HandlerType: (*SpannerServer)(nil),
1086         Methods: []grpc.MethodDesc{
1087                 {
1088                         MethodName: "CreateSession",
1089                         Handler:    _Spanner_CreateSession_Handler,
1090                 },
1091                 {
1092                         MethodName: "GetSession",
1093                         Handler:    _Spanner_GetSession_Handler,
1094                 },
1095                 {
1096                         MethodName: "DeleteSession",
1097                         Handler:    _Spanner_DeleteSession_Handler,
1098                 },
1099                 {
1100                         MethodName: "ExecuteSql",
1101                         Handler:    _Spanner_ExecuteSql_Handler,
1102                 },
1103                 {
1104                         MethodName: "Read",
1105                         Handler:    _Spanner_Read_Handler,
1106                 },
1107                 {
1108                         MethodName: "BeginTransaction",
1109                         Handler:    _Spanner_BeginTransaction_Handler,
1110                 },
1111                 {
1112                         MethodName: "Commit",
1113                         Handler:    _Spanner_Commit_Handler,
1114                 },
1115                 {
1116                         MethodName: "Rollback",
1117                         Handler:    _Spanner_Rollback_Handler,
1118                 },
1119         },
1120         Streams: []grpc.StreamDesc{
1121                 {
1122                         StreamName:    "ExecuteStreamingSql",
1123                         Handler:       _Spanner_ExecuteStreamingSql_Handler,
1124                         ServerStreams: true,
1125                 },
1126                 {
1127                         StreamName:    "StreamingRead",
1128                         Handler:       _Spanner_StreamingRead_Handler,
1129                         ServerStreams: true,
1130                 },
1131         },
1132         Metadata: "google/spanner/v1/spanner.proto",
1133 }
1134
1135 func init() { proto.RegisterFile("google/spanner/v1/spanner.proto", fileDescriptor4) }
1136
1137 var fileDescriptor4 = []byte{
1138         // 1202 bytes of a gzipped FileDescriptorProto
1139         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0xcd, 0x6f, 0x1b, 0xc5,
1140         0x1b, 0xc7, 0xbb, 0x4e, 0x6a, 0xc7, 0x8f, 0x93, 0xd6, 0x9d, 0x5f, 0xda, 0xf8, 0xe7, 0x96, 0xd6,
1141         0xdd, 0x52, 0x6a, 0x59, 0xc2, 0x4b, 0x0d, 0x87, 0x62, 0x40, 0xb4, 0x6e, 0xdd, 0x36, 0x6a, 0x5e,
1142         0x9c, 0xb5, 0xdb, 0x4a, 0x95, 0x90, 0x35, 0xb6, 0x1f, 0xcc, 0xe2, 0x7d, 0xcb, 0xce, 0x6c, 0x54,
1143         0xab, 0xea, 0x85, 0x2b, 0x17, 0x5e, 0x0e, 0x70, 0xe0, 0x06, 0x27, 0xc4, 0x9d, 0x1b, 0xff, 0x04,
1144         0xff, 0x02, 0x17, 0xfe, 0x06, 0x2e, 0x68, 0x66, 0x77, 0x9d, 0x8d, 0x77, 0x9b, 0xa4, 0x04, 0x71,
1145         0xca, 0xbc, 0x7c, 0x9f, 0x79, 0x3e, 0xf3, 0x9d, 0xd9, 0x79, 0x1c, 0xb8, 0x32, 0x76, 0x9c, 0xb1,
1146         0x89, 0x1a, 0x73, 0xa9, 0x6d, 0xa3, 0xa7, 0xed, 0xdd, 0x8c, 0x9a, 0x75, 0xd7, 0x73, 0xb8, 0x43,
1147         0xce, 0x05, 0x82, 0x7a, 0x34, 0xba, 0x77, 0xb3, 0x7c, 0x29, 0x8c, 0xa1, 0xae, 0xa1, 0x51, 0xdb,
1148         0x76, 0x38, 0xe5, 0x86, 0x63, 0xb3, 0x20, 0xa0, 0x7c, 0x3e, 0x3e, 0xeb, 0xf3, 0xcf, 0xc2, 0xe1,
1149         0x8b, 0xe1, 0xb0, 0xec, 0x0d, 0xfc, 0x4f, 0x35, 0xb4, 0x5c, 0x3e, 0x0d, 0x27, 0x2f, 0xcd, 0x4f,
1150         0x32, 0xee, 0xf9, 0x43, 0x1e, 0xce, 0x5e, 0x99, 0x9f, 0xe5, 0x86, 0x85, 0x8c, 0x53, 0xcb, 0x9d,
1151         0x0b, 0x8f, 0x6d, 0x62, 0x82, 0xd3, 0x08, 0xa8, 0x92, 0x9c, 0xb5, 0xfc, 0x80, 0x39, 0x54, 0xa8,
1152         0x49, 0x85, 0x87, 0xcc, 0x37, 0x79, 0x9f, 0x61, 0x04, 0x71, 0x2d, 0xa9, 0xe1, 0x1e, 0xb5, 0x19,
1153         0x1d, 0xc6, 0x16, 0x4a, 0x01, 0xe1, 0x53, 0x17, 0x83, 0x59, 0xb5, 0x01, 0xab, 0x77, 0x3d, 0xa4,
1154         0x1c, 0xbb, 0xc8, 0x98, 0xe1, 0xd8, 0x3a, 0xee, 0xfa, 0xc8, 0x38, 0x29, 0xc3, 0xd2, 0x88, 0x72,
1155         0x3a, 0xa0, 0x0c, 0x4b, 0x4a, 0x45, 0xa9, 0xe6, 0xf5, 0x59, 0x5f, 0x7d, 0x03, 0x72, 0xa1, 0x9a,
1156         0x10, 0x58, 0xb4, 0xa9, 0x15, 0x49, 0x64, 0x5b, 0xbd, 0x01, 0xe7, 0x1e, 0x20, 0x9f, 0x5b, 0x2f,
1157         0x4d, 0x58, 0x83, 0xd5, 0x7b, 0x68, 0x62, 0x22, 0x77, 0x9a, 0xf6, 0xcb, 0x45, 0x38, 0xd7, 0x7e,
1158         0x8e, 0x43, 0x9f, 0x63, 0x77, 0xd7, 0x8c, 0x94, 0x25, 0xc8, 0xb1, 0x20, 0x36, 0x14, 0x47, 0x5d,
1159         0xf2, 0x10, 0x0a, 0x31, 0x2b, 0x4a, 0x99, 0x8a, 0x52, 0x2d, 0x34, 0xde, 0xaa, 0x27, 0x2e, 0x4e,
1160         0xbd, 0xb7, 0xaf, 0xea, 0xa2, 0x89, 0x43, 0xee, 0x78, 0x7a, 0x3c, 0x94, 0x14, 0x61, 0x81, 0xed,
1161         0x9a, 0xa5, 0x05, 0xb9, 0xbe, 0x68, 0x12, 0x0d, 0xb2, 0x2e, 0xf5, 0xa8, 0xc5, 0x4a, 0x8b, 0x72,
1162         0xd9, 0xb5, 0x68, 0xd9, 0xe8, 0x32, 0xd4, 0xbb, 0xf2, 0xaa, 0xe8, 0xa1, 0x8c, 0x3c, 0x86, 0x82,
1163         0x6c, 0xf5, 0x85, 0xf1, 0xac, 0x74, 0xba, 0xb2, 0x50, 0x2d, 0x34, 0xde, 0x4b, 0x81, 0x49, 0xec,
1164         0xb0, 0xde, 0x11, 0x71, 0x3d, 0x11, 0xd6, 0xb6, 0xb9, 0x37, 0xd5, 0xc1, 0x9d, 0x0d, 0x90, 0xab,
1165         0xb0, 0x2c, 0xae, 0x84, 0x85, 0x7d, 0xee, 0x4c, 0xd0, 0x2e, 0x65, 0x2b, 0x4a, 0x75, 0x59, 0x2f,
1166         0x04, 0x63, 0x3d, 0x31, 0x44, 0x36, 0x01, 0x76, 0x7d, 0xf4, 0xa6, 0x7d, 0xcb, 0x19, 0x61, 0x29,
1167         0x57, 0x51, 0xaa, 0x67, 0x1a, 0xf5, 0x63, 0x25, 0xde, 0x11, 0x61, 0x9b, 0xce, 0x08, 0xf5, 0xfc,
1168         0x6e, 0xd4, 0x2c, 0x3f, 0x81, 0xb3, 0x73, 0x40, 0xc2, 0x9e, 0x09, 0x4e, 0x43, 0xfb, 0x45, 0x93,
1169         0xbc, 0x0d, 0xa7, 0xf7, 0xa8, 0xe9, 0x63, 0x68, 0xfa, 0x5a, 0x9a, 0xe9, 0x53, 0x17, 0xf5, 0x40,
1170         0xd5, 0xcc, 0xdc, 0x52, 0xd4, 0x3a, 0xe4, 0x67, 0xf9, 0x08, 0x40, 0x76, 0x6b, 0x5b, 0xdf, 0xbc,
1171         0xb3, 0x51, 0x3c, 0x45, 0x96, 0x60, 0xb1, 0xb3, 0x71, 0x67, 0xab, 0xa8, 0x90, 0x02, 0xe4, 0x3a,
1172         0xfa, 0xf6, 0xfd, 0xf5, 0x8d, 0x76, 0x31, 0xa3, 0xfe, 0x94, 0x81, 0x82, 0x8e, 0x74, 0xf4, 0x5f,
1173         0xde, 0x83, 0x55, 0x38, 0xcd, 0xe9, 0xc0, 0xc4, 0xf0, 0x26, 0x04, 0x1d, 0x31, 0x6a, 0xd8, 0x23,
1174         0x7c, 0x2e, 0xaf, 0x42, 0x5e, 0x0f, 0x3a, 0x82, 0x67, 0xe8, 0x98, 0xbe, 0x65, 0x07, 0x87, 0x9d,
1175         0xd7, 0xa3, 0x2e, 0x69, 0x40, 0x6e, 0x82, 0x53, 0xf1, 0x0d, 0xcb, 0xe3, 0x2a, 0x34, 0xfe, 0x9f,
1176         0xc2, 0xf2, 0x08, 0xa7, 0x5d, 0xe4, 0x7a, 0x76, 0x22, 0xff, 0x8a, 0x1c, 0xa6, 0x61, 0x19, 0xbc,
1177         0xb4, 0x54, 0x51, 0xaa, 0x0b, 0x7a, 0xd0, 0x49, 0x9c, 0x7e, 0x3e, 0x71, 0xfa, 0x2a, 0x87, 0xb5,
1178         0x16, 0x8e, 0x0d, 0x3b, 0xb6, 0xb7, 0xa3, 0x1d, 0xfb, 0x18, 0x72, 0x8e, 0x2b, 0x1f, 0xcf, 0xd0,
1179         0xad, 0xeb, 0x87, 0xbb, 0xb5, 0x1d, 0x88, 0xf5, 0x28, 0x4a, 0xfd, 0x4b, 0x81, 0x95, 0xbb, 0x8e,
1180         0x65, 0x19, 0xfc, 0xe8, 0x64, 0x37, 0xe0, 0x4c, 0xcc, 0xe3, 0xbe, 0x31, 0x92, 0x39, 0x97, 0x1f,
1181         0x9e, 0xd2, 0x57, 0x62, 0xe3, 0xeb, 0x23, 0xf2, 0x09, 0x5c, 0x60, 0x86, 0x3d, 0x36, 0xb1, 0xef,
1182         0x33, 0xec, 0xc7, 0x8f, 0x74, 0xe1, 0x35, 0x20, 0x1f, 0x9e, 0xd2, 0x57, 0x83, 0x65, 0x1e, 0x33,
1183         0x8c, 0x4d, 0x93, 0xf7, 0x21, 0x1f, 0xbd, 0xbf, 0xe2, 0xab, 0x16, 0xdf, 0xe7, 0xc5, 0x94, 0x15,
1184         0x37, 0x43, 0x8d, 0xbe, 0xaf, 0x6e, 0xad, 0x1c, 0xb8, 0x61, 0xea, 0x53, 0x38, 0x13, 0x6d, 0x9e,
1185         0xb9, 0x8e, 0xcd, 0x90, 0xb4, 0xa1, 0x38, 0x94, 0x23, 0xfd, 0x59, 0x8d, 0x90, 0x36, 0x14, 0x1a,
1186         0xe5, 0xc4, 0xc3, 0xd1, 0x8b, 0x14, 0xfa, 0xd9, 0x20, 0x66, 0x36, 0xa0, 0xea, 0x70, 0x56, 0x77,
1187         0x4c, 0x73, 0x40, 0x87, 0x93, 0xa3, 0x7d, 0xbd, 0x9e, 0xee, 0xeb, 0x9c, 0xab, 0x8d, 0x3f, 0x97,
1188         0x21, 0xd7, 0x0d, 0xb6, 0x47, 0xbe, 0x17, 0xc7, 0x16, 0x2f, 0x05, 0xe4, 0x46, 0x8a, 0x03, 0x69,
1189         0xc5, 0xa2, 0x5c, 0x4e, 0x11, 0x86, 0x12, 0xb5, 0xf5, 0xc5, 0xef, 0x7f, 0x7c, 0x9b, 0xf9, 0x50,
1190         0x6d, 0x8a, 0xc2, 0xf3, 0x22, 0xaa, 0x21, 0x1f, 0xb9, 0x9e, 0xf3, 0x39, 0x0e, 0x39, 0xd3, 0x6a,
1191         0x9a, 0x61, 0x33, 0x4e, 0xed, 0x21, 0x8a, 0x76, 0x34, 0xcf, 0xb4, 0xda, 0x4b, 0x2d, 0xdc, 0x0c,
1192         0x23, 0x5f, 0x29, 0x00, 0xfb, 0x25, 0x85, 0xbc, 0x99, 0x92, 0x2e, 0x51, 0x71, 0x0e, 0x85, 0xba,
1193         0x2d, 0xa1, 0x9a, 0xe4, 0x96, 0x84, 0x12, 0x05, 0xe6, 0x18, 0x40, 0x33, 0x1e, 0xad, 0xf6, 0x92,
1194         0x7c, 0xa3, 0xc0, 0xca, 0x81, 0xe2, 0x95, 0xea, 0x56, 0x5a, 0x79, 0x2b, 0x5f, 0x48, 0x9c, 0x7a,
1195         0x5b, 0xfc, 0xec, 0x88, 0xa0, 0x6a, 0xff, 0x1c, 0xea, 0x47, 0x05, 0x60, 0xff, 0x25, 0x4f, 0xf5,
1196         0x29, 0xf1, 0xd0, 0x97, 0x2f, 0xa5, 0xa8, 0x74, 0xf9, 0x4b, 0xa3, 0x8b, 0x5c, 0xdd, 0x91, 0x50,
1197         0x8f, 0xd4, 0xfb, 0x12, 0x2a, 0x4c, 0xf6, 0x9a, 0x5c, 0x4d, 0x9c, 0x25, 0x6d, 0x2a, 0x35, 0xf2,
1198         0x9b, 0x02, 0xff, 0x8b, 0x30, 0xb8, 0x87, 0xd4, 0x32, 0xec, 0xf1, 0xf1, 0x71, 0xaf, 0xa5, 0xa8,
1199         0x3a, 0xd4, 0xe3, 0x06, 0x35, 0xf7, 0xa9, 0x9f, 0x49, 0xea, 0x9e, 0xba, 0xfd, 0x6f, 0x50, 0xc7,
1200         0x18, 0x9b, 0x4a, 0xed, 0x1d, 0x85, 0x7c, 0xad, 0xc0, 0xa2, 0xa8, 0x3e, 0xe4, 0x72, 0xaa, 0x75,
1201         0xb3, 0xb2, 0x74, 0x84, 0xb5, 0x8f, 0x24, 0x64, 0x5b, 0xbd, 0x7d, 0x12, 0x48, 0x0f, 0xe9, 0x48,
1202         0x98, 0xfa, 0x8b, 0x02, 0x2b, 0x33, 0xd2, 0x63, 0xc1, 0x1d, 0xcb, 0xc8, 0x9e, 0x64, 0xdc, 0x52,
1203         0xd7, 0x4f, 0xc2, 0xc8, 0xe2, 0x5c, 0x81, 0x85, 0xbf, 0x2a, 0x50, 0x9c, 0x2f, 0x4d, 0xa4, 0x96,
1204         0x42, 0xf4, 0x8a, 0xfa, 0x55, 0xbe, 0x7c, 0xf8, 0x7b, 0xaf, 0x3e, 0x95, 0xe0, 0x3b, 0xea, 0xc6,
1205         0x49, 0xc0, 0x07, 0x73, 0xc9, 0x85, 0xd1, 0x3f, 0x28, 0x90, 0x0d, 0x1e, 0x78, 0x52, 0x49, 0x7b,
1206         0x1f, 0xe3, 0x85, 0xaf, 0x7c, 0xf5, 0x10, 0x45, 0x50, 0x1d, 0xd4, 0x4d, 0x09, 0xfa, 0x40, 0x6d,
1207         0x9d, 0x04, 0x34, 0xa8, 0x15, 0x02, 0xef, 0x3b, 0x05, 0x96, 0xa2, 0x32, 0x41, 0xd4, 0xb4, 0x2b,
1208         0x70, 0xb0, 0x86, 0xbc, 0xf2, 0x35, 0xda, 0x96, 0x5c, 0xeb, 0xea, 0xbd, 0x13, 0xdd, 0xce, 0x30,
1209         0x59, 0x53, 0xa9, 0xb5, 0x5e, 0xc0, 0xf9, 0xa1, 0x63, 0x25, 0x89, 0x5a, 0xcb, 0x61, 0x05, 0xea,
1210         0x08, 0x80, 0x8e, 0xf2, 0xec, 0x56, 0x28, 0x19, 0x3b, 0x26, 0xb5, 0xc7, 0x75, 0xc7, 0x1b, 0x6b,
1211         0x63, 0xb4, 0x25, 0x9e, 0x16, 0x4c, 0x51, 0xd7, 0x60, 0xb1, 0xff, 0x67, 0x3e, 0x08, 0x9b, 0x3f,
1212         0x67, 0xd6, 0x1e, 0x04, 0xa1, 0x77, 0x4d, 0xc7, 0x1f, 0xd5, 0xc3, 0x75, 0xeb, 0x4f, 0x6e, 0x0e,
1213         0xb2, 0x32, 0xfc, 0xdd, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x21, 0x25, 0x65, 0x5b, 0x0e,
1214         0x00, 0x00,
1215 }