google-cloud-retail-v2 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/common_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/completion_service/client.rb +3 -3
- data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/import_config_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +11 -1
- data/lib/google/cloud/retail/v2/prediction_service_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/product_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/product_service/client.rb +18 -5
- data/lib/google/cloud/retail/v2/product_service_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/purge_config_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/search_service/client.rb +34 -7
- data/lib/google/cloud/retail/v2/search_service_pb.rb +14 -1
- data/lib/google/cloud/retail/v2/user_event_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/proto_docs/google/cloud/retail/v2/catalog.rb +8 -8
- data/proto_docs/google/cloud/retail/v2/common.rb +22 -10
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +11 -4
- data/proto_docs/google/cloud/retail/v2/import_config.rb +9 -2
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +13 -3
- data/proto_docs/google/cloud/retail/v2/product.rb +2 -2
- data/proto_docs/google/cloud/retail/v2/product_service.rb +24 -8
- data/proto_docs/google/cloud/retail/v2/search_service.rb +100 -20
- data/proto_docs/google/cloud/retail/v2/user_event.rb +6 -3
- data/proto_docs/google/protobuf/any.rb +3 -3
- data/proto_docs/google/protobuf/struct.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '09eebe56def80aca474541e0f90b49b98428f7530cd3cf00f76ed6d069d0d2e3'
|
|
4
|
+
data.tar.gz: cb93509ec2c2f405c2dd69bf015f53dfa7daf9fa685190e4f6b64ce174371ad5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: abc56ec5460f8cf74fde99d87bc6d44474a1f72fed49fb9dde8c414e2e6ac58f97061b29ca5f017af432fd3751ef160853048496689d4575146eae29fb3d4164
|
|
7
|
+
data.tar.gz: '08b8bf20cd8fc3c3f15a13b2b21a6fecb391d41e8697a17ba43e572e546733d9571d843be5724bd05d4e302788629f9d6a5f9562d1d0498d7f89711d0ff036a6'
|
data/README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# source: google/cloud/retail/v2/catalog.proto
|
|
3
3
|
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/field_behavior_pb'
|
|
5
7
|
require 'google/api/resource_pb'
|
|
6
|
-
require 'google/protobuf'
|
|
7
8
|
|
|
8
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
9
10
|
add_file("google/cloud/retail/v2/catalog.proto", :syntax => :proto3) do
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# source: google/cloud/retail/v2/catalog_service.proto
|
|
3
3
|
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/annotations_pb'
|
|
5
7
|
require 'google/api/client_pb'
|
|
6
8
|
require 'google/api/field_behavior_pb'
|
|
@@ -9,7 +11,6 @@ require 'google/cloud/retail/v2/catalog_pb'
|
|
|
9
11
|
require 'google/protobuf/empty_pb'
|
|
10
12
|
require 'google/protobuf/field_mask_pb'
|
|
11
13
|
require 'google/protobuf/timestamp_pb'
|
|
12
|
-
require 'google/protobuf'
|
|
13
14
|
|
|
14
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
15
16
|
add_file("google/cloud/retail/v2/catalog_service.proto", :syntax => :proto3) do
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# source: google/cloud/retail/v2/common.proto
|
|
3
3
|
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/field_behavior_pb'
|
|
5
7
|
require 'google/protobuf/timestamp_pb'
|
|
6
|
-
require 'google/protobuf'
|
|
7
8
|
|
|
8
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
9
10
|
add_file("google/cloud/retail/v2/common.proto", :syntax => :proto3) do
|
|
@@ -236,9 +236,9 @@ module Google
|
|
|
236
236
|
#
|
|
237
237
|
# * user-data
|
|
238
238
|
#
|
|
239
|
-
# * cloud-retail
|
|
240
|
-
# This option requires
|
|
241
|
-
#
|
|
239
|
+
# * cloud-retail:
|
|
240
|
+
# This option requires enabling auto-learning function first. See
|
|
241
|
+
# [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
|
|
242
242
|
# @param max_suggestions [::Integer]
|
|
243
243
|
# Completion max suggestions. If left unset or set to 0, then will fallback
|
|
244
244
|
# to the configured value [CompletionConfig.max_suggestions][].
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# source: google/cloud/retail/v2/completion_service.proto
|
|
3
3
|
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/annotations_pb'
|
|
5
7
|
require 'google/api/client_pb'
|
|
6
8
|
require 'google/api/field_behavior_pb'
|
|
@@ -8,7 +10,6 @@ require 'google/api/resource_pb'
|
|
|
8
10
|
require 'google/cloud/retail/v2/common_pb'
|
|
9
11
|
require 'google/cloud/retail/v2/import_config_pb'
|
|
10
12
|
require 'google/longrunning/operations_pb'
|
|
11
|
-
require 'google/protobuf'
|
|
12
13
|
|
|
13
14
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
14
15
|
add_file("google/cloud/retail/v2/completion_service.proto", :syntax => :proto3) do
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# source: google/cloud/retail/v2/import_config.proto
|
|
3
3
|
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/field_behavior_pb'
|
|
5
7
|
require 'google/api/resource_pb'
|
|
6
8
|
require 'google/cloud/retail/v2/product_pb'
|
|
@@ -9,7 +11,6 @@ require 'google/protobuf/field_mask_pb'
|
|
|
9
11
|
require 'google/protobuf/timestamp_pb'
|
|
10
12
|
require 'google/rpc/status_pb'
|
|
11
13
|
require 'google/type/date_pb'
|
|
12
|
-
require 'google/protobuf'
|
|
13
14
|
|
|
14
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
15
16
|
add_file("google/cloud/retail/v2/import_config.proto", :syntax => :proto3) do
|
|
@@ -182,6 +182,16 @@ module Google
|
|
|
182
182
|
# they took to trigger the predict request. Note that this user event detail
|
|
183
183
|
# won't be ingested to userEvent logs. Thus, a separate userEvent write
|
|
184
184
|
# request is required for event logging.
|
|
185
|
+
#
|
|
186
|
+
# Don't set
|
|
187
|
+
# {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id} or
|
|
188
|
+
# {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id} to the same
|
|
189
|
+
# fixed ID for different users. If you are trying to receive non-personalized
|
|
190
|
+
# recommendations (not recommended; this can negatively impact model
|
|
191
|
+
# performance), instead set
|
|
192
|
+
# {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id} to a
|
|
193
|
+
# random unique ID and leave
|
|
194
|
+
# {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id} unset.
|
|
185
195
|
# @param page_size [::Integer]
|
|
186
196
|
# Maximum number of results to return per page. Set this property
|
|
187
197
|
# to the number of prediction results needed. If zero, the service will
|
|
@@ -256,7 +266,7 @@ module Google
|
|
|
256
266
|
# * Each resource can have multiple labels, up to a maximum of 64.
|
|
257
267
|
# * Each label must be a key-value pair.
|
|
258
268
|
# * Keys have a minimum length of 1 character and a maximum length of 63
|
|
259
|
-
# characters
|
|
269
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
|
260
270
|
# length of 63 characters.
|
|
261
271
|
# * Keys and values can contain only lowercase letters, numeric characters,
|
|
262
272
|
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# source: google/cloud/retail/v2/prediction_service.proto
|
|
3
3
|
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/annotations_pb'
|
|
5
7
|
require 'google/api/client_pb'
|
|
6
8
|
require 'google/api/field_behavior_pb'
|
|
7
9
|
require 'google/cloud/retail/v2/user_event_pb'
|
|
8
10
|
require 'google/protobuf/struct_pb'
|
|
9
|
-
require 'google/protobuf'
|
|
10
11
|
|
|
11
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
12
13
|
add_file("google/cloud/retail/v2/prediction_service.proto", :syntax => :proto3) do
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# source: google/cloud/retail/v2/product.proto
|
|
3
3
|
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/field_behavior_pb'
|
|
5
7
|
require 'google/api/resource_pb'
|
|
6
8
|
require 'google/cloud/retail/v2/common_pb'
|
|
@@ -9,7 +11,6 @@ require 'google/protobuf/duration_pb'
|
|
|
9
11
|
require 'google/protobuf/field_mask_pb'
|
|
10
12
|
require 'google/protobuf/timestamp_pb'
|
|
11
13
|
require 'google/protobuf/wrappers_pb'
|
|
12
|
-
require 'google/protobuf'
|
|
13
14
|
|
|
14
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
15
16
|
add_file("google/cloud/retail/v2/product.proto", :syntax => :proto3) do
|
|
@@ -566,6 +566,11 @@ module Google
|
|
|
566
566
|
#
|
|
567
567
|
# If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
|
|
568
568
|
# is returned.
|
|
569
|
+
#
|
|
570
|
+
# The attribute key can be updated by setting the mask path as
|
|
571
|
+
# "attributes.$\\{key_name}". If a key name is present in the mask but not in
|
|
572
|
+
# the patching product from the request, this key will be deleted after the
|
|
573
|
+
# update.
|
|
569
574
|
# @param allow_missing [::Boolean]
|
|
570
575
|
# If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
|
|
571
576
|
# found, a new {::Google::Cloud::Retail::V2::Product Product} will be created. In
|
|
@@ -743,7 +748,7 @@ module Google
|
|
|
743
748
|
##
|
|
744
749
|
# Bulk import of multiple {::Google::Cloud::Retail::V2::Product Product}s.
|
|
745
750
|
#
|
|
746
|
-
# Request processing may be synchronous.
|
|
751
|
+
# Request processing may be synchronous.
|
|
747
752
|
# Non-existing items are created.
|
|
748
753
|
#
|
|
749
754
|
# Note that it is possible for a subset of the
|
|
@@ -784,11 +789,18 @@ module Google
|
|
|
784
789
|
# imported. Defaults to
|
|
785
790
|
# {::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
|
|
786
791
|
# @param notification_pubsub_topic [::String]
|
|
787
|
-
# Pub/Sub topic for receiving notification. If this field is set,
|
|
792
|
+
# Full Pub/Sub topic name for receiving notification. If this field is set,
|
|
788
793
|
# when the import is finished, a notification will be sent to
|
|
789
794
|
# specified Pub/Sub topic. The message data will be JSON string of a
|
|
790
795
|
# {::Google::Longrunning::Operation Operation}.
|
|
791
|
-
#
|
|
796
|
+
#
|
|
797
|
+
# Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
|
|
798
|
+
# to be within the same project as
|
|
799
|
+
# {::Google::Cloud::Retail::V2::ImportProductsRequest#parent ImportProductsRequest.parent}.
|
|
800
|
+
# Make sure that both
|
|
801
|
+
# `cloud-retail-customer-data-access@system.gserviceaccount.com` and
|
|
802
|
+
# `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
|
|
803
|
+
# have the `pubsub.topics.publish` IAM permission on the topic.
|
|
792
804
|
#
|
|
793
805
|
# Only supported when
|
|
794
806
|
# {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
|
|
@@ -901,7 +913,7 @@ module Google
|
|
|
901
913
|
#
|
|
902
914
|
# Pre-existing inventory information can only be updated with
|
|
903
915
|
# {::Google::Cloud::Retail::V2::ProductService::Client#set_inventory SetInventory},
|
|
904
|
-
# {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places AddFulfillmentPlaces},
|
|
916
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces},
|
|
905
917
|
# and
|
|
906
918
|
# {::Google::Cloud::Retail::V2::ProductService::Client#remove_fulfillment_places RemoveFulfillmentPlaces}.
|
|
907
919
|
#
|
|
@@ -1286,7 +1298,8 @@ module Google
|
|
|
1286
1298
|
# If this field is set to an invalid value other than these, an
|
|
1287
1299
|
# INVALID_ARGUMENT error is returned.
|
|
1288
1300
|
#
|
|
1289
|
-
# This field directly corresponds to
|
|
1301
|
+
# This field directly corresponds to
|
|
1302
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo#type Product.fulfillment_info.type}.
|
|
1290
1303
|
# @param place_ids [::Array<::String>]
|
|
1291
1304
|
# Required. The IDs for this
|
|
1292
1305
|
# {::Google::Cloud::Retail::V2::RemoveFulfillmentPlacesRequest#type type}, such as
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# source: google/cloud/retail/v2/product_service.proto
|
|
3
3
|
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/annotations_pb'
|
|
5
7
|
require 'google/api/client_pb'
|
|
6
8
|
require 'google/api/field_behavior_pb'
|
|
@@ -12,7 +14,6 @@ require 'google/longrunning/operations_pb'
|
|
|
12
14
|
require 'google/protobuf/empty_pb'
|
|
13
15
|
require 'google/protobuf/field_mask_pb'
|
|
14
16
|
require 'google/protobuf/timestamp_pb'
|
|
15
|
-
require 'google/protobuf'
|
|
16
17
|
|
|
17
18
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
18
19
|
add_file("google/cloud/retail/v2/product_service.proto", :syntax => :proto3) do
|
|
@@ -46,7 +46,7 @@ module Google
|
|
|
46
46
|
rpc :DeleteProduct, ::Google::Cloud::Retail::V2::DeleteProductRequest, ::Google::Protobuf::Empty
|
|
47
47
|
# Bulk import of multiple [Product][google.cloud.retail.v2.Product]s.
|
|
48
48
|
#
|
|
49
|
-
# Request processing may be synchronous.
|
|
49
|
+
# Request processing may be synchronous.
|
|
50
50
|
# Non-existing items are created.
|
|
51
51
|
#
|
|
52
52
|
# Note that it is possible for a subset of the
|
|
@@ -86,7 +86,7 @@ module Google
|
|
|
86
86
|
#
|
|
87
87
|
# Pre-existing inventory information can only be updated with
|
|
88
88
|
# [SetInventory][google.cloud.retail.v2.ProductService.SetInventory],
|
|
89
|
-
# [AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces],
|
|
89
|
+
# [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces],
|
|
90
90
|
# and
|
|
91
91
|
# [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
|
|
92
92
|
#
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# source: google/cloud/retail/v2/purge_config.proto
|
|
3
3
|
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/field_behavior_pb'
|
|
5
7
|
require 'google/api/resource_pb'
|
|
6
|
-
require 'google/protobuf'
|
|
7
8
|
|
|
8
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
9
10
|
add_file("google/cloud/retail/v2/purge_config.proto", :syntax => :proto3) do
|
|
@@ -168,14 +168,14 @@ module Google
|
|
|
168
168
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
169
169
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
170
170
|
#
|
|
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)
|
|
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, labels: nil, spell_correction_spec: nil)
|
|
172
172
|
# Pass arguments to `search` via keyword arguments. Note that at
|
|
173
173
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
174
174
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
175
175
|
#
|
|
176
176
|
# @param placement [::String]
|
|
177
177
|
# Required. The resource name of the search engine placement, such as
|
|
178
|
-
# `projects/*/locations/global/catalogs/default_catalog/placements/default_search
|
|
178
|
+
# `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
|
|
179
179
|
# This field is used to identify the serving configuration name and the set
|
|
180
180
|
# of models that will be used to make the search.
|
|
181
181
|
# @param branch [::String]
|
|
@@ -186,6 +186,11 @@ module Google
|
|
|
186
186
|
# products under the default branch.
|
|
187
187
|
# @param query [::String]
|
|
188
188
|
# Raw search query.
|
|
189
|
+
#
|
|
190
|
+
# If this field is empty, the request is considered a category browsing
|
|
191
|
+
# request and returned results are based on
|
|
192
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#filter filter} and
|
|
193
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#page_categories page_categories}.
|
|
189
194
|
# @param visitor_id [::String]
|
|
190
195
|
# Required. A unique identifier for tracking visitors. For example, this
|
|
191
196
|
# could be implemented with an HTTP cookie, which should be able to uniquely
|
|
@@ -268,10 +273,10 @@ module Google
|
|
|
268
273
|
# [user guide](https://cloud.google.com/retail/docs/boosting).
|
|
269
274
|
#
|
|
270
275
|
# Notice that if both [ServingConfig.boost_control_ids][] and
|
|
271
|
-
#
|
|
272
|
-
# are evaluated. If a search
|
|
273
|
-
#
|
|
274
|
-
# matched boost conditions.
|
|
276
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}
|
|
277
|
+
# are set, the boost conditions from both places are evaluated. If a search
|
|
278
|
+
# request matches multiple boost conditions, the final boost score is equal
|
|
279
|
+
# to the sum of the boost scores from all matched boost conditions.
|
|
275
280
|
# @param query_expansion_spec [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec, ::Hash]
|
|
276
281
|
# The query expansion specification that specifies the conditions under which
|
|
277
282
|
# query expansion will occur. See more details at this [user
|
|
@@ -304,7 +309,8 @@ module Google
|
|
|
304
309
|
# * inventory(place_id,price)
|
|
305
310
|
# * inventory(place_id,original_price)
|
|
306
311
|
# * inventory(place_id,attributes.key), where key is any key in the
|
|
307
|
-
#
|
|
312
|
+
# {::Google::Cloud::Retail::V2::LocalInventory#attributes Product.local_inventories.attributes}
|
|
313
|
+
# map.
|
|
308
314
|
# * attributes.key, where key is any key in the
|
|
309
315
|
# {::Google::Cloud::Retail::V2::Product#attributes Product.attributes} map.
|
|
310
316
|
# * pickupInStore.id, where id is any
|
|
@@ -364,6 +370,27 @@ module Google
|
|
|
364
370
|
# request triggers both product search and faceted search.
|
|
365
371
|
# @param personalization_spec [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec, ::Hash]
|
|
366
372
|
# The specification for personalization.
|
|
373
|
+
# @param labels [::Hash{::String => ::String}]
|
|
374
|
+
# The labels applied to a resource must meet the following requirements:
|
|
375
|
+
#
|
|
376
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
|
377
|
+
# * Each label must be a key-value pair.
|
|
378
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
|
379
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
|
380
|
+
# length of 63 characters.
|
|
381
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
|
382
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
|
383
|
+
# international characters are allowed.
|
|
384
|
+
# * The key portion of a label must be unique. However, you can use the same
|
|
385
|
+
# key with multiple resources.
|
|
386
|
+
# * Keys must start with a lowercase letter or international character.
|
|
387
|
+
#
|
|
388
|
+
# See [Google Cloud
|
|
389
|
+
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
|
390
|
+
# for more details.
|
|
391
|
+
# @param spell_correction_spec [::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec, ::Hash]
|
|
392
|
+
# The spell correction specification that specifies the mode under
|
|
393
|
+
# which spell correction will take effect.
|
|
367
394
|
#
|
|
368
395
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
369
396
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>]
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# source: google/cloud/retail/v2/search_service.proto
|
|
3
3
|
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/annotations_pb'
|
|
5
7
|
require 'google/api/client_pb'
|
|
6
8
|
require 'google/api/field_behavior_pb'
|
|
@@ -9,7 +11,6 @@ require 'google/cloud/retail/v2/common_pb'
|
|
|
9
11
|
require 'google/cloud/retail/v2/product_pb'
|
|
10
12
|
require 'google/protobuf/field_mask_pb'
|
|
11
13
|
require 'google/protobuf/struct_pb'
|
|
12
|
-
require 'google/protobuf'
|
|
13
14
|
|
|
14
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
15
16
|
add_file("google/cloud/retail/v2/search_service.proto", :syntax => :proto3) do
|
|
@@ -33,6 +34,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
|
33
34
|
repeated :page_categories, :string, 23
|
|
34
35
|
optional :search_mode, :enum, 31, "google.cloud.retail.v2.SearchRequest.SearchMode"
|
|
35
36
|
optional :personalization_spec, :message, 32, "google.cloud.retail.v2.SearchRequest.PersonalizationSpec"
|
|
37
|
+
map :labels, :string, :string, 34
|
|
38
|
+
proto3_optional :spell_correction_spec, :message, 35, "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec"
|
|
36
39
|
end
|
|
37
40
|
add_message "google.cloud.retail.v2.SearchRequest.FacetSpec" do
|
|
38
41
|
optional :facet_key, :message, 1, "google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey"
|
|
@@ -82,6 +85,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
|
82
85
|
value :AUTO, 1
|
|
83
86
|
value :DISABLED, 2
|
|
84
87
|
end
|
|
88
|
+
add_message "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec" do
|
|
89
|
+
optional :mode, :enum, 1, "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode"
|
|
90
|
+
end
|
|
91
|
+
add_enum "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode" do
|
|
92
|
+
value :MODE_UNSPECIFIED, 0
|
|
93
|
+
value :SUGGESTION_ONLY, 1
|
|
94
|
+
value :AUTO, 2
|
|
95
|
+
end
|
|
85
96
|
add_enum "google.cloud.retail.v2.SearchRequest.SearchMode" do
|
|
86
97
|
value :SEARCH_MODE_UNSPECIFIED, 0
|
|
87
98
|
value :PRODUCT_SEARCH_ONLY, 1
|
|
@@ -140,6 +151,8 @@ module Google
|
|
|
140
151
|
SearchRequest::QueryExpansionSpec::Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition").enummodule
|
|
141
152
|
SearchRequest::PersonalizationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.PersonalizationSpec").msgclass
|
|
142
153
|
SearchRequest::PersonalizationSpec::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode").enummodule
|
|
154
|
+
SearchRequest::SpellCorrectionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec").msgclass
|
|
155
|
+
SearchRequest::SpellCorrectionSpec::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode").enummodule
|
|
143
156
|
SearchRequest::SearchMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.SearchMode").enummodule
|
|
144
157
|
SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse").msgclass
|
|
145
158
|
SearchResponse::SearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse.SearchResult").msgclass
|
|
@@ -1,12 +1,13 @@
|
|
|
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/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/field_behavior_pb'
|
|
5
7
|
require 'google/cloud/retail/v2/common_pb'
|
|
6
8
|
require 'google/cloud/retail/v2/product_pb'
|
|
7
9
|
require 'google/protobuf/timestamp_pb'
|
|
8
10
|
require 'google/protobuf/wrappers_pb'
|
|
9
|
-
require 'google/protobuf'
|
|
10
11
|
|
|
11
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
12
13
|
add_file("google/cloud/retail/v2/user_event.proto", :syntax => :proto3) do
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
2
|
# source: google/cloud/retail/v2/user_event_service.proto
|
|
3
3
|
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
4
6
|
require 'google/api/annotations_pb'
|
|
5
7
|
require 'google/api/client_pb'
|
|
6
8
|
require 'google/api/field_behavior_pb'
|
|
@@ -10,7 +12,6 @@ require 'google/cloud/retail/v2/import_config_pb'
|
|
|
10
12
|
require 'google/cloud/retail/v2/purge_config_pb'
|
|
11
13
|
require 'google/cloud/retail/v2/user_event_pb'
|
|
12
14
|
require 'google/longrunning/operations_pb'
|
|
13
|
-
require 'google/protobuf'
|
|
14
15
|
|
|
15
16
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
16
17
|
add_file("google/cloud/retail/v2/user_event_service.proto", :syntax => :proto3) do
|
|
@@ -34,10 +34,10 @@ module Google
|
|
|
34
34
|
# default to
|
|
35
35
|
# {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Product.Type.PRIMARY} if
|
|
36
36
|
# unset.
|
|
37
|
-
# * `variant
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
# This means
|
|
37
|
+
# * `variant` (incompatible with Retail Search): You can only
|
|
38
|
+
# ingest
|
|
39
|
+
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT Product.Type.VARIANT}
|
|
40
|
+
# {::Google::Cloud::Retail::V2::Product Product}s. This means
|
|
41
41
|
# {::Google::Cloud::Retail::V2::Product#primary_product_id Product.primary_product_id}
|
|
42
42
|
# cannot be empty.
|
|
43
43
|
#
|
|
@@ -48,8 +48,8 @@ module Google
|
|
|
48
48
|
# {::Google::Cloud::Retail::V2::ProductLevelConfig#merchant_center_product_id_field merchant_center_product_id_field}
|
|
49
49
|
# is `itemGroupId`, an INVALID_ARGUMENT error is returned.
|
|
50
50
|
#
|
|
51
|
-
# See [
|
|
52
|
-
# levels](https://cloud.google.com/retail/
|
|
51
|
+
# See [Product
|
|
52
|
+
# levels](https://cloud.google.com/retail/docs/catalog#product-levels)
|
|
53
53
|
# for more details.
|
|
54
54
|
# @!attribute [rw] merchant_center_product_id_field
|
|
55
55
|
# @return [::String]
|
|
@@ -70,8 +70,8 @@ module Google
|
|
|
70
70
|
# {::Google::Cloud::Retail::V2::ProductLevelConfig#ingestion_product_type ingestion_product_type}
|
|
71
71
|
# is `variant`, an INVALID_ARGUMENT error is returned.
|
|
72
72
|
#
|
|
73
|
-
# See [
|
|
74
|
-
# levels](https://cloud.google.com/retail/
|
|
73
|
+
# See [Product
|
|
74
|
+
# levels](https://cloud.google.com/retail/docs/catalog#product-levels)
|
|
75
75
|
# for more details.
|
|
76
76
|
class ProductLevelConfig
|
|
77
77
|
include ::Google::Protobuf::MessageExts
|
|
@@ -115,11 +115,13 @@ module Google
|
|
|
115
115
|
# Otherwise, an INVALID_ARGUMENT error is returned.
|
|
116
116
|
# @!attribute [rw] searchable
|
|
117
117
|
# @return [::Boolean]
|
|
118
|
-
# This field
|
|
118
|
+
# This field is normally ignored unless
|
|
119
119
|
# [AttributesConfig.attribute_config_level][] of the
|
|
120
|
-
# {::Google::Cloud::Retail::V2::Catalog Catalog} is
|
|
121
|
-
# 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG'
|
|
122
|
-
#
|
|
120
|
+
# {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
|
|
121
|
+
# 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level
|
|
122
|
+
# attribute configuration, see [Configuration
|
|
123
|
+
# modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
|
|
124
|
+
# If true, custom attribute values are searchable by text queries in
|
|
123
125
|
# {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
|
|
124
126
|
#
|
|
125
127
|
# This field is ignored in a {::Google::Cloud::Retail::V2::UserEvent UserEvent}.
|
|
@@ -128,11 +130,14 @@ module Google
|
|
|
128
130
|
# set. Otherwise, a INVALID_ARGUMENT error is returned.
|
|
129
131
|
# @!attribute [rw] indexable
|
|
130
132
|
# @return [::Boolean]
|
|
131
|
-
# This field
|
|
133
|
+
# This field is normally ignored unless
|
|
132
134
|
# [AttributesConfig.attribute_config_level][] of the
|
|
133
|
-
# {::Google::Cloud::Retail::V2::Catalog Catalog} is
|
|
134
|
-
# 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG'
|
|
135
|
-
#
|
|
135
|
+
# {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
|
|
136
|
+
# 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level
|
|
137
|
+
# attribute configuration, see [Configuration
|
|
138
|
+
# modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
|
|
139
|
+
# If true, custom attribute values are indexed, so that they can be filtered,
|
|
140
|
+
# faceted or boosted in
|
|
136
141
|
# {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
|
|
137
142
|
#
|
|
138
143
|
# This field is ignored in a {::Google::Cloud::Retail::V2::UserEvent UserEvent}.
|
|
@@ -260,7 +265,10 @@ module Google
|
|
|
260
265
|
# @!attribute [rw] original_price
|
|
261
266
|
# @return [::Float]
|
|
262
267
|
# Price of the product without any discount. If zero, by default set to be
|
|
263
|
-
# the {::Google::Cloud::Retail::V2::PriceInfo#price price}.
|
|
268
|
+
# the {::Google::Cloud::Retail::V2::PriceInfo#price price}. If set,
|
|
269
|
+
# {::Google::Cloud::Retail::V2::PriceInfo#original_price original_price} should be
|
|
270
|
+
# greater than or equal to {::Google::Cloud::Retail::V2::PriceInfo#price price},
|
|
271
|
+
# otherwise an INVALID_ARGUMENT error is thrown.
|
|
264
272
|
# @!attribute [rw] cost
|
|
265
273
|
# @return [::Float]
|
|
266
274
|
# The costs associated with the sale of a particular product. Used for gross
|
|
@@ -373,10 +381,14 @@ module Google
|
|
|
373
381
|
# @!attribute [rw] user_id
|
|
374
382
|
# @return [::String]
|
|
375
383
|
# Highly recommended for logged-in users. Unique identifier for logged-in
|
|
376
|
-
# user, such as a user name.
|
|
384
|
+
# user, such as a user name. Don't set for anonymous users.
|
|
377
385
|
#
|
|
378
386
|
# Always use a hashed value for this ID.
|
|
379
387
|
#
|
|
388
|
+
# Don't set the field to the same fixed ID for different users. This mixes
|
|
389
|
+
# the event history of those users together, which results in degraded
|
|
390
|
+
# model quality.
|
|
391
|
+
#
|
|
380
392
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
|
381
393
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
382
394
|
# @!attribute [rw] ip_address
|
|
@@ -78,9 +78,9 @@ module Google
|
|
|
78
78
|
#
|
|
79
79
|
# * user-data
|
|
80
80
|
#
|
|
81
|
-
# * cloud-retail
|
|
82
|
-
# This option requires
|
|
83
|
-
#
|
|
81
|
+
# * cloud-retail:
|
|
82
|
+
# This option requires enabling auto-learning function first. See
|
|
83
|
+
# [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).
|
|
84
84
|
# @!attribute [rw] max_suggestions
|
|
85
85
|
# @return [::Integer]
|
|
86
86
|
# Completion max suggestions. If left unset or set to 0, then will fallback
|
|
@@ -114,11 +114,15 @@ module Google
|
|
|
114
114
|
# {::Google::Cloud::Retail::V2::CompleteQueryRequest#visitor_id CompleteQueryRequest.visitor_id}
|
|
115
115
|
# field is set and {::Google::Cloud::Retail::V2::UserEvent UserEvent} is imported.
|
|
116
116
|
# The recent searches satisfy the follow rules:
|
|
117
|
+
#
|
|
117
118
|
# * They are ordered from latest to oldest.
|
|
119
|
+
#
|
|
118
120
|
# * They are matched with
|
|
119
121
|
# {::Google::Cloud::Retail::V2::CompleteQueryRequest#query CompleteQueryRequest.query}
|
|
120
122
|
# case insensitively.
|
|
123
|
+
#
|
|
121
124
|
# * They are transformed to lower cases.
|
|
125
|
+
#
|
|
122
126
|
# * They are UTF-8 safe.
|
|
123
127
|
#
|
|
124
128
|
# Recent searches are deduplicated. More recent searches will be reserved
|
|
@@ -134,10 +138,13 @@ module Google
|
|
|
134
138
|
# @!attribute [rw] attributes
|
|
135
139
|
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
|
|
136
140
|
# Custom attributes for the suggestion term.
|
|
141
|
+
#
|
|
137
142
|
# * For "user-data", the attributes are additional custom attributes
|
|
138
143
|
# ingested through BigQuery.
|
|
144
|
+
#
|
|
139
145
|
# * For "cloud-retail", the attributes are product attributes generated
|
|
140
|
-
# by Cloud Retail.
|
|
146
|
+
# by Cloud Retail. This is an experimental feature. Contact Retail Search
|
|
147
|
+
# support team if you are interested in enabling it.
|
|
141
148
|
class CompletionResult
|
|
142
149
|
include ::Google::Protobuf::MessageExts
|
|
143
150
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -184,11 +184,18 @@ module Google
|
|
|
184
184
|
# {::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
|
|
185
185
|
# @!attribute [rw] notification_pubsub_topic
|
|
186
186
|
# @return [::String]
|
|
187
|
-
# Pub/Sub topic for receiving notification. If this field is set,
|
|
187
|
+
# Full Pub/Sub topic name for receiving notification. If this field is set,
|
|
188
188
|
# when the import is finished, a notification will be sent to
|
|
189
189
|
# specified Pub/Sub topic. The message data will be JSON string of a
|
|
190
190
|
# {::Google::Longrunning::Operation Operation}.
|
|
191
|
-
#
|
|
191
|
+
#
|
|
192
|
+
# Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
|
|
193
|
+
# to be within the same project as
|
|
194
|
+
# {::Google::Cloud::Retail::V2::ImportProductsRequest#parent ImportProductsRequest.parent}.
|
|
195
|
+
# Make sure that both
|
|
196
|
+
# `cloud-retail-customer-data-access@system.gserviceaccount.com` and
|
|
197
|
+
# `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
|
|
198
|
+
# have the `pubsub.topics.publish` IAM permission on the topic.
|
|
192
199
|
#
|
|
193
200
|
# Only supported when
|
|
194
201
|
# {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
|
|
@@ -39,6 +39,16 @@ module Google
|
|
|
39
39
|
# they took to trigger the predict request. Note that this user event detail
|
|
40
40
|
# won't be ingested to userEvent logs. Thus, a separate userEvent write
|
|
41
41
|
# request is required for event logging.
|
|
42
|
+
#
|
|
43
|
+
# Don't set
|
|
44
|
+
# {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id} or
|
|
45
|
+
# {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id} to the same
|
|
46
|
+
# fixed ID for different users. If you are trying to receive non-personalized
|
|
47
|
+
# recommendations (not recommended; this can negatively impact model
|
|
48
|
+
# performance), instead set
|
|
49
|
+
# {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id} to a
|
|
50
|
+
# random unique ID and leave
|
|
51
|
+
# {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id} unset.
|
|
42
52
|
# @!attribute [rw] page_size
|
|
43
53
|
# @return [::Integer]
|
|
44
54
|
# Maximum number of results to return per page. Set this property
|
|
@@ -119,7 +129,7 @@ module Google
|
|
|
119
129
|
# * Each resource can have multiple labels, up to a maximum of 64.
|
|
120
130
|
# * Each label must be a key-value pair.
|
|
121
131
|
# * Keys have a minimum length of 1 character and a maximum length of 63
|
|
122
|
-
# characters
|
|
132
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
|
123
133
|
# length of 63 characters.
|
|
124
134
|
# * Keys and values can contain only lowercase letters, numeric characters,
|
|
125
135
|
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
|
@@ -185,9 +195,9 @@ module Google
|
|
|
185
195
|
#
|
|
186
196
|
# Possible values:
|
|
187
197
|
#
|
|
188
|
-
# * `product`: JSON representation of the product.
|
|
198
|
+
# * `product`: JSON representation of the product. Is set if
|
|
189
199
|
# `returnProduct` is set to true in `PredictRequest.params`.
|
|
190
|
-
# * `score`: Prediction score in double value.
|
|
200
|
+
# * `score`: Prediction score in double value. Is set if
|
|
191
201
|
# `returnScore` is set to true in `PredictRequest.params`.
|
|
192
202
|
class PredictionResult
|
|
193
203
|
include ::Google::Protobuf::MessageExts
|
|
@@ -456,11 +456,11 @@ module Google
|
|
|
456
456
|
# * {::Google::Cloud::Retail::V2::Product#name name}
|
|
457
457
|
# * {::Google::Cloud::Retail::V2::Product#color_info color_info}
|
|
458
458
|
#
|
|
459
|
-
#
|
|
459
|
+
# The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
|
|
460
460
|
# returned.
|
|
461
461
|
#
|
|
462
462
|
# Note: Returning more fields in
|
|
463
|
-
# {::Google::Cloud::Retail::V2::SearchResponse SearchResponse}
|
|
463
|
+
# {::Google::Cloud::Retail::V2::SearchResponse SearchResponse} can increase
|
|
464
464
|
# response payload size and serving latency.
|
|
465
465
|
# @!attribute [r] variants
|
|
466
466
|
# @return [::Array<::Google::Cloud::Retail::V2::Product>]
|
|
@@ -91,6 +91,11 @@ module Google
|
|
|
91
91
|
#
|
|
92
92
|
# If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
|
|
93
93
|
# is returned.
|
|
94
|
+
#
|
|
95
|
+
# The attribute key can be updated by setting the mask path as
|
|
96
|
+
# "attributes.$\\{key_name}". If a key name is present in the mask but not in
|
|
97
|
+
# the patching product from the request, this key will be deleted after the
|
|
98
|
+
# update.
|
|
94
99
|
# @!attribute [rw] allow_missing
|
|
95
100
|
# @return [::Boolean]
|
|
96
101
|
# If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
|
|
@@ -332,7 +337,9 @@ module Google
|
|
|
332
337
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
333
338
|
end
|
|
334
339
|
|
|
335
|
-
# Request message for
|
|
340
|
+
# Request message for
|
|
341
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
|
|
342
|
+
# method.
|
|
336
343
|
# @!attribute [rw] product
|
|
337
344
|
# @return [::String]
|
|
338
345
|
# Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
|
|
@@ -400,21 +407,25 @@ module Google
|
|
|
400
407
|
|
|
401
408
|
# Metadata related to the progress of the AddFulfillmentPlaces operation.
|
|
402
409
|
# Currently empty because there is no meaningful metadata populated from the
|
|
403
|
-
#
|
|
410
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
|
|
411
|
+
# method.
|
|
404
412
|
class AddFulfillmentPlacesMetadata
|
|
405
413
|
include ::Google::Protobuf::MessageExts
|
|
406
414
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
407
415
|
end
|
|
408
416
|
|
|
409
417
|
# Response of the AddFulfillmentPlacesRequest. Currently empty because
|
|
410
|
-
# there is no meaningful response populated from the
|
|
418
|
+
# there is no meaningful response populated from the
|
|
419
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
|
|
411
420
|
# method.
|
|
412
421
|
class AddFulfillmentPlacesResponse
|
|
413
422
|
include ::Google::Protobuf::MessageExts
|
|
414
423
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
415
424
|
end
|
|
416
425
|
|
|
417
|
-
# Request message for
|
|
426
|
+
# Request message for
|
|
427
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
|
|
428
|
+
# method.
|
|
418
429
|
# @!attribute [rw] product
|
|
419
430
|
# @return [::String]
|
|
420
431
|
# Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
|
|
@@ -465,14 +476,18 @@ module Google
|
|
|
465
476
|
|
|
466
477
|
# Metadata related to the progress of the AddLocalInventories operation.
|
|
467
478
|
# Currently empty because there is no meaningful metadata populated from the
|
|
468
|
-
#
|
|
479
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
|
|
480
|
+
# method.
|
|
469
481
|
class AddLocalInventoriesMetadata
|
|
470
482
|
include ::Google::Protobuf::MessageExts
|
|
471
483
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
472
484
|
end
|
|
473
485
|
|
|
474
|
-
# Response of the
|
|
475
|
-
#
|
|
486
|
+
# Response of the
|
|
487
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
|
|
488
|
+
# API. Currently empty because there is no meaningful response populated from
|
|
489
|
+
# the
|
|
490
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
|
|
476
491
|
# method.
|
|
477
492
|
class AddLocalInventoriesResponse
|
|
478
493
|
include ::Google::Protobuf::MessageExts
|
|
@@ -557,7 +572,8 @@ module Google
|
|
|
557
572
|
# If this field is set to an invalid value other than these, an
|
|
558
573
|
# INVALID_ARGUMENT error is returned.
|
|
559
574
|
#
|
|
560
|
-
# This field directly corresponds to
|
|
575
|
+
# This field directly corresponds to
|
|
576
|
+
# {::Google::Cloud::Retail::V2::FulfillmentInfo#type Product.fulfillment_info.type}.
|
|
561
577
|
# @!attribute [rw] place_ids
|
|
562
578
|
# @return [::Array<::String>]
|
|
563
579
|
# Required. The IDs for this
|
|
@@ -26,7 +26,7 @@ module Google
|
|
|
26
26
|
# @!attribute [rw] placement
|
|
27
27
|
# @return [::String]
|
|
28
28
|
# Required. The resource name of the search engine placement, such as
|
|
29
|
-
# `projects/*/locations/global/catalogs/default_catalog/placements/default_search
|
|
29
|
+
# `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
|
|
30
30
|
# This field is used to identify the serving configuration name and the set
|
|
31
31
|
# of models that will be used to make the search.
|
|
32
32
|
# @!attribute [rw] branch
|
|
@@ -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
|
|
@@ -132,10 +137,10 @@ module Google
|
|
|
132
137
|
# [user guide](https://cloud.google.com/retail/docs/boosting).
|
|
133
138
|
#
|
|
134
139
|
# Notice that if both [ServingConfig.boost_control_ids][] and
|
|
135
|
-
#
|
|
136
|
-
# are evaluated. If a search
|
|
137
|
-
#
|
|
138
|
-
# 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.
|
|
139
144
|
# @!attribute [rw] query_expansion_spec
|
|
140
145
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec]
|
|
141
146
|
# The query expansion specification that specifies the conditions under which
|
|
@@ -170,7 +175,8 @@ module Google
|
|
|
170
175
|
# * inventory(place_id,price)
|
|
171
176
|
# * inventory(place_id,original_price)
|
|
172
177
|
# * inventory(place_id,attributes.key), where key is any key in the
|
|
173
|
-
#
|
|
178
|
+
# {::Google::Cloud::Retail::V2::LocalInventory#attributes Product.local_inventories.attributes}
|
|
179
|
+
# map.
|
|
174
180
|
# * attributes.key, where key is any key in the
|
|
175
181
|
# {::Google::Cloud::Retail::V2::Product#attributes Product.attributes} map.
|
|
176
182
|
# * pickupInStore.id, where id is any
|
|
@@ -233,6 +239,29 @@ module Google
|
|
|
233
239
|
# @!attribute [rw] personalization_spec
|
|
234
240
|
# @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec]
|
|
235
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.
|
|
236
265
|
class SearchRequest
|
|
237
266
|
include ::Google::Protobuf::MessageExts
|
|
238
267
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -252,19 +281,29 @@ module Google
|
|
|
252
281
|
# @return [::Array<::String>]
|
|
253
282
|
# List of keys to exclude when faceting.
|
|
254
283
|
#
|
|
284
|
+
#
|
|
255
285
|
# By default,
|
|
256
286
|
# {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#key FacetKey.key}
|
|
257
287
|
# is not excluded from the filter unless it is listed in this field.
|
|
258
288
|
#
|
|
259
|
-
#
|
|
260
|
-
#
|
|
261
|
-
#
|
|
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
|
|
262
296
|
# {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#key FacetKey.key}
|
|
263
|
-
#
|
|
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.
|
|
264
301
|
#
|
|
265
|
-
# If
|
|
266
|
-
# "Red" with count 100 and "Blue" with count
|
|
267
|
-
# "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.
|
|
268
307
|
#
|
|
269
308
|
# A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error
|
|
270
309
|
# is returned.
|
|
@@ -356,8 +395,8 @@ module Google
|
|
|
356
395
|
# Only get facet for the given restricted values. For example, when using
|
|
357
396
|
# "pickupInStore" as key and set restricted values to
|
|
358
397
|
# ["store123", "store456"], only facets for "store123" and "store456" are
|
|
359
|
-
# returned. Only supported on textual fields
|
|
360
|
-
# Maximum is 20.
|
|
398
|
+
# returned. Only supported on predefined textual fields, custom textual
|
|
399
|
+
# attributes and fulfillments. Maximum is 20.
|
|
361
400
|
#
|
|
362
401
|
# Must be set for the fulfillment facet keys:
|
|
363
402
|
#
|
|
@@ -470,7 +509,7 @@ module Google
|
|
|
470
509
|
# Condition boost specifications. If a product matches multiple conditions
|
|
471
510
|
# in the specifictions, boost scores from these specifications are all
|
|
472
511
|
# applied and combined in a non-linear way. Maximum number of
|
|
473
|
-
# specifications is
|
|
512
|
+
# specifications is 20.
|
|
474
513
|
# @!attribute [rw] skip_boost_spec_validation
|
|
475
514
|
# @return [::Boolean]
|
|
476
515
|
# Whether to skip boostspec validation. If this field is set to true,
|
|
@@ -577,6 +616,43 @@ module Google
|
|
|
577
616
|
end
|
|
578
617
|
end
|
|
579
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
|
+
|
|
580
656
|
# The search mode of each search request.
|
|
581
657
|
module SearchMode
|
|
582
658
|
# Default value. In this case both product search and faceted search will
|
|
@@ -598,7 +674,9 @@ module Google
|
|
|
598
674
|
# Only faceted search will be performed. The product search will be
|
|
599
675
|
# disabled.
|
|
600
676
|
#
|
|
601
|
-
# 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
|
|
602
680
|
# {::Google::Cloud::Retail::V2::SearchRequest#dynamic_facet_spec SearchRequest.dynamic_facet_spec}
|
|
603
681
|
# should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
|
|
604
682
|
# [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
|
|
@@ -624,7 +702,9 @@ module Google
|
|
|
624
702
|
# matches.
|
|
625
703
|
# @!attribute [rw] corrected_query
|
|
626
704
|
# @return [::String]
|
|
627
|
-
#
|
|
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.
|
|
628
708
|
# @!attribute [rw] attribution_token
|
|
629
709
|
# @return [::String]
|
|
630
710
|
# A unique search token. This should be included in the
|
|
@@ -642,10 +722,10 @@ module Google
|
|
|
642
722
|
# @!attribute [rw] redirect_uri
|
|
643
723
|
# @return [::String]
|
|
644
724
|
# The URI of a customer-defined redirect page. If redirect action is
|
|
645
|
-
# triggered, no search
|
|
725
|
+
# triggered, no search is performed, and only
|
|
646
726
|
# {::Google::Cloud::Retail::V2::SearchResponse#redirect_uri redirect_uri} and
|
|
647
727
|
# {::Google::Cloud::Retail::V2::SearchResponse#attribution_token attribution_token}
|
|
648
|
-
#
|
|
728
|
+
# are set in the response.
|
|
649
729
|
# @!attribute [rw] applied_controls
|
|
650
730
|
# @return [::Array<::String>]
|
|
651
731
|
# The fully qualified resource name of applied
|
|
@@ -45,11 +45,15 @@ module Google
|
|
|
45
45
|
# able to uniquely identify a visitor on a single device. This unique
|
|
46
46
|
# identifier should not change if the visitor log in/out of the website.
|
|
47
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
|
+
#
|
|
48
52
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
|
49
53
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
50
54
|
#
|
|
51
55
|
# The field should not contain PII or user-data. We recommend to use Google
|
|
52
|
-
#
|
|
56
|
+
# Analytics [Client
|
|
53
57
|
# ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
|
|
54
58
|
# for this field.
|
|
55
59
|
# @!attribute [rw] session_id
|
|
@@ -102,12 +106,11 @@ module Google
|
|
|
102
106
|
# @return [::Array<::Google::Cloud::Retail::V2::ProductDetail>]
|
|
103
107
|
# The main product details related to the event.
|
|
104
108
|
#
|
|
105
|
-
# This field is
|
|
109
|
+
# This field is optional except for the following event types:
|
|
106
110
|
#
|
|
107
111
|
# * `add-to-cart`
|
|
108
112
|
# * `detail-page-view`
|
|
109
113
|
# * `purchase-complete`
|
|
110
|
-
# * `search`
|
|
111
114
|
#
|
|
112
115
|
# In a `search` event, this field represents the products returned to the end
|
|
113
116
|
# user on the current page (the end user may have not finished browsing the
|
|
@@ -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: 2022-
|
|
11
|
+
date: 2022-06-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gapic-common
|
|
@@ -265,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
265
265
|
- !ruby/object:Gem::Version
|
|
266
266
|
version: '0'
|
|
267
267
|
requirements: []
|
|
268
|
-
rubygems_version: 3.3.
|
|
268
|
+
rubygems_version: 3.3.14
|
|
269
269
|
signing_key:
|
|
270
270
|
specification_version: 4
|
|
271
271
|
summary: API Client library for the Retail V2 API
|