google-cloud-dataproc-v1 0.1.0

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