forked from apache/beam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
beam_fn_api.pb.go
3904 lines (3540 loc) · 148 KB
/
beam_fn_api.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: beam_fn_api.proto
package fnexecution_v1
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import pipeline_v1 "github.com/apache/beam/sdks/go/pkg/beam/model/pipeline_v1"
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type LogEntry_Severity_Enum int32
const (
// Unspecified level information. Will be logged at the TRACE level.
LogEntry_Severity_UNSPECIFIED LogEntry_Severity_Enum = 0
// Trace level information.
LogEntry_Severity_TRACE LogEntry_Severity_Enum = 1
// Debugging information.
LogEntry_Severity_DEBUG LogEntry_Severity_Enum = 2
// Normal events.
LogEntry_Severity_INFO LogEntry_Severity_Enum = 3
// Normal but significant events, such as start up, shut down, or
// configuration.
LogEntry_Severity_NOTICE LogEntry_Severity_Enum = 4
// Warning events might cause problems.
LogEntry_Severity_WARN LogEntry_Severity_Enum = 5
// Error events are likely to cause problems.
LogEntry_Severity_ERROR LogEntry_Severity_Enum = 6
// Critical events cause severe problems or brief outages and may
// indicate that a person must take action.
LogEntry_Severity_CRITICAL LogEntry_Severity_Enum = 7
)
var LogEntry_Severity_Enum_name = map[int32]string{
0: "UNSPECIFIED",
1: "TRACE",
2: "DEBUG",
3: "INFO",
4: "NOTICE",
5: "WARN",
6: "ERROR",
7: "CRITICAL",
}
var LogEntry_Severity_Enum_value = map[string]int32{
"UNSPECIFIED": 0,
"TRACE": 1,
"DEBUG": 2,
"INFO": 3,
"NOTICE": 4,
"WARN": 5,
"ERROR": 6,
"CRITICAL": 7,
}
func (x LogEntry_Severity_Enum) String() string {
return proto.EnumName(LogEntry_Severity_Enum_name, int32(x))
}
func (LogEntry_Severity_Enum) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_beam_fn_api_0c85610fb4e0f5ef, []int{25, 1, 0}
}
// A representation of an input or output definition on a primitive transform.
// Stable
type Target struct {
// (Required) The id of the PrimitiveTransform which is the target.
PrimitiveTransformReference string `protobuf:"bytes,1,opt,name=primitive_transform_reference,json=primitiveTransformReference" json:"primitive_transform_reference,omitempty"`
// (Required) The local name of an input or output defined on the primitive
// transform.
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Target) Reset() { *m = Target{} }
func (m *Target) String() string { return proto.CompactTextString(m) }
func (*Target) ProtoMessage() {}
func (*Target) Descriptor() ([]byte, []int) {
return fileDescriptor_beam_fn_api_0c85610fb4e0f5ef, []int{0}
}
func (m *Target) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Target.Unmarshal(m, b)
}
func (m *Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Target.Marshal(b, m, deterministic)
}
func (dst *Target) XXX_Merge(src proto.Message) {
xxx_messageInfo_Target.Merge(dst, src)
}
func (m *Target) XXX_Size() int {
return xxx_messageInfo_Target.Size(m)
}
func (m *Target) XXX_DiscardUnknown() {
xxx_messageInfo_Target.DiscardUnknown(m)
}
var xxx_messageInfo_Target proto.InternalMessageInfo
func (m *Target) GetPrimitiveTransformReference() string {
if m != nil {
return m.PrimitiveTransformReference
}
return ""
}
func (m *Target) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A repeated list of target definitions.
type Target_List struct {
Target []*Target `protobuf:"bytes,1,rep,name=target" json:"target,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Target_List) Reset() { *m = Target_List{} }
func (m *Target_List) String() string { return proto.CompactTextString(m) }
func (*Target_List) ProtoMessage() {}
func (*Target_List) Descriptor() ([]byte, []int) {
return fileDescriptor_beam_fn_api_0c85610fb4e0f5ef, []int{0, 0}
}
func (m *Target_List) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Target_List.Unmarshal(m, b)
}
func (m *Target_List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Target_List.Marshal(b, m, deterministic)
}
func (dst *Target_List) XXX_Merge(src proto.Message) {
xxx_messageInfo_Target_List.Merge(dst, src)
}
func (m *Target_List) XXX_Size() int {
return xxx_messageInfo_Target_List.Size(m)
}
func (m *Target_List) XXX_DiscardUnknown() {
xxx_messageInfo_Target_List.DiscardUnknown(m)
}
var xxx_messageInfo_Target_List proto.InternalMessageInfo
func (m *Target_List) GetTarget() []*Target {
if m != nil {
return m.Target
}
return nil
}
// A descriptor for connecting to a remote port using the Beam Fn Data API.
// Allows for communication between two environments (for example between the
// runner and the SDK).
// Stable
type RemoteGrpcPort struct {
// (Required) An API descriptor which describes where to
// connect to including any authentication that is required.
ApiServiceDescriptor *pipeline_v1.ApiServiceDescriptor `protobuf:"bytes,1,opt,name=api_service_descriptor,json=apiServiceDescriptor" json:"api_service_descriptor,omitempty"`
// (Required) The ID of the Coder that will be used to encode and decode data sent over this port.
CoderId string `protobuf:"bytes,2,opt,name=coder_id,json=coderId" json:"coder_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RemoteGrpcPort) Reset() { *m = RemoteGrpcPort{} }
func (m *RemoteGrpcPort) String() string { return proto.CompactTextString(m) }
func (*RemoteGrpcPort) ProtoMessage() {}
func (*RemoteGrpcPort) Descriptor() ([]byte, []int) {
return fileDescriptor_beam_fn_api_0c85610fb4e0f5ef, []int{1}
}
func (m *RemoteGrpcPort) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RemoteGrpcPort.Unmarshal(m, b)
}
func (m *RemoteGrpcPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RemoteGrpcPort.Marshal(b, m, deterministic)
}
func (dst *RemoteGrpcPort) XXX_Merge(src proto.Message) {
xxx_messageInfo_RemoteGrpcPort.Merge(dst, src)
}
func (m *RemoteGrpcPort) XXX_Size() int {
return xxx_messageInfo_RemoteGrpcPort.Size(m)
}
func (m *RemoteGrpcPort) XXX_DiscardUnknown() {
xxx_messageInfo_RemoteGrpcPort.DiscardUnknown(m)
}
var xxx_messageInfo_RemoteGrpcPort proto.InternalMessageInfo
func (m *RemoteGrpcPort) GetApiServiceDescriptor() *pipeline_v1.ApiServiceDescriptor {
if m != nil {
return m.ApiServiceDescriptor
}
return nil
}
func (m *RemoteGrpcPort) GetCoderId() string {
if m != nil {
return m.CoderId
}
return ""
}
// A request sent by a runner which the SDK is asked to fulfill.
// For any unsupported request type, an error should be returned with a
// matching instruction id.
// Stable
type InstructionRequest struct {
// (Required) An unique identifier provided by the runner which represents
// this requests execution. The InstructionResponse MUST have the matching id.
InstructionId string `protobuf:"bytes,1,opt,name=instruction_id,json=instructionId" json:"instruction_id,omitempty"`
// (Required) A request that the SDK Harness needs to interpret.
//
// Types that are valid to be assigned to Request:
// *InstructionRequest_Register
// *InstructionRequest_ProcessBundle
// *InstructionRequest_ProcessBundleProgress
// *InstructionRequest_ProcessBundleSplit
Request isInstructionRequest_Request `protobuf_oneof:"request"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InstructionRequest) Reset() { *m = InstructionRequest{} }
func (m *InstructionRequest) String() string { return proto.CompactTextString(m) }
func (*InstructionRequest) ProtoMessage() {}
func (*InstructionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_beam_fn_api_0c85610fb4e0f5ef, []int{2}
}
func (m *InstructionRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InstructionRequest.Unmarshal(m, b)
}
func (m *InstructionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InstructionRequest.Marshal(b, m, deterministic)
}
func (dst *InstructionRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_InstructionRequest.Merge(dst, src)
}
func (m *InstructionRequest) XXX_Size() int {
return xxx_messageInfo_InstructionRequest.Size(m)
}
func (m *InstructionRequest) XXX_DiscardUnknown() {
xxx_messageInfo_InstructionRequest.DiscardUnknown(m)
}
var xxx_messageInfo_InstructionRequest proto.InternalMessageInfo
type isInstructionRequest_Request interface {
isInstructionRequest_Request()
}
type InstructionRequest_Register struct {
Register *RegisterRequest `protobuf:"bytes,1000,opt,name=register,oneof"`
}
type InstructionRequest_ProcessBundle struct {
ProcessBundle *ProcessBundleRequest `protobuf:"bytes,1001,opt,name=process_bundle,json=processBundle,oneof"`
}
type InstructionRequest_ProcessBundleProgress struct {
ProcessBundleProgress *ProcessBundleProgressRequest `protobuf:"bytes,1002,opt,name=process_bundle_progress,json=processBundleProgress,oneof"`
}
type InstructionRequest_ProcessBundleSplit struct {
ProcessBundleSplit *ProcessBundleSplitRequest `protobuf:"bytes,1003,opt,name=process_bundle_split,json=processBundleSplit,oneof"`
}
func (*InstructionRequest_Register) isInstructionRequest_Request() {}
func (*InstructionRequest_ProcessBundle) isInstructionRequest_Request() {}
func (*InstructionRequest_ProcessBundleProgress) isInstructionRequest_Request() {}
func (*InstructionRequest_ProcessBundleSplit) isInstructionRequest_Request() {}
func (m *InstructionRequest) GetRequest() isInstructionRequest_Request {
if m != nil {
return m.Request
}
return nil
}
func (m *InstructionRequest) GetInstructionId() string {
if m != nil {
return m.InstructionId
}
return ""
}
func (m *InstructionRequest) GetRegister() *RegisterRequest {
if x, ok := m.GetRequest().(*InstructionRequest_Register); ok {
return x.Register
}
return nil
}
func (m *InstructionRequest) GetProcessBundle() *ProcessBundleRequest {
if x, ok := m.GetRequest().(*InstructionRequest_ProcessBundle); ok {
return x.ProcessBundle
}
return nil
}
func (m *InstructionRequest) GetProcessBundleProgress() *ProcessBundleProgressRequest {
if x, ok := m.GetRequest().(*InstructionRequest_ProcessBundleProgress); ok {
return x.ProcessBundleProgress
}
return nil
}
func (m *InstructionRequest) GetProcessBundleSplit() *ProcessBundleSplitRequest {
if x, ok := m.GetRequest().(*InstructionRequest_ProcessBundleSplit); ok {
return x.ProcessBundleSplit
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*InstructionRequest) 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{}) {
return _InstructionRequest_OneofMarshaler, _InstructionRequest_OneofUnmarshaler, _InstructionRequest_OneofSizer, []interface{}{
(*InstructionRequest_Register)(nil),
(*InstructionRequest_ProcessBundle)(nil),
(*InstructionRequest_ProcessBundleProgress)(nil),
(*InstructionRequest_ProcessBundleSplit)(nil),
}
}
func _InstructionRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*InstructionRequest)
// request
switch x := m.Request.(type) {
case *InstructionRequest_Register:
b.EncodeVarint(1000<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Register); err != nil {
return err
}
case *InstructionRequest_ProcessBundle:
b.EncodeVarint(1001<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ProcessBundle); err != nil {
return err
}
case *InstructionRequest_ProcessBundleProgress:
b.EncodeVarint(1002<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ProcessBundleProgress); err != nil {
return err
}
case *InstructionRequest_ProcessBundleSplit:
b.EncodeVarint(1003<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ProcessBundleSplit); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("InstructionRequest.Request has unexpected type %T", x)
}
return nil
}
func _InstructionRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*InstructionRequest)
switch tag {
case 1000: // request.register
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(RegisterRequest)
err := b.DecodeMessage(msg)
m.Request = &InstructionRequest_Register{msg}
return true, err
case 1001: // request.process_bundle
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ProcessBundleRequest)
err := b.DecodeMessage(msg)
m.Request = &InstructionRequest_ProcessBundle{msg}
return true, err
case 1002: // request.process_bundle_progress
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ProcessBundleProgressRequest)
err := b.DecodeMessage(msg)
m.Request = &InstructionRequest_ProcessBundleProgress{msg}
return true, err
case 1003: // request.process_bundle_split
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ProcessBundleSplitRequest)
err := b.DecodeMessage(msg)
m.Request = &InstructionRequest_ProcessBundleSplit{msg}
return true, err
default:
return false, nil
}
}
func _InstructionRequest_OneofSizer(msg proto.Message) (n int) {
m := msg.(*InstructionRequest)
// request
switch x := m.Request.(type) {
case *InstructionRequest_Register:
s := proto.Size(x.Register)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *InstructionRequest_ProcessBundle:
s := proto.Size(x.ProcessBundle)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *InstructionRequest_ProcessBundleProgress:
s := proto.Size(x.ProcessBundleProgress)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *InstructionRequest_ProcessBundleSplit:
s := proto.Size(x.ProcessBundleSplit)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// The response for an associated request the SDK had been asked to fulfill.
// Stable
type InstructionResponse struct {
// (Required) A reference provided by the runner which represents a requests
// execution. The InstructionResponse MUST have the matching id when
// responding to the runner.
InstructionId string `protobuf:"bytes,1,opt,name=instruction_id,json=instructionId" json:"instruction_id,omitempty"`
// If this is specified, then this instruction has failed.
// A human readable string representing the reason as to why processing has
// failed.
Error string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"`
// If the instruction did not fail, it is required to return an equivalent
// response type depending on the request this matches.
//
// Types that are valid to be assigned to Response:
// *InstructionResponse_Register
// *InstructionResponse_ProcessBundle
// *InstructionResponse_ProcessBundleProgress
// *InstructionResponse_ProcessBundleSplit
Response isInstructionResponse_Response `protobuf_oneof:"response"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InstructionResponse) Reset() { *m = InstructionResponse{} }
func (m *InstructionResponse) String() string { return proto.CompactTextString(m) }
func (*InstructionResponse) ProtoMessage() {}
func (*InstructionResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_beam_fn_api_0c85610fb4e0f5ef, []int{3}
}
func (m *InstructionResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InstructionResponse.Unmarshal(m, b)
}
func (m *InstructionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InstructionResponse.Marshal(b, m, deterministic)
}
func (dst *InstructionResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_InstructionResponse.Merge(dst, src)
}
func (m *InstructionResponse) XXX_Size() int {
return xxx_messageInfo_InstructionResponse.Size(m)
}
func (m *InstructionResponse) XXX_DiscardUnknown() {
xxx_messageInfo_InstructionResponse.DiscardUnknown(m)
}
var xxx_messageInfo_InstructionResponse proto.InternalMessageInfo
type isInstructionResponse_Response interface {
isInstructionResponse_Response()
}
type InstructionResponse_Register struct {
Register *RegisterResponse `protobuf:"bytes,1000,opt,name=register,oneof"`
}
type InstructionResponse_ProcessBundle struct {
ProcessBundle *ProcessBundleResponse `protobuf:"bytes,1001,opt,name=process_bundle,json=processBundle,oneof"`
}
type InstructionResponse_ProcessBundleProgress struct {
ProcessBundleProgress *ProcessBundleProgressResponse `protobuf:"bytes,1002,opt,name=process_bundle_progress,json=processBundleProgress,oneof"`
}
type InstructionResponse_ProcessBundleSplit struct {
ProcessBundleSplit *ProcessBundleSplitResponse `protobuf:"bytes,1003,opt,name=process_bundle_split,json=processBundleSplit,oneof"`
}
func (*InstructionResponse_Register) isInstructionResponse_Response() {}
func (*InstructionResponse_ProcessBundle) isInstructionResponse_Response() {}
func (*InstructionResponse_ProcessBundleProgress) isInstructionResponse_Response() {}
func (*InstructionResponse_ProcessBundleSplit) isInstructionResponse_Response() {}
func (m *InstructionResponse) GetResponse() isInstructionResponse_Response {
if m != nil {
return m.Response
}
return nil
}
func (m *InstructionResponse) GetInstructionId() string {
if m != nil {
return m.InstructionId
}
return ""
}
func (m *InstructionResponse) GetError() string {
if m != nil {
return m.Error
}
return ""
}
func (m *InstructionResponse) GetRegister() *RegisterResponse {
if x, ok := m.GetResponse().(*InstructionResponse_Register); ok {
return x.Register
}
return nil
}
func (m *InstructionResponse) GetProcessBundle() *ProcessBundleResponse {
if x, ok := m.GetResponse().(*InstructionResponse_ProcessBundle); ok {
return x.ProcessBundle
}
return nil
}
func (m *InstructionResponse) GetProcessBundleProgress() *ProcessBundleProgressResponse {
if x, ok := m.GetResponse().(*InstructionResponse_ProcessBundleProgress); ok {
return x.ProcessBundleProgress
}
return nil
}
func (m *InstructionResponse) GetProcessBundleSplit() *ProcessBundleSplitResponse {
if x, ok := m.GetResponse().(*InstructionResponse_ProcessBundleSplit); ok {
return x.ProcessBundleSplit
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*InstructionResponse) 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{}) {
return _InstructionResponse_OneofMarshaler, _InstructionResponse_OneofUnmarshaler, _InstructionResponse_OneofSizer, []interface{}{
(*InstructionResponse_Register)(nil),
(*InstructionResponse_ProcessBundle)(nil),
(*InstructionResponse_ProcessBundleProgress)(nil),
(*InstructionResponse_ProcessBundleSplit)(nil),
}
}
func _InstructionResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*InstructionResponse)
// response
switch x := m.Response.(type) {
case *InstructionResponse_Register:
b.EncodeVarint(1000<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Register); err != nil {
return err
}
case *InstructionResponse_ProcessBundle:
b.EncodeVarint(1001<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ProcessBundle); err != nil {
return err
}
case *InstructionResponse_ProcessBundleProgress:
b.EncodeVarint(1002<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ProcessBundleProgress); err != nil {
return err
}
case *InstructionResponse_ProcessBundleSplit:
b.EncodeVarint(1003<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ProcessBundleSplit); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("InstructionResponse.Response has unexpected type %T", x)
}
return nil
}
func _InstructionResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*InstructionResponse)
switch tag {
case 1000: // response.register
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(RegisterResponse)
err := b.DecodeMessage(msg)
m.Response = &InstructionResponse_Register{msg}
return true, err
case 1001: // response.process_bundle
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ProcessBundleResponse)
err := b.DecodeMessage(msg)
m.Response = &InstructionResponse_ProcessBundle{msg}
return true, err
case 1002: // response.process_bundle_progress
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ProcessBundleProgressResponse)
err := b.DecodeMessage(msg)
m.Response = &InstructionResponse_ProcessBundleProgress{msg}
return true, err
case 1003: // response.process_bundle_split
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ProcessBundleSplitResponse)
err := b.DecodeMessage(msg)
m.Response = &InstructionResponse_ProcessBundleSplit{msg}
return true, err
default:
return false, nil
}
}
func _InstructionResponse_OneofSizer(msg proto.Message) (n int) {
m := msg.(*InstructionResponse)
// response
switch x := m.Response.(type) {
case *InstructionResponse_Register:
s := proto.Size(x.Register)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *InstructionResponse_ProcessBundle:
s := proto.Size(x.ProcessBundle)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *InstructionResponse_ProcessBundleProgress:
s := proto.Size(x.ProcessBundleProgress)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *InstructionResponse_ProcessBundleSplit:
s := proto.Size(x.ProcessBundleSplit)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// A list of objects which can be referred to by the runner in
// future requests.
// Stable
type RegisterRequest struct {
// (Optional) The set of descriptors used to process bundles.
ProcessBundleDescriptor []*ProcessBundleDescriptor `protobuf:"bytes,1,rep,name=process_bundle_descriptor,json=processBundleDescriptor" json:"process_bundle_descriptor,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RegisterRequest) Reset() { *m = RegisterRequest{} }
func (m *RegisterRequest) String() string { return proto.CompactTextString(m) }
func (*RegisterRequest) ProtoMessage() {}
func (*RegisterRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_beam_fn_api_0c85610fb4e0f5ef, []int{4}
}
func (m *RegisterRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RegisterRequest.Unmarshal(m, b)
}
func (m *RegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RegisterRequest.Marshal(b, m, deterministic)
}
func (dst *RegisterRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RegisterRequest.Merge(dst, src)
}
func (m *RegisterRequest) XXX_Size() int {
return xxx_messageInfo_RegisterRequest.Size(m)
}
func (m *RegisterRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RegisterRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RegisterRequest proto.InternalMessageInfo
func (m *RegisterRequest) GetProcessBundleDescriptor() []*ProcessBundleDescriptor {
if m != nil {
return m.ProcessBundleDescriptor
}
return nil
}
// Stable
type RegisterResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RegisterResponse) Reset() { *m = RegisterResponse{} }
func (m *RegisterResponse) String() string { return proto.CompactTextString(m) }
func (*RegisterResponse) ProtoMessage() {}
func (*RegisterResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_beam_fn_api_0c85610fb4e0f5ef, []int{5}
}
func (m *RegisterResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RegisterResponse.Unmarshal(m, b)
}
func (m *RegisterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RegisterResponse.Marshal(b, m, deterministic)
}
func (dst *RegisterResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_RegisterResponse.Merge(dst, src)
}
func (m *RegisterResponse) XXX_Size() int {
return xxx_messageInfo_RegisterResponse.Size(m)
}
func (m *RegisterResponse) XXX_DiscardUnknown() {
xxx_messageInfo_RegisterResponse.DiscardUnknown(m)
}
var xxx_messageInfo_RegisterResponse proto.InternalMessageInfo
// Definitions that should be used to construct the bundle processing graph.
type ProcessBundleDescriptor struct {
// (Required) A pipeline level unique id which can be used as a reference to
// refer to this.
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
// (Required) A map from pipeline-scoped id to PTransform.
Transforms map[string]*pipeline_v1.PTransform `protobuf:"bytes,2,rep,name=transforms" json:"transforms,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// (Required) A map from pipeline-scoped id to PCollection.
Pcollections map[string]*pipeline_v1.PCollection `protobuf:"bytes,3,rep,name=pcollections" json:"pcollections,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// (Required) A map from pipeline-scoped id to WindowingStrategy.
WindowingStrategies map[string]*pipeline_v1.WindowingStrategy `protobuf:"bytes,4,rep,name=windowing_strategies,json=windowingStrategies" json:"windowing_strategies,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// (Required) A map from pipeline-scoped id to Coder.
Coders map[string]*pipeline_v1.Coder `protobuf:"bytes,5,rep,name=coders" json:"coders,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// (Required) A map from pipeline-scoped id to Environment.
Environments map[string]*pipeline_v1.Environment `protobuf:"bytes,6,rep,name=environments" json:"environments,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// A descriptor describing the end point to use for State API
// calls. Required if the Runner intends to send remote references over the
// data plane or if any of the transforms rely on user state or side inputs.
StateApiServiceDescriptor *pipeline_v1.ApiServiceDescriptor `protobuf:"bytes,7,opt,name=state_api_service_descriptor,json=stateApiServiceDescriptor" json:"state_api_service_descriptor,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProcessBundleDescriptor) Reset() { *m = ProcessBundleDescriptor{} }
func (m *ProcessBundleDescriptor) String() string { return proto.CompactTextString(m) }
func (*ProcessBundleDescriptor) ProtoMessage() {}
func (*ProcessBundleDescriptor) Descriptor() ([]byte, []int) {
return fileDescriptor_beam_fn_api_0c85610fb4e0f5ef, []int{6}
}
func (m *ProcessBundleDescriptor) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProcessBundleDescriptor.Unmarshal(m, b)
}
func (m *ProcessBundleDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ProcessBundleDescriptor.Marshal(b, m, deterministic)
}
func (dst *ProcessBundleDescriptor) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProcessBundleDescriptor.Merge(dst, src)
}
func (m *ProcessBundleDescriptor) XXX_Size() int {
return xxx_messageInfo_ProcessBundleDescriptor.Size(m)
}
func (m *ProcessBundleDescriptor) XXX_DiscardUnknown() {
xxx_messageInfo_ProcessBundleDescriptor.DiscardUnknown(m)
}
var xxx_messageInfo_ProcessBundleDescriptor proto.InternalMessageInfo
func (m *ProcessBundleDescriptor) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ProcessBundleDescriptor) GetTransforms() map[string]*pipeline_v1.PTransform {
if m != nil {
return m.Transforms
}
return nil
}
func (m *ProcessBundleDescriptor) GetPcollections() map[string]*pipeline_v1.PCollection {
if m != nil {
return m.Pcollections
}
return nil
}
func (m *ProcessBundleDescriptor) GetWindowingStrategies() map[string]*pipeline_v1.WindowingStrategy {
if m != nil {
return m.WindowingStrategies
}
return nil
}
func (m *ProcessBundleDescriptor) GetCoders() map[string]*pipeline_v1.Coder {
if m != nil {
return m.Coders
}
return nil
}
func (m *ProcessBundleDescriptor) GetEnvironments() map[string]*pipeline_v1.Environment {
if m != nil {
return m.Environments
}
return nil
}
func (m *ProcessBundleDescriptor) GetStateApiServiceDescriptor() *pipeline_v1.ApiServiceDescriptor {
if m != nil {
return m.StateApiServiceDescriptor
}
return nil
}
// Represents a partition of the bundle into two bundles: a "primary" and
// a "residual", with the following properties:
// - The work in primary and residual doesn't overlap, and combined, adds up
// to the work in the current bundle if the split hadn't happened.
// - The current bundle, if it keeps executing, will have done none of the
// work under residual roots.
// - The current bundle, if no further splits happen, will have done exactly
// the work under primary_roots.
// For more rigorous definitions see https://s.apache.org/beam-breaking-fusion
type BundleSplit struct {
// Root applications that should replace the current bundle.
PrimaryRoots []*BundleSplit_Application `protobuf:"bytes,1,rep,name=primary_roots,json=primaryRoots" json:"primary_roots,omitempty"`
// Root applications that have been removed from the current bundle and
// have to be executed in a separate bundle (e.g. in parallel on a different
// worker, or after the current bundle completes, etc.)
ResidualRoots []*BundleSplit_Application `protobuf:"bytes,2,rep,name=residual_roots,json=residualRoots" json:"residual_roots,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BundleSplit) Reset() { *m = BundleSplit{} }
func (m *BundleSplit) String() string { return proto.CompactTextString(m) }
func (*BundleSplit) ProtoMessage() {}
func (*BundleSplit) Descriptor() ([]byte, []int) {
return fileDescriptor_beam_fn_api_0c85610fb4e0f5ef, []int{7}
}
func (m *BundleSplit) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BundleSplit.Unmarshal(m, b)
}
func (m *BundleSplit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BundleSplit.Marshal(b, m, deterministic)
}
func (dst *BundleSplit) XXX_Merge(src proto.Message) {
xxx_messageInfo_BundleSplit.Merge(dst, src)
}
func (m *BundleSplit) XXX_Size() int {
return xxx_messageInfo_BundleSplit.Size(m)
}
func (m *BundleSplit) XXX_DiscardUnknown() {
xxx_messageInfo_BundleSplit.DiscardUnknown(m)
}
var xxx_messageInfo_BundleSplit proto.InternalMessageInfo
func (m *BundleSplit) GetPrimaryRoots() []*BundleSplit_Application {
if m != nil {
return m.PrimaryRoots
}
return nil
}
func (m *BundleSplit) GetResidualRoots() []*BundleSplit_Application {
if m != nil {
return m.ResidualRoots
}
return nil
}
// One of the root applications specifying the scope of work for a bundle.
type BundleSplit_Application struct {
// (Required) The primitive transform to which to pass the element
PtransformId string `protobuf:"bytes,1,opt,name=ptransform_id,json=ptransformId" json:"ptransform_id,omitempty"`
// (Required) Name of the transform's input to which to pass the element.
InputId string `protobuf:"bytes,2,opt,name=input_id,json=inputId" json:"input_id,omitempty"`
// (Required) The encoded element to pass to the transform.
Element []byte `protobuf:"bytes,3,opt,name=element,proto3" json:"element,omitempty"`
// Approximate lower bounds on timestamps of elements that this PTransform
// will produce into each of its output PCollections, when invoked on this
// element. Keyed by the transform's local output name.
OutputWatermarks map[string]int64 `protobuf:"bytes,4,rep,name=output_watermarks,json=outputWatermarks" json:"output_watermarks,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
// Approximate fraction of all work of the current bundle (before split)
// represented by invoking this Application and its downstream applications.
// The sum of fraction_of_work between all primary_roots and residual_roots
// must add up to approximately 1.0.
FractionOfWork *wrappers.DoubleValue `protobuf:"bytes,5,opt,name=fraction_of_work,json=fractionOfWork" json:"fraction_of_work,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BundleSplit_Application) Reset() { *m = BundleSplit_Application{} }
func (m *BundleSplit_Application) String() string { return proto.CompactTextString(m) }
func (*BundleSplit_Application) ProtoMessage() {}
func (*BundleSplit_Application) Descriptor() ([]byte, []int) {
return fileDescriptor_beam_fn_api_0c85610fb4e0f5ef, []int{7, 0}
}
func (m *BundleSplit_Application) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BundleSplit_Application.Unmarshal(m, b)
}
func (m *BundleSplit_Application) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BundleSplit_Application.Marshal(b, m, deterministic)
}
func (dst *BundleSplit_Application) XXX_Merge(src proto.Message) {
xxx_messageInfo_BundleSplit_Application.Merge(dst, src)
}
func (m *BundleSplit_Application) XXX_Size() int {
return xxx_messageInfo_BundleSplit_Application.Size(m)
}
func (m *BundleSplit_Application) XXX_DiscardUnknown() {
xxx_messageInfo_BundleSplit_Application.DiscardUnknown(m)
}
var xxx_messageInfo_BundleSplit_Application proto.InternalMessageInfo
func (m *BundleSplit_Application) GetPtransformId() string {
if m != nil {
return m.PtransformId
}
return ""
}
func (m *BundleSplit_Application) GetInputId() string {
if m != nil {
return m.InputId
}
return ""
}
func (m *BundleSplit_Application) GetElement() []byte {
if m != nil {
return m.Element
}
return nil
}
func (m *BundleSplit_Application) GetOutputWatermarks() map[string]int64 {
if m != nil {
return m.OutputWatermarks
}
return nil
}
func (m *BundleSplit_Application) GetFractionOfWork() *wrappers.DoubleValue {
if m != nil {
return m.FractionOfWork
}
return nil
}
// A request to process a given bundle.
// Stable
type ProcessBundleRequest struct {
// (Required) A reference to the process bundle descriptor that must be
// instantiated and executed by the SDK harness.
ProcessBundleDescriptorReference string `protobuf:"bytes,1,opt,name=process_bundle_descriptor_reference,json=processBundleDescriptorReference" json:"process_bundle_descriptor_reference,omitempty"`
// (Optional) A list of cache tokens that can be used by an SDK to reuse
// cached data returned by the State API across multiple bundles.
CacheTokens [][]byte `protobuf:"bytes,2,rep,name=cache_tokens,json=cacheTokens,proto3" json:"cache_tokens,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProcessBundleRequest) Reset() { *m = ProcessBundleRequest{} }