google-cloud-batch-v1 0.6.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/google/cloud/batch/v1/batch_pb.rb +1 -0
  4. data/lib/google/cloud/batch/v1/batch_service/client.rb +18 -36
  5. data/lib/google/cloud/batch/v1/batch_service/operations.rb +14 -16
  6. data/lib/google/cloud/batch/v1/batch_service/rest/client.rb +810 -0
  7. data/lib/google/cloud/batch/v1/batch_service/rest/operations.rb +793 -0
  8. data/lib/google/cloud/batch/v1/batch_service/rest/service_stub.rb +403 -0
  9. data/lib/google/cloud/batch/v1/batch_service/rest.rb +56 -0
  10. data/lib/google/cloud/batch/v1/batch_service.rb +6 -0
  11. data/lib/google/cloud/batch/v1/bindings_override.rb +102 -0
  12. data/lib/google/cloud/batch/v1/job_pb.rb +6 -0
  13. data/lib/google/cloud/batch/v1/rest.rb +38 -0
  14. data/lib/google/cloud/batch/v1/task_pb.rb +3 -0
  15. data/lib/google/cloud/batch/v1/version.rb +1 -1
  16. data/lib/google/cloud/batch/v1.rb +5 -0
  17. data/lib/google/iam/v1/bindings_override.rb +100 -0
  18. data/lib/google/iam/v1/iam_policy/client.rb +639 -0
  19. data/lib/google/iam/v1/iam_policy/credentials.rb +42 -0
  20. data/lib/google/iam/v1/iam_policy/rest/client.rb +558 -0
  21. data/lib/google/iam/v1/iam_policy/rest/service_stub.rb +226 -0
  22. data/lib/google/iam/v1/iam_policy/rest.rb +75 -0
  23. data/lib/google/iam/v1/iam_policy.rb +77 -0
  24. data/lib/google/iam/v1/rest.rb +36 -0
  25. data/lib/google/iam/v1.rb +43 -0
  26. data/lib/google-cloud-batch-v1.rb +1 -0
  27. data/proto_docs/google/api/client.rb +67 -4
  28. data/proto_docs/google/cloud/batch/v1/batch.rb +4 -4
  29. data/proto_docs/google/cloud/batch/v1/job.rb +53 -16
  30. data/proto_docs/google/cloud/batch/v1/task.rb +46 -10
  31. data/proto_docs/google/iam/v1/iam_policy.rb +87 -0
  32. data/proto_docs/google/iam/v1/options.rb +50 -0
  33. data/proto_docs/google/iam/v1/policy.rb +422 -0
  34. metadata +32 -20
@@ -0,0 +1,403 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Batch
24
+ module V1
25
+ module BatchService
26
+ module Rest
27
+ ##
28
+ # REST service stub for the BatchService service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the create_job REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::Batch::V1::CreateJobRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::Batch::V1::Job]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::Batch::V1::Job]
56
+ # A result object deserialized from the server's reply
57
+ def create_job request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_job_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split("=", 2) }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::Batch::V1::Job.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # Baseline implementation for the get_job REST call
83
+ #
84
+ # @param request_pb [::Google::Cloud::Batch::V1::GetJobRequest]
85
+ # A request object representing the call parameters. Required.
86
+ # @param options [::Gapic::CallOptions]
87
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
88
+ #
89
+ # @yield [result, operation] Access the result along with the TransportOperation object
90
+ # @yieldparam result [::Google::Cloud::Batch::V1::Job]
91
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
92
+ #
93
+ # @return [::Google::Cloud::Batch::V1::Job]
94
+ # A result object deserialized from the server's reply
95
+ def get_job request_pb, options = nil
96
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
97
+
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_job_request request_pb
99
+ query_string_params = if query_string_params.any?
100
+ query_string_params.to_h { |p| p.split("=", 2) }
101
+ else
102
+ {}
103
+ end
104
+
105
+ response = @client_stub.make_http_request(
106
+ verb,
107
+ uri: uri,
108
+ body: body || "",
109
+ params: query_string_params,
110
+ options: options
111
+ )
112
+ operation = ::Gapic::Rest::TransportOperation.new response
113
+ result = ::Google::Cloud::Batch::V1::Job.decode_json response.body, ignore_unknown_fields: true
114
+
115
+ yield result, operation if block_given?
116
+ result
117
+ end
118
+
119
+ ##
120
+ # Baseline implementation for the delete_job REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::Batch::V1::DeleteJobRequest]
123
+ # A request object representing the call parameters. Required.
124
+ # @param options [::Gapic::CallOptions]
125
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
126
+ #
127
+ # @yield [result, operation] Access the result along with the TransportOperation object
128
+ # @yieldparam result [::Google::Longrunning::Operation]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Longrunning::Operation]
132
+ # A result object deserialized from the server's reply
133
+ def delete_job request_pb, options = nil
134
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
135
+
136
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_job_request request_pb
137
+ query_string_params = if query_string_params.any?
138
+ query_string_params.to_h { |p| p.split("=", 2) }
139
+ else
140
+ {}
141
+ end
142
+
143
+ response = @client_stub.make_http_request(
144
+ verb,
145
+ uri: uri,
146
+ body: body || "",
147
+ params: query_string_params,
148
+ options: options
149
+ )
150
+ operation = ::Gapic::Rest::TransportOperation.new response
151
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
157
+ ##
158
+ # Baseline implementation for the list_jobs REST call
159
+ #
160
+ # @param request_pb [::Google::Cloud::Batch::V1::ListJobsRequest]
161
+ # A request object representing the call parameters. Required.
162
+ # @param options [::Gapic::CallOptions]
163
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
164
+ #
165
+ # @yield [result, operation] Access the result along with the TransportOperation object
166
+ # @yieldparam result [::Google::Cloud::Batch::V1::ListJobsResponse]
167
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
168
+ #
169
+ # @return [::Google::Cloud::Batch::V1::ListJobsResponse]
170
+ # A result object deserialized from the server's reply
171
+ def list_jobs request_pb, options = nil
172
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
173
+
174
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_jobs_request request_pb
175
+ query_string_params = if query_string_params.any?
176
+ query_string_params.to_h { |p| p.split("=", 2) }
177
+ else
178
+ {}
179
+ end
180
+
181
+ response = @client_stub.make_http_request(
182
+ verb,
183
+ uri: uri,
184
+ body: body || "",
185
+ params: query_string_params,
186
+ options: options
187
+ )
188
+ operation = ::Gapic::Rest::TransportOperation.new response
189
+ result = ::Google::Cloud::Batch::V1::ListJobsResponse.decode_json response.body, ignore_unknown_fields: true
190
+
191
+ yield result, operation if block_given?
192
+ result
193
+ end
194
+
195
+ ##
196
+ # Baseline implementation for the get_task REST call
197
+ #
198
+ # @param request_pb [::Google::Cloud::Batch::V1::GetTaskRequest]
199
+ # A request object representing the call parameters. Required.
200
+ # @param options [::Gapic::CallOptions]
201
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
202
+ #
203
+ # @yield [result, operation] Access the result along with the TransportOperation object
204
+ # @yieldparam result [::Google::Cloud::Batch::V1::Task]
205
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
206
+ #
207
+ # @return [::Google::Cloud::Batch::V1::Task]
208
+ # A result object deserialized from the server's reply
209
+ def get_task request_pb, options = nil
210
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
211
+
212
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_task_request request_pb
213
+ query_string_params = if query_string_params.any?
214
+ query_string_params.to_h { |p| p.split("=", 2) }
215
+ else
216
+ {}
217
+ end
218
+
219
+ response = @client_stub.make_http_request(
220
+ verb,
221
+ uri: uri,
222
+ body: body || "",
223
+ params: query_string_params,
224
+ options: options
225
+ )
226
+ operation = ::Gapic::Rest::TransportOperation.new response
227
+ result = ::Google::Cloud::Batch::V1::Task.decode_json response.body, ignore_unknown_fields: true
228
+
229
+ yield result, operation if block_given?
230
+ result
231
+ end
232
+
233
+ ##
234
+ # Baseline implementation for the list_tasks REST call
235
+ #
236
+ # @param request_pb [::Google::Cloud::Batch::V1::ListTasksRequest]
237
+ # A request object representing the call parameters. Required.
238
+ # @param options [::Gapic::CallOptions]
239
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
240
+ #
241
+ # @yield [result, operation] Access the result along with the TransportOperation object
242
+ # @yieldparam result [::Google::Cloud::Batch::V1::ListTasksResponse]
243
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
244
+ #
245
+ # @return [::Google::Cloud::Batch::V1::ListTasksResponse]
246
+ # A result object deserialized from the server's reply
247
+ def list_tasks request_pb, options = nil
248
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
249
+
250
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_tasks_request request_pb
251
+ query_string_params = if query_string_params.any?
252
+ query_string_params.to_h { |p| p.split("=", 2) }
253
+ else
254
+ {}
255
+ end
256
+
257
+ response = @client_stub.make_http_request(
258
+ verb,
259
+ uri: uri,
260
+ body: body || "",
261
+ params: query_string_params,
262
+ options: options
263
+ )
264
+ operation = ::Gapic::Rest::TransportOperation.new response
265
+ result = ::Google::Cloud::Batch::V1::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true
266
+
267
+ yield result, operation if block_given?
268
+ result
269
+ end
270
+
271
+ ##
272
+ # @private
273
+ #
274
+ # GRPC transcoding helper method for the create_job REST call
275
+ #
276
+ # @param request_pb [::Google::Cloud::Batch::V1::CreateJobRequest]
277
+ # A request object representing the call parameters. Required.
278
+ # @return [Array(String, [String, nil], Hash{String => String})]
279
+ # Uri, Body, Query string parameters
280
+ def self.transcode_create_job_request request_pb
281
+ transcoder = Gapic::Rest::GrpcTranscoder.new
282
+ .with_bindings(
283
+ uri_method: :post,
284
+ uri_template: "/v1/{parent}/jobs",
285
+ body: "job",
286
+ matches: [
287
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
288
+ ]
289
+ )
290
+ transcoder.transcode request_pb
291
+ end
292
+
293
+ ##
294
+ # @private
295
+ #
296
+ # GRPC transcoding helper method for the get_job REST call
297
+ #
298
+ # @param request_pb [::Google::Cloud::Batch::V1::GetJobRequest]
299
+ # A request object representing the call parameters. Required.
300
+ # @return [Array(String, [String, nil], Hash{String => String})]
301
+ # Uri, Body, Query string parameters
302
+ def self.transcode_get_job_request request_pb
303
+ transcoder = Gapic::Rest::GrpcTranscoder.new
304
+ .with_bindings(
305
+ uri_method: :get,
306
+ uri_template: "/v1/{name}",
307
+ matches: [
308
+ ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false]
309
+ ]
310
+ )
311
+ transcoder.transcode request_pb
312
+ end
313
+
314
+ ##
315
+ # @private
316
+ #
317
+ # GRPC transcoding helper method for the delete_job REST call
318
+ #
319
+ # @param request_pb [::Google::Cloud::Batch::V1::DeleteJobRequest]
320
+ # A request object representing the call parameters. Required.
321
+ # @return [Array(String, [String, nil], Hash{String => String})]
322
+ # Uri, Body, Query string parameters
323
+ def self.transcode_delete_job_request request_pb
324
+ transcoder = Gapic::Rest::GrpcTranscoder.new
325
+ .with_bindings(
326
+ uri_method: :delete,
327
+ uri_template: "/v1/{name}",
328
+ matches: [
329
+ ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false]
330
+ ]
331
+ )
332
+ transcoder.transcode request_pb
333
+ end
334
+
335
+ ##
336
+ # @private
337
+ #
338
+ # GRPC transcoding helper method for the list_jobs REST call
339
+ #
340
+ # @param request_pb [::Google::Cloud::Batch::V1::ListJobsRequest]
341
+ # A request object representing the call parameters. Required.
342
+ # @return [Array(String, [String, nil], Hash{String => String})]
343
+ # Uri, Body, Query string parameters
344
+ def self.transcode_list_jobs_request request_pb
345
+ transcoder = Gapic::Rest::GrpcTranscoder.new
346
+ .with_bindings(
347
+ uri_method: :get,
348
+ uri_template: "/v1/{parent}/jobs",
349
+ matches: [
350
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
351
+ ]
352
+ )
353
+ transcoder.transcode request_pb
354
+ end
355
+
356
+ ##
357
+ # @private
358
+ #
359
+ # GRPC transcoding helper method for the get_task REST call
360
+ #
361
+ # @param request_pb [::Google::Cloud::Batch::V1::GetTaskRequest]
362
+ # A request object representing the call parameters. Required.
363
+ # @return [Array(String, [String, nil], Hash{String => String})]
364
+ # Uri, Body, Query string parameters
365
+ def self.transcode_get_task_request request_pb
366
+ transcoder = Gapic::Rest::GrpcTranscoder.new
367
+ .with_bindings(
368
+ uri_method: :get,
369
+ uri_template: "/v1/{name}",
370
+ matches: [
371
+ ["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/tasks/[^/]+/?$}, false]
372
+ ]
373
+ )
374
+ transcoder.transcode request_pb
375
+ end
376
+
377
+ ##
378
+ # @private
379
+ #
380
+ # GRPC transcoding helper method for the list_tasks REST call
381
+ #
382
+ # @param request_pb [::Google::Cloud::Batch::V1::ListTasksRequest]
383
+ # A request object representing the call parameters. Required.
384
+ # @return [Array(String, [String, nil], Hash{String => String})]
385
+ # Uri, Body, Query string parameters
386
+ def self.transcode_list_tasks_request request_pb
387
+ transcoder = Gapic::Rest::GrpcTranscoder.new
388
+ .with_bindings(
389
+ uri_method: :get,
390
+ uri_template: "/v1/{parent}/tasks",
391
+ matches: [
392
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/?$}, false]
393
+ ]
394
+ )
395
+ transcoder.transcode request_pb
396
+ end
397
+ end
398
+ end
399
+ end
400
+ end
401
+ end
402
+ end
403
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/batch/v1/version"
24
+ require "google/cloud/batch/v1/bindings_override"
25
+
26
+ require "google/cloud/batch/v1/batch_service/credentials"
27
+ require "google/cloud/batch/v1/batch_service/paths"
28
+ require "google/cloud/batch/v1/batch_service/rest/operations"
29
+ require "google/cloud/batch/v1/batch_service/rest/client"
30
+
31
+ module Google
32
+ module Cloud
33
+ module Batch
34
+ module V1
35
+ ##
36
+ # Google Batch Service.
37
+ # The service manages user submitted batch jobs and allocates Google Compute
38
+ # Engine VM instances to run the jobs.
39
+ #
40
+ # To load this service and instantiate a REST client:
41
+ #
42
+ # require "google/cloud/batch/v1/batch_service/rest"
43
+ # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new
44
+ #
45
+ module BatchService
46
+ # Client for the REST transport
47
+ module Rest
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
56
+ require "google/cloud/batch/v1/batch_service/rest/helpers" if ::File.file? helper_path
@@ -26,6 +26,7 @@ require "google/cloud/batch/v1/batch_service/credentials"
26
26
  require "google/cloud/batch/v1/batch_service/paths"
27
27
  require "google/cloud/batch/v1/batch_service/operations"
28
28
  require "google/cloud/batch/v1/batch_service/client"
29
+ require "google/cloud/batch/v1/batch_service/rest"
29
30
 
30
31
  module Google
31
32
  module Cloud
@@ -41,6 +42,11 @@ module Google
41
42
  # require "google/cloud/batch/v1/batch_service"
42
43
  # client = ::Google::Cloud::Batch::V1::BatchService::Client.new
43
44
  #
45
+ # @example Load this service and instantiate a REST client
46
+ #
47
+ # require "google/cloud/batch/v1/batch_service/rest"
48
+ # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new
49
+ #
44
50
  module BatchService
45
51
  end
46
52
  end
@@ -0,0 +1,102 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Batch
24
+ ##
25
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
+ #
27
+ # require "google/cloud/batch/v1/rest"
28
+ # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new
29
+ #
30
+ module V1
31
+ ##
32
+ # @private
33
+ # Initialize the mixin bindings configuration
34
+ #
35
+ def self.configure
36
+ @configure ||= begin
37
+ namespace = ["Google", "Cloud", "Batch"]
38
+ parent_config = while namespace.any?
39
+ parent_name = namespace.join "::"
40
+ parent_const = const_get parent_name
41
+ break parent_const.configure if parent_const.respond_to? :configure
42
+ namespace.pop
43
+ end
44
+
45
+ default_config = Configuration.new parent_config
46
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1/{name}",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
57
+
58
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
59
+ uri_method: :get,
60
+ uri_template: "/v1/{name}/locations",
61
+ matches: [
62
+ ["name", %r{^projects/[^/]+/?$}, false]
63
+ ],
64
+ body: nil
65
+ )
66
+ ]
67
+ default_config
68
+ end
69
+ yield @configure if block_given?
70
+ @configure
71
+ end
72
+
73
+ ##
74
+ # @private
75
+ # Configuration class for the google.cloud.batch.v1 package.
76
+ #
77
+ # This class contains common configuration for all services
78
+ # of the google.cloud.batch.v1 package.
79
+ #
80
+ # This configuration is for internal use of the client library classes,
81
+ # and it is not intended that the end-users will read or change it.
82
+ #
83
+ class Configuration
84
+ extend ::Gapic::Config
85
+
86
+ # @private
87
+ # Overrides for http bindings for the RPC of the mixins for this package.
88
+ # Services in this package should use these when creating clients for the mixin services.
89
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
90
+ config_attr :bindings_override, {}, ::Hash, nil
91
+
92
+ # @private
93
+ def initialize parent_config = nil
94
+ @parent_config = parent_config unless parent_config.nil?
95
+
96
+ yield self if block_given?
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
@@ -78,6 +78,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
78
78
  optional :service_account, :message, 9, "google.cloud.batch.v1.ServiceAccount"
79
79
  map :labels, :string, :string, 6
80
80
  optional :network, :message, 7, "google.cloud.batch.v1.AllocationPolicy.NetworkPolicy"
81
+ optional :placement, :message, 10, "google.cloud.batch.v1.AllocationPolicy.PlacementPolicy"
81
82
  end
82
83
  add_message "google.cloud.batch.v1.AllocationPolicy.LocationPolicy" do
83
84
  repeated :allowed_locations, :string, 1
@@ -126,6 +127,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
126
127
  add_message "google.cloud.batch.v1.AllocationPolicy.NetworkPolicy" do
127
128
  repeated :network_interfaces, :message, 1, "google.cloud.batch.v1.AllocationPolicy.NetworkInterface"
128
129
  end
130
+ add_message "google.cloud.batch.v1.AllocationPolicy.PlacementPolicy" do
131
+ optional :collocation, :string, 1
132
+ optional :max_distance, :int64, 2
133
+ end
129
134
  add_enum "google.cloud.batch.v1.AllocationPolicy.ProvisioningModel" do
130
135
  value :PROVISIONING_MODEL_UNSPECIFIED, 0
131
136
  value :STANDARD, 1
@@ -172,6 +177,7 @@ module Google
172
177
  AllocationPolicy::InstancePolicyOrTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate").msgclass
173
178
  AllocationPolicy::NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkInterface").msgclass
174
179
  AllocationPolicy::NetworkPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.NetworkPolicy").msgclass
180
+ AllocationPolicy::PlacementPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.PlacementPolicy").msgclass
175
181
  AllocationPolicy::ProvisioningModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.AllocationPolicy.ProvisioningModel").enummodule
176
182
  TaskGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.TaskGroup").msgclass
177
183
  ServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.batch.v1.ServiceAccount").msgclass
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/rest"
20
+ require "google/cloud/batch/v1/bindings_override"
21
+ require "google/cloud/batch/v1/version"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Batch
26
+ ##
27
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
28
+ #
29
+ # @example
30
+ #
31
+ # require "google/cloud/batch/v1/rest"
32
+ # client = ::Google::Cloud::Batch::V1::BatchService::Rest::Client.new
33
+ #
34
+ module V1
35
+ end
36
+ end
37
+ end
38
+ end
@@ -20,6 +20,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
20
20
  optional :description, :string, 1
21
21
  optional :event_time, :message, 2, "google.protobuf.Timestamp"
22
22
  optional :task_execution, :message, 4, "google.cloud.batch.v1.TaskExecution"
23
+ optional :task_state, :enum, 5, "google.cloud.batch.v1.TaskStatus.State"
23
24
  end
24
25
  add_message "google.cloud.batch.v1.TaskExecution" do
25
26
  optional :exit_code, :int32, 1
@@ -35,6 +36,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
35
36
  value :RUNNING, 3
36
37
  value :FAILED, 4
37
38
  value :SUCCEEDED, 5
39
+ value :UNEXECUTED, 6
38
40
  end
39
41
  add_message "google.cloud.batch.v1.Runnable" do
40
42
  optional :ignore_exit_status, :bool, 3
@@ -42,6 +44,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
42
44
  optional :always_run, :bool, 5
43
45
  optional :environment, :message, 7, "google.cloud.batch.v1.Environment"
44
46
  optional :timeout, :message, 8, "google.protobuf.Duration"
47
+ map :labels, :string, :string, 9
45
48
  oneof :executable do
46
49
  optional :container, :message, 1, "google.cloud.batch.v1.Runnable.Container"
47
50
  optional :script, :message, 2, "google.cloud.batch.v1.Runnable.Script"