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,732 +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/application_service_pb"
21
-
22
- module Google
23
- module Cloud
24
- module Talent
25
- module V4beta1
26
- module ApplicationService
27
- ##
28
- # Client for the ApplicationService service.
29
- #
30
- # A service that handles application management, including CRUD and
31
- # enumeration.
32
- #
33
- class Client
34
- include Paths
35
-
36
- # @private
37
- attr_reader :application_service_stub
38
-
39
- ##
40
- # Configure the ApplicationService Client class.
41
- #
42
- # See {::Google::Cloud::Talent::V4beta1::ApplicationService::Client::Configuration}
43
- # for a description of the configuration fields.
44
- #
45
- # @example
46
- #
47
- # # Modify the configuration for all ApplicationService clients
48
- # ::Google::Cloud::Talent::V4beta1::ApplicationService::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.create_application.timeout = 30.0
69
-
70
- default_config.rpcs.get_application.timeout = 30.0
71
- default_config.rpcs.get_application.retry_policy = {
72
- initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
73
- }
74
-
75
- default_config.rpcs.update_application.timeout = 30.0
76
-
77
- default_config.rpcs.delete_application.timeout = 30.0
78
- default_config.rpcs.delete_application.retry_policy = {
79
- initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
80
- }
81
-
82
- default_config.rpcs.list_applications.timeout = 30.0
83
- default_config.rpcs.list_applications.retry_policy = {
84
- initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
85
- }
86
-
87
- default_config
88
- end
89
- yield @configure if block_given?
90
- @configure
91
- end
92
-
93
- ##
94
- # Configure the ApplicationService Client instance.
95
- #
96
- # The configuration is set to the derived mode, meaning that values can be changed,
97
- # but structural changes (adding new fields, etc.) are not allowed. Structural changes
98
- # should be made on {Client.configure}.
99
- #
100
- # See {::Google::Cloud::Talent::V4beta1::ApplicationService::Client::Configuration}
101
- # for a description of the configuration fields.
102
- #
103
- # @yield [config] Configure the Client client.
104
- # @yieldparam config [Client::Configuration]
105
- #
106
- # @return [Client::Configuration]
107
- #
108
- def configure
109
- yield @config if block_given?
110
- @config
111
- end
112
-
113
- ##
114
- # Create a new ApplicationService client object.
115
- #
116
- # @example
117
- #
118
- # # Create a client using the default configuration
119
- # client = ::Google::Cloud::Talent::V4beta1::ApplicationService::Client.new
120
- #
121
- # # Create a client using a custom configuration
122
- # client = ::Google::Cloud::Talent::V4beta1::ApplicationService::Client.new do |config|
123
- # config.timeout = 10.0
124
- # end
125
- #
126
- # @yield [config] Configure the ApplicationService client.
127
- # @yieldparam config [Client::Configuration]
128
- #
129
- def initialize
130
- # These require statements are intentionally placed here to initialize
131
- # the gRPC module only when it's required.
132
- # See https://github.com/googleapis/toolkit/issues/446
133
- require "gapic/grpc"
134
- require "google/cloud/talent/v4beta1/application_service_services_pb"
135
-
136
- # Create the configuration object
137
- @config = Configuration.new Client.configure
138
-
139
- # Yield the configuration if needed
140
- yield @config if block_given?
141
-
142
- # Create credentials
143
- credentials = @config.credentials
144
- # Use self-signed JWT if the endpoint is unchanged from default,
145
- # but only if the default endpoint does not have a region prefix.
146
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
147
- !@config.endpoint.split(".").first.include?("-")
148
- credentials ||= Credentials.default scope: @config.scope,
149
- enable_self_signed_jwt: enable_self_signed_jwt
150
- if credentials.is_a?(::String) || credentials.is_a?(::Hash)
151
- credentials = Credentials.new credentials, scope: @config.scope
152
- end
153
- @quota_project_id = @config.quota_project
154
- @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
155
-
156
- @application_service_stub = ::Gapic::ServiceStub.new(
157
- ::Google::Cloud::Talent::V4beta1::ApplicationService::Stub,
158
- credentials: credentials,
159
- endpoint: @config.endpoint,
160
- channel_args: @config.channel_args,
161
- interceptors: @config.interceptors
162
- )
163
- end
164
-
165
- # Service calls
166
-
167
- ##
168
- # Creates a new application entity.
169
- #
170
- # @overload create_application(request, options = nil)
171
- # Pass arguments to `create_application` via a request object, either of type
172
- # {::Google::Cloud::Talent::V4beta1::CreateApplicationRequest} or an equivalent Hash.
173
- #
174
- # @param request [::Google::Cloud::Talent::V4beta1::CreateApplicationRequest, ::Hash]
175
- # A request object representing the call parameters. Required. To specify no
176
- # parameters, or to keep all the default parameter values, pass an empty Hash.
177
- # @param options [::Gapic::CallOptions, ::Hash]
178
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
179
- #
180
- # @overload create_application(parent: nil, application: nil)
181
- # Pass arguments to `create_application` via keyword arguments. Note that at
182
- # least one keyword argument is required. To specify no parameters, or to keep all
183
- # the default parameter values, pass an empty Hash as a request object (see above).
184
- #
185
- # @param parent [::String]
186
- # Required. Resource name of the profile under which the application is created.
187
- #
188
- # The format is
189
- # "projects/\\{project_id}/tenants/\\{tenant_id}/profiles/\\{profile_id}".
190
- # For example, "projects/foo/tenants/bar/profiles/baz".
191
- # @param application [::Google::Cloud::Talent::V4beta1::Application, ::Hash]
192
- # Required. The application to be created.
193
- #
194
- # @yield [response, operation] Access the result along with the RPC operation
195
- # @yieldparam response [::Google::Cloud::Talent::V4beta1::Application]
196
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
197
- #
198
- # @return [::Google::Cloud::Talent::V4beta1::Application]
199
- #
200
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
201
- #
202
- def create_application request, options = nil
203
- raise ::ArgumentError, "request must be provided" if request.nil?
204
-
205
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateApplicationRequest
206
-
207
- # Converts hash and nil to an options object
208
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
209
-
210
- # Customize the options with defaults
211
- metadata = @config.rpcs.create_application.metadata.to_h
212
-
213
- # Set x-goog-api-client and x-goog-user-project headers
214
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
215
- lib_name: @config.lib_name, lib_version: @config.lib_version,
216
- gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
217
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
218
-
219
- header_params = {}
220
- if request.parent
221
- header_params["parent"] = request.parent
222
- end
223
-
224
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
225
- metadata[:"x-goog-request-params"] ||= request_params_header
226
-
227
- options.apply_defaults timeout: @config.rpcs.create_application.timeout,
228
- metadata: metadata,
229
- retry_policy: @config.rpcs.create_application.retry_policy
230
-
231
- options.apply_defaults timeout: @config.timeout,
232
- metadata: @config.metadata,
233
- retry_policy: @config.retry_policy
234
-
235
- @application_service_stub.call_rpc :create_application, request, options: options do |response, operation|
236
- yield response, operation if block_given?
237
- return response
238
- end
239
- rescue ::GRPC::BadStatus => e
240
- raise ::Google::Cloud::Error.from_error(e)
241
- end
242
-
243
- ##
244
- # Retrieves specified application.
245
- #
246
- # @overload get_application(request, options = nil)
247
- # Pass arguments to `get_application` via a request object, either of type
248
- # {::Google::Cloud::Talent::V4beta1::GetApplicationRequest} or an equivalent Hash.
249
- #
250
- # @param request [::Google::Cloud::Talent::V4beta1::GetApplicationRequest, ::Hash]
251
- # A request object representing the call parameters. Required. To specify no
252
- # parameters, or to keep all the default parameter values, pass an empty Hash.
253
- # @param options [::Gapic::CallOptions, ::Hash]
254
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
255
- #
256
- # @overload get_application(name: nil)
257
- # Pass arguments to `get_application` via keyword arguments. Note that at
258
- # least one keyword argument is required. To specify no parameters, or to keep all
259
- # the default parameter values, pass an empty Hash as a request object (see above).
260
- #
261
- # @param name [::String]
262
- # Required. The resource name of the application to be retrieved.
263
- #
264
- # The format is
265
- # "projects/\\{project_id}/tenants/\\{tenant_id}/profiles/\\{profile_id}/applications/\\{application_id}".
266
- # For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
267
- #
268
- # @yield [response, operation] Access the result along with the RPC operation
269
- # @yieldparam response [::Google::Cloud::Talent::V4beta1::Application]
270
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
271
- #
272
- # @return [::Google::Cloud::Talent::V4beta1::Application]
273
- #
274
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
275
- #
276
- def get_application request, options = nil
277
- raise ::ArgumentError, "request must be provided" if request.nil?
278
-
279
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::GetApplicationRequest
280
-
281
- # Converts hash and nil to an options object
282
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
283
-
284
- # Customize the options with defaults
285
- metadata = @config.rpcs.get_application.metadata.to_h
286
-
287
- # Set x-goog-api-client and x-goog-user-project headers
288
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
289
- lib_name: @config.lib_name, lib_version: @config.lib_version,
290
- gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
291
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
292
-
293
- header_params = {}
294
- if request.name
295
- header_params["name"] = request.name
296
- end
297
-
298
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
299
- metadata[:"x-goog-request-params"] ||= request_params_header
300
-
301
- options.apply_defaults timeout: @config.rpcs.get_application.timeout,
302
- metadata: metadata,
303
- retry_policy: @config.rpcs.get_application.retry_policy
304
-
305
- options.apply_defaults timeout: @config.timeout,
306
- metadata: @config.metadata,
307
- retry_policy: @config.retry_policy
308
-
309
- @application_service_stub.call_rpc :get_application, request, options: options do |response, operation|
310
- yield response, operation if block_given?
311
- return response
312
- end
313
- rescue ::GRPC::BadStatus => e
314
- raise ::Google::Cloud::Error.from_error(e)
315
- end
316
-
317
- ##
318
- # Updates specified application.
319
- #
320
- # @overload update_application(request, options = nil)
321
- # Pass arguments to `update_application` via a request object, either of type
322
- # {::Google::Cloud::Talent::V4beta1::UpdateApplicationRequest} or an equivalent Hash.
323
- #
324
- # @param request [::Google::Cloud::Talent::V4beta1::UpdateApplicationRequest, ::Hash]
325
- # A request object representing the call parameters. Required. To specify no
326
- # parameters, or to keep all the default parameter values, pass an empty Hash.
327
- # @param options [::Gapic::CallOptions, ::Hash]
328
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
329
- #
330
- # @overload update_application(application: nil, update_mask: nil)
331
- # Pass arguments to `update_application` via keyword arguments. Note that at
332
- # least one keyword argument is required. To specify no parameters, or to keep all
333
- # the default parameter values, pass an empty Hash as a request object (see above).
334
- #
335
- # @param application [::Google::Cloud::Talent::V4beta1::Application, ::Hash]
336
- # Required. The application resource to replace the current resource in the system.
337
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
338
- # Strongly recommended for the best service experience.
339
- #
340
- # If {::Google::Cloud::Talent::V4beta1::UpdateApplicationRequest#update_mask update_mask} is provided, only the specified fields in
341
- # {::Google::Cloud::Talent::V4beta1::UpdateApplicationRequest#application application} are updated. Otherwise all the fields are updated.
342
- #
343
- # A field mask to specify the application fields to be updated. Only
344
- # top level fields of {::Google::Cloud::Talent::V4beta1::Application Application} are supported.
345
- #
346
- # @yield [response, operation] Access the result along with the RPC operation
347
- # @yieldparam response [::Google::Cloud::Talent::V4beta1::Application]
348
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
349
- #
350
- # @return [::Google::Cloud::Talent::V4beta1::Application]
351
- #
352
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
353
- #
354
- def update_application request, options = nil
355
- raise ::ArgumentError, "request must be provided" if request.nil?
356
-
357
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::UpdateApplicationRequest
358
-
359
- # Converts hash and nil to an options object
360
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
361
-
362
- # Customize the options with defaults
363
- metadata = @config.rpcs.update_application.metadata.to_h
364
-
365
- # Set x-goog-api-client and x-goog-user-project headers
366
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
367
- lib_name: @config.lib_name, lib_version: @config.lib_version,
368
- gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
369
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
370
-
371
- header_params = {}
372
- if request.application&.name
373
- header_params["application.name"] = request.application.name
374
- end
375
-
376
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
377
- metadata[:"x-goog-request-params"] ||= request_params_header
378
-
379
- options.apply_defaults timeout: @config.rpcs.update_application.timeout,
380
- metadata: metadata,
381
- retry_policy: @config.rpcs.update_application.retry_policy
382
-
383
- options.apply_defaults timeout: @config.timeout,
384
- metadata: @config.metadata,
385
- retry_policy: @config.retry_policy
386
-
387
- @application_service_stub.call_rpc :update_application, request, options: options do |response, operation|
388
- yield response, operation if block_given?
389
- return response
390
- end
391
- rescue ::GRPC::BadStatus => e
392
- raise ::Google::Cloud::Error.from_error(e)
393
- end
394
-
395
- ##
396
- # Deletes specified application.
397
- #
398
- # @overload delete_application(request, options = nil)
399
- # Pass arguments to `delete_application` via a request object, either of type
400
- # {::Google::Cloud::Talent::V4beta1::DeleteApplicationRequest} or an equivalent Hash.
401
- #
402
- # @param request [::Google::Cloud::Talent::V4beta1::DeleteApplicationRequest, ::Hash]
403
- # A request object representing the call parameters. Required. To specify no
404
- # parameters, or to keep all the default parameter values, pass an empty Hash.
405
- # @param options [::Gapic::CallOptions, ::Hash]
406
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
407
- #
408
- # @overload delete_application(name: nil)
409
- # Pass arguments to `delete_application` via keyword arguments. Note that at
410
- # least one keyword argument is required. To specify no parameters, or to keep all
411
- # the default parameter values, pass an empty Hash as a request object (see above).
412
- #
413
- # @param name [::String]
414
- # Required. The resource name of the application to be deleted.
415
- #
416
- # The format is
417
- # "projects/\\{project_id}/tenants/\\{tenant_id}/profiles/\\{profile_id}/applications/\\{application_id}".
418
- # For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
419
- #
420
- # @yield [response, operation] Access the result along with the RPC operation
421
- # @yieldparam response [::Google::Protobuf::Empty]
422
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
423
- #
424
- # @return [::Google::Protobuf::Empty]
425
- #
426
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
427
- #
428
- def delete_application request, options = nil
429
- raise ::ArgumentError, "request must be provided" if request.nil?
430
-
431
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::DeleteApplicationRequest
432
-
433
- # Converts hash and nil to an options object
434
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
435
-
436
- # Customize the options with defaults
437
- metadata = @config.rpcs.delete_application.metadata.to_h
438
-
439
- # Set x-goog-api-client and x-goog-user-project headers
440
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
441
- lib_name: @config.lib_name, lib_version: @config.lib_version,
442
- gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
443
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
444
-
445
- header_params = {}
446
- if request.name
447
- header_params["name"] = request.name
448
- end
449
-
450
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
451
- metadata[:"x-goog-request-params"] ||= request_params_header
452
-
453
- options.apply_defaults timeout: @config.rpcs.delete_application.timeout,
454
- metadata: metadata,
455
- retry_policy: @config.rpcs.delete_application.retry_policy
456
-
457
- options.apply_defaults timeout: @config.timeout,
458
- metadata: @config.metadata,
459
- retry_policy: @config.retry_policy
460
-
461
- @application_service_stub.call_rpc :delete_application, request, options: options do |response, operation|
462
- yield response, operation if block_given?
463
- return response
464
- end
465
- rescue ::GRPC::BadStatus => e
466
- raise ::Google::Cloud::Error.from_error(e)
467
- end
468
-
469
- ##
470
- # Lists all applications associated with the profile.
471
- #
472
- # @overload list_applications(request, options = nil)
473
- # Pass arguments to `list_applications` via a request object, either of type
474
- # {::Google::Cloud::Talent::V4beta1::ListApplicationsRequest} or an equivalent Hash.
475
- #
476
- # @param request [::Google::Cloud::Talent::V4beta1::ListApplicationsRequest, ::Hash]
477
- # A request object representing the call parameters. Required. To specify no
478
- # parameters, or to keep all the default parameter values, pass an empty Hash.
479
- # @param options [::Gapic::CallOptions, ::Hash]
480
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
481
- #
482
- # @overload list_applications(parent: nil, page_token: nil, page_size: nil)
483
- # Pass arguments to `list_applications` via keyword arguments. Note that at
484
- # least one keyword argument is required. To specify no parameters, or to keep all
485
- # the default parameter values, pass an empty Hash as a request object (see above).
486
- #
487
- # @param parent [::String]
488
- # Required. Resource name of the profile under which the application is created.
489
- #
490
- # The format is
491
- # "projects/\\{project_id}/tenants/\\{tenant_id}/profiles/\\{profile_id}", for
492
- # example, "projects/foo/tenants/bar/profiles/baz".
493
- # @param page_token [::String]
494
- # The starting indicator from which to return results.
495
- # @param page_size [::Integer]
496
- # The maximum number of applications to be returned, at most 100.
497
- # Default is 100 if a non-positive number is provided.
498
- #
499
- # @yield [response, operation] Access the result along with the RPC operation
500
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Application>]
501
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
502
- #
503
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::Talent::V4beta1::Application>]
504
- #
505
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
506
- #
507
- def list_applications request, options = nil
508
- raise ::ArgumentError, "request must be provided" if request.nil?
509
-
510
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::ListApplicationsRequest
511
-
512
- # Converts hash and nil to an options object
513
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
514
-
515
- # Customize the options with defaults
516
- metadata = @config.rpcs.list_applications.metadata.to_h
517
-
518
- # Set x-goog-api-client and x-goog-user-project headers
519
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
520
- lib_name: @config.lib_name, lib_version: @config.lib_version,
521
- gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
522
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
523
-
524
- header_params = {}
525
- if request.parent
526
- header_params["parent"] = request.parent
527
- end
528
-
529
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
530
- metadata[:"x-goog-request-params"] ||= request_params_header
531
-
532
- options.apply_defaults timeout: @config.rpcs.list_applications.timeout,
533
- metadata: metadata,
534
- retry_policy: @config.rpcs.list_applications.retry_policy
535
-
536
- options.apply_defaults timeout: @config.timeout,
537
- metadata: @config.metadata,
538
- retry_policy: @config.retry_policy
539
-
540
- @application_service_stub.call_rpc :list_applications, request, options: options do |response, operation|
541
- response = ::Gapic::PagedEnumerable.new @application_service_stub, :list_applications, request, response, operation, options
542
- yield response, operation if block_given?
543
- return response
544
- end
545
- rescue ::GRPC::BadStatus => e
546
- raise ::Google::Cloud::Error.from_error(e)
547
- end
548
-
549
- ##
550
- # Configuration class for the ApplicationService API.
551
- #
552
- # This class represents the configuration for ApplicationService,
553
- # providing control over timeouts, retry behavior, logging, transport
554
- # parameters, and other low-level controls. Certain parameters can also be
555
- # applied individually to specific RPCs. See
556
- # {::Google::Cloud::Talent::V4beta1::ApplicationService::Client::Configuration::Rpcs}
557
- # for a list of RPCs that can be configured independently.
558
- #
559
- # Configuration can be applied globally to all clients, or to a single client
560
- # on construction.
561
- #
562
- # @example
563
- #
564
- # # Modify the global config, setting the timeout for
565
- # # create_application to 20 seconds,
566
- # # and all remaining timeouts to 10 seconds.
567
- # ::Google::Cloud::Talent::V4beta1::ApplicationService::Client.configure do |config|
568
- # config.timeout = 10.0
569
- # config.rpcs.create_application.timeout = 20.0
570
- # end
571
- #
572
- # # Apply the above configuration only to a new client.
573
- # client = ::Google::Cloud::Talent::V4beta1::ApplicationService::Client.new do |config|
574
- # config.timeout = 10.0
575
- # config.rpcs.create_application.timeout = 20.0
576
- # end
577
- #
578
- # @!attribute [rw] endpoint
579
- # The hostname or hostname:port of the service endpoint.
580
- # Defaults to `"jobs.googleapis.com"`.
581
- # @return [::String]
582
- # @!attribute [rw] credentials
583
- # Credentials to send with calls. You may provide any of the following types:
584
- # * (`String`) The path to a service account key file in JSON format
585
- # * (`Hash`) A service account key as a Hash
586
- # * (`Google::Auth::Credentials`) A googleauth credentials object
587
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
588
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
589
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
590
- # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
591
- # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
592
- # * (`nil`) indicating no credentials
593
- # @return [::Object]
594
- # @!attribute [rw] scope
595
- # The OAuth scopes
596
- # @return [::Array<::String>]
597
- # @!attribute [rw] lib_name
598
- # The library name as recorded in instrumentation and logging
599
- # @return [::String]
600
- # @!attribute [rw] lib_version
601
- # The library version as recorded in instrumentation and logging
602
- # @return [::String]
603
- # @!attribute [rw] channel_args
604
- # Extra parameters passed to the gRPC channel. Note: this is ignored if a
605
- # `GRPC::Core::Channel` object is provided as the credential.
606
- # @return [::Hash]
607
- # @!attribute [rw] interceptors
608
- # An array of interceptors that are run before calls are executed.
609
- # @return [::Array<::GRPC::ClientInterceptor>]
610
- # @!attribute [rw] timeout
611
- # The call timeout in seconds.
612
- # @return [::Numeric]
613
- # @!attribute [rw] metadata
614
- # Additional gRPC headers to be sent with the call.
615
- # @return [::Hash{::Symbol=>::String}]
616
- # @!attribute [rw] retry_policy
617
- # The retry policy. The value is a hash with the following keys:
618
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
619
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
620
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
621
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
622
- # trigger a retry.
623
- # @return [::Hash]
624
- # @!attribute [rw] quota_project
625
- # A separate project against which to charge quota.
626
- # @return [::String]
627
- #
628
- class Configuration
629
- extend ::Gapic::Config
630
-
631
- config_attr :endpoint, "jobs.googleapis.com", ::String
632
- config_attr :credentials, nil do |value|
633
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
634
- allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
635
- allowed.any? { |klass| klass === value }
636
- end
637
- config_attr :scope, nil, ::String, ::Array, nil
638
- config_attr :lib_name, nil, ::String, nil
639
- config_attr :lib_version, nil, ::String, nil
640
- config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
641
- config_attr :interceptors, nil, ::Array, nil
642
- config_attr :timeout, nil, ::Numeric, nil
643
- config_attr :metadata, nil, ::Hash, nil
644
- config_attr :retry_policy, nil, ::Hash, ::Proc, nil
645
- config_attr :quota_project, nil, ::String, nil
646
-
647
- # @private
648
- def initialize parent_config = nil
649
- @parent_config = parent_config unless parent_config.nil?
650
-
651
- yield self if block_given?
652
- end
653
-
654
- ##
655
- # Configurations for individual RPCs
656
- # @return [Rpcs]
657
- #
658
- def rpcs
659
- @rpcs ||= begin
660
- parent_rpcs = nil
661
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
662
- Rpcs.new parent_rpcs
663
- end
664
- end
665
-
666
- ##
667
- # Configuration RPC class for the ApplicationService API.
668
- #
669
- # Includes fields providing the configuration for each RPC in this service.
670
- # Each configuration object is of type `Gapic::Config::Method` and includes
671
- # the following configuration fields:
672
- #
673
- # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
674
- # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
675
- # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
676
- # include the following keys:
677
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
678
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
679
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
680
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
681
- # trigger a retry.
682
- #
683
- class Rpcs
684
- ##
685
- # RPC-specific configuration for `create_application`
686
- # @return [::Gapic::Config::Method]
687
- #
688
- attr_reader :create_application
689
- ##
690
- # RPC-specific configuration for `get_application`
691
- # @return [::Gapic::Config::Method]
692
- #
693
- attr_reader :get_application
694
- ##
695
- # RPC-specific configuration for `update_application`
696
- # @return [::Gapic::Config::Method]
697
- #
698
- attr_reader :update_application
699
- ##
700
- # RPC-specific configuration for `delete_application`
701
- # @return [::Gapic::Config::Method]
702
- #
703
- attr_reader :delete_application
704
- ##
705
- # RPC-specific configuration for `list_applications`
706
- # @return [::Gapic::Config::Method]
707
- #
708
- attr_reader :list_applications
709
-
710
- # @private
711
- def initialize parent_rpcs = nil
712
- create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application
713
- @create_application = ::Gapic::Config::Method.new create_application_config
714
- get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application
715
- @get_application = ::Gapic::Config::Method.new get_application_config
716
- update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application
717
- @update_application = ::Gapic::Config::Method.new update_application_config
718
- delete_application_config = parent_rpcs.delete_application if parent_rpcs.respond_to? :delete_application
719
- @delete_application = ::Gapic::Config::Method.new delete_application_config
720
- list_applications_config = parent_rpcs.list_applications if parent_rpcs.respond_to? :list_applications
721
- @list_applications = ::Gapic::Config::Method.new list_applications_config
722
-
723
- yield self if block_given?
724
- end
725
- end
726
- end
727
- end
728
- end
729
- end
730
- end
731
- end
732
- end