@google-cloud/discoveryengine 0.8.0 → 1.0.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +6 -0
  3. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +1 -2
  4. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +13 -2
  5. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +131 -0
  6. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +281 -0
  7. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +2 -4
  8. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +2 -1
  9. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +17 -17
  10. package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +163 -63
  12. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +41 -36
  13. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +2 -2
  14. package/build/protos/protos.d.ts +6587 -4645
  15. package/build/protos/protos.js +16668 -12007
  16. package/build/protos/protos.json +1799 -1285
  17. package/build/src/v1/completion_service_client.d.ts +6 -7
  18. package/build/src/v1/document_service_client.d.ts +83 -94
  19. package/build/src/v1/document_service_client.js +18 -22
  20. package/build/src/v1/schema_service_client.d.ts +39 -49
  21. package/build/src/v1/schema_service_client.js +17 -22
  22. package/build/src/v1/search_service_client.d.ts +31 -34
  23. package/build/src/v1/search_service_client.js +21 -23
  24. package/build/src/v1/user_event_service_client.d.ts +6 -10
  25. package/build/src/v1/user_event_service_client.js +1 -2
  26. package/build/src/v1beta/completion_service_client.d.ts +104 -8
  27. package/build/src/v1beta/completion_service_client.js +128 -0
  28. package/build/src/v1beta/conversational_search_service_client.d.ts +876 -0
  29. package/build/src/v1beta/conversational_search_service_client.js +1149 -0
  30. package/build/src/v1beta/conversational_search_service_client_config.json +68 -0
  31. package/build/src/v1beta/document_service_client.d.ts +182 -97
  32. package/build/src/v1beta/document_service_client.js +166 -22
  33. package/build/src/v1beta/index.d.ts +1 -0
  34. package/build/src/v1beta/index.js +3 -1
  35. package/build/src/v1beta/recommendation_service_client.d.ts +103 -11
  36. package/build/src/v1beta/recommendation_service_client.js +128 -0
  37. package/build/src/v1beta/schema_service_client.d.ts +132 -49
  38. package/build/src/v1beta/schema_service_client.js +163 -22
  39. package/build/src/v1beta/search_service_client.d.ts +163 -67
  40. package/build/src/v1beta/search_service_client.js +175 -45
  41. package/build/src/v1beta/user_event_service_client.d.ts +101 -12
  42. package/build/src/v1beta/user_event_service_client.js +147 -2
  43. package/package.json +8 -11
@@ -56,6 +56,15 @@ service SearchService {
56
56
  // [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
57
57
  // method.
58
58
  message SearchRequest {
59
+ // Specifies the image query input.
60
+ message ImageQuery {
61
+ oneof image {
62
+ // Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
63
+ // BMP.
64
+ string image_bytes = 1;
65
+ }
66
+ }
67
+
59
68
  // A facet specification to perform faceted search.
60
69
  message FacetSpec {
61
70
  // Specifies how a facet is computed.
@@ -65,7 +74,7 @@ message SearchRequest {
65
74
  // which the facet values are computed. Facet key is case-sensitive.
66
75
  string key = 1 [(google.api.field_behavior) = REQUIRED];
67
76
 
68
- // Set only if values should be bucketized into intervals. Must be set
77
+ // Set only if values should be bucketed into intervals. Must be set
69
78
  // for facets with numerical values. Must not be set for facet with text
70
79
  // values. Maximum number of intervals is 30.
71
80
  repeated Interval intervals = 2;
@@ -73,22 +82,22 @@ message SearchRequest {
73
82
  // Only get facet for the given restricted values. Only supported on
74
83
  // textual fields. For example, suppose "category" has three values
75
84
  // "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
76
- // "restricted_values" to "Action > 2022", the "category" facet will only
77
- // contain "Action > 2022". Only supported on textual fields. Maximum
85
+ // "restricted_values" to "Action > 2022", the "category" facet only
86
+ // contains "Action > 2022". Only supported on textual fields. Maximum
78
87
  // is 10.
79
88
  repeated string restricted_values = 3;
80
89
 
81
90
  // Only get facet values that start with the given string prefix. For
82
91
  // example, suppose "category" has three values "Action > 2022",
83
92
  // "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
84
- // "category" facet will only contain "Action > 2022" and "Action > 2021".
93
+ // "category" facet only contains "Action > 2022" and "Action > 2021".
85
94
  // Only supported on textual fields. Maximum is 10.
86
95
  repeated string prefixes = 4;
87
96
 
88
97
  // Only get facet values that contains the given strings. For example,
89
98
  // suppose "category" has three values "Action > 2022",
90
99
  // "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
91
- // "category" facet will only contain "Action > 2022" and "Sci-Fi > 2022".
100
+ // "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
92
101
  // Only supported on textual fields. Maximum is 10.
93
102
  repeated string contains = 5;
94
103
 
@@ -121,7 +130,7 @@ message SearchRequest {
121
130
 
122
131
  // Maximum of facet values that should be returned for this facet. If
123
132
  // unspecified, defaults to 20. The maximum allowed value is 300. Values
124
- // above 300 will be coerced to 300.
133
+ // above 300 are coerced to 300.
125
134
  //
126
135
  // If this field is negative, an `INVALID_ARGUMENT` is returned.
127
136
  int32 limit = 2;
@@ -158,15 +167,15 @@ message SearchRequest {
158
167
 
159
168
  // Enables dynamic position for this facet. If set to true, the position of
160
169
  // this facet among all facets in the response is determined automatically.
161
- // It will be ordered together with dynamic facets if dynamic
162
- // facets is enabled. If set to false, the position of this facet in the
163
- // response will be the same as in the request, and it will be ranked before
170
+ // If dynamic facets are enabled, it is ordered together.
171
+ // If set to false, the position of this facet in the
172
+ // response is the same as in the request, and it is ranked before
164
173
  // the facets with dynamic position enable and all dynamic facets.
165
174
  //
166
175
  // For example, you may always want to have rating facet returned in
167
176
  // the response, but it's not necessarily to always display the rating facet
168
177
  // at the top. In that case, you can set enable_dynamic_position to true so
169
- // that the position of rating facet in response will be determined
178
+ // that the position of rating facet in response is determined
170
179
  // automatically.
171
180
  //
172
181
  // Another example, assuming you have the following facets in the request:
@@ -177,13 +186,13 @@ message SearchRequest {
177
186
  //
178
187
  // * "brands", enable_dynamic_position = false
179
188
  //
180
- // And also you have a dynamic facets enable, which will generate a facet
181
- // 'gender'. Then the final order of the facets in the response can be
189
+ // And also you have a dynamic facets enabled, which generates a facet
190
+ // `gender`. Then the final order of the facets in the response can be
182
191
  // ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
183
192
  // "rating") depends on how API orders "gender" and "rating" facets.
184
- // However, notice that "price" and "brands" will always be
185
- // ranked at 1st and 2nd position since their enable_dynamic_position are
186
- // false.
193
+ // However, notice that "price" and "brands" are always
194
+ // ranked at first and second position because their enable_dynamic_position
195
+ // is false.
187
196
  bool enable_dynamic_position = 4;
188
197
  }
189
198
 
@@ -281,72 +290,126 @@ message SearchRequest {
281
290
  Mode mode = 1;
282
291
  }
283
292
 
284
- // The specification that configs the desired behavior of the UCS content
285
- // search.
293
+ // A specification for configuring the behavior of content search.
286
294
  message ContentSearchSpec {
287
- // The specification that configs the snippet in the search results.
295
+ // A specification for configuring snippets in a search response.
288
296
  message SnippetSpec {
289
- // Max number of snippets returned in each search result.
290
- //
291
- // A snippet is an infomartive summary of a content with highlighting for
292
- // UI rendering.
293
- //
294
- // If the matching snippets is less than the max_snippet_count, return all
295
- // of the snippets; otherwise, return the max_snippet_count.
296
- //
297
- // At most 5 snippets will be returned for each SearchResult.
298
- int32 max_snippet_count = 1;
299
-
300
- // if true, only snippet reference is returned.
301
- bool reference_only = 2;
297
+ // [DEPRECATED] This field is deprecated. To control snippet return, use
298
+ // `return_snippet` field. For backwards compatibility, we will return
299
+ // snippet if max_snippet_count > 0.
300
+ int32 max_snippet_count = 1 [deprecated = true];
301
+
302
+ // [DEPRECATED] This field is deprecated and will have no affect on the
303
+ // snippet.
304
+ bool reference_only = 2 [deprecated = true];
305
+
306
+ // If `true`, then return snippet. If no snippet can be generated, we
307
+ // return "No snippet is available for this page." A `snippet_status` with
308
+ // `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
309
+ bool return_snippet = 3;
302
310
  }
303
311
 
304
- // The specification that configs the summary in the search response.
312
+ // A specification for configuring a summary returned in a search
313
+ // response.
305
314
  message SummarySpec {
306
- // The number of top results the summary should be generated from.
307
- // If the number of returned results is less than summary_result_count,
308
- // then the summary would be derived from all the results; otherwise, the
309
- // summary would be derived from the top results.
315
+ // The number of top results to generate the summary from. If the number
316
+ // of results returned is less than `summaryResultCount`, the summary is
317
+ // generated from all of the results.
310
318
  //
311
- // At most 5 results can be used for generating summary.
319
+ // At most five results can be used to generate a summary.
312
320
  int32 summary_result_count = 1;
321
+
322
+ // Specifies whether to include citations in the summary. The default
323
+ // value is `false`.
324
+ //
325
+ // When this field is set to `true`, summaries include in-line citation
326
+ // numbers.
327
+ //
328
+ // Example summary including citations:
329
+ //
330
+ // BigQuery is Google Cloud's fully managed and completely serverless
331
+ // enterprise data warehouse [1]. BigQuery supports all data types, works
332
+ // across clouds, and has built-in machine learning and business
333
+ // intelligence, all within a unified platform [2, 3].
334
+ //
335
+ // The citation numbers refer to the returned search results and are
336
+ // 1-indexed. For example, [1] means that the sentence is attributed to
337
+ // the first search result. [2, 3] means that the sentence is attributed
338
+ // to both the second and third search results.
339
+ bool include_citations = 2;
340
+
341
+ // Specifies whether to filter out adversarial queries. The default value
342
+ // is `false`.
343
+ //
344
+ // Google employs search-query classification to detect adversarial
345
+ // queries. No summary is returned if the search query is classified as an
346
+ // adversarial query. For example, a user might ask a question regarding
347
+ // negative comments about the company or submit a query designed to
348
+ // generate unsafe, policy-violating output. If this field is set to
349
+ // `true`, we skip generating summaries for adversarial queries and return
350
+ // fallback messages instead.
351
+ bool ignore_adversarial_query = 3;
352
+
353
+ // Specifies whether to filter out queries that are not summary-seeking.
354
+ // The default value is `false`.
355
+ //
356
+ // Google employs search-query classification to detect summary-seeking
357
+ // queries. No summary is returned if the search query is classified as a
358
+ // non-summary seeking query. For example, `why is the sky blue` and `Who
359
+ // is the best soccer player in the world?` are summary-seeking queries,
360
+ // but `SFO airport` and `world cup 2026` are not. They are most likely
361
+ // navigational queries. If this field is set to `true`, we skip
362
+ // generating summaries for non-summary seeking queries and return
363
+ // fallback messages instead.
364
+ bool ignore_non_summary_seeking_query = 4;
313
365
  }
314
366
 
315
- // The specification that configs the extractive content in search results.
367
+ // A specification for configuring the extractive content in a search
368
+ // response.
316
369
  message ExtractiveContentSpec {
317
- // The max number of extractive answers returned in each search result.
370
+ // The maximum number of extractive answers returned in each search
371
+ // result.
318
372
  //
319
373
  // An extractive answer is a verbatim answer extracted from the original
320
- // document, which provides precise and contextually relevant answer to
374
+ // document, which provides a precise and contextually relevant answer to
321
375
  // the search query.
322
376
  //
323
377
  // If the number of matching answers is less than the
324
- // extractive_answer_count, return all of the answers; otherwise, return
325
- // the extractive_answer_count.
378
+ // `max_extractive_answer_count`, return all of the answers. Otherwise,
379
+ // return the `max_extractive_answer_count`.
326
380
  //
327
- // At most 5 answers will be returned for each SearchResult.
381
+ // At most one answer is returned for each
382
+ // [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
328
383
  int32 max_extractive_answer_count = 1;
329
384
 
330
385
  // The max number of extractive segments returned in each search result.
386
+ // Only applied if the
387
+ // [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
388
+ // [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
389
+ // or
390
+ // [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
391
+ // is
392
+ // [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
331
393
  //
332
394
  // An extractive segment is a text segment extracted from the original
333
- // document which is relevant to the search query and in general more
334
- // verbose than an extrative answer. The segment could then be used as
395
+ // document that is relevant to the search query, and, in general, more
396
+ // verbose than an extractive answer. The segment could then be used as
335
397
  // input for LLMs to generate summaries and answers.
336
398
  //
337
- // If the number of matching segments is less than the
338
- // max_extractive_segment_count, return all of the segments; otherwise,
339
- // return the max_extractive_segment_count.
399
+ // If the number of matching segments is less than
400
+ // `max_extractive_segment_count`, return all of the segments. Otherwise,
401
+ // return the `max_extractive_segment_count`.
340
402
  //
341
- // Currently one segment will be returned for each SearchResult.
403
+ // Currently one segment is returned for each
404
+ // [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
342
405
  int32 max_extractive_segment_count = 2;
343
406
  }
344
407
 
345
- // If there is no snippet spec provided, there will be no snippet in the
346
- // search result.
408
+ // If `snippetSpec` is not specified, snippets are not included in the
409
+ // search response.
347
410
  SnippetSpec snippet_spec = 1;
348
411
 
349
- // If there is no summary spec provided, there will be no summary in the
412
+ // If `summarySpec` is not specified, summaries are not included in the
350
413
  // search response.
351
414
  SummarySpec summary_spec = 2;
352
415
 
@@ -378,9 +441,12 @@ message SearchRequest {
378
441
  // Raw search query.
379
442
  string query = 3;
380
443
 
444
+ // Raw image query.
445
+ ImageQuery image_query = 19;
446
+
381
447
  // Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
382
448
  // to return. If unspecified, defaults to a reasonable value. The maximum
383
- // allowed value is 100. Values above 100 will be coerced to 100.
449
+ // allowed value is 100. Values above 100 are coerced to 100.
384
450
  //
385
451
  // If this field is negative, an `INVALID_ARGUMENT` is returned.
386
452
  int32 page_size = 4;
@@ -412,17 +478,18 @@ message SearchRequest {
412
478
  // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
413
479
  string filter = 7;
414
480
 
415
- // The order in which documents are returned. Document can be ordered by
481
+ // The order in which documents are returned. Documents can be ordered by
416
482
  // a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
417
- // object. Leave it unset if ordered by relevance. OrderBy expression is
483
+ // object. Leave it unset if ordered by relevance. `order_by` expression is
418
484
  // case-sensitive.
419
485
  //
420
- // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
486
+ // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
421
487
  string order_by = 8;
422
488
 
423
489
  // Information about the end user.
424
- // Highly recommended for analytics. The user_agent string in UserInfo will
425
- // be used to deduce device_type for analytics.
490
+ // Highly recommended for analytics.
491
+ // [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
492
+ // is used to deduce `device_type` for analytics.
426
493
  UserInfo user_info = 21;
427
494
 
428
495
  // Facet specifications for faceted search. If empty, no facets are returned.
@@ -446,11 +513,11 @@ message SearchRequest {
446
513
  map<string, google.protobuf.Value> params = 11;
447
514
 
448
515
  // The query expansion specification that specifies the conditions under which
449
- // query expansion will occur.
516
+ // query expansion occurs.
450
517
  QueryExpansionSpec query_expansion_spec = 13;
451
518
 
452
519
  // The spell correction specification that specifies the mode under
453
- // which spell correction will take effect.
520
+ // which spell correction takes effect.
454
521
  SpellCorrectionSpec spell_correction_spec = 14;
455
522
 
456
523
  // A unique identifier for tracking visitors. For example, this could be
@@ -469,12 +536,11 @@ message SearchRequest {
469
536
  // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
470
537
  string user_pseudo_id = 15;
471
538
 
472
- // The content search spec that configs the desired behavior of content
473
- // search.
539
+ // A specification for configuring the behavior of content search.
474
540
  ContentSearchSpec content_search_spec = 24;
475
541
 
476
542
  // Whether to turn on safe search. This is only supported for
477
- // [ContentConfig.PUBLIC_WEBSITE][].
543
+ // website search.
478
544
  bool safe_search = 20;
479
545
 
480
546
  // The user labels applied to a resource must meet the following requirements:
@@ -556,12 +622,46 @@ message SearchResponse {
556
622
 
557
623
  // A list of ranked refinement attributes.
558
624
  repeated RefinementAttribute refinement_attributes = 1;
625
+
626
+ // Suggested follow-up questions.
627
+ repeated string follow_up_questions = 2;
559
628
  }
560
629
 
561
630
  // Summary of the top N search result specified by the summary spec.
562
631
  message Summary {
632
+ // An Enum for summary-skipped reasons.
633
+ enum SummarySkippedReason {
634
+ // Default value. The summary skipped reason is not specified.
635
+ SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0;
636
+
637
+ // The adversarial query ignored case.
638
+ //
639
+ // Only populated when
640
+ // [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query]
641
+ // is set to `true`.
642
+ ADVERSARIAL_QUERY_IGNORED = 1;
643
+
644
+ // The non-summary seeking query ignored case.
645
+ //
646
+ // Only populated when
647
+ // [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query]
648
+ // is set to `true`.
649
+ NON_SUMMARY_SEEKING_QUERY_IGNORED = 2;
650
+
651
+ // The out-of-domain query ignored case.
652
+ //
653
+ // Google skips the summary if there are no high-relevance search results.
654
+ // For example, the data store contains facts about company A but the
655
+ // user query is asking questions about company B.
656
+ OUT_OF_DOMAIN_QUERY_IGNORED = 3;
657
+ }
658
+
563
659
  // The summary content.
564
660
  string summary_text = 1;
661
+
662
+ // Additional summary-skipped reasons. This provides the reason for ignored
663
+ // cases. If nothing is skipped, this field is not set.
664
+ repeated SummarySkippedReason summary_skipped_reasons = 2;
565
665
  }
566
666
 
567
667
  // A list of matched documents. The order represents the ranking.
@@ -66,7 +66,7 @@ message UserEvent {
66
66
  // quality.
67
67
  //
68
68
  // The field must be a UTF-8 encoded string with a length limit of 128
69
- // characters. Otherwise, an INVALID_ARGUMENT error is returned.
69
+ // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
70
70
  //
71
71
  // The field should not contain PII or user-data. We recommend to use Google
72
72
  // Analytics [Client
@@ -120,20 +120,20 @@ message UserEvent {
120
120
  //
121
121
  // The value must be one of:
122
122
  //
123
- // * [PredictResponse.attribution_token][] for events that are the result of
123
+ // * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of
124
124
  // [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend].
125
125
  // * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of
126
126
  // [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search].
127
- // * [CompleteQueryResponse.attribution_token][] for events that are the
128
- // result of
129
- // [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery].
130
127
  //
131
128
  // This token enables us to accurately attribute page view or conversion
132
129
  // completion back to the event and the particular predict response containing
133
130
  // this clicked/purchased product. If user clicks on product K in the
134
- // recommendation results, pass [PredictResponse.attribution_token][] as a URL
135
- // parameter to product K's page. When recording events on product K's page,
136
- // log the [PredictResponse.attribution_token][] to this field.
131
+ // recommendation results, pass
132
+ // [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token]
133
+ // as a URL parameter to product K's page. When recording events on product
134
+ // K's page, log the
135
+ // [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token]
136
+ // to this field.
137
137
  string attribution_token = 8;
138
138
 
139
139
  // The filter syntax consists of an expression language for constructing a
@@ -151,10 +151,11 @@ message UserEvent {
151
151
  // to https://google.aip.dev/160#filtering.
152
152
  //
153
153
  // The value must be a UTF-8 encoded string with a length limit of 1,000
154
- // characters. Otherwise, an INVALID_ARGUMENT error is returned.
154
+ // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
155
155
  string filter = 9;
156
156
 
157
- // List of Documents associated with this user event.
157
+ // List of [Document][google.cloud.discoveryengine.v1beta.Document]s
158
+ // associated with this user event.
158
159
  //
159
160
  // This field is optional except for the following event types:
160
161
  //
@@ -176,12 +177,14 @@ message UserEvent {
176
177
  // Panel metadata associated with this user event.
177
178
  PanelInfo panel = 11;
178
179
 
179
- // Search API details related to the event.
180
+ // [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
181
+ // details related to the event.
180
182
  //
181
183
  // This field should be set for `search` event.
182
184
  SearchInfo search_info = 12;
183
185
 
184
- // CompleteQuery API details related to the event.
186
+ // [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery]
187
+ // details related to the event.
185
188
  //
186
189
  // This field should be set for `search` event when autocomplete function is
187
190
  // enabled and the user clicks a suggestion for search.
@@ -221,7 +224,7 @@ message UserEvent {
221
224
  // * For number attributes, at most 400 values are allowed.
222
225
  //
223
226
  // For product recommendations, an example of extra user information is
224
- // ` traffic_channel`, which is how a user arrives at the site. Users can
227
+ // `traffic_channel`, which is how a user arrives at the site. Users can
225
228
  // arrive
226
229
  // at the site by coming to the site directly, coming through Google
227
230
  // search, or in other ways.
@@ -237,7 +240,7 @@ message PageInfo {
237
240
  //
238
241
  // This should be kept the same for all user events triggered from the same
239
242
  // pageview. For example, an item detail page view could trigger multiple
240
- // events as the user is browsing the page. The `pageViewId` property should
243
+ // events as the user is browsing the page. The `pageview_id` property should
241
244
  // be kept the same for all these events so that they can be grouped together
242
245
  // properly.
243
246
  //
@@ -253,10 +256,10 @@ message PageInfo {
253
256
  //
254
257
  // Category pages include special pages such as sales or promotions. For
255
258
  // instance, a special sale page may have the category hierarchy:
256
- // "pageCategory" : "Sales > 2017 Black Friday Deals".
259
+ // `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
257
260
  //
258
261
  // Required for `view-category-page` events. Other event types should not set
259
- // this field. Otherwise, an INVALID_ARGUMENT error is returned.
262
+ // this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
260
263
  string page_category = 2;
261
264
 
262
265
  // Complete URL (window.location.href) of the user's current page.
@@ -283,14 +286,14 @@ message SearchInfo {
283
286
  // for definition.
284
287
  //
285
288
  // The value must be a UTF-8 encoded string with a length limit of 5,000
286
- // characters. Otherwise, an INVALID_ARGUMENT error is returned.
289
+ // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
287
290
  //
288
291
  // At least one of
289
292
  // [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query]
290
293
  // or
291
294
  // [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category]
292
295
  // is required for `search` events. Other event types should not set this
293
- // field. Otherwise, an INVALID_ARGUMENT error is returned.
296
+ // field. Otherwise, an `INVALID_ARGUMENT` error is returned.
294
297
  string search_query = 1;
295
298
 
296
299
  // The order in which products are returned, if applicable.
@@ -300,10 +303,10 @@ message SearchInfo {
300
303
  // for definition and syntax.
301
304
  //
302
305
  // The value must be a UTF-8 encoded string with a length limit of 1,000
303
- // characters. Otherwise, an INVALID_ARGUMENT error is returned.
306
+ // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
304
307
  //
305
308
  // This can only be set for `search` events. Other event types should not set
306
- // this field. Otherwise, an INVALID_ARGUMENT error is returned.
309
+ // this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
307
310
  string order_by = 2;
308
311
 
309
312
  // An integer that specifies the current offset for pagination (the 0-indexed
@@ -313,20 +316,22 @@ message SearchInfo {
313
316
  // [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset]
314
317
  // for definition.
315
318
  //
316
- // If this field is negative, an INVALID_ARGUMENT is returned.
319
+ // If this field is negative, an `INVALID_ARGUMENT` is returned.
317
320
  //
318
321
  // This can only be set for `search` events. Other event types should not set
319
- // this field. Otherwise, an INVALID_ARGUMENT error is returned.
322
+ // this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
320
323
  optional int32 offset = 3;
321
324
  }
322
325
 
323
326
  // Detailed completion information including completion attribution token and
324
327
  // clicked completion info.
325
328
  message CompletionInfo {
326
- // End user selected [CompleteQueryResponse.CompletionResult.suggestion][].
329
+ // End user selected
330
+ // [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion].
327
331
  string selected_suggestion = 1;
328
332
 
329
- // End user selected [CompleteQueryResponse.CompletionResult.suggestion][]
333
+ // End user selected
334
+ // [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]
330
335
  // position, starting from 0.
331
336
  int32 selected_position = 2;
332
337
  }
@@ -396,17 +401,15 @@ message DocumentInfo {
396
401
  // `{location}`, `{collection_id}`, `{data_store_id}`, and
397
402
  // `{branch_id}` are used when annotating with the stored Document.
398
403
  oneof document_descriptor {
399
- // Required. The Document resource ID.
400
- string id = 1 [(google.api.field_behavior) = REQUIRED];
404
+ // The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
405
+ string id = 1;
401
406
 
402
- // Required. The Document resource full name, of the form:
407
+ // The [Document][google.cloud.discoveryengine.v1beta.Document] resource
408
+ // full name, of the form:
403
409
  // `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
404
- string name = 2 [
405
- (google.api.field_behavior) = REQUIRED,
406
- (google.api.resource_reference) = {
407
- type: "discoveryengine.googleapis.com/Document"
408
- }
409
- ];
410
+ string name = 2 [(google.api.resource_reference) = {
411
+ type: "discoveryengine.googleapis.com/Document"
412
+ }];
410
413
  }
411
414
 
412
415
  // Quantity of the Document associated with the user event. Defaults to 1.
@@ -450,11 +453,13 @@ message PanelInfo {
450
453
  message MediaInfo {
451
454
  // The media progress time in seconds, if applicable.
452
455
  // For example, if the end user has finished 90 seconds of a playback video,
453
- // then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should
454
- // be set to 90.
456
+ // then
457
+ // [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
458
+ // should be set to 90.
455
459
  google.protobuf.Duration media_progress_duration = 1;
456
460
 
457
- // Media progress should be computed using only the media_progress_duration
461
+ // Media progress should be computed using only the
462
+ // [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration]
458
463
  // relative to the media total length.
459
464
  //
460
465
  // This value must be between `[0, 1.0]` inclusive.
@@ -53,7 +53,7 @@ service UserEventService {
53
53
  }
54
54
 
55
55
  // Writes a single user event from the browser. This uses a GET request to
56
- // due to browser restriction of POST-ing to a 3rd party domain.
56
+ // due to browser restriction of POST-ing to a third-party domain.
57
57
  //
58
58
  // This method is used only by the Discovery Engine API JavaScript pixel and
59
59
  // Google Tag Manager. Users should not call this method directly.
@@ -122,7 +122,7 @@ message CollectUserEventRequest {
122
122
 
123
123
  // The URL including cgi-parameters but excluding the hash fragment with a
124
124
  // length limit of 5,000 characters. This is often more useful than the
125
- // referer URL, because many browsers only send the domain for 3rd party
125
+ // referer URL, because many browsers only send the domain for third-party
126
126
  // requests.
127
127
  optional string uri = 3;
128
128