google-cloud-talent 0.8.1 → 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} +5 -15
- data/lib/google/cloud/talent.rb +254 -442
- 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 -62
- data/lib/google/cloud/talent/v4beta1/application_service_client.rb +0 -491
- data/lib/google/cloud/talent/v4beta1/application_service_client_config.json +0 -51
- data/lib/google/cloud/talent/v4beta1/application_service_pb.rb +0 -54
- data/lib/google/cloud/talent/v4beta1/application_service_services_pb.rb +0 -56
- 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 -40
- data/lib/google/cloud/talent/v4beta1/company_service_client.rb +0 -535
- data/lib/google/cloud/talent/v4beta1/company_service_client_config.json +0 -51
- data/lib/google/cloud/talent/v4beta1/company_service_pb.rb +0 -55
- data/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb +0 -56
- data/lib/google/cloud/talent/v4beta1/completion_client.rb +0 -359
- data/lib/google/cloud/talent/v4beta1/completion_client_config.json +0 -31
- data/lib/google/cloud/talent/v4beta1/completion_service_pb.rb +0 -55
- data/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb +0 -48
- data/lib/google/cloud/talent/v4beta1/credentials.rb +0 -42
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application.rb +0 -166
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/application_service.rb +0 -107
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/common.rb +0 -1147
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company.rb +0 -110
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company_service.rb +0 -122
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/completion_service.rb +0 -141
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event.rb +0 -238
- 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 -847
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/histogram.rb +0 -55
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job.rb +0 -363
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job_service.rb +0 -762
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile.rb +0 -808
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile_service.rb +0 -446
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant.rb +0 -74
- data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant_service.rb +0 -101
- 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 -87
- 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 -126
- 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 -268
- data/lib/google/cloud/talent/v4beta1/event_service_client_config.json +0 -31
- data/lib/google/cloud/talent/v4beta1/event_service_pb.rb +0 -26
- data/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb +0 -53
- data/lib/google/cloud/talent/v4beta1/filters_pb.rb +0 -187
- data/lib/google/cloud/talent/v4beta1/helpers.rb +0 -162
- data/lib/google/cloud/talent/v4beta1/histogram_pb.rb +0 -27
- data/lib/google/cloud/talent/v4beta1/job_pb.rb +0 -71
- data/lib/google/cloud/talent/v4beta1/job_service_client.rb +0 -1576
- data/lib/google/cloud/talent/v4beta1/job_service_client_config.json +0 -76
- data/lib/google/cloud/talent/v4beta1/job_service_pb.rb +0 -165
- data/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb +0 -92
- data/lib/google/cloud/talent/v4beta1/profile_pb.rb +0 -212
- data/lib/google/cloud/talent/v4beta1/profile_service_client.rb +0 -844
- data/lib/google/cloud/talent/v4beta1/profile_service_client_config.json +0 -56
- data/lib/google/cloud/talent/v4beta1/profile_service_pb.rb +0 -88
- data/lib/google/cloud/talent/v4beta1/profile_service_services_pb.rb +0 -67
- data/lib/google/cloud/talent/v4beta1/tenant_pb.rb +0 -33
- data/lib/google/cloud/talent/v4beta1/tenant_service_client.rb +0 -476
- data/lib/google/cloud/talent/v4beta1/tenant_service_client_config.json +0 -51
- data/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb +0 -54
- data/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb +0 -55
@@ -1,40 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# source: google/cloud/talent/v4beta1/company.proto
|
3
|
-
|
4
|
-
|
5
|
-
require 'google/protobuf'
|
6
|
-
|
7
|
-
require 'google/api/annotations_pb'
|
8
|
-
require 'google/api/field_behavior_pb'
|
9
|
-
require 'google/cloud/talent/v4beta1/common_pb'
|
10
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
-
add_message "google.cloud.talent.v4beta1.Company" do
|
12
|
-
optional :name, :string, 1
|
13
|
-
optional :display_name, :string, 2
|
14
|
-
optional :external_id, :string, 3
|
15
|
-
optional :size, :enum, 4, "google.cloud.talent.v4beta1.CompanySize"
|
16
|
-
optional :headquarters_address, :string, 5
|
17
|
-
optional :hiring_agency, :bool, 6
|
18
|
-
optional :eeo_text, :string, 7
|
19
|
-
optional :website_uri, :string, 8
|
20
|
-
optional :career_site_uri, :string, 9
|
21
|
-
optional :image_uri, :string, 10
|
22
|
-
repeated :keyword_searchable_job_custom_attributes, :string, 11
|
23
|
-
optional :derived_info, :message, 12, "google.cloud.talent.v4beta1.Company.DerivedInfo"
|
24
|
-
optional :suspended, :bool, 13
|
25
|
-
end
|
26
|
-
add_message "google.cloud.talent.v4beta1.Company.DerivedInfo" do
|
27
|
-
optional :headquarters_location, :message, 1, "google.cloud.talent.v4beta1.Location"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
module Google
|
32
|
-
module Cloud
|
33
|
-
module Talent
|
34
|
-
module V4beta1
|
35
|
-
Company = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Company").msgclass
|
36
|
-
Company::DerivedInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Company.DerivedInfo").msgclass
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,535 +0,0 @@
|
|
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/company_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/company_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 company management, including CRUD and enumeration.
|
37
|
-
#
|
38
|
-
# @!attribute [r] company_service_stub
|
39
|
-
# @return [Google::Cloud::Talent::V4beta1::CompanyService::Stub]
|
40
|
-
class CompanyServiceClient
|
41
|
-
# @private
|
42
|
-
attr_reader :company_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_companies" => Google::Gax::PageDescriptor.new(
|
57
|
-
"page_token",
|
58
|
-
"next_page_token",
|
59
|
-
"companies")
|
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
|
-
COMPANY_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
73
|
-
"projects/{project}/tenants/{tenant}/companies/{company}"
|
74
|
-
)
|
75
|
-
|
76
|
-
private_constant :COMPANY_PATH_TEMPLATE
|
77
|
-
|
78
|
-
COMPANY_WITHOUT_TENANT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
79
|
-
"projects/{project}/companies/{company}"
|
80
|
-
)
|
81
|
-
|
82
|
-
private_constant :COMPANY_WITHOUT_TENANT_PATH_TEMPLATE
|
83
|
-
|
84
|
-
PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
85
|
-
"projects/{project}"
|
86
|
-
)
|
87
|
-
|
88
|
-
private_constant :PROJECT_PATH_TEMPLATE
|
89
|
-
|
90
|
-
TENANT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
91
|
-
"projects/{project}/tenants/{tenant}"
|
92
|
-
)
|
93
|
-
|
94
|
-
private_constant :TENANT_PATH_TEMPLATE
|
95
|
-
|
96
|
-
# Returns a fully-qualified company resource name string.
|
97
|
-
# @param project [String]
|
98
|
-
# @param tenant [String]
|
99
|
-
# @param company [String]
|
100
|
-
# @return [String]
|
101
|
-
def self.company_path project, tenant, company
|
102
|
-
COMPANY_PATH_TEMPLATE.render(
|
103
|
-
:"project" => project,
|
104
|
-
:"tenant" => tenant,
|
105
|
-
:"company" => company
|
106
|
-
)
|
107
|
-
end
|
108
|
-
|
109
|
-
# Returns a fully-qualified company_without_tenant resource name string.
|
110
|
-
# @param project [String]
|
111
|
-
# @param company [String]
|
112
|
-
# @return [String]
|
113
|
-
def self.company_without_tenant_path project, company
|
114
|
-
COMPANY_WITHOUT_TENANT_PATH_TEMPLATE.render(
|
115
|
-
:"project" => project,
|
116
|
-
:"company" => company
|
117
|
-
)
|
118
|
-
end
|
119
|
-
|
120
|
-
# Returns a fully-qualified project resource name string.
|
121
|
-
# @param project [String]
|
122
|
-
# @return [String]
|
123
|
-
def self.project_path project
|
124
|
-
PROJECT_PATH_TEMPLATE.render(
|
125
|
-
:"project" => project
|
126
|
-
)
|
127
|
-
end
|
128
|
-
|
129
|
-
# Returns a fully-qualified tenant resource name string.
|
130
|
-
# @param project [String]
|
131
|
-
# @param tenant [String]
|
132
|
-
# @return [String]
|
133
|
-
def self.tenant_path project, tenant
|
134
|
-
TENANT_PATH_TEMPLATE.render(
|
135
|
-
:"project" => project,
|
136
|
-
:"tenant" => tenant
|
137
|
-
)
|
138
|
-
end
|
139
|
-
|
140
|
-
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
141
|
-
# Provides the means for authenticating requests made by the client. This parameter can
|
142
|
-
# be many types.
|
143
|
-
# A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
|
144
|
-
# authenticating requests made by this client.
|
145
|
-
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
146
|
-
# credentials for this client.
|
147
|
-
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
148
|
-
# credentials for this client.
|
149
|
-
# A `GRPC::Core::Channel` will be used to make calls through.
|
150
|
-
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
151
|
-
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
152
|
-
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
153
|
-
# metadata for requests, generally, to give OAuth credentials.
|
154
|
-
# @param scopes [Array<String>]
|
155
|
-
# The OAuth scopes for this service. This parameter is ignored if
|
156
|
-
# an updater_proc is supplied.
|
157
|
-
# @param client_config [Hash]
|
158
|
-
# A Hash for call options for each method. See
|
159
|
-
# Google::Gax#construct_settings for the structure of
|
160
|
-
# this data. Falls back to the default config if not specified
|
161
|
-
# or the specified config is missing data points.
|
162
|
-
# @param timeout [Numeric]
|
163
|
-
# The default timeout, in seconds, for calls made through this client.
|
164
|
-
# @param metadata [Hash]
|
165
|
-
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
166
|
-
# @param service_address [String]
|
167
|
-
# Override for the service hostname, or `nil` to leave as the default.
|
168
|
-
# @param service_port [Integer]
|
169
|
-
# Override for the service port, or `nil` to leave as the default.
|
170
|
-
# @param exception_transformer [Proc]
|
171
|
-
# An optional proc that intercepts any exceptions raised during an API call to inject
|
172
|
-
# custom error handling.
|
173
|
-
def initialize \
|
174
|
-
credentials: nil,
|
175
|
-
scopes: ALL_SCOPES,
|
176
|
-
client_config: {},
|
177
|
-
timeout: DEFAULT_TIMEOUT,
|
178
|
-
metadata: nil,
|
179
|
-
service_address: nil,
|
180
|
-
service_port: nil,
|
181
|
-
exception_transformer: nil,
|
182
|
-
lib_name: nil,
|
183
|
-
lib_version: ""
|
184
|
-
# These require statements are intentionally placed here to initialize
|
185
|
-
# the gRPC module only when it's required.
|
186
|
-
# See https://github.com/googleapis/toolkit/issues/446
|
187
|
-
require "google/gax/grpc"
|
188
|
-
require "google/cloud/talent/v4beta1/company_service_services_pb"
|
189
|
-
|
190
|
-
credentials ||= Google::Cloud::Talent::V4beta1::Credentials.default
|
191
|
-
|
192
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
193
|
-
updater_proc = Google::Cloud::Talent::V4beta1::Credentials.new(credentials).updater_proc
|
194
|
-
end
|
195
|
-
if credentials.is_a?(GRPC::Core::Channel)
|
196
|
-
channel = credentials
|
197
|
-
end
|
198
|
-
if credentials.is_a?(GRPC::Core::ChannelCredentials)
|
199
|
-
chan_creds = credentials
|
200
|
-
end
|
201
|
-
if credentials.is_a?(Proc)
|
202
|
-
updater_proc = credentials
|
203
|
-
end
|
204
|
-
if credentials.is_a?(Google::Auth::Credentials)
|
205
|
-
updater_proc = credentials.updater_proc
|
206
|
-
end
|
207
|
-
|
208
|
-
package_version = Google::Cloud::Talent::VERSION
|
209
|
-
|
210
|
-
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
211
|
-
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
212
|
-
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
213
|
-
google_api_client << " grpc/#{GRPC::VERSION}"
|
214
|
-
google_api_client.freeze
|
215
|
-
|
216
|
-
headers = { :"x-goog-api-client" => google_api_client }
|
217
|
-
headers.merge!(metadata) unless metadata.nil?
|
218
|
-
client_config_file = Pathname.new(__dir__).join(
|
219
|
-
"company_service_client_config.json"
|
220
|
-
)
|
221
|
-
defaults = client_config_file.open do |f|
|
222
|
-
Google::Gax.construct_settings(
|
223
|
-
"google.cloud.talent.v4beta1.CompanyService",
|
224
|
-
JSON.parse(f.read),
|
225
|
-
client_config,
|
226
|
-
Google::Gax::Grpc::STATUS_CODE_NAMES,
|
227
|
-
timeout,
|
228
|
-
page_descriptors: PAGE_DESCRIPTORS,
|
229
|
-
errors: Google::Gax::Grpc::API_ERRORS,
|
230
|
-
metadata: headers
|
231
|
-
)
|
232
|
-
end
|
233
|
-
|
234
|
-
# Allow overriding the service path/port in subclasses.
|
235
|
-
service_path = service_address || self.class::SERVICE_ADDRESS
|
236
|
-
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
237
|
-
interceptors = self.class::GRPC_INTERCEPTORS
|
238
|
-
@company_service_stub = Google::Gax::Grpc.create_stub(
|
239
|
-
service_path,
|
240
|
-
port,
|
241
|
-
chan_creds: chan_creds,
|
242
|
-
channel: channel,
|
243
|
-
updater_proc: updater_proc,
|
244
|
-
scopes: scopes,
|
245
|
-
interceptors: interceptors,
|
246
|
-
&Google::Cloud::Talent::V4beta1::CompanyService::Stub.method(:new)
|
247
|
-
)
|
248
|
-
|
249
|
-
@create_company = Google::Gax.create_api_call(
|
250
|
-
@company_service_stub.method(:create_company),
|
251
|
-
defaults["create_company"],
|
252
|
-
exception_transformer: exception_transformer,
|
253
|
-
params_extractor: proc do |request|
|
254
|
-
{'parent' => request.parent}
|
255
|
-
end
|
256
|
-
)
|
257
|
-
@get_company = Google::Gax.create_api_call(
|
258
|
-
@company_service_stub.method(:get_company),
|
259
|
-
defaults["get_company"],
|
260
|
-
exception_transformer: exception_transformer,
|
261
|
-
params_extractor: proc do |request|
|
262
|
-
{'name' => request.name}
|
263
|
-
end
|
264
|
-
)
|
265
|
-
@update_company = Google::Gax.create_api_call(
|
266
|
-
@company_service_stub.method(:update_company),
|
267
|
-
defaults["update_company"],
|
268
|
-
exception_transformer: exception_transformer,
|
269
|
-
params_extractor: proc do |request|
|
270
|
-
{'company.name' => request.company.name}
|
271
|
-
end
|
272
|
-
)
|
273
|
-
@delete_company = Google::Gax.create_api_call(
|
274
|
-
@company_service_stub.method(:delete_company),
|
275
|
-
defaults["delete_company"],
|
276
|
-
exception_transformer: exception_transformer,
|
277
|
-
params_extractor: proc do |request|
|
278
|
-
{'name' => request.name}
|
279
|
-
end
|
280
|
-
)
|
281
|
-
@list_companies = Google::Gax.create_api_call(
|
282
|
-
@company_service_stub.method(:list_companies),
|
283
|
-
defaults["list_companies"],
|
284
|
-
exception_transformer: exception_transformer,
|
285
|
-
params_extractor: proc do |request|
|
286
|
-
{'parent' => request.parent}
|
287
|
-
end
|
288
|
-
)
|
289
|
-
end
|
290
|
-
|
291
|
-
# Service calls
|
292
|
-
|
293
|
-
# Creates a new company entity.
|
294
|
-
#
|
295
|
-
# @param parent [String]
|
296
|
-
# Required. Resource name of the tenant under which the company is created.
|
297
|
-
#
|
298
|
-
# The format is "projects/{project_id}/tenants/{tenant_id}", for example,
|
299
|
-
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
300
|
-
# is created, for example, "projects/foo".
|
301
|
-
# @param company [Google::Cloud::Talent::V4beta1::Company | Hash]
|
302
|
-
# Required. The company to be created.
|
303
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Company`
|
304
|
-
# can also be provided.
|
305
|
-
# @param options [Google::Gax::CallOptions]
|
306
|
-
# Overrides the default settings for this call, e.g, timeout,
|
307
|
-
# retries, etc.
|
308
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
309
|
-
# @yieldparam result [Google::Cloud::Talent::V4beta1::Company]
|
310
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
311
|
-
# @return [Google::Cloud::Talent::V4beta1::Company]
|
312
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
313
|
-
# @example
|
314
|
-
# require "google/cloud/talent"
|
315
|
-
#
|
316
|
-
# company_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
|
317
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::CompanyServiceClient.tenant_path("[PROJECT]", "[TENANT]")
|
318
|
-
#
|
319
|
-
# # TODO: Initialize `company`:
|
320
|
-
# company = {}
|
321
|
-
# response = company_client.create_company(formatted_parent, company)
|
322
|
-
|
323
|
-
def create_company \
|
324
|
-
parent,
|
325
|
-
company,
|
326
|
-
options: nil,
|
327
|
-
&block
|
328
|
-
req = {
|
329
|
-
parent: parent,
|
330
|
-
company: company
|
331
|
-
}.delete_if { |_, v| v.nil? }
|
332
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::CreateCompanyRequest)
|
333
|
-
@create_company.call(req, options, &block)
|
334
|
-
end
|
335
|
-
|
336
|
-
# Retrieves specified company.
|
337
|
-
#
|
338
|
-
# @param name [String]
|
339
|
-
# Required. The resource name of the company to be retrieved.
|
340
|
-
#
|
341
|
-
# The format is
|
342
|
-
# "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
|
343
|
-
# example, "projects/api-test-project/tenants/foo/companies/bar".
|
344
|
-
#
|
345
|
-
# If tenant id is unspecified, the default tenant is used, for
|
346
|
-
# example, "projects/api-test-project/companies/bar".
|
347
|
-
# @param options [Google::Gax::CallOptions]
|
348
|
-
# Overrides the default settings for this call, e.g, timeout,
|
349
|
-
# retries, etc.
|
350
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
351
|
-
# @yieldparam result [Google::Cloud::Talent::V4beta1::Company]
|
352
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
353
|
-
# @return [Google::Cloud::Talent::V4beta1::Company]
|
354
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
355
|
-
# @example
|
356
|
-
# require "google/cloud/talent"
|
357
|
-
#
|
358
|
-
# company_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
|
359
|
-
# formatted_name = Google::Cloud::Talent::V4beta1::CompanyServiceClient.company_path("[PROJECT]", "[TENANT]", "[COMPANY]")
|
360
|
-
# response = company_client.get_company(formatted_name)
|
361
|
-
|
362
|
-
def get_company \
|
363
|
-
name,
|
364
|
-
options: nil,
|
365
|
-
&block
|
366
|
-
req = {
|
367
|
-
name: name
|
368
|
-
}.delete_if { |_, v| v.nil? }
|
369
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::GetCompanyRequest)
|
370
|
-
@get_company.call(req, options, &block)
|
371
|
-
end
|
372
|
-
|
373
|
-
# Updates specified company.
|
374
|
-
#
|
375
|
-
# @param company [Google::Cloud::Talent::V4beta1::Company | Hash]
|
376
|
-
# Required. The company resource to replace the current resource in the
|
377
|
-
# system.
|
378
|
-
# A hash of the same form as `Google::Cloud::Talent::V4beta1::Company`
|
379
|
-
# can also be provided.
|
380
|
-
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
381
|
-
# Strongly recommended for the best service experience.
|
382
|
-
#
|
383
|
-
# If
|
384
|
-
# {Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#update_mask update_mask}
|
385
|
-
# is provided, only the specified fields in
|
386
|
-
# {Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#company company} are
|
387
|
-
# updated. Otherwise all the fields are updated.
|
388
|
-
#
|
389
|
-
# A field mask to specify the company fields to be updated. Only
|
390
|
-
# top level fields of {Google::Cloud::Talent::V4beta1::Company Company} are
|
391
|
-
# supported.
|
392
|
-
# A hash of the same form as `Google::Protobuf::FieldMask`
|
393
|
-
# can also be provided.
|
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::Company]
|
399
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
400
|
-
# @return [Google::Cloud::Talent::V4beta1::Company]
|
401
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
402
|
-
# @example
|
403
|
-
# require "google/cloud/talent"
|
404
|
-
#
|
405
|
-
# company_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
|
406
|
-
#
|
407
|
-
# # TODO: Initialize `company`:
|
408
|
-
# company = {}
|
409
|
-
# response = company_client.update_company(company)
|
410
|
-
|
411
|
-
def update_company \
|
412
|
-
company,
|
413
|
-
update_mask: nil,
|
414
|
-
options: nil,
|
415
|
-
&block
|
416
|
-
req = {
|
417
|
-
company: company,
|
418
|
-
update_mask: update_mask
|
419
|
-
}.delete_if { |_, v| v.nil? }
|
420
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::UpdateCompanyRequest)
|
421
|
-
@update_company.call(req, options, &block)
|
422
|
-
end
|
423
|
-
|
424
|
-
# Deletes specified company.
|
425
|
-
# Prerequisite: The company has no jobs associated with it.
|
426
|
-
#
|
427
|
-
# @param name [String]
|
428
|
-
# Required. The resource name of the company to be deleted.
|
429
|
-
#
|
430
|
-
# The format is
|
431
|
-
# "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for
|
432
|
-
# example, "projects/foo/tenants/bar/companies/baz".
|
433
|
-
#
|
434
|
-
# If tenant id is unspecified, the default tenant is used, for
|
435
|
-
# example, "projects/foo/companies/bar".
|
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 []
|
441
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
442
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
443
|
-
# @example
|
444
|
-
# require "google/cloud/talent"
|
445
|
-
#
|
446
|
-
# company_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
|
447
|
-
# formatted_name = Google::Cloud::Talent::V4beta1::CompanyServiceClient.company_path("[PROJECT]", "[TENANT]", "[COMPANY]")
|
448
|
-
# company_client.delete_company(formatted_name)
|
449
|
-
|
450
|
-
def delete_company \
|
451
|
-
name,
|
452
|
-
options: nil,
|
453
|
-
&block
|
454
|
-
req = {
|
455
|
-
name: name
|
456
|
-
}.delete_if { |_, v| v.nil? }
|
457
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::DeleteCompanyRequest)
|
458
|
-
@delete_company.call(req, options, &block)
|
459
|
-
nil
|
460
|
-
end
|
461
|
-
|
462
|
-
# Lists all companies associated with the project.
|
463
|
-
#
|
464
|
-
# @param parent [String]
|
465
|
-
# Required. Resource name of the tenant under which the company is created.
|
466
|
-
#
|
467
|
-
# The format is "projects/{project_id}/tenants/{tenant_id}", for example,
|
468
|
-
# "projects/foo/tenant/bar".
|
469
|
-
#
|
470
|
-
# If tenant id is unspecified, the default tenant will be used, for
|
471
|
-
# example, "projects/foo".
|
472
|
-
# @param page_size [Integer]
|
473
|
-
# The maximum number of resources contained in the underlying API
|
474
|
-
# response. If page streaming is performed per-resource, this
|
475
|
-
# parameter does not affect the return value. If page streaming is
|
476
|
-
# performed per-page, this determines the maximum number of
|
477
|
-
# resources in a page.
|
478
|
-
# @param require_open_jobs [true, false]
|
479
|
-
# Set to true if the companies requested must have open jobs.
|
480
|
-
#
|
481
|
-
# Defaults to false.
|
482
|
-
#
|
483
|
-
# If true, at most
|
484
|
-
# {Google::Cloud::Talent::V4beta1::ListCompaniesRequest#page_size page_size} of
|
485
|
-
# companies are fetched, among which only those with open jobs are returned.
|
486
|
-
# @param options [Google::Gax::CallOptions]
|
487
|
-
# Overrides the default settings for this call, e.g, timeout,
|
488
|
-
# retries, etc.
|
489
|
-
# @yield [result, operation] Access the result along with the RPC operation
|
490
|
-
# @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Company>]
|
491
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
492
|
-
# @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Company>]
|
493
|
-
# An enumerable of Google::Cloud::Talent::V4beta1::Company instances.
|
494
|
-
# See Google::Gax::PagedEnumerable documentation for other
|
495
|
-
# operations such as per-page iteration or access to the response
|
496
|
-
# object.
|
497
|
-
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
498
|
-
# @example
|
499
|
-
# require "google/cloud/talent"
|
500
|
-
#
|
501
|
-
# company_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
|
502
|
-
# formatted_parent = Google::Cloud::Talent::V4beta1::CompanyServiceClient.tenant_path("[PROJECT]", "[TENANT]")
|
503
|
-
#
|
504
|
-
# # Iterate over all results.
|
505
|
-
# company_client.list_companies(formatted_parent).each do |element|
|
506
|
-
# # Process element.
|
507
|
-
# end
|
508
|
-
#
|
509
|
-
# # Or iterate over results one page at a time.
|
510
|
-
# company_client.list_companies(formatted_parent).each_page do |page|
|
511
|
-
# # Process each page at a time.
|
512
|
-
# page.each do |element|
|
513
|
-
# # Process element.
|
514
|
-
# end
|
515
|
-
# end
|
516
|
-
|
517
|
-
def list_companies \
|
518
|
-
parent,
|
519
|
-
page_size: nil,
|
520
|
-
require_open_jobs: nil,
|
521
|
-
options: nil,
|
522
|
-
&block
|
523
|
-
req = {
|
524
|
-
parent: parent,
|
525
|
-
page_size: page_size,
|
526
|
-
require_open_jobs: require_open_jobs
|
527
|
-
}.delete_if { |_, v| v.nil? }
|
528
|
-
req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::ListCompaniesRequest)
|
529
|
-
@list_companies.call(req, options, &block)
|
530
|
-
end
|
531
|
-
end
|
532
|
-
end
|
533
|
-
end
|
534
|
-
end
|
535
|
-
end
|