google-cloud-talent-v4beta1 0.11.0 → 0.12.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/talent/v4beta1/company_service/client.rb +41 -11
- data/lib/google/cloud/talent/v4beta1/company_service/rest/client.rb +41 -11
- data/lib/google/cloud/talent/v4beta1/company_service/rest/service_stub.rb +54 -32
- data/lib/google/cloud/talent/v4beta1/completion/client.rb +32 -3
- data/lib/google/cloud/talent/v4beta1/completion/rest/client.rb +32 -3
- data/lib/google/cloud/talent/v4beta1/completion/rest/service_stub.rb +22 -8
- data/lib/google/cloud/talent/v4beta1/event_service/client.rb +32 -3
- data/lib/google/cloud/talent/v4beta1/event_service/rest/client.rb +32 -3
- data/lib/google/cloud/talent/v4beta1/event_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/talent/v4beta1/job_service/client.rb +53 -21
- data/lib/google/cloud/talent/v4beta1/job_service/operations.rb +25 -20
- data/lib/google/cloud/talent/v4beta1/job_service/rest/client.rb +53 -21
- data/lib/google/cloud/talent/v4beta1/job_service/rest/operations.rb +54 -42
- data/lib/google/cloud/talent/v4beta1/job_service/rest/service_stub.rb +94 -62
- data/lib/google/cloud/talent/v4beta1/tenant_service/client.rb +41 -11
- data/lib/google/cloud/talent/v4beta1/tenant_service/rest/client.rb +41 -11
- data/lib/google/cloud/talent/v4beta1/tenant_service/rest/service_stub.rb +54 -32
- data/lib/google/cloud/talent/v4beta1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +74 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# A service handles auto completion.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
API_VERSION = ""
|
37
|
+
|
35
38
|
# @private
|
36
39
|
DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$"
|
37
40
|
|
@@ -152,8 +155,28 @@ module Google
|
|
152
155
|
endpoint: @config.endpoint,
|
153
156
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
154
157
|
universe_domain: @config.universe_domain,
|
155
|
-
credentials: credentials
|
158
|
+
credentials: credentials,
|
159
|
+
logger: @config.logger
|
156
160
|
)
|
161
|
+
|
162
|
+
@completion_stub.logger(stub: true)&.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
|
+
@completion_stub.logger
|
157
180
|
end
|
158
181
|
|
159
182
|
# Service calls
|
@@ -249,12 +272,13 @@ module Google
|
|
249
272
|
# Customize the options with defaults
|
250
273
|
call_metadata = @config.rpcs.complete_query.metadata.to_h
|
251
274
|
|
252
|
-
# Set x-goog-api-client
|
275
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
253
276
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
254
277
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
255
278
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION,
|
256
279
|
transports_version_send: [:rest]
|
257
280
|
|
281
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
258
282
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
259
283
|
|
260
284
|
options.apply_defaults timeout: @config.rpcs.complete_query.timeout,
|
@@ -267,7 +291,6 @@ module Google
|
|
267
291
|
|
268
292
|
@completion_stub.complete_query request, options do |result, operation|
|
269
293
|
yield result, operation if block_given?
|
270
|
-
return result
|
271
294
|
end
|
272
295
|
rescue ::Gapic::Rest::Error => e
|
273
296
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -347,6 +370,11 @@ module Google
|
|
347
370
|
# default endpoint URL. The default value of nil uses the environment
|
348
371
|
# universe (usually the default "googleapis.com" universe).
|
349
372
|
# @return [::String,nil]
|
373
|
+
# @!attribute [rw] logger
|
374
|
+
# A custom logger to use for request/response debug logging, or the value
|
375
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
376
|
+
# explicitly disable logging.
|
377
|
+
# @return [::Logger,:default,nil]
|
350
378
|
#
|
351
379
|
class Configuration
|
352
380
|
extend ::Gapic::Config
|
@@ -368,6 +396,7 @@ module Google
|
|
368
396
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
369
397
|
config_attr :quota_project, nil, ::String, nil
|
370
398
|
config_attr :universe_domain, nil, ::String, nil
|
399
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
371
400
|
|
372
401
|
# @private
|
373
402
|
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 complete_query 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: "complete_query",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::Talent::V4beta1::CompleteQueryResponse.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
|
##
|
@@ -30,6 +30,9 @@ module Google
|
|
30
30
|
# A service handles client event report.
|
31
31
|
#
|
32
32
|
class Client
|
33
|
+
# @private
|
34
|
+
API_VERSION = ""
|
35
|
+
|
33
36
|
# @private
|
34
37
|
DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$"
|
35
38
|
|
@@ -156,8 +159,28 @@ module Google
|
|
156
159
|
universe_domain: @config.universe_domain,
|
157
160
|
channel_args: @config.channel_args,
|
158
161
|
interceptors: @config.interceptors,
|
159
|
-
channel_pool_config: @config.channel_pool
|
162
|
+
channel_pool_config: @config.channel_pool,
|
163
|
+
logger: @config.logger
|
160
164
|
)
|
165
|
+
|
166
|
+
@event_service_stub.stub_logger&.info do |entry|
|
167
|
+
entry.set_system_name
|
168
|
+
entry.set_service
|
169
|
+
entry.message = "Created client for #{entry.service}"
|
170
|
+
entry.set_credentials_fields credentials
|
171
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
172
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
173
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
##
|
178
|
+
# The logger used for request/response debug logging.
|
179
|
+
#
|
180
|
+
# @return [Logger]
|
181
|
+
#
|
182
|
+
def logger
|
183
|
+
@event_service_stub.logger
|
161
184
|
end
|
162
185
|
|
163
186
|
# Service calls
|
@@ -230,10 +253,11 @@ module Google
|
|
230
253
|
# Customize the options with defaults
|
231
254
|
metadata = @config.rpcs.create_client_event.metadata.to_h
|
232
255
|
|
233
|
-
# Set x-goog-api-client
|
256
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
234
257
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
235
258
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
236
259
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
260
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
237
261
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
238
262
|
|
239
263
|
header_params = {}
|
@@ -254,7 +278,6 @@ module Google
|
|
254
278
|
|
255
279
|
@event_service_stub.call_rpc :create_client_event, request, options: options do |response, operation|
|
256
280
|
yield response, operation if block_given?
|
257
|
-
return response
|
258
281
|
end
|
259
282
|
rescue ::GRPC::BadStatus => e
|
260
283
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -343,6 +366,11 @@ module Google
|
|
343
366
|
# default endpoint URL. The default value of nil uses the environment
|
344
367
|
# universe (usually the default "googleapis.com" universe).
|
345
368
|
# @return [::String,nil]
|
369
|
+
# @!attribute [rw] logger
|
370
|
+
# A custom logger to use for request/response debug logging, or the value
|
371
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
372
|
+
# explicitly disable logging.
|
373
|
+
# @return [::Logger,:default,nil]
|
346
374
|
#
|
347
375
|
class Configuration
|
348
376
|
extend ::Gapic::Config
|
@@ -367,6 +395,7 @@ module Google
|
|
367
395
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
368
396
|
config_attr :quota_project, nil, ::String, nil
|
369
397
|
config_attr :universe_domain, nil, ::String, nil
|
398
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
370
399
|
|
371
400
|
# @private
|
372
401
|
def initialize parent_config = nil
|
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# A service handles client event report.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
API_VERSION = ""
|
37
|
+
|
35
38
|
# @private
|
36
39
|
DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$"
|
37
40
|
|
@@ -149,8 +152,28 @@ module Google
|
|
149
152
|
endpoint: @config.endpoint,
|
150
153
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
151
154
|
universe_domain: @config.universe_domain,
|
152
|
-
credentials: credentials
|
155
|
+
credentials: credentials,
|
156
|
+
logger: @config.logger
|
153
157
|
)
|
158
|
+
|
159
|
+
@event_service_stub.logger(stub: true)&.info do |entry|
|
160
|
+
entry.set_system_name
|
161
|
+
entry.set_service
|
162
|
+
entry.message = "Created client for #{entry.service}"
|
163
|
+
entry.set_credentials_fields credentials
|
164
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
165
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
166
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
##
|
171
|
+
# The logger used for request/response debug logging.
|
172
|
+
#
|
173
|
+
# @return [Logger]
|
174
|
+
#
|
175
|
+
def logger
|
176
|
+
@event_service_stub.logger
|
154
177
|
end
|
155
178
|
|
156
179
|
# Service calls
|
@@ -222,12 +245,13 @@ module Google
|
|
222
245
|
# Customize the options with defaults
|
223
246
|
call_metadata = @config.rpcs.create_client_event.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
|
call_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::Talent::V4beta1::VERSION,
|
229
252
|
transports_version_send: [:rest]
|
230
253
|
|
254
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
231
255
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
232
256
|
|
233
257
|
options.apply_defaults timeout: @config.rpcs.create_client_event.timeout,
|
@@ -240,7 +264,6 @@ module Google
|
|
240
264
|
|
241
265
|
@event_service_stub.create_client_event request, options do |result, operation|
|
242
266
|
yield result, operation if block_given?
|
243
|
-
return result
|
244
267
|
end
|
245
268
|
rescue ::Gapic::Rest::Error => e
|
246
269
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -320,6 +343,11 @@ module Google
|
|
320
343
|
# default endpoint URL. The default value of nil uses the environment
|
321
344
|
# universe (usually the default "googleapis.com" universe).
|
322
345
|
# @return [::String,nil]
|
346
|
+
# @!attribute [rw] logger
|
347
|
+
# A custom logger to use for request/response debug logging, or the value
|
348
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
349
|
+
# explicitly disable logging.
|
350
|
+
# @return [::Logger,:default,nil]
|
323
351
|
#
|
324
352
|
class Configuration
|
325
353
|
extend ::Gapic::Config
|
@@ -341,6 +369,7 @@ module Google
|
|
341
369
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
342
370
|
config_attr :quota_project, nil, ::String, nil
|
343
371
|
config_attr :universe_domain, nil, ::String, nil
|
372
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
344
373
|
|
345
374
|
# @private
|
346
375
|
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 create_client_event 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: "create_client_event",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::Talent::V4beta1::ClientEvent.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
|
##
|
@@ -30,6 +30,9 @@ module Google
|
|
30
30
|
# A service handles job management, including job CRUD, enumeration and search.
|
31
31
|
#
|
32
32
|
class Client
|
33
|
+
# @private
|
34
|
+
API_VERSION = ""
|
35
|
+
|
33
36
|
# @private
|
34
37
|
DEFAULT_ENDPOINT_TEMPLATE = "jobs.$UNIVERSE_DOMAIN$"
|
35
38
|
|
@@ -190,8 +193,19 @@ module Google
|
|
190
193
|
universe_domain: @config.universe_domain,
|
191
194
|
channel_args: @config.channel_args,
|
192
195
|
interceptors: @config.interceptors,
|
193
|
-
channel_pool_config: @config.channel_pool
|
196
|
+
channel_pool_config: @config.channel_pool,
|
197
|
+
logger: @config.logger
|
194
198
|
)
|
199
|
+
|
200
|
+
@job_service_stub.stub_logger&.info do |entry|
|
201
|
+
entry.set_system_name
|
202
|
+
entry.set_service
|
203
|
+
entry.message = "Created client for #{entry.service}"
|
204
|
+
entry.set_credentials_fields credentials
|
205
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
206
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
207
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
208
|
+
end
|
195
209
|
end
|
196
210
|
|
197
211
|
##
|
@@ -201,6 +215,15 @@ module Google
|
|
201
215
|
#
|
202
216
|
attr_reader :operations_client
|
203
217
|
|
218
|
+
##
|
219
|
+
# The logger used for request/response debug logging.
|
220
|
+
#
|
221
|
+
# @return [Logger]
|
222
|
+
#
|
223
|
+
def logger
|
224
|
+
@job_service_stub.logger
|
225
|
+
end
|
226
|
+
|
204
227
|
# Service calls
|
205
228
|
|
206
229
|
##
|
@@ -267,10 +290,11 @@ module Google
|
|
267
290
|
# Customize the options with defaults
|
268
291
|
metadata = @config.rpcs.create_job.metadata.to_h
|
269
292
|
|
270
|
-
# Set x-goog-api-client
|
293
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
271
294
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
272
295
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
273
296
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
297
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
274
298
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
275
299
|
|
276
300
|
header_params = {}
|
@@ -291,7 +315,6 @@ module Google
|
|
291
315
|
|
292
316
|
@job_service_stub.call_rpc :create_job, request, options: options do |response, operation|
|
293
317
|
yield response, operation if block_given?
|
294
|
-
return response
|
295
318
|
end
|
296
319
|
rescue ::GRPC::BadStatus => e
|
297
320
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -365,10 +388,11 @@ module Google
|
|
365
388
|
# Customize the options with defaults
|
366
389
|
metadata = @config.rpcs.batch_create_jobs.metadata.to_h
|
367
390
|
|
368
|
-
# Set x-goog-api-client
|
391
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
369
392
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
370
393
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
371
394
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
395
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
372
396
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
373
397
|
|
374
398
|
header_params = {}
|
@@ -390,7 +414,7 @@ module Google
|
|
390
414
|
@job_service_stub.call_rpc :batch_create_jobs, request, options: options do |response, operation|
|
391
415
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
392
416
|
yield response, operation if block_given?
|
393
|
-
|
417
|
+
throw :response, response
|
394
418
|
end
|
395
419
|
rescue ::GRPC::BadStatus => e
|
396
420
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -459,10 +483,11 @@ module Google
|
|
459
483
|
# Customize the options with defaults
|
460
484
|
metadata = @config.rpcs.get_job.metadata.to_h
|
461
485
|
|
462
|
-
# Set x-goog-api-client
|
486
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
463
487
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
464
488
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
465
489
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
490
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
466
491
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
467
492
|
|
468
493
|
header_params = {}
|
@@ -483,7 +508,6 @@ module Google
|
|
483
508
|
|
484
509
|
@job_service_stub.call_rpc :get_job, request, options: options do |response, operation|
|
485
510
|
yield response, operation if block_given?
|
486
|
-
return response
|
487
511
|
end
|
488
512
|
rescue ::GRPC::BadStatus => e
|
489
513
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -557,10 +581,11 @@ module Google
|
|
557
581
|
# Customize the options with defaults
|
558
582
|
metadata = @config.rpcs.update_job.metadata.to_h
|
559
583
|
|
560
|
-
# Set x-goog-api-client
|
584
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
561
585
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
562
586
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
563
587
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
588
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
564
589
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
565
590
|
|
566
591
|
header_params = {}
|
@@ -581,7 +606,6 @@ module Google
|
|
581
606
|
|
582
607
|
@job_service_stub.call_rpc :update_job, request, options: options do |response, operation|
|
583
608
|
yield response, operation if block_given?
|
584
|
-
return response
|
585
609
|
end
|
586
610
|
rescue ::GRPC::BadStatus => e
|
587
611
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -675,10 +699,11 @@ module Google
|
|
675
699
|
# Customize the options with defaults
|
676
700
|
metadata = @config.rpcs.batch_update_jobs.metadata.to_h
|
677
701
|
|
678
|
-
# Set x-goog-api-client
|
702
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
679
703
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
680
704
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
681
705
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
706
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
682
707
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
683
708
|
|
684
709
|
header_params = {}
|
@@ -700,7 +725,7 @@ module Google
|
|
700
725
|
@job_service_stub.call_rpc :batch_update_jobs, request, options: options do |response, operation|
|
701
726
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
702
727
|
yield response, operation if block_given?
|
703
|
-
|
728
|
+
throw :response, response
|
704
729
|
end
|
705
730
|
rescue ::GRPC::BadStatus => e
|
706
731
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -771,10 +796,11 @@ module Google
|
|
771
796
|
# Customize the options with defaults
|
772
797
|
metadata = @config.rpcs.delete_job.metadata.to_h
|
773
798
|
|
774
|
-
# Set x-goog-api-client
|
799
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
775
800
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
776
801
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
777
802
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
803
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
778
804
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
779
805
|
|
780
806
|
header_params = {}
|
@@ -795,7 +821,6 @@ module Google
|
|
795
821
|
|
796
822
|
@job_service_stub.call_rpc :delete_job, request, options: options do |response, operation|
|
797
823
|
yield response, operation if block_given?
|
798
|
-
return response
|
799
824
|
end
|
800
825
|
rescue ::GRPC::BadStatus => e
|
801
826
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -872,10 +897,11 @@ module Google
|
|
872
897
|
# Customize the options with defaults
|
873
898
|
metadata = @config.rpcs.batch_delete_jobs.metadata.to_h
|
874
899
|
|
875
|
-
# Set x-goog-api-client
|
900
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
876
901
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
877
902
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
878
903
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
904
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
879
905
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
880
906
|
|
881
907
|
header_params = {}
|
@@ -896,7 +922,6 @@ module Google
|
|
896
922
|
|
897
923
|
@job_service_stub.call_rpc :batch_delete_jobs, request, options: options do |response, operation|
|
898
924
|
yield response, operation if block_given?
|
899
|
-
return response
|
900
925
|
end
|
901
926
|
rescue ::GRPC::BadStatus => e
|
902
927
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1006,10 +1031,11 @@ module Google
|
|
1006
1031
|
# Customize the options with defaults
|
1007
1032
|
metadata = @config.rpcs.list_jobs.metadata.to_h
|
1008
1033
|
|
1009
|
-
# Set x-goog-api-client
|
1034
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1010
1035
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1011
1036
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1012
1037
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
1038
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1013
1039
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1014
1040
|
|
1015
1041
|
header_params = {}
|
@@ -1031,7 +1057,7 @@ module Google
|
|
1031
1057
|
@job_service_stub.call_rpc :list_jobs, request, options: options do |response, operation|
|
1032
1058
|
response = ::Gapic::PagedEnumerable.new @job_service_stub, :list_jobs, request, response, operation, options
|
1033
1059
|
yield response, operation if block_given?
|
1034
|
-
|
1060
|
+
throw :response, response
|
1035
1061
|
end
|
1036
1062
|
rescue ::GRPC::BadStatus => e
|
1037
1063
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1374,10 +1400,11 @@ module Google
|
|
1374
1400
|
# Customize the options with defaults
|
1375
1401
|
metadata = @config.rpcs.search_jobs.metadata.to_h
|
1376
1402
|
|
1377
|
-
# Set x-goog-api-client
|
1403
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1378
1404
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1379
1405
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1380
1406
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
1407
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1381
1408
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1382
1409
|
|
1383
1410
|
header_params = {}
|
@@ -1398,7 +1425,6 @@ module Google
|
|
1398
1425
|
|
1399
1426
|
@job_service_stub.call_rpc :search_jobs, request, options: options do |response, operation|
|
1400
1427
|
yield response, operation if block_given?
|
1401
|
-
return response
|
1402
1428
|
end
|
1403
1429
|
rescue ::GRPC::BadStatus => e
|
1404
1430
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1746,10 +1772,11 @@ module Google
|
|
1746
1772
|
# Customize the options with defaults
|
1747
1773
|
metadata = @config.rpcs.search_jobs_for_alert.metadata.to_h
|
1748
1774
|
|
1749
|
-
# Set x-goog-api-client
|
1775
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1750
1776
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1751
1777
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1752
1778
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
1779
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1753
1780
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1754
1781
|
|
1755
1782
|
header_params = {}
|
@@ -1770,7 +1797,6 @@ module Google
|
|
1770
1797
|
|
1771
1798
|
@job_service_stub.call_rpc :search_jobs_for_alert, request, options: options do |response, operation|
|
1772
1799
|
yield response, operation if block_given?
|
1773
|
-
return response
|
1774
1800
|
end
|
1775
1801
|
rescue ::GRPC::BadStatus => e
|
1776
1802
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1859,6 +1885,11 @@ module Google
|
|
1859
1885
|
# default endpoint URL. The default value of nil uses the environment
|
1860
1886
|
# universe (usually the default "googleapis.com" universe).
|
1861
1887
|
# @return [::String,nil]
|
1888
|
+
# @!attribute [rw] logger
|
1889
|
+
# A custom logger to use for request/response debug logging, or the value
|
1890
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1891
|
+
# explicitly disable logging.
|
1892
|
+
# @return [::Logger,:default,nil]
|
1862
1893
|
#
|
1863
1894
|
class Configuration
|
1864
1895
|
extend ::Gapic::Config
|
@@ -1883,6 +1914,7 @@ module Google
|
|
1883
1914
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1884
1915
|
config_attr :quota_project, nil, ::String, nil
|
1885
1916
|
config_attr :universe_domain, nil, ::String, nil
|
1917
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1886
1918
|
|
1887
1919
|
# @private
|
1888
1920
|
def initialize parent_config = nil
|