google-cloud-retail-v2 0.6.1 → 0.6.2

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: fa7d4acd45ffcbbead3c8f032ca013431be2688380d06ddeb82eafee320fd872
4
- data.tar.gz: c7ba3e2fab456b2763928e531874a74f6b19aac86261acbd2ecbbd982d53fe11
3
+ metadata.gz: 35215e1d3d5140386a8e08763025e0a07c99c687e1bf1542c6bb4339a7e2655c
4
+ data.tar.gz: b5fb941505e7c27c0caea1a80efe0742a4a3faae2719401e9feae4e2541abc47
5
5
  SHA512:
6
- metadata.gz: d05a2cf36756a96ddcfb48fa6d684f4c71a555676e5f525d0104150c4a838e16b7b62f0d5e2bca6579c32a81c0c18b56a9a612825f8f9af03a141a1cc0093b59
7
- data.tar.gz: 15033447d9a4bd67e8fa849a5ef2d23d4d25ceee77e3e81df82fcccd07376ab3fdae97acc3ddb603abb4f964f8b5a37fa5b7f3a6e20eb4161d218c2b37f61a28
6
+ metadata.gz: fda3f7dcb3d866875e857ca6cf01407a67e470a6f37667f78f658da607b3f1ffd774a34adaee1b18ef16f3384a5ce49625ec410b487cc473aa2e1df2771f7be0
7
+ data.tar.gz: 843c7d75995780b23316185e421aec2f11b782eed90300db75f32a68e1198e02df254602014e7cea773bdc110730b0248d7b00d7b5fd8ecc89f9737ec236388c
@@ -201,6 +201,27 @@ module Google
201
201
  #
202
202
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
203
203
  #
204
+ # @example Basic example
205
+ # require "google/cloud/retail/v2"
206
+ #
207
+ # # Create a client object. The client can be reused for multiple calls.
208
+ # client = Google::Cloud::Retail::V2::CatalogService::Client.new
209
+ #
210
+ # # Create a request. To set request fields, pass in keyword arguments.
211
+ # request = Google::Cloud::Retail::V2::ListCatalogsRequest.new
212
+ #
213
+ # # Call the list_catalogs method.
214
+ # result = client.list_catalogs request
215
+ #
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|
221
+ # # Each element is of type ::Google::Cloud::Retail::V2::Catalog.
222
+ # p response
223
+ # end
224
+ #
204
225
  def list_catalogs request, options = nil
205
226
  raise ::ArgumentError, "request must be provided" if request.nil?
206
227
 
@@ -285,6 +306,21 @@ module Google
285
306
  #
286
307
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
287
308
  #
309
+ # @example Basic example
310
+ # require "google/cloud/retail/v2"
311
+ #
312
+ # # Create a client object. The client can be reused for multiple calls.
313
+ # client = Google::Cloud::Retail::V2::CatalogService::Client.new
314
+ #
315
+ # # Create a request. To set request fields, pass in keyword arguments.
316
+ # request = Google::Cloud::Retail::V2::UpdateCatalogRequest.new
317
+ #
318
+ # # Call the update_catalog method.
319
+ # result = client.update_catalog request
320
+ #
321
+ # # The returned object is of type Google::Cloud::Retail::V2::Catalog.
322
+ # p result
323
+ #
288
324
  def update_catalog request, options = nil
289
325
  raise ::ArgumentError, "request must be provided" if request.nil?
290
326
 
@@ -404,6 +440,21 @@ module Google
404
440
  #
405
441
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
406
442
  #
443
+ # @example Basic example
444
+ # require "google/cloud/retail/v2"
445
+ #
446
+ # # Create a client object. The client can be reused for multiple calls.
447
+ # client = Google::Cloud::Retail::V2::CatalogService::Client.new
448
+ #
449
+ # # Create a request. To set request fields, pass in keyword arguments.
450
+ # request = Google::Cloud::Retail::V2::SetDefaultBranchRequest.new
451
+ #
452
+ # # Call the set_default_branch method.
453
+ # result = client.set_default_branch request
454
+ #
455
+ # # The returned object is of type Google::Protobuf::Empty.
456
+ # p result
457
+ #
407
458
  def set_default_branch request, options = nil
408
459
  raise ::ArgumentError, "request must be provided" if request.nil?
409
460
 
@@ -481,6 +532,21 @@ module Google
481
532
  #
482
533
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
483
534
  #
535
+ # @example Basic example
536
+ # require "google/cloud/retail/v2"
537
+ #
538
+ # # Create a client object. The client can be reused for multiple calls.
539
+ # client = Google::Cloud::Retail::V2::CatalogService::Client.new
540
+ #
541
+ # # Create a request. To set request fields, pass in keyword arguments.
542
+ # request = Google::Cloud::Retail::V2::GetDefaultBranchRequest.new
543
+ #
544
+ # # Call the get_default_branch method.
545
+ # result = client.get_default_branch request
546
+ #
547
+ # # The returned object is of type Google::Cloud::Retail::V2::GetDefaultBranchResponse.
548
+ # p result
549
+ #
484
550
  def get_default_branch request, options = nil
485
551
  raise ::ArgumentError, "request must be provided" if request.nil?
486
552
 
@@ -256,6 +256,21 @@ module Google
256
256
  #
257
257
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
258
258
  #
259
+ # @example Basic example
260
+ # require "google/cloud/retail/v2"
261
+ #
262
+ # # Create a client object. The client can be reused for multiple calls.
263
+ # client = Google::Cloud::Retail::V2::CompletionService::Client.new
264
+ #
265
+ # # Create a request. To set request fields, pass in keyword arguments.
266
+ # request = Google::Cloud::Retail::V2::CompleteQueryRequest.new
267
+ #
268
+ # # Call the complete_query method.
269
+ # result = client.complete_query request
270
+ #
271
+ # # The returned object is of type Google::Cloud::Retail::V2::CompleteQueryResponse.
272
+ # p result
273
+ #
259
274
  def complete_query request, options = nil
260
275
  raise ::ArgumentError, "request must be provided" if request.nil?
261
276
 
@@ -342,6 +357,28 @@ module Google
342
357
  #
343
358
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
344
359
  #
360
+ # @example Basic example
361
+ # require "google/cloud/retail/v2"
362
+ #
363
+ # # Create a client object. The client can be reused for multiple calls.
364
+ # client = Google::Cloud::Retail::V2::CompletionService::Client.new
365
+ #
366
+ # # Create a request. To set request fields, pass in keyword arguments.
367
+ # request = Google::Cloud::Retail::V2::ImportCompletionDataRequest.new
368
+ #
369
+ # # Call the import_completion_data method.
370
+ # result = client.import_completion_data request
371
+ #
372
+ # # The returned object is of type Gapic::Operation. You can use this
373
+ # # object to check the status of an operation, cancel it, or wait
374
+ # # for results. Here is how to block until completion:
375
+ # result.wait_until_done! timeout: 60
376
+ # if result.response?
377
+ # p result.response
378
+ # else
379
+ # puts "Error!"
380
+ # end
381
+ #
345
382
  def import_completion_data request, options = nil
346
383
  raise ::ArgumentError, "request must be provided" if request.nil?
347
384
 
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -217,6 +238,28 @@ module Google
217
238
  #
218
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
219
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
220
263
  def get_operation request, options = nil
221
264
  raise ::ArgumentError, "request must be provided" if request.nil?
222
265
 
@@ -291,6 +334,21 @@ module Google
291
334
  #
292
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
293
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
294
352
  def delete_operation request, options = nil
295
353
  raise ::ArgumentError, "request must be provided" if request.nil?
296
354
 
@@ -370,6 +428,21 @@ module Google
370
428
  #
371
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
372
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
373
446
  def cancel_operation request, options = nil
374
447
  raise ::ArgumentError, "request must be provided" if request.nil?
375
448
 
@@ -452,6 +525,28 @@ module Google
452
525
  #
453
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
454
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
455
550
  def wait_operation request, options = nil
456
551
  raise ::ArgumentError, "request must be provided" if request.nil?
457
552
 
@@ -274,6 +274,21 @@ module Google
274
274
  #
275
275
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
276
276
  #
277
+ # @example Basic example
278
+ # require "google/cloud/retail/v2"
279
+ #
280
+ # # Create a client object. The client can be reused for multiple calls.
281
+ # client = Google::Cloud::Retail::V2::PredictionService::Client.new
282
+ #
283
+ # # Create a request. To set request fields, pass in keyword arguments.
284
+ # request = Google::Cloud::Retail::V2::PredictRequest.new
285
+ #
286
+ # # Call the predict method.
287
+ # result = client.predict request
288
+ #
289
+ # # The returned object is of type Google::Cloud::Retail::V2::PredictResponse.
290
+ # p result
291
+ #
277
292
  def predict request, options = nil
278
293
  raise ::ArgumentError, "request must be provided" if request.nil?
279
294
 
@@ -215,6 +215,21 @@ module Google
215
215
  #
216
216
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
217
  #
218
+ # @example Basic example
219
+ # require "google/cloud/retail/v2"
220
+ #
221
+ # # Create a client object. The client can be reused for multiple calls.
222
+ # client = Google::Cloud::Retail::V2::ProductService::Client.new
223
+ #
224
+ # # Create a request. To set request fields, pass in keyword arguments.
225
+ # request = Google::Cloud::Retail::V2::CreateProductRequest.new
226
+ #
227
+ # # Call the create_product method.
228
+ # result = client.create_product request
229
+ #
230
+ # # The returned object is of type Google::Cloud::Retail::V2::Product.
231
+ # p result
232
+ #
218
233
  def create_product request, options = nil
219
234
  raise ::ArgumentError, "request must be provided" if request.nil?
220
235
 
@@ -294,6 +309,21 @@ module Google
294
309
  #
295
310
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
296
311
  #
312
+ # @example Basic example
313
+ # require "google/cloud/retail/v2"
314
+ #
315
+ # # Create a client object. The client can be reused for multiple calls.
316
+ # client = Google::Cloud::Retail::V2::ProductService::Client.new
317
+ #
318
+ # # Create a request. To set request fields, pass in keyword arguments.
319
+ # request = Google::Cloud::Retail::V2::GetProductRequest.new
320
+ #
321
+ # # Call the get_product method.
322
+ # result = client.get_product request
323
+ #
324
+ # # The returned object is of type Google::Cloud::Retail::V2::Product.
325
+ # p result
326
+ #
297
327
  def get_product request, options = nil
298
328
  raise ::ArgumentError, "request must be provided" if request.nil?
299
329
 
@@ -435,6 +465,27 @@ module Google
435
465
  #
436
466
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
437
467
  #
468
+ # @example Basic example
469
+ # require "google/cloud/retail/v2"
470
+ #
471
+ # # Create a client object. The client can be reused for multiple calls.
472
+ # client = Google::Cloud::Retail::V2::ProductService::Client.new
473
+ #
474
+ # # Create a request. To set request fields, pass in keyword arguments.
475
+ # request = Google::Cloud::Retail::V2::ListProductsRequest.new
476
+ #
477
+ # # Call the list_products method.
478
+ # result = client.list_products request
479
+ #
480
+ # # The returned object is of type Gapic::PagedEnumerable. You can
481
+ # # iterate over all elements by calling #each, and the enumerable
482
+ # # will lazily make API calls to fetch subsequent pages. Other
483
+ # # methods are also available for managing paging directly.
484
+ # result.each do |response|
485
+ # # Each element is of type ::Google::Cloud::Retail::V2::Product.
486
+ # p response
487
+ # end
488
+ #
438
489
  def list_products request, options = nil
439
490
  raise ::ArgumentError, "request must be provided" if request.nil?
440
491
 
@@ -527,6 +578,21 @@ module Google
527
578
  #
528
579
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
529
580
  #
581
+ # @example Basic example
582
+ # require "google/cloud/retail/v2"
583
+ #
584
+ # # Create a client object. The client can be reused for multiple calls.
585
+ # client = Google::Cloud::Retail::V2::ProductService::Client.new
586
+ #
587
+ # # Create a request. To set request fields, pass in keyword arguments.
588
+ # request = Google::Cloud::Retail::V2::UpdateProductRequest.new
589
+ #
590
+ # # Call the update_product method.
591
+ # result = client.update_product request
592
+ #
593
+ # # The returned object is of type Google::Cloud::Retail::V2::Product.
594
+ # p result
595
+ #
530
596
  def update_product request, options = nil
531
597
  raise ::ArgumentError, "request must be provided" if request.nil?
532
598
 
@@ -617,6 +683,21 @@ module Google
617
683
  #
618
684
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
619
685
  #
686
+ # @example Basic example
687
+ # require "google/cloud/retail/v2"
688
+ #
689
+ # # Create a client object. The client can be reused for multiple calls.
690
+ # client = Google::Cloud::Retail::V2::ProductService::Client.new
691
+ #
692
+ # # Create a request. To set request fields, pass in keyword arguments.
693
+ # request = Google::Cloud::Retail::V2::DeleteProductRequest.new
694
+ #
695
+ # # Call the delete_product method.
696
+ # result = client.delete_product request
697
+ #
698
+ # # The returned object is of type Google::Protobuf::Empty.
699
+ # p result
700
+ #
620
701
  def delete_product request, options = nil
621
702
  raise ::ArgumentError, "request must be provided" if request.nil?
622
703
 
@@ -728,6 +809,28 @@ module Google
728
809
  #
729
810
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
730
811
  #
812
+ # @example Basic example
813
+ # require "google/cloud/retail/v2"
814
+ #
815
+ # # Create a client object. The client can be reused for multiple calls.
816
+ # client = Google::Cloud::Retail::V2::ProductService::Client.new
817
+ #
818
+ # # Create a request. To set request fields, pass in keyword arguments.
819
+ # request = Google::Cloud::Retail::V2::ImportProductsRequest.new
820
+ #
821
+ # # Call the import_products method.
822
+ # result = client.import_products request
823
+ #
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:
827
+ # result.wait_until_done! timeout: 60
828
+ # if result.response?
829
+ # p result.response
830
+ # else
831
+ # puts "Error!"
832
+ # end
833
+ #
731
834
  def import_products request, options = nil
732
835
  raise ::ArgumentError, "request must be provided" if request.nil?
733
836
 
@@ -890,6 +993,28 @@ module Google
890
993
  #
891
994
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
892
995
  #
996
+ # @example Basic example
997
+ # require "google/cloud/retail/v2"
998
+ #
999
+ # # Create a client object. The client can be reused for multiple calls.
1000
+ # client = Google::Cloud::Retail::V2::ProductService::Client.new
1001
+ #
1002
+ # # Create a request. To set request fields, pass in keyword arguments.
1003
+ # request = Google::Cloud::Retail::V2::SetInventoryRequest.new
1004
+ #
1005
+ # # Call the set_inventory method.
1006
+ # result = client.set_inventory request
1007
+ #
1008
+ # # The returned object is of type Gapic::Operation. You can use this
1009
+ # # object to check the status of an operation, cancel it, or wait
1010
+ # # for results. Here is how to block until completion:
1011
+ # result.wait_until_done! timeout: 60
1012
+ # if result.response?
1013
+ # p result.response
1014
+ # else
1015
+ # puts "Error!"
1016
+ # end
1017
+ #
893
1018
  def set_inventory request, options = nil
894
1019
  raise ::ArgumentError, "request must be provided" if request.nil?
895
1020
 
@@ -1028,6 +1153,28 @@ module Google
1028
1153
  #
1029
1154
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1030
1155
  #
1156
+ # @example Basic example
1157
+ # require "google/cloud/retail/v2"
1158
+ #
1159
+ # # Create a client object. The client can be reused for multiple calls.
1160
+ # client = Google::Cloud::Retail::V2::ProductService::Client.new
1161
+ #
1162
+ # # Create a request. To set request fields, pass in keyword arguments.
1163
+ # request = Google::Cloud::Retail::V2::AddFulfillmentPlacesRequest.new
1164
+ #
1165
+ # # Call the add_fulfillment_places method.
1166
+ # result = client.add_fulfillment_places request
1167
+ #
1168
+ # # The returned object is of type Gapic::Operation. You can use this
1169
+ # # object to check the status of an operation, cancel it, or wait
1170
+ # # for results. Here is how to block until completion:
1171
+ # result.wait_until_done! timeout: 60
1172
+ # if result.response?
1173
+ # p result.response
1174
+ # else
1175
+ # puts "Error!"
1176
+ # end
1177
+ #
1031
1178
  def add_fulfillment_places request, options = nil
1032
1179
  raise ::ArgumentError, "request must be provided" if request.nil?
1033
1180
 
@@ -1161,6 +1308,28 @@ module Google
1161
1308
  #
1162
1309
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1163
1310
  #
1311
+ # @example Basic example
1312
+ # require "google/cloud/retail/v2"
1313
+ #
1314
+ # # Create a client object. The client can be reused for multiple calls.
1315
+ # client = Google::Cloud::Retail::V2::ProductService::Client.new
1316
+ #
1317
+ # # Create a request. To set request fields, pass in keyword arguments.
1318
+ # request = Google::Cloud::Retail::V2::RemoveFulfillmentPlacesRequest.new
1319
+ #
1320
+ # # Call the remove_fulfillment_places method.
1321
+ # result = client.remove_fulfillment_places request
1322
+ #
1323
+ # # The returned object is of type Gapic::Operation. You can use this
1324
+ # # object to check the status of an operation, cancel it, or wait
1325
+ # # for results. Here is how to block until completion:
1326
+ # result.wait_until_done! timeout: 60
1327
+ # if result.response?
1328
+ # p result.response
1329
+ # else
1330
+ # puts "Error!"
1331
+ # end
1332
+ #
1164
1333
  def remove_fulfillment_places request, options = nil
1165
1334
  raise ::ArgumentError, "request must be provided" if request.nil?
1166
1335
 
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -217,6 +238,28 @@ module Google
217
238
  #
218
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
219
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
220
263
  def get_operation request, options = nil
221
264
  raise ::ArgumentError, "request must be provided" if request.nil?
222
265
 
@@ -291,6 +334,21 @@ module Google
291
334
  #
292
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
293
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
294
352
  def delete_operation request, options = nil
295
353
  raise ::ArgumentError, "request must be provided" if request.nil?
296
354
 
@@ -370,6 +428,21 @@ module Google
370
428
  #
371
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
372
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
373
446
  def cancel_operation request, options = nil
374
447
  raise ::ArgumentError, "request must be provided" if request.nil?
375
448
 
@@ -452,6 +525,28 @@ module Google
452
525
  #
453
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
454
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
455
550
  def wait_operation request, options = nil
456
551
  raise ::ArgumentError, "request must be provided" if request.nil?
457
552
 
@@ -360,6 +360,27 @@ module Google
360
360
  #
361
361
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
362
362
  #
363
+ # @example Basic example
364
+ # require "google/cloud/retail/v2"
365
+ #
366
+ # # Create a client object. The client can be reused for multiple calls.
367
+ # client = Google::Cloud::Retail::V2::SearchService::Client.new
368
+ #
369
+ # # Create a request. To set request fields, pass in keyword arguments.
370
+ # request = Google::Cloud::Retail::V2::SearchRequest.new
371
+ #
372
+ # # Call the search method.
373
+ # result = client.search request
374
+ #
375
+ # # The returned object is of type Gapic::PagedEnumerable. You can
376
+ # # iterate over all elements by calling #each, and the enumerable
377
+ # # will lazily make API calls to fetch subsequent pages. Other
378
+ # # methods are also available for managing paging directly.
379
+ # result.each do |response|
380
+ # # Each element is of type ::Google::Cloud::Retail::V2::SearchResponse::SearchResult.
381
+ # p response
382
+ # end
383
+ #
363
384
  def search request, options = nil
364
385
  raise ::ArgumentError, "request must be provided" if request.nil?
365
386
 
@@ -203,6 +203,21 @@ module Google
203
203
  #
204
204
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
205
205
  #
206
+ # @example Basic example
207
+ # require "google/cloud/retail/v2"
208
+ #
209
+ # # Create a client object. The client can be reused for multiple calls.
210
+ # client = Google::Cloud::Retail::V2::UserEventService::Client.new
211
+ #
212
+ # # Create a request. To set request fields, pass in keyword arguments.
213
+ # request = Google::Cloud::Retail::V2::WriteUserEventRequest.new
214
+ #
215
+ # # Call the write_user_event method.
216
+ # result = client.write_user_event request
217
+ #
218
+ # # The returned object is of type Google::Cloud::Retail::V2::UserEvent.
219
+ # p result
220
+ #
206
221
  def write_user_event request, options = nil
207
222
  raise ::ArgumentError, "request must be provided" if request.nil?
208
223
 
@@ -290,6 +305,21 @@ module Google
290
305
  #
291
306
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
292
307
  #
308
+ # @example Basic example
309
+ # require "google/cloud/retail/v2"
310
+ #
311
+ # # Create a client object. The client can be reused for multiple calls.
312
+ # client = Google::Cloud::Retail::V2::UserEventService::Client.new
313
+ #
314
+ # # Create a request. To set request fields, pass in keyword arguments.
315
+ # request = Google::Cloud::Retail::V2::CollectUserEventRequest.new
316
+ #
317
+ # # Call the collect_user_event method.
318
+ # result = client.collect_user_event request
319
+ #
320
+ # # The returned object is of type Google::Api::HttpBody.
321
+ # p result
322
+ #
293
323
  def collect_user_event request, options = nil
294
324
  raise ::ArgumentError, "request must be provided" if request.nil?
295
325
 
@@ -393,6 +423,28 @@ module Google
393
423
  #
394
424
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
395
425
  #
426
+ # @example Basic example
427
+ # require "google/cloud/retail/v2"
428
+ #
429
+ # # Create a client object. The client can be reused for multiple calls.
430
+ # client = Google::Cloud::Retail::V2::UserEventService::Client.new
431
+ #
432
+ # # Create a request. To set request fields, pass in keyword arguments.
433
+ # request = Google::Cloud::Retail::V2::PurgeUserEventsRequest.new
434
+ #
435
+ # # Call the purge_user_events method.
436
+ # result = client.purge_user_events request
437
+ #
438
+ # # The returned object is of type Gapic::Operation. You can use this
439
+ # # object to check the status of an operation, cancel it, or wait
440
+ # # for results. Here is how to block until completion:
441
+ # result.wait_until_done! timeout: 60
442
+ # if result.response?
443
+ # p result.response
444
+ # else
445
+ # puts "Error!"
446
+ # end
447
+ #
396
448
  def purge_user_events request, options = nil
397
449
  raise ::ArgumentError, "request must be provided" if request.nil?
398
450
 
@@ -475,6 +527,28 @@ module Google
475
527
  #
476
528
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
477
529
  #
530
+ # @example Basic example
531
+ # require "google/cloud/retail/v2"
532
+ #
533
+ # # Create a client object. The client can be reused for multiple calls.
534
+ # client = Google::Cloud::Retail::V2::UserEventService::Client.new
535
+ #
536
+ # # Create a request. To set request fields, pass in keyword arguments.
537
+ # request = Google::Cloud::Retail::V2::ImportUserEventsRequest.new
538
+ #
539
+ # # Call the import_user_events method.
540
+ # result = client.import_user_events request
541
+ #
542
+ # # The returned object is of type Gapic::Operation. You can use this
543
+ # # object to check the status of an operation, cancel it, or wait
544
+ # # for results. Here is how to block until completion:
545
+ # result.wait_until_done! timeout: 60
546
+ # if result.response?
547
+ # p result.response
548
+ # else
549
+ # puts "Error!"
550
+ # end
551
+ #
478
552
  def import_user_events request, options = nil
479
553
  raise ::ArgumentError, "request must be provided" if request.nil?
480
554
 
@@ -558,6 +632,28 @@ module Google
558
632
  #
559
633
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
560
634
  #
635
+ # @example Basic example
636
+ # require "google/cloud/retail/v2"
637
+ #
638
+ # # Create a client object. The client can be reused for multiple calls.
639
+ # client = Google::Cloud::Retail::V2::UserEventService::Client.new
640
+ #
641
+ # # Create a request. To set request fields, pass in keyword arguments.
642
+ # request = Google::Cloud::Retail::V2::RejoinUserEventsRequest.new
643
+ #
644
+ # # Call the rejoin_user_events method.
645
+ # result = client.rejoin_user_events request
646
+ #
647
+ # # The returned object is of type Gapic::Operation. You can use this
648
+ # # object to check the status of an operation, cancel it, or wait
649
+ # # for results. Here is how to block until completion:
650
+ # result.wait_until_done! timeout: 60
651
+ # if result.response?
652
+ # p result.response
653
+ # else
654
+ # puts "Error!"
655
+ # end
656
+ #
561
657
  def rejoin_user_events request, options = nil
562
658
  raise ::ArgumentError, "request must be provided" if request.nil?
563
659
 
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -217,6 +238,28 @@ module Google
217
238
  #
218
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
219
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
220
263
  def get_operation request, options = nil
221
264
  raise ::ArgumentError, "request must be provided" if request.nil?
222
265
 
@@ -291,6 +334,21 @@ module Google
291
334
  #
292
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
293
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
294
352
  def delete_operation request, options = nil
295
353
  raise ::ArgumentError, "request must be provided" if request.nil?
296
354
 
@@ -370,6 +428,21 @@ module Google
370
428
  #
371
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
372
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
373
446
  def cancel_operation request, options = nil
374
447
  raise ::ArgumentError, "request must be provided" if request.nil?
375
448
 
@@ -452,6 +525,28 @@ module Google
452
525
  #
453
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
454
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
455
550
  def wait_operation request, options = nil
456
551
  raise ::ArgumentError, "request must be provided" if request.nil?
457
552
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
- VERSION = "0.6.1"
24
+ VERSION = "0.6.2"
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.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-02 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common