-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
storage.pb.go
executable file
·3381 lines (3064 loc) · 151 KB
/
storage.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 2022 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.30.0
// protoc v3.21.12
// source: google/cloud/bigquery/storage/v1/storage.proto
package storagepb
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"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)
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)
)
// An enum to indicate how to interpret missing values. Missing values are
// fields present in user schema but missing in rows. A missing value can
// represent a NULL or a column default value defined in BigQuery table
// schema.
type AppendRowsRequest_MissingValueInterpretation int32
const (
// Invalid missing value interpretation. Requests with this value will be
// rejected.
AppendRowsRequest_MISSING_VALUE_INTERPRETATION_UNSPECIFIED AppendRowsRequest_MissingValueInterpretation = 0
// Missing value is interpreted as NULL.
AppendRowsRequest_NULL_VALUE AppendRowsRequest_MissingValueInterpretation = 1
// Missing value is interpreted as column default value if declared in the
// table schema, NULL otherwise.
AppendRowsRequest_DEFAULT_VALUE AppendRowsRequest_MissingValueInterpretation = 2
)
// Enum value maps for AppendRowsRequest_MissingValueInterpretation.
var (
AppendRowsRequest_MissingValueInterpretation_name = map[int32]string{
0: "MISSING_VALUE_INTERPRETATION_UNSPECIFIED",
1: "NULL_VALUE",
2: "DEFAULT_VALUE",
}
AppendRowsRequest_MissingValueInterpretation_value = map[string]int32{
"MISSING_VALUE_INTERPRETATION_UNSPECIFIED": 0,
"NULL_VALUE": 1,
"DEFAULT_VALUE": 2,
}
)
func (x AppendRowsRequest_MissingValueInterpretation) Enum() *AppendRowsRequest_MissingValueInterpretation {
p := new(AppendRowsRequest_MissingValueInterpretation)
*p = x
return p
}
func (x AppendRowsRequest_MissingValueInterpretation) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AppendRowsRequest_MissingValueInterpretation) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_bigquery_storage_v1_storage_proto_enumTypes[0].Descriptor()
}
func (AppendRowsRequest_MissingValueInterpretation) Type() protoreflect.EnumType {
return &file_google_cloud_bigquery_storage_v1_storage_proto_enumTypes[0]
}
func (x AppendRowsRequest_MissingValueInterpretation) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AppendRowsRequest_MissingValueInterpretation.Descriptor instead.
func (AppendRowsRequest_MissingValueInterpretation) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{8, 0}
}
// Error code for `StorageError`.
type StorageError_StorageErrorCode int32
const (
// Default error.
StorageError_STORAGE_ERROR_CODE_UNSPECIFIED StorageError_StorageErrorCode = 0
// Table is not found in the system.
StorageError_TABLE_NOT_FOUND StorageError_StorageErrorCode = 1
// Stream is already committed.
StorageError_STREAM_ALREADY_COMMITTED StorageError_StorageErrorCode = 2
// Stream is not found.
StorageError_STREAM_NOT_FOUND StorageError_StorageErrorCode = 3
// Invalid Stream type.
// For example, you try to commit a stream that is not pending.
StorageError_INVALID_STREAM_TYPE StorageError_StorageErrorCode = 4
// Invalid Stream state.
// For example, you try to commit a stream that is not finalized or is
// garbaged.
StorageError_INVALID_STREAM_STATE StorageError_StorageErrorCode = 5
// Stream is finalized.
StorageError_STREAM_FINALIZED StorageError_StorageErrorCode = 6
// There is a schema mismatch and it is caused by user schema has extra
// field than bigquery schema.
StorageError_SCHEMA_MISMATCH_EXTRA_FIELDS StorageError_StorageErrorCode = 7
// Offset already exists.
StorageError_OFFSET_ALREADY_EXISTS StorageError_StorageErrorCode = 8
// Offset out of range.
StorageError_OFFSET_OUT_OF_RANGE StorageError_StorageErrorCode = 9
)
// Enum value maps for StorageError_StorageErrorCode.
var (
StorageError_StorageErrorCode_name = map[int32]string{
0: "STORAGE_ERROR_CODE_UNSPECIFIED",
1: "TABLE_NOT_FOUND",
2: "STREAM_ALREADY_COMMITTED",
3: "STREAM_NOT_FOUND",
4: "INVALID_STREAM_TYPE",
5: "INVALID_STREAM_STATE",
6: "STREAM_FINALIZED",
7: "SCHEMA_MISMATCH_EXTRA_FIELDS",
8: "OFFSET_ALREADY_EXISTS",
9: "OFFSET_OUT_OF_RANGE",
}
StorageError_StorageErrorCode_value = map[string]int32{
"STORAGE_ERROR_CODE_UNSPECIFIED": 0,
"TABLE_NOT_FOUND": 1,
"STREAM_ALREADY_COMMITTED": 2,
"STREAM_NOT_FOUND": 3,
"INVALID_STREAM_TYPE": 4,
"INVALID_STREAM_STATE": 5,
"STREAM_FINALIZED": 6,
"SCHEMA_MISMATCH_EXTRA_FIELDS": 7,
"OFFSET_ALREADY_EXISTS": 8,
"OFFSET_OUT_OF_RANGE": 9,
}
)
func (x StorageError_StorageErrorCode) Enum() *StorageError_StorageErrorCode {
p := new(StorageError_StorageErrorCode)
*p = x
return p
}
func (x StorageError_StorageErrorCode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (StorageError_StorageErrorCode) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_bigquery_storage_v1_storage_proto_enumTypes[1].Descriptor()
}
func (StorageError_StorageErrorCode) Type() protoreflect.EnumType {
return &file_google_cloud_bigquery_storage_v1_storage_proto_enumTypes[1]
}
func (x StorageError_StorageErrorCode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use StorageError_StorageErrorCode.Descriptor instead.
func (StorageError_StorageErrorCode) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{17, 0}
}
// Error code for `RowError`.
type RowError_RowErrorCode int32
const (
// Default error.
RowError_ROW_ERROR_CODE_UNSPECIFIED RowError_RowErrorCode = 0
// One or more fields in the row has errors.
RowError_FIELDS_ERROR RowError_RowErrorCode = 1
)
// Enum value maps for RowError_RowErrorCode.
var (
RowError_RowErrorCode_name = map[int32]string{
0: "ROW_ERROR_CODE_UNSPECIFIED",
1: "FIELDS_ERROR",
}
RowError_RowErrorCode_value = map[string]int32{
"ROW_ERROR_CODE_UNSPECIFIED": 0,
"FIELDS_ERROR": 1,
}
)
func (x RowError_RowErrorCode) Enum() *RowError_RowErrorCode {
p := new(RowError_RowErrorCode)
*p = x
return p
}
func (x RowError_RowErrorCode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (RowError_RowErrorCode) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_bigquery_storage_v1_storage_proto_enumTypes[2].Descriptor()
}
func (RowError_RowErrorCode) Type() protoreflect.EnumType {
return &file_google_cloud_bigquery_storage_v1_storage_proto_enumTypes[2]
}
func (x RowError_RowErrorCode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use RowError_RowErrorCode.Descriptor instead.
func (RowError_RowErrorCode) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{18, 0}
}
// Request message for `CreateReadSession`.
type CreateReadSessionRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The request project that owns the session, in the form of
// `projects/{project_id}`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. Session to be created.
ReadSession *ReadSession `protobuf:"bytes,2,opt,name=read_session,json=readSession,proto3" json:"read_session,omitempty"`
// Max initial number of streams. If unset or zero, the server will
// provide a value of streams so as to produce reasonable throughput. Must be
// non-negative. The number of streams may be lower than the requested number,
// depending on the amount parallelism that is reasonable for the table.
// There is a default system max limit of 1,000.
//
// This must be greater than or equal to preferred_min_stream_count.
// Typically, clients should either leave this unset to let the system to
// determine an upper bound OR set this a size for the maximum "units of work"
// it can gracefully handle.
MaxStreamCount int32 `protobuf:"varint,3,opt,name=max_stream_count,json=maxStreamCount,proto3" json:"max_stream_count,omitempty"`
// The minimum preferred stream count. This parameter can be used to inform
// the service that there is a desired lower bound on the number of streams.
// This is typically a target parallelism of the client (e.g. a Spark
// cluster with N-workers would set this to a low multiple of N to ensure
// good cluster utilization).
//
// The system will make a best effort to provide at least this number of
// streams, but in some cases might provide less.
PreferredMinStreamCount int32 `protobuf:"varint,4,opt,name=preferred_min_stream_count,json=preferredMinStreamCount,proto3" json:"preferred_min_stream_count,omitempty"`
}
func (x *CreateReadSessionRequest) Reset() {
*x = CreateReadSessionRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateReadSessionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateReadSessionRequest) ProtoMessage() {}
func (x *CreateReadSessionRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_bigquery_storage_v1_storage_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 CreateReadSessionRequest.ProtoReflect.Descriptor instead.
func (*CreateReadSessionRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{0}
}
func (x *CreateReadSessionRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *CreateReadSessionRequest) GetReadSession() *ReadSession {
if x != nil {
return x.ReadSession
}
return nil
}
func (x *CreateReadSessionRequest) GetMaxStreamCount() int32 {
if x != nil {
return x.MaxStreamCount
}
return 0
}
func (x *CreateReadSessionRequest) GetPreferredMinStreamCount() int32 {
if x != nil {
return x.PreferredMinStreamCount
}
return 0
}
// Request message for `ReadRows`.
type ReadRowsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Stream to read rows from.
ReadStream string `protobuf:"bytes,1,opt,name=read_stream,json=readStream,proto3" json:"read_stream,omitempty"`
// The offset requested must be less than the last row read from Read.
// Requesting a larger offset is undefined. If not specified, start reading
// from offset zero.
Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
}
func (x *ReadRowsRequest) Reset() {
*x = ReadRowsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReadRowsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReadRowsRequest) ProtoMessage() {}
func (x *ReadRowsRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_bigquery_storage_v1_storage_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 ReadRowsRequest.ProtoReflect.Descriptor instead.
func (*ReadRowsRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{1}
}
func (x *ReadRowsRequest) GetReadStream() string {
if x != nil {
return x.ReadStream
}
return ""
}
func (x *ReadRowsRequest) GetOffset() int64 {
if x != nil {
return x.Offset
}
return 0
}
// Information on if the current connection is being throttled.
type ThrottleState struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// How much this connection is being throttled. Zero means no throttling,
// 100 means fully throttled.
ThrottlePercent int32 `protobuf:"varint,1,opt,name=throttle_percent,json=throttlePercent,proto3" json:"throttle_percent,omitempty"`
}
func (x *ThrottleState) Reset() {
*x = ThrottleState{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ThrottleState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ThrottleState) ProtoMessage() {}
func (x *ThrottleState) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_bigquery_storage_v1_storage_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 ThrottleState.ProtoReflect.Descriptor instead.
func (*ThrottleState) Descriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{2}
}
func (x *ThrottleState) GetThrottlePercent() int32 {
if x != nil {
return x.ThrottlePercent
}
return 0
}
// Estimated stream statistics for a given read Stream.
type StreamStats struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Represents the progress of the current stream.
Progress *StreamStats_Progress `protobuf:"bytes,2,opt,name=progress,proto3" json:"progress,omitempty"`
}
func (x *StreamStats) Reset() {
*x = StreamStats{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StreamStats) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StreamStats) ProtoMessage() {}
func (x *StreamStats) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_bigquery_storage_v1_storage_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 StreamStats.ProtoReflect.Descriptor instead.
func (*StreamStats) Descriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{3}
}
func (x *StreamStats) GetProgress() *StreamStats_Progress {
if x != nil {
return x.Progress
}
return nil
}
// Response from calling `ReadRows` may include row data, progress and
// throttling information.
type ReadRowsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Row data is returned in format specified during session creation.
//
// Types that are assignable to Rows:
// *ReadRowsResponse_AvroRows
// *ReadRowsResponse_ArrowRecordBatch
Rows isReadRowsResponse_Rows `protobuf_oneof:"rows"`
// Number of serialized rows in the rows block.
RowCount int64 `protobuf:"varint,6,opt,name=row_count,json=rowCount,proto3" json:"row_count,omitempty"`
// Statistics for the stream.
Stats *StreamStats `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"`
// Throttling state. If unset, the latest response still describes
// the current throttling status.
ThrottleState *ThrottleState `protobuf:"bytes,5,opt,name=throttle_state,json=throttleState,proto3" json:"throttle_state,omitempty"`
// The schema for the read. If read_options.selected_fields is set, the
// schema may be different from the table schema as it will only contain
// the selected fields. This schema is equivalent to the one returned by
// CreateSession. This field is only populated in the first ReadRowsResponse
// RPC.
//
// Types that are assignable to Schema:
// *ReadRowsResponse_AvroSchema
// *ReadRowsResponse_ArrowSchema
Schema isReadRowsResponse_Schema `protobuf_oneof:"schema"`
}
func (x *ReadRowsResponse) Reset() {
*x = ReadRowsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReadRowsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReadRowsResponse) ProtoMessage() {}
func (x *ReadRowsResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_bigquery_storage_v1_storage_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 ReadRowsResponse.ProtoReflect.Descriptor instead.
func (*ReadRowsResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{4}
}
func (m *ReadRowsResponse) GetRows() isReadRowsResponse_Rows {
if m != nil {
return m.Rows
}
return nil
}
func (x *ReadRowsResponse) GetAvroRows() *AvroRows {
if x, ok := x.GetRows().(*ReadRowsResponse_AvroRows); ok {
return x.AvroRows
}
return nil
}
func (x *ReadRowsResponse) GetArrowRecordBatch() *ArrowRecordBatch {
if x, ok := x.GetRows().(*ReadRowsResponse_ArrowRecordBatch); ok {
return x.ArrowRecordBatch
}
return nil
}
func (x *ReadRowsResponse) GetRowCount() int64 {
if x != nil {
return x.RowCount
}
return 0
}
func (x *ReadRowsResponse) GetStats() *StreamStats {
if x != nil {
return x.Stats
}
return nil
}
func (x *ReadRowsResponse) GetThrottleState() *ThrottleState {
if x != nil {
return x.ThrottleState
}
return nil
}
func (m *ReadRowsResponse) GetSchema() isReadRowsResponse_Schema {
if m != nil {
return m.Schema
}
return nil
}
func (x *ReadRowsResponse) GetAvroSchema() *AvroSchema {
if x, ok := x.GetSchema().(*ReadRowsResponse_AvroSchema); ok {
return x.AvroSchema
}
return nil
}
func (x *ReadRowsResponse) GetArrowSchema() *ArrowSchema {
if x, ok := x.GetSchema().(*ReadRowsResponse_ArrowSchema); ok {
return x.ArrowSchema
}
return nil
}
type isReadRowsResponse_Rows interface {
isReadRowsResponse_Rows()
}
type ReadRowsResponse_AvroRows struct {
// Serialized row data in AVRO format.
AvroRows *AvroRows `protobuf:"bytes,3,opt,name=avro_rows,json=avroRows,proto3,oneof"`
}
type ReadRowsResponse_ArrowRecordBatch struct {
// Serialized row data in Arrow RecordBatch format.
ArrowRecordBatch *ArrowRecordBatch `protobuf:"bytes,4,opt,name=arrow_record_batch,json=arrowRecordBatch,proto3,oneof"`
}
func (*ReadRowsResponse_AvroRows) isReadRowsResponse_Rows() {}
func (*ReadRowsResponse_ArrowRecordBatch) isReadRowsResponse_Rows() {}
type isReadRowsResponse_Schema interface {
isReadRowsResponse_Schema()
}
type ReadRowsResponse_AvroSchema struct {
// Output only. Avro schema.
AvroSchema *AvroSchema `protobuf:"bytes,7,opt,name=avro_schema,json=avroSchema,proto3,oneof"`
}
type ReadRowsResponse_ArrowSchema struct {
// Output only. Arrow schema.
ArrowSchema *ArrowSchema `protobuf:"bytes,8,opt,name=arrow_schema,json=arrowSchema,proto3,oneof"`
}
func (*ReadRowsResponse_AvroSchema) isReadRowsResponse_Schema() {}
func (*ReadRowsResponse_ArrowSchema) isReadRowsResponse_Schema() {}
// Request message for `SplitReadStream`.
type SplitReadStreamRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Name of the stream to split.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// A value in the range (0.0, 1.0) that specifies the fractional point at
// which the original stream should be split. The actual split point is
// evaluated on pre-filtered rows, so if a filter is provided, then there is
// no guarantee that the division of the rows between the new child streams
// will be proportional to this fractional value. Additionally, because the
// server-side unit for assigning data is collections of rows, this fraction
// will always map to a data storage boundary on the server side.
Fraction float64 `protobuf:"fixed64,2,opt,name=fraction,proto3" json:"fraction,omitempty"`
}
func (x *SplitReadStreamRequest) Reset() {
*x = SplitReadStreamRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SplitReadStreamRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SplitReadStreamRequest) ProtoMessage() {}
func (x *SplitReadStreamRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_bigquery_storage_v1_storage_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 SplitReadStreamRequest.ProtoReflect.Descriptor instead.
func (*SplitReadStreamRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{5}
}
func (x *SplitReadStreamRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *SplitReadStreamRequest) GetFraction() float64 {
if x != nil {
return x.Fraction
}
return 0
}
// Response message for `SplitReadStream`.
type SplitReadStreamResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Primary stream, which contains the beginning portion of
// |original_stream|. An empty value indicates that the original stream can no
// longer be split.
PrimaryStream *ReadStream `protobuf:"bytes,1,opt,name=primary_stream,json=primaryStream,proto3" json:"primary_stream,omitempty"`
// Remainder stream, which contains the tail of |original_stream|. An empty
// value indicates that the original stream can no longer be split.
RemainderStream *ReadStream `protobuf:"bytes,2,opt,name=remainder_stream,json=remainderStream,proto3" json:"remainder_stream,omitempty"`
}
func (x *SplitReadStreamResponse) Reset() {
*x = SplitReadStreamResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SplitReadStreamResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SplitReadStreamResponse) ProtoMessage() {}
func (x *SplitReadStreamResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_bigquery_storage_v1_storage_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 SplitReadStreamResponse.ProtoReflect.Descriptor instead.
func (*SplitReadStreamResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{6}
}
func (x *SplitReadStreamResponse) GetPrimaryStream() *ReadStream {
if x != nil {
return x.PrimaryStream
}
return nil
}
func (x *SplitReadStreamResponse) GetRemainderStream() *ReadStream {
if x != nil {
return x.RemainderStream
}
return nil
}
// Request message for `CreateWriteStream`.
type CreateWriteStreamRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Reference to the table to which the stream belongs, in the format
// of `projects/{project}/datasets/{dataset}/tables/{table}`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. Stream to be created.
WriteStream *WriteStream `protobuf:"bytes,2,opt,name=write_stream,json=writeStream,proto3" json:"write_stream,omitempty"`
}
func (x *CreateWriteStreamRequest) Reset() {
*x = CreateWriteStreamRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateWriteStreamRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateWriteStreamRequest) ProtoMessage() {}
func (x *CreateWriteStreamRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_bigquery_storage_v1_storage_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 CreateWriteStreamRequest.ProtoReflect.Descriptor instead.
func (*CreateWriteStreamRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{7}
}
func (x *CreateWriteStreamRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *CreateWriteStreamRequest) GetWriteStream() *WriteStream {
if x != nil {
return x.WriteStream
}
return nil
}
// Request message for `AppendRows`.
//
// Due to the nature of AppendRows being a bidirectional streaming RPC, certain
// parts of the AppendRowsRequest need only be specified for the first request
// sent each time the gRPC network connection is opened/reopened.
//
// The size of a single AppendRowsRequest must be less than 10 MB in size.
// Requests larger than this return an error, typically `INVALID_ARGUMENT`.
type AppendRowsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The write_stream identifies the target of the append operation,
// and only needs to be specified as part of the first request on the gRPC
// connection. If provided for subsequent requests, it must match the value of
// the first request.
//
// For explicitly created write streams, the format is:
//
// * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}`
//
// For the special default stream, the format is:
//
// * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`.
WriteStream string `protobuf:"bytes,1,opt,name=write_stream,json=writeStream,proto3" json:"write_stream,omitempty"`
// If present, the write is only performed if the next append offset is same
// as the provided value. If not present, the write is performed at the
// current end of stream. Specifying a value for this field is not allowed
// when calling AppendRows for the '_default' stream.
Offset *wrapperspb.Int64Value `protobuf:"bytes,2,opt,name=offset,proto3" json:"offset,omitempty"`
// Input rows. The `writer_schema` field must be specified at the initial
// request and currently, it will be ignored if specified in following
// requests. Following requests must have data in the same format as the
// initial request.
//
// Types that are assignable to Rows:
// *AppendRowsRequest_ProtoRows
Rows isAppendRowsRequest_Rows `protobuf_oneof:"rows"`
// Id set by client to annotate its identity. Only initial request setting is
// respected.
TraceId string `protobuf:"bytes,6,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
// A map to indicate how to interpret missing value for some fields. Missing
// values are fields present in user schema but missing in rows. The key is
// the field name. The value is the interpretation of missing values for the
// field.
//
// For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all
// missing values in field foo are interpreted as NULL, all missing values in
// field bar are interpreted as the default value of field bar in table
// schema.
//
// If a field is not in this map and has missing values, the missing values
// in this field are interpreted as NULL.
//
// This field only applies to the current request, it won't affect other
// requests on the connection.
//
// Currently, field name can only be top-level column name, can't be a struct
// field path like 'foo.bar'.
MissingValueInterpretations map[string]AppendRowsRequest_MissingValueInterpretation `protobuf:"bytes,7,rep,name=missing_value_interpretations,json=missingValueInterpretations,proto3" json:"missing_value_interpretations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=google.cloud.bigquery.storage.v1.AppendRowsRequest_MissingValueInterpretation"`
}
func (x *AppendRowsRequest) Reset() {
*x = AppendRowsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_bigquery_storage_v1_storage_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AppendRowsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AppendRowsRequest) ProtoMessage() {}
func (x *AppendRowsRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_bigquery_storage_v1_storage_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 AppendRowsRequest.ProtoReflect.Descriptor instead.
func (*AppendRowsRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_bigquery_storage_v1_storage_proto_rawDescGZIP(), []int{8}
}
func (x *AppendRowsRequest) GetWriteStream() string {
if x != nil {
return x.WriteStream
}
return ""
}
func (x *AppendRowsRequest) GetOffset() *wrapperspb.Int64Value {
if x != nil {
return x.Offset
}
return nil
}
func (m *AppendRowsRequest) GetRows() isAppendRowsRequest_Rows {
if m != nil {
return m.Rows
}
return nil
}
func (x *AppendRowsRequest) GetProtoRows() *AppendRowsRequest_ProtoData {
if x, ok := x.GetRows().(*AppendRowsRequest_ProtoRows); ok {
return x.ProtoRows
}
return nil
}
func (x *AppendRowsRequest) GetTraceId() string {
if x != nil {
return x.TraceId
}
return ""
}
func (x *AppendRowsRequest) GetMissingValueInterpretations() map[string]AppendRowsRequest_MissingValueInterpretation {
if x != nil {
return x.MissingValueInterpretations
}
return nil
}
type isAppendRowsRequest_Rows interface {
isAppendRowsRequest_Rows()
}
type AppendRowsRequest_ProtoRows struct {
// Rows in proto format.
ProtoRows *AppendRowsRequest_ProtoData `protobuf:"bytes,4,opt,name=proto_rows,json=protoRows,proto3,oneof"`
}
func (*AppendRowsRequest_ProtoRows) isAppendRowsRequest_Rows() {}
// Response message for `AppendRows`.
type AppendRowsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Response:
// *AppendRowsResponse_AppendResult_
// *AppendRowsResponse_Error
Response isAppendRowsResponse_Response `protobuf_oneof:"response"`
// If backend detects a schema update, pass it to user so that user can
// use it to input new type of message. It will be empty when no schema
// updates have occurred.
UpdatedSchema *TableSchema `protobuf:"bytes,3,opt,name=updated_schema,json=updatedSchema,proto3" json:"updated_schema,omitempty"`
// If a request failed due to corrupted rows, no rows in the batch will be
// appended. The API will return row level error info, so that the caller can