@google-cloud/discoveryengine 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
- package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
- package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
- package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
- package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
- package/build/protos/protos.d.ts +4390 -300
- package/build/protos/protos.js +13785 -2922
- package/build/protos/protos.json +1355 -14
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -21
- package/build/src/v1/completion_service_client.d.ts +313 -76
- package/build/src/v1/completion_service_client.js +451 -262
- package/build/src/v1/completion_service_proto_list.json +3 -0
- package/build/src/v1/control_service_client.d.ts +318 -81
- package/build/src/v1/control_service_client.js +422 -132
- package/build/src/v1/control_service_proto_list.json +3 -0
- package/build/src/v1/conversational_search_service_client.d.ts +341 -134
- package/build/src/v1/conversational_search_service_client.js +395 -223
- package/build/src/v1/conversational_search_service_client_config.json +5 -0
- package/build/src/v1/conversational_search_service_proto_list.json +3 -0
- package/build/src/v1/data_store_service_client.d.ts +359 -122
- package/build/src/v1/data_store_service_client.js +460 -280
- package/build/src/v1/data_store_service_proto_list.json +3 -0
- package/build/src/v1/document_service_client.d.ts +364 -121
- package/build/src/v1/document_service_client.js +469 -300
- package/build/src/v1/document_service_proto_list.json +3 -0
- package/build/src/v1/engine_service_client.d.ts +340 -103
- package/build/src/v1/engine_service_client.js +460 -279
- package/build/src/v1/engine_service_proto_list.json +3 -0
- package/build/src/v1/gapic_metadata.json +59 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +286 -51
- package/build/src/v1/grounded_generation_service_client.js +405 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/project_service_client.d.ts +313 -76
- package/build/src/v1/project_service_client.js +434 -222
- package/build/src/v1/project_service_proto_list.json +3 -0
- package/build/src/v1/rank_service_client.d.ts +285 -48
- package/build/src/v1/rank_service_client.js +398 -85
- package/build/src/v1/rank_service_proto_list.json +3 -0
- package/build/src/v1/recommendation_service_client.d.ts +142 -49
- package/build/src/v1/recommendation_service_client.js +198 -82
- package/build/src/v1/recommendation_service_proto_list.json +3 -0
- package/build/src/v1/schema_service_client.d.ts +348 -111
- package/build/src/v1/schema_service_client.js +457 -273
- package/build/src/v1/schema_service_proto_list.json +3 -0
- package/build/src/v1/search_service_client.d.ts +748 -559
- package/build/src/v1/search_service_client.js +302 -133
- package/build/src/v1/search_service_proto_list.json +3 -0
- package/build/src/v1/search_tuning_service_client.d.ts +314 -77
- package/build/src/v1/search_tuning_service_client.js +439 -235
- package/build/src/v1/search_tuning_service_proto_list.json +3 -0
- package/build/src/v1/serving_config_service_client.d.ts +1851 -0
- package/build/src/v1/serving_config_service_client.js +2642 -0
- package/build/src/v1/serving_config_service_client_config.json +30 -0
- package/build/src/v1/serving_config_service_proto_list.json +39 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +504 -151
- package/build/src/v1/site_search_engine_service_client.js +625 -351
- package/build/src/v1/site_search_engine_service_client_config.json +12 -0
- package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
- package/build/src/v1/user_event_service_client.d.ts +335 -86
- package/build/src/v1/user_event_service_client.js +447 -253
- package/build/src/v1/user_event_service_proto_list.json +3 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +82 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +92 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +134 -280
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +105 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +145 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +151 -316
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +156 -328
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +155 -325
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +143 -295
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +126 -262
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +81 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +79 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +144 -301
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +140 -292
- 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 +122 -253
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +97 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +130 -271
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +136 -279
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +103 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +143 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +141 -288
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +150 -309
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +153 -315
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +141 -285
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +86 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +115 -231
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +79 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +77 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +142 -291
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +104 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +138 -282
- 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 +120 -243
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +95 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +186 -386
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +128 -261
- package/package.json +4 -4
@@ -98,26 +98,17 @@ class CompletionServiceClient {
|
|
98
98
|
constructor(opts, gaxInstance) {
|
99
99
|
// Ensure that options include all the required fields.
|
100
100
|
const staticMembers = this.constructor;
|
101
|
-
if (opts?.universe_domain &&
|
102
|
-
opts?.universeDomain &&
|
103
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
101
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
104
102
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
105
103
|
}
|
106
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
107
|
-
|
108
|
-
: undefined;
|
109
|
-
this._universeDomain =
|
110
|
-
opts?.universeDomain ??
|
111
|
-
opts?.universe_domain ??
|
112
|
-
universeDomainEnvVar ??
|
113
|
-
'googleapis.com';
|
104
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
105
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
114
106
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
115
107
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
116
108
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
117
109
|
const port = opts?.port || staticMembers.port;
|
118
110
|
const clientConfig = opts?.clientConfig ?? {};
|
119
|
-
const fallback = opts?.fallback ??
|
120
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
111
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
121
112
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
122
113
|
// Request numeric enum values if REST transport is used.
|
123
114
|
opts.numericEnums = true;
|
@@ -147,7 +138,10 @@ class CompletionServiceClient {
|
|
147
138
|
}
|
148
139
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
149
140
|
// Determine the client header string.
|
150
|
-
const clientHeader = [
|
141
|
+
const clientHeader = [
|
142
|
+
`gax/${this._gaxModule.version}`,
|
143
|
+
`gapic/${version}`,
|
144
|
+
];
|
151
145
|
if (typeof process === 'object' && 'versions' in process) {
|
152
146
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
153
147
|
}
|
@@ -218,115 +212,16 @@ class CompletionServiceClient {
|
|
218
212
|
// rather than holding a request open.
|
219
213
|
const lroOptions = {
|
220
214
|
auth: this.auth,
|
221
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
215
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
222
216
|
};
|
223
217
|
if (opts.fallback) {
|
224
218
|
lroOptions.protoJson = protoFilesRoot;
|
225
|
-
lroOptions.httpRules = [
|
226
|
-
{
|
227
|
-
|
228
|
-
|
229
|
-
body: '*',
|
230
|
-
additional_bindings: [
|
231
|
-
{
|
232
|
-
post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
233
|
-
body: '*',
|
234
|
-
},
|
235
|
-
],
|
236
|
-
},
|
237
|
-
{
|
238
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
239
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
240
|
-
additional_bindings: [
|
241
|
-
{
|
242
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
243
|
-
},
|
244
|
-
{
|
245
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
246
|
-
},
|
247
|
-
{
|
248
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
249
|
-
},
|
250
|
-
{
|
251
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
252
|
-
},
|
253
|
-
{
|
254
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
255
|
-
},
|
256
|
-
{
|
257
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
258
|
-
},
|
259
|
-
{
|
260
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
261
|
-
},
|
262
|
-
{
|
263
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}',
|
264
|
-
},
|
265
|
-
{
|
266
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
267
|
-
},
|
268
|
-
{
|
269
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
270
|
-
},
|
271
|
-
{
|
272
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
273
|
-
},
|
274
|
-
{
|
275
|
-
get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
276
|
-
},
|
277
|
-
{ get: '/v1beta/{name=projects/*/locations/*/operations/*}' },
|
278
|
-
{
|
279
|
-
get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
280
|
-
},
|
281
|
-
{ get: '/v1beta/{name=projects/*/operations/*}' },
|
282
|
-
],
|
283
|
-
},
|
284
|
-
{
|
285
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
286
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
287
|
-
additional_bindings: [
|
288
|
-
{
|
289
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
290
|
-
},
|
291
|
-
{
|
292
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
293
|
-
},
|
294
|
-
{
|
295
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
296
|
-
},
|
297
|
-
{
|
298
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
299
|
-
},
|
300
|
-
{
|
301
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
302
|
-
},
|
303
|
-
{
|
304
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
305
|
-
},
|
306
|
-
{
|
307
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
308
|
-
},
|
309
|
-
{
|
310
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations',
|
311
|
-
},
|
312
|
-
{
|
313
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
314
|
-
},
|
315
|
-
{
|
316
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
317
|
-
},
|
318
|
-
{
|
319
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
|
320
|
-
},
|
321
|
-
{ get: '/v1beta/{name=projects/*/locations/*}/operations' },
|
322
|
-
{ get: '/v1beta/{name=projects/*}/operations' },
|
323
|
-
],
|
324
|
-
},
|
325
|
-
];
|
219
|
+
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: '*', }],
|
220
|
+
}, { 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/*}', }],
|
221
|
+
}, { 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', }],
|
222
|
+
}];
|
326
223
|
}
|
327
|
-
this.operationsClient = this._gaxModule
|
328
|
-
.lro(lroOptions)
|
329
|
-
.operationsClient(opts);
|
224
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
330
225
|
const importSuggestionDenyListEntriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesResponse');
|
331
226
|
const importSuggestionDenyListEntriesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesMetadata');
|
332
227
|
const purgeSuggestionDenyListEntriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesResponse');
|
@@ -339,7 +234,7 @@ class CompletionServiceClient {
|
|
339
234
|
importSuggestionDenyListEntries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSuggestionDenyListEntriesResponse.decode.bind(importSuggestionDenyListEntriesResponse), importSuggestionDenyListEntriesMetadata.decode.bind(importSuggestionDenyListEntriesMetadata)),
|
340
235
|
purgeSuggestionDenyListEntries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeSuggestionDenyListEntriesResponse.decode.bind(purgeSuggestionDenyListEntriesResponse), purgeSuggestionDenyListEntriesMetadata.decode.bind(purgeSuggestionDenyListEntriesMetadata)),
|
341
236
|
importCompletionSuggestions: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importCompletionSuggestionsResponse.decode.bind(importCompletionSuggestionsResponse), importCompletionSuggestionsMetadata.decode.bind(importCompletionSuggestionsMetadata)),
|
342
|
-
purgeCompletionSuggestions: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeCompletionSuggestionsResponse.decode.bind(purgeCompletionSuggestionsResponse), purgeCompletionSuggestionsMetadata.decode.bind(purgeCompletionSuggestionsMetadata))
|
237
|
+
purgeCompletionSuggestions: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeCompletionSuggestionsResponse.decode.bind(purgeCompletionSuggestionsResponse), purgeCompletionSuggestionsMetadata.decode.bind(purgeCompletionSuggestionsMetadata))
|
343
238
|
};
|
344
239
|
// Put together the default options sent with requests.
|
345
240
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.CompletionService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -368,21 +263,13 @@ class CompletionServiceClient {
|
|
368
263
|
}
|
369
264
|
// Put together the "service stub" for
|
370
265
|
// google.cloud.discoveryengine.v1beta.CompletionService.
|
371
|
-
this.completionServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
.CompletionService, this._opts, this._providedCustomServicePath);
|
266
|
+
this.completionServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
267
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1beta.CompletionService') :
|
268
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
269
|
+
this._protos.google.cloud.discoveryengine.v1beta.CompletionService, this._opts, this._providedCustomServicePath);
|
376
270
|
// Iterate over each of the methods that the service provides
|
377
271
|
// and create an API call method for each.
|
378
|
-
const completionServiceStubMethods = [
|
379
|
-
'completeQuery',
|
380
|
-
'advancedCompleteQuery',
|
381
|
-
'importSuggestionDenyListEntries',
|
382
|
-
'purgeSuggestionDenyListEntries',
|
383
|
-
'importCompletionSuggestions',
|
384
|
-
'purgeCompletionSuggestions',
|
385
|
-
];
|
272
|
+
const completionServiceStubMethods = ['completeQuery', 'advancedCompleteQuery', 'importSuggestionDenyListEntries', 'purgeSuggestionDenyListEntries', 'importCompletionSuggestions', 'purgeCompletionSuggestions'];
|
386
273
|
for (const methodName of completionServiceStubMethods) {
|
387
274
|
const callPromise = this.completionServiceStub.then(stub => (...args) => {
|
388
275
|
if (this._terminated) {
|
@@ -393,7 +280,8 @@ class CompletionServiceClient {
|
|
393
280
|
}, (err) => () => {
|
394
281
|
throw err;
|
395
282
|
});
|
396
|
-
const descriptor = this.descriptors.longrunning[methodName] ||
|
283
|
+
const descriptor = this.descriptors.longrunning[methodName] ||
|
284
|
+
undefined;
|
397
285
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
398
286
|
this.innerApiCalls[methodName] = apiCall;
|
399
287
|
}
|
@@ -405,8 +293,7 @@ class CompletionServiceClient {
|
|
405
293
|
* @returns {string} The DNS address for this service.
|
406
294
|
*/
|
407
295
|
static get servicePath() {
|
408
|
-
if (typeof process === 'object' &&
|
409
|
-
typeof process.emitWarning === 'function') {
|
296
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
410
297
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
411
298
|
}
|
412
299
|
return 'discoveryengine.googleapis.com';
|
@@ -417,8 +304,7 @@ class CompletionServiceClient {
|
|
417
304
|
* @returns {string} The DNS address for this service.
|
418
305
|
*/
|
419
306
|
static get apiEndpoint() {
|
420
|
-
if (typeof process === 'object' &&
|
421
|
-
typeof process.emitWarning === 'function') {
|
307
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
422
308
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
423
309
|
}
|
424
310
|
return 'discoveryengine.googleapis.com';
|
@@ -446,7 +332,9 @@ class CompletionServiceClient {
|
|
446
332
|
* @returns {string[]} List of default scopes.
|
447
333
|
*/
|
448
334
|
static get scopes() {
|
449
|
-
return [
|
335
|
+
return [
|
336
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
337
|
+
];
|
450
338
|
}
|
451
339
|
/**
|
452
340
|
* Return the project ID used by this class.
|
@@ -472,13 +360,10 @@ class CompletionServiceClient {
|
|
472
360
|
options = options || {};
|
473
361
|
options.otherArgs = options.otherArgs || {};
|
474
362
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
475
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
476
|
-
|
477
|
-
data_store: request.dataStore ?? '',
|
478
|
-
});
|
479
|
-
this.initialize().catch(err => {
|
480
|
-
throw err;
|
363
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
364
|
+
'data_store': request.dataStore ?? '',
|
481
365
|
});
|
366
|
+
this.initialize().catch(err => { throw err; });
|
482
367
|
this._log.info('completeQuery request %j', request);
|
483
368
|
const wrappedCallback = callback
|
484
369
|
? (error, response, options, rawResponse) => {
|
@@ -486,8 +371,7 @@ class CompletionServiceClient {
|
|
486
371
|
callback(error, response, options, rawResponse); // We verified callback above.
|
487
372
|
}
|
488
373
|
: undefined;
|
489
|
-
return this.innerApiCalls
|
490
|
-
.completeQuery(request, options, wrappedCallback)
|
374
|
+
return this.innerApiCalls.completeQuery(request, options, wrappedCallback)
|
491
375
|
?.then(([response, options, rawResponse]) => {
|
492
376
|
this._log.info('completeQuery response %j', response);
|
493
377
|
return [response, options, rawResponse];
|
@@ -506,13 +390,10 @@ class CompletionServiceClient {
|
|
506
390
|
options = options || {};
|
507
391
|
options.otherArgs = options.otherArgs || {};
|
508
392
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
509
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
510
|
-
|
511
|
-
completion_config: request.completionConfig ?? '',
|
512
|
-
});
|
513
|
-
this.initialize().catch(err => {
|
514
|
-
throw err;
|
393
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
394
|
+
'completion_config': request.completionConfig ?? '',
|
515
395
|
});
|
396
|
+
this.initialize().catch(err => { throw err; });
|
516
397
|
this._log.info('advancedCompleteQuery request %j', request);
|
517
398
|
const wrappedCallback = callback
|
518
399
|
? (error, response, options, rawResponse) => {
|
@@ -520,8 +401,7 @@ class CompletionServiceClient {
|
|
520
401
|
callback(error, response, options, rawResponse); // We verified callback above.
|
521
402
|
}
|
522
403
|
: undefined;
|
523
|
-
return this.innerApiCalls
|
524
|
-
.advancedCompleteQuery(request, options, wrappedCallback)
|
404
|
+
return this.innerApiCalls.advancedCompleteQuery(request, options, wrappedCallback)
|
525
405
|
?.then(([response, options, rawResponse]) => {
|
526
406
|
this._log.info('advancedCompleteQuery response %j', response);
|
527
407
|
return [response, options, rawResponse];
|
@@ -540,13 +420,10 @@ class CompletionServiceClient {
|
|
540
420
|
options = options || {};
|
541
421
|
options.otherArgs = options.otherArgs || {};
|
542
422
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
543
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
544
|
-
|
545
|
-
parent: request.parent ?? '',
|
546
|
-
});
|
547
|
-
this.initialize().catch(err => {
|
548
|
-
throw err;
|
423
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
424
|
+
'parent': request.parent ?? '',
|
549
425
|
});
|
426
|
+
this.initialize().catch(err => { throw err; });
|
550
427
|
const wrappedCallback = callback
|
551
428
|
? (error, response, rawResponse, _) => {
|
552
429
|
this._log.info('importSuggestionDenyListEntries response %j', rawResponse);
|
@@ -554,8 +431,7 @@ class CompletionServiceClient {
|
|
554
431
|
}
|
555
432
|
: undefined;
|
556
433
|
this._log.info('importSuggestionDenyListEntries request %j', request);
|
557
|
-
return this.innerApiCalls
|
558
|
-
.importSuggestionDenyListEntries(request, options, wrappedCallback)
|
434
|
+
return this.innerApiCalls.importSuggestionDenyListEntries(request, options, wrappedCallback)
|
559
435
|
?.then(([response, rawResponse, _]) => {
|
560
436
|
this._log.info('importSuggestionDenyListEntries response %j', rawResponse);
|
561
437
|
return [response, rawResponse, _];
|
@@ -592,13 +468,10 @@ class CompletionServiceClient {
|
|
592
468
|
options = options || {};
|
593
469
|
options.otherArgs = options.otherArgs || {};
|
594
470
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
595
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
596
|
-
|
597
|
-
parent: request.parent ?? '',
|
598
|
-
});
|
599
|
-
this.initialize().catch(err => {
|
600
|
-
throw err;
|
471
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
472
|
+
'parent': request.parent ?? '',
|
601
473
|
});
|
474
|
+
this.initialize().catch(err => { throw err; });
|
602
475
|
const wrappedCallback = callback
|
603
476
|
? (error, response, rawResponse, _) => {
|
604
477
|
this._log.info('purgeSuggestionDenyListEntries response %j', rawResponse);
|
@@ -606,8 +479,7 @@ class CompletionServiceClient {
|
|
606
479
|
}
|
607
480
|
: undefined;
|
608
481
|
this._log.info('purgeSuggestionDenyListEntries request %j', request);
|
609
|
-
return this.innerApiCalls
|
610
|
-
.purgeSuggestionDenyListEntries(request, options, wrappedCallback)
|
482
|
+
return this.innerApiCalls.purgeSuggestionDenyListEntries(request, options, wrappedCallback)
|
611
483
|
?.then(([response, rawResponse, _]) => {
|
612
484
|
this._log.info('purgeSuggestionDenyListEntries response %j', rawResponse);
|
613
485
|
return [response, rawResponse, _];
|
@@ -644,13 +516,10 @@ class CompletionServiceClient {
|
|
644
516
|
options = options || {};
|
645
517
|
options.otherArgs = options.otherArgs || {};
|
646
518
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
647
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
648
|
-
|
649
|
-
parent: request.parent ?? '',
|
650
|
-
});
|
651
|
-
this.initialize().catch(err => {
|
652
|
-
throw err;
|
519
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
520
|
+
'parent': request.parent ?? '',
|
653
521
|
});
|
522
|
+
this.initialize().catch(err => { throw err; });
|
654
523
|
const wrappedCallback = callback
|
655
524
|
? (error, response, rawResponse, _) => {
|
656
525
|
this._log.info('importCompletionSuggestions response %j', rawResponse);
|
@@ -658,8 +527,7 @@ class CompletionServiceClient {
|
|
658
527
|
}
|
659
528
|
: undefined;
|
660
529
|
this._log.info('importCompletionSuggestions request %j', request);
|
661
|
-
return this.innerApiCalls
|
662
|
-
.importCompletionSuggestions(request, options, wrappedCallback)
|
530
|
+
return this.innerApiCalls.importCompletionSuggestions(request, options, wrappedCallback)
|
663
531
|
?.then(([response, rawResponse, _]) => {
|
664
532
|
this._log.info('importCompletionSuggestions response %j', rawResponse);
|
665
533
|
return [response, rawResponse, _];
|
@@ -696,13 +564,10 @@ class CompletionServiceClient {
|
|
696
564
|
options = options || {};
|
697
565
|
options.otherArgs = options.otherArgs || {};
|
698
566
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
699
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
700
|
-
|
701
|
-
parent: request.parent ?? '',
|
702
|
-
});
|
703
|
-
this.initialize().catch(err => {
|
704
|
-
throw err;
|
567
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
568
|
+
'parent': request.parent ?? '',
|
705
569
|
});
|
570
|
+
this.initialize().catch(err => { throw err; });
|
706
571
|
const wrappedCallback = callback
|
707
572
|
? (error, response, rawResponse, _) => {
|
708
573
|
this._log.info('purgeCompletionSuggestions response %j', rawResponse);
|
@@ -710,8 +575,7 @@ class CompletionServiceClient {
|
|
710
575
|
}
|
711
576
|
: undefined;
|
712
577
|
this._log.info('purgeCompletionSuggestions request %j', request);
|
713
|
-
return this.innerApiCalls
|
714
|
-
.purgeCompletionSuggestions(request, options, wrappedCallback)
|
578
|
+
return this.innerApiCalls.purgeCompletionSuggestions(request, options, wrappedCallback)
|
715
579
|
?.then(([response, rawResponse, _]) => {
|
716
580
|
this._log.info('purgeCompletionSuggestions response %j', rawResponse);
|
717
581
|
return [response, rawResponse, _];
|
@@ -736,90 +600,90 @@ class CompletionServiceClient {
|
|
736
600
|
return decodeOperation;
|
737
601
|
}
|
738
602
|
/**
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
603
|
+
* Gets information about a location.
|
604
|
+
*
|
605
|
+
* @param {Object} request
|
606
|
+
* The request object that will be sent.
|
607
|
+
* @param {string} request.name
|
608
|
+
* Resource name for the location.
|
609
|
+
* @param {object} [options]
|
610
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
611
|
+
* @returns {Promise} - The promise which resolves to an array.
|
612
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
613
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
614
|
+
* for more details and examples.
|
615
|
+
* @example
|
616
|
+
* ```
|
617
|
+
* const [response] = await client.getLocation(request);
|
618
|
+
* ```
|
619
|
+
*/
|
756
620
|
getLocation(request, options, callback) {
|
757
621
|
return this.locationsClient.getLocation(request, options, callback);
|
758
622
|
}
|
759
623
|
/**
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
624
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
625
|
+
*
|
626
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
627
|
+
* @param {Object} request
|
628
|
+
* The request object that will be sent.
|
629
|
+
* @param {string} request.name
|
630
|
+
* The resource that owns the locations collection, if applicable.
|
631
|
+
* @param {string} request.filter
|
632
|
+
* The standard list filter.
|
633
|
+
* @param {number} request.pageSize
|
634
|
+
* The standard list page size.
|
635
|
+
* @param {string} request.pageToken
|
636
|
+
* The standard list page token.
|
637
|
+
* @param {object} [options]
|
638
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
639
|
+
* @returns {Object}
|
640
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
641
|
+
* When you iterate the returned iterable, each element will be an object representing
|
642
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
643
|
+
* so you can stop the iteration when you don't need more results.
|
644
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
645
|
+
* for more details and examples.
|
646
|
+
* @example
|
647
|
+
* ```
|
648
|
+
* const iterable = client.listLocationsAsync(request);
|
649
|
+
* for await (const response of iterable) {
|
650
|
+
* // process response
|
651
|
+
* }
|
652
|
+
* ```
|
653
|
+
*/
|
790
654
|
listLocationsAsync(request, options) {
|
791
655
|
return this.locationsClient.listLocationsAsync(request, options);
|
792
656
|
}
|
793
657
|
/**
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
658
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
659
|
+
* method to poll the operation result at intervals as recommended by the API
|
660
|
+
* service.
|
661
|
+
*
|
662
|
+
* @param {Object} request - The request object that will be sent.
|
663
|
+
* @param {string} request.name - The name of the operation resource.
|
664
|
+
* @param {Object=} options
|
665
|
+
* Optional parameters. You can override the default settings for this call,
|
666
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
667
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
668
|
+
* for the details.
|
669
|
+
* @param {function(?Error, ?Object)=} callback
|
670
|
+
* The function which will be called with the result of the API call.
|
671
|
+
*
|
672
|
+
* The second parameter to the callback is an object representing
|
673
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
674
|
+
* @return {Promise} - The promise which resolves to an array.
|
675
|
+
* The first element of the array is an object representing
|
676
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
677
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
678
|
+
*
|
679
|
+
* @example
|
680
|
+
* ```
|
681
|
+
* const client = longrunning.operationsClient();
|
682
|
+
* const name = '';
|
683
|
+
* const [response] = await client.getOperation({name});
|
684
|
+
* // doThingsWith(response)
|
685
|
+
* ```
|
686
|
+
*/
|
823
687
|
getOperation(request, optionsOrCallback, callback) {
|
824
688
|
let options;
|
825
689
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -1053,8 +917,7 @@ class CompletionServiceClient {
|
|
1053
917
|
* @returns {string} A string representing the project.
|
1054
918
|
*/
|
1055
919
|
matchProjectFromEvaluationName(evaluationName) {
|
1056
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1057
|
-
.project;
|
920
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1058
921
|
}
|
1059
922
|
/**
|
1060
923
|
* Parse the location from Evaluation resource.
|
@@ -1064,8 +927,7 @@ class CompletionServiceClient {
|
|
1064
927
|
* @returns {string} A string representing the location.
|
1065
928
|
*/
|
1066
929
|
matchLocationFromEvaluationName(evaluationName) {
|
1067
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1068
|
-
.location;
|
930
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1069
931
|
}
|
1070
932
|
/**
|
1071
933
|
* Parse the evaluation from Evaluation resource.
|
@@ -1075,8 +937,7 @@ class CompletionServiceClient {
|
|
1075
937
|
* @returns {string} A string representing the evaluation.
|
1076
938
|
*/
|
1077
939
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1078
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1079
|
-
.evaluation;
|
940
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1080
941
|
}
|
1081
942
|
/**
|
1082
943
|
* Return a fully-qualified groundingConfig resource name string.
|
@@ -3473,8 +3334,7 @@ class CompletionServiceClient {
|
|
3473
3334
|
* @returns {string} A string representing the project.
|
3474
3335
|
*/
|
3475
3336
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3476
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3477
|
-
.project;
|
3337
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3478
3338
|
}
|
3479
3339
|
/**
|
3480
3340
|
* Parse the location from SampleQuery resource.
|
@@ -3484,8 +3344,7 @@ class CompletionServiceClient {
|
|
3484
3344
|
* @returns {string} A string representing the location.
|
3485
3345
|
*/
|
3486
3346
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3487
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3488
|
-
.location;
|
3347
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3489
3348
|
}
|
3490
3349
|
/**
|
3491
3350
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3495,8 +3354,7 @@ class CompletionServiceClient {
|
|
3495
3354
|
* @returns {string} A string representing the sample_query_set.
|
3496
3355
|
*/
|
3497
3356
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3498
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3499
|
-
.sample_query_set;
|
3357
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3500
3358
|
}
|
3501
3359
|
/**
|
3502
3360
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3506,8 +3364,7 @@ class CompletionServiceClient {
|
|
3506
3364
|
* @returns {string} A string representing the sample_query.
|
3507
3365
|
*/
|
3508
3366
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3509
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3510
|
-
.sample_query;
|
3367
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3511
3368
|
}
|
3512
3369
|
/**
|
3513
3370
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3566,8 +3423,8 @@ class CompletionServiceClient {
|
|
3566
3423
|
this._log.info('ending gRPC channel');
|
3567
3424
|
this._terminated = true;
|
3568
3425
|
stub.close();
|
3569
|
-
this.locationsClient.close();
|
3570
|
-
this.operationsClient.close();
|
3426
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3427
|
+
void this.operationsClient.close();
|
3571
3428
|
});
|
3572
3429
|
}
|
3573
3430
|
return Promise.resolve();
|