google-cloud-retail-v2 0.3.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -0
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +240 -40
- data/lib/google/cloud/retail/v2/catalog_service/paths.rb +21 -0
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +16 -0
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +46 -0
- data/lib/google/cloud/retail/v2/common_pb.rb +46 -0
- data/lib/google/cloud/retail/v2/completion_service/client.rb +545 -0
- data/lib/google/cloud/retail/v2/completion_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +664 -0
- data/lib/google/cloud/retail/v2/completion_service/paths.rb +52 -0
- data/lib/google/cloud/retail/v2/completion_service.rb +54 -0
- data/lib/google/cloud/retail/v2/completion_service_pb.rb +50 -0
- data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +61 -0
- data/lib/google/cloud/retail/v2/import_config_pb.rb +32 -0
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +66 -70
- data/lib/google/cloud/retail/v2/product_pb.rb +21 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +682 -43
- data/lib/google/cloud/retail/v2/product_service/operations.rb +30 -21
- data/lib/google/cloud/retail/v2/product_service_pb.rb +56 -0
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +75 -0
- data/lib/google/cloud/retail/v2/search_service/client.rb +552 -0
- data/lib/google/cloud/retail/v2/search_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/search_service/paths.rb +54 -0
- data/lib/google/cloud/retail/v2/search_service.rb +53 -0
- data/lib/google/cloud/retail/v2/search_service_pb.rb +133 -0
- data/lib/google/cloud/retail/v2/search_service_services_pb.rb +53 -0
- data/lib/google/cloud/retail/v2/user_event_pb.rb +11 -0
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +45 -42
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +30 -21
- data/lib/google/cloud/retail/v2/user_event_service/paths.rb +19 -0
- 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.rb +6 -6
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +53 -4
- data/proto_docs/google/cloud/retail/v2/common.rb +272 -4
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +164 -0
- data/proto_docs/google/cloud/retail/v2/import_config.rb +122 -6
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +32 -31
- data/proto_docs/google/cloud/retail/v2/product.rb +265 -9
- data/proto_docs/google/cloud/retail/v2/product_service.rb +362 -2
- data/proto_docs/google/cloud/retail/v2/purge_config.rb +1 -1
- data/proto_docs/google/cloud/retail/v2/search_service.rb +711 -0
- data/proto_docs/google/cloud/retail/v2/user_event.rb +110 -6
- data/proto_docs/google/type/date.rb +53 -0
- metadata +20 -4
@@ -0,0 +1,164 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Retail
|
23
|
+
module V2
|
24
|
+
# Auto-complete parameters.
|
25
|
+
# @!attribute [rw] catalog
|
26
|
+
# @return [::String]
|
27
|
+
# Required. Catalog for which the completion is performed.
|
28
|
+
#
|
29
|
+
# Full resource name of catalog, such as
|
30
|
+
# `projects/*/locations/global/catalogs/default_catalog`.
|
31
|
+
# @!attribute [rw] query
|
32
|
+
# @return [::String]
|
33
|
+
# Required. The query used to generate suggestions.
|
34
|
+
#
|
35
|
+
# The maximum number of allowed characters is 255.
|
36
|
+
# @!attribute [rw] visitor_id
|
37
|
+
# @return [::String]
|
38
|
+
# A unique identifier for tracking visitors. For example, this could be
|
39
|
+
# implemented with an HTTP cookie, which should be able to uniquely identify
|
40
|
+
# a visitor on a single device. This unique identifier should not change if
|
41
|
+
# the visitor logs in or out of the website.
|
42
|
+
#
|
43
|
+
# The field must be a UTF-8 encoded string with a length limit of 128
|
44
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
45
|
+
# @!attribute [rw] language_codes
|
46
|
+
# @return [::Array<::String>]
|
47
|
+
# The list of languages of the query. This is
|
48
|
+
# the BCP-47 language code, such as "en-US" or "sr-Latn".
|
49
|
+
# For more information, see
|
50
|
+
# [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
|
51
|
+
#
|
52
|
+
# The maximum number of allowed characters is 255.
|
53
|
+
# Only "en-US" is currently supported.
|
54
|
+
# @!attribute [rw] device_type
|
55
|
+
# @return [::String]
|
56
|
+
# The device type context for completion suggestions.
|
57
|
+
# It is useful to apply different suggestions on different device types, e.g.
|
58
|
+
# DESKTOP, MOBILE. If it is empty, the suggestions are across all device
|
59
|
+
# types.
|
60
|
+
#
|
61
|
+
# Supported formats:
|
62
|
+
#
|
63
|
+
# * UNKNOWN_DEVICE_TYPE
|
64
|
+
#
|
65
|
+
# * DESKTOP
|
66
|
+
#
|
67
|
+
# * MOBILE
|
68
|
+
#
|
69
|
+
# * A customized string starts with OTHER_, e.g. OTHER_IPHONE.
|
70
|
+
# @!attribute [rw] dataset
|
71
|
+
# @return [::String]
|
72
|
+
# Determines which dataset to use for fetching completion. "user-data" will
|
73
|
+
# use the imported dataset through
|
74
|
+
# {::Google::Cloud::Retail::V2::CompletionService::Client#import_completion_data CompletionService.ImportCompletionData}.
|
75
|
+
# "cloud-retail" will use the dataset generated by cloud retail based on user
|
76
|
+
# events. If leave empty, it will use the "user-data".
|
77
|
+
#
|
78
|
+
# Current supported values:
|
79
|
+
#
|
80
|
+
# * user-data
|
81
|
+
#
|
82
|
+
# * cloud-retail
|
83
|
+
# This option requires additional allowlisting. Before using cloud-retail,
|
84
|
+
# contact Cloud Retail support team first.
|
85
|
+
# @!attribute [rw] max_suggestions
|
86
|
+
# @return [::Integer]
|
87
|
+
# Completion max suggestions. If left unset or set to 0, then will fallback
|
88
|
+
# to the configured value [CompletionConfig.max_suggestions][].
|
89
|
+
#
|
90
|
+
# The maximum allowed max suggestions is 20. If it is set higher, it will be
|
91
|
+
# capped by 20.
|
92
|
+
class CompleteQueryRequest
|
93
|
+
include ::Google::Protobuf::MessageExts
|
94
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
95
|
+
end
|
96
|
+
|
97
|
+
# Response of the auto-complete query.
|
98
|
+
# @!attribute [rw] completion_results
|
99
|
+
# @return [::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::CompletionResult>]
|
100
|
+
# Results of the matching suggestions. The result list is ordered and the
|
101
|
+
# first result is top suggestion.
|
102
|
+
# @!attribute [rw] attribution_token
|
103
|
+
# @return [::String]
|
104
|
+
# A unique complete token. This should be included in the
|
105
|
+
# {::Google::Cloud::Retail::V2::SearchRequest SearchRequest} resulting from this
|
106
|
+
# completion, which enables accurate attribution of complete model
|
107
|
+
# performance.
|
108
|
+
# @!attribute [rw] recent_search_results
|
109
|
+
# @return [::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::RecentSearchResult>]
|
110
|
+
# Matched recent searches of this user. The maximum number of recent searches
|
111
|
+
# is 10. This field is a restricted feature. Contact Retail Search support
|
112
|
+
# team if you are interested in enabling it.
|
113
|
+
#
|
114
|
+
# This feature is only available when
|
115
|
+
# {::Google::Cloud::Retail::V2::CompleteQueryRequest#visitor_id CompleteQueryRequest.visitor_id}
|
116
|
+
# field is set and {::Google::Cloud::Retail::V2::UserEvent UserEvent} is imported.
|
117
|
+
# The recent searches satisfy the follow rules:
|
118
|
+
# * They are ordered from latest to oldest.
|
119
|
+
# * They are matched with
|
120
|
+
# {::Google::Cloud::Retail::V2::CompleteQueryRequest#query CompleteQueryRequest.query}
|
121
|
+
# case insensitively.
|
122
|
+
# * They are transformed to lower cases.
|
123
|
+
# * They are UTF-8 safe.
|
124
|
+
#
|
125
|
+
# Recent searches are deduplicated. More recent searches will be reserved
|
126
|
+
# when duplication happens.
|
127
|
+
class CompleteQueryResponse
|
128
|
+
include ::Google::Protobuf::MessageExts
|
129
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
130
|
+
|
131
|
+
# Resource that represents completion results.
|
132
|
+
# @!attribute [rw] suggestion
|
133
|
+
# @return [::String]
|
134
|
+
# The suggestion for the query.
|
135
|
+
# @!attribute [rw] attributes
|
136
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
|
137
|
+
# Additional custom attributes ingested through BigQuery.
|
138
|
+
class CompletionResult
|
139
|
+
include ::Google::Protobuf::MessageExts
|
140
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
141
|
+
|
142
|
+
# @!attribute [rw] key
|
143
|
+
# @return [::String]
|
144
|
+
# @!attribute [rw] value
|
145
|
+
# @return [::Google::Cloud::Retail::V2::CustomAttribute]
|
146
|
+
class AttributesEntry
|
147
|
+
include ::Google::Protobuf::MessageExts
|
148
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Recent search of this user.
|
153
|
+
# @!attribute [rw] recent_search
|
154
|
+
# @return [::String]
|
155
|
+
# The recent search query.
|
156
|
+
class RecentSearchResult
|
157
|
+
include ::Google::Protobuf::MessageExts
|
158
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
@@ -31,7 +31,7 @@ module Google
|
|
31
31
|
# files, such as `gs://bucket/directory/*.json`. A request can
|
32
32
|
# contain at most 100 files, and each file can be up to 2 GB. See
|
33
33
|
# [Importing product
|
34
|
-
# information](https://cloud.google.com/recommendations-ai/docs/upload-catalog)
|
34
|
+
# information](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog)
|
35
35
|
# for the expected file format and setup instructions.
|
36
36
|
# @!attribute [rw] data_schema
|
37
37
|
# @return [::String]
|
@@ -50,18 +50,25 @@ module Google
|
|
50
50
|
# * `user_event` (default): One JSON
|
51
51
|
# {::Google::Cloud::Retail::V2::UserEvent UserEvent} per line.
|
52
52
|
# * `user_event_ga360`: Using
|
53
|
-
# https://support.google.com/analytics/answer/3437719
|
53
|
+
# https://support.google.com/analytics/answer/3437719.
|
54
54
|
class GcsSource
|
55
55
|
include ::Google::Protobuf::MessageExts
|
56
56
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
57
57
|
end
|
58
58
|
|
59
59
|
# BigQuery source import data from.
|
60
|
+
# @!attribute [rw] partition_date
|
61
|
+
# @return [::Google::Type::Date]
|
62
|
+
# BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
|
63
|
+
#
|
64
|
+
# Only supported when
|
65
|
+
# {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
|
66
|
+
# is set to `FULL`.
|
60
67
|
# @!attribute [rw] project_id
|
61
68
|
# @return [::String]
|
62
|
-
# The project
|
69
|
+
# The project ID (can be project # or ID) that the BigQuery source is in with
|
63
70
|
# a length limit of 128 characters. If not specified, inherits the project
|
64
|
-
#
|
71
|
+
# ID from the parent request.
|
65
72
|
# @!attribute [rw] dataset_id
|
66
73
|
# @return [::String]
|
67
74
|
# Required. The BigQuery data set to copy the data from with a length limit
|
@@ -92,7 +99,7 @@ module Google
|
|
92
99
|
# * `user_event` (default): One JSON
|
93
100
|
# {::Google::Cloud::Retail::V2::UserEvent UserEvent} per line.
|
94
101
|
# * `user_event_ga360`: Using
|
95
|
-
# https://support.google.com/analytics/answer/3437719
|
102
|
+
# https://support.google.com/analytics/answer/3437719.
|
96
103
|
class BigQuerySource
|
97
104
|
include ::Google::Protobuf::MessageExts
|
98
105
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -103,7 +110,7 @@ module Google
|
|
103
110
|
# @return [::Array<::Google::Cloud::Retail::V2::Product>]
|
104
111
|
# Required. A list of products to update/create. Each product must have a
|
105
112
|
# valid {::Google::Cloud::Retail::V2::Product#id Product.id}. Recommended max of
|
106
|
-
#
|
113
|
+
# 100 items.
|
107
114
|
class ProductInlineSource
|
108
115
|
include ::Google::Protobuf::MessageExts
|
109
116
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -138,6 +145,17 @@ module Google
|
|
138
145
|
#
|
139
146
|
# If no updateMask is specified, requires products.create permission.
|
140
147
|
# If updateMask is specified, requires products.update permission.
|
148
|
+
# @!attribute [rw] request_id
|
149
|
+
# @return [::String]
|
150
|
+
# Unique identifier provided by client, within the ancestor
|
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`.
|
141
159
|
# @!attribute [rw] input_config
|
142
160
|
# @return [::Google::Cloud::Retail::V2::ProductInputConfig]
|
143
161
|
# Required. The desired input location of the data.
|
@@ -148,9 +166,50 @@ module Google
|
|
148
166
|
# @return [::Google::Protobuf::FieldMask]
|
149
167
|
# Indicates which fields in the provided imported 'products' to update. If
|
150
168
|
# not set, will by default update all fields.
|
169
|
+
# @!attribute [rw] reconciliation_mode
|
170
|
+
# @return [::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode]
|
171
|
+
# The mode of reconciliation between existing products and the products to be
|
172
|
+
# imported. Defaults to
|
173
|
+
# {::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
|
174
|
+
# @!attribute [rw] notification_pubsub_topic
|
175
|
+
# @return [::String]
|
176
|
+
# Pub/Sub topic for receiving notification. If this field is set,
|
177
|
+
# when the import is finished, a notification will be sent to
|
178
|
+
# specified Pub/Sub topic. The message data will be JSON string of a
|
179
|
+
# {::Google::Longrunning::Operation Operation}.
|
180
|
+
# Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
|
181
|
+
#
|
182
|
+
# Only supported when
|
183
|
+
# {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
|
184
|
+
# is set to `FULL`.
|
151
185
|
class ImportProductsRequest
|
152
186
|
include ::Google::Protobuf::MessageExts
|
153
187
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
188
|
+
|
189
|
+
# Indicates how imported products are reconciled with the existing products
|
190
|
+
# created or imported before.
|
191
|
+
module ReconciliationMode
|
192
|
+
# Defaults to INCREMENTAL.
|
193
|
+
RECONCILIATION_MODE_UNSPECIFIED = 0
|
194
|
+
|
195
|
+
# Inserts new products or updates existing products.
|
196
|
+
INCREMENTAL = 1
|
197
|
+
|
198
|
+
# Calculates diff and replaces the entire product dataset. Existing
|
199
|
+
# products may be deleted if they are not present in the source location.
|
200
|
+
#
|
201
|
+
# Can only be while using
|
202
|
+
# {::Google::Cloud::Retail::V2::BigQuerySource BigQuerySource}.
|
203
|
+
#
|
204
|
+
# Add the IAM permission "BigQuery Data Viewer" for
|
205
|
+
# cloud-retail-customer-data-access@system.gserviceaccount.com before
|
206
|
+
# 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
|
+
FULL = 2
|
212
|
+
end
|
154
213
|
end
|
155
214
|
|
156
215
|
# Request message for the ImportUserEvents request.
|
@@ -169,6 +228,27 @@ module Google
|
|
169
228
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
170
229
|
end
|
171
230
|
|
231
|
+
# Request message for ImportCompletionData methods.
|
232
|
+
# @!attribute [rw] parent
|
233
|
+
# @return [::String]
|
234
|
+
# Required. The catalog which the suggestions dataset belongs to.
|
235
|
+
#
|
236
|
+
# Format: `projects/1234/locations/global/catalogs/default_catalog`.
|
237
|
+
# @!attribute [rw] input_config
|
238
|
+
# @return [::Google::Cloud::Retail::V2::CompletionDataInputConfig]
|
239
|
+
# Required. The desired input location of the data.
|
240
|
+
# @!attribute [rw] notification_pubsub_topic
|
241
|
+
# @return [::String]
|
242
|
+
# Pub/Sub topic for receiving notification. If this field is set,
|
243
|
+
# when the import is finished, a notification will be sent to
|
244
|
+
# specified Pub/Sub topic. The message data will be JSON string of a
|
245
|
+
# {::Google::Longrunning::Operation Operation}.
|
246
|
+
# Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
|
247
|
+
class ImportCompletionDataRequest
|
248
|
+
include ::Google::Protobuf::MessageExts
|
249
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
250
|
+
end
|
251
|
+
|
172
252
|
# The input config source for products.
|
173
253
|
# @!attribute [rw] product_inline_source
|
174
254
|
# @return [::Google::Cloud::Retail::V2::ProductInlineSource]
|
@@ -199,6 +279,19 @@ module Google
|
|
199
279
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
200
280
|
end
|
201
281
|
|
282
|
+
# The input config source for completion data.
|
283
|
+
# @!attribute [rw] big_query_source
|
284
|
+
# @return [::Google::Cloud::Retail::V2::BigQuerySource]
|
285
|
+
# Required. BigQuery input source.
|
286
|
+
#
|
287
|
+
# Add the IAM permission "BigQuery Data Viewer" for
|
288
|
+
# cloud-retail-customer-data-access@system.gserviceaccount.com before
|
289
|
+
# using this feature otherwise an error is thrown.
|
290
|
+
class CompletionDataInputConfig
|
291
|
+
include ::Google::Protobuf::MessageExts
|
292
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
293
|
+
end
|
294
|
+
|
202
295
|
# Metadata related to the progress of the Import operation. This will be
|
203
296
|
# returned by the google.longrunning.Operation.metadata field.
|
204
297
|
# @!attribute [rw] create_time
|
@@ -214,6 +307,17 @@ module Google
|
|
214
307
|
# @!attribute [rw] failure_count
|
215
308
|
# @return [::Integer]
|
216
309
|
# Count of entries that encountered errors while processing.
|
310
|
+
# @!attribute [rw] request_id
|
311
|
+
# @return [::String]
|
312
|
+
# Id of the request / operation. This is parroting back the requestId
|
313
|
+
# that was passed in the request.
|
314
|
+
# @!attribute [rw] notification_pubsub_topic
|
315
|
+
# @return [::String]
|
316
|
+
# Pub/Sub topic for receiving notification. If this field is set,
|
317
|
+
# when the import is finished, a notification will be sent to
|
318
|
+
# specified Pub/Sub topic. The message data will be JSON string of a
|
319
|
+
# {::Google::Longrunning::Operation Operation}.
|
320
|
+
# Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
|
217
321
|
class ImportMetadata
|
218
322
|
include ::Google::Protobuf::MessageExts
|
219
323
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -265,6 +369,18 @@ module Google
|
|
265
369
|
include ::Google::Protobuf::MessageExts
|
266
370
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
267
371
|
end
|
372
|
+
|
373
|
+
# Response of the
|
374
|
+
# {::Google::Cloud::Retail::V2::ImportCompletionDataRequest ImportCompletionDataRequest}.
|
375
|
+
# If the long running operation is done, this message is returned by the
|
376
|
+
# google.longrunning.Operations.response field if the operation is successful.
|
377
|
+
# @!attribute [rw] error_samples
|
378
|
+
# @return [::Array<::Google::Rpc::Status>]
|
379
|
+
# A sample of errors encountered while processing the request.
|
380
|
+
class ImportCompletionDataResponse
|
381
|
+
include ::Google::Protobuf::MessageExts
|
382
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
383
|
+
end
|
268
384
|
end
|
269
385
|
end
|
270
386
|
end
|
@@ -26,30 +26,10 @@ module Google
|
|
26
26
|
# @return [::String]
|
27
27
|
# Required. Full resource name of the format:
|
28
28
|
# \\{name=projects/*/locations/global/catalogs/default_catalog/placements/*}
|
29
|
-
# The
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
# * `shopping_cart`: Predicts products frequently bought together with one or
|
35
|
-
# more products in the same shopping session. Commonly displayed after
|
36
|
-
# `add-to-cart` events, on product detail pages, or on the shopping cart
|
37
|
-
# page.
|
38
|
-
#
|
39
|
-
# * `home_page`: Predicts the next product that a user will most likely
|
40
|
-
# engage with or purchase based on the shopping or viewing history of the
|
41
|
-
# specified `userId` or `visitorId`. For example - Recommendations for you.
|
42
|
-
#
|
43
|
-
# * `product_detail`: Predicts the next product that a user will most likely
|
44
|
-
# engage with or purchase. The prediction is based on the shopping or
|
45
|
-
# viewing history of the specified `userId` or `visitorId` and its
|
46
|
-
# relevance to a specified `CatalogItem`. Typically used on product detail
|
47
|
-
# pages. For example - More products like this.
|
48
|
-
#
|
49
|
-
# * `recently_viewed_default`: Returns up to 75 products recently viewed by
|
50
|
-
# the specified `userId` or `visitorId`, most recent ones first. Returns
|
51
|
-
# nothing if neither of them has viewed any products yet. For example -
|
52
|
-
# Recently viewed.
|
29
|
+
# The ID of the Recommendations AI placement. Before you can request
|
30
|
+
# predictions from your model, you must create at least one placement for it.
|
31
|
+
# For more information, see [Managing
|
32
|
+
# placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
|
53
33
|
#
|
54
34
|
# The full list of available placements can be seen at
|
55
35
|
# https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
|
@@ -80,6 +60,9 @@ module Google
|
|
80
60
|
# `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings
|
81
61
|
# with a size limit of 1,000 characters.
|
82
62
|
#
|
63
|
+
# Note: "Recently viewed" models don't support tag filtering at the
|
64
|
+
# moment.
|
65
|
+
#
|
83
66
|
# * filterOutOfStockItems. Restricts predictions to products that do not
|
84
67
|
# have a
|
85
68
|
# stockState value of OUT_OF_STOCK.
|
@@ -116,17 +99,35 @@ module Google
|
|
116
99
|
# * `strictFiltering`: Boolean. True by default. If set to false, the service
|
117
100
|
# will return generic (unfiltered) popular products instead of empty if
|
118
101
|
# your filter blocks all prediction results.
|
102
|
+
# * `priceRerankLevel`: String. Default empty. If set to be non-empty, then
|
103
|
+
# it needs to be one of {'no-price-reranking', 'low-price-reranking',
|
104
|
+
# 'medium-price-reranking', 'high-price-reranking'}. This gives
|
105
|
+
# request-level control and adjusts prediction results based on product
|
106
|
+
# price.
|
107
|
+
# * `diversityLevel`: String. Default empty. If set to be non-empty, then
|
108
|
+
# it needs to be one of {'no-diversity', 'low-diversity',
|
109
|
+
# 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives
|
110
|
+
# request-level control and adjusts prediction results based on product
|
111
|
+
# category.
|
119
112
|
# @!attribute [rw] labels
|
120
113
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
121
|
-
# The labels
|
114
|
+
# The labels applied to a resource must meet the following requirements:
|
122
115
|
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
#
|
116
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
117
|
+
# * Each label must be a key-value pair.
|
118
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
119
|
+
# characters, and cannot be empty. Values can be empty, and have a maximum
|
120
|
+
# length of 63 characters.
|
121
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
122
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
123
|
+
# international characters are allowed.
|
124
|
+
# * The key portion of a label must be unique. However, you can use the same
|
125
|
+
# key with multiple resources.
|
126
|
+
# * Keys must start with a lowercase letter or international character.
|
128
127
|
#
|
129
|
-
# See
|
128
|
+
# See [Google Cloud
|
129
|
+
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
130
|
+
# for more details.
|
130
131
|
class PredictRequest
|
131
132
|
include ::Google::Protobuf::MessageExts
|
132
133
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|