google-cloud-retail-v2 2.2.0 → 2.4.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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2/catalog_service/client.rb +35 -35
  3. data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +35 -35
  4. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +30 -30
  5. data/lib/google/cloud/retail/v2/common_pb.rb +3 -1
  6. data/lib/google/cloud/retail/v2/conversational_search_service/client.rb +557 -0
  7. data/lib/google/cloud/retail/v2/conversational_search_service/credentials.rb +51 -0
  8. data/lib/google/cloud/retail/v2/conversational_search_service/paths.rb +54 -0
  9. data/lib/google/cloud/retail/v2/conversational_search_service/rest/client.rb +526 -0
  10. data/lib/google/cloud/retail/v2/conversational_search_service/rest/service_stub.rb +145 -0
  11. data/lib/google/cloud/retail/v2/conversational_search_service/rest.rb +56 -0
  12. data/lib/google/cloud/retail/v2/conversational_search_service.rb +59 -0
  13. data/lib/google/cloud/retail/v2/conversational_search_service_pb.rb +65 -0
  14. data/lib/google/cloud/retail/v2/conversational_search_service_services_pb.rb +52 -0
  15. data/lib/google/cloud/retail/v2/rest.rb +2 -1
  16. data/lib/google/cloud/retail/v2/safety_pb.rb +47 -0
  17. data/lib/google/cloud/retail/v2/search_service/client.rb +22 -1
  18. data/lib/google/cloud/retail/v2/search_service/rest/client.rb +22 -1
  19. data/lib/google/cloud/retail/v2/search_service_pb.rb +1 -1
  20. data/lib/google/cloud/retail/v2/version.rb +1 -1
  21. data/lib/google/cloud/retail/v2.rb +2 -1
  22. data/proto_docs/google/cloud/retail/v2/common.rb +18 -0
  23. data/proto_docs/google/cloud/retail/v2/conversational_search_service.rb +358 -0
  24. data/proto_docs/google/cloud/retail/v2/safety.rb +96 -0
  25. data/proto_docs/google/cloud/retail/v2/search_service.rb +45 -1
  26. data/proto_docs/google/cloud/retail/v2/user_event.rb +1 -1
  27. metadata +16 -4
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/retail/v2/version"
24
+
25
+ require "google/cloud/retail/v2/conversational_search_service/credentials"
26
+ require "google/cloud/retail/v2/conversational_search_service/paths"
27
+ require "google/cloud/retail/v2/conversational_search_service/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Retail
32
+ module V2
33
+ ##
34
+ # Service for retail conversational search.
35
+ #
36
+ # This feature is only available for users who have Retail Conversational
37
+ # Search enabled. Enable Retail Conversational Search on Cloud Console
38
+ # before using this feature.
39
+ #
40
+ # To load this service and instantiate a REST client:
41
+ #
42
+ # require "google/cloud/retail/v2/conversational_search_service/rest"
43
+ # client = ::Google::Cloud::Retail::V2::ConversationalSearchService::Rest::Client.new
44
+ #
45
+ module ConversationalSearchService
46
+ # Client for the REST transport
47
+ module Rest
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
56
+ require "google/cloud/retail/v2/conversational_search_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/retail/v2/version"
24
+
25
+ require "google/cloud/retail/v2/conversational_search_service/credentials"
26
+ require "google/cloud/retail/v2/conversational_search_service/paths"
27
+ require "google/cloud/retail/v2/conversational_search_service/client"
28
+ require "google/cloud/retail/v2/conversational_search_service/rest"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Retail
33
+ module V2
34
+ ##
35
+ # Service for retail conversational search.
36
+ #
37
+ # This feature is only available for users who have Retail Conversational
38
+ # Search enabled. Enable Retail Conversational Search on Cloud Console
39
+ # before using this feature.
40
+ #
41
+ # @example Load this service and instantiate a gRPC client
42
+ #
43
+ # require "google/cloud/retail/v2/conversational_search_service"
44
+ # client = ::Google::Cloud::Retail::V2::ConversationalSearchService::Client.new
45
+ #
46
+ # @example Load this service and instantiate a REST client
47
+ #
48
+ # require "google/cloud/retail/v2/conversational_search_service/rest"
49
+ # client = ::Google::Cloud::Retail::V2::ConversationalSearchService::Rest::Client.new
50
+ #
51
+ module ConversationalSearchService
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+
58
+ helper_path = ::File.join __dir__, "conversational_search_service", "helpers.rb"
59
+ require "google/cloud/retail/v2/conversational_search_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/retail/v2/conversational_search_service.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
11
+ require 'google/cloud/retail/v2/common_pb'
12
+ require 'google/cloud/retail/v2/safety_pb'
13
+ require 'google/cloud/retail/v2/search_service_pb'
14
+
15
+
16
+ descriptor_data = "\n:google/cloud/retail/v2/conversational_search_service.proto\x12\x16google.cloud.retail.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/retail/v2/common.proto\x1a#google/cloud/retail/v2/safety.proto\x1a+google/cloud/retail/v2/search_service.proto\"\xef\x0b\n\x1b\x43onversationalSearchRequest\x12\x16\n\tplacement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x06\x62ranch\x18\x02 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\x12\n\x05query\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpage_categories\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63onversation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\\\n\rsearch_params\x18\x06 \x01(\x0b\x32@.google.cloud.retail.v2.ConversationalSearchRequest.SearchParamsB\x03\xe0\x41\x01\x12\x17\n\nvisitor_id\x18\t \x01(\tB\x03\xe0\x41\x02\x12\x38\n\tuser_info\x18\x07 \x01(\x0b\x32 .google.cloud.retail.v2.UserInfoB\x03\xe0\x41\x01\x12{\n\x1d\x63onversational_filtering_spec\x18\x08 \x01(\x0b\x32O.google.cloud.retail.v2.ConversationalSearchRequest.ConversationalFilteringSpecB\x03\xe0\x41\x01\x12]\n\x0buser_labels\x18\x0c \x03(\x0b\x32\x43.google.cloud.retail.v2.ConversationalSearchRequest.UserLabelsEntryB\x03\xe0\x41\x01\x12\x43\n\x0fsafety_settings\x18\x0e \x03(\x0b\x32%.google.cloud.retail.v2.SafetySettingB\x03\xe0\x41\x01\x1a\xa2\x01\n\x0cSearchParams\x12\x13\n\x06\x66ilter\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x63\x61nonical_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07sort_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12H\n\nboost_spec\x18\x04 \x01(\x0b\x32/.google.cloud.retail.v2.SearchRequest.BoostSpecB\x03\xe0\x41\x01\x1a\x81\x02\n\nUserAnswer\x12\x15\n\x0btext_answer\x18\x01 \x01(\tH\x00\x12m\n\x0fselected_answer\x18\x02 \x01(\x0b\x32M.google.cloud.retail.v2.ConversationalSearchRequest.UserAnswer.SelectedAnswerB\x03\xe0\x41\x01H\x00\x1a\x65\n\x0eSelectedAnswer\x12S\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueB\x03\xe0\x41\x01\x42\x06\n\x04type\x1a\x83\x03\n\x1b\x43onversationalFilteringSpec\x12.\n\x1f\x65nable_conversational_filtering\x18\x01 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12X\n\x0buser_answer\x18\x02 \x01(\x0b\x32>.google.cloud.retail.v2.ConversationalSearchRequest.UserAnswerB\x03\xe0\x41\x01\x12\x80\x01\n\x1d\x63onversational_filtering_mode\x18\x04 \x01(\x0e\x32T.google.cloud.retail.v2.ConversationalSearchRequest.ConversationalFilteringSpec.ModeB\x03\xe0\x41\x01\"W\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x1e\n\x1a\x43ONVERSATIONAL_FILTER_ONLY\x10\x03\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcd\t\n\x1c\x43onversationalSearchResponse\x12\x18\n\x10user_query_types\x18\n \x03(\t\x12$\n\x1c\x63onversational_text_response\x18\x02 \x01(\t\x12`\n\x11\x66ollowup_question\x18\x03 \x01(\x0b\x32\x45.google.cloud.retail.v2.ConversationalSearchResponse.FollowupQuestion\x12\x17\n\x0f\x63onversation_id\x18\x04 \x01(\t\x12Z\n\x0erefined_search\x18\x06 \x03(\x0b\x32\x42.google.cloud.retail.v2.ConversationalSearchResponse.RefinedSearch\x12{\n\x1f\x63onversational_filtering_result\x18\x07 \x01(\x0b\x32R.google.cloud.retail.v2.ConversationalSearchResponse.ConversationalFilteringResult\x12N\n\x05state\x18\t \x01(\x0e\x32:.google.cloud.retail.v2.ConversationalSearchResponse.StateB\x03\xe0\x41\x03\x1a\x82\x02\n\x10\x46ollowupQuestion\x12\x19\n\x11\x66ollowup_question\x18\x01 \x01(\t\x12p\n\x11suggested_answers\x18\x02 \x03(\x0b\x32U.google.cloud.retail.v2.ConversationalSearchResponse.FollowupQuestion.SuggestedAnswer\x1a\x61\n\x0fSuggestedAnswer\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\x1a\x1e\n\rRefinedSearch\x12\r\n\x05query\x18\x01 \x01(\t\x1a\xe5\x02\n\x1d\x43onversationalFilteringResult\x12`\n\x11\x66ollowup_question\x18\x01 \x01(\x0b\x32\x45.google.cloud.retail.v2.ConversationalSearchResponse.FollowupQuestion\x12~\n\x11\x61\x64\x64itional_filter\x18\x02 \x01(\x0b\x32\x63.google.cloud.retail.v2.ConversationalSearchResponse.ConversationalFilteringResult.AdditionalFilter\x1a\x62\n\x10\x41\x64\x64itionalFilter\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\"<\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSTREAMING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x32\xae\x03\n\x1b\x43onversationalSearchService\x12\xc3\x02\n\x14\x43onversationalSearch\x12\x33.google.cloud.retail.v2.ConversationalSearchRequest\x1a\x34.google.cloud.retail.v2.ConversationalSearchResponse\"\xbd\x01\x82\xd3\xe4\x93\x02\xb6\x01\"S/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:conversationalSearch:\x01*Z\\\"W/v2/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:conversationalSearch:\x01*0\x01\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xcb\x01\n\x1a\x63om.google.cloud.retail.v2B ConversationalSearchServiceProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2b\x06proto3"
17
+
18
+ pool = Google::Protobuf::DescriptorPool.generated_pool
19
+
20
+ begin
21
+ pool.add_serialized_file(descriptor_data)
22
+ rescue TypeError
23
+ # Compatibility code: will be removed in the next major version.
24
+ require 'google/protobuf/descriptor_pb'
25
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
26
+ parsed.clear_dependency
27
+ serialized = parsed.class.encode(parsed)
28
+ file = pool.add_serialized_file(serialized)
29
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
30
+ imports = [
31
+ ["google.cloud.retail.v2.UserInfo", "google/cloud/retail/v2/common.proto"],
32
+ ["google.cloud.retail.v2.SafetySetting", "google/cloud/retail/v2/safety.proto"],
33
+ ["google.cloud.retail.v2.SearchRequest.BoostSpec", "google/cloud/retail/v2/search_service.proto"],
34
+ ]
35
+ imports.each do |type_name, expected_filename|
36
+ import_file = pool.lookup(type_name).file_descriptor
37
+ if import_file.name != expected_filename
38
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
39
+ end
40
+ end
41
+ warn "Each proto file must use a consistent fully-qualified name."
42
+ warn "This will become an error in the next major version."
43
+ end
44
+
45
+ module Google
46
+ module Cloud
47
+ module Retail
48
+ module V2
49
+ ConversationalSearchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchRequest").msgclass
50
+ ConversationalSearchRequest::SearchParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchRequest.SearchParams").msgclass
51
+ ConversationalSearchRequest::UserAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchRequest.UserAnswer").msgclass
52
+ ConversationalSearchRequest::UserAnswer::SelectedAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchRequest.UserAnswer.SelectedAnswer").msgclass
53
+ ConversationalSearchRequest::ConversationalFilteringSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchRequest.ConversationalFilteringSpec").msgclass
54
+ ConversationalSearchRequest::ConversationalFilteringSpec::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchRequest.ConversationalFilteringSpec.Mode").enummodule
55
+ ConversationalSearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchResponse").msgclass
56
+ ConversationalSearchResponse::FollowupQuestion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchResponse.FollowupQuestion").msgclass
57
+ ConversationalSearchResponse::FollowupQuestion::SuggestedAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchResponse.FollowupQuestion.SuggestedAnswer").msgclass
58
+ ConversationalSearchResponse::RefinedSearch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchResponse.RefinedSearch").msgclass
59
+ ConversationalSearchResponse::ConversationalFilteringResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchResponse.ConversationalFilteringResult").msgclass
60
+ ConversationalSearchResponse::ConversationalFilteringResult::AdditionalFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchResponse.ConversationalFilteringResult.AdditionalFilter").msgclass
61
+ ConversationalSearchResponse::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ConversationalSearchResponse.State").enummodule
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,52 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/retail/v2/conversational_search_service.proto for package 'Google.Cloud.Retail.V2'
3
+ # Original file comments:
4
+ # Copyright 2025 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/retail/v2/conversational_search_service_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Retail
25
+ module V2
26
+ module ConversationalSearchService
27
+ # Service for retail conversational search.
28
+ #
29
+ # This feature is only available for users who have Retail Conversational
30
+ # Search enabled. Enable Retail Conversational Search on Cloud Console
31
+ # before using this feature.
32
+ class Service
33
+
34
+ include ::GRPC::GenericService
35
+
36
+ self.marshal_class_method = :encode
37
+ self.unmarshal_class_method = :decode
38
+ self.service_name = 'google.cloud.retail.v2.ConversationalSearchService'
39
+
40
+ # Performs a conversational search.
41
+ #
42
+ # This feature is only available for users who have Conversational Search
43
+ # enabled.
44
+ rpc :ConversationalSearch, ::Google::Cloud::Retail::V2::ConversationalSearchRequest, stream(::Google::Cloud::Retail::V2::ConversationalSearchResponse)
45
+ end
46
+
47
+ Stub = Service.rpc_stub_class
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -20,11 +20,12 @@ require "google/cloud/retail/v2/analytics_service/rest"
20
20
  require "google/cloud/retail/v2/catalog_service/rest"
21
21
  require "google/cloud/retail/v2/completion_service/rest"
22
22
  require "google/cloud/retail/v2/control_service/rest"
23
+ require "google/cloud/retail/v2/search_service/rest"
24
+ require "google/cloud/retail/v2/conversational_search_service/rest"
23
25
  require "google/cloud/retail/v2/generative_question_service/rest"
24
26
  require "google/cloud/retail/v2/model_service/rest"
25
27
  require "google/cloud/retail/v2/prediction_service/rest"
26
28
  require "google/cloud/retail/v2/product_service/rest"
27
- require "google/cloud/retail/v2/search_service/rest"
28
29
  require "google/cloud/retail/v2/serving_config_service/rest"
29
30
  require "google/cloud/retail/v2/user_event_service/rest"
30
31
  require "google/cloud/retail/v2/version"
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/retail/v2/safety.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/field_behavior_pb'
8
+
9
+
10
+ descriptor_data = "\n#google/cloud/retail/v2/safety.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xd5\x03\n\rSafetySetting\x12\x36\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32$.google.cloud.retail.v2.HarmCategory\x12K\n\tthreshold\x18\x02 \x01(\x0e\x32\x38.google.cloud.retail.v2.SafetySetting.HarmBlockThreshold\x12J\n\x06method\x18\x03 \x01(\x0e\x32\x35.google.cloud.retail.v2.SafetySetting.HarmBlockMethodB\x03\xe0\x41\x01\"\x9d\x01\n\x12HarmBlockThreshold\x12$\n HARM_BLOCK_THRESHOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42LOCK_LOW_AND_ABOVE\x10\x01\x12\x1a\n\x16\x42LOCK_MEDIUM_AND_ABOVE\x10\x02\x12\x13\n\x0f\x42LOCK_ONLY_HIGH\x10\x03\x12\x0e\n\nBLOCK_NONE\x10\x04\x12\x07\n\x03OFF\x10\x05\"S\n\x0fHarmBlockMethod\x12!\n\x1dHARM_BLOCK_METHOD_UNSPECIFIED\x10\x00\x12\x0c\n\x08SEVERITY\x10\x01\x12\x0f\n\x0bPROBABILITY\x10\x02*\xd7\x01\n\x0cHarmCategory\x12\x1d\n\x19HARM_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19HARM_CATEGORY_HATE_SPEECH\x10\x01\x12#\n\x1fHARM_CATEGORY_DANGEROUS_CONTENT\x10\x02\x12\x1c\n\x18HARM_CATEGORY_HARASSMENT\x10\x03\x12#\n\x1fHARM_CATEGORY_SEXUALLY_EXPLICIT\x10\x04\x12!\n\x1dHARM_CATEGORY_CIVIC_INTEGRITY\x10\x05\x42\xb6\x01\n\x1a\x63om.google.cloud.retail.v2B\x0bSafetyProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2b\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ]
26
+ imports.each do |type_name, expected_filename|
27
+ import_file = pool.lookup(type_name).file_descriptor
28
+ if import_file.name != expected_filename
29
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
30
+ end
31
+ end
32
+ warn "Each proto file must use a consistent fully-qualified name."
33
+ warn "This will become an error in the next major version."
34
+ end
35
+
36
+ module Google
37
+ module Cloud
38
+ module Retail
39
+ module V2
40
+ SafetySetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SafetySetting").msgclass
41
+ SafetySetting::HarmBlockThreshold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SafetySetting.HarmBlockThreshold").enummodule
42
+ SafetySetting::HarmBlockMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SafetySetting.HarmBlockMethod").enummodule
43
+ HarmCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.HarmCategory").enummodule
44
+ end
45
+ end
46
+ end
47
+ end
@@ -223,7 +223,7 @@ module Google
223
223
  # @param options [::Gapic::CallOptions, ::Hash]
224
224
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
225
225
  #
226
- # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil, search_mode: nil, personalization_spec: nil, labels: nil, spell_correction_spec: nil, entity: nil, conversational_search_spec: nil, tile_navigation_spec: nil, language_code: nil, region_code: nil, place_id: nil)
226
+ # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil, search_mode: nil, personalization_spec: nil, labels: nil, spell_correction_spec: nil, entity: nil, conversational_search_spec: nil, tile_navigation_spec: nil, language_code: nil, region_code: nil, place_id: nil, user_attributes: nil)
227
227
  # Pass arguments to `search` via keyword arguments. Note that at
228
228
  # least one keyword argument is required. To specify no parameters, or to keep all
229
229
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -489,6 +489,27 @@ module Google
489
489
  # product's
490
490
  # {::Google::Cloud::Retail::V2::LocalInventory#place_id LocalInventory.place_id}
491
491
  # for revenue optimization.
492
+ # @param user_attributes [::Hash{::String => ::Google::Cloud::Retail::V2::StringList, ::Hash}]
493
+ # Optional. The user attributes that could be used for personalization of
494
+ # search results.
495
+ # * Populate at most 100 key-value pairs per query.
496
+ # * Only supports string keys and repeated string values.
497
+ # * Duplcate keys are not allowed within a single query.
498
+ #
499
+ # Example:
500
+ # user_attributes: [
501
+ # { key: "pets"
502
+ # value {
503
+ # values: "dog"
504
+ # values: "cat"
505
+ # }
506
+ # },
507
+ # { key: "state"
508
+ # value {
509
+ # values: "CA"
510
+ # }
511
+ # }
512
+ # ]
492
513
  #
493
514
  # @yield [response, operation] Access the result along with the RPC operation
494
515
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>]
@@ -216,7 +216,7 @@ module Google
216
216
  # @param options [::Gapic::CallOptions, ::Hash]
217
217
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
218
218
  #
219
- # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil, search_mode: nil, personalization_spec: nil, labels: nil, spell_correction_spec: nil, entity: nil, conversational_search_spec: nil, tile_navigation_spec: nil, language_code: nil, region_code: nil, place_id: nil)
219
+ # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil, search_mode: nil, personalization_spec: nil, labels: nil, spell_correction_spec: nil, entity: nil, conversational_search_spec: nil, tile_navigation_spec: nil, language_code: nil, region_code: nil, place_id: nil, user_attributes: nil)
220
220
  # Pass arguments to `search` via keyword arguments. Note that at
221
221
  # least one keyword argument is required. To specify no parameters, or to keep all
222
222
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -482,6 +482,27 @@ module Google
482
482
  # product's
483
483
  # {::Google::Cloud::Retail::V2::LocalInventory#place_id LocalInventory.place_id}
484
484
  # for revenue optimization.
485
+ # @param user_attributes [::Hash{::String => ::Google::Cloud::Retail::V2::StringList, ::Hash}]
486
+ # Optional. The user attributes that could be used for personalization of
487
+ # search results.
488
+ # * Populate at most 100 key-value pairs per query.
489
+ # * Only supports string keys and repeated string values.
490
+ # * Duplcate keys are not allowed within a single query.
491
+ #
492
+ # Example:
493
+ # user_attributes: [
494
+ # { key: "pets"
495
+ # value {
496
+ # values: "dog"
497
+ # values: "cat"
498
+ # }
499
+ # },
500
+ # { key: "state"
501
+ # value {
502
+ # values: "CA"
503
+ # }
504
+ # }
505
+ # ]
485
506
  # @yield [result, operation] Access the result along with the TransportOperation object
486
507
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>]
487
508
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -14,7 +14,7 @@ require 'google/protobuf/field_mask_pb'
14
14
  require 'google/protobuf/struct_pb'
15
15
 
16
16
 
17
- descriptor_data = "\n+google/cloud/retail/v2/search_service.proto\x12\x16google.cloud.retail.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/retail/v2/common.proto\x1a$google/cloud/retail/v2/product.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\"4\n\x15ProductAttributeValue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\\\n\x18ProductAttributeInterval\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x08interval\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.Interval\"\xe8\x01\n\x04Tile\x12P\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueH\x00\x12V\n\x1aproduct_attribute_interval\x18\x02 \x01(\x0b\x32\x30.google.cloud.retail.v2.ProductAttributeIntervalH\x00\x12!\n\x19representative_product_id\x18\x03 \x01(\tB\x13\n\x11product_attribute\"\xd9\x1a\n\rSearchRequest\x12\x16\n\tplacement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x06\x62ranch\x18\x02 \x01(\tB!\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12\x17\n\nvisitor_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\tuser_info\x18\x05 \x01(\x0b\x32 .google.cloud.retail.v2.UserInfo\x12\x11\n\tpage_size\x18\x07 \x01(\x05\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x0e\n\x06offset\x18\t \x01(\x05\x12\x0e\n\x06\x66ilter\x18\n \x01(\t\x12\x18\n\x10\x63\x61nonical_filter\x18\x1c \x01(\t\x12\x10\n\x08order_by\x18\x0b \x01(\t\x12\x44\n\x0b\x66\x61\x63\x65t_specs\x18\x0c \x03(\x0b\x32/.google.cloud.retail.v2.SearchRequest.FacetSpec\x12V\n\x12\x64ynamic_facet_spec\x18\x15 \x01(\x0b\x32\x36.google.cloud.retail.v2.SearchRequest.DynamicFacetSpecB\x02\x18\x01\x12\x43\n\nboost_spec\x18\r \x01(\x0b\x32/.google.cloud.retail.v2.SearchRequest.BoostSpec\x12V\n\x14query_expansion_spec\x18\x0e \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec\x12\x1b\n\x13variant_rollup_keys\x18\x11 \x03(\t\x12\x17\n\x0fpage_categories\x18\x17 \x03(\t\x12\x45\n\x0bsearch_mode\x18\x1f \x01(\x0e\x32\x30.google.cloud.retail.v2.SearchRequest.SearchMode\x12W\n\x14personalization_spec\x18 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.PersonalizationSpec\x12\x41\n\x06labels\x18\" \x03(\x0b\x32\x31.google.cloud.retail.v2.SearchRequest.LabelsEntry\x12]\n\x15spell_correction_spec\x18# \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpecH\x00\x88\x01\x01\x12\x0e\n\x06\x65ntity\x18& \x01(\t\x12g\n\x1a\x63onversational_search_spec\x18( \x01(\x0b\x32>.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpecB\x03\xe0\x41\x01\x12[\n\x14tile_navigation_spec\x18) \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.TileNavigationSpecB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18+ \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bregion_code\x18, \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08place_id\x18. \x01(\tB\x03\xe0\x41\x01\x1a\x91\x03\n\tFacetSpec\x12P\n\tfacet_key\x18\x01 \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xe3\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\tintervals\x18\x02 \x03(\x0b\x32 .google.cloud.retail.v2.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x08 \x03(\t\x12\x10\n\x08\x63ontains\x18\t \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\n \x01(\x08\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\r\n\x05query\x18\x05 \x01(\t\x12\x16\n\x0ereturn_min_max\x18\x0b \x01(\x08\x1a\x96\x01\n\x10\x44ynamicFacetSpec\x12I\n\x04mode\x18\x01 \x01(\x0e\x32;.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x1a\xee\x01\n\tBoostSpec\x12\x61\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32\x42.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec\x12\'\n\x1askip_boost_spec_validation\x18\x02 \x01(\x08H\x00\x88\x01\x01\x1a\x36\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x42\x1d\n\x1b_skip_boost_spec_validation\x1a\xcb\x01\n\x12QueryExpansionSpec\x12U\n\tcondition\x18\x01 \x01(\x0e\x32\x42.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition\x12\x1e\n\x16pin_unexpanded_results\x18\x02 \x01(\x08\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x03\x1a\x99\x01\n\x13PersonalizationSpec\x12L\n\x04mode\x18\x01 \x01(\x0e\x32>.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode\"4\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x1a\xa0\x01\n\x13SpellCorrectionSpec\x12L\n\x04mode\x18\x01 \x01(\x0e\x32>.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\x97\x04\n\x18\x43onversationalSearchSpec\x12\'\n\x1f\x66ollowup_conversation_requested\x18\x01 \x01(\x08\x12\x17\n\x0f\x63onversation_id\x18\x02 \x01(\t\x12^\n\x0buser_answer\x18\x03 \x01(\x0b\x32I.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer\x1a\xd8\x02\n\nUserAnswer\x12\x15\n\x0btext_answer\x18\x01 \x01(\tH\x00\x12s\n\x0fselected_answer\x18\x02 \x01(\x0b\x32X.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer.SelectedAnswerH\x00\x1a\xb5\x01\n\x0eSelectedAnswer\x12S\n\x18product_attribute_values\x18\x01 \x03(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueB\x02\x18\x01\x12N\n\x17product_attribute_value\x18\x02 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueB\x06\n\x04type\x1al\n\x12TileNavigationSpec\x12!\n\x19tile_navigation_requested\x18\x01 \x01(\x08\x12\x33\n\rapplied_tiles\x18\x02 \x03(\x0b\x32\x1c.google.cloud.retail.v2.Tile\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"[\n\nSearchMode\x12\x1b\n\x17SEARCH_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13PRODUCT_SEARCH_ONLY\x10\x01\x12\x17\n\x13\x46\x41\x43\x45TED_SEARCH_ONLY\x10\x02\x42\x18\n\x16_spell_correction_spec\"\xf1\x12\n\x0eSearchResponse\x12\x44\n\x07results\x18\x01 \x03(\x0b\x32\x33.google.cloud.retail.v2.SearchResponse.SearchResult\x12<\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32,.google.cloud.retail.v2.SearchResponse.Facet\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x17\n\x0f\x63orrected_query\x18\x04 \x01(\t\x12\x19\n\x11\x61ttribution_token\x18\x05 \x01(\t\x12\x17\n\x0fnext_page_token\x18\x06 \x01(\t\x12W\n\x14query_expansion_info\x18\x07 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchResponse.QueryExpansionInfo\x12\x14\n\x0credirect_uri\x18\n \x01(\t\x12\x18\n\x10\x61pplied_controls\x18\x0c \x03(\t\x12H\n\x14pin_control_metadata\x18\x16 \x01(\x0b\x32*.google.cloud.retail.v2.PinControlMetadata\x12i\n\x1dinvalid_condition_boost_specs\x18\x0e \x03(\x0b\x32\x42.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec\x12?\n\x0f\x65xperiment_info\x18\x11 \x03(\x0b\x32&.google.cloud.retail.v2.ExperimentInfo\x12g\n\x1c\x63onversational_search_result\x18\x12 \x01(\x0b\x32\x41.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult\x12[\n\x16tile_navigation_result\x18\x13 \x01(\x0b\x32;.google.cloud.retail.v2.SearchResponse.TileNavigationResult\x1a\x91\x04\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12\x30\n\x07product\x18\x02 \x01(\x0b\x32\x1f.google.cloud.retail.v2.Product\x12\x1e\n\x16matching_variant_count\x18\x03 \x01(\x05\x12o\n\x17matching_variant_fields\x18\x04 \x03(\x0b\x32N.google.cloud.retail.v2.SearchResponse.SearchResult.MatchingVariantFieldsEntry\x12k\n\x15variant_rollup_values\x18\x05 \x03(\x0b\x32L.google.cloud.retail.v2.SearchResponse.SearchResult.VariantRollupValuesEntry\x12\x17\n\x0fpersonal_labels\x18\x07 \x03(\t\x1aX\n\x1aMatchingVariantFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask:\x02\x38\x01\x1aR\n\x18VariantRollupValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x8e\x02\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x06values\x18\x02 \x03(\x0b\x32\x37.google.cloud.retail.v2.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1a\x97\x01\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12\x34\n\x08interval\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x12\x11\n\tmin_value\x18\x05 \x01(\x01\x12\x11\n\tmax_value\x18\x06 \x01(\x01\x42\r\n\x0b\x66\x61\x63\x65t_value\x1aI\n\x12QueryExpansionInfo\x12\x16\n\x0e\x65xpanded_query\x18\x01 \x01(\x08\x12\x1b\n\x13pinned_result_count\x18\x02 \x01(\x03\x1a\xff\x04\n\x1a\x43onversationalSearchResult\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x15\n\rrefined_query\x18\x02 \x01(\t\x12r\n\x12\x61\x64\x64itional_filters\x18\x03 \x03(\x0b\x32R.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.AdditionalFilterB\x02\x18\x01\x12\x19\n\x11\x66ollowup_question\x18\x04 \x01(\t\x12l\n\x11suggested_answers\x18\x05 \x03(\x0b\x32Q.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.SuggestedAnswer\x12m\n\x11\x61\x64\x64itional_filter\x18\x06 \x01(\x0b\x32R.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.AdditionalFilter\x1a\x61\n\x0fSuggestedAnswer\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\x1a\x62\n\x10\x41\x64\x64itionalFilter\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\x1a\x43\n\x14TileNavigationResult\x12+\n\x05tiles\x18\x01 \x03(\x0b\x32\x1c.google.cloud.retail.v2.Tile\"\xfb\x02\n\x0e\x45xperimentInfo\x12\x63\n\x19serving_config_experiment\x18\x02 \x01(\x0b\x32>.google.cloud.retail.v2.ExperimentInfo.ServingConfigExperimentH\x00\x12\x39\n\nexperiment\x18\x01 \x01(\tB%\xfa\x41\"\n retail.googleapis.com/Experiment\x1a\xb1\x01\n\x17ServingConfigExperiment\x12I\n\x17original_serving_config\x18\x01 \x01(\tB(\xfa\x41%\n#retail.googleapis.com/ServingConfig\x12K\n\x19\x65xperiment_serving_config\x18\x02 \x01(\tB(\xfa\x41%\n#retail.googleapis.com/ServingConfigB\x15\n\x13\x65xperiment_metadata2\xd8\x02\n\rSearchService\x12\xfb\x01\n\x06Search\x12%.google.cloud.retail.v2.SearchRequest\x1a&.google.cloud.retail.v2.SearchResponse\"\xa1\x01\x82\xd3\xe4\x93\x02\x9a\x01\"E/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:search:\x01*ZN\"I/v2/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:search:\x01*\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb7\x02\n\x1a\x63om.google.cloud.retail.v2B\x12SearchServiceProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2\xea\x41w\n retail.googleapis.com/Experiment\x12Sprojects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}b\x06proto3"
17
+ descriptor_data = "\n+google/cloud/retail/v2/search_service.proto\x12\x16google.cloud.retail.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/retail/v2/common.proto\x1a$google/cloud/retail/v2/product.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\"4\n\x15ProductAttributeValue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\\\n\x18ProductAttributeInterval\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x08interval\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.Interval\"\xe8\x01\n\x04Tile\x12P\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueH\x00\x12V\n\x1aproduct_attribute_interval\x18\x02 \x01(\x0b\x32\x30.google.cloud.retail.v2.ProductAttributeIntervalH\x00\x12!\n\x19representative_product_id\x18\x03 \x01(\tB\x13\n\x11product_attribute\"\x8d\x1c\n\rSearchRequest\x12\x16\n\tplacement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x06\x62ranch\x18\x02 \x01(\tB!\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12\x17\n\nvisitor_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\tuser_info\x18\x05 \x01(\x0b\x32 .google.cloud.retail.v2.UserInfo\x12\x11\n\tpage_size\x18\x07 \x01(\x05\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x0e\n\x06offset\x18\t \x01(\x05\x12\x0e\n\x06\x66ilter\x18\n \x01(\t\x12\x18\n\x10\x63\x61nonical_filter\x18\x1c \x01(\t\x12\x10\n\x08order_by\x18\x0b \x01(\t\x12\x44\n\x0b\x66\x61\x63\x65t_specs\x18\x0c \x03(\x0b\x32/.google.cloud.retail.v2.SearchRequest.FacetSpec\x12V\n\x12\x64ynamic_facet_spec\x18\x15 \x01(\x0b\x32\x36.google.cloud.retail.v2.SearchRequest.DynamicFacetSpecB\x02\x18\x01\x12\x43\n\nboost_spec\x18\r \x01(\x0b\x32/.google.cloud.retail.v2.SearchRequest.BoostSpec\x12V\n\x14query_expansion_spec\x18\x0e \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec\x12\x1b\n\x13variant_rollup_keys\x18\x11 \x03(\t\x12\x17\n\x0fpage_categories\x18\x17 \x03(\t\x12\x45\n\x0bsearch_mode\x18\x1f \x01(\x0e\x32\x30.google.cloud.retail.v2.SearchRequest.SearchMode\x12W\n\x14personalization_spec\x18 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.PersonalizationSpec\x12\x41\n\x06labels\x18\" \x03(\x0b\x32\x31.google.cloud.retail.v2.SearchRequest.LabelsEntry\x12]\n\x15spell_correction_spec\x18# \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpecH\x00\x88\x01\x01\x12\x0e\n\x06\x65ntity\x18& \x01(\t\x12g\n\x1a\x63onversational_search_spec\x18( \x01(\x0b\x32>.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpecB\x03\xe0\x41\x01\x12[\n\x14tile_navigation_spec\x18) \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.TileNavigationSpecB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18+ \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bregion_code\x18, \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08place_id\x18. \x01(\tB\x03\xe0\x41\x01\x12W\n\x0fuser_attributes\x18/ \x03(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.UserAttributesEntryB\x03\xe0\x41\x01\x1a\x91\x03\n\tFacetSpec\x12P\n\tfacet_key\x18\x01 \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xe3\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\tintervals\x18\x02 \x03(\x0b\x32 .google.cloud.retail.v2.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x08 \x03(\t\x12\x10\n\x08\x63ontains\x18\t \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\n \x01(\x08\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\r\n\x05query\x18\x05 \x01(\t\x12\x16\n\x0ereturn_min_max\x18\x0b \x01(\x08\x1a\x96\x01\n\x10\x44ynamicFacetSpec\x12I\n\x04mode\x18\x01 \x01(\x0e\x32;.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x1a\xee\x01\n\tBoostSpec\x12\x61\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32\x42.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec\x12\'\n\x1askip_boost_spec_validation\x18\x02 \x01(\x08H\x00\x88\x01\x01\x1a\x36\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x42\x1d\n\x1b_skip_boost_spec_validation\x1a\xcb\x01\n\x12QueryExpansionSpec\x12U\n\tcondition\x18\x01 \x01(\x0e\x32\x42.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition\x12\x1e\n\x16pin_unexpanded_results\x18\x02 \x01(\x08\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x03\x1a\x99\x01\n\x13PersonalizationSpec\x12L\n\x04mode\x18\x01 \x01(\x0e\x32>.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode\"4\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x1a\xa0\x01\n\x13SpellCorrectionSpec\x12L\n\x04mode\x18\x01 \x01(\x0e\x32>.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a\x97\x04\n\x18\x43onversationalSearchSpec\x12\'\n\x1f\x66ollowup_conversation_requested\x18\x01 \x01(\x08\x12\x17\n\x0f\x63onversation_id\x18\x02 \x01(\t\x12^\n\x0buser_answer\x18\x03 \x01(\x0b\x32I.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer\x1a\xd8\x02\n\nUserAnswer\x12\x15\n\x0btext_answer\x18\x01 \x01(\tH\x00\x12s\n\x0fselected_answer\x18\x02 \x01(\x0b\x32X.google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer.SelectedAnswerH\x00\x1a\xb5\x01\n\x0eSelectedAnswer\x12S\n\x18product_attribute_values\x18\x01 \x03(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueB\x02\x18\x01\x12N\n\x17product_attribute_value\x18\x02 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueB\x06\n\x04type\x1al\n\x12TileNavigationSpec\x12!\n\x19tile_navigation_requested\x18\x01 \x01(\x08\x12\x33\n\rapplied_tiles\x18\x02 \x03(\x0b\x32\x1c.google.cloud.retail.v2.Tile\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aY\n\x13UserAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x31\n\x05value\x18\x02 \x01(\x0b\x32\".google.cloud.retail.v2.StringList:\x02\x38\x01\"[\n\nSearchMode\x12\x1b\n\x17SEARCH_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13PRODUCT_SEARCH_ONLY\x10\x01\x12\x17\n\x13\x46\x41\x43\x45TED_SEARCH_ONLY\x10\x02\x42\x18\n\x16_spell_correction_spec\"\xa5\x14\n\x0eSearchResponse\x12\x44\n\x07results\x18\x01 \x03(\x0b\x32\x33.google.cloud.retail.v2.SearchResponse.SearchResult\x12<\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32,.google.cloud.retail.v2.SearchResponse.Facet\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x17\n\x0f\x63orrected_query\x18\x04 \x01(\t\x12\x19\n\x11\x61ttribution_token\x18\x05 \x01(\t\x12\x17\n\x0fnext_page_token\x18\x06 \x01(\t\x12W\n\x14query_expansion_info\x18\x07 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchResponse.QueryExpansionInfo\x12\x14\n\x0credirect_uri\x18\n \x01(\t\x12\x18\n\x10\x61pplied_controls\x18\x0c \x03(\t\x12H\n\x14pin_control_metadata\x18\x16 \x01(\x0b\x32*.google.cloud.retail.v2.PinControlMetadata\x12i\n\x1dinvalid_condition_boost_specs\x18\x0e \x03(\x0b\x32\x42.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec\x12?\n\x0f\x65xperiment_info\x18\x11 \x03(\x0b\x32&.google.cloud.retail.v2.ExperimentInfo\x12g\n\x1c\x63onversational_search_result\x18\x12 \x01(\x0b\x32\x41.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult\x12[\n\x16tile_navigation_result\x18\x13 \x01(\x0b\x32;.google.cloud.retail.v2.SearchResponse.TileNavigationResult\x1a\xc5\x05\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12\x30\n\x07product\x18\x02 \x01(\x0b\x32\x1f.google.cloud.retail.v2.Product\x12\x1e\n\x16matching_variant_count\x18\x03 \x01(\x05\x12o\n\x17matching_variant_fields\x18\x04 \x03(\x0b\x32N.google.cloud.retail.v2.SearchResponse.SearchResult.MatchingVariantFieldsEntry\x12k\n\x15variant_rollup_values\x18\x05 \x03(\x0b\x32L.google.cloud.retail.v2.SearchResponse.SearchResult.VariantRollupValuesEntry\x12\x17\n\x0fpersonal_labels\x18\x07 \x03(\t\x12Z\n\x0cmodel_scores\x18\x08 \x03(\x0b\x32\x44.google.cloud.retail.v2.SearchResponse.SearchResult.ModelScoresEntry\x1aX\n\x1aMatchingVariantFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask:\x02\x38\x01\x1aR\n\x18VariantRollupValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1aV\n\x10ModelScoresEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x31\n\x05value\x18\x02 \x01(\x0b\x32\".google.cloud.retail.v2.DoubleList:\x02\x38\x01\x1a\x8e\x02\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x06values\x18\x02 \x03(\x0b\x32\x37.google.cloud.retail.v2.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1a\x97\x01\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12\x34\n\x08interval\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x12\x11\n\tmin_value\x18\x05 \x01(\x01\x12\x11\n\tmax_value\x18\x06 \x01(\x01\x42\r\n\x0b\x66\x61\x63\x65t_value\x1aI\n\x12QueryExpansionInfo\x12\x16\n\x0e\x65xpanded_query\x18\x01 \x01(\x08\x12\x1b\n\x13pinned_result_count\x18\x02 \x01(\x03\x1a\xff\x04\n\x1a\x43onversationalSearchResult\x12\x17\n\x0f\x63onversation_id\x18\x01 \x01(\t\x12\x15\n\rrefined_query\x18\x02 \x01(\t\x12r\n\x12\x61\x64\x64itional_filters\x18\x03 \x03(\x0b\x32R.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.AdditionalFilterB\x02\x18\x01\x12\x19\n\x11\x66ollowup_question\x18\x04 \x01(\t\x12l\n\x11suggested_answers\x18\x05 \x03(\x0b\x32Q.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.SuggestedAnswer\x12m\n\x11\x61\x64\x64itional_filter\x18\x06 \x01(\x0b\x32R.google.cloud.retail.v2.SearchResponse.ConversationalSearchResult.AdditionalFilter\x1a\x61\n\x0fSuggestedAnswer\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\x1a\x62\n\x10\x41\x64\x64itionalFilter\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\x1a\x43\n\x14TileNavigationResult\x12+\n\x05tiles\x18\x01 \x03(\x0b\x32\x1c.google.cloud.retail.v2.Tile\"\xfb\x02\n\x0e\x45xperimentInfo\x12\x63\n\x19serving_config_experiment\x18\x02 \x01(\x0b\x32>.google.cloud.retail.v2.ExperimentInfo.ServingConfigExperimentH\x00\x12\x39\n\nexperiment\x18\x01 \x01(\tB%\xfa\x41\"\n retail.googleapis.com/Experiment\x1a\xb1\x01\n\x17ServingConfigExperiment\x12I\n\x17original_serving_config\x18\x01 \x01(\tB(\xfa\x41%\n#retail.googleapis.com/ServingConfig\x12K\n\x19\x65xperiment_serving_config\x18\x02 \x01(\tB(\xfa\x41%\n#retail.googleapis.com/ServingConfigB\x15\n\x13\x65xperiment_metadata2\xd8\x02\n\rSearchService\x12\xfb\x01\n\x06Search\x12%.google.cloud.retail.v2.SearchRequest\x1a&.google.cloud.retail.v2.SearchResponse\"\xa1\x01\x82\xd3\xe4\x93\x02\x9a\x01\"E/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:search:\x01*ZN\"I/v2/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:search:\x01*\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb7\x02\n\x1a\x63om.google.cloud.retail.v2B\x12SearchServiceProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2\xea\x41w\n retail.googleapis.com/Experiment\x12Sprojects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}b\x06proto3"
18
18
 
19
19
  pool = Google::Protobuf::DescriptorPool.generated_pool
20
20
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
- VERSION = "2.2.0"
24
+ VERSION = "2.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -20,11 +20,12 @@ require "google/cloud/retail/v2/analytics_service"
20
20
  require "google/cloud/retail/v2/catalog_service"
21
21
  require "google/cloud/retail/v2/completion_service"
22
22
  require "google/cloud/retail/v2/control_service"
23
+ require "google/cloud/retail/v2/search_service"
24
+ require "google/cloud/retail/v2/conversational_search_service"
23
25
  require "google/cloud/retail/v2/generative_question_service"
24
26
  require "google/cloud/retail/v2/model_service"
25
27
  require "google/cloud/retail/v2/prediction_service"
26
28
  require "google/cloud/retail/v2/product_service"
27
- require "google/cloud/retail/v2/search_service"
28
29
  require "google/cloud/retail/v2/serving_config_service"
29
30
  require "google/cloud/retail/v2/user_event_service"
30
31
  require "google/cloud/retail/v2/version"
@@ -1006,6 +1006,24 @@ module Google
1006
1006
  end
1007
1007
  end
1008
1008
 
1009
+ # A list of string values.
1010
+ # @!attribute [rw] values
1011
+ # @return [::Array<::String>]
1012
+ # String values.
1013
+ class StringList
1014
+ include ::Google::Protobuf::MessageExts
1015
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1016
+ end
1017
+
1018
+ # A message with a list of double values.
1019
+ # @!attribute [rw] values
1020
+ # @return [::Array<::Float>]
1021
+ # The list of double values.
1022
+ class DoubleList
1023
+ include ::Google::Protobuf::MessageExts
1024
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1025
+ end
1026
+
1009
1027
  # At which level we offer configuration for attributes.
1010
1028
  module AttributeConfigLevel
1011
1029
  # Value used when unset. In this case, server behavior defaults to