google-cloud-talent 0.10.0 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +2 -1
- data/AUTHENTICATION.md +51 -59
- data/LICENSE.md +203 -0
- data/MIGRATING.md +347 -0
- data/README.md +35 -25
- data/lib/{google/cloud/talent/v4beta1/doc/google/protobuf/empty.rb → google-cloud-talent.rb} +4 -14
- data/lib/google/cloud/talent.rb +253 -441
- data/lib/google/cloud/talent/version.rb +6 -2
- metadata +62 -111
- data/LICENSE +0 -201
- data/lib/google/cloud/talent/v4beta1.rb +0 -543
- data/lib/google/cloud/talent/v4beta1/application_pb.rb +0 -63
- data/lib/google/cloud/talent/v4beta1/application_service_client.rb +0 -527
- data/lib/google/cloud/talent/v4beta1/application_service_client_config.json +0 -51
- data/lib/google/cloud/talent/v4beta1/application_service_pb.rb +0 -55
- data/lib/google/cloud/talent/v4beta1/application_service_services_pb.rb +0 -55
- data/lib/google/cloud/talent/v4beta1/batch_pb.rb +0 -18
- data/lib/google/cloud/talent/v4beta1/common_pb.rb +0 -341
- data/lib/google/cloud/talent/v4beta1/company_pb.rb +0 -41
- data/lib/google/cloud/talent/v4beta1/company_service_client.rb +0 -536
- data/lib/google/cloud/talent/v4beta1/company_service_client_config.json +0 -51
- data/lib/google/cloud/talent/v4beta1/company_service_pb.rb +0 -56
- data/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb +0 -55
- data/lib/google/cloud/talent/v4beta1/completion_client.rb +0 -344
- data/lib/google/cloud/talent/v4beta1/completion_client_config.json +0 -31
- data/lib/google/cloud/talent/v4beta1/completion_service_pb.rb +0 -56
- data/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb +0 -47
- data/lib/google/cloud/talent/v4beta1/credentials.rb +0 -42
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application.rb +0 -162
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application_service.rb +0 -100
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/common.rb +0 -1057
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company.rb +0 -107
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company_service.rb +0 -116
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/completion_service.rb +0 -130
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event.rb +0 -224
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event_service.rb +0 -36
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/filters.rb +0 -763
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/histogram.rb +0 -50
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job.rb +0 -331
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job_service.rb +0 -694
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile.rb +0 -750
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile_service.rb +0 -361
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant.rb +0 -70
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant_service.rb +0 -96
- data/lib/google/cloud/talent/v4beta1/doc/google/longrunning/operations.rb +0 -51
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/any.rb +0 -131
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/duration.rb +0 -91
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/field_mask.rb +0 -222
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/timestamp.rb +0 -113
- data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/wrappers.rb +0 -34
- data/lib/google/cloud/talent/v4beta1/doc/google/rpc/status.rb +0 -39
- data/lib/google/cloud/talent/v4beta1/doc/google/type/date.rb +0 -43
- data/lib/google/cloud/talent/v4beta1/doc/google/type/latlng.rb +0 -31
- data/lib/google/cloud/talent/v4beta1/doc/google/type/money.rb +0 -36
- data/lib/google/cloud/talent/v4beta1/doc/google/type/postal_address.rb +0 -128
- data/lib/google/cloud/talent/v4beta1/doc/google/type/timeofday.rb +0 -37
- data/lib/google/cloud/talent/v4beta1/event_pb.rb +0 -69
- data/lib/google/cloud/talent/v4beta1/event_service_client.rb +0 -271
- data/lib/google/cloud/talent/v4beta1/event_service_client_config.json +0 -31
- data/lib/google/cloud/talent/v4beta1/event_service_pb.rb +0 -27
- data/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb +0 -52
- data/lib/google/cloud/talent/v4beta1/filters_pb.rb +0 -187
- data/lib/google/cloud/talent/v4beta1/helpers.rb +0 -179
- data/lib/google/cloud/talent/v4beta1/histogram_pb.rb +0 -27
- data/lib/google/cloud/talent/v4beta1/job_pb.rb +0 -72
- data/lib/google/cloud/talent/v4beta1/job_service_client.rb +0 -1521
- data/lib/google/cloud/talent/v4beta1/job_service_client_config.json +0 -76
- data/lib/google/cloud/talent/v4beta1/job_service_pb.rb +0 -166
- data/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb +0 -87
- data/lib/google/cloud/talent/v4beta1/profile_pb.rb +0 -213
- data/lib/google/cloud/talent/v4beta1/profile_service_client.rb +0 -765
- data/lib/google/cloud/talent/v4beta1/profile_service_client_config.json +0 -56
- data/lib/google/cloud/talent/v4beta1/profile_service_pb.rb +0 -91
- data/lib/google/cloud/talent/v4beta1/profile_service_services_pb.rb +0 -64
- data/lib/google/cloud/talent/v4beta1/tenant_pb.rb +0 -34
- data/lib/google/cloud/talent/v4beta1/tenant_service_client.rb +0 -474
- data/lib/google/cloud/talent/v4beta1/tenant_service_client_config.json +0 -51
- data/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb +0 -55
- data/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb +0 -54
@@ -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/annotations_pb'
|
8
|
-
require 'google/api/field_behavior_pb'
|
9
|
-
require 'google/api/resource_pb'
|
10
|
-
require 'google/cloud/talent/v4beta1/common_pb'
|
11
|
-
require 'google/protobuf/timestamp_pb'
|
12
|
-
require 'google/protobuf/wrappers_pb'
|
13
|
-
require 'google/type/date_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,527 +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
|
-
COMPANY_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
80
|
-
"projects/{project}/tenants/{tenant}/companies/{company}"
|
81
|
-
)
|
82
|
-
|
83
|
-
private_constant :COMPANY_PATH_TEMPLATE
|
84
|
-
|
85
|
-
COMPANY_WITHOUT_TENANT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
86
|
-
"projects/{project}/companies/{company}"
|
87
|
-
)
|
88
|
-
|
89
|
-
private_constant :COMPANY_WITHOUT_TENANT_PATH_TEMPLATE
|
90
|
-
|
91
|
-
PROFILE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
92
|
-
"projects/{project}/tenants/{tenant}/profiles/{profile}"
|
93
|
-
)
|
94
|
-
|
95
|
-
private_constant :PROFILE_PATH_TEMPLATE
|
96
|
-
|
97
|
-
# Returns a fully-qualified application resource name string.
|
98
|
-
# @param project [String]
|
99
|
-
# @param tenant [String]
|
100
|
-
# @param profile [String]
|
101
|
-
# @param application [String]
|
102
|
-
# @return [String]
|
103
|
-
def self.application_path project, tenant, profile, application
|
104
|
-
APPLICATION_PATH_TEMPLATE.render(
|
105
|
-
:"project" => project,
|
106
|
-
:"tenant" => tenant,
|
107
|
-
:"profile" => profile,
|
108
|
-
:"application" => application
|
109
|
-
)
|
110
|
-
end
|
111
|
-
|
112
|
-
# Returns a fully-qualified company resource name string.
|
113
|
-
# @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
|
114
|
-
# This helper function will be deleted in the next major version.
|
115
|
-
# @param project [String]
|
116
|
-
# @param tenant [String]
|
117
|
-
# @param company [String]
|
118
|
-
# @return [String]
|
119
|
-
def self.company_path project, tenant, company
|
120
|
-
COMPANY_PATH_TEMPLATE.render(
|
121
|
-
:"project" => project,
|
122
|
-
:"tenant" => tenant,
|
123
|
-
:"company" => company
|
124
|
-
)
|
125
|
-
end
|
126
|
-
|
127
|
-
# Returns a fully-qualified company_without_tenant resource name string.
|
128
|
-
# @deprecated Multi-pattern resource names will have unified creation and parsing helper functions.
|
129
|
-
# This helper function will be deleted in the next major version.
|
130
|
-
# @param project [String]
|
131
|
-
# @param company [String]
|
132
|
-
# @return [String]
|
133
|
-
def self.company_without_tenant_path project, company
|
134
|
-
COMPANY_WITHOUT_TENANT_PATH_TEMPLATE.render(
|
135
|
-
:"project" => project,
|
136
|
-
:"company" => company
|
137
|
-
)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Returns a fully-qualified profile resource name string.
|
141
|
-
# @param project [String]
|
142
|
-
# @param tenant [String]
|
143
|
-
# @param profile [String]
|
144
|
-
# @return [String]
|
145
|
-
def self.profile_path project, tenant, profile
|
146
|
-
PROFILE_PATH_TEMPLATE.render(
|
147
|
-
:"project" => project,
|
148
|
-
:"tenant" => tenant,
|
149
|
-
:"profile" => profile
|
150
|
-
)
|
151
|
-
end
|
152
|
-
|
153
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
154
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
155
|
-
# be many types.
|
156
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
157
|
-
# authenticating requests made by this client.
|
158
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
159
|
-
# credentials for this client.
|
160
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
161
|
-
# credentials for this client.
|
162
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
163
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
164
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
165
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
166
|
-
# metadata for requests, generally, to give OAuth credentials.
|
167
|
-
# @param scopes [Array<String>]
|
168
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
169
|
-
# an updater_proc is supplied.
|
170
|
-
# @param client_config [Hash]
|
171
|
-
# A Hash for call options for each method. See
|
172
|
-
# Google::Gax#construct_settings for the structure of
|
173
|
-
# this data. Falls back to the default config if not specified
|
174
|
-
# or the specified config is missing data points.
|
175
|
-
# @param timeout [Numeric]
|
176
|
-
# The default timeout, in seconds, for calls made through this client.
|
177
|
-
# @param metadata [Hash]
|
178
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
179
|
-
# @param service_address [String]
|
180
|
-
# Override for the service hostname, or `nil` to leave as the default.
|
181
|
-
# @param service_port [Integer]
|
182
|
-
# Override for the service port, or `nil` to leave as the default.
|
183
|
-
# @param exception_transformer [Proc]
|
184
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
185
|
-
# custom error handling.
|
186
|
-
def initialize \
|
187
|
-
credentials: nil,
|
188
|
-
scopes: ALL_SCOPES,
|
189
|
-
client_config: {},
|
190
|
-
timeout: DEFAULT_TIMEOUT,
|
191
|
-
metadata: nil,
|
192
|
-
service_address: nil,
|
193
|
-
service_port: nil,
|
194
|
-
exception_transformer: nil,
|
195
|
-
lib_name: nil,
|
196
|
-
lib_version: ""
|
197
|
-
# These require statements are intentionally placed here to initialize
|
198
|
-
# the gRPC module only when it's required.
|
199
|
-
# See https://github.com/googleapis/toolkit/issues/446
|
200
|
-
require "google/gax/grpc"
|
201
|
-
require "google/cloud/talent/v4beta1/application_service_services_pb"
|
202
|
-
|
203
|
-
credentials ||= Google::Cloud::Talent::V4beta1::Credentials.default
|
204
|
-
|
205
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
206
|
-
updater_proc = Google::Cloud::Talent::V4beta1::Credentials.new(credentials).updater_proc
|
207
|
-
end
|
208
|
-
if credentials.is_a?(GRPC::Core::Channel)
|
209
|
-
channel = credentials
|
210
|
-
end
|
211
|
-
if credentials.is_a?(GRPC::Core::ChannelCredentials)
|
212
|
-
chan_creds = credentials
|
213
|
-
end
|
214
|
-
if credentials.is_a?(Proc)
|
215
|
-
updater_proc = credentials
|
216
|
-
end
|
217
|
-
if credentials.is_a?(Google::Auth::Credentials)
|
218
|
-
updater_proc = credentials.updater_proc
|
219
|
-
end
|
220
|
-
|
221
|
-
package_version = Google::Cloud::Talent::VERSION
|
222
|
-
|
223
|
-
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
224
|
-
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
225
|
-
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
226
|
-
google_api_client << " grpc/#{GRPC::VERSION}"
|
227
|
-
google_api_client.freeze
|
228
|
-
|
229
|
-
headers = { :"x-goog-api-client" => google_api_client }
|
230
|
-
if credentials.respond_to?(:quota_project_id) && credentials.quota_project_id
|
231
|
-
headers[:"x-goog-user-project"] = credentials.quota_project_id
|
232
|
-
end
|
233
|
-
headers.merge!(metadata) unless metadata.nil?
|
234
|
-
client_config_file = Pathname.new(__dir__).join(
|
235
|
-
"application_service_client_config.json"
|
236
|
-
)
|
237
|
-
defaults = client_config_file.open do |f|
|
238
|
-
Google::Gax.construct_settings(
|
239
|
-
"google.cloud.talent.v4beta1.ApplicationService",
|
240
|
-
JSON.parse(f.read),
|
241
|
-
client_config,
|
242
|
-
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
243
|
-
timeout,
|
244
|
-
page_descriptors: PAGE_DESCRIPTORS,
|
245
|
-
errors: Google::Gax::Grpc::API_ERRORS,
|
246
|
-
metadata: headers
|
247
|
-
)
|
248
|
-
end
|
249
|
-
|
250
|
-
# Allow overriding the service path/port in subclasses.
|
251
|
-
service_path = service_address || self.class::SERVICE_ADDRESS
|
252
|
-
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
253
|
-
interceptors = self.class::GRPC_INTERCEPTORS
|
254
|
-
@application_service_stub = Google::Gax::Grpc.create_stub(
|
255
|
-
service_path,
|
256
|
-
port,
|
257
|
-
chan_creds: chan_creds,
|
258
|
-
channel: channel,
|
259
|
-
updater_proc: updater_proc,
|
260
|
-
scopes: scopes,
|
261
|
-
interceptors: interceptors,
|
262
|
-
&Google::Cloud::Talent::V4beta1::ApplicationService::Stub.method(:new)
|
263
|
-
)
|
264
|
-
|
265
|
-
@delete_application = Google::Gax.create_api_call(
|
266
|
-
@application_service_stub.method(:delete_application),
|
267
|
-
defaults["delete_application"],
|
268
|
-
exception_transformer: exception_transformer,
|
269
|
-
params_extractor: proc do |request|
|
270
|
-
{'name' => request.name}
|
271
|
-
end
|
272
|
-
)
|
273
|
-
@create_application = Google::Gax.create_api_call(
|
274
|
-
@application_service_stub.method(:create_application),
|
275
|
-
defaults["create_application"],
|
276
|
-
exception_transformer: exception_transformer,
|
277
|
-
params_extractor: proc do |request|
|
278
|
-
{'parent' => request.parent}
|
279
|
-
end
|
280
|
-
)
|
281
|
-
@get_application = Google::Gax.create_api_call(
|
282
|
-
@application_service_stub.method(:get_application),
|
283
|
-
defaults["get_application"],
|
284
|
-
exception_transformer: exception_transformer,
|
285
|
-
params_extractor: proc do |request|
|
286
|
-
{'name' => request.name}
|
287
|
-
end
|
288
|
-
)
|
289
|
-
@update_application = Google::Gax.create_api_call(
|
290
|
-
@application_service_stub.method(:update_application),
|
291
|
-
defaults["update_application"],
|
292
|
-
exception_transformer: exception_transformer,
|
293
|
-
params_extractor: proc do |request|
|
294
|
-
{'application.name' => request.application.name}
|
295
|
-
end
|
296
|
-
)
|
297
|
-
@list_applications = Google::Gax.create_api_call(
|
298
|
-
@application_service_stub.method(:list_applications),
|
299
|
-
defaults["list_applications"],
|
300
|
-
exception_transformer: exception_transformer,
|
301
|
-
params_extractor: proc do |request|
|
302
|
-
{'parent' => request.parent}
|
303
|
-
end
|
304
|
-
)
|
305
|
-
end
|
306
|
-
|
307
|
-
# Service calls
|
308
|
-
|
309
|
-
# Deletes specified application.
|
310
|
-
#
|
311
|
-
# @param name [String]
|
312
|
-
# Required. The resource name of the application to be deleted.
|
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 []
|
322
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
323
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
324
|
-
# @example
|
325
|
-
# require "google/cloud/talent"
|
326
|
-
#
|
327
|
-
# application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
|
328
|
-
# formatted_name = Google::Cloud::Talent::V4beta1::ApplicationServiceClient.application_path("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]")
|
329
|
-
# application_client.delete_application(formatted_name)
|
330
|
-
|
331
|
-
def delete_application \
|
332
|
-
name,
|
333
|
-
options: nil,
|
334
|
-
&block
|
335
|
-
req = {
|
336
|
-
name: name
|
337
|
-
}.delete_if { |_, v| v.nil? }
|
338
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::DeleteApplicationRequest)
|
339
|
-
@delete_application.call(req, options, &block)
|
340
|
-
nil
|
341
|
-
end
|
342
|
-
|
343
|
-
# Creates a new application entity.
|
344
|
-
#
|
345
|
-
# @param parent [String]
|
346
|
-
# Required. Resource name of the profile under which the application is created.
|
347
|
-
#
|
348
|
-
# The format is
|
349
|
-
# "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}".
|
350
|
-
# For example, "projects/foo/tenants/bar/profiles/baz".
|
351
|
-
# @param application [Google::Cloud::Talent::V4beta1::Application | Hash]
|
352
|
-
# Required. The application to be created.
|
353
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Application`
|
354
|
-
# can also be provided.
|
355
|
-
# @param options [Google::Gax::CallOptions]
|
356
|
-
# Overrides the default settings for this call, e.g, timeout,
|
357
|
-
# retries, etc.
|
358
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
359
|
-
# @yieldparam result [Google::Cloud::Talent::V4beta1::Application]
|
360
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
361
|
-
# @return [Google::Cloud::Talent::V4beta1::Application]
|
362
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
363
|
-
# @example
|
364
|
-
# require "google/cloud/talent"
|
365
|
-
#
|
366
|
-
# application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
|
367
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::ApplicationServiceClient.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]")
|
368
|
-
#
|
369
|
-
# # TODO: Initialize `application`:
|
370
|
-
# application = {}
|
371
|
-
# response = application_client.create_application(formatted_parent, application)
|
372
|
-
|
373
|
-
def create_application \
|
374
|
-
parent,
|
375
|
-
application,
|
376
|
-
options: nil,
|
377
|
-
&block
|
378
|
-
req = {
|
379
|
-
parent: parent,
|
380
|
-
application: application
|
381
|
-
}.delete_if { |_, v| v.nil? }
|
382
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::CreateApplicationRequest)
|
383
|
-
@create_application.call(req, options, &block)
|
384
|
-
end
|
385
|
-
|
386
|
-
# Retrieves specified application.
|
387
|
-
#
|
388
|
-
# @param name [String]
|
389
|
-
# Required. The resource name of the application to be retrieved.
|
390
|
-
#
|
391
|
-
# The format is
|
392
|
-
# "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
|
393
|
-
# For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
|
394
|
-
# @param options [Google::Gax::CallOptions]
|
395
|
-
# Overrides the default settings for this call, e.g, timeout,
|
396
|
-
# retries, etc.
|
397
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
398
|
-
# @yieldparam result [Google::Cloud::Talent::V4beta1::Application]
|
399
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
400
|
-
# @return [Google::Cloud::Talent::V4beta1::Application]
|
401
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
402
|
-
# @example
|
403
|
-
# require "google/cloud/talent"
|
404
|
-
#
|
405
|
-
# application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
|
406
|
-
# formatted_name = Google::Cloud::Talent::V4beta1::ApplicationServiceClient.application_path("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]")
|
407
|
-
# response = application_client.get_application(formatted_name)
|
408
|
-
|
409
|
-
def get_application \
|
410
|
-
name,
|
411
|
-
options: nil,
|
412
|
-
&block
|
413
|
-
req = {
|
414
|
-
name: name
|
415
|
-
}.delete_if { |_, v| v.nil? }
|
416
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::GetApplicationRequest)
|
417
|
-
@get_application.call(req, options, &block)
|
418
|
-
end
|
419
|
-
|
420
|
-
# Updates specified application.
|
421
|
-
#
|
422
|
-
# @param application [Google::Cloud::Talent::V4beta1::Application | Hash]
|
423
|
-
# Required. The application resource to replace the current resource in the system.
|
424
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Application`
|
425
|
-
# can also be provided.
|
426
|
-
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
427
|
-
# Strongly recommended for the best service experience.
|
428
|
-
#
|
429
|
-
# If {Google::Cloud::Talent::V4beta1::UpdateApplicationRequest#update_mask update_mask} is provided, only the specified fields in
|
430
|
-
# {Google::Cloud::Talent::V4beta1::UpdateApplicationRequest#application application} are updated. Otherwise all the fields are updated.
|
431
|
-
#
|
432
|
-
# A field mask to specify the application fields to be updated. Only
|
433
|
-
# top level fields of {Google::Cloud::Talent::V4beta1::Application Application} are supported.
|
434
|
-
# A hash of the same form as `Google::Protobuf::FieldMask`
|
435
|
-
# can also be provided.
|
436
|
-
# @param options [Google::Gax::CallOptions]
|
437
|
-
# Overrides the default settings for this call, e.g, timeout,
|
438
|
-
# retries, etc.
|
439
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
440
|
-
# @yieldparam result [Google::Cloud::Talent::V4beta1::Application]
|
441
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
442
|
-
# @return [Google::Cloud::Talent::V4beta1::Application]
|
443
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
444
|
-
# @example
|
445
|
-
# require "google/cloud/talent"
|
446
|
-
#
|
447
|
-
# application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
|
448
|
-
#
|
449
|
-
# # TODO: Initialize `application`:
|
450
|
-
# application = {}
|
451
|
-
# response = application_client.update_application(application)
|
452
|
-
|
453
|
-
def update_application \
|
454
|
-
application,
|
455
|
-
update_mask: nil,
|
456
|
-
options: nil,
|
457
|
-
&block
|
458
|
-
req = {
|
459
|
-
application: application,
|
460
|
-
update_mask: update_mask
|
461
|
-
}.delete_if { |_, v| v.nil? }
|
462
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::UpdateApplicationRequest)
|
463
|
-
@update_application.call(req, options, &block)
|
464
|
-
end
|
465
|
-
|
466
|
-
# Lists all applications associated with the profile.
|
467
|
-
#
|
468
|
-
# @param parent [String]
|
469
|
-
# Required. Resource name of the profile under which the application is created.
|
470
|
-
#
|
471
|
-
# The format is
|
472
|
-
# "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}", for
|
473
|
-
# example, "projects/foo/tenants/bar/profiles/baz".
|
474
|
-
# @param page_size [Integer]
|
475
|
-
# The maximum number of resources contained in the underlying API
|
476
|
-
# response. If page streaming is performed per-resource, this
|
477
|
-
# parameter does not affect the return value. If page streaming is
|
478
|
-
# performed per-page, this determines the maximum number of
|
479
|
-
# resources in a page.
|
480
|
-
# @param options [Google::Gax::CallOptions]
|
481
|
-
# Overrides the default settings for this call, e.g, timeout,
|
482
|
-
# retries, etc.
|
483
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
484
|
-
# @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Application>]
|
485
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
486
|
-
# @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Application>]
|
487
|
-
# An enumerable of Google::Cloud::Talent::V4beta1::Application instances.
|
488
|
-
# See Google::Gax::PagedEnumerable documentation for other
|
489
|
-
# operations such as per-page iteration or access to the response
|
490
|
-
# object.
|
491
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
492
|
-
# @example
|
493
|
-
# require "google/cloud/talent"
|
494
|
-
#
|
495
|
-
# application_client = Google::Cloud::Talent::ApplicationService.new(version: :v4beta1)
|
496
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::ApplicationServiceClient.profile_path("[PROJECT]", "[TENANT]", "[PROFILE]")
|
497
|
-
#
|
498
|
-
# # Iterate over all results.
|
499
|
-
# application_client.list_applications(formatted_parent).each do |element|
|
500
|
-
# # Process element.
|
501
|
-
# end
|
502
|
-
#
|
503
|
-
# # Or iterate over results one page at a time.
|
504
|
-
# application_client.list_applications(formatted_parent).each_page do |page|
|
505
|
-
# # Process each page at a time.
|
506
|
-
# page.each do |element|
|
507
|
-
# # Process element.
|
508
|
-
# end
|
509
|
-
# end
|
510
|
-
|
511
|
-
def list_applications \
|
512
|
-
parent,
|
513
|
-
page_size: nil,
|
514
|
-
options: nil,
|
515
|
-
&block
|
516
|
-
req = {
|
517
|
-
parent: parent,
|
518
|
-
page_size: page_size
|
519
|
-
}.delete_if { |_, v| v.nil? }
|
520
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::ListApplicationsRequest)
|
521
|
-
@list_applications.call(req, options, &block)
|
522
|
-
end
|
523
|
-
end
|
524
|
-
end
|
525
|
-
end
|
526
|
-
end
|
527
|
-
end
|