google-cloud-dataproc-v1 0.16.0 → 0.17.0

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