google-cloud-talent 0.8.3 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +347 -0
  6. data/README.md +36 -25
  7. data/lib/{google/cloud/talent/v4beta1/doc/google/protobuf/empty.rb → google-cloud-talent.rb} +4 -14
  8. data/lib/google/cloud/talent.rb +203 -453
  9. data/lib/google/cloud/talent/version.rb +6 -2
  10. metadata +75 -110
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/talent/v4beta1.rb +0 -543
  13. data/lib/google/cloud/talent/v4beta1/application_pb.rb +0 -63
  14. data/lib/google/cloud/talent/v4beta1/application_service_client.rb +0 -484
  15. data/lib/google/cloud/talent/v4beta1/application_service_client_config.json +0 -51
  16. data/lib/google/cloud/talent/v4beta1/application_service_pb.rb +0 -55
  17. data/lib/google/cloud/talent/v4beta1/application_service_services_pb.rb +0 -56
  18. data/lib/google/cloud/talent/v4beta1/batch_pb.rb +0 -18
  19. data/lib/google/cloud/talent/v4beta1/common_pb.rb +0 -341
  20. data/lib/google/cloud/talent/v4beta1/company_pb.rb +0 -41
  21. data/lib/google/cloud/talent/v4beta1/company_service_client.rb +0 -529
  22. data/lib/google/cloud/talent/v4beta1/company_service_client_config.json +0 -51
  23. data/lib/google/cloud/talent/v4beta1/company_service_pb.rb +0 -56
  24. data/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb +0 -56
  25. data/lib/google/cloud/talent/v4beta1/completion_client.rb +0 -337
  26. data/lib/google/cloud/talent/v4beta1/completion_client_config.json +0 -31
  27. data/lib/google/cloud/talent/v4beta1/completion_service_pb.rb +0 -56
  28. data/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb +0 -48
  29. data/lib/google/cloud/talent/v4beta1/credentials.rb +0 -42
  30. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application.rb +0 -166
  31. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application_service.rb +0 -100
  32. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/common.rb +0 -1057
  33. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company.rb +0 -107
  34. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company_service.rb +0 -116
  35. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/completion_service.rb +0 -139
  36. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event.rb +0 -224
  37. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event_service.rb +0 -36
  38. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/filters.rb +0 -763
  39. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/histogram.rb +0 -50
  40. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job.rb +0 -331
  41. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job_service.rb +0 -696
  42. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile.rb +0 -750
  43. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile_service.rb +0 -410
  44. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant.rb +0 -70
  45. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant_service.rb +0 -96
  46. data/lib/google/cloud/talent/v4beta1/doc/google/longrunning/operations.rb +0 -51
  47. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/any.rb +0 -131
  48. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/duration.rb +0 -91
  49. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/field_mask.rb +0 -222
  50. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/timestamp.rb +0 -113
  51. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/wrappers.rb +0 -34
  52. data/lib/google/cloud/talent/v4beta1/doc/google/rpc/status.rb +0 -39
  53. data/lib/google/cloud/talent/v4beta1/doc/google/type/date.rb +0 -43
  54. data/lib/google/cloud/talent/v4beta1/doc/google/type/latlng.rb +0 -31
  55. data/lib/google/cloud/talent/v4beta1/doc/google/type/money.rb +0 -36
  56. data/lib/google/cloud/talent/v4beta1/doc/google/type/postal_address.rb +0 -128
  57. data/lib/google/cloud/talent/v4beta1/doc/google/type/timeofday.rb +0 -37
  58. data/lib/google/cloud/talent/v4beta1/event_pb.rb +0 -69
  59. data/lib/google/cloud/talent/v4beta1/event_service_client.rb +0 -268
  60. data/lib/google/cloud/talent/v4beta1/event_service_client_config.json +0 -31
  61. data/lib/google/cloud/talent/v4beta1/event_service_pb.rb +0 -27
  62. data/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb +0 -53
  63. data/lib/google/cloud/talent/v4beta1/filters_pb.rb +0 -187
  64. data/lib/google/cloud/talent/v4beta1/helpers.rb +0 -162
  65. data/lib/google/cloud/talent/v4beta1/histogram_pb.rb +0 -27
  66. data/lib/google/cloud/talent/v4beta1/job_pb.rb +0 -72
  67. data/lib/google/cloud/talent/v4beta1/job_service_client.rb +0 -1510
  68. data/lib/google/cloud/talent/v4beta1/job_service_client_config.json +0 -76
  69. data/lib/google/cloud/talent/v4beta1/job_service_pb.rb +0 -166
  70. data/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb +0 -88
  71. data/lib/google/cloud/talent/v4beta1/profile_pb.rb +0 -213
  72. data/lib/google/cloud/talent/v4beta1/profile_service_client.rb +0 -811
  73. data/lib/google/cloud/talent/v4beta1/profile_service_client_config.json +0 -56
  74. data/lib/google/cloud/talent/v4beta1/profile_service_pb.rb +0 -91
  75. data/lib/google/cloud/talent/v4beta1/profile_service_services_pb.rb +0 -65
  76. data/lib/google/cloud/talent/v4beta1/tenant_pb.rb +0 -34
  77. data/lib/google/cloud/talent/v4beta1/tenant_service_client.rb +0 -471
  78. data/lib/google/cloud/talent/v4beta1/tenant_service_client_config.json +0 -51
  79. data/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb +0 -55
  80. data/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb +0 -55
@@ -1,63 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/talent/v4beta1/application.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/field_behavior_pb'
8
- require 'google/api/resource_pb'
9
- require 'google/cloud/talent/v4beta1/common_pb'
10
- require 'google/protobuf/timestamp_pb'
11
- require 'google/protobuf/wrappers_pb'
12
- require 'google/type/date_pb'
13
- require 'google/api/annotations_pb'
14
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_message "google.cloud.talent.v4beta1.Application" do
16
- optional :name, :string, 1
17
- optional :external_id, :string, 31
18
- optional :profile, :string, 2
19
- optional :job, :string, 4
20
- optional :company, :string, 5
21
- optional :application_date, :message, 7, "google.type.Date"
22
- optional :stage, :enum, 11, "google.cloud.talent.v4beta1.Application.ApplicationStage"
23
- optional :state, :enum, 13, "google.cloud.talent.v4beta1.Application.ApplicationState"
24
- repeated :interviews, :message, 16, "google.cloud.talent.v4beta1.Interview"
25
- optional :referral, :message, 18, "google.protobuf.BoolValue"
26
- optional :create_time, :message, 19, "google.protobuf.Timestamp"
27
- optional :update_time, :message, 20, "google.protobuf.Timestamp"
28
- optional :outcome_notes, :string, 21
29
- optional :outcome, :enum, 22, "google.cloud.talent.v4beta1.Outcome"
30
- optional :is_match, :message, 28, "google.protobuf.BoolValue"
31
- optional :job_title_snippet, :string, 29
32
- end
33
- add_enum "google.cloud.talent.v4beta1.Application.ApplicationState" do
34
- value :APPLICATION_STATE_UNSPECIFIED, 0
35
- value :IN_PROGRESS, 1
36
- value :CANDIDATE_WITHDREW, 2
37
- value :EMPLOYER_WITHDREW, 3
38
- value :COMPLETED, 4
39
- value :CLOSED, 5
40
- end
41
- add_enum "google.cloud.talent.v4beta1.Application.ApplicationStage" do
42
- value :APPLICATION_STAGE_UNSPECIFIED, 0
43
- value :NEW, 1
44
- value :SCREEN, 2
45
- value :HIRING_MANAGER_REVIEW, 3
46
- value :INTERVIEW, 4
47
- value :OFFER_EXTENDED, 5
48
- value :OFFER_ACCEPTED, 6
49
- value :STARTED, 7
50
- end
51
- end
52
-
53
- module Google
54
- module Cloud
55
- module Talent
56
- module V4beta1
57
- Application = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Application").msgclass
58
- Application::ApplicationState = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Application.ApplicationState").enummodule
59
- Application::ApplicationStage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Application.ApplicationStage").enummodule
60
- end
61
- end
62
- end
63
- end
@@ -1,484 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- #
15
- # EDITING INSTRUCTIONS
16
- # This file was generated from the file
17
- # https://github.com/googleapis/googleapis/blob/master/google/cloud/talent/v4beta1/application_service.proto,
18
- # and updates to that file get reflected here through a refresh process.
19
- # For the short term, the refresh process will only be runnable by Google
20
- # engineers.
21
-
22
-
23
- require "json"
24
- require "pathname"
25
-
26
- require "google/gax"
27
-
28
- require "google/cloud/talent/v4beta1/application_service_pb"
29
- require "google/cloud/talent/v4beta1/credentials"
30
- require "google/cloud/talent/version"
31
-
32
- module Google
33
- module Cloud
34
- module Talent
35
- module V4beta1
36
- # A service that handles application management, including CRUD and
37
- # enumeration.
38
- #
39
- # @!attribute [r] application_service_stub
40
- # @return [Google::Cloud::Talent::V4beta1::ApplicationService::Stub]
41
- class ApplicationServiceClient
42
- # @private
43
- attr_reader :application_service_stub
44
-
45
- # The default address of the service.
46
- SERVICE_ADDRESS = "jobs.googleapis.com".freeze
47
-
48
- # The default port of the service.
49
- DEFAULT_SERVICE_PORT = 443
50
-
51
- # The default set of gRPC interceptors.
52
- GRPC_INTERCEPTORS = []
53
-
54
- DEFAULT_TIMEOUT = 30
55
-
56
- PAGE_DESCRIPTORS = {
57
- "list_applications" => Google::Gax::PageDescriptor.new(
58
- "page_token",
59
- "next_page_token",
60
- "applications")
61
- }.freeze
62
-
63
- private_constant :PAGE_DESCRIPTORS
64
-
65
- # The scopes needed to make gRPC calls to all of the methods defined in
66
- # this service.
67
- ALL_SCOPES = [
68
- "https://www.googleapis.com/auth/cloud-platform",
69
- "https://www.googleapis.com/auth/jobs"
70
- ].freeze
71
-
72
-
73
- APPLICATION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
74
- "projects/{project}/tenants/{tenant}/profiles/{profile}/applications/{application}"
75
- )
76
-
77
- private_constant :APPLICATION_PATH_TEMPLATE
78
-
79
- PROFILE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
80
- "projects/{project}/tenants/{tenant}/profiles/{profile}"
81
- )
82
-
83
- private_constant :PROFILE_PATH_TEMPLATE
84
-
85
- # Returns a fully-qualified application resource name string.
86
- # @param project [String]
87
- # @param tenant [String]
88
- # @param profile [String]
89
- # @param application [String]
90
- # @return [String]
91
- def self.application_path project, tenant, profile, application
92
- APPLICATION_PATH_TEMPLATE.render(
93
- :"project" => project,
94
- :"tenant" => tenant,
95
- :"profile" => profile,
96
- :"application" => application
97
- )
98
- end
99
-
100
- # Returns a fully-qualified profile resource name string.
101
- # @param project [String]
102
- # @param tenant [String]
103
- # @param profile [String]
104
- # @return [String]
105
- def self.profile_path project, tenant, profile
106
- PROFILE_PATH_TEMPLATE.render(
107
- :"project" => project,
108
- :"tenant" => tenant,
109
- :"profile" => profile
110
- )
111
- end
112
-
113
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
114
- # Provides the means for authenticating requests made by the client. This parameter can
115
- # be many types.
116
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
117
- # authenticating requests made by this client.
118
- # A `String` will be treated as the path to the keyfile to be used for the construction of
119
- # credentials for this client.
120
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
121
- # credentials for this client.
122
- # A `GRPC::Core::Channel` will be used to make calls through.
123
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
124
- # should already be composed with a `GRPC::Core::CallCredentials` object.
125
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
126
- # metadata for requests, generally, to give OAuth credentials.
127
- # @param scopes [Array<String>]
128
- # The OAuth scopes for this service. This parameter is ignored if
129
- # an updater_proc is supplied.
130
- # @param client_config [Hash]
131
- # A Hash for call options for each method. See
132
- # Google::Gax#construct_settings for the structure of
133
- # this data. Falls back to the default config if not specified
134
- # or the specified config is missing data points.
135
- # @param timeout [Numeric]
136
- # The default timeout, in seconds, for calls made through this client.
137
- # @param metadata [Hash]
138
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
139
- # @param service_address [String]
140
- # Override for the service hostname, or `nil` to leave as the default.
141
- # @param service_port [Integer]
142
- # Override for the service port, or `nil` to leave as the default.
143
- # @param exception_transformer [Proc]
144
- # An optional proc that intercepts any exceptions raised during an API call to inject
145
- # custom error handling.
146
- def initialize \
147
- credentials: nil,
148
- scopes: ALL_SCOPES,
149
- client_config: {},
150
- timeout: DEFAULT_TIMEOUT,
151
- metadata: nil,
152
- service_address: nil,
153
- service_port: nil,
154
- exception_transformer: nil,
155
- lib_name: nil,
156
- lib_version: ""
157
- # These require statements are intentionally placed here to initialize
158
- # the gRPC module only when it's required.
159
- # See https://github.com/googleapis/toolkit/issues/446
160
- require "google/gax/grpc"
161
- require "google/cloud/talent/v4beta1/application_service_services_pb"
162
-
163
- credentials ||= Google::Cloud::Talent::V4beta1::Credentials.default
164
-
165
- if credentials.is_a?(String) || credentials.is_a?(Hash)
166
- updater_proc = Google::Cloud::Talent::V4beta1::Credentials.new(credentials).updater_proc
167
- end
168
- if credentials.is_a?(GRPC::Core::Channel)
169
- channel = credentials
170
- end
171
- if credentials.is_a?(GRPC::Core::ChannelCredentials)
172
- chan_creds = credentials
173
- end
174
- if credentials.is_a?(Proc)
175
- updater_proc = credentials
176
- end
177
- if credentials.is_a?(Google::Auth::Credentials)
178
- updater_proc = credentials.updater_proc
179
- end
180
-
181
- package_version = Google::Cloud::Talent::VERSION
182
-
183
- google_api_client = "gl-ruby/#{RUBY_VERSION}"
184
- google_api_client << " #{lib_name}/#{lib_version}" if lib_name
185
- google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
186
- google_api_client << " grpc/#{GRPC::VERSION}"
187
- google_api_client.freeze
188
-
189
- headers = { :"x-goog-api-client" => google_api_client }
190
- headers.merge!(metadata) unless metadata.nil?
191
- client_config_file = Pathname.new(__dir__).join(
192
- "application_service_client_config.json"
193
- )
194
- defaults = client_config_file.open do |f|
195
- Google::Gax.construct_settings(
196
- "google.cloud.talent.v4beta1.ApplicationService",
197
- JSON.parse(f.read),
198
- client_config,
199
- Google::Gax::Grpc::STATUS_CODE_NAMES,
200
- timeout,
201
- page_descriptors: PAGE_DESCRIPTORS,
202
- errors: Google::Gax::Grpc::API_ERRORS,
203
- metadata: headers
204
- )
205
- end
206
-
207
- # Allow overriding the service path/port in subclasses.
208
- service_path = service_address || self.class::SERVICE_ADDRESS
209
- port = service_port || self.class::DEFAULT_SERVICE_PORT
210
- interceptors = self.class::GRPC_INTERCEPTORS
211
- @application_service_stub = Google::Gax::Grpc.create_stub(
212
- service_path,
213
- port,
214
- chan_creds: chan_creds,
215
- channel: channel,
216
- updater_proc: updater_proc,
217
- scopes: scopes,
218
- interceptors: interceptors,
219
- &Google::Cloud::Talent::V4beta1::ApplicationService::Stub.method(:new)
220
- )
221
-
222
- @create_application = Google::Gax.create_api_call(
223
- @application_service_stub.method(:create_application),
224
- defaults["create_application"],
225
- exception_transformer: exception_transformer,
226
- params_extractor: proc do |request|
227
- {'parent' => request.parent}
228
- end
229
- )
230
- @get_application = Google::Gax.create_api_call(
231
- @application_service_stub.method(:get_application),
232
- defaults["get_application"],
233
- exception_transformer: exception_transformer,
234
- params_extractor: proc do |request|
235
- {'name' => request.name}
236
- end
237
- )
238
- @update_application = Google::Gax.create_api_call(
239
- @application_service_stub.method(:update_application),
240
- defaults["update_application"],
241
- exception_transformer: exception_transformer,
242
- params_extractor: proc do |request|
243
- {'application.name' => request.application.name}
244
- end
245
- )
246
- @delete_application = Google::Gax.create_api_call(
247
- @application_service_stub.method(:delete_application),
248
- defaults["delete_application"],
249
- exception_transformer: exception_transformer,
250
- params_extractor: proc do |request|
251
- {'name' => request.name}
252
- end
253
- )
254
- @list_applications = Google::Gax.create_api_call(
255
- @application_service_stub.method(:list_applications),
256
- defaults["list_applications"],
257
- exception_transformer: exception_transformer,
258
- params_extractor: proc do |request|
259
- {'parent' => request.parent}
260
- end
261
- )
262
- end
263
-
264
- # Service calls
265
-
266
- # Creates a new application entity.
267
- #
268
- # @param parent [String]
269
- # Required. Resource name of the profile under which the application is created.
270
- #
271
- # The format is
272
- # "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}".
273
- # For example, "projects/foo/tenants/bar/profiles/baz".
274
- # @param application [Google::Cloud::Talent::V4beta1::Application | Hash]
275
- # Required. The application to be created.
276
- # A hash of the same form as `Google::Cloud::Talent::V4beta1::Application`
277
- # can also be provided.
278
- # @param options [Google::Gax::CallOptions]
279
- # Overrides the default settings for this call, e.g, timeout,
280
- # retries, etc.
281
- # @yield [result, operation] Access the result along with the RPC operation
282
- # @yieldparam result [Google::Cloud::Talent::V4beta1::Application]
283
- # @yieldparam operation [GRPC::ActiveCall::Operation]
284
- # @return [Google::Cloud::Talent::V4beta1::Application]
285
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
286
- # @example
287
- # require "google/cloud/talent"
288
- #
289
- # application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
290
- # formatted_parent = Google::Cloud::Talent::V4beta1::ApplicationServiceClient.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]")
291
- #
292
- # # TODO: Initialize `application`:
293
- # application = {}
294
- # response = application_client.create_application(formatted_parent, application)
295
-
296
- def create_application \
297
- parent,
298
- application,
299
- options: nil,
300
- &block
301
- req = {
302
- parent: parent,
303
- application: application
304
- }.delete_if { |_, v| v.nil? }
305
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::CreateApplicationRequest)
306
- @create_application.call(req, options, &block)
307
- end
308
-
309
- # Retrieves specified application.
310
- #
311
- # @param name [String]
312
- # Required. The resource name of the application to be retrieved.
313
- #
314
- # The format is
315
- # "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
316
- # For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
317
- # @param options [Google::Gax::CallOptions]
318
- # Overrides the default settings for this call, e.g, timeout,
319
- # retries, etc.
320
- # @yield [result, operation] Access the result along with the RPC operation
321
- # @yieldparam result [Google::Cloud::Talent::V4beta1::Application]
322
- # @yieldparam operation [GRPC::ActiveCall::Operation]
323
- # @return [Google::Cloud::Talent::V4beta1::Application]
324
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
325
- # @example
326
- # require "google/cloud/talent"
327
- #
328
- # application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
329
- # formatted_name = Google::Cloud::Talent::V4beta1::ApplicationServiceClient.application_path("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]")
330
- # response = application_client.get_application(formatted_name)
331
-
332
- def get_application \
333
- name,
334
- options: nil,
335
- &block
336
- req = {
337
- name: name
338
- }.delete_if { |_, v| v.nil? }
339
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::GetApplicationRequest)
340
- @get_application.call(req, options, &block)
341
- end
342
-
343
- # Updates specified application.
344
- #
345
- # @param application [Google::Cloud::Talent::V4beta1::Application | Hash]
346
- # Required. The application resource to replace the current resource in the system.
347
- # A hash of the same form as `Google::Cloud::Talent::V4beta1::Application`
348
- # can also be provided.
349
- # @param update_mask [Google::Protobuf::FieldMask | Hash]
350
- # Strongly recommended for the best service experience.
351
- #
352
- # If {Google::Cloud::Talent::V4beta1::UpdateApplicationRequest#update_mask update_mask} is provided, only the specified fields in
353
- # {Google::Cloud::Talent::V4beta1::UpdateApplicationRequest#application application} are updated. Otherwise all the fields are updated.
354
- #
355
- # A field mask to specify the application fields to be updated. Only
356
- # top level fields of {Google::Cloud::Talent::V4beta1::Application Application} are supported.
357
- # A hash of the same form as `Google::Protobuf::FieldMask`
358
- # can also be provided.
359
- # @param options [Google::Gax::CallOptions]
360
- # Overrides the default settings for this call, e.g, timeout,
361
- # retries, etc.
362
- # @yield [result, operation] Access the result along with the RPC operation
363
- # @yieldparam result [Google::Cloud::Talent::V4beta1::Application]
364
- # @yieldparam operation [GRPC::ActiveCall::Operation]
365
- # @return [Google::Cloud::Talent::V4beta1::Application]
366
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
367
- # @example
368
- # require "google/cloud/talent"
369
- #
370
- # application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
371
- #
372
- # # TODO: Initialize `application`:
373
- # application = {}
374
- # response = application_client.update_application(application)
375
-
376
- def update_application \
377
- application,
378
- update_mask: nil,
379
- options: nil,
380
- &block
381
- req = {
382
- application: application,
383
- update_mask: update_mask
384
- }.delete_if { |_, v| v.nil? }
385
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::UpdateApplicationRequest)
386
- @update_application.call(req, options, &block)
387
- end
388
-
389
- # Deletes specified application.
390
- #
391
- # @param name [String]
392
- # Required. The resource name of the application to be deleted.
393
- #
394
- # The format is
395
- # "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
396
- # For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
397
- # @param options [Google::Gax::CallOptions]
398
- # Overrides the default settings for this call, e.g, timeout,
399
- # retries, etc.
400
- # @yield [result, operation] Access the result along with the RPC operation
401
- # @yieldparam result []
402
- # @yieldparam operation [GRPC::ActiveCall::Operation]
403
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
404
- # @example
405
- # require "google/cloud/talent"
406
- #
407
- # application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
408
- # formatted_name = Google::Cloud::Talent::V4beta1::ApplicationServiceClient.application_path("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]")
409
- # application_client.delete_application(formatted_name)
410
-
411
- def delete_application \
412
- name,
413
- options: nil,
414
- &block
415
- req = {
416
- name: name
417
- }.delete_if { |_, v| v.nil? }
418
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::DeleteApplicationRequest)
419
- @delete_application.call(req, options, &block)
420
- nil
421
- end
422
-
423
- # Lists all applications associated with the profile.
424
- #
425
- # @param parent [String]
426
- # Required. Resource name of the profile under which the application is created.
427
- #
428
- # The format is
429
- # "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", for
430
- # example, "projects/foo/tenants/bar/profiles/baz".
431
- # @param page_size [Integer]
432
- # The maximum number of resources contained in the underlying API
433
- # response. If page streaming is performed per-resource, this
434
- # parameter does not affect the return value. If page streaming is
435
- # performed per-page, this determines the maximum number of
436
- # resources in a page.
437
- # @param options [Google::Gax::CallOptions]
438
- # Overrides the default settings for this call, e.g, timeout,
439
- # retries, etc.
440
- # @yield [result, operation] Access the result along with the RPC operation
441
- # @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Application>]
442
- # @yieldparam operation [GRPC::ActiveCall::Operation]
443
- # @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Application>]
444
- # An enumerable of Google::Cloud::Talent::V4beta1::Application instances.
445
- # See Google::Gax::PagedEnumerable documentation for other
446
- # operations such as per-page iteration or access to the response
447
- # object.
448
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
449
- # @example
450
- # require "google/cloud/talent"
451
- #
452
- # application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
453
- # formatted_parent = Google::Cloud::Talent::V4beta1::ApplicationServiceClient.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]")
454
- #
455
- # # Iterate over all results.
456
- # application_client.list_applications(formatted_parent).each do |element|
457
- # # Process element.
458
- # end
459
- #
460
- # # Or iterate over results one page at a time.
461
- # application_client.list_applications(formatted_parent).each_page do |page|
462
- # # Process each page at a time.
463
- # page.each do |element|
464
- # # Process element.
465
- # end
466
- # end
467
-
468
- def list_applications \
469
- parent,
470
- page_size: nil,
471
- options: nil,
472
- &block
473
- req = {
474
- parent: parent,
475
- page_size: page_size
476
- }.delete_if { |_, v| v.nil? }
477
- req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::ListApplicationsRequest)
478
- @list_applications.call(req, options, &block)
479
- end
480
- end
481
- end
482
- end
483
- end
484
- end