@google-cloud/discoveryengine 1.2.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/README.md +25 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +38 -8
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +39 -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 +1 -1
- 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/recommendation_service.proto +9 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +123 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +147 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +164 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +540 -0
- package/build/protos/protos.d.ts +10923 -3222
- package/build/protos/protos.js +29891 -12914
- package/build/protos/protos.json +2367 -668
- package/build/src/index.js +1 -1
- package/build/src/v1/completion_service_client.js +1 -1
- package/build/src/v1/conversational_search_service_client.js +1 -1
- package/build/src/v1/document_service_client.js +1 -1
- package/build/src/v1/index.js +1 -1
- package/build/src/v1/schema_service_client.js +1 -1
- package/build/src/v1/search_service_client.js +1 -1
- package/build/src/v1/user_event_service_client.js +1 -1
- package/build/src/v1alpha/completion_service_client.d.ts +261 -0
- package/build/src/v1alpha/completion_service_client.js +360 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +278 -0
- package/build/src/v1alpha/conversational_search_service_client.js +360 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +1279 -0
- package/build/src/v1alpha/data_store_service_client.js +1739 -0
- package/build/src/v1alpha/data_store_service_client_config.json +46 -0
- package/build/src/v1alpha/document_service_client.d.ts +336 -0
- package/build/src/v1alpha/document_service_client.js +472 -2
- package/build/src/v1alpha/engine_service_client.d.ts +1298 -0
- package/build/src/v1alpha/engine_service_client.js +1789 -0
- package/build/src/v1alpha/engine_service_client_config.json +58 -0
- package/build/src/v1alpha/index.d.ts +3 -0
- package/build/src/v1alpha/index.js +7 -1
- package/build/src/v1alpha/recommendation_service_client.d.ts +345 -3
- package/build/src/v1alpha/recommendation_service_client.js +464 -0
- package/build/src/v1alpha/schema_service_client.d.ts +261 -0
- package/build/src/v1alpha/schema_service_client.js +368 -2
- package/build/src/v1alpha/search_service_client.d.ts +453 -9
- package/build/src/v1alpha/search_service_client.js +542 -6
- package/build/src/v1alpha/search_tuning_service_client.d.ts +968 -0
- package/build/src/v1alpha/search_tuning_service_client.js +1452 -0
- package/build/src/v1alpha/search_tuning_service_client_config.json +30 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +856 -1
- package/build/src/v1alpha/site_search_engine_service_client.js +993 -34
- package/build/src/v1alpha/site_search_engine_service_client_config.json +44 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +261 -0
- package/build/src/v1alpha/user_event_service_client.js +368 -2
- package/build/src/v1beta/completion_service_client.js +1 -1
- package/build/src/v1beta/conversational_search_service_client.js +1 -1
- package/build/src/v1beta/document_service_client.js +1 -1
- package/build/src/v1beta/index.js +1 -1
- package/build/src/v1beta/recommendation_service_client.js +1 -1
- package/build/src/v1beta/schema_service_client.js +1 -1
- package/build/src/v1beta/search_service_client.js +1 -1
- package/build/src/v1beta/user_event_service_client.js +1 -1
- package/package.json +4 -4
@@ -0,0 +1,307 @@
|
|
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/data_store.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 = "DataStoreServiceProto";
|
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
|
39
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] configuration.
|
40
|
+
service DataStoreService {
|
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 [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
|
46
|
+
//
|
47
|
+
// DataStore is for storing
|
48
|
+
// [Documents][google.cloud.discoveryengine.v1alpha.Document]. To serve these
|
49
|
+
// documents for Search, or Recommendation use case, an
|
50
|
+
// [Engine][google.cloud.discoveryengine.v1alpha.Engine] needs to be created
|
51
|
+
// separately.
|
52
|
+
rpc CreateDataStore(CreateDataStoreRequest)
|
53
|
+
returns (google.longrunning.Operation) {
|
54
|
+
option (google.api.http) = {
|
55
|
+
post: "/v1alpha/{parent=projects/*/locations/*}/dataStores"
|
56
|
+
body: "data_store"
|
57
|
+
additional_bindings {
|
58
|
+
post: "/v1alpha/{parent=projects/*/locations/*/collections/*}/dataStores"
|
59
|
+
body: "data_store"
|
60
|
+
}
|
61
|
+
};
|
62
|
+
option (google.api.method_signature) = "parent,data_store,data_store_id";
|
63
|
+
option (google.longrunning.operation_info) = {
|
64
|
+
response_type: "google.cloud.discoveryengine.v1alpha.DataStore"
|
65
|
+
metadata_type: "google.cloud.discoveryengine.v1alpha.CreateDataStoreMetadata"
|
66
|
+
};
|
67
|
+
}
|
68
|
+
|
69
|
+
// Gets a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
|
70
|
+
rpc GetDataStore(GetDataStoreRequest) returns (DataStore) {
|
71
|
+
option (google.api.http) = {
|
72
|
+
get: "/v1alpha/{name=projects/*/locations/*/dataStores/*}"
|
73
|
+
additional_bindings {
|
74
|
+
get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}"
|
75
|
+
}
|
76
|
+
};
|
77
|
+
option (google.api.method_signature) = "name";
|
78
|
+
}
|
79
|
+
|
80
|
+
// Lists all the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s
|
81
|
+
// associated with the project.
|
82
|
+
rpc ListDataStores(ListDataStoresRequest) returns (ListDataStoresResponse) {
|
83
|
+
option (google.api.http) = {
|
84
|
+
get: "/v1alpha/{parent=projects/*/locations/*}/dataStores"
|
85
|
+
additional_bindings {
|
86
|
+
get: "/v1alpha/{parent=projects/*/locations/*/collections/*}/dataStores"
|
87
|
+
}
|
88
|
+
};
|
89
|
+
option (google.api.method_signature) = "parent";
|
90
|
+
}
|
91
|
+
|
92
|
+
// Deletes a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
|
93
|
+
rpc DeleteDataStore(DeleteDataStoreRequest)
|
94
|
+
returns (google.longrunning.Operation) {
|
95
|
+
option (google.api.http) = {
|
96
|
+
delete: "/v1alpha/{name=projects/*/locations/*/dataStores/*}"
|
97
|
+
additional_bindings {
|
98
|
+
delete: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}"
|
99
|
+
}
|
100
|
+
};
|
101
|
+
option (google.api.method_signature) = "name";
|
102
|
+
option (google.longrunning.operation_info) = {
|
103
|
+
response_type: "google.protobuf.Empty"
|
104
|
+
metadata_type: "google.cloud.discoveryengine.v1alpha.DeleteDataStoreMetadata"
|
105
|
+
};
|
106
|
+
}
|
107
|
+
|
108
|
+
// Updates a [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]
|
109
|
+
rpc UpdateDataStore(UpdateDataStoreRequest) returns (DataStore) {
|
110
|
+
option (google.api.http) = {
|
111
|
+
patch: "/v1alpha/{data_store.name=projects/*/locations/*/dataStores/*}"
|
112
|
+
body: "data_store"
|
113
|
+
additional_bindings {
|
114
|
+
patch: "/v1alpha/{data_store.name=projects/*/locations/*/collections/*/dataStores/*}"
|
115
|
+
body: "data_store"
|
116
|
+
}
|
117
|
+
};
|
118
|
+
option (google.api.method_signature) = "data_store,update_mask";
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
// Request for
|
123
|
+
// [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.CreateDataStore]
|
124
|
+
// method.
|
125
|
+
message CreateDataStoreRequest {
|
126
|
+
// Required. The parent resource name, such as
|
127
|
+
// `projects/{project}/locations/{location}/collections/{collection}`.
|
128
|
+
string parent = 1 [
|
129
|
+
(google.api.field_behavior) = REQUIRED,
|
130
|
+
(google.api.resource_reference) = {
|
131
|
+
type: "discoveryengine.googleapis.com/Collection"
|
132
|
+
}
|
133
|
+
];
|
134
|
+
|
135
|
+
// Required. The [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]
|
136
|
+
// to create.
|
137
|
+
DataStore data_store = 2 [(google.api.field_behavior) = REQUIRED];
|
138
|
+
|
139
|
+
// Required. The ID to use for the
|
140
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], which will
|
141
|
+
// become the final component of the
|
142
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]'s resource
|
143
|
+
// name.
|
144
|
+
//
|
145
|
+
// This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
|
146
|
+
// standard with a length limit of 63 characters. Otherwise, an
|
147
|
+
// INVALID_ARGUMENT error is returned.
|
148
|
+
string data_store_id = 3 [(google.api.field_behavior) = REQUIRED];
|
149
|
+
|
150
|
+
// A boolean flag indicating whether user want to directly create an advanced
|
151
|
+
// data store for site search.
|
152
|
+
// If the data store is not configured as site
|
153
|
+
// search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will
|
154
|
+
// be ignored.
|
155
|
+
bool create_advanced_site_search = 4;
|
156
|
+
}
|
157
|
+
|
158
|
+
// Request message for
|
159
|
+
// [DataStoreService.GetDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.GetDataStore]
|
160
|
+
// method.
|
161
|
+
message GetDataStoreRequest {
|
162
|
+
// Required. Full resource name of
|
163
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], such as
|
164
|
+
// `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
|
165
|
+
//
|
166
|
+
// If the caller does not have permission to access the
|
167
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], regardless of
|
168
|
+
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
169
|
+
//
|
170
|
+
// If the requested
|
171
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] does not exist,
|
172
|
+
// a NOT_FOUND error is returned.
|
173
|
+
string name = 1 [
|
174
|
+
(google.api.field_behavior) = REQUIRED,
|
175
|
+
(google.api.resource_reference) = {
|
176
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
177
|
+
}
|
178
|
+
];
|
179
|
+
}
|
180
|
+
|
181
|
+
// Metadata related to the progress of the
|
182
|
+
// [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.CreateDataStore]
|
183
|
+
// operation. This will be returned by the google.longrunning.Operation.metadata
|
184
|
+
// field.
|
185
|
+
message CreateDataStoreMetadata {
|
186
|
+
// Operation create time.
|
187
|
+
google.protobuf.Timestamp create_time = 1;
|
188
|
+
|
189
|
+
// Operation last update time. If the operation is done, this is also the
|
190
|
+
// finish time.
|
191
|
+
google.protobuf.Timestamp update_time = 2;
|
192
|
+
}
|
193
|
+
|
194
|
+
// Request message for
|
195
|
+
// [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores]
|
196
|
+
// method.
|
197
|
+
message ListDataStoresRequest {
|
198
|
+
// Required. The parent branch resource name, such as
|
199
|
+
// `projects/{project}/locations/{location}/collections/{collection_id}`.
|
200
|
+
//
|
201
|
+
// If the caller does not have permission to list [DataStores][]s under this
|
202
|
+
// location, regardless of whether or not this data store exists, a
|
203
|
+
// PERMISSION_DENIED error is returned.
|
204
|
+
string parent = 1 [
|
205
|
+
(google.api.field_behavior) = REQUIRED,
|
206
|
+
(google.api.resource_reference) = {
|
207
|
+
type: "discoveryengine.googleapis.com/Collection"
|
208
|
+
}
|
209
|
+
];
|
210
|
+
|
211
|
+
// Maximum number of
|
212
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s to return. If
|
213
|
+
// unspecified, defaults to 10. The maximum allowed value is 50. Values above
|
214
|
+
// 50 will be coerced to 50.
|
215
|
+
//
|
216
|
+
// If this field is negative, an INVALID_ARGUMENT is returned.
|
217
|
+
int32 page_size = 2;
|
218
|
+
|
219
|
+
// A page token
|
220
|
+
// [ListDataStoresResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDataStoresResponse.next_page_token],
|
221
|
+
// received from a previous
|
222
|
+
// [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores]
|
223
|
+
// call. Provide this to retrieve the subsequent page.
|
224
|
+
//
|
225
|
+
// When paginating, all other parameters provided to
|
226
|
+
// [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores]
|
227
|
+
// must match the call that provided the page token. Otherwise, an
|
228
|
+
// INVALID_ARGUMENT error is returned.
|
229
|
+
string page_token = 3;
|
230
|
+
|
231
|
+
// Filter by solution type. For example: filter =
|
232
|
+
// 'solution_type:SOLUTION_TYPE_SEARCH'
|
233
|
+
string filter = 4;
|
234
|
+
}
|
235
|
+
|
236
|
+
// Response message for
|
237
|
+
// [DataStoreService.ListDataStores][google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores]
|
238
|
+
// method.
|
239
|
+
message ListDataStoresResponse {
|
240
|
+
// All the customer's
|
241
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s.
|
242
|
+
repeated DataStore data_stores = 1;
|
243
|
+
|
244
|
+
// A token that can be sent as
|
245
|
+
// [ListDataStoresRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDataStoresRequest.page_token]
|
246
|
+
// to retrieve the next page. If this field is omitted, there are no
|
247
|
+
// subsequent pages.
|
248
|
+
string next_page_token = 2;
|
249
|
+
}
|
250
|
+
|
251
|
+
// Request message for
|
252
|
+
// [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.DeleteDataStore]
|
253
|
+
// method.
|
254
|
+
message DeleteDataStoreRequest {
|
255
|
+
// Required. Full resource name of
|
256
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], such as
|
257
|
+
// `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
|
258
|
+
//
|
259
|
+
// If the caller does not have permission to delete the
|
260
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], regardless of
|
261
|
+
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
262
|
+
//
|
263
|
+
// If the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] to
|
264
|
+
// delete does not exist, a NOT_FOUND error is returned.
|
265
|
+
string name = 1 [
|
266
|
+
(google.api.field_behavior) = REQUIRED,
|
267
|
+
(google.api.resource_reference) = {
|
268
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
269
|
+
}
|
270
|
+
];
|
271
|
+
}
|
272
|
+
|
273
|
+
// Request message for
|
274
|
+
// [DataStoreService.UpdateDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDataStore]
|
275
|
+
// method.
|
276
|
+
message UpdateDataStoreRequest {
|
277
|
+
// Required. The [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]
|
278
|
+
// to update.
|
279
|
+
//
|
280
|
+
// If the caller does not have permission to update the
|
281
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], regardless of
|
282
|
+
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
283
|
+
//
|
284
|
+
// If the [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] to
|
285
|
+
// update does not exist, a NOT_FOUND error is returned.
|
286
|
+
DataStore data_store = 1 [(google.api.field_behavior) = REQUIRED];
|
287
|
+
|
288
|
+
// Indicates which fields in the provided
|
289
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] to update.
|
290
|
+
//
|
291
|
+
// If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
|
292
|
+
// is returned.
|
293
|
+
google.protobuf.FieldMask update_mask = 2;
|
294
|
+
}
|
295
|
+
|
296
|
+
// Metadata related to the progress of the
|
297
|
+
// [DataStoreService.DeleteDataStore][google.cloud.discoveryengine.v1alpha.DataStoreService.DeleteDataStore]
|
298
|
+
// operation. This will be returned by the google.longrunning.Operation.metadata
|
299
|
+
// field.
|
300
|
+
message DeleteDataStoreMetadata {
|
301
|
+
// Operation create time.
|
302
|
+
google.protobuf.Timestamp create_time = 1;
|
303
|
+
|
304
|
+
// Operation last update time. If the operation is done, this is also the
|
305
|
+
// finish time.
|
306
|
+
google.protobuf.Timestamp update_time = 2;
|
307
|
+
}
|
@@ -53,7 +53,7 @@ message Document {
|
|
53
53
|
|
54
54
|
// The URI of the content. Only Cloud Storage URIs (e.g.
|
55
55
|
// `gs://bucket-name/path/to/file`) are supported. The maximum file size
|
56
|
-
// is 100 MB.
|
56
|
+
// is 2.5 MB for text-based formats, 100 MB for other formats.
|
57
57
|
string uri = 3;
|
58
58
|
}
|
59
59
|
|
@@ -0,0 +1,370 @@
|
|
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/protobuf/timestamp.proto";
|
23
|
+
|
24
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
25
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
26
|
+
option java_multiple_files = true;
|
27
|
+
option java_outer_classname = "EngineProto";
|
28
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
29
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
30
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
31
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
32
|
+
|
33
|
+
// Metadata that describes the training and serving parameters of an
|
34
|
+
// [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
35
|
+
message Engine {
|
36
|
+
option (google.api.resource) = {
|
37
|
+
type: "discoveryengine.googleapis.com/Engine"
|
38
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}"
|
39
|
+
};
|
40
|
+
|
41
|
+
// Configurations for a Search Engine.
|
42
|
+
message SearchEngineConfig {
|
43
|
+
// The search feature tier of this engine.
|
44
|
+
//
|
45
|
+
// Different tiers might have different
|
46
|
+
// pricing. To learn more, please check the pricing documentation.
|
47
|
+
//
|
48
|
+
// Defaults to
|
49
|
+
// [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1alpha.SearchTier.SEARCH_TIER_STANDARD]
|
50
|
+
// if not specified.
|
51
|
+
SearchTier search_tier = 1;
|
52
|
+
|
53
|
+
// The add-on that this search engine enables.
|
54
|
+
repeated SearchAddOn search_add_ons = 2;
|
55
|
+
}
|
56
|
+
|
57
|
+
// Additional config specs for a `similar-items` engine.
|
58
|
+
message SimilarDocumentsEngineConfig {}
|
59
|
+
|
60
|
+
// Additional config specs for a Media Recommendation engine.
|
61
|
+
message MediaRecommendationEngineConfig {
|
62
|
+
// Custom threshold for `cvr` optimization_objective.
|
63
|
+
message OptimizationObjectiveConfig {
|
64
|
+
// Required. The name of the field to target. Currently supported
|
65
|
+
// values: `watch-percentage`, `watch-time`.
|
66
|
+
string target_field = 1 [(google.api.field_behavior) = REQUIRED];
|
67
|
+
|
68
|
+
// Required. The threshold to be applied to the target (e.g., 0.5).
|
69
|
+
float target_field_value_float = 2
|
70
|
+
[(google.api.field_behavior) = REQUIRED];
|
71
|
+
}
|
72
|
+
|
73
|
+
// The training state of the engine.
|
74
|
+
enum TrainingState {
|
75
|
+
// Unspecified training state.
|
76
|
+
TRAINING_STATE_UNSPECIFIED = 0;
|
77
|
+
|
78
|
+
// The engine training is paused.
|
79
|
+
PAUSED = 1;
|
80
|
+
|
81
|
+
// The engine is training.
|
82
|
+
TRAINING = 2;
|
83
|
+
}
|
84
|
+
|
85
|
+
// Required. The type of engine e.g. `recommended-for-you`.
|
86
|
+
//
|
87
|
+
// This field together with
|
88
|
+
// [optimization_objective][Engine.optimization_objective] describe engine
|
89
|
+
// metadata to use to control engine training and serving.
|
90
|
+
//
|
91
|
+
// Currently supported values: `recommended-for-you`, `others-you-may-like`,
|
92
|
+
// `more-like-this`, `most-popular-items`.
|
93
|
+
string type = 1 [(google.api.field_behavior) = REQUIRED];
|
94
|
+
|
95
|
+
// The optimization objective e.g. `cvr`.
|
96
|
+
//
|
97
|
+
// This field together with
|
98
|
+
// [optimization_objective][google.cloud.discoveryengine.v1alpha.Engine.MediaRecommendationEngineConfig.type]
|
99
|
+
// describe engine metadata to use to control engine training and serving.
|
100
|
+
//
|
101
|
+
// Currently supported
|
102
|
+
// values: `ctr`, `cvr`.
|
103
|
+
//
|
104
|
+
// If not specified, we choose default based on engine type.
|
105
|
+
// Default depends on type of recommendation:
|
106
|
+
//
|
107
|
+
// `recommended-for-you` => `ctr`
|
108
|
+
//
|
109
|
+
// `others-you-may-like` => `ctr`
|
110
|
+
string optimization_objective = 2;
|
111
|
+
|
112
|
+
// Name and value of the custom threshold for cvr optimization_objective.
|
113
|
+
// For target_field `watch-time`, target_field_value must be an integer
|
114
|
+
// value indicating the media progress time in seconds between (0, 86400]
|
115
|
+
// (excludes 0, includes 86400) (e.g., 90).
|
116
|
+
// For target_field `watch-percentage`, the target_field_value must be a
|
117
|
+
// valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
|
118
|
+
// 0.5).
|
119
|
+
OptimizationObjectiveConfig optimization_objective_config = 3;
|
120
|
+
|
121
|
+
// The training state that the engine is in (e.g.
|
122
|
+
// `TRAINING` or `PAUSED`).
|
123
|
+
//
|
124
|
+
// Since part of the cost of running the service
|
125
|
+
// is frequency of training - this can be used to determine when to train
|
126
|
+
// engine in order to control cost. If not specified: the default value for
|
127
|
+
// `CreateEngine` method is `TRAINING`. The default value for
|
128
|
+
// `UpdateEngine` method is to keep the state the same as before.
|
129
|
+
TrainingState training_state = 4;
|
130
|
+
}
|
131
|
+
|
132
|
+
// Configurations for a Chat Engine.
|
133
|
+
message ChatEngineConfig {
|
134
|
+
// Configurations for generating a Dialogflow agent.
|
135
|
+
//
|
136
|
+
// Note that these configurations are one-time consumed by
|
137
|
+
// and passed to Dialogflow service. It means they cannot be retrieved using
|
138
|
+
// [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine]
|
139
|
+
// or
|
140
|
+
// [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines]
|
141
|
+
// API after engine creation.
|
142
|
+
message AgentCreationConfig {
|
143
|
+
// Name of the company, organization or other entity that the agent
|
144
|
+
// represents. Used for knowledge connector LLM prompt and for knowledge
|
145
|
+
// search.
|
146
|
+
string business = 1;
|
147
|
+
|
148
|
+
// Required. The default language of the agent as a language tag.
|
149
|
+
// See [Language
|
150
|
+
// Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
151
|
+
// for a list of the currently supported language codes.
|
152
|
+
string default_language_code = 2;
|
153
|
+
|
154
|
+
// Required. The time zone of the agent from the [time zone
|
155
|
+
// database](https://www.iana.org/time-zones), e.g., America/New_York,
|
156
|
+
// Europe/Paris.
|
157
|
+
string time_zone = 3 [(google.api.field_behavior) = REQUIRED];
|
158
|
+
}
|
159
|
+
|
160
|
+
// The configurationt generate the Dialogflow agent that is associated to
|
161
|
+
// this Engine.
|
162
|
+
//
|
163
|
+
// Note that these configurations are one-time consumed by
|
164
|
+
// and passed to Dialogflow service. It means they cannot be retrieved using
|
165
|
+
// [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine]
|
166
|
+
// or
|
167
|
+
// [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines]
|
168
|
+
// API after engine creation.
|
169
|
+
AgentCreationConfig agent_creation_config = 1;
|
170
|
+
|
171
|
+
// The resource name of an exist Dialogflow agent to link to this Chat
|
172
|
+
// Engine. Customers can either provide `agent_creation_config` to create
|
173
|
+
// agent or provide an agent name that links the agent with the Chat engine.
|
174
|
+
//
|
175
|
+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
176
|
+
// ID>`.
|
177
|
+
//
|
178
|
+
// Note that the `dialogflow_agent_to_link` are one-time consumed by and
|
179
|
+
// passed to Dialogflow service. It means they cannot be retrieved using
|
180
|
+
// [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine]
|
181
|
+
// or
|
182
|
+
// [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines]
|
183
|
+
// API after engine creation. Please use
|
184
|
+
// [chat_engine_metadata.dialogflow_agent][] for actual agent
|
185
|
+
// association after Engine is created.
|
186
|
+
string dialogflow_agent_to_link = 2;
|
187
|
+
}
|
188
|
+
|
189
|
+
// Common configurations for an Engine.
|
190
|
+
message CommonConfig {
|
191
|
+
// The name of the company, business or entity that is associated with the
|
192
|
+
// engine. Setting this may help improve LLM related features.
|
193
|
+
string company_name = 1;
|
194
|
+
}
|
195
|
+
|
196
|
+
// Additional information of a recommendation engine.
|
197
|
+
message RecommendationMetadata {
|
198
|
+
// The serving state of the recommendation engine.
|
199
|
+
enum ServingState {
|
200
|
+
// Unspecified serving state.
|
201
|
+
SERVING_STATE_UNSPECIFIED = 0;
|
202
|
+
|
203
|
+
// The engine is not serving.
|
204
|
+
INACTIVE = 1;
|
205
|
+
|
206
|
+
// The engine is serving and can be queried.
|
207
|
+
ACTIVE = 2;
|
208
|
+
|
209
|
+
// The engine is trained on tuned hyperparameters and can be
|
210
|
+
// queried.
|
211
|
+
TUNED = 3;
|
212
|
+
}
|
213
|
+
|
214
|
+
// Describes whether this engine have sufficient training data
|
215
|
+
// to be continuously trained.
|
216
|
+
enum DataState {
|
217
|
+
// Unspecified default value, should never be explicitly set.
|
218
|
+
DATA_STATE_UNSPECIFIED = 0;
|
219
|
+
|
220
|
+
// The engine has sufficient training data.
|
221
|
+
DATA_OK = 1;
|
222
|
+
|
223
|
+
// The engine does not have sufficient training data. Error
|
224
|
+
// messages can be queried via Stackdriver.
|
225
|
+
DATA_ERROR = 2;
|
226
|
+
}
|
227
|
+
|
228
|
+
// Output only. The serving state of the engine: `ACTIVE`, `NOT_ACTIVE`.
|
229
|
+
ServingState serving_state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
230
|
+
|
231
|
+
// Output only. The state of data requirements for this engine: `DATA_OK`
|
232
|
+
// and `DATA_ERROR`.
|
233
|
+
//
|
234
|
+
// Engine cannot be trained if the data is in
|
235
|
+
// `DATA_ERROR` state. Engine can have `DATA_ERROR` state even
|
236
|
+
// if serving state is `ACTIVE`: engines were trained successfully before,
|
237
|
+
// but cannot be refreshed because the underlying engine no longer has
|
238
|
+
// sufficient data for training.
|
239
|
+
DataState data_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
240
|
+
|
241
|
+
// Output only. The timestamp when the latest successful tune finished. Only
|
242
|
+
// applicable on Media Recommendation engines.
|
243
|
+
google.protobuf.Timestamp last_tune_time = 3
|
244
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
245
|
+
|
246
|
+
// Output only. The latest tune operation id associated with the engine.
|
247
|
+
// Only applicable on Media Recommendation engines.
|
248
|
+
//
|
249
|
+
// If present, this operation id can be used to determine if there is an
|
250
|
+
// ongoing tune for this engine. To check the operation status, send the
|
251
|
+
// GetOperation request with this operation id in the engine resource
|
252
|
+
// format. If no tuning has happened for this engine, the string is empty.
|
253
|
+
string tuning_operation = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
254
|
+
}
|
255
|
+
|
256
|
+
// Additional information of a Chat Engine.
|
257
|
+
// Fields in this message are output only.
|
258
|
+
message ChatEngineMetadata {
|
259
|
+
// The resource name of a Dialogflow agent, that this Chat Engine refers
|
260
|
+
// to.
|
261
|
+
//
|
262
|
+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
263
|
+
// ID>`.
|
264
|
+
string dialogflow_agent = 1;
|
265
|
+
}
|
266
|
+
|
267
|
+
// Additional config specs that defines the behavior of the engine.
|
268
|
+
oneof engine_config {
|
269
|
+
// Additional config specs for a `similar-items` engine.
|
270
|
+
SimilarDocumentsEngineConfig similar_documents_config = 9;
|
271
|
+
|
272
|
+
// Configurations for the Chat Engine. Only applicable if
|
273
|
+
// [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type]
|
274
|
+
// is
|
275
|
+
// [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
|
276
|
+
ChatEngineConfig chat_engine_config = 11;
|
277
|
+
|
278
|
+
// Configurations for the Search Engine. Only applicable if
|
279
|
+
// [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type]
|
280
|
+
// is
|
281
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
|
282
|
+
SearchEngineConfig search_engine_config = 13;
|
283
|
+
|
284
|
+
// Configurations for the Media Engine. Only applicable on the data
|
285
|
+
// stores with
|
286
|
+
// [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type]
|
287
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
|
288
|
+
// and
|
289
|
+
// [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1alpha.IndustryVertical.MEDIA]
|
290
|
+
// vertical.
|
291
|
+
MediaRecommendationEngineConfig media_recommendation_engine_config = 14;
|
292
|
+
}
|
293
|
+
|
294
|
+
// Engine metadata to monitor the status of the engine.
|
295
|
+
oneof engine_metadata {
|
296
|
+
// Output only. Additional information of a recommendation engine. Only
|
297
|
+
// applicable if
|
298
|
+
// [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type]
|
299
|
+
// is
|
300
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
301
|
+
RecommendationMetadata recommendation_metadata = 10
|
302
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
303
|
+
|
304
|
+
// Output only. Additional information of the Chat Engine. Only applicable
|
305
|
+
// if
|
306
|
+
// [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type]
|
307
|
+
// is
|
308
|
+
// [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT].
|
309
|
+
ChatEngineMetadata chat_engine_metadata = 12
|
310
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
311
|
+
}
|
312
|
+
|
313
|
+
// Immutable. The fully qualified resource name of the engine.
|
314
|
+
//
|
315
|
+
// This field must be a UTF-8 encoded string with a length limit of 1024
|
316
|
+
// characters.
|
317
|
+
//
|
318
|
+
// Format:
|
319
|
+
// `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`
|
320
|
+
// engine should be 1-63 characters, and valid characters are
|
321
|
+
// /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
|
322
|
+
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
|
323
|
+
|
324
|
+
// Required. The display name of the engine. Should be human readable. UTF-8
|
325
|
+
// encoded string with limit of 1024 characters.
|
326
|
+
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
327
|
+
|
328
|
+
// Output only. Timestamp the Recommendation Engine was created at.
|
329
|
+
google.protobuf.Timestamp create_time = 3
|
330
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
331
|
+
|
332
|
+
// Output only. Timestamp the Recommendation Engine was last updated.
|
333
|
+
google.protobuf.Timestamp update_time = 4
|
334
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
335
|
+
|
336
|
+
// The data stores associated with this engine.
|
337
|
+
//
|
338
|
+
// For
|
339
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH]
|
340
|
+
// and
|
341
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
|
342
|
+
// type of engines, they can only associate with at most one data store.
|
343
|
+
//
|
344
|
+
// If
|
345
|
+
// [solution_type][google.cloud.discoveryengine.v1alpha.Engine.solution_type]
|
346
|
+
// is
|
347
|
+
// [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_CHAT],
|
348
|
+
// multiple [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s in
|
349
|
+
// the same [Collection][google.cloud.discoveryengine.v1alpha.Collection] can
|
350
|
+
// be associated here.
|
351
|
+
//
|
352
|
+
// Note that when used in
|
353
|
+
// [CreateEngineRequest][google.cloud.discoveryengine.v1alpha.CreateEngineRequest],
|
354
|
+
// one DataStore id must be provided as the system will use it for necessary
|
355
|
+
// intializations.
|
356
|
+
repeated string data_store_ids = 5;
|
357
|
+
|
358
|
+
// Required. The solutions of the engine.
|
359
|
+
SolutionType solution_type = 6 [(google.api.field_behavior) = REQUIRED];
|
360
|
+
|
361
|
+
// The industry vertical that the engine registers.
|
362
|
+
// The restriction of the Engine industry vertical is based on
|
363
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]: If
|
364
|
+
// unspecified, default to `GENERIC`. Vertical on Engine has to match vertical
|
365
|
+
// of the DataStore liniked to the engine.
|
366
|
+
IndustryVertical industry_vertical = 16;
|
367
|
+
|
368
|
+
// Common config spec that specifies the metadata of the engine.
|
369
|
+
CommonConfig common_config = 15;
|
370
|
+
}
|