google-cloud-talent 0.8.1 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +2 -1
- data/AUTHENTICATION.md +51 -59
- data/LICENSE.md +203 -0
- data/MIGRATING.md +347 -0
- data/README.md +35 -25
- data/lib/{google/cloud/talent/v4beta1/doc/google/protobuf/empty.rb → google-cloud-talent.rb} +5 -15
- data/lib/google/cloud/talent.rb +254 -442
- data/lib/google/cloud/talent/version.rb +6 -2
- metadata +62 -111
- data/LICENSE +0 -201
- data/lib/google/cloud/talent/v4beta1.rb +0 -543
- data/lib/google/cloud/talent/v4beta1/application_pb.rb +0 -62
- data/lib/google/cloud/talent/v4beta1/application_service_client.rb +0 -491
- data/lib/google/cloud/talent/v4beta1/application_service_client_config.json +0 -51
- data/lib/google/cloud/talent/v4beta1/application_service_pb.rb +0 -54
- data/lib/google/cloud/talent/v4beta1/application_service_services_pb.rb +0 -56
- data/lib/google/cloud/talent/v4beta1/batch_pb.rb +0 -18
- data/lib/google/cloud/talent/v4beta1/common_pb.rb +0 -341
- data/lib/google/cloud/talent/v4beta1/company_pb.rb +0 -40
- data/lib/google/cloud/talent/v4beta1/company_service_client.rb +0 -535
- data/lib/google/cloud/talent/v4beta1/company_service_client_config.json +0 -51
- data/lib/google/cloud/talent/v4beta1/company_service_pb.rb +0 -55
- data/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb +0 -56
- data/lib/google/cloud/talent/v4beta1/completion_client.rb +0 -359
- data/lib/google/cloud/talent/v4beta1/completion_client_config.json +0 -31
- data/lib/google/cloud/talent/v4beta1/completion_service_pb.rb +0 -55
- data/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb +0 -48
- data/lib/google/cloud/talent/v4beta1/credentials.rb +0 -42
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application.rb +0 -166
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application_service.rb +0 -107
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/common.rb +0 -1147
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company.rb +0 -110
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company_service.rb +0 -122
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/completion_service.rb +0 -141
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event.rb +0 -238
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event_service.rb +0 -36
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/filters.rb +0 -847
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/histogram.rb +0 -55
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job.rb +0 -363
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job_service.rb +0 -762
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile.rb +0 -808
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile_service.rb +0 -446
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant.rb +0 -74
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant_service.rb +0 -101
- data/lib/google/cloud/talent/v4beta1/doc/google/longrunning/operations.rb +0 -51
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/wrappers.rb +0 -34
- data/lib/google/cloud/talent/v4beta1/doc/google/rpc/status.rb +0 -87
- data/lib/google/cloud/talent/v4beta1/doc/google/type/date.rb +0 -43
- data/lib/google/cloud/talent/v4beta1/doc/google/type/latlng.rb +0 -31
- data/lib/google/cloud/talent/v4beta1/doc/google/type/money.rb +0 -36
- data/lib/google/cloud/talent/v4beta1/doc/google/type/postal_address.rb +0 -126
- data/lib/google/cloud/talent/v4beta1/doc/google/type/timeofday.rb +0 -37
- data/lib/google/cloud/talent/v4beta1/event_pb.rb +0 -69
- data/lib/google/cloud/talent/v4beta1/event_service_client.rb +0 -268
- data/lib/google/cloud/talent/v4beta1/event_service_client_config.json +0 -31
- data/lib/google/cloud/talent/v4beta1/event_service_pb.rb +0 -26
- data/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb +0 -53
- data/lib/google/cloud/talent/v4beta1/filters_pb.rb +0 -187
- data/lib/google/cloud/talent/v4beta1/helpers.rb +0 -162
- data/lib/google/cloud/talent/v4beta1/histogram_pb.rb +0 -27
- data/lib/google/cloud/talent/v4beta1/job_pb.rb +0 -71
- data/lib/google/cloud/talent/v4beta1/job_service_client.rb +0 -1576
- data/lib/google/cloud/talent/v4beta1/job_service_client_config.json +0 -76
- data/lib/google/cloud/talent/v4beta1/job_service_pb.rb +0 -165
- data/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb +0 -92
- data/lib/google/cloud/talent/v4beta1/profile_pb.rb +0 -212
- data/lib/google/cloud/talent/v4beta1/profile_service_client.rb +0 -844
- data/lib/google/cloud/talent/v4beta1/profile_service_client_config.json +0 -56
- data/lib/google/cloud/talent/v4beta1/profile_service_pb.rb +0 -88
- data/lib/google/cloud/talent/v4beta1/profile_service_services_pb.rb +0 -67
- data/lib/google/cloud/talent/v4beta1/tenant_pb.rb +0 -33
- data/lib/google/cloud/talent/v4beta1/tenant_service_client.rb +0 -476
- data/lib/google/cloud/talent/v4beta1/tenant_service_client_config.json +0 -51
- data/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb +0 -54
- data/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb +0 -55
@@ -1,1576 +0,0 @@
|
|
1
|
-
# Copyright 2019 Google LLC
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
#
|
15
|
-
# EDITING INSTRUCTIONS
|
16
|
-
# This file was generated from the file
|
17
|
-
# https://github.com/googleapis/googleapis/blob/master/google/cloud/talent/v4beta1/job_service.proto,
|
18
|
-
# and updates to that file get reflected here through a refresh process.
|
19
|
-
# For the short term, the refresh process will only be runnable by Google
|
20
|
-
# engineers.
|
21
|
-
|
22
|
-
|
23
|
-
require "json"
|
24
|
-
require "pathname"
|
25
|
-
|
26
|
-
require "google/gax"
|
27
|
-
require "google/gax/operation"
|
28
|
-
require "google/longrunning/operations_client"
|
29
|
-
|
30
|
-
require "google/cloud/talent/v4beta1/job_service_pb"
|
31
|
-
require "google/cloud/talent/v4beta1/credentials"
|
32
|
-
require "google/cloud/talent/version"
|
33
|
-
|
34
|
-
module Google
|
35
|
-
module Cloud
|
36
|
-
module Talent
|
37
|
-
module V4beta1
|
38
|
-
# A service handles job management, including job CRUD, enumeration and search.
|
39
|
-
#
|
40
|
-
# @!attribute [r] job_service_stub
|
41
|
-
# @return [Google::Cloud::Talent::V4beta1::JobService::Stub]
|
42
|
-
class JobServiceClient
|
43
|
-
# @private
|
44
|
-
attr_reader :job_service_stub
|
45
|
-
|
46
|
-
# The default address of the service.
|
47
|
-
SERVICE_ADDRESS = "jobs.googleapis.com".freeze
|
48
|
-
|
49
|
-
# The default port of the service.
|
50
|
-
DEFAULT_SERVICE_PORT = 443
|
51
|
-
|
52
|
-
# The default set of gRPC interceptors.
|
53
|
-
GRPC_INTERCEPTORS = []
|
54
|
-
|
55
|
-
DEFAULT_TIMEOUT = 30
|
56
|
-
|
57
|
-
PAGE_DESCRIPTORS = {
|
58
|
-
"list_jobs" => Google::Gax::PageDescriptor.new(
|
59
|
-
"page_token",
|
60
|
-
"next_page_token",
|
61
|
-
"jobs"),
|
62
|
-
"search_jobs" => Google::Gax::PageDescriptor.new(
|
63
|
-
"page_token",
|
64
|
-
"next_page_token",
|
65
|
-
"matching_jobs"),
|
66
|
-
"search_jobs_for_alert" => Google::Gax::PageDescriptor.new(
|
67
|
-
"page_token",
|
68
|
-
"next_page_token",
|
69
|
-
"matching_jobs")
|
70
|
-
}.freeze
|
71
|
-
|
72
|
-
private_constant :PAGE_DESCRIPTORS
|
73
|
-
|
74
|
-
# The scopes needed to make gRPC calls to all of the methods defined in
|
75
|
-
# this service.
|
76
|
-
ALL_SCOPES = [
|
77
|
-
"https://www.googleapis.com/auth/cloud-platform",
|
78
|
-
"https://www.googleapis.com/auth/jobs"
|
79
|
-
].freeze
|
80
|
-
|
81
|
-
class OperationsClient < Google::Longrunning::OperationsClient
|
82
|
-
self::SERVICE_ADDRESS = JobServiceClient::SERVICE_ADDRESS
|
83
|
-
self::GRPC_INTERCEPTORS = JobServiceClient::GRPC_INTERCEPTORS
|
84
|
-
end
|
85
|
-
|
86
|
-
COMPANY_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
87
|
-
"projects/{project}/tenants/{tenant}/companies/{company}"
|
88
|
-
)
|
89
|
-
|
90
|
-
private_constant :COMPANY_PATH_TEMPLATE
|
91
|
-
|
92
|
-
COMPANY_WITHOUT_TENANT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
93
|
-
"projects/{project}/companies/{company}"
|
94
|
-
)
|
95
|
-
|
96
|
-
private_constant :COMPANY_WITHOUT_TENANT_PATH_TEMPLATE
|
97
|
-
|
98
|
-
JOB_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
99
|
-
"projects/{project}/tenants/{tenant}/jobs/{jobs}"
|
100
|
-
)
|
101
|
-
|
102
|
-
private_constant :JOB_PATH_TEMPLATE
|
103
|
-
|
104
|
-
JOB_WITHOUT_TENANT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
105
|
-
"projects/{project}/jobs/{jobs}"
|
106
|
-
)
|
107
|
-
|
108
|
-
private_constant :JOB_WITHOUT_TENANT_PATH_TEMPLATE
|
109
|
-
|
110
|
-
PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
111
|
-
"projects/{project}"
|
112
|
-
)
|
113
|
-
|
114
|
-
private_constant :PROJECT_PATH_TEMPLATE
|
115
|
-
|
116
|
-
TENANT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
117
|
-
"projects/{project}/tenants/{tenant}"
|
118
|
-
)
|
119
|
-
|
120
|
-
private_constant :TENANT_PATH_TEMPLATE
|
121
|
-
|
122
|
-
# Returns a fully-qualified company resource name string.
|
123
|
-
# @param project [String]
|
124
|
-
# @param tenant [String]
|
125
|
-
# @param company [String]
|
126
|
-
# @return [String]
|
127
|
-
def self.company_path project, tenant, company
|
128
|
-
COMPANY_PATH_TEMPLATE.render(
|
129
|
-
:"project" => project,
|
130
|
-
:"tenant" => tenant,
|
131
|
-
:"company" => company
|
132
|
-
)
|
133
|
-
end
|
134
|
-
|
135
|
-
# Returns a fully-qualified company_without_tenant resource name string.
|
136
|
-
# @param project [String]
|
137
|
-
# @param company [String]
|
138
|
-
# @return [String]
|
139
|
-
def self.company_without_tenant_path project, company
|
140
|
-
COMPANY_WITHOUT_TENANT_PATH_TEMPLATE.render(
|
141
|
-
:"project" => project,
|
142
|
-
:"company" => company
|
143
|
-
)
|
144
|
-
end
|
145
|
-
|
146
|
-
# Returns a fully-qualified job resource name string.
|
147
|
-
# @param project [String]
|
148
|
-
# @param tenant [String]
|
149
|
-
# @param jobs [String]
|
150
|
-
# @return [String]
|
151
|
-
def self.job_path project, tenant, jobs
|
152
|
-
JOB_PATH_TEMPLATE.render(
|
153
|
-
:"project" => project,
|
154
|
-
:"tenant" => tenant,
|
155
|
-
:"jobs" => jobs
|
156
|
-
)
|
157
|
-
end
|
158
|
-
|
159
|
-
# Returns a fully-qualified job_without_tenant resource name string.
|
160
|
-
# @param project [String]
|
161
|
-
# @param jobs [String]
|
162
|
-
# @return [String]
|
163
|
-
def self.job_without_tenant_path project, jobs
|
164
|
-
JOB_WITHOUT_TENANT_PATH_TEMPLATE.render(
|
165
|
-
:"project" => project,
|
166
|
-
:"jobs" => jobs
|
167
|
-
)
|
168
|
-
end
|
169
|
-
|
170
|
-
# Returns a fully-qualified project resource name string.
|
171
|
-
# @param project [String]
|
172
|
-
# @return [String]
|
173
|
-
def self.project_path project
|
174
|
-
PROJECT_PATH_TEMPLATE.render(
|
175
|
-
:"project" => project
|
176
|
-
)
|
177
|
-
end
|
178
|
-
|
179
|
-
# Returns a fully-qualified tenant resource name string.
|
180
|
-
# @param project [String]
|
181
|
-
# @param tenant [String]
|
182
|
-
# @return [String]
|
183
|
-
def self.tenant_path project, tenant
|
184
|
-
TENANT_PATH_TEMPLATE.render(
|
185
|
-
:"project" => project,
|
186
|
-
:"tenant" => tenant
|
187
|
-
)
|
188
|
-
end
|
189
|
-
|
190
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
191
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
192
|
-
# be many types.
|
193
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
194
|
-
# authenticating requests made by this client.
|
195
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
196
|
-
# credentials for this client.
|
197
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
198
|
-
# credentials for this client.
|
199
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
200
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
201
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
202
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
203
|
-
# metadata for requests, generally, to give OAuth credentials.
|
204
|
-
# @param scopes [Array<String>]
|
205
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
206
|
-
# an updater_proc is supplied.
|
207
|
-
# @param client_config [Hash]
|
208
|
-
# A Hash for call options for each method. See
|
209
|
-
# Google::Gax#construct_settings for the structure of
|
210
|
-
# this data. Falls back to the default config if not specified
|
211
|
-
# or the specified config is missing data points.
|
212
|
-
# @param timeout [Numeric]
|
213
|
-
# The default timeout, in seconds, for calls made through this client.
|
214
|
-
# @param metadata [Hash]
|
215
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
216
|
-
# @param service_address [String]
|
217
|
-
# Override for the service hostname, or `nil` to leave as the default.
|
218
|
-
# @param service_port [Integer]
|
219
|
-
# Override for the service port, or `nil` to leave as the default.
|
220
|
-
# @param exception_transformer [Proc]
|
221
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
222
|
-
# custom error handling.
|
223
|
-
def initialize \
|
224
|
-
credentials: nil,
|
225
|
-
scopes: ALL_SCOPES,
|
226
|
-
client_config: {},
|
227
|
-
timeout: DEFAULT_TIMEOUT,
|
228
|
-
metadata: nil,
|
229
|
-
service_address: nil,
|
230
|
-
service_port: nil,
|
231
|
-
exception_transformer: nil,
|
232
|
-
lib_name: nil,
|
233
|
-
lib_version: ""
|
234
|
-
# These require statements are intentionally placed here to initialize
|
235
|
-
# the gRPC module only when it's required.
|
236
|
-
# See https://github.com/googleapis/toolkit/issues/446
|
237
|
-
require "google/gax/grpc"
|
238
|
-
require "google/cloud/talent/v4beta1/job_service_services_pb"
|
239
|
-
|
240
|
-
credentials ||= Google::Cloud::Talent::V4beta1::Credentials.default
|
241
|
-
|
242
|
-
@operations_client = OperationsClient.new(
|
243
|
-
credentials: credentials,
|
244
|
-
scopes: scopes,
|
245
|
-
client_config: client_config,
|
246
|
-
timeout: timeout,
|
247
|
-
lib_name: lib_name,
|
248
|
-
service_address: service_address,
|
249
|
-
service_port: service_port,
|
250
|
-
lib_version: lib_version,
|
251
|
-
metadata: metadata,
|
252
|
-
)
|
253
|
-
|
254
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
255
|
-
updater_proc = Google::Cloud::Talent::V4beta1::Credentials.new(credentials).updater_proc
|
256
|
-
end
|
257
|
-
if credentials.is_a?(GRPC::Core::Channel)
|
258
|
-
channel = credentials
|
259
|
-
end
|
260
|
-
if credentials.is_a?(GRPC::Core::ChannelCredentials)
|
261
|
-
chan_creds = credentials
|
262
|
-
end
|
263
|
-
if credentials.is_a?(Proc)
|
264
|
-
updater_proc = credentials
|
265
|
-
end
|
266
|
-
if credentials.is_a?(Google::Auth::Credentials)
|
267
|
-
updater_proc = credentials.updater_proc
|
268
|
-
end
|
269
|
-
|
270
|
-
package_version = Google::Cloud::Talent::VERSION
|
271
|
-
|
272
|
-
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
273
|
-
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
274
|
-
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
275
|
-
google_api_client << " grpc/#{GRPC::VERSION}"
|
276
|
-
google_api_client.freeze
|
277
|
-
|
278
|
-
headers = { :"x-goog-api-client" => google_api_client }
|
279
|
-
headers.merge!(metadata) unless metadata.nil?
|
280
|
-
client_config_file = Pathname.new(__dir__).join(
|
281
|
-
"job_service_client_config.json"
|
282
|
-
)
|
283
|
-
defaults = client_config_file.open do |f|
|
284
|
-
Google::Gax.construct_settings(
|
285
|
-
"google.cloud.talent.v4beta1.JobService",
|
286
|
-
JSON.parse(f.read),
|
287
|
-
client_config,
|
288
|
-
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
289
|
-
timeout,
|
290
|
-
page_descriptors: PAGE_DESCRIPTORS,
|
291
|
-
errors: Google::Gax::Grpc::API_ERRORS,
|
292
|
-
metadata: headers
|
293
|
-
)
|
294
|
-
end
|
295
|
-
|
296
|
-
# Allow overriding the service path/port in subclasses.
|
297
|
-
service_path = service_address || self.class::SERVICE_ADDRESS
|
298
|
-
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
299
|
-
interceptors = self.class::GRPC_INTERCEPTORS
|
300
|
-
@job_service_stub = Google::Gax::Grpc.create_stub(
|
301
|
-
service_path,
|
302
|
-
port,
|
303
|
-
chan_creds: chan_creds,
|
304
|
-
channel: channel,
|
305
|
-
updater_proc: updater_proc,
|
306
|
-
scopes: scopes,
|
307
|
-
interceptors: interceptors,
|
308
|
-
&Google::Cloud::Talent::V4beta1::JobService::Stub.method(:new)
|
309
|
-
)
|
310
|
-
|
311
|
-
@create_job = Google::Gax.create_api_call(
|
312
|
-
@job_service_stub.method(:create_job),
|
313
|
-
defaults["create_job"],
|
314
|
-
exception_transformer: exception_transformer,
|
315
|
-
params_extractor: proc do |request|
|
316
|
-
{'parent' => request.parent}
|
317
|
-
end
|
318
|
-
)
|
319
|
-
@get_job = Google::Gax.create_api_call(
|
320
|
-
@job_service_stub.method(:get_job),
|
321
|
-
defaults["get_job"],
|
322
|
-
exception_transformer: exception_transformer,
|
323
|
-
params_extractor: proc do |request|
|
324
|
-
{'name' => request.name}
|
325
|
-
end
|
326
|
-
)
|
327
|
-
@update_job = Google::Gax.create_api_call(
|
328
|
-
@job_service_stub.method(:update_job),
|
329
|
-
defaults["update_job"],
|
330
|
-
exception_transformer: exception_transformer,
|
331
|
-
params_extractor: proc do |request|
|
332
|
-
{'job.name' => request.job.name}
|
333
|
-
end
|
334
|
-
)
|
335
|
-
@delete_job = Google::Gax.create_api_call(
|
336
|
-
@job_service_stub.method(:delete_job),
|
337
|
-
defaults["delete_job"],
|
338
|
-
exception_transformer: exception_transformer,
|
339
|
-
params_extractor: proc do |request|
|
340
|
-
{'name' => request.name}
|
341
|
-
end
|
342
|
-
)
|
343
|
-
@list_jobs = Google::Gax.create_api_call(
|
344
|
-
@job_service_stub.method(:list_jobs),
|
345
|
-
defaults["list_jobs"],
|
346
|
-
exception_transformer: exception_transformer,
|
347
|
-
params_extractor: proc do |request|
|
348
|
-
{'parent' => request.parent}
|
349
|
-
end
|
350
|
-
)
|
351
|
-
@batch_delete_jobs = Google::Gax.create_api_call(
|
352
|
-
@job_service_stub.method(:batch_delete_jobs),
|
353
|
-
defaults["batch_delete_jobs"],
|
354
|
-
exception_transformer: exception_transformer,
|
355
|
-
params_extractor: proc do |request|
|
356
|
-
{'parent' => request.parent}
|
357
|
-
end
|
358
|
-
)
|
359
|
-
@search_jobs = Google::Gax.create_api_call(
|
360
|
-
@job_service_stub.method(:search_jobs),
|
361
|
-
defaults["search_jobs"],
|
362
|
-
exception_transformer: exception_transformer,
|
363
|
-
params_extractor: proc do |request|
|
364
|
-
{'parent' => request.parent}
|
365
|
-
end
|
366
|
-
)
|
367
|
-
@search_jobs_for_alert = Google::Gax.create_api_call(
|
368
|
-
@job_service_stub.method(:search_jobs_for_alert),
|
369
|
-
defaults["search_jobs_for_alert"],
|
370
|
-
exception_transformer: exception_transformer,
|
371
|
-
params_extractor: proc do |request|
|
372
|
-
{'parent' => request.parent}
|
373
|
-
end
|
374
|
-
)
|
375
|
-
@batch_create_jobs = Google::Gax.create_api_call(
|
376
|
-
@job_service_stub.method(:batch_create_jobs),
|
377
|
-
defaults["batch_create_jobs"],
|
378
|
-
exception_transformer: exception_transformer,
|
379
|
-
params_extractor: proc do |request|
|
380
|
-
{'parent' => request.parent}
|
381
|
-
end
|
382
|
-
)
|
383
|
-
@batch_update_jobs = Google::Gax.create_api_call(
|
384
|
-
@job_service_stub.method(:batch_update_jobs),
|
385
|
-
defaults["batch_update_jobs"],
|
386
|
-
exception_transformer: exception_transformer,
|
387
|
-
params_extractor: proc do |request|
|
388
|
-
{'parent' => request.parent}
|
389
|
-
end
|
390
|
-
)
|
391
|
-
end
|
392
|
-
|
393
|
-
# Service calls
|
394
|
-
|
395
|
-
# Creates a new job.
|
396
|
-
#
|
397
|
-
# Typically, the job becomes searchable within 10 seconds, but it may take
|
398
|
-
# up to 5 minutes.
|
399
|
-
#
|
400
|
-
# @param parent [String]
|
401
|
-
# Required. The resource name of the tenant under which the job is created.
|
402
|
-
#
|
403
|
-
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
404
|
-
# "projects/foo/tenant/bar". If tenant id is unspecified a default tenant
|
405
|
-
# is created. For example, "projects/foo".
|
406
|
-
# @param job [Google::Cloud::Talent::V4beta1::Job | Hash]
|
407
|
-
# Required. The Job to be created.
|
408
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Job`
|
409
|
-
# can also be provided.
|
410
|
-
# @param options [Google::Gax::CallOptions]
|
411
|
-
# Overrides the default settings for this call, e.g, timeout,
|
412
|
-
# retries, etc.
|
413
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
414
|
-
# @yieldparam result [Google::Cloud::Talent::V4beta1::Job]
|
415
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
416
|
-
# @return [Google::Cloud::Talent::V4beta1::Job]
|
417
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
418
|
-
# @example
|
419
|
-
# require "google/cloud/talent"
|
420
|
-
#
|
421
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
422
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.tenant_path("[PROJECT]", "[TENANT]")
|
423
|
-
#
|
424
|
-
# # TODO: Initialize `job`:
|
425
|
-
# job = {}
|
426
|
-
# response = job_client.create_job(formatted_parent, job)
|
427
|
-
|
428
|
-
def create_job \
|
429
|
-
parent,
|
430
|
-
job,
|
431
|
-
options: nil,
|
432
|
-
&block
|
433
|
-
req = {
|
434
|
-
parent: parent,
|
435
|
-
job: job
|
436
|
-
}.delete_if { |_, v| v.nil? }
|
437
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::CreateJobRequest)
|
438
|
-
@create_job.call(req, options, &block)
|
439
|
-
end
|
440
|
-
|
441
|
-
# Retrieves the specified job, whose status is OPEN or recently EXPIRED
|
442
|
-
# within the last 90 days.
|
443
|
-
#
|
444
|
-
# @param name [String]
|
445
|
-
# Required. The resource name of the job to retrieve.
|
446
|
-
#
|
447
|
-
# The format is
|
448
|
-
# "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
|
449
|
-
# example, "projects/foo/tenants/bar/jobs/baz".
|
450
|
-
#
|
451
|
-
# If tenant id is unspecified, the default tenant is used. For
|
452
|
-
# example, "projects/foo/jobs/bar".
|
453
|
-
# @param options [Google::Gax::CallOptions]
|
454
|
-
# Overrides the default settings for this call, e.g, timeout,
|
455
|
-
# retries, etc.
|
456
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
457
|
-
# @yieldparam result [Google::Cloud::Talent::V4beta1::Job]
|
458
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
459
|
-
# @return [Google::Cloud::Talent::V4beta1::Job]
|
460
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
461
|
-
# @example
|
462
|
-
# require "google/cloud/talent"
|
463
|
-
#
|
464
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
465
|
-
# formatted_name = Google::Cloud::Talent::V4beta1::JobServiceClient.job_path("[PROJECT]", "[TENANT]", "[JOBS]")
|
466
|
-
# response = job_client.get_job(formatted_name)
|
467
|
-
|
468
|
-
def get_job \
|
469
|
-
name,
|
470
|
-
options: nil,
|
471
|
-
&block
|
472
|
-
req = {
|
473
|
-
name: name
|
474
|
-
}.delete_if { |_, v| v.nil? }
|
475
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::GetJobRequest)
|
476
|
-
@get_job.call(req, options, &block)
|
477
|
-
end
|
478
|
-
|
479
|
-
# Updates specified job.
|
480
|
-
#
|
481
|
-
# Typically, updated contents become visible in search results within 10
|
482
|
-
# seconds, but it may take up to 5 minutes.
|
483
|
-
#
|
484
|
-
# @param job [Google::Cloud::Talent::V4beta1::Job | Hash]
|
485
|
-
# Required. The Job to be updated.
|
486
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Job`
|
487
|
-
# can also be provided.
|
488
|
-
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
489
|
-
# Strongly recommended for the best service experience.
|
490
|
-
#
|
491
|
-
# If {Google::Cloud::Talent::V4beta1::UpdateJobRequest#update_mask update_mask}
|
492
|
-
# is provided, only the specified fields in
|
493
|
-
# {Google::Cloud::Talent::V4beta1::UpdateJobRequest#job job} are updated.
|
494
|
-
# Otherwise all the fields are updated.
|
495
|
-
#
|
496
|
-
# A field mask to restrict the fields that are updated. Only
|
497
|
-
# top level fields of {Google::Cloud::Talent::V4beta1::Job Job} are supported.
|
498
|
-
# A hash of the same form as `Google::Protobuf::FieldMask`
|
499
|
-
# can also be provided.
|
500
|
-
# @param options [Google::Gax::CallOptions]
|
501
|
-
# Overrides the default settings for this call, e.g, timeout,
|
502
|
-
# retries, etc.
|
503
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
504
|
-
# @yieldparam result [Google::Cloud::Talent::V4beta1::Job]
|
505
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
506
|
-
# @return [Google::Cloud::Talent::V4beta1::Job]
|
507
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
508
|
-
# @example
|
509
|
-
# require "google/cloud/talent"
|
510
|
-
#
|
511
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
512
|
-
#
|
513
|
-
# # TODO: Initialize `job`:
|
514
|
-
# job = {}
|
515
|
-
# response = job_client.update_job(job)
|
516
|
-
|
517
|
-
def update_job \
|
518
|
-
job,
|
519
|
-
update_mask: nil,
|
520
|
-
options: nil,
|
521
|
-
&block
|
522
|
-
req = {
|
523
|
-
job: job,
|
524
|
-
update_mask: update_mask
|
525
|
-
}.delete_if { |_, v| v.nil? }
|
526
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::UpdateJobRequest)
|
527
|
-
@update_job.call(req, options, &block)
|
528
|
-
end
|
529
|
-
|
530
|
-
# Deletes the specified job.
|
531
|
-
#
|
532
|
-
# Typically, the job becomes unsearchable within 10 seconds, but it may take
|
533
|
-
# up to 5 minutes.
|
534
|
-
#
|
535
|
-
# @param name [String]
|
536
|
-
# Required. The resource name of the job to be deleted.
|
537
|
-
#
|
538
|
-
# The format is
|
539
|
-
# "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For
|
540
|
-
# example, "projects/foo/tenants/bar/jobs/baz".
|
541
|
-
#
|
542
|
-
# If tenant id is unspecified, the default tenant is used. For
|
543
|
-
# example, "projects/foo/jobs/bar".
|
544
|
-
# @param options [Google::Gax::CallOptions]
|
545
|
-
# Overrides the default settings for this call, e.g, timeout,
|
546
|
-
# retries, etc.
|
547
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
548
|
-
# @yieldparam result []
|
549
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
550
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
551
|
-
# @example
|
552
|
-
# require "google/cloud/talent"
|
553
|
-
#
|
554
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
555
|
-
# formatted_name = Google::Cloud::Talent::V4beta1::JobServiceClient.job_path("[PROJECT]", "[TENANT]", "[JOBS]")
|
556
|
-
# job_client.delete_job(formatted_name)
|
557
|
-
|
558
|
-
def delete_job \
|
559
|
-
name,
|
560
|
-
options: nil,
|
561
|
-
&block
|
562
|
-
req = {
|
563
|
-
name: name
|
564
|
-
}.delete_if { |_, v| v.nil? }
|
565
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::DeleteJobRequest)
|
566
|
-
@delete_job.call(req, options, &block)
|
567
|
-
nil
|
568
|
-
end
|
569
|
-
|
570
|
-
# Lists jobs by filter.
|
571
|
-
#
|
572
|
-
# @param parent [String]
|
573
|
-
# Required. The resource name of the tenant under which the job is created.
|
574
|
-
#
|
575
|
-
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
576
|
-
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
577
|
-
# is created. For example, "projects/foo".
|
578
|
-
# @param filter [String]
|
579
|
-
# Required. The filter string specifies the jobs to be enumerated.
|
580
|
-
#
|
581
|
-
# Supported operator: =, AND
|
582
|
-
#
|
583
|
-
# The fields eligible for filtering are:
|
584
|
-
#
|
585
|
-
# * `companyName` (Required)
|
586
|
-
# * `requisitionId`
|
587
|
-
# * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
|
588
|
-
# OPEN if no value is specified.
|
589
|
-
#
|
590
|
-
# Sample Query:
|
591
|
-
#
|
592
|
-
# * companyName = "projects/foo/tenants/bar/companies/baz"
|
593
|
-
# * companyName = "projects/foo/tenants/bar/companies/baz" AND
|
594
|
-
# requisitionId = "req-1"
|
595
|
-
# * companyName = "projects/foo/tenants/bar/companies/baz" AND
|
596
|
-
# status = "EXPIRED"
|
597
|
-
# @param page_size [Integer]
|
598
|
-
# The maximum number of resources contained in the underlying API
|
599
|
-
# response. If page streaming is performed per-resource, this
|
600
|
-
# parameter does not affect the return value. If page streaming is
|
601
|
-
# performed per-page, this determines the maximum number of
|
602
|
-
# resources in a page.
|
603
|
-
# @param job_view [Google::Cloud::Talent::V4beta1::JobView]
|
604
|
-
# The desired job attributes returned for jobs in the
|
605
|
-
# search response. Defaults to
|
606
|
-
# {Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_FULL JobView::JOB_VIEW_FULL}
|
607
|
-
# if no value is specified.
|
608
|
-
# @param options [Google::Gax::CallOptions]
|
609
|
-
# Overrides the default settings for this call, e.g, timeout,
|
610
|
-
# retries, etc.
|
611
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
612
|
-
# @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Job>]
|
613
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
614
|
-
# @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Job>]
|
615
|
-
# An enumerable of Google::Cloud::Talent::V4beta1::Job instances.
|
616
|
-
# See Google::Gax::PagedEnumerable documentation for other
|
617
|
-
# operations such as per-page iteration or access to the response
|
618
|
-
# object.
|
619
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
620
|
-
# @example
|
621
|
-
# require "google/cloud/talent"
|
622
|
-
#
|
623
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
624
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.tenant_path("[PROJECT]", "[TENANT]")
|
625
|
-
#
|
626
|
-
# # TODO: Initialize `filter`:
|
627
|
-
# filter = ''
|
628
|
-
#
|
629
|
-
# # Iterate over all results.
|
630
|
-
# job_client.list_jobs(formatted_parent, filter).each do |element|
|
631
|
-
# # Process element.
|
632
|
-
# end
|
633
|
-
#
|
634
|
-
# # Or iterate over results one page at a time.
|
635
|
-
# job_client.list_jobs(formatted_parent, filter).each_page do |page|
|
636
|
-
# # Process each page at a time.
|
637
|
-
# page.each do |element|
|
638
|
-
# # Process element.
|
639
|
-
# end
|
640
|
-
# end
|
641
|
-
|
642
|
-
def list_jobs \
|
643
|
-
parent,
|
644
|
-
filter,
|
645
|
-
page_size: nil,
|
646
|
-
job_view: nil,
|
647
|
-
options: nil,
|
648
|
-
&block
|
649
|
-
req = {
|
650
|
-
parent: parent,
|
651
|
-
filter: filter,
|
652
|
-
page_size: page_size,
|
653
|
-
job_view: job_view
|
654
|
-
}.delete_if { |_, v| v.nil? }
|
655
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::ListJobsRequest)
|
656
|
-
@list_jobs.call(req, options, &block)
|
657
|
-
end
|
658
|
-
|
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
|
-
# Searches for jobs using the provided
|
711
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}.
|
712
|
-
#
|
713
|
-
# This call constrains the
|
714
|
-
# {Google::Cloud::Talent::V4beta1::Job#visibility visibility} of jobs present in
|
715
|
-
# the database, and only returns jobs that the caller has permission to
|
716
|
-
# search against.
|
717
|
-
#
|
718
|
-
# @param parent [String]
|
719
|
-
# Required. The resource name of the tenant to search within.
|
720
|
-
#
|
721
|
-
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
722
|
-
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
723
|
-
# is created. For example, "projects/foo".
|
724
|
-
# @param request_metadata [Google::Cloud::Talent::V4beta1::RequestMetadata | Hash]
|
725
|
-
# Required. The meta information collected about the job searcher, used to
|
726
|
-
# improve the search quality of the service. The identifiers (such as
|
727
|
-
# `user_id`) are provided by users, and must be unique and consistent.
|
728
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::RequestMetadata`
|
729
|
-
# can also be provided.
|
730
|
-
# @param search_mode [Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode]
|
731
|
-
# Mode of a search.
|
732
|
-
#
|
733
|
-
# Defaults to
|
734
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode::JOB_SEARCH}.
|
735
|
-
# @param job_query [Google::Cloud::Talent::V4beta1::JobQuery | Hash]
|
736
|
-
# Query used to search against jobs, such as keyword, location filters, etc.
|
737
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::JobQuery`
|
738
|
-
# can also be provided.
|
739
|
-
# @param enable_broadening [true, false]
|
740
|
-
# Controls whether to broaden the search when it produces sparse results.
|
741
|
-
# Broadened queries append results to the end of the matching results
|
742
|
-
# list.
|
743
|
-
#
|
744
|
-
# Defaults to false.
|
745
|
-
# @param require_precise_result_size [true, false]
|
746
|
-
# Controls if the search job request requires the return of a precise
|
747
|
-
# count of the first 300 results. Setting this to `true` ensures
|
748
|
-
# consistency in the number of results per page. Best practice is to set this
|
749
|
-
# value to true if a client allows users to jump directly to a
|
750
|
-
# non-sequential search results page.
|
751
|
-
#
|
752
|
-
# Enabling this flag may adversely impact performance.
|
753
|
-
#
|
754
|
-
# Defaults to false.
|
755
|
-
# @param histogram_queries [Array<Google::Cloud::Talent::V4beta1::HistogramQuery | Hash>]
|
756
|
-
# An expression specifies a histogram request against matching jobs.
|
757
|
-
#
|
758
|
-
# Expression syntax is an aggregation function call with histogram facets and
|
759
|
-
# other options.
|
760
|
-
#
|
761
|
-
# Available aggregation function calls are:
|
762
|
-
# * `count(string_histogram_facet)`: Count the number of matching entities,
|
763
|
-
# for each distinct attribute value.
|
764
|
-
# * `count(numeric_histogram_facet, list of buckets)`: Count the number of
|
765
|
-
# matching entities within each bucket.
|
766
|
-
#
|
767
|
-
# Data types:
|
768
|
-
#
|
769
|
-
# * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
|
770
|
-
# * String: string like "any string with backslash escape for quote(\")."
|
771
|
-
# * Number: whole number and floating point number like 10, -1 and -0.01.
|
772
|
-
# * List: list of elements with comma(,) separator surrounded by square
|
773
|
-
# brackets, for example, [1, 2, 3] and ["one", "two", "three"].
|
774
|
-
#
|
775
|
-
# Built-in constants:
|
776
|
-
#
|
777
|
-
# * MIN (minimum number similar to java Double.MIN_VALUE)
|
778
|
-
# * MAX (maximum number similar to java Double.MAX_VALUE)
|
779
|
-
#
|
780
|
-
# Built-in functions:
|
781
|
-
#
|
782
|
-
# * bucket(start, end[, label]): bucket built-in function creates a bucket
|
783
|
-
# with range of [start, end). Note that the end is exclusive, for example,
|
784
|
-
# bucket(1, MAX, "positive number") or bucket(1, 10).
|
785
|
-
#
|
786
|
-
# Job histogram facets:
|
787
|
-
#
|
788
|
-
# * company_display_name: histogram by
|
789
|
-
# {Google::Cloud::Talent::V4beta1::Job#company_display_name Job#company_display_name}.
|
790
|
-
# * employment_type: histogram by
|
791
|
-
# {Google::Cloud::Talent::V4beta1::Job#employment_types Job#employment_types},
|
792
|
-
# for example,
|
793
|
-
# "FULL_TIME", "PART_TIME".
|
794
|
-
# * company_size: histogram by
|
795
|
-
# {Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example,
|
796
|
-
# "SMALL", "MEDIUM", "BIG".
|
797
|
-
# * publish_time_in_month: histogram by the
|
798
|
-
# {Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job#posting_publish_time}
|
799
|
-
# in months.
|
800
|
-
# Must specify list of numeric buckets in spec.
|
801
|
-
# * publish_time_in_year: histogram by the
|
802
|
-
# {Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job#posting_publish_time}
|
803
|
-
# in years.
|
804
|
-
# Must specify list of numeric buckets in spec.
|
805
|
-
# * degree_types: histogram by the
|
806
|
-
# {Google::Cloud::Talent::V4beta1::Job#degree_types Job#degree_types}, for
|
807
|
-
# example,
|
808
|
-
# "Bachelors", "Masters".
|
809
|
-
# * job_level: histogram by the
|
810
|
-
# {Google::Cloud::Talent::V4beta1::Job#job_level Job#job_level}, for example,
|
811
|
-
# "Entry
|
812
|
-
# Level".
|
813
|
-
# * country: histogram by the country code of jobs, for example, "US", "FR".
|
814
|
-
# * admin1: histogram by the admin1 code of jobs, which is a global
|
815
|
-
# placeholder referring to the state, province, or the particular term a
|
816
|
-
# country uses to define the geographic structure below the country level,
|
817
|
-
# for example, "CA", "IL".
|
818
|
-
# * city: histogram by a combination of the "city name, admin1 code". For
|
819
|
-
# example, "Mountain View, CA", "New York, NY".
|
820
|
-
# * admin1_country: histogram by a combination of the "admin1 code, country",
|
821
|
-
# for example, "CA, US", "IL, US".
|
822
|
-
# * city_coordinate: histogram by the city center's GPS coordinates (latitude
|
823
|
-
# and longitude), for example, 37.4038522,-122.0987765. Since the
|
824
|
-
# coordinates of a city center can change, customers may need to refresh
|
825
|
-
# them periodically.
|
826
|
-
# * locale: histogram by the
|
827
|
-
# {Google::Cloud::Talent::V4beta1::Job#language_code Job#language_code}, for
|
828
|
-
# example, "en-US",
|
829
|
-
# "fr-FR".
|
830
|
-
# * language: histogram by the language subtag of the
|
831
|
-
# {Google::Cloud::Talent::V4beta1::Job#language_code Job#language_code},
|
832
|
-
# for example, "en", "fr".
|
833
|
-
# * category: histogram by the
|
834
|
-
# {Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example,
|
835
|
-
# "COMPUTER_AND_IT", "HEALTHCARE".
|
836
|
-
# * base_compensation_unit: histogram by the
|
837
|
-
# {Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo::CompensationUnit}
|
838
|
-
# of base salary, for example, "WEEKLY", "MONTHLY".
|
839
|
-
# * base_compensation: histogram by the base salary. Must specify list of
|
840
|
-
# numeric buckets to group results by.
|
841
|
-
# * annualized_base_compensation: histogram by the base annualized salary.
|
842
|
-
# Must specify list of numeric buckets to group results by.
|
843
|
-
# * annualized_total_compensation: histogram by the total annualized salary.
|
844
|
-
# Must specify list of numeric buckets to group results by.
|
845
|
-
# * string_custom_attribute: histogram by string
|
846
|
-
# {Google::Cloud::Talent::V4beta1::Job#custom_attributes Job#custom_attributes}.
|
847
|
-
# Values can be accessed via square bracket notations like
|
848
|
-
# string_custom_attribute["key1"].
|
849
|
-
# * numeric_custom_attribute: histogram by numeric
|
850
|
-
# {Google::Cloud::Talent::V4beta1::Job#custom_attributes Job#custom_attributes}.
|
851
|
-
# Values can be accessed via square bracket notations like
|
852
|
-
# numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
|
853
|
-
# group results by.
|
854
|
-
#
|
855
|
-
# Example expressions:
|
856
|
-
#
|
857
|
-
# * `count(admin1)`
|
858
|
-
# * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
|
859
|
-
# bucket(100000, MAX)])`
|
860
|
-
# * `count(string_custom_attribute["some-string-custom-attribute"])`
|
861
|
-
# * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
|
862
|
-
# [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
|
863
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::HistogramQuery`
|
864
|
-
# can also be provided.
|
865
|
-
# @param job_view [Google::Cloud::Talent::V4beta1::JobView]
|
866
|
-
# The desired job attributes returned for jobs in the search response.
|
867
|
-
# Defaults to
|
868
|
-
# {Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView::JOB_VIEW_SMALL}
|
869
|
-
# if no value is specified.
|
870
|
-
# @param offset [Integer]
|
871
|
-
# An integer that specifies the current offset (that is, starting result
|
872
|
-
# location, amongst the jobs deemed by the API as relevant) in search
|
873
|
-
# results. This field is only considered if
|
874
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is
|
875
|
-
# unset.
|
876
|
-
#
|
877
|
-
# For example, 0 means to return results starting from the first matching
|
878
|
-
# job, and 10 means to return from the 11th job. This can be used for
|
879
|
-
# pagination, (for example, pageSize = 10 and offset = 10 means to return
|
880
|
-
# from the second page).
|
881
|
-
# @param page_size [Integer]
|
882
|
-
# The maximum number of resources contained in the underlying API
|
883
|
-
# response. If page streaming is performed per-resource, this
|
884
|
-
# parameter does not affect the return value. If page streaming is
|
885
|
-
# performed per-page, this determines the maximum number of
|
886
|
-
# resources in a page.
|
887
|
-
# @param order_by [String]
|
888
|
-
# The criteria determining how search results are sorted. Default is
|
889
|
-
# `"relevance desc"`.
|
890
|
-
#
|
891
|
-
# Supported options are:
|
892
|
-
#
|
893
|
-
# * `"relevance desc"`: By relevance descending, as determined by the API
|
894
|
-
# algorithms. Relevance thresholding of query results is only available
|
895
|
-
# with this ordering.
|
896
|
-
# * `"posting_publish_time desc"`: By
|
897
|
-
# {Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job#posting_publish_time}
|
898
|
-
# descending.
|
899
|
-
# * `"posting_update_time desc"`: By
|
900
|
-
# {Google::Cloud::Talent::V4beta1::Job#posting_update_time Job#posting_update_time}
|
901
|
-
# descending.
|
902
|
-
# * `"title"`: By {Google::Cloud::Talent::V4beta1::Job#title Job#title}
|
903
|
-
# ascending.
|
904
|
-
# * `"title desc"`: By {Google::Cloud::Talent::V4beta1::Job#title Job#title}
|
905
|
-
# descending.
|
906
|
-
# * `"annualized_base_compensation"`: By job's
|
907
|
-
# {Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo#annualized_base_compensation_range}
|
908
|
-
# ascending. Jobs whose annualized base compensation is unspecified are put
|
909
|
-
# at the end of search results.
|
910
|
-
# * `"annualized_base_compensation desc"`: By job's
|
911
|
-
# {Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo#annualized_base_compensation_range}
|
912
|
-
# descending. Jobs whose annualized base compensation is unspecified are
|
913
|
-
# put at the end of search results.
|
914
|
-
# * `"annualized_total_compensation"`: By job's
|
915
|
-
# {Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo#annualized_total_compensation_range}
|
916
|
-
# ascending. Jobs whose annualized base compensation is unspecified are put
|
917
|
-
# at the end of search results.
|
918
|
-
# * `"annualized_total_compensation desc"`: By job's
|
919
|
-
# {Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo#annualized_total_compensation_range}
|
920
|
-
# descending. Jobs whose annualized base compensation is unspecified are
|
921
|
-
# put at the end of search results.
|
922
|
-
# * `"custom_ranking desc"`: By the relevance score adjusted to the
|
923
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest::CustomRankingInfo#ranking_expression}
|
924
|
-
# with weight factor assigned by
|
925
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest::CustomRankingInfo#importance_level}
|
926
|
-
# in descending order.
|
927
|
-
# * Location sorting: Use the special syntax to order jobs by distance:<br>
|
928
|
-
# `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
|
929
|
-
# `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
|
930
|
-
# `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
|
931
|
-
# multiple locations. See details below.<br>
|
932
|
-
# `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
|
933
|
-
# multiple locations. See details below.<br>
|
934
|
-
# The string can have a maximum of 256 characters. When multiple distance
|
935
|
-
# centers are provided, a job that is close to any of the distance centers
|
936
|
-
# would have a high rank. When a job has multiple locations, the job
|
937
|
-
# location closest to one of the distance centers will be used. Jobs that
|
938
|
-
# don't have locations will be ranked at the bottom. Distance is calculated
|
939
|
-
# with a precision of 11.3 meters (37.4 feet). Diversification strategy is
|
940
|
-
# still applied unless explicitly disabled in
|
941
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}.
|
942
|
-
# @param diversification_level [Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel]
|
943
|
-
# Controls whether highly similar jobs are returned next to each other in
|
944
|
-
# the search results. Jobs are identified as highly similar based on
|
945
|
-
# their titles, job categories, and locations. Highly similar results are
|
946
|
-
# clustered so that only one representative job of the cluster is
|
947
|
-
# displayed to the job seeker higher up in the results, with the other jobs
|
948
|
-
# being displayed lower down in the results.
|
949
|
-
#
|
950
|
-
# Defaults to
|
951
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel::SIMPLE}
|
952
|
-
# if no value is specified.
|
953
|
-
# @param custom_ranking_info [Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo | Hash]
|
954
|
-
# Controls over how job documents get ranked on top of existing relevance
|
955
|
-
# score (determined by API algorithm).
|
956
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo`
|
957
|
-
# can also be provided.
|
958
|
-
# @param disable_keyword_match [true, false]
|
959
|
-
# Controls whether to disable exact keyword match on
|
960
|
-
# {Google::Cloud::Talent::V4beta1::Job#title Job#title},
|
961
|
-
# {Google::Cloud::Talent::V4beta1::Job#description Job#description},
|
962
|
-
# {Google::Cloud::Talent::V4beta1::Job#company_display_name Job#company_display_name},
|
963
|
-
# {Google::Cloud::Talent::V4beta1::Job#addresses Job#addresses},
|
964
|
-
# {Google::Cloud::Talent::V4beta1::Job#qualifications Job#qualifications}. When
|
965
|
-
# disable keyword match is turned off, a keyword match returns jobs that do
|
966
|
-
# not match given category filters when there are matching keywords. For
|
967
|
-
# example, for the query "program manager," a result is returned even if the
|
968
|
-
# job posting has the title "software developer," which doesn't fall into
|
969
|
-
# "program manager" ontology, but does have "program manager" appearing in
|
970
|
-
# its description.
|
971
|
-
#
|
972
|
-
# For queries like "cloud" that don't contain title or
|
973
|
-
# location specific ontology, jobs with "cloud" keyword matches are returned
|
974
|
-
# regardless of this flag's value.
|
975
|
-
#
|
976
|
-
# Use
|
977
|
-
# {Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company#keyword_searchable_job_custom_attributes}
|
978
|
-
# if company-specific globally matched custom field/attribute string values
|
979
|
-
# are needed. Enabling keyword match improves recall of subsequent search
|
980
|
-
# requests.
|
981
|
-
#
|
982
|
-
# Defaults to false.
|
983
|
-
# @param options [Google::Gax::CallOptions]
|
984
|
-
# Overrides the default settings for this call, e.g, timeout,
|
985
|
-
# retries, etc.
|
986
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
987
|
-
# @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::SearchJobsResponse::MatchingJob>]
|
988
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
989
|
-
# @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::SearchJobsResponse::MatchingJob>]
|
990
|
-
# An enumerable of Google::Cloud::Talent::V4beta1::SearchJobsResponse::MatchingJob instances.
|
991
|
-
# See Google::Gax::PagedEnumerable documentation for other
|
992
|
-
# operations such as per-page iteration or access to the response
|
993
|
-
# object.
|
994
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
995
|
-
# @example
|
996
|
-
# require "google/cloud/talent"
|
997
|
-
#
|
998
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
999
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.tenant_path("[PROJECT]", "[TENANT]")
|
1000
|
-
#
|
1001
|
-
# # TODO: Initialize `request_metadata`:
|
1002
|
-
# request_metadata = {}
|
1003
|
-
#
|
1004
|
-
# # Iterate over all results.
|
1005
|
-
# job_client.search_jobs(formatted_parent, request_metadata).each do |element|
|
1006
|
-
# # Process element.
|
1007
|
-
# end
|
1008
|
-
#
|
1009
|
-
# # Or iterate over results one page at a time.
|
1010
|
-
# job_client.search_jobs(formatted_parent, request_metadata).each_page do |page|
|
1011
|
-
# # Process each page at a time.
|
1012
|
-
# page.each do |element|
|
1013
|
-
# # Process element.
|
1014
|
-
# end
|
1015
|
-
# end
|
1016
|
-
|
1017
|
-
def search_jobs \
|
1018
|
-
parent,
|
1019
|
-
request_metadata,
|
1020
|
-
search_mode: nil,
|
1021
|
-
job_query: nil,
|
1022
|
-
enable_broadening: nil,
|
1023
|
-
require_precise_result_size: nil,
|
1024
|
-
histogram_queries: nil,
|
1025
|
-
job_view: nil,
|
1026
|
-
offset: nil,
|
1027
|
-
page_size: nil,
|
1028
|
-
order_by: nil,
|
1029
|
-
diversification_level: nil,
|
1030
|
-
custom_ranking_info: nil,
|
1031
|
-
disable_keyword_match: nil,
|
1032
|
-
options: nil,
|
1033
|
-
&block
|
1034
|
-
req = {
|
1035
|
-
parent: parent,
|
1036
|
-
request_metadata: request_metadata,
|
1037
|
-
search_mode: search_mode,
|
1038
|
-
job_query: job_query,
|
1039
|
-
enable_broadening: enable_broadening,
|
1040
|
-
require_precise_result_size: require_precise_result_size,
|
1041
|
-
histogram_queries: histogram_queries,
|
1042
|
-
job_view: job_view,
|
1043
|
-
offset: offset,
|
1044
|
-
page_size: page_size,
|
1045
|
-
order_by: order_by,
|
1046
|
-
diversification_level: diversification_level,
|
1047
|
-
custom_ranking_info: custom_ranking_info,
|
1048
|
-
disable_keyword_match: disable_keyword_match
|
1049
|
-
}.delete_if { |_, v| v.nil? }
|
1050
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::SearchJobsRequest)
|
1051
|
-
@search_jobs.call(req, options, &block)
|
1052
|
-
end
|
1053
|
-
|
1054
|
-
# Searches for jobs using the provided
|
1055
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest SearchJobsRequest}.
|
1056
|
-
#
|
1057
|
-
# This API call is intended for the use case of targeting passive job
|
1058
|
-
# seekers (for example, job seekers who have signed up to receive email
|
1059
|
-
# alerts about potential job opportunities), and has different algorithmic
|
1060
|
-
# adjustments that are targeted to passive job seekers.
|
1061
|
-
#
|
1062
|
-
# This call constrains the
|
1063
|
-
# {Google::Cloud::Talent::V4beta1::Job#visibility visibility} of jobs present in
|
1064
|
-
# the database, and only returns jobs the caller has permission to search
|
1065
|
-
# against.
|
1066
|
-
#
|
1067
|
-
# @param parent [String]
|
1068
|
-
# Required. The resource name of the tenant to search within.
|
1069
|
-
#
|
1070
|
-
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
1071
|
-
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
1072
|
-
# is created. For example, "projects/foo".
|
1073
|
-
# @param request_metadata [Google::Cloud::Talent::V4beta1::RequestMetadata | Hash]
|
1074
|
-
# Required. The meta information collected about the job searcher, used to
|
1075
|
-
# improve the search quality of the service. The identifiers (such as
|
1076
|
-
# `user_id`) are provided by users, and must be unique and consistent.
|
1077
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::RequestMetadata`
|
1078
|
-
# can also be provided.
|
1079
|
-
# @param search_mode [Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode]
|
1080
|
-
# Mode of a search.
|
1081
|
-
#
|
1082
|
-
# Defaults to
|
1083
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest::SearchMode::JOB_SEARCH SearchMode::JOB_SEARCH}.
|
1084
|
-
# @param job_query [Google::Cloud::Talent::V4beta1::JobQuery | Hash]
|
1085
|
-
# Query used to search against jobs, such as keyword, location filters, etc.
|
1086
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::JobQuery`
|
1087
|
-
# can also be provided.
|
1088
|
-
# @param enable_broadening [true, false]
|
1089
|
-
# Controls whether to broaden the search when it produces sparse results.
|
1090
|
-
# Broadened queries append results to the end of the matching results
|
1091
|
-
# list.
|
1092
|
-
#
|
1093
|
-
# Defaults to false.
|
1094
|
-
# @param require_precise_result_size [true, false]
|
1095
|
-
# Controls if the search job request requires the return of a precise
|
1096
|
-
# count of the first 300 results. Setting this to `true` ensures
|
1097
|
-
# consistency in the number of results per page. Best practice is to set this
|
1098
|
-
# value to true if a client allows users to jump directly to a
|
1099
|
-
# non-sequential search results page.
|
1100
|
-
#
|
1101
|
-
# Enabling this flag may adversely impact performance.
|
1102
|
-
#
|
1103
|
-
# Defaults to false.
|
1104
|
-
# @param histogram_queries [Array<Google::Cloud::Talent::V4beta1::HistogramQuery | Hash>]
|
1105
|
-
# An expression specifies a histogram request against matching jobs.
|
1106
|
-
#
|
1107
|
-
# Expression syntax is an aggregation function call with histogram facets and
|
1108
|
-
# other options.
|
1109
|
-
#
|
1110
|
-
# Available aggregation function calls are:
|
1111
|
-
# * `count(string_histogram_facet)`: Count the number of matching entities,
|
1112
|
-
# for each distinct attribute value.
|
1113
|
-
# * `count(numeric_histogram_facet, list of buckets)`: Count the number of
|
1114
|
-
# matching entities within each bucket.
|
1115
|
-
#
|
1116
|
-
# Data types:
|
1117
|
-
#
|
1118
|
-
# * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
|
1119
|
-
# * String: string like "any string with backslash escape for quote(\")."
|
1120
|
-
# * Number: whole number and floating point number like 10, -1 and -0.01.
|
1121
|
-
# * List: list of elements with comma(,) separator surrounded by square
|
1122
|
-
# brackets, for example, [1, 2, 3] and ["one", "two", "three"].
|
1123
|
-
#
|
1124
|
-
# Built-in constants:
|
1125
|
-
#
|
1126
|
-
# * MIN (minimum number similar to java Double.MIN_VALUE)
|
1127
|
-
# * MAX (maximum number similar to java Double.MAX_VALUE)
|
1128
|
-
#
|
1129
|
-
# Built-in functions:
|
1130
|
-
#
|
1131
|
-
# * bucket(start, end[, label]): bucket built-in function creates a bucket
|
1132
|
-
# with range of [start, end). Note that the end is exclusive, for example,
|
1133
|
-
# bucket(1, MAX, "positive number") or bucket(1, 10).
|
1134
|
-
#
|
1135
|
-
# Job histogram facets:
|
1136
|
-
#
|
1137
|
-
# * company_display_name: histogram by
|
1138
|
-
# {Google::Cloud::Talent::V4beta1::Job#company_display_name Job#company_display_name}.
|
1139
|
-
# * employment_type: histogram by
|
1140
|
-
# {Google::Cloud::Talent::V4beta1::Job#employment_types Job#employment_types},
|
1141
|
-
# for example,
|
1142
|
-
# "FULL_TIME", "PART_TIME".
|
1143
|
-
# * company_size: histogram by
|
1144
|
-
# {Google::Cloud::Talent::V4beta1::CompanySize CompanySize}, for example,
|
1145
|
-
# "SMALL", "MEDIUM", "BIG".
|
1146
|
-
# * publish_time_in_month: histogram by the
|
1147
|
-
# {Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job#posting_publish_time}
|
1148
|
-
# in months.
|
1149
|
-
# Must specify list of numeric buckets in spec.
|
1150
|
-
# * publish_time_in_year: histogram by the
|
1151
|
-
# {Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job#posting_publish_time}
|
1152
|
-
# in years.
|
1153
|
-
# Must specify list of numeric buckets in spec.
|
1154
|
-
# * degree_types: histogram by the
|
1155
|
-
# {Google::Cloud::Talent::V4beta1::Job#degree_types Job#degree_types}, for
|
1156
|
-
# example,
|
1157
|
-
# "Bachelors", "Masters".
|
1158
|
-
# * job_level: histogram by the
|
1159
|
-
# {Google::Cloud::Talent::V4beta1::Job#job_level Job#job_level}, for example,
|
1160
|
-
# "Entry
|
1161
|
-
# Level".
|
1162
|
-
# * country: histogram by the country code of jobs, for example, "US", "FR".
|
1163
|
-
# * admin1: histogram by the admin1 code of jobs, which is a global
|
1164
|
-
# placeholder referring to the state, province, or the particular term a
|
1165
|
-
# country uses to define the geographic structure below the country level,
|
1166
|
-
# for example, "CA", "IL".
|
1167
|
-
# * city: histogram by a combination of the "city name, admin1 code". For
|
1168
|
-
# example, "Mountain View, CA", "New York, NY".
|
1169
|
-
# * admin1_country: histogram by a combination of the "admin1 code, country",
|
1170
|
-
# for example, "CA, US", "IL, US".
|
1171
|
-
# * city_coordinate: histogram by the city center's GPS coordinates (latitude
|
1172
|
-
# and longitude), for example, 37.4038522,-122.0987765. Since the
|
1173
|
-
# coordinates of a city center can change, customers may need to refresh
|
1174
|
-
# them periodically.
|
1175
|
-
# * locale: histogram by the
|
1176
|
-
# {Google::Cloud::Talent::V4beta1::Job#language_code Job#language_code}, for
|
1177
|
-
# example, "en-US",
|
1178
|
-
# "fr-FR".
|
1179
|
-
# * language: histogram by the language subtag of the
|
1180
|
-
# {Google::Cloud::Talent::V4beta1::Job#language_code Job#language_code},
|
1181
|
-
# for example, "en", "fr".
|
1182
|
-
# * category: histogram by the
|
1183
|
-
# {Google::Cloud::Talent::V4beta1::JobCategory JobCategory}, for example,
|
1184
|
-
# "COMPUTER_AND_IT", "HEALTHCARE".
|
1185
|
-
# * base_compensation_unit: histogram by the
|
1186
|
-
# {Google::Cloud::Talent::V4beta1::CompensationInfo::CompensationUnit CompensationInfo::CompensationUnit}
|
1187
|
-
# of base salary, for example, "WEEKLY", "MONTHLY".
|
1188
|
-
# * base_compensation: histogram by the base salary. Must specify list of
|
1189
|
-
# numeric buckets to group results by.
|
1190
|
-
# * annualized_base_compensation: histogram by the base annualized salary.
|
1191
|
-
# Must specify list of numeric buckets to group results by.
|
1192
|
-
# * annualized_total_compensation: histogram by the total annualized salary.
|
1193
|
-
# Must specify list of numeric buckets to group results by.
|
1194
|
-
# * string_custom_attribute: histogram by string
|
1195
|
-
# {Google::Cloud::Talent::V4beta1::Job#custom_attributes Job#custom_attributes}.
|
1196
|
-
# Values can be accessed via square bracket notations like
|
1197
|
-
# string_custom_attribute["key1"].
|
1198
|
-
# * numeric_custom_attribute: histogram by numeric
|
1199
|
-
# {Google::Cloud::Talent::V4beta1::Job#custom_attributes Job#custom_attributes}.
|
1200
|
-
# Values can be accessed via square bracket notations like
|
1201
|
-
# numeric_custom_attribute["key1"]. Must specify list of numeric buckets to
|
1202
|
-
# group results by.
|
1203
|
-
#
|
1204
|
-
# Example expressions:
|
1205
|
-
#
|
1206
|
-
# * `count(admin1)`
|
1207
|
-
# * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
|
1208
|
-
# bucket(100000, MAX)])`
|
1209
|
-
# * `count(string_custom_attribute["some-string-custom-attribute"])`
|
1210
|
-
# * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
|
1211
|
-
# [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
|
1212
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::HistogramQuery`
|
1213
|
-
# can also be provided.
|
1214
|
-
# @param job_view [Google::Cloud::Talent::V4beta1::JobView]
|
1215
|
-
# The desired job attributes returned for jobs in the search response.
|
1216
|
-
# Defaults to
|
1217
|
-
# {Google::Cloud::Talent::V4beta1::JobView::JOB_VIEW_SMALL JobView::JOB_VIEW_SMALL}
|
1218
|
-
# if no value is specified.
|
1219
|
-
# @param offset [Integer]
|
1220
|
-
# An integer that specifies the current offset (that is, starting result
|
1221
|
-
# location, amongst the jobs deemed by the API as relevant) in search
|
1222
|
-
# results. This field is only considered if
|
1223
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest#page_token page_token} is
|
1224
|
-
# unset.
|
1225
|
-
#
|
1226
|
-
# For example, 0 means to return results starting from the first matching
|
1227
|
-
# job, and 10 means to return from the 11th job. This can be used for
|
1228
|
-
# pagination, (for example, pageSize = 10 and offset = 10 means to return
|
1229
|
-
# from the second page).
|
1230
|
-
# @param page_size [Integer]
|
1231
|
-
# The maximum number of resources contained in the underlying API
|
1232
|
-
# response. If page streaming is performed per-resource, this
|
1233
|
-
# parameter does not affect the return value. If page streaming is
|
1234
|
-
# performed per-page, this determines the maximum number of
|
1235
|
-
# resources in a page.
|
1236
|
-
# @param order_by [String]
|
1237
|
-
# The criteria determining how search results are sorted. Default is
|
1238
|
-
# `"relevance desc"`.
|
1239
|
-
#
|
1240
|
-
# Supported options are:
|
1241
|
-
#
|
1242
|
-
# * `"relevance desc"`: By relevance descending, as determined by the API
|
1243
|
-
# algorithms. Relevance thresholding of query results is only available
|
1244
|
-
# with this ordering.
|
1245
|
-
# * `"posting_publish_time desc"`: By
|
1246
|
-
# {Google::Cloud::Talent::V4beta1::Job#posting_publish_time Job#posting_publish_time}
|
1247
|
-
# descending.
|
1248
|
-
# * `"posting_update_time desc"`: By
|
1249
|
-
# {Google::Cloud::Talent::V4beta1::Job#posting_update_time Job#posting_update_time}
|
1250
|
-
# descending.
|
1251
|
-
# * `"title"`: By {Google::Cloud::Talent::V4beta1::Job#title Job#title}
|
1252
|
-
# ascending.
|
1253
|
-
# * `"title desc"`: By {Google::Cloud::Talent::V4beta1::Job#title Job#title}
|
1254
|
-
# descending.
|
1255
|
-
# * `"annualized_base_compensation"`: By job's
|
1256
|
-
# {Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo#annualized_base_compensation_range}
|
1257
|
-
# ascending. Jobs whose annualized base compensation is unspecified are put
|
1258
|
-
# at the end of search results.
|
1259
|
-
# * `"annualized_base_compensation desc"`: By job's
|
1260
|
-
# {Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_base_compensation_range CompensationInfo#annualized_base_compensation_range}
|
1261
|
-
# descending. Jobs whose annualized base compensation is unspecified are
|
1262
|
-
# put at the end of search results.
|
1263
|
-
# * `"annualized_total_compensation"`: By job's
|
1264
|
-
# {Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo#annualized_total_compensation_range}
|
1265
|
-
# ascending. Jobs whose annualized base compensation is unspecified are put
|
1266
|
-
# at the end of search results.
|
1267
|
-
# * `"annualized_total_compensation desc"`: By job's
|
1268
|
-
# {Google::Cloud::Talent::V4beta1::CompensationInfo#annualized_total_compensation_range CompensationInfo#annualized_total_compensation_range}
|
1269
|
-
# descending. Jobs whose annualized base compensation is unspecified are
|
1270
|
-
# put at the end of search results.
|
1271
|
-
# * `"custom_ranking desc"`: By the relevance score adjusted to the
|
1272
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#ranking_expression SearchJobsRequest::CustomRankingInfo#ranking_expression}
|
1273
|
-
# with weight factor assigned by
|
1274
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo#importance_level SearchJobsRequest::CustomRankingInfo#importance_level}
|
1275
|
-
# in descending order.
|
1276
|
-
# * Location sorting: Use the special syntax to order jobs by distance:<br>
|
1277
|
-
# `"distance_from('Hawaii')"`: Order by distance from Hawaii.<br>
|
1278
|
-
# `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.<br>
|
1279
|
-
# `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by
|
1280
|
-
# multiple locations. See details below.<br>
|
1281
|
-
# `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by
|
1282
|
-
# multiple locations. See details below.<br>
|
1283
|
-
# The string can have a maximum of 256 characters. When multiple distance
|
1284
|
-
# centers are provided, a job that is close to any of the distance centers
|
1285
|
-
# would have a high rank. When a job has multiple locations, the job
|
1286
|
-
# location closest to one of the distance centers will be used. Jobs that
|
1287
|
-
# don't have locations will be ranked at the bottom. Distance is calculated
|
1288
|
-
# with a precision of 11.3 meters (37.4 feet). Diversification strategy is
|
1289
|
-
# still applied unless explicitly disabled in
|
1290
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest#diversification_level diversification_level}.
|
1291
|
-
# @param diversification_level [Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel]
|
1292
|
-
# Controls whether highly similar jobs are returned next to each other in
|
1293
|
-
# the search results. Jobs are identified as highly similar based on
|
1294
|
-
# their titles, job categories, and locations. Highly similar results are
|
1295
|
-
# clustered so that only one representative job of the cluster is
|
1296
|
-
# displayed to the job seeker higher up in the results, with the other jobs
|
1297
|
-
# being displayed lower down in the results.
|
1298
|
-
#
|
1299
|
-
# Defaults to
|
1300
|
-
# {Google::Cloud::Talent::V4beta1::SearchJobsRequest::DiversificationLevel::SIMPLE DiversificationLevel::SIMPLE}
|
1301
|
-
# if no value is specified.
|
1302
|
-
# @param custom_ranking_info [Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo | Hash]
|
1303
|
-
# Controls over how job documents get ranked on top of existing relevance
|
1304
|
-
# score (determined by API algorithm).
|
1305
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::SearchJobsRequest::CustomRankingInfo`
|
1306
|
-
# can also be provided.
|
1307
|
-
# @param disable_keyword_match [true, false]
|
1308
|
-
# Controls whether to disable exact keyword match on
|
1309
|
-
# {Google::Cloud::Talent::V4beta1::Job#title Job#title},
|
1310
|
-
# {Google::Cloud::Talent::V4beta1::Job#description Job#description},
|
1311
|
-
# {Google::Cloud::Talent::V4beta1::Job#company_display_name Job#company_display_name},
|
1312
|
-
# {Google::Cloud::Talent::V4beta1::Job#addresses Job#addresses},
|
1313
|
-
# {Google::Cloud::Talent::V4beta1::Job#qualifications Job#qualifications}. When
|
1314
|
-
# disable keyword match is turned off, a keyword match returns jobs that do
|
1315
|
-
# not match given category filters when there are matching keywords. For
|
1316
|
-
# example, for the query "program manager," a result is returned even if the
|
1317
|
-
# job posting has the title "software developer," which doesn't fall into
|
1318
|
-
# "program manager" ontology, but does have "program manager" appearing in
|
1319
|
-
# its description.
|
1320
|
-
#
|
1321
|
-
# For queries like "cloud" that don't contain title or
|
1322
|
-
# location specific ontology, jobs with "cloud" keyword matches are returned
|
1323
|
-
# regardless of this flag's value.
|
1324
|
-
#
|
1325
|
-
# Use
|
1326
|
-
# {Google::Cloud::Talent::V4beta1::Company#keyword_searchable_job_custom_attributes Company#keyword_searchable_job_custom_attributes}
|
1327
|
-
# if company-specific globally matched custom field/attribute string values
|
1328
|
-
# are needed. Enabling keyword match improves recall of subsequent search
|
1329
|
-
# requests.
|
1330
|
-
#
|
1331
|
-
# Defaults to false.
|
1332
|
-
# @param options [Google::Gax::CallOptions]
|
1333
|
-
# Overrides the default settings for this call, e.g, timeout,
|
1334
|
-
# retries, etc.
|
1335
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
1336
|
-
# @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::SearchJobsResponse::MatchingJob>]
|
1337
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1338
|
-
# @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::SearchJobsResponse::MatchingJob>]
|
1339
|
-
# An enumerable of Google::Cloud::Talent::V4beta1::SearchJobsResponse::MatchingJob instances.
|
1340
|
-
# See Google::Gax::PagedEnumerable documentation for other
|
1341
|
-
# operations such as per-page iteration or access to the response
|
1342
|
-
# object.
|
1343
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1344
|
-
# @example
|
1345
|
-
# require "google/cloud/talent"
|
1346
|
-
#
|
1347
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
1348
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.tenant_path("[PROJECT]", "[TENANT]")
|
1349
|
-
#
|
1350
|
-
# # TODO: Initialize `request_metadata`:
|
1351
|
-
# request_metadata = {}
|
1352
|
-
#
|
1353
|
-
# # Iterate over all results.
|
1354
|
-
# job_client.search_jobs_for_alert(formatted_parent, request_metadata).each do |element|
|
1355
|
-
# # Process element.
|
1356
|
-
# end
|
1357
|
-
#
|
1358
|
-
# # Or iterate over results one page at a time.
|
1359
|
-
# job_client.search_jobs_for_alert(formatted_parent, request_metadata).each_page do |page|
|
1360
|
-
# # Process each page at a time.
|
1361
|
-
# page.each do |element|
|
1362
|
-
# # Process element.
|
1363
|
-
# end
|
1364
|
-
# end
|
1365
|
-
|
1366
|
-
def search_jobs_for_alert \
|
1367
|
-
parent,
|
1368
|
-
request_metadata,
|
1369
|
-
search_mode: nil,
|
1370
|
-
job_query: nil,
|
1371
|
-
enable_broadening: nil,
|
1372
|
-
require_precise_result_size: nil,
|
1373
|
-
histogram_queries: nil,
|
1374
|
-
job_view: nil,
|
1375
|
-
offset: nil,
|
1376
|
-
page_size: nil,
|
1377
|
-
order_by: nil,
|
1378
|
-
diversification_level: nil,
|
1379
|
-
custom_ranking_info: nil,
|
1380
|
-
disable_keyword_match: nil,
|
1381
|
-
options: nil,
|
1382
|
-
&block
|
1383
|
-
req = {
|
1384
|
-
parent: parent,
|
1385
|
-
request_metadata: request_metadata,
|
1386
|
-
search_mode: search_mode,
|
1387
|
-
job_query: job_query,
|
1388
|
-
enable_broadening: enable_broadening,
|
1389
|
-
require_precise_result_size: require_precise_result_size,
|
1390
|
-
histogram_queries: histogram_queries,
|
1391
|
-
job_view: job_view,
|
1392
|
-
offset: offset,
|
1393
|
-
page_size: page_size,
|
1394
|
-
order_by: order_by,
|
1395
|
-
diversification_level: diversification_level,
|
1396
|
-
custom_ranking_info: custom_ranking_info,
|
1397
|
-
disable_keyword_match: disable_keyword_match
|
1398
|
-
}.delete_if { |_, v| v.nil? }
|
1399
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::SearchJobsRequest)
|
1400
|
-
@search_jobs_for_alert.call(req, options, &block)
|
1401
|
-
end
|
1402
|
-
|
1403
|
-
# Begins executing a batch create jobs operation.
|
1404
|
-
#
|
1405
|
-
# @param parent [String]
|
1406
|
-
# Required. The resource name of the tenant under which the job is created.
|
1407
|
-
#
|
1408
|
-
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
1409
|
-
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
1410
|
-
# is created. For example, "projects/foo".
|
1411
|
-
# @param jobs [Array<Google::Cloud::Talent::V4beta1::Job | Hash>]
|
1412
|
-
# Required. The jobs to be created.
|
1413
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Job`
|
1414
|
-
# can also be provided.
|
1415
|
-
# @param options [Google::Gax::CallOptions]
|
1416
|
-
# Overrides the default settings for this call, e.g, timeout,
|
1417
|
-
# retries, etc.
|
1418
|
-
# @return [Google::Gax::Operation]
|
1419
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1420
|
-
# @example
|
1421
|
-
# require "google/cloud/talent"
|
1422
|
-
#
|
1423
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
1424
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.tenant_path("[PROJECT]", "[TENANT]")
|
1425
|
-
#
|
1426
|
-
# # TODO: Initialize `jobs`:
|
1427
|
-
# jobs = []
|
1428
|
-
#
|
1429
|
-
# # Register a callback during the method call.
|
1430
|
-
# operation = job_client.batch_create_jobs(formatted_parent, jobs) do |op|
|
1431
|
-
# raise op.results.message if op.error?
|
1432
|
-
# op_results = op.results
|
1433
|
-
# # Process the results.
|
1434
|
-
#
|
1435
|
-
# metadata = op.metadata
|
1436
|
-
# # Process the metadata.
|
1437
|
-
# end
|
1438
|
-
#
|
1439
|
-
# # Or use the return value to register a callback.
|
1440
|
-
# operation.on_done do |op|
|
1441
|
-
# raise op.results.message if op.error?
|
1442
|
-
# op_results = op.results
|
1443
|
-
# # Process the results.
|
1444
|
-
#
|
1445
|
-
# metadata = op.metadata
|
1446
|
-
# # Process the metadata.
|
1447
|
-
# end
|
1448
|
-
#
|
1449
|
-
# # Manually reload the operation.
|
1450
|
-
# operation.reload!
|
1451
|
-
#
|
1452
|
-
# # Or block until the operation completes, triggering callbacks on
|
1453
|
-
# # completion.
|
1454
|
-
# operation.wait_until_done!
|
1455
|
-
|
1456
|
-
def batch_create_jobs \
|
1457
|
-
parent,
|
1458
|
-
jobs,
|
1459
|
-
options: nil
|
1460
|
-
req = {
|
1461
|
-
parent: parent,
|
1462
|
-
jobs: jobs
|
1463
|
-
}.delete_if { |_, v| v.nil? }
|
1464
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::BatchCreateJobsRequest)
|
1465
|
-
operation = Google::Gax::Operation.new(
|
1466
|
-
@batch_create_jobs.call(req, options),
|
1467
|
-
@operations_client,
|
1468
|
-
Google::Cloud::Talent::V4beta1::JobOperationResult,
|
1469
|
-
Google::Cloud::Talent::V4beta1::BatchOperationMetadata,
|
1470
|
-
call_options: options
|
1471
|
-
)
|
1472
|
-
operation.on_done { |operation| yield(operation) } if block_given?
|
1473
|
-
operation
|
1474
|
-
end
|
1475
|
-
|
1476
|
-
# Begins executing a batch update jobs operation.
|
1477
|
-
#
|
1478
|
-
# @param parent [String]
|
1479
|
-
# Required. The resource name of the tenant under which the job is created.
|
1480
|
-
#
|
1481
|
-
# The format is "projects/{project_id}/tenants/{tenant_id}". For example,
|
1482
|
-
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
1483
|
-
# is created. For example, "projects/foo".
|
1484
|
-
# @param jobs [Array<Google::Cloud::Talent::V4beta1::Job | Hash>]
|
1485
|
-
# Required. The jobs to be updated.
|
1486
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Job`
|
1487
|
-
# can also be provided.
|
1488
|
-
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
1489
|
-
# Strongly recommended for the best service experience. Be aware that it will
|
1490
|
-
# also increase latency when checking the status of a batch operation.
|
1491
|
-
#
|
1492
|
-
# If
|
1493
|
-
# {Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask}
|
1494
|
-
# is provided, only the specified fields in
|
1495
|
-
# {Google::Cloud::Talent::V4beta1::Job Job} are updated. Otherwise all the
|
1496
|
-
# fields are updated.
|
1497
|
-
#
|
1498
|
-
# A field mask to restrict the fields that are updated. Only
|
1499
|
-
# top level fields of {Google::Cloud::Talent::V4beta1::Job Job} are supported.
|
1500
|
-
#
|
1501
|
-
# If
|
1502
|
-
# {Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest#update_mask update_mask}
|
1503
|
-
# is provided, The {Google::Cloud::Talent::V4beta1::Job Job} inside
|
1504
|
-
# {Google::Cloud::Talent::V4beta1::JobOperationResult::JobResult JobResult}
|
1505
|
-
# will only contains fields that is updated, plus the Id of the Job.
|
1506
|
-
# Otherwise, {Google::Cloud::Talent::V4beta1::Job Job} will include all fields,
|
1507
|
-
# which can yield a very large response.
|
1508
|
-
# A hash of the same form as `Google::Protobuf::FieldMask`
|
1509
|
-
# can also be provided.
|
1510
|
-
# @param options [Google::Gax::CallOptions]
|
1511
|
-
# Overrides the default settings for this call, e.g, timeout,
|
1512
|
-
# retries, etc.
|
1513
|
-
# @return [Google::Gax::Operation]
|
1514
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1515
|
-
# @example
|
1516
|
-
# require "google/cloud/talent"
|
1517
|
-
#
|
1518
|
-
# job_client = Google::Cloud::Talent::JobService.new(version: :v4beta1)
|
1519
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::JobServiceClient.tenant_path("[PROJECT]", "[TENANT]")
|
1520
|
-
#
|
1521
|
-
# # TODO: Initialize `jobs`:
|
1522
|
-
# jobs = []
|
1523
|
-
#
|
1524
|
-
# # Register a callback during the method call.
|
1525
|
-
# operation = job_client.batch_update_jobs(formatted_parent, jobs) do |op|
|
1526
|
-
# raise op.results.message if op.error?
|
1527
|
-
# op_results = op.results
|
1528
|
-
# # Process the results.
|
1529
|
-
#
|
1530
|
-
# metadata = op.metadata
|
1531
|
-
# # Process the metadata.
|
1532
|
-
# end
|
1533
|
-
#
|
1534
|
-
# # Or use the return value to register a callback.
|
1535
|
-
# operation.on_done do |op|
|
1536
|
-
# raise op.results.message if op.error?
|
1537
|
-
# op_results = op.results
|
1538
|
-
# # Process the results.
|
1539
|
-
#
|
1540
|
-
# metadata = op.metadata
|
1541
|
-
# # Process the metadata.
|
1542
|
-
# end
|
1543
|
-
#
|
1544
|
-
# # Manually reload the operation.
|
1545
|
-
# operation.reload!
|
1546
|
-
#
|
1547
|
-
# # Or block until the operation completes, triggering callbacks on
|
1548
|
-
# # completion.
|
1549
|
-
# operation.wait_until_done!
|
1550
|
-
|
1551
|
-
def batch_update_jobs \
|
1552
|
-
parent,
|
1553
|
-
jobs,
|
1554
|
-
update_mask: nil,
|
1555
|
-
options: nil
|
1556
|
-
req = {
|
1557
|
-
parent: parent,
|
1558
|
-
jobs: jobs,
|
1559
|
-
update_mask: update_mask
|
1560
|
-
}.delete_if { |_, v| v.nil? }
|
1561
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::BatchUpdateJobsRequest)
|
1562
|
-
operation = Google::Gax::Operation.new(
|
1563
|
-
@batch_update_jobs.call(req, options),
|
1564
|
-
@operations_client,
|
1565
|
-
Google::Cloud::Talent::V4beta1::JobOperationResult,
|
1566
|
-
Google::Cloud::Talent::V4beta1::BatchOperationMetadata,
|
1567
|
-
call_options: options
|
1568
|
-
)
|
1569
|
-
operation.on_done { |operation| yield(operation) } if block_given?
|
1570
|
-
operation
|
1571
|
-
end
|
1572
|
-
end
|
1573
|
-
end
|
1574
|
-
end
|
1575
|
-
end
|
1576
|
-
end
|