@google-cloud/discoveryengine 1.4.0 → 1.5.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 (121) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +15 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config.proto +49 -0
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config_service.proto +79 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +106 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk_service.proto +137 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +97 -4
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +52 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +44 -2
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +6 -1
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +44 -0
  12. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +80 -1
  13. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +102 -0
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +127 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +70 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +13 -8
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +3 -2
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/estimate_billing_service.proto +130 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +376 -21
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +66 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/rank_service.proto +115 -0
  22. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +3 -1
  23. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +3 -0
  24. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +221 -30
  25. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +27 -20
  26. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +271 -0
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +148 -0
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +9 -3
  29. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +7 -4
  30. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +4 -3
  31. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +5 -0
  32. package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +22 -0
  33. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +9 -0
  34. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +94 -0
  35. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +3 -0
  36. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +19 -4
  37. package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +151 -0
  38. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +4 -3
  39. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config_service.proto +6 -5
  40. package/build/protos/protos.d.ts +18160 -8292
  41. package/build/protos/protos.js +50325 -25400
  42. package/build/protos/protos.json +4864 -2447
  43. package/build/src/v1/completion_service_client.js +10 -7
  44. package/build/src/v1/conversational_search_service_client.js +10 -7
  45. package/build/src/v1/data_store_service_client.js +10 -7
  46. package/build/src/v1/document_service_client.js +10 -7
  47. package/build/src/v1/engine_service_client.js +10 -7
  48. package/build/src/v1/schema_service_client.js +10 -7
  49. package/build/src/v1/search_service_client.js +10 -7
  50. package/build/src/v1/site_search_engine_service_client.js +10 -7
  51. package/build/src/v1/user_event_service_client.js +10 -7
  52. package/build/src/v1alpha/acl_config_service_client.d.ts +1233 -0
  53. package/build/src/v1alpha/acl_config_service_client.js +1768 -0
  54. package/build/src/v1alpha/acl_config_service_client_config.json +34 -0
  55. package/build/src/v1alpha/chunk_service_client.d.ts +1350 -0
  56. package/build/src/v1alpha/chunk_service_client.js +1889 -0
  57. package/build/src/v1alpha/chunk_service_client_config.json +34 -0
  58. package/build/src/v1alpha/completion_service_client.d.ts +588 -3
  59. package/build/src/v1alpha/completion_service_client.js +844 -9
  60. package/build/src/v1alpha/completion_service_client_config.json +10 -0
  61. package/build/src/v1alpha/conversational_search_service_client.d.ts +233 -1
  62. package/build/src/v1alpha/conversational_search_service_client.js +326 -7
  63. package/build/src/v1alpha/data_store_service_client.d.ts +451 -3
  64. package/build/src/v1alpha/data_store_service_client.js +575 -9
  65. package/build/src/v1alpha/data_store_service_client_config.json +8 -0
  66. package/build/src/v1alpha/document_service_client.d.ts +462 -21
  67. package/build/src/v1alpha/document_service_client.js +549 -7
  68. package/build/src/v1alpha/document_service_client_config.json +5 -0
  69. package/build/src/v1alpha/engine_service_client.d.ts +375 -2
  70. package/build/src/v1alpha/engine_service_client.js +527 -7
  71. package/build/src/v1alpha/estimate_billing_service_client.d.ts +1367 -0
  72. package/build/src/v1alpha/estimate_billing_service_client.js +2034 -0
  73. package/build/src/v1alpha/estimate_billing_service_client_config.json +30 -0
  74. package/build/src/v1alpha/index.d.ts +5 -0
  75. package/build/src/v1alpha/index.js +11 -1
  76. package/build/src/v1alpha/rank_service_client.d.ts +1254 -0
  77. package/build/src/v1alpha/rank_service_client.js +1796 -0
  78. package/build/src/v1alpha/rank_service_client_config.json +30 -0
  79. package/build/src/v1alpha/recommendation_service_client.d.ts +231 -1
  80. package/build/src/v1alpha/recommendation_service_client.js +326 -7
  81. package/build/src/v1alpha/schema_service_client.d.ts +372 -0
  82. package/build/src/v1alpha/schema_service_client.js +527 -7
  83. package/build/src/v1alpha/search_service_client.d.ts +288 -30
  84. package/build/src/v1alpha/search_service_client.js +366 -27
  85. package/build/src/v1alpha/search_tuning_service_client.d.ts +373 -1
  86. package/build/src/v1alpha/search_tuning_service_client.js +527 -7
  87. package/build/src/v1alpha/serving_config_service_client.d.ts +1370 -0
  88. package/build/src/v1alpha/serving_config_service_client.js +1939 -0
  89. package/build/src/v1alpha/serving_config_service_client_config.json +38 -0
  90. package/build/src/v1alpha/site_search_engine_service_client.d.ts +372 -0
  91. package/build/src/v1alpha/site_search_engine_service_client.js +527 -7
  92. package/build/src/v1alpha/user_event_service_client.d.ts +372 -0
  93. package/build/src/v1alpha/user_event_service_client.js +527 -7
  94. package/build/src/v1beta/completion_service_client.d.ts +75 -0
  95. package/build/src/v1beta/completion_service_client.js +114 -7
  96. package/build/src/v1beta/conversational_search_service_client.d.ts +79 -0
  97. package/build/src/v1beta/conversational_search_service_client.js +114 -7
  98. package/build/src/v1beta/data_store_service_client.d.ts +75 -0
  99. package/build/src/v1beta/data_store_service_client.js +114 -7
  100. package/build/src/v1beta/document_service_client.d.ts +75 -0
  101. package/build/src/v1beta/document_service_client.js +114 -7
  102. package/build/src/v1beta/engine_service_client.d.ts +75 -0
  103. package/build/src/v1beta/engine_service_client.js +114 -7
  104. package/build/src/v1beta/index.d.ts +1 -0
  105. package/build/src/v1beta/index.js +3 -1
  106. package/build/src/v1beta/recommendation_service_client.d.ts +75 -0
  107. package/build/src/v1beta/recommendation_service_client.js +114 -7
  108. package/build/src/v1beta/schema_service_client.d.ts +75 -0
  109. package/build/src/v1beta/schema_service_client.js +114 -7
  110. package/build/src/v1beta/search_service_client.d.ts +81 -0
  111. package/build/src/v1beta/search_service_client.js +118 -7
  112. package/build/src/v1beta/search_tuning_service_client.d.ts +1196 -0
  113. package/build/src/v1beta/search_tuning_service_client.js +1784 -0
  114. package/build/src/v1beta/search_tuning_service_client_config.json +30 -0
  115. package/build/src/v1beta/serving_config_service_client.d.ts +123 -8
  116. package/build/src/v1beta/serving_config_service_client.js +176 -12
  117. package/build/src/v1beta/site_search_engine_service_client.d.ts +75 -0
  118. package/build/src/v1beta/site_search_engine_service_client.js +114 -7
  119. package/build/src/v1beta/user_event_service_client.d.ts +75 -0
  120. package/build/src/v1beta/user_event_service_client.js +114 -7
  121. package/package.json +3 -3
@@ -58,41 +58,45 @@ service SearchTuningService {
58
58
  // [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1alpha.SearchTuningService.TrainCustomModel]
59
59
  // method.
60
60
  message TrainCustomModelRequest {
61
- // Gcs training data input.
61
+ // Cloud Storage training data input.
62
62
  message GcsTrainingInput {
63
- // The gcs corpus data which could be associated in train data.
64
- // The data path format is gs://<bucket_to_data>/<jsonl_file_name>.
63
+ // The Cloud Storage corpus data which could be associated in train data.
64
+ // The data path format is `gs://<bucket_to_data>/<jsonl_file_name>`.
65
65
  // A newline delimited jsonl/ndjson file.
66
- // * For search-tuning model, each line should have the _id, title
67
- // and text. Example: {"_id": "doc1", title: "relevant doc", "text":
68
- // "relevant text"}
66
+ //
67
+ // For search-tuning model, each line should have the _id, title
68
+ // and text. Example:
69
+ // `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`
69
70
  string corpus_data_path = 1;
70
71
 
71
72
  // The gcs query data which could be associated in train data.
72
- // The data path format is gs://<bucket_to_data>/<jsonl_file_name>.
73
+ // The data path format is `gs://<bucket_to_data>/<jsonl_file_name>`.
73
74
  // A newline delimited jsonl/ndjson file.
74
- // * For search-tuning model, each line should have the _id
75
- // and text. Example: {"_id": "query1", "text": "example query"}
75
+ //
76
+ // For search-tuning model, each line should have the _id
77
+ // and text. Example: {"_id": "query1", "text": "example query"}
76
78
  string query_data_path = 2;
77
79
 
78
- // Gcs training data path whose format should be
79
- // gs://<bucket_to_data>/<tsv_file_name>. The file should be in tsv format.
80
- // Each line should have the doc_id and query_id and score (number).
81
- // * For search-tuning model, it should have the query-id corpus-id
82
- // score as tsv file header. The score should be a number in [0, inf+). The
83
- // larger the number is, the more relevant the pair is. Example:
84
- // query-id\tcorpus-id\tscore
85
- // query1\tdoc1\t1
80
+ // Cloud Storage training data path whose format should be
81
+ // `gs://<bucket_to_data>/<tsv_file_name>`. The file should be in tsv
82
+ // format. Each line should have the doc_id and query_id and score (number).
83
+ //
84
+ // For search-tuning model, it should have the query-id corpus-id
85
+ // score as tsv file header. The score should be a number in `[0, inf+)`.
86
+ // The larger the number is, the more relevant the pair is. Example:
87
+ //
88
+ // * `query-id\tcorpus-id\tscore`
89
+ // * `query1\tdoc1\t1`
86
90
  string train_data_path = 3;
87
91
 
88
- // Gcs test data. Same format as train_data_path. If not provided, a
89
- // random 80/20 train/test split will be performed on train_data_path.
92
+ // Cloud Storage test data. Same format as train_data_path. If not provided,
93
+ // a random 80/20 train/test split will be performed on train_data_path.
90
94
  string test_data_path = 4;
91
95
  }
92
96
 
93
97
  // Model training input.
94
98
  oneof training_input {
95
- // Gcs training input.
99
+ // Cloud Storage training input.
96
100
  GcsTrainingInput gcs_training_input = 2;
97
101
  }
98
102
 
@@ -133,6 +137,9 @@ message TrainCustomModelResponse {
133
137
  // * **in-progress**: Model training is in progress.
134
138
  // * **ready**: The model is ready for serving.
135
139
  string model_status = 3;
140
+
141
+ // The metrics of the trained model.
142
+ map<string, double> metrics = 4;
136
143
  }
137
144
 
138
145
  // Metadata related to the progress of the TrainCustomModel operation. This is
@@ -0,0 +1,271 @@
1
+ // Copyright 2022 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
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/cloud/discoveryengine/v1alpha/common.proto";
22
+ import "google/cloud/discoveryengine/v1alpha/search_service.proto";
23
+ import "google/protobuf/timestamp.proto";
24
+
25
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
26
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
27
+ option java_multiple_files = true;
28
+ option java_outer_classname = "ServingConfigProto";
29
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
30
+ option objc_class_prefix = "DISCOVERYENGINE";
31
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
32
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
33
+
34
+ // Configures metadata that is used to generate serving time results (e.g.
35
+ // search results or recommendation predictions).
36
+ // The ServingConfig is passed in the search and predict request and generates
37
+ // results.
38
+ message ServingConfig {
39
+ option (google.api.resource) = {
40
+ type: "discoveryengine.googleapis.com/ServingConfig"
41
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}"
42
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}"
43
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}"
44
+ };
45
+
46
+ // Specifies the configurations needed for Media Discovery. Currently we
47
+ // support:
48
+ //
49
+ // * `demote_content_watched`: Threshold for watched content demotion.
50
+ // Customers can specify if using watched content demotion or use viewed
51
+ // detail page. Using the content watched demotion, customers need to specify
52
+ // the watched minutes or percentage exceeds the threshold, the content will
53
+ // be demoted in the recommendation result.
54
+ // * `promote_fresh_content`: cutoff days for fresh content promotion.
55
+ // Customers can specify if using content freshness promotion. If the content
56
+ // was published within the cutoff days, the content will be promoted in the
57
+ // recommendation result.
58
+ // Can only be set if
59
+ // [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
60
+ // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
61
+ message MediaConfig {
62
+ // Specify the threshold for demoting watched content, the threshold can be
63
+ // either percentage or minutes value.
64
+ // This must be set for `media-complete` event type.
65
+ oneof demote_content_watched {
66
+ // Specifies the content watched percentage threshold for demotion.
67
+ // Threshold value must be between [0, 1.0] inclusive.
68
+ float content_watched_percentage_threshold = 2;
69
+
70
+ // Specifies the content watched minutes threshold for demotion.
71
+ float content_watched_seconds_threshold = 5;
72
+ }
73
+
74
+ // Specifies the event type used for demoting recommendation result.
75
+ // Currently supported values:
76
+ //
77
+ // * `view-item`: Item viewed.
78
+ // * `media-play`: Start/resume watching a video, playing a song, etc.
79
+ // * `media-complete`: Finished or stopped midway through a video, song,
80
+ // etc.
81
+ //
82
+ // If unset, watch history demotion will not be applied. Content freshness
83
+ // demotion will still be applied.
84
+ string demotion_event_type = 1;
85
+
86
+ // Specifies the content freshness used for recommendation result.
87
+ // Contents will be demoted if contents were published for more than content
88
+ // freshness cutoff days.
89
+ int32 content_freshness_cutoff_days = 4;
90
+ }
91
+
92
+ // Specifies the configurations needed for Generic Discovery.Currently we
93
+ // support:
94
+ //
95
+ // * `content_search_spec`: configuration for generic content search.
96
+ message GenericConfig {
97
+ // Specifies the expected behavior of content search.
98
+ // Only valid for content-search enabled data store.
99
+ SearchRequest.ContentSearchSpec content_search_spec = 1;
100
+ }
101
+
102
+ // Industry vertical specific config.
103
+ oneof vertical_config {
104
+ // The MediaConfig of the serving configuration.
105
+ MediaConfig media_config = 7;
106
+
107
+ // The GenericConfig of the serving configuration.
108
+ GenericConfig generic_config = 10;
109
+ }
110
+
111
+ // Immutable. Fully qualified name
112
+ // `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
113
+ string name = 1 [(google.api.field_behavior) = IMMUTABLE];
114
+
115
+ // Required. The human readable serving config display name. Used in Discovery
116
+ // UI.
117
+ //
118
+ // This field must be a UTF-8 encoded string with a length limit of 128
119
+ // characters. Otherwise, an INVALID_ARGUMENT error is returned.
120
+ string display_name = 2 [(google.api.field_behavior) = REQUIRED];
121
+
122
+ // Required. Immutable. Specifies the solution type that a serving config can
123
+ // be associated with.
124
+ SolutionType solution_type = 3 [
125
+ (google.api.field_behavior) = REQUIRED,
126
+ (google.api.field_behavior) = IMMUTABLE
127
+ ];
128
+
129
+ // The id of the model to use at serving time.
130
+ // Currently only RecommendationModels are supported.
131
+ // Can be changed but only to a compatible model (e.g.
132
+ // others-you-may-like CTR to others-you-may-like CVR).
133
+ //
134
+ // Required when
135
+ // [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
136
+ // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
137
+ string model_id = 4;
138
+
139
+ // How much diversity to use in recommendation model results e.g.
140
+ // `medium-diversity` or `high-diversity`. Currently supported values:
141
+ //
142
+ // * `no-diversity`
143
+ // * `low-diversity`
144
+ // * `medium-diversity`
145
+ // * `high-diversity`
146
+ // * `auto-diversity`
147
+ //
148
+ // If not specified, we choose default based on recommendation model
149
+ // type. Default value: `no-diversity`.
150
+ //
151
+ // Can only be set if
152
+ // [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
153
+ // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
154
+ string diversity_level = 5;
155
+
156
+ // Bring your own embedding config. The config is used for search semantic
157
+ // retrieval. The retrieval is based on the dot product of
158
+ // [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
159
+ // and the document embeddings that are provided by this EmbeddingConfig. If
160
+ // [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
161
+ // is provided, it overrides this
162
+ // [ServingConfig.embedding_config][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config].
163
+ EmbeddingConfig embedding_config = 20;
164
+
165
+ // The ranking expression controls the customized ranking on retrieval
166
+ // documents. To leverage this, document embedding is required. The ranking
167
+ // expression setting in ServingConfig applies to all search requests served
168
+ // by the serving config. However, if
169
+ // [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1alpha.SearchRequest.ranking_expression]
170
+ // is specified, it overrides the ServingConfig ranking expression.
171
+ //
172
+ // The ranking expression is a single function or multiple functions that are
173
+ // joined by "+".
174
+ // * ranking_expression = function, { " + ", function };
175
+ // Supported functions:
176
+ // * double * relevance_score
177
+ // * double * dotProduct(embedding_field_path)
178
+ // Function variables:
179
+ // relevance_score: pre-defined keywords, used for measure relevance between
180
+ // query and document.
181
+ // embedding_field_path: the document embedding field
182
+ // used with query embedding vector.
183
+ // dotProduct: embedding function between embedding_field_path and query
184
+ // embedding vector.
185
+ //
186
+ // Example ranking expression:
187
+ // If document has an embedding field doc_embedding, the ranking expression
188
+ // could be 0.5 * relevance_score + 0.3 * dotProduct(doc_embedding).
189
+ string ranking_expression = 21;
190
+
191
+ // Guided search configs.
192
+ GuidedSearchSpec guided_search_spec = 22;
193
+
194
+ // Custom fine tuning configs.
195
+ CustomFineTuningSpec custom_fine_tuning_spec = 24;
196
+
197
+ // Output only. ServingConfig created timestamp.
198
+ google.protobuf.Timestamp create_time = 8
199
+ [(google.api.field_behavior) = OUTPUT_ONLY];
200
+
201
+ // Output only. ServingConfig updated timestamp.
202
+ google.protobuf.Timestamp update_time = 9
203
+ [(google.api.field_behavior) = OUTPUT_ONLY];
204
+
205
+ // Filter controls to use in serving path.
206
+ // All triggered filter controls will be applied.
207
+ // Filter controls must be in the same data store as the serving config.
208
+ // Maximum of 20 filter controls.
209
+ repeated string filter_control_ids = 11;
210
+
211
+ // Boost controls to use in serving path.
212
+ // All triggered boost controls will be applied.
213
+ // Boost controls must be in the same data store as the serving config.
214
+ // Maximum of 20 boost controls.
215
+ repeated string boost_control_ids = 12;
216
+
217
+ // IDs of the redirect controls. Only the first triggered redirect
218
+ // action is applied, even if multiple apply. Maximum number of
219
+ // specifications is 100.
220
+ //
221
+ // Can only be set if
222
+ // [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
223
+ // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
224
+ repeated string redirect_control_ids = 14;
225
+
226
+ // Condition synonyms specifications. If multiple synonyms conditions
227
+ // match, all matching synonyms controls in the list will execute.
228
+ // Maximum number of specifications is 100.
229
+ //
230
+ // Can only be set if
231
+ // [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
232
+ // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
233
+ repeated string synonyms_control_ids = 15;
234
+
235
+ // Condition oneway synonyms specifications. If multiple oneway synonyms
236
+ // conditions match, all matching oneway synonyms controls in the list
237
+ // will execute. Maximum number of specifications is 100.
238
+ //
239
+ // Can only be set if
240
+ // [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
241
+ // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
242
+ repeated string oneway_synonyms_control_ids = 16;
243
+
244
+ // Condition do not associate specifications. If multiple do not
245
+ // associate conditions match, all matching do not associate controls in
246
+ // the list will execute.
247
+ // Order does not matter.
248
+ // Maximum number of specifications is 100.
249
+ //
250
+ // Can only be set if
251
+ // [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
252
+ // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
253
+ repeated string dissociate_control_ids = 17;
254
+
255
+ // Condition replacement specifications.
256
+ // Applied according to the order in the list.
257
+ // A previously replaced term can not be re-replaced.
258
+ // Maximum number of specifications is 100.
259
+ //
260
+ // Can only be set if
261
+ // [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
262
+ // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
263
+ repeated string replacement_control_ids = 18;
264
+
265
+ // Condition ignore specifications. If multiple ignore
266
+ // conditions match, all matching ignore controls in the list will
267
+ // execute.
268
+ // Order does not matter.
269
+ // Maximum number of specifications is 100.
270
+ repeated string ignore_control_ids = 19;
271
+ }
@@ -0,0 +1,148 @@
1
+ // Copyright 2022 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
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/resource.proto";
23
+ import "google/cloud/discoveryengine/v1alpha/serving_config.proto";
24
+ import "google/protobuf/field_mask.proto";
25
+
26
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
27
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
28
+ option java_multiple_files = true;
29
+ option java_outer_classname = "ServingConfigServiceProto";
30
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
31
+ option objc_class_prefix = "DISCOVERYENGINE";
32
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
33
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
34
+
35
+ // Service for operations related to
36
+ // [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig].
37
+ service ServingConfigService {
38
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
39
+ option (google.api.oauth_scopes) =
40
+ "https://www.googleapis.com/auth/cloud-platform";
41
+
42
+ // Updates a ServingConfig.
43
+ //
44
+ // Returns a NOT_FOUND error if the ServingConfig does not exist.
45
+ rpc UpdateServingConfig(UpdateServingConfigRequest) returns (ServingConfig) {
46
+ option (google.api.http) = {
47
+ patch: "/v1alpha/{serving_config.name=projects/*/locations/*/dataStores/*/servingConfigs/*}"
48
+ body: "serving_config"
49
+ additional_bindings {
50
+ patch: "/v1alpha/{serving_config.name=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}"
51
+ body: "serving_config"
52
+ }
53
+ additional_bindings {
54
+ patch: "/v1alpha/{serving_config.name=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}"
55
+ body: "serving_config"
56
+ }
57
+ };
58
+ option (google.api.method_signature) = "serving_config,update_mask";
59
+ }
60
+
61
+ // Gets a ServingConfig.
62
+ //
63
+ // Returns a NotFound error if the ServingConfig does not exist.
64
+ rpc GetServingConfig(GetServingConfigRequest) returns (ServingConfig) {
65
+ option (google.api.http) = {
66
+ get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/servingConfigs/*}"
67
+ additional_bindings {
68
+ get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}"
69
+ }
70
+ additional_bindings {
71
+ get: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}"
72
+ }
73
+ };
74
+ option (google.api.method_signature) = "name";
75
+ }
76
+
77
+ // Lists all ServingConfigs linked to this dataStore.
78
+ rpc ListServingConfigs(ListServingConfigsRequest)
79
+ returns (ListServingConfigsResponse) {
80
+ option (google.api.http) = {
81
+ get: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/servingConfigs"
82
+ additional_bindings {
83
+ get: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/servingConfigs"
84
+ }
85
+ additional_bindings {
86
+ get: "/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*}/servingConfigs"
87
+ }
88
+ };
89
+ option (google.api.method_signature) = "parent";
90
+ }
91
+ }
92
+
93
+ // Request for UpdateServingConfig method.
94
+ message UpdateServingConfigRequest {
95
+ // Required. The ServingConfig to update.
96
+ ServingConfig serving_config = 1 [(google.api.field_behavior) = REQUIRED];
97
+
98
+ // Indicates which fields in the provided
99
+ // [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] to
100
+ // update. The following are NOT supported:
101
+ //
102
+ // * [ServingConfig.name][google.cloud.discoveryengine.v1alpha.ServingConfig.name]
103
+ //
104
+ // If not set, all supported fields are updated.
105
+ google.protobuf.FieldMask update_mask = 2;
106
+ }
107
+
108
+ // Request for GetServingConfig method.
109
+ message GetServingConfigRequest {
110
+ // Required. The resource name of the ServingConfig to get. Format:
111
+ // `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`
112
+ string name = 1 [
113
+ (google.api.field_behavior) = REQUIRED,
114
+ (google.api.resource_reference) = {
115
+ type: "discoveryengine.googleapis.com/ServingConfig"
116
+ }
117
+ ];
118
+ }
119
+
120
+ // Request for ListServingConfigs method.
121
+ message ListServingConfigsRequest {
122
+ // Required. Full resource name of the parent resource. Format:
123
+ // `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`
124
+ string parent = 1 [
125
+ (google.api.field_behavior) = REQUIRED,
126
+ (google.api.resource_reference) = {
127
+ child_type: "discoveryengine.googleapis.com/ServingConfig"
128
+ }
129
+ ];
130
+
131
+ // Optional. Maximum number of results to return. If unspecified, defaults
132
+ // to 100. If a value greater than 100 is provided, at most 100 results are
133
+ // returned.
134
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
135
+
136
+ // Optional. A page token, received from a previous `ListServingConfigs` call.
137
+ // Provide this to retrieve the subsequent page.
138
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
139
+ }
140
+
141
+ // Response for ListServingConfigs method.
142
+ message ListServingConfigsResponse {
143
+ // All the ServingConfigs for a given dataStore.
144
+ repeated ServingConfig serving_configs = 1;
145
+
146
+ // Pagination token, if not returned indicates the last page.
147
+ string next_page_token = 2;
148
+ }
@@ -53,8 +53,14 @@ message TargetSite {
53
53
 
54
54
  // Site search indexing failure reasons.
55
55
  message FailureReason {
56
- message QuotaFailure {}
56
+ // Failed due to insufficient quota.
57
+ message QuotaFailure {
58
+ // This number is an estimation on how much total quota this project needs
59
+ // to successfully complete indexing.
60
+ int64 total_required_quota = 1;
61
+ }
57
62
 
63
+ // Failure reason.
58
64
  oneof failure {
59
65
  // Failed due to insufficient quota.
60
66
  QuotaFailure quota_failure = 1;
@@ -108,7 +114,7 @@ message TargetSite {
108
114
  (google.api.field_behavior) = INPUT_ONLY
109
115
  ];
110
116
 
111
- // The type of the target site, e.g. whether the site is to be included or
117
+ // The type of the target site, e.g., whether the site is to be included or
112
118
  // excluded.
113
119
  Type type = 3;
114
120
 
@@ -152,7 +158,7 @@ message SiteVerificationInfo {
152
158
  // Site ownership pending verification or verification failed.
153
159
  UNVERIFIED = 2;
154
160
 
155
- // Site exempt from verification, e.g. a public website that opens to all.
161
+ // Site exempt from verification, e.g., a public website that opens to all.
156
162
  EXEMPTED = 3;
157
163
  }
158
164
 
@@ -275,7 +275,9 @@ message CreateTargetSiteMetadata {
275
275
  google.protobuf.Timestamp update_time = 2;
276
276
  }
277
277
 
278
- // Request message for [SiteSearchEngineService.s][] method.
278
+ // Request message for
279
+ // [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchCreateTargetSites]
280
+ // method.
279
281
  message BatchCreateTargetSitesRequest {
280
282
  // Required. The parent resource shared by all TargetSites being created.
281
283
  // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.
@@ -430,8 +432,9 @@ message ListTargetSitesResponse {
430
432
  }
431
433
 
432
434
  // Metadata related to the progress of the
433
- // [SiteSearchEngineService.BatchCreateTargetSite][] operation. This will be
434
- // returned by the google.longrunning.Operation.metadata field.
435
+ // [SiteSearchEngineService.BatchCreateTargetSites][google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.BatchCreateTargetSites]
436
+ // operation. This will be returned by the google.longrunning.Operation.metadata
437
+ // field.
435
438
  message BatchCreateTargetSiteMetadata {
436
439
  // Operation create time.
437
440
  google.protobuf.Timestamp create_time = 1;
@@ -546,7 +549,7 @@ message RecrawlUrisResponse {
546
549
  // Details about why a particular URI failed to be crawled. Each FailureInfo
547
550
  // contains one FailureReason per CorpusType.
548
551
  message FailureInfo {
549
- // Details about why crawling failed for a particular CorpusType, e.g.
552
+ // Details about why crawling failed for a particular CorpusType, e.g.,
550
553
  // DESKTOP and MOBILE crawling may fail for different reasons.
551
554
  message FailureReason {
552
555
  // CorpusType for the failed crawling operation.
@@ -146,9 +146,10 @@ message UserEvent {
146
146
  // conforming to https://google.aip.dev/160#filtering.
147
147
  //
148
148
  // Similarly, for `view-item-list` events that are generated from a
149
- // [RecommendationService.RecommendRequest][], this field may be populated
150
- // directly from [RecommendationService.RecommendRequest.filter][] conforming
151
- // to https://google.aip.dev/160#filtering.
149
+ // [RecommendRequest][google.cloud.discoveryengine.v1alpha.RecommendRequest],
150
+ // this field may be populated directly from
151
+ // [RecommendRequest.filter][google.cloud.discoveryengine.v1alpha.RecommendRequest.filter]
152
+ // conforming to https://google.aip.dev/160#filtering.
152
153
  //
153
154
  // The value must be a UTF-8 encoded string with a length limit of 1,000
154
155
  // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
@@ -223,6 +223,11 @@ message ConverseConversationRequest {
223
223
  // operators, see
224
224
  // [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
225
225
  string filter = 9;
226
+
227
+ // Boost specification to boost certain documents in search results which may
228
+ // affect the converse response. For more information on boosting, see
229
+ // [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
230
+ SearchRequest.BoostSpec boost_spec = 10;
226
231
  }
227
232
 
228
233
  // Response message for
@@ -19,6 +19,8 @@ package google.cloud.discoveryengine.v1beta;
19
19
  import "google/api/field_behavior.proto";
20
20
  import "google/api/resource.proto";
21
21
  import "google/cloud/discoveryengine/v1beta/common.proto";
22
+ import "google/cloud/discoveryengine/v1beta/document_processing_config.proto";
23
+ import "google/cloud/discoveryengine/v1beta/schema.proto";
22
24
  import "google/protobuf/timestamp.proto";
23
25
 
24
26
  option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
@@ -95,4 +97,24 @@ message DataStore {
95
97
  // [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
96
98
  google.protobuf.Timestamp create_time = 4
97
99
  [(google.api.field_behavior) = OUTPUT_ONLY];
100
+
101
+ // Configuration for Document understanding and enrichment.
102
+ DocumentProcessingConfig document_processing_config = 27;
103
+
104
+ // The start schema to use for this
105
+ // [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
106
+ // provisioning it. If unset, a default vertical specialized schema will be
107
+ // used.
108
+ //
109
+ // This field is only used by [CreateDataStore][] API, and will be ignored if
110
+ // used in other APIs. This field will be omitted from all API responses
111
+ // including [CreateDataStore][] API. To retrieve a schema of a
112
+ // [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
113
+ // [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
114
+ // API instead.
115
+ //
116
+ // The provided schema will be validated against certain rules on schema.
117
+ // Learn more from [this
118
+ // doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
119
+ Schema starting_schema = 28;
98
120
  }
@@ -19,6 +19,7 @@ package google.cloud.discoveryengine.v1beta;
19
19
  import "google/api/field_behavior.proto";
20
20
  import "google/api/resource.proto";
21
21
  import "google/protobuf/struct.proto";
22
+ import "google/protobuf/timestamp.proto";
22
23
 
23
24
  option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
24
25
  option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
@@ -118,4 +119,12 @@ message Document {
118
119
  // It contains derived data that are not in the original input document.
119
120
  google.protobuf.Struct derived_struct_data = 6
120
121
  [(google.api.field_behavior) = OUTPUT_ONLY];
122
+
123
+ // Output only. The last time the document was indexed. If this field is set,
124
+ // the document could be returned in search results.
125
+ //
126
+ // This field is OUTPUT_ONLY. If this field is not populated, it means the
127
+ // document has never been indexed.
128
+ google.protobuf.Timestamp index_time = 13
129
+ [(google.api.field_behavior) = OUTPUT_ONLY];
121
130
  }