google-cloud-dataproc-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +71 -0
  6. data/lib/google/cloud/common_resources_pb.rb +15 -0
  7. data/lib/google/cloud/dataproc/v1/autoscaling_policies_pb.rb +81 -0
  8. data/lib/google/cloud/dataproc/v1/autoscaling_policies_services_pb.rb +58 -0
  9. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +734 -0
  10. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/credentials.rb +51 -0
  11. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/paths.rb +110 -0
  12. data/lib/google/cloud/dataproc/v1/autoscaling_policy_service.rb +50 -0
  13. data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +970 -0
  14. data/lib/google/cloud/dataproc/v1/cluster_controller/credentials.rb +51 -0
  15. data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +564 -0
  16. data/lib/google/cloud/dataproc/v1/cluster_controller.rb +50 -0
  17. data/lib/google/cloud/dataproc/v1/clusters_pb.rb +235 -0
  18. data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +68 -0
  19. data/lib/google/cloud/dataproc/v1/job_controller/client.rb +980 -0
  20. data/lib/google/cloud/dataproc/v1/job_controller/credentials.rb +51 -0
  21. data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +564 -0
  22. data/lib/google/cloud/dataproc/v1/job_controller.rb +49 -0
  23. data/lib/google/cloud/dataproc/v1/jobs_pb.rb +282 -0
  24. data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +62 -0
  25. data/lib/google/cloud/dataproc/v1/operations_pb.rb +46 -0
  26. data/lib/google/cloud/dataproc/v1/shared_pb.rb +29 -0
  27. data/lib/google/cloud/dataproc/v1/version.rb +28 -0
  28. data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +1024 -0
  29. data/lib/google/cloud/dataproc/v1/workflow_template_service/credentials.rb +51 -0
  30. data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +564 -0
  31. data/lib/google/cloud/dataproc/v1/workflow_template_service/paths.rb +110 -0
  32. data/lib/google/cloud/dataproc/v1/workflow_template_service.rb +51 -0
  33. data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +187 -0
  34. data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +104 -0
  35. data/lib/google/cloud/dataproc/v1.rb +38 -0
  36. data/lib/google-cloud-dataproc-v1.rb +21 -0
  37. data/proto_docs/README.md +4 -0
  38. data/proto_docs/google/api/field_behavior.rb +59 -0
  39. data/proto_docs/google/api/resource.rb +247 -0
  40. data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +272 -0
  41. data/proto_docs/google/cloud/dataproc/v1/clusters.rb +961 -0
  42. data/proto_docs/google/cloud/dataproc/v1/jobs.rb +976 -0
  43. data/proto_docs/google/cloud/dataproc/v1/operations.rb +98 -0
  44. data/proto_docs/google/cloud/dataproc/v1/shared.rb +50 -0
  45. data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +693 -0
  46. data/proto_docs/google/longrunning/operations.rb +150 -0
  47. data/proto_docs/google/protobuf/any.rb +138 -0
  48. data/proto_docs/google/protobuf/duration.rb +98 -0
  49. data/proto_docs/google/protobuf/empty.rb +36 -0
  50. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  51. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  52. data/proto_docs/google/rpc/status.rb +46 -0
  53. metadata +205 -0
@@ -0,0 +1,980 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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/errors"
20
+ require "google/cloud/dataproc/v1/jobs_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dataproc
25
+ module V1
26
+ module JobController
27
+ ##
28
+ # Client for the JobController service.
29
+ #
30
+ # The JobController provides methods to manage jobs.
31
+ #
32
+ class Client
33
+ # @private
34
+ attr_reader :job_controller_stub
35
+
36
+ ##
37
+ # Configure the JobController Client class.
38
+ #
39
+ # See {Google::Cloud::Dataproc::V1::JobController::Client::Configuration}
40
+ # for a description of the configuration fields.
41
+ #
42
+ # ## Example
43
+ #
44
+ # To modify the configuration for all JobController clients:
45
+ #
46
+ # Google::Cloud::Dataproc::V1::JobController::Client.configure do |config|
47
+ # config.timeout = 10_000
48
+ # end
49
+ #
50
+ # @yield [config] Configure the Client client.
51
+ # @yieldparam config [Client::Configuration]
52
+ #
53
+ # @return [Client::Configuration]
54
+ #
55
+ def self.configure
56
+ @configure ||= begin
57
+ namespace = ["Google", "Cloud", "Dataproc", "V1"]
58
+ parent_config = while namespace.any?
59
+ parent_name = namespace.join "::"
60
+ parent_const = const_get parent_name
61
+ break parent_const.configure if parent_const&.respond_to? :configure
62
+ namespace.pop
63
+ end
64
+ default_config = Client::Configuration.new parent_config
65
+
66
+ default_config.rpcs.submit_job.timeout = 900.0
67
+ default_config.rpcs.submit_job.retry_policy = {
68
+ initial_delay: 0.1,
69
+ max_delay: 60.0,
70
+ multiplier: 1.3,
71
+ retry_codes: ["UNAVAILABLE"]
72
+ }
73
+
74
+ default_config.rpcs.submit_job_as_operation.timeout = 900.0
75
+ default_config.rpcs.submit_job_as_operation.retry_policy = {
76
+ initial_delay: 0.1,
77
+ max_delay: 60.0,
78
+ multiplier: 1.3,
79
+ retry_codes: ["UNAVAILABLE"]
80
+ }
81
+
82
+ default_config.rpcs.get_job.timeout = 900.0
83
+ default_config.rpcs.get_job.retry_policy = {
84
+ initial_delay: 0.1,
85
+ max_delay: 60.0,
86
+ multiplier: 1.3,
87
+ retry_codes: ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"]
88
+ }
89
+
90
+ default_config.rpcs.list_jobs.timeout = 900.0
91
+ default_config.rpcs.list_jobs.retry_policy = {
92
+ initial_delay: 0.1,
93
+ max_delay: 60.0,
94
+ multiplier: 1.3,
95
+ retry_codes: ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"]
96
+ }
97
+
98
+ default_config.rpcs.update_job.timeout = 900.0
99
+ default_config.rpcs.update_job.retry_policy = {
100
+ initial_delay: 0.1,
101
+ max_delay: 60.0,
102
+ multiplier: 1.3,
103
+ retry_codes: ["UNAVAILABLE"]
104
+ }
105
+
106
+ default_config.rpcs.cancel_job.timeout = 900.0
107
+ default_config.rpcs.cancel_job.retry_policy = {
108
+ initial_delay: 0.1,
109
+ max_delay: 60.0,
110
+ multiplier: 1.3,
111
+ retry_codes: ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"]
112
+ }
113
+
114
+ default_config.rpcs.delete_job.timeout = 900.0
115
+ default_config.rpcs.delete_job.retry_policy = {
116
+ initial_delay: 0.1,
117
+ max_delay: 60.0,
118
+ multiplier: 1.3,
119
+ retry_codes: ["UNAVAILABLE"]
120
+ }
121
+
122
+ default_config
123
+ end
124
+ yield @configure if block_given?
125
+ @configure
126
+ end
127
+
128
+ ##
129
+ # Configure the JobController Client instance.
130
+ #
131
+ # The configuration is set to the derived mode, meaning that values can be changed,
132
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
133
+ # should be made on {Client.configure}.
134
+ #
135
+ # See {Google::Cloud::Dataproc::V1::JobController::Client::Configuration}
136
+ # for a description of the configuration fields.
137
+ #
138
+ # @yield [config] Configure the Client client.
139
+ # @yieldparam config [Client::Configuration]
140
+ #
141
+ # @return [Client::Configuration]
142
+ #
143
+ def configure
144
+ yield @config if block_given?
145
+ @config
146
+ end
147
+
148
+ ##
149
+ # Create a new JobController client object.
150
+ #
151
+ # ## Examples
152
+ #
153
+ # To create a new JobController client with the default
154
+ # configuration:
155
+ #
156
+ # client = Google::Cloud::Dataproc::V1::JobController::Client.new
157
+ #
158
+ # To create a new JobController client with a custom
159
+ # configuration:
160
+ #
161
+ # client = Google::Cloud::Dataproc::V1::JobController::Client.new do |config|
162
+ # config.timeout = 10_000
163
+ # end
164
+ #
165
+ # @yield [config] Configure the JobController client.
166
+ # @yieldparam config [Client::Configuration]
167
+ #
168
+ def initialize
169
+ # These require statements are intentionally placed here to initialize
170
+ # the gRPC module only when it's required.
171
+ # See https://github.com/googleapis/toolkit/issues/446
172
+ require "gapic/grpc"
173
+ require "google/cloud/dataproc/v1/jobs_services_pb"
174
+
175
+ # Create the configuration object
176
+ @config = Configuration.new Client.configure
177
+
178
+ # Yield the configuration if needed
179
+ yield @config if block_given?
180
+
181
+ # Create credentials
182
+ credentials = @config.credentials
183
+ credentials ||= Credentials.default scope: @config.scope
184
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
185
+ credentials = Credentials.new credentials, scope: @config.scope
186
+ end
187
+ @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
188
+
189
+ @operations_client = Operations.new do |config|
190
+ config.credentials = credentials
191
+ config.endpoint = @config.endpoint
192
+ end
193
+
194
+ @job_controller_stub = Gapic::ServiceStub.new(
195
+ Google::Cloud::Dataproc::V1::JobController::Stub,
196
+ credentials: credentials,
197
+ endpoint: @config.endpoint,
198
+ channel_args: @config.channel_args,
199
+ interceptors: @config.interceptors
200
+ )
201
+ end
202
+
203
+ ##
204
+ # Get the associated client for long-running operations.
205
+ #
206
+ # @return [Google::Cloud::Dataproc::V1::JobController::Operations]
207
+ #
208
+ attr_reader :operations_client
209
+
210
+ # Service calls
211
+
212
+ ##
213
+ # Submits a job to a cluster.
214
+ #
215
+ # @overload submit_job(request, options = nil)
216
+ # Pass arguments to `submit_job` via a request object, either of type
217
+ # {Google::Cloud::Dataproc::V1::SubmitJobRequest} or an equivalent Hash.
218
+ #
219
+ # @param request [Google::Cloud::Dataproc::V1::SubmitJobRequest, Hash]
220
+ # A request object representing the call parameters. Required. To specify no
221
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
222
+ # @param options [Gapic::CallOptions, Hash]
223
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
224
+ #
225
+ # @overload submit_job(project_id: nil, region: nil, job: nil, request_id: nil)
226
+ # Pass arguments to `submit_job` via keyword arguments. Note that at
227
+ # least one keyword argument is required. To specify no parameters, or to keep all
228
+ # the default parameter values, pass an empty Hash as a request object (see above).
229
+ #
230
+ # @param project_id [String]
231
+ # Required. The ID of the Google Cloud Platform project that the job
232
+ # belongs to.
233
+ # @param region [String]
234
+ # Required. The Dataproc region in which to handle the request.
235
+ # @param job [Google::Cloud::Dataproc::V1::Job, Hash]
236
+ # Required. The job resource.
237
+ # @param request_id [String]
238
+ # Optional. A unique id used to identify the request. If the server
239
+ # receives two {Google::Cloud::Dataproc::V1::SubmitJobRequest SubmitJobRequest} requests with the same
240
+ # id, then the second request will be ignored and the
241
+ # first {Google::Cloud::Dataproc::V1::Job Job} created and stored in the backend
242
+ # is returned.
243
+ #
244
+ # It is recommended to always set this value to a
245
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
246
+ #
247
+ # The id must contain only letters (a-z, A-Z), numbers (0-9),
248
+ # underscores (_), and hyphens (-). The maximum length is 40 characters.
249
+ #
250
+ # @yield [response, operation] Access the result along with the RPC operation
251
+ # @yieldparam response [Google::Cloud::Dataproc::V1::Job]
252
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
253
+ #
254
+ # @return [Google::Cloud::Dataproc::V1::Job]
255
+ #
256
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
257
+ #
258
+ def submit_job request, options = nil
259
+ raise ArgumentError, "request must be provided" if request.nil?
260
+
261
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::SubmitJobRequest
262
+
263
+ # Converts hash and nil to an options object
264
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
265
+
266
+ # Customize the options with defaults
267
+ metadata = @config.rpcs.submit_job.metadata.to_h
268
+
269
+ # Set x-goog-api-client and x-goog-user-project headers
270
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
272
+ gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
273
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
274
+
275
+ header_params = {
276
+ "project_id" => request.project_id,
277
+ "region" => request.region
278
+ }
279
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
280
+ metadata[:"x-goog-request-params"] ||= request_params_header
281
+
282
+ options.apply_defaults timeout: @config.rpcs.submit_job.timeout,
283
+ metadata: metadata,
284
+ retry_policy: @config.rpcs.submit_job.retry_policy
285
+ options.apply_defaults metadata: @config.metadata,
286
+ retry_policy: @config.retry_policy
287
+
288
+ @job_controller_stub.call_rpc :submit_job, request, options: options do |response, operation|
289
+ yield response, operation if block_given?
290
+ return response
291
+ end
292
+ rescue GRPC::BadStatus => e
293
+ raise Google::Cloud::Error.from_error(e)
294
+ end
295
+
296
+ ##
297
+ # Submits job to a cluster.
298
+ #
299
+ # @overload submit_job_as_operation(request, options = nil)
300
+ # Pass arguments to `submit_job_as_operation` via a request object, either of type
301
+ # {Google::Cloud::Dataproc::V1::SubmitJobRequest} or an equivalent Hash.
302
+ #
303
+ # @param request [Google::Cloud::Dataproc::V1::SubmitJobRequest, Hash]
304
+ # A request object representing the call parameters. Required. To specify no
305
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
306
+ # @param options [Gapic::CallOptions, Hash]
307
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
308
+ #
309
+ # @overload submit_job_as_operation(project_id: nil, region: nil, job: nil, request_id: nil)
310
+ # Pass arguments to `submit_job_as_operation` via keyword arguments. Note that at
311
+ # least one keyword argument is required. To specify no parameters, or to keep all
312
+ # the default parameter values, pass an empty Hash as a request object (see above).
313
+ #
314
+ # @param project_id [String]
315
+ # Required. The ID of the Google Cloud Platform project that the job
316
+ # belongs to.
317
+ # @param region [String]
318
+ # Required. The Dataproc region in which to handle the request.
319
+ # @param job [Google::Cloud::Dataproc::V1::Job, Hash]
320
+ # Required. The job resource.
321
+ # @param request_id [String]
322
+ # Optional. A unique id used to identify the request. If the server
323
+ # receives two {Google::Cloud::Dataproc::V1::SubmitJobRequest SubmitJobRequest} requests with the same
324
+ # id, then the second request will be ignored and the
325
+ # first {Google::Cloud::Dataproc::V1::Job Job} created and stored in the backend
326
+ # is returned.
327
+ #
328
+ # It is recommended to always set this value to a
329
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier).
330
+ #
331
+ # The id must contain only letters (a-z, A-Z), numbers (0-9),
332
+ # underscores (_), and hyphens (-). The maximum length is 40 characters.
333
+ #
334
+ # @yield [response, operation] Access the result along with the RPC operation
335
+ # @yieldparam response [Gapic::Operation]
336
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
337
+ #
338
+ # @return [Gapic::Operation]
339
+ #
340
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
341
+ #
342
+ def submit_job_as_operation request, options = nil
343
+ raise ArgumentError, "request must be provided" if request.nil?
344
+
345
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::SubmitJobRequest
346
+
347
+ # Converts hash and nil to an options object
348
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
349
+
350
+ # Customize the options with defaults
351
+ metadata = @config.rpcs.submit_job_as_operation.metadata.to_h
352
+
353
+ # Set x-goog-api-client and x-goog-user-project headers
354
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
355
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
356
+ gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
357
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
358
+
359
+ header_params = {
360
+ "project_id" => request.project_id,
361
+ "region" => request.region
362
+ }
363
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
364
+ metadata[:"x-goog-request-params"] ||= request_params_header
365
+
366
+ options.apply_defaults timeout: @config.rpcs.submit_job_as_operation.timeout,
367
+ metadata: metadata,
368
+ retry_policy: @config.rpcs.submit_job_as_operation.retry_policy
369
+ options.apply_defaults metadata: @config.metadata,
370
+ retry_policy: @config.retry_policy
371
+
372
+ @job_controller_stub.call_rpc :submit_job_as_operation, request, options: options do |response, operation|
373
+ response = Gapic::Operation.new response, @operations_client, options: options
374
+ yield response, operation if block_given?
375
+ return response
376
+ end
377
+ rescue GRPC::BadStatus => e
378
+ raise Google::Cloud::Error.from_error(e)
379
+ end
380
+
381
+ ##
382
+ # Gets the resource representation for a job in a project.
383
+ #
384
+ # @overload get_job(request, options = nil)
385
+ # Pass arguments to `get_job` via a request object, either of type
386
+ # {Google::Cloud::Dataproc::V1::GetJobRequest} or an equivalent Hash.
387
+ #
388
+ # @param request [Google::Cloud::Dataproc::V1::GetJobRequest, Hash]
389
+ # A request object representing the call parameters. Required. To specify no
390
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
391
+ # @param options [Gapic::CallOptions, Hash]
392
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
393
+ #
394
+ # @overload get_job(project_id: nil, region: nil, job_id: nil)
395
+ # Pass arguments to `get_job` via keyword arguments. Note that at
396
+ # least one keyword argument is required. To specify no parameters, or to keep all
397
+ # the default parameter values, pass an empty Hash as a request object (see above).
398
+ #
399
+ # @param project_id [String]
400
+ # Required. The ID of the Google Cloud Platform project that the job
401
+ # belongs to.
402
+ # @param region [String]
403
+ # Required. The Dataproc region in which to handle the request.
404
+ # @param job_id [String]
405
+ # Required. The job ID.
406
+ #
407
+ # @yield [response, operation] Access the result along with the RPC operation
408
+ # @yieldparam response [Google::Cloud::Dataproc::V1::Job]
409
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
410
+ #
411
+ # @return [Google::Cloud::Dataproc::V1::Job]
412
+ #
413
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
414
+ #
415
+ def get_job request, options = nil
416
+ raise ArgumentError, "request must be provided" if request.nil?
417
+
418
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::GetJobRequest
419
+
420
+ # Converts hash and nil to an options object
421
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
422
+
423
+ # Customize the options with defaults
424
+ metadata = @config.rpcs.get_job.metadata.to_h
425
+
426
+ # Set x-goog-api-client and x-goog-user-project headers
427
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
428
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
429
+ gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
430
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
431
+
432
+ header_params = {
433
+ "project_id" => request.project_id,
434
+ "region" => request.region,
435
+ "job_id" => request.job_id
436
+ }
437
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
438
+ metadata[:"x-goog-request-params"] ||= request_params_header
439
+
440
+ options.apply_defaults timeout: @config.rpcs.get_job.timeout,
441
+ metadata: metadata,
442
+ retry_policy: @config.rpcs.get_job.retry_policy
443
+ options.apply_defaults metadata: @config.metadata,
444
+ retry_policy: @config.retry_policy
445
+
446
+ @job_controller_stub.call_rpc :get_job, request, options: options do |response, operation|
447
+ yield response, operation if block_given?
448
+ return response
449
+ end
450
+ rescue GRPC::BadStatus => e
451
+ raise Google::Cloud::Error.from_error(e)
452
+ end
453
+
454
+ ##
455
+ # Lists regions/\\{region}/jobs in a project.
456
+ #
457
+ # @overload list_jobs(request, options = nil)
458
+ # Pass arguments to `list_jobs` via a request object, either of type
459
+ # {Google::Cloud::Dataproc::V1::ListJobsRequest} or an equivalent Hash.
460
+ #
461
+ # @param request [Google::Cloud::Dataproc::V1::ListJobsRequest, Hash]
462
+ # A request object representing the call parameters. Required. To specify no
463
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
464
+ # @param options [Gapic::CallOptions, Hash]
465
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
466
+ #
467
+ # @overload list_jobs(project_id: nil, region: nil, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: nil, filter: nil)
468
+ # Pass arguments to `list_jobs` via keyword arguments. Note that at
469
+ # least one keyword argument is required. To specify no parameters, or to keep all
470
+ # the default parameter values, pass an empty Hash as a request object (see above).
471
+ #
472
+ # @param project_id [String]
473
+ # Required. The ID of the Google Cloud Platform project that the job
474
+ # belongs to.
475
+ # @param region [String]
476
+ # Required. The Dataproc region in which to handle the request.
477
+ # @param page_size [Integer]
478
+ # Optional. The number of results to return in each response.
479
+ # @param page_token [String]
480
+ # Optional. The page token, returned by a previous call, to request the
481
+ # next page of results.
482
+ # @param cluster_name [String]
483
+ # Optional. If set, the returned jobs list includes only jobs that were
484
+ # submitted to the named cluster.
485
+ # @param job_state_matcher [Google::Cloud::Dataproc::V1::ListJobsRequest::JobStateMatcher]
486
+ # Optional. Specifies enumerated categories of jobs to list.
487
+ # (default = match ALL jobs).
488
+ #
489
+ # If `filter` is provided, `jobStateMatcher` will be ignored.
490
+ # @param filter [String]
491
+ # Optional. A filter constraining the jobs to list. Filters are
492
+ # case-sensitive and have the following syntax:
493
+ #
494
+ # [field = value] AND [field [= value]] ...
495
+ #
496
+ # where **field** is `status.state` or `labels.[KEY]`, and `[KEY]` is a label
497
+ # key. **value** can be `*` to match all values.
498
+ # `status.state` can be either `ACTIVE` or `NON_ACTIVE`.
499
+ # Only the logical `AND` operator is supported; space-separated items are
500
+ # treated as having an implicit `AND` operator.
501
+ #
502
+ # Example filter:
503
+ #
504
+ # status.state = ACTIVE AND labels.env = staging AND labels.starred = *
505
+ #
506
+ # @yield [response, operation] Access the result along with the RPC operation
507
+ # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Dataproc::V1::Job>]
508
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
509
+ #
510
+ # @return [Gapic::PagedEnumerable<Google::Cloud::Dataproc::V1::Job>]
511
+ #
512
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
513
+ #
514
+ def list_jobs request, options = nil
515
+ raise ArgumentError, "request must be provided" if request.nil?
516
+
517
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::ListJobsRequest
518
+
519
+ # Converts hash and nil to an options object
520
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
521
+
522
+ # Customize the options with defaults
523
+ metadata = @config.rpcs.list_jobs.metadata.to_h
524
+
525
+ # Set x-goog-api-client and x-goog-user-project headers
526
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
527
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
528
+ gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
529
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
530
+
531
+ header_params = {
532
+ "project_id" => request.project_id,
533
+ "region" => request.region
534
+ }
535
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
536
+ metadata[:"x-goog-request-params"] ||= request_params_header
537
+
538
+ options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
539
+ metadata: metadata,
540
+ retry_policy: @config.rpcs.list_jobs.retry_policy
541
+ options.apply_defaults metadata: @config.metadata,
542
+ retry_policy: @config.retry_policy
543
+
544
+ @job_controller_stub.call_rpc :list_jobs, request, options: options do |response, operation|
545
+ response = Gapic::PagedEnumerable.new @job_controller_stub, :list_jobs, request, response, operation, options
546
+ yield response, operation if block_given?
547
+ return response
548
+ end
549
+ rescue GRPC::BadStatus => e
550
+ raise Google::Cloud::Error.from_error(e)
551
+ end
552
+
553
+ ##
554
+ # Updates a job in a project.
555
+ #
556
+ # @overload update_job(request, options = nil)
557
+ # Pass arguments to `update_job` via a request object, either of type
558
+ # {Google::Cloud::Dataproc::V1::UpdateJobRequest} or an equivalent Hash.
559
+ #
560
+ # @param request [Google::Cloud::Dataproc::V1::UpdateJobRequest, Hash]
561
+ # A request object representing the call parameters. Required. To specify no
562
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
563
+ # @param options [Gapic::CallOptions, Hash]
564
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
565
+ #
566
+ # @overload update_job(project_id: nil, region: nil, job_id: nil, job: nil, update_mask: nil)
567
+ # Pass arguments to `update_job` via keyword arguments. Note that at
568
+ # least one keyword argument is required. To specify no parameters, or to keep all
569
+ # the default parameter values, pass an empty Hash as a request object (see above).
570
+ #
571
+ # @param project_id [String]
572
+ # Required. The ID of the Google Cloud Platform project that the job
573
+ # belongs to.
574
+ # @param region [String]
575
+ # Required. The Dataproc region in which to handle the request.
576
+ # @param job_id [String]
577
+ # Required. The job ID.
578
+ # @param job [Google::Cloud::Dataproc::V1::Job, Hash]
579
+ # Required. The changes to the job.
580
+ # @param update_mask [Google::Protobuf::FieldMask, Hash]
581
+ # Required. Specifies the path, relative to <code>Job</code>, of
582
+ # the field to update. For example, to update the labels of a Job the
583
+ # <code>update_mask</code> parameter would be specified as
584
+ # <code>labels</code>, and the `PATCH` request body would specify the new
585
+ # value. <strong>Note:</strong> Currently, <code>labels</code> is the only
586
+ # field that can be updated.
587
+ #
588
+ # @yield [response, operation] Access the result along with the RPC operation
589
+ # @yieldparam response [Google::Cloud::Dataproc::V1::Job]
590
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
591
+ #
592
+ # @return [Google::Cloud::Dataproc::V1::Job]
593
+ #
594
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
595
+ #
596
+ def update_job request, options = nil
597
+ raise ArgumentError, "request must be provided" if request.nil?
598
+
599
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::UpdateJobRequest
600
+
601
+ # Converts hash and nil to an options object
602
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
603
+
604
+ # Customize the options with defaults
605
+ metadata = @config.rpcs.update_job.metadata.to_h
606
+
607
+ # Set x-goog-api-client and x-goog-user-project headers
608
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
609
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
610
+ gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
611
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
612
+
613
+ header_params = {
614
+ "project_id" => request.project_id,
615
+ "region" => request.region,
616
+ "job_id" => request.job_id
617
+ }
618
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
619
+ metadata[:"x-goog-request-params"] ||= request_params_header
620
+
621
+ options.apply_defaults timeout: @config.rpcs.update_job.timeout,
622
+ metadata: metadata,
623
+ retry_policy: @config.rpcs.update_job.retry_policy
624
+ options.apply_defaults metadata: @config.metadata,
625
+ retry_policy: @config.retry_policy
626
+
627
+ @job_controller_stub.call_rpc :update_job, request, options: options do |response, operation|
628
+ yield response, operation if block_given?
629
+ return response
630
+ end
631
+ rescue GRPC::BadStatus => e
632
+ raise Google::Cloud::Error.from_error(e)
633
+ end
634
+
635
+ ##
636
+ # Starts a job cancellation request. To access the job resource
637
+ # after cancellation, call
638
+ # [regions/\\{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list)
639
+ # or
640
+ # [regions/\\{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).
641
+ #
642
+ # @overload cancel_job(request, options = nil)
643
+ # Pass arguments to `cancel_job` via a request object, either of type
644
+ # {Google::Cloud::Dataproc::V1::CancelJobRequest} or an equivalent Hash.
645
+ #
646
+ # @param request [Google::Cloud::Dataproc::V1::CancelJobRequest, Hash]
647
+ # A request object representing the call parameters. Required. To specify no
648
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
649
+ # @param options [Gapic::CallOptions, Hash]
650
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
651
+ #
652
+ # @overload cancel_job(project_id: nil, region: nil, job_id: nil)
653
+ # Pass arguments to `cancel_job` via keyword arguments. Note that at
654
+ # least one keyword argument is required. To specify no parameters, or to keep all
655
+ # the default parameter values, pass an empty Hash as a request object (see above).
656
+ #
657
+ # @param project_id [String]
658
+ # Required. The ID of the Google Cloud Platform project that the job
659
+ # belongs to.
660
+ # @param region [String]
661
+ # Required. The Dataproc region in which to handle the request.
662
+ # @param job_id [String]
663
+ # Required. The job ID.
664
+ #
665
+ # @yield [response, operation] Access the result along with the RPC operation
666
+ # @yieldparam response [Google::Cloud::Dataproc::V1::Job]
667
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
668
+ #
669
+ # @return [Google::Cloud::Dataproc::V1::Job]
670
+ #
671
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
672
+ #
673
+ def cancel_job request, options = nil
674
+ raise ArgumentError, "request must be provided" if request.nil?
675
+
676
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::CancelJobRequest
677
+
678
+ # Converts hash and nil to an options object
679
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
680
+
681
+ # Customize the options with defaults
682
+ metadata = @config.rpcs.cancel_job.metadata.to_h
683
+
684
+ # Set x-goog-api-client and x-goog-user-project headers
685
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
686
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
687
+ gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
688
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
689
+
690
+ header_params = {
691
+ "project_id" => request.project_id,
692
+ "region" => request.region,
693
+ "job_id" => request.job_id
694
+ }
695
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
696
+ metadata[:"x-goog-request-params"] ||= request_params_header
697
+
698
+ options.apply_defaults timeout: @config.rpcs.cancel_job.timeout,
699
+ metadata: metadata,
700
+ retry_policy: @config.rpcs.cancel_job.retry_policy
701
+ options.apply_defaults metadata: @config.metadata,
702
+ retry_policy: @config.retry_policy
703
+
704
+ @job_controller_stub.call_rpc :cancel_job, request, options: options do |response, operation|
705
+ yield response, operation if block_given?
706
+ return response
707
+ end
708
+ rescue GRPC::BadStatus => e
709
+ raise Google::Cloud::Error.from_error(e)
710
+ end
711
+
712
+ ##
713
+ # Deletes the job from the project. If the job is active, the delete fails,
714
+ # and the response returns `FAILED_PRECONDITION`.
715
+ #
716
+ # @overload delete_job(request, options = nil)
717
+ # Pass arguments to `delete_job` via a request object, either of type
718
+ # {Google::Cloud::Dataproc::V1::DeleteJobRequest} or an equivalent Hash.
719
+ #
720
+ # @param request [Google::Cloud::Dataproc::V1::DeleteJobRequest, Hash]
721
+ # A request object representing the call parameters. Required. To specify no
722
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
723
+ # @param options [Gapic::CallOptions, Hash]
724
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
725
+ #
726
+ # @overload delete_job(project_id: nil, region: nil, job_id: nil)
727
+ # Pass arguments to `delete_job` via keyword arguments. Note that at
728
+ # least one keyword argument is required. To specify no parameters, or to keep all
729
+ # the default parameter values, pass an empty Hash as a request object (see above).
730
+ #
731
+ # @param project_id [String]
732
+ # Required. The ID of the Google Cloud Platform project that the job
733
+ # belongs to.
734
+ # @param region [String]
735
+ # Required. The Dataproc region in which to handle the request.
736
+ # @param job_id [String]
737
+ # Required. The job ID.
738
+ #
739
+ # @yield [response, operation] Access the result along with the RPC operation
740
+ # @yieldparam response [Google::Protobuf::Empty]
741
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
742
+ #
743
+ # @return [Google::Protobuf::Empty]
744
+ #
745
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
746
+ #
747
+ def delete_job request, options = nil
748
+ raise ArgumentError, "request must be provided" if request.nil?
749
+
750
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::DeleteJobRequest
751
+
752
+ # Converts hash and nil to an options object
753
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
754
+
755
+ # Customize the options with defaults
756
+ metadata = @config.rpcs.delete_job.metadata.to_h
757
+
758
+ # Set x-goog-api-client and x-goog-user-project headers
759
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
760
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
761
+ gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
762
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
763
+
764
+ header_params = {
765
+ "project_id" => request.project_id,
766
+ "region" => request.region,
767
+ "job_id" => request.job_id
768
+ }
769
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
770
+ metadata[:"x-goog-request-params"] ||= request_params_header
771
+
772
+ options.apply_defaults timeout: @config.rpcs.delete_job.timeout,
773
+ metadata: metadata,
774
+ retry_policy: @config.rpcs.delete_job.retry_policy
775
+ options.apply_defaults metadata: @config.metadata,
776
+ retry_policy: @config.retry_policy
777
+
778
+ @job_controller_stub.call_rpc :delete_job, request, options: options do |response, operation|
779
+ yield response, operation if block_given?
780
+ return response
781
+ end
782
+ rescue GRPC::BadStatus => e
783
+ raise Google::Cloud::Error.from_error(e)
784
+ end
785
+
786
+ ##
787
+ # Configuration class for the JobController API.
788
+ #
789
+ # This class represents the configuration for JobController,
790
+ # providing control over timeouts, retry behavior, logging, transport
791
+ # parameters, and other low-level controls. Certain parameters can also be
792
+ # applied individually to specific RPCs. See
793
+ # {Google::Cloud::Dataproc::V1::JobController::Client::Configuration::Rpcs}
794
+ # for a list of RPCs that can be configured independently.
795
+ #
796
+ # Configuration can be applied globally to all clients, or to a single client
797
+ # on construction.
798
+ #
799
+ # # Examples
800
+ #
801
+ # To modify the global config, setting the timeout for submit_job
802
+ # to 20 seconds, and all remaining timeouts to 10 seconds:
803
+ #
804
+ # Google::Cloud::Dataproc::V1::JobController::Client.configure do |config|
805
+ # config.timeout = 10_000
806
+ # config.rpcs.submit_job.timeout = 20_000
807
+ # end
808
+ #
809
+ # To apply the above configuration only to a new client:
810
+ #
811
+ # client = Google::Cloud::Dataproc::V1::JobController::Client.new do |config|
812
+ # config.timeout = 10_000
813
+ # config.rpcs.submit_job.timeout = 20_000
814
+ # end
815
+ #
816
+ # @!attribute [rw] endpoint
817
+ # The hostname or hostname:port of the service endpoint.
818
+ # Defaults to `"dataproc.googleapis.com"`.
819
+ # @return [String]
820
+ # @!attribute [rw] credentials
821
+ # Credentials to send with calls. You may provide any of the following types:
822
+ # * (`String`) The path to a service account key file in JSON format
823
+ # * (`Hash`) A service account key as a Hash
824
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
825
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
826
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
827
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
828
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
829
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
830
+ # * (`nil`) indicating no credentials
831
+ # @return [Object]
832
+ # @!attribute [rw] scope
833
+ # The OAuth scopes
834
+ # @return [Array<String>]
835
+ # @!attribute [rw] lib_name
836
+ # The library name as recorded in instrumentation and logging
837
+ # @return [String]
838
+ # @!attribute [rw] lib_version
839
+ # The library version as recorded in instrumentation and logging
840
+ # @return [String]
841
+ # @!attribute [rw] channel_args
842
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
843
+ # `GRPC::Core::Channel` object is provided as the credential.
844
+ # @return [Hash]
845
+ # @!attribute [rw] interceptors
846
+ # An array of interceptors that are run before calls are executed.
847
+ # @return [Array<GRPC::ClientInterceptor>]
848
+ # @!attribute [rw] timeout
849
+ # The call timeout in milliseconds.
850
+ # @return [Numeric]
851
+ # @!attribute [rw] metadata
852
+ # Additional gRPC headers to be sent with the call.
853
+ # @return [Hash{Symbol=>String}]
854
+ # @!attribute [rw] retry_policy
855
+ # The retry policy. The value is a hash with the following keys:
856
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
857
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
858
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
859
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
860
+ # trigger a retry.
861
+ # @return [Hash]
862
+ #
863
+ class Configuration
864
+ extend Gapic::Config
865
+
866
+ config_attr :endpoint, "dataproc.googleapis.com", String
867
+ config_attr :credentials, nil do |value|
868
+ allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
869
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
870
+ allowed.any? { |klass| klass === value }
871
+ end
872
+ config_attr :scope, nil, String, Array, nil
873
+ config_attr :lib_name, nil, String, nil
874
+ config_attr :lib_version, nil, String, nil
875
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
876
+ config_attr :interceptors, nil, Array, nil
877
+ config_attr :timeout, nil, Numeric, nil
878
+ config_attr :metadata, nil, Hash, nil
879
+ config_attr :retry_policy, nil, Hash, Proc, nil
880
+
881
+ # @private
882
+ def initialize parent_config = nil
883
+ @parent_config = parent_config unless parent_config.nil?
884
+
885
+ yield self if block_given?
886
+ end
887
+
888
+ ##
889
+ # Configurations for individual RPCs
890
+ # @return [Rpcs]
891
+ #
892
+ def rpcs
893
+ @rpcs ||= begin
894
+ parent_rpcs = nil
895
+ parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
896
+ Rpcs.new parent_rpcs
897
+ end
898
+ end
899
+
900
+ ##
901
+ # Configuration RPC class for the JobController API.
902
+ #
903
+ # Includes fields providing the configuration for each RPC in this service.
904
+ # Each configuration object is of type `Gapic::Config::Method` and includes
905
+ # the following configuration fields:
906
+ #
907
+ # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
908
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
909
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
910
+ # include the following keys:
911
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
912
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
913
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
914
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
915
+ # trigger a retry.
916
+ #
917
+ class Rpcs
918
+ ##
919
+ # RPC-specific configuration for `submit_job`
920
+ # @return [Gapic::Config::Method]
921
+ #
922
+ attr_reader :submit_job
923
+ ##
924
+ # RPC-specific configuration for `submit_job_as_operation`
925
+ # @return [Gapic::Config::Method]
926
+ #
927
+ attr_reader :submit_job_as_operation
928
+ ##
929
+ # RPC-specific configuration for `get_job`
930
+ # @return [Gapic::Config::Method]
931
+ #
932
+ attr_reader :get_job
933
+ ##
934
+ # RPC-specific configuration for `list_jobs`
935
+ # @return [Gapic::Config::Method]
936
+ #
937
+ attr_reader :list_jobs
938
+ ##
939
+ # RPC-specific configuration for `update_job`
940
+ # @return [Gapic::Config::Method]
941
+ #
942
+ attr_reader :update_job
943
+ ##
944
+ # RPC-specific configuration for `cancel_job`
945
+ # @return [Gapic::Config::Method]
946
+ #
947
+ attr_reader :cancel_job
948
+ ##
949
+ # RPC-specific configuration for `delete_job`
950
+ # @return [Gapic::Config::Method]
951
+ #
952
+ attr_reader :delete_job
953
+
954
+ # @private
955
+ def initialize parent_rpcs = nil
956
+ submit_job_config = parent_rpcs&.submit_job if parent_rpcs&.respond_to? :submit_job
957
+ @submit_job = Gapic::Config::Method.new submit_job_config
958
+ submit_job_as_operation_config = parent_rpcs&.submit_job_as_operation if parent_rpcs&.respond_to? :submit_job_as_operation
959
+ @submit_job_as_operation = Gapic::Config::Method.new submit_job_as_operation_config
960
+ get_job_config = parent_rpcs&.get_job if parent_rpcs&.respond_to? :get_job
961
+ @get_job = Gapic::Config::Method.new get_job_config
962
+ list_jobs_config = parent_rpcs&.list_jobs if parent_rpcs&.respond_to? :list_jobs
963
+ @list_jobs = Gapic::Config::Method.new list_jobs_config
964
+ update_job_config = parent_rpcs&.update_job if parent_rpcs&.respond_to? :update_job
965
+ @update_job = Gapic::Config::Method.new update_job_config
966
+ cancel_job_config = parent_rpcs&.cancel_job if parent_rpcs&.respond_to? :cancel_job
967
+ @cancel_job = Gapic::Config::Method.new cancel_job_config
968
+ delete_job_config = parent_rpcs&.delete_job if parent_rpcs&.respond_to? :delete_job
969
+ @delete_job = Gapic::Config::Method.new delete_job_config
970
+
971
+ yield self if block_given?
972
+ end
973
+ end
974
+ end
975
+ end
976
+ end
977
+ end
978
+ end
979
+ end
980
+ end