google-cloud-retail-v2 0.6.4 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/retail/v2/catalog_pb.rb +0 -3
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +9 -9
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +0 -8
- data/lib/google/cloud/retail/v2/common_pb.rb +6 -4
- data/lib/google/cloud/retail/v2/completion_service/client.rb +17 -18
- data/lib/google/cloud/retail/v2/completion_service.rb +1 -2
- data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
- data/lib/google/cloud/retail/v2/import_config_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +6 -3
- data/lib/google/cloud/retail/v2/product_pb.rb +1 -1
- data/lib/google/cloud/retail/v2/product_service/client.rb +319 -18
- data/lib/google/cloud/retail/v2/product_service_pb.rb +27 -1
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +45 -7
- data/lib/google/cloud/retail/v2/promotion_pb.rb +22 -0
- data/lib/google/cloud/retail/v2/purge_config_pb.rb +1 -1
- data/lib/google/cloud/retail/v2/search_service/client.rb +25 -15
- data/lib/google/cloud/retail/v2/search_service.rb +1 -2
- data/lib/google/cloud/retail/v2/search_service_pb.rb +14 -2
- data/lib/google/cloud/retail/v2/search_service_services_pb.rb +2 -4
- data/lib/google/cloud/retail/v2/user_event_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +4 -3
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +1 -0
- 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/cloud/retail/v2/catalog_service.rb +9 -0
- data/proto_docs/google/cloud/retail/v2/common.rb +88 -25
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +18 -15
- data/proto_docs/google/cloud/retail/v2/import_config.rb +29 -21
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +6 -3
- data/proto_docs/google/cloud/retail/v2/product.rb +48 -39
- data/proto_docs/google/cloud/retail/v2/product_service.rb +134 -2
- data/proto_docs/google/cloud/retail/v2/promotion.rb +43 -0
- data/proto_docs/google/cloud/retail/v2/search_service.rb +64 -10
- data/proto_docs/google/cloud/retail/v2/user_event.rb +25 -12
- metadata +5 -3
@@ -30,8 +30,7 @@ module Google
|
|
30
30
|
# Service for search.
|
31
31
|
#
|
32
32
|
# This feature is only available for users who have Retail Search enabled.
|
33
|
-
# Please
|
34
|
-
# cloud sales if you are interested in using Retail Search.
|
33
|
+
# Please enable Retail Search on Cloud Console before using this feature.
|
35
34
|
#
|
36
35
|
class Client
|
37
36
|
include Paths
|
@@ -157,8 +156,7 @@ module Google
|
|
157
156
|
# Performs a search.
|
158
157
|
#
|
159
158
|
# This feature is only available for users who have Retail Search enabled.
|
160
|
-
# Please
|
161
|
-
# cloud sales if you are interested in using Retail Search.
|
159
|
+
# Please enable Retail Search on Cloud Console before using this feature.
|
162
160
|
#
|
163
161
|
# @overload search(request, options = nil)
|
164
162
|
# Pass arguments to `search` via a request object, either of type
|
@@ -170,14 +168,14 @@ module Google
|
|
170
168
|
# @param options [::Gapic::CallOptions, ::Hash]
|
171
169
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
172
170
|
#
|
173
|
-
# @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)
|
171
|
+
# @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)
|
174
172
|
# Pass arguments to `search` via keyword arguments. Note that at
|
175
173
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
176
174
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
177
175
|
#
|
178
176
|
# @param placement [::String]
|
179
177
|
# Required. The resource name of the search engine placement, such as
|
180
|
-
# `projects/*/locations/global/catalogs/default_catalog/placements/default_search
|
178
|
+
# `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
|
181
179
|
# This field is used to identify the serving configuration name and the set
|
182
180
|
# of models that will be used to make the search.
|
183
181
|
# @param branch [::String]
|
@@ -194,6 +192,9 @@ module Google
|
|
194
192
|
# identify a visitor on a single device. This unique identifier should not
|
195
193
|
# change if the visitor logs in or out of the website.
|
196
194
|
#
|
195
|
+
# This should be the same identifier as
|
196
|
+
# {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id}.
|
197
|
+
#
|
197
198
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
198
199
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
199
200
|
# @param user_info [::Google::Cloud::Retail::V2::UserInfo, ::Hash]
|
@@ -231,6 +232,9 @@ module Google
|
|
231
232
|
#
|
232
233
|
# If this field is unrecognizable, an INVALID_ARGUMENT is returned.
|
233
234
|
# @param canonical_filter [::String]
|
235
|
+
# The default filter that is applied when a user performs a search without
|
236
|
+
# checking any filters on the search page.
|
237
|
+
#
|
234
238
|
# The filter applied to every search request when quality improvement such as
|
235
239
|
# query expansion is needed. For example, if a query does not have enough
|
236
240
|
# results, an expanded query with
|
@@ -254,11 +258,11 @@ module Google
|
|
254
258
|
# A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error
|
255
259
|
# is returned.
|
256
260
|
# @param dynamic_facet_spec [::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec, ::Hash]
|
261
|
+
# Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic
|
262
|
+
# to enable dynamic facets. Do not set this field.
|
263
|
+
#
|
257
264
|
# The specification for dynamically generated facets. Notice that only
|
258
265
|
# textual facets can be dynamically generated.
|
259
|
-
#
|
260
|
-
# This feature requires additional allowlisting. Contact Retail Search
|
261
|
-
# support team if you are interested in using dynamic facet feature.
|
262
266
|
# @param boost_spec [::Google::Cloud::Retail::V2::SearchRequest::BoostSpec, ::Hash]
|
263
267
|
# Boost specification to boost certain products. See more details at this
|
264
268
|
# [user guide](https://cloud.google.com/retail/docs/boosting).
|
@@ -275,12 +279,15 @@ module Google
|
|
275
279
|
# @param variant_rollup_keys [::Array<::String>]
|
276
280
|
# The keys to fetch and rollup the matching
|
277
281
|
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
|
278
|
-
# {::Google::Cloud::Retail::V2::Product Product}s attributes
|
279
|
-
#
|
280
|
-
# {::Google::Cloud::Retail::V2::
|
281
|
-
#
|
282
|
-
# {::Google::Cloud::Retail::V2::Product
|
283
|
-
#
|
282
|
+
# {::Google::Cloud::Retail::V2::Product Product}s attributes,
|
283
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo} or
|
284
|
+
# {::Google::Cloud::Retail::V2::LocalInventory LocalInventory}s attributes. The
|
285
|
+
# attributes from all the matching
|
286
|
+
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
|
287
|
+
# {::Google::Cloud::Retail::V2::Product Product}s or
|
288
|
+
# {::Google::Cloud::Retail::V2::LocalInventory LocalInventory}s are merged and
|
289
|
+
# de-duplicated. Notice that rollup attributes will lead to extra query
|
290
|
+
# latency. Maximum number of keys is 30.
|
284
291
|
#
|
285
292
|
# For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, a
|
286
293
|
# fulfillment type and a fulfillment ID must be provided in the format of
|
@@ -295,6 +302,7 @@ module Google
|
|
295
302
|
# * discount
|
296
303
|
# * variantId
|
297
304
|
# * inventory(place_id,price)
|
305
|
+
# * inventory(place_id,original_price)
|
298
306
|
# * inventory(place_id,attributes.key), where key is any key in the
|
299
307
|
# [Product.inventories.attributes][] map.
|
300
308
|
# * attributes.key, where key is any key in the
|
@@ -354,6 +362,8 @@ module Google
|
|
354
362
|
# @param search_mode [::Google::Cloud::Retail::V2::SearchRequest::SearchMode]
|
355
363
|
# The search mode of the search request. If not specified, a single search
|
356
364
|
# request triggers both product search and faceted search.
|
365
|
+
# @param personalization_spec [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec, ::Hash]
|
366
|
+
# The specification for personalization.
|
357
367
|
#
|
358
368
|
# @yield [response, operation] Access the result along with the RPC operation
|
359
369
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>]
|
@@ -34,8 +34,7 @@ module Google
|
|
34
34
|
# Service for search.
|
35
35
|
#
|
36
36
|
# This feature is only available for users who have Retail Search enabled.
|
37
|
-
# Please
|
38
|
-
# cloud sales if you are interested in using Retail Search.
|
37
|
+
# Please enable Retail Search on Cloud Console before using this feature.
|
39
38
|
#
|
40
39
|
# To load this service and instantiate a client:
|
41
40
|
#
|
@@ -9,8 +9,6 @@ require 'google/cloud/retail/v2/common_pb'
|
|
9
9
|
require 'google/cloud/retail/v2/product_pb'
|
10
10
|
require 'google/protobuf/field_mask_pb'
|
11
11
|
require 'google/protobuf/struct_pb'
|
12
|
-
require 'google/protobuf/timestamp_pb'
|
13
|
-
require 'google/protobuf/wrappers_pb'
|
14
12
|
require 'google/protobuf'
|
15
13
|
|
16
14
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
@@ -34,6 +32,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
34
32
|
repeated :variant_rollup_keys, :string, 17
|
35
33
|
repeated :page_categories, :string, 23
|
36
34
|
optional :search_mode, :enum, 31, "google.cloud.retail.v2.SearchRequest.SearchMode"
|
35
|
+
optional :personalization_spec, :message, 32, "google.cloud.retail.v2.SearchRequest.PersonalizationSpec"
|
37
36
|
end
|
38
37
|
add_message "google.cloud.retail.v2.SearchRequest.FacetSpec" do
|
39
38
|
optional :facet_key, :message, 1, "google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey"
|
@@ -60,6 +59,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
60
59
|
end
|
61
60
|
add_message "google.cloud.retail.v2.SearchRequest.BoostSpec" do
|
62
61
|
repeated :condition_boost_specs, :message, 1, "google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec"
|
62
|
+
proto3_optional :skip_boost_spec_validation, :bool, 2
|
63
63
|
end
|
64
64
|
add_message "google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec" do
|
65
65
|
optional :condition, :string, 1
|
@@ -74,6 +74,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
74
74
|
value :DISABLED, 1
|
75
75
|
value :AUTO, 3
|
76
76
|
end
|
77
|
+
add_message "google.cloud.retail.v2.SearchRequest.PersonalizationSpec" do
|
78
|
+
optional :mode, :enum, 1, "google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode"
|
79
|
+
end
|
80
|
+
add_enum "google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode" do
|
81
|
+
value :MODE_UNSPECIFIED, 0
|
82
|
+
value :AUTO, 1
|
83
|
+
value :DISABLED, 2
|
84
|
+
end
|
77
85
|
add_enum "google.cloud.retail.v2.SearchRequest.SearchMode" do
|
78
86
|
value :SEARCH_MODE_UNSPECIFIED, 0
|
79
87
|
value :PRODUCT_SEARCH_ONLY, 1
|
@@ -88,6 +96,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
88
96
|
optional :next_page_token, :string, 6
|
89
97
|
optional :query_expansion_info, :message, 7, "google.cloud.retail.v2.SearchResponse.QueryExpansionInfo"
|
90
98
|
optional :redirect_uri, :string, 10
|
99
|
+
repeated :applied_controls, :string, 12
|
100
|
+
repeated :invalid_condition_boost_specs, :message, 14, "google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec"
|
91
101
|
end
|
92
102
|
add_message "google.cloud.retail.v2.SearchResponse.SearchResult" do
|
93
103
|
optional :id, :string, 1
|
@@ -128,6 +138,8 @@ module Google
|
|
128
138
|
SearchRequest::BoostSpec::ConditionBoostSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec").msgclass
|
129
139
|
SearchRequest::QueryExpansionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.QueryExpansionSpec").msgclass
|
130
140
|
SearchRequest::QueryExpansionSpec::Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition").enummodule
|
141
|
+
SearchRequest::PersonalizationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.PersonalizationSpec").msgclass
|
142
|
+
SearchRequest::PersonalizationSpec::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode").enummodule
|
131
143
|
SearchRequest::SearchMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.SearchMode").enummodule
|
132
144
|
SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse").msgclass
|
133
145
|
SearchResponse::SearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse.SearchResult").msgclass
|
@@ -27,8 +27,7 @@ module Google
|
|
27
27
|
# Service for search.
|
28
28
|
#
|
29
29
|
# This feature is only available for users who have Retail Search enabled.
|
30
|
-
# Please
|
31
|
-
# cloud sales if you are interested in using Retail Search.
|
30
|
+
# Please enable Retail Search on Cloud Console before using this feature.
|
32
31
|
class Service
|
33
32
|
|
34
33
|
include ::GRPC::GenericService
|
@@ -40,8 +39,7 @@ module Google
|
|
40
39
|
# Performs a search.
|
41
40
|
#
|
42
41
|
# This feature is only available for users who have Retail Search enabled.
|
43
|
-
# Please
|
44
|
-
# cloud sales if you are interested in using Retail Search.
|
42
|
+
# Please enable Retail Search on Cloud Console before using this feature.
|
45
43
|
rpc :Search, ::Google::Cloud::Retail::V2::SearchRequest, ::Google::Cloud::Retail::V2::SearchResponse
|
46
44
|
end
|
47
45
|
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/retail/v2/user_event.proto
|
3
3
|
|
4
|
-
require 'google/api/annotations_pb'
|
5
4
|
require 'google/api/field_behavior_pb'
|
6
5
|
require 'google/cloud/retail/v2/common_pb'
|
7
6
|
require 'google/cloud/retail/v2/product_pb'
|
@@ -593,13 +593,14 @@ module Google
|
|
593
593
|
end
|
594
594
|
|
595
595
|
##
|
596
|
-
#
|
596
|
+
# Starts a user event rejoin operation with latest product catalog. Events
|
597
597
|
# will not be annotated with detailed product information if product is
|
598
598
|
# missing from the catalog at the time the user event is ingested, and these
|
599
599
|
# events are stored as unjoined events with a limited usage on training and
|
600
|
-
# serving. This
|
600
|
+
# serving. This method can be used to start a join operation on specified
|
601
601
|
# events with latest version of product catalog. It can also be used to
|
602
|
-
# correct events joined with wrong product catalog.
|
602
|
+
# correct events joined with the wrong product catalog. A rejoin operation
|
603
|
+
# can take hours or days to complete.
|
603
604
|
#
|
604
605
|
# @overload rejoin_user_events(request, options = nil)
|
605
606
|
# Pass arguments to `rejoin_user_events` via a request object, either of type
|
@@ -5,6 +5,7 @@ require 'google/api/annotations_pb'
|
|
5
5
|
require 'google/api/client_pb'
|
6
6
|
require 'google/api/field_behavior_pb'
|
7
7
|
require 'google/api/httpbody_pb'
|
8
|
+
require 'google/api/resource_pb'
|
8
9
|
require 'google/cloud/retail/v2/import_config_pb'
|
9
10
|
require 'google/cloud/retail/v2/purge_config_pb'
|
10
11
|
require 'google/cloud/retail/v2/user_event_pb'
|
@@ -54,13 +54,14 @@ module Google
|
|
54
54
|
# possible for a subset of the items to be successfully inserted.
|
55
55
|
# Operation.metadata is of type ImportMetadata.
|
56
56
|
rpc :ImportUserEvents, ::Google::Cloud::Retail::V2::ImportUserEventsRequest, ::Google::Longrunning::Operation
|
57
|
-
#
|
57
|
+
# Starts a user event rejoin operation with latest product catalog. Events
|
58
58
|
# will not be annotated with detailed product information if product is
|
59
59
|
# missing from the catalog at the time the user event is ingested, and these
|
60
60
|
# events are stored as unjoined events with a limited usage on training and
|
61
|
-
# serving. This
|
61
|
+
# serving. This method can be used to start a join operation on specified
|
62
62
|
# events with latest version of product catalog. It can also be used to
|
63
|
-
# correct events joined with wrong product catalog.
|
63
|
+
# correct events joined with the wrong product catalog. A rejoin operation
|
64
|
+
# can take hours or days to complete.
|
64
65
|
rpc :RejoinUserEvents, ::Google::Cloud::Retail::V2::RejoinUserEventsRequest, ::Google::Longrunning::Operation
|
65
66
|
end
|
66
67
|
|
@@ -109,6 +109,10 @@ module Google
|
|
109
109
|
#
|
110
110
|
# This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT
|
111
111
|
# error is returned.
|
112
|
+
#
|
113
|
+
# If there are no sufficient active products in the targeted branch and
|
114
|
+
# {::Google::Cloud::Retail::V2::SetDefaultBranchRequest#force force} is not set, a
|
115
|
+
# FAILED_PRECONDITION error is returned.
|
112
116
|
# @!attribute [rw] note
|
113
117
|
# @return [::String]
|
114
118
|
# Some note on this request, this can be retrieved by
|
@@ -117,6 +121,11 @@ module Google
|
|
117
121
|
#
|
118
122
|
# This field must be a UTF-8 encoded string with a length limit of 1,000
|
119
123
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
124
|
+
# @!attribute [rw] force
|
125
|
+
# @return [::Boolean]
|
126
|
+
# If set to true, it permits switching to a branch with
|
127
|
+
# {::Google::Cloud::Retail::V2::SetDefaultBranchRequest#branch_id branch_id} even
|
128
|
+
# if it has no sufficient active products.
|
120
129
|
class SetDefaultBranchRequest
|
121
130
|
include ::Google::Protobuf::MessageExts
|
122
131
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -99,9 +99,8 @@ module Google
|
|
99
99
|
# The textual values of this custom attribute. For example, `["yellow",
|
100
100
|
# "green"]` when the key is "color".
|
101
101
|
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
# Otherwise, an INVALID_ARGUMENT error is returned.
|
102
|
+
# Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is
|
103
|
+
# returned.
|
105
104
|
#
|
106
105
|
# Exactly one of {::Google::Cloud::Retail::V2::CustomAttribute#text text} or
|
107
106
|
# {::Google::Cloud::Retail::V2::CustomAttribute#numbers numbers} should be set.
|
@@ -111,15 +110,16 @@ module Google
|
|
111
110
|
# The numerical values of this custom attribute. For example, `[2.3, 15.4]`
|
112
111
|
# when the key is "lengths_cm".
|
113
112
|
#
|
114
|
-
# At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is
|
115
|
-
# returned.
|
116
|
-
#
|
117
113
|
# Exactly one of {::Google::Cloud::Retail::V2::CustomAttribute#text text} or
|
118
114
|
# {::Google::Cloud::Retail::V2::CustomAttribute#numbers numbers} should be set.
|
119
115
|
# Otherwise, an INVALID_ARGUMENT error is returned.
|
120
116
|
# @!attribute [rw] searchable
|
121
117
|
# @return [::Boolean]
|
122
|
-
#
|
118
|
+
# This field will only be used when
|
119
|
+
# [AttributesConfig.attribute_config_level][] of the
|
120
|
+
# {::Google::Cloud::Retail::V2::Catalog Catalog} is
|
121
|
+
# 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
|
122
|
+
# searchable by text queries in
|
123
123
|
# {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
|
124
124
|
#
|
125
125
|
# This field is ignored in a {::Google::Cloud::Retail::V2::UserEvent UserEvent}.
|
@@ -128,8 +128,11 @@ module Google
|
|
128
128
|
# set. Otherwise, a INVALID_ARGUMENT error is returned.
|
129
129
|
# @!attribute [rw] indexable
|
130
130
|
# @return [::Boolean]
|
131
|
-
#
|
132
|
-
#
|
131
|
+
# This field will only be used when
|
132
|
+
# [AttributesConfig.attribute_config_level][] of the
|
133
|
+
# {::Google::Cloud::Retail::V2::Catalog Catalog} is
|
134
|
+
# 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
|
135
|
+
# indexed, so that it can be filtered, faceted or boosted in
|
133
136
|
# {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
|
134
137
|
#
|
135
138
|
# This field is ignored in a {::Google::Cloud::Retail::V2::UserEvent UserEvent}.
|
@@ -183,7 +186,10 @@ module Google
|
|
183
186
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
184
187
|
end
|
185
188
|
|
186
|
-
# {::Google::Cloud::Retail::V2::Product Product}
|
189
|
+
# {::Google::Cloud::Retail::V2::Product Product} image. Recommendations AI and
|
190
|
+
# Retail Search do not use product images to improve prediction and search
|
191
|
+
# results. However, product images can be returned in results, and are shown in
|
192
|
+
# prediction or search previews in the console.
|
187
193
|
# @!attribute [rw] uri
|
188
194
|
# @return [::String]
|
189
195
|
# Required. URI of the image.
|
@@ -250,7 +256,7 @@ module Google
|
|
250
256
|
#
|
251
257
|
# Google Merchant Center property
|
252
258
|
# [price](https://support.google.com/merchants/answer/6324371). Schema.org
|
253
|
-
# property [Offer.
|
259
|
+
# property [Offer.price](https://schema.org/price).
|
254
260
|
# @!attribute [rw] original_price
|
255
261
|
# @return [::Float]
|
256
262
|
# Price of the product without any discount. If zero, by default set to be
|
@@ -369,19 +375,24 @@ module Google
|
|
369
375
|
# Highly recommended for logged-in users. Unique identifier for logged-in
|
370
376
|
# user, such as a user name.
|
371
377
|
#
|
378
|
+
# Always use a hashed value for this ID.
|
379
|
+
#
|
372
380
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
373
381
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
374
382
|
# @!attribute [rw] ip_address
|
375
383
|
# @return [::String]
|
376
|
-
# The end user's IP address.
|
377
|
-
#
|
378
|
-
# This field is used to extract location information for personalization.
|
384
|
+
# The end user's IP address. This field is used to extract location
|
385
|
+
# information for personalization.
|
379
386
|
#
|
380
387
|
# This field must be either an IPv4 address (e.g. "104.133.9.80") or an IPv6
|
381
388
|
# address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334"). Otherwise, an
|
382
389
|
# INVALID_ARGUMENT error is returned.
|
383
390
|
#
|
384
|
-
# This should not be set when
|
391
|
+
# This should not be set when:
|
392
|
+
#
|
393
|
+
# * setting
|
394
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#user_info SearchRequest.user_info}.
|
395
|
+
# * using the JavaScript tag in
|
385
396
|
# {::Google::Cloud::Retail::V2::UserEventService::Client#collect_user_event UserEventService.CollectUserEvent}
|
386
397
|
# or if
|
387
398
|
# {::Google::Cloud::Retail::V2::UserInfo#direct_user_request direct_user_request}
|
@@ -416,21 +427,73 @@ module Google
|
|
416
427
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
417
428
|
end
|
418
429
|
|
419
|
-
#
|
420
|
-
#
|
430
|
+
# The inventory information at a place (e.g. a store) identified
|
431
|
+
# by a place ID.
|
432
|
+
# @!attribute [rw] place_id
|
421
433
|
# @return [::String]
|
422
|
-
# ID
|
423
|
-
#
|
424
|
-
#
|
425
|
-
#
|
426
|
-
# id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
|
427
|
-
# returned.
|
434
|
+
# The place ID for the current set of inventory information.
|
435
|
+
# @!attribute [rw] price_info
|
436
|
+
# @return [::Google::Cloud::Retail::V2::PriceInfo]
|
437
|
+
# Product price and cost information.
|
428
438
|
#
|
429
439
|
# Google Merchant Center property
|
430
|
-
# [
|
431
|
-
|
440
|
+
# [price](https://support.google.com/merchants/answer/6324371).
|
441
|
+
# @!attribute [rw] attributes
|
442
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
|
443
|
+
# Additional local inventory attributes, for example, store name, promotion
|
444
|
+
# tags, etc.
|
445
|
+
#
|
446
|
+
# This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
|
447
|
+
# error is returned:
|
448
|
+
#
|
449
|
+
# * At most 30 attributes are allowed.
|
450
|
+
# * The key must be a UTF-8 encoded string with a length limit of 32
|
451
|
+
# characters.
|
452
|
+
# * The key must match the pattern: `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example,
|
453
|
+
# key0LikeThis or KEY_1_LIKE_THIS.
|
454
|
+
# * The attribute values must be of the same type (text or number).
|
455
|
+
# * Only 1 value is allowed for each attribute.
|
456
|
+
# * For text values, the length limit is 256 UTF-8 characters.
|
457
|
+
# * The attribute does not support search. The `searchable` field should be
|
458
|
+
# unset or set to false.
|
459
|
+
# * The max summed total bytes of custom attribute keys and values per
|
460
|
+
# product is 5MiB.
|
461
|
+
# @!attribute [rw] fulfillment_types
|
462
|
+
# @return [::Array<::String>]
|
463
|
+
# Input only. Supported fulfillment types. Valid fulfillment type values
|
464
|
+
# include commonly used types (such as pickup in store and same day
|
465
|
+
# delivery), and custom types. Customers have to map custom types to their
|
466
|
+
# display names before rendering UI.
|
467
|
+
#
|
468
|
+
# Supported values:
|
469
|
+
#
|
470
|
+
# * "pickup-in-store"
|
471
|
+
# * "ship-to-store"
|
472
|
+
# * "same-day-delivery"
|
473
|
+
# * "next-day-delivery"
|
474
|
+
# * "custom-type-1"
|
475
|
+
# * "custom-type-2"
|
476
|
+
# * "custom-type-3"
|
477
|
+
# * "custom-type-4"
|
478
|
+
# * "custom-type-5"
|
479
|
+
#
|
480
|
+
# If this field is set to an invalid value other than these, an
|
481
|
+
# INVALID_ARGUMENT error is returned.
|
482
|
+
#
|
483
|
+
# All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is
|
484
|
+
# returned.
|
485
|
+
class LocalInventory
|
432
486
|
include ::Google::Protobuf::MessageExts
|
433
487
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
488
|
+
|
489
|
+
# @!attribute [rw] key
|
490
|
+
# @return [::String]
|
491
|
+
# @!attribute [rw] value
|
492
|
+
# @return [::Google::Cloud::Retail::V2::CustomAttribute]
|
493
|
+
class AttributesEntry
|
494
|
+
include ::Google::Protobuf::MessageExts
|
495
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
496
|
+
end
|
434
497
|
end
|
435
498
|
end
|
436
499
|
end
|
@@ -35,22 +35,21 @@ module Google
|
|
35
35
|
# The maximum number of allowed characters is 255.
|
36
36
|
# @!attribute [rw] visitor_id
|
37
37
|
# @return [::String]
|
38
|
-
# A unique identifier for tracking visitors. For example,
|
39
|
-
# implemented with an HTTP cookie, which should be able to
|
40
|
-
# a visitor on a single device. This unique identifier
|
41
|
-
# the visitor logs in or out of the website.
|
38
|
+
# Required field. A unique identifier for tracking visitors. For example,
|
39
|
+
# this could be implemented with an HTTP cookie, which should be able to
|
40
|
+
# uniquely identify a visitor on a single device. This unique identifier
|
41
|
+
# should not change if the visitor logs in or out of the website.
|
42
42
|
#
|
43
43
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
44
44
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
45
45
|
# @!attribute [rw] language_codes
|
46
46
|
# @return [::Array<::String>]
|
47
|
-
# The
|
48
|
-
# the
|
49
|
-
#
|
50
|
-
# [Tags for
|
51
|
-
#
|
52
|
-
#
|
53
|
-
# Only "en-US" is currently supported.
|
47
|
+
# The language filters applied to the output suggestions. If set, it should
|
48
|
+
# contain the language of the query. If not set, suggestions are returned
|
49
|
+
# without considering language restrictions. This is the BCP-47 language
|
50
|
+
# code, such as "en-US" or "sr-Latn". For more information, see [Tags for
|
51
|
+
# Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum
|
52
|
+
# number of language codes is 3.
|
54
53
|
# @!attribute [rw] device_type
|
55
54
|
# @return [::String]
|
56
55
|
# The device type context for completion suggestions.
|
@@ -102,9 +101,9 @@ module Google
|
|
102
101
|
# @!attribute [rw] attribution_token
|
103
102
|
# @return [::String]
|
104
103
|
# A unique complete token. This should be included in the
|
105
|
-
# {::Google::Cloud::Retail::V2::
|
106
|
-
# completion, which enables accurate
|
107
|
-
# performance.
|
104
|
+
# {::Google::Cloud::Retail::V2::UserEvent#completion_detail UserEvent.completion_detail}
|
105
|
+
# for search events resulting from this completion, which enables accurate
|
106
|
+
# attribution of complete model performance.
|
108
107
|
# @!attribute [rw] recent_search_results
|
109
108
|
# @return [::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::RecentSearchResult>]
|
110
109
|
# Matched recent searches of this user. The maximum number of recent searches
|
@@ -134,7 +133,11 @@ module Google
|
|
134
133
|
# The suggestion for the query.
|
135
134
|
# @!attribute [rw] attributes
|
136
135
|
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
|
137
|
-
#
|
136
|
+
# Custom attributes for the suggestion term.
|
137
|
+
# * For "user-data", the attributes are additional custom attributes
|
138
|
+
# ingested through BigQuery.
|
139
|
+
# * For "cloud-retail", the attributes are product attributes generated
|
140
|
+
# by Cloud Retail.
|
138
141
|
class CompletionResult
|
139
142
|
include ::Google::Protobuf::MessageExts
|
140
143
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -51,6 +51,14 @@ module Google
|
|
51
51
|
# {::Google::Cloud::Retail::V2::UserEvent UserEvent} per line.
|
52
52
|
# * `user_event_ga360`: Using
|
53
53
|
# https://support.google.com/analytics/answer/3437719.
|
54
|
+
#
|
55
|
+
# Supported values for control imports:
|
56
|
+
#
|
57
|
+
# * 'control' (default): One JSON [Control][] per line.
|
58
|
+
#
|
59
|
+
# Supported values for catalog attribute imports:
|
60
|
+
#
|
61
|
+
# * 'catalog_attribute' (default): One CSV [CatalogAttribute][] per line.
|
54
62
|
class GcsSource
|
55
63
|
include ::Google::Protobuf::MessageExts
|
56
64
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -98,8 +106,19 @@ module Google
|
|
98
106
|
#
|
99
107
|
# * `user_event` (default): One JSON
|
100
108
|
# {::Google::Cloud::Retail::V2::UserEvent UserEvent} per line.
|
101
|
-
# * `user_event_ga360`:
|
109
|
+
# * `user_event_ga360`:
|
110
|
+
# The schema is available here:
|
102
111
|
# https://support.google.com/analytics/answer/3437719.
|
112
|
+
# * `user_event_ga4`: This feature is in private preview. Please contact the
|
113
|
+
# support team for importing Google Analytics 4 events.
|
114
|
+
# The schema is available here:
|
115
|
+
# https://support.google.com/analytics/answer/7029846.
|
116
|
+
#
|
117
|
+
# Supported values for auto-completion imports:
|
118
|
+
#
|
119
|
+
# * `suggestions` (default): One JSON completion suggestion per line.
|
120
|
+
# * `denylist`: One JSON deny suggestion per line.
|
121
|
+
# * `allowlist`: One JSON allow suggestion per line.
|
103
122
|
class BigQuerySource
|
104
123
|
include ::Google::Protobuf::MessageExts
|
105
124
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -128,9 +147,9 @@ module Google
|
|
128
147
|
# Configuration of destination for Import related errors.
|
129
148
|
# @!attribute [rw] gcs_prefix
|
130
149
|
# @return [::String]
|
131
|
-
# Google Cloud Storage
|
132
|
-
# existing Cloud Storage
|
133
|
-
# this
|
150
|
+
# Google Cloud Storage prefix for import errors. This must be an empty,
|
151
|
+
# existing Cloud Storage directory. Import errors will be written to
|
152
|
+
# sharded files in this directory, one per line, as a JSON-encoded
|
134
153
|
# `google.rpc.Status` message.
|
135
154
|
class ImportErrorsConfig
|
136
155
|
include ::Google::Protobuf::MessageExts
|
@@ -147,15 +166,7 @@ module Google
|
|
147
166
|
# If updateMask is specified, requires products.update permission.
|
148
167
|
# @!attribute [rw] request_id
|
149
168
|
# @return [::String]
|
150
|
-
#
|
151
|
-
# dataset scope. Ensures idempotency and used for request deduplication.
|
152
|
-
# Server-generated if unspecified. Up to 128 characters long and must match
|
153
|
-
# the pattern: `[a-zA-Z0-9_]+`. This is returned as [Operation.name][] in
|
154
|
-
# {::Google::Cloud::Retail::V2::ImportMetadata ImportMetadata}.
|
155
|
-
#
|
156
|
-
# Only supported when
|
157
|
-
# {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
|
158
|
-
# is set to `FULL`.
|
169
|
+
# Deprecated. This field has no effect.
|
159
170
|
# @!attribute [rw] input_config
|
160
171
|
# @return [::Google::Cloud::Retail::V2::ProductInputConfig]
|
161
172
|
# Required. The desired input location of the data.
|
@@ -198,16 +209,14 @@ module Google
|
|
198
209
|
# Calculates diff and replaces the entire product dataset. Existing
|
199
210
|
# products may be deleted if they are not present in the source location.
|
200
211
|
#
|
201
|
-
# Can only be while using
|
202
|
-
# {::Google::Cloud::Retail::V2::BigQuerySource BigQuerySource}.
|
212
|
+
# Can only be set while using
|
213
|
+
# {::Google::Cloud::Retail::V2::BigQuerySource BigQuerySource}. And the BigQuery
|
214
|
+
# dataset must be created in the data location "us (multiple regions in
|
215
|
+
# United States)", otherwise a PERMISSION_DENIED error is thrown.
|
203
216
|
#
|
204
217
|
# Add the IAM permission "BigQuery Data Viewer" for
|
205
218
|
# cloud-retail-customer-data-access@system.gserviceaccount.com before
|
206
219
|
# using this feature otherwise an error is thrown.
|
207
|
-
#
|
208
|
-
# This feature is only available for users who have Retail Search enabled.
|
209
|
-
# Please submit a form [here](https://cloud.google.com/contact) to contact
|
210
|
-
# cloud sales if you are interested in using Retail Search.
|
211
220
|
FULL = 2
|
212
221
|
end
|
213
222
|
end
|
@@ -309,8 +318,7 @@ module Google
|
|
309
318
|
# Count of entries that encountered errors while processing.
|
310
319
|
# @!attribute [rw] request_id
|
311
320
|
# @return [::String]
|
312
|
-
#
|
313
|
-
# that was passed in the request.
|
321
|
+
# Deprecated. This field is never set.
|
314
322
|
# @!attribute [rw] notification_pubsub_topic
|
315
323
|
# @return [::String]
|
316
324
|
# Pub/Sub topic for receiving notification. If this field is set,
|