google-cloud-retail-v2 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +1 -1
  4. data/lib/google/cloud/retail/v2/catalog_pb.rb +69 -0
  5. data/lib/google/cloud/retail/v2/catalog_service/client.rb +718 -0
  6. data/lib/google/cloud/retail/v2/catalog_service/paths.rb +38 -0
  7. data/lib/google/cloud/retail/v2/catalog_service.rb +1 -1
  8. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +34 -0
  9. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +38 -0
  10. data/lib/google/cloud/retail/v2/common_pb.rb +86 -0
  11. data/lib/google/cloud/retail/v2/completion_service/client.rb +11 -8
  12. data/lib/google/cloud/retail/v2/completion_service.rb +2 -2
  13. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +3 -3
  14. data/lib/google/cloud/retail/v2/control_pb.rb +33 -0
  15. data/lib/google/cloud/retail/v2/control_service/client.rb +807 -0
  16. data/lib/google/cloud/retail/v2/control_service/credentials.rb +51 -0
  17. data/lib/google/cloud/retail/v2/control_service/paths.rb +73 -0
  18. data/lib/google/cloud/retail/v2/control_service.rb +49 -0
  19. data/lib/google/cloud/retail/v2/control_service_pb.rb +57 -0
  20. data/lib/google/cloud/retail/v2/control_service_services_pb.rb +65 -0
  21. data/lib/google/cloud/retail/v2/prediction_service/client.rb +7 -8
  22. data/lib/google/cloud/retail/v2/prediction_service.rb +1 -1
  23. data/lib/google/cloud/retail/v2/product_pb.rb +1 -0
  24. data/lib/google/cloud/retail/v2/product_service/client.rb +65 -25
  25. data/lib/google/cloud/retail/v2/product_service.rb +1 -1
  26. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +58 -13
  27. data/lib/google/cloud/retail/v2/search_service/client.rb +16 -5
  28. data/lib/google/cloud/retail/v2/search_service.rb +2 -2
  29. data/lib/google/cloud/retail/v2/search_service_pb.rb +1 -0
  30. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +2 -2
  31. data/lib/google/cloud/retail/v2/serving_config_pb.rb +51 -0
  32. data/lib/google/cloud/retail/v2/serving_config_service/client.rb +998 -0
  33. data/lib/google/cloud/retail/v2/serving_config_service/credentials.rb +51 -0
  34. data/lib/google/cloud/retail/v2/serving_config_service/paths.rb +73 -0
  35. data/lib/google/cloud/retail/v2/serving_config_service.rb +49 -0
  36. data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +66 -0
  37. data/lib/google/cloud/retail/v2/serving_config_service_services_pb.rb +74 -0
  38. data/lib/google/cloud/retail/v2/user_event_service/client.rb +27 -14
  39. data/lib/google/cloud/retail/v2/user_event_service.rb +1 -1
  40. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +5 -0
  41. data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +10 -10
  42. data/lib/google/cloud/retail/v2/version.rb +1 -1
  43. data/lib/google/cloud/retail/v2.rb +4 -2
  44. data/proto_docs/google/api/client.rb +318 -0
  45. data/proto_docs/google/api/launch_stage.rb +71 -0
  46. data/proto_docs/google/cloud/retail/v2/catalog.rb +271 -0
  47. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +133 -0
  48. data/proto_docs/google/cloud/retail/v2/common.rb +316 -4
  49. data/proto_docs/google/cloud/retail/v2/completion_service.rb +6 -3
  50. data/proto_docs/google/cloud/retail/v2/control.rb +75 -0
  51. data/proto_docs/google/cloud/retail/v2/control_service.rb +122 -0
  52. data/proto_docs/google/cloud/retail/v2/import_config.rb +20 -35
  53. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +7 -8
  54. data/proto_docs/google/cloud/retail/v2/product.rb +33 -5
  55. data/proto_docs/google/cloud/retail/v2/search_service.rb +44 -10
  56. data/proto_docs/google/cloud/retail/v2/serving_config.rb +255 -0
  57. data/proto_docs/google/cloud/retail/v2/serving_config_service.rb +143 -0
  58. data/proto_docs/google/cloud/retail/v2/user_event.rb +1 -1
  59. data/proto_docs/google/cloud/retail/v2/user_event_service.rb +24 -8
  60. data/proto_docs/google/rpc/status.rb +4 -2
  61. metadata +24 -4
@@ -0,0 +1,122 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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
+ # Request for CreateControl method.
25
+ # @!attribute [rw] parent
26
+ # @return [::String]
27
+ # Required. Full resource name of parent catalog. Format:
28
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
29
+ # @!attribute [rw] control
30
+ # @return [::Google::Cloud::Retail::V2::Control]
31
+ # Required. The Control to create.
32
+ # @!attribute [rw] control_id
33
+ # @return [::String]
34
+ # Required. The ID to use for the Control, which will become the final
35
+ # component of the Control's resource name.
36
+ #
37
+ # This value should be 4-63 characters, and valid characters
38
+ # are /[a-z][0-9]-_/.
39
+ class CreateControlRequest
40
+ include ::Google::Protobuf::MessageExts
41
+ extend ::Google::Protobuf::MessageExts::ClassMethods
42
+ end
43
+
44
+ # Request for UpdateControl method.
45
+ # @!attribute [rw] control
46
+ # @return [::Google::Cloud::Retail::V2::Control]
47
+ # Required. The Control to update.
48
+ # @!attribute [rw] update_mask
49
+ # @return [::Google::Protobuf::FieldMask]
50
+ # Indicates which fields in the provided
51
+ # {::Google::Cloud::Retail::V2::Control Control} to update. The following are NOT
52
+ # supported:
53
+ #
54
+ # * {::Google::Cloud::Retail::V2::Control#name Control.name}
55
+ #
56
+ # If not set or empty, all supported fields are updated.
57
+ class UpdateControlRequest
58
+ include ::Google::Protobuf::MessageExts
59
+ extend ::Google::Protobuf::MessageExts::ClassMethods
60
+ end
61
+
62
+ # Request for DeleteControl method.
63
+ # @!attribute [rw] name
64
+ # @return [::String]
65
+ # Required. The resource name of the Control to delete. Format:
66
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
67
+ class DeleteControlRequest
68
+ include ::Google::Protobuf::MessageExts
69
+ extend ::Google::Protobuf::MessageExts::ClassMethods
70
+ end
71
+
72
+ # Request for GetControl method.
73
+ # @!attribute [rw] name
74
+ # @return [::String]
75
+ # Required. The resource name of the Control to get. Format:
76
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
77
+ class GetControlRequest
78
+ include ::Google::Protobuf::MessageExts
79
+ extend ::Google::Protobuf::MessageExts::ClassMethods
80
+ end
81
+
82
+ # Request for ListControls method.
83
+ # @!attribute [rw] parent
84
+ # @return [::String]
85
+ # Required. The catalog resource name. Format:
86
+ # `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
87
+ # @!attribute [rw] page_size
88
+ # @return [::Integer]
89
+ # Optional. Maximum number of results to return. If unspecified, defaults
90
+ # to 50. Max allowed value is 1000.
91
+ # @!attribute [rw] page_token
92
+ # @return [::String]
93
+ # Optional. A page token, received from a previous `ListControls` call.
94
+ # Provide this to retrieve the subsequent page.
95
+ # @!attribute [rw] filter
96
+ # @return [::String]
97
+ # Optional. A filter to apply on the list results. Supported features:
98
+ #
99
+ # * List all the products under the parent branch if
100
+ # {::Google::Cloud::Retail::V2::ListControlsRequest#filter filter} is unset.
101
+ # * List controls that are used in a single ServingConfig:
102
+ # 'serving_config = "boosted_home_page_cvr"'
103
+ class ListControlsRequest
104
+ include ::Google::Protobuf::MessageExts
105
+ extend ::Google::Protobuf::MessageExts::ClassMethods
106
+ end
107
+
108
+ # Response for ListControls method.
109
+ # @!attribute [rw] controls
110
+ # @return [::Array<::Google::Cloud::Retail::V2::Control>]
111
+ # All the Controls for a given catalog.
112
+ # @!attribute [rw] next_page_token
113
+ # @return [::String]
114
+ # Pagination token, if not returned indicates the last page.
115
+ class ListControlsResponse
116
+ include ::Google::Protobuf::MessageExts
117
+ extend ::Google::Protobuf::MessageExts::ClassMethods
118
+ end
119
+ end
120
+ end
121
+ end
122
+ end
@@ -22,7 +22,6 @@ module Google
22
22
  module Retail
23
23
  module V2
24
24
  # Google Cloud Storage location for input content.
25
- # format.
26
25
  # @!attribute [rw] input_uris
27
26
  # @return [::Array<::String>]
28
27
  # Required. Google Cloud Storage URIs to input files. URI can be up to
@@ -54,11 +53,13 @@ module Google
54
53
  #
55
54
  # Supported values for control imports:
56
55
  #
57
- # * 'control' (default): One JSON [Control][] per line.
56
+ # * `control` (default): One JSON {::Google::Cloud::Retail::V2::Control Control}
57
+ # per line.
58
58
  #
59
59
  # Supported values for catalog attribute imports:
60
60
  #
61
- # * 'catalog_attribute' (default): One CSV [CatalogAttribute][] per line.
61
+ # * `catalog_attribute` (default): One CSV
62
+ # {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} per line.
62
63
  class GcsSource
63
64
  include ::Google::Protobuf::MessageExts
64
65
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -69,9 +70,8 @@ module Google
69
70
  # @return [::Google::Type::Date]
70
71
  # BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
71
72
  #
72
- # Only supported when
73
- # {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
74
- # is set to `FULL`.
73
+ # Only supported in
74
+ # {::Google::Cloud::Retail::V2::ImportProductsRequest ImportProductsRequest}.
75
75
  # @!attribute [rw] project_id
76
76
  # @return [::String]
77
77
  # The project ID (can be project # or ID) that the BigQuery source is in with
@@ -109,8 +109,7 @@ module Google
109
109
  # * `user_event_ga360`:
110
110
  # The schema is available here:
111
111
  # https://support.google.com/analytics/answer/3437719.
112
- # * `user_event_ga4`: This feature is in private preview. Please contact the
113
- # support team for importing Google Analytics 4 events.
112
+ # * `user_event_ga4`:
114
113
  # The schema is available here:
115
114
  # https://support.google.com/analytics/answer/7029846.
116
115
  #
@@ -148,7 +147,7 @@ module Google
148
147
  # @!attribute [rw] gcs_prefix
149
148
  # @return [::String]
150
149
  # Google Cloud Storage prefix for import errors. This must be an empty,
151
- # existing Cloud Storage directory. Import errors will be written to
150
+ # existing Cloud Storage directory. Import errors are written to
152
151
  # sharded files in this directory, one per line, as a JSON-encoded
153
152
  # `google.rpc.Status` message.
154
153
  class ImportErrorsConfig
@@ -175,8 +174,8 @@ module Google
175
174
  # The desired location of errors incurred during the Import.
176
175
  # @!attribute [rw] update_mask
177
176
  # @return [::Google::Protobuf::FieldMask]
178
- # Indicates which fields in the provided imported 'products' to update. If
179
- # not set, will by default update all fields.
177
+ # Indicates which fields in the provided imported `products` to update. If
178
+ # not set, all fields are updated.
180
179
  # @!attribute [rw] reconciliation_mode
181
180
  # @return [::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode]
182
181
  # The mode of reconciliation between existing products and the products to be
@@ -185,21 +184,16 @@ module Google
185
184
  # @!attribute [rw] notification_pubsub_topic
186
185
  # @return [::String]
187
186
  # Full Pub/Sub topic name for receiving notification. If this field is set,
188
- # when the import is finished, a notification will be sent to
189
- # specified Pub/Sub topic. The message data will be JSON string of a
187
+ # when the import is finished, a notification is sent to
188
+ # specified Pub/Sub topic. The message data is JSON string of a
190
189
  # {::Google::Longrunning::Operation Operation}.
191
190
  #
192
191
  # Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
193
192
  # to be within the same project as
194
193
  # {::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.
199
- #
200
- # Only supported when
201
- # {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
202
- # is set to `FULL`.
194
+ # Make sure that `service-<project
195
+ # number>@gcp-sa-retail.iam.gserviceaccount.com` has the
196
+ # `pubsub.topics.publish` IAM permission on the topic.
203
197
  class ImportProductsRequest
204
198
  include ::Google::Protobuf::MessageExts
205
199
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -215,15 +209,6 @@ module Google
215
209
 
216
210
  # Calculates diff and replaces the entire product dataset. Existing
217
211
  # products may be deleted if they are not present in the source location.
218
- #
219
- # Can only be set while using
220
- # {::Google::Cloud::Retail::V2::BigQuerySource BigQuerySource}. And the BigQuery
221
- # dataset must be created in the data location "us (multiple regions in
222
- # United States)", otherwise a PERMISSION_DENIED error is thrown.
223
- #
224
- # Add the IAM permission "BigQuery Data Viewer" for
225
- # cloud-retail-customer-data-access@system.gserviceaccount.com before
226
- # using this feature otherwise an error is thrown.
227
212
  FULL = 2
228
213
  end
229
214
  end
@@ -256,8 +241,8 @@ module Google
256
241
  # @!attribute [rw] notification_pubsub_topic
257
242
  # @return [::String]
258
243
  # Pub/Sub topic for receiving notification. If this field is set,
259
- # when the import is finished, a notification will be sent to
260
- # specified Pub/Sub topic. The message data will be JSON string of a
244
+ # when the import is finished, a notification is sent to
245
+ # specified Pub/Sub topic. The message data is JSON string of a
261
246
  # {::Google::Longrunning::Operation Operation}.
262
247
  # Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
263
248
  class ImportCompletionDataRequest
@@ -308,7 +293,7 @@ module Google
308
293
  extend ::Google::Protobuf::MessageExts::ClassMethods
309
294
  end
310
295
 
311
- # Metadata related to the progress of the Import operation. This will be
296
+ # Metadata related to the progress of the Import operation. This is
312
297
  # returned by the google.longrunning.Operation.metadata field.
313
298
  # @!attribute [rw] create_time
314
299
  # @return [::Google::Protobuf::Timestamp]
@@ -329,8 +314,8 @@ module Google
329
314
  # @!attribute [rw] notification_pubsub_topic
330
315
  # @return [::String]
331
316
  # Pub/Sub topic for receiving notification. If this field is set,
332
- # when the import is finished, a notification will be sent to
333
- # specified Pub/Sub topic. The message data will be JSON string of a
317
+ # when the import is finished, a notification is sent to
318
+ # specified Pub/Sub topic. The message data is JSON string of a
334
319
  # {::Google::Longrunning::Operation Operation}.
335
320
  # Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
336
321
  class ImportMetadata
@@ -33,7 +33,7 @@ module Google
33
33
  # The ID of the Recommendations AI serving config or placement.
34
34
  # Before you can request predictions from your model, you must create at
35
35
  # least one serving config or placement for it. For more information, see
36
- # [Managing serving configurations]
36
+ # [Manage serving configs]
37
37
  # (https://cloud.google.com/retail/docs/manage-configs).
38
38
  #
39
39
  # The full list of available serving configs can be seen at
@@ -88,12 +88,11 @@ module Google
88
88
  # * filterOutOfStockItems tag=(-"promotional")
89
89
  # * filterOutOfStockItems
90
90
  #
91
- # If your filter blocks all prediction results, the API will return generic
92
- # (unfiltered) popular products. If you only want results strictly matching
93
- # the filters, set `strictFiltering` to True in `PredictRequest.params` to
94
- # receive empty results instead.
95
- # Note that the API will never return items with storageStatus of "EXPIRED"
96
- # or "DELETED" regardless of filter choices.
91
+ # If your filter blocks all prediction results, the API will return *no*
92
+ # results. If instead you want empty result sets to return generic
93
+ # (unfiltered) popular products, set `strictFiltering` to False in
94
+ # `PredictRequest.params`. Note that the API will never return items with
95
+ # storageStatus of "EXPIRED" or "DELETED" regardless of filter choices.
97
96
  #
98
97
  # If `filterSyntaxV2` is set to true under the `params` field, then
99
98
  # attribute-based expressions are expected instead of the above described
@@ -120,7 +119,7 @@ module Google
120
119
  # * `returnScore`: Boolean. If set to true, the prediction 'score'
121
120
  # corresponding to each returned product will be set in the
122
121
  # `results.metadata` field in the prediction response. The given
123
- # 'score' indicates the probability of an product being clicked/purchased
122
+ # 'score' indicates the probability of a product being clicked/purchased
124
123
  # given the user's context and history.
125
124
  # * `strictFiltering`: Boolean. True by default. If set to false, the service
126
125
  # will return generic (unfiltered) popular products instead of empty if
@@ -26,7 +26,13 @@ module Google
26
26
  # @!attribute [rw] expire_time
27
27
  # @return [::Google::Protobuf::Timestamp]
28
28
  # The timestamp when this product becomes unavailable for
29
- # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
29
+ # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}. Note
30
+ # that this is only applicable to
31
+ # {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY} and
32
+ # {::Google::Cloud::Retail::V2::Product::Type::COLLECTION Type.COLLECTION}, and
33
+ # ignored for {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}.
34
+ # In general, we suggest the users to delete the stale products explicitly,
35
+ # instead of using this field to determine staleness.
30
36
  #
31
37
  # If it is set, the {::Google::Cloud::Retail::V2::Product Product} is not
32
38
  # available for
@@ -46,7 +52,13 @@ module Google
46
52
  # [expiration_date](https://support.google.com/merchants/answer/6324499).
47
53
  # @!attribute [rw] ttl
48
54
  # @return [::Google::Protobuf::Duration]
49
- # Input only. The TTL (time to live) of the product.
55
+ # Input only. The TTL (time to live) of the product. Note that this is only
56
+ # applicable to {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY}
57
+ # and {::Google::Cloud::Retail::V2::Product::Type::COLLECTION Type.COLLECTION},
58
+ # and ignored for
59
+ # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}. In general,
60
+ # we suggest the users to delete the stale products explicitly, instead of
61
+ # using this field to determine staleness.
50
62
  #
51
63
  # If it is set, it must be a non-negative value, and
52
64
  # {::Google::Cloud::Retail::V2::Product#expire_time expire_time} is set as
@@ -114,7 +126,7 @@ module Google
114
126
  # Non-existent product ids are allowed.
115
127
  # The {::Google::Cloud::Retail::V2::Product#type type} of the members must be
116
128
  # either {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY} or
117
- # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT} otherwise and
129
+ # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT} otherwise an
118
130
  # INVALID_ARGUMENT error is thrown. Should not set it for other types. A
119
131
  # maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
120
132
  # return.
@@ -146,7 +158,7 @@ module Google
146
158
  #
147
159
  #
148
160
  # To represent full path of category, use '>' sign to separate different
149
- # hierarchies. If '>' is part of the category name, please replace it with
161
+ # hierarchies. If '>' is part of the category name, replace it with
150
162
  # other character(s).
151
163
  #
152
164
  # For example, if a shoes product belongs to both
@@ -276,7 +288,11 @@ module Google
276
288
  # @return [::Google::Protobuf::Timestamp]
277
289
  # The timestamp when this {::Google::Cloud::Retail::V2::Product Product} becomes
278
290
  # available for
279
- # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
291
+ # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}. Note
292
+ # that this is only applicable to
293
+ # {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY} and
294
+ # {::Google::Cloud::Retail::V2::Product::Type::COLLECTION Type.COLLECTION}, and
295
+ # ignored for {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}.
280
296
  # @!attribute [rw] availability
281
297
  # @return [::Google::Cloud::Retail::V2::Product::Availability]
282
298
  # The online availability of the {::Google::Cloud::Retail::V2::Product Product}.
@@ -462,6 +478,8 @@ module Google
462
478
  # Note: Returning more fields in
463
479
  # {::Google::Cloud::Retail::V2::SearchResponse SearchResponse} can increase
464
480
  # response payload size and serving latency.
481
+ #
482
+ # This field is deprecated. Use the retrievable site-wide control instead.
465
483
  # @!attribute [r] variants
466
484
  # @return [::Array<::Google::Cloud::Retail::V2::Product>]
467
485
  # Output only. Product variants grouped together on primary product which
@@ -474,6 +492,16 @@ module Google
474
492
  # Note: This field is OUTPUT_ONLY for
475
493
  # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}.
476
494
  # Do not set this field in API requests.
495
+ # @!attribute [r] local_inventories
496
+ # @return [::Array<::Google::Cloud::Retail::V2::LocalInventory>]
497
+ # Output only. A list of local inventories specific to different places.
498
+ #
499
+ # This is only available for users who have Retail Search enabled, and it can
500
+ # be managed by
501
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
502
+ # and
503
+ # {::Google::Cloud::Retail::V2::ProductService::Client#remove_local_inventories ProductService.RemoveLocalInventories}
504
+ # APIs.
477
505
  class Product
478
506
  include ::Google::Protobuf::MessageExts
479
507
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -29,7 +29,7 @@ module Google
29
29
  # `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
30
30
  # or the name of the legacy placement resource, such as
31
31
  # `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
32
- # This field is used to identify the serving configuration name and the set
32
+ # This field is used to identify the serving config name and the set
33
33
  # of models that will be used to make the search.
34
34
  # @!attribute [rw] branch
35
35
  # @return [::String]
@@ -138,7 +138,9 @@ module Google
138
138
  # Boost specification to boost certain products. See more details at this
139
139
  # [user guide](https://cloud.google.com/retail/docs/boosting).
140
140
  #
141
- # Notice that if both [ServingConfig.boost_control_ids][] and
141
+ # Notice that if both
142
+ # {::Google::Cloud::Retail::V2::ServingConfig#boost_control_ids ServingConfig.boost_control_ids}
143
+ # and
142
144
  # {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}
143
145
  # are set, the boost conditions from both places are evaluated. If a search
144
146
  # request matches multiple boost conditions, the final boost score is equal
@@ -228,7 +230,7 @@ module Google
228
230
  # {::Google::Cloud::Retail::V2::UserEvent#page_categories UserEvent.page_categories};
229
231
  #
230
232
  # To represent full path of category, use '>' sign to separate different
231
- # hierarchies. If '>' is part of the category name, please replace it with
233
+ # hierarchies. If '>' is part of the category name, replace it with
232
234
  # other character(s).
233
235
  #
234
236
  # Category pages include special pages such as sales or promotions. For
@@ -241,6 +243,15 @@ module Google
241
243
  # @!attribute [rw] personalization_spec
242
244
  # @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec]
243
245
  # The specification for personalization.
246
+ #
247
+ # Notice that if both
248
+ # {::Google::Cloud::Retail::V2::ServingConfig#personalization_spec ServingConfig.personalization_spec}
249
+ # and
250
+ # {::Google::Cloud::Retail::V2::SearchRequest#personalization_spec SearchRequest.personalization_spec}
251
+ # are set.
252
+ # {::Google::Cloud::Retail::V2::SearchRequest#personalization_spec SearchRequest.personalization_spec}
253
+ # will override
254
+ # {::Google::Cloud::Retail::V2::ServingConfig#personalization_spec ServingConfig.personalization_spec}.
244
255
  # @!attribute [rw] labels
245
256
  # @return [::Google::Protobuf::Map{::String => ::String}]
246
257
  # The labels applied to a resource must meet the following requirements:
@@ -275,7 +286,7 @@ module Google
275
286
  # @!attribute [rw] limit
276
287
  # @return [::Integer]
277
288
  # Maximum of facet values that should be returned for this facet. If
278
- # unspecified, defaults to 20. The maximum allowed value is 300. Values
289
+ # unspecified, defaults to 50. The maximum allowed value is 300. Values
279
290
  # above 300 will be coerced to 300.
280
291
  #
281
292
  # If this field is negative, an INVALID_ARGUMENT is returned.
@@ -625,7 +636,8 @@ module Google
625
636
  # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO Mode.AUTO}.
626
637
  MODE_UNSPECIFIED = 0
627
638
 
628
- # Let CRS decide whether to use personalization.
639
+ # Let CRS decide whether to use personalization based on quality of user
640
+ # event data.
629
641
  AUTO = 1
630
642
 
631
643
  # Disable personalization.
@@ -674,15 +686,20 @@ module Google
674
686
  # The search mode of each search request.
675
687
  module SearchMode
676
688
  # Default value. In this case both product search and faceted search will
677
- # be performed. Both [SearchResponse.SearchResult] and
678
- # [SearchResponse.Facet] will be returned.
689
+ # be performed. Both
690
+ # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult SearchResponse.SearchResult}
691
+ # and {::Google::Cloud::Retail::V2::SearchResponse::Facet SearchResponse.Facet}
692
+ # will be returned.
679
693
  SEARCH_MODE_UNSPECIFIED = 0
680
694
 
681
695
  # Only product search will be performed. The faceted search will be
682
696
  # disabled.
683
697
  #
684
- # Only [SearchResponse.SearchResult] will be returned.
685
- # [SearchResponse.Facet] will not be returned, even if
698
+ # Only
699
+ # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult SearchResponse.SearchResult}
700
+ # will be returned.
701
+ # {::Google::Cloud::Retail::V2::SearchResponse::Facet SearchResponse.Facet} will
702
+ # not be returned, even if
686
703
  # {::Google::Cloud::Retail::V2::SearchRequest#facet_specs SearchRequest.facet_specs}
687
704
  # or
688
705
  # {::Google::Cloud::Retail::V2::SearchRequest#dynamic_facet_spec SearchRequest.dynamic_facet_spec}
@@ -697,7 +714,9 @@ module Google
697
714
  # and
698
715
  # {::Google::Cloud::Retail::V2::SearchRequest#dynamic_facet_spec SearchRequest.dynamic_facet_spec}
699
716
  # should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
700
- # [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
717
+ # {::Google::Cloud::Retail::V2::SearchResponse::Facet SearchResponse.Facet} will
718
+ # be returned.
719
+ # {::Google::Cloud::Retail::V2::SearchResponse::SearchResult SearchResponse.SearchResult}
701
720
  # will not be returned.
702
721
  FACETED_SEARCH_ONLY = 2
703
722
  end
@@ -829,6 +848,21 @@ module Google
829
848
  # {::Google::Protobuf::Value google.protobuf.Value}. For example,
830
849
  # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there
831
850
  # are 10 variants in this product are available in the store "store1".
851
+ # @!attribute [rw] personal_labels
852
+ # @return [::Array<::String>]
853
+ # Specifies previous events related to this product for this user based on
854
+ # {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
855
+ # {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
856
+ # or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
857
+ #
858
+ # This is set only when
859
+ # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
860
+ # is
861
+ # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
862
+ #
863
+ # Possible values:
864
+ #
865
+ # * `purchased`: Indicates that this product has been purchased before.
832
866
  class SearchResult
833
867
  include ::Google::Protobuf::MessageExts
834
868
  extend ::Google::Protobuf::MessageExts::ClassMethods