@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
|
}
|
@@ -217,130 +211,31 @@ class DocumentServiceClient {
|
|
217
211
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
218
212
|
// pages). Denote the keys used for pagination and results.
|
219
213
|
this.descriptors.page = {
|
220
|
-
listDocuments: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'documents')
|
214
|
+
listDocuments: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'documents')
|
221
215
|
};
|
222
|
-
const protoFilesRoot = this._gaxModule.
|
216
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
223
217
|
// This API contains "long-running operations", which return a
|
224
218
|
// an Operation object that allows for tracking of the operation,
|
225
219
|
// rather than holding a request open.
|
226
220
|
const lroOptions = {
|
227
221
|
auth: this.auth,
|
228
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
222
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
229
223
|
};
|
230
224
|
if (opts.fallback) {
|
231
225
|
lroOptions.protoJson = protoFilesRoot;
|
232
|
-
lroOptions.httpRules = [
|
233
|
-
{
|
234
|
-
|
235
|
-
|
236
|
-
body: '*',
|
237
|
-
additional_bindings: [
|
238
|
-
{
|
239
|
-
post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
240
|
-
body: '*',
|
241
|
-
},
|
242
|
-
],
|
243
|
-
},
|
244
|
-
{
|
245
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
246
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
247
|
-
additional_bindings: [
|
248
|
-
{
|
249
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
250
|
-
},
|
251
|
-
{
|
252
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
253
|
-
},
|
254
|
-
{
|
255
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
256
|
-
},
|
257
|
-
{
|
258
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
259
|
-
},
|
260
|
-
{
|
261
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
262
|
-
},
|
263
|
-
{
|
264
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
265
|
-
},
|
266
|
-
{
|
267
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
268
|
-
},
|
269
|
-
{
|
270
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}',
|
271
|
-
},
|
272
|
-
{
|
273
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
274
|
-
},
|
275
|
-
{
|
276
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
277
|
-
},
|
278
|
-
{
|
279
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
280
|
-
},
|
281
|
-
{
|
282
|
-
get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
283
|
-
},
|
284
|
-
{ get: '/v1beta/{name=projects/*/locations/*/operations/*}' },
|
285
|
-
{
|
286
|
-
get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
287
|
-
},
|
288
|
-
{ get: '/v1beta/{name=projects/*/operations/*}' },
|
289
|
-
],
|
290
|
-
},
|
291
|
-
{
|
292
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
293
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
294
|
-
additional_bindings: [
|
295
|
-
{
|
296
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
297
|
-
},
|
298
|
-
{
|
299
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
300
|
-
},
|
301
|
-
{
|
302
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
303
|
-
},
|
304
|
-
{
|
305
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
306
|
-
},
|
307
|
-
{
|
308
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
309
|
-
},
|
310
|
-
{
|
311
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
312
|
-
},
|
313
|
-
{
|
314
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
315
|
-
},
|
316
|
-
{
|
317
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations',
|
318
|
-
},
|
319
|
-
{
|
320
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
321
|
-
},
|
322
|
-
{
|
323
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
324
|
-
},
|
325
|
-
{
|
326
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
|
327
|
-
},
|
328
|
-
{ get: '/v1beta/{name=projects/*/locations/*}/operations' },
|
329
|
-
{ get: '/v1beta/{name=projects/*}/operations' },
|
330
|
-
],
|
331
|
-
},
|
332
|
-
];
|
226
|
+
lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
|
227
|
+
}, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1beta/{name=projects/*/operations/*}', }],
|
228
|
+
}, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*}/operations', }, { get: '/v1beta/{name=projects/*}/operations', }],
|
229
|
+
}];
|
333
230
|
}
|
334
|
-
this.operationsClient = this._gaxModule
|
335
|
-
.lro(lroOptions)
|
336
|
-
.operationsClient(opts);
|
231
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
337
232
|
const importDocumentsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse');
|
338
233
|
const importDocumentsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata');
|
339
234
|
const purgeDocumentsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse');
|
340
235
|
const purgeDocumentsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata');
|
341
236
|
this.descriptors.longrunning = {
|
342
237
|
importDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importDocumentsResponse.decode.bind(importDocumentsResponse), importDocumentsMetadata.decode.bind(importDocumentsMetadata)),
|
343
|
-
purgeDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeDocumentsResponse.decode.bind(purgeDocumentsResponse), purgeDocumentsMetadata.decode.bind(purgeDocumentsMetadata))
|
238
|
+
purgeDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeDocumentsResponse.decode.bind(purgeDocumentsResponse), purgeDocumentsMetadata.decode.bind(purgeDocumentsMetadata))
|
344
239
|
};
|
345
240
|
// Put together the default options sent with requests.
|
346
241
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.DocumentService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -369,23 +264,13 @@ class DocumentServiceClient {
|
|
369
264
|
}
|
370
265
|
// Put together the "service stub" for
|
371
266
|
// google.cloud.discoveryengine.v1beta.DocumentService.
|
372
|
-
this.documentServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
.DocumentService, this._opts, this._providedCustomServicePath);
|
267
|
+
this.documentServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
268
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1beta.DocumentService') :
|
269
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
270
|
+
this._protos.google.cloud.discoveryengine.v1beta.DocumentService, this._opts, this._providedCustomServicePath);
|
377
271
|
// Iterate over each of the methods that the service provides
|
378
272
|
// and create an API call method for each.
|
379
|
-
const documentServiceStubMethods = [
|
380
|
-
'getDocument',
|
381
|
-
'listDocuments',
|
382
|
-
'createDocument',
|
383
|
-
'updateDocument',
|
384
|
-
'deleteDocument',
|
385
|
-
'importDocuments',
|
386
|
-
'purgeDocuments',
|
387
|
-
'batchGetDocumentsMetadata',
|
388
|
-
];
|
273
|
+
const documentServiceStubMethods = ['getDocument', 'listDocuments', 'createDocument', 'updateDocument', 'deleteDocument', 'importDocuments', 'purgeDocuments', 'batchGetDocumentsMetadata'];
|
389
274
|
for (const methodName of documentServiceStubMethods) {
|
390
275
|
const callPromise = this.documentServiceStub.then(stub => (...args) => {
|
391
276
|
if (this._terminated) {
|
@@ -410,8 +295,7 @@ class DocumentServiceClient {
|
|
410
295
|
* @returns {string} The DNS address for this service.
|
411
296
|
*/
|
412
297
|
static get servicePath() {
|
413
|
-
if (typeof process === 'object' &&
|
414
|
-
typeof process.emitWarning === 'function') {
|
298
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
415
299
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
416
300
|
}
|
417
301
|
return 'discoveryengine.googleapis.com';
|
@@ -422,8 +306,7 @@ class DocumentServiceClient {
|
|
422
306
|
* @returns {string} The DNS address for this service.
|
423
307
|
*/
|
424
308
|
static get apiEndpoint() {
|
425
|
-
if (typeof process === 'object' &&
|
426
|
-
typeof process.emitWarning === 'function') {
|
309
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
427
310
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
428
311
|
}
|
429
312
|
return 'discoveryengine.googleapis.com';
|
@@ -451,7 +334,9 @@ class DocumentServiceClient {
|
|
451
334
|
* @returns {string[]} List of default scopes.
|
452
335
|
*/
|
453
336
|
static get scopes() {
|
454
|
-
return [
|
337
|
+
return [
|
338
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
339
|
+
];
|
455
340
|
}
|
456
341
|
/**
|
457
342
|
* Return the project ID used by this class.
|
@@ -477,13 +362,10 @@ class DocumentServiceClient {
|
|
477
362
|
options = options || {};
|
478
363
|
options.otherArgs = options.otherArgs || {};
|
479
364
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
480
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
481
|
-
|
482
|
-
name: request.name ?? '',
|
483
|
-
});
|
484
|
-
this.initialize().catch(err => {
|
485
|
-
throw err;
|
365
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
366
|
+
'name': request.name ?? '',
|
486
367
|
});
|
368
|
+
this.initialize().catch(err => { throw err; });
|
487
369
|
this._log.info('getDocument request %j', request);
|
488
370
|
const wrappedCallback = callback
|
489
371
|
? (error, response, options, rawResponse) => {
|
@@ -491,11 +373,16 @@ class DocumentServiceClient {
|
|
491
373
|
callback(error, response, options, rawResponse); // We verified callback above.
|
492
374
|
}
|
493
375
|
: undefined;
|
494
|
-
return this.innerApiCalls
|
495
|
-
.getDocument(request, options, wrappedCallback)
|
376
|
+
return this.innerApiCalls.getDocument(request, options, wrappedCallback)
|
496
377
|
?.then(([response, options, rawResponse]) => {
|
497
378
|
this._log.info('getDocument response %j', response);
|
498
379
|
return [response, options, rawResponse];
|
380
|
+
}).catch((error) => {
|
381
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
382
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
383
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
384
|
+
}
|
385
|
+
throw error;
|
499
386
|
});
|
500
387
|
}
|
501
388
|
createDocument(request, optionsOrCallback, callback) {
|
@@ -511,13 +398,10 @@ class DocumentServiceClient {
|
|
511
398
|
options = options || {};
|
512
399
|
options.otherArgs = options.otherArgs || {};
|
513
400
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
514
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
515
|
-
|
516
|
-
parent: request.parent ?? '',
|
517
|
-
});
|
518
|
-
this.initialize().catch(err => {
|
519
|
-
throw err;
|
401
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
402
|
+
'parent': request.parent ?? '',
|
520
403
|
});
|
404
|
+
this.initialize().catch(err => { throw err; });
|
521
405
|
this._log.info('createDocument request %j', request);
|
522
406
|
const wrappedCallback = callback
|
523
407
|
? (error, response, options, rawResponse) => {
|
@@ -525,11 +409,16 @@ class DocumentServiceClient {
|
|
525
409
|
callback(error, response, options, rawResponse); // We verified callback above.
|
526
410
|
}
|
527
411
|
: undefined;
|
528
|
-
return this.innerApiCalls
|
529
|
-
.createDocument(request, options, wrappedCallback)
|
412
|
+
return this.innerApiCalls.createDocument(request, options, wrappedCallback)
|
530
413
|
?.then(([response, options, rawResponse]) => {
|
531
414
|
this._log.info('createDocument response %j', response);
|
532
415
|
return [response, options, rawResponse];
|
416
|
+
}).catch((error) => {
|
417
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
418
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
419
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
420
|
+
}
|
421
|
+
throw error;
|
533
422
|
});
|
534
423
|
}
|
535
424
|
updateDocument(request, optionsOrCallback, callback) {
|
@@ -545,13 +434,10 @@ class DocumentServiceClient {
|
|
545
434
|
options = options || {};
|
546
435
|
options.otherArgs = options.otherArgs || {};
|
547
436
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
548
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
549
|
-
|
550
|
-
'document.name': request.document.name ?? '',
|
551
|
-
});
|
552
|
-
this.initialize().catch(err => {
|
553
|
-
throw err;
|
437
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
438
|
+
'document.name': request.document.name ?? '',
|
554
439
|
});
|
440
|
+
this.initialize().catch(err => { throw err; });
|
555
441
|
this._log.info('updateDocument request %j', request);
|
556
442
|
const wrappedCallback = callback
|
557
443
|
? (error, response, options, rawResponse) => {
|
@@ -559,11 +445,16 @@ class DocumentServiceClient {
|
|
559
445
|
callback(error, response, options, rawResponse); // We verified callback above.
|
560
446
|
}
|
561
447
|
: undefined;
|
562
|
-
return this.innerApiCalls
|
563
|
-
.updateDocument(request, options, wrappedCallback)
|
448
|
+
return this.innerApiCalls.updateDocument(request, options, wrappedCallback)
|
564
449
|
?.then(([response, options, rawResponse]) => {
|
565
450
|
this._log.info('updateDocument response %j', response);
|
566
451
|
return [response, options, rawResponse];
|
452
|
+
}).catch((error) => {
|
453
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
454
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
455
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
456
|
+
}
|
457
|
+
throw error;
|
567
458
|
});
|
568
459
|
}
|
569
460
|
deleteDocument(request, optionsOrCallback, callback) {
|
@@ -579,13 +470,10 @@ class DocumentServiceClient {
|
|
579
470
|
options = options || {};
|
580
471
|
options.otherArgs = options.otherArgs || {};
|
581
472
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
582
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
583
|
-
|
584
|
-
name: request.name ?? '',
|
585
|
-
});
|
586
|
-
this.initialize().catch(err => {
|
587
|
-
throw err;
|
473
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
474
|
+
'name': request.name ?? '',
|
588
475
|
});
|
476
|
+
this.initialize().catch(err => { throw err; });
|
589
477
|
this._log.info('deleteDocument request %j', request);
|
590
478
|
const wrappedCallback = callback
|
591
479
|
? (error, response, options, rawResponse) => {
|
@@ -593,11 +481,16 @@ class DocumentServiceClient {
|
|
593
481
|
callback(error, response, options, rawResponse); // We verified callback above.
|
594
482
|
}
|
595
483
|
: undefined;
|
596
|
-
return this.innerApiCalls
|
597
|
-
.deleteDocument(request, options, wrappedCallback)
|
484
|
+
return this.innerApiCalls.deleteDocument(request, options, wrappedCallback)
|
598
485
|
?.then(([response, options, rawResponse]) => {
|
599
486
|
this._log.info('deleteDocument response %j', response);
|
600
487
|
return [response, options, rawResponse];
|
488
|
+
}).catch((error) => {
|
489
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
490
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
491
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
492
|
+
}
|
493
|
+
throw error;
|
601
494
|
});
|
602
495
|
}
|
603
496
|
batchGetDocumentsMetadata(request, optionsOrCallback, callback) {
|
@@ -613,13 +506,10 @@ class DocumentServiceClient {
|
|
613
506
|
options = options || {};
|
614
507
|
options.otherArgs = options.otherArgs || {};
|
615
508
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
616
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
617
|
-
|
618
|
-
parent: request.parent ?? '',
|
619
|
-
});
|
620
|
-
this.initialize().catch(err => {
|
621
|
-
throw err;
|
509
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
510
|
+
'parent': request.parent ?? '',
|
622
511
|
});
|
512
|
+
this.initialize().catch(err => { throw err; });
|
623
513
|
this._log.info('batchGetDocumentsMetadata request %j', request);
|
624
514
|
const wrappedCallback = callback
|
625
515
|
? (error, response, options, rawResponse) => {
|
@@ -627,11 +517,16 @@ class DocumentServiceClient {
|
|
627
517
|
callback(error, response, options, rawResponse); // We verified callback above.
|
628
518
|
}
|
629
519
|
: undefined;
|
630
|
-
return this.innerApiCalls
|
631
|
-
.batchGetDocumentsMetadata(request, options, wrappedCallback)
|
520
|
+
return this.innerApiCalls.batchGetDocumentsMetadata(request, options, wrappedCallback)
|
632
521
|
?.then(([response, options, rawResponse]) => {
|
633
522
|
this._log.info('batchGetDocumentsMetadata response %j', response);
|
634
523
|
return [response, options, rawResponse];
|
524
|
+
}).catch((error) => {
|
525
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
526
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
527
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
528
|
+
}
|
529
|
+
throw error;
|
635
530
|
});
|
636
531
|
}
|
637
532
|
importDocuments(request, optionsOrCallback, callback) {
|
@@ -647,13 +542,10 @@ class DocumentServiceClient {
|
|
647
542
|
options = options || {};
|
648
543
|
options.otherArgs = options.otherArgs || {};
|
649
544
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
650
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
651
|
-
|
652
|
-
parent: request.parent ?? '',
|
653
|
-
});
|
654
|
-
this.initialize().catch(err => {
|
655
|
-
throw err;
|
545
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
546
|
+
'parent': request.parent ?? '',
|
656
547
|
});
|
548
|
+
this.initialize().catch(err => { throw err; });
|
657
549
|
const wrappedCallback = callback
|
658
550
|
? (error, response, rawResponse, _) => {
|
659
551
|
this._log.info('importDocuments response %j', rawResponse);
|
@@ -661,8 +553,7 @@ class DocumentServiceClient {
|
|
661
553
|
}
|
662
554
|
: undefined;
|
663
555
|
this._log.info('importDocuments request %j', request);
|
664
|
-
return this.innerApiCalls
|
665
|
-
.importDocuments(request, options, wrappedCallback)
|
556
|
+
return this.innerApiCalls.importDocuments(request, options, wrappedCallback)
|
666
557
|
?.then(([response, rawResponse, _]) => {
|
667
558
|
this._log.info('importDocuments response %j', rawResponse);
|
668
559
|
return [response, rawResponse, _];
|
@@ -699,13 +590,10 @@ class DocumentServiceClient {
|
|
699
590
|
options = options || {};
|
700
591
|
options.otherArgs = options.otherArgs || {};
|
701
592
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
702
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
703
|
-
|
704
|
-
parent: request.parent ?? '',
|
705
|
-
});
|
706
|
-
this.initialize().catch(err => {
|
707
|
-
throw err;
|
593
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
594
|
+
'parent': request.parent ?? '',
|
708
595
|
});
|
596
|
+
this.initialize().catch(err => { throw err; });
|
709
597
|
const wrappedCallback = callback
|
710
598
|
? (error, response, rawResponse, _) => {
|
711
599
|
this._log.info('purgeDocuments response %j', rawResponse);
|
@@ -713,8 +601,7 @@ class DocumentServiceClient {
|
|
713
601
|
}
|
714
602
|
: undefined;
|
715
603
|
this._log.info('purgeDocuments request %j', request);
|
716
|
-
return this.innerApiCalls
|
717
|
-
.purgeDocuments(request, options, wrappedCallback)
|
604
|
+
return this.innerApiCalls.purgeDocuments(request, options, wrappedCallback)
|
718
605
|
?.then(([response, rawResponse, _]) => {
|
719
606
|
this._log.info('purgeDocuments response %j', rawResponse);
|
720
607
|
return [response, rawResponse, _];
|
@@ -751,13 +638,10 @@ class DocumentServiceClient {
|
|
751
638
|
options = options || {};
|
752
639
|
options.otherArgs = options.otherArgs || {};
|
753
640
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
754
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
755
|
-
|
756
|
-
parent: request.parent ?? '',
|
757
|
-
});
|
758
|
-
this.initialize().catch(err => {
|
759
|
-
throw err;
|
641
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
642
|
+
'parent': request.parent ?? '',
|
760
643
|
});
|
644
|
+
this.initialize().catch(err => { throw err; });
|
761
645
|
const wrappedCallback = callback
|
762
646
|
? (error, values, nextPageRequest, rawResponse) => {
|
763
647
|
this._log.info('listDocuments values %j', values);
|
@@ -819,15 +703,12 @@ class DocumentServiceClient {
|
|
819
703
|
options = options || {};
|
820
704
|
options.otherArgs = options.otherArgs || {};
|
821
705
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
822
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
823
|
-
|
824
|
-
|
825
|
-
});
|
706
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
707
|
+
'parent': request.parent ?? '',
|
708
|
+
});
|
826
709
|
const defaultCallSettings = this._defaults['listDocuments'];
|
827
710
|
const callSettings = defaultCallSettings.merge(options);
|
828
|
-
this.initialize().catch(err => {
|
829
|
-
throw err;
|
830
|
-
});
|
711
|
+
this.initialize().catch(err => { throw err; });
|
831
712
|
this._log.info('listDocuments stream %j', request);
|
832
713
|
return this.descriptors.page.listDocuments.createStream(this.innerApiCalls.listDocuments, request, callSettings);
|
833
714
|
}
|
@@ -881,103 +762,100 @@ class DocumentServiceClient {
|
|
881
762
|
options = options || {};
|
882
763
|
options.otherArgs = options.otherArgs || {};
|
883
764
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
884
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
885
|
-
|
886
|
-
|
887
|
-
});
|
765
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
766
|
+
'parent': request.parent ?? '',
|
767
|
+
});
|
888
768
|
const defaultCallSettings = this._defaults['listDocuments'];
|
889
769
|
const callSettings = defaultCallSettings.merge(options);
|
890
|
-
this.initialize().catch(err => {
|
891
|
-
throw err;
|
892
|
-
});
|
770
|
+
this.initialize().catch(err => { throw err; });
|
893
771
|
this._log.info('listDocuments iterate %j', request);
|
894
772
|
return this.descriptors.page.listDocuments.asyncIterate(this.innerApiCalls['listDocuments'], request, callSettings);
|
895
773
|
}
|
896
774
|
/**
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
775
|
+
* Gets information about a location.
|
776
|
+
*
|
777
|
+
* @param {Object} request
|
778
|
+
* The request object that will be sent.
|
779
|
+
* @param {string} request.name
|
780
|
+
* Resource name for the location.
|
781
|
+
* @param {object} [options]
|
782
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
783
|
+
* @returns {Promise} - The promise which resolves to an array.
|
784
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
785
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
786
|
+
* for more details and examples.
|
787
|
+
* @example
|
788
|
+
* ```
|
789
|
+
* const [response] = await client.getLocation(request);
|
790
|
+
* ```
|
791
|
+
*/
|
914
792
|
getLocation(request, options, callback) {
|
915
793
|
return this.locationsClient.getLocation(request, options, callback);
|
916
794
|
}
|
917
795
|
/**
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
796
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
797
|
+
*
|
798
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
799
|
+
* @param {Object} request
|
800
|
+
* The request object that will be sent.
|
801
|
+
* @param {string} request.name
|
802
|
+
* The resource that owns the locations collection, if applicable.
|
803
|
+
* @param {string} request.filter
|
804
|
+
* The standard list filter.
|
805
|
+
* @param {number} request.pageSize
|
806
|
+
* The standard list page size.
|
807
|
+
* @param {string} request.pageToken
|
808
|
+
* The standard list page token.
|
809
|
+
* @param {object} [options]
|
810
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
811
|
+
* @returns {Object}
|
812
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
813
|
+
* When you iterate the returned iterable, each element will be an object representing
|
814
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
815
|
+
* so you can stop the iteration when you don't need more results.
|
816
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
817
|
+
* for more details and examples.
|
818
|
+
* @example
|
819
|
+
* ```
|
820
|
+
* const iterable = client.listLocationsAsync(request);
|
821
|
+
* for await (const response of iterable) {
|
822
|
+
* // process response
|
823
|
+
* }
|
824
|
+
* ```
|
825
|
+
*/
|
948
826
|
listLocationsAsync(request, options) {
|
949
827
|
return this.locationsClient.listLocationsAsync(request, options);
|
950
828
|
}
|
951
829
|
/**
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
830
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
831
|
+
* method to poll the operation result at intervals as recommended by the API
|
832
|
+
* service.
|
833
|
+
*
|
834
|
+
* @param {Object} request - The request object that will be sent.
|
835
|
+
* @param {string} request.name - The name of the operation resource.
|
836
|
+
* @param {Object=} options
|
837
|
+
* Optional parameters. You can override the default settings for this call,
|
838
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
839
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
840
|
+
* for the details.
|
841
|
+
* @param {function(?Error, ?Object)=} callback
|
842
|
+
* The function which will be called with the result of the API call.
|
843
|
+
*
|
844
|
+
* The second parameter to the callback is an object representing
|
845
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
846
|
+
* @return {Promise} - The promise which resolves to an array.
|
847
|
+
* The first element of the array is an object representing
|
848
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
849
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
850
|
+
*
|
851
|
+
* @example
|
852
|
+
* ```
|
853
|
+
* const client = longrunning.operationsClient();
|
854
|
+
* const name = '';
|
855
|
+
* const [response] = await client.getOperation({name});
|
856
|
+
* // doThingsWith(response)
|
857
|
+
* ```
|
858
|
+
*/
|
981
859
|
getOperation(request, optionsOrCallback, callback) {
|
982
860
|
let options;
|
983
861
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -1211,8 +1089,7 @@ class DocumentServiceClient {
|
|
1211
1089
|
* @returns {string} A string representing the project.
|
1212
1090
|
*/
|
1213
1091
|
matchProjectFromEvaluationName(evaluationName) {
|
1214
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1215
|
-
.project;
|
1092
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1216
1093
|
}
|
1217
1094
|
/**
|
1218
1095
|
* Parse the location from Evaluation resource.
|
@@ -1222,8 +1099,7 @@ class DocumentServiceClient {
|
|
1222
1099
|
* @returns {string} A string representing the location.
|
1223
1100
|
*/
|
1224
1101
|
matchLocationFromEvaluationName(evaluationName) {
|
1225
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1226
|
-
.location;
|
1102
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1227
1103
|
}
|
1228
1104
|
/**
|
1229
1105
|
* Parse the evaluation from Evaluation resource.
|
@@ -1233,8 +1109,7 @@ class DocumentServiceClient {
|
|
1233
1109
|
* @returns {string} A string representing the evaluation.
|
1234
1110
|
*/
|
1235
1111
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1236
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1237
|
-
.evaluation;
|
1112
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1238
1113
|
}
|
1239
1114
|
/**
|
1240
1115
|
* Return a fully-qualified groundingConfig resource name string.
|
@@ -3598,8 +3473,7 @@ class DocumentServiceClient {
|
|
3598
3473
|
* @returns {string} A string representing the project.
|
3599
3474
|
*/
|
3600
3475
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3601
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3602
|
-
.project;
|
3476
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3603
3477
|
}
|
3604
3478
|
/**
|
3605
3479
|
* Parse the location from SampleQuery resource.
|
@@ -3609,8 +3483,7 @@ class DocumentServiceClient {
|
|
3609
3483
|
* @returns {string} A string representing the location.
|
3610
3484
|
*/
|
3611
3485
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3612
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3613
|
-
.location;
|
3486
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3614
3487
|
}
|
3615
3488
|
/**
|
3616
3489
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3620,8 +3493,7 @@ class DocumentServiceClient {
|
|
3620
3493
|
* @returns {string} A string representing the sample_query_set.
|
3621
3494
|
*/
|
3622
3495
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3623
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3624
|
-
.sample_query_set;
|
3496
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3625
3497
|
}
|
3626
3498
|
/**
|
3627
3499
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3631,8 +3503,7 @@ class DocumentServiceClient {
|
|
3631
3503
|
* @returns {string} A string representing the sample_query.
|
3632
3504
|
*/
|
3633
3505
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3634
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3635
|
-
.sample_query;
|
3506
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3636
3507
|
}
|
3637
3508
|
/**
|
3638
3509
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3691,8 +3562,8 @@ class DocumentServiceClient {
|
|
3691
3562
|
this._log.info('ending gRPC channel');
|
3692
3563
|
this._terminated = true;
|
3693
3564
|
stub.close();
|
3694
|
-
this.locationsClient.close();
|
3695
|
-
this.operationsClient.close();
|
3565
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3566
|
+
void this.operationsClient.close();
|
3696
3567
|
});
|
3697
3568
|
}
|
3698
3569
|
return Promise.resolve();
|