google-cloud-retail-v2 0.10.0 → 0.11.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 +55 -0
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +718 -0
- data/lib/google/cloud/retail/v2/catalog_service/paths.rb +38 -0
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +34 -0
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +38 -0
- data/lib/google/cloud/retail/v2/common_pb.rb +86 -0
- data/lib/google/cloud/retail/v2/completion_service/client.rb +4 -3
- data/lib/google/cloud/retail/v2/control_pb.rb +33 -0
- data/lib/google/cloud/retail/v2/control_service/client.rb +807 -0
- data/lib/google/cloud/retail/v2/control_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/control_service/paths.rb +73 -0
- data/lib/google/cloud/retail/v2/control_service.rb +49 -0
- data/lib/google/cloud/retail/v2/control_service_pb.rb +57 -0
- data/lib/google/cloud/retail/v2/control_service_services_pb.rb +65 -0
- data/lib/google/cloud/retail/v2/prediction_service_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/product_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +42 -12
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +35 -0
- data/lib/google/cloud/retail/v2/search_service/client.rb +12 -1
- data/lib/google/cloud/retail/v2/search_service_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/serving_config_pb.rb +44 -0
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +998 -0
- data/lib/google/cloud/retail/v2/serving_config_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/serving_config_service/paths.rb +73 -0
- data/lib/google/cloud/retail/v2/serving_config_service.rb +49 -0
- data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +66 -0
- data/lib/google/cloud/retail/v2/serving_config_service_services_pb.rb +74 -0
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +2 -2
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +2 -2
- 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 +233 -0
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +133 -0
- data/proto_docs/google/cloud/retail/v2/common.rb +314 -4
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +2 -1
- data/proto_docs/google/cloud/retail/v2/control.rb +76 -0
- data/proto_docs/google/cloud/retail/v2/control_service.rb +122 -0
- data/proto_docs/google/cloud/retail/v2/import_config.rb +20 -35
- data/proto_docs/google/cloud/retail/v2/product.rb +7 -1
- data/proto_docs/google/cloud/retail/v2/search_service.rb +29 -2
- data/proto_docs/google/cloud/retail/v2/serving_config.rb +238 -0
- data/proto_docs/google/cloud/retail/v2/serving_config_service.rb +143 -0
- metadata +20 -2
@@ -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
|
-
# *
|
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
|
-
# *
|
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
|
73
|
-
# {::Google::Cloud::Retail::V2::ImportProductsRequest
|
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`:
|
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
|
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
|
179
|
-
# not set,
|
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
|
189
|
-
# specified Pub/Sub topic. The message data
|
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
|
196
|
-
#
|
197
|
-
# `
|
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
|
260
|
-
# specified Pub/Sub topic. The message data
|
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
|
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
|
333
|
-
# specified Pub/Sub topic. The message data
|
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
|
@@ -114,7 +114,7 @@ module Google
|
|
114
114
|
# Non-existent product ids are allowed.
|
115
115
|
# The {::Google::Cloud::Retail::V2::Product#type type} of the members must be
|
116
116
|
# either {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Type.PRIMARY} or
|
117
|
-
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT} otherwise
|
117
|
+
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT} otherwise an
|
118
118
|
# INVALID_ARGUMENT error is thrown. Should not set it for other types. A
|
119
119
|
# maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
|
120
120
|
# return.
|
@@ -474,6 +474,12 @@ module Google
|
|
474
474
|
# Note: This field is OUTPUT_ONLY for
|
475
475
|
# {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}.
|
476
476
|
# Do not set this field in API requests.
|
477
|
+
# @!attribute [r] local_inventories
|
478
|
+
# @return [::Array<::Google::Cloud::Retail::V2::LocalInventory>]
|
479
|
+
# Output only. A list of local inventories specific to different places.
|
480
|
+
#
|
481
|
+
# This is only available for users who have Retail Search enabled, and it can
|
482
|
+
# be managed by [AddLocalInventories][] and [RemoveLocalInventories][] APIs.
|
477
483
|
class Product
|
478
484
|
include ::Google::Protobuf::MessageExts
|
479
485
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -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
|
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
|
@@ -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:
|
@@ -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.
|
@@ -829,6 +841,21 @@ module Google
|
|
829
841
|
# {::Google::Protobuf::Value google.protobuf.Value}. For example,
|
830
842
|
# `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there
|
831
843
|
# are 10 variants in this product are available in the store "store1".
|
844
|
+
# @!attribute [rw] personal_labels
|
845
|
+
# @return [::Array<::String>]
|
846
|
+
# Specifies previous events related to this product for this user based on
|
847
|
+
# {::Google::Cloud::Retail::V2::UserEvent UserEvent} with same
|
848
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#visitor_id SearchRequest.visitor_id}
|
849
|
+
# or {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id}.
|
850
|
+
#
|
851
|
+
# This is set only when
|
852
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec#mode SearchRequest.PersonalizationSpec.mode}
|
853
|
+
# is
|
854
|
+
# {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO SearchRequest.PersonalizationSpec.Mode.AUTO}.
|
855
|
+
#
|
856
|
+
# Possible values:
|
857
|
+
#
|
858
|
+
# * `purchased`: Indicates that this product has been purchased before.
|
832
859
|
class SearchResult
|
833
860
|
include ::Google::Protobuf::MessageExts
|
834
861
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,238 @@
|
|
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
|
+
# Configures metadata that is used to generate serving time results (e.g.
|
25
|
+
# search results or recommendation predictions).
|
26
|
+
# @!attribute [rw] name
|
27
|
+
# @return [::String]
|
28
|
+
# Immutable. Fully qualified name
|
29
|
+
# `projects/*/locations/global/catalogs/*/servingConfig/*`
|
30
|
+
# @!attribute [rw] display_name
|
31
|
+
# @return [::String]
|
32
|
+
# Required. The human readable serving config display name. Used in Retail
|
33
|
+
# UI.
|
34
|
+
#
|
35
|
+
# This field must be a UTF-8 encoded string with a length limit of 128
|
36
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
37
|
+
# @!attribute [rw] model_id
|
38
|
+
# @return [::String]
|
39
|
+
# The id of the model in the same {::Google::Cloud::Retail::V2::Catalog Catalog}
|
40
|
+
# to use at serving time. Currently only RecommendationModels are supported:
|
41
|
+
# https://cloud.google.com/retail/recommendations-ai/docs/create-models
|
42
|
+
# Can be changed but only to a compatible model (e.g.
|
43
|
+
# others-you-may-like CTR to others-you-may-like CVR).
|
44
|
+
#
|
45
|
+
# Required when
|
46
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
47
|
+
# [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
48
|
+
# @!attribute [rw] price_reranking_level
|
49
|
+
# @return [::String]
|
50
|
+
# How much price ranking we want in serving results.
|
51
|
+
# Price reranking causes product items with a similar
|
52
|
+
# recommendation probability to be ordered by price, with the
|
53
|
+
# highest-priced items first. This setting could result in a decrease in
|
54
|
+
# click-through and conversion rates.
|
55
|
+
# Allowed values are:
|
56
|
+
#
|
57
|
+
# * 'no-price-reranking'
|
58
|
+
# * 'low-price-raranking'
|
59
|
+
# * 'medium-price-reranking'
|
60
|
+
# * 'high-price-reranking'
|
61
|
+
#
|
62
|
+
# If not specified, we choose default based on model type. Default value:
|
63
|
+
# 'no-price-reranking'.
|
64
|
+
#
|
65
|
+
# Can only be set if
|
66
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
67
|
+
# [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
68
|
+
# @!attribute [rw] facet_control_ids
|
69
|
+
# @return [::Array<::String>]
|
70
|
+
# Facet specifications for faceted search. If empty, no facets are returned.
|
71
|
+
# The ids refer to the ids of {::Google::Cloud::Retail::V2::Control Control}
|
72
|
+
# resources with only the Facet control set. These controls are assumed to be
|
73
|
+
# in the same {::Google::Cloud::Retail::V2::Catalog Catalog} as the
|
74
|
+
# {::Google::Cloud::Retail::V2::ServingConfig ServingConfig}.
|
75
|
+
# A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error
|
76
|
+
# is returned.
|
77
|
+
#
|
78
|
+
# Can only be set if
|
79
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
80
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
81
|
+
# @!attribute [rw] dynamic_facet_spec
|
82
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::DynamicFacetSpec]
|
83
|
+
# The specification for dynamically generated facets. Notice that only
|
84
|
+
# textual facets can be dynamically generated.
|
85
|
+
#
|
86
|
+
# Can only be set if
|
87
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
88
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
89
|
+
# @!attribute [rw] boost_control_ids
|
90
|
+
# @return [::Array<::String>]
|
91
|
+
# Condition boost specifications. If a product matches multiple conditions
|
92
|
+
# in the specifications, boost scores from these specifications are all
|
93
|
+
# applied and combined in a non-linear way. Maximum number of
|
94
|
+
# specifications is 100.
|
95
|
+
#
|
96
|
+
# Notice that if both
|
97
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#boost_control_ids ServingConfig.boost_control_ids}
|
98
|
+
# and
|
99
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}
|
100
|
+
# are set, the boost conditions from both places are evaluated. If a search
|
101
|
+
# request matches multiple boost conditions, the final boost score is equal
|
102
|
+
# to the sum of the boost scores from all matched boost conditions.
|
103
|
+
#
|
104
|
+
# Can only be set if
|
105
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
106
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
107
|
+
# @!attribute [rw] filter_control_ids
|
108
|
+
# @return [::Array<::String>]
|
109
|
+
# Condition filter specifications. If a product matches multiple conditions
|
110
|
+
# in the specifications, filters from these specifications are all
|
111
|
+
# applied and combined via the AND operator. Maximum number of
|
112
|
+
# specifications is 100.
|
113
|
+
#
|
114
|
+
# Can only be set if
|
115
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
116
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
117
|
+
# @!attribute [rw] redirect_control_ids
|
118
|
+
# @return [::Array<::String>]
|
119
|
+
# Condition redirect specifications. Only the first triggered redirect action
|
120
|
+
# is applied, even if multiple apply. Maximum number of specifications is
|
121
|
+
# 1000.
|
122
|
+
#
|
123
|
+
# Can only be set if
|
124
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
125
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
126
|
+
# @!attribute [rw] twoway_synonyms_control_ids
|
127
|
+
# @return [::Array<::String>]
|
128
|
+
# Condition synonyms specifications. If multiple syonyms conditions match,
|
129
|
+
# all matching synonyms control in the list will execute. Order of controls
|
130
|
+
# in the list will not matter. Maximum number of specifications is
|
131
|
+
# 100.
|
132
|
+
#
|
133
|
+
# Can only be set if
|
134
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
135
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
136
|
+
# @!attribute [rw] oneway_synonyms_control_ids
|
137
|
+
# @return [::Array<::String>]
|
138
|
+
# Condition oneway synonyms specifications. If multiple oneway synonyms
|
139
|
+
# conditions match, all matching oneway synonyms controls in the list will
|
140
|
+
# execute. Order of controls in the list will not matter. Maximum number of
|
141
|
+
# specifications is 100.
|
142
|
+
#
|
143
|
+
# Can only be set if
|
144
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
145
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
146
|
+
# @!attribute [rw] do_not_associate_control_ids
|
147
|
+
# @return [::Array<::String>]
|
148
|
+
# Condition do not associate specifications. If multiple do not associate
|
149
|
+
# conditions match, all matching do not associate controls in the list will
|
150
|
+
# execute.
|
151
|
+
# - Order does not matter.
|
152
|
+
# - Maximum number of specifications is 100.
|
153
|
+
#
|
154
|
+
# Can only be set if
|
155
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
156
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
157
|
+
# @!attribute [rw] replacement_control_ids
|
158
|
+
# @return [::Array<::String>]
|
159
|
+
# Condition replacement specifications.
|
160
|
+
# - Applied according to the order in the list.
|
161
|
+
# - A previously replaced term can not be re-replaced.
|
162
|
+
# - Maximum number of specifications is 100.
|
163
|
+
#
|
164
|
+
# Can only be set if
|
165
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
166
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
167
|
+
# @!attribute [rw] ignore_control_ids
|
168
|
+
# @return [::Array<::String>]
|
169
|
+
# Condition ignore specifications. If multiple ignore
|
170
|
+
# conditions match, all matching ignore controls in the list will
|
171
|
+
# execute.
|
172
|
+
# - Order does not matter.
|
173
|
+
# - Maximum number of specifications is 100.
|
174
|
+
#
|
175
|
+
# Can only be set if
|
176
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
177
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
178
|
+
# @!attribute [rw] diversity_level
|
179
|
+
# @return [::String]
|
180
|
+
# How much diversity to use in recommendation model results e.g.
|
181
|
+
# 'medium-diversity' or 'high-diversity'. Currently supported values:
|
182
|
+
#
|
183
|
+
# * 'no-diversity'
|
184
|
+
# * 'low-diversity'
|
185
|
+
# * 'medium-diversity'
|
186
|
+
# * 'high-diversity'
|
187
|
+
# * 'auto-diversity'
|
188
|
+
#
|
189
|
+
# If not specified, we choose default based on recommendation model
|
190
|
+
# type. Default value: 'no-diversity'.
|
191
|
+
#
|
192
|
+
# Can only be set if
|
193
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
194
|
+
# [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
195
|
+
# @!attribute [rw] enable_category_filter_level
|
196
|
+
# @return [::String]
|
197
|
+
# Whether to add additional category filters on the 'similar-items' model.
|
198
|
+
# If not specified, we enable it by default.
|
199
|
+
# Allowed values are:
|
200
|
+
#
|
201
|
+
# * 'no-category-match': No additional filtering of original results from
|
202
|
+
# the model and the customer's filters.
|
203
|
+
# * 'relaxed-category-match': Only keep results with categories that match
|
204
|
+
# at least one item categories in the PredictRequests's context item.
|
205
|
+
# * If customer also sends filters in the PredictRequest, then the results
|
206
|
+
# will satisfy both conditions (user given and category match).
|
207
|
+
#
|
208
|
+
# Can only be set if
|
209
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
210
|
+
# [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
211
|
+
# @!attribute [rw] personalization_spec
|
212
|
+
# @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec]
|
213
|
+
# The specification for personalization spec.
|
214
|
+
#
|
215
|
+
# Can only be set if
|
216
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#solution_types solution_types} is
|
217
|
+
# [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
|
218
|
+
#
|
219
|
+
# Notice that if both
|
220
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#personalization_spec ServingConfig.personalization_spec}
|
221
|
+
# and
|
222
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#personalization_spec SearchRequest.personalization_spec}
|
223
|
+
# are set.
|
224
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#personalization_spec SearchRequest.personalization_spec}
|
225
|
+
# will override
|
226
|
+
# {::Google::Cloud::Retail::V2::ServingConfig#personalization_spec ServingConfig.personalization_spec}.
|
227
|
+
# @!attribute [rw] solution_types
|
228
|
+
# @return [::Array<::Google::Cloud::Retail::V2::SolutionType>]
|
229
|
+
# Required. Immutable. Specifies the solution types that a serving config can
|
230
|
+
# be associated with. Currently we support setting only one type of solution.
|
231
|
+
class ServingConfig
|
232
|
+
include ::Google::Protobuf::MessageExts
|
233
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|