google-cloud-talent-v4beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +71 -0
  6. data/lib/google-cloud-talent-v4beta1.rb +21 -0
  7. data/lib/google/cloud/common_resources_pb.rb +15 -0
  8. data/lib/google/cloud/talent/v4beta1.rb +41 -0
  9. data/lib/google/cloud/talent/v4beta1/application_pb.rb +64 -0
  10. data/lib/google/cloud/talent/v4beta1/application_service.rb +50 -0
  11. data/lib/google/cloud/talent/v4beta1/application_service/client.rb +717 -0
  12. data/lib/google/cloud/talent/v4beta1/application_service/credentials.rb +52 -0
  13. data/lib/google/cloud/talent/v4beta1/application_service/paths.rb +155 -0
  14. data/lib/google/cloud/talent/v4beta1/application_service_pb.rb +56 -0
  15. data/lib/google/cloud/talent/v4beta1/application_service_services_pb.rb +54 -0
  16. data/lib/google/cloud/talent/v4beta1/batch_pb.rb +19 -0
  17. data/lib/google/cloud/talent/v4beta1/common_pb.rb +342 -0
  18. data/lib/google/cloud/talent/v4beta1/company_pb.rb +42 -0
  19. data/lib/google/cloud/talent/v4beta1/company_service.rb +49 -0
  20. data/lib/google/cloud/talent/v4beta1/company_service/client.rb +732 -0
  21. data/lib/google/cloud/talent/v4beta1/company_service/credentials.rb +52 -0
  22. data/lib/google/cloud/talent/v4beta1/company_service/paths.rb +105 -0
  23. data/lib/google/cloud/talent/v4beta1/company_service_pb.rb +57 -0
  24. data/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb +54 -0
  25. data/lib/google/cloud/talent/v4beta1/completion.rb +49 -0
  26. data/lib/google/cloud/talent/v4beta1/completion/client.rb +407 -0
  27. data/lib/google/cloud/talent/v4beta1/completion/credentials.rb +52 -0
  28. data/lib/google/cloud/talent/v4beta1/completion/paths.rb +105 -0
  29. data/lib/google/cloud/talent/v4beta1/completion_service_pb.rb +57 -0
  30. data/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb +46 -0
  31. data/lib/google/cloud/talent/v4beta1/event_pb.rb +70 -0
  32. data/lib/google/cloud/talent/v4beta1/event_service.rb +49 -0
  33. data/lib/google/cloud/talent/v4beta1/event_service/client.rb +379 -0
  34. data/lib/google/cloud/talent/v4beta1/event_service/credentials.rb +52 -0
  35. data/lib/google/cloud/talent/v4beta1/event_service/paths.rb +64 -0
  36. data/lib/google/cloud/talent/v4beta1/event_service_pb.rb +28 -0
  37. data/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb +51 -0
  38. data/lib/google/cloud/talent/v4beta1/filters_pb.rb +188 -0
  39. data/lib/google/cloud/talent/v4beta1/histogram_pb.rb +28 -0
  40. data/lib/google/cloud/talent/v4beta1/job_pb.rb +73 -0
  41. data/lib/google/cloud/talent/v4beta1/job_service.rb +50 -0
  42. data/lib/google/cloud/talent/v4beta1/job_service/client.rb +1660 -0
  43. data/lib/google/cloud/talent/v4beta1/job_service/credentials.rb +52 -0
  44. data/lib/google/cloud/talent/v4beta1/job_service/operations.rb +564 -0
  45. data/lib/google/cloud/talent/v4beta1/job_service/paths.rb +146 -0
  46. data/lib/google/cloud/talent/v4beta1/job_service_pb.rb +167 -0
  47. data/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb +86 -0
  48. data/lib/google/cloud/talent/v4beta1/profile_pb.rb +214 -0
  49. data/lib/google/cloud/talent/v4beta1/profile_service.rb +50 -0
  50. data/lib/google/cloud/talent/v4beta1/profile_service/client.rb +992 -0
  51. data/lib/google/cloud/talent/v4beta1/profile_service/credentials.rb +52 -0
  52. data/lib/google/cloud/talent/v4beta1/profile_service/paths.rb +69 -0
  53. data/lib/google/cloud/talent/v4beta1/profile_service_pb.rb +92 -0
  54. data/lib/google/cloud/talent/v4beta1/profile_service_services_pb.rb +63 -0
  55. data/lib/google/cloud/talent/v4beta1/tenant_pb.rb +35 -0
  56. data/lib/google/cloud/talent/v4beta1/tenant_service.rb +49 -0
  57. data/lib/google/cloud/talent/v4beta1/tenant_service/client.rb +712 -0
  58. data/lib/google/cloud/talent/v4beta1/tenant_service/credentials.rb +52 -0
  59. data/lib/google/cloud/talent/v4beta1/tenant_service/paths.rb +64 -0
  60. data/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb +56 -0
  61. data/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb +53 -0
  62. data/lib/google/cloud/talent/v4beta1/version.rb +28 -0
  63. data/proto_docs/README.md +4 -0
  64. data/proto_docs/google/api/field_behavior.rb +59 -0
  65. data/proto_docs/google/api/resource.rb +247 -0
  66. data/proto_docs/google/cloud/talent/v4beta1/application.rb +169 -0
  67. data/proto_docs/google/cloud/talent/v4beta1/application_service.rb +122 -0
  68. data/proto_docs/google/cloud/talent/v4beta1/common.rb +1106 -0
  69. data/proto_docs/google/cloud/talent/v4beta1/company.rb +117 -0
  70. data/proto_docs/google/cloud/talent/v4beta1/company_service.rb +138 -0
  71. data/proto_docs/google/cloud/talent/v4beta1/completion_service.rb +143 -0
  72. data/proto_docs/google/cloud/talent/v4beta1/event.rb +237 -0
  73. data/proto_docs/google/cloud/talent/v4beta1/event_service.rb +43 -0
  74. data/proto_docs/google/cloud/talent/v4beta1/filters.rb +818 -0
  75. data/proto_docs/google/cloud/talent/v4beta1/histogram.rb +69 -0
  76. data/proto_docs/google/cloud/talent/v4beta1/job.rb +356 -0
  77. data/proto_docs/google/cloud/talent/v4beta1/job_service.rb +746 -0
  78. data/proto_docs/google/cloud/talent/v4beta1/profile.rb +811 -0
  79. data/proto_docs/google/cloud/talent/v4beta1/profile_service.rb +392 -0
  80. data/proto_docs/google/cloud/talent/v4beta1/tenant.rb +77 -0
  81. data/proto_docs/google/cloud/talent/v4beta1/tenant_service.rb +118 -0
  82. data/proto_docs/google/longrunning/operations.rb +150 -0
  83. data/proto_docs/google/protobuf/any.rb +138 -0
  84. data/proto_docs/google/protobuf/duration.rb +98 -0
  85. data/proto_docs/google/protobuf/empty.rb +36 -0
  86. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  87. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  88. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  89. data/proto_docs/google/rpc/status.rb +46 -0
  90. data/proto_docs/google/type/date.rb +50 -0
  91. data/proto_docs/google/type/latlng.rb +38 -0
  92. data/proto_docs/google/type/money.rb +43 -0
  93. data/proto_docs/google/type/postal_address.rb +135 -0
  94. data/proto_docs/google/type/timeofday.rb +44 -0
  95. metadata +251 -0
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/talent/v4beta1/version"
24
+
25
+ require "google/cloud/talent/v4beta1/profile_service/credentials"
26
+ require "google/cloud/talent/v4beta1/profile_service/paths"
27
+ require "google/cloud/talent/v4beta1/profile_service/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Talent
32
+ module V4beta1
33
+ ##
34
+ # A service that handles profile management, including profile CRUD,
35
+ # enumeration and search.
36
+ #
37
+ # To load this service and instantiate a client:
38
+ #
39
+ # require "google/cloud/talent/v4beta1/profile_service"
40
+ # client = Google::Cloud::Talent::V4beta1::ProfileService::Client.new
41
+ #
42
+ module ProfileService
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ helper_path = ::File.join __dir__, "profile_service", "helpers.rb"
50
+ require "google/cloud/talent/v4beta1/profile_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,992 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/talent/v4beta1/profile_service_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Talent
25
+ module V4beta1
26
+ module ProfileService
27
+ ##
28
+ # Client for the ProfileService service.
29
+ #
30
+ # A service that handles profile management, including profile CRUD,
31
+ # enumeration and search.
32
+ #
33
+ class Client
34
+ include Paths
35
+
36
+ # @private
37
+ attr_reader :profile_service_stub
38
+
39
+ ##
40
+ # Configure the ProfileService Client class.
41
+ #
42
+ # See {Google::Cloud::Talent::V4beta1::ProfileService::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # ## Example
46
+ #
47
+ # To modify the configuration for all ProfileService clients:
48
+ #
49
+ # Google::Cloud::Talent::V4beta1::ProfileService::Client.configure do |config|
50
+ # config.timeout = 10_000
51
+ # end
52
+ #
53
+ # @yield [config] Configure the Client client.
54
+ # @yieldparam config [Client::Configuration]
55
+ #
56
+ # @return [Client::Configuration]
57
+ #
58
+ def self.configure
59
+ @configure ||= begin
60
+ namespace = ["Google", "Cloud", "Talent", "V4beta1"]
61
+ parent_config = while namespace.any?
62
+ parent_name = namespace.join "::"
63
+ parent_const = const_get parent_name
64
+ break parent_const.configure if parent_const&.respond_to? :configure
65
+ namespace.pop
66
+ end
67
+ default_config = Client::Configuration.new parent_config
68
+
69
+ default_config.rpcs.list_profiles.timeout = 30.0
70
+ default_config.rpcs.list_profiles.retry_policy = {
71
+ initial_delay: 0.1,
72
+ max_delay: 60.0,
73
+ multiplier: 1.3,
74
+ retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
75
+ }
76
+
77
+ default_config.rpcs.create_profile.timeout = 30.0
78
+
79
+ default_config.rpcs.get_profile.timeout = 30.0
80
+ default_config.rpcs.get_profile.retry_policy = {
81
+ initial_delay: 0.1,
82
+ max_delay: 60.0,
83
+ multiplier: 1.3,
84
+ retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
85
+ }
86
+
87
+ default_config.rpcs.update_profile.timeout = 30.0
88
+
89
+ default_config.rpcs.delete_profile.timeout = 30.0
90
+ default_config.rpcs.delete_profile.retry_policy = {
91
+ initial_delay: 0.1,
92
+ max_delay: 60.0,
93
+ multiplier: 1.3,
94
+ retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
95
+ }
96
+
97
+ default_config.rpcs.search_profiles.timeout = 30.0
98
+
99
+ default_config
100
+ end
101
+ yield @configure if block_given?
102
+ @configure
103
+ end
104
+
105
+ ##
106
+ # Configure the ProfileService Client instance.
107
+ #
108
+ # The configuration is set to the derived mode, meaning that values can be changed,
109
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
110
+ # should be made on {Client.configure}.
111
+ #
112
+ # See {Google::Cloud::Talent::V4beta1::ProfileService::Client::Configuration}
113
+ # for a description of the configuration fields.
114
+ #
115
+ # @yield [config] Configure the Client client.
116
+ # @yieldparam config [Client::Configuration]
117
+ #
118
+ # @return [Client::Configuration]
119
+ #
120
+ def configure
121
+ yield @config if block_given?
122
+ @config
123
+ end
124
+
125
+ ##
126
+ # Create a new ProfileService client object.
127
+ #
128
+ # ## Examples
129
+ #
130
+ # To create a new ProfileService client with the default
131
+ # configuration:
132
+ #
133
+ # client = Google::Cloud::Talent::V4beta1::ProfileService::Client.new
134
+ #
135
+ # To create a new ProfileService client with a custom
136
+ # configuration:
137
+ #
138
+ # client = Google::Cloud::Talent::V4beta1::ProfileService::Client.new do |config|
139
+ # config.timeout = 10_000
140
+ # end
141
+ #
142
+ # @yield [config] Configure the ProfileService client.
143
+ # @yieldparam config [Client::Configuration]
144
+ #
145
+ def initialize
146
+ # These require statements are intentionally placed here to initialize
147
+ # the gRPC module only when it's required.
148
+ # See https://github.com/googleapis/toolkit/issues/446
149
+ require "gapic/grpc"
150
+ require "google/cloud/talent/v4beta1/profile_service_services_pb"
151
+
152
+ # Create the configuration object
153
+ @config = Configuration.new Client.configure
154
+
155
+ # Yield the configuration if needed
156
+ yield @config if block_given?
157
+
158
+ # Create credentials
159
+ credentials = @config.credentials
160
+ credentials ||= Credentials.default scope: @config.scope
161
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
162
+ credentials = Credentials.new credentials, scope: @config.scope
163
+ end
164
+ @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
165
+
166
+ @profile_service_stub = Gapic::ServiceStub.new(
167
+ Google::Cloud::Talent::V4beta1::ProfileService::Stub,
168
+ credentials: credentials,
169
+ endpoint: @config.endpoint,
170
+ channel_args: @config.channel_args,
171
+ interceptors: @config.interceptors
172
+ )
173
+ end
174
+
175
+ # Service calls
176
+
177
+ ##
178
+ # Lists profiles by filter. The order is unspecified.
179
+ #
180
+ # @overload list_profiles(request, options = nil)
181
+ # Pass arguments to `list_profiles` via a request object, either of type
182
+ # {Google::Cloud::Talent::V4beta1::ListProfilesRequest} or an equivalent Hash.
183
+ #
184
+ # @param request [Google::Cloud::Talent::V4beta1::ListProfilesRequest, Hash]
185
+ # A request object representing the call parameters. Required. To specify no
186
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
187
+ # @param options [Gapic::CallOptions, Hash]
188
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
189
+ #
190
+ # @overload list_profiles(parent: nil, filter: nil, page_token: nil, page_size: nil, read_mask: nil)
191
+ # Pass arguments to `list_profiles` via keyword arguments. Note that at
192
+ # least one keyword argument is required. To specify no parameters, or to keep all
193
+ # the default parameter values, pass an empty Hash as a request object (see above).
194
+ #
195
+ # @param parent [String]
196
+ # Required. The resource name of the tenant under which the profile is created.
197
+ #
198
+ # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example,
199
+ # "projects/foo/tenants/bar".
200
+ # @param filter [String]
201
+ # The filter string specifies the profiles to be enumerated.
202
+ #
203
+ # Supported operator: =, AND
204
+ #
205
+ # The field(s) eligible for filtering are:
206
+ #
207
+ # * `externalId`
208
+ # * `groupId`
209
+ #
210
+ # externalId and groupId cannot be specified at the same time. If both
211
+ # externalId and groupId are provided, the API will return a bad request
212
+ # error.
213
+ #
214
+ # Sample Query:
215
+ #
216
+ # * externalId = "externalId-1"
217
+ # * groupId = "groupId-1"
218
+ # @param page_token [String]
219
+ # The token that specifies the current offset (that is, starting result).
220
+ #
221
+ # Please set the value to {Google::Cloud::Talent::V4beta1::ListProfilesResponse#next_page_token ListProfilesResponse.next_page_token} to
222
+ # continue the list.
223
+ # @param page_size [Integer]
224
+ # The maximum number of profiles to be returned, at most 100.
225
+ #
226
+ # Default is 100 unless a positive number smaller than 100 is specified.
227
+ # @param read_mask [Google::Protobuf::FieldMask, Hash]
228
+ # A field mask to specify the profile fields to be listed in response.
229
+ # All fields are listed if it is unset.
230
+ #
231
+ # Valid values are:
232
+ #
233
+ # * name
234
+ #
235
+ # @yield [response, operation] Access the result along with the RPC operation
236
+ # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Talent::V4beta1::Profile>]
237
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
238
+ #
239
+ # @return [Gapic::PagedEnumerable<Google::Cloud::Talent::V4beta1::Profile>]
240
+ #
241
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
242
+ #
243
+ def list_profiles request, options = nil
244
+ raise ArgumentError, "request must be provided" if request.nil?
245
+
246
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::ListProfilesRequest
247
+
248
+ # Converts hash and nil to an options object
249
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
250
+
251
+ # Customize the options with defaults
252
+ metadata = @config.rpcs.list_profiles.metadata.to_h
253
+
254
+ # Set x-goog-api-client and x-goog-user-project headers
255
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
256
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
257
+ gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
258
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
259
+
260
+ header_params = {
261
+ "parent" => request.parent
262
+ }
263
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
264
+ metadata[:"x-goog-request-params"] ||= request_params_header
265
+
266
+ options.apply_defaults timeout: @config.rpcs.list_profiles.timeout,
267
+ metadata: metadata,
268
+ retry_policy: @config.rpcs.list_profiles.retry_policy
269
+ options.apply_defaults metadata: @config.metadata,
270
+ retry_policy: @config.retry_policy
271
+
272
+ @profile_service_stub.call_rpc :list_profiles, request, options: options do |response, operation|
273
+ response = Gapic::PagedEnumerable.new @profile_service_stub, :list_profiles, request, response, operation, options
274
+ yield response, operation if block_given?
275
+ return response
276
+ end
277
+ rescue GRPC::BadStatus => e
278
+ raise Google::Cloud::Error.from_error(e)
279
+ end
280
+
281
+ ##
282
+ # Creates and returns a new profile.
283
+ #
284
+ # @overload create_profile(request, options = nil)
285
+ # Pass arguments to `create_profile` via a request object, either of type
286
+ # {Google::Cloud::Talent::V4beta1::CreateProfileRequest} or an equivalent Hash.
287
+ #
288
+ # @param request [Google::Cloud::Talent::V4beta1::CreateProfileRequest, Hash]
289
+ # A request object representing the call parameters. Required. To specify no
290
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
291
+ # @param options [Gapic::CallOptions, Hash]
292
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
293
+ #
294
+ # @overload create_profile(parent: nil, profile: nil)
295
+ # Pass arguments to `create_profile` via keyword arguments. Note that at
296
+ # least one keyword argument is required. To specify no parameters, or to keep all
297
+ # the default parameter values, pass an empty Hash as a request object (see above).
298
+ #
299
+ # @param parent [String]
300
+ # Required. The name of the tenant this profile belongs to.
301
+ #
302
+ # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example,
303
+ # "projects/foo/tenants/bar".
304
+ # @param profile [Google::Cloud::Talent::V4beta1::Profile, Hash]
305
+ # Required. The profile to be created.
306
+ #
307
+ # @yield [response, operation] Access the result along with the RPC operation
308
+ # @yieldparam response [Google::Cloud::Talent::V4beta1::Profile]
309
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
310
+ #
311
+ # @return [Google::Cloud::Talent::V4beta1::Profile]
312
+ #
313
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
314
+ #
315
+ def create_profile request, options = nil
316
+ raise ArgumentError, "request must be provided" if request.nil?
317
+
318
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::CreateProfileRequest
319
+
320
+ # Converts hash and nil to an options object
321
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
322
+
323
+ # Customize the options with defaults
324
+ metadata = @config.rpcs.create_profile.metadata.to_h
325
+
326
+ # Set x-goog-api-client and x-goog-user-project headers
327
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
328
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
329
+ gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
330
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
331
+
332
+ header_params = {
333
+ "parent" => request.parent
334
+ }
335
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
336
+ metadata[:"x-goog-request-params"] ||= request_params_header
337
+
338
+ options.apply_defaults timeout: @config.rpcs.create_profile.timeout,
339
+ metadata: metadata,
340
+ retry_policy: @config.rpcs.create_profile.retry_policy
341
+ options.apply_defaults metadata: @config.metadata,
342
+ retry_policy: @config.retry_policy
343
+
344
+ @profile_service_stub.call_rpc :create_profile, request, options: options do |response, operation|
345
+ yield response, operation if block_given?
346
+ return response
347
+ end
348
+ rescue GRPC::BadStatus => e
349
+ raise Google::Cloud::Error.from_error(e)
350
+ end
351
+
352
+ ##
353
+ # Gets the specified profile.
354
+ #
355
+ # @overload get_profile(request, options = nil)
356
+ # Pass arguments to `get_profile` via a request object, either of type
357
+ # {Google::Cloud::Talent::V4beta1::GetProfileRequest} or an equivalent Hash.
358
+ #
359
+ # @param request [Google::Cloud::Talent::V4beta1::GetProfileRequest, Hash]
360
+ # A request object representing the call parameters. Required. To specify no
361
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
362
+ # @param options [Gapic::CallOptions, Hash]
363
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
364
+ #
365
+ # @overload get_profile(name: nil)
366
+ # Pass arguments to `get_profile` via keyword arguments. Note that at
367
+ # least one keyword argument is required. To specify no parameters, or to keep all
368
+ # the default parameter values, pass an empty Hash as a request object (see above).
369
+ #
370
+ # @param name [String]
371
+ # Required. Resource name of the profile to get.
372
+ #
373
+ # The format is
374
+ # "projects/\\{project_id}/tenants/\\{tenant_id}/profiles/\\{profile_id}". For
375
+ # example, "projects/foo/tenants/bar/profiles/baz".
376
+ #
377
+ # @yield [response, operation] Access the result along with the RPC operation
378
+ # @yieldparam response [Google::Cloud::Talent::V4beta1::Profile]
379
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
380
+ #
381
+ # @return [Google::Cloud::Talent::V4beta1::Profile]
382
+ #
383
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
384
+ #
385
+ def get_profile request, options = nil
386
+ raise ArgumentError, "request must be provided" if request.nil?
387
+
388
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::GetProfileRequest
389
+
390
+ # Converts hash and nil to an options object
391
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
392
+
393
+ # Customize the options with defaults
394
+ metadata = @config.rpcs.get_profile.metadata.to_h
395
+
396
+ # Set x-goog-api-client and x-goog-user-project headers
397
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
398
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
399
+ gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
400
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
401
+
402
+ header_params = {
403
+ "name" => request.name
404
+ }
405
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
406
+ metadata[:"x-goog-request-params"] ||= request_params_header
407
+
408
+ options.apply_defaults timeout: @config.rpcs.get_profile.timeout,
409
+ metadata: metadata,
410
+ retry_policy: @config.rpcs.get_profile.retry_policy
411
+ options.apply_defaults metadata: @config.metadata,
412
+ retry_policy: @config.retry_policy
413
+
414
+ @profile_service_stub.call_rpc :get_profile, request, options: options do |response, operation|
415
+ yield response, operation if block_given?
416
+ return response
417
+ end
418
+ rescue GRPC::BadStatus => e
419
+ raise Google::Cloud::Error.from_error(e)
420
+ end
421
+
422
+ ##
423
+ # Updates the specified profile and returns the updated result.
424
+ #
425
+ # @overload update_profile(request, options = nil)
426
+ # Pass arguments to `update_profile` via a request object, either of type
427
+ # {Google::Cloud::Talent::V4beta1::UpdateProfileRequest} or an equivalent Hash.
428
+ #
429
+ # @param request [Google::Cloud::Talent::V4beta1::UpdateProfileRequest, Hash]
430
+ # A request object representing the call parameters. Required. To specify no
431
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
432
+ # @param options [Gapic::CallOptions, Hash]
433
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
434
+ #
435
+ # @overload update_profile(profile: nil, update_mask: nil)
436
+ # Pass arguments to `update_profile` via keyword arguments. Note that at
437
+ # least one keyword argument is required. To specify no parameters, or to keep all
438
+ # the default parameter values, pass an empty Hash as a request object (see above).
439
+ #
440
+ # @param profile [Google::Cloud::Talent::V4beta1::Profile, Hash]
441
+ # Required. Profile to be updated.
442
+ # @param update_mask [Google::Protobuf::FieldMask, Hash]
443
+ # A field mask to specify the profile fields to update.
444
+ #
445
+ # A full update is performed if it is unset.
446
+ #
447
+ # @yield [response, operation] Access the result along with the RPC operation
448
+ # @yieldparam response [Google::Cloud::Talent::V4beta1::Profile]
449
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
450
+ #
451
+ # @return [Google::Cloud::Talent::V4beta1::Profile]
452
+ #
453
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
454
+ #
455
+ def update_profile request, options = nil
456
+ raise ArgumentError, "request must be provided" if request.nil?
457
+
458
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::UpdateProfileRequest
459
+
460
+ # Converts hash and nil to an options object
461
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
462
+
463
+ # Customize the options with defaults
464
+ metadata = @config.rpcs.update_profile.metadata.to_h
465
+
466
+ # Set x-goog-api-client and x-goog-user-project headers
467
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
468
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
469
+ gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
470
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
471
+
472
+ header_params = {
473
+ "profile.name" => request.profile.name
474
+ }
475
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
476
+ metadata[:"x-goog-request-params"] ||= request_params_header
477
+
478
+ options.apply_defaults timeout: @config.rpcs.update_profile.timeout,
479
+ metadata: metadata,
480
+ retry_policy: @config.rpcs.update_profile.retry_policy
481
+ options.apply_defaults metadata: @config.metadata,
482
+ retry_policy: @config.retry_policy
483
+
484
+ @profile_service_stub.call_rpc :update_profile, request, options: options do |response, operation|
485
+ yield response, operation if block_given?
486
+ return response
487
+ end
488
+ rescue GRPC::BadStatus => e
489
+ raise Google::Cloud::Error.from_error(e)
490
+ end
491
+
492
+ ##
493
+ # Deletes the specified profile.
494
+ # Prerequisite: The profile has no associated applications or assignments
495
+ # associated.
496
+ #
497
+ # @overload delete_profile(request, options = nil)
498
+ # Pass arguments to `delete_profile` via a request object, either of type
499
+ # {Google::Cloud::Talent::V4beta1::DeleteProfileRequest} or an equivalent Hash.
500
+ #
501
+ # @param request [Google::Cloud::Talent::V4beta1::DeleteProfileRequest, Hash]
502
+ # A request object representing the call parameters. Required. To specify no
503
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
504
+ # @param options [Gapic::CallOptions, Hash]
505
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
506
+ #
507
+ # @overload delete_profile(name: nil)
508
+ # Pass arguments to `delete_profile` via keyword arguments. Note that at
509
+ # least one keyword argument is required. To specify no parameters, or to keep all
510
+ # the default parameter values, pass an empty Hash as a request object (see above).
511
+ #
512
+ # @param name [String]
513
+ # Required. Resource name of the profile to be deleted.
514
+ #
515
+ # The format is
516
+ # "projects/\\{project_id}/tenants/\\{tenant_id}/profiles/\\{profile_id}". For
517
+ # example, "projects/foo/tenants/bar/profiles/baz".
518
+ #
519
+ # @yield [response, operation] Access the result along with the RPC operation
520
+ # @yieldparam response [Google::Protobuf::Empty]
521
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
522
+ #
523
+ # @return [Google::Protobuf::Empty]
524
+ #
525
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
526
+ #
527
+ def delete_profile request, options = nil
528
+ raise ArgumentError, "request must be provided" if request.nil?
529
+
530
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::DeleteProfileRequest
531
+
532
+ # Converts hash and nil to an options object
533
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
534
+
535
+ # Customize the options with defaults
536
+ metadata = @config.rpcs.delete_profile.metadata.to_h
537
+
538
+ # Set x-goog-api-client and x-goog-user-project headers
539
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
540
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
541
+ gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
542
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
543
+
544
+ header_params = {
545
+ "name" => request.name
546
+ }
547
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
548
+ metadata[:"x-goog-request-params"] ||= request_params_header
549
+
550
+ options.apply_defaults timeout: @config.rpcs.delete_profile.timeout,
551
+ metadata: metadata,
552
+ retry_policy: @config.rpcs.delete_profile.retry_policy
553
+ options.apply_defaults metadata: @config.metadata,
554
+ retry_policy: @config.retry_policy
555
+
556
+ @profile_service_stub.call_rpc :delete_profile, request, options: options do |response, operation|
557
+ yield response, operation if block_given?
558
+ return response
559
+ end
560
+ rescue GRPC::BadStatus => e
561
+ raise Google::Cloud::Error.from_error(e)
562
+ end
563
+
564
+ ##
565
+ # Searches for profiles within a tenant.
566
+ #
567
+ # For example, search by raw queries "software engineer in Mountain View" or
568
+ # search by structured filters (location filter, education filter, etc.).
569
+ #
570
+ # See {Google::Cloud::Talent::V4beta1::SearchProfilesRequest SearchProfilesRequest} for more information.
571
+ #
572
+ # @overload search_profiles(request, options = nil)
573
+ # Pass arguments to `search_profiles` via a request object, either of type
574
+ # {Google::Cloud::Talent::V4beta1::SearchProfilesRequest} or an equivalent Hash.
575
+ #
576
+ # @param request [Google::Cloud::Talent::V4beta1::SearchProfilesRequest, Hash]
577
+ # A request object representing the call parameters. Required. To specify no
578
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
579
+ # @param options [Gapic::CallOptions, Hash]
580
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
581
+ #
582
+ # @overload search_profiles(parent: nil, request_metadata: nil, profile_query: nil, page_size: nil, page_token: nil, offset: nil, disable_spell_check: nil, order_by: nil, case_sensitive_sort: nil, histogram_queries: nil, result_set_id: nil, strict_keywords_search: nil)
583
+ # Pass arguments to `search_profiles` via keyword arguments. Note that at
584
+ # least one keyword argument is required. To specify no parameters, or to keep all
585
+ # the default parameter values, pass an empty Hash as a request object (see above).
586
+ #
587
+ # @param parent [String]
588
+ # Required. The resource name of the tenant to search within.
589
+ #
590
+ # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example,
591
+ # "projects/foo/tenants/bar".
592
+ # @param request_metadata [Google::Cloud::Talent::V4beta1::RequestMetadata, Hash]
593
+ # Required. The meta information collected about the profile search user. This is used
594
+ # to improve the search quality of the service. These values are provided by
595
+ # users, and must be precise and consistent.
596
+ # @param profile_query [Google::Cloud::Talent::V4beta1::ProfileQuery, Hash]
597
+ # Search query to execute. See {Google::Cloud::Talent::V4beta1::ProfileQuery ProfileQuery} for more details.
598
+ # @param page_size [Integer]
599
+ # A limit on the number of profiles returned in the search results.
600
+ # A value above the default value 10 can increase search response time.
601
+ #
602
+ # The maximum value allowed is 100. Otherwise an error is thrown.
603
+ # @param page_token [String]
604
+ # The pageToken, similar to offset enables users of the API to paginate
605
+ # through the search results. To retrieve the first page of results, set the
606
+ # pageToken to empty. The search response includes a
607
+ # {Google::Cloud::Talent::V4beta1::SearchProfilesResponse#next_page_token nextPageToken} field that can be
608
+ # used to populate the pageToken field for the next page of results. Using
609
+ # pageToken instead of offset increases the performance of the API,
610
+ # especially compared to larger offset values.
611
+ # @param offset [Integer]
612
+ # An integer that specifies the current offset (that is, starting result) in
613
+ # search results. This field is only considered if {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#page_token page_token} is unset.
614
+ #
615
+ # The maximum allowed value is 5000. Otherwise an error is thrown.
616
+ #
617
+ # For example, 0 means to search from the first profile, and 10 means to
618
+ # search from the 11th profile. This can be used for pagination, for example
619
+ # pageSize = 10 and offset = 10 means to search from the second page.
620
+ # @param disable_spell_check [Boolean]
621
+ # This flag controls the spell-check feature. If `false`, the
622
+ # service attempts to correct a misspelled query.
623
+ #
624
+ # For example, "enginee" is corrected to "engineer".
625
+ # @param order_by [String]
626
+ # The criteria that determines how search results are sorted.
627
+ # Defaults is "relevance desc" if no value is specified.
628
+ #
629
+ # Supported options are:
630
+ #
631
+ # * "relevance desc": By descending relevance, as determined by the API
632
+ # algorithms.
633
+ # * "update_date desc": Sort by {Google::Cloud::Talent::V4beta1::Profile#update_time Profile.update_time} in descending order
634
+ # (recently updated profiles first).
635
+ # * "create_date desc": Sort by {Google::Cloud::Talent::V4beta1::Profile#create_time Profile.create_time} in descending order
636
+ # (recently created profiles first).
637
+ # * "first_name": Sort by {Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#given_name PersonName.PersonStructuredName.given_name} in
638
+ # ascending order.
639
+ # * "first_name desc": Sort by {Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#given_name PersonName.PersonStructuredName.given_name}
640
+ # in descending order.
641
+ # * "last_name": Sort by {Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#family_name PersonName.PersonStructuredName.family_name} in
642
+ # ascending order.
643
+ # * "last_name desc": Sort by {Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#family_name PersonName.PersonStructuredName.family_name}
644
+ # in ascending order.
645
+ # @param case_sensitive_sort [Boolean]
646
+ # When sort by field is based on alphabetical order, sort values case
647
+ # sensitively (based on ASCII) when the value is set to true. Default value
648
+ # is case in-sensitive sort (false).
649
+ # @param histogram_queries [Array<Google::Cloud::Talent::V4beta1::HistogramQuery, Hash>]
650
+ # A list of expressions specifies histogram requests against matching
651
+ # profiles for {Google::Cloud::Talent::V4beta1::SearchProfilesRequest SearchProfilesRequest}.
652
+ #
653
+ # The expression syntax looks like a function definition with parameters.
654
+ #
655
+ # Function syntax: function_name(histogram_facet[, list of buckets])
656
+ #
657
+ # Data types:
658
+ #
659
+ # * Histogram facet: facet names with format [a-zA-Z][a-zA-Z0-9_]+.
660
+ # * String: string like "any string with backslash escape for quote(\")."
661
+ # * Number: whole number and floating point number like 10, -1 and -0.01.
662
+ # * List: list of elements with comma(,) separator surrounded by square
663
+ # brackets. For example, [1, 2, 3] and ["one", "two", "three"].
664
+ #
665
+ # Built-in constants:
666
+ #
667
+ # * MIN (minimum number similar to java Double.MIN_VALUE)
668
+ # * MAX (maximum number similar to java Double.MAX_VALUE)
669
+ #
670
+ # Built-in functions:
671
+ #
672
+ # * bucket(start, end[, label])
673
+ # Bucket build-in function creates a bucket with range of [start, end). Note
674
+ # that the end is exclusive.
675
+ # For example, bucket(1, MAX, "positive number") or bucket(1, 10).
676
+ #
677
+ # Histogram Facets:
678
+ #
679
+ # * admin1: Admin1 is a global placeholder for referring to state, province,
680
+ # or the particular term a country uses to define the geographic structure
681
+ # below the country level. Examples include states codes such as "CA", "IL",
682
+ # "NY", and provinces, such as "BC".
683
+ # * locality: Locality is a global placeholder for referring to city, town,
684
+ # or the particular term a country uses to define the geographic structure
685
+ # below the admin1 level. Examples include city names such as
686
+ # "Mountain View" and "New York".
687
+ # * extended_locality: Extended locality is concatenated version of admin1
688
+ # and locality with comma separator. For example, "Mountain View, CA" and
689
+ # "New York, NY".
690
+ # * postal_code: Postal code of profile which follows locale code.
691
+ # * country: Country code (ISO-3166-1 alpha-2 code) of profile, such as US,
692
+ # JP, GB.
693
+ # * job_title: Normalized job titles specified in EmploymentHistory.
694
+ # * company_name: Normalized company name of profiles to match on.
695
+ # * institution: The school name. For example, "MIT",
696
+ # "University of California, Berkeley"
697
+ # * degree: Highest education degree in ISCED code. Each value in degree
698
+ # covers a specific level of education, without any expansion to upper nor
699
+ # lower levels of education degree.
700
+ # * experience_in_months: experience in months. 0 means 0 month to 1 month
701
+ # (exclusive).
702
+ # * application_date: The application date specifies application start dates.
703
+ # See {Google::Cloud::Talent::V4beta1::ApplicationDateFilter ApplicationDateFilter} for more details.
704
+ # * application_outcome_notes: The application outcome reason specifies the
705
+ # reasons behind the outcome of the job application.
706
+ # See {Google::Cloud::Talent::V4beta1::ApplicationOutcomeNotesFilter ApplicationOutcomeNotesFilter} for more details.
707
+ # * application_job_title: The application job title specifies the job
708
+ # applied for in the application.
709
+ # See {Google::Cloud::Talent::V4beta1::ApplicationJobFilter ApplicationJobFilter} for more details.
710
+ # * hirable_status: Hirable status specifies the profile's hirable status.
711
+ # * string_custom_attribute: String custom attributes. Values can be accessed
712
+ # via square bracket notation like string_custom_attribute["key1"].
713
+ # * numeric_custom_attribute: Numeric custom attributes. Values can be
714
+ # accessed via square bracket notation like numeric_custom_attribute["key1"].
715
+ #
716
+ # Example expressions:
717
+ #
718
+ # * count(admin1)
719
+ # * count(experience_in_months, [bucket(0, 12, "1 year"),
720
+ # bucket(12, 36, "1-3 years"), bucket(36, MAX, "3+ years")])
721
+ # * count(string_custom_attribute["assigned_recruiter"])
722
+ # * count(numeric_custom_attribute["favorite_number"],
723
+ # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])
724
+ # @param result_set_id [String]
725
+ # An id that uniquely identifies the result set of a
726
+ # {Google::Cloud::Talent::V4beta1::ProfileService::Client#search_profiles SearchProfiles} call. The id should be
727
+ # retrieved from the
728
+ # {Google::Cloud::Talent::V4beta1::SearchProfilesResponse SearchProfilesResponse} message returned from a previous
729
+ # invocation of {Google::Cloud::Talent::V4beta1::ProfileService::Client#search_profiles SearchProfiles}.
730
+ #
731
+ # A result set is an ordered list of search results.
732
+ #
733
+ # If this field is not set, a new result set is computed based on the
734
+ # {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
735
+ # access this result set.
736
+ #
737
+ # If this field is set, the service will ignore the resource and
738
+ # {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#profile_query profile_query} values, and simply retrieve a page of results from the
739
+ # corresponding result set. In this case, one and only one of {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#page_token page_token}
740
+ # or {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#offset offset} must be set.
741
+ #
742
+ # A typical use case is to invoke {Google::Cloud::Talent::V4beta1::SearchProfilesRequest SearchProfilesRequest} without this
743
+ # field, then use the resulting {Google::Cloud::Talent::V4beta1::SearchProfilesRequest#result_set_id result_set_id} in
744
+ # {Google::Cloud::Talent::V4beta1::SearchProfilesResponse SearchProfilesResponse} to page through the results.
745
+ # @param strict_keywords_search [Boolean]
746
+ # This flag is used to indicate whether the service will attempt to
747
+ # understand synonyms and terms related to the search query or treat the
748
+ # query "as is" when it generates a set of results. By default this flag is
749
+ # set to false, thus allowing expanded results to also be returned. For
750
+ # example a search for "software engineer" might also return candidates who
751
+ # have experience in jobs similar to software engineer positions. By setting
752
+ # this flag to true, the service will only attempt to deliver candidates has
753
+ # software engineer in his/her global fields by treating "software engineer"
754
+ # as a keyword.
755
+ #
756
+ # It is recommended to provide a feature in the UI (such as a checkbox) to
757
+ # allow recruiters to set this flag to true if they intend to search for
758
+ # longer boolean strings.
759
+ #
760
+ # @yield [response, operation] Access the result along with the RPC operation
761
+ # @yieldparam response [Google::Cloud::Talent::V4beta1::SearchProfilesResponse]
762
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
763
+ #
764
+ # @return [Google::Cloud::Talent::V4beta1::SearchProfilesResponse]
765
+ #
766
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
767
+ #
768
+ def search_profiles request, options = nil
769
+ raise ArgumentError, "request must be provided" if request.nil?
770
+
771
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::SearchProfilesRequest
772
+
773
+ # Converts hash and nil to an options object
774
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
775
+
776
+ # Customize the options with defaults
777
+ metadata = @config.rpcs.search_profiles.metadata.to_h
778
+
779
+ # Set x-goog-api-client and x-goog-user-project headers
780
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
781
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
782
+ gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
783
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
784
+
785
+ header_params = {
786
+ "parent" => request.parent
787
+ }
788
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
789
+ metadata[:"x-goog-request-params"] ||= request_params_header
790
+
791
+ options.apply_defaults timeout: @config.rpcs.search_profiles.timeout,
792
+ metadata: metadata,
793
+ retry_policy: @config.rpcs.search_profiles.retry_policy
794
+ options.apply_defaults metadata: @config.metadata,
795
+ retry_policy: @config.retry_policy
796
+
797
+ @profile_service_stub.call_rpc :search_profiles, request, options: options do |response, operation|
798
+ yield response, operation if block_given?
799
+ return response
800
+ end
801
+ rescue GRPC::BadStatus => e
802
+ raise Google::Cloud::Error.from_error(e)
803
+ end
804
+
805
+ ##
806
+ # Configuration class for the ProfileService API.
807
+ #
808
+ # This class represents the configuration for ProfileService,
809
+ # providing control over timeouts, retry behavior, logging, transport
810
+ # parameters, and other low-level controls. Certain parameters can also be
811
+ # applied individually to specific RPCs. See
812
+ # {Google::Cloud::Talent::V4beta1::ProfileService::Client::Configuration::Rpcs}
813
+ # for a list of RPCs that can be configured independently.
814
+ #
815
+ # Configuration can be applied globally to all clients, or to a single client
816
+ # on construction.
817
+ #
818
+ # # Examples
819
+ #
820
+ # To modify the global config, setting the timeout for list_profiles
821
+ # to 20 seconds, and all remaining timeouts to 10 seconds:
822
+ #
823
+ # Google::Cloud::Talent::V4beta1::ProfileService::Client.configure do |config|
824
+ # config.timeout = 10_000
825
+ # config.rpcs.list_profiles.timeout = 20_000
826
+ # end
827
+ #
828
+ # To apply the above configuration only to a new client:
829
+ #
830
+ # client = Google::Cloud::Talent::V4beta1::ProfileService::Client.new do |config|
831
+ # config.timeout = 10_000
832
+ # config.rpcs.list_profiles.timeout = 20_000
833
+ # end
834
+ #
835
+ # @!attribute [rw] endpoint
836
+ # The hostname or hostname:port of the service endpoint.
837
+ # Defaults to `"jobs.googleapis.com"`.
838
+ # @return [String]
839
+ # @!attribute [rw] credentials
840
+ # Credentials to send with calls. You may provide any of the following types:
841
+ # * (`String`) The path to a service account key file in JSON format
842
+ # * (`Hash`) A service account key as a Hash
843
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
844
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
845
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
846
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
847
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
848
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
849
+ # * (`nil`) indicating no credentials
850
+ # @return [Object]
851
+ # @!attribute [rw] scope
852
+ # The OAuth scopes
853
+ # @return [Array<String>]
854
+ # @!attribute [rw] lib_name
855
+ # The library name as recorded in instrumentation and logging
856
+ # @return [String]
857
+ # @!attribute [rw] lib_version
858
+ # The library version as recorded in instrumentation and logging
859
+ # @return [String]
860
+ # @!attribute [rw] channel_args
861
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
862
+ # `GRPC::Core::Channel` object is provided as the credential.
863
+ # @return [Hash]
864
+ # @!attribute [rw] interceptors
865
+ # An array of interceptors that are run before calls are executed.
866
+ # @return [Array<GRPC::ClientInterceptor>]
867
+ # @!attribute [rw] timeout
868
+ # The call timeout in milliseconds.
869
+ # @return [Numeric]
870
+ # @!attribute [rw] metadata
871
+ # Additional gRPC headers to be sent with the call.
872
+ # @return [Hash{Symbol=>String}]
873
+ # @!attribute [rw] retry_policy
874
+ # The retry policy. The value is a hash with the following keys:
875
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
876
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
877
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
878
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
879
+ # trigger a retry.
880
+ # @return [Hash]
881
+ #
882
+ class Configuration
883
+ extend Gapic::Config
884
+
885
+ config_attr :endpoint, "jobs.googleapis.com", String
886
+ config_attr :credentials, nil do |value|
887
+ allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
888
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
889
+ allowed.any? { |klass| klass === value }
890
+ end
891
+ config_attr :scope, nil, String, Array, nil
892
+ config_attr :lib_name, nil, String, nil
893
+ config_attr :lib_version, nil, String, nil
894
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
895
+ config_attr :interceptors, nil, Array, nil
896
+ config_attr :timeout, nil, Numeric, nil
897
+ config_attr :metadata, nil, Hash, nil
898
+ config_attr :retry_policy, nil, Hash, Proc, nil
899
+
900
+ # @private
901
+ def initialize parent_config = nil
902
+ @parent_config = parent_config unless parent_config.nil?
903
+
904
+ yield self if block_given?
905
+ end
906
+
907
+ ##
908
+ # Configurations for individual RPCs
909
+ # @return [Rpcs]
910
+ #
911
+ def rpcs
912
+ @rpcs ||= begin
913
+ parent_rpcs = nil
914
+ parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
915
+ Rpcs.new parent_rpcs
916
+ end
917
+ end
918
+
919
+ ##
920
+ # Configuration RPC class for the ProfileService API.
921
+ #
922
+ # Includes fields providing the configuration for each RPC in this service.
923
+ # Each configuration object is of type `Gapic::Config::Method` and includes
924
+ # the following configuration fields:
925
+ #
926
+ # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
927
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
928
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
929
+ # include the following keys:
930
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
931
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
932
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
933
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
934
+ # trigger a retry.
935
+ #
936
+ class Rpcs
937
+ ##
938
+ # RPC-specific configuration for `list_profiles`
939
+ # @return [Gapic::Config::Method]
940
+ #
941
+ attr_reader :list_profiles
942
+ ##
943
+ # RPC-specific configuration for `create_profile`
944
+ # @return [Gapic::Config::Method]
945
+ #
946
+ attr_reader :create_profile
947
+ ##
948
+ # RPC-specific configuration for `get_profile`
949
+ # @return [Gapic::Config::Method]
950
+ #
951
+ attr_reader :get_profile
952
+ ##
953
+ # RPC-specific configuration for `update_profile`
954
+ # @return [Gapic::Config::Method]
955
+ #
956
+ attr_reader :update_profile
957
+ ##
958
+ # RPC-specific configuration for `delete_profile`
959
+ # @return [Gapic::Config::Method]
960
+ #
961
+ attr_reader :delete_profile
962
+ ##
963
+ # RPC-specific configuration for `search_profiles`
964
+ # @return [Gapic::Config::Method]
965
+ #
966
+ attr_reader :search_profiles
967
+
968
+ # @private
969
+ def initialize parent_rpcs = nil
970
+ list_profiles_config = parent_rpcs&.list_profiles if parent_rpcs&.respond_to? :list_profiles
971
+ @list_profiles = Gapic::Config::Method.new list_profiles_config
972
+ create_profile_config = parent_rpcs&.create_profile if parent_rpcs&.respond_to? :create_profile
973
+ @create_profile = Gapic::Config::Method.new create_profile_config
974
+ get_profile_config = parent_rpcs&.get_profile if parent_rpcs&.respond_to? :get_profile
975
+ @get_profile = Gapic::Config::Method.new get_profile_config
976
+ update_profile_config = parent_rpcs&.update_profile if parent_rpcs&.respond_to? :update_profile
977
+ @update_profile = Gapic::Config::Method.new update_profile_config
978
+ delete_profile_config = parent_rpcs&.delete_profile if parent_rpcs&.respond_to? :delete_profile
979
+ @delete_profile = Gapic::Config::Method.new delete_profile_config
980
+ search_profiles_config = parent_rpcs&.search_profiles if parent_rpcs&.respond_to? :search_profiles
981
+ @search_profiles = Gapic::Config::Method.new search_profiles_config
982
+
983
+ yield self if block_given?
984
+ end
985
+ end
986
+ end
987
+ end
988
+ end
989
+ end
990
+ end
991
+ end
992
+ end