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