@google-cloud/discoveryengine 1.10.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 (129) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +33 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/evaluation.proto +232 -0
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/evaluation_service.proto +252 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +83 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query.proto +86 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_service.proto +264 -0
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_set.proto +64 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_set_service.proto +258 -0
  10. package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +14 -0
  11. package/build/protos/google/cloud/discoveryengine/v1beta/chunk.proto +119 -0
  12. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +0 -5
  13. package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +31 -0
  14. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +38 -0
  15. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +29 -2
  16. package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +7 -1
  17. package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +23 -0
  18. package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +10 -0
  19. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +1 -1
  20. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +37 -2
  21. package/build/protos/google/cloud/discoveryengine/v1beta/evaluation.proto +231 -0
  22. package/build/protos/google/cloud/discoveryengine/v1beta/evaluation_service.proto +252 -0
  23. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +191 -0
  24. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +111 -0
  25. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query.proto +86 -0
  26. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_service.proto +264 -0
  27. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_set.proto +64 -0
  28. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_set_service.proto +256 -0
  29. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +370 -8
  30. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +11 -5
  31. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +24 -0
  32. package/build/protos/protos.d.ts +32735 -21073
  33. package/build/protos/protos.js +80768 -53241
  34. package/build/protos/protos.json +5309 -2481
  35. package/build/src/v1alpha/acl_config_service_client.d.ts +108 -0
  36. package/build/src/v1alpha/acl_config_service_client.js +157 -0
  37. package/build/src/v1alpha/chunk_service_client.d.ts +108 -0
  38. package/build/src/v1alpha/chunk_service_client.js +157 -0
  39. package/build/src/v1alpha/completion_service_client.d.ts +108 -0
  40. package/build/src/v1alpha/completion_service_client.js +157 -0
  41. package/build/src/v1alpha/control_service_client.d.ts +108 -0
  42. package/build/src/v1alpha/control_service_client.js +157 -0
  43. package/build/src/v1alpha/conversational_search_service_client.d.ts +108 -0
  44. package/build/src/v1alpha/conversational_search_service_client.js +157 -0
  45. package/build/src/v1alpha/data_store_service_client.d.ts +108 -0
  46. package/build/src/v1alpha/data_store_service_client.js +157 -0
  47. package/build/src/v1alpha/document_service_client.d.ts +108 -0
  48. package/build/src/v1alpha/document_service_client.js +157 -0
  49. package/build/src/v1alpha/engine_service_client.d.ts +108 -0
  50. package/build/src/v1alpha/engine_service_client.js +157 -0
  51. package/build/src/v1alpha/estimate_billing_service_client.d.ts +108 -0
  52. package/build/src/v1alpha/estimate_billing_service_client.js +157 -0
  53. package/build/src/v1alpha/evaluation_service_client.d.ts +2349 -0
  54. package/build/src/v1alpha/evaluation_service_client.js +3288 -0
  55. package/build/src/v1alpha/evaluation_service_client_config.json +58 -0
  56. package/build/src/v1alpha/grounded_generation_service_client.d.ts +108 -0
  57. package/build/src/v1alpha/grounded_generation_service_client.js +157 -0
  58. package/build/src/v1alpha/index.d.ts +3 -0
  59. package/build/src/v1alpha/index.js +7 -1
  60. package/build/src/v1alpha/project_service_client.d.ts +108 -0
  61. package/build/src/v1alpha/project_service_client.js +157 -0
  62. package/build/src/v1alpha/rank_service_client.d.ts +108 -0
  63. package/build/src/v1alpha/rank_service_client.js +157 -0
  64. package/build/src/v1alpha/recommendation_service_client.d.ts +108 -0
  65. package/build/src/v1alpha/recommendation_service_client.js +157 -0
  66. package/build/src/v1alpha/sample_query_service_client.d.ts +2317 -0
  67. package/build/src/v1alpha/sample_query_service_client.js +3186 -0
  68. package/build/src/v1alpha/sample_query_service_client_config.json +68 -0
  69. package/build/src/v1alpha/sample_query_set_service_client.d.ts +2176 -0
  70. package/build/src/v1alpha/sample_query_set_service_client.js +2931 -0
  71. package/build/src/v1alpha/sample_query_set_service_client_config.json +63 -0
  72. package/build/src/v1alpha/schema_service_client.d.ts +108 -0
  73. package/build/src/v1alpha/schema_service_client.js +157 -0
  74. package/build/src/v1alpha/search_service_client.d.ts +108 -0
  75. package/build/src/v1alpha/search_service_client.js +157 -0
  76. package/build/src/v1alpha/search_tuning_service_client.d.ts +108 -0
  77. package/build/src/v1alpha/search_tuning_service_client.js +157 -0
  78. package/build/src/v1alpha/serving_config_service_client.d.ts +108 -0
  79. package/build/src/v1alpha/serving_config_service_client.js +157 -0
  80. package/build/src/v1alpha/site_search_engine_service_client.d.ts +108 -0
  81. package/build/src/v1alpha/site_search_engine_service_client.js +157 -0
  82. package/build/src/v1alpha/user_event_service_client.d.ts +108 -0
  83. package/build/src/v1alpha/user_event_service_client.js +157 -0
  84. package/build/src/v1beta/completion_service_client.d.ts +328 -0
  85. package/build/src/v1beta/completion_service_client.js +423 -0
  86. package/build/src/v1beta/completion_service_client_config.json +10 -0
  87. package/build/src/v1beta/control_service_client.d.ts +237 -0
  88. package/build/src/v1beta/control_service_client.js +333 -0
  89. package/build/src/v1beta/conversational_search_service_client.d.ts +255 -0
  90. package/build/src/v1beta/conversational_search_service_client.js +333 -0
  91. package/build/src/v1beta/data_store_service_client.d.ts +246 -0
  92. package/build/src/v1beta/data_store_service_client.js +339 -0
  93. package/build/src/v1beta/document_service_client.d.ts +239 -0
  94. package/build/src/v1beta/document_service_client.js +339 -0
  95. package/build/src/v1beta/engine_service_client.d.ts +237 -0
  96. package/build/src/v1beta/engine_service_client.js +339 -0
  97. package/build/src/v1beta/evaluation_service_client.d.ts +2325 -0
  98. package/build/src/v1beta/evaluation_service_client.js +3252 -0
  99. package/build/src/v1beta/evaluation_service_client_config.json +58 -0
  100. package/build/src/v1beta/grounded_generation_service_client.d.ts +237 -0
  101. package/build/src/v1beta/grounded_generation_service_client.js +333 -0
  102. package/build/src/v1beta/index.d.ts +3 -0
  103. package/build/src/v1beta/index.js +7 -1
  104. package/build/src/v1beta/project_service_client.d.ts +237 -0
  105. package/build/src/v1beta/project_service_client.js +339 -0
  106. package/build/src/v1beta/rank_service_client.d.ts +237 -0
  107. package/build/src/v1beta/rank_service_client.js +333 -0
  108. package/build/src/v1beta/recommendation_service_client.d.ts +237 -0
  109. package/build/src/v1beta/recommendation_service_client.js +333 -0
  110. package/build/src/v1beta/sample_query_service_client.d.ts +2293 -0
  111. package/build/src/v1beta/sample_query_service_client.js +3150 -0
  112. package/build/src/v1beta/sample_query_service_client_config.json +68 -0
  113. package/build/src/v1beta/sample_query_set_service_client.d.ts +2150 -0
  114. package/build/src/v1beta/sample_query_set_service_client.js +2895 -0
  115. package/build/src/v1beta/sample_query_set_service_client_config.json +63 -0
  116. package/build/src/v1beta/schema_service_client.d.ts +237 -0
  117. package/build/src/v1beta/schema_service_client.js +339 -0
  118. package/build/src/v1beta/search_service_client.d.ts +414 -12
  119. package/build/src/v1beta/search_service_client.js +451 -8
  120. package/build/src/v1beta/search_tuning_service_client.d.ts +237 -0
  121. package/build/src/v1beta/search_tuning_service_client.js +339 -0
  122. package/build/src/v1beta/serving_config_service_client.d.ts +237 -0
  123. package/build/src/v1beta/serving_config_service_client.js +333 -0
  124. package/build/src/v1beta/site_search_engine_service_client.d.ts +237 -0
  125. package/build/src/v1beta/site_search_engine_service_client.js +339 -0
  126. package/build/src/v1beta/user_event_service_client.d.ts +312 -0
  127. package/build/src/v1beta/user_event_service_client.js +381 -0
  128. package/build/src/v1beta/user_event_service_client_config.json +5 -0
  129. package/package.json +1 -1
@@ -0,0 +1,252 @@
1
+ // Copyright 2024 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/evaluation.proto";
24
+ import "google/cloud/discoveryengine/v1alpha/sample_query.proto";
25
+ import "google/longrunning/operations.proto";
26
+
27
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
28
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
29
+ option java_multiple_files = true;
30
+ option java_outer_classname = "EvaluationServiceProto";
31
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
32
+ option objc_class_prefix = "DISCOVERYENGINE";
33
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
34
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
35
+
36
+ // Service for managing
37
+ // [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s,
38
+ service EvaluationService {
39
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
40
+ option (google.api.oauth_scopes) =
41
+ "https://www.googleapis.com/auth/cloud-platform";
42
+
43
+ // Gets a [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation].
44
+ rpc GetEvaluation(GetEvaluationRequest) returns (Evaluation) {
45
+ option (google.api.http) = {
46
+ get: "/v1alpha/{name=projects/*/locations/*/evaluations/*}"
47
+ };
48
+ option (google.api.method_signature) = "name";
49
+ }
50
+
51
+ // Gets a list of
52
+ // [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s.
53
+ rpc ListEvaluations(ListEvaluationsRequest)
54
+ returns (ListEvaluationsResponse) {
55
+ option (google.api.http) = {
56
+ get: "/v1alpha/{parent=projects/*/locations/*}/evaluations"
57
+ };
58
+ option (google.api.method_signature) = "parent";
59
+ }
60
+
61
+ // Creates a [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation].
62
+ //
63
+ // Upon creation, the evaluation will be automatically triggered and begin
64
+ // execution.
65
+ rpc CreateEvaluation(CreateEvaluationRequest)
66
+ returns (google.longrunning.Operation) {
67
+ option (google.api.http) = {
68
+ post: "/v1alpha/{parent=projects/*/locations/*}/evaluations"
69
+ body: "evaluation"
70
+ };
71
+ option (google.api.method_signature) = "parent,evaluation";
72
+ option (google.longrunning.operation_info) = {
73
+ response_type: "google.cloud.discoveryengine.v1alpha.Evaluation"
74
+ metadata_type: "google.cloud.discoveryengine.v1alpha.CreateEvaluationMetadata"
75
+ };
76
+ }
77
+
78
+ // Gets a list of results for a given a
79
+ // [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation].
80
+ rpc ListEvaluationResults(ListEvaluationResultsRequest)
81
+ returns (ListEvaluationResultsResponse) {
82
+ option (google.api.http) = {
83
+ get: "/v1alpha/{evaluation=projects/*/locations/*/evaluations/*}:listResults"
84
+ };
85
+ option (google.api.method_signature) = "evaluation";
86
+ }
87
+ }
88
+
89
+ // Request message for
90
+ // [EvaluationService.GetEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.GetEvaluation]
91
+ // method.
92
+ message GetEvaluationRequest {
93
+ // Required. Full resource name of
94
+ // [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation], such as
95
+ // `projects/{project}/locations/{location}/evaluations/{evaluation}`.
96
+ //
97
+ // If the caller does not have permission to access the
98
+ // [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation], regardless
99
+ // of whether or not it exists, a PERMISSION_DENIED error is returned.
100
+ //
101
+ // If the requested
102
+ // [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation] does not
103
+ // exist, a NOT_FOUND error is returned.
104
+ string name = 1 [
105
+ (google.api.field_behavior) = REQUIRED,
106
+ (google.api.resource_reference) = {
107
+ type: "discoveryengine.googleapis.com/Evaluation"
108
+ }
109
+ ];
110
+ }
111
+
112
+ // Request message for
113
+ // [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations]
114
+ // method.
115
+ message ListEvaluationsRequest {
116
+ // Required. The parent location resource name, such as
117
+ // `projects/{project}/locations/{location}`.
118
+ //
119
+ // If the caller does not have permission to list
120
+ // [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s under this
121
+ // location, regardless of whether or not this location exists, a
122
+ // `PERMISSION_DENIED` error is returned.
123
+ string parent = 1 [
124
+ (google.api.field_behavior) = REQUIRED,
125
+ (google.api.resource_reference) = {
126
+ type: "discoveryengine.googleapis.com/Location"
127
+ }
128
+ ];
129
+
130
+ // Maximum number of
131
+ // [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s to return.
132
+ // If unspecified, defaults to 100. The maximum allowed value is 1000. Values
133
+ // above 1000 will be coerced to 1000.
134
+ //
135
+ // If this field is negative, an `INVALID_ARGUMENT` error is returned.
136
+ int32 page_size = 2;
137
+
138
+ // A page token
139
+ // [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListEvaluationsResponse.next_page_token],
140
+ // received from a previous
141
+ // [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations]
142
+ // call. Provide this to retrieve the subsequent page.
143
+ //
144
+ // When paginating, all other parameters provided to
145
+ // [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations]
146
+ // must match the call that provided the page token. Otherwise, an
147
+ // `INVALID_ARGUMENT` error is returned.
148
+ string page_token = 3;
149
+ }
150
+
151
+ // Response message for
152
+ // [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluations]
153
+ // method.
154
+ message ListEvaluationsResponse {
155
+ // The [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]s.
156
+ repeated Evaluation evaluations = 1;
157
+
158
+ // A token that can be sent as
159
+ // [ListEvaluationsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListEvaluationsRequest.page_token]
160
+ // to retrieve the next page. If this field is omitted, there are no
161
+ // subsequent pages.
162
+ string next_page_token = 2;
163
+ }
164
+
165
+ // Request message for
166
+ // [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.CreateEvaluation]
167
+ // method.
168
+ message CreateEvaluationRequest {
169
+ // Required. The parent resource name, such as
170
+ // `projects/{project}/locations/{location}`.
171
+ string parent = 1 [
172
+ (google.api.field_behavior) = REQUIRED,
173
+ (google.api.resource_reference) = {
174
+ type: "discoveryengine.googleapis.com/Location"
175
+ }
176
+ ];
177
+
178
+ // Required. The [Evaluation][google.cloud.discoveryengine.v1alpha.Evaluation]
179
+ // to create.
180
+ Evaluation evaluation = 2 [(google.api.field_behavior) = REQUIRED];
181
+ }
182
+
183
+ // Metadata for
184
+ // [EvaluationService.CreateEvaluation][google.cloud.discoveryengine.v1alpha.EvaluationService.CreateEvaluation]
185
+ // method.
186
+ message CreateEvaluationMetadata {}
187
+
188
+ // Request message for
189
+ // [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults]
190
+ // method.
191
+ message ListEvaluationResultsRequest {
192
+ // Required. The evaluation resource name, such as
193
+ // `projects/{project}/locations/{location}/evaluations/{evaluation}`.
194
+ //
195
+ // If the caller does not have permission to list [EvaluationResult][]
196
+ // under this evaluation, regardless of whether or not this evaluation
197
+ // set exists, a `PERMISSION_DENIED` error is returned.
198
+ string evaluation = 1 [
199
+ (google.api.field_behavior) = REQUIRED,
200
+ (google.api.resource_reference) = {
201
+ type: "discoveryengine.googleapis.com/Evaluation"
202
+ }
203
+ ];
204
+
205
+ // Maximum number of [EvaluationResult][] to return. If unspecified,
206
+ // defaults to 100. The maximum allowed value is 1000. Values above 1000 will
207
+ // be coerced to 1000.
208
+ //
209
+ // If this field is negative, an `INVALID_ARGUMENT` error is returned.
210
+ int32 page_size = 2;
211
+
212
+ // A page token
213
+ // [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListEvaluationResultsResponse.next_page_token],
214
+ // received from a previous
215
+ // [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults]
216
+ // call. Provide this to retrieve the subsequent page.
217
+ //
218
+ // When paginating, all other parameters provided to
219
+ // [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults]
220
+ // must match the call that provided the page token. Otherwise, an
221
+ // `INVALID_ARGUMENT` error is returned.
222
+ string page_token = 3;
223
+ }
224
+
225
+ // Response message for
226
+ // [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1alpha.EvaluationService.ListEvaluationResults]
227
+ // method.
228
+ message ListEvaluationResultsResponse {
229
+ // Represents the results of an evaluation for a single
230
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery].
231
+ message EvaluationResult {
232
+ // Output only. The
233
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] that was
234
+ // evaluated.
235
+ SampleQuery sample_query = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
236
+
237
+ // Output only. The metrics produced by the evaluation, for a given
238
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery].
239
+ QualityMetrics quality_metrics = 2
240
+ [(google.api.field_behavior) = OUTPUT_ONLY];
241
+ }
242
+
243
+ // The
244
+ // [EvaluationResult][google.cloud.discoveryengine.v1alpha.ListEvaluationResultsResponse.EvaluationResult]s.
245
+ repeated EvaluationResult evaluation_results = 1;
246
+
247
+ // A token that can be sent as
248
+ // [ListEvaluationResultsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListEvaluationResultsRequest.page_token]
249
+ // to retrieve the next page. If this field is omitted, there are no
250
+ // subsequent pages.
251
+ string next_page_token = 2;
252
+ }
@@ -20,6 +20,7 @@ import "google/api/field_behavior.proto";
20
20
  import "google/api/resource.proto";
21
21
  import "google/cloud/discoveryengine/v1alpha/completion.proto";
22
22
  import "google/cloud/discoveryengine/v1alpha/document.proto";
23
+ import "google/cloud/discoveryengine/v1alpha/sample_query.proto";
23
24
  import "google/cloud/discoveryengine/v1alpha/user_event.proto";
24
25
  import "google/protobuf/field_mask.proto";
25
26
  import "google/protobuf/timestamp.proto";
@@ -664,3 +665,85 @@ message ImportSuggestionDenyListEntriesMetadata {
664
665
  // finish time.
665
666
  google.protobuf.Timestamp update_time = 2;
666
667
  }
668
+
669
+ // Request message for
670
+ // [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ImportSampleQueries]
671
+ // method.
672
+ message ImportSampleQueriesRequest {
673
+ // The inline source for
674
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s.
675
+ message InlineSource {
676
+ // Required. A list of
677
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s to
678
+ // import. Max of 1000 items.
679
+ repeated SampleQuery sample_queries = 1
680
+ [(google.api.field_behavior) = REQUIRED];
681
+ }
682
+
683
+ // The source of the sample queries.
684
+ oneof source {
685
+ // The Inline source for sample query entries.
686
+ InlineSource inline_source = 2;
687
+
688
+ // Cloud Storage location for the input content.
689
+ GcsSource gcs_source = 3;
690
+
691
+ // BigQuery input source.
692
+ BigQuerySource bigquery_source = 4;
693
+ }
694
+
695
+ // Required. The parent sample query set resource name, such as
696
+ // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
697
+ //
698
+ // If the caller does not have permission to list
699
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s under this
700
+ // sample query set, regardless of whether or not this sample query set
701
+ // exists, a `PERMISSION_DENIED` error is returned.
702
+ string parent = 1 [
703
+ (google.api.field_behavior) = REQUIRED,
704
+ (google.api.resource_reference) = {
705
+ type: "discoveryengine.googleapis.com/SampleQuerySet"
706
+ }
707
+ ];
708
+
709
+ // The desired location of errors incurred during the Import.
710
+ ImportErrorConfig error_config = 5;
711
+ }
712
+
713
+ // Response of the
714
+ // [SampleQueryService.ImportSampleQueries][google.cloud.discoveryengine.v1alpha.SampleQueryService.ImportSampleQueries]
715
+ // method. If the long running operation is done, this message is returned by
716
+ // the google.longrunning.Operations.response field if the operation is
717
+ // successful.
718
+ message ImportSampleQueriesResponse {
719
+ // A sample of errors encountered while processing the request.
720
+ repeated google.rpc.Status error_samples = 1;
721
+
722
+ // The desired location of errors incurred during the Import.
723
+ ImportErrorConfig error_config = 2;
724
+ }
725
+
726
+ // Metadata related to the progress of the ImportSampleQueries
727
+ // operation. This will be returned by the google.longrunning.Operation.metadata
728
+ // field.
729
+ message ImportSampleQueriesMetadata {
730
+ // ImportSampleQueries operation create time.
731
+ google.protobuf.Timestamp create_time = 1;
732
+
733
+ // ImportSampleQueries operation last update time. If the operation is done,
734
+ // this is also the finish time.
735
+ google.protobuf.Timestamp update_time = 2;
736
+
737
+ // Count of [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s
738
+ // successfully imported.
739
+ int64 success_count = 3;
740
+
741
+ // Count of [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s
742
+ // that failed to be imported.
743
+ int64 failure_count = 4;
744
+
745
+ // Total count of
746
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery]s that were
747
+ // processed.
748
+ int64 total_count = 5;
749
+ }
@@ -0,0 +1,86 @@
1
+ // Copyright 2024 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/protobuf/timestamp.proto";
22
+
23
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
24
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "SampleQueryProto";
27
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
28
+ option objc_class_prefix = "DISCOVERYENGINE";
29
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
30
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
31
+
32
+ // Sample Query captures metadata to be used for evaluation.
33
+ message SampleQuery {
34
+ option (google.api.resource) = {
35
+ type: "discoveryengine.googleapis.com/SampleQuery"
36
+ pattern: "projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}"
37
+ };
38
+
39
+ // Query Entry captures metadata to be used for search evaluation.
40
+ message QueryEntry {
41
+ // Defines the parameters of the query's expected outcome.
42
+ message Target {
43
+ // Expected uri of the target.
44
+ //
45
+ // This field must be a UTF-8 encoded string with a length limit of 2048
46
+ // characters.
47
+ //
48
+ // Example of valid uris: `https://example.com/abc`,
49
+ // `gcs://example/example.pdf`.
50
+ string uri = 1;
51
+
52
+ // Expected page numbers of the target.
53
+ //
54
+ // Each page number must be non negative.
55
+ repeated int32 page_numbers = 2;
56
+
57
+ // Relevance score of the target.
58
+ optional double score = 3;
59
+ }
60
+
61
+ // Required. The query.
62
+ string query = 1 [(google.api.field_behavior) = REQUIRED];
63
+
64
+ // List of targets for the query.
65
+ repeated Target targets = 3;
66
+ }
67
+
68
+ // The content of the sample query.
69
+ oneof content {
70
+ // The query entry.
71
+ QueryEntry query_entry = 2;
72
+ }
73
+
74
+ // Identifier. The full resource name of the sample query, in the format of
75
+ // `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`.
76
+ //
77
+ // This field must be a UTF-8 encoded string with a length limit of 1024
78
+ // characters.
79
+ string name = 1 [(google.api.field_behavior) = IDENTIFIER];
80
+
81
+ // Output only. Timestamp the
82
+ // [SampleQuery][google.cloud.discoveryengine.v1alpha.SampleQuery] was created
83
+ // at.
84
+ google.protobuf.Timestamp create_time = 3
85
+ [(google.api.field_behavior) = OUTPUT_ONLY];
86
+ }