google-cloud-retail 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24c9ba0a3e71adcd920e6cd79652cd251ecb31d3da31853f862aeee9851dcef1
4
- data.tar.gz: 164f56e1d4e94588c2a3b8943bbf4d1c909ebd2f70ec4003bbd68d6322fae42d
3
+ metadata.gz: 2ef2161ac340119f52fcebaee2816549292bc66a0c115c9bbf080b83faf49c88
4
+ data.tar.gz: e5c8297a28ad203e22a58c22162b9d4bd76b0dd8afb81d22f4a3e68245f5b362
5
5
  SHA512:
6
- metadata.gz: e8ae689c7272df9caf29f8e97fc63acdd2b4d5eb852c545656dacbc98442685dfe04370df04d4aaa437bc22b63902c48b0598c69c91babdafa4e8786441b7e82
7
- data.tar.gz: 7b9bd0048680ae6903631c37adb00a23a0468b30eed9e7ac3c18ba0bd54ab92d670fc73d0e6e4aaac85a41eeedeabb530adf86d398df711b263caa249d430615
6
+ metadata.gz: 30a842a5f2a95957da0f7e0e3b891834740aa0327de25d29ef5d5d97075422815ce5fade7e4b74a088ad9457be89630903bd8fce11292da1a78e9324e9311345
7
+ data.tar.gz: 493a9b0495c69ea95d5daf0fc4fbe21d50d22bc982e3337059a14a9a533133e3a9aa36ae48e9f8b2177ccb3100e7fc870d7f464ef58dbfbf66d9613db7f4c16c
data/README.md CHANGED
@@ -7,7 +7,7 @@ Retail enables you to build an end-to-end personalized recommendation system bas
7
7
  Actual client classes for the various versions of this API are defined in
8
8
  _versioned_ client gems, with names of the form `google-cloud-retail-v*`.
9
9
  The gem `google-cloud-retail` is the main client library that brings the
10
- verisoned gems in as dependencies, and provides high-level methods for
10
+ versioned gems in as dependencies, and provides high-level methods for
11
11
  constructing clients. More information on versioned clients can be found below
12
12
  in the section titled *Which client should I use?*.
13
13
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Retail
23
- VERSION = "2.0.0"
23
+ VERSION = "2.1.0"
24
24
  end
25
25
  end
26
26
  end
@@ -329,6 +329,153 @@ module Google
329
329
  false
330
330
  end
331
331
 
332
+ ##
333
+ # Create a new client object for SearchService.
334
+ #
335
+ # By default, this returns an instance of
336
+ # [Google::Cloud::Retail::V2::SearchService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client)
337
+ # for a gRPC client for version V2 of the API.
338
+ # However, you can specify a different API version by passing it in the
339
+ # `version` parameter. If the SearchService service is
340
+ # supported by that API version, and the corresponding gem is available, the
341
+ # appropriate versioned client will be returned.
342
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
343
+ # the `transport` parameter.
344
+ #
345
+ # Raises an exception if the currently installed versioned client gem for the
346
+ # given API version does not support the given transport of the SearchService service.
347
+ # You can determine whether the method will succeed by calling
348
+ # {Google::Cloud::Retail.search_service_available?}.
349
+ #
350
+ # ## About SearchService
351
+ #
352
+ # Service for search.
353
+ #
354
+ # This feature is only available for users who have Retail Search enabled.
355
+ # Enable Retail Search on Cloud Console before using this feature.
356
+ #
357
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
358
+ # Defaults to `:v2`.
359
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
360
+ # @return [::Object] A client object for the specified version.
361
+ #
362
+ def self.search_service version: :v2, transport: :grpc, &block
363
+ require "google/cloud/retail/#{version.to_s.downcase}"
364
+
365
+ package_name = Google::Cloud::Retail
366
+ .constants
367
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
368
+ .first
369
+ service_module = Google::Cloud::Retail.const_get(package_name).const_get(:SearchService)
370
+ service_module = service_module.const_get(:Rest) if transport == :rest
371
+ service_module.const_get(:Client).new(&block)
372
+ end
373
+
374
+ ##
375
+ # Determines whether the SearchService service is supported by the current client.
376
+ # If true, you can retrieve a client object by calling {Google::Cloud::Retail.search_service}.
377
+ # If false, that method will raise an exception. This could happen if the given
378
+ # API version does not exist or does not support the SearchService service,
379
+ # or if the versioned client gem needs an update to support the SearchService service.
380
+ #
381
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
382
+ # Defaults to `:v2`.
383
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
384
+ # @return [boolean] Whether the service is available.
385
+ #
386
+ def self.search_service_available? version: :v2, transport: :grpc
387
+ require "google/cloud/retail/#{version.to_s.downcase}"
388
+ package_name = Google::Cloud::Retail
389
+ .constants
390
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
391
+ .first
392
+ return false unless package_name
393
+ service_module = Google::Cloud::Retail.const_get package_name
394
+ return false unless service_module.const_defined? :SearchService
395
+ service_module = service_module.const_get :SearchService
396
+ if transport == :rest
397
+ return false unless service_module.const_defined? :Rest
398
+ service_module = service_module.const_get :Rest
399
+ end
400
+ service_module.const_defined? :Client
401
+ rescue ::LoadError
402
+ false
403
+ end
404
+
405
+ ##
406
+ # Create a new client object for ConversationalSearchService.
407
+ #
408
+ # By default, this returns an instance of
409
+ # [Google::Cloud::Retail::V2::ConversationalSearchService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-ConversationalSearchService-Client)
410
+ # for a gRPC client for version V2 of the API.
411
+ # However, you can specify a different API version by passing it in the
412
+ # `version` parameter. If the ConversationalSearchService service is
413
+ # supported by that API version, and the corresponding gem is available, the
414
+ # appropriate versioned client will be returned.
415
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
416
+ # the `transport` parameter.
417
+ #
418
+ # Raises an exception if the currently installed versioned client gem for the
419
+ # given API version does not support the given transport of the ConversationalSearchService service.
420
+ # You can determine whether the method will succeed by calling
421
+ # {Google::Cloud::Retail.conversational_search_service_available?}.
422
+ #
423
+ # ## About ConversationalSearchService
424
+ #
425
+ # Service for retail conversational search.
426
+ #
427
+ # This feature is only available for users who have Retail Conversational
428
+ # Search enabled. Enable Retail Conversational Search on Cloud Console
429
+ # before using this feature.
430
+ #
431
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
432
+ # Defaults to `:v2`.
433
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
434
+ # @return [::Object] A client object for the specified version.
435
+ #
436
+ def self.conversational_search_service version: :v2, transport: :grpc, &block
437
+ require "google/cloud/retail/#{version.to_s.downcase}"
438
+
439
+ package_name = Google::Cloud::Retail
440
+ .constants
441
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
442
+ .first
443
+ service_module = Google::Cloud::Retail.const_get(package_name).const_get(:ConversationalSearchService)
444
+ service_module = service_module.const_get(:Rest) if transport == :rest
445
+ service_module.const_get(:Client).new(&block)
446
+ end
447
+
448
+ ##
449
+ # Determines whether the ConversationalSearchService service is supported by the current client.
450
+ # If true, you can retrieve a client object by calling {Google::Cloud::Retail.conversational_search_service}.
451
+ # If false, that method will raise an exception. This could happen if the given
452
+ # API version does not exist or does not support the ConversationalSearchService service,
453
+ # or if the versioned client gem needs an update to support the ConversationalSearchService service.
454
+ #
455
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
456
+ # Defaults to `:v2`.
457
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
458
+ # @return [boolean] Whether the service is available.
459
+ #
460
+ def self.conversational_search_service_available? version: :v2, transport: :grpc
461
+ require "google/cloud/retail/#{version.to_s.downcase}"
462
+ package_name = Google::Cloud::Retail
463
+ .constants
464
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
465
+ .first
466
+ return false unless package_name
467
+ service_module = Google::Cloud::Retail.const_get package_name
468
+ return false unless service_module.const_defined? :ConversationalSearchService
469
+ service_module = service_module.const_get :ConversationalSearchService
470
+ if transport == :rest
471
+ return false unless service_module.const_defined? :Rest
472
+ service_module = service_module.const_get :Rest
473
+ end
474
+ service_module.const_defined? :Client
475
+ rescue ::LoadError
476
+ false
477
+ end
478
+
332
479
  ##
333
480
  # Create a new client object for GenerativeQuestionService.
334
481
  #
@@ -621,79 +768,6 @@ module Google
621
768
  false
622
769
  end
623
770
 
624
- ##
625
- # Create a new client object for SearchService.
626
- #
627
- # By default, this returns an instance of
628
- # [Google::Cloud::Retail::V2::SearchService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client)
629
- # for a gRPC client for version V2 of the API.
630
- # However, you can specify a different API version by passing it in the
631
- # `version` parameter. If the SearchService service is
632
- # supported by that API version, and the corresponding gem is available, the
633
- # appropriate versioned client will be returned.
634
- # You can also specify a different transport by passing `:rest` or `:grpc` in
635
- # the `transport` parameter.
636
- #
637
- # Raises an exception if the currently installed versioned client gem for the
638
- # given API version does not support the given transport of the SearchService service.
639
- # You can determine whether the method will succeed by calling
640
- # {Google::Cloud::Retail.search_service_available?}.
641
- #
642
- # ## About SearchService
643
- #
644
- # Service for search.
645
- #
646
- # This feature is only available for users who have Retail Search enabled.
647
- # Enable Retail Search on Cloud Console before using this feature.
648
- #
649
- # @param version [::String, ::Symbol] The API version to connect to. Optional.
650
- # Defaults to `:v2`.
651
- # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
652
- # @return [::Object] A client object for the specified version.
653
- #
654
- def self.search_service version: :v2, transport: :grpc, &block
655
- require "google/cloud/retail/#{version.to_s.downcase}"
656
-
657
- package_name = Google::Cloud::Retail
658
- .constants
659
- .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
660
- .first
661
- service_module = Google::Cloud::Retail.const_get(package_name).const_get(:SearchService)
662
- service_module = service_module.const_get(:Rest) if transport == :rest
663
- service_module.const_get(:Client).new(&block)
664
- end
665
-
666
- ##
667
- # Determines whether the SearchService service is supported by the current client.
668
- # If true, you can retrieve a client object by calling {Google::Cloud::Retail.search_service}.
669
- # If false, that method will raise an exception. This could happen if the given
670
- # API version does not exist or does not support the SearchService service,
671
- # or if the versioned client gem needs an update to support the SearchService service.
672
- #
673
- # @param version [::String, ::Symbol] The API version to connect to. Optional.
674
- # Defaults to `:v2`.
675
- # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
676
- # @return [boolean] Whether the service is available.
677
- #
678
- def self.search_service_available? version: :v2, transport: :grpc
679
- require "google/cloud/retail/#{version.to_s.downcase}"
680
- package_name = Google::Cloud::Retail
681
- .constants
682
- .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
683
- .first
684
- return false unless package_name
685
- service_module = Google::Cloud::Retail.const_get package_name
686
- return false unless service_module.const_defined? :SearchService
687
- service_module = service_module.const_get :SearchService
688
- if transport == :rest
689
- return false unless service_module.const_defined? :Rest
690
- service_module = service_module.const_get :Rest
691
- end
692
- service_module.const_defined? :Client
693
- rescue ::LoadError
694
- false
695
- end
696
-
697
771
  ##
698
772
  # Create a new client object for ServingConfigService.
699
773
  #
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-retail
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-13 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: google-cloud-core
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  requirements: []
73
- rubygems_version: 3.6.3
73
+ rubygems_version: 3.6.9
74
74
  specification_version: 4
75
75
  summary: API Client library for the Retail API
76
76
  test_files: []