google-cloud-dataflow-v1beta3 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
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,373 @@
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/messages_pb"
21
+ require "google/cloud/dataflow/v1beta3/messages/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Dataflow
26
+ module V1beta3
27
+ module Messages
28
+ module Rest
29
+ ##
30
+ # REST client for the Messages service.
31
+ #
32
+ # The Dataflow Messages API is used for monitoring the progress of
33
+ # Dataflow jobs.
34
+ #
35
+ class Client
36
+ # @private
37
+ attr_reader :messages_stub
38
+
39
+ ##
40
+ # Configure the Messages Client class.
41
+ #
42
+ # See {::Google::Cloud::Dataflow::V1beta3::Messages::Rest::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # @example
46
+ #
47
+ # # Modify the configuration for all Messages clients
48
+ # ::Google::Cloud::Dataflow::V1beta3::Messages::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 Messages 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::Messages::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 Messages REST client object.
98
+ #
99
+ # @example
100
+ #
101
+ # # Create a client using the default configuration
102
+ # client = ::Google::Cloud::Dataflow::V1beta3::Messages::Rest::Client.new
103
+ #
104
+ # # Create a client using a custom configuration
105
+ # client = ::Google::Cloud::Dataflow::V1beta3::Messages::Rest::Client.new do |config|
106
+ # config.timeout = 10.0
107
+ # end
108
+ #
109
+ # @yield [config] Configure the Messages 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
+ @messages_stub = ::Google::Cloud::Dataflow::V1beta3::Messages::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.messages.list` with a [regional endpoint]
144
+ # (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using
145
+ # `projects.jobs.messages.list` is not recommended, as you can only request
146
+ # the status of jobs that are running in `us-central1`.
147
+ #
148
+ # @overload list_job_messages(request, options = nil)
149
+ # Pass arguments to `list_job_messages` via a request object, either of type
150
+ # {::Google::Cloud::Dataflow::V1beta3::ListJobMessagesRequest} or an equivalent Hash.
151
+ #
152
+ # @param request [::Google::Cloud::Dataflow::V1beta3::ListJobMessagesRequest, ::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 list_job_messages(project_id: nil, job_id: nil, minimum_importance: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil, location: nil)
159
+ # Pass arguments to `list_job_messages` 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 messages about.
167
+ # @param minimum_importance [::Google::Cloud::Dataflow::V1beta3::JobMessageImportance]
168
+ # Filter to only get messages with importance >= level
169
+ # @param page_size [::Integer]
170
+ # If specified, determines the maximum number of messages to
171
+ # return. If unspecified, the service may choose an appropriate
172
+ # default, or may return an arbitrarily large number of results.
173
+ # @param page_token [::String]
174
+ # If supplied, this should be the value of next_page_token returned
175
+ # by an earlier call. This will cause the next page of results to
176
+ # be returned.
177
+ # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
178
+ # If specified, return only messages with timestamps >= start_time.
179
+ # The default is the job creation time (i.e. beginning of messages).
180
+ # @param end_time [::Google::Protobuf::Timestamp, ::Hash]
181
+ # Return only messages with timestamps < end_time. The default is now
182
+ # (i.e. return up to the latest messages available).
183
+ # @param location [::String]
184
+ # The [regional endpoint]
185
+ # (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
186
+ # contains the job specified by job_id.
187
+ # @yield [result, operation] Access the result along with the TransportOperation object
188
+ # @yieldparam result [::Google::Cloud::Dataflow::V1beta3::ListJobMessagesResponse]
189
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
190
+ #
191
+ # @return [::Google::Cloud::Dataflow::V1beta3::ListJobMessagesResponse]
192
+ #
193
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
194
+ def list_job_messages request, options = nil
195
+ raise ::ArgumentError, "request must be provided" if request.nil?
196
+
197
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataflow::V1beta3::ListJobMessagesRequest
198
+
199
+ # Converts hash and nil to an options object
200
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
201
+
202
+ # Customize the options with defaults
203
+ call_metadata = @config.rpcs.list_job_messages.metadata.to_h
204
+
205
+ # Set x-goog-api-client and x-goog-user-project headers
206
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
207
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
208
+ gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION,
209
+ transports_version_send: [:rest]
210
+
211
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
212
+
213
+ options.apply_defaults timeout: @config.rpcs.list_job_messages.timeout,
214
+ metadata: call_metadata,
215
+ retry_policy: @config.rpcs.list_job_messages.retry_policy
216
+
217
+ options.apply_defaults timeout: @config.timeout,
218
+ metadata: @config.metadata,
219
+ retry_policy: @config.retry_policy
220
+
221
+ @messages_stub.list_job_messages request, options do |result, operation|
222
+ yield result, operation if block_given?
223
+ return result
224
+ end
225
+ rescue ::Gapic::Rest::Error => e
226
+ raise ::Google::Cloud::Error.from_error(e)
227
+ end
228
+
229
+ ##
230
+ # Configuration class for the Messages REST API.
231
+ #
232
+ # This class represents the configuration for Messages REST,
233
+ # providing control over timeouts, retry behavior, logging, transport
234
+ # parameters, and other low-level controls. Certain parameters can also be
235
+ # applied individually to specific RPCs. See
236
+ # {::Google::Cloud::Dataflow::V1beta3::Messages::Rest::Client::Configuration::Rpcs}
237
+ # for a list of RPCs that can be configured independently.
238
+ #
239
+ # Configuration can be applied globally to all clients, or to a single client
240
+ # on construction.
241
+ #
242
+ # @example
243
+ #
244
+ # # Modify the global config, setting the timeout for
245
+ # # list_job_messages to 20 seconds,
246
+ # # and all remaining timeouts to 10 seconds.
247
+ # ::Google::Cloud::Dataflow::V1beta3::Messages::Rest::Client.configure do |config|
248
+ # config.timeout = 10.0
249
+ # config.rpcs.list_job_messages.timeout = 20.0
250
+ # end
251
+ #
252
+ # # Apply the above configuration only to a new client.
253
+ # client = ::Google::Cloud::Dataflow::V1beta3::Messages::Rest::Client.new do |config|
254
+ # config.timeout = 10.0
255
+ # config.rpcs.list_job_messages.timeout = 20.0
256
+ # end
257
+ #
258
+ # @!attribute [rw] endpoint
259
+ # The hostname or hostname:port of the service endpoint.
260
+ # Defaults to `"dataflow.googleapis.com"`.
261
+ # @return [::String]
262
+ # @!attribute [rw] credentials
263
+ # Credentials to send with calls. You may provide any of the following types:
264
+ # * (`String`) The path to a service account key file in JSON format
265
+ # * (`Hash`) A service account key as a Hash
266
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
267
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
268
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
269
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
270
+ # * (`nil`) indicating no credentials
271
+ # @return [::Object]
272
+ # @!attribute [rw] scope
273
+ # The OAuth scopes
274
+ # @return [::Array<::String>]
275
+ # @!attribute [rw] lib_name
276
+ # The library name as recorded in instrumentation and logging
277
+ # @return [::String]
278
+ # @!attribute [rw] lib_version
279
+ # The library version as recorded in instrumentation and logging
280
+ # @return [::String]
281
+ # @!attribute [rw] timeout
282
+ # The call timeout in seconds.
283
+ # @return [::Numeric]
284
+ # @!attribute [rw] metadata
285
+ # Additional headers to be sent with the call.
286
+ # @return [::Hash{::Symbol=>::String}]
287
+ # @!attribute [rw] retry_policy
288
+ # The retry policy. The value is a hash with the following keys:
289
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
290
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
291
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
292
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
293
+ # trigger a retry.
294
+ # @return [::Hash]
295
+ # @!attribute [rw] quota_project
296
+ # A separate project against which to charge quota.
297
+ # @return [::String]
298
+ #
299
+ class Configuration
300
+ extend ::Gapic::Config
301
+
302
+ config_attr :endpoint, "dataflow.googleapis.com", ::String
303
+ config_attr :credentials, nil do |value|
304
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
305
+ allowed.any? { |klass| klass === value }
306
+ end
307
+ config_attr :scope, nil, ::String, ::Array, nil
308
+ config_attr :lib_name, nil, ::String, nil
309
+ config_attr :lib_version, nil, ::String, nil
310
+ config_attr :timeout, nil, ::Numeric, nil
311
+ config_attr :metadata, nil, ::Hash, nil
312
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
313
+ config_attr :quota_project, nil, ::String, nil
314
+
315
+ # @private
316
+ def initialize parent_config = nil
317
+ @parent_config = parent_config unless parent_config.nil?
318
+
319
+ yield self if block_given?
320
+ end
321
+
322
+ ##
323
+ # Configurations for individual RPCs
324
+ # @return [Rpcs]
325
+ #
326
+ def rpcs
327
+ @rpcs ||= begin
328
+ parent_rpcs = nil
329
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
330
+ Rpcs.new parent_rpcs
331
+ end
332
+ end
333
+
334
+ ##
335
+ # Configuration RPC class for the Messages API.
336
+ #
337
+ # Includes fields providing the configuration for each RPC in this service.
338
+ # Each configuration object is of type `Gapic::Config::Method` and includes
339
+ # the following configuration fields:
340
+ #
341
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
342
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
343
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
344
+ # include the following keys:
345
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
346
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
347
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
348
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
349
+ # trigger a retry.
350
+ #
351
+ class Rpcs
352
+ ##
353
+ # RPC-specific configuration for `list_job_messages`
354
+ # @return [::Gapic::Config::Method]
355
+ #
356
+ attr_reader :list_job_messages
357
+
358
+ # @private
359
+ def initialize parent_rpcs = nil
360
+ list_job_messages_config = parent_rpcs.list_job_messages if parent_rpcs.respond_to? :list_job_messages
361
+ @list_job_messages = ::Gapic::Config::Method.new list_job_messages_config
362
+
363
+ yield self if block_given?
364
+ end
365
+ end
366
+ end
367
+ end
368
+ end
369
+ end
370
+ end
371
+ end
372
+ end
373
+ end
@@ -0,0 +1,117 @@
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/dataflow/v1beta3/messages_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Dataflow
24
+ module V1beta3
25
+ module Messages
26
+ module Rest
27
+ ##
28
+ # REST service stub for the Messages service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the list_job_messages REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::Dataflow::V1beta3::ListJobMessagesRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::Dataflow::V1beta3::ListJobMessagesResponse]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::Dataflow::V1beta3::ListJobMessagesResponse]
56
+ # A result object deserialized from the server's reply
57
+ def list_job_messages request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_job_messages_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split("=", 2) }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::Dataflow::V1beta3::ListJobMessagesResponse.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # @private
83
+ #
84
+ # GRPC transcoding helper method for the list_job_messages REST call
85
+ #
86
+ # @param request_pb [::Google::Cloud::Dataflow::V1beta3::ListJobMessagesRequest]
87
+ # A request object representing the call parameters. Required.
88
+ # @return [Array(String, [String, nil], Hash{String => String})]
89
+ # Uri, Body, Query string parameters
90
+ def self.transcode_list_job_messages_request request_pb
91
+ transcoder = Gapic::Rest::GrpcTranscoder.new
92
+ .with_bindings(
93
+ uri_method: :get,
94
+ uri_template: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/messages",
95
+ matches: [
96
+ ["project_id", %r{^[^/]+/?$}, false],
97
+ ["location", %r{^[^/]+/?$}, false],
98
+ ["job_id", %r{^[^/]+/?$}, false]
99
+ ]
100
+ )
101
+ .with_bindings(
102
+ uri_method: :get,
103
+ uri_template: "/v1b3/projects/{project_id}/jobs/{job_id}/messages",
104
+ matches: [
105
+ ["project_id", %r{^[^/]+/?$}, false],
106
+ ["job_id", %r{^[^/]+/?$}, false]
107
+ ]
108
+ )
109
+ transcoder.transcode request_pb
110
+ end
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,52 @@
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 "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/dataflow/v1beta3/version"
24
+
25
+ require "google/cloud/dataflow/v1beta3/messages/credentials"
26
+ require "google/cloud/dataflow/v1beta3/messages/rest/client"
27
+
28
+ module Google
29
+ module Cloud
30
+ module Dataflow
31
+ module V1beta3
32
+ ##
33
+ # The Dataflow Messages API is used for monitoring the progress of
34
+ # Dataflow jobs.
35
+ #
36
+ # To load this service and instantiate a REST client:
37
+ #
38
+ # require "google/cloud/dataflow/v1beta3/messages/rest"
39
+ # client = ::Google::Cloud::Dataflow::V1beta3::Messages::Rest::Client.new
40
+ #
41
+ module Messages
42
+ # Client for the REST transport
43
+ module Rest
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
52
+ require "google/cloud/dataflow/v1beta3/messages/rest/helpers" if ::File.file? helper_path
@@ -24,6 +24,7 @@ require "google/cloud/dataflow/v1beta3/version"
24
24
 
25
25
  require "google/cloud/dataflow/v1beta3/messages/credentials"
26
26
  require "google/cloud/dataflow/v1beta3/messages/client"
27
+ require "google/cloud/dataflow/v1beta3/messages/rest"
27
28
 
28
29
  module Google
29
30
  module Cloud
@@ -33,11 +34,16 @@ module Google
33
34
  # The Dataflow Messages API is used for monitoring the progress of
34
35
  # Dataflow jobs.
35
36
  #
36
- # To load this service and instantiate a client:
37
+ # @example Load this service and instantiate a gRPC client
37
38
  #
38
39
  # require "google/cloud/dataflow/v1beta3/messages"
39
40
  # client = ::Google::Cloud::Dataflow::V1beta3::Messages::Client.new
40
41
  #
42
+ # @example Load this service and instantiate a REST client
43
+ #
44
+ # require "google/cloud/dataflow/v1beta3/messages/rest"
45
+ # client = ::Google::Cloud::Dataflow::V1beta3::Messages::Rest::Client.new
46
+ #
41
47
  module Messages
42
48
  end
43
49
  end
@@ -308,13 +308,11 @@ module Google
308
308
  # # Call the get_job_execution_details method.
309
309
  # result = client.get_job_execution_details request
310
310
  #
311
- # # The returned object is of type Gapic::PagedEnumerable. You can
312
- # # iterate over all elements by calling #each, and the enumerable
313
- # # will lazily make API calls to fetch subsequent pages. Other
314
- # # methods are also available for managing paging directly.
315
- # result.each do |response|
311
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
312
+ # # over elements, and API calls will be issued to fetch pages as needed.
313
+ # result.each do |item|
316
314
  # # Each element is of type ::Google::Cloud::Dataflow::V1beta3::StageSummary.
317
- # p response
315
+ # p item
318
316
  # end
319
317
  #
320
318
  def get_job_execution_details request, options = nil
@@ -429,13 +427,11 @@ module Google
429
427
  # # Call the get_stage_execution_details method.
430
428
  # result = client.get_stage_execution_details request
431
429
  #
432
- # # The returned object is of type Gapic::PagedEnumerable. You can
433
- # # iterate over all elements by calling #each, and the enumerable
434
- # # will lazily make API calls to fetch subsequent pages. Other
435
- # # methods are also available for managing paging directly.
436
- # result.each do |response|
430
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
431
+ # # over elements, and API calls will be issued to fetch pages as needed.
432
+ # result.each do |item|
437
433
  # # Each element is of type ::Google::Cloud::Dataflow::V1beta3::WorkerDetails.
438
- # p response
434
+ # p item
439
435
  # end
440
436
  #
441
437
  def get_stage_execution_details request, options = nil