google-cloud-retail-v2 0.12.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/retail/v2/catalog_service/client.rb +18 -6
  4. data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +1220 -0
  5. data/lib/google/cloud/retail/v2/catalog_service/rest/service_stub.rb +704 -0
  6. data/lib/google/cloud/retail/v2/catalog_service/rest.rb +52 -0
  7. data/lib/google/cloud/retail/v2/catalog_service.rb +6 -0
  8. data/lib/google/cloud/retail/v2/completion_service/client.rb +18 -4
  9. data/lib/google/cloud/retail/v2/completion_service/operations.rb +12 -14
  10. data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +533 -0
  11. data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +828 -0
  12. data/lib/google/cloud/retail/v2/completion_service/rest/service_stub.rb +167 -0
  13. data/lib/google/cloud/retail/v2/completion_service/rest.rb +56 -0
  14. data/lib/google/cloud/retail/v2/completion_service.rb +6 -0
  15. data/lib/google/cloud/retail/v2/control_service/client.rb +18 -6
  16. data/lib/google/cloud/retail/v2/control_service/rest/client.rb +680 -0
  17. data/lib/google/cloud/retail/v2/control_service/rest/service_stub.rb +345 -0
  18. data/lib/google/cloud/retail/v2/control_service/rest.rb +52 -0
  19. data/lib/google/cloud/retail/v2/control_service.rb +6 -0
  20. data/lib/google/cloud/retail/v2/prediction_service/client.rb +14 -0
  21. data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +486 -0
  22. data/lib/google/cloud/retail/v2/prediction_service/rest/service_stub.rb +116 -0
  23. data/lib/google/cloud/retail/v2/prediction_service/rest.rb +52 -0
  24. data/lib/google/cloud/retail/v2/prediction_service.rb +6 -0
  25. data/lib/google/cloud/retail/v2/product_service/client.rb +42 -30
  26. data/lib/google/cloud/retail/v2/product_service/operations.rb +12 -14
  27. data/lib/google/cloud/retail/v2/product_service/rest/client.rb +1649 -0
  28. data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +828 -0
  29. data/lib/google/cloud/retail/v2/product_service/rest/service_stub.rb +705 -0
  30. data/lib/google/cloud/retail/v2/product_service/rest.rb +54 -0
  31. data/lib/google/cloud/retail/v2/product_service.rb +6 -0
  32. data/lib/google/cloud/retail/v2/rest.rb +44 -0
  33. data/lib/google/cloud/retail/v2/search_service/client.rb +18 -6
  34. data/lib/google/cloud/retail/v2/search_service/rest/client.rb +598 -0
  35. data/lib/google/cloud/retail/v2/search_service/rest/service_stub.rb +116 -0
  36. data/lib/google/cloud/retail/v2/search_service/rest.rb +55 -0
  37. data/lib/google/cloud/retail/v2/search_service.rb +6 -0
  38. data/lib/google/cloud/retail/v2/serving_config_service/client.rb +18 -6
  39. data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +825 -0
  40. data/lib/google/cloud/retail/v2/serving_config_service/rest/service_stub.rb +465 -0
  41. data/lib/google/cloud/retail/v2/serving_config_service/rest.rb +52 -0
  42. data/lib/google/cloud/retail/v2/serving_config_service.rb +6 -0
  43. data/lib/google/cloud/retail/v2/user_event_service/client.rb +26 -12
  44. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +12 -14
  45. data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +755 -0
  46. data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +828 -0
  47. data/lib/google/cloud/retail/v2/user_event_service/rest/service_stub.rb +347 -0
  48. data/lib/google/cloud/retail/v2/user_event_service/rest.rb +53 -0
  49. data/lib/google/cloud/retail/v2/user_event_service.rb +6 -0
  50. data/lib/google/cloud/retail/v2/version.rb +1 -1
  51. data/lib/google/cloud/retail/v2.rb +5 -0
  52. metadata +58 -8
@@ -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/retail/v2/version"
24
+
25
+ require "google/cloud/retail/v2/catalog_service/credentials"
26
+ require "google/cloud/retail/v2/catalog_service/paths"
27
+ require "google/cloud/retail/v2/catalog_service/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Retail
32
+ module V2
33
+ ##
34
+ # Service for managing catalog configuration.
35
+ #
36
+ # To load this service and instantiate a REST client:
37
+ #
38
+ # require "google/cloud/retail/v2/catalog_service/rest"
39
+ # client = ::Google::Cloud::Retail::V2::CatalogService::Rest::Client.new
40
+ #
41
+ module CatalogService
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/retail/v2/catalog_service/rest/helpers" if ::File.file? helper_path
@@ -25,6 +25,7 @@ require "google/cloud/retail/v2/version"
25
25
  require "google/cloud/retail/v2/catalog_service/credentials"
26
26
  require "google/cloud/retail/v2/catalog_service/paths"
27
27
  require "google/cloud/retail/v2/catalog_service/client"
28
+ require "google/cloud/retail/v2/catalog_service/rest"
28
29
 
29
30
  module Google
30
31
  module Cloud
@@ -38,6 +39,11 @@ module Google
38
39
  # require "google/cloud/retail/v2/catalog_service"
39
40
  # client = ::Google::Cloud::Retail::V2::CatalogService::Client.new
40
41
  #
42
+ # @example Load this service and instantiate a REST client
43
+ #
44
+ # require "google/cloud/retail/v2/catalog_service/rest"
45
+ # client = ::Google::Cloud::Retail::V2::CatalogService::Rest::Client.new
46
+ #
41
47
  module CatalogService
42
48
  end
43
49
  end
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/retail/v2/completion_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -147,6 +148,12 @@ module Google
147
148
  config.endpoint = @config.endpoint
148
149
  end
149
150
 
151
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
152
+ config.credentials = credentials
153
+ config.quota_project = @quota_project_id
154
+ config.endpoint = @config.endpoint
155
+ end
156
+
150
157
  @completion_service_stub = ::Gapic::ServiceStub.new(
151
158
  ::Google::Cloud::Retail::V2::CompletionService::Stub,
152
159
  credentials: credentials,
@@ -163,6 +170,13 @@ module Google
163
170
  #
164
171
  attr_reader :operations_client
165
172
 
173
+ ##
174
+ # Get the associated client for mix-in of the Locations.
175
+ #
176
+ # @return [Google::Cloud::Location::Locations::Client]
177
+ #
178
+ attr_reader :location_client
179
+
166
180
  # Service calls
167
181
 
168
182
  ##
@@ -375,14 +389,14 @@ module Google
375
389
  # # Call the import_completion_data method.
376
390
  # result = client.import_completion_data request
377
391
  #
378
- # # The returned object is of type Gapic::Operation. You can use this
379
- # # object to check the status of an operation, cancel it, or wait
380
- # # for results. Here is how to block until completion:
392
+ # # The returned object is of type Gapic::Operation. You can use it to
393
+ # # check the status of an operation, cancel it, or wait for results.
394
+ # # Here is how to wait for a response.
381
395
  # result.wait_until_done! timeout: 60
382
396
  # if result.response?
383
397
  # p result.response
384
398
  # else
385
- # puts "Error!"
399
+ # puts "No response received."
386
400
  # end
387
401
  #
388
402
  def import_completion_data request, options = nil
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil