/
rpc.pb.go
1622 lines (1470 loc) · 59.4 KB
/
rpc.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: go.chromium.org/luci/buildbucket/proto/rpc.proto
package buildbucketpb
import prpc "github.com/TriggerMail/luci-go/grpc/prpc"
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_struct "github.com/golang/protobuf/ptypes/struct"
context "golang.org/x/net/context"
status "google.golang.org/genproto/googleapis/rpc/status"
field_mask "google.golang.org/genproto/protobuf/field_mask"
grpc "google.golang.org/grpc"
math "math"
)
// 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
// A request message for GetBuild rpc.
type GetBuildRequest struct {
// Build id.
// Mutually exclusive with builder and number.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// Builder of the build.
// Requires number. Mutually exclusive with id.
Builder *BuilderID `protobuf:"bytes,2,opt,name=builder,proto3" json:"builder,omitempty"`
// Build number.
// Requires builder. Mutually exclusive with id.
BuildNumber int32 `protobuf:"varint,3,opt,name=build_number,json=buildNumber,proto3" json:"build_number,omitempty"`
// Fields to include in the response.
// If not set, the default mask is used, see Build message comments for the
// list of fields returned by default.
//
// Supports advanced semantics, see
// https://chromium.googlesource.com/infra/luci/luci-py/+/f9ae69a37c4bdd0e08a8b0f7e123f6e403e774eb/appengine/components/components/protoutil/field_masks.py#7
// In particular, if the client needs only some output properties, they
// can be requested with paths "output.properties.fields.foo".
Fields *field_mask.FieldMask `protobuf:"bytes,100,opt,name=fields,proto3" json:"fields,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetBuildRequest) Reset() { *m = GetBuildRequest{} }
func (m *GetBuildRequest) String() string { return proto.CompactTextString(m) }
func (*GetBuildRequest) ProtoMessage() {}
func (*GetBuildRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6551d9ae29a9e5a9, []int{0}
}
func (m *GetBuildRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBuildRequest.Unmarshal(m, b)
}
func (m *GetBuildRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetBuildRequest.Marshal(b, m, deterministic)
}
func (m *GetBuildRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBuildRequest.Merge(m, src)
}
func (m *GetBuildRequest) XXX_Size() int {
return xxx_messageInfo_GetBuildRequest.Size(m)
}
func (m *GetBuildRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetBuildRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetBuildRequest proto.InternalMessageInfo
func (m *GetBuildRequest) GetId() int64 {
if m != nil {
return m.Id
}
return 0
}
func (m *GetBuildRequest) GetBuilder() *BuilderID {
if m != nil {
return m.Builder
}
return nil
}
func (m *GetBuildRequest) GetBuildNumber() int32 {
if m != nil {
return m.BuildNumber
}
return 0
}
func (m *GetBuildRequest) GetFields() *field_mask.FieldMask {
if m != nil {
return m.Fields
}
return nil
}
// A request message for SearchBuilds rpc.
type SearchBuildsRequest struct {
// Returned builds must satisfy this predicate. Required.
Predicate *BuildPredicate `protobuf:"bytes,1,opt,name=predicate,proto3" json:"predicate,omitempty"`
// Fields to include in the response, see GetBuildRequest.fields.
// Note that this applies to the response, not each build, so e.g. steps must
// be requested with a path "builds.*.steps".
Fields *field_mask.FieldMask `protobuf:"bytes,100,opt,name=fields,proto3" json:"fields,omitempty"`
// Number of builds to return.
// Defaults to 100.
// Any value >1000 is interpreted as 1000.
PageSize int32 `protobuf:"varint,101,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Value of SearchBuildsResponse.next_page_token from the previous response.
// Use it to continue searching.
PageToken string `protobuf:"bytes,102,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SearchBuildsRequest) Reset() { *m = SearchBuildsRequest{} }
func (m *SearchBuildsRequest) String() string { return proto.CompactTextString(m) }
func (*SearchBuildsRequest) ProtoMessage() {}
func (*SearchBuildsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6551d9ae29a9e5a9, []int{1}
}
func (m *SearchBuildsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SearchBuildsRequest.Unmarshal(m, b)
}
func (m *SearchBuildsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SearchBuildsRequest.Marshal(b, m, deterministic)
}
func (m *SearchBuildsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SearchBuildsRequest.Merge(m, src)
}
func (m *SearchBuildsRequest) XXX_Size() int {
return xxx_messageInfo_SearchBuildsRequest.Size(m)
}
func (m *SearchBuildsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SearchBuildsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SearchBuildsRequest proto.InternalMessageInfo
func (m *SearchBuildsRequest) GetPredicate() *BuildPredicate {
if m != nil {
return m.Predicate
}
return nil
}
func (m *SearchBuildsRequest) GetFields() *field_mask.FieldMask {
if m != nil {
return m.Fields
}
return nil
}
func (m *SearchBuildsRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *SearchBuildsRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// A response message for SearchBuilds rpc.
type SearchBuildsResponse struct {
// Search results.
//
// Ordered by build id, descending. Ids are monotonically decreasing, so in
// other words the order is newest-to-oldest.
Builds []*Build `protobuf:"bytes,1,rep,name=builds,proto3" json:"builds,omitempty"`
// Value for SearchBuildsRequest.page_token to continue searching.
NextPageToken string `protobuf:"bytes,100,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SearchBuildsResponse) Reset() { *m = SearchBuildsResponse{} }
func (m *SearchBuildsResponse) String() string { return proto.CompactTextString(m) }
func (*SearchBuildsResponse) ProtoMessage() {}
func (*SearchBuildsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6551d9ae29a9e5a9, []int{2}
}
func (m *SearchBuildsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SearchBuildsResponse.Unmarshal(m, b)
}
func (m *SearchBuildsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SearchBuildsResponse.Marshal(b, m, deterministic)
}
func (m *SearchBuildsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SearchBuildsResponse.Merge(m, src)
}
func (m *SearchBuildsResponse) XXX_Size() int {
return xxx_messageInfo_SearchBuildsResponse.Size(m)
}
func (m *SearchBuildsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SearchBuildsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SearchBuildsResponse proto.InternalMessageInfo
func (m *SearchBuildsResponse) GetBuilds() []*Build {
if m != nil {
return m.Builds
}
return nil
}
func (m *SearchBuildsResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// A request message for Batch rpc.
type BatchRequest struct {
// Requests to execute in a single batch.
//
// Requests related to same build are coupled.
// Mutation requests are executed transactionally, before read-only requests.
Requests []*BatchRequest_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BatchRequest) Reset() { *m = BatchRequest{} }
func (m *BatchRequest) String() string { return proto.CompactTextString(m) }
func (*BatchRequest) ProtoMessage() {}
func (*BatchRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6551d9ae29a9e5a9, []int{3}
}
func (m *BatchRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchRequest.Unmarshal(m, b)
}
func (m *BatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BatchRequest.Marshal(b, m, deterministic)
}
func (m *BatchRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchRequest.Merge(m, src)
}
func (m *BatchRequest) XXX_Size() int {
return xxx_messageInfo_BatchRequest.Size(m)
}
func (m *BatchRequest) XXX_DiscardUnknown() {
xxx_messageInfo_BatchRequest.DiscardUnknown(m)
}
var xxx_messageInfo_BatchRequest proto.InternalMessageInfo
func (m *BatchRequest) GetRequests() []*BatchRequest_Request {
if m != nil {
return m.Requests
}
return nil
}
// One request in a batch.
type BatchRequest_Request struct {
// Types that are valid to be assigned to Request:
// *BatchRequest_Request_GetBuild
// *BatchRequest_Request_SearchBuilds
Request isBatchRequest_Request_Request `protobuf_oneof:"request"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BatchRequest_Request) Reset() { *m = BatchRequest_Request{} }
func (m *BatchRequest_Request) String() string { return proto.CompactTextString(m) }
func (*BatchRequest_Request) ProtoMessage() {}
func (*BatchRequest_Request) Descriptor() ([]byte, []int) {
return fileDescriptor_6551d9ae29a9e5a9, []int{3, 0}
}
func (m *BatchRequest_Request) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchRequest_Request.Unmarshal(m, b)
}
func (m *BatchRequest_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BatchRequest_Request.Marshal(b, m, deterministic)
}
func (m *BatchRequest_Request) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchRequest_Request.Merge(m, src)
}
func (m *BatchRequest_Request) XXX_Size() int {
return xxx_messageInfo_BatchRequest_Request.Size(m)
}
func (m *BatchRequest_Request) XXX_DiscardUnknown() {
xxx_messageInfo_BatchRequest_Request.DiscardUnknown(m)
}
var xxx_messageInfo_BatchRequest_Request proto.InternalMessageInfo
type isBatchRequest_Request_Request interface {
isBatchRequest_Request_Request()
}
type BatchRequest_Request_GetBuild struct {
GetBuild *GetBuildRequest `protobuf:"bytes,1,opt,name=get_build,json=getBuild,proto3,oneof"`
}
type BatchRequest_Request_SearchBuilds struct {
SearchBuilds *SearchBuildsRequest `protobuf:"bytes,2,opt,name=search_builds,json=searchBuilds,proto3,oneof"`
}
func (*BatchRequest_Request_GetBuild) isBatchRequest_Request_Request() {}
func (*BatchRequest_Request_SearchBuilds) isBatchRequest_Request_Request() {}
func (m *BatchRequest_Request) GetRequest() isBatchRequest_Request_Request {
if m != nil {
return m.Request
}
return nil
}
func (m *BatchRequest_Request) GetGetBuild() *GetBuildRequest {
if x, ok := m.GetRequest().(*BatchRequest_Request_GetBuild); ok {
return x.GetBuild
}
return nil
}
func (m *BatchRequest_Request) GetSearchBuilds() *SearchBuildsRequest {
if x, ok := m.GetRequest().(*BatchRequest_Request_SearchBuilds); ok {
return x.SearchBuilds
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*BatchRequest_Request) 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 _BatchRequest_Request_OneofMarshaler, _BatchRequest_Request_OneofUnmarshaler, _BatchRequest_Request_OneofSizer, []interface{}{
(*BatchRequest_Request_GetBuild)(nil),
(*BatchRequest_Request_SearchBuilds)(nil),
}
}
func _BatchRequest_Request_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*BatchRequest_Request)
// request
switch x := m.Request.(type) {
case *BatchRequest_Request_GetBuild:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.GetBuild); err != nil {
return err
}
case *BatchRequest_Request_SearchBuilds:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.SearchBuilds); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("BatchRequest_Request.Request has unexpected type %T", x)
}
return nil
}
func _BatchRequest_Request_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*BatchRequest_Request)
switch tag {
case 1: // request.get_build
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(GetBuildRequest)
err := b.DecodeMessage(msg)
m.Request = &BatchRequest_Request_GetBuild{msg}
return true, err
case 2: // request.search_builds
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(SearchBuildsRequest)
err := b.DecodeMessage(msg)
m.Request = &BatchRequest_Request_SearchBuilds{msg}
return true, err
default:
return false, nil
}
}
func _BatchRequest_Request_OneofSizer(msg proto.Message) (n int) {
m := msg.(*BatchRequest_Request)
// request
switch x := m.Request.(type) {
case *BatchRequest_Request_GetBuild:
s := proto.Size(x.GetBuild)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *BatchRequest_Request_SearchBuilds:
s := proto.Size(x.SearchBuilds)
n += 1 // 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 response message for Batch rpc.
type BatchResponse struct {
// Responses in the same order as BatchRequest.requests.
Responses []*BatchResponse_Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BatchResponse) Reset() { *m = BatchResponse{} }
func (m *BatchResponse) String() string { return proto.CompactTextString(m) }
func (*BatchResponse) ProtoMessage() {}
func (*BatchResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6551d9ae29a9e5a9, []int{4}
}
func (m *BatchResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchResponse.Unmarshal(m, b)
}
func (m *BatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BatchResponse.Marshal(b, m, deterministic)
}
func (m *BatchResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchResponse.Merge(m, src)
}
func (m *BatchResponse) XXX_Size() int {
return xxx_messageInfo_BatchResponse.Size(m)
}
func (m *BatchResponse) XXX_DiscardUnknown() {
xxx_messageInfo_BatchResponse.DiscardUnknown(m)
}
var xxx_messageInfo_BatchResponse proto.InternalMessageInfo
func (m *BatchResponse) GetResponses() []*BatchResponse_Response {
if m != nil {
return m.Responses
}
return nil
}
// Response a BatchRequest.Response.
type BatchResponse_Response struct {
// Types that are valid to be assigned to Response:
// *BatchResponse_Response_GetBuild
// *BatchResponse_Response_SearchBuilds
// *BatchResponse_Response_Error
Response isBatchResponse_Response_Response `protobuf_oneof:"response"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BatchResponse_Response) Reset() { *m = BatchResponse_Response{} }
func (m *BatchResponse_Response) String() string { return proto.CompactTextString(m) }
func (*BatchResponse_Response) ProtoMessage() {}
func (*BatchResponse_Response) Descriptor() ([]byte, []int) {
return fileDescriptor_6551d9ae29a9e5a9, []int{4, 0}
}
func (m *BatchResponse_Response) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchResponse_Response.Unmarshal(m, b)
}
func (m *BatchResponse_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BatchResponse_Response.Marshal(b, m, deterministic)
}
func (m *BatchResponse_Response) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchResponse_Response.Merge(m, src)
}
func (m *BatchResponse_Response) XXX_Size() int {
return xxx_messageInfo_BatchResponse_Response.Size(m)
}
func (m *BatchResponse_Response) XXX_DiscardUnknown() {
xxx_messageInfo_BatchResponse_Response.DiscardUnknown(m)
}
var xxx_messageInfo_BatchResponse_Response proto.InternalMessageInfo
type isBatchResponse_Response_Response interface {
isBatchResponse_Response_Response()
}
type BatchResponse_Response_GetBuild struct {
GetBuild *Build `protobuf:"bytes,1,opt,name=get_build,json=getBuild,proto3,oneof"`
}
type BatchResponse_Response_SearchBuilds struct {
SearchBuilds *SearchBuildsResponse `protobuf:"bytes,2,opt,name=search_builds,json=searchBuilds,proto3,oneof"`
}
type BatchResponse_Response_Error struct {
Error *status.Status `protobuf:"bytes,100,opt,name=error,proto3,oneof"`
}
func (*BatchResponse_Response_GetBuild) isBatchResponse_Response_Response() {}
func (*BatchResponse_Response_SearchBuilds) isBatchResponse_Response_Response() {}
func (*BatchResponse_Response_Error) isBatchResponse_Response_Response() {}
func (m *BatchResponse_Response) GetResponse() isBatchResponse_Response_Response {
if m != nil {
return m.Response
}
return nil
}
func (m *BatchResponse_Response) GetGetBuild() *Build {
if x, ok := m.GetResponse().(*BatchResponse_Response_GetBuild); ok {
return x.GetBuild
}
return nil
}
func (m *BatchResponse_Response) GetSearchBuilds() *SearchBuildsResponse {
if x, ok := m.GetResponse().(*BatchResponse_Response_SearchBuilds); ok {
return x.SearchBuilds
}
return nil
}
func (m *BatchResponse_Response) GetError() *status.Status {
if x, ok := m.GetResponse().(*BatchResponse_Response_Error); ok {
return x.Error
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*BatchResponse_Response) 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 _BatchResponse_Response_OneofMarshaler, _BatchResponse_Response_OneofUnmarshaler, _BatchResponse_Response_OneofSizer, []interface{}{
(*BatchResponse_Response_GetBuild)(nil),
(*BatchResponse_Response_SearchBuilds)(nil),
(*BatchResponse_Response_Error)(nil),
}
}
func _BatchResponse_Response_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*BatchResponse_Response)
// response
switch x := m.Response.(type) {
case *BatchResponse_Response_GetBuild:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.GetBuild); err != nil {
return err
}
case *BatchResponse_Response_SearchBuilds:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.SearchBuilds); err != nil {
return err
}
case *BatchResponse_Response_Error:
b.EncodeVarint(100<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Error); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("BatchResponse_Response.Response has unexpected type %T", x)
}
return nil
}
func _BatchResponse_Response_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*BatchResponse_Response)
switch tag {
case 1: // response.get_build
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Build)
err := b.DecodeMessage(msg)
m.Response = &BatchResponse_Response_GetBuild{msg}
return true, err
case 2: // response.search_builds
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(SearchBuildsResponse)
err := b.DecodeMessage(msg)
m.Response = &BatchResponse_Response_SearchBuilds{msg}
return true, err
case 100: // response.error
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(status.Status)
err := b.DecodeMessage(msg)
m.Response = &BatchResponse_Response_Error{msg}
return true, err
default:
return false, nil
}
}
func _BatchResponse_Response_OneofSizer(msg proto.Message) (n int) {
m := msg.(*BatchResponse_Response)
// response
switch x := m.Response.(type) {
case *BatchResponse_Response_GetBuild:
s := proto.Size(x.GetBuild)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *BatchResponse_Response_SearchBuilds:
s := proto.Size(x.SearchBuilds)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *BatchResponse_Response_Error:
s := proto.Size(x.Error)
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 request message for UpdateBuild rpc.
type UpdateBuildRequest struct {
// Build to update, with new field values.
Build *Build `protobuf:"bytes,1,opt,name=build,proto3" json:"build,omitempty"`
// Build fields to update.
// See also
// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
//
// Currently only "build.steps" path is supported.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
// Fields to include in the response. See also GetBuildRequest.fields.
Fields *field_mask.FieldMask `protobuf:"bytes,100,opt,name=fields,proto3" json:"fields,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateBuildRequest) Reset() { *m = UpdateBuildRequest{} }
func (m *UpdateBuildRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateBuildRequest) ProtoMessage() {}
func (*UpdateBuildRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6551d9ae29a9e5a9, []int{5}
}
func (m *UpdateBuildRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateBuildRequest.Unmarshal(m, b)
}
func (m *UpdateBuildRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateBuildRequest.Marshal(b, m, deterministic)
}
func (m *UpdateBuildRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateBuildRequest.Merge(m, src)
}
func (m *UpdateBuildRequest) XXX_Size() int {
return xxx_messageInfo_UpdateBuildRequest.Size(m)
}
func (m *UpdateBuildRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateBuildRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateBuildRequest proto.InternalMessageInfo
func (m *UpdateBuildRequest) GetBuild() *Build {
if m != nil {
return m.Build
}
return nil
}
func (m *UpdateBuildRequest) GetUpdateMask() *field_mask.FieldMask {
if m != nil {
return m.UpdateMask
}
return nil
}
func (m *UpdateBuildRequest) GetFields() *field_mask.FieldMask {
if m != nil {
return m.Fields
}
return nil
}
// A request message for ScheduleBuild rpc.
//
// Next ID: 13.
type ScheduleBuildRequest struct {
// Required. A unique string id used for detecting duplicate requests.
// Should be unique at least per requesting identity.
// Used to dedup build scheduling requests with same id within 1 min.
// If a build was successfully scheduled with the same request id in the past
// minute, the existing build will be returned.
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// ID of a build to retry as is or altered.
// When specified, fields below default to the values in the template build.
TemplateBuildId int64 `protobuf:"varint,2,opt,name=template_build_id,json=templateBuildId,proto3" json:"template_build_id,omitempty"`
// Value for Build.builder. See its comments.
// Required, unless template_build_id is specified.
Builder *BuilderID `protobuf:"bytes,3,opt,name=builder,proto3" json:"builder,omitempty"`
// If specified, overrides server-defined value of
// Build.infra.buildbucket.canary.
// Otherwise the value is computed based on the builder config.
// See Swarming.task_template_canary_percentage in
// ./config/project_config.proto.
Canary Trinary `protobuf:"varint,4,opt,name=canary,proto3,enum=buildbucket.v2.Trinary" json:"canary,omitempty"`
// If specified, overrides server-defined value of Build.input.experimental.
// Otherwise the value is computed based on the builder config.
// See Builder.experimental in ./config/project_config.proto.
Experimental Trinary `protobuf:"varint,5,opt,name=experimental,proto3,enum=buildbucket.v2.Trinary" json:"experimental,omitempty"`
// Properties to include in Build.input.properties.
//
// Input properties of the created build are result of merging server-defined
// properties and properties in this field.
// Each property in this field defines a new or replaces an existing property
// on the server.
// If the server config does not allow overriding/adding the property, the
// request will fail with InvalidArgument error code.
// A server-defined property cannot be removed, but its value can be
// replaced with null.
//
// Reserved property paths:
// * ["buildbucket"]
// * ["buildername"]
// * ["blamelist""]
// * ["$recipe_engine/runtime", "is_luci"]
// * ["$recipe_engine/runtime", "is_experimental"]
//
// V1 equivalent: corresponds to "properties" key in "parameters_json".
Properties *_struct.Struct `protobuf:"bytes,6,opt,name=properties,proto3" json:"properties,omitempty"`
// Value for Build.input.gitiles_commit.
//
// V1 equivalent: supersedes "revision" property and "buildset"
// tag that starts with "commit/gitiles/".
GitilesCommit *GitilesCommit `protobuf:"bytes,7,opt,name=gitiles_commit,json=gitilesCommit,proto3" json:"gitiles_commit,omitempty"`
// Value for Build.input.gerrit_changes.
// Usually present in tryjobs, set by CQ, Gerrit, git-cl-try.
// Applied on top of gitiles_commit if specified, otherwise tip of the tree.
//
// V1 equivalent: supersedes patch_* properties and "buildset"
// tag that starts with "patch/gerrit/".
GerritChanges []*GerritChange `protobuf:"bytes,8,rep,name=gerrit_changes,json=gerritChanges,proto3" json:"gerrit_changes,omitempty"`
// Tags to include in Build.tags of the created build, see Build.tags
// comments.
// Note: tags of the created build may include other tags defined on the
// server.
Tags []*StringPair `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"`
// Overrides default dimensions defined by builder config or template build.
//
// A set of entries with the same key defines a new or replaces an existing
// dimension with the same key.
// If the config does not allow overriding/adding the dimension, the request
// will fail with InvalidArgument error code.
//
// After merging, dimensions with empty value will be excluded.
Dimensions []*StringPair `protobuf:"bytes,10,rep,name=dimensions,proto3" json:"dimensions,omitempty"`
// If not zero, overrides swarming task priority.
// See also Build.infra.swarming.priority.
Priority int32 `protobuf:"varint,11,opt,name=priority,proto3" json:"priority,omitempty"`
// A per-build notification configuration.
Notify *NotificationConfig `protobuf:"bytes,12,opt,name=notify,proto3" json:"notify,omitempty"`
// Fields to include in the response. See also GetBuildRequest.fields.
Fields *field_mask.FieldMask `protobuf:"bytes,100,opt,name=fields,proto3" json:"fields,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ScheduleBuildRequest) Reset() { *m = ScheduleBuildRequest{} }
func (m *ScheduleBuildRequest) String() string { return proto.CompactTextString(m) }
func (*ScheduleBuildRequest) ProtoMessage() {}
func (*ScheduleBuildRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6551d9ae29a9e5a9, []int{6}
}
func (m *ScheduleBuildRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ScheduleBuildRequest.Unmarshal(m, b)
}
func (m *ScheduleBuildRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ScheduleBuildRequest.Marshal(b, m, deterministic)
}
func (m *ScheduleBuildRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ScheduleBuildRequest.Merge(m, src)
}
func (m *ScheduleBuildRequest) XXX_Size() int {
return xxx_messageInfo_ScheduleBuildRequest.Size(m)
}
func (m *ScheduleBuildRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ScheduleBuildRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ScheduleBuildRequest proto.InternalMessageInfo
func (m *ScheduleBuildRequest) GetRequestId() string {
if m != nil {
return m.RequestId
}
return ""
}
func (m *ScheduleBuildRequest) GetTemplateBuildId() int64 {
if m != nil {
return m.TemplateBuildId
}
return 0
}
func (m *ScheduleBuildRequest) GetBuilder() *BuilderID {
if m != nil {
return m.Builder
}
return nil
}
func (m *ScheduleBuildRequest) GetCanary() Trinary {
if m != nil {
return m.Canary
}
return Trinary_UNSET
}
func (m *ScheduleBuildRequest) GetExperimental() Trinary {
if m != nil {
return m.Experimental
}
return Trinary_UNSET
}
func (m *ScheduleBuildRequest) GetProperties() *_struct.Struct {
if m != nil {
return m.Properties
}
return nil
}
func (m *ScheduleBuildRequest) GetGitilesCommit() *GitilesCommit {
if m != nil {
return m.GitilesCommit
}
return nil
}
func (m *ScheduleBuildRequest) GetGerritChanges() []*GerritChange {
if m != nil {
return m.GerritChanges
}
return nil
}
func (m *ScheduleBuildRequest) GetTags() []*StringPair {
if m != nil {
return m.Tags
}
return nil
}
func (m *ScheduleBuildRequest) GetDimensions() []*StringPair {
if m != nil {
return m.Dimensions
}
return nil
}
func (m *ScheduleBuildRequest) GetPriority() int32 {
if m != nil {
return m.Priority
}
return 0
}
func (m *ScheduleBuildRequest) GetNotify() *NotificationConfig {
if m != nil {
return m.Notify
}
return nil
}
func (m *ScheduleBuildRequest) GetFields() *field_mask.FieldMask {
if m != nil {
return m.Fields
}
return nil
}
// A request message for CancelBuild rpc.
type CancelBuildRequest struct {
// ID of the build to cancel.
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// Required. Why the build is being cancelled.
Reason *CancelReason `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
// Fields to include in the response. See also GetBuildRequest.fields.
Fields *field_mask.FieldMask `protobuf:"bytes,100,opt,name=fields,proto3" json:"fields,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CancelBuildRequest) Reset() { *m = CancelBuildRequest{} }
func (m *CancelBuildRequest) String() string { return proto.CompactTextString(m) }
func (*CancelBuildRequest) ProtoMessage() {}
func (*CancelBuildRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6551d9ae29a9e5a9, []int{7}
}
func (m *CancelBuildRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelBuildRequest.Unmarshal(m, b)
}
func (m *CancelBuildRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CancelBuildRequest.Marshal(b, m, deterministic)
}
func (m *CancelBuildRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CancelBuildRequest.Merge(m, src)
}
func (m *CancelBuildRequest) XXX_Size() int {
return xxx_messageInfo_CancelBuildRequest.Size(m)
}
func (m *CancelBuildRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CancelBuildRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CancelBuildRequest proto.InternalMessageInfo
func (m *CancelBuildRequest) GetId() int64 {
if m != nil {
return m.Id
}
return 0
}
func (m *CancelBuildRequest) GetReason() *CancelReason {
if m != nil {
return m.Reason
}
return nil
}
func (m *CancelBuildRequest) GetFields() *field_mask.FieldMask {
if m != nil {
return m.Fields
}
return nil
}
// A build predicate.
//
// At least one of the following fields is required: builder, gerrit_changes and
// git_commits..
// If a field value is empty, it is ignored, unless stated otherwise.
type BuildPredicate struct {
// A build must be in this builder.
Builder *BuilderID `protobuf:"bytes,1,opt,name=builder,proto3" json:"builder,omitempty"`
// A build must have this status.
Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=buildbucket.v2.Status" json:"status,omitempty"`
// A build's Build.Input.gerrit_changes must include ALL of these changes.
GerritChanges []*GerritChange `protobuf:"bytes,3,rep,name=gerrit_changes,json=gerritChanges,proto3" json:"gerrit_changes,omitempty"`
// A build's Build.Output.gitiles_commit must match this commit.
// One of the following subfield sets must specified:
// - host, project, id
// - host, project, ref
// - host, project, ref, position
OutputGitilesCommit *GitilesCommit `protobuf:"bytes,4,opt,name=output_gitiles_commit,json=outputGitilesCommit,proto3" json:"output_gitiles_commit,omitempty"`
// A build must be created by this identity.
CreatedBy string `protobuf:"bytes,5,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
// A build must have ALL of these tags.
// For "ANY of these tags" make separate RPCs.
Tags []*StringPair `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"`
// A build must have been created within the specified range.
// Both boundaries are optional.
CreateTime *TimeRange `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// If false (default), a build must be non-experimental.
// Otherwise it may be experimental or non-experimental.
IncludeExperimental bool `protobuf:"varint,8,opt,name=include_experimental,json=includeExperimental,proto3" json:"include_experimental,omitempty"`
// A build must be in this build range.
// A pair of SearchBuildsRequest.predicate.build.end_build_id and
// SearchBuildsRequest.page_size=1 can be used to find the previous build.
Build *BuildRange `protobuf:"bytes,9,opt,name=build,proto3" json:"build,omitempty"`