google-cloud-talent 0.10.0 → 1.1.0

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