google-cloud-talent-v4beta1 0.4.6 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +6 -6
  3. data/README.md +9 -4
  4. data/lib/google/cloud/talent/v4beta1/batch_pb.rb +0 -1
  5. data/lib/google/cloud/talent/v4beta1/common_pb.rb +3 -65
  6. data/lib/google/cloud/talent/v4beta1/company_pb.rb +2 -2
  7. data/lib/google/cloud/talent/v4beta1/company_service_pb.rb +2 -1
  8. data/lib/google/cloud/talent/v4beta1/completion_service_pb.rb +3 -2
  9. data/lib/google/cloud/talent/v4beta1/event_pb.rb +2 -16
  10. data/lib/google/cloud/talent/v4beta1/event_service_pb.rb +2 -1
  11. data/lib/google/cloud/talent/v4beta1/filters_pb.rb +3 -102
  12. data/lib/google/cloud/talent/v4beta1/histogram_pb.rb +0 -1
  13. data/lib/google/cloud/talent/v4beta1/job_pb.rb +2 -3
  14. data/lib/google/cloud/talent/v4beta1/job_service/client.rb +48 -23
  15. data/lib/google/cloud/talent/v4beta1/job_service_pb.rb +10 -2
  16. data/lib/google/cloud/talent/v4beta1/tenant_pb.rb +2 -3
  17. data/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb +2 -1
  18. data/lib/google/cloud/talent/v4beta1/version.rb +1 -1
  19. data/lib/google/cloud/talent/v4beta1.rb +3 -3
  20. data/proto_docs/google/cloud/talent/v4beta1/common.rb +10 -227
  21. data/proto_docs/google/cloud/talent/v4beta1/event.rb +1 -60
  22. data/proto_docs/google/cloud/talent/v4beta1/filters.rb +40 -482
  23. data/proto_docs/google/cloud/talent/v4beta1/histogram.rb +1 -1
  24. data/proto_docs/google/cloud/talent/v4beta1/job.rb +1 -1
  25. data/proto_docs/google/cloud/talent/v4beta1/job_service.rb +64 -16
  26. data/proto_docs/google/cloud/talent/v4beta1/tenant.rb +1 -1
  27. data/proto_docs/google/protobuf/any.rb +3 -3
  28. data/proto_docs/google/type/timeofday.rb +1 -1
  29. metadata +3 -22
  30. data/lib/google/cloud/talent/v4beta1/application_pb.rb +0 -64
  31. data/lib/google/cloud/talent/v4beta1/application_service/client.rb +0 -813
  32. data/lib/google/cloud/talent/v4beta1/application_service/credentials.rb +0 -52
  33. data/lib/google/cloud/talent/v4beta1/application_service/paths.rb +0 -155
  34. data/lib/google/cloud/talent/v4beta1/application_service.rb +0 -50
  35. data/lib/google/cloud/talent/v4beta1/application_service_pb.rb +0 -56
  36. data/lib/google/cloud/talent/v4beta1/application_service_services_pb.rb +0 -54
  37. data/lib/google/cloud/talent/v4beta1/profile_pb.rb +0 -214
  38. data/lib/google/cloud/talent/v4beta1/profile_service/client.rb +0 -1107
  39. data/lib/google/cloud/talent/v4beta1/profile_service/credentials.rb +0 -52
  40. data/lib/google/cloud/talent/v4beta1/profile_service/paths.rb +0 -69
  41. data/lib/google/cloud/talent/v4beta1/profile_service.rb +0 -50
  42. data/lib/google/cloud/talent/v4beta1/profile_service_pb.rb +0 -92
  43. data/lib/google/cloud/talent/v4beta1/profile_service_services_pb.rb +0 -63
  44. data/proto_docs/google/cloud/talent/v4beta1/application.rb +0 -169
  45. data/proto_docs/google/cloud/talent/v4beta1/application_service.rb +0 -122
  46. data/proto_docs/google/cloud/talent/v4beta1/profile.rb +0 -811
  47. data/proto_docs/google/cloud/talent/v4beta1/profile_service.rb +0 -392
  48. data/proto_docs/google/type/date.rb +0 -53
@@ -1,1107 +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
- # @example Basic example
236
- # require "google/cloud/talent/v4beta1"
237
- #
238
- # # Create a client object. The client can be reused for multiple calls.
239
- # client = Google::Cloud::Talent::V4beta1::ProfileService::Client.new
240
- #
241
- # # Create a request. To set request fields, pass in keyword arguments.
242
- # request = Google::Cloud::Talent::V4beta1::ListProfilesRequest.new
243
- #
244
- # # Call the list_profiles method.
245
- # result = client.list_profiles request
246
- #
247
- # # The returned object is of type Gapic::PagedEnumerable. You can
248
- # # iterate over all elements by calling #each, and the enumerable
249
- # # will lazily make API calls to fetch subsequent pages. Other
250
- # # methods are also available for managing paging directly.
251
- # result.each do |response|
252
- # # Each element is of type ::Google::Cloud::Talent::V4beta1::Profile.
253
- # p response
254
- # end
255
- #
256
- def list_profiles request, options = nil
257
- raise ::ArgumentError, "request must be provided" if request.nil?
258
-
259
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListProfilesRequest
260
-
261
- # Converts hash and nil to an options object
262
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
263
-
264
- # Customize the options with defaults
265
- metadata = @config.rpcs.list_profiles.metadata.to_h
266
-
267
- # Set x-goog-api-client and x-goog-user-project headers
268
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
269
- lib_name: @config.lib_name, lib_version: @config.lib_version,
270
- gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
271
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
272
-
273
- header_params = {}
274
- if request.parent
275
- header_params["parent"] = request.parent
276
- end
277
-
278
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
279
- metadata[:"x-goog-request-params"] ||= request_params_header
280
-
281
- options.apply_defaults timeout: @config.rpcs.list_profiles.timeout,
282
- metadata: metadata,
283
- retry_policy: @config.rpcs.list_profiles.retry_policy
284
-
285
- options.apply_defaults timeout: @config.timeout,
286
- metadata: @config.metadata,
287
- retry_policy: @config.retry_policy
288
-
289
- @profile_service_stub.call_rpc :list_profiles, request, options: options do |response, operation|
290
- response = ::Gapic::PagedEnumerable.new @profile_service_stub, :list_profiles, request, response, operation, options
291
- yield response, operation if block_given?
292
- return response
293
- end
294
- rescue ::GRPC::BadStatus => e
295
- raise ::Google::Cloud::Error.from_error(e)
296
- end
297
-
298
- ##
299
- # Creates and returns a new profile.
300
- #
301
- # @overload create_profile(request, options = nil)
302
- # Pass arguments to `create_profile` via a request object, either of type
303
- # {::Google::Cloud::Talent::V4beta1::CreateProfileRequest} or an equivalent Hash.
304
- #
305
- # @param request [::Google::Cloud::Talent::V4beta1::CreateProfileRequest, ::Hash]
306
- # A request object representing the call parameters. Required. To specify no
307
- # parameters, or to keep all the default parameter values, pass an empty Hash.
308
- # @param options [::Gapic::CallOptions, ::Hash]
309
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
310
- #
311
- # @overload create_profile(parent: nil, profile: nil)
312
- # Pass arguments to `create_profile` via keyword arguments. Note that at
313
- # least one keyword argument is required. To specify no parameters, or to keep all
314
- # the default parameter values, pass an empty Hash as a request object (see above).
315
- #
316
- # @param parent [::String]
317
- # Required. The name of the tenant this profile belongs to.
318
- #
319
- # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example,
320
- # "projects/foo/tenants/bar".
321
- # @param profile [::Google::Cloud::Talent::V4beta1::Profile, ::Hash]
322
- # Required. The profile to be created.
323
- #
324
- # @yield [response, operation] Access the result along with the RPC operation
325
- # @yieldparam response [::Google::Cloud::Talent::V4beta1::Profile]
326
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
327
- #
328
- # @return [::Google::Cloud::Talent::V4beta1::Profile]
329
- #
330
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
331
- #
332
- # @example Basic example
333
- # require "google/cloud/talent/v4beta1"
334
- #
335
- # # Create a client object. The client can be reused for multiple calls.
336
- # client = Google::Cloud::Talent::V4beta1::ProfileService::Client.new
337
- #
338
- # # Create a request. To set request fields, pass in keyword arguments.
339
- # request = Google::Cloud::Talent::V4beta1::CreateProfileRequest.new
340
- #
341
- # # Call the create_profile method.
342
- # result = client.create_profile request
343
- #
344
- # # The returned object is of type Google::Cloud::Talent::V4beta1::Profile.
345
- # p result
346
- #
347
- def create_profile request, options = nil
348
- raise ::ArgumentError, "request must be provided" if request.nil?
349
-
350
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateProfileRequest
351
-
352
- # Converts hash and nil to an options object
353
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
354
-
355
- # Customize the options with defaults
356
- metadata = @config.rpcs.create_profile.metadata.to_h
357
-
358
- # Set x-goog-api-client and x-goog-user-project headers
359
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
360
- lib_name: @config.lib_name, lib_version: @config.lib_version,
361
- gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
362
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
363
-
364
- header_params = {}
365
- if request.parent
366
- header_params["parent"] = request.parent
367
- end
368
-
369
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
370
- metadata[:"x-goog-request-params"] ||= request_params_header
371
-
372
- options.apply_defaults timeout: @config.rpcs.create_profile.timeout,
373
- metadata: metadata,
374
- retry_policy: @config.rpcs.create_profile.retry_policy
375
-
376
- options.apply_defaults timeout: @config.timeout,
377
- metadata: @config.metadata,
378
- retry_policy: @config.retry_policy
379
-
380
- @profile_service_stub.call_rpc :create_profile, request, options: options do |response, operation|
381
- yield response, operation if block_given?
382
- return response
383
- end
384
- rescue ::GRPC::BadStatus => e
385
- raise ::Google::Cloud::Error.from_error(e)
386
- end
387
-
388
- ##
389
- # Gets the specified profile.
390
- #
391
- # @overload get_profile(request, options = nil)
392
- # Pass arguments to `get_profile` via a request object, either of type
393
- # {::Google::Cloud::Talent::V4beta1::GetProfileRequest} or an equivalent Hash.
394
- #
395
- # @param request [::Google::Cloud::Talent::V4beta1::GetProfileRequest, ::Hash]
396
- # A request object representing the call parameters. Required. To specify no
397
- # parameters, or to keep all the default parameter values, pass an empty Hash.
398
- # @param options [::Gapic::CallOptions, ::Hash]
399
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
400
- #
401
- # @overload get_profile(name: nil)
402
- # Pass arguments to `get_profile` via keyword arguments. Note that at
403
- # least one keyword argument is required. To specify no parameters, or to keep all
404
- # the default parameter values, pass an empty Hash as a request object (see above).
405
- #
406
- # @param name [::String]
407
- # Required. Resource name of the profile to get.
408
- #
409
- # The format is
410
- # "projects/\\{project_id}/tenants/\\{tenant_id}/profiles/\\{profile_id}". For
411
- # example, "projects/foo/tenants/bar/profiles/baz".
412
- #
413
- # @yield [response, operation] Access the result along with the RPC operation
414
- # @yieldparam response [::Google::Cloud::Talent::V4beta1::Profile]
415
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
416
- #
417
- # @return [::Google::Cloud::Talent::V4beta1::Profile]
418
- #
419
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
420
- #
421
- # @example Basic example
422
- # require "google/cloud/talent/v4beta1"
423
- #
424
- # # Create a client object. The client can be reused for multiple calls.
425
- # client = Google::Cloud::Talent::V4beta1::ProfileService::Client.new
426
- #
427
- # # Create a request. To set request fields, pass in keyword arguments.
428
- # request = Google::Cloud::Talent::V4beta1::GetProfileRequest.new
429
- #
430
- # # Call the get_profile method.
431
- # result = client.get_profile request
432
- #
433
- # # The returned object is of type Google::Cloud::Talent::V4beta1::Profile.
434
- # p result
435
- #
436
- def get_profile request, options = nil
437
- raise ::ArgumentError, "request must be provided" if request.nil?
438
-
439
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetProfileRequest
440
-
441
- # Converts hash and nil to an options object
442
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
443
-
444
- # Customize the options with defaults
445
- metadata = @config.rpcs.get_profile.metadata.to_h
446
-
447
- # Set x-goog-api-client and x-goog-user-project headers
448
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
449
- lib_name: @config.lib_name, lib_version: @config.lib_version,
450
- gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
451
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
452
-
453
- header_params = {}
454
- if request.name
455
- header_params["name"] = request.name
456
- end
457
-
458
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
459
- metadata[:"x-goog-request-params"] ||= request_params_header
460
-
461
- options.apply_defaults timeout: @config.rpcs.get_profile.timeout,
462
- metadata: metadata,
463
- retry_policy: @config.rpcs.get_profile.retry_policy
464
-
465
- options.apply_defaults timeout: @config.timeout,
466
- metadata: @config.metadata,
467
- retry_policy: @config.retry_policy
468
-
469
- @profile_service_stub.call_rpc :get_profile, request, options: options do |response, operation|
470
- yield response, operation if block_given?
471
- return response
472
- end
473
- rescue ::GRPC::BadStatus => e
474
- raise ::Google::Cloud::Error.from_error(e)
475
- end
476
-
477
- ##
478
- # Updates the specified profile and returns the updated result.
479
- #
480
- # @overload update_profile(request, options = nil)
481
- # Pass arguments to `update_profile` via a request object, either of type
482
- # {::Google::Cloud::Talent::V4beta1::UpdateProfileRequest} or an equivalent Hash.
483
- #
484
- # @param request [::Google::Cloud::Talent::V4beta1::UpdateProfileRequest, ::Hash]
485
- # A request object representing the call parameters. Required. To specify no
486
- # parameters, or to keep all the default parameter values, pass an empty Hash.
487
- # @param options [::Gapic::CallOptions, ::Hash]
488
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
489
- #
490
- # @overload update_profile(profile: nil, update_mask: nil)
491
- # Pass arguments to `update_profile` via keyword arguments. Note that at
492
- # least one keyword argument is required. To specify no parameters, or to keep all
493
- # the default parameter values, pass an empty Hash as a request object (see above).
494
- #
495
- # @param profile [::Google::Cloud::Talent::V4beta1::Profile, ::Hash]
496
- # Required. Profile to be updated.
497
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
498
- # A field mask to specify the profile fields to update.
499
- #
500
- # A full update is performed if it is unset.
501
- #
502
- # @yield [response, operation] Access the result along with the RPC operation
503
- # @yieldparam response [::Google::Cloud::Talent::V4beta1::Profile]
504
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
505
- #
506
- # @return [::Google::Cloud::Talent::V4beta1::Profile]
507
- #
508
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
509
- #
510
- # @example Basic example
511
- # require "google/cloud/talent/v4beta1"
512
- #
513
- # # Create a client object. The client can be reused for multiple calls.
514
- # client = Google::Cloud::Talent::V4beta1::ProfileService::Client.new
515
- #
516
- # # Create a request. To set request fields, pass in keyword arguments.
517
- # request = Google::Cloud::Talent::V4beta1::UpdateProfileRequest.new
518
- #
519
- # # Call the update_profile method.
520
- # result = client.update_profile request
521
- #
522
- # # The returned object is of type Google::Cloud::Talent::V4beta1::Profile.
523
- # p result
524
- #
525
- def update_profile request, options = nil
526
- raise ::ArgumentError, "request must be provided" if request.nil?
527
-
528
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateProfileRequest
529
-
530
- # Converts hash and nil to an options object
531
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
532
-
533
- # Customize the options with defaults
534
- metadata = @config.rpcs.update_profile.metadata.to_h
535
-
536
- # Set x-goog-api-client and x-goog-user-project headers
537
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
538
- lib_name: @config.lib_name, lib_version: @config.lib_version,
539
- gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
540
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
541
-
542
- header_params = {}
543
- if request.profile&.name
544
- header_params["profile.name"] = request.profile.name
545
- end
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.update_profile.timeout,
551
- metadata: metadata,
552
- retry_policy: @config.rpcs.update_profile.retry_policy
553
-
554
- options.apply_defaults timeout: @config.timeout,
555
- metadata: @config.metadata,
556
- retry_policy: @config.retry_policy
557
-
558
- @profile_service_stub.call_rpc :update_profile, request, options: options do |response, operation|
559
- yield response, operation if block_given?
560
- return response
561
- end
562
- rescue ::GRPC::BadStatus => e
563
- raise ::Google::Cloud::Error.from_error(e)
564
- end
565
-
566
- ##
567
- # Deletes the specified profile.
568
- # Prerequisite: The profile has no associated applications or assignments
569
- # associated.
570
- #
571
- # @overload delete_profile(request, options = nil)
572
- # Pass arguments to `delete_profile` via a request object, either of type
573
- # {::Google::Cloud::Talent::V4beta1::DeleteProfileRequest} or an equivalent Hash.
574
- #
575
- # @param request [::Google::Cloud::Talent::V4beta1::DeleteProfileRequest, ::Hash]
576
- # A request object representing the call parameters. Required. To specify no
577
- # parameters, or to keep all the default parameter values, pass an empty Hash.
578
- # @param options [::Gapic::CallOptions, ::Hash]
579
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
580
- #
581
- # @overload delete_profile(name: nil)
582
- # Pass arguments to `delete_profile` via keyword arguments. Note that at
583
- # least one keyword argument is required. To specify no parameters, or to keep all
584
- # the default parameter values, pass an empty Hash as a request object (see above).
585
- #
586
- # @param name [::String]
587
- # Required. Resource name of the profile to be deleted.
588
- #
589
- # The format is
590
- # "projects/\\{project_id}/tenants/\\{tenant_id}/profiles/\\{profile_id}". For
591
- # example, "projects/foo/tenants/bar/profiles/baz".
592
- #
593
- # @yield [response, operation] Access the result along with the RPC operation
594
- # @yieldparam response [::Google::Protobuf::Empty]
595
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
596
- #
597
- # @return [::Google::Protobuf::Empty]
598
- #
599
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
600
- #
601
- # @example Basic example
602
- # require "google/cloud/talent/v4beta1"
603
- #
604
- # # Create a client object. The client can be reused for multiple calls.
605
- # client = Google::Cloud::Talent::V4beta1::ProfileService::Client.new
606
- #
607
- # # Create a request. To set request fields, pass in keyword arguments.
608
- # request = Google::Cloud::Talent::V4beta1::DeleteProfileRequest.new
609
- #
610
- # # Call the delete_profile method.
611
- # result = client.delete_profile request
612
- #
613
- # # The returned object is of type Google::Protobuf::Empty.
614
- # p result
615
- #
616
- def delete_profile request, options = nil
617
- raise ::ArgumentError, "request must be provided" if request.nil?
618
-
619
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteProfileRequest
620
-
621
- # Converts hash and nil to an options object
622
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
623
-
624
- # Customize the options with defaults
625
- metadata = @config.rpcs.delete_profile.metadata.to_h
626
-
627
- # Set x-goog-api-client and x-goog-user-project headers
628
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
629
- lib_name: @config.lib_name, lib_version: @config.lib_version,
630
- gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
631
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
632
-
633
- header_params = {}
634
- if request.name
635
- header_params["name"] = request.name
636
- end
637
-
638
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
639
- metadata[:"x-goog-request-params"] ||= request_params_header
640
-
641
- options.apply_defaults timeout: @config.rpcs.delete_profile.timeout,
642
- metadata: metadata,
643
- retry_policy: @config.rpcs.delete_profile.retry_policy
644
-
645
- options.apply_defaults timeout: @config.timeout,
646
- metadata: @config.metadata,
647
- retry_policy: @config.retry_policy
648
-
649
- @profile_service_stub.call_rpc :delete_profile, request, options: options do |response, operation|
650
- yield response, operation if block_given?
651
- return response
652
- end
653
- rescue ::GRPC::BadStatus => e
654
- raise ::Google::Cloud::Error.from_error(e)
655
- end
656
-
657
- ##
658
- # Searches for profiles within a tenant.
659
- #
660
- # For example, search by raw queries "software engineer in Mountain View" or
661
- # search by structured filters (location filter, education filter, etc.).
662
- #
663
- # See {::Google::Cloud::Talent::V4beta1::SearchProfilesRequest SearchProfilesRequest} for more information.
664
- #
665
- # @overload search_profiles(request, options = nil)
666
- # Pass arguments to `search_profiles` via a request object, either of type
667
- # {::Google::Cloud::Talent::V4beta1::SearchProfilesRequest} or an equivalent Hash.
668
- #
669
- # @param request [::Google::Cloud::Talent::V4beta1::SearchProfilesRequest, ::Hash]
670
- # A request object representing the call parameters. Required. To specify no
671
- # parameters, or to keep all the default parameter values, pass an empty Hash.
672
- # @param options [::Gapic::CallOptions, ::Hash]
673
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
674
- #
675
- # @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)
676
- # Pass arguments to `search_profiles` via keyword arguments. Note that at
677
- # least one keyword argument is required. To specify no parameters, or to keep all
678
- # the default parameter values, pass an empty Hash as a request object (see above).
679
- #
680
- # @param parent [::String]
681
- # Required. The resource name of the tenant to search within.
682
- #
683
- # The format is "projects/\\{project_id}/tenants/\\{tenant_id}". For example,
684
- # "projects/foo/tenants/bar".
685
- # @param request_metadata [::Google::Cloud::Talent::V4beta1::RequestMetadata, ::Hash]
686
- # Required. The meta information collected about the profile search user. This is used
687
- # to improve the search quality of the service. These values are provided by
688
- # users, and must be precise and consistent.
689
- # @param profile_query [::Google::Cloud::Talent::V4beta1::ProfileQuery, ::Hash]
690
- # Search query to execute. See {::Google::Cloud::Talent::V4beta1::ProfileQuery ProfileQuery} for more details.
691
- # @param page_size [::Integer]
692
- # A limit on the number of profiles returned in the search results.
693
- # A value above the default value 10 can increase search response time.
694
- #
695
- # The maximum value allowed is 100. Otherwise an error is thrown.
696
- # @param page_token [::String]
697
- # The pageToken, similar to offset enables users of the API to paginate
698
- # through the search results. To retrieve the first page of results, set the
699
- # pageToken to empty. The search response includes a
700
- # {::Google::Cloud::Talent::V4beta1::SearchProfilesResponse#next_page_token nextPageToken} field that can be
701
- # used to populate the pageToken field for the next page of results. Using
702
- # pageToken instead of offset increases the performance of the API,
703
- # especially compared to larger offset values.
704
- # @param offset [::Integer]
705
- # An integer that specifies the current offset (that is, starting result) in
706
- # search results. This field is only considered if {::Google::Cloud::Talent::V4beta1::SearchProfilesRequest#page_token page_token} is unset.
707
- #
708
- # The maximum allowed value is 5000. Otherwise an error is thrown.
709
- #
710
- # For example, 0 means to search from the first profile, and 10 means to
711
- # search from the 11th profile. This can be used for pagination, for example
712
- # pageSize = 10 and offset = 10 means to search from the second page.
713
- # @param disable_spell_check [::Boolean]
714
- # This flag controls the spell-check feature. If `false`, the
715
- # service attempts to correct a misspelled query.
716
- #
717
- # For example, "enginee" is corrected to "engineer".
718
- # @param order_by [::String]
719
- # The criteria that determines how search results are sorted.
720
- # Defaults is "relevance desc" if no value is specified.
721
- #
722
- # Supported options are:
723
- #
724
- # * "relevance desc": By descending relevance, as determined by the API
725
- # algorithms.
726
- # * "update_date desc": Sort by {::Google::Cloud::Talent::V4beta1::Profile#update_time Profile.update_time} in descending order
727
- # (recently updated profiles first).
728
- # * "create_date desc": Sort by {::Google::Cloud::Talent::V4beta1::Profile#create_time Profile.create_time} in descending order
729
- # (recently created profiles first).
730
- # * "first_name": Sort by {::Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#given_name PersonName.PersonStructuredName.given_name} in
731
- # ascending order.
732
- # * "first_name desc": Sort by {::Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#given_name PersonName.PersonStructuredName.given_name}
733
- # in descending order.
734
- # * "last_name": Sort by {::Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#family_name PersonName.PersonStructuredName.family_name} in
735
- # ascending order.
736
- # * "last_name desc": Sort by {::Google::Cloud::Talent::V4beta1::PersonName::PersonStructuredName#family_name PersonName.PersonStructuredName.family_name}
737
- # in ascending order.
738
- # @param case_sensitive_sort [::Boolean]
739
- # When sort by field is based on alphabetical order, sort values case
740
- # sensitively (based on ASCII) when the value is set to true. Default value
741
- # is case in-sensitive sort (false).
742
- # @param histogram_queries [::Array<::Google::Cloud::Talent::V4beta1::HistogramQuery, ::Hash>]
743
- # A list of expressions specifies histogram requests against matching
744
- # profiles for {::Google::Cloud::Talent::V4beta1::SearchProfilesRequest SearchProfilesRequest}.
745
- #
746
- # The expression syntax looks like a function definition with parameters.
747
- #
748
- # Function syntax: function_name(histogram_facet[, list of buckets])
749
- #
750
- # Data types:
751
- #
752
- # * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`.
753
- # * String: string like "any string with backslash escape for quote(\")."
754
- # * Number: whole number and floating point number like 10, -1 and -0.01.
755
- # * List: list of elements with comma(,) separator surrounded by square
756
- # brackets. For example, [1, 2, 3] and ["one", "two", "three"].
757
- #
758
- # Built-in constants:
759
- #
760
- # * MIN (minimum number similar to java Double.MIN_VALUE)
761
- # * MAX (maximum number similar to java Double.MAX_VALUE)
762
- #
763
- # Built-in functions:
764
- #
765
- # * bucket(start, end[, label])
766
- # Bucket build-in function creates a bucket with range of [start, end). Note
767
- # that the end is exclusive.
768
- # For example, bucket(1, MAX, "positive number") or bucket(1, 10).
769
- #
770
- # Histogram Facets:
771
- #
772
- # * admin1: Admin1 is a global placeholder for referring to state, province,
773
- # or the particular term a country uses to define the geographic structure
774
- # below the country level. Examples include states codes such as "CA", "IL",
775
- # "NY", and provinces, such as "BC".
776
- # * locality: Locality is a global placeholder for referring to city, town,
777
- # or the particular term a country uses to define the geographic structure
778
- # below the admin1 level. Examples include city names such as
779
- # "Mountain View" and "New York".
780
- # * extended_locality: Extended locality is concatenated version of admin1
781
- # and locality with comma separator. For example, "Mountain View, CA" and
782
- # "New York, NY".
783
- # * postal_code: Postal code of profile which follows locale code.
784
- # * country: Country code (ISO-3166-1 alpha-2 code) of profile, such as US,
785
- # JP, GB.
786
- # * job_title: Normalized job titles specified in EmploymentHistory.
787
- # * company_name: Normalized company name of profiles to match on.
788
- # * institution: The school name. For example, "MIT",
789
- # "University of California, Berkeley"
790
- # * degree: Highest education degree in ISCED code. Each value in degree
791
- # covers a specific level of education, without any expansion to upper nor
792
- # lower levels of education degree.
793
- # * experience_in_months: experience in months. 0 means 0 month to 1 month
794
- # (exclusive).
795
- # * application_date: The application date specifies application start dates.
796
- # See {::Google::Cloud::Talent::V4beta1::ApplicationDateFilter ApplicationDateFilter} for more details.
797
- # * application_outcome_notes: The application outcome reason specifies the
798
- # reasons behind the outcome of the job application.
799
- # See {::Google::Cloud::Talent::V4beta1::ApplicationOutcomeNotesFilter ApplicationOutcomeNotesFilter} for more details.
800
- # * application_job_title: The application job title specifies the job
801
- # applied for in the application.
802
- # See {::Google::Cloud::Talent::V4beta1::ApplicationJobFilter ApplicationJobFilter} for more details.
803
- # * hirable_status: Hirable status specifies the profile's hirable status.
804
- # * string_custom_attribute: String custom attributes. Values can be accessed
805
- # via square bracket notation like string_custom_attribute["key1"].
806
- # * numeric_custom_attribute: Numeric custom attributes. Values can be
807
- # accessed via square bracket notation like numeric_custom_attribute["key1"].
808
- #
809
- # Example expressions:
810
- #
811
- # * count(admin1)
812
- # * count(experience_in_months, [bucket(0, 12, "1 year"),
813
- # bucket(12, 36, "1-3 years"), bucket(36, MAX, "3+ years")])
814
- # * count(string_custom_attribute["assigned_recruiter"])
815
- # * count(numeric_custom_attribute["favorite_number"],
816
- # [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])
817
- # @param result_set_id [::String]
818
- # An id that uniquely identifies the result set of a
819
- # {::Google::Cloud::Talent::V4beta1::ProfileService::Client#search_profiles SearchProfiles} call. The id should be
820
- # retrieved from the
821
- # {::Google::Cloud::Talent::V4beta1::SearchProfilesResponse SearchProfilesResponse} message returned from a previous
822
- # invocation of {::Google::Cloud::Talent::V4beta1::ProfileService::Client#search_profiles SearchProfiles}.
823
- #
824
- # A result set is an ordered list of search results.
825
- #
826
- # If this field is not set, a new result set is computed based on the
827
- # {::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
828
- # access this result set.
829
- #
830
- # If this field is set, the service will ignore the resource and
831
- # {::Google::Cloud::Talent::V4beta1::SearchProfilesRequest#profile_query profile_query} values, and simply retrieve a page of results from the
832
- # corresponding result set. In this case, one and only one of {::Google::Cloud::Talent::V4beta1::SearchProfilesRequest#page_token page_token}
833
- # or {::Google::Cloud::Talent::V4beta1::SearchProfilesRequest#offset offset} must be set.
834
- #
835
- # A typical use case is to invoke {::Google::Cloud::Talent::V4beta1::SearchProfilesRequest SearchProfilesRequest} without this
836
- # field, then use the resulting {::Google::Cloud::Talent::V4beta1::SearchProfilesRequest#result_set_id result_set_id} in
837
- # {::Google::Cloud::Talent::V4beta1::SearchProfilesResponse SearchProfilesResponse} to page through the results.
838
- # @param strict_keywords_search [::Boolean]
839
- # This flag is used to indicate whether the service will attempt to
840
- # understand synonyms and terms related to the search query or treat the
841
- # query "as is" when it generates a set of results. By default this flag is
842
- # set to false, thus allowing expanded results to also be returned. For
843
- # example a search for "software engineer" might also return candidates who
844
- # have experience in jobs similar to software engineer positions. By setting
845
- # this flag to true, the service will only attempt to deliver candidates has
846
- # software engineer in his/her global fields by treating "software engineer"
847
- # as a keyword.
848
- #
849
- # It is recommended to provide a feature in the UI (such as a checkbox) to
850
- # allow recruiters to set this flag to true if they intend to search for
851
- # longer boolean strings.
852
- #
853
- # @yield [response, operation] Access the result along with the RPC operation
854
- # @yieldparam response [::Google::Cloud::Talent::V4beta1::SearchProfilesResponse]
855
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
856
- #
857
- # @return [::Google::Cloud::Talent::V4beta1::SearchProfilesResponse]
858
- #
859
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
860
- #
861
- # @example Basic example
862
- # require "google/cloud/talent/v4beta1"
863
- #
864
- # # Create a client object. The client can be reused for multiple calls.
865
- # client = Google::Cloud::Talent::V4beta1::ProfileService::Client.new
866
- #
867
- # # Create a request. To set request fields, pass in keyword arguments.
868
- # request = Google::Cloud::Talent::V4beta1::SearchProfilesRequest.new
869
- #
870
- # # Call the search_profiles method.
871
- # result = client.search_profiles request
872
- #
873
- # # The returned object is of type Google::Cloud::Talent::V4beta1::SearchProfilesResponse.
874
- # p result
875
- #
876
- def search_profiles request, options = nil
877
- raise ::ArgumentError, "request must be provided" if request.nil?
878
-
879
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::SearchProfilesRequest
880
-
881
- # Converts hash and nil to an options object
882
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
883
-
884
- # Customize the options with defaults
885
- metadata = @config.rpcs.search_profiles.metadata.to_h
886
-
887
- # Set x-goog-api-client and x-goog-user-project headers
888
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
889
- lib_name: @config.lib_name, lib_version: @config.lib_version,
890
- gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
891
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
892
-
893
- header_params = {}
894
- if request.parent
895
- header_params["parent"] = request.parent
896
- end
897
-
898
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
899
- metadata[:"x-goog-request-params"] ||= request_params_header
900
-
901
- options.apply_defaults timeout: @config.rpcs.search_profiles.timeout,
902
- metadata: metadata,
903
- retry_policy: @config.rpcs.search_profiles.retry_policy
904
-
905
- options.apply_defaults timeout: @config.timeout,
906
- metadata: @config.metadata,
907
- retry_policy: @config.retry_policy
908
-
909
- @profile_service_stub.call_rpc :search_profiles, request, options: options do |response, operation|
910
- yield response, operation if block_given?
911
- return response
912
- end
913
- rescue ::GRPC::BadStatus => e
914
- raise ::Google::Cloud::Error.from_error(e)
915
- end
916
-
917
- ##
918
- # Configuration class for the ProfileService API.
919
- #
920
- # This class represents the configuration for ProfileService,
921
- # providing control over timeouts, retry behavior, logging, transport
922
- # parameters, and other low-level controls. Certain parameters can also be
923
- # applied individually to specific RPCs. See
924
- # {::Google::Cloud::Talent::V4beta1::ProfileService::Client::Configuration::Rpcs}
925
- # for a list of RPCs that can be configured independently.
926
- #
927
- # Configuration can be applied globally to all clients, or to a single client
928
- # on construction.
929
- #
930
- # @example
931
- #
932
- # # Modify the global config, setting the timeout for
933
- # # list_profiles to 20 seconds,
934
- # # and all remaining timeouts to 10 seconds.
935
- # ::Google::Cloud::Talent::V4beta1::ProfileService::Client.configure do |config|
936
- # config.timeout = 10.0
937
- # config.rpcs.list_profiles.timeout = 20.0
938
- # end
939
- #
940
- # # Apply the above configuration only to a new client.
941
- # client = ::Google::Cloud::Talent::V4beta1::ProfileService::Client.new do |config|
942
- # config.timeout = 10.0
943
- # config.rpcs.list_profiles.timeout = 20.0
944
- # end
945
- #
946
- # @!attribute [rw] endpoint
947
- # The hostname or hostname:port of the service endpoint.
948
- # Defaults to `"jobs.googleapis.com"`.
949
- # @return [::String]
950
- # @!attribute [rw] credentials
951
- # Credentials to send with calls. You may provide any of the following types:
952
- # * (`String`) The path to a service account key file in JSON format
953
- # * (`Hash`) A service account key as a Hash
954
- # * (`Google::Auth::Credentials`) A googleauth credentials object
955
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
956
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
957
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
958
- # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
959
- # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
960
- # * (`nil`) indicating no credentials
961
- # @return [::Object]
962
- # @!attribute [rw] scope
963
- # The OAuth scopes
964
- # @return [::Array<::String>]
965
- # @!attribute [rw] lib_name
966
- # The library name as recorded in instrumentation and logging
967
- # @return [::String]
968
- # @!attribute [rw] lib_version
969
- # The library version as recorded in instrumentation and logging
970
- # @return [::String]
971
- # @!attribute [rw] channel_args
972
- # Extra parameters passed to the gRPC channel. Note: this is ignored if a
973
- # `GRPC::Core::Channel` object is provided as the credential.
974
- # @return [::Hash]
975
- # @!attribute [rw] interceptors
976
- # An array of interceptors that are run before calls are executed.
977
- # @return [::Array<::GRPC::ClientInterceptor>]
978
- # @!attribute [rw] timeout
979
- # The call timeout in seconds.
980
- # @return [::Numeric]
981
- # @!attribute [rw] metadata
982
- # Additional gRPC headers to be sent with the call.
983
- # @return [::Hash{::Symbol=>::String}]
984
- # @!attribute [rw] retry_policy
985
- # The retry policy. The value is a hash with the following keys:
986
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
987
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
988
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
989
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
990
- # trigger a retry.
991
- # @return [::Hash]
992
- # @!attribute [rw] quota_project
993
- # A separate project against which to charge quota.
994
- # @return [::String]
995
- #
996
- class Configuration
997
- extend ::Gapic::Config
998
-
999
- config_attr :endpoint, "jobs.googleapis.com", ::String
1000
- config_attr :credentials, nil do |value|
1001
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1002
- allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1003
- allowed.any? { |klass| klass === value }
1004
- end
1005
- config_attr :scope, nil, ::String, ::Array, nil
1006
- config_attr :lib_name, nil, ::String, nil
1007
- config_attr :lib_version, nil, ::String, nil
1008
- config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1009
- config_attr :interceptors, nil, ::Array, nil
1010
- config_attr :timeout, nil, ::Numeric, nil
1011
- config_attr :metadata, nil, ::Hash, nil
1012
- config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1013
- config_attr :quota_project, nil, ::String, nil
1014
-
1015
- # @private
1016
- def initialize parent_config = nil
1017
- @parent_config = parent_config unless parent_config.nil?
1018
-
1019
- yield self if block_given?
1020
- end
1021
-
1022
- ##
1023
- # Configurations for individual RPCs
1024
- # @return [Rpcs]
1025
- #
1026
- def rpcs
1027
- @rpcs ||= begin
1028
- parent_rpcs = nil
1029
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1030
- Rpcs.new parent_rpcs
1031
- end
1032
- end
1033
-
1034
- ##
1035
- # Configuration RPC class for the ProfileService API.
1036
- #
1037
- # Includes fields providing the configuration for each RPC in this service.
1038
- # Each configuration object is of type `Gapic::Config::Method` and includes
1039
- # the following configuration fields:
1040
- #
1041
- # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1042
- # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1043
- # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1044
- # include the following keys:
1045
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1046
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1047
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1048
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1049
- # trigger a retry.
1050
- #
1051
- class Rpcs
1052
- ##
1053
- # RPC-specific configuration for `list_profiles`
1054
- # @return [::Gapic::Config::Method]
1055
- #
1056
- attr_reader :list_profiles
1057
- ##
1058
- # RPC-specific configuration for `create_profile`
1059
- # @return [::Gapic::Config::Method]
1060
- #
1061
- attr_reader :create_profile
1062
- ##
1063
- # RPC-specific configuration for `get_profile`
1064
- # @return [::Gapic::Config::Method]
1065
- #
1066
- attr_reader :get_profile
1067
- ##
1068
- # RPC-specific configuration for `update_profile`
1069
- # @return [::Gapic::Config::Method]
1070
- #
1071
- attr_reader :update_profile
1072
- ##
1073
- # RPC-specific configuration for `delete_profile`
1074
- # @return [::Gapic::Config::Method]
1075
- #
1076
- attr_reader :delete_profile
1077
- ##
1078
- # RPC-specific configuration for `search_profiles`
1079
- # @return [::Gapic::Config::Method]
1080
- #
1081
- attr_reader :search_profiles
1082
-
1083
- # @private
1084
- def initialize parent_rpcs = nil
1085
- list_profiles_config = parent_rpcs.list_profiles if parent_rpcs.respond_to? :list_profiles
1086
- @list_profiles = ::Gapic::Config::Method.new list_profiles_config
1087
- create_profile_config = parent_rpcs.create_profile if parent_rpcs.respond_to? :create_profile
1088
- @create_profile = ::Gapic::Config::Method.new create_profile_config
1089
- get_profile_config = parent_rpcs.get_profile if parent_rpcs.respond_to? :get_profile
1090
- @get_profile = ::Gapic::Config::Method.new get_profile_config
1091
- update_profile_config = parent_rpcs.update_profile if parent_rpcs.respond_to? :update_profile
1092
- @update_profile = ::Gapic::Config::Method.new update_profile_config
1093
- delete_profile_config = parent_rpcs.delete_profile if parent_rpcs.respond_to? :delete_profile
1094
- @delete_profile = ::Gapic::Config::Method.new delete_profile_config
1095
- search_profiles_config = parent_rpcs.search_profiles if parent_rpcs.respond_to? :search_profiles
1096
- @search_profiles = ::Gapic::Config::Method.new search_profiles_config
1097
-
1098
- yield self if block_given?
1099
- end
1100
- end
1101
- end
1102
- end
1103
- end
1104
- end
1105
- end
1106
- end
1107
- end