google-cloud-dataflow-v1beta3 0.4.0 → 0.5.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 (37) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +2 -2
  4. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest/client.rb +351 -0
  5. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest/service_stub.rb +109 -0
  6. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest.rb +51 -0
  7. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service.rb +7 -1
  8. data/lib/google/cloud/dataflow/v1beta3/jobs/client.rb +8 -12
  9. data/lib/google/cloud/dataflow/v1beta3/jobs/rest/client.rb +784 -0
  10. data/lib/google/cloud/dataflow/v1beta3/jobs/rest/service_stub.rb +454 -0
  11. data/lib/google/cloud/dataflow/v1beta3/jobs/rest.rb +52 -0
  12. data/lib/google/cloud/dataflow/v1beta3/jobs.rb +7 -1
  13. data/lib/google/cloud/dataflow/v1beta3/messages/client.rb +4 -6
  14. data/lib/google/cloud/dataflow/v1beta3/messages/rest/client.rb +373 -0
  15. data/lib/google/cloud/dataflow/v1beta3/messages/rest/service_stub.rb +117 -0
  16. data/lib/google/cloud/dataflow/v1beta3/messages/rest.rb +52 -0
  17. data/lib/google/cloud/dataflow/v1beta3/messages.rb +7 -1
  18. data/lib/google/cloud/dataflow/v1beta3/metrics/client.rb +8 -12
  19. data/lib/google/cloud/dataflow/v1beta3/metrics/rest/client.rb +539 -0
  20. data/lib/google/cloud/dataflow/v1beta3/metrics/rest/service_stub.rb +240 -0
  21. data/lib/google/cloud/dataflow/v1beta3/metrics/rest.rb +52 -0
  22. data/lib/google/cloud/dataflow/v1beta3/metrics.rb +7 -1
  23. data/lib/google/cloud/dataflow/v1beta3/rest.rb +42 -0
  24. data/lib/google/cloud/dataflow/v1beta3/snapshots/rest/client.rb +494 -0
  25. data/lib/google/cloud/dataflow/v1beta3/snapshots/rest/service_stub.rb +261 -0
  26. data/lib/google/cloud/dataflow/v1beta3/snapshots/rest.rb +51 -0
  27. data/lib/google/cloud/dataflow/v1beta3/snapshots.rb +7 -1
  28. data/lib/google/cloud/dataflow/v1beta3/templates_service/rest/client.rb +522 -0
  29. data/lib/google/cloud/dataflow/v1beta3/templates_service/rest/service_stub.rb +253 -0
  30. data/lib/google/cloud/dataflow/v1beta3/templates_service/rest.rb +51 -0
  31. data/lib/google/cloud/dataflow/v1beta3/templates_service.rb +7 -1
  32. data/lib/google/cloud/dataflow/v1beta3/version.rb +1 -1
  33. data/lib/google/cloud/dataflow/v1beta3.rb +7 -2
  34. data/proto_docs/google/api/client.rb +318 -0
  35. data/proto_docs/google/api/launch_stage.rb +71 -0
  36. data/proto_docs/google/rpc/status.rb +4 -2
  37. metadata +29 -8
@@ -0,0 +1,539 @@
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/dataflow/v1beta3/metrics_pb"
21
+ require "google/cloud/dataflow/v1beta3/metrics/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Dataflow
26
+ module V1beta3
27
+ module Metrics
28
+ module Rest
29
+ ##
30
+ # REST client for the Metrics service.
31
+ #
32
+ # The Dataflow Metrics API lets you monitor the progress of Dataflow
33
+ # jobs.
34
+ #
35
+ class Client
36
+ # @private
37
+ attr_reader :metrics_stub
38
+
39
+ ##
40
+ # Configure the Metrics Client class.
41
+ #
42
+ # See {::Google::Cloud::Dataflow::V1beta3::Metrics::Rest::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # @example
46
+ #
47
+ # # Modify the configuration for all Metrics clients
48
+ # ::Google::Cloud::Dataflow::V1beta3::Metrics::Rest::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
51
+ #
52
+ # @yield [config] Configure the Client client.
53
+ # @yieldparam config [Client::Configuration]
54
+ #
55
+ # @return [Client::Configuration]
56
+ #
57
+ def self.configure
58
+ @configure ||= begin
59
+ namespace = ["Google", "Cloud", "Dataflow", "V1beta3"]
60
+ parent_config = while namespace.any?
61
+ parent_name = namespace.join "::"
62
+ parent_const = const_get parent_name
63
+ break parent_const.configure if parent_const.respond_to? :configure
64
+ namespace.pop
65
+ end
66
+ default_config = Client::Configuration.new parent_config
67
+
68
+ default_config.timeout = 60.0
69
+
70
+ default_config
71
+ end
72
+ yield @configure if block_given?
73
+ @configure
74
+ end
75
+
76
+ ##
77
+ # Configure the Metrics Client instance.
78
+ #
79
+ # The configuration is set to the derived mode, meaning that values can be changed,
80
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
81
+ # should be made on {Client.configure}.
82
+ #
83
+ # See {::Google::Cloud::Dataflow::V1beta3::Metrics::Rest::Client::Configuration}
84
+ # for a description of the configuration fields.
85
+ #
86
+ # @yield [config] Configure the Client client.
87
+ # @yieldparam config [Client::Configuration]
88
+ #
89
+ # @return [Client::Configuration]
90
+ #
91
+ def configure
92
+ yield @config if block_given?
93
+ @config
94
+ end
95
+
96
+ ##
97
+ # Create a new Metrics REST client object.
98
+ #
99
+ # @example
100
+ #
101
+ # # Create a client using the default configuration
102
+ # client = ::Google::Cloud::Dataflow::V1beta3::Metrics::Rest::Client.new
103
+ #
104
+ # # Create a client using a custom configuration
105
+ # client = ::Google::Cloud::Dataflow::V1beta3::Metrics::Rest::Client.new do |config|
106
+ # config.timeout = 10.0
107
+ # end
108
+ #
109
+ # @yield [config] Configure the Metrics client.
110
+ # @yieldparam config [Client::Configuration]
111
+ #
112
+ def initialize
113
+ # Create the configuration object
114
+ @config = Configuration.new Client.configure
115
+
116
+ # Yield the configuration if needed
117
+ yield @config if block_given?
118
+
119
+ # Create credentials
120
+ credentials = @config.credentials
121
+ # Use self-signed JWT if the endpoint is unchanged from default,
122
+ # but only if the default endpoint does not have a region prefix.
123
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
124
+ !@config.endpoint.split(".").first.include?("-")
125
+ credentials ||= Credentials.default scope: @config.scope,
126
+ enable_self_signed_jwt: enable_self_signed_jwt
127
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
128
+ credentials = Credentials.new credentials, scope: @config.scope
129
+ end
130
+
131
+ @quota_project_id = @config.quota_project
132
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
133
+
134
+ @metrics_stub = ::Google::Cloud::Dataflow::V1beta3::Metrics::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
135
+ end
136
+
137
+ # Service calls
138
+
139
+ ##
140
+ # Request the job status.
141
+ #
142
+ # To request the status of a job, we recommend using
143
+ # `projects.locations.jobs.getMetrics` with a [regional endpoint]
144
+ # (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using
145
+ # `projects.jobs.getMetrics` is not recommended, as you can only request the
146
+ # status of jobs that are running in `us-central1`.
147
+ #
148
+ # @overload get_job_metrics(request, options = nil)
149
+ # Pass arguments to `get_job_metrics` via a request object, either of type
150
+ # {::Google::Cloud::Dataflow::V1beta3::GetJobMetricsRequest} or an equivalent Hash.
151
+ #
152
+ # @param request [::Google::Cloud::Dataflow::V1beta3::GetJobMetricsRequest, ::Hash]
153
+ # A request object representing the call parameters. Required. To specify no
154
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
155
+ # @param options [::Gapic::CallOptions, ::Hash]
156
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
157
+ #
158
+ # @overload get_job_metrics(project_id: nil, job_id: nil, start_time: nil, location: nil)
159
+ # Pass arguments to `get_job_metrics` via keyword arguments. Note that at
160
+ # least one keyword argument is required. To specify no parameters, or to keep all
161
+ # the default parameter values, pass an empty Hash as a request object (see above).
162
+ #
163
+ # @param project_id [::String]
164
+ # A project id.
165
+ # @param job_id [::String]
166
+ # The job to get metrics for.
167
+ # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
168
+ # Return only metric data that has changed since this time.
169
+ # Default is to return all information about all metrics for the job.
170
+ # @param location [::String]
171
+ # The [regional endpoint]
172
+ # (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
173
+ # contains the job specified by job_id.
174
+ # @yield [result, operation] Access the result along with the TransportOperation object
175
+ # @yieldparam result [::Google::Cloud::Dataflow::V1beta3::JobMetrics]
176
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
177
+ #
178
+ # @return [::Google::Cloud::Dataflow::V1beta3::JobMetrics]
179
+ #
180
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
181
+ def get_job_metrics request, options = nil
182
+ raise ::ArgumentError, "request must be provided" if request.nil?
183
+
184
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataflow::V1beta3::GetJobMetricsRequest
185
+
186
+ # Converts hash and nil to an options object
187
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
188
+
189
+ # Customize the options with defaults
190
+ call_metadata = @config.rpcs.get_job_metrics.metadata.to_h
191
+
192
+ # Set x-goog-api-client and x-goog-user-project headers
193
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
194
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
195
+ gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION,
196
+ transports_version_send: [:rest]
197
+
198
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
199
+
200
+ options.apply_defaults timeout: @config.rpcs.get_job_metrics.timeout,
201
+ metadata: call_metadata,
202
+ retry_policy: @config.rpcs.get_job_metrics.retry_policy
203
+
204
+ options.apply_defaults timeout: @config.timeout,
205
+ metadata: @config.metadata,
206
+ retry_policy: @config.retry_policy
207
+
208
+ @metrics_stub.get_job_metrics request, options do |result, operation|
209
+ yield result, operation if block_given?
210
+ return result
211
+ end
212
+ rescue ::Gapic::Rest::Error => e
213
+ raise ::Google::Cloud::Error.from_error(e)
214
+ end
215
+
216
+ ##
217
+ # Request detailed information about the execution status of the job.
218
+ #
219
+ # EXPERIMENTAL. This API is subject to change or removal without notice.
220
+ #
221
+ # @overload get_job_execution_details(request, options = nil)
222
+ # Pass arguments to `get_job_execution_details` via a request object, either of type
223
+ # {::Google::Cloud::Dataflow::V1beta3::GetJobExecutionDetailsRequest} or an equivalent Hash.
224
+ #
225
+ # @param request [::Google::Cloud::Dataflow::V1beta3::GetJobExecutionDetailsRequest, ::Hash]
226
+ # A request object representing the call parameters. Required. To specify no
227
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
228
+ # @param options [::Gapic::CallOptions, ::Hash]
229
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
230
+ #
231
+ # @overload get_job_execution_details(project_id: nil, job_id: nil, location: nil, page_size: nil, page_token: nil)
232
+ # Pass arguments to `get_job_execution_details` via keyword arguments. Note that at
233
+ # least one keyword argument is required. To specify no parameters, or to keep all
234
+ # the default parameter values, pass an empty Hash as a request object (see above).
235
+ #
236
+ # @param project_id [::String]
237
+ # A project id.
238
+ # @param job_id [::String]
239
+ # The job to get execution details for.
240
+ # @param location [::String]
241
+ # The [regional endpoint]
242
+ # (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
243
+ # contains the job specified by job_id.
244
+ # @param page_size [::Integer]
245
+ # If specified, determines the maximum number of stages to
246
+ # return. If unspecified, the service may choose an appropriate
247
+ # default, or may return an arbitrarily large number of results.
248
+ # @param page_token [::String]
249
+ # If supplied, this should be the value of next_page_token returned
250
+ # by an earlier call. This will cause the next page of results to
251
+ # be returned.
252
+ # @yield [result, operation] Access the result along with the TransportOperation object
253
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::StageSummary>]
254
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
255
+ #
256
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::StageSummary>]
257
+ #
258
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
259
+ def get_job_execution_details request, options = nil
260
+ raise ::ArgumentError, "request must be provided" if request.nil?
261
+
262
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataflow::V1beta3::GetJobExecutionDetailsRequest
263
+
264
+ # Converts hash and nil to an options object
265
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
266
+
267
+ # Customize the options with defaults
268
+ call_metadata = @config.rpcs.get_job_execution_details.metadata.to_h
269
+
270
+ # Set x-goog-api-client and x-goog-user-project headers
271
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
272
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
273
+ gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION,
274
+ transports_version_send: [:rest]
275
+
276
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
277
+
278
+ options.apply_defaults timeout: @config.rpcs.get_job_execution_details.timeout,
279
+ metadata: call_metadata,
280
+ retry_policy: @config.rpcs.get_job_execution_details.retry_policy
281
+
282
+ options.apply_defaults timeout: @config.timeout,
283
+ metadata: @config.metadata,
284
+ retry_policy: @config.retry_policy
285
+
286
+ @metrics_stub.get_job_execution_details request, options do |result, operation|
287
+ result = ::Gapic::Rest::PagedEnumerable.new @metrics_stub, :get_job_execution_details, "stages", request, result, options
288
+ yield result, operation if block_given?
289
+ return result
290
+ end
291
+ rescue ::Gapic::Rest::Error => e
292
+ raise ::Google::Cloud::Error.from_error(e)
293
+ end
294
+
295
+ ##
296
+ # Request detailed information about the execution status of a stage of the
297
+ # job.
298
+ #
299
+ # EXPERIMENTAL. This API is subject to change or removal without notice.
300
+ #
301
+ # @overload get_stage_execution_details(request, options = nil)
302
+ # Pass arguments to `get_stage_execution_details` via a request object, either of type
303
+ # {::Google::Cloud::Dataflow::V1beta3::GetStageExecutionDetailsRequest} or an equivalent Hash.
304
+ #
305
+ # @param request [::Google::Cloud::Dataflow::V1beta3::GetStageExecutionDetailsRequest, ::Hash]
306
+ # A request object representing the call parameters. Required. To specify no
307
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
308
+ # @param options [::Gapic::CallOptions, ::Hash]
309
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
310
+ #
311
+ # @overload get_stage_execution_details(project_id: nil, job_id: nil, location: nil, stage_id: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil)
312
+ # Pass arguments to `get_stage_execution_details` via keyword arguments. Note that at
313
+ # least one keyword argument is required. To specify no parameters, or to keep all
314
+ # the default parameter values, pass an empty Hash as a request object (see above).
315
+ #
316
+ # @param project_id [::String]
317
+ # A project id.
318
+ # @param job_id [::String]
319
+ # The job to get execution details for.
320
+ # @param location [::String]
321
+ # The [regional endpoint]
322
+ # (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
323
+ # contains the job specified by job_id.
324
+ # @param stage_id [::String]
325
+ # The stage for which to fetch information.
326
+ # @param page_size [::Integer]
327
+ # If specified, determines the maximum number of work items to
328
+ # return. If unspecified, the service may choose an appropriate
329
+ # default, or may return an arbitrarily large number of results.
330
+ # @param page_token [::String]
331
+ # If supplied, this should be the value of next_page_token returned
332
+ # by an earlier call. This will cause the next page of results to
333
+ # be returned.
334
+ # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
335
+ # Lower time bound of work items to include, by start time.
336
+ # @param end_time [::Google::Protobuf::Timestamp, ::Hash]
337
+ # Upper time bound of work items to include, by start time.
338
+ # @yield [result, operation] Access the result along with the TransportOperation object
339
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::WorkerDetails>]
340
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
341
+ #
342
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataflow::V1beta3::WorkerDetails>]
343
+ #
344
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
345
+ def get_stage_execution_details request, options = nil
346
+ raise ::ArgumentError, "request must be provided" if request.nil?
347
+
348
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataflow::V1beta3::GetStageExecutionDetailsRequest
349
+
350
+ # Converts hash and nil to an options object
351
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
352
+
353
+ # Customize the options with defaults
354
+ call_metadata = @config.rpcs.get_stage_execution_details.metadata.to_h
355
+
356
+ # Set x-goog-api-client and x-goog-user-project headers
357
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
358
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
359
+ gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION,
360
+ transports_version_send: [:rest]
361
+
362
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
363
+
364
+ options.apply_defaults timeout: @config.rpcs.get_stage_execution_details.timeout,
365
+ metadata: call_metadata,
366
+ retry_policy: @config.rpcs.get_stage_execution_details.retry_policy
367
+
368
+ options.apply_defaults timeout: @config.timeout,
369
+ metadata: @config.metadata,
370
+ retry_policy: @config.retry_policy
371
+
372
+ @metrics_stub.get_stage_execution_details request, options do |result, operation|
373
+ result = ::Gapic::Rest::PagedEnumerable.new @metrics_stub, :get_stage_execution_details, "workers", request, result, options
374
+ yield result, operation if block_given?
375
+ return result
376
+ end
377
+ rescue ::Gapic::Rest::Error => e
378
+ raise ::Google::Cloud::Error.from_error(e)
379
+ end
380
+
381
+ ##
382
+ # Configuration class for the Metrics REST API.
383
+ #
384
+ # This class represents the configuration for Metrics REST,
385
+ # providing control over timeouts, retry behavior, logging, transport
386
+ # parameters, and other low-level controls. Certain parameters can also be
387
+ # applied individually to specific RPCs. See
388
+ # {::Google::Cloud::Dataflow::V1beta3::Metrics::Rest::Client::Configuration::Rpcs}
389
+ # for a list of RPCs that can be configured independently.
390
+ #
391
+ # Configuration can be applied globally to all clients, or to a single client
392
+ # on construction.
393
+ #
394
+ # @example
395
+ #
396
+ # # Modify the global config, setting the timeout for
397
+ # # get_job_metrics to 20 seconds,
398
+ # # and all remaining timeouts to 10 seconds.
399
+ # ::Google::Cloud::Dataflow::V1beta3::Metrics::Rest::Client.configure do |config|
400
+ # config.timeout = 10.0
401
+ # config.rpcs.get_job_metrics.timeout = 20.0
402
+ # end
403
+ #
404
+ # # Apply the above configuration only to a new client.
405
+ # client = ::Google::Cloud::Dataflow::V1beta3::Metrics::Rest::Client.new do |config|
406
+ # config.timeout = 10.0
407
+ # config.rpcs.get_job_metrics.timeout = 20.0
408
+ # end
409
+ #
410
+ # @!attribute [rw] endpoint
411
+ # The hostname or hostname:port of the service endpoint.
412
+ # Defaults to `"dataflow.googleapis.com"`.
413
+ # @return [::String]
414
+ # @!attribute [rw] credentials
415
+ # Credentials to send with calls. You may provide any of the following types:
416
+ # * (`String`) The path to a service account key file in JSON format
417
+ # * (`Hash`) A service account key as a Hash
418
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
419
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
420
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
421
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
422
+ # * (`nil`) indicating no credentials
423
+ # @return [::Object]
424
+ # @!attribute [rw] scope
425
+ # The OAuth scopes
426
+ # @return [::Array<::String>]
427
+ # @!attribute [rw] lib_name
428
+ # The library name as recorded in instrumentation and logging
429
+ # @return [::String]
430
+ # @!attribute [rw] lib_version
431
+ # The library version as recorded in instrumentation and logging
432
+ # @return [::String]
433
+ # @!attribute [rw] timeout
434
+ # The call timeout in seconds.
435
+ # @return [::Numeric]
436
+ # @!attribute [rw] metadata
437
+ # Additional headers to be sent with the call.
438
+ # @return [::Hash{::Symbol=>::String}]
439
+ # @!attribute [rw] retry_policy
440
+ # The retry policy. The value is a hash with the following keys:
441
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
442
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
443
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
444
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
445
+ # trigger a retry.
446
+ # @return [::Hash]
447
+ # @!attribute [rw] quota_project
448
+ # A separate project against which to charge quota.
449
+ # @return [::String]
450
+ #
451
+ class Configuration
452
+ extend ::Gapic::Config
453
+
454
+ config_attr :endpoint, "dataflow.googleapis.com", ::String
455
+ config_attr :credentials, nil do |value|
456
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
457
+ allowed.any? { |klass| klass === value }
458
+ end
459
+ config_attr :scope, nil, ::String, ::Array, nil
460
+ config_attr :lib_name, nil, ::String, nil
461
+ config_attr :lib_version, nil, ::String, nil
462
+ config_attr :timeout, nil, ::Numeric, nil
463
+ config_attr :metadata, nil, ::Hash, nil
464
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
465
+ config_attr :quota_project, nil, ::String, nil
466
+
467
+ # @private
468
+ def initialize parent_config = nil
469
+ @parent_config = parent_config unless parent_config.nil?
470
+
471
+ yield self if block_given?
472
+ end
473
+
474
+ ##
475
+ # Configurations for individual RPCs
476
+ # @return [Rpcs]
477
+ #
478
+ def rpcs
479
+ @rpcs ||= begin
480
+ parent_rpcs = nil
481
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
482
+ Rpcs.new parent_rpcs
483
+ end
484
+ end
485
+
486
+ ##
487
+ # Configuration RPC class for the Metrics API.
488
+ #
489
+ # Includes fields providing the configuration for each RPC in this service.
490
+ # Each configuration object is of type `Gapic::Config::Method` and includes
491
+ # the following configuration fields:
492
+ #
493
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
494
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
495
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
496
+ # include the following keys:
497
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
498
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
499
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
500
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
501
+ # trigger a retry.
502
+ #
503
+ class Rpcs
504
+ ##
505
+ # RPC-specific configuration for `get_job_metrics`
506
+ # @return [::Gapic::Config::Method]
507
+ #
508
+ attr_reader :get_job_metrics
509
+ ##
510
+ # RPC-specific configuration for `get_job_execution_details`
511
+ # @return [::Gapic::Config::Method]
512
+ #
513
+ attr_reader :get_job_execution_details
514
+ ##
515
+ # RPC-specific configuration for `get_stage_execution_details`
516
+ # @return [::Gapic::Config::Method]
517
+ #
518
+ attr_reader :get_stage_execution_details
519
+
520
+ # @private
521
+ def initialize parent_rpcs = nil
522
+ get_job_metrics_config = parent_rpcs.get_job_metrics if parent_rpcs.respond_to? :get_job_metrics
523
+ @get_job_metrics = ::Gapic::Config::Method.new get_job_metrics_config
524
+ get_job_execution_details_config = parent_rpcs.get_job_execution_details if parent_rpcs.respond_to? :get_job_execution_details
525
+ @get_job_execution_details = ::Gapic::Config::Method.new get_job_execution_details_config
526
+ get_stage_execution_details_config = parent_rpcs.get_stage_execution_details if parent_rpcs.respond_to? :get_stage_execution_details
527
+ @get_stage_execution_details = ::Gapic::Config::Method.new get_stage_execution_details_config
528
+
529
+ yield self if block_given?
530
+ end
531
+ end
532
+ end
533
+ end
534
+ end
535
+ end
536
+ end
537
+ end
538
+ end
539
+ end