@google-cloud/discoveryengine 0.1.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 +8 -0
- package/LICENSE +202 -0
- package/README.md +209 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +93 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +77 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +261 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +265 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +182 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +453 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +122 -0
- package/build/protos/protos.d.ts +10120 -0
- package/build/protos/protos.js +26118 -0
- package/build/protos/protos.json +2682 -0
- package/build/src/index.d.ts +17 -0
- package/build/src/index.js +37 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1beta/document_service_client.d.ts +684 -0
- package/build/src/v1beta/document_service_client.js +830 -0
- package/build/src/v1beta/document_service_client.js.map +1 -0
- package/build/src/v1beta/document_service_client_config.json +77 -0
- package/build/src/v1beta/index.d.ts +3 -0
- package/build/src/v1beta/index.js +27 -0
- package/build/src/v1beta/index.js.map +1 -0
- package/build/src/v1beta/recommendation_service_client.d.ts +307 -0
- package/build/src/v1beta/recommendation_service_client.js +407 -0
- package/build/src/v1beta/recommendation_service_client.js.map +1 -0
- package/build/src/v1beta/recommendation_service_client_config.json +43 -0
- package/build/src/v1beta/user_event_service_client.d.ts +445 -0
- package/build/src/v1beta/user_event_service_client.js +628 -0
- package/build/src/v1beta/user_event_service_client.js.map +1 -0
- package/build/src/v1beta/user_event_service_client_config.json +62 -0
- package/package.json +66 -0
@@ -0,0 +1,261 @@
|
|
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.v1beta;
|
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/v1beta/document.proto";
|
24
|
+
import "google/cloud/discoveryengine/v1beta/import_config.proto";
|
25
|
+
import "google/longrunning/operations.proto";
|
26
|
+
import "google/protobuf/empty.proto";
|
27
|
+
|
28
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
|
29
|
+
option go_package = "google.golang.org/genproto/googleapis/cloud/discoveryengine/v1beta;discoveryengine";
|
30
|
+
option java_multiple_files = true;
|
31
|
+
option java_outer_classname = "DocumentServiceProto";
|
32
|
+
option java_package = "com.google.cloud.discoveryengine.v1beta";
|
33
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
34
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
|
35
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
|
36
|
+
|
37
|
+
// Service for ingesting
|
38
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document] information of the
|
39
|
+
// customer's website.
|
40
|
+
service DocumentService {
|
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
|
+
// Gets a [Document][google.cloud.discoveryengine.v1beta.Document].
|
46
|
+
rpc GetDocument(GetDocumentRequest) returns (Document) {
|
47
|
+
option (google.api.http) = {
|
48
|
+
get: "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}"
|
49
|
+
};
|
50
|
+
option (google.api.method_signature) = "name";
|
51
|
+
}
|
52
|
+
|
53
|
+
// Gets a list of [Document][google.cloud.discoveryengine.v1beta.Document]s.
|
54
|
+
rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) {
|
55
|
+
option (google.api.http) = {
|
56
|
+
get: "/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents"
|
57
|
+
};
|
58
|
+
option (google.api.method_signature) = "parent";
|
59
|
+
}
|
60
|
+
|
61
|
+
// Creates a [Document][google.cloud.discoveryengine.v1beta.Document].
|
62
|
+
rpc CreateDocument(CreateDocumentRequest) returns (Document) {
|
63
|
+
option (google.api.http) = {
|
64
|
+
post: "/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents"
|
65
|
+
body: "document"
|
66
|
+
};
|
67
|
+
option (google.api.method_signature) = "parent,document,document_id";
|
68
|
+
}
|
69
|
+
|
70
|
+
// Updates a [Document][google.cloud.discoveryengine.v1beta.Document].
|
71
|
+
rpc UpdateDocument(UpdateDocumentRequest) returns (Document) {
|
72
|
+
option (google.api.http) = {
|
73
|
+
patch: "/v1beta/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}"
|
74
|
+
body: "document"
|
75
|
+
};
|
76
|
+
}
|
77
|
+
|
78
|
+
// Deletes a [Document][google.cloud.discoveryengine.v1beta.Document].
|
79
|
+
rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) {
|
80
|
+
option (google.api.http) = {
|
81
|
+
delete: "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}"
|
82
|
+
};
|
83
|
+
option (google.api.method_signature) = "name";
|
84
|
+
}
|
85
|
+
|
86
|
+
// Bulk import of multiple
|
87
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document]s. Request
|
88
|
+
// processing may be synchronous. Non-existing items will be created.
|
89
|
+
//
|
90
|
+
// Note: It is possible for a subset of the
|
91
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document]s to be
|
92
|
+
// successfully updated.
|
93
|
+
rpc ImportDocuments(ImportDocumentsRequest)
|
94
|
+
returns (google.longrunning.Operation) {
|
95
|
+
option (google.api.http) = {
|
96
|
+
post: "/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import"
|
97
|
+
body: "*"
|
98
|
+
};
|
99
|
+
option (google.longrunning.operation_info) = {
|
100
|
+
response_type: "google.cloud.discoveryengine.v1beta.ImportDocumentsResponse"
|
101
|
+
metadata_type: "google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata"
|
102
|
+
};
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
// Request message for
|
107
|
+
// [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument]
|
108
|
+
// method.
|
109
|
+
message GetDocumentRequest {
|
110
|
+
// Required. Full resource name of
|
111
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document], such as
|
112
|
+
// `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
|
113
|
+
//
|
114
|
+
// If the caller does not have permission to access the
|
115
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
|
116
|
+
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
117
|
+
//
|
118
|
+
// If the requested [Document][google.cloud.discoveryengine.v1beta.Document]
|
119
|
+
// does not exist, a NOT_FOUND error is returned.
|
120
|
+
string name = 1 [
|
121
|
+
(google.api.field_behavior) = REQUIRED,
|
122
|
+
(google.api.resource_reference) = {
|
123
|
+
type: "discoveryengine.googleapis.com/Document"
|
124
|
+
}
|
125
|
+
];
|
126
|
+
}
|
127
|
+
|
128
|
+
// Request message for
|
129
|
+
// [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]
|
130
|
+
// method.
|
131
|
+
message ListDocumentsRequest {
|
132
|
+
// Required. The parent branch resource name, such as
|
133
|
+
// `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`.
|
134
|
+
// Use `default_branch` as the branch ID, to list documents under the default
|
135
|
+
// branch.
|
136
|
+
//
|
137
|
+
// If the caller does not have permission to list [Documents][]s under this
|
138
|
+
// branch, regardless of whether or not this branch exists, a
|
139
|
+
// PERMISSION_DENIED error is returned.
|
140
|
+
string parent = 1 [
|
141
|
+
(google.api.field_behavior) = REQUIRED,
|
142
|
+
(google.api.resource_reference) = {
|
143
|
+
type: "discoveryengine.googleapis.com/Branch"
|
144
|
+
}
|
145
|
+
];
|
146
|
+
|
147
|
+
// Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
|
148
|
+
// to return. If unspecified, defaults to 100. The maximum allowed value is
|
149
|
+
// 1000. Values above 1000 will be coerced to 1000.
|
150
|
+
//
|
151
|
+
// If this field is negative, an INVALID_ARGUMENT error is returned.
|
152
|
+
int32 page_size = 2;
|
153
|
+
|
154
|
+
// A page token
|
155
|
+
// [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token],
|
156
|
+
// received from a previous
|
157
|
+
// [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]
|
158
|
+
// call. Provide this to retrieve the subsequent page.
|
159
|
+
//
|
160
|
+
// When paginating, all other parameters provided to
|
161
|
+
// [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]
|
162
|
+
// must match the call that provided the page token. Otherwise, an
|
163
|
+
// INVALID_ARGUMENT error is returned.
|
164
|
+
string page_token = 3;
|
165
|
+
}
|
166
|
+
|
167
|
+
// Response message for
|
168
|
+
// [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]
|
169
|
+
// method.
|
170
|
+
message ListDocumentsResponse {
|
171
|
+
// The [Document][google.cloud.discoveryengine.v1beta.Document]s.
|
172
|
+
repeated Document documents = 1;
|
173
|
+
|
174
|
+
// A token that can be sent as
|
175
|
+
// [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1beta.ListDocumentsRequest.page_token]
|
176
|
+
// to retrieve the next page. If this field is omitted, there are no
|
177
|
+
// subsequent pages.
|
178
|
+
string next_page_token = 2;
|
179
|
+
}
|
180
|
+
|
181
|
+
// Request message for
|
182
|
+
// [DocumentService.CreateDocument][google.cloud.discoveryengine.v1beta.DocumentService.CreateDocument]
|
183
|
+
// method.
|
184
|
+
message CreateDocumentRequest {
|
185
|
+
// Required. The parent resource name, such as
|
186
|
+
// `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`.
|
187
|
+
string parent = 1 [
|
188
|
+
(google.api.field_behavior) = REQUIRED,
|
189
|
+
(google.api.resource_reference) = {
|
190
|
+
type: "discoveryengine.googleapis.com/Branch"
|
191
|
+
}
|
192
|
+
];
|
193
|
+
|
194
|
+
// Required. The [Document][google.cloud.discoveryengine.v1beta.Document] to
|
195
|
+
// create.
|
196
|
+
Document document = 2 [(google.api.field_behavior) = REQUIRED];
|
197
|
+
|
198
|
+
// Required. The ID to use for the
|
199
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document], which will become
|
200
|
+
// the final component of the
|
201
|
+
// [Document.name][google.cloud.discoveryengine.v1beta.Document.name].
|
202
|
+
//
|
203
|
+
// If the caller does not have permission to create the
|
204
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
|
205
|
+
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
206
|
+
//
|
207
|
+
// This field must be unique among all
|
208
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document]s with the same
|
209
|
+
// [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent].
|
210
|
+
// Otherwise, an ALREADY_EXISTS error is returned.
|
211
|
+
//
|
212
|
+
// This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
|
213
|
+
// standard with a length limit of 63 characters. Otherwise, an
|
214
|
+
// INVALID_ARGUMENT error is returned.
|
215
|
+
string document_id = 3 [(google.api.field_behavior) = REQUIRED];
|
216
|
+
}
|
217
|
+
|
218
|
+
// Request message for
|
219
|
+
// [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocument]
|
220
|
+
// method.
|
221
|
+
message UpdateDocumentRequest {
|
222
|
+
// Required. The document to update/create.
|
223
|
+
//
|
224
|
+
// If the caller does not have permission to update the
|
225
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
|
226
|
+
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
227
|
+
//
|
228
|
+
// If the [Document][google.cloud.discoveryengine.v1beta.Document] to update
|
229
|
+
// does not exist and
|
230
|
+
// [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing]
|
231
|
+
// is not set, a NOT_FOUND error is returned.
|
232
|
+
Document document = 1 [(google.api.field_behavior) = REQUIRED];
|
233
|
+
|
234
|
+
// If set to true, and the
|
235
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document] is not found, a
|
236
|
+
// new [Document][google.cloud.discoveryengine.v1beta.Document] will be
|
237
|
+
// created.
|
238
|
+
bool allow_missing = 2;
|
239
|
+
}
|
240
|
+
|
241
|
+
// Request message for
|
242
|
+
// [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocument]
|
243
|
+
// method.
|
244
|
+
message DeleteDocumentRequest {
|
245
|
+
// Required. Full resource name of
|
246
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document], such as
|
247
|
+
// `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
|
248
|
+
//
|
249
|
+
// If the caller does not have permission to delete the
|
250
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
|
251
|
+
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
252
|
+
//
|
253
|
+
// If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete
|
254
|
+
// does not exist, a NOT_FOUND error is returned.
|
255
|
+
string name = 1 [
|
256
|
+
(google.api.field_behavior) = REQUIRED,
|
257
|
+
(google.api.resource_reference) = {
|
258
|
+
type: "discoveryengine.googleapis.com/Document"
|
259
|
+
}
|
260
|
+
];
|
261
|
+
}
|
@@ -0,0 +1,265 @@
|
|
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.v1beta;
|
18
|
+
|
19
|
+
import "google/api/field_behavior.proto";
|
20
|
+
import "google/api/resource.proto";
|
21
|
+
import "google/cloud/discoveryengine/v1beta/document.proto";
|
22
|
+
import "google/cloud/discoveryengine/v1beta/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.V1Beta";
|
28
|
+
option go_package = "google.golang.org/genproto/googleapis/cloud/discoveryengine/v1beta;discoveryengine";
|
29
|
+
option java_multiple_files = true;
|
30
|
+
option java_outer_classname = "ImportConfigProto";
|
31
|
+
option java_package = "com.google.cloud.discoveryengine.v1beta";
|
32
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
33
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
|
34
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
|
35
|
+
|
36
|
+
// Google Cloud Storage location for input content.
|
37
|
+
// format.
|
38
|
+
message GcsSource {
|
39
|
+
// Required. Google Cloud Storage URIs to input files. URI can be up to
|
40
|
+
// 2000 characters long. URIs can match the full object path (for example,
|
41
|
+
// `gs://bucket/directory/object.json`) or a pattern matching one or more
|
42
|
+
// files, such as `gs://bucket/directory/*.json`. A request can
|
43
|
+
// contain at most 100 files, and each file can be up to 2 GB.
|
44
|
+
repeated string input_uris = 1 [(google.api.field_behavior) = REQUIRED];
|
45
|
+
|
46
|
+
// The schema to use when parsing the data from the source.
|
47
|
+
//
|
48
|
+
// Supported values for imports:
|
49
|
+
//
|
50
|
+
// * `user_event` (default): One JSON
|
51
|
+
// [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line.
|
52
|
+
//
|
53
|
+
// * `document` (default): One JSON
|
54
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each
|
55
|
+
// document must
|
56
|
+
// have a valid
|
57
|
+
// [Document.id][google.cloud.discoveryengine.v1beta.Document.id].
|
58
|
+
string data_schema = 2;
|
59
|
+
}
|
60
|
+
|
61
|
+
// BigQuery source import data from.
|
62
|
+
message BigQuerySource {
|
63
|
+
// BigQuery table partition info. Leave this empty if the BigQuery table
|
64
|
+
// is not partitioned.
|
65
|
+
oneof partition {
|
66
|
+
// BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
|
67
|
+
google.type.Date partition_date = 5;
|
68
|
+
}
|
69
|
+
|
70
|
+
// The project ID (can be project # or ID) that the BigQuery source is in with
|
71
|
+
// a length limit of 128 characters. If not specified, inherits the project
|
72
|
+
// ID from the parent request.
|
73
|
+
string project_id = 1;
|
74
|
+
|
75
|
+
// Required. The BigQuery data set to copy the data from with a length limit
|
76
|
+
// of 1,024 characters.
|
77
|
+
string dataset_id = 2 [(google.api.field_behavior) = REQUIRED];
|
78
|
+
|
79
|
+
// Required. The BigQuery table to copy the data from with a length limit of
|
80
|
+
// 1,024 characters.
|
81
|
+
string table_id = 3 [(google.api.field_behavior) = REQUIRED];
|
82
|
+
|
83
|
+
// Intermediate Cloud Storage directory used for the import with a length
|
84
|
+
// limit of 2,000 characters. Can be specified if one wants to have the
|
85
|
+
// BigQuery export to a specific Cloud Storage directory.
|
86
|
+
string gcs_staging_dir = 4;
|
87
|
+
|
88
|
+
// The schema to use when parsing the data from the source.
|
89
|
+
//
|
90
|
+
// Supported values for imports:
|
91
|
+
//
|
92
|
+
// * `user_event` (default): One JSON
|
93
|
+
// [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line.
|
94
|
+
//
|
95
|
+
// * `document` (default): One JSON
|
96
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each
|
97
|
+
// document must have a valid [document.id][].
|
98
|
+
string data_schema = 6;
|
99
|
+
}
|
100
|
+
|
101
|
+
// Configuration of destination for Import related errors.
|
102
|
+
message ImportErrorConfig {
|
103
|
+
// Required. Errors destination.
|
104
|
+
oneof destination {
|
105
|
+
// Google Cloud Storage prefix for import errors. This must be an empty,
|
106
|
+
// existing Cloud Storage directory. Import errors will be written to
|
107
|
+
// sharded files in this directory, one per line, as a JSON-encoded
|
108
|
+
// `google.rpc.Status` message.
|
109
|
+
string gcs_prefix = 1;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
// Request message for the ImportUserEvents request.
|
114
|
+
message ImportUserEventsRequest {
|
115
|
+
// The inline source for the input config for ImportUserEvents method.
|
116
|
+
message InlineSource {
|
117
|
+
// Required. A list of user events to import. Recommended max of 10k items.
|
118
|
+
repeated UserEvent user_events = 1 [(google.api.field_behavior) = REQUIRED];
|
119
|
+
}
|
120
|
+
|
121
|
+
// The desired input source of the user event data.
|
122
|
+
oneof source {
|
123
|
+
// Required. The Inline source for the input content for UserEvents.
|
124
|
+
InlineSource inline_source = 2 [(google.api.field_behavior) = REQUIRED];
|
125
|
+
|
126
|
+
// Required. Google Cloud Storage location for the input content.
|
127
|
+
GcsSource gcs_source = 3 [(google.api.field_behavior) = REQUIRED];
|
128
|
+
|
129
|
+
// Required. BigQuery input source.
|
130
|
+
BigQuerySource bigquery_source = 4 [(google.api.field_behavior) = REQUIRED];
|
131
|
+
}
|
132
|
+
|
133
|
+
// Required. Parent DataStore resource name, of the form
|
134
|
+
// `projects/{project}/locations/{location}/dataStores/{data_store}`
|
135
|
+
string parent = 1 [
|
136
|
+
(google.api.field_behavior) = REQUIRED,
|
137
|
+
(google.api.resource_reference) = {
|
138
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
139
|
+
}
|
140
|
+
];
|
141
|
+
|
142
|
+
// The desired location of errors incurred during the Import. Cannot be set
|
143
|
+
// for inline user event imports.
|
144
|
+
ImportErrorConfig error_config = 5;
|
145
|
+
}
|
146
|
+
|
147
|
+
// Response of the ImportUserEventsRequest. If the long running
|
148
|
+
// operation was successful, then this message is returned by the
|
149
|
+
// google.longrunning.Operations.response field if the operation was successful.
|
150
|
+
message ImportUserEventsResponse {
|
151
|
+
// A sample of errors encountered while processing the request.
|
152
|
+
repeated google.rpc.Status error_samples = 1;
|
153
|
+
|
154
|
+
// Echoes the destination for the complete errors if this field was set in
|
155
|
+
// the request.
|
156
|
+
ImportErrorConfig error_config = 2;
|
157
|
+
|
158
|
+
// Count of user events imported with complete existing Documents.
|
159
|
+
int64 joined_events_count = 3;
|
160
|
+
|
161
|
+
// Count of user events imported, but with Document information not found
|
162
|
+
// in the existing Branch.
|
163
|
+
int64 unjoined_events_count = 4;
|
164
|
+
}
|
165
|
+
|
166
|
+
// Metadata related to the progress of the Import operation. This will be
|
167
|
+
// returned by the google.longrunning.Operation.metadata field.
|
168
|
+
message ImportUserEventsMetadata {
|
169
|
+
// Operation create time.
|
170
|
+
google.protobuf.Timestamp create_time = 1;
|
171
|
+
|
172
|
+
// Operation last update time. If the operation is done, this is also the
|
173
|
+
// finish time.
|
174
|
+
google.protobuf.Timestamp update_time = 2;
|
175
|
+
|
176
|
+
// Count of entries that were processed successfully.
|
177
|
+
int64 success_count = 3;
|
178
|
+
|
179
|
+
// Count of entries that encountered errors while processing.
|
180
|
+
int64 failure_count = 4;
|
181
|
+
}
|
182
|
+
|
183
|
+
// Metadata related to the progress of the ImportDocuments operation. This will
|
184
|
+
// be returned by the google.longrunning.Operation.metadata field.
|
185
|
+
message ImportDocumentsMetadata {
|
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
|
+
// Count of entries that were processed successfully.
|
194
|
+
int64 success_count = 3;
|
195
|
+
|
196
|
+
// Count of entries that encountered errors while processing.
|
197
|
+
int64 failure_count = 4;
|
198
|
+
}
|
199
|
+
|
200
|
+
// Request message for Import methods.
|
201
|
+
message ImportDocumentsRequest {
|
202
|
+
// The inline source for the input config for ImportDocuments method.
|
203
|
+
message InlineSource {
|
204
|
+
// Required. A list of documents to update/create. Each document must have a
|
205
|
+
// valid [Document.id][google.cloud.discoveryengine.v1beta.Document.id].
|
206
|
+
// Recommended max of 100 items.
|
207
|
+
repeated Document documents = 1 [(google.api.field_behavior) = REQUIRED];
|
208
|
+
}
|
209
|
+
|
210
|
+
// Indicates how imported documents are reconciled with the existing documents
|
211
|
+
// created or imported before.
|
212
|
+
enum ReconciliationMode {
|
213
|
+
// Defaults to INCREMENTAL.
|
214
|
+
RECONCILIATION_MODE_UNSPECIFIED = 0;
|
215
|
+
|
216
|
+
// Inserts new documents or updates existing documents.
|
217
|
+
INCREMENTAL = 1;
|
218
|
+
|
219
|
+
// Calculates diff and replaces the entire document dataset. Existing
|
220
|
+
// documents may be deleted if they are not present in the source location.
|
221
|
+
FULL = 2;
|
222
|
+
}
|
223
|
+
|
224
|
+
// Required. The source of the input.
|
225
|
+
oneof source {
|
226
|
+
// The Inline source for the input content for documents.
|
227
|
+
InlineSource inline_source = 2;
|
228
|
+
|
229
|
+
// Google Cloud Storage location for the input content.
|
230
|
+
GcsSource gcs_source = 3;
|
231
|
+
|
232
|
+
// BigQuery input source.
|
233
|
+
BigQuerySource bigquery_source = 4;
|
234
|
+
}
|
235
|
+
|
236
|
+
// Required. The parent branch resource name, such as
|
237
|
+
// `projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}`.
|
238
|
+
// Requires create/update permission.
|
239
|
+
string parent = 1 [
|
240
|
+
(google.api.field_behavior) = REQUIRED,
|
241
|
+
(google.api.resource_reference) = {
|
242
|
+
type: "discoveryengine.googleapis.com/Branch"
|
243
|
+
}
|
244
|
+
];
|
245
|
+
|
246
|
+
// The desired location of errors incurred during the Import.
|
247
|
+
ImportErrorConfig error_config = 5;
|
248
|
+
|
249
|
+
// The mode of reconciliation between existing documents and the documents to
|
250
|
+
// be imported. Defaults to
|
251
|
+
// [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
|
252
|
+
ReconciliationMode reconciliation_mode = 6;
|
253
|
+
}
|
254
|
+
|
255
|
+
// Response of the
|
256
|
+
// [ImportDocumentsRequest][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest].
|
257
|
+
// If the long running operation is done, then this message is returned by the
|
258
|
+
// google.longrunning.Operations.response field if the operation was successful.
|
259
|
+
message ImportDocumentsResponse {
|
260
|
+
// A sample of errors encountered while processing the request.
|
261
|
+
repeated google.rpc.Status error_samples = 1;
|
262
|
+
|
263
|
+
// Echoes the destination for the complete errors in the request if set.
|
264
|
+
ImportErrorConfig error_config = 2;
|
265
|
+
}
|