google-cloud-talent-v4beta1 0.1.0 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +5 -1
- data/lib/google/cloud/talent/v4beta1.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/application_service.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/application_service/client.rb +133 -128
- data/lib/google/cloud/talent/v4beta1/application_service/credentials.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/application_service/paths.rb +17 -17
- data/lib/google/cloud/talent/v4beta1/company_service.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/company_service/client.rb +135 -130
- data/lib/google/cloud/talent/v4beta1/company_service/credentials.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/company_service/paths.rb +8 -8
- data/lib/google/cloud/talent/v4beta1/completion.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/completion/client.rb +69 -64
- data/lib/google/cloud/talent/v4beta1/completion/credentials.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/completion/paths.rb +8 -8
- data/lib/google/cloud/talent/v4beta1/event_service.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/event_service/client.rb +62 -57
- data/lib/google/cloud/talent/v4beta1/event_service/credentials.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/event_service/paths.rb +3 -3
- data/lib/google/cloud/talent/v4beta1/job_service.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/job_service/client.rb +329 -324
- data/lib/google/cloud/talent/v4beta1/job_service/credentials.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/job_service/operations.rb +109 -103
- data/lib/google/cloud/talent/v4beta1/job_service/paths.rb +13 -13
- data/lib/google/cloud/talent/v4beta1/profile_service.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/profile_service/client.rb +185 -180
- data/lib/google/cloud/talent/v4beta1/profile_service/credentials.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/profile_service/paths.rb +5 -5
- data/lib/google/cloud/talent/v4beta1/tenant_service.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/tenant_service/client.rb +133 -128
- data/lib/google/cloud/talent/v4beta1/tenant_service/credentials.rb +1 -1
- data/lib/google/cloud/talent/v4beta1/tenant_service/paths.rb +3 -3
- data/lib/google/cloud/talent/v4beta1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/talent/v4beta1/application.rb +18 -18
- data/proto_docs/google/cloud/talent/v4beta1/application_service.rb +27 -27
- data/proto_docs/google/cloud/talent/v4beta1/common.rb +167 -167
- data/proto_docs/google/cloud/talent/v4beta1/company.rb +21 -21
- data/proto_docs/google/cloud/talent/v4beta1/company_service.rb +29 -29
- data/proto_docs/google/cloud/talent/v4beta1/completion_service.rb +28 -28
- data/proto_docs/google/cloud/talent/v4beta1/event.rb +30 -30
- data/proto_docs/google/cloud/talent/v4beta1/event_service.rb +4 -4
- data/proto_docs/google/cloud/talent/v4beta1/filters.rb +198 -198
- data/proto_docs/google/cloud/talent/v4beta1/histogram.rb +14 -14
- data/proto_docs/google/cloud/talent/v4beta1/job.rb +83 -83
- data/proto_docs/google/cloud/talent/v4beta1/job_service.rb +163 -163
- data/proto_docs/google/cloud/talent/v4beta1/profile.rb +202 -202
- data/proto_docs/google/cloud/talent/v4beta1/profile_service.rb +82 -82
- data/proto_docs/google/cloud/talent/v4beta1/tenant.rb +8 -8
- data/proto_docs/google/cloud/talent/v4beta1/tenant_service.rb +27 -27
- data/proto_docs/google/longrunning/operations.rb +30 -30
- data/proto_docs/google/protobuf/any.rb +4 -4
- data/proto_docs/google/protobuf/duration.rb +4 -4
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/protobuf/wrappers.rb +27 -27
- data/proto_docs/google/rpc/status.rb +6 -6
- data/proto_docs/google/type/date.rb +6 -6
- data/proto_docs/google/type/latlng.rb +4 -4
- data/proto_docs/google/type/money.rb +5 -5
- data/proto_docs/google/type/postal_address.rb +13 -13
- data/proto_docs/google/type/timeofday.rb +7 -7
- metadata +33 -6
- data/lib/google/cloud/common_resources_pb.rb +0 -15
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
module V4beta1
|
25
25
|
module CompanyService
|
26
26
|
# Credentials for the CompanyService API.
|
27
|
-
class Credentials < Google::Auth::Credentials
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
28
|
self.scope = [
|
29
29
|
"https://www.googleapis.com/auth/cloud-platform",
|
30
30
|
"https://www.googleapis.com/auth/jobs"
|
@@ -44,24 +44,24 @@ module Google
|
|
44
44
|
# @param project [String]
|
45
45
|
# @param company [String]
|
46
46
|
#
|
47
|
-
# @return [String]
|
47
|
+
# @return [::String]
|
48
48
|
def company_path **args
|
49
49
|
resources = {
|
50
50
|
"company:project:tenant" => (proc do |project:, tenant:, company:|
|
51
|
-
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
52
|
-
raise ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
|
51
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
52
|
+
raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
|
53
53
|
|
54
54
|
"projects/#{project}/tenants/#{tenant}/companies/#{company}"
|
55
55
|
end),
|
56
56
|
"company:project" => (proc do |project:, company:|
|
57
|
-
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
57
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
58
58
|
|
59
59
|
"projects/#{project}/companies/#{company}"
|
60
60
|
end)
|
61
61
|
}
|
62
62
|
|
63
63
|
resource = resources[args.keys.sort.join(":")]
|
64
|
-
raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
64
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
65
65
|
resource.call(**args)
|
66
66
|
end
|
67
67
|
|
@@ -74,7 +74,7 @@ module Google
|
|
74
74
|
#
|
75
75
|
# @param project [String]
|
76
76
|
#
|
77
|
-
# @return [String]
|
77
|
+
# @return [::String]
|
78
78
|
def project_path project:
|
79
79
|
"projects/#{project}"
|
80
80
|
end
|
@@ -89,9 +89,9 @@ module Google
|
|
89
89
|
# @param project [String]
|
90
90
|
# @param tenant [String]
|
91
91
|
#
|
92
|
-
# @return [String]
|
92
|
+
# @return [::String]
|
93
93
|
def tenant_path project:, tenant:
|
94
|
-
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
94
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
95
95
|
|
96
96
|
"projects/#{project}/tenants/#{tenant}"
|
97
97
|
end
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# To load this service and instantiate a client:
|
37
37
|
#
|
38
38
|
# require "google/cloud/talent/v4beta1/completion"
|
39
|
-
# client = Google::Cloud::Talent::V4beta1::Completion::Client.new
|
39
|
+
# client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new
|
40
40
|
#
|
41
41
|
module Completion
|
42
42
|
end
|
@@ -38,15 +38,15 @@ module Google
|
|
38
38
|
##
|
39
39
|
# Configure the Completion Client class.
|
40
40
|
#
|
41
|
-
# See {Google::Cloud::Talent::V4beta1::Completion::Client::Configuration}
|
41
|
+
# See {::Google::Cloud::Talent::V4beta1::Completion::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
44
|
# ## Example
|
45
45
|
#
|
46
46
|
# To modify the configuration for all Completion clients:
|
47
47
|
#
|
48
|
-
# Google::Cloud::Talent::V4beta1::Completion::Client.configure do |config|
|
49
|
-
# config.timeout =
|
48
|
+
# ::Google::Cloud::Talent::V4beta1::Completion::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
50
|
# end
|
51
51
|
#
|
52
52
|
# @yield [config] Configure the Client client.
|
@@ -86,7 +86,7 @@ module Google
|
|
86
86
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
87
87
|
# should be made on {Client.configure}.
|
88
88
|
#
|
89
|
-
# See {Google::Cloud::Talent::V4beta1::Completion::Client::Configuration}
|
89
|
+
# See {::Google::Cloud::Talent::V4beta1::Completion::Client::Configuration}
|
90
90
|
# for a description of the configuration fields.
|
91
91
|
#
|
92
92
|
# @yield [config] Configure the Client client.
|
@@ -107,13 +107,13 @@ module Google
|
|
107
107
|
# To create a new Completion client with the default
|
108
108
|
# configuration:
|
109
109
|
#
|
110
|
-
# client = Google::Cloud::Talent::V4beta1::Completion::Client.new
|
110
|
+
# client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new
|
111
111
|
#
|
112
112
|
# To create a new Completion client with a custom
|
113
113
|
# configuration:
|
114
114
|
#
|
115
|
-
# client = Google::Cloud::Talent::V4beta1::Completion::Client.new do |config|
|
116
|
-
# config.timeout =
|
115
|
+
# client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config|
|
116
|
+
# config.timeout = 10.0
|
117
117
|
# end
|
118
118
|
#
|
119
119
|
# @yield [config] Configure the Completion client.
|
@@ -138,10 +138,11 @@ module Google
|
|
138
138
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
139
139
|
credentials = Credentials.new credentials, scope: @config.scope
|
140
140
|
end
|
141
|
-
@quota_project_id =
|
141
|
+
@quota_project_id = @config.quota_project
|
142
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
142
143
|
|
143
|
-
@completion_stub = Gapic::ServiceStub.new(
|
144
|
-
Google::Cloud::Talent::V4beta1::Completion::Stub,
|
144
|
+
@completion_stub = ::Gapic::ServiceStub.new(
|
145
|
+
::Google::Cloud::Talent::V4beta1::Completion::Stub,
|
145
146
|
credentials: credentials,
|
146
147
|
endpoint: @config.endpoint,
|
147
148
|
channel_args: @config.channel_args,
|
@@ -157,12 +158,12 @@ module Google
|
|
157
158
|
#
|
158
159
|
# @overload complete_query(request, options = nil)
|
159
160
|
# Pass arguments to `complete_query` via a request object, either of type
|
160
|
-
# {Google::Cloud::Talent::V4beta1::CompleteQueryRequest} or an equivalent Hash.
|
161
|
+
# {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest} or an equivalent Hash.
|
161
162
|
#
|
162
|
-
# @param request [Google::Cloud::Talent::V4beta1::CompleteQueryRequest, Hash]
|
163
|
+
# @param request [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest, ::Hash]
|
163
164
|
# A request object representing the call parameters. Required. To specify no
|
164
165
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
165
|
-
# @param options [Gapic::CallOptions, Hash]
|
166
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
166
167
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
167
168
|
#
|
168
169
|
# @overload complete_query(parent: nil, query: nil, language_codes: nil, page_size: nil, company: nil, scope: nil, type: nil)
|
@@ -170,7 +171,7 @@ module Google
|
|
170
171
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
171
172
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
172
173
|
#
|
173
|
-
# @param parent [String]
|
174
|
+
# @param parent [::String]
|
174
175
|
# Required. Resource name of tenant the completion is performed within.
|
175
176
|
#
|
176
177
|
# The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example,
|
@@ -178,22 +179,22 @@ module Google
|
|
178
179
|
#
|
179
180
|
# If tenant id is unspecified, the default tenant is used, for
|
180
181
|
# example, "projects/foo".
|
181
|
-
# @param query [String]
|
182
|
+
# @param query [::String]
|
182
183
|
# Required. The query used to generate suggestions.
|
183
184
|
#
|
184
185
|
# The maximum number of allowed characters is 255.
|
185
|
-
# @param language_codes [Array
|
186
|
+
# @param language_codes [::Array<::String>]
|
186
187
|
# The list of languages of the query. This is
|
187
188
|
# the BCP-47 language code, such as "en-US" or "sr-Latn".
|
188
189
|
# For more information, see
|
189
190
|
# [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
|
190
191
|
#
|
191
192
|
# The maximum number of allowed characters is 255.
|
192
|
-
# @param page_size [Integer]
|
193
|
+
# @param page_size [::Integer]
|
193
194
|
# Required. Completion result count.
|
194
195
|
#
|
195
196
|
# The maximum allowed page size is 10.
|
196
|
-
# @param company [String]
|
197
|
+
# @param company [::String]
|
197
198
|
# If provided, restricts completion to specified company.
|
198
199
|
#
|
199
200
|
# The format is
|
@@ -202,32 +203,32 @@ module Google
|
|
202
203
|
#
|
203
204
|
# If tenant id is unspecified, the default tenant is used, for
|
204
205
|
# example, "projects/foo".
|
205
|
-
# @param scope [Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope]
|
206
|
-
# The scope of the completion. The defaults is {Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope::PUBLIC CompletionScope.PUBLIC}.
|
207
|
-
# @param type [Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType]
|
208
|
-
# The completion topic. The default is {Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMBINED CompletionType.COMBINED}.
|
206
|
+
# @param scope [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope]
|
207
|
+
# The scope of the completion. The defaults is {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionScope::PUBLIC CompletionScope.PUBLIC}.
|
208
|
+
# @param type [::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType]
|
209
|
+
# The completion topic. The default is {::Google::Cloud::Talent::V4beta1::CompleteQueryRequest::CompletionType::COMBINED CompletionType.COMBINED}.
|
209
210
|
#
|
210
211
|
# @yield [response, operation] Access the result along with the RPC operation
|
211
|
-
# @yieldparam response [Google::Cloud::Talent::V4beta1::CompleteQueryResponse]
|
212
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
212
|
+
# @yieldparam response [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse]
|
213
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
213
214
|
#
|
214
|
-
# @return [Google::Cloud::Talent::V4beta1::CompleteQueryResponse]
|
215
|
+
# @return [::Google::Cloud::Talent::V4beta1::CompleteQueryResponse]
|
215
216
|
#
|
216
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
217
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
217
218
|
#
|
218
219
|
def complete_query request, options = nil
|
219
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
220
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
220
221
|
|
221
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::CompleteQueryRequest
|
222
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CompleteQueryRequest
|
222
223
|
|
223
224
|
# Converts hash and nil to an options object
|
224
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
225
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
225
226
|
|
226
227
|
# Customize the options with defaults
|
227
228
|
metadata = @config.rpcs.complete_query.metadata.to_h
|
228
229
|
|
229
230
|
# Set x-goog-api-client and x-goog-user-project headers
|
230
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
231
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
231
232
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
232
233
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
233
234
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -248,8 +249,8 @@ module Google
|
|
248
249
|
yield response, operation if block_given?
|
249
250
|
return response
|
250
251
|
end
|
251
|
-
rescue GRPC::BadStatus => e
|
252
|
-
raise Google::Cloud::Error.from_error(e)
|
252
|
+
rescue ::GRPC::BadStatus => e
|
253
|
+
raise ::Google::Cloud::Error.from_error(e)
|
253
254
|
end
|
254
255
|
|
255
256
|
##
|
@@ -259,7 +260,7 @@ module Google
|
|
259
260
|
# providing control over timeouts, retry behavior, logging, transport
|
260
261
|
# parameters, and other low-level controls. Certain parameters can also be
|
261
262
|
# applied individually to specific RPCs. See
|
262
|
-
# {Google::Cloud::Talent::V4beta1::Completion::Client::Configuration::Rpcs}
|
263
|
+
# {::Google::Cloud::Talent::V4beta1::Completion::Client::Configuration::Rpcs}
|
263
264
|
# for a list of RPCs that can be configured independently.
|
264
265
|
#
|
265
266
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -270,22 +271,22 @@ module Google
|
|
270
271
|
# To modify the global config, setting the timeout for complete_query
|
271
272
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
272
273
|
#
|
273
|
-
# Google::Cloud::Talent::V4beta1::Completion::Client.configure do |config|
|
274
|
-
# config.timeout =
|
275
|
-
# config.rpcs.complete_query.timeout =
|
274
|
+
# ::Google::Cloud::Talent::V4beta1::Completion::Client.configure do |config|
|
275
|
+
# config.timeout = 10.0
|
276
|
+
# config.rpcs.complete_query.timeout = 20.0
|
276
277
|
# end
|
277
278
|
#
|
278
279
|
# To apply the above configuration only to a new client:
|
279
280
|
#
|
280
|
-
# client = Google::Cloud::Talent::V4beta1::Completion::Client.new do |config|
|
281
|
-
# config.timeout =
|
282
|
-
# config.rpcs.complete_query.timeout =
|
281
|
+
# client = ::Google::Cloud::Talent::V4beta1::Completion::Client.new do |config|
|
282
|
+
# config.timeout = 10.0
|
283
|
+
# config.rpcs.complete_query.timeout = 20.0
|
283
284
|
# end
|
284
285
|
#
|
285
286
|
# @!attribute [rw] endpoint
|
286
287
|
# The hostname or hostname:port of the service endpoint.
|
287
288
|
# Defaults to `"jobs.googleapis.com"`.
|
288
|
-
# @return [String]
|
289
|
+
# @return [::String]
|
289
290
|
# @!attribute [rw] credentials
|
290
291
|
# Credentials to send with calls. You may provide any of the following types:
|
291
292
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -297,29 +298,29 @@ module Google
|
|
297
298
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
298
299
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
299
300
|
# * (`nil`) indicating no credentials
|
300
|
-
# @return [Object]
|
301
|
+
# @return [::Object]
|
301
302
|
# @!attribute [rw] scope
|
302
303
|
# The OAuth scopes
|
303
|
-
# @return [Array
|
304
|
+
# @return [::Array<::String>]
|
304
305
|
# @!attribute [rw] lib_name
|
305
306
|
# The library name as recorded in instrumentation and logging
|
306
|
-
# @return [String]
|
307
|
+
# @return [::String]
|
307
308
|
# @!attribute [rw] lib_version
|
308
309
|
# The library version as recorded in instrumentation and logging
|
309
|
-
# @return [String]
|
310
|
+
# @return [::String]
|
310
311
|
# @!attribute [rw] channel_args
|
311
312
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
312
313
|
# `GRPC::Core::Channel` object is provided as the credential.
|
313
|
-
# @return [Hash]
|
314
|
+
# @return [::Hash]
|
314
315
|
# @!attribute [rw] interceptors
|
315
316
|
# An array of interceptors that are run before calls are executed.
|
316
|
-
# @return [Array
|
317
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
317
318
|
# @!attribute [rw] timeout
|
318
|
-
# The call timeout in
|
319
|
-
# @return [Numeric]
|
319
|
+
# The call timeout in seconds.
|
320
|
+
# @return [::Numeric]
|
320
321
|
# @!attribute [rw] metadata
|
321
322
|
# Additional gRPC headers to be sent with the call.
|
322
|
-
# @return [Hash{Symbol
|
323
|
+
# @return [::Hash{::Symbol=>::String}]
|
323
324
|
# @!attribute [rw] retry_policy
|
324
325
|
# The retry policy. The value is a hash with the following keys:
|
325
326
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -327,25 +328,29 @@ module Google
|
|
327
328
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
328
329
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
329
330
|
# trigger a retry.
|
330
|
-
# @return [Hash]
|
331
|
+
# @return [::Hash]
|
332
|
+
# @!attribute [rw] quota_project
|
333
|
+
# A separate project against which to charge quota.
|
334
|
+
# @return [::String]
|
331
335
|
#
|
332
336
|
class Configuration
|
333
|
-
extend Gapic::Config
|
337
|
+
extend ::Gapic::Config
|
334
338
|
|
335
|
-
config_attr :endpoint,
|
336
|
-
config_attr :credentials,
|
339
|
+
config_attr :endpoint, "jobs.googleapis.com", ::String
|
340
|
+
config_attr :credentials, nil do |value|
|
337
341
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
338
342
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
339
343
|
allowed.any? { |klass| klass === value }
|
340
344
|
end
|
341
|
-
config_attr :scope,
|
342
|
-
config_attr :lib_name,
|
343
|
-
config_attr :lib_version,
|
344
|
-
config_attr(:channel_args,
|
345
|
-
config_attr :interceptors,
|
346
|
-
config_attr :timeout,
|
347
|
-
config_attr :metadata,
|
348
|
-
config_attr :retry_policy,
|
345
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
346
|
+
config_attr :lib_name, nil, ::String, nil
|
347
|
+
config_attr :lib_version, nil, ::String, nil
|
348
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
349
|
+
config_attr :interceptors, nil, ::Array, nil
|
350
|
+
config_attr :timeout, nil, ::Numeric, nil
|
351
|
+
config_attr :metadata, nil, ::Hash, nil
|
352
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
353
|
+
config_attr :quota_project, nil, ::String, nil
|
349
354
|
|
350
355
|
# @private
|
351
356
|
def initialize parent_config = nil
|
@@ -361,7 +366,7 @@ module Google
|
|
361
366
|
def rpcs
|
362
367
|
@rpcs ||= begin
|
363
368
|
parent_rpcs = nil
|
364
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
369
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
365
370
|
Rpcs.new parent_rpcs
|
366
371
|
end
|
367
372
|
end
|
@@ -386,14 +391,14 @@ module Google
|
|
386
391
|
class Rpcs
|
387
392
|
##
|
388
393
|
# RPC-specific configuration for `complete_query`
|
389
|
-
# @return [Gapic::Config::Method]
|
394
|
+
# @return [::Gapic::Config::Method]
|
390
395
|
#
|
391
396
|
attr_reader :complete_query
|
392
397
|
|
393
398
|
# @private
|
394
399
|
def initialize parent_rpcs = nil
|
395
400
|
complete_query_config = parent_rpcs&.complete_query if parent_rpcs&.respond_to? :complete_query
|
396
|
-
@complete_query = Gapic::Config::Method.new complete_query_config
|
401
|
+
@complete_query = ::Gapic::Config::Method.new complete_query_config
|
397
402
|
|
398
403
|
yield self if block_given?
|
399
404
|
end
|
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
module V4beta1
|
25
25
|
module Completion
|
26
26
|
# Credentials for the Completion API.
|
27
|
-
class Credentials < Google::Auth::Credentials
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
28
|
self.scope = [
|
29
29
|
"https://www.googleapis.com/auth/cloud-platform",
|
30
30
|
"https://www.googleapis.com/auth/jobs"
|
@@ -44,24 +44,24 @@ module Google
|
|
44
44
|
# @param project [String]
|
45
45
|
# @param company [String]
|
46
46
|
#
|
47
|
-
# @return [String]
|
47
|
+
# @return [::String]
|
48
48
|
def company_path **args
|
49
49
|
resources = {
|
50
50
|
"company:project:tenant" => (proc do |project:, tenant:, company:|
|
51
|
-
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
52
|
-
raise ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
|
51
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
52
|
+
raise ::ArgumentError, "tenant cannot contain /" if tenant.to_s.include? "/"
|
53
53
|
|
54
54
|
"projects/#{project}/tenants/#{tenant}/companies/#{company}"
|
55
55
|
end),
|
56
56
|
"company:project" => (proc do |project:, company:|
|
57
|
-
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
57
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
58
58
|
|
59
59
|
"projects/#{project}/companies/#{company}"
|
60
60
|
end)
|
61
61
|
}
|
62
62
|
|
63
63
|
resource = resources[args.keys.sort.join(":")]
|
64
|
-
raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
64
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
65
65
|
resource.call(**args)
|
66
66
|
end
|
67
67
|
|
@@ -74,7 +74,7 @@ module Google
|
|
74
74
|
#
|
75
75
|
# @param project [String]
|
76
76
|
#
|
77
|
-
# @return [String]
|
77
|
+
# @return [::String]
|
78
78
|
def project_path project:
|
79
79
|
"projects/#{project}"
|
80
80
|
end
|
@@ -89,9 +89,9 @@ module Google
|
|
89
89
|
# @param project [String]
|
90
90
|
# @param tenant [String]
|
91
91
|
#
|
92
|
-
# @return [String]
|
92
|
+
# @return [::String]
|
93
93
|
def tenant_path project:, tenant:
|
94
|
-
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
94
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
95
95
|
|
96
96
|
"projects/#{project}/tenants/#{tenant}"
|
97
97
|
end
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# To load this service and instantiate a client:
|
37
37
|
#
|
38
38
|
# require "google/cloud/talent/v4beta1/event_service"
|
39
|
-
# client = Google::Cloud::Talent::V4beta1::EventService::Client.new
|
39
|
+
# client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new
|
40
40
|
#
|
41
41
|
module EventService
|
42
42
|
end
|
@@ -38,15 +38,15 @@ module Google
|
|
38
38
|
##
|
39
39
|
# Configure the EventService Client class.
|
40
40
|
#
|
41
|
-
# See {Google::Cloud::Talent::V4beta1::EventService::Client::Configuration}
|
41
|
+
# See {::Google::Cloud::Talent::V4beta1::EventService::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
44
|
# ## Example
|
45
45
|
#
|
46
46
|
# To modify the configuration for all EventService clients:
|
47
47
|
#
|
48
|
-
# Google::Cloud::Talent::V4beta1::EventService::Client.configure do |config|
|
49
|
-
# config.timeout =
|
48
|
+
# ::Google::Cloud::Talent::V4beta1::EventService::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
50
|
# end
|
51
51
|
#
|
52
52
|
# @yield [config] Configure the Client client.
|
@@ -80,7 +80,7 @@ module Google
|
|
80
80
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
81
81
|
# should be made on {Client.configure}.
|
82
82
|
#
|
83
|
-
# See {Google::Cloud::Talent::V4beta1::EventService::Client::Configuration}
|
83
|
+
# See {::Google::Cloud::Talent::V4beta1::EventService::Client::Configuration}
|
84
84
|
# for a description of the configuration fields.
|
85
85
|
#
|
86
86
|
# @yield [config] Configure the Client client.
|
@@ -101,13 +101,13 @@ module Google
|
|
101
101
|
# To create a new EventService client with the default
|
102
102
|
# configuration:
|
103
103
|
#
|
104
|
-
# client = Google::Cloud::Talent::V4beta1::EventService::Client.new
|
104
|
+
# client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new
|
105
105
|
#
|
106
106
|
# To create a new EventService client with a custom
|
107
107
|
# configuration:
|
108
108
|
#
|
109
|
-
# client = Google::Cloud::Talent::V4beta1::EventService::Client.new do |config|
|
110
|
-
# config.timeout =
|
109
|
+
# client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new do |config|
|
110
|
+
# config.timeout = 10.0
|
111
111
|
# end
|
112
112
|
#
|
113
113
|
# @yield [config] Configure the EventService client.
|
@@ -132,10 +132,11 @@ module Google
|
|
132
132
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
133
133
|
credentials = Credentials.new credentials, scope: @config.scope
|
134
134
|
end
|
135
|
-
@quota_project_id =
|
135
|
+
@quota_project_id = @config.quota_project
|
136
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
136
137
|
|
137
|
-
@event_service_stub = Gapic::ServiceStub.new(
|
138
|
-
Google::Cloud::Talent::V4beta1::EventService::Stub,
|
138
|
+
@event_service_stub = ::Gapic::ServiceStub.new(
|
139
|
+
::Google::Cloud::Talent::V4beta1::EventService::Stub,
|
139
140
|
credentials: credentials,
|
140
141
|
endpoint: @config.endpoint,
|
141
142
|
channel_args: @config.channel_args,
|
@@ -156,12 +157,12 @@ module Google
|
|
156
157
|
#
|
157
158
|
# @overload create_client_event(request, options = nil)
|
158
159
|
# Pass arguments to `create_client_event` via a request object, either of type
|
159
|
-
# {Google::Cloud::Talent::V4beta1::CreateClientEventRequest} or an equivalent Hash.
|
160
|
+
# {::Google::Cloud::Talent::V4beta1::CreateClientEventRequest} or an equivalent Hash.
|
160
161
|
#
|
161
|
-
# @param request [Google::Cloud::Talent::V4beta1::CreateClientEventRequest, Hash]
|
162
|
+
# @param request [::Google::Cloud::Talent::V4beta1::CreateClientEventRequest, ::Hash]
|
162
163
|
# A request object representing the call parameters. Required. To specify no
|
163
164
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
164
|
-
# @param options [Gapic::CallOptions, Hash]
|
165
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
165
166
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
166
167
|
#
|
167
168
|
# @overload create_client_event(parent: nil, client_event: nil)
|
@@ -169,37 +170,37 @@ module Google
|
|
169
170
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
170
171
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
171
172
|
#
|
172
|
-
# @param parent [String]
|
173
|
+
# @param parent [::String]
|
173
174
|
# Required. Resource name of the tenant under which the event is created.
|
174
175
|
#
|
175
176
|
# The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example,
|
176
177
|
# "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
|
177
178
|
# is created, for example, "projects/foo".
|
178
|
-
# @param client_event [Google::Cloud::Talent::V4beta1::ClientEvent, Hash]
|
179
|
+
# @param client_event [::Google::Cloud::Talent::V4beta1::ClientEvent, ::Hash]
|
179
180
|
# Required. Events issued when end user interacts with customer's application that
|
180
181
|
# uses Cloud Talent Solution.
|
181
182
|
#
|
182
183
|
# @yield [response, operation] Access the result along with the RPC operation
|
183
|
-
# @yieldparam response [Google::Cloud::Talent::V4beta1::ClientEvent]
|
184
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
184
|
+
# @yieldparam response [::Google::Cloud::Talent::V4beta1::ClientEvent]
|
185
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
185
186
|
#
|
186
|
-
# @return [Google::Cloud::Talent::V4beta1::ClientEvent]
|
187
|
+
# @return [::Google::Cloud::Talent::V4beta1::ClientEvent]
|
187
188
|
#
|
188
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
189
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
189
190
|
#
|
190
191
|
def create_client_event request, options = nil
|
191
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
192
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
192
193
|
|
193
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Talent::V4beta1::CreateClientEventRequest
|
194
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4beta1::CreateClientEventRequest
|
194
195
|
|
195
196
|
# Converts hash and nil to an options object
|
196
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
197
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
197
198
|
|
198
199
|
# Customize the options with defaults
|
199
200
|
metadata = @config.rpcs.create_client_event.metadata.to_h
|
200
201
|
|
201
202
|
# Set x-goog-api-client and x-goog-user-project headers
|
202
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
203
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
203
204
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
204
205
|
gapic_version: ::Google::Cloud::Talent::V4beta1::VERSION
|
205
206
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -220,8 +221,8 @@ module Google
|
|
220
221
|
yield response, operation if block_given?
|
221
222
|
return response
|
222
223
|
end
|
223
|
-
rescue GRPC::BadStatus => e
|
224
|
-
raise Google::Cloud::Error.from_error(e)
|
224
|
+
rescue ::GRPC::BadStatus => e
|
225
|
+
raise ::Google::Cloud::Error.from_error(e)
|
225
226
|
end
|
226
227
|
|
227
228
|
##
|
@@ -231,7 +232,7 @@ module Google
|
|
231
232
|
# providing control over timeouts, retry behavior, logging, transport
|
232
233
|
# parameters, and other low-level controls. Certain parameters can also be
|
233
234
|
# applied individually to specific RPCs. See
|
234
|
-
# {Google::Cloud::Talent::V4beta1::EventService::Client::Configuration::Rpcs}
|
235
|
+
# {::Google::Cloud::Talent::V4beta1::EventService::Client::Configuration::Rpcs}
|
235
236
|
# for a list of RPCs that can be configured independently.
|
236
237
|
#
|
237
238
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -242,22 +243,22 @@ module Google
|
|
242
243
|
# To modify the global config, setting the timeout for create_client_event
|
243
244
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
244
245
|
#
|
245
|
-
# Google::Cloud::Talent::V4beta1::EventService::Client.configure do |config|
|
246
|
-
# config.timeout =
|
247
|
-
# config.rpcs.create_client_event.timeout =
|
246
|
+
# ::Google::Cloud::Talent::V4beta1::EventService::Client.configure do |config|
|
247
|
+
# config.timeout = 10.0
|
248
|
+
# config.rpcs.create_client_event.timeout = 20.0
|
248
249
|
# end
|
249
250
|
#
|
250
251
|
# To apply the above configuration only to a new client:
|
251
252
|
#
|
252
|
-
# client = Google::Cloud::Talent::V4beta1::EventService::Client.new do |config|
|
253
|
-
# config.timeout =
|
254
|
-
# config.rpcs.create_client_event.timeout =
|
253
|
+
# client = ::Google::Cloud::Talent::V4beta1::EventService::Client.new do |config|
|
254
|
+
# config.timeout = 10.0
|
255
|
+
# config.rpcs.create_client_event.timeout = 20.0
|
255
256
|
# end
|
256
257
|
#
|
257
258
|
# @!attribute [rw] endpoint
|
258
259
|
# The hostname or hostname:port of the service endpoint.
|
259
260
|
# Defaults to `"jobs.googleapis.com"`.
|
260
|
-
# @return [String]
|
261
|
+
# @return [::String]
|
261
262
|
# @!attribute [rw] credentials
|
262
263
|
# Credentials to send with calls. You may provide any of the following types:
|
263
264
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -269,29 +270,29 @@ module Google
|
|
269
270
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
270
271
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
271
272
|
# * (`nil`) indicating no credentials
|
272
|
-
# @return [Object]
|
273
|
+
# @return [::Object]
|
273
274
|
# @!attribute [rw] scope
|
274
275
|
# The OAuth scopes
|
275
|
-
# @return [Array
|
276
|
+
# @return [::Array<::String>]
|
276
277
|
# @!attribute [rw] lib_name
|
277
278
|
# The library name as recorded in instrumentation and logging
|
278
|
-
# @return [String]
|
279
|
+
# @return [::String]
|
279
280
|
# @!attribute [rw] lib_version
|
280
281
|
# The library version as recorded in instrumentation and logging
|
281
|
-
# @return [String]
|
282
|
+
# @return [::String]
|
282
283
|
# @!attribute [rw] channel_args
|
283
284
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
284
285
|
# `GRPC::Core::Channel` object is provided as the credential.
|
285
|
-
# @return [Hash]
|
286
|
+
# @return [::Hash]
|
286
287
|
# @!attribute [rw] interceptors
|
287
288
|
# An array of interceptors that are run before calls are executed.
|
288
|
-
# @return [Array
|
289
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
289
290
|
# @!attribute [rw] timeout
|
290
|
-
# The call timeout in
|
291
|
-
# @return [Numeric]
|
291
|
+
# The call timeout in seconds.
|
292
|
+
# @return [::Numeric]
|
292
293
|
# @!attribute [rw] metadata
|
293
294
|
# Additional gRPC headers to be sent with the call.
|
294
|
-
# @return [Hash{Symbol
|
295
|
+
# @return [::Hash{::Symbol=>::String}]
|
295
296
|
# @!attribute [rw] retry_policy
|
296
297
|
# The retry policy. The value is a hash with the following keys:
|
297
298
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -299,25 +300,29 @@ module Google
|
|
299
300
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
300
301
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
301
302
|
# trigger a retry.
|
302
|
-
# @return [Hash]
|
303
|
+
# @return [::Hash]
|
304
|
+
# @!attribute [rw] quota_project
|
305
|
+
# A separate project against which to charge quota.
|
306
|
+
# @return [::String]
|
303
307
|
#
|
304
308
|
class Configuration
|
305
|
-
extend Gapic::Config
|
309
|
+
extend ::Gapic::Config
|
306
310
|
|
307
|
-
config_attr :endpoint,
|
308
|
-
config_attr :credentials,
|
311
|
+
config_attr :endpoint, "jobs.googleapis.com", ::String
|
312
|
+
config_attr :credentials, nil do |value|
|
309
313
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
310
314
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
311
315
|
allowed.any? { |klass| klass === value }
|
312
316
|
end
|
313
|
-
config_attr :scope,
|
314
|
-
config_attr :lib_name,
|
315
|
-
config_attr :lib_version,
|
316
|
-
config_attr(:channel_args,
|
317
|
-
config_attr :interceptors,
|
318
|
-
config_attr :timeout,
|
319
|
-
config_attr :metadata,
|
320
|
-
config_attr :retry_policy,
|
317
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
318
|
+
config_attr :lib_name, nil, ::String, nil
|
319
|
+
config_attr :lib_version, nil, ::String, nil
|
320
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
321
|
+
config_attr :interceptors, nil, ::Array, nil
|
322
|
+
config_attr :timeout, nil, ::Numeric, nil
|
323
|
+
config_attr :metadata, nil, ::Hash, nil
|
324
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
325
|
+
config_attr :quota_project, nil, ::String, nil
|
321
326
|
|
322
327
|
# @private
|
323
328
|
def initialize parent_config = nil
|
@@ -333,7 +338,7 @@ module Google
|
|
333
338
|
def rpcs
|
334
339
|
@rpcs ||= begin
|
335
340
|
parent_rpcs = nil
|
336
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
341
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
337
342
|
Rpcs.new parent_rpcs
|
338
343
|
end
|
339
344
|
end
|
@@ -358,14 +363,14 @@ module Google
|
|
358
363
|
class Rpcs
|
359
364
|
##
|
360
365
|
# RPC-specific configuration for `create_client_event`
|
361
|
-
# @return [Gapic::Config::Method]
|
366
|
+
# @return [::Gapic::Config::Method]
|
362
367
|
#
|
363
368
|
attr_reader :create_client_event
|
364
369
|
|
365
370
|
# @private
|
366
371
|
def initialize parent_rpcs = nil
|
367
372
|
create_client_event_config = parent_rpcs&.create_client_event if parent_rpcs&.respond_to? :create_client_event
|
368
|
-
@create_client_event = Gapic::Config::Method.new create_client_event_config
|
373
|
+
@create_client_event = ::Gapic::Config::Method.new create_client_event_config
|
369
374
|
|
370
375
|
yield self if block_given?
|
371
376
|
end
|