google-apis-discoveryengine_v1beta 0.1.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 +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/discoveryengine_v1beta/classes.rb +1614 -0
- data/lib/google/apis/discoveryengine_v1beta/gem_version.rb +28 -0
- data/lib/google/apis/discoveryengine_v1beta/representations.rb +637 -0
- data/lib/google/apis/discoveryengine_v1beta/service.rb +836 -0
- data/lib/google/apis/discoveryengine_v1beta.rb +36 -0
- data/lib/google-apis-discoveryengine_v1beta.rb +15 -0
- metadata +82 -0
@@ -0,0 +1,1614 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module DiscoveryengineV1beta
|
24
|
+
|
25
|
+
# Message that represents an arbitrary HTTP body. It should only be used for
|
26
|
+
# payload formats that can't be represented as JSON, such as raw binary or an
|
27
|
+
# HTML page. This message can be used both in streaming and non-streaming API
|
28
|
+
# methods in the request as well as the response. It can be used as a top-level
|
29
|
+
# request field, which is convenient if one wants to extract parameters from
|
30
|
+
# either the URL or HTTP template into the request fields and also want access
|
31
|
+
# to the raw HTTP body. Example: message GetResourceRequest ` // A unique
|
32
|
+
# request id. string request_id = 1; // The raw HTTP body is bound to this field.
|
33
|
+
# google.api.HttpBody http_body = 2; ` service ResourceService ` rpc
|
34
|
+
# GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
|
35
|
+
# UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); ` Example
|
36
|
+
# with streaming methods: service CaldavService ` rpc GetCalendar(stream google.
|
37
|
+
# api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream
|
38
|
+
# google.api.HttpBody) returns (stream google.api.HttpBody); ` Use of this type
|
39
|
+
# only changes how the request and response bodies are handled, all other
|
40
|
+
# features will continue to work unchanged.
|
41
|
+
class GoogleApiHttpBody
|
42
|
+
include Google::Apis::Core::Hashable
|
43
|
+
|
44
|
+
# The HTTP Content-Type header value specifying the content type of the body.
|
45
|
+
# Corresponds to the JSON property `contentType`
|
46
|
+
# @return [String]
|
47
|
+
attr_accessor :content_type
|
48
|
+
|
49
|
+
# The HTTP request/response body as raw binary.
|
50
|
+
# Corresponds to the JSON property `data`
|
51
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
52
|
+
# @return [String]
|
53
|
+
attr_accessor :data
|
54
|
+
|
55
|
+
# Application specific response metadata. Must be set in the first response for
|
56
|
+
# streaming APIs.
|
57
|
+
# Corresponds to the JSON property `extensions`
|
58
|
+
# @return [Array<Hash<String,Object>>]
|
59
|
+
attr_accessor :extensions
|
60
|
+
|
61
|
+
def initialize(**args)
|
62
|
+
update!(**args)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Update properties of this object
|
66
|
+
def update!(**args)
|
67
|
+
@content_type = args[:content_type] if args.key?(:content_type)
|
68
|
+
@data = args[:data] if args.key?(:data)
|
69
|
+
@extensions = args[:extensions] if args.key?(:extensions)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Metadata related to the progress of the ImportDocuments operation. This will
|
74
|
+
# be returned by the google.longrunning.Operation.metadata field.
|
75
|
+
class GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata
|
76
|
+
include Google::Apis::Core::Hashable
|
77
|
+
|
78
|
+
# Operation create time.
|
79
|
+
# Corresponds to the JSON property `createTime`
|
80
|
+
# @return [String]
|
81
|
+
attr_accessor :create_time
|
82
|
+
|
83
|
+
# Count of entries that encountered errors while processing.
|
84
|
+
# Corresponds to the JSON property `failureCount`
|
85
|
+
# @return [Fixnum]
|
86
|
+
attr_accessor :failure_count
|
87
|
+
|
88
|
+
# Count of entries that were processed successfully.
|
89
|
+
# Corresponds to the JSON property `successCount`
|
90
|
+
# @return [Fixnum]
|
91
|
+
attr_accessor :success_count
|
92
|
+
|
93
|
+
# Operation last update time. If the operation is done, this is also the finish
|
94
|
+
# time.
|
95
|
+
# Corresponds to the JSON property `updateTime`
|
96
|
+
# @return [String]
|
97
|
+
attr_accessor :update_time
|
98
|
+
|
99
|
+
def initialize(**args)
|
100
|
+
update!(**args)
|
101
|
+
end
|
102
|
+
|
103
|
+
# Update properties of this object
|
104
|
+
def update!(**args)
|
105
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
106
|
+
@failure_count = args[:failure_count] if args.key?(:failure_count)
|
107
|
+
@success_count = args[:success_count] if args.key?(:success_count)
|
108
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# Response of the ImportDocumentsRequest. If the long running operation is done,
|
113
|
+
# then this message is returned by the google.longrunning.Operations.response
|
114
|
+
# field if the operation was successful.
|
115
|
+
class GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse
|
116
|
+
include Google::Apis::Core::Hashable
|
117
|
+
|
118
|
+
# Configuration of destination for Import related errors.
|
119
|
+
# Corresponds to the JSON property `errorConfig`
|
120
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1alphaImportErrorConfig]
|
121
|
+
attr_accessor :error_config
|
122
|
+
|
123
|
+
# A sample of errors encountered while processing the request.
|
124
|
+
# Corresponds to the JSON property `errorSamples`
|
125
|
+
# @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleRpcStatus>]
|
126
|
+
attr_accessor :error_samples
|
127
|
+
|
128
|
+
def initialize(**args)
|
129
|
+
update!(**args)
|
130
|
+
end
|
131
|
+
|
132
|
+
# Update properties of this object
|
133
|
+
def update!(**args)
|
134
|
+
@error_config = args[:error_config] if args.key?(:error_config)
|
135
|
+
@error_samples = args[:error_samples] if args.key?(:error_samples)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
# Configuration of destination for Import related errors.
|
140
|
+
class GoogleCloudDiscoveryengineV1alphaImportErrorConfig
|
141
|
+
include Google::Apis::Core::Hashable
|
142
|
+
|
143
|
+
# Google Cloud Storage prefix for import errors. This must be an empty, existing
|
144
|
+
# Cloud Storage directory. Import errors will be written to sharded files in
|
145
|
+
# this directory, one per line, as a JSON-encoded `google.rpc.Status` message.
|
146
|
+
# Corresponds to the JSON property `gcsPrefix`
|
147
|
+
# @return [String]
|
148
|
+
attr_accessor :gcs_prefix
|
149
|
+
|
150
|
+
def initialize(**args)
|
151
|
+
update!(**args)
|
152
|
+
end
|
153
|
+
|
154
|
+
# Update properties of this object
|
155
|
+
def update!(**args)
|
156
|
+
@gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
# Metadata related to the progress of the Import operation. This will be
|
161
|
+
# returned by the google.longrunning.Operation.metadata field.
|
162
|
+
class GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata
|
163
|
+
include Google::Apis::Core::Hashable
|
164
|
+
|
165
|
+
# Operation create time.
|
166
|
+
# Corresponds to the JSON property `createTime`
|
167
|
+
# @return [String]
|
168
|
+
attr_accessor :create_time
|
169
|
+
|
170
|
+
# Count of entries that encountered errors while processing.
|
171
|
+
# Corresponds to the JSON property `failureCount`
|
172
|
+
# @return [Fixnum]
|
173
|
+
attr_accessor :failure_count
|
174
|
+
|
175
|
+
# Count of entries that were processed successfully.
|
176
|
+
# Corresponds to the JSON property `successCount`
|
177
|
+
# @return [Fixnum]
|
178
|
+
attr_accessor :success_count
|
179
|
+
|
180
|
+
# Operation last update time. If the operation is done, this is also the finish
|
181
|
+
# time.
|
182
|
+
# Corresponds to the JSON property `updateTime`
|
183
|
+
# @return [String]
|
184
|
+
attr_accessor :update_time
|
185
|
+
|
186
|
+
def initialize(**args)
|
187
|
+
update!(**args)
|
188
|
+
end
|
189
|
+
|
190
|
+
# Update properties of this object
|
191
|
+
def update!(**args)
|
192
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
193
|
+
@failure_count = args[:failure_count] if args.key?(:failure_count)
|
194
|
+
@success_count = args[:success_count] if args.key?(:success_count)
|
195
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
# Response of the ImportUserEventsRequest. If the long running operation was
|
200
|
+
# successful, then this message is returned by the google.longrunning.Operations.
|
201
|
+
# response field if the operation was successful.
|
202
|
+
class GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse
|
203
|
+
include Google::Apis::Core::Hashable
|
204
|
+
|
205
|
+
# Configuration of destination for Import related errors.
|
206
|
+
# Corresponds to the JSON property `errorConfig`
|
207
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1alphaImportErrorConfig]
|
208
|
+
attr_accessor :error_config
|
209
|
+
|
210
|
+
# A sample of errors encountered while processing the request.
|
211
|
+
# Corresponds to the JSON property `errorSamples`
|
212
|
+
# @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleRpcStatus>]
|
213
|
+
attr_accessor :error_samples
|
214
|
+
|
215
|
+
# Count of user events imported with complete existing Documents.
|
216
|
+
# Corresponds to the JSON property `joinedEventsCount`
|
217
|
+
# @return [Fixnum]
|
218
|
+
attr_accessor :joined_events_count
|
219
|
+
|
220
|
+
# Count of user events imported, but with Document information not found in the
|
221
|
+
# existing Branch.
|
222
|
+
# Corresponds to the JSON property `unjoinedEventsCount`
|
223
|
+
# @return [Fixnum]
|
224
|
+
attr_accessor :unjoined_events_count
|
225
|
+
|
226
|
+
def initialize(**args)
|
227
|
+
update!(**args)
|
228
|
+
end
|
229
|
+
|
230
|
+
# Update properties of this object
|
231
|
+
def update!(**args)
|
232
|
+
@error_config = args[:error_config] if args.key?(:error_config)
|
233
|
+
@error_samples = args[:error_samples] if args.key?(:error_samples)
|
234
|
+
@joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count)
|
235
|
+
@unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
# BigQuery source import data from.
|
240
|
+
class GoogleCloudDiscoveryengineV1betaBigQuerySource
|
241
|
+
include Google::Apis::Core::Hashable
|
242
|
+
|
243
|
+
# The schema to use when parsing the data from the source. Supported values for
|
244
|
+
# imports: * `user_event` (default): One JSON UserEvent per line. * `document` (
|
245
|
+
# default): One JSON Document per line. Each document must have a valid document.
|
246
|
+
# id.
|
247
|
+
# Corresponds to the JSON property `dataSchema`
|
248
|
+
# @return [String]
|
249
|
+
attr_accessor :data_schema
|
250
|
+
|
251
|
+
# Required. The BigQuery data set to copy the data from with a length limit of 1,
|
252
|
+
# 024 characters.
|
253
|
+
# Corresponds to the JSON property `datasetId`
|
254
|
+
# @return [String]
|
255
|
+
attr_accessor :dataset_id
|
256
|
+
|
257
|
+
# Intermediate Cloud Storage directory used for the import with a length limit
|
258
|
+
# of 2,000 characters. Can be specified if one wants to have the BigQuery export
|
259
|
+
# to a specific Cloud Storage directory.
|
260
|
+
# Corresponds to the JSON property `gcsStagingDir`
|
261
|
+
# @return [String]
|
262
|
+
attr_accessor :gcs_staging_dir
|
263
|
+
|
264
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
265
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
266
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
267
|
+
# following: * A full date, with non-zero year, month, and day values. * A month
|
268
|
+
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
269
|
+
# with a zero month and a zero day. * A year and month, with a zero day (for
|
270
|
+
# example, a credit card expiration date). Related types: * google.type.
|
271
|
+
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
272
|
+
# Corresponds to the JSON property `partitionDate`
|
273
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleTypeDate]
|
274
|
+
attr_accessor :partition_date
|
275
|
+
|
276
|
+
# The project ID (can be project # or ID) that the BigQuery source is in with a
|
277
|
+
# length limit of 128 characters. If not specified, inherits the project ID from
|
278
|
+
# the parent request.
|
279
|
+
# Corresponds to the JSON property `projectId`
|
280
|
+
# @return [String]
|
281
|
+
attr_accessor :project_id
|
282
|
+
|
283
|
+
# Required. The BigQuery table to copy the data from with a length limit of 1,
|
284
|
+
# 024 characters.
|
285
|
+
# Corresponds to the JSON property `tableId`
|
286
|
+
# @return [String]
|
287
|
+
attr_accessor :table_id
|
288
|
+
|
289
|
+
def initialize(**args)
|
290
|
+
update!(**args)
|
291
|
+
end
|
292
|
+
|
293
|
+
# Update properties of this object
|
294
|
+
def update!(**args)
|
295
|
+
@data_schema = args[:data_schema] if args.key?(:data_schema)
|
296
|
+
@dataset_id = args[:dataset_id] if args.key?(:dataset_id)
|
297
|
+
@gcs_staging_dir = args[:gcs_staging_dir] if args.key?(:gcs_staging_dir)
|
298
|
+
@partition_date = args[:partition_date] if args.key?(:partition_date)
|
299
|
+
@project_id = args[:project_id] if args.key?(:project_id)
|
300
|
+
@table_id = args[:table_id] if args.key?(:table_id)
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
# Detailed completion information including completion attribution token and
|
305
|
+
# clicked completion info.
|
306
|
+
class GoogleCloudDiscoveryengineV1betaCompletionInfo
|
307
|
+
include Google::Apis::Core::Hashable
|
308
|
+
|
309
|
+
# End user selected CompleteQueryResponse.CompletionResult.suggestion position,
|
310
|
+
# starting from 0.
|
311
|
+
# Corresponds to the JSON property `selectedPosition`
|
312
|
+
# @return [Fixnum]
|
313
|
+
attr_accessor :selected_position
|
314
|
+
|
315
|
+
# End user selected CompleteQueryResponse.CompletionResult.suggestion.
|
316
|
+
# Corresponds to the JSON property `selectedSuggestion`
|
317
|
+
# @return [String]
|
318
|
+
attr_accessor :selected_suggestion
|
319
|
+
|
320
|
+
def initialize(**args)
|
321
|
+
update!(**args)
|
322
|
+
end
|
323
|
+
|
324
|
+
# Update properties of this object
|
325
|
+
def update!(**args)
|
326
|
+
@selected_position = args[:selected_position] if args.key?(:selected_position)
|
327
|
+
@selected_suggestion = args[:selected_suggestion] if args.key?(:selected_suggestion)
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
# A custom attribute that is not explicitly modeled in a resource, e.g.
|
332
|
+
# UserEvent.
|
333
|
+
class GoogleCloudDiscoveryengineV1betaCustomAttribute
|
334
|
+
include Google::Apis::Core::Hashable
|
335
|
+
|
336
|
+
# The numerical values of this custom attribute. For example, `[2.3, 15.4]` when
|
337
|
+
# the key is "lengths_cm". Exactly one of text or numbers should be set.
|
338
|
+
# Otherwise, an INVALID_ARGUMENT error is returned.
|
339
|
+
# Corresponds to the JSON property `numbers`
|
340
|
+
# @return [Array<Float>]
|
341
|
+
attr_accessor :numbers
|
342
|
+
|
343
|
+
# The textual values of this custom attribute. For example, `["yellow", "green"]`
|
344
|
+
# when the key is "color". Empty string is not allowed. Otherwise, an
|
345
|
+
# INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be
|
346
|
+
# set. Otherwise, an INVALID_ARGUMENT error is returned.
|
347
|
+
# Corresponds to the JSON property `text`
|
348
|
+
# @return [Array<String>]
|
349
|
+
attr_accessor :text
|
350
|
+
|
351
|
+
def initialize(**args)
|
352
|
+
update!(**args)
|
353
|
+
end
|
354
|
+
|
355
|
+
# Update properties of this object
|
356
|
+
def update!(**args)
|
357
|
+
@numbers = args[:numbers] if args.key?(:numbers)
|
358
|
+
@text = args[:text] if args.key?(:text)
|
359
|
+
end
|
360
|
+
end
|
361
|
+
|
362
|
+
# Document captures all raw metadata information of items to be recommended or
|
363
|
+
# searched.
|
364
|
+
class GoogleCloudDiscoveryengineV1betaDocument
|
365
|
+
include Google::Apis::Core::Hashable
|
366
|
+
|
367
|
+
# Immutable. The identifier of the document. Id should conform to [RFC-1034](
|
368
|
+
# https://tools.ietf.org/html/rfc1034) standard with a length limit of 63
|
369
|
+
# characters.
|
370
|
+
# Corresponds to the JSON property `id`
|
371
|
+
# @return [String]
|
372
|
+
attr_accessor :id
|
373
|
+
|
374
|
+
# The JSON string representation of the document. It should conform to the
|
375
|
+
# registered schema or an INVALID_ARGUMENT error is thrown.
|
376
|
+
# Corresponds to the JSON property `jsonData`
|
377
|
+
# @return [String]
|
378
|
+
attr_accessor :json_data
|
379
|
+
|
380
|
+
# Immutable. The full resource name of the document. Format: `projects/`project`/
|
381
|
+
# locations/`location`/dataStores/`data_store`/branches/`branch`/documents/`
|
382
|
+
# document_id``. This field must be a UTF-8 encoded string with a length limit
|
383
|
+
# of 1024 characters.
|
384
|
+
# Corresponds to the JSON property `name`
|
385
|
+
# @return [String]
|
386
|
+
attr_accessor :name
|
387
|
+
|
388
|
+
# The identifier of the parent document. Currently supports at most two level
|
389
|
+
# document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/
|
390
|
+
# html/rfc1034) standard with a length limit of 63 characters.
|
391
|
+
# Corresponds to the JSON property `parentDocumentId`
|
392
|
+
# @return [String]
|
393
|
+
attr_accessor :parent_document_id
|
394
|
+
|
395
|
+
# Required. The identifier of the schema located in the same data store.
|
396
|
+
# Corresponds to the JSON property `schemaId`
|
397
|
+
# @return [String]
|
398
|
+
attr_accessor :schema_id
|
399
|
+
|
400
|
+
# The structured JSON data for the document. It should conform to the registered
|
401
|
+
# schema or an INVALID_ARGUMENT error is thrown.
|
402
|
+
# Corresponds to the JSON property `structData`
|
403
|
+
# @return [Hash<String,Object>]
|
404
|
+
attr_accessor :struct_data
|
405
|
+
|
406
|
+
def initialize(**args)
|
407
|
+
update!(**args)
|
408
|
+
end
|
409
|
+
|
410
|
+
# Update properties of this object
|
411
|
+
def update!(**args)
|
412
|
+
@id = args[:id] if args.key?(:id)
|
413
|
+
@json_data = args[:json_data] if args.key?(:json_data)
|
414
|
+
@name = args[:name] if args.key?(:name)
|
415
|
+
@parent_document_id = args[:parent_document_id] if args.key?(:parent_document_id)
|
416
|
+
@schema_id = args[:schema_id] if args.key?(:schema_id)
|
417
|
+
@struct_data = args[:struct_data] if args.key?(:struct_data)
|
418
|
+
end
|
419
|
+
end
|
420
|
+
|
421
|
+
# Detailed document information associated with a user event.
|
422
|
+
class GoogleCloudDiscoveryengineV1betaDocumentInfo
|
423
|
+
include Google::Apis::Core::Hashable
|
424
|
+
|
425
|
+
# Required. The Document resource ID.
|
426
|
+
# Corresponds to the JSON property `id`
|
427
|
+
# @return [String]
|
428
|
+
attr_accessor :id
|
429
|
+
|
430
|
+
# Required. The Document resource full name, of the form: projects//locations//
|
431
|
+
# dataStores//branches//documents/
|
432
|
+
# Corresponds to the JSON property `name`
|
433
|
+
# @return [String]
|
434
|
+
attr_accessor :name
|
435
|
+
|
436
|
+
# The promotion IDs associated with this Document. Currently, this field is
|
437
|
+
# restricted to at most one ID.
|
438
|
+
# Corresponds to the JSON property `promotionIds`
|
439
|
+
# @return [Array<String>]
|
440
|
+
attr_accessor :promotion_ids
|
441
|
+
|
442
|
+
# Quantity of the Document associated with the user event. Defaults to 1. For
|
443
|
+
# example, this field will be 2 if two quantities of the same Document are
|
444
|
+
# involved in a `add-to-cart` event. Required for events of the following event
|
445
|
+
# types: * `add-to-cart` * `purchase`
|
446
|
+
# Corresponds to the JSON property `quantity`
|
447
|
+
# @return [Fixnum]
|
448
|
+
attr_accessor :quantity
|
449
|
+
|
450
|
+
def initialize(**args)
|
451
|
+
update!(**args)
|
452
|
+
end
|
453
|
+
|
454
|
+
# Update properties of this object
|
455
|
+
def update!(**args)
|
456
|
+
@id = args[:id] if args.key?(:id)
|
457
|
+
@name = args[:name] if args.key?(:name)
|
458
|
+
@promotion_ids = args[:promotion_ids] if args.key?(:promotion_ids)
|
459
|
+
@quantity = args[:quantity] if args.key?(:quantity)
|
460
|
+
end
|
461
|
+
end
|
462
|
+
|
463
|
+
# Google Cloud Storage location for input content. format.
|
464
|
+
class GoogleCloudDiscoveryengineV1betaGcsSource
|
465
|
+
include Google::Apis::Core::Hashable
|
466
|
+
|
467
|
+
# The schema to use when parsing the data from the source. Supported values for
|
468
|
+
# imports: * `user_event` (default): One JSON UserEvent per line. * `document` (
|
469
|
+
# default): One JSON Document per line. Each document must have a valid Document.
|
470
|
+
# id.
|
471
|
+
# Corresponds to the JSON property `dataSchema`
|
472
|
+
# @return [String]
|
473
|
+
attr_accessor :data_schema
|
474
|
+
|
475
|
+
# Required. Google Cloud Storage URIs to input files. URI can be up to 2000
|
476
|
+
# characters long. URIs can match the full object path (for example, `gs://
|
477
|
+
# bucket/directory/object.json`) or a pattern matching one or more files, such
|
478
|
+
# as `gs://bucket/directory/*.json`. A request can contain at most 100 files,
|
479
|
+
# and each file can be up to 2 GB.
|
480
|
+
# Corresponds to the JSON property `inputUris`
|
481
|
+
# @return [Array<String>]
|
482
|
+
attr_accessor :input_uris
|
483
|
+
|
484
|
+
def initialize(**args)
|
485
|
+
update!(**args)
|
486
|
+
end
|
487
|
+
|
488
|
+
# Update properties of this object
|
489
|
+
def update!(**args)
|
490
|
+
@data_schema = args[:data_schema] if args.key?(:data_schema)
|
491
|
+
@input_uris = args[:input_uris] if args.key?(:input_uris)
|
492
|
+
end
|
493
|
+
end
|
494
|
+
|
495
|
+
# Metadata related to the progress of the ImportDocuments operation. This will
|
496
|
+
# be returned by the google.longrunning.Operation.metadata field.
|
497
|
+
class GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata
|
498
|
+
include Google::Apis::Core::Hashable
|
499
|
+
|
500
|
+
# Operation create time.
|
501
|
+
# Corresponds to the JSON property `createTime`
|
502
|
+
# @return [String]
|
503
|
+
attr_accessor :create_time
|
504
|
+
|
505
|
+
# Count of entries that encountered errors while processing.
|
506
|
+
# Corresponds to the JSON property `failureCount`
|
507
|
+
# @return [Fixnum]
|
508
|
+
attr_accessor :failure_count
|
509
|
+
|
510
|
+
# Count of entries that were processed successfully.
|
511
|
+
# Corresponds to the JSON property `successCount`
|
512
|
+
# @return [Fixnum]
|
513
|
+
attr_accessor :success_count
|
514
|
+
|
515
|
+
# Operation last update time. If the operation is done, this is also the finish
|
516
|
+
# time.
|
517
|
+
# Corresponds to the JSON property `updateTime`
|
518
|
+
# @return [String]
|
519
|
+
attr_accessor :update_time
|
520
|
+
|
521
|
+
def initialize(**args)
|
522
|
+
update!(**args)
|
523
|
+
end
|
524
|
+
|
525
|
+
# Update properties of this object
|
526
|
+
def update!(**args)
|
527
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
528
|
+
@failure_count = args[:failure_count] if args.key?(:failure_count)
|
529
|
+
@success_count = args[:success_count] if args.key?(:success_count)
|
530
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
531
|
+
end
|
532
|
+
end
|
533
|
+
|
534
|
+
# Request message for Import methods.
|
535
|
+
class GoogleCloudDiscoveryengineV1betaImportDocumentsRequest
|
536
|
+
include Google::Apis::Core::Hashable
|
537
|
+
|
538
|
+
# BigQuery source import data from.
|
539
|
+
# Corresponds to the JSON property `bigquerySource`
|
540
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaBigQuerySource]
|
541
|
+
attr_accessor :bigquery_source
|
542
|
+
|
543
|
+
# Configuration of destination for Import related errors.
|
544
|
+
# Corresponds to the JSON property `errorConfig`
|
545
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaImportErrorConfig]
|
546
|
+
attr_accessor :error_config
|
547
|
+
|
548
|
+
# Google Cloud Storage location for input content. format.
|
549
|
+
# Corresponds to the JSON property `gcsSource`
|
550
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaGcsSource]
|
551
|
+
attr_accessor :gcs_source
|
552
|
+
|
553
|
+
# The inline source for the input config for ImportDocuments method.
|
554
|
+
# Corresponds to the JSON property `inlineSource`
|
555
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource]
|
556
|
+
attr_accessor :inline_source
|
557
|
+
|
558
|
+
# The mode of reconciliation between existing documents and the documents to be
|
559
|
+
# imported. Defaults to ReconciliationMode.INCREMENTAL.
|
560
|
+
# Corresponds to the JSON property `reconciliationMode`
|
561
|
+
# @return [String]
|
562
|
+
attr_accessor :reconciliation_mode
|
563
|
+
|
564
|
+
def initialize(**args)
|
565
|
+
update!(**args)
|
566
|
+
end
|
567
|
+
|
568
|
+
# Update properties of this object
|
569
|
+
def update!(**args)
|
570
|
+
@bigquery_source = args[:bigquery_source] if args.key?(:bigquery_source)
|
571
|
+
@error_config = args[:error_config] if args.key?(:error_config)
|
572
|
+
@gcs_source = args[:gcs_source] if args.key?(:gcs_source)
|
573
|
+
@inline_source = args[:inline_source] if args.key?(:inline_source)
|
574
|
+
@reconciliation_mode = args[:reconciliation_mode] if args.key?(:reconciliation_mode)
|
575
|
+
end
|
576
|
+
end
|
577
|
+
|
578
|
+
# The inline source for the input config for ImportDocuments method.
|
579
|
+
class GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource
|
580
|
+
include Google::Apis::Core::Hashable
|
581
|
+
|
582
|
+
# Required. A list of documents to update/create. Each document must have a
|
583
|
+
# valid Document.id. Recommended max of 100 items.
|
584
|
+
# Corresponds to the JSON property `documents`
|
585
|
+
# @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaDocument>]
|
586
|
+
attr_accessor :documents
|
587
|
+
|
588
|
+
def initialize(**args)
|
589
|
+
update!(**args)
|
590
|
+
end
|
591
|
+
|
592
|
+
# Update properties of this object
|
593
|
+
def update!(**args)
|
594
|
+
@documents = args[:documents] if args.key?(:documents)
|
595
|
+
end
|
596
|
+
end
|
597
|
+
|
598
|
+
# Response of the ImportDocumentsRequest. If the long running operation is done,
|
599
|
+
# then this message is returned by the google.longrunning.Operations.response
|
600
|
+
# field if the operation was successful.
|
601
|
+
class GoogleCloudDiscoveryengineV1betaImportDocumentsResponse
|
602
|
+
include Google::Apis::Core::Hashable
|
603
|
+
|
604
|
+
# Configuration of destination for Import related errors.
|
605
|
+
# Corresponds to the JSON property `errorConfig`
|
606
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaImportErrorConfig]
|
607
|
+
attr_accessor :error_config
|
608
|
+
|
609
|
+
# A sample of errors encountered while processing the request.
|
610
|
+
# Corresponds to the JSON property `errorSamples`
|
611
|
+
# @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleRpcStatus>]
|
612
|
+
attr_accessor :error_samples
|
613
|
+
|
614
|
+
def initialize(**args)
|
615
|
+
update!(**args)
|
616
|
+
end
|
617
|
+
|
618
|
+
# Update properties of this object
|
619
|
+
def update!(**args)
|
620
|
+
@error_config = args[:error_config] if args.key?(:error_config)
|
621
|
+
@error_samples = args[:error_samples] if args.key?(:error_samples)
|
622
|
+
end
|
623
|
+
end
|
624
|
+
|
625
|
+
# Configuration of destination for Import related errors.
|
626
|
+
class GoogleCloudDiscoveryengineV1betaImportErrorConfig
|
627
|
+
include Google::Apis::Core::Hashable
|
628
|
+
|
629
|
+
# Google Cloud Storage prefix for import errors. This must be an empty, existing
|
630
|
+
# Cloud Storage directory. Import errors will be written to sharded files in
|
631
|
+
# this directory, one per line, as a JSON-encoded `google.rpc.Status` message.
|
632
|
+
# Corresponds to the JSON property `gcsPrefix`
|
633
|
+
# @return [String]
|
634
|
+
attr_accessor :gcs_prefix
|
635
|
+
|
636
|
+
def initialize(**args)
|
637
|
+
update!(**args)
|
638
|
+
end
|
639
|
+
|
640
|
+
# Update properties of this object
|
641
|
+
def update!(**args)
|
642
|
+
@gcs_prefix = args[:gcs_prefix] if args.key?(:gcs_prefix)
|
643
|
+
end
|
644
|
+
end
|
645
|
+
|
646
|
+
# Metadata related to the progress of the Import operation. This will be
|
647
|
+
# returned by the google.longrunning.Operation.metadata field.
|
648
|
+
class GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata
|
649
|
+
include Google::Apis::Core::Hashable
|
650
|
+
|
651
|
+
# Operation create time.
|
652
|
+
# Corresponds to the JSON property `createTime`
|
653
|
+
# @return [String]
|
654
|
+
attr_accessor :create_time
|
655
|
+
|
656
|
+
# Count of entries that encountered errors while processing.
|
657
|
+
# Corresponds to the JSON property `failureCount`
|
658
|
+
# @return [Fixnum]
|
659
|
+
attr_accessor :failure_count
|
660
|
+
|
661
|
+
# Count of entries that were processed successfully.
|
662
|
+
# Corresponds to the JSON property `successCount`
|
663
|
+
# @return [Fixnum]
|
664
|
+
attr_accessor :success_count
|
665
|
+
|
666
|
+
# Operation last update time. If the operation is done, this is also the finish
|
667
|
+
# time.
|
668
|
+
# Corresponds to the JSON property `updateTime`
|
669
|
+
# @return [String]
|
670
|
+
attr_accessor :update_time
|
671
|
+
|
672
|
+
def initialize(**args)
|
673
|
+
update!(**args)
|
674
|
+
end
|
675
|
+
|
676
|
+
# Update properties of this object
|
677
|
+
def update!(**args)
|
678
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
679
|
+
@failure_count = args[:failure_count] if args.key?(:failure_count)
|
680
|
+
@success_count = args[:success_count] if args.key?(:success_count)
|
681
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
682
|
+
end
|
683
|
+
end
|
684
|
+
|
685
|
+
# Request message for the ImportUserEvents request.
|
686
|
+
class GoogleCloudDiscoveryengineV1betaImportUserEventsRequest
|
687
|
+
include Google::Apis::Core::Hashable
|
688
|
+
|
689
|
+
# BigQuery source import data from.
|
690
|
+
# Corresponds to the JSON property `bigquerySource`
|
691
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaBigQuerySource]
|
692
|
+
attr_accessor :bigquery_source
|
693
|
+
|
694
|
+
# Configuration of destination for Import related errors.
|
695
|
+
# Corresponds to the JSON property `errorConfig`
|
696
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaImportErrorConfig]
|
697
|
+
attr_accessor :error_config
|
698
|
+
|
699
|
+
# Google Cloud Storage location for input content. format.
|
700
|
+
# Corresponds to the JSON property `gcsSource`
|
701
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaGcsSource]
|
702
|
+
attr_accessor :gcs_source
|
703
|
+
|
704
|
+
# The inline source for the input config for ImportUserEvents method.
|
705
|
+
# Corresponds to the JSON property `inlineSource`
|
706
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource]
|
707
|
+
attr_accessor :inline_source
|
708
|
+
|
709
|
+
def initialize(**args)
|
710
|
+
update!(**args)
|
711
|
+
end
|
712
|
+
|
713
|
+
# Update properties of this object
|
714
|
+
def update!(**args)
|
715
|
+
@bigquery_source = args[:bigquery_source] if args.key?(:bigquery_source)
|
716
|
+
@error_config = args[:error_config] if args.key?(:error_config)
|
717
|
+
@gcs_source = args[:gcs_source] if args.key?(:gcs_source)
|
718
|
+
@inline_source = args[:inline_source] if args.key?(:inline_source)
|
719
|
+
end
|
720
|
+
end
|
721
|
+
|
722
|
+
# The inline source for the input config for ImportUserEvents method.
|
723
|
+
class GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource
|
724
|
+
include Google::Apis::Core::Hashable
|
725
|
+
|
726
|
+
# Required. A list of user events to import. Recommended max of 10k items.
|
727
|
+
# Corresponds to the JSON property `userEvents`
|
728
|
+
# @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaUserEvent>]
|
729
|
+
attr_accessor :user_events
|
730
|
+
|
731
|
+
def initialize(**args)
|
732
|
+
update!(**args)
|
733
|
+
end
|
734
|
+
|
735
|
+
# Update properties of this object
|
736
|
+
def update!(**args)
|
737
|
+
@user_events = args[:user_events] if args.key?(:user_events)
|
738
|
+
end
|
739
|
+
end
|
740
|
+
|
741
|
+
# Response of the ImportUserEventsRequest. If the long running operation was
|
742
|
+
# successful, then this message is returned by the google.longrunning.Operations.
|
743
|
+
# response field if the operation was successful.
|
744
|
+
class GoogleCloudDiscoveryengineV1betaImportUserEventsResponse
|
745
|
+
include Google::Apis::Core::Hashable
|
746
|
+
|
747
|
+
# Configuration of destination for Import related errors.
|
748
|
+
# Corresponds to the JSON property `errorConfig`
|
749
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaImportErrorConfig]
|
750
|
+
attr_accessor :error_config
|
751
|
+
|
752
|
+
# A sample of errors encountered while processing the request.
|
753
|
+
# Corresponds to the JSON property `errorSamples`
|
754
|
+
# @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleRpcStatus>]
|
755
|
+
attr_accessor :error_samples
|
756
|
+
|
757
|
+
# Count of user events imported with complete existing Documents.
|
758
|
+
# Corresponds to the JSON property `joinedEventsCount`
|
759
|
+
# @return [Fixnum]
|
760
|
+
attr_accessor :joined_events_count
|
761
|
+
|
762
|
+
# Count of user events imported, but with Document information not found in the
|
763
|
+
# existing Branch.
|
764
|
+
# Corresponds to the JSON property `unjoinedEventsCount`
|
765
|
+
# @return [Fixnum]
|
766
|
+
attr_accessor :unjoined_events_count
|
767
|
+
|
768
|
+
def initialize(**args)
|
769
|
+
update!(**args)
|
770
|
+
end
|
771
|
+
|
772
|
+
# Update properties of this object
|
773
|
+
def update!(**args)
|
774
|
+
@error_config = args[:error_config] if args.key?(:error_config)
|
775
|
+
@error_samples = args[:error_samples] if args.key?(:error_samples)
|
776
|
+
@joined_events_count = args[:joined_events_count] if args.key?(:joined_events_count)
|
777
|
+
@unjoined_events_count = args[:unjoined_events_count] if args.key?(:unjoined_events_count)
|
778
|
+
end
|
779
|
+
end
|
780
|
+
|
781
|
+
# Response message for DocumentService.ListDocuments method.
|
782
|
+
class GoogleCloudDiscoveryengineV1betaListDocumentsResponse
|
783
|
+
include Google::Apis::Core::Hashable
|
784
|
+
|
785
|
+
# The Documents.
|
786
|
+
# Corresponds to the JSON property `documents`
|
787
|
+
# @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaDocument>]
|
788
|
+
attr_accessor :documents
|
789
|
+
|
790
|
+
# A token that can be sent as ListDocumentsRequest.page_token to retrieve the
|
791
|
+
# next page. If this field is omitted, there are no subsequent pages.
|
792
|
+
# Corresponds to the JSON property `nextPageToken`
|
793
|
+
# @return [String]
|
794
|
+
attr_accessor :next_page_token
|
795
|
+
|
796
|
+
def initialize(**args)
|
797
|
+
update!(**args)
|
798
|
+
end
|
799
|
+
|
800
|
+
# Update properties of this object
|
801
|
+
def update!(**args)
|
802
|
+
@documents = args[:documents] if args.key?(:documents)
|
803
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
804
|
+
end
|
805
|
+
end
|
806
|
+
|
807
|
+
# Media-specific user event information.
|
808
|
+
class GoogleCloudDiscoveryengineV1betaMediaInfo
|
809
|
+
include Google::Apis::Core::Hashable
|
810
|
+
|
811
|
+
# The media progress time in seconds, if applicable. For example, if the end
|
812
|
+
# user has finished 90 seconds of a playback video, then MediaInfo.
|
813
|
+
# media_progress_duration.seconds should be set to 90.
|
814
|
+
# Corresponds to the JSON property `mediaProgressDuration`
|
815
|
+
# @return [String]
|
816
|
+
attr_accessor :media_progress_duration
|
817
|
+
|
818
|
+
# Media progress should be computed using only the media_progress_duration
|
819
|
+
# relative to the media total length. This value must be between [0, 1.0]
|
820
|
+
# inclusive. If this is not a playback or the progress cannot be computed (e.g.
|
821
|
+
# ongoing livestream), this field should be unset.
|
822
|
+
# Corresponds to the JSON property `mediaProgressPercentage`
|
823
|
+
# @return [Float]
|
824
|
+
attr_accessor :media_progress_percentage
|
825
|
+
|
826
|
+
def initialize(**args)
|
827
|
+
update!(**args)
|
828
|
+
end
|
829
|
+
|
830
|
+
# Update properties of this object
|
831
|
+
def update!(**args)
|
832
|
+
@media_progress_duration = args[:media_progress_duration] if args.key?(:media_progress_duration)
|
833
|
+
@media_progress_percentage = args[:media_progress_percentage] if args.key?(:media_progress_percentage)
|
834
|
+
end
|
835
|
+
end
|
836
|
+
|
837
|
+
# Detailed page information.
|
838
|
+
class GoogleCloudDiscoveryengineV1betaPageInfo
|
839
|
+
include Google::Apis::Core::Hashable
|
840
|
+
|
841
|
+
# The most specific category associated with a category page. To represent full
|
842
|
+
# path of category, use '>' sign to separate different hierarchies. If '>' is
|
843
|
+
# part of the category name, please replace it with other character(s). Category
|
844
|
+
# pages include special pages such as sales or promotions. For instance, a
|
845
|
+
# special sale page may have the category hierarchy: "pageCategory" : "Sales >
|
846
|
+
# 2017 Black Friday Deals". Required for `view-category-page` events. Other
|
847
|
+
# event types should not set this field. Otherwise, an INVALID_ARGUMENT error is
|
848
|
+
# returned.
|
849
|
+
# Corresponds to the JSON property `pageCategory`
|
850
|
+
# @return [String]
|
851
|
+
attr_accessor :page_category
|
852
|
+
|
853
|
+
# A unique ID of a web page view. This should be kept the same for all user
|
854
|
+
# events triggered from the same pageview. For example, an item detail page view
|
855
|
+
# could trigger multiple events as the user is browsing the page. The `
|
856
|
+
# pageViewId` property should be kept the same for all these events so that they
|
857
|
+
# can be grouped together properly. When using the client side event reporting
|
858
|
+
# with JavaScript pixel and Google Tag Manager, this value is filled in
|
859
|
+
# automatically.
|
860
|
+
# Corresponds to the JSON property `pageviewId`
|
861
|
+
# @return [String]
|
862
|
+
attr_accessor :pageview_id
|
863
|
+
|
864
|
+
# The referrer URL of the current page. When using the client side event
|
865
|
+
# reporting with JavaScript pixel and Google Tag Manager, this value is filled
|
866
|
+
# in automatically. However, some browser privacy restrictions may cause this
|
867
|
+
# field to be empty.
|
868
|
+
# Corresponds to the JSON property `referrerUri`
|
869
|
+
# @return [String]
|
870
|
+
attr_accessor :referrer_uri
|
871
|
+
|
872
|
+
# Complete URL (window.location.href) of the user's current page. When using the
|
873
|
+
# client side event reporting with JavaScript pixel and Google Tag Manager, this
|
874
|
+
# value is filled in automatically. Maximum length 5,000 characters.
|
875
|
+
# Corresponds to the JSON property `uri`
|
876
|
+
# @return [String]
|
877
|
+
attr_accessor :uri
|
878
|
+
|
879
|
+
def initialize(**args)
|
880
|
+
update!(**args)
|
881
|
+
end
|
882
|
+
|
883
|
+
# Update properties of this object
|
884
|
+
def update!(**args)
|
885
|
+
@page_category = args[:page_category] if args.key?(:page_category)
|
886
|
+
@pageview_id = args[:pageview_id] if args.key?(:pageview_id)
|
887
|
+
@referrer_uri = args[:referrer_uri] if args.key?(:referrer_uri)
|
888
|
+
@uri = args[:uri] if args.key?(:uri)
|
889
|
+
end
|
890
|
+
end
|
891
|
+
|
892
|
+
# Detailed panel information associated with a user event.
|
893
|
+
class GoogleCloudDiscoveryengineV1betaPanelInfo
|
894
|
+
include Google::Apis::Core::Hashable
|
895
|
+
|
896
|
+
# The display name of the panel.
|
897
|
+
# Corresponds to the JSON property `displayName`
|
898
|
+
# @return [String]
|
899
|
+
attr_accessor :display_name
|
900
|
+
|
901
|
+
# Required. The panel ID.
|
902
|
+
# Corresponds to the JSON property `panelId`
|
903
|
+
# @return [String]
|
904
|
+
attr_accessor :panel_id
|
905
|
+
|
906
|
+
# The ordered position of the panel, if shown to the user with other panels. If
|
907
|
+
# set, then total_panels must also be set.
|
908
|
+
# Corresponds to the JSON property `panelPosition`
|
909
|
+
# @return [Fixnum]
|
910
|
+
attr_accessor :panel_position
|
911
|
+
|
912
|
+
# The total number of panels, including this one, shown to the user. Must be set
|
913
|
+
# if panel_position is set.
|
914
|
+
# Corresponds to the JSON property `totalPanels`
|
915
|
+
# @return [Fixnum]
|
916
|
+
attr_accessor :total_panels
|
917
|
+
|
918
|
+
def initialize(**args)
|
919
|
+
update!(**args)
|
920
|
+
end
|
921
|
+
|
922
|
+
# Update properties of this object
|
923
|
+
def update!(**args)
|
924
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
925
|
+
@panel_id = args[:panel_id] if args.key?(:panel_id)
|
926
|
+
@panel_position = args[:panel_position] if args.key?(:panel_position)
|
927
|
+
@total_panels = args[:total_panels] if args.key?(:total_panels)
|
928
|
+
end
|
929
|
+
end
|
930
|
+
|
931
|
+
# Request message for Recommend method.
|
932
|
+
class GoogleCloudDiscoveryengineV1betaRecommendRequest
|
933
|
+
include Google::Apis::Core::Hashable
|
934
|
+
|
935
|
+
# Filter for restricting recommendation results with a length limit of 5,000
|
936
|
+
# characters. Currently, only filter expressions on the `filter_tags` attribute
|
937
|
+
# is supported. Examples: * (filter_tags: ANY("Red", "Blue") OR filter_tags: ANY(
|
938
|
+
# "Hot", "Cold")) * (filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("
|
939
|
+
# Green")) If your filter blocks all results, the API will return generic (
|
940
|
+
# unfiltered) popular Documents. If you only want results strictly matching the
|
941
|
+
# filters, set `strictFiltering` to True in RecommendRequest.params to receive
|
942
|
+
# empty results instead. Note that the API will never return Documents with
|
943
|
+
# storageStatus of "EXPIRED" or "DELETED" regardless of filter choices.
|
944
|
+
# Corresponds to the JSON property `filter`
|
945
|
+
# @return [String]
|
946
|
+
attr_accessor :filter
|
947
|
+
|
948
|
+
# Maximum number of results to return. Set this property to the number of
|
949
|
+
# recommendation results needed. If zero, the service will choose a reasonable
|
950
|
+
# default. The maximum allowed value is 100. Values above 100 will be coerced to
|
951
|
+
# 100.
|
952
|
+
# Corresponds to the JSON property `pageSize`
|
953
|
+
# @return [Fixnum]
|
954
|
+
attr_accessor :page_size
|
955
|
+
|
956
|
+
# Additional domain specific parameters for the recommendations. Allowed values:
|
957
|
+
# * `returnDocument`: Boolean. If set to true, the associated Document object
|
958
|
+
# will be returned in RecommendResponse.results.document. * `returnScore`:
|
959
|
+
# Boolean. If set to true, the recommendation 'score' corresponding to each
|
960
|
+
# returned Document will be set in RecommendResponse.results.metadata. The given
|
961
|
+
# 'score' indicates the probability of a Document conversion given the user's
|
962
|
+
# context and history. * `strictFiltering`: Boolean. True by default. If set to
|
963
|
+
# false, the service will return generic (unfiltered) popular Documents instead
|
964
|
+
# of empty if your filter blocks all recommendation results. * `diversityLevel`:
|
965
|
+
# String. Default empty. If set to be non-empty, then it needs to be one of: * '
|
966
|
+
# no-diversity' * 'low-diversity' * 'medium-diversity' * 'high-diversity' * '
|
967
|
+
# auto-diversity' This gives request-level control and adjusts recommendation
|
968
|
+
# results based on Document category.
|
969
|
+
# Corresponds to the JSON property `params`
|
970
|
+
# @return [Hash<String,Object>]
|
971
|
+
attr_accessor :params
|
972
|
+
|
973
|
+
# UserEvent captures all metadata information DiscoveryEngine API needs to know
|
974
|
+
# about how end users interact with customers' website.
|
975
|
+
# Corresponds to the JSON property `userEvent`
|
976
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaUserEvent]
|
977
|
+
attr_accessor :user_event
|
978
|
+
|
979
|
+
# The user labels applied to a resource must meet the following requirements: *
|
980
|
+
# Each resource can have multiple labels, up to a maximum of 64. * Each label
|
981
|
+
# must be a key-value pair. * Keys have a minimum length of 1 character and a
|
982
|
+
# maximum length of 63 characters and cannot be empty. Values can be empty and
|
983
|
+
# have a maximum length of 63 characters. * Keys and values can contain only
|
984
|
+
# lowercase letters, numeric characters, underscores, and dashes. All characters
|
985
|
+
# must use UTF-8 encoding, and international characters are allowed. * The key
|
986
|
+
# portion of a label must be unique. However, you can use the same key with
|
987
|
+
# multiple resources. * Keys must start with a lowercase letter or international
|
988
|
+
# character. See [Google Cloud Document](https://cloud.google.com/resource-
|
989
|
+
# manager/docs/creating-managing-labels#requirements) for more details.
|
990
|
+
# Corresponds to the JSON property `userLabels`
|
991
|
+
# @return [Hash<String,String>]
|
992
|
+
attr_accessor :user_labels
|
993
|
+
|
994
|
+
# Use validate only mode for this recommendation query. If set to true, a fake
|
995
|
+
# model will be used that returns arbitrary Document IDs. Note that the validate
|
996
|
+
# only mode should only be used for testing the API, or if the model is not
|
997
|
+
# ready.
|
998
|
+
# Corresponds to the JSON property `validateOnly`
|
999
|
+
# @return [Boolean]
|
1000
|
+
attr_accessor :validate_only
|
1001
|
+
alias_method :validate_only?, :validate_only
|
1002
|
+
|
1003
|
+
def initialize(**args)
|
1004
|
+
update!(**args)
|
1005
|
+
end
|
1006
|
+
|
1007
|
+
# Update properties of this object
|
1008
|
+
def update!(**args)
|
1009
|
+
@filter = args[:filter] if args.key?(:filter)
|
1010
|
+
@page_size = args[:page_size] if args.key?(:page_size)
|
1011
|
+
@params = args[:params] if args.key?(:params)
|
1012
|
+
@user_event = args[:user_event] if args.key?(:user_event)
|
1013
|
+
@user_labels = args[:user_labels] if args.key?(:user_labels)
|
1014
|
+
@validate_only = args[:validate_only] if args.key?(:validate_only)
|
1015
|
+
end
|
1016
|
+
end
|
1017
|
+
|
1018
|
+
# Response message for Recommend method.
|
1019
|
+
class GoogleCloudDiscoveryengineV1betaRecommendResponse
|
1020
|
+
include Google::Apis::Core::Hashable
|
1021
|
+
|
1022
|
+
# A unique attribution token. This should be included in the UserEvent logs
|
1023
|
+
# resulting from this recommendation, which enables accurate attribution of
|
1024
|
+
# recommendation model performance.
|
1025
|
+
# Corresponds to the JSON property `attributionToken`
|
1026
|
+
# @return [String]
|
1027
|
+
attr_accessor :attribution_token
|
1028
|
+
|
1029
|
+
# IDs of documents in the request that were missing from the default Branch
|
1030
|
+
# associated with the requested ServingConfig.
|
1031
|
+
# Corresponds to the JSON property `missingIds`
|
1032
|
+
# @return [Array<String>]
|
1033
|
+
attr_accessor :missing_ids
|
1034
|
+
|
1035
|
+
# A list of recommended Documents. The order represents the ranking (from the
|
1036
|
+
# most relevant Document to the least).
|
1037
|
+
# Corresponds to the JSON property `results`
|
1038
|
+
# @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult>]
|
1039
|
+
attr_accessor :results
|
1040
|
+
|
1041
|
+
# True if RecommendRequest.validate_only was set.
|
1042
|
+
# Corresponds to the JSON property `validateOnly`
|
1043
|
+
# @return [Boolean]
|
1044
|
+
attr_accessor :validate_only
|
1045
|
+
alias_method :validate_only?, :validate_only
|
1046
|
+
|
1047
|
+
def initialize(**args)
|
1048
|
+
update!(**args)
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
# Update properties of this object
|
1052
|
+
def update!(**args)
|
1053
|
+
@attribution_token = args[:attribution_token] if args.key?(:attribution_token)
|
1054
|
+
@missing_ids = args[:missing_ids] if args.key?(:missing_ids)
|
1055
|
+
@results = args[:results] if args.key?(:results)
|
1056
|
+
@validate_only = args[:validate_only] if args.key?(:validate_only)
|
1057
|
+
end
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
# RecommendationResult represents a generic recommendation result with
|
1061
|
+
# associated metadata.
|
1062
|
+
class GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult
|
1063
|
+
include Google::Apis::Core::Hashable
|
1064
|
+
|
1065
|
+
# Document captures all raw metadata information of items to be recommended or
|
1066
|
+
# searched.
|
1067
|
+
# Corresponds to the JSON property `document`
|
1068
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaDocument]
|
1069
|
+
attr_accessor :document
|
1070
|
+
|
1071
|
+
# Resource ID of the recommended Document.
|
1072
|
+
# Corresponds to the JSON property `id`
|
1073
|
+
# @return [String]
|
1074
|
+
attr_accessor :id
|
1075
|
+
|
1076
|
+
# Additional Document metadata / annotations. Possible values: * `score`:
|
1077
|
+
# Recommendation score in double value. Is set if `returnScore` is set to true
|
1078
|
+
# in RecommendRequest.params.
|
1079
|
+
# Corresponds to the JSON property `metadata`
|
1080
|
+
# @return [Hash<String,Object>]
|
1081
|
+
attr_accessor :metadata
|
1082
|
+
|
1083
|
+
def initialize(**args)
|
1084
|
+
update!(**args)
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
# Update properties of this object
|
1088
|
+
def update!(**args)
|
1089
|
+
@document = args[:document] if args.key?(:document)
|
1090
|
+
@id = args[:id] if args.key?(:id)
|
1091
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1092
|
+
end
|
1093
|
+
end
|
1094
|
+
|
1095
|
+
# Detailed search information.
|
1096
|
+
class GoogleCloudDiscoveryengineV1betaSearchInfo
|
1097
|
+
include Google::Apis::Core::Hashable
|
1098
|
+
|
1099
|
+
# An integer that specifies the current offset for pagination (the 0-indexed
|
1100
|
+
# starting location, amongst the products deemed by the API as relevant). See
|
1101
|
+
# SearchRequest.offset for definition. If this field is negative, an
|
1102
|
+
# INVALID_ARGUMENT is returned. This can only be set for `search` events. Other
|
1103
|
+
# event types should not set this field. Otherwise, an INVALID_ARGUMENT error is
|
1104
|
+
# returned.
|
1105
|
+
# Corresponds to the JSON property `offset`
|
1106
|
+
# @return [Fixnum]
|
1107
|
+
attr_accessor :offset
|
1108
|
+
|
1109
|
+
# The order in which products are returned, if applicable. See SearchRequest.
|
1110
|
+
# order_by for definition and syntax. The value must be a UTF-8 encoded string
|
1111
|
+
# with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error
|
1112
|
+
# is returned. This can only be set for `search` events. Other event types
|
1113
|
+
# should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
1114
|
+
# Corresponds to the JSON property `orderBy`
|
1115
|
+
# @return [String]
|
1116
|
+
attr_accessor :order_by
|
1117
|
+
|
1118
|
+
# The user's search query. See SearchRequest.query for definition. The value
|
1119
|
+
# must be a UTF-8 encoded string with a length limit of 5,000 characters.
|
1120
|
+
# Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query
|
1121
|
+
# or page_categories is required for `search` events. Other event types should
|
1122
|
+
# not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
1123
|
+
# Corresponds to the JSON property `searchQuery`
|
1124
|
+
# @return [String]
|
1125
|
+
attr_accessor :search_query
|
1126
|
+
|
1127
|
+
def initialize(**args)
|
1128
|
+
update!(**args)
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
# Update properties of this object
|
1132
|
+
def update!(**args)
|
1133
|
+
@offset = args[:offset] if args.key?(:offset)
|
1134
|
+
@order_by = args[:order_by] if args.key?(:order_by)
|
1135
|
+
@search_query = args[:search_query] if args.key?(:search_query)
|
1136
|
+
end
|
1137
|
+
end
|
1138
|
+
|
1139
|
+
# A transaction represents the entire purchase transaction.
|
1140
|
+
class GoogleCloudDiscoveryengineV1betaTransactionInfo
|
1141
|
+
include Google::Apis::Core::Hashable
|
1142
|
+
|
1143
|
+
# All the costs associated with the products. These can be manufacturing costs,
|
1144
|
+
# shipping expenses not borne by the end user, or any other costs, such that: *
|
1145
|
+
# Profit = value - tax - cost
|
1146
|
+
# Corresponds to the JSON property `cost`
|
1147
|
+
# @return [Float]
|
1148
|
+
attr_accessor :cost
|
1149
|
+
|
1150
|
+
# Required. Currency code. Use three-character ISO-4217 code.
|
1151
|
+
# Corresponds to the JSON property `currency`
|
1152
|
+
# @return [String]
|
1153
|
+
attr_accessor :currency
|
1154
|
+
|
1155
|
+
# The total discount(s) value applied to this transaction. This figure should be
|
1156
|
+
# excluded from TransactionInfo.value For example, if a user paid
|
1157
|
+
# TransactionInfo.value amount, then nominal (pre-discount) value of the
|
1158
|
+
# transaction is the sum of TransactionInfo.value and TransactionInfo.
|
1159
|
+
# discount_value This means that profit is calculated the same way, regardless
|
1160
|
+
# of the discount value, and that TransactionInfo.discount_value can be larger
|
1161
|
+
# than TransactionInfo.value: * Profit = value - tax - cost
|
1162
|
+
# Corresponds to the JSON property `discountValue`
|
1163
|
+
# @return [Float]
|
1164
|
+
attr_accessor :discount_value
|
1165
|
+
|
1166
|
+
# All the taxes associated with the transaction.
|
1167
|
+
# Corresponds to the JSON property `tax`
|
1168
|
+
# @return [Float]
|
1169
|
+
attr_accessor :tax
|
1170
|
+
|
1171
|
+
# The transaction ID with a length limit of 128 characters.
|
1172
|
+
# Corresponds to the JSON property `transactionId`
|
1173
|
+
# @return [String]
|
1174
|
+
attr_accessor :transaction_id
|
1175
|
+
|
1176
|
+
# Required. Total non-zero value associated with the transaction. This value may
|
1177
|
+
# include shipping, tax, or other adjustments to the total value that you want
|
1178
|
+
# to include.
|
1179
|
+
# Corresponds to the JSON property `value`
|
1180
|
+
# @return [Float]
|
1181
|
+
attr_accessor :value
|
1182
|
+
|
1183
|
+
def initialize(**args)
|
1184
|
+
update!(**args)
|
1185
|
+
end
|
1186
|
+
|
1187
|
+
# Update properties of this object
|
1188
|
+
def update!(**args)
|
1189
|
+
@cost = args[:cost] if args.key?(:cost)
|
1190
|
+
@currency = args[:currency] if args.key?(:currency)
|
1191
|
+
@discount_value = args[:discount_value] if args.key?(:discount_value)
|
1192
|
+
@tax = args[:tax] if args.key?(:tax)
|
1193
|
+
@transaction_id = args[:transaction_id] if args.key?(:transaction_id)
|
1194
|
+
@value = args[:value] if args.key?(:value)
|
1195
|
+
end
|
1196
|
+
end
|
1197
|
+
|
1198
|
+
# UserEvent captures all metadata information DiscoveryEngine API needs to know
|
1199
|
+
# about how end users interact with customers' website.
|
1200
|
+
class GoogleCloudDiscoveryengineV1betaUserEvent
|
1201
|
+
include Google::Apis::Core::Hashable
|
1202
|
+
|
1203
|
+
# Extra user event features to include in the recommendation model. These
|
1204
|
+
# attributes must NOT contain data that needs to be parsed or processed further,
|
1205
|
+
# e.g. JSON or other encodings. If you provide custom attributes for ingested
|
1206
|
+
# user events, also include them in the user events that you associate with
|
1207
|
+
# prediction requests. Custom attribute formatting must be consistent between
|
1208
|
+
# imported events and events provided with prediction requests. This lets the
|
1209
|
+
# DiscoveryEngine API use those custom attributes when training models and
|
1210
|
+
# serving predictions, which helps improve recommendation quality. This field
|
1211
|
+
# needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is
|
1212
|
+
# returned: * The key must be a UTF-8 encoded string with a length limit of 5,
|
1213
|
+
# 000 characters. * For text attributes, at most 400 values are allowed. Empty
|
1214
|
+
# values are not allowed. Each value must be a UTF-8 encoded string with a
|
1215
|
+
# length limit of 256 characters. * For number attributes, at most 400 values
|
1216
|
+
# are allowed. For product recommendations, an example of extra user information
|
1217
|
+
# is traffic_channel, which is how a user arrives at the site. Users can arrive
|
1218
|
+
# at the site by coming to the site directly, coming through Google search, or
|
1219
|
+
# in other ways.
|
1220
|
+
# Corresponds to the JSON property `attributes`
|
1221
|
+
# @return [Hash<String,Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaCustomAttribute>]
|
1222
|
+
attr_accessor :attributes
|
1223
|
+
|
1224
|
+
# Token to attribute an API response to user action(s) to trigger the event.
|
1225
|
+
# Highly recommended for user events that are the result of PredictionService.
|
1226
|
+
# Predict. This field enables accurate attribution of recommendation model
|
1227
|
+
# performance. The value must be one of: * PredictResponse.attribution_token for
|
1228
|
+
# events that are the result of PredictionService.Predict. * SearchResponse.
|
1229
|
+
# attribution_token for events that are the result of SearchService.Search. *
|
1230
|
+
# CompleteQueryResponse.attribution_token for events that are the result of
|
1231
|
+
# SearchService.CompleteQuery. This token enables us to accurately attribute
|
1232
|
+
# page view or conversion completion back to the event and the particular
|
1233
|
+
# predict response containing this clicked/purchased product. If user clicks on
|
1234
|
+
# product K in the recommendation results, pass PredictResponse.
|
1235
|
+
# attribution_token as a URL parameter to product K's page. When recording
|
1236
|
+
# events on product K's page, log the PredictResponse.attribution_token to this
|
1237
|
+
# field.
|
1238
|
+
# Corresponds to the JSON property `attributionToken`
|
1239
|
+
# @return [String]
|
1240
|
+
attr_accessor :attribution_token
|
1241
|
+
|
1242
|
+
# Detailed completion information including completion attribution token and
|
1243
|
+
# clicked completion info.
|
1244
|
+
# Corresponds to the JSON property `completionInfo`
|
1245
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaCompletionInfo]
|
1246
|
+
attr_accessor :completion_info
|
1247
|
+
|
1248
|
+
# Should set to true if the request is made directly from the end user, in which
|
1249
|
+
# case the UserEvent.user_info.user_agent can be populated from the HTTP request.
|
1250
|
+
# This flag should be set only if the API request is made directly from the end
|
1251
|
+
# user such as a mobile app (and not if a gateway or a server is processing and
|
1252
|
+
# pushing the user events). This should not be set when using the JavaScript tag
|
1253
|
+
# in UserEventService.CollectUserEvent.
|
1254
|
+
# Corresponds to the JSON property `directUserRequest`
|
1255
|
+
# @return [Boolean]
|
1256
|
+
attr_accessor :direct_user_request
|
1257
|
+
alias_method :direct_user_request?, :direct_user_request
|
1258
|
+
|
1259
|
+
# List of Documents associated with this user event. This field is optional
|
1260
|
+
# except for the following event types: * `view-item` * `add-to-cart` * `
|
1261
|
+
# purchase` * `media-play` * `media-complete` In a `search` event, this field
|
1262
|
+
# represents the documents returned to the end user on the current page (the end
|
1263
|
+
# user may have not finished browsing the whole page yet). When a new page is
|
1264
|
+
# returned to the end user, after pagination/filtering/ordering even for the
|
1265
|
+
# same query, a new `search` event with different UserEvent.documents is desired.
|
1266
|
+
# Corresponds to the JSON property `documents`
|
1267
|
+
# @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaDocumentInfo>]
|
1268
|
+
attr_accessor :documents
|
1269
|
+
|
1270
|
+
# Only required for UserEventService.ImportUserEvents method. Timestamp of when
|
1271
|
+
# the user event happened.
|
1272
|
+
# Corresponds to the JSON property `eventTime`
|
1273
|
+
# @return [String]
|
1274
|
+
attr_accessor :event_time
|
1275
|
+
|
1276
|
+
# Required. User event type. Allowed values are: Generic values: * `search`:
|
1277
|
+
# Search for Documents. * `view-item`: Detailed page view of a Document. * `view-
|
1278
|
+
# item-list`: View of a panel or ordered list of Documents. * `view-home-page`:
|
1279
|
+
# View of the home page. * `view-category-page`: View of a category page, e.g.
|
1280
|
+
# Home > Men > Jeans Retail-related values: * `add-to-cart`: Add an item(s) to
|
1281
|
+
# cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-
|
1282
|
+
# related values: * `media-play`: Start/resume watching a video, playing a song,
|
1283
|
+
# etc. * `media-complete`: Finished or stopped midway through a video, song, etc.
|
1284
|
+
# Corresponds to the JSON property `eventType`
|
1285
|
+
# @return [String]
|
1286
|
+
attr_accessor :event_type
|
1287
|
+
|
1288
|
+
# The filter syntax consists of an expression language for constructing a
|
1289
|
+
# predicate from one or more fields of the documents being filtered. One example
|
1290
|
+
# is for `search` events, the associated SearchService.SearchRequest may contain
|
1291
|
+
# a filter expression in SearchService.SearchRequest.filter conforming to https:/
|
1292
|
+
# /google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are
|
1293
|
+
# generated from a PredictionService.PredictRequest, this field may be populated
|
1294
|
+
# directly from PredictionService.PredictRequest.filter conforming to https://
|
1295
|
+
# google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a
|
1296
|
+
# length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is
|
1297
|
+
# returned.
|
1298
|
+
# Corresponds to the JSON property `filter`
|
1299
|
+
# @return [String]
|
1300
|
+
attr_accessor :filter
|
1301
|
+
|
1302
|
+
# Media-specific user event information.
|
1303
|
+
# Corresponds to the JSON property `mediaInfo`
|
1304
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaMediaInfo]
|
1305
|
+
attr_accessor :media_info
|
1306
|
+
|
1307
|
+
# Detailed page information.
|
1308
|
+
# Corresponds to the JSON property `pageInfo`
|
1309
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaPageInfo]
|
1310
|
+
attr_accessor :page_info
|
1311
|
+
|
1312
|
+
# Detailed panel information associated with a user event.
|
1313
|
+
# Corresponds to the JSON property `panel`
|
1314
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaPanelInfo]
|
1315
|
+
attr_accessor :panel
|
1316
|
+
|
1317
|
+
# The promotion IDs if this is an event associated with promotions. Currently,
|
1318
|
+
# this field is restricted to at most one ID.
|
1319
|
+
# Corresponds to the JSON property `promotionIds`
|
1320
|
+
# @return [Array<String>]
|
1321
|
+
attr_accessor :promotion_ids
|
1322
|
+
|
1323
|
+
# Detailed search information.
|
1324
|
+
# Corresponds to the JSON property `searchInfo`
|
1325
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaSearchInfo]
|
1326
|
+
attr_accessor :search_info
|
1327
|
+
|
1328
|
+
# A unique identifier for tracking a visitor session with a length limit of 128
|
1329
|
+
# bytes. A session is an aggregation of an end user behavior in a time span. A
|
1330
|
+
# general guideline to populate the sesion_id: 1. If user has no activity for 30
|
1331
|
+
# min, a new session_id should be assigned. 2. The session_id should be unique
|
1332
|
+
# across users, suggest use uuid or add UserEvent.user_pseudo_id as prefix.
|
1333
|
+
# Corresponds to the JSON property `sessionId`
|
1334
|
+
# @return [String]
|
1335
|
+
attr_accessor :session_id
|
1336
|
+
|
1337
|
+
# A list of identifiers for the independent experiment groups this user event
|
1338
|
+
# belongs to. This is used to distinguish between user events associated with
|
1339
|
+
# different experiment setups on the customer end.
|
1340
|
+
# Corresponds to the JSON property `tagIds`
|
1341
|
+
# @return [Array<String>]
|
1342
|
+
attr_accessor :tag_ids
|
1343
|
+
|
1344
|
+
# A transaction represents the entire purchase transaction.
|
1345
|
+
# Corresponds to the JSON property `transactionInfo`
|
1346
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaTransactionInfo]
|
1347
|
+
attr_accessor :transaction_info
|
1348
|
+
|
1349
|
+
# Information of an end user.
|
1350
|
+
# Corresponds to the JSON property `userInfo`
|
1351
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaUserInfo]
|
1352
|
+
attr_accessor :user_info
|
1353
|
+
|
1354
|
+
# Required. A unique identifier for tracking visitors. For example, this could
|
1355
|
+
# be implemented with an HTTP cookie, which should be able to uniquely identify
|
1356
|
+
# a visitor on a single device. This unique identifier should not change if the
|
1357
|
+
# visitor log in/out of the website. Do not set the field to the same fixed ID
|
1358
|
+
# for different users. This mixes the event history of those users together,
|
1359
|
+
# which results in degraded model quality. The field must be a UTF-8 encoded
|
1360
|
+
# string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT
|
1361
|
+
# error is returned. The field should not contain PII or user-data. We recommend
|
1362
|
+
# to use Google Analytics [Client ID](https://developers.google.com/analytics/
|
1363
|
+
# devguides/collection/analyticsjs/field-reference#clientId) for this field.
|
1364
|
+
# Corresponds to the JSON property `userPseudoId`
|
1365
|
+
# @return [String]
|
1366
|
+
attr_accessor :user_pseudo_id
|
1367
|
+
|
1368
|
+
def initialize(**args)
|
1369
|
+
update!(**args)
|
1370
|
+
end
|
1371
|
+
|
1372
|
+
# Update properties of this object
|
1373
|
+
def update!(**args)
|
1374
|
+
@attributes = args[:attributes] if args.key?(:attributes)
|
1375
|
+
@attribution_token = args[:attribution_token] if args.key?(:attribution_token)
|
1376
|
+
@completion_info = args[:completion_info] if args.key?(:completion_info)
|
1377
|
+
@direct_user_request = args[:direct_user_request] if args.key?(:direct_user_request)
|
1378
|
+
@documents = args[:documents] if args.key?(:documents)
|
1379
|
+
@event_time = args[:event_time] if args.key?(:event_time)
|
1380
|
+
@event_type = args[:event_type] if args.key?(:event_type)
|
1381
|
+
@filter = args[:filter] if args.key?(:filter)
|
1382
|
+
@media_info = args[:media_info] if args.key?(:media_info)
|
1383
|
+
@page_info = args[:page_info] if args.key?(:page_info)
|
1384
|
+
@panel = args[:panel] if args.key?(:panel)
|
1385
|
+
@promotion_ids = args[:promotion_ids] if args.key?(:promotion_ids)
|
1386
|
+
@search_info = args[:search_info] if args.key?(:search_info)
|
1387
|
+
@session_id = args[:session_id] if args.key?(:session_id)
|
1388
|
+
@tag_ids = args[:tag_ids] if args.key?(:tag_ids)
|
1389
|
+
@transaction_info = args[:transaction_info] if args.key?(:transaction_info)
|
1390
|
+
@user_info = args[:user_info] if args.key?(:user_info)
|
1391
|
+
@user_pseudo_id = args[:user_pseudo_id] if args.key?(:user_pseudo_id)
|
1392
|
+
end
|
1393
|
+
end
|
1394
|
+
|
1395
|
+
# Information of an end user.
|
1396
|
+
class GoogleCloudDiscoveryengineV1betaUserInfo
|
1397
|
+
include Google::Apis::Core::Hashable
|
1398
|
+
|
1399
|
+
# User agent as included in the HTTP header. Required for getting SearchResponse.
|
1400
|
+
# sponsored_results. The field must be a UTF-8 encoded string with a length
|
1401
|
+
# limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
1402
|
+
# This should not be set when using the client side event reporting with GTM or
|
1403
|
+
# JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request
|
1404
|
+
# is set.
|
1405
|
+
# Corresponds to the JSON property `userAgent`
|
1406
|
+
# @return [String]
|
1407
|
+
attr_accessor :user_agent
|
1408
|
+
|
1409
|
+
# Highly recommended for logged-in users. Unique identifier for logged-in user,
|
1410
|
+
# such as a user name. Don't set for anonymous users. Always use a hashed value
|
1411
|
+
# for this ID. Don't set the field to the same fixed ID for different users.
|
1412
|
+
# This mixes the event history of those users together, which results in
|
1413
|
+
# degraded model quality. The field must be a UTF-8 encoded string with a length
|
1414
|
+
# limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
1415
|
+
# Corresponds to the JSON property `userId`
|
1416
|
+
# @return [String]
|
1417
|
+
attr_accessor :user_id
|
1418
|
+
|
1419
|
+
def initialize(**args)
|
1420
|
+
update!(**args)
|
1421
|
+
end
|
1422
|
+
|
1423
|
+
# Update properties of this object
|
1424
|
+
def update!(**args)
|
1425
|
+
@user_agent = args[:user_agent] if args.key?(:user_agent)
|
1426
|
+
@user_id = args[:user_id] if args.key?(:user_id)
|
1427
|
+
end
|
1428
|
+
end
|
1429
|
+
|
1430
|
+
# The response message for Operations.ListOperations.
|
1431
|
+
class GoogleLongrunningListOperationsResponse
|
1432
|
+
include Google::Apis::Core::Hashable
|
1433
|
+
|
1434
|
+
# The standard List next-page token.
|
1435
|
+
# Corresponds to the JSON property `nextPageToken`
|
1436
|
+
# @return [String]
|
1437
|
+
attr_accessor :next_page_token
|
1438
|
+
|
1439
|
+
# A list of operations that matches the specified filter in the request.
|
1440
|
+
# Corresponds to the JSON property `operations`
|
1441
|
+
# @return [Array<Google::Apis::DiscoveryengineV1beta::GoogleLongrunningOperation>]
|
1442
|
+
attr_accessor :operations
|
1443
|
+
|
1444
|
+
def initialize(**args)
|
1445
|
+
update!(**args)
|
1446
|
+
end
|
1447
|
+
|
1448
|
+
# Update properties of this object
|
1449
|
+
def update!(**args)
|
1450
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1451
|
+
@operations = args[:operations] if args.key?(:operations)
|
1452
|
+
end
|
1453
|
+
end
|
1454
|
+
|
1455
|
+
# This resource represents a long-running operation that is the result of a
|
1456
|
+
# network API call.
|
1457
|
+
class GoogleLongrunningOperation
|
1458
|
+
include Google::Apis::Core::Hashable
|
1459
|
+
|
1460
|
+
# If the value is `false`, it means the operation is still in progress. If `true`
|
1461
|
+
# , the operation is completed, and either `error` or `response` is available.
|
1462
|
+
# Corresponds to the JSON property `done`
|
1463
|
+
# @return [Boolean]
|
1464
|
+
attr_accessor :done
|
1465
|
+
alias_method :done?, :done
|
1466
|
+
|
1467
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1468
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1469
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1470
|
+
# data: error code, error message, and error details. You can find out more
|
1471
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1472
|
+
# //cloud.google.com/apis/design/errors).
|
1473
|
+
# Corresponds to the JSON property `error`
|
1474
|
+
# @return [Google::Apis::DiscoveryengineV1beta::GoogleRpcStatus]
|
1475
|
+
attr_accessor :error
|
1476
|
+
|
1477
|
+
# Service-specific metadata associated with the operation. It typically contains
|
1478
|
+
# progress information and common metadata such as create time. Some services
|
1479
|
+
# might not provide such metadata. Any method that returns a long-running
|
1480
|
+
# operation should document the metadata type, if any.
|
1481
|
+
# Corresponds to the JSON property `metadata`
|
1482
|
+
# @return [Hash<String,Object>]
|
1483
|
+
attr_accessor :metadata
|
1484
|
+
|
1485
|
+
# The server-assigned name, which is only unique within the same service that
|
1486
|
+
# originally returns it. If you use the default HTTP mapping, the `name` should
|
1487
|
+
# be a resource name ending with `operations/`unique_id``.
|
1488
|
+
# Corresponds to the JSON property `name`
|
1489
|
+
# @return [String]
|
1490
|
+
attr_accessor :name
|
1491
|
+
|
1492
|
+
# The normal response of the operation in case of success. If the original
|
1493
|
+
# method returns no data on success, such as `Delete`, the response is `google.
|
1494
|
+
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
|
1495
|
+
# the response should be the resource. For other methods, the response should
|
1496
|
+
# have the type `XxxResponse`, where `Xxx` is the original method name. For
|
1497
|
+
# example, if the original method name is `TakeSnapshot()`, the inferred
|
1498
|
+
# response type is `TakeSnapshotResponse`.
|
1499
|
+
# Corresponds to the JSON property `response`
|
1500
|
+
# @return [Hash<String,Object>]
|
1501
|
+
attr_accessor :response
|
1502
|
+
|
1503
|
+
def initialize(**args)
|
1504
|
+
update!(**args)
|
1505
|
+
end
|
1506
|
+
|
1507
|
+
# Update properties of this object
|
1508
|
+
def update!(**args)
|
1509
|
+
@done = args[:done] if args.key?(:done)
|
1510
|
+
@error = args[:error] if args.key?(:error)
|
1511
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
1512
|
+
@name = args[:name] if args.key?(:name)
|
1513
|
+
@response = args[:response] if args.key?(:response)
|
1514
|
+
end
|
1515
|
+
end
|
1516
|
+
|
1517
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
1518
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
1519
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
1520
|
+
# protobuf.Empty) returns (google.protobuf.Empty); `
|
1521
|
+
class GoogleProtobufEmpty
|
1522
|
+
include Google::Apis::Core::Hashable
|
1523
|
+
|
1524
|
+
def initialize(**args)
|
1525
|
+
update!(**args)
|
1526
|
+
end
|
1527
|
+
|
1528
|
+
# Update properties of this object
|
1529
|
+
def update!(**args)
|
1530
|
+
end
|
1531
|
+
end
|
1532
|
+
|
1533
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1534
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
1535
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
1536
|
+
# data: error code, error message, and error details. You can find out more
|
1537
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
1538
|
+
# //cloud.google.com/apis/design/errors).
|
1539
|
+
class GoogleRpcStatus
|
1540
|
+
include Google::Apis::Core::Hashable
|
1541
|
+
|
1542
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
1543
|
+
# Corresponds to the JSON property `code`
|
1544
|
+
# @return [Fixnum]
|
1545
|
+
attr_accessor :code
|
1546
|
+
|
1547
|
+
# A list of messages that carry the error details. There is a common set of
|
1548
|
+
# message types for APIs to use.
|
1549
|
+
# Corresponds to the JSON property `details`
|
1550
|
+
# @return [Array<Hash<String,Object>>]
|
1551
|
+
attr_accessor :details
|
1552
|
+
|
1553
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
1554
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
1555
|
+
# field, or localized by the client.
|
1556
|
+
# Corresponds to the JSON property `message`
|
1557
|
+
# @return [String]
|
1558
|
+
attr_accessor :message
|
1559
|
+
|
1560
|
+
def initialize(**args)
|
1561
|
+
update!(**args)
|
1562
|
+
end
|
1563
|
+
|
1564
|
+
# Update properties of this object
|
1565
|
+
def update!(**args)
|
1566
|
+
@code = args[:code] if args.key?(:code)
|
1567
|
+
@details = args[:details] if args.key?(:details)
|
1568
|
+
@message = args[:message] if args.key?(:message)
|
1569
|
+
end
|
1570
|
+
end
|
1571
|
+
|
1572
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
1573
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
1574
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
1575
|
+
# following: * A full date, with non-zero year, month, and day values. * A month
|
1576
|
+
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
1577
|
+
# with a zero month and a zero day. * A year and month, with a zero day (for
|
1578
|
+
# example, a credit card expiration date). Related types: * google.type.
|
1579
|
+
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
1580
|
+
class GoogleTypeDate
|
1581
|
+
include Google::Apis::Core::Hashable
|
1582
|
+
|
1583
|
+
# Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
|
1584
|
+
# specify a year by itself or a year and month where the day isn't significant.
|
1585
|
+
# Corresponds to the JSON property `day`
|
1586
|
+
# @return [Fixnum]
|
1587
|
+
attr_accessor :day
|
1588
|
+
|
1589
|
+
# Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
|
1590
|
+
# and day.
|
1591
|
+
# Corresponds to the JSON property `month`
|
1592
|
+
# @return [Fixnum]
|
1593
|
+
attr_accessor :month
|
1594
|
+
|
1595
|
+
# Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
|
1596
|
+
# year.
|
1597
|
+
# Corresponds to the JSON property `year`
|
1598
|
+
# @return [Fixnum]
|
1599
|
+
attr_accessor :year
|
1600
|
+
|
1601
|
+
def initialize(**args)
|
1602
|
+
update!(**args)
|
1603
|
+
end
|
1604
|
+
|
1605
|
+
# Update properties of this object
|
1606
|
+
def update!(**args)
|
1607
|
+
@day = args[:day] if args.key?(:day)
|
1608
|
+
@month = args[:month] if args.key?(:month)
|
1609
|
+
@year = args[:year] if args.key?(:year)
|
1610
|
+
end
|
1611
|
+
end
|
1612
|
+
end
|
1613
|
+
end
|
1614
|
+
end
|