google-cloud-retail-v2 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4df763185ea268c1b76c5bd40fbf66332d5deefae96183fede94683c06f7eea
4
- data.tar.gz: 1ade5fffb7896518d8ef4411b3ba02ae8225d91002ce0e59d5b340fe2cde3df5
3
+ metadata.gz: c1e74d74b9ec525b0fe2e515035a9201f0385dc8140b2fa6e26305d9e5aa37ab
4
+ data.tar.gz: 063b0f107d532fe89dbc5f547eec33d12254d5691f0230a955a7e7b2199c4887
5
5
  SHA512:
6
- metadata.gz: 49ef27a2292d149e7fb763b13b07f41fe1bf5af5ebde1dbcfe6ba5cbb01c9586637f05b6fbe30c4b3ba24715dd3a458a573e7a74f63254b2a676f3cbe4233d9e
7
- data.tar.gz: a135a6f28d70aec5096240f03713e65c35d5ca92022ccadd142ac7cf1e90b04b659141b32b342f79b5633406b517afb064f68db0978422d982f06a964a7e2973
6
+ metadata.gz: 52ce66cf0b37660e8757b147f460719f71c5e3d6164fdda364938995ffdc4c693c39fa0e25fcebc0a212004dbd0ce30efa13741faf14ed2d575b4a5bd75c5e47
7
+ data.tar.gz: 19dbd91993a130ee49808962546d87c98dd81f76c70f2e9024329c2fa41c284c796fa10eee0282883c4f23a37b5a07fae064f6dd86a1acef18dd907d17bb3d6a
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/retail/v2/catalog_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -138,6 +139,12 @@ module Google
138
139
  @quota_project_id = @config.quota_project
139
140
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
140
141
 
142
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
143
+ config.credentials = credentials
144
+ config.quota_project = @quota_project_id
145
+ config.endpoint = @config.endpoint
146
+ end
147
+
141
148
  @catalog_service_stub = ::Gapic::ServiceStub.new(
142
149
  ::Google::Cloud::Retail::V2::CatalogService::Stub,
143
150
  credentials: credentials,
@@ -147,6 +154,13 @@ module Google
147
154
  )
148
155
  end
149
156
 
157
+ ##
158
+ # Get the associated client for mix-in of the Locations.
159
+ #
160
+ # @return [Google::Cloud::Location::Locations::Client]
161
+ #
162
+ attr_reader :location_client
163
+
150
164
  # Service calls
151
165
 
152
166
  ##
@@ -213,13 +227,11 @@ module Google
213
227
  # # Call the list_catalogs method.
214
228
  # result = client.list_catalogs request
215
229
  #
216
- # # The returned object is of type Gapic::PagedEnumerable. You can
217
- # # iterate over all elements by calling #each, and the enumerable
218
- # # will lazily make API calls to fetch subsequent pages. Other
219
- # # methods are also available for managing paging directly.
220
- # result.each do |response|
230
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
231
+ # # over elements, and API calls will be issued to fetch pages as needed.
232
+ # result.each do |item|
221
233
  # # Each element is of type ::Google::Cloud::Retail::V2::Catalog.
222
- # p response
234
+ # p item
223
235
  # end
224
236
  #
225
237
  def list_catalogs request, options = nil
@@ -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
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/retail/v2/control_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -133,6 +134,12 @@ module Google
133
134
  @quota_project_id = @config.quota_project
134
135
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
135
136
 
137
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
138
+ config.credentials = credentials
139
+ config.quota_project = @quota_project_id
140
+ config.endpoint = @config.endpoint
141
+ end
142
+
136
143
  @control_service_stub = ::Gapic::ServiceStub.new(
137
144
  ::Google::Cloud::Retail::V2::ControlService::Stub,
138
145
  credentials: credentials,
@@ -142,6 +149,13 @@ module Google
142
149
  )
143
150
  end
144
151
 
152
+ ##
153
+ # Get the associated client for mix-in of the Locations.
154
+ #
155
+ # @return [Google::Cloud::Location::Locations::Client]
156
+ #
157
+ attr_reader :location_client
158
+
145
159
  # Service calls
146
160
 
147
161
  ##
@@ -570,13 +584,11 @@ module Google
570
584
  # # Call the list_controls method.
571
585
  # result = client.list_controls request
572
586
  #
573
- # # The returned object is of type Gapic::PagedEnumerable. You can
574
- # # iterate over all elements by calling #each, and the enumerable
575
- # # will lazily make API calls to fetch subsequent pages. Other
576
- # # methods are also available for managing paging directly.
577
- # result.each do |response|
587
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
588
+ # # over elements, and API calls will be issued to fetch pages as needed.
589
+ # result.each do |item|
578
590
  # # Each element is of type ::Google::Cloud::Retail::V2::Control.
579
- # p response
591
+ # p item
580
592
  # end
581
593
  #
582
594
  def list_controls request, options = nil
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/retail/v2/prediction_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -138,6 +139,12 @@ module Google
138
139
  @quota_project_id = @config.quota_project
139
140
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
140
141
 
142
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
143
+ config.credentials = credentials
144
+ config.quota_project = @quota_project_id
145
+ config.endpoint = @config.endpoint
146
+ end
147
+
141
148
  @prediction_service_stub = ::Gapic::ServiceStub.new(
142
149
  ::Google::Cloud::Retail::V2::PredictionService::Stub,
143
150
  credentials: credentials,
@@ -147,6 +154,13 @@ module Google
147
154
  )
148
155
  end
149
156
 
157
+ ##
158
+ # Get the associated client for mix-in of the Locations.
159
+ #
160
+ # @return [Google::Cloud::Location::Locations::Client]
161
+ #
162
+ attr_reader :location_client
163
+
150
164
  # Service calls
151
165
 
152
166
  ##
@@ -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
- # # iterate over all elements by calling #each, and the enumerable
483
- # # will lazily make API calls to fetch subsequent pages. Other
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 response
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 this
825
- # # object to check the status of an operation, cancel it, or wait
826
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
1045
- # # object to check the status of an operation, cancel it, or wait
1046
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
1215
- # # object to check the status of an operation, cancel it, or wait
1216
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
1380
- # # object to check the status of an operation, cancel it, or wait
1381
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
1539
- # # object to check the status of an operation, cancel it, or wait
1540
- # # for results. Here is how to block until completion:
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 "Error!"
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 this
1680
- # # object to check the status of an operation, cancel it, or wait
1681
- # # for results. Here is how to block until completion:
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 "Error!"
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
- # # 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
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/retail/v2/search_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -141,6 +142,12 @@ module Google
141
142
  @quota_project_id = @config.quota_project
142
143
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
143
144
 
145
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
146
+ config.credentials = credentials
147
+ config.quota_project = @quota_project_id
148
+ config.endpoint = @config.endpoint
149
+ end
150
+
144
151
  @search_service_stub = ::Gapic::ServiceStub.new(
145
152
  ::Google::Cloud::Retail::V2::SearchService::Stub,
146
153
  credentials: credentials,
@@ -150,6 +157,13 @@ module Google
150
157
  )
151
158
  end
152
159
 
160
+ ##
161
+ # Get the associated client for mix-in of the Locations.
162
+ #
163
+ # @return [Google::Cloud::Location::Locations::Client]
164
+ #
165
+ attr_reader :location_client
166
+
153
167
  # Service calls
154
168
 
155
169
  ##
@@ -425,13 +439,11 @@ module Google
425
439
  # # Call the search method.
426
440
  # result = client.search request
427
441
  #
428
- # # The returned object is of type Gapic::PagedEnumerable. You can
429
- # # iterate over all elements by calling #each, and the enumerable
430
- # # will lazily make API calls to fetch subsequent pages. Other
431
- # # methods are also available for managing paging directly.
432
- # result.each do |response|
442
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
443
+ # # over elements, and API calls will be issued to fetch pages as needed.
444
+ # result.each do |item|
433
445
  # # Each element is of type ::Google::Cloud::Retail::V2::SearchResponse::SearchResult.
434
- # p response
446
+ # p item
435
447
  # end
436
448
  #
437
449
  def search request, options = nil
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/retail/v2/serving_config_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -133,6 +134,12 @@ module Google
133
134
  @quota_project_id = @config.quota_project
134
135
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
135
136
 
137
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
138
+ config.credentials = credentials
139
+ config.quota_project = @quota_project_id
140
+ config.endpoint = @config.endpoint
141
+ end
142
+
136
143
  @serving_config_service_stub = ::Gapic::ServiceStub.new(
137
144
  ::Google::Cloud::Retail::V2::ServingConfigService::Stub,
138
145
  credentials: credentials,
@@ -142,6 +149,13 @@ module Google
142
149
  )
143
150
  end
144
151
 
152
+ ##
153
+ # Get the associated client for mix-in of the Locations.
154
+ #
155
+ # @return [Google::Cloud::Location::Locations::Client]
156
+ #
157
+ attr_reader :location_client
158
+
145
159
  # Service calls
146
160
 
147
161
  ##
@@ -560,13 +574,11 @@ module Google
560
574
  # # Call the list_serving_configs method.
561
575
  # result = client.list_serving_configs request
562
576
  #
563
- # # The returned object is of type Gapic::PagedEnumerable. You can
564
- # # iterate over all elements by calling #each, and the enumerable
565
- # # will lazily make API calls to fetch subsequent pages. Other
566
- # # methods are also available for managing paging directly.
567
- # result.each do |response|
577
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
578
+ # # over elements, and API calls will be issued to fetch pages as needed.
579
+ # result.each do |item|
568
580
  # # Each element is of type ::Google::Cloud::Retail::V2::ServingConfig.
569
- # p response
581
+ # p item
570
582
  # end
571
583
  #
572
584
  def list_serving_configs request, options = nil
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/retail/v2/user_event_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -154,6 +155,12 @@ module Google
154
155
  config.endpoint = @config.endpoint
155
156
  end
156
157
 
158
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
159
+ config.credentials = credentials
160
+ config.quota_project = @quota_project_id
161
+ config.endpoint = @config.endpoint
162
+ end
163
+
157
164
  @user_event_service_stub = ::Gapic::ServiceStub.new(
158
165
  ::Google::Cloud::Retail::V2::UserEventService::Stub,
159
166
  credentials: credentials,
@@ -170,6 +177,13 @@ module Google
170
177
  #
171
178
  attr_reader :operations_client
172
179
 
180
+ ##
181
+ # Get the associated client for mix-in of the Locations.
182
+ #
183
+ # @return [Google::Cloud::Location::Locations::Client]
184
+ #
185
+ attr_reader :location_client
186
+
173
187
  # Service calls
174
188
 
175
189
  ##
@@ -449,14 +463,14 @@ module Google
449
463
  # # Call the purge_user_events method.
450
464
  # result = client.purge_user_events request
451
465
  #
452
- # # The returned object is of type Gapic::Operation. You can use this
453
- # # object to check the status of an operation, cancel it, or wait
454
- # # for results. Here is how to block until completion:
466
+ # # The returned object is of type Gapic::Operation. You can use it to
467
+ # # check the status of an operation, cancel it, or wait for results.
468
+ # # Here is how to wait for a response.
455
469
  # result.wait_until_done! timeout: 60
456
470
  # if result.response?
457
471
  # p result.response
458
472
  # else
459
- # puts "Error!"
473
+ # puts "No response received."
460
474
  # end
461
475
  #
462
476
  def purge_user_events request, options = nil
@@ -553,14 +567,14 @@ module Google
553
567
  # # Call the import_user_events method.
554
568
  # result = client.import_user_events request
555
569
  #
556
- # # The returned object is of type Gapic::Operation. You can use this
557
- # # object to check the status of an operation, cancel it, or wait
558
- # # for results. Here is how to block until completion:
570
+ # # The returned object is of type Gapic::Operation. You can use it to
571
+ # # check the status of an operation, cancel it, or wait for results.
572
+ # # Here is how to wait for a response.
559
573
  # result.wait_until_done! timeout: 60
560
574
  # if result.response?
561
575
  # p result.response
562
576
  # else
563
- # puts "Error!"
577
+ # puts "No response received."
564
578
  # end
565
579
  #
566
580
  def import_user_events request, options = nil
@@ -659,14 +673,14 @@ module Google
659
673
  # # Call the rejoin_user_events method.
660
674
  # result = client.rejoin_user_events request
661
675
  #
662
- # # The returned object is of type Gapic::Operation. You can use this
663
- # # object to check the status of an operation, cancel it, or wait
664
- # # for results. Here is how to block until completion:
676
+ # # The returned object is of type Gapic::Operation. You can use it to
677
+ # # check the status of an operation, cancel it, or wait for results.
678
+ # # Here is how to wait for a response.
665
679
  # result.wait_until_done! timeout: 60
666
680
  # if result.response?
667
681
  # p result.response
668
682
  # else
669
- # puts "Error!"
683
+ # puts "No response received."
670
684
  # end
671
685
  #
672
686
  def rejoin_user_events 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
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
- VERSION = "0.12.0"
24
+ VERSION = "0.13.0"
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-retail-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-06 00:00:00.000000000 Z
11
+ date: 2023-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.16.0
19
+ version: 0.17.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.16.0
29
+ version: 0.17.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -44,20 +44,40 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: google-cloud-location
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0.4'
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: 2.a
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0.4'
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: 2.a
47
67
  - !ruby/object:Gem::Dependency
48
68
  name: google-style
49
69
  requirement: !ruby/object:Gem::Requirement
50
70
  requirements:
51
71
  - - "~>"
52
72
  - !ruby/object:Gem::Version
53
- version: 1.26.1
73
+ version: 1.26.3
54
74
  type: :development
55
75
  prerelease: false
56
76
  version_requirements: !ruby/object:Gem::Requirement
57
77
  requirements:
58
78
  - - "~>"
59
79
  - !ruby/object:Gem::Version
60
- version: 1.26.1
80
+ version: 1.26.3
61
81
  - !ruby/object:Gem::Dependency
62
82
  name: minitest
63
83
  requirement: !ruby/object:Gem::Requirement
@@ -285,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
285
305
  - !ruby/object:Gem::Version
286
306
  version: '0'
287
307
  requirements: []
288
- rubygems_version: 3.3.14
308
+ rubygems_version: 3.4.2
289
309
  signing_key:
290
310
  specification_version: 4
291
311
  summary: API Client library for the Retail V2 API