google-cloud-dataproc-v1 0.1.0 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +5 -1
- data/lib/google/cloud/dataproc/v1.rb +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service.rb +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +129 -124
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/paths.rb +10 -10
- data/lib/google/cloud/dataproc/v1/cluster_controller.rb +1 -1
- data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +179 -174
- data/lib/google/cloud/dataproc/v1/cluster_controller/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +109 -103
- data/lib/google/cloud/dataproc/v1/job_controller.rb +1 -1
- data/lib/google/cloud/dataproc/v1/job_controller/client.rb +186 -181
- data/lib/google/cloud/dataproc/v1/job_controller/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +109 -103
- data/lib/google/cloud/dataproc/v1/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +179 -174
- data/lib/google/cloud/dataproc/v1/workflow_template_service/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +109 -103
- data/lib/google/cloud/dataproc/v1/workflow_template_service/paths.rb +10 -10
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +45 -45
- data/proto_docs/google/cloud/dataproc/v1/clusters.rb +186 -186
- data/proto_docs/google/cloud/dataproc/v1/jobs.rb +226 -225
- data/proto_docs/google/cloud/dataproc/v1/operations.rb +20 -20
- data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +143 -143
- data/proto_docs/google/longrunning/operations.rb +30 -30
- data/proto_docs/google/protobuf/any.rb +4 -4
- data/proto_docs/google/protobuf/duration.rb +4 -4
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/rpc/status.rb +6 -6
- metadata +33 -6
- data/lib/google/cloud/common_resources_pb.rb +0 -15
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# To load this service and instantiate a client:
|
37
37
|
#
|
38
38
|
# require "google/cloud/dataproc/v1/job_controller"
|
39
|
-
# client = Google::Cloud::Dataproc::V1::JobController::Client.new
|
39
|
+
# client = ::Google::Cloud::Dataproc::V1::JobController::Client.new
|
40
40
|
#
|
41
41
|
module JobController
|
42
42
|
end
|
@@ -36,15 +36,15 @@ module Google
|
|
36
36
|
##
|
37
37
|
# Configure the JobController Client class.
|
38
38
|
#
|
39
|
-
# See {Google::Cloud::Dataproc::V1::JobController::Client::Configuration}
|
39
|
+
# See {::Google::Cloud::Dataproc::V1::JobController::Client::Configuration}
|
40
40
|
# for a description of the configuration fields.
|
41
41
|
#
|
42
42
|
# ## Example
|
43
43
|
#
|
44
44
|
# To modify the configuration for all JobController clients:
|
45
45
|
#
|
46
|
-
# Google::Cloud::Dataproc::V1::JobController::Client.configure do |config|
|
47
|
-
# config.timeout =
|
46
|
+
# ::Google::Cloud::Dataproc::V1::JobController::Client.configure do |config|
|
47
|
+
# config.timeout = 10.0
|
48
48
|
# end
|
49
49
|
#
|
50
50
|
# @yield [config] Configure the Client client.
|
@@ -132,7 +132,7 @@ module Google
|
|
132
132
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
133
133
|
# should be made on {Client.configure}.
|
134
134
|
#
|
135
|
-
# See {Google::Cloud::Dataproc::V1::JobController::Client::Configuration}
|
135
|
+
# See {::Google::Cloud::Dataproc::V1::JobController::Client::Configuration}
|
136
136
|
# for a description of the configuration fields.
|
137
137
|
#
|
138
138
|
# @yield [config] Configure the Client client.
|
@@ -153,13 +153,13 @@ module Google
|
|
153
153
|
# To create a new JobController client with the default
|
154
154
|
# configuration:
|
155
155
|
#
|
156
|
-
# client = Google::Cloud::Dataproc::V1::JobController::Client.new
|
156
|
+
# client = ::Google::Cloud::Dataproc::V1::JobController::Client.new
|
157
157
|
#
|
158
158
|
# To create a new JobController client with a custom
|
159
159
|
# configuration:
|
160
160
|
#
|
161
|
-
# client = Google::Cloud::Dataproc::V1::JobController::Client.new do |config|
|
162
|
-
# config.timeout =
|
161
|
+
# client = ::Google::Cloud::Dataproc::V1::JobController::Client.new do |config|
|
162
|
+
# config.timeout = 10.0
|
163
163
|
# end
|
164
164
|
#
|
165
165
|
# @yield [config] Configure the JobController client.
|
@@ -184,15 +184,16 @@ module Google
|
|
184
184
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
185
185
|
credentials = Credentials.new credentials, scope: @config.scope
|
186
186
|
end
|
187
|
-
@quota_project_id =
|
187
|
+
@quota_project_id = @config.quota_project
|
188
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
188
189
|
|
189
190
|
@operations_client = Operations.new do |config|
|
190
191
|
config.credentials = credentials
|
191
192
|
config.endpoint = @config.endpoint
|
192
193
|
end
|
193
194
|
|
194
|
-
@job_controller_stub = Gapic::ServiceStub.new(
|
195
|
-
Google::Cloud::Dataproc::V1::JobController::Stub,
|
195
|
+
@job_controller_stub = ::Gapic::ServiceStub.new(
|
196
|
+
::Google::Cloud::Dataproc::V1::JobController::Stub,
|
196
197
|
credentials: credentials,
|
197
198
|
endpoint: @config.endpoint,
|
198
199
|
channel_args: @config.channel_args,
|
@@ -203,7 +204,7 @@ module Google
|
|
203
204
|
##
|
204
205
|
# Get the associated client for long-running operations.
|
205
206
|
#
|
206
|
-
# @return [Google::Cloud::Dataproc::V1::JobController::Operations]
|
207
|
+
# @return [::Google::Cloud::Dataproc::V1::JobController::Operations]
|
207
208
|
#
|
208
209
|
attr_reader :operations_client
|
209
210
|
|
@@ -214,12 +215,12 @@ module Google
|
|
214
215
|
#
|
215
216
|
# @overload submit_job(request, options = nil)
|
216
217
|
# Pass arguments to `submit_job` via a request object, either of type
|
217
|
-
# {Google::Cloud::Dataproc::V1::SubmitJobRequest} or an equivalent Hash.
|
218
|
+
# {::Google::Cloud::Dataproc::V1::SubmitJobRequest} or an equivalent Hash.
|
218
219
|
#
|
219
|
-
# @param request [Google::Cloud::Dataproc::V1::SubmitJobRequest, Hash]
|
220
|
+
# @param request [::Google::Cloud::Dataproc::V1::SubmitJobRequest, ::Hash]
|
220
221
|
# A request object representing the call parameters. Required. To specify no
|
221
222
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
222
|
-
# @param options [Gapic::CallOptions, Hash]
|
223
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
223
224
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
224
225
|
#
|
225
226
|
# @overload submit_job(project_id: nil, region: nil, job: nil, request_id: nil)
|
@@ -227,18 +228,18 @@ module Google
|
|
227
228
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
228
229
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
229
230
|
#
|
230
|
-
# @param project_id [String]
|
231
|
+
# @param project_id [::String]
|
231
232
|
# Required. The ID of the Google Cloud Platform project that the job
|
232
233
|
# belongs to.
|
233
|
-
# @param region [String]
|
234
|
+
# @param region [::String]
|
234
235
|
# Required. The Dataproc region in which to handle the request.
|
235
|
-
# @param job [Google::Cloud::Dataproc::V1::Job, Hash]
|
236
|
+
# @param job [::Google::Cloud::Dataproc::V1::Job, ::Hash]
|
236
237
|
# Required. The job resource.
|
237
|
-
# @param request_id [String]
|
238
|
+
# @param request_id [::String]
|
238
239
|
# 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
|
+
# receives two {::Google::Cloud::Dataproc::V1::SubmitJobRequest SubmitJobRequest} requests with the same
|
240
241
|
# 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
|
+
# first {::Google::Cloud::Dataproc::V1::Job Job} created and stored in the backend
|
242
243
|
# is returned.
|
243
244
|
#
|
244
245
|
# It is recommended to always set this value to a
|
@@ -248,26 +249,26 @@ module Google
|
|
248
249
|
# underscores (_), and hyphens (-). The maximum length is 40 characters.
|
249
250
|
#
|
250
251
|
# @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]
|
252
|
+
# @yieldparam response [::Google::Cloud::Dataproc::V1::Job]
|
253
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
253
254
|
#
|
254
|
-
# @return [Google::Cloud::Dataproc::V1::Job]
|
255
|
+
# @return [::Google::Cloud::Dataproc::V1::Job]
|
255
256
|
#
|
256
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
257
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
257
258
|
#
|
258
259
|
def submit_job request, options = nil
|
259
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
260
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
260
261
|
|
261
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::SubmitJobRequest
|
262
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::SubmitJobRequest
|
262
263
|
|
263
264
|
# Converts hash and nil to an options object
|
264
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
265
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
265
266
|
|
266
267
|
# Customize the options with defaults
|
267
268
|
metadata = @config.rpcs.submit_job.metadata.to_h
|
268
269
|
|
269
270
|
# Set x-goog-api-client and x-goog-user-project headers
|
270
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
271
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
271
272
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
272
273
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
273
274
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -289,8 +290,8 @@ module Google
|
|
289
290
|
yield response, operation if block_given?
|
290
291
|
return response
|
291
292
|
end
|
292
|
-
rescue GRPC::BadStatus => e
|
293
|
-
raise Google::Cloud::Error.from_error(e)
|
293
|
+
rescue ::GRPC::BadStatus => e
|
294
|
+
raise ::Google::Cloud::Error.from_error(e)
|
294
295
|
end
|
295
296
|
|
296
297
|
##
|
@@ -298,12 +299,12 @@ module Google
|
|
298
299
|
#
|
299
300
|
# @overload submit_job_as_operation(request, options = nil)
|
300
301
|
# 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
|
+
# {::Google::Cloud::Dataproc::V1::SubmitJobRequest} or an equivalent Hash.
|
302
303
|
#
|
303
|
-
# @param request [Google::Cloud::Dataproc::V1::SubmitJobRequest, Hash]
|
304
|
+
# @param request [::Google::Cloud::Dataproc::V1::SubmitJobRequest, ::Hash]
|
304
305
|
# A request object representing the call parameters. Required. To specify no
|
305
306
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
306
|
-
# @param options [Gapic::CallOptions, Hash]
|
307
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
307
308
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
308
309
|
#
|
309
310
|
# @overload submit_job_as_operation(project_id: nil, region: nil, job: nil, request_id: nil)
|
@@ -311,18 +312,18 @@ module Google
|
|
311
312
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
312
313
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
313
314
|
#
|
314
|
-
# @param project_id [String]
|
315
|
+
# @param project_id [::String]
|
315
316
|
# Required. The ID of the Google Cloud Platform project that the job
|
316
317
|
# belongs to.
|
317
|
-
# @param region [String]
|
318
|
+
# @param region [::String]
|
318
319
|
# Required. The Dataproc region in which to handle the request.
|
319
|
-
# @param job [Google::Cloud::Dataproc::V1::Job, Hash]
|
320
|
+
# @param job [::Google::Cloud::Dataproc::V1::Job, ::Hash]
|
320
321
|
# Required. The job resource.
|
321
|
-
# @param request_id [String]
|
322
|
+
# @param request_id [::String]
|
322
323
|
# 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
|
+
# receives two {::Google::Cloud::Dataproc::V1::SubmitJobRequest SubmitJobRequest} requests with the same
|
324
325
|
# 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
|
+
# first {::Google::Cloud::Dataproc::V1::Job Job} created and stored in the backend
|
326
327
|
# is returned.
|
327
328
|
#
|
328
329
|
# It is recommended to always set this value to a
|
@@ -332,26 +333,26 @@ module Google
|
|
332
333
|
# underscores (_), and hyphens (-). The maximum length is 40 characters.
|
333
334
|
#
|
334
335
|
# @yield [response, operation] Access the result along with the RPC operation
|
335
|
-
# @yieldparam response [Gapic::Operation]
|
336
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
336
|
+
# @yieldparam response [::Gapic::Operation]
|
337
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
337
338
|
#
|
338
|
-
# @return [Gapic::Operation]
|
339
|
+
# @return [::Gapic::Operation]
|
339
340
|
#
|
340
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
341
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
341
342
|
#
|
342
343
|
def submit_job_as_operation request, options = nil
|
343
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
344
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
344
345
|
|
345
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::SubmitJobRequest
|
346
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::SubmitJobRequest
|
346
347
|
|
347
348
|
# Converts hash and nil to an options object
|
348
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
349
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
349
350
|
|
350
351
|
# Customize the options with defaults
|
351
352
|
metadata = @config.rpcs.submit_job_as_operation.metadata.to_h
|
352
353
|
|
353
354
|
# Set x-goog-api-client and x-goog-user-project headers
|
354
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
355
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
355
356
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
356
357
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
357
358
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -370,12 +371,12 @@ module Google
|
|
370
371
|
retry_policy: @config.retry_policy
|
371
372
|
|
372
373
|
@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
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
374
375
|
yield response, operation if block_given?
|
375
376
|
return response
|
376
377
|
end
|
377
|
-
rescue GRPC::BadStatus => e
|
378
|
-
raise Google::Cloud::Error.from_error(e)
|
378
|
+
rescue ::GRPC::BadStatus => e
|
379
|
+
raise ::Google::Cloud::Error.from_error(e)
|
379
380
|
end
|
380
381
|
|
381
382
|
##
|
@@ -383,12 +384,12 @@ module Google
|
|
383
384
|
#
|
384
385
|
# @overload get_job(request, options = nil)
|
385
386
|
# Pass arguments to `get_job` via a request object, either of type
|
386
|
-
# {Google::Cloud::Dataproc::V1::GetJobRequest} or an equivalent Hash.
|
387
|
+
# {::Google::Cloud::Dataproc::V1::GetJobRequest} or an equivalent Hash.
|
387
388
|
#
|
388
|
-
# @param request [Google::Cloud::Dataproc::V1::GetJobRequest, Hash]
|
389
|
+
# @param request [::Google::Cloud::Dataproc::V1::GetJobRequest, ::Hash]
|
389
390
|
# A request object representing the call parameters. Required. To specify no
|
390
391
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
391
|
-
# @param options [Gapic::CallOptions, Hash]
|
392
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
392
393
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
393
394
|
#
|
394
395
|
# @overload get_job(project_id: nil, region: nil, job_id: nil)
|
@@ -396,35 +397,35 @@ module Google
|
|
396
397
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
397
398
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
398
399
|
#
|
399
|
-
# @param project_id [String]
|
400
|
+
# @param project_id [::String]
|
400
401
|
# Required. The ID of the Google Cloud Platform project that the job
|
401
402
|
# belongs to.
|
402
|
-
# @param region [String]
|
403
|
+
# @param region [::String]
|
403
404
|
# Required. The Dataproc region in which to handle the request.
|
404
|
-
# @param job_id [String]
|
405
|
+
# @param job_id [::String]
|
405
406
|
# Required. The job ID.
|
406
407
|
#
|
407
408
|
# @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]
|
409
|
+
# @yieldparam response [::Google::Cloud::Dataproc::V1::Job]
|
410
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
410
411
|
#
|
411
|
-
# @return [Google::Cloud::Dataproc::V1::Job]
|
412
|
+
# @return [::Google::Cloud::Dataproc::V1::Job]
|
412
413
|
#
|
413
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
414
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
414
415
|
#
|
415
416
|
def get_job request, options = nil
|
416
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
417
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
417
418
|
|
418
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::GetJobRequest
|
419
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::GetJobRequest
|
419
420
|
|
420
421
|
# Converts hash and nil to an options object
|
421
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
422
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
422
423
|
|
423
424
|
# Customize the options with defaults
|
424
425
|
metadata = @config.rpcs.get_job.metadata.to_h
|
425
426
|
|
426
427
|
# Set x-goog-api-client and x-goog-user-project headers
|
427
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
428
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
428
429
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
429
430
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
430
431
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -447,8 +448,8 @@ module Google
|
|
447
448
|
yield response, operation if block_given?
|
448
449
|
return response
|
449
450
|
end
|
450
|
-
rescue GRPC::BadStatus => e
|
451
|
-
raise Google::Cloud::Error.from_error(e)
|
451
|
+
rescue ::GRPC::BadStatus => e
|
452
|
+
raise ::Google::Cloud::Error.from_error(e)
|
452
453
|
end
|
453
454
|
|
454
455
|
##
|
@@ -456,12 +457,12 @@ module Google
|
|
456
457
|
#
|
457
458
|
# @overload list_jobs(request, options = nil)
|
458
459
|
# Pass arguments to `list_jobs` via a request object, either of type
|
459
|
-
# {Google::Cloud::Dataproc::V1::ListJobsRequest} or an equivalent Hash.
|
460
|
+
# {::Google::Cloud::Dataproc::V1::ListJobsRequest} or an equivalent Hash.
|
460
461
|
#
|
461
|
-
# @param request [Google::Cloud::Dataproc::V1::ListJobsRequest, Hash]
|
462
|
+
# @param request [::Google::Cloud::Dataproc::V1::ListJobsRequest, ::Hash]
|
462
463
|
# A request object representing the call parameters. Required. To specify no
|
463
464
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
464
|
-
# @param options [Gapic::CallOptions, Hash]
|
465
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
465
466
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
466
467
|
#
|
467
468
|
# @overload list_jobs(project_id: nil, region: nil, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: nil, filter: nil)
|
@@ -469,25 +470,25 @@ module Google
|
|
469
470
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
470
471
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
471
472
|
#
|
472
|
-
# @param project_id [String]
|
473
|
+
# @param project_id [::String]
|
473
474
|
# Required. The ID of the Google Cloud Platform project that the job
|
474
475
|
# belongs to.
|
475
|
-
# @param region [String]
|
476
|
+
# @param region [::String]
|
476
477
|
# Required. The Dataproc region in which to handle the request.
|
477
|
-
# @param page_size [Integer]
|
478
|
+
# @param page_size [::Integer]
|
478
479
|
# Optional. The number of results to return in each response.
|
479
|
-
# @param page_token [String]
|
480
|
+
# @param page_token [::String]
|
480
481
|
# Optional. The page token, returned by a previous call, to request the
|
481
482
|
# next page of results.
|
482
|
-
# @param cluster_name [String]
|
483
|
+
# @param cluster_name [::String]
|
483
484
|
# Optional. If set, the returned jobs list includes only jobs that were
|
484
485
|
# submitted to the named cluster.
|
485
|
-
# @param job_state_matcher [Google::Cloud::Dataproc::V1::ListJobsRequest::JobStateMatcher]
|
486
|
+
# @param job_state_matcher [::Google::Cloud::Dataproc::V1::ListJobsRequest::JobStateMatcher]
|
486
487
|
# Optional. Specifies enumerated categories of jobs to list.
|
487
488
|
# (default = match ALL jobs).
|
488
489
|
#
|
489
490
|
# If `filter` is provided, `jobStateMatcher` will be ignored.
|
490
|
-
# @param filter [String]
|
491
|
+
# @param filter [::String]
|
491
492
|
# Optional. A filter constraining the jobs to list. Filters are
|
492
493
|
# case-sensitive and have the following syntax:
|
493
494
|
#
|
@@ -504,26 +505,26 @@ module Google
|
|
504
505
|
# status.state = ACTIVE AND labels.env = staging AND labels.starred = *
|
505
506
|
#
|
506
507
|
# @yield [response, operation] Access the result along with the RPC operation
|
507
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
508
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
508
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1::Job>]
|
509
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
509
510
|
#
|
510
|
-
# @return [Gapic::PagedEnumerable
|
511
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1::Job>]
|
511
512
|
#
|
512
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
513
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
513
514
|
#
|
514
515
|
def list_jobs request, options = nil
|
515
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
516
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
516
517
|
|
517
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::ListJobsRequest
|
518
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::ListJobsRequest
|
518
519
|
|
519
520
|
# Converts hash and nil to an options object
|
520
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
521
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
521
522
|
|
522
523
|
# Customize the options with defaults
|
523
524
|
metadata = @config.rpcs.list_jobs.metadata.to_h
|
524
525
|
|
525
526
|
# Set x-goog-api-client and x-goog-user-project headers
|
526
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
527
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
527
528
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
528
529
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
529
530
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -542,12 +543,12 @@ module Google
|
|
542
543
|
retry_policy: @config.retry_policy
|
543
544
|
|
544
545
|
@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
|
+
response = ::Gapic::PagedEnumerable.new @job_controller_stub, :list_jobs, request, response, operation, options
|
546
547
|
yield response, operation if block_given?
|
547
548
|
return response
|
548
549
|
end
|
549
|
-
rescue GRPC::BadStatus => e
|
550
|
-
raise Google::Cloud::Error.from_error(e)
|
550
|
+
rescue ::GRPC::BadStatus => e
|
551
|
+
raise ::Google::Cloud::Error.from_error(e)
|
551
552
|
end
|
552
553
|
|
553
554
|
##
|
@@ -555,12 +556,12 @@ module Google
|
|
555
556
|
#
|
556
557
|
# @overload update_job(request, options = nil)
|
557
558
|
# Pass arguments to `update_job` via a request object, either of type
|
558
|
-
# {Google::Cloud::Dataproc::V1::UpdateJobRequest} or an equivalent Hash.
|
559
|
+
# {::Google::Cloud::Dataproc::V1::UpdateJobRequest} or an equivalent Hash.
|
559
560
|
#
|
560
|
-
# @param request [Google::Cloud::Dataproc::V1::UpdateJobRequest, Hash]
|
561
|
+
# @param request [::Google::Cloud::Dataproc::V1::UpdateJobRequest, ::Hash]
|
561
562
|
# A request object representing the call parameters. Required. To specify no
|
562
563
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
563
|
-
# @param options [Gapic::CallOptions, Hash]
|
564
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
564
565
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
565
566
|
#
|
566
567
|
# @overload update_job(project_id: nil, region: nil, job_id: nil, job: nil, update_mask: nil)
|
@@ -568,16 +569,16 @@ module Google
|
|
568
569
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
569
570
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
570
571
|
#
|
571
|
-
# @param project_id [String]
|
572
|
+
# @param project_id [::String]
|
572
573
|
# Required. The ID of the Google Cloud Platform project that the job
|
573
574
|
# belongs to.
|
574
|
-
# @param region [String]
|
575
|
+
# @param region [::String]
|
575
576
|
# Required. The Dataproc region in which to handle the request.
|
576
|
-
# @param job_id [String]
|
577
|
+
# @param job_id [::String]
|
577
578
|
# Required. The job ID.
|
578
|
-
# @param job [Google::Cloud::Dataproc::V1::Job, Hash]
|
579
|
+
# @param job [::Google::Cloud::Dataproc::V1::Job, ::Hash]
|
579
580
|
# Required. The changes to the job.
|
580
|
-
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
581
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
581
582
|
# Required. Specifies the path, relative to <code>Job</code>, of
|
582
583
|
# the field to update. For example, to update the labels of a Job the
|
583
584
|
# <code>update_mask</code> parameter would be specified as
|
@@ -586,26 +587,26 @@ module Google
|
|
586
587
|
# field that can be updated.
|
587
588
|
#
|
588
589
|
# @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]
|
590
|
+
# @yieldparam response [::Google::Cloud::Dataproc::V1::Job]
|
591
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
591
592
|
#
|
592
|
-
# @return [Google::Cloud::Dataproc::V1::Job]
|
593
|
+
# @return [::Google::Cloud::Dataproc::V1::Job]
|
593
594
|
#
|
594
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
595
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
595
596
|
#
|
596
597
|
def update_job request, options = nil
|
597
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
598
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
598
599
|
|
599
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::UpdateJobRequest
|
600
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::UpdateJobRequest
|
600
601
|
|
601
602
|
# Converts hash and nil to an options object
|
602
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
603
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
603
604
|
|
604
605
|
# Customize the options with defaults
|
605
606
|
metadata = @config.rpcs.update_job.metadata.to_h
|
606
607
|
|
607
608
|
# Set x-goog-api-client and x-goog-user-project headers
|
608
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
609
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
609
610
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
610
611
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
611
612
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -628,8 +629,8 @@ module Google
|
|
628
629
|
yield response, operation if block_given?
|
629
630
|
return response
|
630
631
|
end
|
631
|
-
rescue GRPC::BadStatus => e
|
632
|
-
raise Google::Cloud::Error.from_error(e)
|
632
|
+
rescue ::GRPC::BadStatus => e
|
633
|
+
raise ::Google::Cloud::Error.from_error(e)
|
633
634
|
end
|
634
635
|
|
635
636
|
##
|
@@ -641,12 +642,12 @@ module Google
|
|
641
642
|
#
|
642
643
|
# @overload cancel_job(request, options = nil)
|
643
644
|
# Pass arguments to `cancel_job` via a request object, either of type
|
644
|
-
# {Google::Cloud::Dataproc::V1::CancelJobRequest} or an equivalent Hash.
|
645
|
+
# {::Google::Cloud::Dataproc::V1::CancelJobRequest} or an equivalent Hash.
|
645
646
|
#
|
646
|
-
# @param request [Google::Cloud::Dataproc::V1::CancelJobRequest, Hash]
|
647
|
+
# @param request [::Google::Cloud::Dataproc::V1::CancelJobRequest, ::Hash]
|
647
648
|
# A request object representing the call parameters. Required. To specify no
|
648
649
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
649
|
-
# @param options [Gapic::CallOptions, Hash]
|
650
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
650
651
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
651
652
|
#
|
652
653
|
# @overload cancel_job(project_id: nil, region: nil, job_id: nil)
|
@@ -654,35 +655,35 @@ module Google
|
|
654
655
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
655
656
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
656
657
|
#
|
657
|
-
# @param project_id [String]
|
658
|
+
# @param project_id [::String]
|
658
659
|
# Required. The ID of the Google Cloud Platform project that the job
|
659
660
|
# belongs to.
|
660
|
-
# @param region [String]
|
661
|
+
# @param region [::String]
|
661
662
|
# Required. The Dataproc region in which to handle the request.
|
662
|
-
# @param job_id [String]
|
663
|
+
# @param job_id [::String]
|
663
664
|
# Required. The job ID.
|
664
665
|
#
|
665
666
|
# @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]
|
667
|
+
# @yieldparam response [::Google::Cloud::Dataproc::V1::Job]
|
668
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
668
669
|
#
|
669
|
-
# @return [Google::Cloud::Dataproc::V1::Job]
|
670
|
+
# @return [::Google::Cloud::Dataproc::V1::Job]
|
670
671
|
#
|
671
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
672
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
672
673
|
#
|
673
674
|
def cancel_job request, options = nil
|
674
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
675
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
675
676
|
|
676
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::CancelJobRequest
|
677
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::CancelJobRequest
|
677
678
|
|
678
679
|
# Converts hash and nil to an options object
|
679
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
680
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
680
681
|
|
681
682
|
# Customize the options with defaults
|
682
683
|
metadata = @config.rpcs.cancel_job.metadata.to_h
|
683
684
|
|
684
685
|
# Set x-goog-api-client and x-goog-user-project headers
|
685
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
686
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
686
687
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
687
688
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
688
689
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -705,8 +706,8 @@ module Google
|
|
705
706
|
yield response, operation if block_given?
|
706
707
|
return response
|
707
708
|
end
|
708
|
-
rescue GRPC::BadStatus => e
|
709
|
-
raise Google::Cloud::Error.from_error(e)
|
709
|
+
rescue ::GRPC::BadStatus => e
|
710
|
+
raise ::Google::Cloud::Error.from_error(e)
|
710
711
|
end
|
711
712
|
|
712
713
|
##
|
@@ -715,12 +716,12 @@ module Google
|
|
715
716
|
#
|
716
717
|
# @overload delete_job(request, options = nil)
|
717
718
|
# Pass arguments to `delete_job` via a request object, either of type
|
718
|
-
# {Google::Cloud::Dataproc::V1::DeleteJobRequest} or an equivalent Hash.
|
719
|
+
# {::Google::Cloud::Dataproc::V1::DeleteJobRequest} or an equivalent Hash.
|
719
720
|
#
|
720
|
-
# @param request [Google::Cloud::Dataproc::V1::DeleteJobRequest, Hash]
|
721
|
+
# @param request [::Google::Cloud::Dataproc::V1::DeleteJobRequest, ::Hash]
|
721
722
|
# A request object representing the call parameters. Required. To specify no
|
722
723
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
723
|
-
# @param options [Gapic::CallOptions, Hash]
|
724
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
724
725
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
725
726
|
#
|
726
727
|
# @overload delete_job(project_id: nil, region: nil, job_id: nil)
|
@@ -728,35 +729,35 @@ module Google
|
|
728
729
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
729
730
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
730
731
|
#
|
731
|
-
# @param project_id [String]
|
732
|
+
# @param project_id [::String]
|
732
733
|
# Required. The ID of the Google Cloud Platform project that the job
|
733
734
|
# belongs to.
|
734
|
-
# @param region [String]
|
735
|
+
# @param region [::String]
|
735
736
|
# Required. The Dataproc region in which to handle the request.
|
736
|
-
# @param job_id [String]
|
737
|
+
# @param job_id [::String]
|
737
738
|
# Required. The job ID.
|
738
739
|
#
|
739
740
|
# @yield [response, operation] Access the result along with the RPC operation
|
740
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
741
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
741
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
742
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
742
743
|
#
|
743
|
-
# @return [Google::Protobuf::Empty]
|
744
|
+
# @return [::Google::Protobuf::Empty]
|
744
745
|
#
|
745
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
746
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
746
747
|
#
|
747
748
|
def delete_job request, options = nil
|
748
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
749
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
749
750
|
|
750
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1::DeleteJobRequest
|
751
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1::DeleteJobRequest
|
751
752
|
|
752
753
|
# Converts hash and nil to an options object
|
753
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
754
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
754
755
|
|
755
756
|
# Customize the options with defaults
|
756
757
|
metadata = @config.rpcs.delete_job.metadata.to_h
|
757
758
|
|
758
759
|
# Set x-goog-api-client and x-goog-user-project headers
|
759
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
760
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
760
761
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
761
762
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
762
763
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -779,8 +780,8 @@ module Google
|
|
779
780
|
yield response, operation if block_given?
|
780
781
|
return response
|
781
782
|
end
|
782
|
-
rescue GRPC::BadStatus => e
|
783
|
-
raise Google::Cloud::Error.from_error(e)
|
783
|
+
rescue ::GRPC::BadStatus => e
|
784
|
+
raise ::Google::Cloud::Error.from_error(e)
|
784
785
|
end
|
785
786
|
|
786
787
|
##
|
@@ -790,7 +791,7 @@ module Google
|
|
790
791
|
# providing control over timeouts, retry behavior, logging, transport
|
791
792
|
# parameters, and other low-level controls. Certain parameters can also be
|
792
793
|
# applied individually to specific RPCs. See
|
793
|
-
# {Google::Cloud::Dataproc::V1::JobController::Client::Configuration::Rpcs}
|
794
|
+
# {::Google::Cloud::Dataproc::V1::JobController::Client::Configuration::Rpcs}
|
794
795
|
# for a list of RPCs that can be configured independently.
|
795
796
|
#
|
796
797
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -801,22 +802,22 @@ module Google
|
|
801
802
|
# To modify the global config, setting the timeout for submit_job
|
802
803
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
803
804
|
#
|
804
|
-
# Google::Cloud::Dataproc::V1::JobController::Client.configure do |config|
|
805
|
-
# config.timeout =
|
806
|
-
# config.rpcs.submit_job.timeout =
|
805
|
+
# ::Google::Cloud::Dataproc::V1::JobController::Client.configure do |config|
|
806
|
+
# config.timeout = 10.0
|
807
|
+
# config.rpcs.submit_job.timeout = 20.0
|
807
808
|
# end
|
808
809
|
#
|
809
810
|
# To apply the above configuration only to a new client:
|
810
811
|
#
|
811
|
-
# client = Google::Cloud::Dataproc::V1::JobController::Client.new do |config|
|
812
|
-
# config.timeout =
|
813
|
-
# config.rpcs.submit_job.timeout =
|
812
|
+
# client = ::Google::Cloud::Dataproc::V1::JobController::Client.new do |config|
|
813
|
+
# config.timeout = 10.0
|
814
|
+
# config.rpcs.submit_job.timeout = 20.0
|
814
815
|
# end
|
815
816
|
#
|
816
817
|
# @!attribute [rw] endpoint
|
817
818
|
# The hostname or hostname:port of the service endpoint.
|
818
819
|
# Defaults to `"dataproc.googleapis.com"`.
|
819
|
-
# @return [String]
|
820
|
+
# @return [::String]
|
820
821
|
# @!attribute [rw] credentials
|
821
822
|
# Credentials to send with calls. You may provide any of the following types:
|
822
823
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -828,29 +829,29 @@ module Google
|
|
828
829
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
829
830
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
830
831
|
# * (`nil`) indicating no credentials
|
831
|
-
# @return [Object]
|
832
|
+
# @return [::Object]
|
832
833
|
# @!attribute [rw] scope
|
833
834
|
# The OAuth scopes
|
834
|
-
# @return [Array
|
835
|
+
# @return [::Array<::String>]
|
835
836
|
# @!attribute [rw] lib_name
|
836
837
|
# The library name as recorded in instrumentation and logging
|
837
|
-
# @return [String]
|
838
|
+
# @return [::String]
|
838
839
|
# @!attribute [rw] lib_version
|
839
840
|
# The library version as recorded in instrumentation and logging
|
840
|
-
# @return [String]
|
841
|
+
# @return [::String]
|
841
842
|
# @!attribute [rw] channel_args
|
842
843
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
843
844
|
# `GRPC::Core::Channel` object is provided as the credential.
|
844
|
-
# @return [Hash]
|
845
|
+
# @return [::Hash]
|
845
846
|
# @!attribute [rw] interceptors
|
846
847
|
# An array of interceptors that are run before calls are executed.
|
847
|
-
# @return [Array
|
848
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
848
849
|
# @!attribute [rw] timeout
|
849
|
-
# The call timeout in
|
850
|
-
# @return [Numeric]
|
850
|
+
# The call timeout in seconds.
|
851
|
+
# @return [::Numeric]
|
851
852
|
# @!attribute [rw] metadata
|
852
853
|
# Additional gRPC headers to be sent with the call.
|
853
|
-
# @return [Hash{Symbol
|
854
|
+
# @return [::Hash{::Symbol=>::String}]
|
854
855
|
# @!attribute [rw] retry_policy
|
855
856
|
# The retry policy. The value is a hash with the following keys:
|
856
857
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -858,25 +859,29 @@ module Google
|
|
858
859
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
859
860
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
860
861
|
# trigger a retry.
|
861
|
-
# @return [Hash]
|
862
|
+
# @return [::Hash]
|
863
|
+
# @!attribute [rw] quota_project
|
864
|
+
# A separate project against which to charge quota.
|
865
|
+
# @return [::String]
|
862
866
|
#
|
863
867
|
class Configuration
|
864
|
-
extend Gapic::Config
|
868
|
+
extend ::Gapic::Config
|
865
869
|
|
866
|
-
config_attr :endpoint,
|
867
|
-
config_attr :credentials,
|
870
|
+
config_attr :endpoint, "dataproc.googleapis.com", ::String
|
871
|
+
config_attr :credentials, nil do |value|
|
868
872
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
869
873
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
870
874
|
allowed.any? { |klass| klass === value }
|
871
875
|
end
|
872
|
-
config_attr :scope,
|
873
|
-
config_attr :lib_name,
|
874
|
-
config_attr :lib_version,
|
875
|
-
config_attr(:channel_args,
|
876
|
-
config_attr :interceptors,
|
877
|
-
config_attr :timeout,
|
878
|
-
config_attr :metadata,
|
879
|
-
config_attr :retry_policy,
|
876
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
877
|
+
config_attr :lib_name, nil, ::String, nil
|
878
|
+
config_attr :lib_version, nil, ::String, nil
|
879
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
880
|
+
config_attr :interceptors, nil, ::Array, nil
|
881
|
+
config_attr :timeout, nil, ::Numeric, nil
|
882
|
+
config_attr :metadata, nil, ::Hash, nil
|
883
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
884
|
+
config_attr :quota_project, nil, ::String, nil
|
880
885
|
|
881
886
|
# @private
|
882
887
|
def initialize parent_config = nil
|
@@ -892,7 +897,7 @@ module Google
|
|
892
897
|
def rpcs
|
893
898
|
@rpcs ||= begin
|
894
899
|
parent_rpcs = nil
|
895
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
900
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
896
901
|
Rpcs.new parent_rpcs
|
897
902
|
end
|
898
903
|
end
|
@@ -917,56 +922,56 @@ module Google
|
|
917
922
|
class Rpcs
|
918
923
|
##
|
919
924
|
# RPC-specific configuration for `submit_job`
|
920
|
-
# @return [Gapic::Config::Method]
|
925
|
+
# @return [::Gapic::Config::Method]
|
921
926
|
#
|
922
927
|
attr_reader :submit_job
|
923
928
|
##
|
924
929
|
# RPC-specific configuration for `submit_job_as_operation`
|
925
|
-
# @return [Gapic::Config::Method]
|
930
|
+
# @return [::Gapic::Config::Method]
|
926
931
|
#
|
927
932
|
attr_reader :submit_job_as_operation
|
928
933
|
##
|
929
934
|
# RPC-specific configuration for `get_job`
|
930
|
-
# @return [Gapic::Config::Method]
|
935
|
+
# @return [::Gapic::Config::Method]
|
931
936
|
#
|
932
937
|
attr_reader :get_job
|
933
938
|
##
|
934
939
|
# RPC-specific configuration for `list_jobs`
|
935
|
-
# @return [Gapic::Config::Method]
|
940
|
+
# @return [::Gapic::Config::Method]
|
936
941
|
#
|
937
942
|
attr_reader :list_jobs
|
938
943
|
##
|
939
944
|
# RPC-specific configuration for `update_job`
|
940
|
-
# @return [Gapic::Config::Method]
|
945
|
+
# @return [::Gapic::Config::Method]
|
941
946
|
#
|
942
947
|
attr_reader :update_job
|
943
948
|
##
|
944
949
|
# RPC-specific configuration for `cancel_job`
|
945
|
-
# @return [Gapic::Config::Method]
|
950
|
+
# @return [::Gapic::Config::Method]
|
946
951
|
#
|
947
952
|
attr_reader :cancel_job
|
948
953
|
##
|
949
954
|
# RPC-specific configuration for `delete_job`
|
950
|
-
# @return [Gapic::Config::Method]
|
955
|
+
# @return [::Gapic::Config::Method]
|
951
956
|
#
|
952
957
|
attr_reader :delete_job
|
953
958
|
|
954
959
|
# @private
|
955
960
|
def initialize parent_rpcs = nil
|
956
961
|
submit_job_config = parent_rpcs&.submit_job if parent_rpcs&.respond_to? :submit_job
|
957
|
-
@submit_job = Gapic::Config::Method.new submit_job_config
|
962
|
+
@submit_job = ::Gapic::Config::Method.new submit_job_config
|
958
963
|
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
|
964
|
+
@submit_job_as_operation = ::Gapic::Config::Method.new submit_job_as_operation_config
|
960
965
|
get_job_config = parent_rpcs&.get_job if parent_rpcs&.respond_to? :get_job
|
961
|
-
@get_job = Gapic::Config::Method.new get_job_config
|
966
|
+
@get_job = ::Gapic::Config::Method.new get_job_config
|
962
967
|
list_jobs_config = parent_rpcs&.list_jobs if parent_rpcs&.respond_to? :list_jobs
|
963
|
-
@list_jobs = Gapic::Config::Method.new list_jobs_config
|
968
|
+
@list_jobs = ::Gapic::Config::Method.new list_jobs_config
|
964
969
|
update_job_config = parent_rpcs&.update_job if parent_rpcs&.respond_to? :update_job
|
965
|
-
@update_job = Gapic::Config::Method.new update_job_config
|
970
|
+
@update_job = ::Gapic::Config::Method.new update_job_config
|
966
971
|
cancel_job_config = parent_rpcs&.cancel_job if parent_rpcs&.respond_to? :cancel_job
|
967
|
-
@cancel_job = Gapic::Config::Method.new cancel_job_config
|
972
|
+
@cancel_job = ::Gapic::Config::Method.new cancel_job_config
|
968
973
|
delete_job_config = parent_rpcs&.delete_job if parent_rpcs&.respond_to? :delete_job
|
969
|
-
@delete_job = Gapic::Config::Method.new delete_job_config
|
974
|
+
@delete_job = ::Gapic::Config::Method.new delete_job_config
|
970
975
|
|
971
976
|
yield self if block_given?
|
972
977
|
end
|