google-cloud-talent 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +2 -0
- data/AUTHENTICATION.md +199 -0
- data/lib/google/cloud/talent.rb +20 -19
- data/lib/google/cloud/talent/v4beta1.rb +22 -21
- data/lib/google/cloud/talent/v4beta1/application_pb.rb +62 -0
- data/lib/google/cloud/talent/v4beta1/application_service_client.rb +492 -0
- data/lib/google/cloud/talent/v4beta1/application_service_client_config.json +51 -0
- data/lib/google/cloud/talent/v4beta1/application_service_pb.rb +52 -0
- data/lib/google/cloud/talent/v4beta1/application_service_services_pb.rb +56 -0
- data/lib/google/cloud/talent/v4beta1/common_pb.rb +47 -1
- data/lib/google/cloud/talent/v4beta1/company_pb.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/company_service_client.rb +83 -55
- data/lib/google/cloud/talent/v4beta1/completion_client.rb +62 -42
- data/lib/google/cloud/talent/v4beta1/completion_service_pb.rb +2 -2
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application.rb +189 -0
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application_service.rb +121 -0
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/common.rb +189 -94
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company.rb +12 -10
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company_service.rb +29 -20
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/completion_service.rb +26 -30
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event.rb +16 -55
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event_service.rb +9 -1
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/filters.rb +74 -164
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/histogram.rb +2 -5
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job.rb +58 -86
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job_service.rb +109 -137
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile.rb +76 -375
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile_service.rb +21 -38
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant.rb +1 -3
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant_service.rb +3 -7
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/field_mask.rb +18 -26
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/timestamp.rb +15 -13
- data/lib/google/cloud/talent/v4beta1/doc/google/type/date.rb +14 -10
- data/lib/google/cloud/talent/v4beta1/doc/google/type/latlng.rb +0 -34
- data/lib/google/cloud/talent/v4beta1/doc/google/type/timeofday.rb +2 -3
- data/lib/google/cloud/talent/v4beta1/event_pb.rb +2 -9
- data/lib/google/cloud/talent/v4beta1/event_service_client.rb +26 -13
- data/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/filters_pb.rb +8 -20
- data/lib/google/cloud/talent/v4beta1/helpers.rb +44 -10
- data/lib/google/cloud/talent/v4beta1/histogram_pb.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/job_pb.rb +3 -2
- data/lib/google/cloud/talent/v4beta1/job_service_client.rb +229 -204
- data/lib/google/cloud/talent/v4beta1/job_service_pb.rb +0 -1
- data/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb +8 -12
- data/lib/google/cloud/talent/v4beta1/profile_pb.rb +6 -64
- data/lib/google/cloud/talent/v4beta1/profile_service_client.rb +72 -68
- data/lib/google/cloud/talent/v4beta1/profile_service_pb.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/profile_service_services_pb.rb +3 -3
- data/lib/google/cloud/talent/v4beta1/resume_service_client.rb +2 -2
- data/lib/google/cloud/talent/v4beta1/tenant_pb.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/tenant_service_client.rb +34 -23
- metadata +11 -4
@@ -0,0 +1,492 @@
|
|
1
|
+
# Copyright 2019 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
|
+
|
31
|
+
module Google
|
32
|
+
module Cloud
|
33
|
+
module Talent
|
34
|
+
module V4beta1
|
35
|
+
# A service that handles application management, including CRUD and
|
36
|
+
# enumeration.
|
37
|
+
#
|
38
|
+
# @!attribute [r] application_service_stub
|
39
|
+
# @return [Google::Cloud::Talent::V4beta1::ApplicationService::Stub]
|
40
|
+
class ApplicationServiceClient
|
41
|
+
# @private
|
42
|
+
attr_reader :application_service_stub
|
43
|
+
|
44
|
+
# The default address of the service.
|
45
|
+
SERVICE_ADDRESS = "jobs.googleapis.com".freeze
|
46
|
+
|
47
|
+
# The default port of the service.
|
48
|
+
DEFAULT_SERVICE_PORT = 443
|
49
|
+
|
50
|
+
# The default set of gRPC interceptors.
|
51
|
+
GRPC_INTERCEPTORS = []
|
52
|
+
|
53
|
+
DEFAULT_TIMEOUT = 30
|
54
|
+
|
55
|
+
PAGE_DESCRIPTORS = {
|
56
|
+
"list_applications" => Google::Gax::PageDescriptor.new(
|
57
|
+
"page_token",
|
58
|
+
"next_page_token",
|
59
|
+
"applications")
|
60
|
+
}.freeze
|
61
|
+
|
62
|
+
private_constant :PAGE_DESCRIPTORS
|
63
|
+
|
64
|
+
# The scopes needed to make gRPC calls to all of the methods defined in
|
65
|
+
# this service.
|
66
|
+
ALL_SCOPES = [
|
67
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
68
|
+
"https://www.googleapis.com/auth/jobs"
|
69
|
+
].freeze
|
70
|
+
|
71
|
+
|
72
|
+
APPLICATION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
73
|
+
"projects/{project}/tenants/{tenant}/profiles/{profile}/applications/{application}"
|
74
|
+
)
|
75
|
+
|
76
|
+
private_constant :APPLICATION_PATH_TEMPLATE
|
77
|
+
|
78
|
+
PROFILE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
79
|
+
"projects/{project}/tenants/{tenant}/profiles/{profile}"
|
80
|
+
)
|
81
|
+
|
82
|
+
private_constant :PROFILE_PATH_TEMPLATE
|
83
|
+
|
84
|
+
# Returns a fully-qualified application resource name string.
|
85
|
+
# @param project [String]
|
86
|
+
# @param tenant [String]
|
87
|
+
# @param profile [String]
|
88
|
+
# @param application [String]
|
89
|
+
# @return [String]
|
90
|
+
def self.application_path project, tenant, profile, application
|
91
|
+
APPLICATION_PATH_TEMPLATE.render(
|
92
|
+
:"project" => project,
|
93
|
+
:"tenant" => tenant,
|
94
|
+
:"profile" => profile,
|
95
|
+
:"application" => application
|
96
|
+
)
|
97
|
+
end
|
98
|
+
|
99
|
+
# Returns a fully-qualified profile resource name string.
|
100
|
+
# @param project [String]
|
101
|
+
# @param tenant [String]
|
102
|
+
# @param profile [String]
|
103
|
+
# @return [String]
|
104
|
+
def self.profile_path project, tenant, profile
|
105
|
+
PROFILE_PATH_TEMPLATE.render(
|
106
|
+
:"project" => project,
|
107
|
+
:"tenant" => tenant,
|
108
|
+
:"profile" => profile
|
109
|
+
)
|
110
|
+
end
|
111
|
+
|
112
|
+
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
113
|
+
# Provides the means for authenticating requests made by the client. This parameter can
|
114
|
+
# be many types.
|
115
|
+
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
116
|
+
# authenticating requests made by this client.
|
117
|
+
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
118
|
+
# credentials for this client.
|
119
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
120
|
+
# credentials for this client.
|
121
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
122
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
123
|
+
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
124
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
125
|
+
# metadata for requests, generally, to give OAuth credentials.
|
126
|
+
# @param scopes [Array<String>]
|
127
|
+
# The OAuth scopes for this service. This parameter is ignored if
|
128
|
+
# an updater_proc is supplied.
|
129
|
+
# @param client_config [Hash]
|
130
|
+
# A Hash for call options for each method. See
|
131
|
+
# Google::Gax#construct_settings for the structure of
|
132
|
+
# this data. Falls back to the default config if not specified
|
133
|
+
# or the specified config is missing data points.
|
134
|
+
# @param timeout [Numeric]
|
135
|
+
# The default timeout, in seconds, for calls made through this client.
|
136
|
+
# @param metadata [Hash]
|
137
|
+
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
138
|
+
# @param exception_transformer [Proc]
|
139
|
+
# An optional proc that intercepts any exceptions raised during an API call to inject
|
140
|
+
# custom error handling.
|
141
|
+
def initialize \
|
142
|
+
credentials: nil,
|
143
|
+
scopes: ALL_SCOPES,
|
144
|
+
client_config: {},
|
145
|
+
timeout: DEFAULT_TIMEOUT,
|
146
|
+
metadata: nil,
|
147
|
+
exception_transformer: nil,
|
148
|
+
lib_name: nil,
|
149
|
+
lib_version: ""
|
150
|
+
# These require statements are intentionally placed here to initialize
|
151
|
+
# the gRPC module only when it's required.
|
152
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
153
|
+
require "google/gax/grpc"
|
154
|
+
require "google/cloud/talent/v4beta1/application_service_services_pb"
|
155
|
+
|
156
|
+
credentials ||= Google::Cloud::Talent::V4beta1::Credentials.default
|
157
|
+
|
158
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
159
|
+
updater_proc = Google::Cloud::Talent::V4beta1::Credentials.new(credentials).updater_proc
|
160
|
+
end
|
161
|
+
if credentials.is_a?(GRPC::Core::Channel)
|
162
|
+
channel = credentials
|
163
|
+
end
|
164
|
+
if credentials.is_a?(GRPC::Core::ChannelCredentials)
|
165
|
+
chan_creds = credentials
|
166
|
+
end
|
167
|
+
if credentials.is_a?(Proc)
|
168
|
+
updater_proc = credentials
|
169
|
+
end
|
170
|
+
if credentials.is_a?(Google::Auth::Credentials)
|
171
|
+
updater_proc = credentials.updater_proc
|
172
|
+
end
|
173
|
+
|
174
|
+
package_version = Gem.loaded_specs['google-cloud-talent'].version.version
|
175
|
+
|
176
|
+
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
177
|
+
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
178
|
+
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
179
|
+
google_api_client << " grpc/#{GRPC::VERSION}"
|
180
|
+
google_api_client.freeze
|
181
|
+
|
182
|
+
headers = { :"x-goog-api-client" => google_api_client }
|
183
|
+
headers.merge!(metadata) unless metadata.nil?
|
184
|
+
client_config_file = Pathname.new(__dir__).join(
|
185
|
+
"application_service_client_config.json"
|
186
|
+
)
|
187
|
+
defaults = client_config_file.open do |f|
|
188
|
+
Google::Gax.construct_settings(
|
189
|
+
"google.cloud.talent.v4beta1.ApplicationService",
|
190
|
+
JSON.parse(f.read),
|
191
|
+
client_config,
|
192
|
+
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
193
|
+
timeout,
|
194
|
+
page_descriptors: PAGE_DESCRIPTORS,
|
195
|
+
errors: Google::Gax::Grpc::API_ERRORS,
|
196
|
+
metadata: headers
|
197
|
+
)
|
198
|
+
end
|
199
|
+
|
200
|
+
# Allow overriding the service path/port in subclasses.
|
201
|
+
service_path = self.class::SERVICE_ADDRESS
|
202
|
+
port = self.class::DEFAULT_SERVICE_PORT
|
203
|
+
interceptors = self.class::GRPC_INTERCEPTORS
|
204
|
+
@application_service_stub = Google::Gax::Grpc.create_stub(
|
205
|
+
service_path,
|
206
|
+
port,
|
207
|
+
chan_creds: chan_creds,
|
208
|
+
channel: channel,
|
209
|
+
updater_proc: updater_proc,
|
210
|
+
scopes: scopes,
|
211
|
+
interceptors: interceptors,
|
212
|
+
&Google::Cloud::Talent::V4beta1::ApplicationService::Stub.method(:new)
|
213
|
+
)
|
214
|
+
|
215
|
+
@create_application = Google::Gax.create_api_call(
|
216
|
+
@application_service_stub.method(:create_application),
|
217
|
+
defaults["create_application"],
|
218
|
+
exception_transformer: exception_transformer,
|
219
|
+
params_extractor: proc do |request|
|
220
|
+
{'parent' => request.parent}
|
221
|
+
end
|
222
|
+
)
|
223
|
+
@get_application = Google::Gax.create_api_call(
|
224
|
+
@application_service_stub.method(:get_application),
|
225
|
+
defaults["get_application"],
|
226
|
+
exception_transformer: exception_transformer,
|
227
|
+
params_extractor: proc do |request|
|
228
|
+
{'name' => request.name}
|
229
|
+
end
|
230
|
+
)
|
231
|
+
@update_application = Google::Gax.create_api_call(
|
232
|
+
@application_service_stub.method(:update_application),
|
233
|
+
defaults["update_application"],
|
234
|
+
exception_transformer: exception_transformer,
|
235
|
+
params_extractor: proc do |request|
|
236
|
+
{'application.name' => request.application.name}
|
237
|
+
end
|
238
|
+
)
|
239
|
+
@delete_application = Google::Gax.create_api_call(
|
240
|
+
@application_service_stub.method(:delete_application),
|
241
|
+
defaults["delete_application"],
|
242
|
+
exception_transformer: exception_transformer,
|
243
|
+
params_extractor: proc do |request|
|
244
|
+
{'name' => request.name}
|
245
|
+
end
|
246
|
+
)
|
247
|
+
@list_applications = Google::Gax.create_api_call(
|
248
|
+
@application_service_stub.method(:list_applications),
|
249
|
+
defaults["list_applications"],
|
250
|
+
exception_transformer: exception_transformer,
|
251
|
+
params_extractor: proc do |request|
|
252
|
+
{'parent' => request.parent}
|
253
|
+
end
|
254
|
+
)
|
255
|
+
end
|
256
|
+
|
257
|
+
# Service calls
|
258
|
+
|
259
|
+
# Creates a new application entity.
|
260
|
+
#
|
261
|
+
# @param parent [String]
|
262
|
+
# Required.
|
263
|
+
#
|
264
|
+
# Resource name of the profile under which the application is created.
|
265
|
+
#
|
266
|
+
# The format is
|
267
|
+
# "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", for
|
268
|
+
# example, "projects/test-project/tenants/test-tenant/profiles/test-profile".
|
269
|
+
# @param application [Google::Cloud::Talent::V4beta1::Application | Hash]
|
270
|
+
# Required.
|
271
|
+
#
|
272
|
+
# The application to be created.
|
273
|
+
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Application`
|
274
|
+
# can also be provided.
|
275
|
+
# @param options [Google::Gax::CallOptions]
|
276
|
+
# Overrides the default settings for this call, e.g, timeout,
|
277
|
+
# retries, etc.
|
278
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
279
|
+
# @yieldparam result [Google::Cloud::Talent::V4beta1::Application]
|
280
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
281
|
+
# @return [Google::Cloud::Talent::V4beta1::Application]
|
282
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
283
|
+
# @example
|
284
|
+
# require "google/cloud/talent"
|
285
|
+
#
|
286
|
+
# application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
|
287
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::ApplicationServiceClient.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]")
|
288
|
+
#
|
289
|
+
# # TODO: Initialize `application`:
|
290
|
+
# application = {}
|
291
|
+
# response = application_client.create_application(formatted_parent, application)
|
292
|
+
|
293
|
+
def create_application \
|
294
|
+
parent,
|
295
|
+
application,
|
296
|
+
options: nil,
|
297
|
+
&block
|
298
|
+
req = {
|
299
|
+
parent: parent,
|
300
|
+
application: application
|
301
|
+
}.delete_if { |_, v| v.nil? }
|
302
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::CreateApplicationRequest)
|
303
|
+
@create_application.call(req, options, &block)
|
304
|
+
end
|
305
|
+
|
306
|
+
# Retrieves specified application.
|
307
|
+
#
|
308
|
+
# @param name [String]
|
309
|
+
# Required.
|
310
|
+
#
|
311
|
+
# The resource name of the application to be retrieved.
|
312
|
+
#
|
313
|
+
# The format is
|
314
|
+
# "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}",
|
315
|
+
# for example,
|
316
|
+
# "projects/test-project/tenants/test-tenant/profiles/test-profile/applications/test-application".
|
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.
|
347
|
+
#
|
348
|
+
# The application resource to replace the current resource in the system.
|
349
|
+
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Application`
|
350
|
+
# can also be provided.
|
351
|
+
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
352
|
+
# Optional but strongly recommended for the best service
|
353
|
+
# experience.
|
354
|
+
#
|
355
|
+
# If {Google::Cloud::Talent::V4beta1::UpdateApplicationRequest#update_mask update_mask} is provided, only the specified fields in
|
356
|
+
# {Google::Cloud::Talent::V4beta1::UpdateApplicationRequest#application application} are updated. Otherwise all the fields are updated.
|
357
|
+
#
|
358
|
+
# A field mask to specify the application fields to be updated. Only
|
359
|
+
# top level fields of {Google::Cloud::Talent::V4beta1::Application Application} are supported.
|
360
|
+
# A hash of the same form as `Google::Protobuf::FieldMask`
|
361
|
+
# can also be provided.
|
362
|
+
# @param options [Google::Gax::CallOptions]
|
363
|
+
# Overrides the default settings for this call, e.g, timeout,
|
364
|
+
# retries, etc.
|
365
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
366
|
+
# @yieldparam result [Google::Cloud::Talent::V4beta1::Application]
|
367
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
368
|
+
# @return [Google::Cloud::Talent::V4beta1::Application]
|
369
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
370
|
+
# @example
|
371
|
+
# require "google/cloud/talent"
|
372
|
+
#
|
373
|
+
# application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
|
374
|
+
#
|
375
|
+
# # TODO: Initialize `application`:
|
376
|
+
# application = {}
|
377
|
+
# response = application_client.update_application(application)
|
378
|
+
|
379
|
+
def update_application \
|
380
|
+
application,
|
381
|
+
update_mask: nil,
|
382
|
+
options: nil,
|
383
|
+
&block
|
384
|
+
req = {
|
385
|
+
application: application,
|
386
|
+
update_mask: update_mask
|
387
|
+
}.delete_if { |_, v| v.nil? }
|
388
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::UpdateApplicationRequest)
|
389
|
+
@update_application.call(req, options, &block)
|
390
|
+
end
|
391
|
+
|
392
|
+
# Deletes specified application.
|
393
|
+
#
|
394
|
+
# @param name [String]
|
395
|
+
# Required.
|
396
|
+
#
|
397
|
+
# The resource name of the application to be deleted.
|
398
|
+
#
|
399
|
+
# The format is
|
400
|
+
# "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}",
|
401
|
+
# for example,
|
402
|
+
# "projects/test-project/tenants/test-tenant/profiles/test-profile/applications/test-application".
|
403
|
+
# @param options [Google::Gax::CallOptions]
|
404
|
+
# Overrides the default settings for this call, e.g, timeout,
|
405
|
+
# retries, etc.
|
406
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
407
|
+
# @yieldparam result []
|
408
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
409
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
410
|
+
# @example
|
411
|
+
# require "google/cloud/talent"
|
412
|
+
#
|
413
|
+
# application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
|
414
|
+
# formatted_name = Google::Cloud::Talent::V4beta1::ApplicationServiceClient.application_path("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]")
|
415
|
+
# application_client.delete_application(formatted_name)
|
416
|
+
|
417
|
+
def delete_application \
|
418
|
+
name,
|
419
|
+
options: nil,
|
420
|
+
&block
|
421
|
+
req = {
|
422
|
+
name: name
|
423
|
+
}.delete_if { |_, v| v.nil? }
|
424
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::DeleteApplicationRequest)
|
425
|
+
@delete_application.call(req, options, &block)
|
426
|
+
nil
|
427
|
+
end
|
428
|
+
|
429
|
+
# Lists all applications associated with the profile.
|
430
|
+
#
|
431
|
+
# @param parent [String]
|
432
|
+
# Required.
|
433
|
+
#
|
434
|
+
# Resource name of the profile under which the application is created.
|
435
|
+
#
|
436
|
+
# The format is
|
437
|
+
# "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", for
|
438
|
+
# example, "projects/test-project/tenants/test-tenant/profiles/test-profile".
|
439
|
+
# @param page_size [Integer]
|
440
|
+
# The maximum number of resources contained in the underlying API
|
441
|
+
# response. If page streaming is performed per-resource, this
|
442
|
+
# parameter does not affect the return value. If page streaming is
|
443
|
+
# performed per-page, this determines the maximum number of
|
444
|
+
# resources in a page.
|
445
|
+
# @param options [Google::Gax::CallOptions]
|
446
|
+
# Overrides the default settings for this call, e.g, timeout,
|
447
|
+
# retries, etc.
|
448
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
449
|
+
# @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Application>]
|
450
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
451
|
+
# @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Application>]
|
452
|
+
# An enumerable of Google::Cloud::Talent::V4beta1::Application instances.
|
453
|
+
# See Google::Gax::PagedEnumerable documentation for other
|
454
|
+
# operations such as per-page iteration or access to the response
|
455
|
+
# object.
|
456
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
457
|
+
# @example
|
458
|
+
# require "google/cloud/talent"
|
459
|
+
#
|
460
|
+
# application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
|
461
|
+
# formatted_parent = Google::Cloud::Talent::V4beta1::ApplicationServiceClient.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]")
|
462
|
+
#
|
463
|
+
# # Iterate over all results.
|
464
|
+
# application_client.list_applications(formatted_parent).each do |element|
|
465
|
+
# # Process element.
|
466
|
+
# end
|
467
|
+
#
|
468
|
+
# # Or iterate over results one page at a time.
|
469
|
+
# application_client.list_applications(formatted_parent).each_page do |page|
|
470
|
+
# # Process each page at a time.
|
471
|
+
# page.each do |element|
|
472
|
+
# # Process element.
|
473
|
+
# end
|
474
|
+
# end
|
475
|
+
|
476
|
+
def list_applications \
|
477
|
+
parent,
|
478
|
+
page_size: nil,
|
479
|
+
options: nil,
|
480
|
+
&block
|
481
|
+
req = {
|
482
|
+
parent: parent,
|
483
|
+
page_size: page_size
|
484
|
+
}.delete_if { |_, v| v.nil? }
|
485
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::ListApplicationsRequest)
|
486
|
+
@list_applications.call(req, options, &block)
|
487
|
+
end
|
488
|
+
end
|
489
|
+
end
|
490
|
+
end
|
491
|
+
end
|
492
|
+
end
|