@google-cloud/discoveryengine 1.11.0 → 1.12.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 (28) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +3 -0
  3. package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +14 -0
  4. package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +31 -0
  5. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +38 -0
  6. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +19 -0
  7. package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +7 -1
  8. package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +23 -0
  9. package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +10 -0
  10. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +108 -0
  11. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +111 -0
  12. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +303 -0
  13. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +24 -0
  14. package/build/protos/protos.d.ts +2891 -4
  15. package/build/protos/protos.js +23610 -16379
  16. package/build/protos/protos.json +665 -6
  17. package/build/src/v1beta/completion_service_client.d.ts +91 -0
  18. package/build/src/v1beta/completion_service_client.js +84 -0
  19. package/build/src/v1beta/completion_service_client_config.json +10 -0
  20. package/build/src/v1beta/conversational_search_service_client.d.ts +18 -0
  21. package/build/src/v1beta/data_store_service_client.d.ts +9 -0
  22. package/build/src/v1beta/document_service_client.d.ts +2 -0
  23. package/build/src/v1beta/search_service_client.d.ts +147 -0
  24. package/build/src/v1beta/search_service_client.js +98 -0
  25. package/build/src/v1beta/user_event_service_client.d.ts +75 -0
  26. package/build/src/v1beta/user_event_service_client.js +42 -0
  27. package/build/src/v1beta/user_event_service_client_config.json +5 -0
  28. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.12.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v1.11.0...discoveryengine-v1.12.0) (2024-08-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * [discoveryengine] Update CompletionService ([#5574](https://github.com/googleapis/google-cloud-node/issues/5574)) ([384096f](https://github.com/googleapis/google-cloud-node/commit/384096fe3bbab56e9f708a2bc422f711cc1d8641))
9
+ * [discoveryengine] Update SearchService ([#5578](https://github.com/googleapis/google-cloud-node/issues/5578)) ([af46d57](https://github.com/googleapis/google-cloud-node/commit/af46d5779f82d7a37c687e1364b8c653bb6369e9))
10
+
3
11
  ## [1.11.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v1.10.0...discoveryengine-v1.11.0) (2024-07-22)
4
12
 
5
13
 
package/README.md CHANGED
@@ -288,7 +288,9 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
288
288
  | User_event_service.purge_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/user_event_service.purge_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1alpha/user_event_service.purge_user_events.js,packages/google-cloud-discoveryengine/samples/README.md) |
289
289
  | User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1alpha/user_event_service.write_user_event.js,packages/google-cloud-discoveryengine/samples/README.md) |
290
290
  | Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js,packages/google-cloud-discoveryengine/samples/README.md) |
291
+ | Completion_service.import_completion_suggestions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.import_completion_suggestions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.import_completion_suggestions.js,packages/google-cloud-discoveryengine/samples/README.md) |
291
292
  | Completion_service.import_suggestion_deny_list_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.import_suggestion_deny_list_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.import_suggestion_deny_list_entries.js,packages/google-cloud-discoveryengine/samples/README.md) |
293
+ | Completion_service.purge_completion_suggestions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.purge_completion_suggestions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.purge_completion_suggestions.js,packages/google-cloud-discoveryengine/samples/README.md) |
292
294
  | Completion_service.purge_suggestion_deny_list_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.purge_suggestion_deny_list_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.purge_suggestion_deny_list_entries.js,packages/google-cloud-discoveryengine/samples/README.md) |
293
295
  | Control_service.create_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/control_service.create_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/control_service.create_control.js,packages/google-cloud-discoveryengine/samples/README.md) |
294
296
  | Control_service.delete_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/control_service.delete_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/control_service.delete_control.js,packages/google-cloud-discoveryengine/samples/README.md) |
@@ -372,6 +374,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
372
374
  | Site_search_engine_service.update_target_site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/site_search_engine_service.update_target_site.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/site_search_engine_service.update_target_site.js,packages/google-cloud-discoveryengine/samples/README.md) |
373
375
  | User_event_service.collect_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.collect_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.collect_user_event.js,packages/google-cloud-discoveryengine/samples/README.md) |
374
376
  | User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.import_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.import_user_events.js,packages/google-cloud-discoveryengine/samples/README.md) |
377
+ | User_event_service.purge_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.purge_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.purge_user_events.js,packages/google-cloud-discoveryengine/samples/README.md) |
375
378
  | User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.write_user_event.js,packages/google-cloud-discoveryengine/samples/README.md) |
376
379
  | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/quickstart.js,packages/google-cloud-discoveryengine/samples/README.md) |
377
380
 
@@ -188,6 +188,14 @@ message Answer {
188
188
  // If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
189
189
  // populate chunk info.
190
190
  repeated ChunkInfo chunk_info = 5;
191
+
192
+ // Data representation.
193
+ // The structured JSON data for the document.
194
+ // It's populated from the struct data from the Document
195
+ // , or the Chunk in
196
+ // search result
197
+ // .
198
+ google.protobuf.Struct struct_data = 6;
191
199
  }
192
200
 
193
201
  // Search results observed by the search action, it can be snippets info
@@ -296,6 +304,12 @@ message Answer {
296
304
  // Google skips the answer if there is a potential policy violation
297
305
  // detected. This includes content that may be violent or toxic.
298
306
  POTENTIAL_POLICY_VIOLATION = 4;
307
+
308
+ // The no relevant content case.
309
+ //
310
+ // Google skips the answer if there is no relevant content in the
311
+ // retrieved search results.
312
+ NO_RELEVANT_CONTENT = 5;
299
313
  }
300
314
 
301
315
  // Immutable. Fully qualified name
@@ -50,3 +50,34 @@ message SuggestionDenyListEntry {
50
50
  // exact phrase, or block any suggestions containing this phrase.
51
51
  MatchOperator match_operator = 2 [(google.api.field_behavior) = REQUIRED];
52
52
  }
53
+
54
+ // Autocomplete suggestions that are imported from Customer.
55
+ message CompletionSuggestion {
56
+ // Ranking metrics of this suggestion.
57
+ oneof ranking_info {
58
+ // Global score of this suggestion. Control how this suggestion would be
59
+ // scored / ranked.
60
+ double global_score = 2;
61
+
62
+ // Frequency of this suggestion. Will be used to rank suggestions when score
63
+ // is not available.
64
+ int64 frequency = 3;
65
+ }
66
+
67
+ // Required. The suggestion text.
68
+ string suggestion = 1 [(google.api.field_behavior) = REQUIRED];
69
+
70
+ // BCP-47 language code of this suggestion.
71
+ string language_code = 4;
72
+
73
+ // If two suggestions have the same groupId, they will not be
74
+ // returned together. Instead the one ranked higher will be returned. This can
75
+ // be used to deduplicate semantically identical suggestions.
76
+ string group_id = 5;
77
+
78
+ // The score of this suggestion within its group.
79
+ double group_score = 6;
80
+
81
+ // Alternative matching phrases for this suggestion.
82
+ repeated string alternative_phrases = 7;
83
+ }
@@ -86,6 +86,44 @@ service CompletionService {
86
86
  metadata_type: "google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesMetadata"
87
87
  };
88
88
  }
89
+
90
+ // Imports
91
+ // [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s
92
+ // for a DataStore.
93
+ rpc ImportCompletionSuggestions(ImportCompletionSuggestionsRequest)
94
+ returns (google.longrunning.Operation) {
95
+ option (google.api.http) = {
96
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:import"
97
+ body: "*"
98
+ additional_bindings {
99
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:import"
100
+ body: "*"
101
+ }
102
+ };
103
+ option (google.longrunning.operation_info) = {
104
+ response_type: "google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsResponse"
105
+ metadata_type: "google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsMetadata"
106
+ };
107
+ }
108
+
109
+ // Permanently deletes all
110
+ // [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s
111
+ // for a DataStore.
112
+ rpc PurgeCompletionSuggestions(PurgeCompletionSuggestionsRequest)
113
+ returns (google.longrunning.Operation) {
114
+ option (google.api.http) = {
115
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:purge"
116
+ body: "*"
117
+ additional_bindings {
118
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:purge"
119
+ body: "*"
120
+ }
121
+ };
122
+ option (google.longrunning.operation_info) = {
123
+ response_type: "google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsResponse"
124
+ metadata_type: "google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsMetadata"
125
+ };
126
+ }
89
127
  }
90
128
 
91
129
  // Request message for
@@ -792,6 +792,25 @@ message AnswerQueryRequest {
792
792
  // The field must be a UTF-8 encoded string with a length limit of 128
793
793
  // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
794
794
  string user_pseudo_id = 12;
795
+
796
+ // The user labels applied to a resource must meet the following requirements:
797
+ //
798
+ // * Each resource can have multiple labels, up to a maximum of 64.
799
+ // * Each label must be a key-value pair.
800
+ // * Keys have a minimum length of 1 character and a maximum length of 63
801
+ // characters and cannot be empty. Values can be empty and have a maximum
802
+ // length of 63 characters.
803
+ // * Keys and values can contain only lowercase letters, numeric characters,
804
+ // underscores, and dashes. All characters must use UTF-8 encoding, and
805
+ // international characters are allowed.
806
+ // * The key portion of a label must be unique. However, you can use the same
807
+ // key with multiple resources.
808
+ // * Keys must start with a lowercase letter or international character.
809
+ //
810
+ // See [Google Cloud
811
+ // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
812
+ // for more details.
813
+ map<string, string> user_labels = 13;
795
814
  }
796
815
 
797
816
  // Response message for
@@ -56,6 +56,9 @@ message CustomTuningModel {
56
56
 
57
57
  // The model training failed.
58
58
  TRAINING_FAILED = 5;
59
+
60
+ // The model training finished successfully but metrics did not improve.
61
+ NO_IMPROVEMENT = 6;
59
62
  }
60
63
 
61
64
  // Required. The fully qualified resource name of the model.
@@ -80,8 +83,11 @@ message CustomTuningModel {
80
83
  ModelState model_state = 4;
81
84
 
82
85
  // Timestamp the Model was created at.
83
- google.protobuf.Timestamp create_time = 5;
86
+ google.protobuf.Timestamp create_time = 5 [deprecated = true];
84
87
 
85
88
  // Timestamp the model training was initiated.
86
89
  google.protobuf.Timestamp training_start_time = 6;
90
+
91
+ // The metrics of the trained model.
92
+ map<string, double> metrics = 7;
87
93
  }
@@ -98,6 +98,9 @@ message DataStore {
98
98
  google.protobuf.Timestamp create_time = 4
99
99
  [(google.api.field_behavior) = OUTPUT_ONLY];
100
100
 
101
+ // Language info for DataStore.
102
+ LanguageInfo language_info = 14;
103
+
101
104
  // Configuration for Document understanding and enrichment.
102
105
  DocumentProcessingConfig document_processing_config = 27;
103
106
 
@@ -118,3 +121,23 @@ message DataStore {
118
121
  // doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
119
122
  Schema starting_schema = 28;
120
123
  }
124
+
125
+ // Language info for DataStore.
126
+ message LanguageInfo {
127
+ // The language code for the DataStore.
128
+ string language_code = 1;
129
+
130
+ // Output only. This is the normalized form of language_code.
131
+ // E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb`
132
+ // will have normalized_language_code of `en-GB`.
133
+ string normalized_language_code = 2
134
+ [(google.api.field_behavior) = OUTPUT_ONLY];
135
+
136
+ // Output only. Language part of normalized_language_code.
137
+ // E.g.: `en-US` -> `en`, `zh-Hans-HK` -> `zh`, `en` -> `en`.
138
+ string language = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
139
+
140
+ // Output only. Region part of normalized_language_code, if present.
141
+ // E.g.: `en-US` -> `US`, `zh-Hans-HK` -> `HK`, `en` -> ``.
142
+ string region = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
143
+ }
@@ -152,6 +152,16 @@ message CreateDataStoreRequest {
152
152
  // search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will
153
153
  // be ignored.
154
154
  bool create_advanced_site_search = 4;
155
+
156
+ // A boolean flag indicating whether to skip the default schema creation for
157
+ // the data store. Only enable this flag if you are certain that the default
158
+ // schema is incompatible with your use case.
159
+ //
160
+ // If set to true, you must manually create a schema for the data store before
161
+ // any documents can be ingested.
162
+ //
163
+ // This flag cannot be specified if `data_store.starting_schema` is specified.
164
+ bool skip_default_schema_creation = 7;
155
165
  }
156
166
 
157
167
  // Request message for
@@ -327,6 +327,38 @@ message CloudSqlSource {
327
327
  bool offload = 6;
328
328
  }
329
329
 
330
+ // AlloyDB source import data from.
331
+ message AlloyDbSource {
332
+ // The project ID that the AlloyDB source is in
333
+ // with a length limit of 128 characters. If not specified, inherits the
334
+ // project ID from the parent request.
335
+ string project_id = 1;
336
+
337
+ // Required. The AlloyDB location to copy the data from with a length limit of
338
+ // 256 characters.
339
+ string location_id = 2 [(google.api.field_behavior) = REQUIRED];
340
+
341
+ // Required. The AlloyDB cluster to copy the data from with a length limit of
342
+ // 256 characters.
343
+ string cluster_id = 3 [(google.api.field_behavior) = REQUIRED];
344
+
345
+ // Required. The AlloyDB database to copy the data from with a length limit of
346
+ // 256 characters.
347
+ string database_id = 4 [(google.api.field_behavior) = REQUIRED];
348
+
349
+ // Required. The AlloyDB table to copy the data from with a length limit of
350
+ // 256 characters.
351
+ string table_id = 5 [(google.api.field_behavior) = REQUIRED];
352
+
353
+ // Intermediate Cloud Storage directory used for the import with a length
354
+ // limit of 2,000 characters. Can be specified if one wants to have the
355
+ // AlloyDB export to a specific Cloud Storage directory.
356
+ //
357
+ // Ensure that the AlloyDB service account has the necessary Cloud
358
+ // Storage Admin permissions to access the specified Cloud Storage directory.
359
+ string gcs_staging_dir = 6;
360
+ }
361
+
330
362
  // Firestore source import data from.
331
363
  message FirestoreSource {
332
364
  // The project ID that the Cloud SQL source is in with a length limit of 128
@@ -500,6 +532,9 @@ message ImportDocumentsRequest {
500
532
  // Firestore input source.
501
533
  FirestoreSource firestore_source = 13;
502
534
 
535
+ // AlloyDB input source.
536
+ AlloyDbSource alloy_db_source = 14;
537
+
503
538
  // Cloud Bigtable input source.
504
539
  BigtableSource bigtable_source = 15;
505
540
  }
@@ -665,6 +700,79 @@ message ImportSuggestionDenyListEntriesMetadata {
665
700
  google.protobuf.Timestamp update_time = 2;
666
701
  }
667
702
 
703
+ // Request message for
704
+ // [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.ImportCompletionSuggestions]
705
+ // method.
706
+ message ImportCompletionSuggestionsRequest {
707
+ // The inline source for CompletionSuggestions.
708
+ message InlineSource {
709
+ // Required. A list of all denylist entries to import. Max of 1000 items.
710
+ repeated CompletionSuggestion suggestions = 1
711
+ [(google.api.field_behavior) = REQUIRED];
712
+ }
713
+
714
+ // The source of the autocomplete suggestions.
715
+ oneof source {
716
+ // The Inline source for suggestion entries.
717
+ InlineSource inline_source = 2;
718
+
719
+ // Cloud Storage location for the input content.
720
+ GcsSource gcs_source = 3;
721
+
722
+ // BigQuery input source.
723
+ BigQuerySource bigquery_source = 4;
724
+ }
725
+
726
+ // Required. The parent data store resource name for which to import customer
727
+ // autocomplete suggestions.
728
+ //
729
+ // Follows pattern `projects/*/locations/*/collections/*/dataStores/*`
730
+ string parent = 1 [
731
+ (google.api.field_behavior) = REQUIRED,
732
+ (google.api.resource_reference) = {
733
+ type: "discoveryengine.googleapis.com/DataStore"
734
+ }
735
+ ];
736
+
737
+ // The desired location of errors incurred during the Import.
738
+ ImportErrorConfig error_config = 5;
739
+ }
740
+
741
+ // Response of the
742
+ // [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.ImportCompletionSuggestions]
743
+ // method. If the long running operation is done, this message is returned by
744
+ // the google.longrunning.Operations.response field if the operation is
745
+ // successful.
746
+ message ImportCompletionSuggestionsResponse {
747
+ // A sample of errors encountered while processing the request.
748
+ repeated google.rpc.Status error_samples = 1;
749
+
750
+ // The desired location of errors incurred during the Import.
751
+ ImportErrorConfig error_config = 2;
752
+ }
753
+
754
+ // Metadata related to the progress of the ImportCompletionSuggestions
755
+ // operation. This will be returned by the google.longrunning.Operation.metadata
756
+ // field.
757
+ message ImportCompletionSuggestionsMetadata {
758
+ // Operation create time.
759
+ google.protobuf.Timestamp create_time = 1;
760
+
761
+ // Operation last update time. If the operation is done, this is also the
762
+ // finish time.
763
+ google.protobuf.Timestamp update_time = 2;
764
+
765
+ // Count of
766
+ // [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s
767
+ // successfully imported.
768
+ int64 success_count = 3;
769
+
770
+ // Count of
771
+ // [CompletionSuggestion][google.cloud.discoveryengine.v1beta.CompletionSuggestion]s
772
+ // that failed to be imported.
773
+ int64 failure_count = 4;
774
+ }
775
+
668
776
  // Request message for
669
777
  // [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1beta.SampleQueryService.ImportSampleQueries]
670
778
  // method.
@@ -30,6 +30,79 @@ option objc_class_prefix = "DISCOVERYENGINE";
30
30
  option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
31
31
  option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
32
32
 
33
+ // Request message for PurgeUserEvents method.
34
+ message PurgeUserEventsRequest {
35
+ // Required. The resource name of the catalog under which the events are
36
+ // created. The format is
37
+ // `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
38
+ string parent = 1 [
39
+ (google.api.field_behavior) = REQUIRED,
40
+ (google.api.resource_reference) = {
41
+ type: "discoveryengine.googleapis.com/DataStore"
42
+ }
43
+ ];
44
+
45
+ // Required. The filter string to specify the events to be deleted with a
46
+ // length limit of 5,000 characters. The eligible fields for filtering are:
47
+ //
48
+ // * `eventType`: Double quoted
49
+ // [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
50
+ // string.
51
+ // * `eventTime`: in ISO 8601 "zulu" format.
52
+ // * `userPseudoId`: Double quoted string. Specifying this will delete all
53
+ // events associated with a visitor.
54
+ // * `userId`: Double quoted string. Specifying this will delete all events
55
+ // associated with a user.
56
+ //
57
+ // Examples:
58
+ //
59
+ // * Deleting all events in a time range:
60
+ // `eventTime > "2012-04-23T18:25:43.511Z"
61
+ // eventTime < "2012-04-23T18:30:43.511Z"`
62
+ // * Deleting specific eventType:
63
+ // `eventType = "search"`
64
+ // * Deleting all events for a specific visitor:
65
+ // `userPseudoId = "visitor1024"`
66
+ // * Deleting all events inside a DataStore:
67
+ // `*`
68
+ //
69
+ // The filtering fields are assumed to have an implicit AND.
70
+ string filter = 2 [(google.api.field_behavior) = REQUIRED];
71
+
72
+ // The `force` field is currently not supported. Purge user event requests
73
+ // will permanently delete all purgeable events. Once the development is
74
+ // complete:
75
+ // If `force` is set to false, the method will return the expected
76
+ // purge count without deleting any user events. This field will default to
77
+ // false if not included in the request.
78
+ bool force = 3;
79
+ }
80
+
81
+ // Response of the PurgeUserEventsRequest. If the long running operation is
82
+ // successfully done, then this message is returned by the
83
+ // google.longrunning.Operations.response field.
84
+ message PurgeUserEventsResponse {
85
+ // The total count of events purged as a result of the operation.
86
+ int64 purge_count = 1;
87
+ }
88
+
89
+ // Metadata related to the progress of the PurgeUserEvents operation.
90
+ // This will be returned by the google.longrunning.Operation.metadata field.
91
+ message PurgeUserEventsMetadata {
92
+ // Operation create time.
93
+ google.protobuf.Timestamp create_time = 1;
94
+
95
+ // Operation last update time. If the operation is done, this is also the
96
+ // finish time.
97
+ google.protobuf.Timestamp update_time = 2;
98
+
99
+ // Count of entries that were deleted successfully.
100
+ int64 success_count = 3;
101
+
102
+ // Count of entries that encountered errors while processing.
103
+ int64 failure_count = 4;
104
+ }
105
+
33
106
  // Request message for
34
107
  // [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments]
35
108
  // method.
@@ -125,3 +198,41 @@ message PurgeSuggestionDenyListEntriesMetadata {
125
198
  // finish time.
126
199
  google.protobuf.Timestamp update_time = 2;
127
200
  }
201
+
202
+ // Request message for
203
+ // [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.PurgeCompletionSuggestions]
204
+ // method.
205
+ message PurgeCompletionSuggestionsRequest {
206
+ // Required. The parent data store resource name for which to purge completion
207
+ // suggestions. Follows pattern
208
+ // projects/*/locations/*/collections/*/dataStores/*.
209
+ string parent = 1 [
210
+ (google.api.field_behavior) = REQUIRED,
211
+ (google.api.resource_reference) = {
212
+ type: "discoveryengine.googleapis.com/DataStore"
213
+ }
214
+ ];
215
+ }
216
+
217
+ // Response message for
218
+ // [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1beta.CompletionService.PurgeCompletionSuggestions]
219
+ // method.
220
+ message PurgeCompletionSuggestionsResponse {
221
+ // Whether the completion suggestions were successfully purged.
222
+ bool purge_succeeded = 1;
223
+
224
+ // A sample of errors encountered while processing the request.
225
+ repeated google.rpc.Status error_samples = 2;
226
+ }
227
+
228
+ // Metadata related to the progress of the PurgeCompletionSuggestions
229
+ // operation. This is returned by the google.longrunning.Operation.metadata
230
+ // field.
231
+ message PurgeCompletionSuggestionsMetadata {
232
+ // Operation create time.
233
+ google.protobuf.Timestamp create_time = 1;
234
+
235
+ // Operation last update time. If the operation is done, this is also the
236
+ // finish time.
237
+ google.protobuf.Timestamp update_time = 2;
238
+ }