google-cloud-discovery_engine-v1 0.a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +431 -0
  6. data/lib/google/cloud/discovery_engine/v1/completion_service/credentials.rb +47 -0
  7. data/lib/google/cloud/discovery_engine/v1/completion_service/paths.rb +78 -0
  8. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +388 -0
  9. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/service_stub.rb +114 -0
  10. data/lib/google/cloud/discovery_engine/v1/completion_service/rest.rb +52 -0
  11. data/lib/google/cloud/discovery_engine/v1/completion_service.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +1155 -0
  13. data/lib/google/cloud/discovery_engine/v1/document_service/credentials.rb +47 -0
  14. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +770 -0
  15. data/lib/google/cloud/discovery_engine/v1/document_service/paths.rb +135 -0
  16. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +956 -0
  17. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +935 -0
  18. data/lib/google/cloud/discovery_engine/v1/document_service/rest/service_stub.rb +518 -0
  19. data/lib/google/cloud/discovery_engine/v1/document_service/rest.rb +54 -0
  20. data/lib/google/cloud/discovery_engine/v1/document_service.rb +57 -0
  21. data/lib/google/cloud/discovery_engine/v1/rest.rb +41 -0
  22. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +839 -0
  23. data/lib/google/cloud/discovery_engine/v1/schema_service/credentials.rb +47 -0
  24. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +770 -0
  25. data/lib/google/cloud/discovery_engine/v1/schema_service/paths.rb +127 -0
  26. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +679 -0
  27. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +935 -0
  28. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/service_stub.rb +382 -0
  29. data/lib/google/cloud/discovery_engine/v1/schema_service/rest.rb +53 -0
  30. data/lib/google/cloud/discovery_engine/v1/schema_service.rb +56 -0
  31. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +493 -0
  32. data/lib/google/cloud/discovery_engine/v1/search_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +131 -0
  34. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +446 -0
  35. data/lib/google/cloud/discovery_engine/v1/search_service/rest/service_stub.rb +116 -0
  36. data/lib/google/cloud/discovery_engine/v1/search_service/rest.rb +52 -0
  37. data/lib/google/cloud/discovery_engine/v1/search_service.rb +55 -0
  38. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +640 -0
  39. data/lib/google/cloud/discovery_engine/v1/user_event_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +770 -0
  41. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +131 -0
  42. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +544 -0
  43. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +935 -0
  44. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +250 -0
  45. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest.rb +53 -0
  46. data/lib/google/cloud/discovery_engine/v1/user_event_service.rb +56 -0
  47. data/lib/google/cloud/discovery_engine/v1/version.rb +7 -2
  48. data/lib/google/cloud/discovery_engine/v1.rb +49 -0
  49. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +45 -0
  50. data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +49 -0
  51. data/lib/google/cloud/discoveryengine/v1/completion_service_services_pb.rb +45 -0
  52. data/lib/google/cloud/discoveryengine/v1/document_pb.rb +48 -0
  53. data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +58 -0
  54. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +79 -0
  55. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +66 -0
  56. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +49 -0
  57. data/lib/google/cloud/discoveryengine/v1/schema_pb.rb +47 -0
  58. data/lib/google/cloud/discoveryengine/v1/schema_service_pb.rb +61 -0
  59. data/lib/google/cloud/discoveryengine/v1/schema_service_services_pb.rb +53 -0
  60. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +61 -0
  61. data/lib/google/cloud/discoveryengine/v1/search_service_services_pb.rb +45 -0
  62. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +58 -0
  63. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +53 -0
  64. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +59 -0
  65. data/lib/google-cloud-discovery_engine-v1.rb +21 -0
  66. data/proto_docs/README.md +4 -0
  67. data/proto_docs/google/api/client.rb +381 -0
  68. data/proto_docs/google/api/field_behavior.rb +71 -0
  69. data/proto_docs/google/api/httpbody.rb +80 -0
  70. data/proto_docs/google/api/launch_stage.rb +71 -0
  71. data/proto_docs/google/api/resource.rb +222 -0
  72. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +89 -0
  73. data/proto_docs/google/cloud/discoveryengine/v1/completion_service.rb +98 -0
  74. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +105 -0
  75. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +180 -0
  76. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +336 -0
  77. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +84 -0
  78. data/proto_docs/google/cloud/discoveryengine/v1/schema.rb +45 -0
  79. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +177 -0
  80. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +294 -0
  81. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +466 -0
  82. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +64 -0
  83. data/proto_docs/google/longrunning/operations.rb +164 -0
  84. data/proto_docs/google/protobuf/any.rb +144 -0
  85. data/proto_docs/google/protobuf/duration.rb +98 -0
  86. data/proto_docs/google/protobuf/empty.rb +34 -0
  87. data/proto_docs/google/protobuf/struct.rb +96 -0
  88. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  89. data/proto_docs/google/rpc/status.rb +48 -0
  90. data/proto_docs/google/type/date.rb +53 -0
  91. metadata +243 -12
@@ -0,0 +1,466 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 DiscoveryEngine
23
+ module V1
24
+ # UserEvent captures all metadata information Discovery Engine API needs to
25
+ # know about how end users interact with customers' website.
26
+ # @!attribute [rw] event_type
27
+ # @return [::String]
28
+ # Required. User event type. Allowed values are:
29
+ #
30
+ # Generic values:
31
+ #
32
+ # * `search`: Search for Documents.
33
+ # * `view-item`: Detailed page view of a Document.
34
+ # * `view-item-list`: View of a panel or ordered list of Documents.
35
+ # * `view-home-page`: View of the home page.
36
+ # * `view-category-page`: View of a category page, e.g. Home > Men > Jeans
37
+ #
38
+ # Retail-related values:
39
+ #
40
+ # * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping
41
+ # * `purchase`: Purchase an item(s)
42
+ #
43
+ # Media-related values:
44
+ #
45
+ # * `media-play`: Start/resume watching a video, playing a song, etc.
46
+ # * `media-complete`: Finished or stopped midway through a video, song, etc.
47
+ # @!attribute [rw] user_pseudo_id
48
+ # @return [::String]
49
+ # Required. A unique identifier for tracking visitors.
50
+ #
51
+ # For example, this could be implemented with an HTTP cookie, which should be
52
+ # able to uniquely identify a visitor on a single device. This unique
53
+ # identifier should not change if the visitor log in/out of the website.
54
+ #
55
+ # Do not set the field to the same fixed ID for different users. This mixes
56
+ # the event history of those users together, which results in degraded model
57
+ # quality.
58
+ #
59
+ # The field must be a UTF-8 encoded string with a length limit of 128
60
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
61
+ #
62
+ # The field should not contain PII or user-data. We recommend to use Google
63
+ # Analytics [Client
64
+ # ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
65
+ # for this field.
66
+ # @!attribute [rw] event_time
67
+ # @return [::Google::Protobuf::Timestamp]
68
+ # Only required for
69
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEventService::Client#import_user_events UserEventService.ImportUserEvents}
70
+ # method. Timestamp of when the user event happened.
71
+ # @!attribute [rw] user_info
72
+ # @return [::Google::Cloud::DiscoveryEngine::V1::UserInfo]
73
+ # Information about the end user.
74
+ # @!attribute [rw] direct_user_request
75
+ # @return [::Boolean]
76
+ # Should set to true if the request is made directly from the end user, in
77
+ # which case the
78
+ # {::Google::Cloud::DiscoveryEngine::V1::UserInfo#user_agent UserEvent.user_info.user_agent}
79
+ # can be populated from the HTTP request.
80
+ #
81
+ # This flag should be set only if the API request is made directly from the
82
+ # end user such as a mobile app (and not if a gateway or a server is
83
+ # processing and pushing the user events).
84
+ #
85
+ # This should not be set when using the JavaScript tag in
86
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEventService::Client#collect_user_event UserEventService.CollectUserEvent}.
87
+ # @!attribute [rw] session_id
88
+ # @return [::String]
89
+ # A unique identifier for tracking a visitor session with a length limit of
90
+ # 128 bytes. A session is an aggregation of an end user behavior in a time
91
+ # span.
92
+ #
93
+ # A general guideline to populate the session_id:
94
+ #
95
+ # 1. If user has no activity for 30 min, a new session_id should be assigned.
96
+ # 2. The session_id should be unique across users, suggest use uuid or add
97
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent#user_pseudo_id UserEvent.user_pseudo_id}
98
+ # as prefix.
99
+ # @!attribute [rw] page_info
100
+ # @return [::Google::Cloud::DiscoveryEngine::V1::PageInfo]
101
+ # Page metadata such as categories and other critical information for certain
102
+ # event types such as `view-category-page`.
103
+ # @!attribute [rw] attribution_token
104
+ # @return [::String]
105
+ # Token to attribute an API response to user action(s) to trigger the event.
106
+ #
107
+ # Highly recommended for user events that are the result of
108
+ # [RecommendationService.Recommend][]. This field enables accurate
109
+ # attribution of recommendation model performance.
110
+ #
111
+ # The value must be one of:
112
+ #
113
+ # * [PredictResponse.attribution_token][] for events that are the result of
114
+ # [RecommendationService.Recommend][].
115
+ # * {::Google::Cloud::DiscoveryEngine::V1::SearchResponse#attribution_token SearchResponse.attribution_token} for events that are the result of
116
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchService::Client#search SearchService.Search}.
117
+ # * [CompleteQueryResponse.attribution_token][] for events that are the
118
+ # result of
119
+ # {::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client#complete_query CompletionService.CompleteQuery}.
120
+ #
121
+ # This token enables us to accurately attribute page view or conversion
122
+ # completion back to the event and the particular predict response containing
123
+ # this clicked/purchased product. If user clicks on product K in the
124
+ # recommendation results, pass [PredictResponse.attribution_token][] as a URL
125
+ # parameter to product K's page. When recording events on product K's page,
126
+ # log the [PredictResponse.attribution_token][] to this field.
127
+ # @!attribute [rw] filter
128
+ # @return [::String]
129
+ # The filter syntax consists of an expression language for constructing a
130
+ # predicate from one or more fields of the documents being filtered.
131
+ #
132
+ # One example is for `search` events, the associated
133
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest SearchRequest} may contain
134
+ # a filter expression in [SearchRequest.filter][] conforming to
135
+ # https://google.aip.dev/160#filtering.
136
+ #
137
+ # Similarly, for `view-item-list` events that are generated from a
138
+ # [RecommendationService.RecommendRequest][], this field may be populated
139
+ # directly from [RecommendationService.RecommendRequest.filter][] conforming
140
+ # to https://google.aip.dev/160#filtering.
141
+ #
142
+ # The value must be a UTF-8 encoded string with a length limit of 1,000
143
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
144
+ # @!attribute [rw] documents
145
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::DocumentInfo>]
146
+ # List of Documents associated with this user event.
147
+ #
148
+ # This field is optional except for the following event types:
149
+ #
150
+ # * `view-item`
151
+ # * `add-to-cart`
152
+ # * `purchase`
153
+ # * `media-play`
154
+ # * `media-complete`
155
+ #
156
+ # In a `search` event, this field represents the documents returned to the
157
+ # end user on the current page (the end user may have not finished browsing
158
+ # the whole page yet). When a new page is returned to the end user, after
159
+ # pagination/filtering/ordering even for the same query, a new `search` event
160
+ # with different
161
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent#documents UserEvent.documents}
162
+ # is desired.
163
+ # @!attribute [rw] panel
164
+ # @return [::Google::Cloud::DiscoveryEngine::V1::PanelInfo]
165
+ # Panel metadata associated with this user event.
166
+ # @!attribute [rw] search_info
167
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchInfo]
168
+ # Search API details related to the event.
169
+ #
170
+ # This field should be set for `search` event.
171
+ # @!attribute [rw] completion_info
172
+ # @return [::Google::Cloud::DiscoveryEngine::V1::CompletionInfo]
173
+ # CompleteQuery API details related to the event.
174
+ #
175
+ # This field should be set for `search` event when autocomplete function is
176
+ # enabled and the user clicks a suggestion for search.
177
+ # @!attribute [rw] transaction_info
178
+ # @return [::Google::Cloud::DiscoveryEngine::V1::TransactionInfo]
179
+ # The transaction metadata (if any) associated with this user event.
180
+ # @!attribute [rw] tag_ids
181
+ # @return [::Array<::String>]
182
+ # A list of identifiers for the independent experiment groups this user event
183
+ # belongs to. This is used to distinguish between user events associated with
184
+ # different experiment setups on the customer end.
185
+ # @!attribute [rw] promotion_ids
186
+ # @return [::Array<::String>]
187
+ # The promotion IDs if this is an event associated with promotions.
188
+ # Currently, this field is restricted to at most one ID.
189
+ # @!attribute [rw] attributes
190
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::CustomAttribute}]
191
+ # Extra user event features to include in the recommendation model.
192
+ # These attributes must NOT contain data that needs to be parsed or processed
193
+ # further, e.g. JSON or other encodings.
194
+ #
195
+ # If you provide custom attributes for ingested user events, also include
196
+ # them in the user events that you associate with prediction requests. Custom
197
+ # attribute formatting must be consistent between imported events and events
198
+ # provided with prediction requests. This lets the Discovery Engine API use
199
+ # those custom attributes when training models and serving predictions, which
200
+ # helps improve recommendation quality.
201
+ #
202
+ # This field needs to pass all below criteria, otherwise an
203
+ # `INVALID_ARGUMENT` error is returned:
204
+ #
205
+ # * The key must be a UTF-8 encoded string with a length limit of 5,000
206
+ # characters.
207
+ # * For text attributes, at most 400 values are allowed. Empty values are not
208
+ # allowed. Each value must be a UTF-8 encoded string with a length limit of
209
+ # 256 characters.
210
+ # * For number attributes, at most 400 values are allowed.
211
+ #
212
+ # For product recommendations, an example of extra user information is
213
+ # ` traffic_channel`, which is how a user arrives at the site. Users can
214
+ # arrive
215
+ # at the site by coming to the site directly, coming through Google
216
+ # search, or in other ways.
217
+ # @!attribute [rw] media_info
218
+ # @return [::Google::Cloud::DiscoveryEngine::V1::MediaInfo]
219
+ # Media-specific info.
220
+ class UserEvent
221
+ include ::Google::Protobuf::MessageExts
222
+ extend ::Google::Protobuf::MessageExts::ClassMethods
223
+
224
+ # @!attribute [rw] key
225
+ # @return [::String]
226
+ # @!attribute [rw] value
227
+ # @return [::Google::Cloud::DiscoveryEngine::V1::CustomAttribute]
228
+ class AttributesEntry
229
+ include ::Google::Protobuf::MessageExts
230
+ extend ::Google::Protobuf::MessageExts::ClassMethods
231
+ end
232
+ end
233
+
234
+ # Detailed page information.
235
+ # @!attribute [rw] pageview_id
236
+ # @return [::String]
237
+ # A unique ID of a web page view.
238
+ #
239
+ # This should be kept the same for all user events triggered from the same
240
+ # pageview. For example, an item detail page view could trigger multiple
241
+ # events as the user is browsing the page. The `pageViewId` property should
242
+ # be kept the same for all these events so that they can be grouped together
243
+ # properly.
244
+ #
245
+ # When using the client side event reporting with JavaScript pixel and Google
246
+ # Tag Manager, this value is filled in automatically.
247
+ # @!attribute [rw] page_category
248
+ # @return [::String]
249
+ # The most specific category associated with a category page.
250
+ #
251
+ # To represent full path of category, use '>' sign to separate different
252
+ # hierarchies. If '>' is part of the category name, please replace it with
253
+ # other character(s).
254
+ #
255
+ # Category pages include special pages such as sales or promotions. For
256
+ # instance, a special sale page may have the category hierarchy:
257
+ # "pageCategory" : "Sales > 2017 Black Friday Deals".
258
+ #
259
+ # Required for `view-category-page` events. Other event types should not set
260
+ # this field. Otherwise, an INVALID_ARGUMENT error is returned.
261
+ # @!attribute [rw] uri
262
+ # @return [::String]
263
+ # Complete URL (window.location.href) of the user's current page.
264
+ #
265
+ # When using the client side event reporting with JavaScript pixel and Google
266
+ # Tag Manager, this value is filled in automatically. Maximum length 5,000
267
+ # characters.
268
+ # @!attribute [rw] referrer_uri
269
+ # @return [::String]
270
+ # The referrer URL of the current page.
271
+ #
272
+ # When using the client side event reporting with JavaScript pixel and Google
273
+ # Tag Manager, this value is filled in automatically. However, some browser
274
+ # privacy restrictions may cause this field to be empty.
275
+ class PageInfo
276
+ include ::Google::Protobuf::MessageExts
277
+ extend ::Google::Protobuf::MessageExts::ClassMethods
278
+ end
279
+
280
+ # Detailed search information.
281
+ # @!attribute [rw] search_query
282
+ # @return [::String]
283
+ # The user's search query.
284
+ #
285
+ # See
286
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#query SearchRequest.query}
287
+ # for definition.
288
+ #
289
+ # The value must be a UTF-8 encoded string with a length limit of 5,000
290
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
291
+ #
292
+ # At least one of
293
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchInfo#search_query search_query} or
294
+ # {::Google::Cloud::DiscoveryEngine::V1::PageInfo#page_category PageInfo.page_category}
295
+ # is required for `search` events. Other event types should not set this
296
+ # field. Otherwise, an INVALID_ARGUMENT error is returned.
297
+ # @!attribute [rw] order_by
298
+ # @return [::String]
299
+ # The order in which products are returned, if applicable.
300
+ #
301
+ # See [SearchRequest.order_by][] for definition and syntax.
302
+ #
303
+ # The value must be a UTF-8 encoded string with a length limit of 1,000
304
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
305
+ #
306
+ # This can only be set for `search` events. Other event types should not set
307
+ # this field. Otherwise, an INVALID_ARGUMENT error is returned.
308
+ # @!attribute [rw] offset
309
+ # @return [::Integer]
310
+ # An integer that specifies the current offset for pagination (the 0-indexed
311
+ # starting location, amongst the products deemed by the API as relevant).
312
+ #
313
+ # See
314
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#offset SearchRequest.offset}
315
+ # for definition.
316
+ #
317
+ # If this field is negative, an INVALID_ARGUMENT is returned.
318
+ #
319
+ # This can only be set for `search` events. Other event types should not set
320
+ # this field. Otherwise, an INVALID_ARGUMENT error is returned.
321
+ class SearchInfo
322
+ include ::Google::Protobuf::MessageExts
323
+ extend ::Google::Protobuf::MessageExts::ClassMethods
324
+ end
325
+
326
+ # Detailed completion information including completion attribution token and
327
+ # clicked completion info.
328
+ # @!attribute [rw] selected_suggestion
329
+ # @return [::String]
330
+ # End user selected [CompleteQueryResponse.CompletionResult.suggestion][].
331
+ # @!attribute [rw] selected_position
332
+ # @return [::Integer]
333
+ # End user selected [CompleteQueryResponse.CompletionResult.suggestion][]
334
+ # position, starting from 0.
335
+ class CompletionInfo
336
+ include ::Google::Protobuf::MessageExts
337
+ extend ::Google::Protobuf::MessageExts::ClassMethods
338
+ end
339
+
340
+ # A transaction represents the entire purchase transaction.
341
+ # @!attribute [rw] value
342
+ # @return [::Float]
343
+ # Required. Total non-zero value associated with the transaction. This value
344
+ # may include shipping, tax, or other adjustments to the total value that you
345
+ # want to include.
346
+ # @!attribute [rw] currency
347
+ # @return [::String]
348
+ # Required. Currency code. Use three-character ISO-4217 code.
349
+ # @!attribute [rw] transaction_id
350
+ # @return [::String]
351
+ # The transaction ID with a length limit of 128 characters.
352
+ # @!attribute [rw] tax
353
+ # @return [::Float]
354
+ # All the taxes associated with the transaction.
355
+ # @!attribute [rw] cost
356
+ # @return [::Float]
357
+ # All the costs associated with the products. These can be manufacturing
358
+ # costs, shipping expenses not borne by the end user, or any other costs,
359
+ # such that:
360
+ #
361
+ # * Profit = {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#value value} -
362
+ # {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#tax tax} -
363
+ # {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#cost cost}
364
+ # @!attribute [rw] discount_value
365
+ # @return [::Float]
366
+ # The total discount(s) value applied to this transaction.
367
+ # This figure should be excluded from
368
+ # {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#value TransactionInfo.value}
369
+ #
370
+ # For example, if a user paid
371
+ # {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#value TransactionInfo.value}
372
+ # amount, then nominal (pre-discount) value of the transaction is the sum of
373
+ # {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#value TransactionInfo.value}
374
+ # and
375
+ # {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#discount_value TransactionInfo.discount_value}
376
+ #
377
+ # This means that profit is calculated the same way, regardless of the
378
+ # discount value, and that
379
+ # {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#discount_value TransactionInfo.discount_value}
380
+ # can be larger than
381
+ # {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#value TransactionInfo.value}:
382
+ #
383
+ # * Profit = {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#value value} -
384
+ # {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#tax tax} -
385
+ # {::Google::Cloud::DiscoveryEngine::V1::TransactionInfo#cost cost}
386
+ class TransactionInfo
387
+ include ::Google::Protobuf::MessageExts
388
+ extend ::Google::Protobuf::MessageExts::ClassMethods
389
+ end
390
+
391
+ # Detailed document information associated with a user event.
392
+ # @!attribute [rw] id
393
+ # @return [::String]
394
+ # Required. The Document resource ID.
395
+ # @!attribute [rw] name
396
+ # @return [::String]
397
+ # Required. The Document resource full name, of the form:
398
+ # `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
399
+ # @!attribute [rw] quantity
400
+ # @return [::Integer]
401
+ # Quantity of the Document associated with the user event. Defaults to 1.
402
+ #
403
+ # For example, this field will be 2 if two quantities of the same Document
404
+ # are involved in a `add-to-cart` event.
405
+ #
406
+ # Required for events of the following event types:
407
+ #
408
+ # * `add-to-cart`
409
+ # * `purchase`
410
+ # @!attribute [rw] promotion_ids
411
+ # @return [::Array<::String>]
412
+ # The promotion IDs associated with this Document.
413
+ # Currently, this field is restricted to at most one ID.
414
+ class DocumentInfo
415
+ include ::Google::Protobuf::MessageExts
416
+ extend ::Google::Protobuf::MessageExts::ClassMethods
417
+ end
418
+
419
+ # Detailed panel information associated with a user event.
420
+ # @!attribute [rw] panel_id
421
+ # @return [::String]
422
+ # Required. The panel ID.
423
+ # @!attribute [rw] display_name
424
+ # @return [::String]
425
+ # The display name of the panel.
426
+ # @!attribute [rw] panel_position
427
+ # @return [::Integer]
428
+ # The ordered position of the panel, if shown to the user with other panels.
429
+ # If set, then
430
+ # {::Google::Cloud::DiscoveryEngine::V1::PanelInfo#total_panels total_panels} must
431
+ # also be set.
432
+ # @!attribute [rw] total_panels
433
+ # @return [::Integer]
434
+ # The total number of panels, including this one, shown to the user.
435
+ # Must be set if
436
+ # {::Google::Cloud::DiscoveryEngine::V1::PanelInfo#panel_position panel_position}
437
+ # is set.
438
+ class PanelInfo
439
+ include ::Google::Protobuf::MessageExts
440
+ extend ::Google::Protobuf::MessageExts::ClassMethods
441
+ end
442
+
443
+ # Media-specific user event information.
444
+ # @!attribute [rw] media_progress_duration
445
+ # @return [::Google::Protobuf::Duration]
446
+ # The media progress time in seconds, if applicable.
447
+ # For example, if the end user has finished 90 seconds of a playback video,
448
+ # then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should
449
+ # be set to 90.
450
+ # @!attribute [rw] media_progress_percentage
451
+ # @return [::Float]
452
+ # Media progress should be computed using only the media_progress_duration
453
+ # relative to the media total length.
454
+ #
455
+ # This value must be between `[0, 1.0]` inclusive.
456
+ #
457
+ # If this is not a playback or the progress cannot be computed (e.g. ongoing
458
+ # livestream), this field should be unset.
459
+ class MediaInfo
460
+ include ::Google::Protobuf::MessageExts
461
+ extend ::Google::Protobuf::MessageExts::ClassMethods
462
+ end
463
+ end
464
+ end
465
+ end
466
+ end
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 DiscoveryEngine
23
+ module V1
24
+ # Request message for WriteUserEvent method.
25
+ # @!attribute [rw] parent
26
+ # @return [::String]
27
+ # Required. The parent DataStore resource name, such as
28
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
29
+ # @!attribute [rw] user_event
30
+ # @return [::Google::Cloud::DiscoveryEngine::V1::UserEvent]
31
+ # Required. User event to write.
32
+ class WriteUserEventRequest
33
+ include ::Google::Protobuf::MessageExts
34
+ extend ::Google::Protobuf::MessageExts::ClassMethods
35
+ end
36
+
37
+ # Request message for CollectUserEvent method.
38
+ # @!attribute [rw] parent
39
+ # @return [::String]
40
+ # Required. The parent DataStore resource name, such as
41
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
42
+ # @!attribute [rw] user_event
43
+ # @return [::String]
44
+ # Required. URL encoded UserEvent proto with a length limit of 2,000,000
45
+ # characters.
46
+ # @!attribute [rw] uri
47
+ # @return [::String]
48
+ # The URL including cgi-parameters but excluding the hash fragment with a
49
+ # length limit of 5,000 characters. This is often more useful than the
50
+ # referer URL, because many browsers only send the domain for 3rd party
51
+ # requests.
52
+ # @!attribute [rw] ets
53
+ # @return [::Integer]
54
+ # The event timestamp in milliseconds. This prevents browser caching of
55
+ # otherwise identical get requests. The name is abbreviated to reduce the
56
+ # payload bytes.
57
+ class CollectUserEventRequest
58
+ include ::Google::Protobuf::MessageExts
59
+ extend ::Google::Protobuf::MessageExts::ClassMethods
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end