google-cloud-dataflow-v1beta3 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/client.rb +32 -3
- data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest/client.rb +32 -3
- data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/dataflow/v1beta3/jobs/client.rb +46 -15
- data/lib/google/cloud/dataflow/v1beta3/jobs/rest/client.rb +42 -13
- data/lib/google/cloud/dataflow/v1beta3/jobs/rest/service_stub.rb +62 -38
- data/lib/google/cloud/dataflow/v1beta3/messages/client.rb +33 -3
- data/lib/google/cloud/dataflow/v1beta3/messages/rest/client.rb +32 -3
- data/lib/google/cloud/dataflow/v1beta3/messages/rest/service_stub.rb +22 -8
- data/lib/google/cloud/dataflow/v1beta3/metrics/client.rb +38 -7
- data/lib/google/cloud/dataflow/v1beta3/metrics/rest/client.rb +38 -7
- data/lib/google/cloud/dataflow/v1beta3/metrics/rest/service_stub.rb +38 -20
- data/lib/google/cloud/dataflow/v1beta3/snapshots/client.rb +36 -7
- data/lib/google/cloud/dataflow/v1beta3/snapshots/rest/client.rb +36 -7
- data/lib/google/cloud/dataflow/v1beta3/snapshots/rest/service_stub.rb +38 -20
- data/lib/google/cloud/dataflow/v1beta3/templates_service/client.rb +36 -7
- data/lib/google/cloud/dataflow/v1beta3/templates_service/rest/client.rb +36 -7
- data/lib/google/cloud/dataflow/v1beta3/templates_service/rest/service_stub.rb +38 -20
- data/lib/google/cloud/dataflow/v1beta3/version.rb +1 -1
- data/proto_docs/google/api/client.rb +74 -10
- data/proto_docs/google/api/resource.rb +7 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09f11db329259c8e667f684ddbec84cc5b1c58ac5e25556b3ae38cf5c72efff8'
|
4
|
+
data.tar.gz: 8a523716a4fdf9f25616fb89e813841f02bca5ba87511989306034d9bc9560be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f624cac044680d219f4613569202d41ea8f86224489d3c64910f23c5f9937d86bbbd2002eb369b4332c5959e9939fbfe73cf371926b74894774b533299a7bd68
|
7
|
+
data.tar.gz: a6d83e0b267ec02e591b259942b396e491eb47ab93b8e12dbfb1423346859f3209fcd089493a54667cdc6b1f73cb7385910b27ae94f0cd69b2c71c81e864de2b
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/dataflow)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/dataflow/v1beta3"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -30,6 +30,9 @@ module Google
|
|
30
30
|
# Provides a service for Flex templates. This feature is not ready yet.
|
31
31
|
#
|
32
32
|
class Client
|
33
|
+
# @private
|
34
|
+
API_VERSION = ""
|
35
|
+
|
33
36
|
# @private
|
34
37
|
DEFAULT_ENDPOINT_TEMPLATE = "dataflow.$UNIVERSE_DOMAIN$"
|
35
38
|
|
@@ -152,8 +155,28 @@ module Google
|
|
152
155
|
universe_domain: @config.universe_domain,
|
153
156
|
channel_args: @config.channel_args,
|
154
157
|
interceptors: @config.interceptors,
|
155
|
-
channel_pool_config: @config.channel_pool
|
158
|
+
channel_pool_config: @config.channel_pool,
|
159
|
+
logger: @config.logger
|
156
160
|
)
|
161
|
+
|
162
|
+
@flex_templates_service_stub.stub_logger&.info do |entry|
|
163
|
+
entry.set_system_name
|
164
|
+
entry.set_service
|
165
|
+
entry.message = "Created client for #{entry.service}"
|
166
|
+
entry.set_credentials_fields credentials
|
167
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
168
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
169
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# The logger used for request/response debug logging.
|
175
|
+
#
|
176
|
+
# @return [Logger]
|
177
|
+
#
|
178
|
+
def logger
|
179
|
+
@flex_templates_service_stub.logger
|
157
180
|
end
|
158
181
|
|
159
182
|
# Service calls
|
@@ -222,10 +245,11 @@ module Google
|
|
222
245
|
# Customize the options with defaults
|
223
246
|
metadata = @config.rpcs.launch_flex_template.metadata.to_h
|
224
247
|
|
225
|
-
# Set x-goog-api-client
|
248
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
226
249
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
227
250
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
228
251
|
gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION
|
252
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
229
253
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
230
254
|
|
231
255
|
header_params = {}
|
@@ -249,7 +273,6 @@ module Google
|
|
249
273
|
|
250
274
|
@flex_templates_service_stub.call_rpc :launch_flex_template, request, options: options do |response, operation|
|
251
275
|
yield response, operation if block_given?
|
252
|
-
return response
|
253
276
|
end
|
254
277
|
rescue ::GRPC::BadStatus => e
|
255
278
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -338,6 +361,11 @@ module Google
|
|
338
361
|
# default endpoint URL. The default value of nil uses the environment
|
339
362
|
# universe (usually the default "googleapis.com" universe).
|
340
363
|
# @return [::String,nil]
|
364
|
+
# @!attribute [rw] logger
|
365
|
+
# A custom logger to use for request/response debug logging, or the value
|
366
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
367
|
+
# explicitly disable logging.
|
368
|
+
# @return [::Logger,:default,nil]
|
341
369
|
#
|
342
370
|
class Configuration
|
343
371
|
extend ::Gapic::Config
|
@@ -362,6 +390,7 @@ module Google
|
|
362
390
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
363
391
|
config_attr :quota_project, nil, ::String, nil
|
364
392
|
config_attr :universe_domain, nil, ::String, nil
|
393
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
365
394
|
|
366
395
|
# @private
|
367
396
|
def initialize parent_config = nil
|
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# Provides a service for Flex templates. This feature is not ready yet.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
API_VERSION = ""
|
37
|
+
|
35
38
|
# @private
|
36
39
|
DEFAULT_ENDPOINT_TEMPLATE = "dataflow.$UNIVERSE_DOMAIN$"
|
37
40
|
|
@@ -145,8 +148,28 @@ module Google
|
|
145
148
|
endpoint: @config.endpoint,
|
146
149
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
147
150
|
universe_domain: @config.universe_domain,
|
148
|
-
credentials: credentials
|
151
|
+
credentials: credentials,
|
152
|
+
logger: @config.logger
|
149
153
|
)
|
154
|
+
|
155
|
+
@flex_templates_service_stub.logger(stub: true)&.info do |entry|
|
156
|
+
entry.set_system_name
|
157
|
+
entry.set_service
|
158
|
+
entry.message = "Created client for #{entry.service}"
|
159
|
+
entry.set_credentials_fields credentials
|
160
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
161
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
162
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# The logger used for request/response debug logging.
|
168
|
+
#
|
169
|
+
# @return [Logger]
|
170
|
+
#
|
171
|
+
def logger
|
172
|
+
@flex_templates_service_stub.logger
|
150
173
|
end
|
151
174
|
|
152
175
|
# Service calls
|
@@ -214,12 +237,13 @@ module Google
|
|
214
237
|
# Customize the options with defaults
|
215
238
|
call_metadata = @config.rpcs.launch_flex_template.metadata.to_h
|
216
239
|
|
217
|
-
# Set x-goog-api-client
|
240
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
218
241
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
219
242
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
220
243
|
gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION,
|
221
244
|
transports_version_send: [:rest]
|
222
245
|
|
246
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
223
247
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
224
248
|
|
225
249
|
options.apply_defaults timeout: @config.rpcs.launch_flex_template.timeout,
|
@@ -232,7 +256,6 @@ module Google
|
|
232
256
|
|
233
257
|
@flex_templates_service_stub.launch_flex_template request, options do |result, operation|
|
234
258
|
yield result, operation if block_given?
|
235
|
-
return result
|
236
259
|
end
|
237
260
|
rescue ::Gapic::Rest::Error => e
|
238
261
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -312,6 +335,11 @@ module Google
|
|
312
335
|
# default endpoint URL. The default value of nil uses the environment
|
313
336
|
# universe (usually the default "googleapis.com" universe).
|
314
337
|
# @return [::String,nil]
|
338
|
+
# @!attribute [rw] logger
|
339
|
+
# A custom logger to use for request/response debug logging, or the value
|
340
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
341
|
+
# explicitly disable logging.
|
342
|
+
# @return [::Logger,:default,nil]
|
315
343
|
#
|
316
344
|
class Configuration
|
317
345
|
extend ::Gapic::Config
|
@@ -333,6 +361,7 @@ module Google
|
|
333
361
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
334
362
|
config_attr :quota_project, nil, ::String, nil
|
335
363
|
config_attr :universe_domain, nil, ::String, nil
|
364
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
336
365
|
|
337
366
|
# @private
|
338
367
|
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
|
-
|
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
|
-
|
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 launch_flex_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:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "launch_flex_template",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::Dataflow::V1beta3::LaunchFlexTemplateResponse.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -31,6 +31,9 @@ module Google
|
|
31
31
|
# A Job is a multi-stage computation graph run by the Cloud Dataflow service.
|
32
32
|
#
|
33
33
|
class Client
|
34
|
+
# @private
|
35
|
+
API_VERSION = ""
|
36
|
+
|
34
37
|
# @private
|
35
38
|
DEFAULT_ENDPOINT_TEMPLATE = "dataflow.$UNIVERSE_DOMAIN$"
|
36
39
|
|
@@ -155,8 +158,28 @@ module Google
|
|
155
158
|
universe_domain: @config.universe_domain,
|
156
159
|
channel_args: @config.channel_args,
|
157
160
|
interceptors: @config.interceptors,
|
158
|
-
channel_pool_config: @config.channel_pool
|
161
|
+
channel_pool_config: @config.channel_pool,
|
162
|
+
logger: @config.logger
|
159
163
|
)
|
164
|
+
|
165
|
+
@jobs_stub.stub_logger&.info do |entry|
|
166
|
+
entry.set_system_name
|
167
|
+
entry.set_service
|
168
|
+
entry.message = "Created client for #{entry.service}"
|
169
|
+
entry.set_credentials_fields credentials
|
170
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
171
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
172
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
##
|
177
|
+
# The logger used for request/response debug logging.
|
178
|
+
#
|
179
|
+
# @return [Logger]
|
180
|
+
#
|
181
|
+
def logger
|
182
|
+
@jobs_stub.logger
|
160
183
|
end
|
161
184
|
|
162
185
|
# Service calls
|
@@ -232,10 +255,11 @@ module Google
|
|
232
255
|
# Customize the options with defaults
|
233
256
|
metadata = @config.rpcs.create_job.metadata.to_h
|
234
257
|
|
235
|
-
# Set x-goog-api-client
|
258
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
236
259
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
237
260
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
238
261
|
gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION
|
262
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
239
263
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
240
264
|
|
241
265
|
header_params = {}
|
@@ -259,7 +283,6 @@ module Google
|
|
259
283
|
|
260
284
|
@jobs_stub.call_rpc :create_job, request, options: options do |response, operation|
|
261
285
|
yield response, operation if block_given?
|
262
|
-
return response
|
263
286
|
end
|
264
287
|
rescue ::GRPC::BadStatus => e
|
265
288
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -334,10 +357,11 @@ module Google
|
|
334
357
|
# Customize the options with defaults
|
335
358
|
metadata = @config.rpcs.get_job.metadata.to_h
|
336
359
|
|
337
|
-
# Set x-goog-api-client
|
360
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
338
361
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
339
362
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
340
363
|
gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION
|
364
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
341
365
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
342
366
|
|
343
367
|
header_params = {}
|
@@ -364,7 +388,6 @@ module Google
|
|
364
388
|
|
365
389
|
@jobs_stub.call_rpc :get_job, request, options: options do |response, operation|
|
366
390
|
yield response, operation if block_given?
|
367
|
-
return response
|
368
391
|
end
|
369
392
|
rescue ::GRPC::BadStatus => e
|
370
393
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -440,10 +463,11 @@ module Google
|
|
440
463
|
# Customize the options with defaults
|
441
464
|
metadata = @config.rpcs.update_job.metadata.to_h
|
442
465
|
|
443
|
-
# Set x-goog-api-client
|
466
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
444
467
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
445
468
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
446
469
|
gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION
|
470
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
447
471
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
448
472
|
|
449
473
|
header_params = {}
|
@@ -470,7 +494,6 @@ module Google
|
|
470
494
|
|
471
495
|
@jobs_stub.call_rpc :update_job, request, options: options do |response, operation|
|
472
496
|
yield response, operation if block_given?
|
473
|
-
return response
|
474
497
|
end
|
475
498
|
rescue ::GRPC::BadStatus => e
|
476
499
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -558,10 +581,11 @@ module Google
|
|
558
581
|
# Customize the options with defaults
|
559
582
|
metadata = @config.rpcs.list_jobs.metadata.to_h
|
560
583
|
|
561
|
-
# Set x-goog-api-client
|
584
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
562
585
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
563
586
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
564
587
|
gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION
|
588
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
565
589
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
566
590
|
|
567
591
|
header_params = {}
|
@@ -586,7 +610,7 @@ module Google
|
|
586
610
|
@jobs_stub.call_rpc :list_jobs, request, options: options do |response, operation|
|
587
611
|
response = ::Gapic::PagedEnumerable.new @jobs_stub, :list_jobs, request, response, operation, options
|
588
612
|
yield response, operation if block_given?
|
589
|
-
|
613
|
+
throw :response, response
|
590
614
|
end
|
591
615
|
rescue ::GRPC::BadStatus => e
|
592
616
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -667,10 +691,11 @@ module Google
|
|
667
691
|
# Customize the options with defaults
|
668
692
|
metadata = @config.rpcs.aggregated_list_jobs.metadata.to_h
|
669
693
|
|
670
|
-
# Set x-goog-api-client
|
694
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
671
695
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
672
696
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
673
697
|
gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION
|
698
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
674
699
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
675
700
|
|
676
701
|
header_params = {}
|
@@ -692,7 +717,7 @@ module Google
|
|
692
717
|
@jobs_stub.call_rpc :aggregated_list_jobs, request, options: options do |response, operation|
|
693
718
|
response = ::Gapic::PagedEnumerable.new @jobs_stub, :aggregated_list_jobs, request, response, operation, options
|
694
719
|
yield response, operation if block_given?
|
695
|
-
|
720
|
+
throw :response, response
|
696
721
|
end
|
697
722
|
rescue ::GRPC::BadStatus => e
|
698
723
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -753,10 +778,11 @@ module Google
|
|
753
778
|
# Customize the options with defaults
|
754
779
|
metadata = @config.rpcs.check_active_jobs.metadata.to_h
|
755
780
|
|
756
|
-
# Set x-goog-api-client
|
781
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
757
782
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
758
783
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
759
784
|
gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION
|
785
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
760
786
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
761
787
|
|
762
788
|
options.apply_defaults timeout: @config.rpcs.check_active_jobs.timeout,
|
@@ -769,7 +795,6 @@ module Google
|
|
769
795
|
|
770
796
|
@jobs_stub.call_rpc :check_active_jobs, request, options: options do |response, operation|
|
771
797
|
yield response, operation if block_given?
|
772
|
-
return response
|
773
798
|
end
|
774
799
|
rescue ::GRPC::BadStatus => e
|
775
800
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -840,10 +865,11 @@ module Google
|
|
840
865
|
# Customize the options with defaults
|
841
866
|
metadata = @config.rpcs.snapshot_job.metadata.to_h
|
842
867
|
|
843
|
-
# Set x-goog-api-client
|
868
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
844
869
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
845
870
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
846
871
|
gapic_version: ::Google::Cloud::Dataflow::V1beta3::VERSION
|
872
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
847
873
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
848
874
|
|
849
875
|
header_params = {}
|
@@ -870,7 +896,6 @@ module Google
|
|
870
896
|
|
871
897
|
@jobs_stub.call_rpc :snapshot_job, request, options: options do |response, operation|
|
872
898
|
yield response, operation if block_given?
|
873
|
-
return response
|
874
899
|
end
|
875
900
|
rescue ::GRPC::BadStatus => e
|
876
901
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -959,6 +984,11 @@ module Google
|
|
959
984
|
# default endpoint URL. The default value of nil uses the environment
|
960
985
|
# universe (usually the default "googleapis.com" universe).
|
961
986
|
# @return [::String,nil]
|
987
|
+
# @!attribute [rw] logger
|
988
|
+
# A custom logger to use for request/response debug logging, or the value
|
989
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
990
|
+
# explicitly disable logging.
|
991
|
+
# @return [::Logger,:default,nil]
|
962
992
|
#
|
963
993
|
class Configuration
|
964
994
|
extend ::Gapic::Config
|
@@ -983,6 +1013,7 @@ module Google
|
|
983
1013
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
984
1014
|
config_attr :quota_project, nil, ::String, nil
|
985
1015
|
config_attr :universe_domain, nil, ::String, nil
|
1016
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
986
1017
|
|
987
1018
|
# @private
|
988
1019
|
def initialize parent_config = nil
|