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
@@ -30,8 +30,11 @@ module Google
|
|
30
30
|
# * `add-to-cart`: Products being added to cart.
|
31
31
|
# * `category-page-view`: Special pages such as sale or promotion pages
|
32
32
|
# viewed.
|
33
|
+
# * `completion`: Completion query result showed/clicked.
|
33
34
|
# * `detail-page-view`: Products detail page viewed.
|
34
35
|
# * `home-page-view`: Homepage viewed.
|
36
|
+
# * `promotion-offered`: Promotion is offered to a user.
|
37
|
+
# * `promotion-not-offered`: Promotion is not offered to a user.
|
35
38
|
# * `purchase-complete`: User finishing a purchase.
|
36
39
|
# * `search`: Product search.
|
37
40
|
# * `shopping-cart-page-view`: User viewing a shopping cart.
|
@@ -45,6 +48,21 @@ module Google
|
|
45
48
|
#
|
46
49
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
47
50
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
51
|
+
#
|
52
|
+
# The field should not contain PII or user-data. We recommend to use Google
|
53
|
+
# Analystics [Client
|
54
|
+
# ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
|
55
|
+
# for this field.
|
56
|
+
# @!attribute [rw] session_id
|
57
|
+
# @return [::String]
|
58
|
+
# A unique identifier for tracking a visitor session with a length limit of
|
59
|
+
# 128 bytes. A session is an aggregation of an end user behavior in a time
|
60
|
+
# span.
|
61
|
+
#
|
62
|
+
# A general guideline to populate the sesion_id:
|
63
|
+
# 1. If user has no activity for 30 min, a new session_id should be assigned.
|
64
|
+
# 2. The session_id should be unique across users, suggest use uuid or add
|
65
|
+
# visitor_id as prefix.
|
48
66
|
# @!attribute [rw] event_time
|
49
67
|
# @return [::Google::Protobuf::Timestamp]
|
50
68
|
# Only required for
|
@@ -67,6 +85,10 @@ module Google
|
|
67
85
|
# {::Google::Cloud::Retail::V2::PredictResponse#attribution_token PredictResponse.attribution_token}
|
68
86
|
# for user events that are the result of
|
69
87
|
# {::Google::Cloud::Retail::V2::PredictionService::Client#predict PredictionService.Predict}.
|
88
|
+
# The value must be a valid
|
89
|
+
# {::Google::Cloud::Retail::V2::SearchResponse#attribution_token SearchResponse.attribution_token}
|
90
|
+
# for user events that are the result of
|
91
|
+
# {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
|
70
92
|
#
|
71
93
|
# This token enables us to accurately attribute page view or purchase back to
|
72
94
|
# the event and the particular predict response containing this
|
@@ -94,6 +116,13 @@ module Google
|
|
94
116
|
# with different
|
95
117
|
# {::Google::Cloud::Retail::V2::UserEvent#product_details product_details} is
|
96
118
|
# desired. The end user may have not finished broswing the whole page yet.
|
119
|
+
# @!attribute [rw] completion_detail
|
120
|
+
# @return [::Google::Cloud::Retail::V2::CompletionDetail]
|
121
|
+
# The main completion details related to the event.
|
122
|
+
#
|
123
|
+
# In a `completion` event, this field represents the completions returned to
|
124
|
+
# the end user and the clicked completion by the end user. In a `search`
|
125
|
+
# event, it represents the search event happens after clicking completion.
|
97
126
|
# @!attribute [rw] attributes
|
98
127
|
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CustomAttribute}]
|
99
128
|
# Extra user event features to include in the recommendation model.
|
@@ -122,11 +151,51 @@ module Google
|
|
122
151
|
# @return [::String]
|
123
152
|
# The user's search query.
|
124
153
|
#
|
154
|
+
# See {::Google::Cloud::Retail::V2::SearchRequest#query SearchRequest.query} for
|
155
|
+
# definition.
|
156
|
+
#
|
125
157
|
# The value must be a UTF-8 encoded string with a length limit of 5,000
|
126
158
|
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
127
159
|
#
|
128
|
-
#
|
160
|
+
# At least one of
|
161
|
+
# {::Google::Cloud::Retail::V2::UserEvent#search_query search_query} or
|
162
|
+
# {::Google::Cloud::Retail::V2::UserEvent#page_categories page_categories} is
|
163
|
+
# required for `search` events. Other event types should not set this field.
|
129
164
|
# Otherwise, an INVALID_ARGUMENT error is returned.
|
165
|
+
# @!attribute [rw] filter
|
166
|
+
# @return [::String]
|
167
|
+
# The filter syntax consists of an expression language for constructing a
|
168
|
+
# predicate from one or more fields of the products being filtered.
|
169
|
+
#
|
170
|
+
# See {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter} for
|
171
|
+
# definition and syntax.
|
172
|
+
#
|
173
|
+
# The value must be a UTF-8 encoded string with a length limit of 1,000
|
174
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
175
|
+
# @!attribute [rw] order_by
|
176
|
+
# @return [::String]
|
177
|
+
# The order in which products are returned.
|
178
|
+
#
|
179
|
+
# See {::Google::Cloud::Retail::V2::SearchRequest#order_by SearchRequest.order_by}
|
180
|
+
# for definition and syntax.
|
181
|
+
#
|
182
|
+
# The value must be a UTF-8 encoded string with a length limit of 1,000
|
183
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
184
|
+
#
|
185
|
+
# This can only be set for `search` events. Other event types should not set
|
186
|
+
# this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
187
|
+
# @!attribute [rw] offset
|
188
|
+
# @return [::Integer]
|
189
|
+
# An integer that specifies the current offset for pagination (the 0-indexed
|
190
|
+
# starting location, amongst the products deemed by the API as relevant).
|
191
|
+
#
|
192
|
+
# See {::Google::Cloud::Retail::V2::SearchRequest#offset SearchRequest.offset} for
|
193
|
+
# definition.
|
194
|
+
#
|
195
|
+
# If this field is negative, an INVALID_ARGUMENT is returned.
|
196
|
+
#
|
197
|
+
# This can only be set for `search` events. Other event types should not set
|
198
|
+
# this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
130
199
|
# @!attribute [rw] page_categories
|
131
200
|
# @return [::Array<::String>]
|
132
201
|
# The categories associated with a category page.
|
@@ -139,8 +208,11 @@ module Google
|
|
139
208
|
# instance, a special sale page may have the category hierarchy:
|
140
209
|
# "pageCategories" : ["Sales > 2017 Black Friday Deals"].
|
141
210
|
#
|
142
|
-
# Required for `category-page-view` events.
|
143
|
-
#
|
211
|
+
# Required for `category-page-view` events. At least one of
|
212
|
+
# {::Google::Cloud::Retail::V2::UserEvent#search_query search_query} or
|
213
|
+
# {::Google::Cloud::Retail::V2::UserEvent#page_categories page_categories} is
|
214
|
+
# required for `search` events. Other event types should not set this field.
|
215
|
+
# Otherwise, an INVALID_ARGUMENT error is returned.
|
144
216
|
# @!attribute [rw] user_info
|
145
217
|
# @return [::Google::Cloud::Retail::V2::UserInfo]
|
146
218
|
# User information.
|
@@ -188,9 +260,21 @@ module Google
|
|
188
260
|
# @return [::Google::Cloud::Retail::V2::Product]
|
189
261
|
# Required. {::Google::Cloud::Retail::V2::Product Product} information.
|
190
262
|
#
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
263
|
+
# Required field(s):
|
264
|
+
#
|
265
|
+
# * {::Google::Cloud::Retail::V2::Product#id Product.id}
|
266
|
+
#
|
267
|
+
# Optional override field(s):
|
268
|
+
#
|
269
|
+
# * {::Google::Cloud::Retail::V2::Product#price_info Product.price_info}
|
270
|
+
#
|
271
|
+
# If any supported optional fields are provided, we will treat them as a full
|
272
|
+
# override when looking up product information from the catalog. Thus, it is
|
273
|
+
# important to ensure that the overriding fields are accurate and
|
274
|
+
# complete.
|
275
|
+
#
|
276
|
+
# All other product fields are ignored and instead populated via catalog
|
277
|
+
# lookup after event ingestion.
|
194
278
|
# @!attribute [rw] quantity
|
195
279
|
# @return [::Google::Protobuf::Int32Value]
|
196
280
|
# Quantity of the product associated with the user event.
|
@@ -203,6 +287,26 @@ module Google
|
|
203
287
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
204
288
|
end
|
205
289
|
|
290
|
+
# Detailed completion information including completion attribution token and
|
291
|
+
# clicked completion info.
|
292
|
+
# @!attribute [rw] completion_attribution_token
|
293
|
+
# @return [::String]
|
294
|
+
# Completion attribution token in
|
295
|
+
# {::Google::Cloud::Retail::V2::CompleteQueryResponse#attribution_token CompleteQueryResponse.attribution_token}.
|
296
|
+
# @!attribute [rw] selected_suggestion
|
297
|
+
# @return [::String]
|
298
|
+
# End user selected
|
299
|
+
# {::Google::Cloud::Retail::V2::CompleteQueryResponse::CompletionResult#suggestion CompleteQueryResponse.CompletionResult.suggestion}.
|
300
|
+
# @!attribute [rw] selected_position
|
301
|
+
# @return [::Integer]
|
302
|
+
# End user selected
|
303
|
+
# {::Google::Cloud::Retail::V2::CompleteQueryResponse::CompletionResult#suggestion CompleteQueryResponse.CompletionResult.suggestion}
|
304
|
+
# position, starting from 0.
|
305
|
+
class CompletionDetail
|
306
|
+
include ::Google::Protobuf::MessageExts
|
307
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
308
|
+
end
|
309
|
+
|
206
310
|
# A transaction represents the entire purchase transaction.
|
207
311
|
# @!attribute [rw] id
|
208
312
|
# @return [::String]
|
@@ -0,0 +1,53 @@
|
|
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 Type
|
22
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
23
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
24
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
25
|
+
# following:
|
26
|
+
#
|
27
|
+
# * A full date, with non-zero year, month, and day values
|
28
|
+
# * A month and day value, with a zero year, such as an anniversary
|
29
|
+
# * A year on its own, with zero month and day values
|
30
|
+
# * A year and month value, with a zero day, such as a credit card expiration
|
31
|
+
# date
|
32
|
+
#
|
33
|
+
# Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and
|
34
|
+
# `google.protobuf.Timestamp`.
|
35
|
+
# @!attribute [rw] year
|
36
|
+
# @return [::Integer]
|
37
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without
|
38
|
+
# a year.
|
39
|
+
# @!attribute [rw] month
|
40
|
+
# @return [::Integer]
|
41
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a
|
42
|
+
# month and day.
|
43
|
+
# @!attribute [rw] day
|
44
|
+
# @return [::Integer]
|
45
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
|
46
|
+
# to specify a year by itself or a year and month where the day isn't
|
47
|
+
# significant.
|
48
|
+
class Date
|
49
|
+
include ::Google::Protobuf::MessageExts
|
50
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-retail-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -180,6 +180,13 @@ files:
|
|
180
180
|
- lib/google/cloud/retail/v2/catalog_service_pb.rb
|
181
181
|
- lib/google/cloud/retail/v2/catalog_service_services_pb.rb
|
182
182
|
- lib/google/cloud/retail/v2/common_pb.rb
|
183
|
+
- lib/google/cloud/retail/v2/completion_service.rb
|
184
|
+
- lib/google/cloud/retail/v2/completion_service/client.rb
|
185
|
+
- lib/google/cloud/retail/v2/completion_service/credentials.rb
|
186
|
+
- lib/google/cloud/retail/v2/completion_service/operations.rb
|
187
|
+
- lib/google/cloud/retail/v2/completion_service/paths.rb
|
188
|
+
- lib/google/cloud/retail/v2/completion_service_pb.rb
|
189
|
+
- lib/google/cloud/retail/v2/completion_service_services_pb.rb
|
183
190
|
- lib/google/cloud/retail/v2/import_config_pb.rb
|
184
191
|
- lib/google/cloud/retail/v2/prediction_service.rb
|
185
192
|
- lib/google/cloud/retail/v2/prediction_service/client.rb
|
@@ -196,6 +203,12 @@ files:
|
|
196
203
|
- lib/google/cloud/retail/v2/product_service_pb.rb
|
197
204
|
- lib/google/cloud/retail/v2/product_service_services_pb.rb
|
198
205
|
- lib/google/cloud/retail/v2/purge_config_pb.rb
|
206
|
+
- lib/google/cloud/retail/v2/search_service.rb
|
207
|
+
- lib/google/cloud/retail/v2/search_service/client.rb
|
208
|
+
- lib/google/cloud/retail/v2/search_service/credentials.rb
|
209
|
+
- lib/google/cloud/retail/v2/search_service/paths.rb
|
210
|
+
- lib/google/cloud/retail/v2/search_service_pb.rb
|
211
|
+
- lib/google/cloud/retail/v2/search_service_services_pb.rb
|
199
212
|
- lib/google/cloud/retail/v2/user_event_pb.rb
|
200
213
|
- lib/google/cloud/retail/v2/user_event_service.rb
|
201
214
|
- lib/google/cloud/retail/v2/user_event_service/client.rb
|
@@ -212,11 +225,13 @@ files:
|
|
212
225
|
- proto_docs/google/cloud/retail/v2/catalog.rb
|
213
226
|
- proto_docs/google/cloud/retail/v2/catalog_service.rb
|
214
227
|
- proto_docs/google/cloud/retail/v2/common.rb
|
228
|
+
- proto_docs/google/cloud/retail/v2/completion_service.rb
|
215
229
|
- proto_docs/google/cloud/retail/v2/import_config.rb
|
216
230
|
- proto_docs/google/cloud/retail/v2/prediction_service.rb
|
217
231
|
- proto_docs/google/cloud/retail/v2/product.rb
|
218
232
|
- proto_docs/google/cloud/retail/v2/product_service.rb
|
219
233
|
- proto_docs/google/cloud/retail/v2/purge_config.rb
|
234
|
+
- proto_docs/google/cloud/retail/v2/search_service.rb
|
220
235
|
- proto_docs/google/cloud/retail/v2/user_event.rb
|
221
236
|
- proto_docs/google/cloud/retail/v2/user_event_service.rb
|
222
237
|
- proto_docs/google/longrunning/operations.rb
|
@@ -228,6 +243,7 @@ files:
|
|
228
243
|
- proto_docs/google/protobuf/timestamp.rb
|
229
244
|
- proto_docs/google/protobuf/wrappers.rb
|
230
245
|
- proto_docs/google/rpc/status.rb
|
246
|
+
- proto_docs/google/type/date.rb
|
231
247
|
homepage: https://github.com/googleapis/google-cloud-ruby
|
232
248
|
licenses:
|
233
249
|
- Apache-2.0
|