google-cloud-retail-v2 1.0.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/retail/v2/analytics_service/client.rb +29 -2
  4. data/lib/google/cloud/retail/v2/analytics_service/operations.rb +12 -15
  5. data/lib/google/cloud/retail/v2/analytics_service/rest/client.rb +29 -2
  6. data/lib/google/cloud/retail/v2/analytics_service/rest/operations.rb +43 -38
  7. data/lib/google/cloud/retail/v2/analytics_service/rest/service_stub.rb +22 -8
  8. data/lib/google/cloud/retail/v2/catalog_service/client.rb +29 -12
  9. data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +29 -12
  10. data/lib/google/cloud/retail/v2/catalog_service/rest/service_stub.rb +102 -68
  11. data/lib/google/cloud/retail/v2/completion_service/client.rb +31 -5
  12. data/lib/google/cloud/retail/v2/completion_service/operations.rb +12 -15
  13. data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +31 -5
  14. data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +43 -38
  15. data/lib/google/cloud/retail/v2/completion_service/rest/service_stub.rb +30 -14
  16. data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -1
  17. data/lib/google/cloud/retail/v2/control_service/client.rb +29 -6
  18. data/lib/google/cloud/retail/v2/control_service/rest/client.rb +29 -6
  19. data/lib/google/cloud/retail/v2/control_service/rest/service_stub.rb +54 -32
  20. data/lib/google/cloud/retail/v2/generative_question_pb.rb +45 -0
  21. data/lib/google/cloud/retail/v2/generative_question_service/client.rb +853 -0
  22. data/lib/google/cloud/retail/v2/generative_question_service/credentials.rb +51 -0
  23. data/lib/google/cloud/retail/v2/generative_question_service/paths.rb +52 -0
  24. data/lib/google/cloud/retail/v2/generative_question_service/rest/client.rb +792 -0
  25. data/lib/google/cloud/retail/v2/generative_question_service/rest/service_stub.rb +389 -0
  26. data/lib/google/cloud/retail/v2/generative_question_service/rest.rb +52 -0
  27. data/lib/google/cloud/retail/v2/generative_question_service.rb +55 -0
  28. data/lib/google/cloud/retail/v2/generative_question_service_pb.rb +57 -0
  29. data/lib/google/cloud/retail/v2/generative_question_service_services_pb.rb +55 -0
  30. data/lib/google/cloud/retail/v2/model_service/client.rb +31 -9
  31. data/lib/google/cloud/retail/v2/model_service/operations.rb +12 -15
  32. data/lib/google/cloud/retail/v2/model_service/rest/client.rb +31 -9
  33. data/lib/google/cloud/retail/v2/model_service/rest/operations.rb +43 -38
  34. data/lib/google/cloud/retail/v2/model_service/rest/service_stub.rb +78 -50
  35. data/lib/google/cloud/retail/v2/prediction_service/client.rb +28 -2
  36. data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +28 -2
  37. data/lib/google/cloud/retail/v2/prediction_service/rest/service_stub.rb +22 -8
  38. data/lib/google/cloud/retail/v2/product_service/client.rb +36 -13
  39. data/lib/google/cloud/retail/v2/product_service/operations.rb +12 -15
  40. data/lib/google/cloud/retail/v2/product_service/rest/client.rb +36 -13
  41. data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +43 -38
  42. data/lib/google/cloud/retail/v2/product_service/rest/service_stub.rb +110 -74
  43. data/lib/google/cloud/retail/v2/rest.rb +1 -0
  44. data/lib/google/cloud/retail/v2/search_service/client.rb +35 -3
  45. data/lib/google/cloud/retail/v2/search_service/rest/client.rb +34 -3
  46. data/lib/google/cloud/retail/v2/search_service/rest/service_stub.rb +22 -8
  47. data/lib/google/cloud/retail/v2/search_service_pb.rb +13 -2
  48. data/lib/google/cloud/retail/v2/serving_config_service/client.rb +29 -8
  49. data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +29 -8
  50. data/lib/google/cloud/retail/v2/serving_config_service/rest/service_stub.rb +70 -44
  51. data/lib/google/cloud/retail/v2/user_event_service/client.rb +31 -6
  52. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +12 -15
  53. data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +31 -6
  54. data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +43 -38
  55. data/lib/google/cloud/retail/v2/user_event_service/rest/service_stub.rb +54 -32
  56. data/lib/google/cloud/retail/v2/version.rb +1 -1
  57. data/lib/google/cloud/retail/v2.rb +1 -0
  58. data/proto_docs/google/api/client.rb +39 -0
  59. data/proto_docs/google/cloud/retail/v2/common.rb +1 -1
  60. data/proto_docs/google/cloud/retail/v2/completion_service.rb +30 -2
  61. data/proto_docs/google/cloud/retail/v2/generative_question.rb +75 -0
  62. data/proto_docs/google/cloud/retail/v2/generative_question_service.rb +109 -0
  63. data/proto_docs/google/cloud/retail/v2/product.rb +9 -2
  64. data/proto_docs/google/cloud/retail/v2/search_service.rb +204 -0
  65. data/proto_docs/google/longrunning/operations.rb +19 -14
  66. metadata +17 -5
@@ -96,9 +96,9 @@ module Google
96
96
  # capped by 20.
97
97
  # @!attribute [rw] enable_attribute_suggestions
98
98
  # @return [::Boolean]
99
- # If true, attribute suggestions are enabled and provided in response.
99
+ # If true, attribute suggestions are enabled and provided in the response.
100
100
  #
101
- # This field is only available for "cloud-retail" dataset.
101
+ # This field is only available for the "cloud-retail" dataset.
102
102
  # @!attribute [rw] entity
103
103
  # @return [::String]
104
104
  # The entity for customers who run multiple entities, domains, sites, or
@@ -147,6 +147,16 @@ module Google
147
147
  #
148
148
  # Recent searches are deduplicated. More recent searches will be reserved
149
149
  # when duplication happens.
150
+ # @!attribute [rw] attribute_results
151
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CompleteQueryResponse::AttributeResult}]
152
+ # A map of matched attribute suggestions. This field is only available for
153
+ # "cloud-retail" dataset.
154
+ #
155
+ # Current supported keys:
156
+ #
157
+ # * `brands`
158
+ #
159
+ # * `categories`
150
160
  class CompleteQueryResponse
151
161
  include ::Google::Protobuf::MessageExts
152
162
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -189,6 +199,24 @@ module Google
189
199
  include ::Google::Protobuf::MessageExts
190
200
  extend ::Google::Protobuf::MessageExts::ClassMethods
191
201
  end
202
+
203
+ # Resource that represents attribute results.
204
+ # The list of suggestions for the attribute.
205
+ # @!attribute [rw] suggestions
206
+ # @return [::Array<::String>]
207
+ class AttributeResult
208
+ include ::Google::Protobuf::MessageExts
209
+ extend ::Google::Protobuf::MessageExts::ClassMethods
210
+ end
211
+
212
+ # @!attribute [rw] key
213
+ # @return [::String]
214
+ # @!attribute [rw] value
215
+ # @return [::Google::Cloud::Retail::V2::CompleteQueryResponse::AttributeResult]
216
+ class AttributeResultsEntry
217
+ include ::Google::Protobuf::MessageExts
218
+ extend ::Google::Protobuf::MessageExts::ClassMethods
219
+ end
192
220
  end
193
221
  end
194
222
  end
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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
+
20
+ module Google
21
+ module Cloud
22
+ module Retail
23
+ module V2
24
+ # Configuration for overall generative question feature state.
25
+ # @!attribute [rw] catalog
26
+ # @return [::String]
27
+ # Required. Resource name of the affected catalog.
28
+ # Format: projects/\\{project}/locations/\\{location}/catalogs/\\{catalog}
29
+ # @!attribute [rw] feature_enabled
30
+ # @return [::Boolean]
31
+ # Optional. Determines whether questions will be used at serving time.
32
+ # Note: This feature cannot be enabled until initial data requirements are
33
+ # satisfied.
34
+ # @!attribute [rw] minimum_products
35
+ # @return [::Integer]
36
+ # Optional. Minimum number of products in the response to trigger follow-up
37
+ # questions. Value must be 0 or positive.
38
+ class GenerativeQuestionsFeatureConfig
39
+ include ::Google::Protobuf::MessageExts
40
+ extend ::Google::Protobuf::MessageExts::ClassMethods
41
+ end
42
+
43
+ # Configuration for a single generated question.
44
+ # @!attribute [rw] catalog
45
+ # @return [::String]
46
+ # Required. Resource name of the catalog.
47
+ # Format: projects/\\{project}/locations/\\{location}/catalogs/\\{catalog}
48
+ # @!attribute [rw] facet
49
+ # @return [::String]
50
+ # Required. The facet to which the question is associated.
51
+ # @!attribute [r] generated_question
52
+ # @return [::String]
53
+ # Output only. The LLM generated question.
54
+ # @!attribute [rw] final_question
55
+ # @return [::String]
56
+ # Optional. The question that will be used at serving time.
57
+ # Question can have a max length of 300 bytes.
58
+ # When not populated, generated_question should be used.
59
+ # @!attribute [r] example_values
60
+ # @return [::Array<::String>]
61
+ # Output only. Values that can be used to answer the question.
62
+ # @!attribute [r] frequency
63
+ # @return [::Float]
64
+ # Output only. The ratio of how often a question was asked.
65
+ # @!attribute [rw] allowed_in_conversation
66
+ # @return [::Boolean]
67
+ # Optional. Whether the question is asked at serving time.
68
+ class GenerativeQuestionConfig
69
+ include ::Google::Protobuf::MessageExts
70
+ extend ::Google::Protobuf::MessageExts::ClassMethods
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,109 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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
+
20
+ module Google
21
+ module Cloud
22
+ module Retail
23
+ module V2
24
+ # Request for UpdateGenerativeQuestionsFeatureConfig method.
25
+ # @!attribute [rw] generative_questions_feature_config
26
+ # @return [::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig]
27
+ # Required. The configuration managing the feature state.
28
+ # @!attribute [rw] update_mask
29
+ # @return [::Google::Protobuf::FieldMask]
30
+ # Optional. Indicates which fields in the provided
31
+ # {::Google::Cloud::Retail::V2::GenerativeQuestionsFeatureConfig GenerativeQuestionsFeatureConfig}
32
+ # to update. If not set or empty, all supported fields are updated.
33
+ class UpdateGenerativeQuestionsFeatureConfigRequest
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+ end
37
+
38
+ # Request for GetGenerativeQuestionsFeatureConfig method.
39
+ # @!attribute [rw] catalog
40
+ # @return [::String]
41
+ # Required. Resource name of the parent catalog.
42
+ # Format: projects/\\{project}/locations/\\{location}/catalogs/\\{catalog}
43
+ class GetGenerativeQuestionsFeatureConfigRequest
44
+ include ::Google::Protobuf::MessageExts
45
+ extend ::Google::Protobuf::MessageExts::ClassMethods
46
+ end
47
+
48
+ # Request for ListQuestions method.
49
+ # @!attribute [rw] parent
50
+ # @return [::String]
51
+ # Required. Resource name of the parent catalog.
52
+ # Format: projects/\\{project}/locations/\\{location}/catalogs/\\{catalog}
53
+ class ListGenerativeQuestionConfigsRequest
54
+ include ::Google::Protobuf::MessageExts
55
+ extend ::Google::Protobuf::MessageExts::ClassMethods
56
+ end
57
+
58
+ # Response for ListQuestions method.
59
+ # @!attribute [rw] generative_question_configs
60
+ # @return [::Array<::Google::Cloud::Retail::V2::GenerativeQuestionConfig>]
61
+ # All the questions for a given catalog.
62
+ class ListGenerativeQuestionConfigsResponse
63
+ include ::Google::Protobuf::MessageExts
64
+ extend ::Google::Protobuf::MessageExts::ClassMethods
65
+ end
66
+
67
+ # Request for UpdateGenerativeQuestionConfig method.
68
+ # @!attribute [rw] generative_question_config
69
+ # @return [::Google::Cloud::Retail::V2::GenerativeQuestionConfig]
70
+ # Required. The question to update.
71
+ # @!attribute [rw] update_mask
72
+ # @return [::Google::Protobuf::FieldMask]
73
+ # Optional. Indicates which fields in the provided
74
+ # {::Google::Cloud::Retail::V2::GenerativeQuestionConfig GenerativeQuestionConfig}
75
+ # to update. The following are NOT supported:
76
+ #
77
+ # * {::Google::Cloud::Retail::V2::GenerativeQuestionConfig#frequency GenerativeQuestionConfig.frequency}
78
+ #
79
+ # If not set or empty, all supported fields are updated.
80
+ class UpdateGenerativeQuestionConfigRequest
81
+ include ::Google::Protobuf::MessageExts
82
+ extend ::Google::Protobuf::MessageExts::ClassMethods
83
+ end
84
+
85
+ # Request for BatchUpdateGenerativeQuestionConfig method.
86
+ # @!attribute [rw] parent
87
+ # @return [::String]
88
+ # Optional. Resource name of the parent catalog.
89
+ # Format: projects/\\{project}/locations/\\{location}/catalogs/\\{catalog}
90
+ # @!attribute [rw] requests
91
+ # @return [::Array<::Google::Cloud::Retail::V2::UpdateGenerativeQuestionConfigRequest>]
92
+ # Required. The updates question configs.
93
+ class BatchUpdateGenerativeQuestionConfigsRequest
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+
98
+ # Aggregated response for UpdateGenerativeQuestionConfig method.
99
+ # @!attribute [rw] generative_question_configs
100
+ # @return [::Array<::Google::Cloud::Retail::V2::GenerativeQuestionConfig>]
101
+ # Optional. The updates question configs.
102
+ class BatchUpdateGenerativeQuestionConfigsResponse
103
+ include ::Google::Protobuf::MessageExts
104
+ extend ::Google::Protobuf::MessageExts::ClassMethods
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
@@ -300,6 +300,15 @@ module Google
300
300
  # Default to
301
301
  # {::Google::Cloud::Retail::V2::Product::Availability::IN_STOCK Availability.IN_STOCK}.
302
302
  #
303
+ # For primary products with variants set the availability of the primary as
304
+ # {::Google::Cloud::Retail::V2::Product::Availability::OUT_OF_STOCK Availability.OUT_OF_STOCK}
305
+ # and set the true availability at the variant level. This way the primary
306
+ # product will be considered "in stock" as long as it has at least one
307
+ # variant in stock.
308
+ #
309
+ # For primary products with no variants set the true availability at the
310
+ # primary level.
311
+ #
303
312
  # Corresponding properties: Google Merchant Center property
304
313
  # [availability](https://support.google.com/merchants/answer/6324448).
305
314
  # Schema.org property [Offer.availability](https://schema.org/availability).
@@ -474,8 +483,6 @@ module Google
474
483
  # * {::Google::Cloud::Retail::V2::Product#name name}
475
484
  # * {::Google::Cloud::Retail::V2::Product#color_info color_info}
476
485
  #
477
- # The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
478
- # returned.
479
486
  #
480
487
  # Note: Returning more fields in
481
488
  # {::Google::Cloud::Retail::V2::SearchResponse SearchResponse} can increase
@@ -21,6 +21,49 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
+ # Product attribute which structured by an attribute name and value. This
25
+ # structure is used in conversational search filters and answers. For example,
26
+ # if we have `name=color` and `value=red`, this means that the color is `red`.
27
+ # @!attribute [rw] name
28
+ # @return [::String]
29
+ # The attribute name.
30
+ # @!attribute [rw] value
31
+ # @return [::String]
32
+ # The attribute value.
33
+ class ProductAttributeValue
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+ end
37
+
38
+ # Product attribute name and numeric interval.
39
+ # @!attribute [rw] name
40
+ # @return [::String]
41
+ # The attribute name (e.g. "length")
42
+ # @!attribute [rw] interval
43
+ # @return [::Google::Cloud::Retail::V2::Interval]
44
+ # The numeric interval (e.g. [10, 20))
45
+ class ProductAttributeInterval
46
+ include ::Google::Protobuf::MessageExts
47
+ extend ::Google::Protobuf::MessageExts::ClassMethods
48
+ end
49
+
50
+ # This field specifies the tile information including an attribute key,
51
+ # attribute value. More fields will be added in the future, eg: product id
52
+ # or product counts, etc.
53
+ # @!attribute [rw] product_attribute_value
54
+ # @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
55
+ # The product attribute key-value.
56
+ # @!attribute [rw] product_attribute_interval
57
+ # @return [::Google::Cloud::Retail::V2::ProductAttributeInterval]
58
+ # The product attribute key-numeric interval.
59
+ # @!attribute [rw] representative_product_id
60
+ # @return [::String]
61
+ # The representative product id for this tile.
62
+ class Tile
63
+ include ::Google::Protobuf::MessageExts
64
+ extend ::Google::Protobuf::MessageExts::ClassMethods
65
+ end
66
+
24
67
  # Request message for
25
68
  # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search} method.
26
69
  # @!attribute [rw] placement
@@ -284,6 +327,13 @@ module Google
284
327
  # If this is set, it should be exactly matched with
285
328
  # {::Google::Cloud::Retail::V2::UserEvent#entity UserEvent.entity} to get search
286
329
  # results boosted by entity.
330
+ # @!attribute [rw] conversational_search_spec
331
+ # @return [::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec]
332
+ # Optional. This field specifies all conversational related parameters
333
+ # addition to traditional retail search.
334
+ # @!attribute [rw] tile_navigation_spec
335
+ # @return [::Google::Cloud::Retail::V2::SearchRequest::TileNavigationSpec]
336
+ # Optional. This field specifies tile navigation related parameters.
287
337
  class SearchRequest
288
338
  include ::Google::Protobuf::MessageExts
289
339
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -692,6 +742,78 @@ module Google
692
742
  end
693
743
  end
694
744
 
745
+ # This field specifies all conversational related parameters addition to
746
+ # traditional retail search.
747
+ # @!attribute [rw] followup_conversation_requested
748
+ # @return [::Boolean]
749
+ # This field specifies whether the customer would like to do conversational
750
+ # search. If this field is set to true, conversational related extra
751
+ # information will be returned from server side, including follow-up
752
+ # question, answer options, etc.
753
+ # @!attribute [rw] conversation_id
754
+ # @return [::String]
755
+ # This field specifies the conversation id, which maintains the state of
756
+ # the conversation between client side and server side. Use the value from
757
+ # the previous [ConversationalSearchResult.conversation_id][]. For the
758
+ # initial request, this should be empty.
759
+ # @!attribute [rw] user_answer
760
+ # @return [::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer]
761
+ # This field specifies the current user answer during the conversational
762
+ # search. This can be either user selected from suggested answers or user
763
+ # input plain text.
764
+ class ConversationalSearchSpec
765
+ include ::Google::Protobuf::MessageExts
766
+ extend ::Google::Protobuf::MessageExts::ClassMethods
767
+
768
+ # This field specifies the current user answer during the conversational
769
+ # search. This can be either user selected from suggested answers or user
770
+ # input plain text.
771
+ # @!attribute [rw] text_answer
772
+ # @return [::String]
773
+ # This field specifies the incremental input text from the user during
774
+ # the conversational search.
775
+ # @!attribute [rw] selected_answer
776
+ # @return [::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer::SelectedAnswer]
777
+ # This field specifies the selected attributes during the
778
+ # conversational search. This should be a subset of
779
+ # [ConversationalSearchResult.suggested_answers][].
780
+ class UserAnswer
781
+ include ::Google::Protobuf::MessageExts
782
+ extend ::Google::Protobuf::MessageExts::ClassMethods
783
+
784
+ # This field specifies the selected answers during the conversational
785
+ # search.
786
+ # @!attribute [rw] product_attribute_values
787
+ # @deprecated This field is deprecated and may be removed in the next major version update.
788
+ # @return [::Array<::Google::Cloud::Retail::V2::ProductAttributeValue>]
789
+ # This field is deprecated and should not be set.
790
+ # @!attribute [rw] product_attribute_value
791
+ # @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
792
+ # This field specifies the selected answer which is a attribute
793
+ # key-value.
794
+ class SelectedAnswer
795
+ include ::Google::Protobuf::MessageExts
796
+ extend ::Google::Protobuf::MessageExts::ClassMethods
797
+ end
798
+ end
799
+ end
800
+
801
+ # This field specifies tile navigation related parameters.
802
+ # @!attribute [rw] tile_navigation_requested
803
+ # @return [::Boolean]
804
+ # This field specifies whether the customer would like to request tile
805
+ # navigation.
806
+ # @!attribute [rw] applied_tiles
807
+ # @return [::Array<::Google::Cloud::Retail::V2::Tile>]
808
+ # This field specifies the tiles which are already clicked in client side.
809
+ # NOTE: This field is not being used for filtering search products. Client
810
+ # side should also put all the applied tiles in
811
+ # {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter}.
812
+ class TileNavigationSpec
813
+ include ::Google::Protobuf::MessageExts
814
+ extend ::Google::Protobuf::MessageExts::ClassMethods
815
+ end
816
+
695
817
  # @!attribute [rw] key
696
818
  # @return [::String]
697
819
  # @!attribute [rw] value
@@ -794,6 +916,14 @@ module Google
794
916
  # @return [::Array<::Google::Cloud::Retail::V2::ExperimentInfo>]
795
917
  # Metadata related to A/B testing [Experiment][] associated with this
796
918
  # response. Only exists when an experiment is triggered.
919
+ # @!attribute [rw] conversational_search_result
920
+ # @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult]
921
+ # This field specifies all related information that is needed on client
922
+ # side for UI rendering of conversational retail search.
923
+ # @!attribute [rw] tile_navigation_result
924
+ # @return [::Google::Cloud::Retail::V2::SearchResponse::TileNavigationResult]
925
+ # This field specifies all related information for tile navigation that will
926
+ # be used in client side.
797
927
  class SearchResponse
798
928
  include ::Google::Protobuf::MessageExts
799
929
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -968,6 +1098,80 @@ module Google
968
1098
  include ::Google::Protobuf::MessageExts
969
1099
  extend ::Google::Protobuf::MessageExts::ClassMethods
970
1100
  end
1101
+
1102
+ # This field specifies all related information that is needed on client
1103
+ # side for UI rendering of conversational retail search.
1104
+ # @!attribute [rw] conversation_id
1105
+ # @return [::String]
1106
+ # Conversation UUID. This field will be stored in client side storage to
1107
+ # maintain the conversation session with server and will be used for next
1108
+ # search request's
1109
+ # {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec#conversation_id SearchRequest.ConversationalSearchSpec.conversation_id}
1110
+ # to restore conversation state in server.
1111
+ # @!attribute [rw] refined_query
1112
+ # @return [::String]
1113
+ # The current refined query for the conversational search. This field
1114
+ # will be used in customer UI that the query in the search bar should be
1115
+ # replaced with the refined query. For example, if
1116
+ # {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} is
1117
+ # `dress` and next
1118
+ # {::Google::Cloud::Retail::V2::SearchRequest::ConversationalSearchSpec::UserAnswer#text_answer SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer}
1119
+ # is `red color`, which does not match any product attribute value filters,
1120
+ # the refined query will be `dress, red color`.
1121
+ # @!attribute [rw] additional_filters
1122
+ # @deprecated This field is deprecated and may be removed in the next major version update.
1123
+ # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter>]
1124
+ # This field is deprecated but will be kept for backward compatibility.
1125
+ # There is expected to have only one additional filter and the value will
1126
+ # be the same to the same as field `additional_filter`.
1127
+ # @!attribute [rw] followup_question
1128
+ # @return [::String]
1129
+ # The follow-up question. e.g., `What is the color?`
1130
+ # @!attribute [rw] suggested_answers
1131
+ # @return [::Array<::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::SuggestedAnswer>]
1132
+ # The answer options provided to client for the follow-up question.
1133
+ # @!attribute [rw] additional_filter
1134
+ # @return [::Google::Cloud::Retail::V2::SearchResponse::ConversationalSearchResult::AdditionalFilter]
1135
+ # This is the incremental additional filters implied from the current
1136
+ # user answer. User should add the suggested addition filters to the
1137
+ # previous
1138
+ # {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter}, and
1139
+ # use the merged filter in the follow up search request.
1140
+ class ConversationalSearchResult
1141
+ include ::Google::Protobuf::MessageExts
1142
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1143
+
1144
+ # Suggested answers to the follow-up question.
1145
+ # @!attribute [rw] product_attribute_value
1146
+ # @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
1147
+ # Product attribute value, including an attribute key and an
1148
+ # attribute value. Other types can be added here in the future.
1149
+ class SuggestedAnswer
1150
+ include ::Google::Protobuf::MessageExts
1151
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1152
+ end
1153
+
1154
+ # Additional filter that client side need to apply.
1155
+ # @!attribute [rw] product_attribute_value
1156
+ # @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
1157
+ # Product attribute value, including an attribute key and an
1158
+ # attribute value. Other types can be added here in the future.
1159
+ class AdditionalFilter
1160
+ include ::Google::Protobuf::MessageExts
1161
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1162
+ end
1163
+ end
1164
+
1165
+ # This field specifies all related information for tile navigation that will
1166
+ # be used in client side.
1167
+ # @!attribute [rw] tiles
1168
+ # @return [::Array<::Google::Cloud::Retail::V2::Tile>]
1169
+ # The current tiles that are used for tile navigation, sorted by
1170
+ # engagement.
1171
+ class TileNavigationResult
1172
+ include ::Google::Protobuf::MessageExts
1173
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1174
+ end
971
1175
  end
972
1176
 
973
1177
  # Metadata for active A/B testing [Experiment][].
@@ -42,7 +42,7 @@ module Google
42
42
  # The error result of the operation in case of failure or cancellation.
43
43
  # @!attribute [rw] response
44
44
  # @return [::Google::Protobuf::Any]
45
- # The normal response of the operation in case of success. If the original
45
+ # The normal, successful response of the operation. If the original
46
46
  # method returns no data on success, such as `Delete`, the response is
47
47
  # `google.protobuf.Empty`. If the original method is standard
48
48
  # `Get`/`Create`/`Update`, the response should be the resource. For other
@@ -55,7 +55,8 @@ module Google
55
55
  extend ::Google::Protobuf::MessageExts::ClassMethods
56
56
  end
57
57
 
58
- # The request message for Operations.GetOperation.
58
+ # The request message for
59
+ # Operations.GetOperation.
59
60
  # @!attribute [rw] name
60
61
  # @return [::String]
61
62
  # The name of the operation resource.
@@ -64,7 +65,8 @@ module Google
64
65
  extend ::Google::Protobuf::MessageExts::ClassMethods
65
66
  end
66
67
 
67
- # The request message for Operations.ListOperations.
68
+ # The request message for
69
+ # Operations.ListOperations.
68
70
  # @!attribute [rw] name
69
71
  # @return [::String]
70
72
  # The name of the operation's parent resource.
@@ -82,7 +84,8 @@ module Google
82
84
  extend ::Google::Protobuf::MessageExts::ClassMethods
83
85
  end
84
86
 
85
- # The response message for Operations.ListOperations.
87
+ # The response message for
88
+ # Operations.ListOperations.
86
89
  # @!attribute [rw] operations
87
90
  # @return [::Array<::Google::Longrunning::Operation>]
88
91
  # A list of operations that matches the specified filter in the request.
@@ -94,7 +97,8 @@ module Google
94
97
  extend ::Google::Protobuf::MessageExts::ClassMethods
95
98
  end
96
99
 
97
- # The request message for Operations.CancelOperation.
100
+ # The request message for
101
+ # Operations.CancelOperation.
98
102
  # @!attribute [rw] name
99
103
  # @return [::String]
100
104
  # The name of the operation resource to be cancelled.
@@ -103,7 +107,8 @@ module Google
103
107
  extend ::Google::Protobuf::MessageExts::ClassMethods
104
108
  end
105
109
 
106
- # The request message for Operations.DeleteOperation.
110
+ # The request message for
111
+ # Operations.DeleteOperation.
107
112
  # @!attribute [rw] name
108
113
  # @return [::String]
109
114
  # The name of the operation resource to be deleted.
@@ -112,7 +117,8 @@ module Google
112
117
  extend ::Google::Protobuf::MessageExts::ClassMethods
113
118
  end
114
119
 
115
- # The request message for Operations.WaitOperation.
120
+ # The request message for
121
+ # Operations.WaitOperation.
116
122
  # @!attribute [rw] name
117
123
  # @return [::String]
118
124
  # The name of the operation resource to wait on.
@@ -130,13 +136,12 @@ module Google
130
136
  #
131
137
  # Example:
132
138
  #
133
- # rpc LongRunningRecognize(LongRunningRecognizeRequest)
134
- # returns (google.longrunning.Operation) {
135
- # option (google.longrunning.operation_info) = {
136
- # response_type: "LongRunningRecognizeResponse"
137
- # metadata_type: "LongRunningRecognizeMetadata"
138
- # };
139
- # }
139
+ # rpc Export(ExportRequest) returns (google.longrunning.Operation) {
140
+ # option (google.longrunning.operation_info) = {
141
+ # response_type: "ExportResponse"
142
+ # metadata_type: "ExportMetadata"
143
+ # };
144
+ # }
140
145
  # @!attribute [rw] response_type
141
146
  # @return [::String]
142
147
  # Required. The message name of the primary return type for this
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: 1.0.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-30 00:00:00.000000000 Z
11
+ date: 2024-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.21.1
19
+ version: 0.24.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.21.1
29
+ version: 0.24.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -123,6 +123,16 @@ files:
123
123
  - lib/google/cloud/retail/v2/control_service_pb.rb
124
124
  - lib/google/cloud/retail/v2/control_service_services_pb.rb
125
125
  - lib/google/cloud/retail/v2/export_config_pb.rb
126
+ - lib/google/cloud/retail/v2/generative_question_pb.rb
127
+ - lib/google/cloud/retail/v2/generative_question_service.rb
128
+ - lib/google/cloud/retail/v2/generative_question_service/client.rb
129
+ - lib/google/cloud/retail/v2/generative_question_service/credentials.rb
130
+ - lib/google/cloud/retail/v2/generative_question_service/paths.rb
131
+ - lib/google/cloud/retail/v2/generative_question_service/rest.rb
132
+ - lib/google/cloud/retail/v2/generative_question_service/rest/client.rb
133
+ - lib/google/cloud/retail/v2/generative_question_service/rest/service_stub.rb
134
+ - lib/google/cloud/retail/v2/generative_question_service_pb.rb
135
+ - lib/google/cloud/retail/v2/generative_question_service_services_pb.rb
126
136
  - lib/google/cloud/retail/v2/import_config_pb.rb
127
137
  - lib/google/cloud/retail/v2/model_pb.rb
128
138
  - lib/google/cloud/retail/v2/model_service.rb
@@ -205,6 +215,8 @@ files:
205
215
  - proto_docs/google/cloud/retail/v2/control.rb
206
216
  - proto_docs/google/cloud/retail/v2/control_service.rb
207
217
  - proto_docs/google/cloud/retail/v2/export_config.rb
218
+ - proto_docs/google/cloud/retail/v2/generative_question.rb
219
+ - proto_docs/google/cloud/retail/v2/generative_question_service.rb
208
220
  - proto_docs/google/cloud/retail/v2/import_config.rb
209
221
  - proto_docs/google/cloud/retail/v2/model.rb
210
222
  - proto_docs/google/cloud/retail/v2/model_service.rb
@@ -247,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
259
  - !ruby/object:Gem::Version
248
260
  version: '0'
249
261
  requirements: []
250
- rubygems_version: 3.5.6
262
+ rubygems_version: 3.5.23
251
263
  signing_key:
252
264
  specification_version: 4
253
265
  summary: Vertex AI Search for Retail API is made up of Retail Search, Browse and Recommendations.