google-cloud-retail-v2 0.6.3 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +6 -1
- data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -4
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +9 -9
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +3 -1
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +0 -8
- data/lib/google/cloud/retail/v2/common_pb.rb +8 -5
- data/lib/google/cloud/retail/v2/completion_service/client.rb +21 -21
- data/lib/google/cloud/retail/v2/completion_service.rb +1 -2
- data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
- data/lib/google/cloud/retail/v2/import_config_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +17 -4
- data/lib/google/cloud/retail/v2/prediction_service_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/product_pb.rb +3 -2
- data/lib/google/cloud/retail/v2/product_service/client.rb +338 -23
- data/lib/google/cloud/retail/v2/product_service_pb.rb +29 -2
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +47 -9
- data/lib/google/cloud/retail/v2/promotion_pb.rb +22 -0
- data/lib/google/cloud/retail/v2/purge_config_pb.rb +3 -2
- data/lib/google/cloud/retail/v2/search_service/client.rb +56 -19
- data/lib/google/cloud/retail/v2/search_service.rb +1 -2
- data/lib/google/cloud/retail/v2/search_service_pb.rb +28 -3
- data/lib/google/cloud/retail/v2/search_service_services_pb.rb +2 -4
- data/lib/google/cloud/retail/v2/user_event_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +5 -3
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +3 -1
- data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +4 -3
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/lib/google/cloud/retail/v2.rb +2 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/retail/v2/catalog.rb +8 -8
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +9 -0
- data/proto_docs/google/cloud/retail/v2/common.rb +100 -25
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +28 -18
- data/proto_docs/google/cloud/retail/v2/import_config.rb +38 -23
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +19 -6
- data/proto_docs/google/cloud/retail/v2/product.rb +50 -41
- data/proto_docs/google/cloud/retail/v2/product_service.rb +154 -6
- data/proto_docs/google/cloud/retail/v2/promotion.rb +43 -0
- data/proto_docs/google/cloud/retail/v2/search_service.rb +162 -28
- data/proto_docs/google/cloud/retail/v2/user_event.rb +30 -14
- data/proto_docs/google/protobuf/any.rb +3 -3
- data/proto_docs/google/protobuf/struct.rb +2 -2
- metadata +5 -3
@@ -39,6 +39,11 @@ module Google
|
|
39
39
|
# @!attribute [rw] query
|
40
40
|
# @return [::String]
|
41
41
|
# Raw search query.
|
42
|
+
#
|
43
|
+
# If this field is empty, the request is considered a category browsing
|
44
|
+
# request and returned results are based on
|
45
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#filter filter} and
|
46
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#page_categories page_categories}.
|
42
47
|
# @!attribute [rw] visitor_id
|
43
48
|
# @return [::String]
|
44
49
|
# Required. A unique identifier for tracking visitors. For example, this
|
@@ -46,6 +51,9 @@ module Google
|
|
46
51
|
# identify a visitor on a single device. This unique identifier should not
|
47
52
|
# change if the visitor logs in or out of the website.
|
48
53
|
#
|
54
|
+
# This should be the same identifier as
|
55
|
+
# {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id}.
|
56
|
+
#
|
49
57
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
50
58
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
51
59
|
# @!attribute [rw] user_info
|
@@ -89,6 +97,9 @@ module Google
|
|
89
97
|
# If this field is unrecognizable, an INVALID_ARGUMENT is returned.
|
90
98
|
# @!attribute [rw] canonical_filter
|
91
99
|
# @return [::String]
|
100
|
+
# The default filter that is applied when a user performs a search without
|
101
|
+
# checking any filters on the search page.
|
102
|
+
#
|
92
103
|
# The filter applied to every search request when quality improvement such as
|
93
104
|
# query expansion is needed. For example, if a query does not have enough
|
94
105
|
# results, an expanded query with
|
@@ -115,21 +126,21 @@ module Google
|
|
115
126
|
# is returned.
|
116
127
|
# @!attribute [rw] dynamic_facet_spec
|
117
128
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec]
|
129
|
+
# Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic
|
130
|
+
# to enable dynamic facets. Do not set this field.
|
131
|
+
#
|
118
132
|
# The specification for dynamically generated facets. Notice that only
|
119
133
|
# textual facets can be dynamically generated.
|
120
|
-
#
|
121
|
-
# This feature requires additional allowlisting. Contact Retail Search
|
122
|
-
# support team if you are interested in using dynamic facet feature.
|
123
134
|
# @!attribute [rw] boost_spec
|
124
135
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::BoostSpec]
|
125
136
|
# Boost specification to boost certain products. See more details at this
|
126
137
|
# [user guide](https://cloud.google.com/retail/docs/boosting).
|
127
138
|
#
|
128
139
|
# Notice that if both [ServingConfig.boost_control_ids][] and
|
129
|
-
#
|
130
|
-
# are evaluated. If a search
|
131
|
-
#
|
132
|
-
# matched boost conditions.
|
140
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}
|
141
|
+
# are set, the boost conditions from both places are evaluated. If a search
|
142
|
+
# request matches multiple boost conditions, the final boost score is equal
|
143
|
+
# to the sum of the boost scores from all matched boost conditions.
|
133
144
|
# @!attribute [rw] query_expansion_spec
|
134
145
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec]
|
135
146
|
# The query expansion specification that specifies the conditions under which
|
@@ -139,12 +150,15 @@ module Google
|
|
139
150
|
# @return [::Array<::String>]
|
140
151
|
# The keys to fetch and rollup the matching
|
141
152
|
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
|
142
|
-
# {::Google::Cloud::Retail::V2::Product Product}s attributes
|
143
|
-
#
|
144
|
-
# {::Google::Cloud::Retail::V2::
|
145
|
-
#
|
146
|
-
# {::Google::Cloud::Retail::V2::Product
|
147
|
-
#
|
153
|
+
# {::Google::Cloud::Retail::V2::Product Product}s attributes,
|
154
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo} or
|
155
|
+
# {::Google::Cloud::Retail::V2::LocalInventory LocalInventory}s attributes. The
|
156
|
+
# attributes from all the matching
|
157
|
+
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
|
158
|
+
# {::Google::Cloud::Retail::V2::Product Product}s or
|
159
|
+
# {::Google::Cloud::Retail::V2::LocalInventory LocalInventory}s are merged and
|
160
|
+
# de-duplicated. Notice that rollup attributes will lead to extra query
|
161
|
+
# latency. Maximum number of keys is 30.
|
148
162
|
#
|
149
163
|
# For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, a
|
150
164
|
# fulfillment type and a fulfillment ID must be provided in the format of
|
@@ -159,8 +173,10 @@ module Google
|
|
159
173
|
# * discount
|
160
174
|
# * variantId
|
161
175
|
# * inventory(place_id,price)
|
176
|
+
# * inventory(place_id,original_price)
|
162
177
|
# * inventory(place_id,attributes.key), where key is any key in the
|
163
|
-
#
|
178
|
+
# {::Google::Cloud::Retail::V2::LocalInventory#attributes Product.local_inventories.attributes}
|
179
|
+
# map.
|
164
180
|
# * attributes.key, where key is any key in the
|
165
181
|
# {::Google::Cloud::Retail::V2::Product#attributes Product.attributes} map.
|
166
182
|
# * pickupInStore.id, where id is any
|
@@ -220,6 +236,32 @@ module Google
|
|
220
236
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::SearchMode]
|
221
237
|
# The search mode of the search request. If not specified, a single search
|
222
238
|
# request triggers both product search and faceted search.
|
239
|
+
# @!attribute [rw] personalization_spec
|
240
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec]
|
241
|
+
# The specification for personalization.
|
242
|
+
# @!attribute [rw] labels
|
243
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
244
|
+
# The labels applied to a resource must meet the following requirements:
|
245
|
+
#
|
246
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
247
|
+
# * Each label must be a key-value pair.
|
248
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
249
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
250
|
+
# length of 63 characters.
|
251
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
252
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
253
|
+
# international characters are allowed.
|
254
|
+
# * The key portion of a label must be unique. However, you can use the same
|
255
|
+
# key with multiple resources.
|
256
|
+
# * Keys must start with a lowercase letter or international character.
|
257
|
+
#
|
258
|
+
# See [Google Cloud
|
259
|
+
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
260
|
+
# for more details.
|
261
|
+
# @!attribute [rw] spell_correction_spec
|
262
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec]
|
263
|
+
# The spell correction specification that specifies the mode under
|
264
|
+
# which spell correction will take effect.
|
223
265
|
class SearchRequest
|
224
266
|
include ::Google::Protobuf::MessageExts
|
225
267
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -239,19 +281,29 @@ module Google
|
|
239
281
|
# @return [::Array<::String>]
|
240
282
|
# List of keys to exclude when faceting.
|
241
283
|
#
|
284
|
+
#
|
242
285
|
# By default,
|
243
286
|
# {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#key FacetKey.key}
|
244
287
|
# is not excluded from the filter unless it is listed in this field.
|
245
288
|
#
|
246
|
-
#
|
247
|
-
#
|
248
|
-
#
|
289
|
+
# Listing a facet key in this field allows its values to appear as facet
|
290
|
+
# results, even when they are filtered out of search results. Using this
|
291
|
+
# field does not affect what search results are returned.
|
292
|
+
#
|
293
|
+
# For example, suppose there are 100 products with the color facet "Red"
|
294
|
+
# and 200 products with the color facet "Blue". A query containing the
|
295
|
+
# filter "colorFamilies:ANY("Red")" and having "colorFamilies" as
|
249
296
|
# {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#key FacetKey.key}
|
250
|
-
#
|
297
|
+
# would by default return only "Red" products in the search results, and
|
298
|
+
# also return "Red" with count 100 as the only color facet. Although there
|
299
|
+
# are also blue products available, "Blue" would not be shown as an
|
300
|
+
# available facet value.
|
251
301
|
#
|
252
|
-
# If
|
253
|
-
# "Red" with count 100 and "Blue" with count
|
254
|
-
# "colorFamilies" key is now excluded from the filter.
|
302
|
+
# If "colorFamilies" is listed in "excludedFilterKeys", then the query
|
303
|
+
# returns the facet values "Red" with count 100 and "Blue" with count
|
304
|
+
# 200, because the "colorFamilies" key is now excluded from the filter.
|
305
|
+
# Because this field doesn't affect search results, the search results
|
306
|
+
# are still correctly filtered to return only "Red" products.
|
255
307
|
#
|
256
308
|
# A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error
|
257
309
|
# is returned.
|
@@ -331,6 +383,7 @@ module Google
|
|
331
383
|
# * "ratingCount"
|
332
384
|
# * "attributes.key"
|
333
385
|
# * "inventory(place_id,price)"
|
386
|
+
# * "inventory(place_id,original_price)"
|
334
387
|
# * "inventory(place_id,attributes.key)"
|
335
388
|
# @!attribute [rw] intervals
|
336
389
|
# @return [::Array<::Google::Cloud::Retail::V2::Interval>]
|
@@ -342,8 +395,8 @@ module Google
|
|
342
395
|
# Only get facet for the given restricted values. For example, when using
|
343
396
|
# "pickupInStore" as key and set restricted values to
|
344
397
|
# ["store123", "store456"], only facets for "store123" and "store456" are
|
345
|
-
# returned. Only supported on textual fields
|
346
|
-
# Maximum is 20.
|
398
|
+
# returned. Only supported on predefined textual fields, custom textual
|
399
|
+
# attributes and fulfillments. Maximum is 20.
|
347
400
|
#
|
348
401
|
# Must be set for the fulfillment facet keys:
|
349
402
|
#
|
@@ -456,7 +509,15 @@ module Google
|
|
456
509
|
# Condition boost specifications. If a product matches multiple conditions
|
457
510
|
# in the specifictions, boost scores from these specifications are all
|
458
511
|
# applied and combined in a non-linear way. Maximum number of
|
459
|
-
# specifications is
|
512
|
+
# specifications is 20.
|
513
|
+
# @!attribute [rw] skip_boost_spec_validation
|
514
|
+
# @return [::Boolean]
|
515
|
+
# Whether to skip boostspec validation. If this field is set to true,
|
516
|
+
# invalid
|
517
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::BoostSpec#condition_boost_specs BoostSpec.condition_boost_specs}
|
518
|
+
# will be ignored and valid
|
519
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::BoostSpec#condition_boost_specs BoostSpec.condition_boost_specs}
|
520
|
+
# will still be applied.
|
460
521
|
class BoostSpec
|
461
522
|
include ::Google::Protobuf::MessageExts
|
462
523
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -532,6 +593,66 @@ module Google
|
|
532
593
|
end
|
533
594
|
end
|
534
595
|
|
596
|
+
# The specification for personalization.
|
597
|
+
# @!attribute [rw] mode
|
598
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode]
|
599
|
+
# Defaults to
|
600
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO Mode.AUTO}.
|
601
|
+
class PersonalizationSpec
|
602
|
+
include ::Google::Protobuf::MessageExts
|
603
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
604
|
+
|
605
|
+
# The personalization mode of each search request.
|
606
|
+
module Mode
|
607
|
+
# Default value. Defaults to
|
608
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO Mode.AUTO}.
|
609
|
+
MODE_UNSPECIFIED = 0
|
610
|
+
|
611
|
+
# Let CRS decide whether to use personalization.
|
612
|
+
AUTO = 1
|
613
|
+
|
614
|
+
# Disable personalization.
|
615
|
+
DISABLED = 2
|
616
|
+
end
|
617
|
+
end
|
618
|
+
|
619
|
+
# The specification for query spell correction.
|
620
|
+
# @!attribute [rw] mode
|
621
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec::Mode]
|
622
|
+
# The mode under which spell correction should take effect to
|
623
|
+
# replace the original search query. Default to
|
624
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec::Mode::AUTO Mode.AUTO}.
|
625
|
+
class SpellCorrectionSpec
|
626
|
+
include ::Google::Protobuf::MessageExts
|
627
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
628
|
+
|
629
|
+
# Enum describing under which mode spell correction should occur.
|
630
|
+
module Mode
|
631
|
+
# Unspecified spell correction mode. This defaults to
|
632
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec::Mode::AUTO Mode.AUTO}.
|
633
|
+
MODE_UNSPECIFIED = 0
|
634
|
+
|
635
|
+
# Google Retail Search will try to find a spell suggestion if there
|
636
|
+
# is any and put in the
|
637
|
+
# {::Google::Cloud::Retail::V2::SearchResponse#corrected_query SearchResponse.corrected_query}.
|
638
|
+
# The spell suggestion will not be used as the search query.
|
639
|
+
SUGGESTION_ONLY = 1
|
640
|
+
|
641
|
+
# Automatic spell correction built by Google Retail Search. Search will
|
642
|
+
# be based on the corrected query if found.
|
643
|
+
AUTO = 2
|
644
|
+
end
|
645
|
+
end
|
646
|
+
|
647
|
+
# @!attribute [rw] key
|
648
|
+
# @return [::String]
|
649
|
+
# @!attribute [rw] value
|
650
|
+
# @return [::String]
|
651
|
+
class LabelsEntry
|
652
|
+
include ::Google::Protobuf::MessageExts
|
653
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
654
|
+
end
|
655
|
+
|
535
656
|
# The search mode of each search request.
|
536
657
|
module SearchMode
|
537
658
|
# Default value. In this case both product search and faceted search will
|
@@ -553,7 +674,9 @@ module Google
|
|
553
674
|
# Only faceted search will be performed. The product search will be
|
554
675
|
# disabled.
|
555
676
|
#
|
556
|
-
# When in this mode, one or both of
|
677
|
+
# When in this mode, one or both of
|
678
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#facet_specs SearchRequest.facet_specs}
|
679
|
+
# and
|
557
680
|
# {::Google::Cloud::Retail::V2::SearchRequest#dynamic_facet_spec SearchRequest.dynamic_facet_spec}
|
558
681
|
# should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
|
559
682
|
# [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
|
@@ -579,7 +702,9 @@ module Google
|
|
579
702
|
# matches.
|
580
703
|
# @!attribute [rw] corrected_query
|
581
704
|
# @return [::String]
|
582
|
-
#
|
705
|
+
# Contains the spell corrected query, if found. If the spell correction type
|
706
|
+
# is AUTOMATIC, then the search results are based on corrected_query.
|
707
|
+
# Otherwise the original query will be used for search.
|
583
708
|
# @!attribute [rw] attribution_token
|
584
709
|
# @return [::String]
|
585
710
|
# A unique search token. This should be included in the
|
@@ -597,10 +722,19 @@ module Google
|
|
597
722
|
# @!attribute [rw] redirect_uri
|
598
723
|
# @return [::String]
|
599
724
|
# The URI of a customer-defined redirect page. If redirect action is
|
600
|
-
# triggered, no search
|
725
|
+
# triggered, no search is performed, and only
|
601
726
|
# {::Google::Cloud::Retail::V2::SearchResponse#redirect_uri redirect_uri} and
|
602
727
|
# {::Google::Cloud::Retail::V2::SearchResponse#attribution_token attribution_token}
|
603
|
-
#
|
728
|
+
# are set in the response.
|
729
|
+
# @!attribute [rw] applied_controls
|
730
|
+
# @return [::Array<::String>]
|
731
|
+
# The fully qualified resource name of applied
|
732
|
+
# [controls](https://cloud.google.com/retail/docs/serving-control-rules).
|
733
|
+
# @!attribute [rw] invalid_condition_boost_specs
|
734
|
+
# @return [::Array<::Google::Cloud::Retail::V2::SearchRequest::BoostSpec::ConditionBoostSpec>]
|
735
|
+
# The invalid
|
736
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::BoostSpec#condition_boost_specs SearchRequest.BoostSpec.condition_boost_specs}
|
737
|
+
# that are not applied during serving.
|
604
738
|
class SearchResponse
|
605
739
|
include ::Google::Protobuf::MessageExts
|
606
740
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -30,7 +30,6 @@ module Google
|
|
30
30
|
# * `add-to-cart`: Products being added to cart.
|
31
31
|
# * `category-page-view`: Special pages such as sale or promotion pages
|
32
32
|
# viewed.
|
33
|
-
# * `completion`: Completion query result showed/clicked.
|
34
33
|
# * `detail-page-view`: Products detail page viewed.
|
35
34
|
# * `home-page-view`: Homepage viewed.
|
36
35
|
# * `promotion-offered`: Promotion is offered to a user.
|
@@ -46,11 +45,15 @@ module Google
|
|
46
45
|
# able to uniquely identify a visitor on a single device. This unique
|
47
46
|
# identifier should not change if the visitor log in/out of the website.
|
48
47
|
#
|
48
|
+
# Don't set the field to the same fixed ID for different users. This mixes
|
49
|
+
# the event history of those users together, which results in degraded model
|
50
|
+
# quality.
|
51
|
+
#
|
49
52
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
50
53
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
51
54
|
#
|
52
55
|
# The field should not contain PII or user-data. We recommend to use Google
|
53
|
-
#
|
56
|
+
# Analytics [Client
|
54
57
|
# ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
|
55
58
|
# for this field.
|
56
59
|
# @!attribute [rw] session_id
|
@@ -103,7 +106,7 @@ module Google
|
|
103
106
|
# @return [::Array<::Google::Cloud::Retail::V2::ProductDetail>]
|
104
107
|
# The main product details related to the event.
|
105
108
|
#
|
106
|
-
# This field is
|
109
|
+
# This field is optional except for the following event types:
|
107
110
|
#
|
108
111
|
# * `add-to-cart`
|
109
112
|
# * `detail-page-view`
|
@@ -118,22 +121,35 @@ module Google
|
|
118
121
|
# desired. The end user may have not finished browsing the whole page yet.
|
119
122
|
# @!attribute [rw] completion_detail
|
120
123
|
# @return [::Google::Cloud::Retail::V2::CompletionDetail]
|
121
|
-
# The main completion details related to the event.
|
124
|
+
# The main auto-completion details related to the event.
|
122
125
|
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
# event, it represents the search event happens after clicking completion.
|
126
|
+
# This field should be set for `search` event when autocomplete function is
|
127
|
+
# enabled and the user clicks a suggestion for search.
|
126
128
|
# @!attribute [rw] attributes
|
127
129
|
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
|
128
130
|
# Extra user event features to include in the recommendation model.
|
129
131
|
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
132
|
+
# If you provide custom attributes for ingested user events, also include
|
133
|
+
# them in the user events that you associate with prediction requests. Custom
|
134
|
+
# attribute formatting must be consistent between imported events and events
|
135
|
+
# provided with prediction requests. This lets the Retail API use
|
136
|
+
# those custom attributes when training models and serving predictions, which
|
137
|
+
# helps improve recommendation quality.
|
138
|
+
#
|
139
|
+
# This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
|
140
|
+
# error is returned:
|
141
|
+
#
|
142
|
+
# * The key must be a UTF-8 encoded string with a length limit of 5,000
|
143
|
+
# characters.
|
144
|
+
# * For text attributes, at most 400 values are allowed. Empty values are not
|
145
|
+
# allowed. Each value must be a UTF-8 encoded string with a length limit of
|
146
|
+
# 256 characters.
|
147
|
+
# * For number attributes, at most 400 values are allowed.
|
148
|
+
#
|
149
|
+
# For product recommendations, an example of extra user information is
|
150
|
+
# traffic_channel, which is how a user arrives at the site. Users can arrive
|
151
|
+
# at the site by coming to the site directly, coming through Google
|
152
|
+
# search, or in other ways.
|
137
153
|
# @!attribute [rw] cart_id
|
138
154
|
# @return [::String]
|
139
155
|
# The ID or name of the associated shopping cart. This ID is used
|
@@ -44,7 +44,7 @@ module Google
|
|
44
44
|
# foo = any.unpack(Foo.class);
|
45
45
|
# }
|
46
46
|
#
|
47
|
-
#
|
47
|
+
# Example 3: Pack and unpack a message in Python.
|
48
48
|
#
|
49
49
|
# foo = Foo(...)
|
50
50
|
# any = Any()
|
@@ -54,7 +54,7 @@ module Google
|
|
54
54
|
# any.Unpack(foo)
|
55
55
|
# ...
|
56
56
|
#
|
57
|
-
#
|
57
|
+
# Example 4: Pack and unpack a message in Go
|
58
58
|
#
|
59
59
|
# foo := &pb.Foo{...}
|
60
60
|
# any, err := anypb.New(foo)
|
@@ -75,7 +75,7 @@ module Google
|
|
75
75
|
#
|
76
76
|
#
|
77
77
|
# JSON
|
78
|
-
#
|
78
|
+
#
|
79
79
|
# The JSON representation of an `Any` value uses the regular
|
80
80
|
# representation of the deserialized, embedded message, with an
|
81
81
|
# additional field `@type` which contains the type URL. Example:
|
@@ -46,8 +46,8 @@ module Google
|
|
46
46
|
|
47
47
|
# `Value` represents a dynamically typed value which can be either
|
48
48
|
# null, a number, a string, a boolean, a recursive struct value, or a
|
49
|
-
# list of values. A producer of value is expected to set one of
|
50
|
-
# variants
|
49
|
+
# list of values. A producer of value is expected to set one of these
|
50
|
+
# variants. Absence of any variant indicates an error.
|
51
51
|
#
|
52
52
|
# The JSON representation for `Value` is JSON value.
|
53
53
|
# @!attribute [rw] null_value
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-retail-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.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:
|
11
|
+
date: 2022-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- lib/google/cloud/retail/v2/product_service/paths.rb
|
203
203
|
- lib/google/cloud/retail/v2/product_service_pb.rb
|
204
204
|
- lib/google/cloud/retail/v2/product_service_services_pb.rb
|
205
|
+
- lib/google/cloud/retail/v2/promotion_pb.rb
|
205
206
|
- lib/google/cloud/retail/v2/purge_config_pb.rb
|
206
207
|
- lib/google/cloud/retail/v2/search_service.rb
|
207
208
|
- lib/google/cloud/retail/v2/search_service/client.rb
|
@@ -230,6 +231,7 @@ files:
|
|
230
231
|
- proto_docs/google/cloud/retail/v2/prediction_service.rb
|
231
232
|
- proto_docs/google/cloud/retail/v2/product.rb
|
232
233
|
- proto_docs/google/cloud/retail/v2/product_service.rb
|
234
|
+
- proto_docs/google/cloud/retail/v2/promotion.rb
|
233
235
|
- proto_docs/google/cloud/retail/v2/purge_config.rb
|
234
236
|
- proto_docs/google/cloud/retail/v2/search_service.rb
|
235
237
|
- proto_docs/google/cloud/retail/v2/user_event.rb
|
@@ -263,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
265
|
- !ruby/object:Gem::Version
|
264
266
|
version: '0'
|
265
267
|
requirements: []
|
266
|
-
rubygems_version: 3.
|
268
|
+
rubygems_version: 3.3.14
|
267
269
|
signing_key:
|
268
270
|
specification_version: 4
|
269
271
|
summary: API Client library for the Retail V2 API
|