google-cloud-talent-v4beta1 0.4.4 → 0.5.0

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