google-cloud-retail-v2 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2.rb +2 -0
  3. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -0
  4. data/lib/google/cloud/retail/v2/catalog_service/client.rb +203 -4
  5. data/lib/google/cloud/retail/v2/catalog_service/paths.rb +21 -0
  6. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +16 -0
  7. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +46 -0
  8. data/lib/google/cloud/retail/v2/common_pb.rb +46 -0
  9. data/lib/google/cloud/retail/v2/completion_service.rb +54 -0
  10. data/lib/google/cloud/retail/v2/completion_service/client.rb +546 -0
  11. data/lib/google/cloud/retail/v2/completion_service/credentials.rb +51 -0
  12. data/lib/google/cloud/retail/v2/completion_service/operations.rb +655 -0
  13. data/lib/google/cloud/retail/v2/completion_service/paths.rb +52 -0
  14. data/lib/google/cloud/retail/v2/completion_service_pb.rb +50 -0
  15. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +61 -0
  16. data/lib/google/cloud/retail/v2/import_config_pb.rb +32 -0
  17. data/lib/google/cloud/retail/v2/prediction_service/client.rb +34 -33
  18. data/lib/google/cloud/retail/v2/product_pb.rb +21 -0
  19. data/lib/google/cloud/retail/v2/product_service/client.rb +632 -4
  20. data/lib/google/cloud/retail/v2/product_service_pb.rb +56 -0
  21. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +75 -0
  22. data/lib/google/cloud/retail/v2/search_service.rb +53 -0
  23. data/lib/google/cloud/retail/v2/search_service/client.rb +541 -0
  24. data/lib/google/cloud/retail/v2/search_service/credentials.rb +51 -0
  25. data/lib/google/cloud/retail/v2/search_service/paths.rb +54 -0
  26. data/lib/google/cloud/retail/v2/search_service_pb.rb +131 -0
  27. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +53 -0
  28. data/lib/google/cloud/retail/v2/user_event_pb.rb +11 -0
  29. data/lib/google/cloud/retail/v2/user_event_service/client.rb +1 -1
  30. data/lib/google/cloud/retail/v2/user_event_service/paths.rb +19 -0
  31. data/lib/google/cloud/retail/v2/version.rb +1 -1
  32. data/proto_docs/google/cloud/retail/v2/catalog.rb +6 -6
  33. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +53 -4
  34. data/proto_docs/google/cloud/retail/v2/common.rb +272 -4
  35. data/proto_docs/google/cloud/retail/v2/completion_service.rb +162 -0
  36. data/proto_docs/google/cloud/retail/v2/import_config.rb +122 -6
  37. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +32 -31
  38. data/proto_docs/google/cloud/retail/v2/product.rb +266 -10
  39. data/proto_docs/google/cloud/retail/v2/product_service.rb +362 -2
  40. data/proto_docs/google/cloud/retail/v2/purge_config.rb +1 -1
  41. data/proto_docs/google/cloud/retail/v2/search_service.rb +820 -0
  42. data/proto_docs/google/cloud/retail/v2/user_event.rb +95 -3
  43. data/proto_docs/google/type/date.rb +53 -0
  44. metadata +18 -2
@@ -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
- # Required for `search` events. Other event types should not set this field.
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. Other event types should not set
143
- # this field. Otherwise, an INVALID_ARGUMENT error is returned.
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.
@@ -203,6 +275,26 @@ module Google
203
275
  extend ::Google::Protobuf::MessageExts::ClassMethods
204
276
  end
205
277
 
278
+ # Detailed completion information including completion attribution token and
279
+ # clicked completion info.
280
+ # @!attribute [rw] completion_attribution_token
281
+ # @return [::String]
282
+ # Completion attribution token in
283
+ # {::Google::Cloud::Retail::V2::CompleteQueryResponse#attribution_token CompleteQueryResponse.attribution_token}.
284
+ # @!attribute [rw] selected_suggestion
285
+ # @return [::String]
286
+ # End user selected
287
+ # {::Google::Cloud::Retail::V2::CompleteQueryResponse::CompletionResult#suggestion CompleteQueryResponse.CompletionResult.suggestion}.
288
+ # @!attribute [rw] selected_position
289
+ # @return [::Integer]
290
+ # End user selected
291
+ # {::Google::Cloud::Retail::V2::CompleteQueryResponse::CompletionResult#suggestion CompleteQueryResponse.CompletionResult.suggestion}
292
+ # position, starting from 0.
293
+ class CompletionDetail
294
+ include ::Google::Protobuf::MessageExts
295
+ extend ::Google::Protobuf::MessageExts::ClassMethods
296
+ end
297
+
206
298
  # A transaction represents the entire purchase transaction.
207
299
  # @!attribute [rw] id
208
300
  # @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.3.2
4
+ version: 0.4.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-07-12 00:00:00.000000000 Z
11
+ date: 2021-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -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