/
job.pb.go
executable file
·2627 lines (2358 loc) · 109 KB
/
job.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.30.0
// protoc v3.21.12
// source: google/cloud/batch/v1/job.proto
package batchpb
import (
reflect "reflect"
sync "sync"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// The destination (if any) for logs.
type LogsPolicy_Destination int32
const (
// Logs are not preserved.
LogsPolicy_DESTINATION_UNSPECIFIED LogsPolicy_Destination = 0
// Logs are streamed to Cloud Logging.
LogsPolicy_CLOUD_LOGGING LogsPolicy_Destination = 1
// Logs are saved to a file path.
LogsPolicy_PATH LogsPolicy_Destination = 2
)
// Enum value maps for LogsPolicy_Destination.
var (
LogsPolicy_Destination_name = map[int32]string{
0: "DESTINATION_UNSPECIFIED",
1: "CLOUD_LOGGING",
2: "PATH",
}
LogsPolicy_Destination_value = map[string]int32{
"DESTINATION_UNSPECIFIED": 0,
"CLOUD_LOGGING": 1,
"PATH": 2,
}
)
func (x LogsPolicy_Destination) Enum() *LogsPolicy_Destination {
p := new(LogsPolicy_Destination)
*p = x
return p
}
func (x LogsPolicy_Destination) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (LogsPolicy_Destination) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_batch_v1_job_proto_enumTypes[0].Descriptor()
}
func (LogsPolicy_Destination) Type() protoreflect.EnumType {
return &file_google_cloud_batch_v1_job_proto_enumTypes[0]
}
func (x LogsPolicy_Destination) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use LogsPolicy_Destination.Descriptor instead.
func (LogsPolicy_Destination) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{1, 0}
}
// Valid Job states.
type JobStatus_State int32
const (
JobStatus_STATE_UNSPECIFIED JobStatus_State = 0
// Job is admitted (validated and persisted) and waiting for resources.
JobStatus_QUEUED JobStatus_State = 1
// Job is scheduled to run as soon as resource allocation is ready.
// The resource allocation may happen at a later time but with a high
// chance to succeed.
JobStatus_SCHEDULED JobStatus_State = 2
// Resource allocation has been successful. At least one Task in the Job is
// RUNNING.
JobStatus_RUNNING JobStatus_State = 3
// All Tasks in the Job have finished successfully.
JobStatus_SUCCEEDED JobStatus_State = 4
// At least one Task in the Job has failed.
JobStatus_FAILED JobStatus_State = 5
// The Job will be deleted, but has not been deleted yet. Typically this is
// because resources used by the Job are still being cleaned up.
JobStatus_DELETION_IN_PROGRESS JobStatus_State = 6
)
// Enum value maps for JobStatus_State.
var (
JobStatus_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "QUEUED",
2: "SCHEDULED",
3: "RUNNING",
4: "SUCCEEDED",
5: "FAILED",
6: "DELETION_IN_PROGRESS",
}
JobStatus_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"QUEUED": 1,
"SCHEDULED": 2,
"RUNNING": 3,
"SUCCEEDED": 4,
"FAILED": 5,
"DELETION_IN_PROGRESS": 6,
}
)
func (x JobStatus_State) Enum() *JobStatus_State {
p := new(JobStatus_State)
*p = x
return p
}
func (x JobStatus_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (JobStatus_State) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_batch_v1_job_proto_enumTypes[1].Descriptor()
}
func (JobStatus_State) Type() protoreflect.EnumType {
return &file_google_cloud_batch_v1_job_proto_enumTypes[1]
}
func (x JobStatus_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use JobStatus_State.Descriptor instead.
func (JobStatus_State) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{2, 0}
}
// The message type.
type JobNotification_Type int32
const (
// Unspecified.
JobNotification_TYPE_UNSPECIFIED JobNotification_Type = 0
// Notify users that the job state has changed.
JobNotification_JOB_STATE_CHANGED JobNotification_Type = 1
// Notify users that the task state has changed.
JobNotification_TASK_STATE_CHANGED JobNotification_Type = 2
)
// Enum value maps for JobNotification_Type.
var (
JobNotification_Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "JOB_STATE_CHANGED",
2: "TASK_STATE_CHANGED",
}
JobNotification_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"JOB_STATE_CHANGED": 1,
"TASK_STATE_CHANGED": 2,
}
)
func (x JobNotification_Type) Enum() *JobNotification_Type {
p := new(JobNotification_Type)
*p = x
return p
}
func (x JobNotification_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (JobNotification_Type) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_batch_v1_job_proto_enumTypes[2].Descriptor()
}
func (JobNotification_Type) Type() protoreflect.EnumType {
return &file_google_cloud_batch_v1_job_proto_enumTypes[2]
}
func (x JobNotification_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use JobNotification_Type.Descriptor instead.
func (JobNotification_Type) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{3, 0}
}
// Compute Engine VM instance provisioning model.
type AllocationPolicy_ProvisioningModel int32
const (
// Unspecified.
AllocationPolicy_PROVISIONING_MODEL_UNSPECIFIED AllocationPolicy_ProvisioningModel = 0
// Standard VM.
AllocationPolicy_STANDARD AllocationPolicy_ProvisioningModel = 1
// SPOT VM.
AllocationPolicy_SPOT AllocationPolicy_ProvisioningModel = 2
// Preemptible VM (PVM).
//
// Above SPOT VM is the preferable model for preemptible VM instances: the
// old preemptible VM model (indicated by this field) is the older model,
// and has been migrated to use the SPOT model as the underlying technology.
// This old model will still be supported.
AllocationPolicy_PREEMPTIBLE AllocationPolicy_ProvisioningModel = 3
)
// Enum value maps for AllocationPolicy_ProvisioningModel.
var (
AllocationPolicy_ProvisioningModel_name = map[int32]string{
0: "PROVISIONING_MODEL_UNSPECIFIED",
1: "STANDARD",
2: "SPOT",
3: "PREEMPTIBLE",
}
AllocationPolicy_ProvisioningModel_value = map[string]int32{
"PROVISIONING_MODEL_UNSPECIFIED": 0,
"STANDARD": 1,
"SPOT": 2,
"PREEMPTIBLE": 3,
}
)
func (x AllocationPolicy_ProvisioningModel) Enum() *AllocationPolicy_ProvisioningModel {
p := new(AllocationPolicy_ProvisioningModel)
*p = x
return p
}
func (x AllocationPolicy_ProvisioningModel) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AllocationPolicy_ProvisioningModel) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_batch_v1_job_proto_enumTypes[3].Descriptor()
}
func (AllocationPolicy_ProvisioningModel) Type() protoreflect.EnumType {
return &file_google_cloud_batch_v1_job_proto_enumTypes[3]
}
func (x AllocationPolicy_ProvisioningModel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AllocationPolicy_ProvisioningModel.Descriptor instead.
func (AllocationPolicy_ProvisioningModel) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4, 0}
}
// The Cloud Batch Job description.
type Job struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Output only. Job name.
// For example: "projects/123456/locations/us-central1/jobs/job01".
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. A system generated unique ID (in UUID4 format) for the Job.
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
// Priority of the Job.
// The valid value range is [0, 100). Default value is 0.
// Higher value indicates higher priority.
// A job with higher priority value is more likely to run earlier if all other
// requirements are satisfied.
Priority int64 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"`
// Required. TaskGroups in the Job. Only one TaskGroup is supported now.
TaskGroups []*TaskGroup `protobuf:"bytes,4,rep,name=task_groups,json=taskGroups,proto3" json:"task_groups,omitempty"`
// Compute resource allocation for all TaskGroups in the Job.
AllocationPolicy *AllocationPolicy `protobuf:"bytes,7,opt,name=allocation_policy,json=allocationPolicy,proto3" json:"allocation_policy,omitempty"`
// Labels for the Job. Labels could be user provided or system generated.
// For example,
// "labels": {
// "department": "finance",
// "environment": "test"
// }
// You can assign up to 64 labels. [Google Compute Engine label
// restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
// apply.
// Label names that start with "goog-" or "google-" are reserved.
Labels map[string]string `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Output only. Job status. It is read only for users.
Status *JobStatus `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"`
// Output only. When the Job was created.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The last time the Job was updated.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// Log preservation policy for the Job.
LogsPolicy *LogsPolicy `protobuf:"bytes,13,opt,name=logs_policy,json=logsPolicy,proto3" json:"logs_policy,omitempty"`
// Notification configurations.
Notifications []*JobNotification `protobuf:"bytes,14,rep,name=notifications,proto3" json:"notifications,omitempty"`
}
func (x *Job) Reset() {
*x = Job{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Job) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Job) ProtoMessage() {}
func (x *Job) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Job.ProtoReflect.Descriptor instead.
func (*Job) Descriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{0}
}
func (x *Job) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Job) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *Job) GetPriority() int64 {
if x != nil {
return x.Priority
}
return 0
}
func (x *Job) GetTaskGroups() []*TaskGroup {
if x != nil {
return x.TaskGroups
}
return nil
}
func (x *Job) GetAllocationPolicy() *AllocationPolicy {
if x != nil {
return x.AllocationPolicy
}
return nil
}
func (x *Job) GetLabels() map[string]string {
if x != nil {
return x.Labels
}
return nil
}
func (x *Job) GetStatus() *JobStatus {
if x != nil {
return x.Status
}
return nil
}
func (x *Job) GetCreateTime() *timestamppb.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
func (x *Job) GetUpdateTime() *timestamppb.Timestamp {
if x != nil {
return x.UpdateTime
}
return nil
}
func (x *Job) GetLogsPolicy() *LogsPolicy {
if x != nil {
return x.LogsPolicy
}
return nil
}
func (x *Job) GetNotifications() []*JobNotification {
if x != nil {
return x.Notifications
}
return nil
}
// LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be
// preserved.
type LogsPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Where logs should be saved.
Destination LogsPolicy_Destination `protobuf:"varint,1,opt,name=destination,proto3,enum=google.cloud.batch.v1.LogsPolicy_Destination" json:"destination,omitempty"`
// The path to which logs are saved when the destination = PATH. This can be a
// local file path on the VM, or under the mount point of a Persistent Disk or
// Filestore, or a Cloud Storage path.
LogsPath string `protobuf:"bytes,2,opt,name=logs_path,json=logsPath,proto3" json:"logs_path,omitempty"`
}
func (x *LogsPolicy) Reset() {
*x = LogsPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LogsPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LogsPolicy) ProtoMessage() {}
func (x *LogsPolicy) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LogsPolicy.ProtoReflect.Descriptor instead.
func (*LogsPolicy) Descriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{1}
}
func (x *LogsPolicy) GetDestination() LogsPolicy_Destination {
if x != nil {
return x.Destination
}
return LogsPolicy_DESTINATION_UNSPECIFIED
}
func (x *LogsPolicy) GetLogsPath() string {
if x != nil {
return x.LogsPath
}
return ""
}
// Job status.
type JobStatus struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Job state
State JobStatus_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.batch.v1.JobStatus_State" json:"state,omitempty"`
// Job status events
StatusEvents []*StatusEvent `protobuf:"bytes,2,rep,name=status_events,json=statusEvents,proto3" json:"status_events,omitempty"`
// Aggregated task status for each TaskGroup in the Job.
// The map key is TaskGroup ID.
TaskGroups map[string]*JobStatus_TaskGroupStatus `protobuf:"bytes,4,rep,name=task_groups,json=taskGroups,proto3" json:"task_groups,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// The duration of time that the Job spent in status RUNNING.
RunDuration *durationpb.Duration `protobuf:"bytes,5,opt,name=run_duration,json=runDuration,proto3" json:"run_duration,omitempty"`
}
func (x *JobStatus) Reset() {
*x = JobStatus{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *JobStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*JobStatus) ProtoMessage() {}
func (x *JobStatus) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use JobStatus.ProtoReflect.Descriptor instead.
func (*JobStatus) Descriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{2}
}
func (x *JobStatus) GetState() JobStatus_State {
if x != nil {
return x.State
}
return JobStatus_STATE_UNSPECIFIED
}
func (x *JobStatus) GetStatusEvents() []*StatusEvent {
if x != nil {
return x.StatusEvents
}
return nil
}
func (x *JobStatus) GetTaskGroups() map[string]*JobStatus_TaskGroupStatus {
if x != nil {
return x.TaskGroups
}
return nil
}
func (x *JobStatus) GetRunDuration() *durationpb.Duration {
if x != nil {
return x.RunDuration
}
return nil
}
// Notification configurations.
type JobNotification struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The Pub/Sub topic where notifications like the job state changes
// will be published. This topic exist in the same project as the job
// and billings will be charged to this project.
// If not specified, no Pub/Sub messages will be sent.
// Topic format: `projects/{project}/topics/{topic}`.
PubsubTopic string `protobuf:"bytes,1,opt,name=pubsub_topic,json=pubsubTopic,proto3" json:"pubsub_topic,omitempty"`
// The attribute requirements of messages to be sent to this Pub/Sub topic.
// Without this field, no message will be sent.
Message *JobNotification_Message `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *JobNotification) Reset() {
*x = JobNotification{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *JobNotification) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*JobNotification) ProtoMessage() {}
func (x *JobNotification) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use JobNotification.ProtoReflect.Descriptor instead.
func (*JobNotification) Descriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{3}
}
func (x *JobNotification) GetPubsubTopic() string {
if x != nil {
return x.PubsubTopic
}
return ""
}
func (x *JobNotification) GetMessage() *JobNotification_Message {
if x != nil {
return x.Message
}
return nil
}
// A Job's resource allocation policy describes when, where, and how compute
// resources should be allocated for the Job.
type AllocationPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Location where compute resources should be allocated for the Job.
Location *AllocationPolicy_LocationPolicy `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
// Describe instances that can be created by this AllocationPolicy.
// Only instances[0] is supported now.
Instances []*AllocationPolicy_InstancePolicyOrTemplate `protobuf:"bytes,8,rep,name=instances,proto3" json:"instances,omitempty"`
// Service account that VMs will run as.
ServiceAccount *ServiceAccount `protobuf:"bytes,9,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"`
// Labels applied to all VM instances and other resources
// created by AllocationPolicy.
// Labels could be user provided or system generated.
// You can assign up to 64 labels. [Google Compute Engine label
// restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
// apply.
// Label names that start with "goog-" or "google-" are reserved.
Labels map[string]string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// The network policy.
Network *AllocationPolicy_NetworkPolicy `protobuf:"bytes,7,opt,name=network,proto3" json:"network,omitempty"`
// The placement policy.
Placement *AllocationPolicy_PlacementPolicy `protobuf:"bytes,10,opt,name=placement,proto3" json:"placement,omitempty"`
}
func (x *AllocationPolicy) Reset() {
*x = AllocationPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AllocationPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AllocationPolicy) ProtoMessage() {}
func (x *AllocationPolicy) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AllocationPolicy.ProtoReflect.Descriptor instead.
func (*AllocationPolicy) Descriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{4}
}
func (x *AllocationPolicy) GetLocation() *AllocationPolicy_LocationPolicy {
if x != nil {
return x.Location
}
return nil
}
func (x *AllocationPolicy) GetInstances() []*AllocationPolicy_InstancePolicyOrTemplate {
if x != nil {
return x.Instances
}
return nil
}
func (x *AllocationPolicy) GetServiceAccount() *ServiceAccount {
if x != nil {
return x.ServiceAccount
}
return nil
}
func (x *AllocationPolicy) GetLabels() map[string]string {
if x != nil {
return x.Labels
}
return nil
}
func (x *AllocationPolicy) GetNetwork() *AllocationPolicy_NetworkPolicy {
if x != nil {
return x.Network
}
return nil
}
func (x *AllocationPolicy) GetPlacement() *AllocationPolicy_PlacementPolicy {
if x != nil {
return x.Placement
}
return nil
}
// A TaskGroup contains one or multiple Tasks that share the same
// Runnable but with different runtime parameters.
type TaskGroup struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Output only. TaskGroup name.
// The system generates this field based on parent Job name.
// For example:
// "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01".
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. Tasks in the group share the same task spec.
TaskSpec *TaskSpec `protobuf:"bytes,3,opt,name=task_spec,json=taskSpec,proto3" json:"task_spec,omitempty"`
// Number of Tasks in the TaskGroup.
// Default is 1.
TaskCount int64 `protobuf:"varint,4,opt,name=task_count,json=taskCount,proto3" json:"task_count,omitempty"`
// Max number of tasks that can run in parallel.
// Default to min(task_count, 1000).
// Field parallelism must be 1 if the scheduling_policy is IN_ORDER.
Parallelism int64 `protobuf:"varint,5,opt,name=parallelism,proto3" json:"parallelism,omitempty"`
// An array of environment variable mappings, which are passed to Tasks with
// matching indices. If task_environments is used then task_count should
// not be specified in the request (and will be ignored). Task count will be
// the length of task_environments.
//
// Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in
// addition to any environment variables set in task_environments, specifying
// the number of Tasks in the Task's parent TaskGroup, and the specific Task's
// index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).
//
// task_environments supports up to 200 entries.
TaskEnvironments []*Environment `protobuf:"bytes,9,rep,name=task_environments,json=taskEnvironments,proto3" json:"task_environments,omitempty"`
// Max number of tasks that can be run on a VM at the same time.
// If not specified, the system will decide a value based on available
// compute resources on a VM and task requirements.
TaskCountPerNode int64 `protobuf:"varint,10,opt,name=task_count_per_node,json=taskCountPerNode,proto3" json:"task_count_per_node,omitempty"`
// When true, Batch will populate a file with a list of all VMs assigned to
// the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path
// of that file. Defaults to false.
RequireHostsFile bool `protobuf:"varint,11,opt,name=require_hosts_file,json=requireHostsFile,proto3" json:"require_hosts_file,omitempty"`
// When true, Batch will configure SSH to allow passwordless login between
// VMs running the Batch tasks in the same TaskGroup.
PermissiveSsh bool `protobuf:"varint,12,opt,name=permissive_ssh,json=permissiveSsh,proto3" json:"permissive_ssh,omitempty"`
}
func (x *TaskGroup) Reset() {
*x = TaskGroup{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TaskGroup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TaskGroup) ProtoMessage() {}
func (x *TaskGroup) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TaskGroup.ProtoReflect.Descriptor instead.
func (*TaskGroup) Descriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{5}
}
func (x *TaskGroup) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *TaskGroup) GetTaskSpec() *TaskSpec {
if x != nil {
return x.TaskSpec
}
return nil
}
func (x *TaskGroup) GetTaskCount() int64 {
if x != nil {
return x.TaskCount
}
return 0
}
func (x *TaskGroup) GetParallelism() int64 {
if x != nil {
return x.Parallelism
}
return 0
}
func (x *TaskGroup) GetTaskEnvironments() []*Environment {
if x != nil {
return x.TaskEnvironments
}
return nil
}
func (x *TaskGroup) GetTaskCountPerNode() int64 {
if x != nil {
return x.TaskCountPerNode
}
return 0
}
func (x *TaskGroup) GetRequireHostsFile() bool {
if x != nil {
return x.RequireHostsFile
}
return false
}
func (x *TaskGroup) GetPermissiveSsh() bool {
if x != nil {
return x.PermissiveSsh
}
return false
}
// Carries information about a Google Cloud service account.
type ServiceAccount struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Email address of the service account. If not specified, the default
// Compute Engine service account for the project will be used. If instance
// template is being used, the service account has to be specified in the
// instance template and it has to match the email field here.
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
// List of scopes to be enabled for this service account on the VM, in
// addition to the cloud-platform API scope that will be added by default.
Scopes []string `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"`
}
func (x *ServiceAccount) Reset() {
*x = ServiceAccount{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceAccount) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceAccount) ProtoMessage() {}
func (x *ServiceAccount) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ServiceAccount.ProtoReflect.Descriptor instead.
func (*ServiceAccount) Descriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{6}
}
func (x *ServiceAccount) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *ServiceAccount) GetScopes() []string {
if x != nil {
return x.Scopes
}
return nil
}
// VM instance status.
type JobStatus_InstanceStatus struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The Compute Engine machine type.
MachineType string `protobuf:"bytes,1,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"`
// The VM instance provisioning model.
ProvisioningModel AllocationPolicy_ProvisioningModel `protobuf:"varint,2,opt,name=provisioning_model,json=provisioningModel,proto3,enum=google.cloud.batch.v1.AllocationPolicy_ProvisioningModel" json:"provisioning_model,omitempty"`
// The max number of tasks can be assigned to this instance type.
TaskPack int64 `protobuf:"varint,3,opt,name=task_pack,json=taskPack,proto3" json:"task_pack,omitempty"`
// The VM boot disk.
BootDisk *AllocationPolicy_Disk `protobuf:"bytes,4,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"`
}
func (x *JobStatus_InstanceStatus) Reset() {
*x = JobStatus_InstanceStatus{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *JobStatus_InstanceStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*JobStatus_InstanceStatus) ProtoMessage() {}
func (x *JobStatus_InstanceStatus) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_batch_v1_job_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use JobStatus_InstanceStatus.ProtoReflect.Descriptor instead.
func (*JobStatus_InstanceStatus) Descriptor() ([]byte, []int) {
return file_google_cloud_batch_v1_job_proto_rawDescGZIP(), []int{2, 0}
}
func (x *JobStatus_InstanceStatus) GetMachineType() string {
if x != nil {
return x.MachineType
}
return ""
}
func (x *JobStatus_InstanceStatus) GetProvisioningModel() AllocationPolicy_ProvisioningModel {
if x != nil {
return x.ProvisioningModel
}
return AllocationPolicy_PROVISIONING_MODEL_UNSPECIFIED
}
func (x *JobStatus_InstanceStatus) GetTaskPack() int64 {
if x != nil {
return x.TaskPack
}
return 0
}