-
Notifications
You must be signed in to change notification settings - Fork 172
/
jobs.pb.go
2113 lines (1859 loc) · 70.7 KB
/
jobs.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: jobs.proto
/*
Package jobs is a generated protocol buffer package.
It is generated from these files:
jobs.proto
It has these top-level messages:
NodesSelector
IdmSelector
UsersSelector
ActionOutputFilter
ContextMetaFilter
ContextMetaSingleQuery
Schedule
Action
Job
JobParameter
JobChangeEvent
TaskChangeEvent
PutJobRequest
PutJobResponse
GetJobRequest
GetJobResponse
DeleteJobRequest
DeleteJobResponse
ListJobsRequest
ListJobsResponse
ListTasksRequest
ListTasksResponse
PutTaskRequest
PutTaskResponse
DeleteTasksRequest
DeleteTasksResponse
DetectStuckTasksRequest
DetectStuckTasksResponse
Task
CtrlCommand
CtrlCommandResponse
ActionLog
JobTriggerEvent
ActionOutput
ActionOutputSingleQuery
ActionMessage
*/
package jobs
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "github.com/golang/protobuf/ptypes/any"
import service "github.com/pydio/cells/common/service/proto"
import tree "github.com/pydio/cells/common/proto/tree"
import idm "github.com/pydio/cells/common/proto/idm"
import activity "github.com/pydio/cells/common/proto/activity"
// 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
// Possible values for IdmSelector.Type
type IdmSelectorType int32
const (
IdmSelectorType_User IdmSelectorType = 0
IdmSelectorType_Role IdmSelectorType = 1
IdmSelectorType_Workspace IdmSelectorType = 2
IdmSelectorType_Acl IdmSelectorType = 3
)
var IdmSelectorType_name = map[int32]string{
0: "User",
1: "Role",
2: "Workspace",
3: "Acl",
}
var IdmSelectorType_value = map[string]int32{
"User": 0,
"Role": 1,
"Workspace": 2,
"Acl": 3,
}
func (x IdmSelectorType) String() string {
return proto.EnumName(IdmSelectorType_name, int32(x))
}
func (IdmSelectorType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type ContextMetaFilterType int32
const (
ContextMetaFilterType_RequestMeta ContextMetaFilterType = 0
ContextMetaFilterType_ContextUser ContextMetaFilterType = 1
)
var ContextMetaFilterType_name = map[int32]string{
0: "RequestMeta",
1: "ContextUser",
}
var ContextMetaFilterType_value = map[string]int32{
"RequestMeta": 0,
"ContextUser": 1,
}
func (x ContextMetaFilterType) String() string {
return proto.EnumName(ContextMetaFilterType_name, int32(x))
}
func (ContextMetaFilterType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
// /////////////////
// TASK SERVICE //
// /////////////////
type TaskStatus int32
const (
TaskStatus_Unknown TaskStatus = 0
TaskStatus_Idle TaskStatus = 1
TaskStatus_Running TaskStatus = 2
TaskStatus_Finished TaskStatus = 3
TaskStatus_Interrupted TaskStatus = 4
TaskStatus_Paused TaskStatus = 5
TaskStatus_Any TaskStatus = 6
TaskStatus_Error TaskStatus = 7
TaskStatus_Queued TaskStatus = 8
)
var TaskStatus_name = map[int32]string{
0: "Unknown",
1: "Idle",
2: "Running",
3: "Finished",
4: "Interrupted",
5: "Paused",
6: "Any",
7: "Error",
8: "Queued",
}
var TaskStatus_value = map[string]int32{
"Unknown": 0,
"Idle": 1,
"Running": 2,
"Finished": 3,
"Interrupted": 4,
"Paused": 5,
"Any": 6,
"Error": 7,
"Queued": 8,
}
func (x TaskStatus) String() string {
return proto.EnumName(TaskStatus_name, int32(x))
}
func (TaskStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
type Command int32
const (
Command_None Command = 0
Command_Pause Command = 1
Command_Resume Command = 2
Command_Stop Command = 3
Command_Delete Command = 4
Command_RunOnce Command = 5
Command_Inactive Command = 6
Command_Active Command = 7
)
var Command_name = map[int32]string{
0: "None",
1: "Pause",
2: "Resume",
3: "Stop",
4: "Delete",
5: "RunOnce",
6: "Inactive",
7: "Active",
}
var Command_value = map[string]int32{
"None": 0,
"Pause": 1,
"Resume": 2,
"Stop": 3,
"Delete": 4,
"RunOnce": 5,
"Inactive": 6,
"Active": 7,
}
func (x Command) String() string {
return proto.EnumName(Command_name, int32(x))
}
func (Command) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
// /////////////////
// JOB SERVICE //
// /////////////////
type NodesSelector struct {
// Select all files - ignore any other condition
All bool `protobuf:"varint,1,opt,name=All" json:"All,omitempty"`
// Preset list of node pathes
Pathes []string `protobuf:"bytes,2,rep,name=Pathes" json:"Pathes,omitempty"`
// Query to apply to select users (or filter a given node passed by event)
Query *service.Query `protobuf:"bytes,4,opt,name=Query" json:"Query,omitempty"`
// Whether to trigger one action per node or one action
// with all nodes as selection
Collect bool `protobuf:"varint,5,opt,name=Collect" json:"Collect,omitempty"`
// Selector custom label
Label string `protobuf:"bytes,6,opt,name=Label" json:"Label,omitempty"`
// Selector additional description
Description string `protobuf:"bytes,7,opt,name=Description" json:"Description,omitempty"`
}
func (m *NodesSelector) Reset() { *m = NodesSelector{} }
func (m *NodesSelector) String() string { return proto.CompactTextString(m) }
func (*NodesSelector) ProtoMessage() {}
func (*NodesSelector) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *NodesSelector) GetAll() bool {
if m != nil {
return m.All
}
return false
}
func (m *NodesSelector) GetPathes() []string {
if m != nil {
return m.Pathes
}
return nil
}
func (m *NodesSelector) GetQuery() *service.Query {
if m != nil {
return m.Query
}
return nil
}
func (m *NodesSelector) GetCollect() bool {
if m != nil {
return m.Collect
}
return false
}
func (m *NodesSelector) GetLabel() string {
if m != nil {
return m.Label
}
return ""
}
func (m *NodesSelector) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
// Generic container for select/filter idm objects
type IdmSelector struct {
// Type of objects to look for
Type IdmSelectorType `protobuf:"varint,1,opt,name=Type,enum=jobs.IdmSelectorType" json:"Type,omitempty"`
// Load all objects
All bool `protobuf:"varint,2,opt,name=All" json:"All,omitempty"`
// Serialized search query
Query *service.Query `protobuf:"bytes,3,opt,name=Query" json:"Query,omitempty"`
// Pass a slice of objects to one action, or trigger all actions in parallel
Collect bool `protobuf:"varint,4,opt,name=Collect" json:"Collect,omitempty"`
// Selector custom label
Label string `protobuf:"bytes,5,opt,name=Label" json:"Label,omitempty"`
// Selector additional description
Description string `protobuf:"bytes,6,opt,name=Description" json:"Description,omitempty"`
}
func (m *IdmSelector) Reset() { *m = IdmSelector{} }
func (m *IdmSelector) String() string { return proto.CompactTextString(m) }
func (*IdmSelector) ProtoMessage() {}
func (*IdmSelector) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *IdmSelector) GetType() IdmSelectorType {
if m != nil {
return m.Type
}
return IdmSelectorType_User
}
func (m *IdmSelector) GetAll() bool {
if m != nil {
return m.All
}
return false
}
func (m *IdmSelector) GetQuery() *service.Query {
if m != nil {
return m.Query
}
return nil
}
func (m *IdmSelector) GetCollect() bool {
if m != nil {
return m.Collect
}
return false
}
func (m *IdmSelector) GetLabel() string {
if m != nil {
return m.Label
}
return ""
}
func (m *IdmSelector) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
// Select or filter users - should be replaced by more generic IdmSelector
type UsersSelector struct {
// Select all users
All bool `protobuf:"varint,1,opt,name=All" json:"All,omitempty"`
// Preset set of Users
Users []*idm.User `protobuf:"bytes,2,rep,name=Users" json:"Users,omitempty"`
// Filter users using this query
Query *service.Query `protobuf:"bytes,3,opt,name=Query" json:"Query,omitempty"`
// Wether to trigger one action per user or one action
// with all user as a selection
Collect bool `protobuf:"varint,5,opt,name=Collect" json:"Collect,omitempty"`
// Selector custom label
Label string `protobuf:"bytes,6,opt,name=Label" json:"Label,omitempty"`
// Selector additional description
Description string `protobuf:"bytes,7,opt,name=Description" json:"Description,omitempty"`
}
func (m *UsersSelector) Reset() { *m = UsersSelector{} }
func (m *UsersSelector) String() string { return proto.CompactTextString(m) }
func (*UsersSelector) ProtoMessage() {}
func (*UsersSelector) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *UsersSelector) GetAll() bool {
if m != nil {
return m.All
}
return false
}
func (m *UsersSelector) GetUsers() []*idm.User {
if m != nil {
return m.Users
}
return nil
}
func (m *UsersSelector) GetQuery() *service.Query {
if m != nil {
return m.Query
}
return nil
}
func (m *UsersSelector) GetCollect() bool {
if m != nil {
return m.Collect
}
return false
}
func (m *UsersSelector) GetLabel() string {
if m != nil {
return m.Label
}
return ""
}
func (m *UsersSelector) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
// ActionOutputFilter can be used to filter last message output
type ActionOutputFilter struct {
// Query built from ActionOutputSingleQuery
Query *service.Query `protobuf:"bytes,1,opt,name=Query" json:"Query,omitempty"`
// Selector custom label
Label string `protobuf:"bytes,2,opt,name=Label" json:"Label,omitempty"`
// Selector additional description
Description string `protobuf:"bytes,3,opt,name=Description" json:"Description,omitempty"`
}
func (m *ActionOutputFilter) Reset() { *m = ActionOutputFilter{} }
func (m *ActionOutputFilter) String() string { return proto.CompactTextString(m) }
func (*ActionOutputFilter) ProtoMessage() {}
func (*ActionOutputFilter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *ActionOutputFilter) GetQuery() *service.Query {
if m != nil {
return m.Query
}
return nil
}
func (m *ActionOutputFilter) GetLabel() string {
if m != nil {
return m.Label
}
return ""
}
func (m *ActionOutputFilter) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
// PolicyContextFilter can be used to filter request metadata
type ContextMetaFilter struct {
// Type of context filter
Type ContextMetaFilterType `protobuf:"varint,1,opt,name=Type,enum=jobs.ContextMetaFilterType" json:"Type,omitempty"`
// Can be built with ContextMetaSingleQuery
Query *service.Query `protobuf:"bytes,2,opt,name=Query" json:"Query,omitempty"`
// Selector custom label
Label string `protobuf:"bytes,3,opt,name=Label" json:"Label,omitempty"`
// Selector additional description
Description string `protobuf:"bytes,4,opt,name=Description" json:"Description,omitempty"`
}
func (m *ContextMetaFilter) Reset() { *m = ContextMetaFilter{} }
func (m *ContextMetaFilter) String() string { return proto.CompactTextString(m) }
func (*ContextMetaFilter) ProtoMessage() {}
func (*ContextMetaFilter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *ContextMetaFilter) GetType() ContextMetaFilterType {
if m != nil {
return m.Type
}
return ContextMetaFilterType_RequestMeta
}
func (m *ContextMetaFilter) GetQuery() *service.Query {
if m != nil {
return m.Query
}
return nil
}
func (m *ContextMetaFilter) GetLabel() string {
if m != nil {
return m.Label
}
return ""
}
func (m *ContextMetaFilter) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
// ContextMetaSingleQuery uses idm.PolicyCondition
type ContextMetaSingleQuery struct {
// Condition applies to FieldName
FieldName string `protobuf:"bytes,1,opt,name=FieldName" json:"FieldName,omitempty"`
// PolicyCondition
Condition *idm.PolicyCondition `protobuf:"bytes,2,opt,name=Condition" json:"Condition,omitempty"`
}
func (m *ContextMetaSingleQuery) Reset() { *m = ContextMetaSingleQuery{} }
func (m *ContextMetaSingleQuery) String() string { return proto.CompactTextString(m) }
func (*ContextMetaSingleQuery) ProtoMessage() {}
func (*ContextMetaSingleQuery) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *ContextMetaSingleQuery) GetFieldName() string {
if m != nil {
return m.FieldName
}
return ""
}
func (m *ContextMetaSingleQuery) GetCondition() *idm.PolicyCondition {
if m != nil {
return m.Condition
}
return nil
}
type Schedule struct {
// ISO 8601 Description of the scheduling for instance "R2/2015-06-04T19:25:16.828696-07:00/PT4S"
// where first part is the number of repetitions (if 0, infinite repetition),
// second part the starting date and last part, the duration between 2 occurrences.
Iso8601Schedule string `protobuf:"bytes,1,opt,name=Iso8601Schedule" json:"Iso8601Schedule,omitempty"`
// Minimum time between two runs
Iso8601MinDelta string `protobuf:"bytes,3,opt,name=Iso8601MinDelta" json:"Iso8601MinDelta,omitempty"`
}
func (m *Schedule) Reset() { *m = Schedule{} }
func (m *Schedule) String() string { return proto.CompactTextString(m) }
func (*Schedule) ProtoMessage() {}
func (*Schedule) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *Schedule) GetIso8601Schedule() string {
if m != nil {
return m.Iso8601Schedule
}
return ""
}
func (m *Schedule) GetIso8601MinDelta() string {
if m != nil {
return m.Iso8601MinDelta
}
return ""
}
type Action struct {
// String Identifier for specific action
ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
// User-defined label for this action
Label string `protobuf:"bytes,13,opt,name=Label" json:"Label,omitempty"`
// User-defined comment for this action
Description string `protobuf:"bytes,14,opt,name=Description" json:"Description,omitempty"`
// Bypass this action (forward input to output and do nothing)
Bypass bool `protobuf:"varint,15,opt,name=Bypass" json:"Bypass,omitempty"`
// Stop full chain now : do not carry on executing next actions
BreakAfter bool `protobuf:"varint,16,opt,name=BreakAfter" json:"BreakAfter,omitempty"`
// Nodes Selector
NodesSelector *NodesSelector `protobuf:"bytes,2,opt,name=NodesSelector" json:"NodesSelector,omitempty"`
// Users Selector (deprecated in favor of IdmSelector)
UsersSelector *UsersSelector `protobuf:"bytes,3,opt,name=UsersSelector" json:"UsersSelector,omitempty"`
// Node Filter
NodesFilter *NodesSelector `protobuf:"bytes,4,opt,name=NodesFilter" json:"NodesFilter,omitempty"`
// User Filter (deprecated in favor of IdmSelector)
UsersFilter *UsersSelector `protobuf:"bytes,5,opt,name=UsersFilter" json:"UsersFilter,omitempty"`
// Idm objects collector
IdmSelector *IdmSelector `protobuf:"bytes,9,opt,name=IdmSelector" json:"IdmSelector,omitempty"`
// Idm objects filter
IdmFilter *IdmSelector `protobuf:"bytes,10,opt,name=IdmFilter" json:"IdmFilter,omitempty"`
// Previous action output filter
ActionOutputFilter *ActionOutputFilter `protobuf:"bytes,6,opt,name=ActionOutputFilter" json:"ActionOutputFilter,omitempty"`
// Metadata policy-based filter
ContextMetaFilter *ContextMetaFilter `protobuf:"bytes,11,opt,name=ContextMetaFilter" json:"ContextMetaFilter,omitempty"`
// Defined parameters for this action
Parameters map[string]string `protobuf:"bytes,7,rep,name=Parameters" json:"Parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// Other actions to perform after this one is finished,
// using the Output of this action as Input for the next.
// If there are many, it is considered they can be triggered
// in parallel
ChainedActions []*Action `protobuf:"bytes,8,rep,name=ChainedActions" json:"ChainedActions,omitempty"`
// If any Filter is used, next actions can be triggered on Failure
// This adds ability to create conditional Yes/No branches
FailedFilterActions []*Action `protobuf:"bytes,12,rep,name=FailedFilterActions" json:"FailedFilterActions,omitempty"`
}
func (m *Action) Reset() { *m = Action{} }
func (m *Action) String() string { return proto.CompactTextString(m) }
func (*Action) ProtoMessage() {}
func (*Action) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *Action) GetID() string {
if m != nil {
return m.ID
}
return ""
}
func (m *Action) GetLabel() string {
if m != nil {
return m.Label
}
return ""
}
func (m *Action) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *Action) GetBypass() bool {
if m != nil {
return m.Bypass
}
return false
}
func (m *Action) GetBreakAfter() bool {
if m != nil {
return m.BreakAfter
}
return false
}
func (m *Action) GetNodesSelector() *NodesSelector {
if m != nil {
return m.NodesSelector
}
return nil
}
func (m *Action) GetUsersSelector() *UsersSelector {
if m != nil {
return m.UsersSelector
}
return nil
}
func (m *Action) GetNodesFilter() *NodesSelector {
if m != nil {
return m.NodesFilter
}
return nil
}
func (m *Action) GetUsersFilter() *UsersSelector {
if m != nil {
return m.UsersFilter
}
return nil
}
func (m *Action) GetIdmSelector() *IdmSelector {
if m != nil {
return m.IdmSelector
}
return nil
}
func (m *Action) GetIdmFilter() *IdmSelector {
if m != nil {
return m.IdmFilter
}
return nil
}
func (m *Action) GetActionOutputFilter() *ActionOutputFilter {
if m != nil {
return m.ActionOutputFilter
}
return nil
}
func (m *Action) GetContextMetaFilter() *ContextMetaFilter {
if m != nil {
return m.ContextMetaFilter
}
return nil
}
func (m *Action) GetParameters() map[string]string {
if m != nil {
return m.Parameters
}
return nil
}
func (m *Action) GetChainedActions() []*Action {
if m != nil {
return m.ChainedActions
}
return nil
}
func (m *Action) GetFailedFilterActions() []*Action {
if m != nil {
return m.FailedFilterActions
}
return nil
}
type Job struct {
// Unique ID for this Job
ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
// Human-readable Label
Label string `protobuf:"bytes,2,opt,name=Label" json:"Label,omitempty"`
// Who created this Job
Owner string `protobuf:"bytes,3,opt,name=Owner" json:"Owner,omitempty"`
// Admin can temporarily disable this job
Inactive bool `protobuf:"varint,4,opt,name=Inactive" json:"Inactive,omitempty"`
// Job created by application or by administrator
Custom bool `protobuf:"varint,20,opt,name=Custom" json:"Custom,omitempty"`
// Optional list of languages detected in the context at launch time
Languages []string `protobuf:"bytes,10,rep,name=Languages" json:"Languages,omitempty"`
// How the job will be triggered.
// One of these must be set (not exclusive)
// Listen to a given set of events
EventNames []string `protobuf:"bytes,5,rep,name=EventNames" json:"EventNames,omitempty"`
// Schedule a periodic repetition
Schedule *Schedule `protobuf:"bytes,6,opt,name=Schedule" json:"Schedule,omitempty"`
// Start task as soon as job is inserted
AutoStart bool `protobuf:"varint,7,opt,name=AutoStart" json:"AutoStart,omitempty"`
// Remove job automatically once it is finished (success only)
AutoClean bool `protobuf:"varint,11,opt,name=AutoClean" json:"AutoClean,omitempty"`
// Chain of actions to perform
Actions []*Action `protobuf:"bytes,8,rep,name=Actions" json:"Actions,omitempty"`
// Task properties
MaxConcurrency int32 `protobuf:"varint,9,opt,name=MaxConcurrency" json:"MaxConcurrency,omitempty"`
// Do not send notification on task update
TasksSilentUpdate bool `protobuf:"varint,12,opt,name=TasksSilentUpdate" json:"TasksSilentUpdate,omitempty"`
// Filled with currently running tasks
Tasks []*Task `protobuf:"bytes,14,rep,name=Tasks" json:"Tasks,omitempty"`
// Filter out specific events
NodeEventFilter *NodesSelector `protobuf:"bytes,15,opt,name=NodeEventFilter" json:"NodeEventFilter,omitempty"`
// Deprecated in favor of more generic IdmSelector
UserEventFilter *UsersSelector `protobuf:"bytes,16,opt,name=UserEventFilter" json:"UserEventFilter,omitempty"`
// Idm objects filter
IdmFilter *IdmSelector `protobuf:"bytes,17,opt,name=IdmFilter" json:"IdmFilter,omitempty"`
// Event Context Filter
ContextMetaFilter *ContextMetaFilter `protobuf:"bytes,18,opt,name=ContextMetaFilter" json:"ContextMetaFilter,omitempty"`
// Job-level parameters that can be passed to underlying actions
Parameters []*JobParameter `protobuf:"bytes,19,rep,name=Parameters" json:"Parameters,omitempty"`
}
func (m *Job) Reset() { *m = Job{} }
func (m *Job) String() string { return proto.CompactTextString(m) }
func (*Job) ProtoMessage() {}
func (*Job) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *Job) GetID() string {
if m != nil {
return m.ID
}
return ""
}
func (m *Job) GetLabel() string {
if m != nil {
return m.Label
}
return ""
}
func (m *Job) GetOwner() string {
if m != nil {
return m.Owner
}
return ""
}
func (m *Job) GetInactive() bool {
if m != nil {
return m.Inactive
}
return false
}
func (m *Job) GetCustom() bool {
if m != nil {
return m.Custom
}
return false
}
func (m *Job) GetLanguages() []string {
if m != nil {
return m.Languages
}
return nil
}
func (m *Job) GetEventNames() []string {
if m != nil {
return m.EventNames
}
return nil
}
func (m *Job) GetSchedule() *Schedule {
if m != nil {
return m.Schedule
}
return nil
}
func (m *Job) GetAutoStart() bool {
if m != nil {
return m.AutoStart
}
return false
}
func (m *Job) GetAutoClean() bool {
if m != nil {
return m.AutoClean
}
return false
}
func (m *Job) GetActions() []*Action {
if m != nil {
return m.Actions
}
return nil
}
func (m *Job) GetMaxConcurrency() int32 {
if m != nil {
return m.MaxConcurrency
}
return 0
}
func (m *Job) GetTasksSilentUpdate() bool {
if m != nil {
return m.TasksSilentUpdate
}
return false
}
func (m *Job) GetTasks() []*Task {
if m != nil {
return m.Tasks
}
return nil
}
func (m *Job) GetNodeEventFilter() *NodesSelector {
if m != nil {
return m.NodeEventFilter
}
return nil
}
func (m *Job) GetUserEventFilter() *UsersSelector {
if m != nil {
return m.UserEventFilter
}
return nil
}
func (m *Job) GetIdmFilter() *IdmSelector {
if m != nil {
return m.IdmFilter
}
return nil
}
func (m *Job) GetContextMetaFilter() *ContextMetaFilter {
if m != nil {
return m.ContextMetaFilter
}
return nil
}
func (m *Job) GetParameters() []*JobParameter {
if m != nil {
return m.Parameters
}
return nil
}
type JobParameter struct {
// Parameter name
Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
// Additional description
Description string `protobuf:"bytes,2,opt,name=Description" json:"Description,omitempty"`
// Value saved for this parameter
Value string `protobuf:"bytes,4,opt,name=Value" json:"Value,omitempty"`
// If mandatory, job cannot start without a value
Mandatory bool `protobuf:"varint,3,opt,name=Mandatory" json:"Mandatory,omitempty"`
// Parameter type used in GUI forms
Type string `protobuf:"bytes,5,opt,name=Type" json:"Type,omitempty"`
// Additional data used by GUI elements
JsonChoices string `protobuf:"bytes,6,opt,name=JsonChoices" json:"JsonChoices,omitempty"`
}
func (m *JobParameter) Reset() { *m = JobParameter{} }
func (m *JobParameter) String() string { return proto.CompactTextString(m) }
func (*JobParameter) ProtoMessage() {}
func (*JobParameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *JobParameter) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *JobParameter) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *JobParameter) GetValue() string {
if m != nil {
return m.Value
}
return ""
}
func (m *JobParameter) GetMandatory() bool {
if m != nil {
return m.Mandatory
}
return false
}
func (m *JobParameter) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *JobParameter) GetJsonChoices() string {
if m != nil {
return m.JsonChoices
}
return ""
}
// Events sent by the JobService when CRUD'ing a Job configuration
type JobChangeEvent struct {
JobUpdated *Job `protobuf:"bytes,1,opt,name=JobUpdated" json:"JobUpdated,omitempty"`
JobRemoved string `protobuf:"bytes,2,opt,name=JobRemoved" json:"JobRemoved,omitempty"`
}
func (m *JobChangeEvent) Reset() { *m = JobChangeEvent{} }
func (m *JobChangeEvent) String() string { return proto.CompactTextString(m) }
func (*JobChangeEvent) ProtoMessage() {}
func (*JobChangeEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *JobChangeEvent) GetJobUpdated() *Job {
if m != nil {
return m.JobUpdated
}
return nil
}
func (m *JobChangeEvent) GetJobRemoved() string {
if m != nil {
return m.JobRemoved
}
return ""
}
type TaskChangeEvent struct {
TaskUpdated *Task `protobuf:"bytes,1,opt,name=TaskUpdated" json:"TaskUpdated,omitempty"`
Job *Job `protobuf:"bytes,2,opt,name=Job" json:"Job,omitempty"`
}
func (m *TaskChangeEvent) Reset() { *m = TaskChangeEvent{} }
func (m *TaskChangeEvent) String() string { return proto.CompactTextString(m) }
func (*TaskChangeEvent) ProtoMessage() {}
func (*TaskChangeEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *TaskChangeEvent) GetTaskUpdated() *Task {
if m != nil {
return m.TaskUpdated
}
return nil
}
func (m *TaskChangeEvent) GetJob() *Job {
if m != nil {
return m.Job
}
return nil
}
type PutJobRequest struct {
Job *Job `protobuf:"bytes,1,opt,name=Job" json:"Job,omitempty"`
}
func (m *PutJobRequest) Reset() { *m = PutJobRequest{} }
func (m *PutJobRequest) String() string { return proto.CompactTextString(m) }
func (*PutJobRequest) ProtoMessage() {}
func (*PutJobRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
func (m *PutJobRequest) GetJob() *Job {
if m != nil {
return m.Job
}
return nil
}
type PutJobResponse struct {
Job *Job `protobuf:"bytes,1,opt,name=Job" json:"Job,omitempty"`
}
func (m *PutJobResponse) Reset() { *m = PutJobResponse{} }