google-cloud-talent 0.9.0 → 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.
- checksums.yaml +4 -4
- data/lib/google/cloud/talent.rb +23 -23
- data/lib/google/cloud/talent/v4beta1.rb +27 -27
- data/lib/google/cloud/talent/v4beta1/application_service_client.rb +82 -42
- data/lib/google/cloud/talent/v4beta1/application_service_client_config.json +9 -9
- data/lib/google/cloud/talent/v4beta1/company_service_client.rb +53 -49
- data/lib/google/cloud/talent/v4beta1/company_service_client_config.json +9 -9
- data/lib/google/cloud/talent/v4beta1/completion_client.rb +5 -1
- data/lib/google/cloud/talent/v4beta1/event_service_client.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/helpers.rb +17 -0
- data/lib/google/cloud/talent/v4beta1/job_service_client.rb +277 -265
- data/lib/google/cloud/talent/v4beta1/job_service_client_config.json +24 -24
- data/lib/google/cloud/talent/v4beta1/profile_service_client.rb +226 -226
- data/lib/google/cloud/talent/v4beta1/profile_service_client_config.json +12 -12
- data/lib/google/cloud/talent/v4beta1/tenant_service_client.rb +41 -41
- data/lib/google/cloud/talent/v4beta1/tenant_service_client_config.json +9 -9
- data/lib/google/cloud/talent/version.rb +1 -1
- metadata +2 -2
@@ -94,6 +94,8 @@ module Google
|
|
94
94
|
private_constant :TENANT_PATH_TEMPLATE
|
95
95
|
|
96
96
|
# Returns a fully-qualified company resource name string.
|
97
|
+
# @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
|
98
|
+
# This helper function will be deleted in the next major version.
|
97
99
|
# @param project [String]
|
98
100
|
# @param tenant [String]
|
99
101
|
# @param company [String]
|
@@ -107,6 +109,8 @@ module Google
|
|
107
109
|
end
|
108
110
|
|
109
111
|
# Returns a fully-qualified company_without_tenant resource name string.
|
112
|
+
# @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
|
113
|
+
# This helper function will be deleted in the next major version.
|
110
114
|
# @param project [String]
|
111
115
|
# @param company [String]
|
112
116
|
# @return [String]
|
@@ -249,6 +253,14 @@ module Google
|
|
249
253
|
&Google::Cloud::Talent::V4beta1::CompanyService::Stub.method(:new)
|
250
254
|
)
|
251
255
|
|
256
|
+
@delete_company = Google::Gax.create_api_call(
|
257
|
+
@company_service_stub.method(:delete_company),
|
258
|
+
defaults["delete_company"],
|
259
|
+
exception_transformer: exception_transformer,
|
260
|
+
params_extractor: proc do |request|
|
261
|
+
{'name' => request.name}
|
262
|
+
end
|
263
|
+
)
|
252
264
|
@create_company = Google::Gax.create_api_call(
|
253
265
|
@company_service_stub.method(:create_company),
|
254
266
|
defaults["create_company"],
|
@@ -273,14 +285,6 @@ module Google
|
|
273
285
|
{'company.name' => request.company.name}
|
274
286
|
end
|
275
287
|
)
|
276
|
-
@delete_company = Google::Gax.create_api_call(
|
277
|
-
@company_service_stub.method(:delete_company),
|
278
|
-
defaults["delete_company"],
|
279
|
-
exception_transformer: exception_transformer,
|
280
|
-
params_extractor: proc do |request|
|
281
|
-
{'name' => request.name}
|
282
|
-
end
|
283
|
-
)
|
284
288
|
@list_companies = Google::Gax.create_api_call(
|
285
289
|
@company_service_stub.method(:list_companies),
|
286
290
|
defaults["list_companies"],
|
@@ -293,6 +297,44 @@ module Google
|
|
293
297
|
|
294
298
|
# Service calls
|
295
299
|
|
300
|
+
# Deletes specified company.
|
301
|
+
# Prerequisite: The company has no jobs associated with it.
|
302
|
+
#
|
303
|
+
# @param name [String]
|
304
|
+
# Required. The resource name of the company to be deleted.
|
305
|
+
#
|
306
|
+
# The format is
|
307
|
+
# "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
|
308
|
+
# example, "projects/foo/tenants/bar/companies/baz".
|
309
|
+
#
|
310
|
+
# If tenant id is unspecified, the default tenant is used, for
|
311
|
+
# example, "projects/foo/companies/bar".
|
312
|
+
# @param options [Google::Gax::CallOptions]
|
313
|
+
# Overrides the default settings for this call, e.g, timeout,
|
314
|
+
# retries, etc.
|
315
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
316
|
+
# @yieldparam result []
|
317
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
318
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
319
|
+
# @example
|
320
|
+
# require "google/cloud/talent"
|
321
|
+
#
|
322
|
+
# company_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
|
323
|
+
# formatted_name = Google::Cloud::Talent::V4beta1::CompanyServiceClient.company_without_tenant_path("[PROJECT]", "[COMPANY]")
|
324
|
+
# company_client.delete_company(formatted_name)
|
325
|
+
|
326
|
+
def delete_company \
|
327
|
+
name,
|
328
|
+
options: nil,
|
329
|
+
&block
|
330
|
+
req = {
|
331
|
+
name: name
|
332
|
+
}.delete_if { |_, v| v.nil? }
|
333
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::DeleteCompanyRequest)
|
334
|
+
@delete_company.call(req, options, &block)
|
335
|
+
nil
|
336
|
+
end
|
337
|
+
|
296
338
|
# Creates a new company entity.
|
297
339
|
#
|
298
340
|
# @param parent [String]
|
@@ -317,7 +359,7 @@ module Google
|
|
317
359
|
# require "google/cloud/talent"
|
318
360
|
#
|
319
361
|
# company_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
|
320
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::CompanyServiceClient.
|
362
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::CompanyServiceClient.project_path("[PROJECT]")
|
321
363
|
#
|
322
364
|
# # TODO: Initialize `company`:
|
323
365
|
# company = {}
|
@@ -359,7 +401,7 @@ module Google
|
|
359
401
|
# require "google/cloud/talent"
|
360
402
|
#
|
361
403
|
# company_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
|
362
|
-
# formatted_name = Google::Cloud::Talent::V4beta1::CompanyServiceClient.
|
404
|
+
# formatted_name = Google::Cloud::Talent::V4beta1::CompanyServiceClient.company_without_tenant_path("[PROJECT]", "[COMPANY]")
|
363
405
|
# response = company_client.get_company(formatted_name)
|
364
406
|
|
365
407
|
def get_company \
|
@@ -419,44 +461,6 @@ module Google
|
|
419
461
|
@update_company.call(req, options, &block)
|
420
462
|
end
|
421
463
|
|
422
|
-
# Deletes specified company.
|
423
|
-
# Prerequisite: The company has no jobs associated with it.
|
424
|
-
#
|
425
|
-
# @param name [String]
|
426
|
-
# Required. The resource name of the company to be deleted.
|
427
|
-
#
|
428
|
-
# The format is
|
429
|
-
# "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
|
430
|
-
# example, "projects/foo/tenants/bar/companies/baz".
|
431
|
-
#
|
432
|
-
# If tenant id is unspecified, the default tenant is used, for
|
433
|
-
# example, "projects/foo/companies/bar".
|
434
|
-
# @param options [Google::Gax::CallOptions]
|
435
|
-
# Overrides the default settings for this call, e.g, timeout,
|
436
|
-
# retries, etc.
|
437
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
438
|
-
# @yieldparam result []
|
439
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
440
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
441
|
-
# @example
|
442
|
-
# require "google/cloud/talent"
|
443
|
-
#
|
444
|
-
# company_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
|
445
|
-
# formatted_name = Google::Cloud::Talent::V4beta1::CompanyServiceClient.company_path("[PROJECT]", "[TENANT]", "[COMPANY]")
|
446
|
-
# company_client.delete_company(formatted_name)
|
447
|
-
|
448
|
-
def delete_company \
|
449
|
-
name,
|
450
|
-
options: nil,
|
451
|
-
&block
|
452
|
-
req = {
|
453
|
-
name: name
|
454
|
-
}.delete_if { |_, v| v.nil? }
|
455
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::DeleteCompanyRequest)
|
456
|
-
@delete_company.call(req, options, &block)
|
457
|
-
nil
|
458
|
-
end
|
459
|
-
|
460
464
|
# Lists all companies associated with the project.
|
461
465
|
#
|
462
466
|
# @param parent [String]
|
@@ -496,7 +500,7 @@ module Google
|
|
496
500
|
# require "google/cloud/talent"
|
497
501
|
#
|
498
502
|
# company_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
|
499
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::CompanyServiceClient.
|
503
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::CompanyServiceClient.project_path("[PROJECT]")
|
500
504
|
#
|
501
505
|
# # Iterate over all results.
|
502
506
|
# company_client.list_companies(formatted_parent).each do |element|
|
@@ -20,28 +20,28 @@
|
|
20
20
|
}
|
21
21
|
},
|
22
22
|
"methods": {
|
23
|
+
"DeleteCompany": {
|
24
|
+
"timeout_millis": 60000,
|
25
|
+
"retry_codes_name": "idempotent",
|
26
|
+
"retry_params_name": "default"
|
27
|
+
},
|
23
28
|
"CreateCompany": {
|
24
|
-
"timeout_millis":
|
29
|
+
"timeout_millis": 60000,
|
25
30
|
"retry_codes_name": "non_idempotent",
|
26
31
|
"retry_params_name": "default"
|
27
32
|
},
|
28
33
|
"GetCompany": {
|
29
|
-
"timeout_millis":
|
34
|
+
"timeout_millis": 60000,
|
30
35
|
"retry_codes_name": "idempotent",
|
31
36
|
"retry_params_name": "default"
|
32
37
|
},
|
33
38
|
"UpdateCompany": {
|
34
|
-
"timeout_millis":
|
39
|
+
"timeout_millis": 60000,
|
35
40
|
"retry_codes_name": "non_idempotent",
|
36
41
|
"retry_params_name": "default"
|
37
42
|
},
|
38
|
-
"DeleteCompany": {
|
39
|
-
"timeout_millis": 30000,
|
40
|
-
"retry_codes_name": "idempotent",
|
41
|
-
"retry_params_name": "default"
|
42
|
-
},
|
43
43
|
"ListCompanies": {
|
44
|
-
"timeout_millis":
|
44
|
+
"timeout_millis": 60000,
|
45
45
|
"retry_codes_name": "idempotent",
|
46
46
|
"retry_params_name": "default"
|
47
47
|
}
|
@@ -85,6 +85,8 @@ module Google
|
|
85
85
|
private_constant :TENANT_PATH_TEMPLATE
|
86
86
|
|
87
87
|
# Returns a fully-qualified company resource name string.
|
88
|
+
# @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
|
89
|
+
# This helper function will be deleted in the next major version.
|
88
90
|
# @param project [String]
|
89
91
|
# @param tenant [String]
|
90
92
|
# @param company [String]
|
@@ -98,6 +100,8 @@ module Google
|
|
98
100
|
end
|
99
101
|
|
100
102
|
# Returns a fully-qualified company_without_tenant resource name string.
|
103
|
+
# @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
|
104
|
+
# This helper function will be deleted in the next major version.
|
101
105
|
# @param project [String]
|
102
106
|
# @param company [String]
|
103
107
|
# @return [String]
|
@@ -302,7 +306,7 @@ module Google
|
|
302
306
|
# require "google/cloud/talent"
|
303
307
|
#
|
304
308
|
# completion_client = Google::Cloud::Talent::Completion.new(version: :v4beta1)
|
305
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::CompletionClient.
|
309
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::CompletionClient.project_path("[PROJECT]")
|
306
310
|
#
|
307
311
|
# # TODO: Initialize `query`:
|
308
312
|
# query = ''
|
@@ -246,7 +246,7 @@ module Google
|
|
246
246
|
# require "google/cloud/talent"
|
247
247
|
#
|
248
248
|
# event_client = Google::Cloud::Talent::Event.new(version: :v4beta1)
|
249
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::EventServiceClient.
|
249
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::EventServiceClient.project_path("[PROJECT]")
|
250
250
|
#
|
251
251
|
# # TODO: Initialize `client_event`:
|
252
252
|
# client_event = {}
|
@@ -26,6 +26,23 @@ module Google
|
|
26
26
|
self.class.application_path project, tenant, profile, application
|
27
27
|
end
|
28
28
|
|
29
|
+
# Alias for Google::Cloud::Talent::V4beta1::ApplicationServiceClient.company_path.
|
30
|
+
# @param project [String]
|
31
|
+
# @param tenant [String]
|
32
|
+
# @param company [String]
|
33
|
+
# @return [String]
|
34
|
+
def company_path project, tenant, company
|
35
|
+
self.class.company_path project, tenant, company
|
36
|
+
end
|
37
|
+
|
38
|
+
# Alias for Google::Cloud::Talent::V4beta1::ApplicationServiceClient.company_without_tenant_path.
|
39
|
+
# @param project [String]
|
40
|
+
# @param company [String]
|
41
|
+
# @return [String]
|
42
|
+
def company_without_tenant_path project, company
|
43
|
+
self.class.company_without_tenant_path project, company
|
44
|
+
end
|
45
|
+
|
29
46
|
# Alias for Google::Cloud::Talent::V4beta1::ApplicationServiceClient.profile_path.
|
30
47
|
# @param project [String]
|
31
48
|
# @param tenant [String]
|
@@ -120,6 +120,8 @@ module Google
|
|
120
120
|
private_constant :TENANT_PATH_TEMPLATE
|
121
121
|
|
122
122
|
# Returns a fully-qualified company resource name string.
|
123
|
+
# @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
|
124
|
+
# This helper function will be deleted in the next major version.
|
123
125
|
# @param project [String]
|
124
126
|
# @param tenant [String]
|
125
127
|
# @param company [String]
|
@@ -133,6 +135,8 @@ module Google
|
|
133
135
|
end
|
134
136
|
|
135
137
|
# Returns a fully-qualified company_without_tenant resource name string.
|
138
|
+
# @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
|
139
|
+
# This helper function will be deleted in the next major version.
|
136
140
|
# @param project [String]
|
137
141
|
# @param company [String]
|
138
142
|
# @return [String]
|
@@ -144,6 +148,8 @@ module Google
|
|
144
148
|
end
|
145
149
|
|
146
150
|
# Returns a fully-qualified job resource name string.
|
151
|
+
# @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
|
152
|
+
# This helper function will be deleted in the next major version.
|
147
153
|
# @param project [String]
|
148
154
|
# @param tenant [String]
|
149
155
|
# @param jobs [String]
|
@@ -157,6 +163,8 @@ module Google
|
|
157
163
|
end
|
158
164
|
|
159
165
|
# Returns a fully-qualified job_without_tenant resource name string.
|
166
|
+
# @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
|
167
|
+
# This helper function will be deleted in the next major version.
|
160
168
|
# @param project [String]
|
161
169
|
# @param jobs [String]
|
162
170
|
# @return [String]
|
@@ -311,6 +319,14 @@ module Google
|
|
311
319
|
&Google::Cloud::Talent::V4beta1::JobService::Stub.method(:new)
|
312
320
|
)
|
313
321
|
|
322
|
+
@delete_job = Google::Gax.create_api_call(
|
323
|
+
@job_service_stub.method(:delete_job),
|
324
|
+
defaults["delete_job"],
|
325
|
+
exception_transformer: exception_transformer,
|
326
|
+
params_extractor: proc do |request|
|
327
|
+
{'name' => request.name}
|
328
|
+
end
|
329
|
+
)
|
314
330
|
@create_job = Google::Gax.create_api_call(
|
315
331
|
@job_service_stub.method(:create_job),
|
316
332
|
defaults["create_job"],
|
@@ -319,6 +335,14 @@ module Google
|
|
319
335
|
{'parent' => request.parent}
|
320
336
|
end
|
321
337
|
)
|
338
|
+
@batch_create_jobs = Google::Gax.create_api_call(
|
339
|
+
@job_service_stub.method(:batch_create_jobs),
|
340
|
+
defaults["batch_create_jobs"],
|
341
|
+
exception_transformer: exception_transformer,
|
342
|
+
params_extractor: proc do |request|
|
343
|
+
{'parent' => request.parent}
|
344
|
+
end
|
345
|
+
)
|
322
346
|
@get_job = Google::Gax.create_api_call(
|
323
347
|
@job_service_stub.method(:get_job),
|
324
348
|
defaults["get_job"],
|
@@ -335,25 +359,25 @@ module Google
|
|
335
359
|
{'job.name' => request.job.name}
|
336
360
|
end
|
337
361
|
)
|
338
|
-
@
|
339
|
-
@job_service_stub.method(:
|
340
|
-
defaults["
|
362
|
+
@batch_update_jobs = Google::Gax.create_api_call(
|
363
|
+
@job_service_stub.method(:batch_update_jobs),
|
364
|
+
defaults["batch_update_jobs"],
|
341
365
|
exception_transformer: exception_transformer,
|
342
366
|
params_extractor: proc do |request|
|
343
|
-
{'
|
367
|
+
{'parent' => request.parent}
|
344
368
|
end
|
345
369
|
)
|
346
|
-
@
|
347
|
-
@job_service_stub.method(:
|
348
|
-
defaults["
|
370
|
+
@batch_delete_jobs = Google::Gax.create_api_call(
|
371
|
+
@job_service_stub.method(:batch_delete_jobs),
|
372
|
+
defaults["batch_delete_jobs"],
|
349
373
|
exception_transformer: exception_transformer,
|
350
374
|
params_extractor: proc do |request|
|
351
375
|
{'parent' => request.parent}
|
352
376
|
end
|
353
377
|
)
|
354
|
-
@
|
355
|
-
@job_service_stub.method(:
|
356
|
-
defaults["
|
378
|
+
@list_jobs = Google::Gax.create_api_call(
|
379
|
+
@job_service_stub.method(:list_jobs),
|
380
|
+
defaults["list_jobs"],
|
357
381
|
exception_transformer: exception_transformer,
|
358
382
|
params_extractor: proc do |request|
|
359
383
|
{'parent' => request.parent}
|
@@ -375,26 +399,52 @@ module Google
|
|
375
399
|
{'parent' => request.parent}
|
376
400
|
end
|
377
401
|
)
|
378
|
-
@batch_create_jobs = Google::Gax.create_api_call(
|
379
|
-
@job_service_stub.method(:batch_create_jobs),
|
380
|
-
defaults["batch_create_jobs"],
|
381
|
-
exception_transformer: exception_transformer,
|
382
|
-
params_extractor: proc do |request|
|
383
|
-
{'parent' => request.parent}
|
384
|
-
end
|
385
|
-
)
|
386
|
-
@batch_update_jobs = Google::Gax.create_api_call(
|
387
|
-
@job_service_stub.method(:batch_update_jobs),
|
388
|
-
defaults["batch_update_jobs"],
|
389
|
-
exception_transformer: exception_transformer,
|
390
|
-
params_extractor: proc do |request|
|
391
|
-
{'parent' => request.parent}
|
392
|
-
end
|
393
|
-
)
|
394
402
|
end
|
395
403
|
|
396
404
|
# Service calls
|
397
405
|
|
406
|
+
# Deletes the specified job.
|
407
|
+
#
|
408
|
+
# Typically, the job becomes unsearchable within 10 seconds, but it may take
|
409
|
+
# up to 5 minutes.
|
410
|
+
#
|
411
|
+
# @param name [String]
|
412
|
+
# Required. The resource name of the job to be deleted.
|
413
|
+
#
|
414
|
+
# The format is
|
415
|
+
# "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
|
416
|
+
# example, "projects/foo/tenants/bar/jobs/baz".
|
417
|
+
#
|
418
|
+
# If tenant id is unspecified, the default tenant is used. For
|
419
|
+
# example, "projects/foo/jobs/bar".
|
420
|
+
# @param options [Google::Gax::CallOptions]
|
421
|
+
# Overrides the default settings for this call, e.g, timeout,
|
422
|
+
# retries, etc.
|
423
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
424
|
+
# @yieldparam result []
|
425
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
426
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
427
|
+
# @example
|
428
|
+
# require "google/cloud/talent"
|
429
|
+
#
|
430
|
+
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
431
|
+
#
|
432
|
+
# # TODO: Initialize `name`:
|
433
|
+
# name = ''
|
434
|
+
# job_client.delete_job(name)
|
435
|
+
|
436
|
+
def delete_job \
|
437
|
+
name,
|
438
|
+
options: nil,
|
439
|
+
&block
|
440
|
+
req = {
|
441
|
+
name: name
|
442
|
+
}.delete_if { |_, v| v.nil? }
|
443
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::DeleteJobRequest)
|
444
|
+
@delete_job.call(req, options, &block)
|
445
|
+
nil
|
446
|
+
end
|
447
|
+
|
398
448
|
# Creates a new job.
|
399
449
|
#
|
400
450
|
# Typically, the job becomes searchable within 10 seconds, but it may take
|
@@ -422,7 +472,7 @@ module Google
|
|
422
472
|
# require "google/cloud/talent"
|
423
473
|
#
|
424
474
|
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
425
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.
|
475
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.project_path("[PROJECT]")
|
426
476
|
#
|
427
477
|
# # TODO: Initialize `job`:
|
428
478
|
# job = {}
|
@@ -441,6 +491,79 @@ module Google
|
|
441
491
|
@create_job.call(req, options, &block)
|
442
492
|
end
|
443
493
|
|
494
|
+
# Begins executing a batch create jobs operation.
|
495
|
+
#
|
496
|
+
# @param parent [String]
|
497
|
+
# Required. The resource name of the tenant under which the job is created.
|
498
|
+
#
|
499
|
+
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
500
|
+
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
501
|
+
# is created. For example, "projects/foo".
|
502
|
+
# @param jobs [Array<Google::Cloud::Talent::V4beta1::Job | Hash>]
|
503
|
+
# Required. The jobs to be created.
|
504
|
+
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Job`
|
505
|
+
# can also be provided.
|
506
|
+
# @param options [Google::Gax::CallOptions]
|
507
|
+
# Overrides the default settings for this call, e.g, timeout,
|
508
|
+
# retries, etc.
|
509
|
+
# @return [Google::Gax::Operation]
|
510
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
511
|
+
# @example
|
512
|
+
# require "google/cloud/talent"
|
513
|
+
#
|
514
|
+
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
515
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.project_path("[PROJECT]")
|
516
|
+
#
|
517
|
+
# # TODO: Initialize `jobs`:
|
518
|
+
# jobs = []
|
519
|
+
#
|
520
|
+
# # Register a callback during the method call.
|
521
|
+
# operation = job_client.batch_create_jobs(formatted_parent, jobs) do |op|
|
522
|
+
# raise op.results.message if op.error?
|
523
|
+
# op_results = op.results
|
524
|
+
# # Process the results.
|
525
|
+
#
|
526
|
+
# metadata = op.metadata
|
527
|
+
# # Process the metadata.
|
528
|
+
# end
|
529
|
+
#
|
530
|
+
# # Or use the return value to register a callback.
|
531
|
+
# operation.on_done do |op|
|
532
|
+
# raise op.results.message if op.error?
|
533
|
+
# op_results = op.results
|
534
|
+
# # Process the results.
|
535
|
+
#
|
536
|
+
# metadata = op.metadata
|
537
|
+
# # Process the metadata.
|
538
|
+
# end
|
539
|
+
#
|
540
|
+
# # Manually reload the operation.
|
541
|
+
# operation.reload!
|
542
|
+
#
|
543
|
+
# # Or block until the operation completes, triggering callbacks on
|
544
|
+
# # completion.
|
545
|
+
# operation.wait_until_done!
|
546
|
+
|
547
|
+
def batch_create_jobs \
|
548
|
+
parent,
|
549
|
+
jobs,
|
550
|
+
options: nil
|
551
|
+
req = {
|
552
|
+
parent: parent,
|
553
|
+
jobs: jobs
|
554
|
+
}.delete_if { |_, v| v.nil? }
|
555
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest)
|
556
|
+
operation = Google::Gax::Operation.new(
|
557
|
+
@batch_create_jobs.call(req, options),
|
558
|
+
@operations_client,
|
559
|
+
Google::Cloud::Talent::V4beta1::JobOperationResult,
|
560
|
+
Google::Cloud::Talent::V4beta1::BatchOperationMetadata,
|
561
|
+
call_options: options
|
562
|
+
)
|
563
|
+
operation.on_done { |operation| yield(operation) } if block_given?
|
564
|
+
operation
|
565
|
+
end
|
566
|
+
|
444
567
|
# Retrieves the specified job, whose status is OPEN or recently EXPIRED
|
445
568
|
# within the last 90 days.
|
446
569
|
#
|
@@ -465,8 +588,10 @@ module Google
|
|
465
588
|
# require "google/cloud/talent"
|
466
589
|
#
|
467
590
|
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
468
|
-
#
|
469
|
-
#
|
591
|
+
#
|
592
|
+
# # TODO: Initialize `name`:
|
593
|
+
# name = ''
|
594
|
+
# response = job_client.get_job(name)
|
470
595
|
|
471
596
|
def get_job \
|
472
597
|
name,
|
@@ -528,20 +653,118 @@ module Google
|
|
528
653
|
@update_job.call(req, options, &block)
|
529
654
|
end
|
530
655
|
|
531
|
-
#
|
656
|
+
# Begins executing a batch update jobs operation.
|
532
657
|
#
|
533
|
-
#
|
534
|
-
#
|
658
|
+
# @param parent [String]
|
659
|
+
# Required. The resource name of the tenant under which the job is created.
|
535
660
|
#
|
536
|
-
#
|
537
|
-
#
|
661
|
+
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
662
|
+
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
663
|
+
# is created. For example, "projects/foo".
|
664
|
+
# @param jobs [Array<Google::Cloud::Talent::V4beta1::Job | Hash>]
|
665
|
+
# Required. The jobs to be updated.
|
666
|
+
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Job`
|
667
|
+
# can also be provided.
|
668
|
+
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
669
|
+
# Strongly recommended for the best service experience. Be aware that it will
|
670
|
+
# also increase latency when checking the status of a batch operation.
|
538
671
|
#
|
539
|
-
#
|
540
|
-
#
|
541
|
-
# example, "projects/foo/tenants/bar/jobs/baz".
|
672
|
+
# If {Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} is provided, only the specified fields in
|
673
|
+
# {Google::Cloud::Talent::V4beta1::Job Job} are updated. Otherwise all the fields are updated.
|
542
674
|
#
|
543
|
-
#
|
544
|
-
#
|
675
|
+
# A field mask to restrict the fields that are updated. Only
|
676
|
+
# top level fields of {Google::Cloud::Talent::V4beta1::Job Job} are supported.
|
677
|
+
#
|
678
|
+
# If {Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} is provided, The {Google::Cloud::Talent::V4beta1::Job Job} inside
|
679
|
+
# {Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult JobResult}
|
680
|
+
# will only contains fields that is updated, plus the Id of the Job.
|
681
|
+
# Otherwise, {Google::Cloud::Talent::V4beta1::Job Job} will include all fields, which can yield a very
|
682
|
+
# large response.
|
683
|
+
# A hash of the same form as `Google::Protobuf::FieldMask`
|
684
|
+
# can also be provided.
|
685
|
+
# @param options [Google::Gax::CallOptions]
|
686
|
+
# Overrides the default settings for this call, e.g, timeout,
|
687
|
+
# retries, etc.
|
688
|
+
# @return [Google::Gax::Operation]
|
689
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
690
|
+
# @example
|
691
|
+
# require "google/cloud/talent"
|
692
|
+
#
|
693
|
+
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
694
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.project_path("[PROJECT]")
|
695
|
+
#
|
696
|
+
# # TODO: Initialize `jobs`:
|
697
|
+
# jobs = []
|
698
|
+
#
|
699
|
+
# # Register a callback during the method call.
|
700
|
+
# operation = job_client.batch_update_jobs(formatted_parent, jobs) do |op|
|
701
|
+
# raise op.results.message if op.error?
|
702
|
+
# op_results = op.results
|
703
|
+
# # Process the results.
|
704
|
+
#
|
705
|
+
# metadata = op.metadata
|
706
|
+
# # Process the metadata.
|
707
|
+
# end
|
708
|
+
#
|
709
|
+
# # Or use the return value to register a callback.
|
710
|
+
# operation.on_done do |op|
|
711
|
+
# raise op.results.message if op.error?
|
712
|
+
# op_results = op.results
|
713
|
+
# # Process the results.
|
714
|
+
#
|
715
|
+
# metadata = op.metadata
|
716
|
+
# # Process the metadata.
|
717
|
+
# end
|
718
|
+
#
|
719
|
+
# # Manually reload the operation.
|
720
|
+
# operation.reload!
|
721
|
+
#
|
722
|
+
# # Or block until the operation completes, triggering callbacks on
|
723
|
+
# # completion.
|
724
|
+
# operation.wait_until_done!
|
725
|
+
|
726
|
+
def batch_update_jobs \
|
727
|
+
parent,
|
728
|
+
jobs,
|
729
|
+
update_mask: nil,
|
730
|
+
options: nil
|
731
|
+
req = {
|
732
|
+
parent: parent,
|
733
|
+
jobs: jobs,
|
734
|
+
update_mask: update_mask
|
735
|
+
}.delete_if { |_, v| v.nil? }
|
736
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest)
|
737
|
+
operation = Google::Gax::Operation.new(
|
738
|
+
@batch_update_jobs.call(req, options),
|
739
|
+
@operations_client,
|
740
|
+
Google::Cloud::Talent::V4beta1::JobOperationResult,
|
741
|
+
Google::Cloud::Talent::V4beta1::BatchOperationMetadata,
|
742
|
+
call_options: options
|
743
|
+
)
|
744
|
+
operation.on_done { |operation| yield(operation) } if block_given?
|
745
|
+
operation
|
746
|
+
end
|
747
|
+
|
748
|
+
# Deletes a list of {Google::Cloud::Talent::V4beta1::Job Job}s by filter.
|
749
|
+
#
|
750
|
+
# @param parent [String]
|
751
|
+
# Required. The resource name of the tenant under which the job is created.
|
752
|
+
#
|
753
|
+
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
754
|
+
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
755
|
+
# is created. For example, "projects/foo".
|
756
|
+
# @param filter [String]
|
757
|
+
# Required. The filter string specifies the jobs to be deleted.
|
758
|
+
#
|
759
|
+
# Supported operator: =, AND
|
760
|
+
#
|
761
|
+
# The fields eligible for filtering are:
|
762
|
+
#
|
763
|
+
# * `companyName` (Required)
|
764
|
+
# * `requisitionId` (Required)
|
765
|
+
#
|
766
|
+
# Sample Query: companyName = "projects/foo/companies/bar" AND
|
767
|
+
# requisitionId = "req-1"
|
545
768
|
# @param options [Google::Gax::CallOptions]
|
546
769
|
# Overrides the default settings for this call, e.g, timeout,
|
547
770
|
# retries, etc.
|
@@ -553,18 +776,23 @@ module Google
|
|
553
776
|
# require "google/cloud/talent"
|
554
777
|
#
|
555
778
|
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
556
|
-
#
|
557
|
-
#
|
779
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.project_path("[PROJECT]")
|
780
|
+
#
|
781
|
+
# # TODO: Initialize `filter`:
|
782
|
+
# filter = ''
|
783
|
+
# job_client.batch_delete_jobs(formatted_parent, filter)
|
558
784
|
|
559
|
-
def
|
560
|
-
|
785
|
+
def batch_delete_jobs \
|
786
|
+
parent,
|
787
|
+
filter,
|
561
788
|
options: nil,
|
562
789
|
&block
|
563
790
|
req = {
|
564
|
-
|
791
|
+
parent: parent,
|
792
|
+
filter: filter
|
565
793
|
}.delete_if { |_, v| v.nil? }
|
566
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::
|
567
|
-
@
|
794
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest)
|
795
|
+
@batch_delete_jobs.call(req, options, &block)
|
568
796
|
nil
|
569
797
|
end
|
570
798
|
|
@@ -621,7 +849,7 @@ module Google
|
|
621
849
|
# require "google/cloud/talent"
|
622
850
|
#
|
623
851
|
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
624
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.
|
852
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.project_path("[PROJECT]")
|
625
853
|
#
|
626
854
|
# # TODO: Initialize `filter`:
|
627
855
|
# filter = ''
|
@@ -656,57 +884,6 @@ module Google
|
|
656
884
|
@list_jobs.call(req, options, &block)
|
657
885
|
end
|
658
886
|
|
659
|
-
# Deletes a list of {Google::Cloud::Talent::V4beta1::Job Job}s by filter.
|
660
|
-
#
|
661
|
-
# @param parent [String]
|
662
|
-
# Required. The resource name of the tenant under which the job is created.
|
663
|
-
#
|
664
|
-
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
665
|
-
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
666
|
-
# is created. For example, "projects/foo".
|
667
|
-
# @param filter [String]
|
668
|
-
# Required. The filter string specifies the jobs to be deleted.
|
669
|
-
#
|
670
|
-
# Supported operator: =, AND
|
671
|
-
#
|
672
|
-
# The fields eligible for filtering are:
|
673
|
-
#
|
674
|
-
# * `companyName` (Required)
|
675
|
-
# * `requisitionId` (Required)
|
676
|
-
#
|
677
|
-
# Sample Query: companyName = "projects/foo/companies/bar" AND
|
678
|
-
# requisitionId = "req-1"
|
679
|
-
# @param options [Google::Gax::CallOptions]
|
680
|
-
# Overrides the default settings for this call, e.g, timeout,
|
681
|
-
# retries, etc.
|
682
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
683
|
-
# @yieldparam result []
|
684
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
685
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
686
|
-
# @example
|
687
|
-
# require "google/cloud/talent"
|
688
|
-
#
|
689
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
690
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.tenant_path("[PROJECT]", "[TENANT]")
|
691
|
-
#
|
692
|
-
# # TODO: Initialize `filter`:
|
693
|
-
# filter = ''
|
694
|
-
# job_client.batch_delete_jobs(formatted_parent, filter)
|
695
|
-
|
696
|
-
def batch_delete_jobs \
|
697
|
-
parent,
|
698
|
-
filter,
|
699
|
-
options: nil,
|
700
|
-
&block
|
701
|
-
req = {
|
702
|
-
parent: parent,
|
703
|
-
filter: filter
|
704
|
-
}.delete_if { |_, v| v.nil? }
|
705
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::BatchDeleteJobsRequest)
|
706
|
-
@batch_delete_jobs.call(req, options, &block)
|
707
|
-
nil
|
708
|
-
end
|
709
|
-
|
710
887
|
# Searches for jobs using the provided {Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}.
|
711
888
|
#
|
712
889
|
# This call constrains the {Google::Cloud::Talent::V4beta1::Job#visibility visibility} of jobs
|
@@ -965,7 +1142,7 @@ module Google
|
|
965
1142
|
# require "google/cloud/talent"
|
966
1143
|
#
|
967
1144
|
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
968
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.
|
1145
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.project_path("[PROJECT]")
|
969
1146
|
#
|
970
1147
|
# # TODO: Initialize `request_metadata`:
|
971
1148
|
# request_metadata = {}
|
@@ -1283,7 +1460,7 @@ module Google
|
|
1283
1460
|
# require "google/cloud/talent"
|
1284
1461
|
#
|
1285
1462
|
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
1286
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.
|
1463
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.project_path("[PROJECT]")
|
1287
1464
|
#
|
1288
1465
|
# # TODO: Initialize `request_metadata`:
|
1289
1466
|
# request_metadata = {}
|
@@ -1337,171 +1514,6 @@ module Google
|
|
1337
1514
|
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::SearchJobsRequest)
|
1338
1515
|
@search_jobs_for_alert.call(req, options, &block)
|
1339
1516
|
end
|
1340
|
-
|
1341
|
-
# Begins executing a batch create jobs operation.
|
1342
|
-
#
|
1343
|
-
# @param parent [String]
|
1344
|
-
# Required. The resource name of the tenant under which the job is created.
|
1345
|
-
#
|
1346
|
-
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
1347
|
-
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
1348
|
-
# is created. For example, "projects/foo".
|
1349
|
-
# @param jobs [Array<Google::Cloud::Talent::V4beta1::Job | Hash>]
|
1350
|
-
# Required. The jobs to be created.
|
1351
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Job`
|
1352
|
-
# can also be provided.
|
1353
|
-
# @param options [Google::Gax::CallOptions]
|
1354
|
-
# Overrides the default settings for this call, e.g, timeout,
|
1355
|
-
# retries, etc.
|
1356
|
-
# @return [Google::Gax::Operation]
|
1357
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1358
|
-
# @example
|
1359
|
-
# require "google/cloud/talent"
|
1360
|
-
#
|
1361
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
1362
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.tenant_path("[PROJECT]", "[TENANT]")
|
1363
|
-
#
|
1364
|
-
# # TODO: Initialize `jobs`:
|
1365
|
-
# jobs = []
|
1366
|
-
#
|
1367
|
-
# # Register a callback during the method call.
|
1368
|
-
# operation = job_client.batch_create_jobs(formatted_parent, jobs) do |op|
|
1369
|
-
# raise op.results.message if op.error?
|
1370
|
-
# op_results = op.results
|
1371
|
-
# # Process the results.
|
1372
|
-
#
|
1373
|
-
# metadata = op.metadata
|
1374
|
-
# # Process the metadata.
|
1375
|
-
# end
|
1376
|
-
#
|
1377
|
-
# # Or use the return value to register a callback.
|
1378
|
-
# operation.on_done do |op|
|
1379
|
-
# raise op.results.message if op.error?
|
1380
|
-
# op_results = op.results
|
1381
|
-
# # Process the results.
|
1382
|
-
#
|
1383
|
-
# metadata = op.metadata
|
1384
|
-
# # Process the metadata.
|
1385
|
-
# end
|
1386
|
-
#
|
1387
|
-
# # Manually reload the operation.
|
1388
|
-
# operation.reload!
|
1389
|
-
#
|
1390
|
-
# # Or block until the operation completes, triggering callbacks on
|
1391
|
-
# # completion.
|
1392
|
-
# operation.wait_until_done!
|
1393
|
-
|
1394
|
-
def batch_create_jobs \
|
1395
|
-
parent,
|
1396
|
-
jobs,
|
1397
|
-
options: nil
|
1398
|
-
req = {
|
1399
|
-
parent: parent,
|
1400
|
-
jobs: jobs
|
1401
|
-
}.delete_if { |_, v| v.nil? }
|
1402
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest)
|
1403
|
-
operation = Google::Gax::Operation.new(
|
1404
|
-
@batch_create_jobs.call(req, options),
|
1405
|
-
@operations_client,
|
1406
|
-
Google::Cloud::Talent::V4beta1::JobOperationResult,
|
1407
|
-
Google::Cloud::Talent::V4beta1::BatchOperationMetadata,
|
1408
|
-
call_options: options
|
1409
|
-
)
|
1410
|
-
operation.on_done { |operation| yield(operation) } if block_given?
|
1411
|
-
operation
|
1412
|
-
end
|
1413
|
-
|
1414
|
-
# Begins executing a batch update jobs operation.
|
1415
|
-
#
|
1416
|
-
# @param parent [String]
|
1417
|
-
# Required. The resource name of the tenant under which the job is created.
|
1418
|
-
#
|
1419
|
-
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
1420
|
-
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
1421
|
-
# is created. For example, "projects/foo".
|
1422
|
-
# @param jobs [Array<Google::Cloud::Talent::V4beta1::Job | Hash>]
|
1423
|
-
# Required. The jobs to be updated.
|
1424
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Job`
|
1425
|
-
# can also be provided.
|
1426
|
-
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
1427
|
-
# Strongly recommended for the best service experience. Be aware that it will
|
1428
|
-
# also increase latency when checking the status of a batch operation.
|
1429
|
-
#
|
1430
|
-
# If {Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} is provided, only the specified fields in
|
1431
|
-
# {Google::Cloud::Talent::V4beta1::Job Job} are updated. Otherwise all the fields are updated.
|
1432
|
-
#
|
1433
|
-
# A field mask to restrict the fields that are updated. Only
|
1434
|
-
# top level fields of {Google::Cloud::Talent::V4beta1::Job Job} are supported.
|
1435
|
-
#
|
1436
|
-
# If {Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask} is provided, The {Google::Cloud::Talent::V4beta1::Job Job} inside
|
1437
|
-
# {Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult JobResult}
|
1438
|
-
# will only contains fields that is updated, plus the Id of the Job.
|
1439
|
-
# Otherwise, {Google::Cloud::Talent::V4beta1::Job Job} will include all fields, which can yield a very
|
1440
|
-
# large response.
|
1441
|
-
# A hash of the same form as `Google::Protobuf::FieldMask`
|
1442
|
-
# can also be provided.
|
1443
|
-
# @param options [Google::Gax::CallOptions]
|
1444
|
-
# Overrides the default settings for this call, e.g, timeout,
|
1445
|
-
# retries, etc.
|
1446
|
-
# @return [Google::Gax::Operation]
|
1447
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1448
|
-
# @example
|
1449
|
-
# require "google/cloud/talent"
|
1450
|
-
#
|
1451
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
1452
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.tenant_path("[PROJECT]", "[TENANT]")
|
1453
|
-
#
|
1454
|
-
# # TODO: Initialize `jobs`:
|
1455
|
-
# jobs = []
|
1456
|
-
#
|
1457
|
-
# # Register a callback during the method call.
|
1458
|
-
# operation = job_client.batch_update_jobs(formatted_parent, jobs) do |op|
|
1459
|
-
# raise op.results.message if op.error?
|
1460
|
-
# op_results = op.results
|
1461
|
-
# # Process the results.
|
1462
|
-
#
|
1463
|
-
# metadata = op.metadata
|
1464
|
-
# # Process the metadata.
|
1465
|
-
# end
|
1466
|
-
#
|
1467
|
-
# # Or use the return value to register a callback.
|
1468
|
-
# operation.on_done do |op|
|
1469
|
-
# raise op.results.message if op.error?
|
1470
|
-
# op_results = op.results
|
1471
|
-
# # Process the results.
|
1472
|
-
#
|
1473
|
-
# metadata = op.metadata
|
1474
|
-
# # Process the metadata.
|
1475
|
-
# end
|
1476
|
-
#
|
1477
|
-
# # Manually reload the operation.
|
1478
|
-
# operation.reload!
|
1479
|
-
#
|
1480
|
-
# # Or block until the operation completes, triggering callbacks on
|
1481
|
-
# # completion.
|
1482
|
-
# operation.wait_until_done!
|
1483
|
-
|
1484
|
-
def batch_update_jobs \
|
1485
|
-
parent,
|
1486
|
-
jobs,
|
1487
|
-
update_mask: nil,
|
1488
|
-
options: nil
|
1489
|
-
req = {
|
1490
|
-
parent: parent,
|
1491
|
-
jobs: jobs,
|
1492
|
-
update_mask: update_mask
|
1493
|
-
}.delete_if { |_, v| v.nil? }
|
1494
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest)
|
1495
|
-
operation = Google::Gax::Operation.new(
|
1496
|
-
@batch_update_jobs.call(req, options),
|
1497
|
-
@operations_client,
|
1498
|
-
Google::Cloud::Talent::V4beta1::JobOperationResult,
|
1499
|
-
Google::Cloud::Talent::V4beta1::BatchOperationMetadata,
|
1500
|
-
call_options: options
|
1501
|
-
)
|
1502
|
-
operation.on_done { |operation| yield(operation) } if block_given?
|
1503
|
-
operation
|
1504
|
-
end
|
1505
1517
|
end
|
1506
1518
|
end
|
1507
1519
|
end
|