-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
spanner.pb.go
executable file
·5107 lines (4682 loc) · 228 KB
/
spanner.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc v4.25.3
// source: google/spanner/v1/spanner.proto
package spannerpb
import (
context "context"
reflect "reflect"
sync "sync"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status1 "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
emptypb "google.golang.org/protobuf/types/known/emptypb"
structpb "google.golang.org/protobuf/types/known/structpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// The relative priority for requests. Note that priority is not applicable
// for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction].
//
// The priority acts as a hint to the Cloud Spanner scheduler and does not
// guarantee priority or order of execution. For example:
//
// - Some parts of a write operation always execute at `PRIORITY_HIGH`,
// regardless of the specified priority. This may cause you to see an
// increase in high priority workload even when executing a low priority
// request. This can also potentially cause a priority inversion where a
// lower priority request will be fulfilled ahead of a higher priority
// request.
// - If a transaction contains multiple operations with different priorities,
// Cloud Spanner does not guarantee to process the higher priority
// operations first. There may be other constraints to satisfy, such as
// order of operations.
type RequestOptions_Priority int32
const (
// `PRIORITY_UNSPECIFIED` is equivalent to `PRIORITY_HIGH`.
RequestOptions_PRIORITY_UNSPECIFIED RequestOptions_Priority = 0
// This specifies that the request is low priority.
RequestOptions_PRIORITY_LOW RequestOptions_Priority = 1
// This specifies that the request is medium priority.
RequestOptions_PRIORITY_MEDIUM RequestOptions_Priority = 2
// This specifies that the request is high priority.
RequestOptions_PRIORITY_HIGH RequestOptions_Priority = 3
)
// Enum value maps for RequestOptions_Priority.
var (
RequestOptions_Priority_name = map[int32]string{
0: "PRIORITY_UNSPECIFIED",
1: "PRIORITY_LOW",
2: "PRIORITY_MEDIUM",
3: "PRIORITY_HIGH",
}
RequestOptions_Priority_value = map[string]int32{
"PRIORITY_UNSPECIFIED": 0,
"PRIORITY_LOW": 1,
"PRIORITY_MEDIUM": 2,
"PRIORITY_HIGH": 3,
}
)
func (x RequestOptions_Priority) Enum() *RequestOptions_Priority {
p := new(RequestOptions_Priority)
*p = x
return p
}
func (x RequestOptions_Priority) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (RequestOptions_Priority) Descriptor() protoreflect.EnumDescriptor {
return file_google_spanner_v1_spanner_proto_enumTypes[0].Descriptor()
}
func (RequestOptions_Priority) Type() protoreflect.EnumType {
return &file_google_spanner_v1_spanner_proto_enumTypes[0]
}
func (x RequestOptions_Priority) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use RequestOptions_Priority.Descriptor instead.
func (RequestOptions_Priority) EnumDescriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{8, 0}
}
// Indicates the type of replica.
type DirectedReadOptions_ReplicaSelection_Type int32
const (
// Not specified.
DirectedReadOptions_ReplicaSelection_TYPE_UNSPECIFIED DirectedReadOptions_ReplicaSelection_Type = 0
// Read-write replicas support both reads and writes.
DirectedReadOptions_ReplicaSelection_READ_WRITE DirectedReadOptions_ReplicaSelection_Type = 1
// Read-only replicas only support reads (not writes).
DirectedReadOptions_ReplicaSelection_READ_ONLY DirectedReadOptions_ReplicaSelection_Type = 2
)
// Enum value maps for DirectedReadOptions_ReplicaSelection_Type.
var (
DirectedReadOptions_ReplicaSelection_Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "READ_WRITE",
2: "READ_ONLY",
}
DirectedReadOptions_ReplicaSelection_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"READ_WRITE": 1,
"READ_ONLY": 2,
}
)
func (x DirectedReadOptions_ReplicaSelection_Type) Enum() *DirectedReadOptions_ReplicaSelection_Type {
p := new(DirectedReadOptions_ReplicaSelection_Type)
*p = x
return p
}
func (x DirectedReadOptions_ReplicaSelection_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DirectedReadOptions_ReplicaSelection_Type) Descriptor() protoreflect.EnumDescriptor {
return file_google_spanner_v1_spanner_proto_enumTypes[1].Descriptor()
}
func (DirectedReadOptions_ReplicaSelection_Type) Type() protoreflect.EnumType {
return &file_google_spanner_v1_spanner_proto_enumTypes[1]
}
func (x DirectedReadOptions_ReplicaSelection_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use DirectedReadOptions_ReplicaSelection_Type.Descriptor instead.
func (DirectedReadOptions_ReplicaSelection_Type) EnumDescriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{9, 0, 0}
}
// Mode in which the statement must be processed.
type ExecuteSqlRequest_QueryMode int32
const (
// The default mode. Only the statement results are returned.
ExecuteSqlRequest_NORMAL ExecuteSqlRequest_QueryMode = 0
// This mode returns only the query plan, without any results or
// execution statistics information.
ExecuteSqlRequest_PLAN ExecuteSqlRequest_QueryMode = 1
// This mode returns both the query plan and the execution statistics along
// with the results.
ExecuteSqlRequest_PROFILE ExecuteSqlRequest_QueryMode = 2
)
// Enum value maps for ExecuteSqlRequest_QueryMode.
var (
ExecuteSqlRequest_QueryMode_name = map[int32]string{
0: "NORMAL",
1: "PLAN",
2: "PROFILE",
}
ExecuteSqlRequest_QueryMode_value = map[string]int32{
"NORMAL": 0,
"PLAN": 1,
"PROFILE": 2,
}
)
func (x ExecuteSqlRequest_QueryMode) Enum() *ExecuteSqlRequest_QueryMode {
p := new(ExecuteSqlRequest_QueryMode)
*p = x
return p
}
func (x ExecuteSqlRequest_QueryMode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ExecuteSqlRequest_QueryMode) Descriptor() protoreflect.EnumDescriptor {
return file_google_spanner_v1_spanner_proto_enumTypes[2].Descriptor()
}
func (ExecuteSqlRequest_QueryMode) Type() protoreflect.EnumType {
return &file_google_spanner_v1_spanner_proto_enumTypes[2]
}
func (x ExecuteSqlRequest_QueryMode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ExecuteSqlRequest_QueryMode.Descriptor instead.
func (ExecuteSqlRequest_QueryMode) EnumDescriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{10, 0}
}
// The request for [CreateSession][google.spanner.v1.Spanner.CreateSession].
type CreateSessionRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The database in which the new session is created.
Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
// Required. The session to create.
Session *Session `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"`
}
func (x *CreateSessionRequest) Reset() {
*x = CreateSessionRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateSessionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateSessionRequest) ProtoMessage() {}
func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead.
func (*CreateSessionRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{0}
}
func (x *CreateSessionRequest) GetDatabase() string {
if x != nil {
return x.Database
}
return ""
}
func (x *CreateSessionRequest) GetSession() *Session {
if x != nil {
return x.Session
}
return nil
}
// The request for
// [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
type BatchCreateSessionsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The database in which the new sessions are created.
Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
// Parameters to be applied to each created session.
SessionTemplate *Session `protobuf:"bytes,2,opt,name=session_template,json=sessionTemplate,proto3" json:"session_template,omitempty"`
// Required. The number of sessions to be created in this batch call.
// The API may return fewer than the requested number of sessions. If a
// specific number of sessions are desired, the client can make additional
// calls to BatchCreateSessions (adjusting
// [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count]
// as necessary).
SessionCount int32 `protobuf:"varint,3,opt,name=session_count,json=sessionCount,proto3" json:"session_count,omitempty"`
}
func (x *BatchCreateSessionsRequest) Reset() {
*x = BatchCreateSessionsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchCreateSessionsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchCreateSessionsRequest) ProtoMessage() {}
func (x *BatchCreateSessionsRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchCreateSessionsRequest.ProtoReflect.Descriptor instead.
func (*BatchCreateSessionsRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{1}
}
func (x *BatchCreateSessionsRequest) GetDatabase() string {
if x != nil {
return x.Database
}
return ""
}
func (x *BatchCreateSessionsRequest) GetSessionTemplate() *Session {
if x != nil {
return x.SessionTemplate
}
return nil
}
func (x *BatchCreateSessionsRequest) GetSessionCount() int32 {
if x != nil {
return x.SessionCount
}
return 0
}
// The response for
// [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
type BatchCreateSessionsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The freshly created sessions.
Session []*Session `protobuf:"bytes,1,rep,name=session,proto3" json:"session,omitempty"`
}
func (x *BatchCreateSessionsResponse) Reset() {
*x = BatchCreateSessionsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchCreateSessionsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchCreateSessionsResponse) ProtoMessage() {}
func (x *BatchCreateSessionsResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchCreateSessionsResponse.ProtoReflect.Descriptor instead.
func (*BatchCreateSessionsResponse) Descriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{2}
}
func (x *BatchCreateSessionsResponse) GetSession() []*Session {
if x != nil {
return x.Session
}
return nil
}
// A session in the Cloud Spanner API.
type Session struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Output only. The name of the session. This is always system-assigned.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The labels for the session.
//
// - Label keys must be between 1 and 63 characters long and must conform to
// the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
// - Label values must be between 0 and 63 characters long and must conform
// to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
// - No more than 64 labels can be associated with a given session.
//
// See https://goo.gl/xmQnxf for more information on and examples of labels.
Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Output only. The timestamp when the session is created.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The approximate timestamp when the session is last used. It is
// typically earlier than the actual last use time.
ApproximateLastUseTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=approximate_last_use_time,json=approximateLastUseTime,proto3" json:"approximate_last_use_time,omitempty"`
// The database role which created this session.
CreatorRole string `protobuf:"bytes,5,opt,name=creator_role,json=creatorRole,proto3" json:"creator_role,omitempty"`
// Optional. If true, specifies a multiplexed session. A multiplexed session
// may be used for multiple, concurrent read-only operations but can not be
// used for read-write transactions, partitioned reads, or partitioned
// queries. Multiplexed sessions can be created via
// [CreateSession][google.spanner.v1.Spanner.CreateSession] but not via
// [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions].
// Multiplexed sessions may not be deleted nor listed.
Multiplexed bool `protobuf:"varint,6,opt,name=multiplexed,proto3" json:"multiplexed,omitempty"`
}
func (x *Session) Reset() {
*x = Session{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Session) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Session) ProtoMessage() {}
func (x *Session) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Session.ProtoReflect.Descriptor instead.
func (*Session) Descriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{3}
}
func (x *Session) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Session) GetLabels() map[string]string {
if x != nil {
return x.Labels
}
return nil
}
func (x *Session) GetCreateTime() *timestamppb.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
func (x *Session) GetApproximateLastUseTime() *timestamppb.Timestamp {
if x != nil {
return x.ApproximateLastUseTime
}
return nil
}
func (x *Session) GetCreatorRole() string {
if x != nil {
return x.CreatorRole
}
return ""
}
func (x *Session) GetMultiplexed() bool {
if x != nil {
return x.Multiplexed
}
return false
}
// The request for [GetSession][google.spanner.v1.Spanner.GetSession].
type GetSessionRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The name of the session to retrieve.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *GetSessionRequest) Reset() {
*x = GetSessionRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetSessionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetSessionRequest) ProtoMessage() {}
func (x *GetSessionRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetSessionRequest.ProtoReflect.Descriptor instead.
func (*GetSessionRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{4}
}
func (x *GetSessionRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// The request for [ListSessions][google.spanner.v1.Spanner.ListSessions].
type ListSessionsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The database in which to list sessions.
Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
// Number of sessions to be returned in the response. If 0 or less, defaults
// to the server's maximum allowed page size.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// If non-empty, `page_token` should contain a
// [next_page_token][google.spanner.v1.ListSessionsResponse.next_page_token]
// from a previous
// [ListSessionsResponse][google.spanner.v1.ListSessionsResponse].
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// An expression for filtering the results of the request. Filter rules are
// case insensitive. The fields eligible for filtering are:
//
// - `labels.key` where key is the name of a label
//
// Some examples of using filters are:
//
// - `labels.env:*` --> The session has the label "env".
// - `labels.env:dev` --> The session has the label "env" and the value of
// the label contains the string "dev".
Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
}
func (x *ListSessionsRequest) Reset() {
*x = ListSessionsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListSessionsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListSessionsRequest) ProtoMessage() {}
func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListSessionsRequest.ProtoReflect.Descriptor instead.
func (*ListSessionsRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{5}
}
func (x *ListSessionsRequest) GetDatabase() string {
if x != nil {
return x.Database
}
return ""
}
func (x *ListSessionsRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *ListSessionsRequest) GetPageToken() string {
if x != nil {
return x.PageToken
}
return ""
}
func (x *ListSessionsRequest) GetFilter() string {
if x != nil {
return x.Filter
}
return ""
}
// The response for [ListSessions][google.spanner.v1.Spanner.ListSessions].
type ListSessionsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of requested sessions.
Sessions []*Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
// `next_page_token` can be sent in a subsequent
// [ListSessions][google.spanner.v1.Spanner.ListSessions] call to fetch more
// of the matching sessions.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
}
func (x *ListSessionsResponse) Reset() {
*x = ListSessionsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListSessionsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListSessionsResponse) ProtoMessage() {}
func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListSessionsResponse.ProtoReflect.Descriptor instead.
func (*ListSessionsResponse) Descriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{6}
}
func (x *ListSessionsResponse) GetSessions() []*Session {
if x != nil {
return x.Sessions
}
return nil
}
func (x *ListSessionsResponse) GetNextPageToken() string {
if x != nil {
return x.NextPageToken
}
return ""
}
// The request for [DeleteSession][google.spanner.v1.Spanner.DeleteSession].
type DeleteSessionRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The name of the session to delete.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *DeleteSessionRequest) Reset() {
*x = DeleteSessionRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteSessionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteSessionRequest) ProtoMessage() {}
func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteSessionRequest.ProtoReflect.Descriptor instead.
func (*DeleteSessionRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{7}
}
func (x *DeleteSessionRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// Common request options for various APIs.
type RequestOptions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Priority for the request.
Priority RequestOptions_Priority `protobuf:"varint,1,opt,name=priority,proto3,enum=google.spanner.v1.RequestOptions_Priority" json:"priority,omitempty"`
// A per-request tag which can be applied to queries or reads, used for
// statistics collection.
// Both request_tag and transaction_tag can be specified for a read or query
// that belongs to a transaction.
// This field is ignored for requests where it's not applicable (e.g.
// CommitRequest).
// Legal characters for `request_tag` values are all printable characters
// (ASCII 32 - 126) and the length of a request_tag is limited to 50
// characters. Values that exceed this limit are truncated.
// Any leading underscore (_) characters will be removed from the string.
RequestTag string `protobuf:"bytes,2,opt,name=request_tag,json=requestTag,proto3" json:"request_tag,omitempty"`
// A tag used for statistics collection about this transaction.
// Both request_tag and transaction_tag can be specified for a read or query
// that belongs to a transaction.
// The value of transaction_tag should be the same for all requests belonging
// to the same transaction.
// If this request doesn't belong to any transaction, transaction_tag will be
// ignored.
// Legal characters for `transaction_tag` values are all printable characters
// (ASCII 32 - 126) and the length of a transaction_tag is limited to 50
// characters. Values that exceed this limit are truncated.
// Any leading underscore (_) characters will be removed from the string.
TransactionTag string `protobuf:"bytes,3,opt,name=transaction_tag,json=transactionTag,proto3" json:"transaction_tag,omitempty"`
}
func (x *RequestOptions) Reset() {
*x = RequestOptions{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestOptions) ProtoMessage() {}
func (x *RequestOptions) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RequestOptions.ProtoReflect.Descriptor instead.
func (*RequestOptions) Descriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{8}
}
func (x *RequestOptions) GetPriority() RequestOptions_Priority {
if x != nil {
return x.Priority
}
return RequestOptions_PRIORITY_UNSPECIFIED
}
func (x *RequestOptions) GetRequestTag() string {
if x != nil {
return x.RequestTag
}
return ""
}
func (x *RequestOptions) GetTransactionTag() string {
if x != nil {
return x.TransactionTag
}
return ""
}
// The DirectedReadOptions can be used to indicate which replicas or regions
// should be used for non-transactional reads or queries.
//
// DirectedReadOptions may only be specified for a read-only transaction,
// otherwise the API will return an `INVALID_ARGUMENT` error.
type DirectedReadOptions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. At most one of either include_replicas or exclude_replicas
// should be present in the message.
//
// Types that are assignable to Replicas:
//
// *DirectedReadOptions_IncludeReplicas_
// *DirectedReadOptions_ExcludeReplicas_
Replicas isDirectedReadOptions_Replicas `protobuf_oneof:"replicas"`
}
func (x *DirectedReadOptions) Reset() {
*x = DirectedReadOptions{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DirectedReadOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DirectedReadOptions) ProtoMessage() {}
func (x *DirectedReadOptions) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_v1_spanner_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DirectedReadOptions.ProtoReflect.Descriptor instead.
func (*DirectedReadOptions) Descriptor() ([]byte, []int) {
return file_google_spanner_v1_spanner_proto_rawDescGZIP(), []int{9}
}
func (m *DirectedReadOptions) GetReplicas() isDirectedReadOptions_Replicas {
if m != nil {
return m.Replicas
}
return nil
}
func (x *DirectedReadOptions) GetIncludeReplicas() *DirectedReadOptions_IncludeReplicas {
if x, ok := x.GetReplicas().(*DirectedReadOptions_IncludeReplicas_); ok {
return x.IncludeReplicas
}
return nil
}
func (x *DirectedReadOptions) GetExcludeReplicas() *DirectedReadOptions_ExcludeReplicas {
if x, ok := x.GetReplicas().(*DirectedReadOptions_ExcludeReplicas_); ok {
return x.ExcludeReplicas
}
return nil
}
type isDirectedReadOptions_Replicas interface {
isDirectedReadOptions_Replicas()
}
type DirectedReadOptions_IncludeReplicas_ struct {
// Include_replicas indicates the order of replicas (as they appear in
// this list) to process the request. If auto_failover_disabled is set to
// true and all replicas are exhausted without finding a healthy replica,
// Spanner will wait for a replica in the list to become available, requests
// may fail due to `DEADLINE_EXCEEDED` errors.
IncludeReplicas *DirectedReadOptions_IncludeReplicas `protobuf:"bytes,1,opt,name=include_replicas,json=includeReplicas,proto3,oneof"`
}
type DirectedReadOptions_ExcludeReplicas_ struct {
// Exclude_replicas indicates that specified replicas should be excluded
// from serving requests. Spanner will not route requests to the replicas
// in this list.
ExcludeReplicas *DirectedReadOptions_ExcludeReplicas `protobuf:"bytes,2,opt,name=exclude_replicas,json=excludeReplicas,proto3,oneof"`
}
func (*DirectedReadOptions_IncludeReplicas_) isDirectedReadOptions_Replicas() {}
func (*DirectedReadOptions_ExcludeReplicas_) isDirectedReadOptions_Replicas() {}
// The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
// [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql].
type ExecuteSqlRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The session in which the SQL query should be performed.
Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
// The transaction to use.
//
// For queries, if none is provided, the default is a temporary read-only
// transaction with strong concurrency.
//
// Standard DML statements require a read-write transaction. To protect
// against replays, single-use transactions are not supported. The caller
// must either supply an existing transaction ID or begin a new transaction.
//
// Partitioned DML requires an existing Partitioned DML transaction ID.
Transaction *TransactionSelector `protobuf:"bytes,2,opt,name=transaction,proto3" json:"transaction,omitempty"`
// Required. The SQL string.
Sql string `protobuf:"bytes,3,opt,name=sql,proto3" json:"sql,omitempty"`
// Parameter names and values that bind to placeholders in the SQL string.
//
// A parameter placeholder consists of the `@` character followed by the
// parameter name (for example, `@firstName`). Parameter names must conform
// to the naming requirements of identifiers as specified at
// https://cloud.google.com/spanner/docs/lexical#identifiers.
//
// Parameters can appear anywhere that a literal value is expected. The same
// parameter name can be used more than once, for example:
//
// `"WHERE id > @msg_id AND id < @msg_id + 100"`
//
// It is an error to execute a SQL statement with unbound parameters.
Params *structpb.Struct `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"`
// It is not always possible for Cloud Spanner to infer the right SQL type
// from a JSON value. For example, values of type `BYTES` and values
// of type `STRING` both appear in
// [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings.
//
// In these cases, `param_types` can be used to specify the exact
// SQL type for some or all of the SQL statement parameters. See the
// definition of [Type][google.spanner.v1.Type] for more information
// about SQL types.
ParamTypes map[string]*Type `protobuf:"bytes,5,rep,name=param_types,json=paramTypes,proto3" json:"param_types,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// If this request is resuming a previously interrupted SQL statement
// execution, `resume_token` should be copied from the last
// [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the
// interruption. Doing this enables the new SQL statement execution to resume
// where the last one left off. The rest of the request parameters must
// exactly match the request that yielded this token.
ResumeToken []byte `protobuf:"bytes,6,opt,name=resume_token,json=resumeToken,proto3" json:"resume_token,omitempty"`