@@ -329,6 +329,153 @@ def self.control_service_available? version: :v2, transport: :grpc
329329 false
330330 end
331331
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+
332479 ##
333480 # Create a new client object for GenerativeQuestionService.
334481 #
@@ -621,79 +768,6 @@ def self.product_service_available? version: :v2, transport: :grpc
621768 false
622769 end
623770
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-
697771 ##
698772 # Create a new client object for ServingConfigService.
699773 #
0 commit comments