@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
@@ -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
|
}
|
@@ -207,127 +201,22 @@ class CompletionServiceClient {
|
|
207
201
|
sampleQueryPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}'),
|
208
202
|
sampleQuerySetPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}'),
|
209
203
|
};
|
210
|
-
const protoFilesRoot = this._gaxModule.
|
204
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
211
205
|
// This API contains "long-running operations", which return a
|
212
206
|
// an Operation object that allows for tracking of the operation,
|
213
207
|
// rather than holding a request open.
|
214
208
|
const lroOptions = {
|
215
209
|
auth: this.auth,
|
216
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
210
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
217
211
|
};
|
218
212
|
if (opts.fallback) {
|
219
213
|
lroOptions.protoJson = protoFilesRoot;
|
220
|
-
lroOptions.httpRules = [
|
221
|
-
{
|
222
|
-
|
223
|
-
|
224
|
-
body: '*',
|
225
|
-
additional_bindings: [
|
226
|
-
{
|
227
|
-
post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
228
|
-
body: '*',
|
229
|
-
},
|
230
|
-
],
|
231
|
-
},
|
232
|
-
{
|
233
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
234
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
235
|
-
additional_bindings: [
|
236
|
-
{
|
237
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
238
|
-
},
|
239
|
-
{
|
240
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
241
|
-
},
|
242
|
-
{
|
243
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
244
|
-
},
|
245
|
-
{
|
246
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
247
|
-
},
|
248
|
-
{
|
249
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
250
|
-
},
|
251
|
-
{
|
252
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
253
|
-
},
|
254
|
-
{
|
255
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
256
|
-
},
|
257
|
-
{
|
258
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
|
259
|
-
},
|
260
|
-
{
|
261
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
262
|
-
},
|
263
|
-
{
|
264
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
265
|
-
},
|
266
|
-
{
|
267
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
268
|
-
},
|
269
|
-
{
|
270
|
-
get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
271
|
-
},
|
272
|
-
{
|
273
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
|
274
|
-
},
|
275
|
-
{ get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
|
276
|
-
{
|
277
|
-
get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
278
|
-
},
|
279
|
-
{ get: '/v1alpha/{name=projects/*/operations/*}' },
|
280
|
-
],
|
281
|
-
},
|
282
|
-
{
|
283
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
284
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
285
|
-
additional_bindings: [
|
286
|
-
{
|
287
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
288
|
-
},
|
289
|
-
{
|
290
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
291
|
-
},
|
292
|
-
{
|
293
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
294
|
-
},
|
295
|
-
{
|
296
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
297
|
-
},
|
298
|
-
{
|
299
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
300
|
-
},
|
301
|
-
{
|
302
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
303
|
-
},
|
304
|
-
{
|
305
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
306
|
-
},
|
307
|
-
{
|
308
|
-
get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
|
309
|
-
},
|
310
|
-
{
|
311
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
312
|
-
},
|
313
|
-
{
|
314
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
315
|
-
},
|
316
|
-
{
|
317
|
-
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
|
318
|
-
},
|
319
|
-
{
|
320
|
-
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
|
321
|
-
},
|
322
|
-
{ get: '/v1alpha/{name=projects/*/locations/*}/operations' },
|
323
|
-
{ get: '/v1alpha/{name=projects/*}/operations' },
|
324
|
-
],
|
325
|
-
},
|
326
|
-
];
|
214
|
+
lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
|
215
|
+
}, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1alpha/{name=projects/*/operations/*}', }],
|
216
|
+
}, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations', }, { get: '/v1alpha/{name=projects/*/locations/*}/operations', }, { get: '/v1alpha/{name=projects/*}/operations', }],
|
217
|
+
}];
|
327
218
|
}
|
328
|
-
this.operationsClient = this._gaxModule
|
329
|
-
.lro(lroOptions)
|
330
|
-
.operationsClient(opts);
|
219
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
331
220
|
const importSuggestionDenyListEntriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.ImportSuggestionDenyListEntriesResponse');
|
332
221
|
const importSuggestionDenyListEntriesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.ImportSuggestionDenyListEntriesMetadata');
|
333
222
|
const purgeSuggestionDenyListEntriesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.PurgeSuggestionDenyListEntriesResponse');
|
@@ -340,7 +229,7 @@ class CompletionServiceClient {
|
|
340
229
|
importSuggestionDenyListEntries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importSuggestionDenyListEntriesResponse.decode.bind(importSuggestionDenyListEntriesResponse), importSuggestionDenyListEntriesMetadata.decode.bind(importSuggestionDenyListEntriesMetadata)),
|
341
230
|
purgeSuggestionDenyListEntries: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeSuggestionDenyListEntriesResponse.decode.bind(purgeSuggestionDenyListEntriesResponse), purgeSuggestionDenyListEntriesMetadata.decode.bind(purgeSuggestionDenyListEntriesMetadata)),
|
342
231
|
importCompletionSuggestions: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importCompletionSuggestionsResponse.decode.bind(importCompletionSuggestionsResponse), importCompletionSuggestionsMetadata.decode.bind(importCompletionSuggestionsMetadata)),
|
343
|
-
purgeCompletionSuggestions: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeCompletionSuggestionsResponse.decode.bind(purgeCompletionSuggestionsResponse), purgeCompletionSuggestionsMetadata.decode.bind(purgeCompletionSuggestionsMetadata))
|
232
|
+
purgeCompletionSuggestions: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeCompletionSuggestionsResponse.decode.bind(purgeCompletionSuggestionsResponse), purgeCompletionSuggestionsMetadata.decode.bind(purgeCompletionSuggestionsMetadata))
|
344
233
|
};
|
345
234
|
// Put together the default options sent with requests.
|
346
235
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.CompletionService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -369,20 +258,13 @@ class CompletionServiceClient {
|
|
369
258
|
}
|
370
259
|
// Put together the "service stub" for
|
371
260
|
// google.cloud.discoveryengine.v1alpha.CompletionService.
|
372
|
-
this.completionServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
.CompletionService, this._opts, this._providedCustomServicePath);
|
261
|
+
this.completionServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
262
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1alpha.CompletionService') :
|
263
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
264
|
+
this._protos.google.cloud.discoveryengine.v1alpha.CompletionService, this._opts, this._providedCustomServicePath);
|
377
265
|
// Iterate over each of the methods that the service provides
|
378
266
|
// and create an API call method for each.
|
379
|
-
const completionServiceStubMethods = [
|
380
|
-
'completeQuery',
|
381
|
-
'importSuggestionDenyListEntries',
|
382
|
-
'purgeSuggestionDenyListEntries',
|
383
|
-
'importCompletionSuggestions',
|
384
|
-
'purgeCompletionSuggestions',
|
385
|
-
];
|
267
|
+
const completionServiceStubMethods = ['completeQuery', 'importSuggestionDenyListEntries', 'purgeSuggestionDenyListEntries', 'importCompletionSuggestions', 'purgeCompletionSuggestions'];
|
386
268
|
for (const methodName of completionServiceStubMethods) {
|
387
269
|
const callPromise = this.completionServiceStub.then(stub => (...args) => {
|
388
270
|
if (this._terminated) {
|
@@ -393,7 +275,8 @@ class CompletionServiceClient {
|
|
393
275
|
}, (err) => () => {
|
394
276
|
throw err;
|
395
277
|
});
|
396
|
-
const descriptor = this.descriptors.longrunning[methodName] ||
|
278
|
+
const descriptor = this.descriptors.longrunning[methodName] ||
|
279
|
+
undefined;
|
397
280
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
398
281
|
this.innerApiCalls[methodName] = apiCall;
|
399
282
|
}
|
@@ -405,8 +288,7 @@ class CompletionServiceClient {
|
|
405
288
|
* @returns {string} The DNS address for this service.
|
406
289
|
*/
|
407
290
|
static get servicePath() {
|
408
|
-
if (typeof process === 'object' &&
|
409
|
-
typeof process.emitWarning === 'function') {
|
291
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
410
292
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
411
293
|
}
|
412
294
|
return 'discoveryengine.googleapis.com';
|
@@ -417,8 +299,7 @@ class CompletionServiceClient {
|
|
417
299
|
* @returns {string} The DNS address for this service.
|
418
300
|
*/
|
419
301
|
static get apiEndpoint() {
|
420
|
-
if (typeof process === 'object' &&
|
421
|
-
typeof process.emitWarning === 'function') {
|
302
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
422
303
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
423
304
|
}
|
424
305
|
return 'discoveryengine.googleapis.com';
|
@@ -446,7 +327,9 @@ class CompletionServiceClient {
|
|
446
327
|
* @returns {string[]} List of default scopes.
|
447
328
|
*/
|
448
329
|
static get scopes() {
|
449
|
-
return [
|
330
|
+
return [
|
331
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
332
|
+
];
|
450
333
|
}
|
451
334
|
/**
|
452
335
|
* Return the project ID used by this class.
|
@@ -472,13 +355,10 @@ class CompletionServiceClient {
|
|
472
355
|
options = options || {};
|
473
356
|
options.otherArgs = options.otherArgs || {};
|
474
357
|
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;
|
358
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
359
|
+
'data_store': request.dataStore ?? '',
|
481
360
|
});
|
361
|
+
this.initialize().catch(err => { throw err; });
|
482
362
|
this._log.info('completeQuery request %j', request);
|
483
363
|
const wrappedCallback = callback
|
484
364
|
? (error, response, options, rawResponse) => {
|
@@ -486,11 +366,16 @@ class CompletionServiceClient {
|
|
486
366
|
callback(error, response, options, rawResponse); // We verified callback above.
|
487
367
|
}
|
488
368
|
: undefined;
|
489
|
-
return this.innerApiCalls
|
490
|
-
.completeQuery(request, options, wrappedCallback)
|
369
|
+
return this.innerApiCalls.completeQuery(request, options, wrappedCallback)
|
491
370
|
?.then(([response, options, rawResponse]) => {
|
492
371
|
this._log.info('completeQuery response %j', response);
|
493
372
|
return [response, options, rawResponse];
|
373
|
+
}).catch((error) => {
|
374
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
375
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
376
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
377
|
+
}
|
378
|
+
throw error;
|
494
379
|
});
|
495
380
|
}
|
496
381
|
importSuggestionDenyListEntries(request, optionsOrCallback, callback) {
|
@@ -506,13 +391,10 @@ class CompletionServiceClient {
|
|
506
391
|
options = options || {};
|
507
392
|
options.otherArgs = options.otherArgs || {};
|
508
393
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
509
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
510
|
-
|
511
|
-
parent: request.parent ?? '',
|
512
|
-
});
|
513
|
-
this.initialize().catch(err => {
|
514
|
-
throw err;
|
394
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
395
|
+
'parent': request.parent ?? '',
|
515
396
|
});
|
397
|
+
this.initialize().catch(err => { throw err; });
|
516
398
|
const wrappedCallback = callback
|
517
399
|
? (error, response, rawResponse, _) => {
|
518
400
|
this._log.info('importSuggestionDenyListEntries response %j', rawResponse);
|
@@ -520,8 +402,7 @@ class CompletionServiceClient {
|
|
520
402
|
}
|
521
403
|
: undefined;
|
522
404
|
this._log.info('importSuggestionDenyListEntries request %j', request);
|
523
|
-
return this.innerApiCalls
|
524
|
-
.importSuggestionDenyListEntries(request, options, wrappedCallback)
|
405
|
+
return this.innerApiCalls.importSuggestionDenyListEntries(request, options, wrappedCallback)
|
525
406
|
?.then(([response, rawResponse, _]) => {
|
526
407
|
this._log.info('importSuggestionDenyListEntries response %j', rawResponse);
|
527
408
|
return [response, rawResponse, _];
|
@@ -558,13 +439,10 @@ class CompletionServiceClient {
|
|
558
439
|
options = options || {};
|
559
440
|
options.otherArgs = options.otherArgs || {};
|
560
441
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
561
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
562
|
-
|
563
|
-
parent: request.parent ?? '',
|
564
|
-
});
|
565
|
-
this.initialize().catch(err => {
|
566
|
-
throw err;
|
442
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
443
|
+
'parent': request.parent ?? '',
|
567
444
|
});
|
445
|
+
this.initialize().catch(err => { throw err; });
|
568
446
|
const wrappedCallback = callback
|
569
447
|
? (error, response, rawResponse, _) => {
|
570
448
|
this._log.info('purgeSuggestionDenyListEntries response %j', rawResponse);
|
@@ -572,8 +450,7 @@ class CompletionServiceClient {
|
|
572
450
|
}
|
573
451
|
: undefined;
|
574
452
|
this._log.info('purgeSuggestionDenyListEntries request %j', request);
|
575
|
-
return this.innerApiCalls
|
576
|
-
.purgeSuggestionDenyListEntries(request, options, wrappedCallback)
|
453
|
+
return this.innerApiCalls.purgeSuggestionDenyListEntries(request, options, wrappedCallback)
|
577
454
|
?.then(([response, rawResponse, _]) => {
|
578
455
|
this._log.info('purgeSuggestionDenyListEntries response %j', rawResponse);
|
579
456
|
return [response, rawResponse, _];
|
@@ -610,13 +487,10 @@ class CompletionServiceClient {
|
|
610
487
|
options = options || {};
|
611
488
|
options.otherArgs = options.otherArgs || {};
|
612
489
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
613
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
614
|
-
|
615
|
-
parent: request.parent ?? '',
|
616
|
-
});
|
617
|
-
this.initialize().catch(err => {
|
618
|
-
throw err;
|
490
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
491
|
+
'parent': request.parent ?? '',
|
619
492
|
});
|
493
|
+
this.initialize().catch(err => { throw err; });
|
620
494
|
const wrappedCallback = callback
|
621
495
|
? (error, response, rawResponse, _) => {
|
622
496
|
this._log.info('importCompletionSuggestions response %j', rawResponse);
|
@@ -624,8 +498,7 @@ class CompletionServiceClient {
|
|
624
498
|
}
|
625
499
|
: undefined;
|
626
500
|
this._log.info('importCompletionSuggestions request %j', request);
|
627
|
-
return this.innerApiCalls
|
628
|
-
.importCompletionSuggestions(request, options, wrappedCallback)
|
501
|
+
return this.innerApiCalls.importCompletionSuggestions(request, options, wrappedCallback)
|
629
502
|
?.then(([response, rawResponse, _]) => {
|
630
503
|
this._log.info('importCompletionSuggestions response %j', rawResponse);
|
631
504
|
return [response, rawResponse, _];
|
@@ -662,13 +535,10 @@ class CompletionServiceClient {
|
|
662
535
|
options = options || {};
|
663
536
|
options.otherArgs = options.otherArgs || {};
|
664
537
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
665
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
666
|
-
|
667
|
-
parent: request.parent ?? '',
|
668
|
-
});
|
669
|
-
this.initialize().catch(err => {
|
670
|
-
throw err;
|
538
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
539
|
+
'parent': request.parent ?? '',
|
671
540
|
});
|
541
|
+
this.initialize().catch(err => { throw err; });
|
672
542
|
const wrappedCallback = callback
|
673
543
|
? (error, response, rawResponse, _) => {
|
674
544
|
this._log.info('purgeCompletionSuggestions response %j', rawResponse);
|
@@ -676,8 +546,7 @@ class CompletionServiceClient {
|
|
676
546
|
}
|
677
547
|
: undefined;
|
678
548
|
this._log.info('purgeCompletionSuggestions request %j', request);
|
679
|
-
return this.innerApiCalls
|
680
|
-
.purgeCompletionSuggestions(request, options, wrappedCallback)
|
549
|
+
return this.innerApiCalls.purgeCompletionSuggestions(request, options, wrappedCallback)
|
681
550
|
?.then(([response, rawResponse, _]) => {
|
682
551
|
this._log.info('purgeCompletionSuggestions response %j', rawResponse);
|
683
552
|
return [response, rawResponse, _];
|
@@ -702,90 +571,90 @@ class CompletionServiceClient {
|
|
702
571
|
return decodeOperation;
|
703
572
|
}
|
704
573
|
/**
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
574
|
+
* Gets information about a location.
|
575
|
+
*
|
576
|
+
* @param {Object} request
|
577
|
+
* The request object that will be sent.
|
578
|
+
* @param {string} request.name
|
579
|
+
* Resource name for the location.
|
580
|
+
* @param {object} [options]
|
581
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
582
|
+
* @returns {Promise} - The promise which resolves to an array.
|
583
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
584
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
585
|
+
* for more details and examples.
|
586
|
+
* @example
|
587
|
+
* ```
|
588
|
+
* const [response] = await client.getLocation(request);
|
589
|
+
* ```
|
590
|
+
*/
|
722
591
|
getLocation(request, options, callback) {
|
723
592
|
return this.locationsClient.getLocation(request, options, callback);
|
724
593
|
}
|
725
594
|
/**
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
595
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
596
|
+
*
|
597
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
598
|
+
* @param {Object} request
|
599
|
+
* The request object that will be sent.
|
600
|
+
* @param {string} request.name
|
601
|
+
* The resource that owns the locations collection, if applicable.
|
602
|
+
* @param {string} request.filter
|
603
|
+
* The standard list filter.
|
604
|
+
* @param {number} request.pageSize
|
605
|
+
* The standard list page size.
|
606
|
+
* @param {string} request.pageToken
|
607
|
+
* The standard list page token.
|
608
|
+
* @param {object} [options]
|
609
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
610
|
+
* @returns {Object}
|
611
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
612
|
+
* When you iterate the returned iterable, each element will be an object representing
|
613
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
614
|
+
* so you can stop the iteration when you don't need more results.
|
615
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
616
|
+
* for more details and examples.
|
617
|
+
* @example
|
618
|
+
* ```
|
619
|
+
* const iterable = client.listLocationsAsync(request);
|
620
|
+
* for await (const response of iterable) {
|
621
|
+
* // process response
|
622
|
+
* }
|
623
|
+
* ```
|
624
|
+
*/
|
756
625
|
listLocationsAsync(request, options) {
|
757
626
|
return this.locationsClient.listLocationsAsync(request, options);
|
758
627
|
}
|
759
628
|
/**
|
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
|
-
|
629
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
630
|
+
* method to poll the operation result at intervals as recommended by the API
|
631
|
+
* service.
|
632
|
+
*
|
633
|
+
* @param {Object} request - The request object that will be sent.
|
634
|
+
* @param {string} request.name - The name of the operation resource.
|
635
|
+
* @param {Object=} options
|
636
|
+
* Optional parameters. You can override the default settings for this call,
|
637
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
638
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
639
|
+
* for the details.
|
640
|
+
* @param {function(?Error, ?Object)=} callback
|
641
|
+
* The function which will be called with the result of the API call.
|
642
|
+
*
|
643
|
+
* The second parameter to the callback is an object representing
|
644
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
645
|
+
* @return {Promise} - The promise which resolves to an array.
|
646
|
+
* The first element of the array is an object representing
|
647
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
648
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
649
|
+
*
|
650
|
+
* @example
|
651
|
+
* ```
|
652
|
+
* const client = longrunning.operationsClient();
|
653
|
+
* const name = '';
|
654
|
+
* const [response] = await client.getOperation({name});
|
655
|
+
* // doThingsWith(response)
|
656
|
+
* ```
|
657
|
+
*/
|
789
658
|
getOperation(request, optionsOrCallback, callback) {
|
790
659
|
let options;
|
791
660
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -960,8 +829,7 @@ class CompletionServiceClient {
|
|
960
829
|
* @returns {string} A string representing the project.
|
961
830
|
*/
|
962
831
|
matchProjectFromAclConfigName(aclConfigName) {
|
963
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
964
|
-
.project;
|
832
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
|
965
833
|
}
|
966
834
|
/**
|
967
835
|
* Parse the location from AclConfig resource.
|
@@ -971,8 +839,7 @@ class CompletionServiceClient {
|
|
971
839
|
* @returns {string} A string representing the location.
|
972
840
|
*/
|
973
841
|
matchLocationFromAclConfigName(aclConfigName) {
|
974
|
-
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
|
975
|
-
.location;
|
842
|
+
return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
|
976
843
|
}
|
977
844
|
/**
|
978
845
|
* Return a fully-qualified engine resource name string.
|
@@ -1054,8 +921,7 @@ class CompletionServiceClient {
|
|
1054
921
|
* @returns {string} A string representing the project.
|
1055
922
|
*/
|
1056
923
|
matchProjectFromEvaluationName(evaluationName) {
|
1057
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1058
|
-
.project;
|
924
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
1059
925
|
}
|
1060
926
|
/**
|
1061
927
|
* Parse the location from Evaluation resource.
|
@@ -1065,8 +931,7 @@ class CompletionServiceClient {
|
|
1065
931
|
* @returns {string} A string representing the location.
|
1066
932
|
*/
|
1067
933
|
matchLocationFromEvaluationName(evaluationName) {
|
1068
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1069
|
-
.location;
|
934
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
1070
935
|
}
|
1071
936
|
/**
|
1072
937
|
* Parse the evaluation from Evaluation resource.
|
@@ -1076,8 +941,7 @@ class CompletionServiceClient {
|
|
1076
941
|
* @returns {string} A string representing the evaluation.
|
1077
942
|
*/
|
1078
943
|
matchEvaluationFromEvaluationName(evaluationName) {
|
1079
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
1080
|
-
.evaluation;
|
944
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
1081
945
|
}
|
1082
946
|
/**
|
1083
947
|
* Return a fully-qualified project resource name string.
|
@@ -3144,8 +3008,7 @@ class CompletionServiceClient {
|
|
3144
3008
|
* @returns {string} A string representing the project.
|
3145
3009
|
*/
|
3146
3010
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3147
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3148
|
-
.project;
|
3011
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3149
3012
|
}
|
3150
3013
|
/**
|
3151
3014
|
* Parse the location from SampleQuery resource.
|
@@ -3155,8 +3018,7 @@ class CompletionServiceClient {
|
|
3155
3018
|
* @returns {string} A string representing the location.
|
3156
3019
|
*/
|
3157
3020
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3158
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3159
|
-
.location;
|
3021
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3160
3022
|
}
|
3161
3023
|
/**
|
3162
3024
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3166,8 +3028,7 @@ class CompletionServiceClient {
|
|
3166
3028
|
* @returns {string} A string representing the sample_query_set.
|
3167
3029
|
*/
|
3168
3030
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3169
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3170
|
-
.sample_query_set;
|
3031
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3171
3032
|
}
|
3172
3033
|
/**
|
3173
3034
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3177,8 +3038,7 @@ class CompletionServiceClient {
|
|
3177
3038
|
* @returns {string} A string representing the sample_query.
|
3178
3039
|
*/
|
3179
3040
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3180
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3181
|
-
.sample_query;
|
3041
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3182
3042
|
}
|
3183
3043
|
/**
|
3184
3044
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3237,8 +3097,8 @@ class CompletionServiceClient {
|
|
3237
3097
|
this._log.info('ending gRPC channel');
|
3238
3098
|
this._terminated = true;
|
3239
3099
|
stub.close();
|
3240
|
-
this.locationsClient.close();
|
3241
|
-
this.operationsClient.close();
|
3100
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3101
|
+
void this.operationsClient.close();
|
3242
3102
|
});
|
3243
3103
|
}
|
3244
3104
|
return Promise.resolve();
|