google-cloud-dataflow-v1beta3 0.9.1 → 0.10.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 (23) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/client.rb +27 -2
  4. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest/client.rb +27 -2
  5. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest/service_stub.rb +22 -8
  6. data/lib/google/cloud/dataflow/v1beta3/jobs/client.rb +29 -8
  7. data/lib/google/cloud/dataflow/v1beta3/jobs/rest/client.rb +27 -7
  8. data/lib/google/cloud/dataflow/v1beta3/jobs/rest/service_stub.rb +62 -38
  9. data/lib/google/cloud/dataflow/v1beta3/messages/client.rb +28 -2
  10. data/lib/google/cloud/dataflow/v1beta3/messages/rest/client.rb +27 -2
  11. data/lib/google/cloud/dataflow/v1beta3/messages/rest/service_stub.rb +22 -8
  12. data/lib/google/cloud/dataflow/v1beta3/metrics/client.rb +29 -4
  13. data/lib/google/cloud/dataflow/v1beta3/metrics/rest/client.rb +29 -4
  14. data/lib/google/cloud/dataflow/v1beta3/metrics/rest/service_stub.rb +38 -20
  15. data/lib/google/cloud/dataflow/v1beta3/snapshots/client.rb +27 -4
  16. data/lib/google/cloud/dataflow/v1beta3/snapshots/rest/client.rb +27 -4
  17. data/lib/google/cloud/dataflow/v1beta3/snapshots/rest/service_stub.rb +38 -20
  18. data/lib/google/cloud/dataflow/v1beta3/templates_service/client.rb +27 -4
  19. data/lib/google/cloud/dataflow/v1beta3/templates_service/rest/client.rb +27 -4
  20. data/lib/google/cloud/dataflow/v1beta3/templates_service/rest/service_stub.rb +38 -20
  21. data/lib/google/cloud/dataflow/v1beta3/version.rb +1 -1
  22. data/proto_docs/google/api/client.rb +39 -0
  23. metadata +5 -5
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the get_snapshot REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "get_snapshot",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Cloud::Dataflow::V1beta3::Snapshot.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "delete_snapshot",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Cloud::Dataflow::V1beta3::DeleteSnapshotResponse.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -163,16 +179,18 @@ module Google
163
179
 
164
180
  response = @client_stub.make_http_request(
165
181
  verb,
166
- uri: uri,
167
- body: body || "",
168
- params: query_string_params,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "list_snapshots",
169
186
  options: options
170
187
  )
171
188
  operation = ::Gapic::Rest::TransportOperation.new response
172
189
  result = ::Google::Cloud::Dataflow::V1beta3::ListSnapshotsResponse.decode_json response.body, ignore_unknown_fields: true
173
-
174
- yield result, operation if block_given?
175
- result
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
176
194
  end
177
195
 
178
196
  ##
@@ -157,8 +157,28 @@ module Google
157
157
  universe_domain: @config.universe_domain,
158
158
  channel_args: @config.channel_args,
159
159
  interceptors: @config.interceptors,
160
- channel_pool_config: @config.channel_pool
160
+ channel_pool_config: @config.channel_pool,
161
+ logger: @config.logger
161
162
  )
163
+
164
+ @templates_service_stub.stub_logger&.info do |entry|
165
+ entry.set_system_name
166
+ entry.set_service
167
+ entry.message = "Created client for #{entry.service}"
168
+ entry.set_credentials_fields credentials
169
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
170
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
171
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
172
+ end
173
+ end
174
+
175
+ ##
176
+ # The logger used for request/response debug logging.
177
+ #
178
+ # @return [Logger]
179
+ #
180
+ def logger
181
+ @templates_service_stub.logger
162
182
  end
163
183
 
164
184
  # Service calls
@@ -260,7 +280,6 @@ module Google
260
280
 
261
281
  @templates_service_stub.call_rpc :create_job_from_template, request, options: options do |response, operation|
262
282
  yield response, operation if block_given?
263
- return response
264
283
  end
265
284
  rescue ::GRPC::BadStatus => e
266
285
  raise ::Google::Cloud::Error.from_error(e)
@@ -365,7 +384,6 @@ module Google
365
384
 
366
385
  @templates_service_stub.call_rpc :launch_template, request, options: options do |response, operation|
367
386
  yield response, operation if block_given?
368
- return response
369
387
  end
370
388
  rescue ::GRPC::BadStatus => e
371
389
  raise ::Google::Cloud::Error.from_error(e)
@@ -464,7 +482,6 @@ module Google
464
482
 
465
483
  @templates_service_stub.call_rpc :get_template, request, options: options do |response, operation|
466
484
  yield response, operation if block_given?
467
- return response
468
485
  end
469
486
  rescue ::GRPC::BadStatus => e
470
487
  raise ::Google::Cloud::Error.from_error(e)
@@ -553,6 +570,11 @@ module Google
553
570
  # default endpoint URL. The default value of nil uses the environment
554
571
  # universe (usually the default "googleapis.com" universe).
555
572
  # @return [::String,nil]
573
+ # @!attribute [rw] logger
574
+ # A custom logger to use for request/response debug logging, or the value
575
+ # `:default` (the default) to construct a default logger, or `nil` to
576
+ # explicitly disable logging.
577
+ # @return [::Logger,:default,nil]
556
578
  #
557
579
  class Configuration
558
580
  extend ::Gapic::Config
@@ -577,6 +599,7 @@ module Google
577
599
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
578
600
  config_attr :quota_project, nil, ::String, nil
579
601
  config_attr :universe_domain, nil, ::String, nil
602
+ config_attr :logger, :default, ::Logger, nil, :default
580
603
 
581
604
  # @private
582
605
  def initialize parent_config = nil
@@ -150,8 +150,28 @@ module Google
150
150
  endpoint: @config.endpoint,
151
151
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
152
152
  universe_domain: @config.universe_domain,
153
- credentials: credentials
153
+ credentials: credentials,
154
+ logger: @config.logger
154
155
  )
156
+
157
+ @templates_service_stub.logger(stub: true)&.info do |entry|
158
+ entry.set_system_name
159
+ entry.set_service
160
+ entry.message = "Created client for #{entry.service}"
161
+ entry.set_credentials_fields credentials
162
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
163
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
164
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
165
+ end
166
+ end
167
+
168
+ ##
169
+ # The logger used for request/response debug logging.
170
+ #
171
+ # @return [Logger]
172
+ #
173
+ def logger
174
+ @templates_service_stub.logger
155
175
  end
156
176
 
157
177
  # Service calls
@@ -243,7 +263,6 @@ module Google
243
263
 
244
264
  @templates_service_stub.create_job_from_template request, options do |result, operation|
245
265
  yield result, operation if block_given?
246
- return result
247
266
  end
248
267
  rescue ::Gapic::Rest::Error => e
249
268
  raise ::Google::Cloud::Error.from_error(e)
@@ -338,7 +357,6 @@ module Google
338
357
 
339
358
  @templates_service_stub.launch_template request, options do |result, operation|
340
359
  yield result, operation if block_given?
341
- return result
342
360
  end
343
361
  rescue ::Gapic::Rest::Error => e
344
362
  raise ::Google::Cloud::Error.from_error(e)
@@ -427,7 +445,6 @@ module Google
427
445
 
428
446
  @templates_service_stub.get_template request, options do |result, operation|
429
447
  yield result, operation if block_given?
430
- return result
431
448
  end
432
449
  rescue ::Gapic::Rest::Error => e
433
450
  raise ::Google::Cloud::Error.from_error(e)
@@ -507,6 +524,11 @@ module Google
507
524
  # default endpoint URL. The default value of nil uses the environment
508
525
  # universe (usually the default "googleapis.com" universe).
509
526
  # @return [::String,nil]
527
+ # @!attribute [rw] logger
528
+ # A custom logger to use for request/response debug logging, or the value
529
+ # `:default` (the default) to construct a default logger, or `nil` to
530
+ # explicitly disable logging.
531
+ # @return [::Logger,:default,nil]
510
532
  #
511
533
  class Configuration
512
534
  extend ::Gapic::Config
@@ -528,6 +550,7 @@ module Google
528
550
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
529
551
  config_attr :quota_project, nil, ::String, nil
530
552
  config_attr :universe_domain, nil, ::String, nil
553
+ config_attr :logger, :default, ::Logger, nil, :default
531
554
 
532
555
  # @private
533
556
  def initialize parent_config = nil
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the create_job_from_template REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "create_job_from_template",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Cloud::Dataflow::V1beta3::Job.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "launch_template",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Cloud::Dataflow::V1beta3::LaunchTemplateResponse.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -163,16 +179,18 @@ module Google
163
179
 
164
180
  response = @client_stub.make_http_request(
165
181
  verb,
166
- uri: uri,
167
- body: body || "",
168
- params: query_string_params,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "get_template",
169
186
  options: options
170
187
  )
171
188
  operation = ::Gapic::Rest::TransportOperation.new response
172
189
  result = ::Google::Cloud::Dataflow::V1beta3::GetTemplateResponse.decode_json response.body, ignore_unknown_fields: true
173
-
174
- yield result, operation if block_given?
175
- result
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
176
194
  end
177
195
 
178
196
  ##
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Dataflow
23
23
  module V1beta3
24
- VERSION = "0.9.1"
24
+ VERSION = "0.10.0"
25
25
  end
26
26
  end
27
27
  end
@@ -28,6 +28,9 @@ module Google
28
28
  # @!attribute [rw] destinations
29
29
  # @return [::Array<::Google::Api::ClientLibraryDestination>]
30
30
  # The destination where API teams want this client library to be published.
31
+ # @!attribute [rw] selective_gapic_generation
32
+ # @return [::Google::Api::SelectiveGapicGeneration]
33
+ # Configuration for which RPCs should be generated in the GAPIC client.
31
34
  class CommonLanguageSettings
32
35
  include ::Google::Protobuf::MessageExts
33
36
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -212,6 +215,12 @@ module Google
212
215
  # enabled. By default, asynchronous REST clients will not be generated.
213
216
  # This feature will be enabled by default 1 month after launching the
214
217
  # feature in preview packages.
218
+ # @!attribute [rw] protobuf_pythonic_types_enabled
219
+ # @return [::Boolean]
220
+ # Enables generation of protobuf code using new types that are more
221
+ # Pythonic which are included in `protobuf>=5.29.x`. This feature will be
222
+ # enabled by default 1 month after launching the feature in preview
223
+ # packages.
215
224
  class ExperimentalFeatures
216
225
  include ::Google::Protobuf::MessageExts
217
226
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -297,9 +306,28 @@ module Google
297
306
  # @!attribute [rw] common
298
307
  # @return [::Google::Api::CommonLanguageSettings]
299
308
  # Some settings.
309
+ # @!attribute [rw] renamed_services
310
+ # @return [::Google::Protobuf::Map{::String => ::String}]
311
+ # Map of service names to renamed services. Keys are the package relative
312
+ # service names and values are the name to be used for the service client
313
+ # and call options.
314
+ #
315
+ # publishing:
316
+ # go_settings:
317
+ # renamed_services:
318
+ # Publisher: TopicAdmin
300
319
  class GoSettings
301
320
  include ::Google::Protobuf::MessageExts
302
321
  extend ::Google::Protobuf::MessageExts::ClassMethods
322
+
323
+ # @!attribute [rw] key
324
+ # @return [::String]
325
+ # @!attribute [rw] value
326
+ # @return [::String]
327
+ class RenamedServicesEntry
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+ end
303
331
  end
304
332
 
305
333
  # Describes the generator configuration for a method.
@@ -375,6 +403,17 @@ module Google
375
403
  end
376
404
  end
377
405
 
406
+ # This message is used to configure the generation of a subset of the RPCs in
407
+ # a service for client libraries.
408
+ # @!attribute [rw] methods
409
+ # @return [::Array<::String>]
410
+ # An allowlist of the fully qualified names of RPCs that should be included
411
+ # on public client surfaces.
412
+ class SelectiveGapicGeneration
413
+ include ::Google::Protobuf::MessageExts
414
+ extend ::Google::Protobuf::MessageExts::ClassMethods
415
+ end
416
+
378
417
  # The organization for which the client libraries are being published.
379
418
  # Affects the url where generated docs are published, etc.
380
419
  module ClientLibraryOrganization
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dataflow-v1beta3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-30 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.21.1
19
+ version: 0.24.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.21.1
29
+ version: 0.24.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  requirements: []
148
- rubygems_version: 3.5.6
148
+ rubygems_version: 3.5.23
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Manages Google Cloud Dataflow projects on Google Cloud Platform.