google-cloud-dataflow-v1beta3 0.1.0

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