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