google-cloud-retail-v2 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +8 -8
  3. data/LICENSE.md +188 -190
  4. data/README.md +3 -3
  5. data/lib/google/cloud/retail/v2.rb +2 -0
  6. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -0
  7. data/lib/google/cloud/retail/v2/catalog_service/client.rb +211 -15
  8. data/lib/google/cloud/retail/v2/catalog_service/paths.rb +21 -0
  9. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +16 -0
  10. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +46 -0
  11. data/lib/google/cloud/retail/v2/common_pb.rb +46 -0
  12. data/lib/google/cloud/retail/v2/completion_service.rb +54 -0
  13. data/lib/google/cloud/retail/v2/completion_service/client.rb +546 -0
  14. data/lib/google/cloud/retail/v2/completion_service/credentials.rb +51 -0
  15. data/lib/google/cloud/retail/v2/completion_service/operations.rb +655 -0
  16. data/lib/google/cloud/retail/v2/completion_service/paths.rb +52 -0
  17. data/lib/google/cloud/retail/v2/completion_service_pb.rb +50 -0
  18. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +61 -0
  19. data/lib/google/cloud/retail/v2/import_config_pb.rb +32 -0
  20. data/lib/google/cloud/retail/v2/prediction_service/client.rb +41 -43
  21. data/lib/google/cloud/retail/v2/product_pb.rb +21 -0
  22. data/lib/google/cloud/retail/v2/product_service/client.rb +643 -18
  23. data/lib/google/cloud/retail/v2/product_service/operations.rb +11 -11
  24. data/lib/google/cloud/retail/v2/product_service_pb.rb +56 -0
  25. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +75 -0
  26. data/lib/google/cloud/retail/v2/search_service.rb +53 -0
  27. data/lib/google/cloud/retail/v2/search_service/client.rb +541 -0
  28. data/lib/google/cloud/retail/v2/search_service/credentials.rb +51 -0
  29. data/lib/google/cloud/retail/v2/search_service/paths.rb +54 -0
  30. data/lib/google/cloud/retail/v2/search_service_pb.rb +131 -0
  31. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +53 -0
  32. data/lib/google/cloud/retail/v2/user_event_pb.rb +11 -0
  33. data/lib/google/cloud/retail/v2/user_event_service/client.rb +12 -15
  34. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +11 -11
  35. data/lib/google/cloud/retail/v2/user_event_service/paths.rb +19 -0
  36. data/lib/google/cloud/retail/v2/version.rb +1 -1
  37. data/proto_docs/google/api/field_behavior.rb +7 -1
  38. data/proto_docs/google/api/httpbody.rb +4 -3
  39. data/proto_docs/google/cloud/retail/v2/catalog.rb +6 -6
  40. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +53 -4
  41. data/proto_docs/google/cloud/retail/v2/common.rb +272 -4
  42. data/proto_docs/google/cloud/retail/v2/completion_service.rb +162 -0
  43. data/proto_docs/google/cloud/retail/v2/import_config.rb +122 -6
  44. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +32 -31
  45. data/proto_docs/google/cloud/retail/v2/product.rb +266 -10
  46. data/proto_docs/google/cloud/retail/v2/product_service.rb +362 -2
  47. data/proto_docs/google/cloud/retail/v2/purge_config.rb +1 -1
  48. data/proto_docs/google/cloud/retail/v2/search_service.rb +820 -0
  49. data/proto_docs/google/cloud/retail/v2/user_event.rb +95 -3
  50. data/proto_docs/google/type/date.rb +53 -0
  51. metadata +32 -10
@@ -0,0 +1,162 @@
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 is not automatically enabled. Before using cloud-retail,
84
+ # contact retail-search-support@google.com first.
85
+ # @!attribute [rw] max_suggestions
86
+ # @return [::Integer]
87
+ # Completion max suggestions.
88
+ #
89
+ # The maximum allowed max suggestions is 20. The default value is 20.
90
+ class CompleteQueryRequest
91
+ include ::Google::Protobuf::MessageExts
92
+ extend ::Google::Protobuf::MessageExts::ClassMethods
93
+ end
94
+
95
+ # Response of the auto-complete query.
96
+ # @!attribute [rw] completion_results
97
+ # @return [::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::CompletionResult>]
98
+ # Results of the matching suggestions. The result list is ordered and the
99
+ # first result is top suggestion.
100
+ # @!attribute [rw] attribution_token
101
+ # @return [::String]
102
+ # A unique complete token. This should be included in the
103
+ # {::Google::Cloud::Retail::V2::SearchRequest SearchRequest} resulting from this
104
+ # completion, which enables accurate attribution of complete model
105
+ # performance.
106
+ # @!attribute [rw] recent_search_results
107
+ # @return [::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::RecentSearchResult>]
108
+ # Matched recent searches of this user. This field is a restricted feature.
109
+ # Contact Retail Support (retail-search-support@google.com) if you are
110
+ # interested in enabling it.
111
+ #
112
+ # This feature is only available when
113
+ # {::Google::Cloud::Retail::V2::CompleteQueryRequest#visitor_id CompleteQueryRequest.visitor_id}
114
+ # field is set and {::Google::Cloud::Retail::V2::UserEvent UserEvent} is imported.
115
+ # The recent searches satisfy the follow rules:
116
+ # * They are ordered from latest to oldest.
117
+ # * They are matched with
118
+ # {::Google::Cloud::Retail::V2::CompleteQueryRequest#query CompleteQueryRequest.query}
119
+ # case insensitively.
120
+ # * They are transformed to lower cases.
121
+ # * They are UTF-8 safe.
122
+ #
123
+ # Recent searches are deduplicated. More recent searches will be reserved
124
+ # when duplication happens.
125
+ class CompleteQueryResponse
126
+ include ::Google::Protobuf::MessageExts
127
+ extend ::Google::Protobuf::MessageExts::ClassMethods
128
+
129
+ # Resource that represents completion results.
130
+ # @!attribute [rw] suggestion
131
+ # @return [::String]
132
+ # The suggestion for the query.
133
+ # @!attribute [rw] attributes
134
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
135
+ # Additional custom attributes ingested through BigQuery.
136
+ class CompletionResult
137
+ include ::Google::Protobuf::MessageExts
138
+ extend ::Google::Protobuf::MessageExts::ClassMethods
139
+
140
+ # @!attribute [rw] key
141
+ # @return [::String]
142
+ # @!attribute [rw] value
143
+ # @return [::Google::Cloud::Retail::V2::CustomAttribute]
144
+ class AttributesEntry
145
+ include ::Google::Protobuf::MessageExts
146
+ extend ::Google::Protobuf::MessageExts::ClassMethods
147
+ end
148
+ end
149
+
150
+ # Recent search of this user.
151
+ # @!attribute [rw] recent_search
152
+ # @return [::String]
153
+ # The recent search query.
154
+ class RecentSearchResult
155
+ include ::Google::Protobuf::MessageExts
156
+ extend ::Google::Protobuf::MessageExts::ClassMethods
157
+ end
158
+ end
159
+ end
160
+ end
161
+ end
162
+ 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?hl=en.
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 id (can be project # or id) that the BigQuery source is in with
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
- # id from the parent request.
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?hl=en.
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
- # 10k items.
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
+ # Contact Retail Support (retail-search-support@google.com) if you are
210
+ # 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 id of the recommendation engine placement. This id is used to identify
30
- # the set of models that will be used to make the prediction.
31
- #
32
- # We currently support three placements with the following IDs by default:
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 for the predict request.
114
+ # The labels applied to a resource must meet the following requirements:
122
115
  #
123
- # * Label keys can contain lowercase letters, digits and hyphens, must start
124
- # with a letter, and must end with a letter or digit.
125
- # * Non-zero label values can contain lowercase letters, digits and hyphens,
126
- # must start with a letter, and must end with a letter or digit.
127
- # * No more than 64 labels can be associated with a given request.
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 https://goo.gl/xmQnxf for more information on and examples of labels.
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