google-cloud-dataproc-v1beta2 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/v1beta2.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service/client.rb +129 -124
- data/lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/autoscaling_policy_service/paths.rb +10 -10
- data/lib/google/cloud/dataproc/v1beta2/cluster_controller.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/cluster_controller/client.rb +180 -175
- data/lib/google/cloud/dataproc/v1beta2/cluster_controller/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/cluster_controller/operations.rb +109 -103
- data/lib/google/cloud/dataproc/v1beta2/job_controller.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/job_controller/client.rb +186 -181
- data/lib/google/cloud/dataproc/v1beta2/job_controller/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/job_controller/operations.rb +109 -103
- data/lib/google/cloud/dataproc/v1beta2/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service/client.rb +181 -176
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service/credentials.rb +1 -1
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service/operations.rb +109 -103
- data/lib/google/cloud/dataproc/v1beta2/workflow_template_service/paths.rb +10 -10
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/dataproc/v1beta2/autoscaling_policies.rb +45 -45
- data/proto_docs/google/cloud/dataproc/v1beta2/clusters.rb +203 -203
- data/proto_docs/google/cloud/dataproc/v1beta2/jobs.rb +227 -226
- data/proto_docs/google/cloud/dataproc/v1beta2/operations.rb +20 -20
- data/proto_docs/google/cloud/dataproc/v1beta2/workflow_templates.rb +145 -145
- 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
@@ -38,7 +38,7 @@ module Google
|
|
38
38
|
# To load this service and instantiate a client:
|
39
39
|
#
|
40
40
|
# require "google/cloud/dataproc/v1beta2/workflow_template_service"
|
41
|
-
# client = Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.new
|
41
|
+
# client = ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.new
|
42
42
|
#
|
43
43
|
module WorkflowTemplateService
|
44
44
|
end
|
@@ -39,15 +39,15 @@ module Google
|
|
39
39
|
##
|
40
40
|
# Configure the WorkflowTemplateService Client class.
|
41
41
|
#
|
42
|
-
# See {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client::Configuration}
|
42
|
+
# See {::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client::Configuration}
|
43
43
|
# for a description of the configuration fields.
|
44
44
|
#
|
45
45
|
# ## Example
|
46
46
|
#
|
47
47
|
# To modify the configuration for all WorkflowTemplateService clients:
|
48
48
|
#
|
49
|
-
# Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.configure do |config|
|
50
|
-
# config.timeout =
|
49
|
+
# ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.configure do |config|
|
50
|
+
# config.timeout = 10.0
|
51
51
|
# end
|
52
52
|
#
|
53
53
|
# @yield [config] Configure the Client client.
|
@@ -135,7 +135,7 @@ module Google
|
|
135
135
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
136
136
|
# should be made on {Client.configure}.
|
137
137
|
#
|
138
|
-
# See {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client::Configuration}
|
138
|
+
# See {::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client::Configuration}
|
139
139
|
# for a description of the configuration fields.
|
140
140
|
#
|
141
141
|
# @yield [config] Configure the Client client.
|
@@ -156,13 +156,13 @@ module Google
|
|
156
156
|
# To create a new WorkflowTemplateService client with the default
|
157
157
|
# configuration:
|
158
158
|
#
|
159
|
-
# client = Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.new
|
159
|
+
# client = ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.new
|
160
160
|
#
|
161
161
|
# To create a new WorkflowTemplateService client with a custom
|
162
162
|
# configuration:
|
163
163
|
#
|
164
|
-
# client = Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.new do |config|
|
165
|
-
# config.timeout =
|
164
|
+
# client = ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.new do |config|
|
165
|
+
# config.timeout = 10.0
|
166
166
|
# end
|
167
167
|
#
|
168
168
|
# @yield [config] Configure the WorkflowTemplateService client.
|
@@ -187,15 +187,16 @@ module Google
|
|
187
187
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
188
188
|
credentials = Credentials.new credentials, scope: @config.scope
|
189
189
|
end
|
190
|
-
@quota_project_id =
|
190
|
+
@quota_project_id = @config.quota_project
|
191
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
191
192
|
|
192
193
|
@operations_client = Operations.new do |config|
|
193
194
|
config.credentials = credentials
|
194
195
|
config.endpoint = @config.endpoint
|
195
196
|
end
|
196
197
|
|
197
|
-
@workflow_template_service_stub = Gapic::ServiceStub.new(
|
198
|
-
Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Stub,
|
198
|
+
@workflow_template_service_stub = ::Gapic::ServiceStub.new(
|
199
|
+
::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Stub,
|
199
200
|
credentials: credentials,
|
200
201
|
endpoint: @config.endpoint,
|
201
202
|
channel_args: @config.channel_args,
|
@@ -206,7 +207,7 @@ module Google
|
|
206
207
|
##
|
207
208
|
# Get the associated client for long-running operations.
|
208
209
|
#
|
209
|
-
# @return [Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Operations]
|
210
|
+
# @return [::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Operations]
|
210
211
|
#
|
211
212
|
attr_reader :operations_client
|
212
213
|
|
@@ -217,12 +218,12 @@ module Google
|
|
217
218
|
#
|
218
219
|
# @overload create_workflow_template(request, options = nil)
|
219
220
|
# Pass arguments to `create_workflow_template` via a request object, either of type
|
220
|
-
# {Google::Cloud::Dataproc::V1beta2::CreateWorkflowTemplateRequest} or an equivalent Hash.
|
221
|
+
# {::Google::Cloud::Dataproc::V1beta2::CreateWorkflowTemplateRequest} or an equivalent Hash.
|
221
222
|
#
|
222
|
-
# @param request [Google::Cloud::Dataproc::V1beta2::CreateWorkflowTemplateRequest, Hash]
|
223
|
+
# @param request [::Google::Cloud::Dataproc::V1beta2::CreateWorkflowTemplateRequest, ::Hash]
|
223
224
|
# A request object representing the call parameters. Required. To specify no
|
224
225
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
225
|
-
# @param options [Gapic::CallOptions, Hash]
|
226
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
226
227
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
227
228
|
#
|
228
229
|
# @overload create_workflow_template(parent: nil, template: nil)
|
@@ -230,7 +231,7 @@ module Google
|
|
230
231
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
231
232
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
232
233
|
#
|
233
|
-
# @param parent [String]
|
234
|
+
# @param parent [::String]
|
234
235
|
# Required. The resource name of the region or location, as described
|
235
236
|
# in https://cloud.google.com/apis/design/resource_names.
|
236
237
|
#
|
@@ -241,30 +242,30 @@ module Google
|
|
241
242
|
# * For `projects.locations.workflowTemplates.create`, the resource name of
|
242
243
|
# the location has the following format:
|
243
244
|
# `projects/{project_id}/locations/{location}`
|
244
|
-
# @param template [Google::Cloud::Dataproc::V1beta2::WorkflowTemplate, Hash]
|
245
|
+
# @param template [::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate, ::Hash]
|
245
246
|
# Required. The Dataproc workflow template to create.
|
246
247
|
#
|
247
248
|
# @yield [response, operation] Access the result along with the RPC operation
|
248
|
-
# @yieldparam response [Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
249
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
249
|
+
# @yieldparam response [::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
250
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
250
251
|
#
|
251
|
-
# @return [Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
252
|
+
# @return [::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
252
253
|
#
|
253
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
254
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
254
255
|
#
|
255
256
|
def create_workflow_template request, options = nil
|
256
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
257
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
257
258
|
|
258
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1beta2::CreateWorkflowTemplateRequest
|
259
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1beta2::CreateWorkflowTemplateRequest
|
259
260
|
|
260
261
|
# Converts hash and nil to an options object
|
261
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
262
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
262
263
|
|
263
264
|
# Customize the options with defaults
|
264
265
|
metadata = @config.rpcs.create_workflow_template.metadata.to_h
|
265
266
|
|
266
267
|
# Set x-goog-api-client and x-goog-user-project headers
|
267
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
268
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
268
269
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
269
270
|
gapic_version: ::Google::Cloud::Dataproc::V1beta2::VERSION
|
270
271
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -285,8 +286,8 @@ module Google
|
|
285
286
|
yield response, operation if block_given?
|
286
287
|
return response
|
287
288
|
end
|
288
|
-
rescue GRPC::BadStatus => e
|
289
|
-
raise Google::Cloud::Error.from_error(e)
|
289
|
+
rescue ::GRPC::BadStatus => e
|
290
|
+
raise ::Google::Cloud::Error.from_error(e)
|
290
291
|
end
|
291
292
|
|
292
293
|
##
|
@@ -297,12 +298,12 @@ module Google
|
|
297
298
|
#
|
298
299
|
# @overload get_workflow_template(request, options = nil)
|
299
300
|
# Pass arguments to `get_workflow_template` via a request object, either of type
|
300
|
-
# {Google::Cloud::Dataproc::V1beta2::GetWorkflowTemplateRequest} or an equivalent Hash.
|
301
|
+
# {::Google::Cloud::Dataproc::V1beta2::GetWorkflowTemplateRequest} or an equivalent Hash.
|
301
302
|
#
|
302
|
-
# @param request [Google::Cloud::Dataproc::V1beta2::GetWorkflowTemplateRequest, Hash]
|
303
|
+
# @param request [::Google::Cloud::Dataproc::V1beta2::GetWorkflowTemplateRequest, ::Hash]
|
303
304
|
# A request object representing the call parameters. Required. To specify no
|
304
305
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
305
|
-
# @param options [Gapic::CallOptions, Hash]
|
306
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
306
307
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
307
308
|
#
|
308
309
|
# @overload get_workflow_template(name: nil, version: nil)
|
@@ -310,7 +311,7 @@ module Google
|
|
310
311
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
311
312
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
312
313
|
#
|
313
|
-
# @param name [String]
|
314
|
+
# @param name [::String]
|
314
315
|
# Required. The resource name of the workflow template, as described
|
315
316
|
# in https://cloud.google.com/apis/design/resource_names.
|
316
317
|
#
|
@@ -321,33 +322,33 @@ module Google
|
|
321
322
|
# * For `projects.locations.workflowTemplates.get`, the resource name of the
|
322
323
|
# template has the following format:
|
323
324
|
# `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
|
324
|
-
# @param version [Integer]
|
325
|
+
# @param version [::Integer]
|
325
326
|
# Optional. The version of workflow template to retrieve. Only previously
|
326
327
|
# instantiated versions can be retrieved.
|
327
328
|
#
|
328
329
|
# If unspecified, retrieves the current version.
|
329
330
|
#
|
330
331
|
# @yield [response, operation] Access the result along with the RPC operation
|
331
|
-
# @yieldparam response [Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
332
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
332
|
+
# @yieldparam response [::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
333
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
333
334
|
#
|
334
|
-
# @return [Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
335
|
+
# @return [::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
335
336
|
#
|
336
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
337
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
337
338
|
#
|
338
339
|
def get_workflow_template request, options = nil
|
339
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
340
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
340
341
|
|
341
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1beta2::GetWorkflowTemplateRequest
|
342
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1beta2::GetWorkflowTemplateRequest
|
342
343
|
|
343
344
|
# Converts hash and nil to an options object
|
344
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
345
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
345
346
|
|
346
347
|
# Customize the options with defaults
|
347
348
|
metadata = @config.rpcs.get_workflow_template.metadata.to_h
|
348
349
|
|
349
350
|
# Set x-goog-api-client and x-goog-user-project headers
|
350
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
351
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
351
352
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
352
353
|
gapic_version: ::Google::Cloud::Dataproc::V1beta2::VERSION
|
353
354
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -368,8 +369,8 @@ module Google
|
|
368
369
|
yield response, operation if block_given?
|
369
370
|
return response
|
370
371
|
end
|
371
|
-
rescue GRPC::BadStatus => e
|
372
|
-
raise Google::Cloud::Error.from_error(e)
|
372
|
+
rescue ::GRPC::BadStatus => e
|
373
|
+
raise ::Google::Cloud::Error.from_error(e)
|
373
374
|
end
|
374
375
|
|
375
376
|
##
|
@@ -385,23 +386,23 @@ module Google
|
|
385
386
|
# This will cause any inflight jobs to be cancelled and workflow-owned
|
386
387
|
# clusters to be deleted.
|
387
388
|
#
|
388
|
-
# The {Google::Longrunning::Operation#metadata Operation.metadata} will be
|
389
|
+
# The {::Google::Longrunning::Operation#metadata Operation.metadata} will be
|
389
390
|
# [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#workflowmetadata).
|
390
391
|
# Also see [Using
|
391
392
|
# WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
|
392
393
|
#
|
393
394
|
# On successful completion,
|
394
|
-
# {Google::Longrunning::Operation#response Operation.response} will be
|
395
|
-
# {Google::Protobuf::Empty Empty}.
|
395
|
+
# {::Google::Longrunning::Operation#response Operation.response} will be
|
396
|
+
# {::Google::Protobuf::Empty Empty}.
|
396
397
|
#
|
397
398
|
# @overload instantiate_workflow_template(request, options = nil)
|
398
399
|
# Pass arguments to `instantiate_workflow_template` via a request object, either of type
|
399
|
-
# {Google::Cloud::Dataproc::V1beta2::InstantiateWorkflowTemplateRequest} or an equivalent Hash.
|
400
|
+
# {::Google::Cloud::Dataproc::V1beta2::InstantiateWorkflowTemplateRequest} or an equivalent Hash.
|
400
401
|
#
|
401
|
-
# @param request [Google::Cloud::Dataproc::V1beta2::InstantiateWorkflowTemplateRequest, Hash]
|
402
|
+
# @param request [::Google::Cloud::Dataproc::V1beta2::InstantiateWorkflowTemplateRequest, ::Hash]
|
402
403
|
# A request object representing the call parameters. Required. To specify no
|
403
404
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
404
|
-
# @param options [Gapic::CallOptions, Hash]
|
405
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
405
406
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
406
407
|
#
|
407
408
|
# @overload instantiate_workflow_template(name: nil, version: nil, instance_id: nil, request_id: nil, parameters: nil)
|
@@ -409,7 +410,7 @@ module Google
|
|
409
410
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
410
411
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
411
412
|
#
|
412
|
-
# @param name [String]
|
413
|
+
# @param name [::String]
|
413
414
|
# Required. The resource name of the workflow template, as described
|
414
415
|
# in https://cloud.google.com/apis/design/resource_names.
|
415
416
|
#
|
@@ -420,16 +421,16 @@ module Google
|
|
420
421
|
# * For `projects.locations.workflowTemplates.instantiate`, the resource name
|
421
422
|
# of the template has the following format:
|
422
423
|
# `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
|
423
|
-
# @param version [Integer]
|
424
|
+
# @param version [::Integer]
|
424
425
|
# Optional. The version of workflow template to instantiate. If specified,
|
425
426
|
# the workflow will be instantiated only if the current version of
|
426
427
|
# the workflow template has the supplied version.
|
427
428
|
#
|
428
429
|
# This option cannot be used to instantiate a previous version of
|
429
430
|
# workflow template.
|
430
|
-
# @param instance_id [String]
|
431
|
+
# @param instance_id [::String]
|
431
432
|
# Deprecated. Please use `request_id` field instead.
|
432
|
-
# @param request_id [String]
|
433
|
+
# @param request_id [::String]
|
433
434
|
# Optional. A tag that prevents multiple concurrent workflow
|
434
435
|
# instances with the same tag from running. This mitigates risk of
|
435
436
|
# concurrent instances started due to retries.
|
@@ -439,31 +440,31 @@ module Google
|
|
439
440
|
#
|
440
441
|
# The tag must contain only letters (a-z, A-Z), numbers (0-9),
|
441
442
|
# underscores (_), and hyphens (-). The maximum length is 40 characters.
|
442
|
-
# @param parameters [Hash{String => String}]
|
443
|
+
# @param parameters [::Hash{::String => ::String}]
|
443
444
|
# Optional. Map from parameter names to values that should be used for those
|
444
445
|
# parameters. Values may not exceed 100 characters.
|
445
446
|
#
|
446
447
|
# @yield [response, operation] Access the result along with the RPC operation
|
447
|
-
# @yieldparam response [Gapic::Operation]
|
448
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
448
|
+
# @yieldparam response [::Gapic::Operation]
|
449
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
449
450
|
#
|
450
|
-
# @return [Gapic::Operation]
|
451
|
+
# @return [::Gapic::Operation]
|
451
452
|
#
|
452
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
453
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
453
454
|
#
|
454
455
|
def instantiate_workflow_template request, options = nil
|
455
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
456
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
456
457
|
|
457
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1beta2::InstantiateWorkflowTemplateRequest
|
458
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1beta2::InstantiateWorkflowTemplateRequest
|
458
459
|
|
459
460
|
# Converts hash and nil to an options object
|
460
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
461
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
461
462
|
|
462
463
|
# Customize the options with defaults
|
463
464
|
metadata = @config.rpcs.instantiate_workflow_template.metadata.to_h
|
464
465
|
|
465
466
|
# Set x-goog-api-client and x-goog-user-project headers
|
466
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
467
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
467
468
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
468
469
|
gapic_version: ::Google::Cloud::Dataproc::V1beta2::VERSION
|
469
470
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -481,20 +482,20 @@ module Google
|
|
481
482
|
retry_policy: @config.retry_policy
|
482
483
|
|
483
484
|
@workflow_template_service_stub.call_rpc :instantiate_workflow_template, request, options: options do |response, operation|
|
484
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
485
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
485
486
|
yield response, operation if block_given?
|
486
487
|
return response
|
487
488
|
end
|
488
|
-
rescue GRPC::BadStatus => e
|
489
|
-
raise Google::Cloud::Error.from_error(e)
|
489
|
+
rescue ::GRPC::BadStatus => e
|
490
|
+
raise ::Google::Cloud::Error.from_error(e)
|
490
491
|
end
|
491
492
|
|
492
493
|
##
|
493
494
|
# Instantiates a template and begins execution.
|
494
495
|
#
|
495
496
|
# This method is equivalent to executing the sequence
|
496
|
-
# {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate}, {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client#instantiate_workflow_template InstantiateWorkflowTemplate},
|
497
|
-
# {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client#delete_workflow_template DeleteWorkflowTemplate}.
|
497
|
+
# {::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate}, {::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client#instantiate_workflow_template InstantiateWorkflowTemplate},
|
498
|
+
# {::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client#delete_workflow_template DeleteWorkflowTemplate}.
|
498
499
|
#
|
499
500
|
# The returned Operation can be used to track execution of
|
500
501
|
# workflow by polling
|
@@ -506,23 +507,23 @@ module Google
|
|
506
507
|
# This will cause any inflight jobs to be cancelled and workflow-owned
|
507
508
|
# clusters to be deleted.
|
508
509
|
#
|
509
|
-
# The {Google::Longrunning::Operation#metadata Operation.metadata} will be
|
510
|
+
# The {::Google::Longrunning::Operation#metadata Operation.metadata} will be
|
510
511
|
# [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
|
511
512
|
# Also see [Using
|
512
513
|
# WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
|
513
514
|
#
|
514
515
|
# On successful completion,
|
515
|
-
# {Google::Longrunning::Operation#response Operation.response} will be
|
516
|
-
# {Google::Protobuf::Empty Empty}.
|
516
|
+
# {::Google::Longrunning::Operation#response Operation.response} will be
|
517
|
+
# {::Google::Protobuf::Empty Empty}.
|
517
518
|
#
|
518
519
|
# @overload instantiate_inline_workflow_template(request, options = nil)
|
519
520
|
# Pass arguments to `instantiate_inline_workflow_template` via a request object, either of type
|
520
|
-
# {Google::Cloud::Dataproc::V1beta2::InstantiateInlineWorkflowTemplateRequest} or an equivalent Hash.
|
521
|
+
# {::Google::Cloud::Dataproc::V1beta2::InstantiateInlineWorkflowTemplateRequest} or an equivalent Hash.
|
521
522
|
#
|
522
|
-
# @param request [Google::Cloud::Dataproc::V1beta2::InstantiateInlineWorkflowTemplateRequest, Hash]
|
523
|
+
# @param request [::Google::Cloud::Dataproc::V1beta2::InstantiateInlineWorkflowTemplateRequest, ::Hash]
|
523
524
|
# A request object representing the call parameters. Required. To specify no
|
524
525
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
525
|
-
# @param options [Gapic::CallOptions, Hash]
|
526
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
526
527
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
527
528
|
#
|
528
529
|
# @overload instantiate_inline_workflow_template(parent: nil, template: nil, instance_id: nil, request_id: nil)
|
@@ -530,7 +531,7 @@ module Google
|
|
530
531
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
531
532
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
532
533
|
#
|
533
|
-
# @param parent [String]
|
534
|
+
# @param parent [::String]
|
534
535
|
# Required. The resource name of the region or location, as described
|
535
536
|
# in https://cloud.google.com/apis/design/resource_names.
|
536
537
|
#
|
@@ -541,11 +542,11 @@ module Google
|
|
541
542
|
# * For `projects.locations.workflowTemplates.instantiateinline`, the
|
542
543
|
# resource name of the location has the following format:
|
543
544
|
# `projects/{project_id}/locations/{location}`
|
544
|
-
# @param template [Google::Cloud::Dataproc::V1beta2::WorkflowTemplate, Hash]
|
545
|
+
# @param template [::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate, ::Hash]
|
545
546
|
# Required. The workflow template to instantiate.
|
546
|
-
# @param instance_id [String]
|
547
|
+
# @param instance_id [::String]
|
547
548
|
# Deprecated. Please use `request_id` field instead.
|
548
|
-
# @param request_id [String]
|
549
|
+
# @param request_id [::String]
|
549
550
|
# Optional. A tag that prevents multiple concurrent workflow
|
550
551
|
# instances with the same tag from running. This mitigates risk of
|
551
552
|
# concurrent instances started due to retries.
|
@@ -557,26 +558,26 @@ module Google
|
|
557
558
|
# underscores (_), and hyphens (-). The maximum length is 40 characters.
|
558
559
|
#
|
559
560
|
# @yield [response, operation] Access the result along with the RPC operation
|
560
|
-
# @yieldparam response [Gapic::Operation]
|
561
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
561
|
+
# @yieldparam response [::Gapic::Operation]
|
562
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
562
563
|
#
|
563
|
-
# @return [Gapic::Operation]
|
564
|
+
# @return [::Gapic::Operation]
|
564
565
|
#
|
565
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
566
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
566
567
|
#
|
567
568
|
def instantiate_inline_workflow_template request, options = nil
|
568
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
569
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
569
570
|
|
570
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1beta2::InstantiateInlineWorkflowTemplateRequest
|
571
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1beta2::InstantiateInlineWorkflowTemplateRequest
|
571
572
|
|
572
573
|
# Converts hash and nil to an options object
|
573
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
574
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
574
575
|
|
575
576
|
# Customize the options with defaults
|
576
577
|
metadata = @config.rpcs.instantiate_inline_workflow_template.metadata.to_h
|
577
578
|
|
578
579
|
# Set x-goog-api-client and x-goog-user-project headers
|
579
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
580
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
580
581
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
581
582
|
gapic_version: ::Google::Cloud::Dataproc::V1beta2::VERSION
|
582
583
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -594,12 +595,12 @@ module Google
|
|
594
595
|
retry_policy: @config.retry_policy
|
595
596
|
|
596
597
|
@workflow_template_service_stub.call_rpc :instantiate_inline_workflow_template, request, options: options do |response, operation|
|
597
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
598
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
598
599
|
yield response, operation if block_given?
|
599
600
|
return response
|
600
601
|
end
|
601
|
-
rescue GRPC::BadStatus => e
|
602
|
-
raise Google::Cloud::Error.from_error(e)
|
602
|
+
rescue ::GRPC::BadStatus => e
|
603
|
+
raise ::Google::Cloud::Error.from_error(e)
|
603
604
|
end
|
604
605
|
|
605
606
|
##
|
@@ -608,12 +609,12 @@ module Google
|
|
608
609
|
#
|
609
610
|
# @overload update_workflow_template(request, options = nil)
|
610
611
|
# Pass arguments to `update_workflow_template` via a request object, either of type
|
611
|
-
# {Google::Cloud::Dataproc::V1beta2::UpdateWorkflowTemplateRequest} or an equivalent Hash.
|
612
|
+
# {::Google::Cloud::Dataproc::V1beta2::UpdateWorkflowTemplateRequest} or an equivalent Hash.
|
612
613
|
#
|
613
|
-
# @param request [Google::Cloud::Dataproc::V1beta2::UpdateWorkflowTemplateRequest, Hash]
|
614
|
+
# @param request [::Google::Cloud::Dataproc::V1beta2::UpdateWorkflowTemplateRequest, ::Hash]
|
614
615
|
# A request object representing the call parameters. Required. To specify no
|
615
616
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
616
|
-
# @param options [Gapic::CallOptions, Hash]
|
617
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
617
618
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
618
619
|
#
|
619
620
|
# @overload update_workflow_template(template: nil)
|
@@ -621,32 +622,32 @@ module Google
|
|
621
622
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
622
623
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
623
624
|
#
|
624
|
-
# @param template [Google::Cloud::Dataproc::V1beta2::WorkflowTemplate, Hash]
|
625
|
+
# @param template [::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate, ::Hash]
|
625
626
|
# Required. The updated workflow template.
|
626
627
|
#
|
627
628
|
# The `template.version` field must match the current version.
|
628
629
|
#
|
629
630
|
# @yield [response, operation] Access the result along with the RPC operation
|
630
|
-
# @yieldparam response [Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
631
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
631
|
+
# @yieldparam response [::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
632
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
632
633
|
#
|
633
|
-
# @return [Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
634
|
+
# @return [::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate]
|
634
635
|
#
|
635
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
636
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
636
637
|
#
|
637
638
|
def update_workflow_template request, options = nil
|
638
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
639
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
639
640
|
|
640
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1beta2::UpdateWorkflowTemplateRequest
|
641
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1beta2::UpdateWorkflowTemplateRequest
|
641
642
|
|
642
643
|
# Converts hash and nil to an options object
|
643
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
644
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
644
645
|
|
645
646
|
# Customize the options with defaults
|
646
647
|
metadata = @config.rpcs.update_workflow_template.metadata.to_h
|
647
648
|
|
648
649
|
# Set x-goog-api-client and x-goog-user-project headers
|
649
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
650
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
650
651
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
651
652
|
gapic_version: ::Google::Cloud::Dataproc::V1beta2::VERSION
|
652
653
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -667,8 +668,8 @@ module Google
|
|
667
668
|
yield response, operation if block_given?
|
668
669
|
return response
|
669
670
|
end
|
670
|
-
rescue GRPC::BadStatus => e
|
671
|
-
raise Google::Cloud::Error.from_error(e)
|
671
|
+
rescue ::GRPC::BadStatus => e
|
672
|
+
raise ::Google::Cloud::Error.from_error(e)
|
672
673
|
end
|
673
674
|
|
674
675
|
##
|
@@ -676,12 +677,12 @@ module Google
|
|
676
677
|
#
|
677
678
|
# @overload list_workflow_templates(request, options = nil)
|
678
679
|
# Pass arguments to `list_workflow_templates` via a request object, either of type
|
679
|
-
# {Google::Cloud::Dataproc::V1beta2::ListWorkflowTemplatesRequest} or an equivalent Hash.
|
680
|
+
# {::Google::Cloud::Dataproc::V1beta2::ListWorkflowTemplatesRequest} or an equivalent Hash.
|
680
681
|
#
|
681
|
-
# @param request [Google::Cloud::Dataproc::V1beta2::ListWorkflowTemplatesRequest, Hash]
|
682
|
+
# @param request [::Google::Cloud::Dataproc::V1beta2::ListWorkflowTemplatesRequest, ::Hash]
|
682
683
|
# A request object representing the call parameters. Required. To specify no
|
683
684
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
684
|
-
# @param options [Gapic::CallOptions, Hash]
|
685
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
685
686
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
686
687
|
#
|
687
688
|
# @overload list_workflow_templates(parent: nil, page_size: nil, page_token: nil)
|
@@ -689,7 +690,7 @@ module Google
|
|
689
690
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
690
691
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
691
692
|
#
|
692
|
-
# @param parent [String]
|
693
|
+
# @param parent [::String]
|
693
694
|
# Required. The resource name of the region or location, as described
|
694
695
|
# in https://cloud.google.com/apis/design/resource_names.
|
695
696
|
#
|
@@ -700,33 +701,33 @@ module Google
|
|
700
701
|
# * For `projects.locations.workflowTemplates.list`, the
|
701
702
|
# resource name of the location has the following format:
|
702
703
|
# `projects/{project_id}/locations/{location}`
|
703
|
-
# @param page_size [Integer]
|
704
|
+
# @param page_size [::Integer]
|
704
705
|
# Optional. The maximum number of results to return in each response.
|
705
|
-
# @param page_token [String]
|
706
|
+
# @param page_token [::String]
|
706
707
|
# Optional. The page token, returned by a previous call, to request the
|
707
708
|
# next page of results.
|
708
709
|
#
|
709
710
|
# @yield [response, operation] Access the result along with the RPC operation
|
710
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
711
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
711
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate>]
|
712
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
712
713
|
#
|
713
|
-
# @return [Gapic::PagedEnumerable
|
714
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::WorkflowTemplate>]
|
714
715
|
#
|
715
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
716
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
716
717
|
#
|
717
718
|
def list_workflow_templates request, options = nil
|
718
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
719
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
719
720
|
|
720
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1beta2::ListWorkflowTemplatesRequest
|
721
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1beta2::ListWorkflowTemplatesRequest
|
721
722
|
|
722
723
|
# Converts hash and nil to an options object
|
723
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
724
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
724
725
|
|
725
726
|
# Customize the options with defaults
|
726
727
|
metadata = @config.rpcs.list_workflow_templates.metadata.to_h
|
727
728
|
|
728
729
|
# Set x-goog-api-client and x-goog-user-project headers
|
729
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
730
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
730
731
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
731
732
|
gapic_version: ::Google::Cloud::Dataproc::V1beta2::VERSION
|
732
733
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -744,12 +745,12 @@ module Google
|
|
744
745
|
retry_policy: @config.retry_policy
|
745
746
|
|
746
747
|
@workflow_template_service_stub.call_rpc :list_workflow_templates, request, options: options do |response, operation|
|
747
|
-
response = Gapic::PagedEnumerable.new @workflow_template_service_stub, :list_workflow_templates, request, response, operation, options
|
748
|
+
response = ::Gapic::PagedEnumerable.new @workflow_template_service_stub, :list_workflow_templates, request, response, operation, options
|
748
749
|
yield response, operation if block_given?
|
749
750
|
return response
|
750
751
|
end
|
751
|
-
rescue GRPC::BadStatus => e
|
752
|
-
raise Google::Cloud::Error.from_error(e)
|
752
|
+
rescue ::GRPC::BadStatus => e
|
753
|
+
raise ::Google::Cloud::Error.from_error(e)
|
753
754
|
end
|
754
755
|
|
755
756
|
##
|
@@ -757,12 +758,12 @@ module Google
|
|
757
758
|
#
|
758
759
|
# @overload delete_workflow_template(request, options = nil)
|
759
760
|
# Pass arguments to `delete_workflow_template` via a request object, either of type
|
760
|
-
# {Google::Cloud::Dataproc::V1beta2::DeleteWorkflowTemplateRequest} or an equivalent Hash.
|
761
|
+
# {::Google::Cloud::Dataproc::V1beta2::DeleteWorkflowTemplateRequest} or an equivalent Hash.
|
761
762
|
#
|
762
|
-
# @param request [Google::Cloud::Dataproc::V1beta2::DeleteWorkflowTemplateRequest, Hash]
|
763
|
+
# @param request [::Google::Cloud::Dataproc::V1beta2::DeleteWorkflowTemplateRequest, ::Hash]
|
763
764
|
# A request object representing the call parameters. Required. To specify no
|
764
765
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
765
|
-
# @param options [Gapic::CallOptions, Hash]
|
766
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
766
767
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
767
768
|
#
|
768
769
|
# @overload delete_workflow_template(name: nil, version: nil)
|
@@ -770,7 +771,7 @@ module Google
|
|
770
771
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
771
772
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
772
773
|
#
|
773
|
-
# @param name [String]
|
774
|
+
# @param name [::String]
|
774
775
|
# Required. The resource name of the workflow template, as described
|
775
776
|
# in https://cloud.google.com/apis/design/resource_names.
|
776
777
|
#
|
@@ -781,32 +782,32 @@ module Google
|
|
781
782
|
# * For `projects.locations.workflowTemplates.instantiate`, the resource name
|
782
783
|
# of the template has the following format:
|
783
784
|
# `projects/{project_id}/locations/{location}/workflowTemplates/{template_id}`
|
784
|
-
# @param version [Integer]
|
785
|
+
# @param version [::Integer]
|
785
786
|
# Optional. The version of workflow template to delete. If specified,
|
786
787
|
# will only delete the template if the current server version matches
|
787
788
|
# specified version.
|
788
789
|
#
|
789
790
|
# @yield [response, operation] Access the result along with the RPC operation
|
790
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
791
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
791
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
792
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
792
793
|
#
|
793
|
-
# @return [Google::Protobuf::Empty]
|
794
|
+
# @return [::Google::Protobuf::Empty]
|
794
795
|
#
|
795
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
796
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
796
797
|
#
|
797
798
|
def delete_workflow_template request, options = nil
|
798
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
799
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
799
800
|
|
800
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dataproc::V1beta2::DeleteWorkflowTemplateRequest
|
801
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataproc::V1beta2::DeleteWorkflowTemplateRequest
|
801
802
|
|
802
803
|
# Converts hash and nil to an options object
|
803
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
804
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
804
805
|
|
805
806
|
# Customize the options with defaults
|
806
807
|
metadata = @config.rpcs.delete_workflow_template.metadata.to_h
|
807
808
|
|
808
809
|
# Set x-goog-api-client and x-goog-user-project headers
|
809
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
810
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
810
811
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
811
812
|
gapic_version: ::Google::Cloud::Dataproc::V1beta2::VERSION
|
812
813
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -827,8 +828,8 @@ module Google
|
|
827
828
|
yield response, operation if block_given?
|
828
829
|
return response
|
829
830
|
end
|
830
|
-
rescue GRPC::BadStatus => e
|
831
|
-
raise Google::Cloud::Error.from_error(e)
|
831
|
+
rescue ::GRPC::BadStatus => e
|
832
|
+
raise ::Google::Cloud::Error.from_error(e)
|
832
833
|
end
|
833
834
|
|
834
835
|
##
|
@@ -838,7 +839,7 @@ module Google
|
|
838
839
|
# providing control over timeouts, retry behavior, logging, transport
|
839
840
|
# parameters, and other low-level controls. Certain parameters can also be
|
840
841
|
# applied individually to specific RPCs. See
|
841
|
-
# {Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client::Configuration::Rpcs}
|
842
|
+
# {::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client::Configuration::Rpcs}
|
842
843
|
# for a list of RPCs that can be configured independently.
|
843
844
|
#
|
844
845
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -849,22 +850,22 @@ module Google
|
|
849
850
|
# To modify the global config, setting the timeout for create_workflow_template
|
850
851
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
851
852
|
#
|
852
|
-
# Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.configure do |config|
|
853
|
-
# config.timeout =
|
854
|
-
# config.rpcs.create_workflow_template.timeout =
|
853
|
+
# ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.configure do |config|
|
854
|
+
# config.timeout = 10.0
|
855
|
+
# config.rpcs.create_workflow_template.timeout = 20.0
|
855
856
|
# end
|
856
857
|
#
|
857
858
|
# To apply the above configuration only to a new client:
|
858
859
|
#
|
859
|
-
# client = Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.new do |config|
|
860
|
-
# config.timeout =
|
861
|
-
# config.rpcs.create_workflow_template.timeout =
|
860
|
+
# client = ::Google::Cloud::Dataproc::V1beta2::WorkflowTemplateService::Client.new do |config|
|
861
|
+
# config.timeout = 10.0
|
862
|
+
# config.rpcs.create_workflow_template.timeout = 20.0
|
862
863
|
# end
|
863
864
|
#
|
864
865
|
# @!attribute [rw] endpoint
|
865
866
|
# The hostname or hostname:port of the service endpoint.
|
866
867
|
# Defaults to `"dataproc.googleapis.com"`.
|
867
|
-
# @return [String]
|
868
|
+
# @return [::String]
|
868
869
|
# @!attribute [rw] credentials
|
869
870
|
# Credentials to send with calls. You may provide any of the following types:
|
870
871
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -876,29 +877,29 @@ module Google
|
|
876
877
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
877
878
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
878
879
|
# * (`nil`) indicating no credentials
|
879
|
-
# @return [Object]
|
880
|
+
# @return [::Object]
|
880
881
|
# @!attribute [rw] scope
|
881
882
|
# The OAuth scopes
|
882
|
-
# @return [Array
|
883
|
+
# @return [::Array<::String>]
|
883
884
|
# @!attribute [rw] lib_name
|
884
885
|
# The library name as recorded in instrumentation and logging
|
885
|
-
# @return [String]
|
886
|
+
# @return [::String]
|
886
887
|
# @!attribute [rw] lib_version
|
887
888
|
# The library version as recorded in instrumentation and logging
|
888
|
-
# @return [String]
|
889
|
+
# @return [::String]
|
889
890
|
# @!attribute [rw] channel_args
|
890
891
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
891
892
|
# `GRPC::Core::Channel` object is provided as the credential.
|
892
|
-
# @return [Hash]
|
893
|
+
# @return [::Hash]
|
893
894
|
# @!attribute [rw] interceptors
|
894
895
|
# An array of interceptors that are run before calls are executed.
|
895
|
-
# @return [Array
|
896
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
896
897
|
# @!attribute [rw] timeout
|
897
|
-
# The call timeout in
|
898
|
-
# @return [Numeric]
|
898
|
+
# The call timeout in seconds.
|
899
|
+
# @return [::Numeric]
|
899
900
|
# @!attribute [rw] metadata
|
900
901
|
# Additional gRPC headers to be sent with the call.
|
901
|
-
# @return [Hash{Symbol
|
902
|
+
# @return [::Hash{::Symbol=>::String}]
|
902
903
|
# @!attribute [rw] retry_policy
|
903
904
|
# The retry policy. The value is a hash with the following keys:
|
904
905
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -906,25 +907,29 @@ module Google
|
|
906
907
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
907
908
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
908
909
|
# trigger a retry.
|
909
|
-
# @return [Hash]
|
910
|
+
# @return [::Hash]
|
911
|
+
# @!attribute [rw] quota_project
|
912
|
+
# A separate project against which to charge quota.
|
913
|
+
# @return [::String]
|
910
914
|
#
|
911
915
|
class Configuration
|
912
|
-
extend Gapic::Config
|
916
|
+
extend ::Gapic::Config
|
913
917
|
|
914
|
-
config_attr :endpoint,
|
915
|
-
config_attr :credentials,
|
918
|
+
config_attr :endpoint, "dataproc.googleapis.com", ::String
|
919
|
+
config_attr :credentials, nil do |value|
|
916
920
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
917
921
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
918
922
|
allowed.any? { |klass| klass === value }
|
919
923
|
end
|
920
|
-
config_attr :scope,
|
921
|
-
config_attr :lib_name,
|
922
|
-
config_attr :lib_version,
|
923
|
-
config_attr(:channel_args,
|
924
|
-
config_attr :interceptors,
|
925
|
-
config_attr :timeout,
|
926
|
-
config_attr :metadata,
|
927
|
-
config_attr :retry_policy,
|
924
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
925
|
+
config_attr :lib_name, nil, ::String, nil
|
926
|
+
config_attr :lib_version, nil, ::String, nil
|
927
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
928
|
+
config_attr :interceptors, nil, ::Array, nil
|
929
|
+
config_attr :timeout, nil, ::Numeric, nil
|
930
|
+
config_attr :metadata, nil, ::Hash, nil
|
931
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
932
|
+
config_attr :quota_project, nil, ::String, nil
|
928
933
|
|
929
934
|
# @private
|
930
935
|
def initialize parent_config = nil
|
@@ -940,7 +945,7 @@ module Google
|
|
940
945
|
def rpcs
|
941
946
|
@rpcs ||= begin
|
942
947
|
parent_rpcs = nil
|
943
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
948
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
944
949
|
Rpcs.new parent_rpcs
|
945
950
|
end
|
946
951
|
end
|
@@ -965,56 +970,56 @@ module Google
|
|
965
970
|
class Rpcs
|
966
971
|
##
|
967
972
|
# RPC-specific configuration for `create_workflow_template`
|
968
|
-
# @return [Gapic::Config::Method]
|
973
|
+
# @return [::Gapic::Config::Method]
|
969
974
|
#
|
970
975
|
attr_reader :create_workflow_template
|
971
976
|
##
|
972
977
|
# RPC-specific configuration for `get_workflow_template`
|
973
|
-
# @return [Gapic::Config::Method]
|
978
|
+
# @return [::Gapic::Config::Method]
|
974
979
|
#
|
975
980
|
attr_reader :get_workflow_template
|
976
981
|
##
|
977
982
|
# RPC-specific configuration for `instantiate_workflow_template`
|
978
|
-
# @return [Gapic::Config::Method]
|
983
|
+
# @return [::Gapic::Config::Method]
|
979
984
|
#
|
980
985
|
attr_reader :instantiate_workflow_template
|
981
986
|
##
|
982
987
|
# RPC-specific configuration for `instantiate_inline_workflow_template`
|
983
|
-
# @return [Gapic::Config::Method]
|
988
|
+
# @return [::Gapic::Config::Method]
|
984
989
|
#
|
985
990
|
attr_reader :instantiate_inline_workflow_template
|
986
991
|
##
|
987
992
|
# RPC-specific configuration for `update_workflow_template`
|
988
|
-
# @return [Gapic::Config::Method]
|
993
|
+
# @return [::Gapic::Config::Method]
|
989
994
|
#
|
990
995
|
attr_reader :update_workflow_template
|
991
996
|
##
|
992
997
|
# RPC-specific configuration for `list_workflow_templates`
|
993
|
-
# @return [Gapic::Config::Method]
|
998
|
+
# @return [::Gapic::Config::Method]
|
994
999
|
#
|
995
1000
|
attr_reader :list_workflow_templates
|
996
1001
|
##
|
997
1002
|
# RPC-specific configuration for `delete_workflow_template`
|
998
|
-
# @return [Gapic::Config::Method]
|
1003
|
+
# @return [::Gapic::Config::Method]
|
999
1004
|
#
|
1000
1005
|
attr_reader :delete_workflow_template
|
1001
1006
|
|
1002
1007
|
# @private
|
1003
1008
|
def initialize parent_rpcs = nil
|
1004
1009
|
create_workflow_template_config = parent_rpcs&.create_workflow_template if parent_rpcs&.respond_to? :create_workflow_template
|
1005
|
-
@create_workflow_template = Gapic::Config::Method.new create_workflow_template_config
|
1010
|
+
@create_workflow_template = ::Gapic::Config::Method.new create_workflow_template_config
|
1006
1011
|
get_workflow_template_config = parent_rpcs&.get_workflow_template if parent_rpcs&.respond_to? :get_workflow_template
|
1007
|
-
@get_workflow_template = Gapic::Config::Method.new get_workflow_template_config
|
1012
|
+
@get_workflow_template = ::Gapic::Config::Method.new get_workflow_template_config
|
1008
1013
|
instantiate_workflow_template_config = parent_rpcs&.instantiate_workflow_template if parent_rpcs&.respond_to? :instantiate_workflow_template
|
1009
|
-
@instantiate_workflow_template = Gapic::Config::Method.new instantiate_workflow_template_config
|
1014
|
+
@instantiate_workflow_template = ::Gapic::Config::Method.new instantiate_workflow_template_config
|
1010
1015
|
instantiate_inline_workflow_template_config = parent_rpcs&.instantiate_inline_workflow_template if parent_rpcs&.respond_to? :instantiate_inline_workflow_template
|
1011
|
-
@instantiate_inline_workflow_template = Gapic::Config::Method.new instantiate_inline_workflow_template_config
|
1016
|
+
@instantiate_inline_workflow_template = ::Gapic::Config::Method.new instantiate_inline_workflow_template_config
|
1012
1017
|
update_workflow_template_config = parent_rpcs&.update_workflow_template if parent_rpcs&.respond_to? :update_workflow_template
|
1013
|
-
@update_workflow_template = Gapic::Config::Method.new update_workflow_template_config
|
1018
|
+
@update_workflow_template = ::Gapic::Config::Method.new update_workflow_template_config
|
1014
1019
|
list_workflow_templates_config = parent_rpcs&.list_workflow_templates if parent_rpcs&.respond_to? :list_workflow_templates
|
1015
|
-
@list_workflow_templates = Gapic::Config::Method.new list_workflow_templates_config
|
1020
|
+
@list_workflow_templates = ::Gapic::Config::Method.new list_workflow_templates_config
|
1016
1021
|
delete_workflow_template_config = parent_rpcs&.delete_workflow_template if parent_rpcs&.respond_to? :delete_workflow_template
|
1017
|
-
@delete_workflow_template = Gapic::Config::Method.new delete_workflow_template_config
|
1022
|
+
@delete_workflow_template = ::Gapic::Config::Method.new delete_workflow_template_config
|
1018
1023
|
|
1019
1024
|
yield self if block_given?
|
1020
1025
|
end
|