@google-cloud/discoveryengine 1.1.0 → 1.3.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.
- package/CHANGELOG.md +14 -0
- package/README.md +39 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +190 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +134 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +138 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +306 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +307 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +370 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +336 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +227 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +874 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
- package/build/protos/protos.d.ts +16365 -7
- package/build/protos/protos.js +42499 -1945
- package/build/protos/protos.json +4455 -5
- package/build/src/index.d.ts +3 -1
- package/build/src/index.js +4 -1
- package/build/src/v1alpha/completion_service_client.d.ts +645 -0
- package/build/src/v1alpha/completion_service_client.js +901 -0
- package/build/src/v1alpha/completion_service_client_config.json +43 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +1040 -0
- package/build/src/v1alpha/conversational_search_service_client.js +1333 -0
- package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +1060 -0
- package/build/src/v1alpha/data_store_service_client.js +1431 -0
- package/build/src/v1alpha/data_store_service_client_config.json +46 -0
- package/build/src/v1alpha/document_service_client.d.ts +1257 -0
- package/build/src/v1alpha/document_service_client.js +1555 -0
- package/build/src/v1alpha/document_service_client_config.json +82 -0
- package/build/src/v1alpha/engine_service_client.d.ts +1079 -0
- package/build/src/v1alpha/engine_service_client.js +1481 -0
- package/build/src/v1alpha/engine_service_client_config.json +58 -0
- package/build/src/v1alpha/index.d.ts +10 -0
- package/build/src/v1alpha/index.js +41 -0
- package/build/src/v1alpha/recommendation_service_client.d.ts +858 -0
- package/build/src/v1alpha/recommendation_service_client.js +1100 -0
- package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
- package/build/src/v1alpha/schema_service_client.d.ts +977 -0
- package/build/src/v1alpha/schema_service_client.js +1385 -0
- package/build/src/v1alpha/schema_service_client_config.json +63 -0
- package/build/src/v1alpha/search_service_client.d.ts +1394 -0
- package/build/src/v1alpha/search_service_client.js +1640 -0
- package/build/src/v1alpha/search_service_client_config.json +43 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +821 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +1249 -0
- package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +895 -0
- package/build/src/v1alpha/user_event_service_client.js +1232 -0
- package/build/src/v1alpha/user_event_service_client_config.json +67 -0
- package/package.json +5 -5
@@ -0,0 +1,336 @@
|
|
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/engine.proto";
|
24
|
+
import "google/longrunning/operations.proto";
|
25
|
+
import "google/protobuf/empty.proto";
|
26
|
+
import "google/protobuf/field_mask.proto";
|
27
|
+
import "google/protobuf/timestamp.proto";
|
28
|
+
|
29
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
30
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
31
|
+
option java_multiple_files = true;
|
32
|
+
option java_outer_classname = "EngineServiceProto";
|
33
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
34
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
35
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
36
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
37
|
+
|
38
|
+
// Service for managing [Engine][google.cloud.discoveryengine.v1alpha.Engine]
|
39
|
+
// configuration.
|
40
|
+
service EngineService {
|
41
|
+
option (google.api.default_host) = "discoveryengine.googleapis.com";
|
42
|
+
option (google.api.oauth_scopes) =
|
43
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
44
|
+
|
45
|
+
// Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
46
|
+
rpc CreateEngine(CreateEngineRequest) returns (google.longrunning.Operation) {
|
47
|
+
option (google.api.http) = {
|
48
|
+
post: "/v1alpha/{parent=projects/*/locations/*/collections/*}/engines"
|
49
|
+
body: "engine"
|
50
|
+
};
|
51
|
+
option (google.api.method_signature) = "parent,engine,engine_id";
|
52
|
+
option (google.longrunning.operation_info) = {
|
53
|
+
response_type: "google.cloud.discoveryengine.v1alpha.Engine"
|
54
|
+
metadata_type: "google.cloud.discoveryengine.v1alpha.CreateEngineMetadata"
|
55
|
+
};
|
56
|
+
}
|
57
|
+
|
58
|
+
// Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
59
|
+
rpc DeleteEngine(DeleteEngineRequest) returns (google.longrunning.Operation) {
|
60
|
+
option (google.api.http) = {
|
61
|
+
delete: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}"
|
62
|
+
};
|
63
|
+
option (google.api.method_signature) = "name";
|
64
|
+
option (google.longrunning.operation_info) = {
|
65
|
+
response_type: "google.protobuf.Empty"
|
66
|
+
metadata_type: "google.cloud.discoveryengine.v1alpha.DeleteEngineMetadata"
|
67
|
+
};
|
68
|
+
}
|
69
|
+
|
70
|
+
// Updates an [Engine][google.cloud.discoveryengine.v1alpha.Engine]
|
71
|
+
rpc UpdateEngine(UpdateEngineRequest) returns (Engine) {
|
72
|
+
option (google.api.http) = {
|
73
|
+
patch: "/v1alpha/{engine.name=projects/*/locations/*/collections/*/engines/*}"
|
74
|
+
body: "engine"
|
75
|
+
};
|
76
|
+
option (google.api.method_signature) = "engine,update_mask";
|
77
|
+
}
|
78
|
+
|
79
|
+
// Gets a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
80
|
+
rpc GetEngine(GetEngineRequest) returns (Engine) {
|
81
|
+
option (google.api.http) = {
|
82
|
+
get: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}"
|
83
|
+
};
|
84
|
+
option (google.api.method_signature) = "name";
|
85
|
+
}
|
86
|
+
|
87
|
+
// Lists all the [Engine][google.cloud.discoveryengine.v1alpha.Engine]s
|
88
|
+
// associated with the project.
|
89
|
+
rpc ListEngines(ListEnginesRequest) returns (ListEnginesResponse) {
|
90
|
+
option (google.api.http) = {
|
91
|
+
get: "/v1alpha/{parent=projects/*/locations/*/collections/*}/engines"
|
92
|
+
};
|
93
|
+
option (google.api.method_signature) = "parent";
|
94
|
+
}
|
95
|
+
|
96
|
+
// Pauses the training of an existing engine. Only applicable if
|
97
|
+
// [solution_type][] is
|
98
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
99
|
+
rpc PauseEngine(PauseEngineRequest) returns (Engine) {
|
100
|
+
option (google.api.http) = {
|
101
|
+
post: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}:pause"
|
102
|
+
body: "*"
|
103
|
+
};
|
104
|
+
option (google.api.method_signature) = "name";
|
105
|
+
}
|
106
|
+
|
107
|
+
// Resumes the training of an existing engine. Only applicable if
|
108
|
+
// [solution_type][] is
|
109
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
110
|
+
rpc ResumeEngine(ResumeEngineRequest) returns (Engine) {
|
111
|
+
option (google.api.http) = {
|
112
|
+
post: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}:resume"
|
113
|
+
body: "*"
|
114
|
+
};
|
115
|
+
option (google.api.method_signature) = "name";
|
116
|
+
}
|
117
|
+
|
118
|
+
// Tunes an existing engine. Only applicable if [solution_type][] is
|
119
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
120
|
+
rpc TuneEngine(TuneEngineRequest) returns (google.longrunning.Operation) {
|
121
|
+
option (google.api.http) = {
|
122
|
+
post: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}:tune"
|
123
|
+
body: "*"
|
124
|
+
};
|
125
|
+
option (google.api.method_signature) = "name";
|
126
|
+
option (google.longrunning.operation_info) = {
|
127
|
+
response_type: "TuneEngineResponse"
|
128
|
+
metadata_type: "TuneEngineMetadata"
|
129
|
+
};
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
// Request for
|
134
|
+
// [EngineService.CreateEngine][google.cloud.discoveryengine.v1alpha.EngineService.CreateEngine]
|
135
|
+
// method.
|
136
|
+
message CreateEngineRequest {
|
137
|
+
// Required. The parent resource name, such as
|
138
|
+
// `projects/{project}/locations/{location}/collections/{collection}`.
|
139
|
+
string parent = 1 [
|
140
|
+
(google.api.field_behavior) = REQUIRED,
|
141
|
+
(google.api.resource_reference) = {
|
142
|
+
type: "discoveryengine.googleapis.com/Collection"
|
143
|
+
}
|
144
|
+
];
|
145
|
+
|
146
|
+
// Required. The [Engine][google.cloud.discoveryengine.v1alpha.Engine] to
|
147
|
+
// create.
|
148
|
+
Engine engine = 2 [(google.api.field_behavior) = REQUIRED];
|
149
|
+
|
150
|
+
// Required. The ID to use for the
|
151
|
+
// [Engine][google.cloud.discoveryengine.v1alpha.Engine], which will become
|
152
|
+
// the final component of the
|
153
|
+
// [Engine][google.cloud.discoveryengine.v1alpha.Engine]'s resource name.
|
154
|
+
//
|
155
|
+
// This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
|
156
|
+
// standard with a length limit of 63 characters. Otherwise, an
|
157
|
+
// INVALID_ARGUMENT error is returned.
|
158
|
+
string engine_id = 3 [(google.api.field_behavior) = REQUIRED];
|
159
|
+
}
|
160
|
+
|
161
|
+
// Metadata related to the progress of the
|
162
|
+
// [EngineService.CreateEngine][google.cloud.discoveryengine.v1alpha.EngineService.CreateEngine]
|
163
|
+
// operation. This will be returned by the google.longrunning.Operation.metadata
|
164
|
+
// field.
|
165
|
+
message CreateEngineMetadata {
|
166
|
+
// Operation create time.
|
167
|
+
google.protobuf.Timestamp create_time = 1;
|
168
|
+
|
169
|
+
// Operation last update time. If the operation is done, this is also the
|
170
|
+
// finish time.
|
171
|
+
google.protobuf.Timestamp update_time = 2;
|
172
|
+
}
|
173
|
+
|
174
|
+
// Request message for
|
175
|
+
// [EngineService.DeleteEngine][google.cloud.discoveryengine.v1alpha.EngineService.DeleteEngine]
|
176
|
+
// method.
|
177
|
+
message DeleteEngineRequest {
|
178
|
+
// Required. Full resource name of
|
179
|
+
// [Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
|
180
|
+
// `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
|
181
|
+
//
|
182
|
+
// If the caller does not have permission to delete the
|
183
|
+
// [Engine][google.cloud.discoveryengine.v1alpha.Engine], regardless of
|
184
|
+
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
185
|
+
//
|
186
|
+
// If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] to delete does
|
187
|
+
// not exist, a NOT_FOUND error is returned.
|
188
|
+
string name = 1 [
|
189
|
+
(google.api.field_behavior) = REQUIRED,
|
190
|
+
(google.api.resource_reference) = {
|
191
|
+
type: "discoveryengine.googleapis.com/Engine"
|
192
|
+
}
|
193
|
+
];
|
194
|
+
}
|
195
|
+
|
196
|
+
// Metadata related to the progress of the
|
197
|
+
// [EngineService.DeleteEngine][google.cloud.discoveryengine.v1alpha.EngineService.DeleteEngine]
|
198
|
+
// operation. This will be returned by the google.longrunning.Operation.metadata
|
199
|
+
// field.
|
200
|
+
message DeleteEngineMetadata {
|
201
|
+
// Operation create time.
|
202
|
+
google.protobuf.Timestamp create_time = 1;
|
203
|
+
|
204
|
+
// Operation last update time. If the operation is done, this is also the
|
205
|
+
// finish time.
|
206
|
+
google.protobuf.Timestamp update_time = 2;
|
207
|
+
}
|
208
|
+
|
209
|
+
// Request message for
|
210
|
+
// [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine]
|
211
|
+
// method.
|
212
|
+
message GetEngineRequest {
|
213
|
+
// Required. Full resource name of
|
214
|
+
// [Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
|
215
|
+
// `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
|
216
|
+
string name = 1 [
|
217
|
+
(google.api.field_behavior) = REQUIRED,
|
218
|
+
(google.api.resource_reference) = {
|
219
|
+
type: "discoveryengine.googleapis.com/Engine"
|
220
|
+
}
|
221
|
+
];
|
222
|
+
}
|
223
|
+
|
224
|
+
// Request message for
|
225
|
+
// [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines]
|
226
|
+
// method.
|
227
|
+
message ListEnginesRequest {
|
228
|
+
// Required. The parent resource name, such as
|
229
|
+
// `projects/{project}/locations/{location}/collections/{collection_id}`.
|
230
|
+
string parent = 1 [
|
231
|
+
(google.api.field_behavior) = REQUIRED,
|
232
|
+
(google.api.resource_reference) = {
|
233
|
+
type: "discoveryengine.googleapis.com/Collection"
|
234
|
+
}
|
235
|
+
];
|
236
|
+
|
237
|
+
// Optional. Not supported.
|
238
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
239
|
+
|
240
|
+
// Optional. Not supported.
|
241
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
242
|
+
|
243
|
+
// Optional. Filter by solution type. For example:
|
244
|
+
// solution_type=SOLUTION_TYPE_SEARCH
|
245
|
+
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
|
246
|
+
}
|
247
|
+
|
248
|
+
// Response message for
|
249
|
+
// [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines]
|
250
|
+
// method.
|
251
|
+
message ListEnginesResponse {
|
252
|
+
// All the customer's [Engine][google.cloud.discoveryengine.v1alpha.Engine]s.
|
253
|
+
repeated Engine engines = 1;
|
254
|
+
|
255
|
+
// Not supported.
|
256
|
+
string next_page_token = 2;
|
257
|
+
}
|
258
|
+
|
259
|
+
// Request message for
|
260
|
+
// [EngineService.UpdateEngine][google.cloud.discoveryengine.v1alpha.EngineService.UpdateEngine]
|
261
|
+
// method.
|
262
|
+
message UpdateEngineRequest {
|
263
|
+
// Required. The [Engine][google.cloud.discoveryengine.v1alpha.Engine] to
|
264
|
+
// update.
|
265
|
+
//
|
266
|
+
// If the caller does not have permission to update the
|
267
|
+
// [Engine][google.cloud.discoveryengine.v1alpha.Engine], regardless of
|
268
|
+
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
269
|
+
//
|
270
|
+
// If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] to update does
|
271
|
+
// not exist, a NOT_FOUND error is returned.
|
272
|
+
Engine engine = 1 [(google.api.field_behavior) = REQUIRED];
|
273
|
+
|
274
|
+
// Indicates which fields in the provided
|
275
|
+
// [Engine][google.cloud.discoveryengine.v1alpha.Engine] to update.
|
276
|
+
//
|
277
|
+
// If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
|
278
|
+
// is returned.
|
279
|
+
google.protobuf.FieldMask update_mask = 2;
|
280
|
+
}
|
281
|
+
|
282
|
+
// Request for pausing training of an engine.
|
283
|
+
message PauseEngineRequest {
|
284
|
+
// Required. The name of the engine to pause.
|
285
|
+
// Format:
|
286
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
|
287
|
+
string name = 1 [
|
288
|
+
(google.api.field_behavior) = REQUIRED,
|
289
|
+
(google.api.resource_reference) = {
|
290
|
+
type: "discoveryengine.googleapis.com/Engine"
|
291
|
+
}
|
292
|
+
];
|
293
|
+
}
|
294
|
+
|
295
|
+
// Request for resuming training of an engine.
|
296
|
+
message ResumeEngineRequest {
|
297
|
+
// Required. The name of the engine to resume.
|
298
|
+
// Format:
|
299
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
|
300
|
+
string name = 1 [
|
301
|
+
(google.api.field_behavior) = REQUIRED,
|
302
|
+
(google.api.resource_reference) = {
|
303
|
+
type: "discoveryengine.googleapis.com/Engine"
|
304
|
+
}
|
305
|
+
];
|
306
|
+
}
|
307
|
+
|
308
|
+
// Request to manually start a tuning process now (instead of waiting for
|
309
|
+
// the periodically scheduled tuning to happen).
|
310
|
+
message TuneEngineRequest {
|
311
|
+
// Required. The resource name of the engine to tune.
|
312
|
+
// Format:
|
313
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
|
314
|
+
string name = 1 [
|
315
|
+
(google.api.field_behavior) = REQUIRED,
|
316
|
+
(google.api.resource_reference) = {
|
317
|
+
type: "discoveryengine.googleapis.com/Engine"
|
318
|
+
}
|
319
|
+
];
|
320
|
+
}
|
321
|
+
|
322
|
+
// Metadata associated with a tune operation.
|
323
|
+
message TuneEngineMetadata {
|
324
|
+
// Required. The resource name of the engine that this tune applies to.
|
325
|
+
// Format:
|
326
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
|
327
|
+
string engine = 1 [
|
328
|
+
(google.api.field_behavior) = REQUIRED,
|
329
|
+
(google.api.resource_reference) = {
|
330
|
+
type: "discoveryengine.googleapis.com/Engine"
|
331
|
+
}
|
332
|
+
];
|
333
|
+
}
|
334
|
+
|
335
|
+
// Response associated with a tune operation.
|
336
|
+
message TuneEngineResponse {}
|
@@ -0,0 +1,343 @@
|
|
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/document.proto";
|
22
|
+
import "google/cloud/discoveryengine/v1alpha/user_event.proto";
|
23
|
+
import "google/protobuf/timestamp.proto";
|
24
|
+
import "google/rpc/status.proto";
|
25
|
+
import "google/type/date.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 = "ImportConfigProto";
|
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
|
+
// Cloud Storage location for input content.
|
37
|
+
message GcsSource {
|
38
|
+
// Required. Cloud Storage URIs to input files. URI can be up to
|
39
|
+
// 2000 characters long. URIs can match the full object path (for example,
|
40
|
+
// `gs://bucket/directory/object.json`) or a pattern matching one or more
|
41
|
+
// files, such as `gs://bucket/directory/*.json`.
|
42
|
+
//
|
43
|
+
// A request can contain at most 100 files (or 100,000 files if `data_schema`
|
44
|
+
// is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
|
45
|
+
// `content`).
|
46
|
+
repeated string input_uris = 1 [(google.api.field_behavior) = REQUIRED];
|
47
|
+
|
48
|
+
// The schema to use when parsing the data from the source.
|
49
|
+
//
|
50
|
+
// Supported values for document imports:
|
51
|
+
//
|
52
|
+
// * `document` (default): One JSON
|
53
|
+
// [Document][google.cloud.discoveryengine.v1alpha.Document] per line. Each
|
54
|
+
// document must
|
55
|
+
// have a valid
|
56
|
+
// [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
|
57
|
+
// * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
|
58
|
+
// `input_uris` becomes a document, with the ID set to the first 128
|
59
|
+
// bits of SHA256(URI) encoded as a hex string.
|
60
|
+
// * `custom`: One custom data JSON per row in arbitrary format that conforms
|
61
|
+
// to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
|
62
|
+
// the data store. This can only be used by Gen App Builder.
|
63
|
+
// * `csv`: A CSV file with header conforming to the defined
|
64
|
+
// [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
|
65
|
+
// data store. Each entry after the header is imported as a Document.
|
66
|
+
// This can only be used by Gen App Builder.
|
67
|
+
//
|
68
|
+
// Supported values for user even imports:
|
69
|
+
//
|
70
|
+
// * `user_event` (default): One JSON
|
71
|
+
// [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per line.
|
72
|
+
string data_schema = 2;
|
73
|
+
}
|
74
|
+
|
75
|
+
// BigQuery source import data from.
|
76
|
+
message BigQuerySource {
|
77
|
+
// BigQuery table partition info. Leave this empty if the BigQuery table
|
78
|
+
// is not partitioned.
|
79
|
+
oneof partition {
|
80
|
+
// BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
|
81
|
+
google.type.Date partition_date = 5;
|
82
|
+
}
|
83
|
+
|
84
|
+
// The project ID (can be project # or ID) that the BigQuery source is in with
|
85
|
+
// a length limit of 128 characters. If not specified, inherits the project
|
86
|
+
// ID from the parent request.
|
87
|
+
string project_id = 1;
|
88
|
+
|
89
|
+
// Required. The BigQuery data set to copy the data from with a length limit
|
90
|
+
// of 1,024 characters.
|
91
|
+
string dataset_id = 2 [(google.api.field_behavior) = REQUIRED];
|
92
|
+
|
93
|
+
// Required. The BigQuery table to copy the data from with a length limit of
|
94
|
+
// 1,024 characters.
|
95
|
+
string table_id = 3 [(google.api.field_behavior) = REQUIRED];
|
96
|
+
|
97
|
+
// Intermediate Cloud Storage directory used for the import with a length
|
98
|
+
// limit of 2,000 characters. Can be specified if one wants to have the
|
99
|
+
// BigQuery export to a specific Cloud Storage directory.
|
100
|
+
string gcs_staging_dir = 4;
|
101
|
+
|
102
|
+
// The schema to use when parsing the data from the source.
|
103
|
+
//
|
104
|
+
// Supported values for user event imports:
|
105
|
+
//
|
106
|
+
// * `user_event` (default): One
|
107
|
+
// [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent] per row.
|
108
|
+
//
|
109
|
+
// Supported values for document imports:
|
110
|
+
//
|
111
|
+
// * `document` (default): One
|
112
|
+
// [Document][google.cloud.discoveryengine.v1alpha.Document] format per
|
113
|
+
// row. Each document must have a valid
|
114
|
+
// [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] and one
|
115
|
+
// of
|
116
|
+
// [Document.json_data][google.cloud.discoveryengine.v1alpha.Document.json_data]
|
117
|
+
// or
|
118
|
+
// [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
|
119
|
+
// * `custom`: One custom data per row in arbitrary format that conforms to
|
120
|
+
// the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
|
121
|
+
// data store. This can only be used by Gen App Builder.
|
122
|
+
string data_schema = 6;
|
123
|
+
}
|
124
|
+
|
125
|
+
// Configuration of destination for Import related errors.
|
126
|
+
message ImportErrorConfig {
|
127
|
+
// Required. Errors destination.
|
128
|
+
oneof destination {
|
129
|
+
// Cloud Storage prefix for import errors. This must be an empty,
|
130
|
+
// existing Cloud Storage directory. Import errors are written to
|
131
|
+
// sharded files in this directory, one per line, as a JSON-encoded
|
132
|
+
// `google.rpc.Status` message.
|
133
|
+
string gcs_prefix = 1;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
// Request message for the ImportUserEvents request.
|
138
|
+
message ImportUserEventsRequest {
|
139
|
+
// The inline source for the input config for ImportUserEvents method.
|
140
|
+
message InlineSource {
|
141
|
+
// Required. A list of user events to import. Recommended max of 10k items.
|
142
|
+
repeated UserEvent user_events = 1 [(google.api.field_behavior) = REQUIRED];
|
143
|
+
}
|
144
|
+
|
145
|
+
// Required - The desired input source of the user event data.
|
146
|
+
oneof source {
|
147
|
+
// The Inline source for the input content for UserEvents.
|
148
|
+
InlineSource inline_source = 2;
|
149
|
+
|
150
|
+
// Cloud Storage location for the input content.
|
151
|
+
GcsSource gcs_source = 3;
|
152
|
+
|
153
|
+
// BigQuery input source.
|
154
|
+
BigQuerySource bigquery_source = 4;
|
155
|
+
}
|
156
|
+
|
157
|
+
// Required. Parent DataStore resource name, of the form
|
158
|
+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
|
159
|
+
string parent = 1 [
|
160
|
+
(google.api.field_behavior) = REQUIRED,
|
161
|
+
(google.api.resource_reference) = {
|
162
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
163
|
+
}
|
164
|
+
];
|
165
|
+
|
166
|
+
// The desired location of errors incurred during the Import. Cannot be set
|
167
|
+
// for inline user event imports.
|
168
|
+
ImportErrorConfig error_config = 5;
|
169
|
+
}
|
170
|
+
|
171
|
+
// Response of the ImportUserEventsRequest. If the long running
|
172
|
+
// operation was successful, then this message is returned by the
|
173
|
+
// google.longrunning.Operations.response field if the operation was successful.
|
174
|
+
message ImportUserEventsResponse {
|
175
|
+
// A sample of errors encountered while processing the request.
|
176
|
+
repeated google.rpc.Status error_samples = 1;
|
177
|
+
|
178
|
+
// Echoes the destination for the complete errors if this field was set in
|
179
|
+
// the request.
|
180
|
+
ImportErrorConfig error_config = 2;
|
181
|
+
|
182
|
+
// Count of user events imported with complete existing Documents.
|
183
|
+
int64 joined_events_count = 3;
|
184
|
+
|
185
|
+
// Count of user events imported, but with Document information not found
|
186
|
+
// in the existing Branch.
|
187
|
+
int64 unjoined_events_count = 4;
|
188
|
+
}
|
189
|
+
|
190
|
+
// Metadata related to the progress of the Import operation. This is
|
191
|
+
// returned by the google.longrunning.Operation.metadata field.
|
192
|
+
message ImportUserEventsMetadata {
|
193
|
+
// Operation create time.
|
194
|
+
google.protobuf.Timestamp create_time = 1;
|
195
|
+
|
196
|
+
// Operation last update time. If the operation is done, this is also the
|
197
|
+
// finish time.
|
198
|
+
google.protobuf.Timestamp update_time = 2;
|
199
|
+
|
200
|
+
// Count of entries that were processed successfully.
|
201
|
+
int64 success_count = 3;
|
202
|
+
|
203
|
+
// Count of entries that encountered errors while processing.
|
204
|
+
int64 failure_count = 4;
|
205
|
+
}
|
206
|
+
|
207
|
+
// Metadata related to the progress of the ImportDocuments operation. This is
|
208
|
+
// returned by the google.longrunning.Operation.metadata field.
|
209
|
+
message ImportDocumentsMetadata {
|
210
|
+
// Operation create time.
|
211
|
+
google.protobuf.Timestamp create_time = 1;
|
212
|
+
|
213
|
+
// Operation last update time. If the operation is done, this is also the
|
214
|
+
// finish time.
|
215
|
+
google.protobuf.Timestamp update_time = 2;
|
216
|
+
|
217
|
+
// Count of entries that were processed successfully.
|
218
|
+
int64 success_count = 3;
|
219
|
+
|
220
|
+
// Count of entries that encountered errors while processing.
|
221
|
+
int64 failure_count = 4;
|
222
|
+
}
|
223
|
+
|
224
|
+
// Request message for Import methods.
|
225
|
+
message ImportDocumentsRequest {
|
226
|
+
// The inline source for the input config for ImportDocuments method.
|
227
|
+
message InlineSource {
|
228
|
+
// Required. A list of documents to update/create. Each document must have a
|
229
|
+
// valid [Document.id][google.cloud.discoveryengine.v1alpha.Document.id].
|
230
|
+
// Recommended max of 100 items.
|
231
|
+
repeated Document documents = 1 [(google.api.field_behavior) = REQUIRED];
|
232
|
+
}
|
233
|
+
|
234
|
+
// Indicates how imported documents are reconciled with the existing documents
|
235
|
+
// created or imported before.
|
236
|
+
enum ReconciliationMode {
|
237
|
+
// Defaults to `INCREMENTAL`.
|
238
|
+
RECONCILIATION_MODE_UNSPECIFIED = 0;
|
239
|
+
|
240
|
+
// Inserts new documents or updates existing documents.
|
241
|
+
INCREMENTAL = 1;
|
242
|
+
|
243
|
+
// Calculates diff and replaces the entire document dataset. Existing
|
244
|
+
// documents may be deleted if they are not present in the source location.
|
245
|
+
FULL = 2;
|
246
|
+
}
|
247
|
+
|
248
|
+
// Required. The source of the input.
|
249
|
+
oneof source {
|
250
|
+
// The Inline source for the input content for documents.
|
251
|
+
InlineSource inline_source = 2;
|
252
|
+
|
253
|
+
// Cloud Storage location for the input content.
|
254
|
+
GcsSource gcs_source = 3;
|
255
|
+
|
256
|
+
// BigQuery input source.
|
257
|
+
BigQuerySource bigquery_source = 4;
|
258
|
+
}
|
259
|
+
|
260
|
+
// Required. The parent branch resource name, such as
|
261
|
+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
|
262
|
+
// Requires create/update permission.
|
263
|
+
string parent = 1 [
|
264
|
+
(google.api.field_behavior) = REQUIRED,
|
265
|
+
(google.api.resource_reference) = {
|
266
|
+
type: "discoveryengine.googleapis.com/Branch"
|
267
|
+
}
|
268
|
+
];
|
269
|
+
|
270
|
+
// The desired location of errors incurred during the Import.
|
271
|
+
ImportErrorConfig error_config = 5;
|
272
|
+
|
273
|
+
// The mode of reconciliation between existing documents and the documents to
|
274
|
+
// be imported. Defaults to
|
275
|
+
// [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
|
276
|
+
ReconciliationMode reconciliation_mode = 6;
|
277
|
+
|
278
|
+
// Whether to automatically generate IDs for the documents if absent.
|
279
|
+
//
|
280
|
+
// If set to `true`,
|
281
|
+
// [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s are
|
282
|
+
// automatically generated based on the hash of the payload, where IDs may not
|
283
|
+
// be consistent during multiple imports. In which case
|
284
|
+
// [ReconciliationMode.FULL][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.FULL]
|
285
|
+
// is highly recommended to avoid duplicate contents. If unset or set to
|
286
|
+
// `false`, [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s
|
287
|
+
// have to be specified using
|
288
|
+
// [id_field][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field],
|
289
|
+
// otherwise, documents without IDs fail to be imported.
|
290
|
+
//
|
291
|
+
// Only set this field when using
|
292
|
+
// [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
|
293
|
+
// [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
|
294
|
+
// when
|
295
|
+
// [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
|
296
|
+
// or
|
297
|
+
// [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
|
298
|
+
// is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
299
|
+
bool auto_generate_ids = 8;
|
300
|
+
|
301
|
+
// The field in the Cloud Storage and BigQuery sources that indicates the
|
302
|
+
// unique IDs of the documents.
|
303
|
+
//
|
304
|
+
// For [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] it is the
|
305
|
+
// key of the JSON field. For instance, `my_id` for JSON `{"my_id":
|
306
|
+
// "some_uuid"}`. For
|
307
|
+
// [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource] it is
|
308
|
+
// the column name of the BigQuery table where the unique ids are stored.
|
309
|
+
//
|
310
|
+
// The values of the JSON field or the BigQuery column are used as the
|
311
|
+
// [Document.id][google.cloud.discoveryengine.v1alpha.Document.id]s. The JSON
|
312
|
+
// field or the BigQuery column must be of string type, and the values must be
|
313
|
+
// set as valid strings conform to
|
314
|
+
// [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
|
315
|
+
// Otherwise, documents without valid IDs fail to be imported.
|
316
|
+
//
|
317
|
+
// Only set this field when using
|
318
|
+
// [GcsSource][google.cloud.discoveryengine.v1alpha.GcsSource] or
|
319
|
+
// [BigQuerySource][google.cloud.discoveryengine.v1alpha.BigQuerySource], and
|
320
|
+
// when
|
321
|
+
// [GcsSource.data_schema][google.cloud.discoveryengine.v1alpha.GcsSource.data_schema]
|
322
|
+
// or
|
323
|
+
// [BigQuerySource.data_schema][google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema]
|
324
|
+
// is `custom`. And only set this field when
|
325
|
+
// [auto_generate_ids][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids]
|
326
|
+
// is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
327
|
+
//
|
328
|
+
// If it is unset, a default value `_id` is used when importing from the
|
329
|
+
// allowed data sources.
|
330
|
+
string id_field = 9;
|
331
|
+
}
|
332
|
+
|
333
|
+
// Response of the
|
334
|
+
// [ImportDocumentsRequest][google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest].
|
335
|
+
// If the long running operation is done, then this message is returned by the
|
336
|
+
// google.longrunning.Operations.response field if the operation was successful.
|
337
|
+
message ImportDocumentsResponse {
|
338
|
+
// A sample of errors encountered while processing the request.
|
339
|
+
repeated google.rpc.Status error_samples = 1;
|
340
|
+
|
341
|
+
// Echoes the destination for the complete errors in the request if set.
|
342
|
+
ImportErrorConfig error_config = 2;
|
343
|
+
}
|