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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +18 -6
- data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +1220 -0
- data/lib/google/cloud/retail/v2/catalog_service/rest/service_stub.rb +704 -0
- data/lib/google/cloud/retail/v2/catalog_service/rest.rb +52 -0
- data/lib/google/cloud/retail/v2/catalog_service.rb +6 -0
- data/lib/google/cloud/retail/v2/completion_service/client.rb +18 -4
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +12 -14
- data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +533 -0
- data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +828 -0
- data/lib/google/cloud/retail/v2/completion_service/rest/service_stub.rb +167 -0
- data/lib/google/cloud/retail/v2/completion_service/rest.rb +56 -0
- data/lib/google/cloud/retail/v2/completion_service.rb +6 -0
- data/lib/google/cloud/retail/v2/control_service/client.rb +18 -6
- data/lib/google/cloud/retail/v2/control_service/rest/client.rb +680 -0
- data/lib/google/cloud/retail/v2/control_service/rest/service_stub.rb +345 -0
- data/lib/google/cloud/retail/v2/control_service/rest.rb +52 -0
- data/lib/google/cloud/retail/v2/control_service.rb +6 -0
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +14 -0
- data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +486 -0
- data/lib/google/cloud/retail/v2/prediction_service/rest/service_stub.rb +116 -0
- data/lib/google/cloud/retail/v2/prediction_service/rest.rb +52 -0
- data/lib/google/cloud/retail/v2/prediction_service.rb +6 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +42 -30
- data/lib/google/cloud/retail/v2/product_service/operations.rb +12 -14
- data/lib/google/cloud/retail/v2/product_service/rest/client.rb +1649 -0
- data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +828 -0
- data/lib/google/cloud/retail/v2/product_service/rest/service_stub.rb +705 -0
- data/lib/google/cloud/retail/v2/product_service/rest.rb +54 -0
- data/lib/google/cloud/retail/v2/product_service.rb +6 -0
- data/lib/google/cloud/retail/v2/rest.rb +44 -0
- data/lib/google/cloud/retail/v2/search_service/client.rb +18 -6
- data/lib/google/cloud/retail/v2/search_service/rest/client.rb +598 -0
- data/lib/google/cloud/retail/v2/search_service/rest/service_stub.rb +116 -0
- data/lib/google/cloud/retail/v2/search_service/rest.rb +55 -0
- data/lib/google/cloud/retail/v2/search_service.rb +6 -0
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +18 -6
- data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +825 -0
- data/lib/google/cloud/retail/v2/serving_config_service/rest/service_stub.rb +465 -0
- data/lib/google/cloud/retail/v2/serving_config_service/rest.rb +52 -0
- data/lib/google/cloud/retail/v2/serving_config_service.rb +6 -0
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +26 -12
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +12 -14
- data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +755 -0
- data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +828 -0
- data/lib/google/cloud/retail/v2/user_event_service/rest/service_stub.rb +347 -0
- data/lib/google/cloud/retail/v2/user_event_service/rest.rb +53 -0
- data/lib/google/cloud/retail/v2/user_event_service.rb +6 -0
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/lib/google/cloud/retail/v2.rb +5 -0
- metadata +58 -8
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/retail/v2/product_service_pb"
|
21
|
+
require "google/cloud/location"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -150,6 +151,12 @@ module Google
|
|
150
151
|
config.endpoint = @config.endpoint
|
151
152
|
end
|
152
153
|
|
154
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
155
|
+
config.credentials = credentials
|
156
|
+
config.quota_project = @quota_project_id
|
157
|
+
config.endpoint = @config.endpoint
|
158
|
+
end
|
159
|
+
|
153
160
|
@product_service_stub = ::Gapic::ServiceStub.new(
|
154
161
|
::Google::Cloud::Retail::V2::ProductService::Stub,
|
155
162
|
credentials: credentials,
|
@@ -166,6 +173,13 @@ module Google
|
|
166
173
|
#
|
167
174
|
attr_reader :operations_client
|
168
175
|
|
176
|
+
##
|
177
|
+
# Get the associated client for mix-in of the Locations.
|
178
|
+
#
|
179
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
180
|
+
#
|
181
|
+
attr_reader :location_client
|
182
|
+
|
169
183
|
# Service calls
|
170
184
|
|
171
185
|
##
|
@@ -478,13 +492,11 @@ module Google
|
|
478
492
|
# # Call the list_products method.
|
479
493
|
# result = client.list_products request
|
480
494
|
#
|
481
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
482
|
-
# #
|
483
|
-
#
|
484
|
-
# # methods are also available for managing paging directly.
|
485
|
-
# result.each do |response|
|
495
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
496
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
497
|
+
# result.each do |item|
|
486
498
|
# # Each element is of type ::Google::Cloud::Retail::V2::Product.
|
487
|
-
# p
|
499
|
+
# p item
|
488
500
|
# end
|
489
501
|
#
|
490
502
|
def list_products request, options = nil
|
@@ -821,14 +833,14 @@ module Google
|
|
821
833
|
# # Call the import_products method.
|
822
834
|
# result = client.import_products request
|
823
835
|
#
|
824
|
-
# # The returned object is of type Gapic::Operation. You can use
|
825
|
-
# #
|
826
|
-
# #
|
836
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
837
|
+
# # check the status of an operation, cancel it, or wait for results.
|
838
|
+
# # Here is how to wait for a response.
|
827
839
|
# result.wait_until_done! timeout: 60
|
828
840
|
# if result.response?
|
829
841
|
# p result.response
|
830
842
|
# else
|
831
|
-
# puts "
|
843
|
+
# puts "No response received."
|
832
844
|
# end
|
833
845
|
#
|
834
846
|
def import_products request, options = nil
|
@@ -1041,14 +1053,14 @@ module Google
|
|
1041
1053
|
# # Call the set_inventory method.
|
1042
1054
|
# result = client.set_inventory request
|
1043
1055
|
#
|
1044
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1045
|
-
# #
|
1046
|
-
# #
|
1056
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1057
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1058
|
+
# # Here is how to wait for a response.
|
1047
1059
|
# result.wait_until_done! timeout: 60
|
1048
1060
|
# if result.response?
|
1049
1061
|
# p result.response
|
1050
1062
|
# else
|
1051
|
-
# puts "
|
1063
|
+
# puts "No response received."
|
1052
1064
|
# end
|
1053
1065
|
#
|
1054
1066
|
def set_inventory request, options = nil
|
@@ -1211,14 +1223,14 @@ module Google
|
|
1211
1223
|
# # Call the add_fulfillment_places method.
|
1212
1224
|
# result = client.add_fulfillment_places request
|
1213
1225
|
#
|
1214
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1215
|
-
# #
|
1216
|
-
# #
|
1226
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1227
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1228
|
+
# # Here is how to wait for a response.
|
1217
1229
|
# result.wait_until_done! timeout: 60
|
1218
1230
|
# if result.response?
|
1219
1231
|
# p result.response
|
1220
1232
|
# else
|
1221
|
-
# puts "
|
1233
|
+
# puts "No response received."
|
1222
1234
|
# end
|
1223
1235
|
#
|
1224
1236
|
def add_fulfillment_places request, options = nil
|
@@ -1376,14 +1388,14 @@ module Google
|
|
1376
1388
|
# # Call the remove_fulfillment_places method.
|
1377
1389
|
# result = client.remove_fulfillment_places request
|
1378
1390
|
#
|
1379
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1380
|
-
# #
|
1381
|
-
# #
|
1391
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1392
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1393
|
+
# # Here is how to wait for a response.
|
1382
1394
|
# result.wait_until_done! timeout: 60
|
1383
1395
|
# if result.response?
|
1384
1396
|
# p result.response
|
1385
1397
|
# else
|
1386
|
-
# puts "
|
1398
|
+
# puts "No response received."
|
1387
1399
|
# end
|
1388
1400
|
#
|
1389
1401
|
def remove_fulfillment_places request, options = nil
|
@@ -1535,14 +1547,14 @@ module Google
|
|
1535
1547
|
# # Call the add_local_inventories method.
|
1536
1548
|
# result = client.add_local_inventories request
|
1537
1549
|
#
|
1538
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1539
|
-
# #
|
1540
|
-
# #
|
1550
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1551
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1552
|
+
# # Here is how to wait for a response.
|
1541
1553
|
# result.wait_until_done! timeout: 60
|
1542
1554
|
# if result.response?
|
1543
1555
|
# p result.response
|
1544
1556
|
# else
|
1545
|
-
# puts "
|
1557
|
+
# puts "No response received."
|
1546
1558
|
# end
|
1547
1559
|
#
|
1548
1560
|
def add_local_inventories request, options = nil
|
@@ -1676,14 +1688,14 @@ module Google
|
|
1676
1688
|
# # Call the remove_local_inventories method.
|
1677
1689
|
# result = client.remove_local_inventories request
|
1678
1690
|
#
|
1679
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1680
|
-
# #
|
1681
|
-
# #
|
1691
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1692
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1693
|
+
# # Here is how to wait for a response.
|
1682
1694
|
# result.wait_until_done! timeout: 60
|
1683
1695
|
# if result.response?
|
1684
1696
|
# p result.response
|
1685
1697
|
# else
|
1686
|
-
# puts "
|
1698
|
+
# puts "No response received."
|
1687
1699
|
# end
|
1688
1700
|
#
|
1689
1701
|
def remove_local_inventories 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
|
-
# #
|
163
|
-
#
|
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
|
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
|
257
|
-
# #
|
258
|
-
# #
|
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 "
|
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
|
544
|
-
# #
|
545
|
-
# #
|
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 "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|