@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
@@ -97,28 +97,18 @@ class SampleQuerySetServiceClient {
|
|
97
97
|
*/
|
98
98
|
constructor(opts, gaxInstance) {
|
99
99
|
// Ensure that options include all the required fields.
|
100
|
-
const staticMembers = this
|
101
|
-
|
102
|
-
if (opts?.universe_domain &&
|
103
|
-
opts?.universeDomain &&
|
104
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
100
|
+
const staticMembers = this.constructor;
|
101
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
105
102
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
106
103
|
}
|
107
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
108
|
-
|
109
|
-
: undefined;
|
110
|
-
this._universeDomain =
|
111
|
-
opts?.universeDomain ??
|
112
|
-
opts?.universe_domain ??
|
113
|
-
universeDomainEnvVar ??
|
114
|
-
'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';
|
115
106
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
116
107
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
117
108
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
118
109
|
const port = opts?.port || staticMembers.port;
|
119
110
|
const clientConfig = opts?.clientConfig ?? {};
|
120
|
-
const fallback = opts?.fallback ??
|
121
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
111
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
122
112
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
123
113
|
// Request numeric enum values if REST transport is used.
|
124
114
|
opts.numericEnums = true;
|
@@ -148,7 +138,10 @@ class SampleQuerySetServiceClient {
|
|
148
138
|
}
|
149
139
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
150
140
|
// Determine the client header string.
|
151
|
-
const clientHeader = [
|
141
|
+
const clientHeader = [
|
142
|
+
`gax/${this._gaxModule.version}`,
|
143
|
+
`gapic/${version}`,
|
144
|
+
];
|
152
145
|
if (typeof process === 'object' && 'versions' in process) {
|
153
146
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
154
147
|
}
|
@@ -215,7 +208,7 @@ class SampleQuerySetServiceClient {
|
|
215
208
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
216
209
|
// pages). Denote the keys used for pagination and results.
|
217
210
|
this.descriptors.page = {
|
218
|
-
listSampleQuerySets: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQuerySets')
|
211
|
+
listSampleQuerySets: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQuerySets')
|
219
212
|
};
|
220
213
|
// Put together the default options sent with requests.
|
221
214
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.SampleQuerySetService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -244,20 +237,13 @@ class SampleQuerySetServiceClient {
|
|
244
237
|
}
|
245
238
|
// Put together the "service stub" for
|
246
239
|
// google.cloud.discoveryengine.v1beta.SampleQuerySetService.
|
247
|
-
this.sampleQuerySetServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
.SampleQuerySetService, this._opts, this._providedCustomServicePath);
|
240
|
+
this.sampleQuerySetServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
241
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1beta.SampleQuerySetService') :
|
242
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
243
|
+
this._protos.google.cloud.discoveryengine.v1beta.SampleQuerySetService, this._opts, this._providedCustomServicePath);
|
252
244
|
// Iterate over each of the methods that the service provides
|
253
245
|
// and create an API call method for each.
|
254
|
-
const sampleQuerySetServiceStubMethods = [
|
255
|
-
'getSampleQuerySet',
|
256
|
-
'listSampleQuerySets',
|
257
|
-
'createSampleQuerySet',
|
258
|
-
'updateSampleQuerySet',
|
259
|
-
'deleteSampleQuerySet',
|
260
|
-
];
|
246
|
+
const sampleQuerySetServiceStubMethods = ['getSampleQuerySet', 'listSampleQuerySets', 'createSampleQuerySet', 'updateSampleQuerySet', 'deleteSampleQuerySet'];
|
261
247
|
for (const methodName of sampleQuerySetServiceStubMethods) {
|
262
248
|
const callPromise = this.sampleQuerySetServiceStub.then(stub => (...args) => {
|
263
249
|
if (this._terminated) {
|
@@ -268,7 +254,8 @@ class SampleQuerySetServiceClient {
|
|
268
254
|
}, (err) => () => {
|
269
255
|
throw err;
|
270
256
|
});
|
271
|
-
const descriptor = this.descriptors.page[methodName] ||
|
257
|
+
const descriptor = this.descriptors.page[methodName] ||
|
258
|
+
undefined;
|
272
259
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
273
260
|
this.innerApiCalls[methodName] = apiCall;
|
274
261
|
}
|
@@ -280,8 +267,7 @@ class SampleQuerySetServiceClient {
|
|
280
267
|
* @returns {string} The DNS address for this service.
|
281
268
|
*/
|
282
269
|
static get servicePath() {
|
283
|
-
if (typeof process === 'object' &&
|
284
|
-
typeof process.emitWarning === 'function') {
|
270
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
285
271
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
286
272
|
}
|
287
273
|
return 'discoveryengine.googleapis.com';
|
@@ -292,8 +278,7 @@ class SampleQuerySetServiceClient {
|
|
292
278
|
* @returns {string} The DNS address for this service.
|
293
279
|
*/
|
294
280
|
static get apiEndpoint() {
|
295
|
-
if (typeof process === 'object' &&
|
296
|
-
typeof process.emitWarning === 'function') {
|
281
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
297
282
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
298
283
|
}
|
299
284
|
return 'discoveryengine.googleapis.com';
|
@@ -321,7 +306,9 @@ class SampleQuerySetServiceClient {
|
|
321
306
|
* @returns {string[]} List of default scopes.
|
322
307
|
*/
|
323
308
|
static get scopes() {
|
324
|
-
return [
|
309
|
+
return [
|
310
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
311
|
+
];
|
325
312
|
}
|
326
313
|
/**
|
327
314
|
* Return the project ID used by this class.
|
@@ -347,13 +334,10 @@ class SampleQuerySetServiceClient {
|
|
347
334
|
options = options || {};
|
348
335
|
options.otherArgs = options.otherArgs || {};
|
349
336
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
350
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
351
|
-
|
352
|
-
name: request.name ?? '',
|
353
|
-
});
|
354
|
-
this.initialize().catch(err => {
|
355
|
-
throw err;
|
337
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
338
|
+
'name': request.name ?? '',
|
356
339
|
});
|
340
|
+
this.initialize().catch(err => { throw err; });
|
357
341
|
this._log.info('getSampleQuerySet request %j', request);
|
358
342
|
const wrappedCallback = callback
|
359
343
|
? (error, response, options, rawResponse) => {
|
@@ -361,8 +345,7 @@ class SampleQuerySetServiceClient {
|
|
361
345
|
callback(error, response, options, rawResponse); // We verified callback above.
|
362
346
|
}
|
363
347
|
: undefined;
|
364
|
-
return this.innerApiCalls
|
365
|
-
.getSampleQuerySet(request, options, wrappedCallback)
|
348
|
+
return this.innerApiCalls.getSampleQuerySet(request, options, wrappedCallback)
|
366
349
|
?.then(([response, options, rawResponse]) => {
|
367
350
|
this._log.info('getSampleQuerySet response %j', response);
|
368
351
|
return [response, options, rawResponse];
|
@@ -381,13 +364,10 @@ class SampleQuerySetServiceClient {
|
|
381
364
|
options = options || {};
|
382
365
|
options.otherArgs = options.otherArgs || {};
|
383
366
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
384
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
385
|
-
|
386
|
-
parent: request.parent ?? '',
|
387
|
-
});
|
388
|
-
this.initialize().catch(err => {
|
389
|
-
throw err;
|
367
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
368
|
+
'parent': request.parent ?? '',
|
390
369
|
});
|
370
|
+
this.initialize().catch(err => { throw err; });
|
391
371
|
this._log.info('createSampleQuerySet request %j', request);
|
392
372
|
const wrappedCallback = callback
|
393
373
|
? (error, response, options, rawResponse) => {
|
@@ -395,8 +375,7 @@ class SampleQuerySetServiceClient {
|
|
395
375
|
callback(error, response, options, rawResponse); // We verified callback above.
|
396
376
|
}
|
397
377
|
: undefined;
|
398
|
-
return this.innerApiCalls
|
399
|
-
.createSampleQuerySet(request, options, wrappedCallback)
|
378
|
+
return this.innerApiCalls.createSampleQuerySet(request, options, wrappedCallback)
|
400
379
|
?.then(([response, options, rawResponse]) => {
|
401
380
|
this._log.info('createSampleQuerySet response %j', response);
|
402
381
|
return [response, options, rawResponse];
|
@@ -415,13 +394,10 @@ class SampleQuerySetServiceClient {
|
|
415
394
|
options = options || {};
|
416
395
|
options.otherArgs = options.otherArgs || {};
|
417
396
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
418
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
419
|
-
|
420
|
-
'sample_query_set.name': request.sampleQuerySet.name ?? '',
|
421
|
-
});
|
422
|
-
this.initialize().catch(err => {
|
423
|
-
throw err;
|
397
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
398
|
+
'sample_query_set.name': request.sampleQuerySet.name ?? '',
|
424
399
|
});
|
400
|
+
this.initialize().catch(err => { throw err; });
|
425
401
|
this._log.info('updateSampleQuerySet request %j', request);
|
426
402
|
const wrappedCallback = callback
|
427
403
|
? (error, response, options, rawResponse) => {
|
@@ -429,8 +405,7 @@ class SampleQuerySetServiceClient {
|
|
429
405
|
callback(error, response, options, rawResponse); // We verified callback above.
|
430
406
|
}
|
431
407
|
: undefined;
|
432
|
-
return this.innerApiCalls
|
433
|
-
.updateSampleQuerySet(request, options, wrappedCallback)
|
408
|
+
return this.innerApiCalls.updateSampleQuerySet(request, options, wrappedCallback)
|
434
409
|
?.then(([response, options, rawResponse]) => {
|
435
410
|
this._log.info('updateSampleQuerySet response %j', response);
|
436
411
|
return [response, options, rawResponse];
|
@@ -449,13 +424,10 @@ class SampleQuerySetServiceClient {
|
|
449
424
|
options = options || {};
|
450
425
|
options.otherArgs = options.otherArgs || {};
|
451
426
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
452
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
453
|
-
|
454
|
-
name: request.name ?? '',
|
455
|
-
});
|
456
|
-
this.initialize().catch(err => {
|
457
|
-
throw err;
|
427
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
428
|
+
'name': request.name ?? '',
|
458
429
|
});
|
430
|
+
this.initialize().catch(err => { throw err; });
|
459
431
|
this._log.info('deleteSampleQuerySet request %j', request);
|
460
432
|
const wrappedCallback = callback
|
461
433
|
? (error, response, options, rawResponse) => {
|
@@ -463,8 +435,7 @@ class SampleQuerySetServiceClient {
|
|
463
435
|
callback(error, response, options, rawResponse); // We verified callback above.
|
464
436
|
}
|
465
437
|
: undefined;
|
466
|
-
return this.innerApiCalls
|
467
|
-
.deleteSampleQuerySet(request, options, wrappedCallback)
|
438
|
+
return this.innerApiCalls.deleteSampleQuerySet(request, options, wrappedCallback)
|
468
439
|
?.then(([response, options, rawResponse]) => {
|
469
440
|
this._log.info('deleteSampleQuerySet response %j', response);
|
470
441
|
return [response, options, rawResponse];
|
@@ -483,13 +454,10 @@ class SampleQuerySetServiceClient {
|
|
483
454
|
options = options || {};
|
484
455
|
options.otherArgs = options.otherArgs || {};
|
485
456
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
486
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
487
|
-
|
488
|
-
parent: request.parent ?? '',
|
489
|
-
});
|
490
|
-
this.initialize().catch(err => {
|
491
|
-
throw err;
|
457
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
458
|
+
'parent': request.parent ?? '',
|
492
459
|
});
|
460
|
+
this.initialize().catch(err => { throw err; });
|
493
461
|
const wrappedCallback = callback
|
494
462
|
? (error, values, nextPageRequest, rawResponse) => {
|
495
463
|
this._log.info('listSampleQuerySets values %j', values);
|
@@ -550,15 +518,12 @@ class SampleQuerySetServiceClient {
|
|
550
518
|
options = options || {};
|
551
519
|
options.otherArgs = options.otherArgs || {};
|
552
520
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
553
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
554
|
-
|
555
|
-
|
556
|
-
});
|
521
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
522
|
+
'parent': request.parent ?? '',
|
523
|
+
});
|
557
524
|
const defaultCallSettings = this._defaults['listSampleQuerySets'];
|
558
525
|
const callSettings = defaultCallSettings.merge(options);
|
559
|
-
this.initialize().catch(err => {
|
560
|
-
throw err;
|
561
|
-
});
|
526
|
+
this.initialize().catch(err => { throw err; });
|
562
527
|
this._log.info('listSampleQuerySets stream %j', request);
|
563
528
|
return this.descriptors.page.listSampleQuerySets.createStream(this.innerApiCalls.listSampleQuerySets, request, callSettings);
|
564
529
|
}
|
@@ -611,70 +576,67 @@ class SampleQuerySetServiceClient {
|
|
611
576
|
options = options || {};
|
612
577
|
options.otherArgs = options.otherArgs || {};
|
613
578
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
614
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
615
|
-
|
616
|
-
|
617
|
-
});
|
579
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
580
|
+
'parent': request.parent ?? '',
|
581
|
+
});
|
618
582
|
const defaultCallSettings = this._defaults['listSampleQuerySets'];
|
619
583
|
const callSettings = defaultCallSettings.merge(options);
|
620
|
-
this.initialize().catch(err => {
|
621
|
-
throw err;
|
622
|
-
});
|
584
|
+
this.initialize().catch(err => { throw err; });
|
623
585
|
this._log.info('listSampleQuerySets iterate %j', request);
|
624
586
|
return this.descriptors.page.listSampleQuerySets.asyncIterate(this.innerApiCalls['listSampleQuerySets'], request, callSettings);
|
625
587
|
}
|
626
588
|
/**
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
589
|
+
* Gets information about a location.
|
590
|
+
*
|
591
|
+
* @param {Object} request
|
592
|
+
* The request object that will be sent.
|
593
|
+
* @param {string} request.name
|
594
|
+
* Resource name for the location.
|
595
|
+
* @param {object} [options]
|
596
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
597
|
+
* @returns {Promise} - The promise which resolves to an array.
|
598
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
599
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
600
|
+
* for more details and examples.
|
601
|
+
* @example
|
602
|
+
* ```
|
603
|
+
* const [response] = await client.getLocation(request);
|
604
|
+
* ```
|
605
|
+
*/
|
644
606
|
getLocation(request, options, callback) {
|
645
607
|
return this.locationsClient.getLocation(request, options, callback);
|
646
608
|
}
|
647
609
|
/**
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
610
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
611
|
+
*
|
612
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
613
|
+
* @param {Object} request
|
614
|
+
* The request object that will be sent.
|
615
|
+
* @param {string} request.name
|
616
|
+
* The resource that owns the locations collection, if applicable.
|
617
|
+
* @param {string} request.filter
|
618
|
+
* The standard list filter.
|
619
|
+
* @param {number} request.pageSize
|
620
|
+
* The standard list page size.
|
621
|
+
* @param {string} request.pageToken
|
622
|
+
* The standard list page token.
|
623
|
+
* @param {object} [options]
|
624
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
625
|
+
* @returns {Object}
|
626
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
627
|
+
* When you iterate the returned iterable, each element will be an object representing
|
628
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
629
|
+
* so you can stop the iteration when you don't need more results.
|
630
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
631
|
+
* for more details and examples.
|
632
|
+
* @example
|
633
|
+
* ```
|
634
|
+
* const iterable = client.listLocationsAsync(request);
|
635
|
+
* for await (const response of iterable) {
|
636
|
+
* // process response
|
637
|
+
* }
|
638
|
+
* ```
|
639
|
+
*/
|
678
640
|
listLocationsAsync(request, options) {
|
679
641
|
return this.locationsClient.listLocationsAsync(request, options);
|
680
642
|
}
|
@@ -761,8 +723,7 @@ class SampleQuerySetServiceClient {
|
|
761
723
|
* @returns {string} A string representing the project.
|
762
724
|
*/
|
763
725
|
matchProjectFromEvaluationName(evaluationName) {
|
764
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
765
|
-
.project;
|
726
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
766
727
|
}
|
767
728
|
/**
|
768
729
|
* Parse the location from Evaluation resource.
|
@@ -772,8 +733,7 @@ class SampleQuerySetServiceClient {
|
|
772
733
|
* @returns {string} A string representing the location.
|
773
734
|
*/
|
774
735
|
matchLocationFromEvaluationName(evaluationName) {
|
775
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
776
|
-
.location;
|
736
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
777
737
|
}
|
778
738
|
/**
|
779
739
|
* Parse the evaluation from Evaluation resource.
|
@@ -783,8 +743,7 @@ class SampleQuerySetServiceClient {
|
|
783
743
|
* @returns {string} A string representing the evaluation.
|
784
744
|
*/
|
785
745
|
matchEvaluationFromEvaluationName(evaluationName) {
|
786
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
787
|
-
.evaluation;
|
746
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
788
747
|
}
|
789
748
|
/**
|
790
749
|
* Return a fully-qualified groundingConfig resource name string.
|
@@ -3055,8 +3014,7 @@ class SampleQuerySetServiceClient {
|
|
3055
3014
|
* @returns {string} A string representing the project.
|
3056
3015
|
*/
|
3057
3016
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3058
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3059
|
-
.project;
|
3017
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3060
3018
|
}
|
3061
3019
|
/**
|
3062
3020
|
* Parse the location from SampleQuery resource.
|
@@ -3066,8 +3024,7 @@ class SampleQuerySetServiceClient {
|
|
3066
3024
|
* @returns {string} A string representing the location.
|
3067
3025
|
*/
|
3068
3026
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3069
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3070
|
-
.location;
|
3027
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3071
3028
|
}
|
3072
3029
|
/**
|
3073
3030
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3077,8 +3034,7 @@ class SampleQuerySetServiceClient {
|
|
3077
3034
|
* @returns {string} A string representing the sample_query_set.
|
3078
3035
|
*/
|
3079
3036
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3080
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3081
|
-
.sample_query_set;
|
3037
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3082
3038
|
}
|
3083
3039
|
/**
|
3084
3040
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3088,8 +3044,7 @@ class SampleQuerySetServiceClient {
|
|
3088
3044
|
* @returns {string} A string representing the sample_query.
|
3089
3045
|
*/
|
3090
3046
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3091
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3092
|
-
.sample_query;
|
3047
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3093
3048
|
}
|
3094
3049
|
/**
|
3095
3050
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3148,7 +3103,7 @@ class SampleQuerySetServiceClient {
|
|
3148
3103
|
this._log.info('ending gRPC channel');
|
3149
3104
|
this._terminated = true;
|
3150
3105
|
stub.close();
|
3151
|
-
this.locationsClient.close();
|
3106
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3152
3107
|
});
|
3153
3108
|
}
|
3154
3109
|
return Promise.resolve();
|