@google-cloud/discoveryengine 2.1.0 → 2.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/README.md +13 -0
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +17 -0
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1/cmek_config_service.proto +300 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +67 -0
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +1 -3
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +14 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +95 -4
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +28 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +131 -6
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +8 -0
- package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto +84 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto +375 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license_service.proto +191 -0
- package/build/protos/protos.d.ts +5415 -578
- package/build/protos/protos.js +77830 -63391
- package/build/protos/protos.json +1537 -92
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +8 -22
- package/build/src/v1/cmek_config_service_client.d.ts +2287 -0
- package/build/src/v1/cmek_config_service_client.js +3274 -0
- package/build/src/v1/cmek_config_service_client_config.json +42 -0
- package/build/src/v1/cmek_config_service_proto_list.json +44 -0
- package/build/src/v1/completion_service_client.d.ts +166 -76
- package/build/src/v1/completion_service_client.js +258 -263
- package/build/src/v1/completion_service_proto_list.json +6 -1
- package/build/src/v1/control_service_client.d.ts +171 -81
- package/build/src/v1/control_service_client.js +246 -132
- package/build/src/v1/control_service_proto_list.json +6 -1
- package/build/src/v1/conversational_search_service_client.d.ts +233 -143
- package/build/src/v1/conversational_search_service_client.js +330 -226
- package/build/src/v1/conversational_search_service_proto_list.json +6 -1
- package/build/src/v1/data_store_service_client.d.ts +218 -122
- package/build/src/v1/data_store_service_client.js +273 -281
- package/build/src/v1/data_store_service_proto_list.json +6 -1
- package/build/src/v1/document_service_client.d.ts +210 -120
- package/build/src/v1/document_service_client.js +300 -301
- package/build/src/v1/document_service_proto_list.json +6 -1
- package/build/src/v1/engine_service_client.d.ts +193 -103
- package/build/src/v1/engine_service_client.js +273 -280
- package/build/src/v1/engine_service_proto_list.json +6 -1
- package/build/src/v1/gapic_metadata.json +184 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +138 -48
- package/build/src/v1/grounded_generation_service_client.js +217 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +6 -1
- package/build/src/v1/identity_mapping_store_service_client.d.ts +2470 -0
- package/build/src/v1/identity_mapping_store_service_client.js +3449 -0
- package/build/src/v1/identity_mapping_store_service_client_config.json +54 -0
- package/build/src/v1/identity_mapping_store_service_proto_list.json +44 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +7 -1
- package/build/src/v1/project_service_client.d.ts +166 -76
- package/build/src/v1/project_service_client.js +235 -223
- package/build/src/v1/project_service_proto_list.json +6 -1
- package/build/src/v1/rank_service_client.d.ts +137 -47
- package/build/src/v1/rank_service_client.js +204 -85
- package/build/src/v1/rank_service_proto_list.json +6 -1
- package/build/src/v1/recommendation_service_client.d.ts +137 -47
- package/build/src/v1/recommendation_service_client.js +202 -82
- package/build/src/v1/recommendation_service_proto_list.json +6 -1
- package/build/src/v1/schema_service_client.d.ts +201 -111
- package/build/src/v1/schema_service_client.js +264 -274
- package/build/src/v1/schema_service_proto_list.json +6 -1
- package/build/src/v1/search_service_client.d.ts +661 -571
- package/build/src/v1/search_service_client.js +216 -113
- package/build/src/v1/search_service_proto_list.json +6 -1
- package/build/src/v1/search_tuning_service_client.d.ts +167 -77
- package/build/src/v1/search_tuning_service_client.js +246 -236
- package/build/src/v1/search_tuning_service_proto_list.json +6 -1
- package/build/src/v1/serving_config_service_client.d.ts +138 -48
- package/build/src/v1/serving_config_service_client.js +201 -80
- package/build/src/v1/serving_config_service_proto_list.json +6 -1
- package/build/src/v1/site_search_engine_service_client.d.ts +238 -148
- package/build/src/v1/site_search_engine_service_client.js +324 -379
- package/build/src/v1/site_search_engine_service_proto_list.json +6 -1
- package/build/src/v1/user_event_service_client.d.ts +167 -77
- package/build/src/v1/user_event_service_client.js +260 -254
- package/build/src/v1/user_event_service_proto_list.json +6 -1
- package/build/src/v1/user_license_service_client.d.ts +2256 -0
- package/build/src/v1/user_license_service_client.js +3194 -0
- package/build/src/v1/user_license_service_client_config.json +34 -0
- package/build/src/v1/user_license_service_proto_list.json +44 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +94 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +98 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +141 -281
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +129 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +211 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +176 -317
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +193 -329
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +180 -326
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +119 -244
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +150 -296
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +85 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +139 -263
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +87 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +85 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +169 -302
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +130 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +147 -293
- package/build/src/v1alpha/search_service_client.d.ts +327 -327
- package/build/src/v1alpha/search_service_client.js +88 -112
- package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1alpha/search_tuning_service_client.js +129 -254
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +109 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +203 -388
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +143 -272
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +149 -280
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +127 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +209 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +154 -289
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +181 -310
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +178 -316
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +148 -286
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +98 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +116 -232
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +85 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +83 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +167 -292
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +128 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +145 -283
- package/build/src/v1beta/search_service_client.d.ts +665 -665
- package/build/src/v1beta/search_service_client.js +97 -128
- package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1beta/search_tuning_service_client.js +127 -244
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +107 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +205 -387
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +141 -262
- package/package.json +7 -7
- package/CHANGELOG.md +0 -267
@@ -100,26 +100,17 @@ class DocumentServiceClient {
|
|
100
100
|
constructor(opts, gaxInstance) {
|
101
101
|
// Ensure that options include all the required fields.
|
102
102
|
const staticMembers = this.constructor;
|
103
|
-
if (opts?.universe_domain &&
|
104
|
-
opts?.universeDomain &&
|
105
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
103
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
106
104
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
107
105
|
}
|
108
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
109
|
-
|
110
|
-
: undefined;
|
111
|
-
this._universeDomain =
|
112
|
-
opts?.universeDomain ??
|
113
|
-
opts?.universe_domain ??
|
114
|
-
universeDomainEnvVar ??
|
115
|
-
'googleapis.com';
|
106
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
107
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
116
108
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
117
109
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
118
110
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
119
111
|
const port = opts?.port || staticMembers.port;
|
120
112
|
const clientConfig = opts?.clientConfig ?? {};
|
121
|
-
const fallback = opts?.fallback ??
|
122
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
113
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
123
114
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
124
115
|
// Request numeric enum values if REST transport is used.
|
125
116
|
opts.numericEnums = true;
|
@@ -149,7 +140,10 @@ class DocumentServiceClient {
|
|
149
140
|
}
|
150
141
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
151
142
|
// Determine the client header string.
|
152
|
-
const clientHeader = [
|
143
|
+
const clientHeader = [
|
144
|
+
`gax/${this._gaxModule.version}`,
|
145
|
+
`gapic/${version}`,
|
146
|
+
];
|
153
147
|
if (typeof process === 'object' && 'versions' in process) {
|
154
148
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
155
149
|
}
|
@@ -215,136 +209,31 @@ class DocumentServiceClient {
|
|
215
209
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
216
210
|
// pages). Denote the keys used for pagination and results.
|
217
211
|
this.descriptors.page = {
|
218
|
-
listDocuments: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'documents')
|
212
|
+
listDocuments: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'documents')
|
219
213
|
};
|
220
|
-
const protoFilesRoot = this._gaxModule.
|
214
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
221
215
|
// This API contains "long-running operations", which return a
|
222
216
|
// an Operation object that allows for tracking of the operation,
|
223
217
|
// rather than holding a request open.
|
224
218
|
const lroOptions = {
|
225
219
|
auth: this.auth,
|
226
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
220
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
227
221
|
};
|
228
222
|
if (opts.fallback) {
|
229
223
|
lroOptions.protoJson = protoFilesRoot;
|
230
|
-
lroOptions.httpRules = [
|
231
|
-
{
|
232
|
-
|
233
|
-
|
234
|
-
body: '*',
|
235
|
-
additional_bindings: [
|
236
|
-
{
|
237
|
-
post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
238
|
-
body: '*',
|
239
|
-
},
|
240
|
-
],
|
241
|
-
},
|
242
|
-
{
|
243
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
244
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
245
|
-
additional_bindings: [
|
246
|
-
{
|
247
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
248
|
-
},
|
249
|
-
{
|
250
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
251
|
-
},
|
252
|
-
{
|
253
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
254
|
-
},
|
255
|
-
{
|
256
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
257
|
-
},
|
258
|
-
{
|
259
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
260
|
-
},
|
261
|
-
{
|
262
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
263
|
-
},
|
264
|
-
{
|
265
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
266
|
-
},
|
267
|
-
{
|
268
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
|
269
|
-
},
|
270
|
-
{
|
271
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
272
|
-
},
|
273
|
-
{
|
274
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
275
|
-
},
|
276
|
-
{
|
277
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
278
|
-
},
|
279
|
-
{
|
280
|
-
get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
281
|
-
},
|
282
|
-
{
|
283
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
|
284
|
-
},
|
285
|
-
{ get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
|
286
|
-
{
|
287
|
-
get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
288
|
-
},
|
289
|
-
{ get: '/v1alpha/{name=projects/*/operations/*}' },
|
290
|
-
],
|
291
|
-
},
|
292
|
-
{
|
293
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
294
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
295
|
-
additional_bindings: [
|
296
|
-
{
|
297
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
298
|
-
},
|
299
|
-
{
|
300
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
301
|
-
},
|
302
|
-
{
|
303
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
304
|
-
},
|
305
|
-
{
|
306
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
307
|
-
},
|
308
|
-
{
|
309
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
310
|
-
},
|
311
|
-
{
|
312
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
313
|
-
},
|
314
|
-
{
|
315
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
316
|
-
},
|
317
|
-
{
|
318
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
|
319
|
-
},
|
320
|
-
{
|
321
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
322
|
-
},
|
323
|
-
{
|
324
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
325
|
-
},
|
326
|
-
{
|
327
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
|
328
|
-
},
|
329
|
-
{
|
330
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
|
331
|
-
},
|
332
|
-
{ get: '/v1alpha/{name=projects/*/locations/*}/operations' },
|
333
|
-
{ get: '/v1alpha/{name=projects/*}/operations' },
|
334
|
-
],
|
335
|
-
},
|
336
|
-
];
|
224
|
+
lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
|
225
|
+
}, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/operations/*}', }],
|
226
|
+
}, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*}/operations', }, { get: '/v1alpha/{name=projects/*}/operations', }],
|
227
|
+
}];
|
337
228
|
}
|
338
|
-
this.operationsClient = this._gaxModule
|
339
|
-
.lro(lroOptions)
|
340
|
-
.operationsClient(opts);
|
229
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
341
230
|
const importDocumentsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse');
|
342
231
|
const importDocumentsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata');
|
343
232
|
const purgeDocumentsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse');
|
344
233
|
const purgeDocumentsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata');
|
345
234
|
this.descriptors.longrunning = {
|
346
235
|
importDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importDocumentsResponse.decode.bind(importDocumentsResponse), importDocumentsMetadata.decode.bind(importDocumentsMetadata)),
|
347
|
-
purgeDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeDocumentsResponse.decode.bind(purgeDocumentsResponse), purgeDocumentsMetadata.decode.bind(purgeDocumentsMetadata))
|
236
|
+
purgeDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeDocumentsResponse.decode.bind(purgeDocumentsResponse), purgeDocumentsMetadata.decode.bind(purgeDocumentsMetadata))
|
348
237
|
};
|
349
238
|
// Put together the default options sent with requests.
|
350
239
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.DocumentService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -373,24 +262,13 @@ class DocumentServiceClient {
|
|
373
262
|
}
|
374
263
|
// Put together the "service stub" for
|
375
264
|
// google.cloud.discoveryengine.v1alpha.DocumentService.
|
376
|
-
this.documentServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
.DocumentService, this._opts, this._providedCustomServicePath);
|
265
|
+
this.documentServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
266
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.DocumentService') :
|
267
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
268
|
+
this._protos.google.cloud.discoveryengine.v1alpha.DocumentService, this._opts, this._providedCustomServicePath);
|
381
269
|
// Iterate over each of the methods that the service provides
|
382
270
|
// and create an API call method for each.
|
383
|
-
const documentServiceStubMethods = [
|
384
|
-
'getDocument',
|
385
|
-
'listDocuments',
|
386
|
-
'createDocument',
|
387
|
-
'updateDocument',
|
388
|
-
'deleteDocument',
|
389
|
-
'importDocuments',
|
390
|
-
'purgeDocuments',
|
391
|
-
'getProcessedDocument',
|
392
|
-
'batchGetDocumentsMetadata',
|
393
|
-
];
|
271
|
+
const documentServiceStubMethods = ['getDocument', 'listDocuments', 'createDocument', 'updateDocument', 'deleteDocument', 'importDocuments', 'purgeDocuments', 'getProcessedDocument', 'batchGetDocumentsMetadata'];
|
394
272
|
for (const methodName of documentServiceStubMethods) {
|
395
273
|
const callPromise = this.documentServiceStub.then(stub => (...args) => {
|
396
274
|
if (this._terminated) {
|
@@ -415,8 +293,7 @@ class DocumentServiceClient {
|
|
415
293
|
* @returns {string} The DNS address for this service.
|
416
294
|
*/
|
417
295
|
static get servicePath() {
|
418
|
-
if (typeof process === 'object' &&
|
419
|
-
typeof process.emitWarning === 'function') {
|
296
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
420
297
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
421
298
|
}
|
422
299
|
return 'discoveryengine.googleapis.com';
|
@@ -427,8 +304,7 @@ class DocumentServiceClient {
|
|
427
304
|
* @returns {string} The DNS address for this service.
|
428
305
|
*/
|
429
306
|
static get apiEndpoint() {
|
430
|
-
if (typeof process === 'object' &&
|
431
|
-
typeof process.emitWarning === 'function') {
|
307
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
432
308
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
433
309
|
}
|
434
310
|
return 'discoveryengine.googleapis.com';
|
@@ -456,7 +332,9 @@ class DocumentServiceClient {
|
|
456
332
|
* @returns {string[]} List of default scopes.
|
457
333
|
*/
|
458
334
|
static get scopes() {
|
459
|
-
return [
|
335
|
+
return [
|
336
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
337
|
+
];
|
460
338
|
}
|
461
339
|
/**
|
462
340
|
* Return the project ID used by this class.
|
@@ -482,13 +360,10 @@ class DocumentServiceClient {
|
|
482
360
|
options = options || {};
|
483
361
|
options.otherArgs = options.otherArgs || {};
|
484
362
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
485
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
486
|
-
|
487
|
-
name: request.name ?? '',
|
488
|
-
});
|
489
|
-
this.initialize().catch(err => {
|
490
|
-
throw err;
|
363
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
364
|
+
'name': request.name ?? '',
|
491
365
|
});
|
366
|
+
this.initialize().catch(err => { throw err; });
|
492
367
|
this._log.info('getDocument request %j', request);
|
493
368
|
const wrappedCallback = callback
|
494
369
|
? (error, response, options, rawResponse) => {
|
@@ -496,11 +371,16 @@ class DocumentServiceClient {
|
|
496
371
|
callback(error, response, options, rawResponse); // We verified callback above.
|
497
372
|
}
|
498
373
|
: undefined;
|
499
|
-
return this.innerApiCalls
|
500
|
-
.getDocument(request, options, wrappedCallback)
|
374
|
+
return this.innerApiCalls.getDocument(request, options, wrappedCallback)
|
501
375
|
?.then(([response, options, rawResponse]) => {
|
502
376
|
this._log.info('getDocument response %j', response);
|
503
377
|
return [response, options, rawResponse];
|
378
|
+
}).catch((error) => {
|
379
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
380
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
381
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
382
|
+
}
|
383
|
+
throw error;
|
504
384
|
});
|
505
385
|
}
|
506
386
|
createDocument(request, optionsOrCallback, callback) {
|
@@ -516,13 +396,10 @@ class DocumentServiceClient {
|
|
516
396
|
options = options || {};
|
517
397
|
options.otherArgs = options.otherArgs || {};
|
518
398
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
519
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
520
|
-
|
521
|
-
parent: request.parent ?? '',
|
522
|
-
});
|
523
|
-
this.initialize().catch(err => {
|
524
|
-
throw err;
|
399
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
400
|
+
'parent': request.parent ?? '',
|
525
401
|
});
|
402
|
+
this.initialize().catch(err => { throw err; });
|
526
403
|
this._log.info('createDocument request %j', request);
|
527
404
|
const wrappedCallback = callback
|
528
405
|
? (error, response, options, rawResponse) => {
|
@@ -530,11 +407,16 @@ class DocumentServiceClient {
|
|
530
407
|
callback(error, response, options, rawResponse); // We verified callback above.
|
531
408
|
}
|
532
409
|
: undefined;
|
533
|
-
return this.innerApiCalls
|
534
|
-
.createDocument(request, options, wrappedCallback)
|
410
|
+
return this.innerApiCalls.createDocument(request, options, wrappedCallback)
|
535
411
|
?.then(([response, options, rawResponse]) => {
|
536
412
|
this._log.info('createDocument response %j', response);
|
537
413
|
return [response, options, rawResponse];
|
414
|
+
}).catch((error) => {
|
415
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
416
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
417
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
418
|
+
}
|
419
|
+
throw error;
|
538
420
|
});
|
539
421
|
}
|
540
422
|
updateDocument(request, optionsOrCallback, callback) {
|
@@ -550,13 +432,10 @@ class DocumentServiceClient {
|
|
550
432
|
options = options || {};
|
551
433
|
options.otherArgs = options.otherArgs || {};
|
552
434
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
553
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
554
|
-
|
555
|
-
'document.name': request.document.name ?? '',
|
556
|
-
});
|
557
|
-
this.initialize().catch(err => {
|
558
|
-
throw err;
|
435
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
436
|
+
'document.name': request.document.name ?? '',
|
559
437
|
});
|
438
|
+
this.initialize().catch(err => { throw err; });
|
560
439
|
this._log.info('updateDocument request %j', request);
|
561
440
|
const wrappedCallback = callback
|
562
441
|
? (error, response, options, rawResponse) => {
|
@@ -564,11 +443,16 @@ class DocumentServiceClient {
|
|
564
443
|
callback(error, response, options, rawResponse); // We verified callback above.
|
565
444
|
}
|
566
445
|
: undefined;
|
567
|
-
return this.innerApiCalls
|
568
|
-
.updateDocument(request, options, wrappedCallback)
|
446
|
+
return this.innerApiCalls.updateDocument(request, options, wrappedCallback)
|
569
447
|
?.then(([response, options, rawResponse]) => {
|
570
448
|
this._log.info('updateDocument response %j', response);
|
571
449
|
return [response, options, rawResponse];
|
450
|
+
}).catch((error) => {
|
451
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
452
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
453
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
454
|
+
}
|
455
|
+
throw error;
|
572
456
|
});
|
573
457
|
}
|
574
458
|
deleteDocument(request, optionsOrCallback, callback) {
|
@@ -584,13 +468,10 @@ class DocumentServiceClient {
|
|
584
468
|
options = options || {};
|
585
469
|
options.otherArgs = options.otherArgs || {};
|
586
470
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
587
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
588
|
-
|
589
|
-
name: request.name ?? '',
|
590
|
-
});
|
591
|
-
this.initialize().catch(err => {
|
592
|
-
throw err;
|
471
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
472
|
+
'name': request.name ?? '',
|
593
473
|
});
|
474
|
+
this.initialize().catch(err => { throw err; });
|
594
475
|
this._log.info('deleteDocument request %j', request);
|
595
476
|
const wrappedCallback = callback
|
596
477
|
? (error, response, options, rawResponse) => {
|
@@ -598,11 +479,16 @@ class DocumentServiceClient {
|
|
598
479
|
callback(error, response, options, rawResponse); // We verified callback above.
|
599
480
|
}
|
600
481
|
: undefined;
|
601
|
-
return this.innerApiCalls
|
602
|
-
.deleteDocument(request, options, wrappedCallback)
|
482
|
+
return this.innerApiCalls.deleteDocument(request, options, wrappedCallback)
|
603
483
|
?.then(([response, options, rawResponse]) => {
|
604
484
|
this._log.info('deleteDocument response %j', response);
|
605
485
|
return [response, options, rawResponse];
|
486
|
+
}).catch((error) => {
|
487
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
488
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
489
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
490
|
+
}
|
491
|
+
throw error;
|
606
492
|
});
|
607
493
|
}
|
608
494
|
getProcessedDocument(request, optionsOrCallback, callback) {
|
@@ -618,13 +504,10 @@ class DocumentServiceClient {
|
|
618
504
|
options = options || {};
|
619
505
|
options.otherArgs = options.otherArgs || {};
|
620
506
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
621
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
622
|
-
|
623
|
-
name: request.name ?? '',
|
624
|
-
});
|
625
|
-
this.initialize().catch(err => {
|
626
|
-
throw err;
|
507
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
508
|
+
'name': request.name ?? '',
|
627
509
|
});
|
510
|
+
this.initialize().catch(err => { throw err; });
|
628
511
|
this._log.info('getProcessedDocument request %j', request);
|
629
512
|
const wrappedCallback = callback
|
630
513
|
? (error, response, options, rawResponse) => {
|
@@ -632,11 +515,16 @@ class DocumentServiceClient {
|
|
632
515
|
callback(error, response, options, rawResponse); // We verified callback above.
|
633
516
|
}
|
634
517
|
: undefined;
|
635
|
-
return this.innerApiCalls
|
636
|
-
.getProcessedDocument(request, options, wrappedCallback)
|
518
|
+
return this.innerApiCalls.getProcessedDocument(request, options, wrappedCallback)
|
637
519
|
?.then(([response, options, rawResponse]) => {
|
638
520
|
this._log.info('getProcessedDocument response %j', response);
|
639
521
|
return [response, options, rawResponse];
|
522
|
+
}).catch((error) => {
|
523
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
524
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
525
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
526
|
+
}
|
527
|
+
throw error;
|
640
528
|
});
|
641
529
|
}
|
642
530
|
batchGetDocumentsMetadata(request, optionsOrCallback, callback) {
|
@@ -652,13 +540,10 @@ class DocumentServiceClient {
|
|
652
540
|
options = options || {};
|
653
541
|
options.otherArgs = options.otherArgs || {};
|
654
542
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
655
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
656
|
-
|
657
|
-
parent: request.parent ?? '',
|
658
|
-
});
|
659
|
-
this.initialize().catch(err => {
|
660
|
-
throw err;
|
543
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
544
|
+
'parent': request.parent ?? '',
|
661
545
|
});
|
546
|
+
this.initialize().catch(err => { throw err; });
|
662
547
|
this._log.info('batchGetDocumentsMetadata request %j', request);
|
663
548
|
const wrappedCallback = callback
|
664
549
|
? (error, response, options, rawResponse) => {
|
@@ -666,11 +551,16 @@ class DocumentServiceClient {
|
|
666
551
|
callback(error, response, options, rawResponse); // We verified callback above.
|
667
552
|
}
|
668
553
|
: undefined;
|
669
|
-
return this.innerApiCalls
|
670
|
-
.batchGetDocumentsMetadata(request, options, wrappedCallback)
|
554
|
+
return this.innerApiCalls.batchGetDocumentsMetadata(request, options, wrappedCallback)
|
671
555
|
?.then(([response, options, rawResponse]) => {
|
672
556
|
this._log.info('batchGetDocumentsMetadata response %j', response);
|
673
557
|
return [response, options, rawResponse];
|
558
|
+
}).catch((error) => {
|
559
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
560
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
561
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
562
|
+
}
|
563
|
+
throw error;
|
674
564
|
});
|
675
565
|
}
|
676
566
|
importDocuments(request, optionsOrCallback, callback) {
|
@@ -686,13 +576,10 @@ class DocumentServiceClient {
|
|
686
576
|
options = options || {};
|
687
577
|
options.otherArgs = options.otherArgs || {};
|
688
578
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
689
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
690
|
-
|
691
|
-
parent: request.parent ?? '',
|
692
|
-
});
|
693
|
-
this.initialize().catch(err => {
|
694
|
-
throw err;
|
579
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
580
|
+
'parent': request.parent ?? '',
|
695
581
|
});
|
582
|
+
this.initialize().catch(err => { throw err; });
|
696
583
|
const wrappedCallback = callback
|
697
584
|
? (error, response, rawResponse, _) => {
|
698
585
|
this._log.info('importDocuments response %j', rawResponse);
|
@@ -700,8 +587,7 @@ class DocumentServiceClient {
|
|
700
587
|
}
|
701
588
|
: undefined;
|
702
589
|
this._log.info('importDocuments request %j', request);
|
703
|
-
return this.innerApiCalls
|
704
|
-
.importDocuments(request, options, wrappedCallback)
|
590
|
+
return this.innerApiCalls.importDocuments(request, options, wrappedCallback)
|
705
591
|
?.then(([response, rawResponse, _]) => {
|
706
592
|
this._log.info('importDocuments response %j', rawResponse);
|
707
593
|
return [response, rawResponse, _];
|
@@ -738,13 +624,10 @@ class DocumentServiceClient {
|
|
738
624
|
options = options || {};
|
739
625
|
options.otherArgs = options.otherArgs || {};
|
740
626
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
741
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
742
|
-
|
743
|
-
parent: request.parent ?? '',
|
744
|
-
});
|
745
|
-
this.initialize().catch(err => {
|
746
|
-
throw err;
|
627
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
628
|
+
'parent': request.parent ?? '',
|
747
629
|
});
|
630
|
+
this.initialize().catch(err => { throw err; });
|
748
631
|
const wrappedCallback = callback
|
749
632
|
? (error, response, rawResponse, _) => {
|
750
633
|
this._log.info('purgeDocuments response %j', rawResponse);
|
@@ -752,8 +635,7 @@ class DocumentServiceClient {
|
|
752
635
|
}
|
753
636
|
: undefined;
|
754
637
|
this._log.info('purgeDocuments request %j', request);
|
755
|
-
return this.innerApiCalls
|
756
|
-
.purgeDocuments(request, options, wrappedCallback)
|
638
|
+
return this.innerApiCalls.purgeDocuments(request, options, wrappedCallback)
|
757
639
|
?.then(([response, rawResponse, _]) => {
|
758
640
|
this._log.info('purgeDocuments response %j', rawResponse);
|
759
641
|
return [response, rawResponse, _];
|
@@ -790,13 +672,10 @@ class DocumentServiceClient {
|
|
790
672
|
options = options || {};
|
791
673
|
options.otherArgs = options.otherArgs || {};
|
792
674
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
793
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
794
|
-
|
795
|
-
parent: request.parent ?? '',
|
796
|
-
});
|
797
|
-
this.initialize().catch(err => {
|
798
|
-
throw err;
|
675
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
676
|
+
'parent': request.parent ?? '',
|
799
677
|
});
|
678
|
+
this.initialize().catch(err => { throw err; });
|
800
679
|
const wrappedCallback = callback
|
801
680
|
? (error, values, nextPageRequest, rawResponse) => {
|
802
681
|
this._log.info('listDocuments values %j', values);
|
@@ -859,15 +738,12 @@ class DocumentServiceClient {
|
|
859
738
|
options = options || {};
|
860
739
|
options.otherArgs = options.otherArgs || {};
|
861
740
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
862
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
863
|
-
|
864
|
-
|
865
|
-
});
|
741
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
742
|
+
'parent': request.parent ?? '',
|
743
|
+
});
|
866
744
|
const defaultCallSettings = this._defaults['listDocuments'];
|
867
745
|
const callSettings = defaultCallSettings.merge(options);
|
868
|
-
this.initialize().catch(err => {
|
869
|
-
throw err;
|
870
|
-
});
|
746
|
+
this.initialize().catch(err => { throw err; });
|
871
747
|
this._log.info('listDocuments stream %j', request);
|
872
748
|
return this.descriptors.page.listDocuments.createStream(this.innerApiCalls.listDocuments, request, callSettings);
|
873
749
|
}
|
@@ -922,103 +798,100 @@ class DocumentServiceClient {
|
|
922
798
|
options = options || {};
|
923
799
|
options.otherArgs = options.otherArgs || {};
|
924
800
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
925
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
926
|
-
|
927
|
-
|
928
|
-
});
|
801
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
802
|
+
'parent': request.parent ?? '',
|
803
|
+
});
|
929
804
|
const defaultCallSettings = this._defaults['listDocuments'];
|
930
805
|
const callSettings = defaultCallSettings.merge(options);
|
931
|
-
this.initialize().catch(err => {
|
932
|
-
throw err;
|
933
|
-
});
|
806
|
+
this.initialize().catch(err => { throw err; });
|
934
807
|
this._log.info('listDocuments iterate %j', request);
|
935
808
|
return this.descriptors.page.listDocuments.asyncIterate(this.innerApiCalls['listDocuments'], request, callSettings);
|
936
809
|
}
|
937
810
|
/**
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
811
|
+
* Gets information about a location.
|
812
|
+
*
|
813
|
+
* @param {Object} request
|
814
|
+
* The request object that will be sent.
|
815
|
+
* @param {string} request.name
|
816
|
+
* Resource name for the location.
|
817
|
+
* @param {object} [options]
|
818
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
819
|
+
* @returns {Promise} - The promise which resolves to an array.
|
820
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
821
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
822
|
+
* for more details and examples.
|
823
|
+
* @example
|
824
|
+
* ```
|
825
|
+
* const [response] = await client.getLocation(request);
|
826
|
+
* ```
|
827
|
+
*/
|
955
828
|
getLocation(request, options, callback) {
|
956
829
|
return this.locationsClient.getLocation(request, options, callback);
|
957
830
|
}
|
958
831
|
/**
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
832
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
833
|
+
*
|
834
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
835
|
+
* @param {Object} request
|
836
|
+
* The request object that will be sent.
|
837
|
+
* @param {string} request.name
|
838
|
+
* The resource that owns the locations collection, if applicable.
|
839
|
+
* @param {string} request.filter
|
840
|
+
* The standard list filter.
|
841
|
+
* @param {number} request.pageSize
|
842
|
+
* The standard list page size.
|
843
|
+
* @param {string} request.pageToken
|
844
|
+
* The standard list page token.
|
845
|
+
* @param {object} [options]
|
846
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
847
|
+
* @returns {Object}
|
848
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
849
|
+
* When you iterate the returned iterable, each element will be an object representing
|
850
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
851
|
+
* so you can stop the iteration when you don't need more results.
|
852
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
853
|
+
* for more details and examples.
|
854
|
+
* @example
|
855
|
+
* ```
|
856
|
+
* const iterable = client.listLocationsAsync(request);
|
857
|
+
* for await (const response of iterable) {
|
858
|
+
* // process response
|
859
|
+
* }
|
860
|
+
* ```
|
861
|
+
*/
|
989
862
|
listLocationsAsync(request, options) {
|
990
863
|
return this.locationsClient.listLocationsAsync(request, options);
|
991
864
|
}
|
992
865
|
/**
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
866
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
867
|
+
* method to poll the operation result at intervals as recommended by the API
|
868
|
+
* service.
|
869
|
+
*
|
870
|
+
* @param {Object} request - The request object that will be sent.
|
871
|
+
* @param {string} request.name - The name of the operation resource.
|
872
|
+
* @param {Object=} options
|
873
|
+
* Optional parameters. You can override the default settings for this call,
|
874
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
875
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
876
|
+
* for the details.
|
877
|
+
* @param {function(?Error, ?Object)=} callback
|
878
|
+
* The function which will be called with the result of the API call.
|
879
|
+
*
|
880
|
+
* The second parameter to the callback is an object representing
|
881
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
882
|
+
* @return {Promise} - The promise which resolves to an array.
|
883
|
+
* The first element of the array is an object representing
|
884
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
885
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
886
|
+
*
|
887
|
+
* @example
|
888
|
+
* ```
|
889
|
+
* const client = longrunning.operationsClient();
|
890
|
+
* const name = '';
|
891
|
+
* const [response] = await client.getOperation({name});
|
892
|
+
* // doThingsWith(response)
|
893
|
+
* ```
|
894
|
+
*/
|
1022
895
|
getOperation(request, optionsOrCallback, callback) {
|
1023
896
|
let options;
|
1024
897
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -1193,8 +1066,7 @@ class DocumentServiceClient {
|
|
1193
1066
|
* @returns {string} A string representing the project.
|
1194
1067
|
*/
|
1195
1068
|
matchProjectFromAclConfigName(aclConfigName) {
|
1196
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1197
|
-
.project;
|
1069
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
1198
1070
|
}
|
1199
1071
|
/**
|
1200
1072
|
* Parse the location from AclConfig resource.
|
@@ -1204,8 +1076,7 @@ class DocumentServiceClient {
|
|
1204
1076
|
* @returns {string} A string representing the location.
|
1205
1077
|
*/
|
1206
1078
|
matchLocationFromAclConfigName(aclConfigName) {
|
1207
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
1208
|
-
.location;
|
1079
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
1209
1080
|
}
|
1210
1081
|
/**
|
1211
1082
|
* Return a fully-qualified engine resource name string.
|
@@ -1287,8 +1158,7 @@ class DocumentServiceClient {
|
|
1287
1158
|
* @returns {string} A string representing the project.
|
1288
1159
|
*/
|
1289
1160
|
matchProjectFromEvaluationName(evaluationName) {
|
1290
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1291
|
-
.project;
|
1161
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1292
1162
|
}
|
1293
1163
|
/**
|
1294
1164
|
* Parse the location from Evaluation resource.
|
@@ -1298,8 +1168,7 @@ class DocumentServiceClient {
|
|
1298
1168
|
* @returns {string} A string representing the location.
|
1299
1169
|
*/
|
1300
1170
|
matchLocationFromEvaluationName(evaluationName) {
|
1301
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1302
|
-
.location;
|
1171
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1303
1172
|
}
|
1304
1173
|
/**
|
1305
1174
|
* Parse the evaluation from Evaluation resource.
|
@@ -1309,8 +1178,7 @@ class DocumentServiceClient {
|
|
1309
1178
|
* @returns {string} A string representing the evaluation.
|
1310
1179
|
*/
|
1311
1180
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1312
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1313
|
-
.evaluation;
|
1181
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1314
1182
|
}
|
1315
1183
|
/**
|
1316
1184
|
* Return a fully-qualified project resource name string.
|
@@ -3503,8 +3371,7 @@ class DocumentServiceClient {
|
|
3503
3371
|
* @returns {string} A string representing the project.
|
3504
3372
|
*/
|
3505
3373
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3506
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3507
|
-
.project;
|
3374
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3508
3375
|
}
|
3509
3376
|
/**
|
3510
3377
|
* Parse the location from SampleQuery resource.
|
@@ -3514,8 +3381,7 @@ class DocumentServiceClient {
|
|
3514
3381
|
* @returns {string} A string representing the location.
|
3515
3382
|
*/
|
3516
3383
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3517
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3518
|
-
.location;
|
3384
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3519
3385
|
}
|
3520
3386
|
/**
|
3521
3387
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3525,8 +3391,7 @@ class DocumentServiceClient {
|
|
3525
3391
|
* @returns {string} A string representing the sample_query_set.
|
3526
3392
|
*/
|
3527
3393
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3528
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3529
|
-
.sample_query_set;
|
3394
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3530
3395
|
}
|
3531
3396
|
/**
|
3532
3397
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3536,8 +3401,7 @@ class DocumentServiceClient {
|
|
3536
3401
|
* @returns {string} A string representing the sample_query.
|
3537
3402
|
*/
|
3538
3403
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3539
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3540
|
-
.sample_query;
|
3404
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3541
3405
|
}
|
3542
3406
|
/**
|
3543
3407
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3596,8 +3460,8 @@ class DocumentServiceClient {
|
|
3596
3460
|
this._log.info('ending gRPC channel');
|
3597
3461
|
this._terminated = true;
|
3598
3462
|
stub.close();
|
3599
|
-
this.locationsClient.close();
|
3600
|
-
this.operationsClient.close();
|
3463
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3464
|
+
void this.operationsClient.close();
|
3601
3465
|
});
|
3602
3466
|
}
|
3603
3467
|
return Promise.resolve();
|