google-cloud-talent-v4 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +2 -2
  4. data/lib/google/cloud/talent/v4/company_service/client.rb +15 -12
  5. data/lib/google/cloud/talent/v4/company_service/rest/client.rb +682 -0
  6. data/lib/google/cloud/talent/v4/company_service/rest/service_stub.rb +345 -0
  7. data/lib/google/cloud/talent/v4/company_service/rest.rb +52 -0
  8. data/lib/google/cloud/talent/v4/company_service.rb +7 -1
  9. data/lib/google/cloud/talent/v4/completion/client.rb +4 -2
  10. data/lib/google/cloud/talent/v4/completion/rest/client.rb +380 -0
  11. data/lib/google/cloud/talent/v4/completion/rest/service_stub.rb +107 -0
  12. data/lib/google/cloud/talent/v4/completion/rest.rb +52 -0
  13. data/lib/google/cloud/talent/v4/completion.rb +7 -1
  14. data/lib/google/cloud/talent/v4/event_service/client.rb +2 -2
  15. data/lib/google/cloud/talent/v4/event_service/rest/client.rb +358 -0
  16. data/lib/google/cloud/talent/v4/event_service/rest/service_stub.rb +108 -0
  17. data/lib/google/cloud/talent/v4/event_service/rest.rb +52 -0
  18. data/lib/google/cloud/talent/v4/event_service.rb +7 -1
  19. data/lib/google/cloud/talent/v4/job_service/client.rb +238 -161
  20. data/lib/google/cloud/talent/v4/job_service/operations.rb +12 -14
  21. data/lib/google/cloud/talent/v4/job_service/rest/client.rb +1685 -0
  22. data/lib/google/cloud/talent/v4/job_service/rest/operations.rb +793 -0
  23. data/lib/google/cloud/talent/v4/job_service/rest/service_stub.rb +645 -0
  24. data/lib/google/cloud/talent/v4/job_service/rest.rb +53 -0
  25. data/lib/google/cloud/talent/v4/job_service.rb +7 -1
  26. data/lib/google/cloud/talent/v4/job_service_services_pb.rb +12 -8
  27. data/lib/google/cloud/talent/v4/rest.rb +41 -0
  28. data/lib/google/cloud/talent/v4/tenant_service/client.rb +10 -9
  29. data/lib/google/cloud/talent/v4/tenant_service/rest/client.rb +670 -0
  30. data/lib/google/cloud/talent/v4/tenant_service/rest/service_stub.rb +345 -0
  31. data/lib/google/cloud/talent/v4/tenant_service/rest.rb +52 -0
  32. data/lib/google/cloud/talent/v4/tenant_service.rb +7 -1
  33. data/lib/google/cloud/talent/v4/version.rb +1 -1
  34. data/lib/google/cloud/talent/v4.rb +7 -2
  35. data/proto_docs/google/api/client.rb +318 -0
  36. data/proto_docs/google/api/launch_stage.rb +71 -0
  37. data/proto_docs/google/cloud/talent/v4/common.rb +116 -56
  38. data/proto_docs/google/cloud/talent/v4/company.rb +12 -4
  39. data/proto_docs/google/cloud/talent/v4/company_service.rb +11 -6
  40. data/proto_docs/google/cloud/talent/v4/completion_service.rb +21 -10
  41. data/proto_docs/google/cloud/talent/v4/event.rb +17 -9
  42. data/proto_docs/google/cloud/talent/v4/event_service.rb +2 -2
  43. data/proto_docs/google/cloud/talent/v4/filters.rb +55 -37
  44. data/proto_docs/google/cloud/talent/v4/histogram.rb +6 -2
  45. data/proto_docs/google/cloud/talent/v4/job.rb +83 -55
  46. data/proto_docs/google/cloud/talent/v4/job_service.rb +199 -117
  47. data/proto_docs/google/cloud/talent/v4/tenant.rb +2 -1
  48. data/proto_docs/google/cloud/talent/v4/tenant_service.rb +6 -3
  49. data/proto_docs/google/protobuf/empty.rb +0 -2
  50. data/proto_docs/google/rpc/status.rb +4 -2
  51. metadata +28 -8
@@ -0,0 +1,380 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/talent/v4/completion_service_pb"
21
+ require "google/cloud/talent/v4/completion/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Talent
26
+ module V4
27
+ module Completion
28
+ module Rest
29
+ ##
30
+ # REST client for the Completion service.
31
+ #
32
+ # A service handles auto completion.
33
+ #
34
+ class Client
35
+ include Paths
36
+
37
+ # @private
38
+ attr_reader :completion_stub
39
+
40
+ ##
41
+ # Configure the Completion Client class.
42
+ #
43
+ # See {::Google::Cloud::Talent::V4::Completion::Rest::Client::Configuration}
44
+ # for a description of the configuration fields.
45
+ #
46
+ # @example
47
+ #
48
+ # # Modify the configuration for all Completion clients
49
+ # ::Google::Cloud::Talent::V4::Completion::Rest::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
52
+ #
53
+ # @yield [config] Configure the Client client.
54
+ # @yieldparam config [Client::Configuration]
55
+ #
56
+ # @return [Client::Configuration]
57
+ #
58
+ def self.configure
59
+ @configure ||= begin
60
+ namespace = ["Google", "Cloud", "Talent", "V4"]
61
+ parent_config = while namespace.any?
62
+ parent_name = namespace.join "::"
63
+ parent_const = const_get parent_name
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
+ namespace.pop
66
+ end
67
+ default_config = Client::Configuration.new parent_config
68
+
69
+ default_config.rpcs.complete_query.timeout = 30.0
70
+ default_config.rpcs.complete_query.retry_policy = {
71
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
72
+ }
73
+
74
+ default_config
75
+ end
76
+ yield @configure if block_given?
77
+ @configure
78
+ end
79
+
80
+ ##
81
+ # Configure the Completion Client instance.
82
+ #
83
+ # The configuration is set to the derived mode, meaning that values can be changed,
84
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
85
+ # should be made on {Client.configure}.
86
+ #
87
+ # See {::Google::Cloud::Talent::V4::Completion::Rest::Client::Configuration}
88
+ # for a description of the configuration fields.
89
+ #
90
+ # @yield [config] Configure the Client client.
91
+ # @yieldparam config [Client::Configuration]
92
+ #
93
+ # @return [Client::Configuration]
94
+ #
95
+ def configure
96
+ yield @config if block_given?
97
+ @config
98
+ end
99
+
100
+ ##
101
+ # Create a new Completion REST client object.
102
+ #
103
+ # @example
104
+ #
105
+ # # Create a client using the default configuration
106
+ # client = ::Google::Cloud::Talent::V4::Completion::Rest::Client.new
107
+ #
108
+ # # Create a client using a custom configuration
109
+ # client = ::Google::Cloud::Talent::V4::Completion::Rest::Client.new do |config|
110
+ # config.timeout = 10.0
111
+ # end
112
+ #
113
+ # @yield [config] Configure the Completion client.
114
+ # @yieldparam config [Client::Configuration]
115
+ #
116
+ def initialize
117
+ # Create the configuration object
118
+ @config = Configuration.new Client.configure
119
+
120
+ # Yield the configuration if needed
121
+ yield @config if block_given?
122
+
123
+ # Create credentials
124
+ credentials = @config.credentials
125
+ # Use self-signed JWT if the endpoint is unchanged from default,
126
+ # but only if the default endpoint does not have a region prefix.
127
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
128
+ !@config.endpoint.split(".").first.include?("-")
129
+ credentials ||= Credentials.default scope: @config.scope,
130
+ enable_self_signed_jwt: enable_self_signed_jwt
131
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
132
+ credentials = Credentials.new credentials, scope: @config.scope
133
+ end
134
+
135
+ @quota_project_id = @config.quota_project
136
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
137
+
138
+ @completion_stub = ::Google::Cloud::Talent::V4::Completion::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
139
+ end
140
+
141
+ # Service calls
142
+
143
+ ##
144
+ # Completes the specified prefix with keyword suggestions.
145
+ # Intended for use by a job search auto-complete search box.
146
+ #
147
+ # @overload complete_query(request, options = nil)
148
+ # Pass arguments to `complete_query` via a request object, either of type
149
+ # {::Google::Cloud::Talent::V4::CompleteQueryRequest} or an equivalent Hash.
150
+ #
151
+ # @param request [::Google::Cloud::Talent::V4::CompleteQueryRequest, ::Hash]
152
+ # A request object representing the call parameters. Required. To specify no
153
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
154
+ # @param options [::Gapic::CallOptions, ::Hash]
155
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
156
+ #
157
+ # @overload complete_query(tenant: nil, query: nil, language_codes: nil, page_size: nil, company: nil, scope: nil, type: nil)
158
+ # Pass arguments to `complete_query` via keyword arguments. Note that at
159
+ # least one keyword argument is required. To specify no parameters, or to keep all
160
+ # the default parameter values, pass an empty Hash as a request object (see above).
161
+ #
162
+ # @param tenant [::String]
163
+ # Required. Resource name of tenant the completion is performed within.
164
+ #
165
+ # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example,
166
+ # "projects/foo/tenants/bar".
167
+ # @param query [::String]
168
+ # Required. The query used to generate suggestions.
169
+ #
170
+ # The maximum number of allowed characters is 255.
171
+ # @param language_codes [::Array<::String>]
172
+ # The list of languages of the query. This is
173
+ # the BCP-47 language code, such as "en-US" or "sr-Latn".
174
+ # For more information, see
175
+ # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
176
+ #
177
+ # The maximum number of allowed characters is 255.
178
+ # @param page_size [::Integer]
179
+ # Required. Completion result count.
180
+ #
181
+ # The maximum allowed page size is 10.
182
+ # @param company [::String]
183
+ # If provided, restricts completion to specified company.
184
+ #
185
+ # The format is
186
+ # "projects/\\{project_id}/tenants/\\{tenant_id}/companies/\\{company_id}", for
187
+ # example, "projects/foo/tenants/bar/companies/baz".
188
+ # @param scope [::Google::Cloud::Talent::V4::CompleteQueryRequest::CompletionScope]
189
+ # The scope of the completion. The defaults is
190
+ # {::Google::Cloud::Talent::V4::CompleteQueryRequest::CompletionScope::PUBLIC CompletionScope.PUBLIC}.
191
+ # @param type [::Google::Cloud::Talent::V4::CompleteQueryRequest::CompletionType]
192
+ # The completion topic. The default is
193
+ # {::Google::Cloud::Talent::V4::CompleteQueryRequest::CompletionType::COMBINED CompletionType.COMBINED}.
194
+ # @yield [result, operation] Access the result along with the TransportOperation object
195
+ # @yieldparam result [::Google::Cloud::Talent::V4::CompleteQueryResponse]
196
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
197
+ #
198
+ # @return [::Google::Cloud::Talent::V4::CompleteQueryResponse]
199
+ #
200
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
201
+ def complete_query request, options = nil
202
+ raise ::ArgumentError, "request must be provided" if request.nil?
203
+
204
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Talent::V4::CompleteQueryRequest
205
+
206
+ # Converts hash and nil to an options object
207
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
208
+
209
+ # Customize the options with defaults
210
+ call_metadata = @config.rpcs.complete_query.metadata.to_h
211
+
212
+ # Set x-goog-api-client and x-goog-user-project headers
213
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
214
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
215
+ gapic_version: ::Google::Cloud::Talent::V4::VERSION,
216
+ transports_version_send: [:rest]
217
+
218
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
219
+
220
+ options.apply_defaults timeout: @config.rpcs.complete_query.timeout,
221
+ metadata: call_metadata,
222
+ retry_policy: @config.rpcs.complete_query.retry_policy
223
+
224
+ options.apply_defaults timeout: @config.timeout,
225
+ metadata: @config.metadata,
226
+ retry_policy: @config.retry_policy
227
+
228
+ @completion_stub.complete_query request, options do |result, operation|
229
+ yield result, operation if block_given?
230
+ return result
231
+ end
232
+ rescue ::Gapic::Rest::Error => e
233
+ raise ::Google::Cloud::Error.from_error(e)
234
+ end
235
+
236
+ ##
237
+ # Configuration class for the Completion REST API.
238
+ #
239
+ # This class represents the configuration for Completion REST,
240
+ # providing control over timeouts, retry behavior, logging, transport
241
+ # parameters, and other low-level controls. Certain parameters can also be
242
+ # applied individually to specific RPCs. See
243
+ # {::Google::Cloud::Talent::V4::Completion::Rest::Client::Configuration::Rpcs}
244
+ # for a list of RPCs that can be configured independently.
245
+ #
246
+ # Configuration can be applied globally to all clients, or to a single client
247
+ # on construction.
248
+ #
249
+ # @example
250
+ #
251
+ # # Modify the global config, setting the timeout for
252
+ # # complete_query to 20 seconds,
253
+ # # and all remaining timeouts to 10 seconds.
254
+ # ::Google::Cloud::Talent::V4::Completion::Rest::Client.configure do |config|
255
+ # config.timeout = 10.0
256
+ # config.rpcs.complete_query.timeout = 20.0
257
+ # end
258
+ #
259
+ # # Apply the above configuration only to a new client.
260
+ # client = ::Google::Cloud::Talent::V4::Completion::Rest::Client.new do |config|
261
+ # config.timeout = 10.0
262
+ # config.rpcs.complete_query.timeout = 20.0
263
+ # end
264
+ #
265
+ # @!attribute [rw] endpoint
266
+ # The hostname or hostname:port of the service endpoint.
267
+ # Defaults to `"jobs.googleapis.com"`.
268
+ # @return [::String]
269
+ # @!attribute [rw] credentials
270
+ # Credentials to send with calls. You may provide any of the following types:
271
+ # * (`String`) The path to a service account key file in JSON format
272
+ # * (`Hash`) A service account key as a Hash
273
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
274
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
275
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
276
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
277
+ # * (`nil`) indicating no credentials
278
+ # @return [::Object]
279
+ # @!attribute [rw] scope
280
+ # The OAuth scopes
281
+ # @return [::Array<::String>]
282
+ # @!attribute [rw] lib_name
283
+ # The library name as recorded in instrumentation and logging
284
+ # @return [::String]
285
+ # @!attribute [rw] lib_version
286
+ # The library version as recorded in instrumentation and logging
287
+ # @return [::String]
288
+ # @!attribute [rw] timeout
289
+ # The call timeout in seconds.
290
+ # @return [::Numeric]
291
+ # @!attribute [rw] metadata
292
+ # Additional headers to be sent with the call.
293
+ # @return [::Hash{::Symbol=>::String}]
294
+ # @!attribute [rw] retry_policy
295
+ # The retry policy. The value is a hash with the following keys:
296
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
297
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
298
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
299
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
300
+ # trigger a retry.
301
+ # @return [::Hash]
302
+ # @!attribute [rw] quota_project
303
+ # A separate project against which to charge quota.
304
+ # @return [::String]
305
+ #
306
+ class Configuration
307
+ extend ::Gapic::Config
308
+
309
+ config_attr :endpoint, "jobs.googleapis.com", ::String
310
+ config_attr :credentials, nil do |value|
311
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
312
+ allowed.any? { |klass| klass === value }
313
+ end
314
+ config_attr :scope, nil, ::String, ::Array, nil
315
+ config_attr :lib_name, nil, ::String, nil
316
+ config_attr :lib_version, nil, ::String, nil
317
+ config_attr :timeout, nil, ::Numeric, nil
318
+ config_attr :metadata, nil, ::Hash, nil
319
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
320
+ config_attr :quota_project, nil, ::String, nil
321
+
322
+ # @private
323
+ def initialize parent_config = nil
324
+ @parent_config = parent_config unless parent_config.nil?
325
+
326
+ yield self if block_given?
327
+ end
328
+
329
+ ##
330
+ # Configurations for individual RPCs
331
+ # @return [Rpcs]
332
+ #
333
+ def rpcs
334
+ @rpcs ||= begin
335
+ parent_rpcs = nil
336
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
337
+ Rpcs.new parent_rpcs
338
+ end
339
+ end
340
+
341
+ ##
342
+ # Configuration RPC class for the Completion API.
343
+ #
344
+ # Includes fields providing the configuration for each RPC in this service.
345
+ # Each configuration object is of type `Gapic::Config::Method` and includes
346
+ # the following configuration fields:
347
+ #
348
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
349
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
350
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
351
+ # include the following keys:
352
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
353
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
354
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
355
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
356
+ # trigger a retry.
357
+ #
358
+ class Rpcs
359
+ ##
360
+ # RPC-specific configuration for `complete_query`
361
+ # @return [::Gapic::Config::Method]
362
+ #
363
+ attr_reader :complete_query
364
+
365
+ # @private
366
+ def initialize parent_rpcs = nil
367
+ complete_query_config = parent_rpcs.complete_query if parent_rpcs.respond_to? :complete_query
368
+ @complete_query = ::Gapic::Config::Method.new complete_query_config
369
+
370
+ yield self if block_given?
371
+ end
372
+ end
373
+ end
374
+ end
375
+ end
376
+ end
377
+ end
378
+ end
379
+ end
380
+ end
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/talent/v4/completion_service_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Talent
24
+ module V4
25
+ module Completion
26
+ module Rest
27
+ ##
28
+ # REST service stub for the Completion service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the complete_query REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::Talent::V4::CompleteQueryRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::Talent::V4::CompleteQueryResponse]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::Talent::V4::CompleteQueryResponse]
56
+ # A result object deserialized from the server's reply
57
+ def complete_query request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_complete_query_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split("=", 2) }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::Talent::V4::CompleteQueryResponse.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # @private
83
+ #
84
+ # GRPC transcoding helper method for the complete_query REST call
85
+ #
86
+ # @param request_pb [::Google::Cloud::Talent::V4::CompleteQueryRequest]
87
+ # A request object representing the call parameters. Required.
88
+ # @return [Array(String, [String, nil], Hash{String => String})]
89
+ # Uri, Body, Query string parameters
90
+ def self.transcode_complete_query_request request_pb
91
+ transcoder = Gapic::Rest::GrpcTranscoder.new
92
+ .with_bindings(
93
+ uri_method: :get,
94
+ uri_template: "/v4/{tenant}:completeQuery",
95
+ matches: [
96
+ ["tenant", %r{^projects/[^/]+/tenants/[^/]+/?$}, false]
97
+ ]
98
+ )
99
+ transcoder.transcode request_pb
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/talent/v4/version"
24
+
25
+ require "google/cloud/talent/v4/completion/credentials"
26
+ require "google/cloud/talent/v4/completion/paths"
27
+ require "google/cloud/talent/v4/completion/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Talent
32
+ module V4
33
+ ##
34
+ # A service handles auto completion.
35
+ #
36
+ # To load this service and instantiate a REST client:
37
+ #
38
+ # require "google/cloud/talent/v4/completion/rest"
39
+ # client = ::Google::Cloud::Talent::V4::Completion::Rest::Client.new
40
+ #
41
+ module Completion
42
+ # Client for the REST transport
43
+ module Rest
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
52
+ require "google/cloud/talent/v4/completion/rest/helpers" if ::File.file? helper_path
@@ -25,6 +25,7 @@ require "google/cloud/talent/v4/version"
25
25
  require "google/cloud/talent/v4/completion/credentials"
26
26
  require "google/cloud/talent/v4/completion/paths"
27
27
  require "google/cloud/talent/v4/completion/client"
28
+ require "google/cloud/talent/v4/completion/rest"
28
29
 
29
30
  module Google
30
31
  module Cloud
@@ -33,11 +34,16 @@ module Google
33
34
  ##
34
35
  # A service handles auto completion.
35
36
  #
36
- # To load this service and instantiate a client:
37
+ # @example Load this service and instantiate a gRPC client
37
38
  #
38
39
  # require "google/cloud/talent/v4/completion"
39
40
  # client = ::Google::Cloud::Talent::V4::Completion::Client.new
40
41
  #
42
+ # @example Load this service and instantiate a REST client
43
+ #
44
+ # require "google/cloud/talent/v4/completion/rest"
45
+ # client = ::Google::Cloud::Talent::V4::Completion::Rest::Client.new
46
+ #
41
47
  module Completion
42
48
  end
43
49
  end
@@ -176,8 +176,8 @@ module Google
176
176
  # The format is "projects/\\{project_id}/tenants/\\{tenant_id}", for example,
177
177
  # "projects/foo/tenants/bar".
178
178
  # @param client_event [::Google::Cloud::Talent::V4::ClientEvent, ::Hash]
179
- # Required. Events issued when end user interacts with customer's application that
180
- # uses Cloud Talent Solution.
179
+ # Required. Events issued when end user interacts with customer's application
180
+ # that uses Cloud Talent Solution.
181
181
  #
182
182
  # @yield [response, operation] Access the result along with the RPC operation
183
183
  # @yieldparam response [::Google::Cloud::Talent::V4::ClientEvent]