google-cloud-discovery_engine-v1beta 0.a → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/README.md +144 -8
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +429 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/paths.rb +78 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +386 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/service_stub.rb +114 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +1107 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +768 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +135 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +908 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +905 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/service_stub.rb +518 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service.rb +58 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +486 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +135 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +443 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/service_stub.rb +116 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/rest.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +840 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +768 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/paths.rb +127 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +680 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +905 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/service_stub.rb +382 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +513 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/paths.rb +131 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +465 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/service_stub.rb +116 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +638 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +768 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/paths.rb +131 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +542 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +905 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +250 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1beta/version.rb +7 -2
- data/lib/google/cloud/discovery_engine/v1beta.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +41 -0
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +38 -0
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +43 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +58 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_service_services_pb.rb +81 -0
- data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +109 -0
- data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +40 -0
- data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/schema_pb.rb +30 -0
- data/lib/google/cloud/discoveryengine/v1beta/schema_service_pb.rb +72 -0
- data/lib/google/cloud/discoveryengine/v1beta/schema_service_services_pb.rb +53 -0
- data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +151 -0
- data/lib/google/cloud/discoveryengine/v1beta/search_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +93 -0
- data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +39 -0
- data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +59 -0
- data/lib/google-cloud-discovery_engine-v1beta.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/httpbody.rb +80 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +107 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +98 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +107 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +181 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +286 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +84 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +210 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/schema.rb +45 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/schema_service.rb +180 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +605 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +473 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +64 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- data/proto_docs/google/type/date.rb +53 -0
- metadata +254 -12
@@ -0,0 +1,473 @@
|
|
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 V1beta
|
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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::UserEvent#user_pseudo_id UserEvent.user_pseudo_id}
|
98
|
+
# as prefix.
|
99
|
+
# @!attribute [rw] page_info
|
100
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::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
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::RecommendationService::Client#recommend RecommendationService.Recommend}.
|
109
|
+
# This field enables accurate attribution of recommendation model
|
110
|
+
# performance.
|
111
|
+
#
|
112
|
+
# The value must be one of:
|
113
|
+
#
|
114
|
+
# * [PredictResponse.attribution_token][] for events that are the result of
|
115
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::RecommendationService::Client#recommend RecommendationService.Recommend}.
|
116
|
+
# * {::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse#attribution_token SearchResponse.attribution_token} for events that are the result of
|
117
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchService::Client#search SearchService.Search}.
|
118
|
+
# * [CompleteQueryResponse.attribution_token][] for events that are the
|
119
|
+
# result of
|
120
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::CompletionService::Client#complete_query CompletionService.CompleteQuery}.
|
121
|
+
#
|
122
|
+
# This token enables us to accurately attribute page view or conversion
|
123
|
+
# completion back to the event and the particular predict response containing
|
124
|
+
# this clicked/purchased product. If user clicks on product K in the
|
125
|
+
# recommendation results, pass [PredictResponse.attribution_token][] as a URL
|
126
|
+
# parameter to product K's page. When recording events on product K's page,
|
127
|
+
# log the [PredictResponse.attribution_token][] to this field.
|
128
|
+
# @!attribute [rw] filter
|
129
|
+
# @return [::String]
|
130
|
+
# The filter syntax consists of an expression language for constructing a
|
131
|
+
# predicate from one or more fields of the documents being filtered.
|
132
|
+
#
|
133
|
+
# One example is for `search` events, the associated
|
134
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest SearchRequest} may
|
135
|
+
# contain a filter expression in
|
136
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#filter SearchRequest.filter}
|
137
|
+
# conforming to https://google.aip.dev/160#filtering.
|
138
|
+
#
|
139
|
+
# Similarly, for `view-item-list` events that are generated from a
|
140
|
+
# [RecommendationService.RecommendRequest][], this field may be populated
|
141
|
+
# directly from [RecommendationService.RecommendRequest.filter][] conforming
|
142
|
+
# to https://google.aip.dev/160#filtering.
|
143
|
+
#
|
144
|
+
# The value must be a UTF-8 encoded string with a length limit of 1,000
|
145
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
146
|
+
# @!attribute [rw] documents
|
147
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::DocumentInfo>]
|
148
|
+
# List of Documents associated with this user event.
|
149
|
+
#
|
150
|
+
# This field is optional except for the following event types:
|
151
|
+
#
|
152
|
+
# * `view-item`
|
153
|
+
# * `add-to-cart`
|
154
|
+
# * `purchase`
|
155
|
+
# * `media-play`
|
156
|
+
# * `media-complete`
|
157
|
+
#
|
158
|
+
# In a `search` event, this field represents the documents returned to the
|
159
|
+
# end user on the current page (the end user may have not finished browsing
|
160
|
+
# the whole page yet). When a new page is returned to the end user, after
|
161
|
+
# pagination/filtering/ordering even for the same query, a new `search` event
|
162
|
+
# with different
|
163
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::UserEvent#documents UserEvent.documents}
|
164
|
+
# is desired.
|
165
|
+
# @!attribute [rw] panel
|
166
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::PanelInfo]
|
167
|
+
# Panel metadata associated with this user event.
|
168
|
+
# @!attribute [rw] search_info
|
169
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchInfo]
|
170
|
+
# Search API details related to the event.
|
171
|
+
#
|
172
|
+
# This field should be set for `search` event.
|
173
|
+
# @!attribute [rw] completion_info
|
174
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::CompletionInfo]
|
175
|
+
# CompleteQuery API details related to the event.
|
176
|
+
#
|
177
|
+
# This field should be set for `search` event when autocomplete function is
|
178
|
+
# enabled and the user clicks a suggestion for search.
|
179
|
+
# @!attribute [rw] transaction_info
|
180
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo]
|
181
|
+
# The transaction metadata (if any) associated with this user event.
|
182
|
+
# @!attribute [rw] tag_ids
|
183
|
+
# @return [::Array<::String>]
|
184
|
+
# A list of identifiers for the independent experiment groups this user event
|
185
|
+
# belongs to. This is used to distinguish between user events associated with
|
186
|
+
# different experiment setups on the customer end.
|
187
|
+
# @!attribute [rw] promotion_ids
|
188
|
+
# @return [::Array<::String>]
|
189
|
+
# The promotion IDs if this is an event associated with promotions.
|
190
|
+
# Currently, this field is restricted to at most one ID.
|
191
|
+
# @!attribute [rw] attributes
|
192
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::CustomAttribute}]
|
193
|
+
# Extra user event features to include in the recommendation model.
|
194
|
+
# These attributes must NOT contain data that needs to be parsed or processed
|
195
|
+
# further, e.g. JSON or other encodings.
|
196
|
+
#
|
197
|
+
# If you provide custom attributes for ingested user events, also include
|
198
|
+
# them in the user events that you associate with prediction requests. Custom
|
199
|
+
# attribute formatting must be consistent between imported events and events
|
200
|
+
# provided with prediction requests. This lets the Discovery Engine API use
|
201
|
+
# those custom attributes when training models and serving predictions, which
|
202
|
+
# helps improve recommendation quality.
|
203
|
+
#
|
204
|
+
# This field needs to pass all below criteria, otherwise an
|
205
|
+
# `INVALID_ARGUMENT` error is returned:
|
206
|
+
#
|
207
|
+
# * The key must be a UTF-8 encoded string with a length limit of 5,000
|
208
|
+
# characters.
|
209
|
+
# * For text attributes, at most 400 values are allowed. Empty values are not
|
210
|
+
# allowed. Each value must be a UTF-8 encoded string with a length limit of
|
211
|
+
# 256 characters.
|
212
|
+
# * For number attributes, at most 400 values are allowed.
|
213
|
+
#
|
214
|
+
# For product recommendations, an example of extra user information is
|
215
|
+
# ` traffic_channel`, which is how a user arrives at the site. Users can
|
216
|
+
# arrive
|
217
|
+
# at the site by coming to the site directly, coming through Google
|
218
|
+
# search, or in other ways.
|
219
|
+
# @!attribute [rw] media_info
|
220
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::MediaInfo]
|
221
|
+
# Media-specific info.
|
222
|
+
class UserEvent
|
223
|
+
include ::Google::Protobuf::MessageExts
|
224
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
225
|
+
|
226
|
+
# @!attribute [rw] key
|
227
|
+
# @return [::String]
|
228
|
+
# @!attribute [rw] value
|
229
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::CustomAttribute]
|
230
|
+
class AttributesEntry
|
231
|
+
include ::Google::Protobuf::MessageExts
|
232
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
# Detailed page information.
|
237
|
+
# @!attribute [rw] pageview_id
|
238
|
+
# @return [::String]
|
239
|
+
# A unique ID of a web page view.
|
240
|
+
#
|
241
|
+
# This should be kept the same for all user events triggered from the same
|
242
|
+
# pageview. For example, an item detail page view could trigger multiple
|
243
|
+
# events as the user is browsing the page. The `pageViewId` property should
|
244
|
+
# be kept the same for all these events so that they can be grouped together
|
245
|
+
# properly.
|
246
|
+
#
|
247
|
+
# When using the client side event reporting with JavaScript pixel and Google
|
248
|
+
# Tag Manager, this value is filled in automatically.
|
249
|
+
# @!attribute [rw] page_category
|
250
|
+
# @return [::String]
|
251
|
+
# The most specific category associated with a category page.
|
252
|
+
#
|
253
|
+
# To represent full path of category, use '>' sign to separate different
|
254
|
+
# hierarchies. If '>' is part of the category name, please replace it with
|
255
|
+
# other character(s).
|
256
|
+
#
|
257
|
+
# Category pages include special pages such as sales or promotions. For
|
258
|
+
# instance, a special sale page may have the category hierarchy:
|
259
|
+
# "pageCategory" : "Sales > 2017 Black Friday Deals".
|
260
|
+
#
|
261
|
+
# Required for `view-category-page` events. Other event types should not set
|
262
|
+
# this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
263
|
+
# @!attribute [rw] uri
|
264
|
+
# @return [::String]
|
265
|
+
# Complete URL (window.location.href) of the user's current page.
|
266
|
+
#
|
267
|
+
# When using the client side event reporting with JavaScript pixel and Google
|
268
|
+
# Tag Manager, this value is filled in automatically. Maximum length 5,000
|
269
|
+
# characters.
|
270
|
+
# @!attribute [rw] referrer_uri
|
271
|
+
# @return [::String]
|
272
|
+
# The referrer URL of the current page.
|
273
|
+
#
|
274
|
+
# When using the client side event reporting with JavaScript pixel and Google
|
275
|
+
# Tag Manager, this value is filled in automatically. However, some browser
|
276
|
+
# privacy restrictions may cause this field to be empty.
|
277
|
+
class PageInfo
|
278
|
+
include ::Google::Protobuf::MessageExts
|
279
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
280
|
+
end
|
281
|
+
|
282
|
+
# Detailed search information.
|
283
|
+
# @!attribute [rw] search_query
|
284
|
+
# @return [::String]
|
285
|
+
# The user's search query.
|
286
|
+
#
|
287
|
+
# See
|
288
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#query SearchRequest.query}
|
289
|
+
# for definition.
|
290
|
+
#
|
291
|
+
# The value must be a UTF-8 encoded string with a length limit of 5,000
|
292
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
293
|
+
#
|
294
|
+
# At least one of
|
295
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchInfo#search_query search_query}
|
296
|
+
# or
|
297
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::PageInfo#page_category PageInfo.page_category}
|
298
|
+
# is required for `search` events. Other event types should not set this
|
299
|
+
# field. Otherwise, an INVALID_ARGUMENT error is returned.
|
300
|
+
# @!attribute [rw] order_by
|
301
|
+
# @return [::String]
|
302
|
+
# The order in which products are returned, if applicable.
|
303
|
+
#
|
304
|
+
# See
|
305
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#order_by SearchRequest.order_by}
|
306
|
+
# for definition and syntax.
|
307
|
+
#
|
308
|
+
# The value must be a UTF-8 encoded string with a length limit of 1,000
|
309
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
310
|
+
#
|
311
|
+
# This can only be set for `search` events. Other event types should not set
|
312
|
+
# this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
313
|
+
# @!attribute [rw] offset
|
314
|
+
# @return [::Integer]
|
315
|
+
# An integer that specifies the current offset for pagination (the 0-indexed
|
316
|
+
# starting location, amongst the products deemed by the API as relevant).
|
317
|
+
#
|
318
|
+
# See
|
319
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#offset SearchRequest.offset}
|
320
|
+
# for definition.
|
321
|
+
#
|
322
|
+
# If this field is negative, an INVALID_ARGUMENT is returned.
|
323
|
+
#
|
324
|
+
# This can only be set for `search` events. Other event types should not set
|
325
|
+
# this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
326
|
+
class SearchInfo
|
327
|
+
include ::Google::Protobuf::MessageExts
|
328
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
329
|
+
end
|
330
|
+
|
331
|
+
# Detailed completion information including completion attribution token and
|
332
|
+
# clicked completion info.
|
333
|
+
# @!attribute [rw] selected_suggestion
|
334
|
+
# @return [::String]
|
335
|
+
# End user selected [CompleteQueryResponse.CompletionResult.suggestion][].
|
336
|
+
# @!attribute [rw] selected_position
|
337
|
+
# @return [::Integer]
|
338
|
+
# End user selected [CompleteQueryResponse.CompletionResult.suggestion][]
|
339
|
+
# position, starting from 0.
|
340
|
+
class CompletionInfo
|
341
|
+
include ::Google::Protobuf::MessageExts
|
342
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
343
|
+
end
|
344
|
+
|
345
|
+
# A transaction represents the entire purchase transaction.
|
346
|
+
# @!attribute [rw] value
|
347
|
+
# @return [::Float]
|
348
|
+
# Required. Total non-zero value associated with the transaction. This value
|
349
|
+
# may include shipping, tax, or other adjustments to the total value that you
|
350
|
+
# want to include.
|
351
|
+
# @!attribute [rw] currency
|
352
|
+
# @return [::String]
|
353
|
+
# Required. Currency code. Use three-character ISO-4217 code.
|
354
|
+
# @!attribute [rw] transaction_id
|
355
|
+
# @return [::String]
|
356
|
+
# The transaction ID with a length limit of 128 characters.
|
357
|
+
# @!attribute [rw] tax
|
358
|
+
# @return [::Float]
|
359
|
+
# All the taxes associated with the transaction.
|
360
|
+
# @!attribute [rw] cost
|
361
|
+
# @return [::Float]
|
362
|
+
# All the costs associated with the products. These can be manufacturing
|
363
|
+
# costs, shipping expenses not borne by the end user, or any other costs,
|
364
|
+
# such that:
|
365
|
+
#
|
366
|
+
# * Profit =
|
367
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#value value} -
|
368
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#tax tax} -
|
369
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#cost cost}
|
370
|
+
# @!attribute [rw] discount_value
|
371
|
+
# @return [::Float]
|
372
|
+
# The total discount(s) value applied to this transaction.
|
373
|
+
# This figure should be excluded from
|
374
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#value TransactionInfo.value}
|
375
|
+
#
|
376
|
+
# For example, if a user paid
|
377
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#value TransactionInfo.value}
|
378
|
+
# amount, then nominal (pre-discount) value of the transaction is the sum of
|
379
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#value TransactionInfo.value}
|
380
|
+
# and
|
381
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#discount_value TransactionInfo.discount_value}
|
382
|
+
#
|
383
|
+
# This means that profit is calculated the same way, regardless of the
|
384
|
+
# discount value, and that
|
385
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#discount_value TransactionInfo.discount_value}
|
386
|
+
# can be larger than
|
387
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#value TransactionInfo.value}:
|
388
|
+
#
|
389
|
+
# * Profit =
|
390
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#value value} -
|
391
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#tax tax} -
|
392
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::TransactionInfo#cost cost}
|
393
|
+
class TransactionInfo
|
394
|
+
include ::Google::Protobuf::MessageExts
|
395
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
396
|
+
end
|
397
|
+
|
398
|
+
# Detailed document information associated with a user event.
|
399
|
+
# @!attribute [rw] id
|
400
|
+
# @return [::String]
|
401
|
+
# Required. The Document resource ID.
|
402
|
+
# @!attribute [rw] name
|
403
|
+
# @return [::String]
|
404
|
+
# Required. The Document resource full name, of the form:
|
405
|
+
# `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
|
406
|
+
# @!attribute [rw] quantity
|
407
|
+
# @return [::Integer]
|
408
|
+
# Quantity of the Document associated with the user event. Defaults to 1.
|
409
|
+
#
|
410
|
+
# For example, this field will be 2 if two quantities of the same Document
|
411
|
+
# are involved in a `add-to-cart` event.
|
412
|
+
#
|
413
|
+
# Required for events of the following event types:
|
414
|
+
#
|
415
|
+
# * `add-to-cart`
|
416
|
+
# * `purchase`
|
417
|
+
# @!attribute [rw] promotion_ids
|
418
|
+
# @return [::Array<::String>]
|
419
|
+
# The promotion IDs associated with this Document.
|
420
|
+
# Currently, this field is restricted to at most one ID.
|
421
|
+
class DocumentInfo
|
422
|
+
include ::Google::Protobuf::MessageExts
|
423
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
424
|
+
end
|
425
|
+
|
426
|
+
# Detailed panel information associated with a user event.
|
427
|
+
# @!attribute [rw] panel_id
|
428
|
+
# @return [::String]
|
429
|
+
# Required. The panel ID.
|
430
|
+
# @!attribute [rw] display_name
|
431
|
+
# @return [::String]
|
432
|
+
# The display name of the panel.
|
433
|
+
# @!attribute [rw] panel_position
|
434
|
+
# @return [::Integer]
|
435
|
+
# The ordered position of the panel, if shown to the user with other panels.
|
436
|
+
# If set, then
|
437
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::PanelInfo#total_panels total_panels}
|
438
|
+
# must also be set.
|
439
|
+
# @!attribute [rw] total_panels
|
440
|
+
# @return [::Integer]
|
441
|
+
# The total number of panels, including this one, shown to the user.
|
442
|
+
# Must be set if
|
443
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::PanelInfo#panel_position panel_position}
|
444
|
+
# is set.
|
445
|
+
class PanelInfo
|
446
|
+
include ::Google::Protobuf::MessageExts
|
447
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
448
|
+
end
|
449
|
+
|
450
|
+
# Media-specific user event information.
|
451
|
+
# @!attribute [rw] media_progress_duration
|
452
|
+
# @return [::Google::Protobuf::Duration]
|
453
|
+
# The media progress time in seconds, if applicable.
|
454
|
+
# For example, if the end user has finished 90 seconds of a playback video,
|
455
|
+
# then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should
|
456
|
+
# be set to 90.
|
457
|
+
# @!attribute [rw] media_progress_percentage
|
458
|
+
# @return [::Float]
|
459
|
+
# Media progress should be computed using only the media_progress_duration
|
460
|
+
# relative to the media total length.
|
461
|
+
#
|
462
|
+
# This value must be between `[0, 1.0]` inclusive.
|
463
|
+
#
|
464
|
+
# If this is not a playback or the progress cannot be computed (e.g. ongoing
|
465
|
+
# livestream), this field should be unset.
|
466
|
+
class MediaInfo
|
467
|
+
include ::Google::Protobuf::MessageExts
|
468
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
469
|
+
end
|
470
|
+
end
|
471
|
+
end
|
472
|
+
end
|
473
|
+
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 V1beta
|
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::V1beta::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
|