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,765 +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/profile_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
-
28
- require "google/cloud/talent/v4beta1/profile_service_pb"
29
- require "google/cloud/talent/v4beta1/credentials"
30
- require "google/cloud/talent/version"
31
-
32
- module Google
33
- module Cloud
34
- module Talent
35
- module V4beta1
36
- # A service that handles profile management, including profile CRUD,
37
- # enumeration and search.
38
- #
39
- # @!attribute [r] profile_service_stub
40
- # @return [Google::Cloud::Talent::V4beta1::ProfileService::Stub]
41
- class ProfileServiceClient
42
- # @private
43
- attr_reader :profile_service_stub
44
-
45
- # The default address of the service.
46
- SERVICE_ADDRESS = "jobs.googleapis.com".freeze
47
-
48
- # The default port of the service.
49
- DEFAULT_SERVICE_PORT = 443
50
-
51
- # The default set of gRPC interceptors.
52
- GRPC_INTERCEPTORS = []
53
-
54
- DEFAULT_TIMEOUT = 30
55
-
56
- PAGE_DESCRIPTORS = {
57
- "search_profiles" => Google::Gax::PageDescriptor.new(
58
- "page_token",
59
- "next_page_token",
60
- "summarized_profiles"),
61
- "list_profiles" => Google::Gax::PageDescriptor.new(
62
- "page_token",
63
- "next_page_token",
64
- "profiles")
65
- }.freeze
66
-
67
- private_constant :PAGE_DESCRIPTORS
68
-
69
- # The scopes needed to make gRPC calls to all of the methods defined in
70
- # this service.
71
- ALL_SCOPES = [
72
- "https://www.googleapis.com/auth/cloud-platform",
73
- "https://www.googleapis.com/auth/jobs"
74
- ].freeze
75
-
76
-
77
- PROFILE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
78
- "projects/{project}/tenants/{tenant}/profiles/{profile}"
79
- )
80
-
81
- private_constant :PROFILE_PATH_TEMPLATE
82
-
83
- TENANT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
84
- "projects/{project}/tenants/{tenant}"
85
- )
86
-
87
- private_constant :TENANT_PATH_TEMPLATE
88
-
89
- # Returns a fully-qualified profile resource name string.
90
- # @param project [String]
91
- # @param tenant [String]
92
- # @param profile [String]
93
- # @return [String]
94
- def self.profile_path project, tenant, profile
95
- PROFILE_PATH_TEMPLATE.render(
96
- :"project" => project,
97
- :"tenant" => tenant,
98
- :"profile" => profile
99
- )
100
- end
101
-
102
- # Returns a fully-qualified tenant resource name string.
103
- # @param project [String]
104
- # @param tenant [String]
105
- # @return [String]
106
- def self.tenant_path project, tenant
107
- TENANT_PATH_TEMPLATE.render(
108
- :"project" => project,
109
- :"tenant" => tenant
110
- )
111
- end
112
-
113
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
114
- # Provides the means for authenticating requests made by the client. This parameter can
115
- # be many types.
116
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
117
- # authenticating requests made by this client.
118
- # A `String` will be treated as the path to the keyfile to be used for the construction of
119
- # credentials for this client.
120
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
121
- # credentials for this client.
122
- # A `GRPC::Core::Channel` will be used to make calls through.
123
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
124
- # should already be composed with a `GRPC::Core::CallCredentials` object.
125
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
126
- # metadata for requests, generally, to give OAuth credentials.
127
- # @param scopes [Array<String>]
128
- # The OAuth scopes for this service. This parameter is ignored if
129
- # an updater_proc is supplied.
130
- # @param client_config [Hash]
131
- # A Hash for call options for each method. See
132
- # Google::Gax#construct_settings for the structure of
133
- # this data. Falls back to the default config if not specified
134
- # or the specified config is missing data points.
135
- # @param timeout [Numeric]
136
- # The default timeout, in seconds, for calls made through this client.
137
- # @param metadata [Hash]
138
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
139
- # @param service_address [String]
140
- # Override for the service hostname, or `nil` to leave as the default.
141
- # @param service_port [Integer]
142
- # Override for the service port, or `nil` to leave as the default.
143
- # @param exception_transformer [Proc]
144
- # An optional proc that intercepts any exceptions raised during an API call to inject
145
- # custom error handling.
146
- def initialize \
147
- credentials: nil,
148
- scopes: ALL_SCOPES,
149
- client_config: {},
150
- timeout: DEFAULT_TIMEOUT,
151
- metadata: nil,
152
- service_address: nil,
153
- service_port: nil,
154
- exception_transformer: nil,
155
- lib_name: nil,
156
- lib_version: ""
157
- # These require statements are intentionally placed here to initialize
158
- # the gRPC module only when it's required.
159
- # See https://github.com/googleapis/toolkit/issues/446
160
- require "google/gax/grpc"
161
- require "google/cloud/talent/v4beta1/profile_service_services_pb"
162
-
163
- credentials ||= Google::Cloud::Talent::V4beta1::Credentials.default
164
-
165
- if credentials.is_a?(String) || credentials.is_a?(Hash)
166
- updater_proc = Google::Cloud::Talent::V4beta1::Credentials.new(credentials).updater_proc
167
- end
168
- if credentials.is_a?(GRPC::Core::Channel)
169
- channel = credentials
170
- end
171
- if credentials.is_a?(GRPC::Core::ChannelCredentials)
172
- chan_creds = credentials
173
- end
174
- if credentials.is_a?(Proc)
175
- updater_proc = credentials
176
- end
177
- if credentials.is_a?(Google::Auth::Credentials)
178
- updater_proc = credentials.updater_proc
179
- end
180
-
181
- package_version = Google::Cloud::Talent::VERSION
182
-
183
- google_api_client = "gl-ruby/#{RUBY_VERSION}"
184
- google_api_client << " #{lib_name}/#{lib_version}" if lib_name
185
- google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
186
- google_api_client << " grpc/#{GRPC::VERSION}"
187
- google_api_client.freeze
188
-
189
- headers = { :"x-goog-api-client" => google_api_client }
190
- if credentials.respond_to?(:quota_project_id) && credentials.quota_project_id
191
- headers[:"x-goog-user-project"] = credentials.quota_project_id
192
- end
193
- headers.merge!(metadata) unless metadata.nil?
194
- client_config_file = Pathname.new(__dir__).join(
195
- "profile_service_client_config.json"
196
- )
197
- defaults = client_config_file.open do |f|
198
- Google::Gax.construct_settings(
199
- "google.cloud.talent.v4beta1.ProfileService",
200
- JSON.parse(f.read),
201
- client_config,
202
- Google::Gax::Grpc::STATUS_CODE_NAMES,
203
- timeout,
204
- page_descriptors: PAGE_DESCRIPTORS,
205
- errors: Google::Gax::Grpc::API_ERRORS,
206
- metadata: headers
207
- )
208
- end
209
-
210
- # Allow overriding the service path/port in subclasses.
211
- service_path = service_address || self.class::SERVICE_ADDRESS
212
- port = service_port || self.class::DEFAULT_SERVICE_PORT
213
- interceptors = self.class::GRPC_INTERCEPTORS
214
- @profile_service_stub = Google::Gax::Grpc.create_stub(
215
- service_path,
216
- port,
217
- chan_creds: chan_creds,
218
- channel: channel,
219
- updater_proc: updater_proc,
220
- scopes: scopes,
221
- interceptors: interceptors,
222
- &Google::Cloud::Talent::V4beta1::ProfileService::Stub.method(:new)
223
- )
224
-
225
- @delete_profile = Google::Gax.create_api_call(
226
- @profile_service_stub.method(:delete_profile),
227
- defaults["delete_profile"],
228
- exception_transformer: exception_transformer,
229
- params_extractor: proc do |request|
230
- {'name' => request.name}
231
- end
232
- )
233
- @search_profiles = Google::Gax.create_api_call(
234
- @profile_service_stub.method(:search_profiles),
235
- defaults["search_profiles"],
236
- exception_transformer: exception_transformer,
237
- params_extractor: proc do |request|
238
- {'parent' => request.parent}
239
- end
240
- )
241
- @list_profiles = Google::Gax.create_api_call(
242
- @profile_service_stub.method(:list_profiles),
243
- defaults["list_profiles"],
244
- exception_transformer: exception_transformer,
245
- params_extractor: proc do |request|
246
- {'parent' => request.parent}
247
- end
248
- )
249
- @create_profile = Google::Gax.create_api_call(
250
- @profile_service_stub.method(:create_profile),
251
- defaults["create_profile"],
252
- exception_transformer: exception_transformer,
253
- params_extractor: proc do |request|
254
- {'parent' => request.parent}
255
- end
256
- )
257
- @get_profile = Google::Gax.create_api_call(
258
- @profile_service_stub.method(:get_profile),
259
- defaults["get_profile"],
260
- exception_transformer: exception_transformer,
261
- params_extractor: proc do |request|
262
- {'name' => request.name}
263
- end
264
- )
265
- @update_profile = Google::Gax.create_api_call(
266
- @profile_service_stub.method(:update_profile),
267
- defaults["update_profile"],
268
- exception_transformer: exception_transformer,
269
- params_extractor: proc do |request|
270
- {'profile.name' => request.profile.name}
271
- end
272
- )
273
- end
274
-
275
- # Service calls
276
-
277
- # Deletes the specified profile.
278
- # Prerequisite: The profile has no associated applications or assignments
279
- # associated.
280
- #
281
- # @param name [String]
282
- # Required. Resource name of the profile to be deleted.
283
- #
284
- # The format is
285
- # "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". For
286
- # example, "projects/foo/tenants/bar/profiles/baz".
287
- # @param options [Google::Gax::CallOptions]
288
- # Overrides the default settings for this call, e.g, timeout,
289
- # retries, etc.
290
- # @yield [result, operation] Access the result along with the RPC operation
291
- # @yieldparam result []
292
- # @yieldparam operation [GRPC::ActiveCall::Operation]
293
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
294
- # @example
295
- # require "google/cloud/talent"
296
- #
297
- # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
298
- # formatted_name = Google::Cloud::Talent::V4beta1::ProfileServiceClient.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]")
299
- # profile_client.delete_profile(formatted_name)
300
-
301
- def delete_profile \
302
- name,
303
- options: nil,
304
- &block
305
- req = {
306
- name: name
307
- }.delete_if { |_, v| v.nil? }
308
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::DeleteProfileRequest)
309
- @delete_profile.call(req, options, &block)
310
- nil
311
- end
312
-
313
- # Searches for profiles within a tenant.
314
- #
315
- # For example, search by raw queries "software engineer in Mountain View" or
316
- # search by structured filters (location filter, education filter, etc.).
317
- #
318
- # See {Google::Cloud::Talent::V4beta1::SearchProfilesRequest SearchProfilesRequest} for more information.
319
- #
320
- # @param parent [String]
321
- # Required. The resource name of the tenant to search within.
322
- #
323
- # The format is "projects/{project_id}/tenants/{tenant_id}". For example,
324
- # "projects/foo/tenants/bar".
325
- # @param request_metadata [Google::Cloud::Talent::V4beta1::RequestMetadata | Hash]
326
- # Required. The meta information collected about the profile search user. This is used
327
- # to improve the search quality of the service. These values are provided by
328
- # users, and must be precise and consistent.
329
- # A hash of the same form as `Google::Cloud::Talent::V4beta1::RequestMetadata`
330
- # can also be provided.
331
- # @param profile_query [Google::Cloud::Talent::V4beta1::ProfileQuery | Hash]
332
- # Search query to execute. See {Google::Cloud::Talent::V4beta1::ProfileQuery ProfileQuery} for more details.
333
- # A hash of the same form as `Google::Cloud::Talent::V4beta1::ProfileQuery`
334
- # can also be provided.
335
- # @param page_size [Integer]
336
- # The maximum number of resources contained in the underlying API
337
- # response. If page streaming is performed per-resource, this
338
- # parameter does not affect the return value. If page streaming is
339
- # performed per-page, this determines the maximum number of
340
- # resources in a page.
341
- # @param offset [Integer]
342
- # An integer that specifies the current offset (that is, starting result) in
343
- # search results. This field is only considered if {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#page_token page_token} is unset.
344
- #
345
- # The maximum allowed value is 5000. Otherwise an error is thrown.
346
- #
347
- # For example, 0 means to search from the first profile, and 10 means to
348
- # search from the 11th profile. This can be used for pagination, for example
349
- # pageSize = 10 and offset = 10 means to search from the second page.
350
- # @param disable_spell_check [true, false]
351
- # This flag controls the spell-check feature. If `false`, the
352
- # service attempts to correct a misspelled query.
353
- #
354
- # For example, "enginee" is corrected to "engineer".
355
- # @param order_by [String]
356
- # The criteria that determines how search results are sorted.
357
- # Defaults is "relevance desc" if no value is specified.
358
- #
359
- # Supported options are:
360
- #
361
- # * "relevance desc": By descending relevance, as determined by the API
362
- # algorithms.
363
- # * "update_date desc": Sort by {Google::Cloud::Talent::V4beta1::Profile#update_time Profile#update_time} in descending order
364
- # (recently updated profiles first).
365
- # * "create_date desc": Sort by {Google::Cloud::Talent::V4beta1::Profile#create_time Profile#create_time} in descending order
366
- # (recently created profiles first).
367
- # * "first_name": Sort by {Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#given_name PersonName::PersonStructuredName#given_name} in
368
- # ascending order.
369
- # * "first_name desc": Sort by {Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#given_name PersonName::PersonStructuredName#given_name}
370
- # in descending order.
371
- # * "last_name": Sort by {Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#family_name PersonName::PersonStructuredName#family_name} in
372
- # ascending order.
373
- # * "last_name desc": Sort by {Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#family_name PersonName::PersonStructuredName#family_name}
374
- # in ascending order.
375
- # @param case_sensitive_sort [true, false]
376
- # When sort by field is based on alphabetical order, sort values case
377
- # sensitively (based on ASCII) when the value is set to true. Default value
378
- # is case in-sensitive sort (false).
379
- # @param histogram_queries [Array<Google::Cloud::Talent::V4beta1::HistogramQuery | Hash>]
380
- # A list of expressions specifies histogram requests against matching
381
- # profiles for {Google::Cloud::Talent::V4beta1::SearchProfilesRequest SearchProfilesRequest}.
382
- #
383
- # The expression syntax looks like a function definition with parameters.
384
- #
385
- # Function syntax: function_name(histogram_facet[, list of buckets])
386
- #
387
- # Data types:
388
- #
389
- # * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
390
- # * String: string like "any string with backslash escape for quote(\")."
391
- # * Number: whole number and floating point number like 10, -1 and -0.01.
392
- # * List: list of elements with comma(,) separator surrounded by square
393
- # brackets. For example, [1, 2, 3] and ["one", "two", "three"].
394
- #
395
- # Built-in constants:
396
- #
397
- # * MIN (minimum number similar to java Double.MIN_VALUE)
398
- # * MAX (maximum number similar to java Double.MAX_VALUE)
399
- #
400
- # Built-in functions:
401
- #
402
- # * bucket(start, end[, label])
403
- # Bucket build-in function creates a bucket with range of [start, end). Note
404
- # that the end is exclusive.
405
- # For example, bucket(1, MAX, "positive number") or bucket(1, 10).
406
- #
407
- # Histogram Facets:
408
- #
409
- # * admin1: Admin1 is a global placeholder for referring to state, province,
410
- # or the particular term a country uses to define the geographic structure
411
- # below the country level. Examples include states codes such as "CA", "IL",
412
- # "NY", and provinces, such as "BC".
413
- # * locality: Locality is a global placeholder for referring to city, town,
414
- # or the particular term a country uses to define the geographic structure
415
- # below the admin1 level. Examples include city names such as
416
- # "Mountain View" and "New York".
417
- # * extended_locality: Extended locality is concatenated version of admin1
418
- # and locality with comma separator. For example, "Mountain View, CA" and
419
- # "New York, NY".
420
- # * postal_code: Postal code of profile which follows locale code.
421
- # * country: Country code (ISO-3166-1 alpha-2 code) of profile, such as US,
422
- # JP, GB.
423
- # * job_title: Normalized job titles specified in EmploymentHistory.
424
- # * company_name: Normalized company name of profiles to match on.
425
- # * institution: The school name. For example, "MIT",
426
- # "University of California, Berkeley"
427
- # * degree: Highest education degree in ISCED code. Each value in degree
428
- # covers a specific level of education, without any expansion to upper nor
429
- # lower levels of education degree.
430
- # * experience_in_months: experience in months. 0 means 0 month to 1 month
431
- # (exclusive).
432
- # * application_date: The application date specifies application start dates.
433
- # See {Google::Cloud::Talent::V4beta1::ApplicationDateFilter ApplicationDateFilter} for more details.
434
- # * application_outcome_notes: The application outcome reason specifies the
435
- # reasons behind the outcome of the job application.
436
- # See {Google::Cloud::Talent::V4beta1::ApplicationOutcomeNotesFilter ApplicationOutcomeNotesFilter} for more details.
437
- # * application_job_title: The application job title specifies the job
438
- # applied for in the application.
439
- # See {Google::Cloud::Talent::V4beta1::ApplicationJobFilter ApplicationJobFilter} for more details.
440
- # * hirable_status: Hirable status specifies the profile's hirable status.
441
- # * string_custom_attribute: String custom attributes. Values can be accessed
442
- # via square bracket notation like string_custom_attribute["key1"].
443
- # * numeric_custom_attribute: Numeric custom attributes. Values can be
444
- # accessed via square bracket notation like numeric_custom_attribute["key1"].
445
- #
446
- # Example expressions:
447
- #
448
- # * count(admin1)
449
- # * count(experience_in_months, [bucket(0, 12, "1 year"),
450
- # bucket(12, 36, "1-3 years"), bucket(36, MAX, "3+ years")])
451
- # * count(string_custom_attribute["assigned_recruiter"])
452
- # * count(numeric_custom_attribute["favorite_number"],
453
- # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])
454
- # A hash of the same form as `Google::Cloud::Talent::V4beta1::HistogramQuery`
455
- # can also be provided.
456
- # @param result_set_id [String]
457
- # An id that uniquely identifies the result set of a
458
- # {Google::Cloud::Talent::V4beta1::ProfileService::SearchProfiles SearchProfiles} call. The id should be
459
- # retrieved from the
460
- # {Google::Cloud::Talent::V4beta1::SearchProfilesResponse SearchProfilesResponse} message returned from a previous
461
- # invocation of {Google::Cloud::Talent::V4beta1::ProfileService::SearchProfiles SearchProfiles}.
462
- #
463
- # A result set is an ordered list of search results.
464
- #
465
- # If this field is not set, a new result set is computed based on the
466
- # {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#profile_query profile_query}. A new {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#result_set_id result_set_id} is returned as a handle to
467
- # access this result set.
468
- #
469
- # If this field is set, the service will ignore the resource and
470
- # {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#profile_query profile_query} values, and simply retrieve a page of results from the
471
- # corresponding result set. In this case, one and only one of {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#page_token page_token}
472
- # or {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#offset offset} must be set.
473
- #
474
- # A typical use case is to invoke {Google::Cloud::Talent::V4beta1::SearchProfilesRequest SearchProfilesRequest} without this
475
- # field, then use the resulting {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#result_set_id result_set_id} in
476
- # {Google::Cloud::Talent::V4beta1::SearchProfilesResponse SearchProfilesResponse} to page through the results.
477
- # @param strict_keywords_search [true, false]
478
- # This flag is used to indicate whether the service will attempt to
479
- # understand synonyms and terms related to the search query or treat the
480
- # query "as is" when it generates a set of results. By default this flag is
481
- # set to false, thus allowing expanded results to also be returned. For
482
- # example a search for "software engineer" might also return candidates who
483
- # have experience in jobs similar to software engineer positions. By setting
484
- # this flag to true, the service will only attempt to deliver candidates has
485
- # software engineer in his/her global fields by treating "software engineer"
486
- # as a keyword.
487
- #
488
- # It is recommended to provide a feature in the UI (such as a checkbox) to
489
- # allow recruiters to set this flag to true if they intend to search for
490
- # longer boolean strings.
491
- # @param options [Google::Gax::CallOptions]
492
- # Overrides the default settings for this call, e.g, timeout,
493
- # retries, etc.
494
- # @yield [result, operation] Access the result along with the RPC operation
495
- # @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::SummarizedProfile>]
496
- # @yieldparam operation [GRPC::ActiveCall::Operation]
497
- # @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::SummarizedProfile>]
498
- # An enumerable of Google::Cloud::Talent::V4beta1::SummarizedProfile instances.
499
- # See Google::Gax::PagedEnumerable documentation for other
500
- # operations such as per-page iteration or access to the response
501
- # object.
502
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
503
- # @example
504
- # require "google/cloud/talent"
505
- #
506
- # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
507
- # formatted_parent = Google::Cloud::Talent::V4beta1::ProfileServiceClient.tenant_path("[PROJECT]", "[TENANT]")
508
- #
509
- # # TODO: Initialize `request_metadata`:
510
- # request_metadata = {}
511
- #
512
- # # Iterate over all results.
513
- # profile_client.search_profiles(formatted_parent, request_metadata).each do |element|
514
- # # Process element.
515
- # end
516
- #
517
- # # Or iterate over results one page at a time.
518
- # profile_client.search_profiles(formatted_parent, request_metadata).each_page do |page|
519
- # # Process each page at a time.
520
- # page.each do |element|
521
- # # Process element.
522
- # end
523
- # end
524
-
525
- def search_profiles \
526
- parent,
527
- request_metadata,
528
- profile_query: nil,
529
- page_size: nil,
530
- offset: nil,
531
- disable_spell_check: nil,
532
- order_by: nil,
533
- case_sensitive_sort: nil,
534
- histogram_queries: nil,
535
- result_set_id: nil,
536
- strict_keywords_search: nil,
537
- options: nil,
538
- &block
539
- req = {
540
- parent: parent,
541
- request_metadata: request_metadata,
542
- profile_query: profile_query,
543
- page_size: page_size,
544
- offset: offset,
545
- disable_spell_check: disable_spell_check,
546
- order_by: order_by,
547
- case_sensitive_sort: case_sensitive_sort,
548
- histogram_queries: histogram_queries,
549
- result_set_id: result_set_id,
550
- strict_keywords_search: strict_keywords_search
551
- }.delete_if { |_, v| v.nil? }
552
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::SearchProfilesRequest)
553
- @search_profiles.call(req, options, &block)
554
- end
555
-
556
- # Lists profiles by filter. The order is unspecified.
557
- #
558
- # @param parent [String]
559
- # Required. The resource name of the tenant under which the profile is created.
560
- #
561
- # The format is "projects/{project_id}/tenants/{tenant_id}". For example,
562
- # "projects/foo/tenants/bar".
563
- # @param filter [String]
564
- # The filter string specifies the profiles to be enumerated.
565
- #
566
- # Supported operator: =, AND
567
- #
568
- # The field(s) eligible for filtering are:
569
- #
570
- # * `externalId`
571
- # * `groupId`
572
- #
573
- # externalId and groupId cannot be specified at the same time. If both
574
- # externalId and groupId are provided, the API will return a bad request
575
- # error.
576
- #
577
- # Sample Query:
578
- #
579
- # * externalId = "externalId-1"
580
- # * groupId = "groupId-1"
581
- # @param page_size [Integer]
582
- # The maximum number of resources contained in the underlying API
583
- # response. If page streaming is performed per-resource, this
584
- # parameter does not affect the return value. If page streaming is
585
- # performed per-page, this determines the maximum number of
586
- # resources in a page.
587
- # @param read_mask [Google::Protobuf::FieldMask | Hash]
588
- # A field mask to specify the profile fields to be listed in response.
589
- # All fields are listed if it is unset.
590
- #
591
- # Valid values are:
592
- #
593
- # * name
594
- # A hash of the same form as `Google::Protobuf::FieldMask`
595
- # can also be provided.
596
- # @param options [Google::Gax::CallOptions]
597
- # Overrides the default settings for this call, e.g, timeout,
598
- # retries, etc.
599
- # @yield [result, operation] Access the result along with the RPC operation
600
- # @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Profile>]
601
- # @yieldparam operation [GRPC::ActiveCall::Operation]
602
- # @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Profile>]
603
- # An enumerable of Google::Cloud::Talent::V4beta1::Profile instances.
604
- # See Google::Gax::PagedEnumerable documentation for other
605
- # operations such as per-page iteration or access to the response
606
- # object.
607
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
608
- # @example
609
- # require "google/cloud/talent"
610
- #
611
- # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
612
- # formatted_parent = Google::Cloud::Talent::V4beta1::ProfileServiceClient.tenant_path("[PROJECT]", "[TENANT]")
613
- #
614
- # # Iterate over all results.
615
- # profile_client.list_profiles(formatted_parent).each do |element|
616
- # # Process element.
617
- # end
618
- #
619
- # # Or iterate over results one page at a time.
620
- # profile_client.list_profiles(formatted_parent).each_page do |page|
621
- # # Process each page at a time.
622
- # page.each do |element|
623
- # # Process element.
624
- # end
625
- # end
626
-
627
- def list_profiles \
628
- parent,
629
- filter: nil,
630
- page_size: nil,
631
- read_mask: nil,
632
- options: nil,
633
- &block
634
- req = {
635
- parent: parent,
636
- filter: filter,
637
- page_size: page_size,
638
- read_mask: read_mask
639
- }.delete_if { |_, v| v.nil? }
640
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::ListProfilesRequest)
641
- @list_profiles.call(req, options, &block)
642
- end
643
-
644
- # Creates and returns a new profile.
645
- #
646
- # @param parent [String]
647
- # Required. The name of the tenant this profile belongs to.
648
- #
649
- # The format is "projects/{project_id}/tenants/{tenant_id}". For example,
650
- # "projects/foo/tenants/bar".
651
- # @param profile [Google::Cloud::Talent::V4beta1::Profile | Hash]
652
- # Required. The profile to be created.
653
- # A hash of the same form as `Google::Cloud::Talent::V4beta1::Profile`
654
- # can also be provided.
655
- # @param options [Google::Gax::CallOptions]
656
- # Overrides the default settings for this call, e.g, timeout,
657
- # retries, etc.
658
- # @yield [result, operation] Access the result along with the RPC operation
659
- # @yieldparam result [Google::Cloud::Talent::V4beta1::Profile]
660
- # @yieldparam operation [GRPC::ActiveCall::Operation]
661
- # @return [Google::Cloud::Talent::V4beta1::Profile]
662
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
663
- # @example
664
- # require "google/cloud/talent"
665
- #
666
- # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
667
- # formatted_parent = Google::Cloud::Talent::V4beta1::ProfileServiceClient.tenant_path("[PROJECT]", "[TENANT]")
668
- #
669
- # # TODO: Initialize `profile`:
670
- # profile = {}
671
- # response = profile_client.create_profile(formatted_parent, profile)
672
-
673
- def create_profile \
674
- parent,
675
- profile,
676
- options: nil,
677
- &block
678
- req = {
679
- parent: parent,
680
- profile: profile
681
- }.delete_if { |_, v| v.nil? }
682
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::CreateProfileRequest)
683
- @create_profile.call(req, options, &block)
684
- end
685
-
686
- # Gets the specified profile.
687
- #
688
- # @param name [String]
689
- # Required. Resource name of the profile to get.
690
- #
691
- # The format is
692
- # "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}". For
693
- # example, "projects/foo/tenants/bar/profiles/baz".
694
- # @param options [Google::Gax::CallOptions]
695
- # Overrides the default settings for this call, e.g, timeout,
696
- # retries, etc.
697
- # @yield [result, operation] Access the result along with the RPC operation
698
- # @yieldparam result [Google::Cloud::Talent::V4beta1::Profile]
699
- # @yieldparam operation [GRPC::ActiveCall::Operation]
700
- # @return [Google::Cloud::Talent::V4beta1::Profile]
701
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
702
- # @example
703
- # require "google/cloud/talent"
704
- #
705
- # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
706
- # formatted_name = Google::Cloud::Talent::V4beta1::ProfileServiceClient.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]")
707
- # response = profile_client.get_profile(formatted_name)
708
-
709
- def get_profile \
710
- name,
711
- options: nil,
712
- &block
713
- req = {
714
- name: name
715
- }.delete_if { |_, v| v.nil? }
716
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::GetProfileRequest)
717
- @get_profile.call(req, options, &block)
718
- end
719
-
720
- # Updates the specified profile and returns the updated result.
721
- #
722
- # @param profile [Google::Cloud::Talent::V4beta1::Profile | Hash]
723
- # Required. Profile to be updated.
724
- # A hash of the same form as `Google::Cloud::Talent::V4beta1::Profile`
725
- # can also be provided.
726
- # @param update_mask [Google::Protobuf::FieldMask | Hash]
727
- # A field mask to specify the profile fields to update.
728
- #
729
- # A full update is performed if it is unset.
730
- # A hash of the same form as `Google::Protobuf::FieldMask`
731
- # can also be provided.
732
- # @param options [Google::Gax::CallOptions]
733
- # Overrides the default settings for this call, e.g, timeout,
734
- # retries, etc.
735
- # @yield [result, operation] Access the result along with the RPC operation
736
- # @yieldparam result [Google::Cloud::Talent::V4beta1::Profile]
737
- # @yieldparam operation [GRPC::ActiveCall::Operation]
738
- # @return [Google::Cloud::Talent::V4beta1::Profile]
739
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
740
- # @example
741
- # require "google/cloud/talent"
742
- #
743
- # profile_client = Google::Cloud::Talent::ProfileService.new(version: :v4beta1)
744
- #
745
- # # TODO: Initialize `profile`:
746
- # profile = {}
747
- # response = profile_client.update_profile(profile)
748
-
749
- def update_profile \
750
- profile,
751
- update_mask: nil,
752
- options: nil,
753
- &block
754
- req = {
755
- profile: profile,
756
- update_mask: update_mask
757
- }.delete_if { |_, v| v.nil? }
758
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::UpdateProfileRequest)
759
- @update_profile.call(req, options, &block)
760
- end
761
- end
762
- end
763
- end
764
- end
765
- end