google-cloud-batch-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/LICENSE.md +201 -0
- data/README.md +141 -0
- data/lib/google/cloud/batch/v1/batch_pb.rb +84 -0
- data/lib/google/cloud/batch/v1/batch_service/client.rb +994 -0
- data/lib/google/cloud/batch/v1/batch_service/credentials.rb +47 -0
- data/lib/google/cloud/batch/v1/batch_service/operations.rb +767 -0
- data/lib/google/cloud/batch/v1/batch_service/paths.rb +113 -0
- data/lib/google/cloud/batch/v1/batch_service.rb +52 -0
- data/lib/google/cloud/batch/v1/batch_services_pb.rb +57 -0
- data/lib/google/cloud/batch/v1/job_pb.rb +170 -0
- data/lib/google/cloud/batch/v1/task_pb.rb +121 -0
- data/lib/google/cloud/batch/v1/version.rb +28 -0
- data/lib/google/cloud/batch/v1/volume_pb.rb +37 -0
- data/lib/google/cloud/batch/v1.rb +40 -0
- data/lib/google-cloud-batch-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/batch/v1/batch.rb +209 -0
- data/proto_docs/google/cloud/batch/v1/job.rb +490 -0
- data/proto_docs/google/cloud/batch/v1/task.rb +329 -0
- data/proto_docs/google/cloud/batch/v1/volume.rb +78 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +266 -0
@@ -0,0 +1,113 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Batch
|
23
|
+
module V1
|
24
|
+
module BatchService
|
25
|
+
# Path helper methods for the BatchService API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Job resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/jobs/{job}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param job [String]
|
37
|
+
#
|
38
|
+
# @return [::String]
|
39
|
+
def job_path project:, location:, job:
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
|
+
|
43
|
+
"projects/#{project}/locations/#{location}/jobs/#{job}"
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Create a fully-qualified Location resource string.
|
48
|
+
#
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `projects/{project}/locations/{location}`
|
52
|
+
#
|
53
|
+
# @param project [String]
|
54
|
+
# @param location [String]
|
55
|
+
#
|
56
|
+
# @return [::String]
|
57
|
+
def location_path project:, location:
|
58
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
59
|
+
|
60
|
+
"projects/#{project}/locations/#{location}"
|
61
|
+
end
|
62
|
+
|
63
|
+
##
|
64
|
+
# Create a fully-qualified Task resource string.
|
65
|
+
#
|
66
|
+
# The resource will be in the following format:
|
67
|
+
#
|
68
|
+
# `projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}/tasks/{task}`
|
69
|
+
#
|
70
|
+
# @param project [String]
|
71
|
+
# @param location [String]
|
72
|
+
# @param job [String]
|
73
|
+
# @param task_group [String]
|
74
|
+
# @param task [String]
|
75
|
+
#
|
76
|
+
# @return [::String]
|
77
|
+
def task_path project:, location:, job:, task_group:, task:
|
78
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
79
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
80
|
+
raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/"
|
81
|
+
raise ::ArgumentError, "task_group cannot contain /" if task_group.to_s.include? "/"
|
82
|
+
|
83
|
+
"projects/#{project}/locations/#{location}/jobs/#{job}/taskGroups/#{task_group}/tasks/#{task}"
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Create a fully-qualified TaskGroup resource string.
|
88
|
+
#
|
89
|
+
# The resource will be in the following format:
|
90
|
+
#
|
91
|
+
# `projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}`
|
92
|
+
#
|
93
|
+
# @param project [String]
|
94
|
+
# @param location [String]
|
95
|
+
# @param job [String]
|
96
|
+
# @param task_group [String]
|
97
|
+
#
|
98
|
+
# @return [::String]
|
99
|
+
def task_group_path project:, location:, job:, task_group:
|
100
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
101
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
102
|
+
raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/"
|
103
|
+
|
104
|
+
"projects/#{project}/locations/#{location}/jobs/#{job}/taskGroups/#{task_group}"
|
105
|
+
end
|
106
|
+
|
107
|
+
extend self
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/batch/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/batch/v1/batch_service/credentials"
|
26
|
+
require "google/cloud/batch/v1/batch_service/paths"
|
27
|
+
require "google/cloud/batch/v1/batch_service/operations"
|
28
|
+
require "google/cloud/batch/v1/batch_service/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module Batch
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# Google Batch Service.
|
36
|
+
# The service manages user submitted batch jobs and allocates Google Compute
|
37
|
+
# Engine VM instances to run the jobs.
|
38
|
+
#
|
39
|
+
# To load this service and instantiate a client:
|
40
|
+
#
|
41
|
+
# require "google/cloud/batch/v1/batch_service"
|
42
|
+
# client = ::Google::Cloud::Batch::V1::BatchService::Client.new
|
43
|
+
#
|
44
|
+
module BatchService
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
helper_path = ::File.join __dir__, "batch_service", "helpers.rb"
|
52
|
+
require "google/cloud/batch/v1/batch_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/batch/v1/batch.proto for package 'Google.Cloud.Batch.V1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2022 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/cloud/batch/v1/batch_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Batch
|
25
|
+
module V1
|
26
|
+
module BatchService
|
27
|
+
# Google Batch Service.
|
28
|
+
# The service manages user submitted batch jobs and allocates Google Compute
|
29
|
+
# Engine VM instances to run the jobs.
|
30
|
+
class Service
|
31
|
+
|
32
|
+
include ::GRPC::GenericService
|
33
|
+
|
34
|
+
self.marshal_class_method = :encode
|
35
|
+
self.unmarshal_class_method = :decode
|
36
|
+
self.service_name = 'google.cloud.batch.v1.BatchService'
|
37
|
+
|
38
|
+
# Create a Job.
|
39
|
+
rpc :CreateJob, ::Google::Cloud::Batch::V1::CreateJobRequest, ::Google::Cloud::Batch::V1::Job
|
40
|
+
# Get a Job specified by its resource name.
|
41
|
+
rpc :GetJob, ::Google::Cloud::Batch::V1::GetJobRequest, ::Google::Cloud::Batch::V1::Job
|
42
|
+
# Delete a Job.
|
43
|
+
rpc :DeleteJob, ::Google::Cloud::Batch::V1::DeleteJobRequest, ::Google::Longrunning::Operation
|
44
|
+
# List all Jobs for a project within a region.
|
45
|
+
rpc :ListJobs, ::Google::Cloud::Batch::V1::ListJobsRequest, ::Google::Cloud::Batch::V1::ListJobsResponse
|
46
|
+
# Return a single Task.
|
47
|
+
rpc :GetTask, ::Google::Cloud::Batch::V1::GetTaskRequest, ::Google::Cloud::Batch::V1::Task
|
48
|
+
# List Tasks associated with a job.
|
49
|
+
rpc :ListTasks, ::Google::Cloud::Batch::V1::ListTasksRequest, ::Google::Cloud::Batch::V1::ListTasksResponse
|
50
|
+
end
|
51
|
+
|
52
|
+
Stub = Service.rpc_stub_class
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,170 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/batch/v1/job.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/api/resource_pb'
|
8
|
+
require 'google/cloud/batch/v1/task_pb'
|
9
|
+
require 'google/protobuf/duration_pb'
|
10
|
+
require 'google/protobuf/timestamp_pb'
|
11
|
+
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_file("google/cloud/batch/v1/job.proto", :syntax => :proto3) do
|
14
|
+
add_message "google.cloud.batch.v1.Job" do
|
15
|
+
optional :name, :string, 1
|
16
|
+
optional :uid, :string, 2
|
17
|
+
optional :priority, :int64, 3
|
18
|
+
repeated :task_groups, :message, 4, "google.cloud.batch.v1.TaskGroup"
|
19
|
+
optional :allocation_policy, :message, 7, "google.cloud.batch.v1.AllocationPolicy"
|
20
|
+
map :labels, :string, :string, 8
|
21
|
+
optional :status, :message, 9, "google.cloud.batch.v1.JobStatus"
|
22
|
+
optional :create_time, :message, 11, "google.protobuf.Timestamp"
|
23
|
+
optional :update_time, :message, 12, "google.protobuf.Timestamp"
|
24
|
+
optional :logs_policy, :message, 13, "google.cloud.batch.v1.LogsPolicy"
|
25
|
+
repeated :notifications, :message, 14, "google.cloud.batch.v1.JobNotification"
|
26
|
+
end
|
27
|
+
add_message "google.cloud.batch.v1.LogsPolicy" do
|
28
|
+
optional :destination, :enum, 1, "google.cloud.batch.v1.LogsPolicy.Destination"
|
29
|
+
optional :logs_path, :string, 2
|
30
|
+
end
|
31
|
+
add_enum "google.cloud.batch.v1.LogsPolicy.Destination" do
|
32
|
+
value :DESTINATION_UNSPECIFIED, 0
|
33
|
+
value :CLOUD_LOGGING, 1
|
34
|
+
value :PATH, 2
|
35
|
+
end
|
36
|
+
add_message "google.cloud.batch.v1.JobStatus" do
|
37
|
+
optional :state, :enum, 1, "google.cloud.batch.v1.JobStatus.State"
|
38
|
+
repeated :status_events, :message, 2, "google.cloud.batch.v1.StatusEvent"
|
39
|
+
map :task_groups, :string, :message, 4, "google.cloud.batch.v1.JobStatus.TaskGroupStatus"
|
40
|
+
optional :run_duration, :message, 5, "google.protobuf.Duration"
|
41
|
+
end
|
42
|
+
add_message "google.cloud.batch.v1.JobStatus.InstanceStatus" do
|
43
|
+
optional :machine_type, :string, 1
|
44
|
+
optional :provisioning_model, :enum, 2, "google.cloud.batch.v1.AllocationPolicy.ProvisioningModel"
|
45
|
+
optional :task_pack, :int64, 3
|
46
|
+
end
|
47
|
+
add_message "google.cloud.batch.v1.JobStatus.TaskGroupStatus" do
|
48
|
+
map :counts, :string, :int64, 1
|
49
|
+
repeated :instances, :message, 2, "google.cloud.batch.v1.JobStatus.InstanceStatus"
|
50
|
+
end
|
51
|
+
add_enum "google.cloud.batch.v1.JobStatus.State" do
|
52
|
+
value :STATE_UNSPECIFIED, 0
|
53
|
+
value :QUEUED, 1
|
54
|
+
value :SCHEDULED, 2
|
55
|
+
value :RUNNING, 3
|
56
|
+
value :SUCCEEDED, 4
|
57
|
+
value :FAILED, 5
|
58
|
+
value :DELETION_IN_PROGRESS, 6
|
59
|
+
end
|
60
|
+
add_message "google.cloud.batch.v1.JobNotification" do
|
61
|
+
optional :pubsub_topic, :string, 1
|
62
|
+
optional :message, :message, 2, "google.cloud.batch.v1.JobNotification.Message"
|
63
|
+
end
|
64
|
+
add_message "google.cloud.batch.v1.JobNotification.Message" do
|
65
|
+
optional :type, :enum, 1, "google.cloud.batch.v1.JobNotification.Type"
|
66
|
+
optional :new_job_state, :enum, 2, "google.cloud.batch.v1.JobStatus.State"
|
67
|
+
optional :new_task_state, :enum, 3, "google.cloud.batch.v1.TaskStatus.State"
|
68
|
+
end
|
69
|
+
add_enum "google.cloud.batch.v1.JobNotification.Type" do
|
70
|
+
value :TYPE_UNSPECIFIED, 0
|
71
|
+
value :JOB_STATE_CHANGED, 1
|
72
|
+
value :TASK_STATE_CHANGED, 2
|
73
|
+
end
|
74
|
+
add_message "google.cloud.batch.v1.AllocationPolicy" do
|
75
|
+
optional :location, :message, 1, "google.cloud.batch.v1.AllocationPolicy.LocationPolicy"
|
76
|
+
repeated :instances, :message, 8, "google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate"
|
77
|
+
map :labels, :string, :string, 6
|
78
|
+
optional :network, :message, 7, "google.cloud.batch.v1.AllocationPolicy.NetworkPolicy"
|
79
|
+
end
|
80
|
+
add_message "google.cloud.batch.v1.AllocationPolicy.LocationPolicy" do
|
81
|
+
repeated :allowed_locations, :string, 1
|
82
|
+
end
|
83
|
+
add_message "google.cloud.batch.v1.AllocationPolicy.Disk" do
|
84
|
+
optional :type, :string, 1
|
85
|
+
optional :size_gb, :int64, 2
|
86
|
+
oneof :data_source do
|
87
|
+
optional :image, :string, 4
|
88
|
+
optional :snapshot, :string, 5
|
89
|
+
end
|
90
|
+
end
|
91
|
+
add_message "google.cloud.batch.v1.AllocationPolicy.AttachedDisk" do
|
92
|
+
optional :device_name, :string, 3
|
93
|
+
oneof :attached do
|
94
|
+
optional :new_disk, :message, 1, "google.cloud.batch.v1.AllocationPolicy.Disk"
|
95
|
+
optional :existing_disk, :string, 2
|
96
|
+
end
|
97
|
+
end
|
98
|
+
add_message "google.cloud.batch.v1.AllocationPolicy.Accelerator" do
|
99
|
+
optional :type, :string, 1
|
100
|
+
optional :count, :int64, 2
|
101
|
+
end
|
102
|
+
add_message "google.cloud.batch.v1.AllocationPolicy.InstancePolicy" do
|
103
|
+
optional :machine_type, :string, 2
|
104
|
+
optional :min_cpu_platform, :string, 3
|
105
|
+
optional :provisioning_model, :enum, 4, "google.cloud.batch.v1.AllocationPolicy.ProvisioningModel"
|
106
|
+
repeated :accelerators, :message, 5, "google.cloud.batch.v1.AllocationPolicy.Accelerator"
|
107
|
+
repeated :disks, :message, 6, "google.cloud.batch.v1.AllocationPolicy.AttachedDisk"
|
108
|
+
end
|
109
|
+
add_message "google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate" do
|
110
|
+
oneof :policy_template do
|
111
|
+
optional :policy, :message, 1, "google.cloud.batch.v1.AllocationPolicy.InstancePolicy"
|
112
|
+
optional :instance_template, :string, 2
|
113
|
+
end
|
114
|
+
end
|
115
|
+
add_message "google.cloud.batch.v1.AllocationPolicy.NetworkInterface" do
|
116
|
+
optional :network, :string, 1
|
117
|
+
optional :subnetwork, :string, 2
|
118
|
+
optional :no_external_ip_address, :bool, 3
|
119
|
+
end
|
120
|
+
add_message "google.cloud.batch.v1.AllocationPolicy.NetworkPolicy" do
|
121
|
+
repeated :network_interfaces, :message, 1, "google.cloud.batch.v1.AllocationPolicy.NetworkInterface"
|
122
|
+
end
|
123
|
+
add_enum "google.cloud.batch.v1.AllocationPolicy.ProvisioningModel" do
|
124
|
+
value :PROVISIONING_MODEL_UNSPECIFIED, 0
|
125
|
+
value :STANDARD, 1
|
126
|
+
value :SPOT, 2
|
127
|
+
value :PREEMPTIBLE, 3
|
128
|
+
end
|
129
|
+
add_message "google.cloud.batch.v1.TaskGroup" do
|
130
|
+
optional :name, :string, 1
|
131
|
+
optional :task_spec, :message, 3, "google.cloud.batch.v1.TaskSpec"
|
132
|
+
optional :task_count, :int64, 4
|
133
|
+
optional :parallelism, :int64, 5
|
134
|
+
repeated :task_environments, :message, 9, "google.cloud.batch.v1.Environment"
|
135
|
+
optional :task_count_per_node, :int64, 10
|
136
|
+
optional :require_hosts_file, :bool, 11
|
137
|
+
optional :permissive_ssh, :bool, 12
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
module Google
|
143
|
+
module Cloud
|
144
|
+
module Batch
|
145
|
+
module V1
|
146
|
+
Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Job").msgclass
|
147
|
+
LogsPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy").msgclass
|
148
|
+
LogsPolicy::Destination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LogsPolicy.Destination").enummodule
|
149
|
+
JobStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus").msgclass
|
150
|
+
JobStatus::InstanceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.InstanceStatus").msgclass
|
151
|
+
JobStatus::TaskGroupStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.TaskGroupStatus").msgclass
|
152
|
+
JobStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobStatus.State").enummodule
|
153
|
+
JobNotification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification").msgclass
|
154
|
+
JobNotification::Message = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification.Message").msgclass
|
155
|
+
JobNotification::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.JobNotification.Type").enummodule
|
156
|
+
AllocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy").msgclass
|
157
|
+
AllocationPolicy::LocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.LocationPolicy").msgclass
|
158
|
+
AllocationPolicy::Disk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.Disk").msgclass
|
159
|
+
AllocationPolicy::AttachedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.AttachedDisk").msgclass
|
160
|
+
AllocationPolicy::Accelerator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.Accelerator").msgclass
|
161
|
+
AllocationPolicy::InstancePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.InstancePolicy").msgclass
|
162
|
+
AllocationPolicy::InstancePolicyOrTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate").msgclass
|
163
|
+
AllocationPolicy::NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkInterface").msgclass
|
164
|
+
AllocationPolicy::NetworkPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkPolicy").msgclass
|
165
|
+
AllocationPolicy::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.ProvisioningModel").enummodule
|
166
|
+
TaskGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskGroup").msgclass
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/batch/v1/task.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/resource_pb'
|
7
|
+
require 'google/cloud/batch/v1/volume_pb'
|
8
|
+
require 'google/protobuf/duration_pb'
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
10
|
+
|
11
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
|
+
add_file("google/cloud/batch/v1/task.proto", :syntax => :proto3) do
|
13
|
+
add_message "google.cloud.batch.v1.ComputeResource" do
|
14
|
+
optional :cpu_milli, :int64, 1
|
15
|
+
optional :memory_mib, :int64, 2
|
16
|
+
optional :boot_disk_mib, :int64, 4
|
17
|
+
end
|
18
|
+
add_message "google.cloud.batch.v1.StatusEvent" do
|
19
|
+
optional :type, :string, 3
|
20
|
+
optional :description, :string, 1
|
21
|
+
optional :event_time, :message, 2, "google.protobuf.Timestamp"
|
22
|
+
optional :task_execution, :message, 4, "google.cloud.batch.v1.TaskExecution"
|
23
|
+
end
|
24
|
+
add_message "google.cloud.batch.v1.TaskExecution" do
|
25
|
+
optional :exit_code, :int32, 1
|
26
|
+
end
|
27
|
+
add_message "google.cloud.batch.v1.TaskStatus" do
|
28
|
+
optional :state, :enum, 1, "google.cloud.batch.v1.TaskStatus.State"
|
29
|
+
repeated :status_events, :message, 2, "google.cloud.batch.v1.StatusEvent"
|
30
|
+
end
|
31
|
+
add_enum "google.cloud.batch.v1.TaskStatus.State" do
|
32
|
+
value :STATE_UNSPECIFIED, 0
|
33
|
+
value :PENDING, 1
|
34
|
+
value :ASSIGNED, 2
|
35
|
+
value :RUNNING, 3
|
36
|
+
value :FAILED, 4
|
37
|
+
value :SUCCEEDED, 5
|
38
|
+
end
|
39
|
+
add_message "google.cloud.batch.v1.Runnable" do
|
40
|
+
optional :ignore_exit_status, :bool, 3
|
41
|
+
optional :background, :bool, 4
|
42
|
+
optional :always_run, :bool, 5
|
43
|
+
oneof :executable do
|
44
|
+
optional :container, :message, 1, "google.cloud.batch.v1.Runnable.Container"
|
45
|
+
optional :script, :message, 2, "google.cloud.batch.v1.Runnable.Script"
|
46
|
+
optional :barrier, :message, 6, "google.cloud.batch.v1.Runnable.Barrier"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
add_message "google.cloud.batch.v1.Runnable.Container" do
|
50
|
+
optional :image_uri, :string, 1
|
51
|
+
repeated :commands, :string, 2
|
52
|
+
optional :entrypoint, :string, 3
|
53
|
+
repeated :volumes, :string, 7
|
54
|
+
optional :options, :string, 8
|
55
|
+
optional :block_external_network, :bool, 9
|
56
|
+
optional :username, :string, 10
|
57
|
+
optional :password, :string, 11
|
58
|
+
end
|
59
|
+
add_message "google.cloud.batch.v1.Runnable.Script" do
|
60
|
+
oneof :command do
|
61
|
+
optional :path, :string, 1
|
62
|
+
optional :text, :string, 2
|
63
|
+
end
|
64
|
+
end
|
65
|
+
add_message "google.cloud.batch.v1.Runnable.Barrier" do
|
66
|
+
optional :name, :string, 1
|
67
|
+
end
|
68
|
+
add_message "google.cloud.batch.v1.TaskSpec" do
|
69
|
+
repeated :runnables, :message, 8, "google.cloud.batch.v1.Runnable"
|
70
|
+
optional :compute_resource, :message, 3, "google.cloud.batch.v1.ComputeResource"
|
71
|
+
optional :max_run_duration, :message, 4, "google.protobuf.Duration"
|
72
|
+
optional :max_retry_count, :int32, 5
|
73
|
+
repeated :lifecycle_policies, :message, 9, "google.cloud.batch.v1.LifecyclePolicy"
|
74
|
+
map :environments, :string, :string, 6
|
75
|
+
repeated :volumes, :message, 7, "google.cloud.batch.v1.Volume"
|
76
|
+
end
|
77
|
+
add_message "google.cloud.batch.v1.LifecyclePolicy" do
|
78
|
+
optional :action, :enum, 1, "google.cloud.batch.v1.LifecyclePolicy.Action"
|
79
|
+
optional :action_condition, :message, 2, "google.cloud.batch.v1.LifecyclePolicy.ActionCondition"
|
80
|
+
end
|
81
|
+
add_message "google.cloud.batch.v1.LifecyclePolicy.ActionCondition" do
|
82
|
+
repeated :exit_codes, :int32, 1
|
83
|
+
end
|
84
|
+
add_enum "google.cloud.batch.v1.LifecyclePolicy.Action" do
|
85
|
+
value :ACTION_UNSPECIFIED, 0
|
86
|
+
value :RETRY_TASK, 1
|
87
|
+
value :FAIL_TASK, 2
|
88
|
+
end
|
89
|
+
add_message "google.cloud.batch.v1.Task" do
|
90
|
+
optional :name, :string, 1
|
91
|
+
optional :status, :message, 2, "google.cloud.batch.v1.TaskStatus"
|
92
|
+
end
|
93
|
+
add_message "google.cloud.batch.v1.Environment" do
|
94
|
+
map :variables, :string, :string, 1
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
module Google
|
100
|
+
module Cloud
|
101
|
+
module Batch
|
102
|
+
module V1
|
103
|
+
ComputeResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ComputeResource").msgclass
|
104
|
+
StatusEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.StatusEvent").msgclass
|
105
|
+
TaskExecution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskExecution").msgclass
|
106
|
+
TaskStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus").msgclass
|
107
|
+
TaskStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskStatus.State").enummodule
|
108
|
+
Runnable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable").msgclass
|
109
|
+
Runnable::Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Container").msgclass
|
110
|
+
Runnable::Script = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Script").msgclass
|
111
|
+
Runnable::Barrier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Runnable.Barrier").msgclass
|
112
|
+
TaskSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskSpec").msgclass
|
113
|
+
LifecyclePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy").msgclass
|
114
|
+
LifecyclePolicy::ActionCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.ActionCondition").msgclass
|
115
|
+
LifecyclePolicy::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.LifecyclePolicy.Action").enummodule
|
116
|
+
Task = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Task").msgclass
|
117
|
+
Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Environment").msgclass
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Batch
|
23
|
+
module V1
|
24
|
+
VERSION = "0.1.0"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/batch/v1/volume.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("google/cloud/batch/v1/volume.proto", :syntax => :proto3) do
|
8
|
+
add_message "google.cloud.batch.v1.Volume" do
|
9
|
+
optional :mount_path, :string, 4
|
10
|
+
repeated :mount_options, :string, 5
|
11
|
+
oneof :source do
|
12
|
+
optional :nfs, :message, 1, "google.cloud.batch.v1.NFS"
|
13
|
+
optional :gcs, :message, 3, "google.cloud.batch.v1.GCS"
|
14
|
+
optional :device_name, :string, 6
|
15
|
+
end
|
16
|
+
end
|
17
|
+
add_message "google.cloud.batch.v1.NFS" do
|
18
|
+
optional :server, :string, 1
|
19
|
+
optional :remote_path, :string, 2
|
20
|
+
end
|
21
|
+
add_message "google.cloud.batch.v1.GCS" do
|
22
|
+
optional :remote_path, :string, 1
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
module Google
|
28
|
+
module Cloud
|
29
|
+
module Batch
|
30
|
+
module V1
|
31
|
+
Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.Volume").msgclass
|
32
|
+
NFS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.NFS").msgclass
|
33
|
+
GCS = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.GCS").msgclass
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/batch/v1/batch_service"
|
20
|
+
require "google/cloud/batch/v1/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Batch
|
25
|
+
##
|
26
|
+
# To load this package, including all its services, and instantiate a client:
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
#
|
30
|
+
# require "google/cloud/batch/v1"
|
31
|
+
# client = ::Google::Cloud::Batch::V1::BatchService::Client.new
|
32
|
+
#
|
33
|
+
module V1
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
helper_path = ::File.join __dir__, "v1", "_helpers.rb"
|
40
|
+
require "google/cloud/batch/v1/_helpers" if ::File.file? helper_path
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/batch/v1"
|