@google-cloud/discoveryengine 2.1.0 → 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.
Files changed (121) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/protos/protos.d.ts +31 -316
  3. package/build/protos/protos.js +146 -593
  4. package/build/protos/protos.json +25 -1
  5. package/build/src/index.d.ts +1 -1
  6. package/build/src/index.js +1 -21
  7. package/build/src/v1/completion_service_client.d.ts +76 -76
  8. package/build/src/v1/completion_service_client.js +125 -262
  9. package/build/src/v1/control_service_client.d.ts +81 -81
  10. package/build/src/v1/control_service_client.js +96 -132
  11. package/build/src/v1/conversational_search_service_client.d.ts +143 -143
  12. package/build/src/v1/conversational_search_service_client.js +138 -226
  13. package/build/src/v1/data_store_service_client.d.ts +122 -122
  14. package/build/src/v1/data_store_service_client.js +134 -280
  15. package/build/src/v1/document_service_client.d.ts +120 -120
  16. package/build/src/v1/document_service_client.js +143 -300
  17. package/build/src/v1/engine_service_client.d.ts +103 -103
  18. package/build/src/v1/engine_service_client.js +134 -279
  19. package/build/src/v1/grounded_generation_service_client.d.ts +48 -48
  20. package/build/src/v1/grounded_generation_service_client.js +79 -100
  21. package/build/src/v1/project_service_client.d.ts +76 -76
  22. package/build/src/v1/project_service_client.js +108 -222
  23. package/build/src/v1/rank_service_client.d.ts +47 -47
  24. package/build/src/v1/rank_service_client.js +72 -85
  25. package/build/src/v1/recommendation_service_client.d.ts +47 -47
  26. package/build/src/v1/recommendation_service_client.js +70 -82
  27. package/build/src/v1/schema_service_client.d.ts +111 -111
  28. package/build/src/v1/schema_service_client.js +131 -273
  29. package/build/src/v1/search_service_client.d.ts +545 -545
  30. package/build/src/v1/search_service_client.js +90 -113
  31. package/build/src/v1/search_tuning_service_client.d.ts +77 -77
  32. package/build/src/v1/search_tuning_service_client.js +113 -235
  33. package/build/src/v1/serving_config_service_client.d.ts +48 -48
  34. package/build/src/v1/serving_config_service_client.js +69 -80
  35. package/build/src/v1/site_search_engine_service_client.d.ts +148 -148
  36. package/build/src/v1/site_search_engine_service_client.js +179 -378
  37. package/build/src/v1/user_event_service_client.d.ts +77 -77
  38. package/build/src/v1/user_event_service_client.js +121 -253
  39. package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
  40. package/build/src/v1alpha/acl_config_service_client.js +82 -106
  41. package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
  42. package/build/src/v1alpha/chunk_service_client.js +92 -120
  43. package/build/src/v1alpha/completion_service_client.d.ts +77 -77
  44. package/build/src/v1alpha/completion_service_client.js +134 -280
  45. package/build/src/v1alpha/control_service_client.d.ts +85 -85
  46. package/build/src/v1alpha/control_service_client.js +105 -151
  47. package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
  48. package/build/src/v1alpha/conversational_search_service_client.js +145 -237
  49. package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
  50. package/build/src/v1alpha/data_store_service_client.js +151 -316
  51. package/build/src/v1alpha/document_service_client.d.ts +126 -126
  52. package/build/src/v1alpha/document_service_client.js +156 -328
  53. package/build/src/v1alpha/engine_service_client.d.ts +106 -106
  54. package/build/src/v1alpha/engine_service_client.js +155 -325
  55. package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
  56. package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
  57. package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
  58. package/build/src/v1alpha/evaluation_service_client.js +143 -295
  59. package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
  60. package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
  61. package/build/src/v1alpha/project_service_client.d.ts +78 -78
  62. package/build/src/v1alpha/project_service_client.js +126 -262
  63. package/build/src/v1alpha/rank_service_client.d.ts +47 -47
  64. package/build/src/v1alpha/rank_service_client.js +81 -104
  65. package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
  66. package/build/src/v1alpha/recommendation_service_client.js +79 -100
  67. package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
  68. package/build/src/v1alpha/sample_query_service_client.js +144 -301
  69. package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
  70. package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
  71. package/build/src/v1alpha/schema_service_client.d.ts +112 -112
  72. package/build/src/v1alpha/schema_service_client.js +140 -292
  73. package/build/src/v1alpha/search_service_client.d.ts +327 -327
  74. package/build/src/v1alpha/search_service_client.js +88 -112
  75. package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
  76. package/build/src/v1alpha/search_tuning_service_client.js +122 -253
  77. package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
  78. package/build/src/v1alpha/serving_config_service_client.js +97 -133
  79. package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
  80. package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
  81. package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
  82. package/build/src/v1alpha/user_event_service_client.js +130 -271
  83. package/build/src/v1beta/completion_service_client.d.ts +78 -78
  84. package/build/src/v1beta/completion_service_client.js +136 -279
  85. package/build/src/v1beta/control_service_client.d.ts +84 -84
  86. package/build/src/v1beta/control_service_client.js +103 -147
  87. package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
  88. package/build/src/v1beta/conversational_search_service_client.js +143 -233
  89. package/build/src/v1beta/data_store_service_client.d.ts +124 -124
  90. package/build/src/v1beta/data_store_service_client.js +141 -288
  91. package/build/src/v1beta/document_service_client.d.ts +124 -124
  92. package/build/src/v1beta/document_service_client.js +150 -309
  93. package/build/src/v1beta/engine_service_client.d.ts +106 -106
  94. package/build/src/v1beta/engine_service_client.js +153 -315
  95. package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
  96. package/build/src/v1beta/evaluation_service_client.js +141 -285
  97. package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
  98. package/build/src/v1beta/grounded_generation_service_client.js +86 -114
  99. package/build/src/v1beta/project_service_client.d.ts +76 -76
  100. package/build/src/v1beta/project_service_client.js +115 -231
  101. package/build/src/v1beta/rank_service_client.d.ts +47 -47
  102. package/build/src/v1beta/rank_service_client.js +79 -99
  103. package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
  104. package/build/src/v1beta/recommendation_service_client.js +77 -96
  105. package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
  106. package/build/src/v1beta/sample_query_service_client.js +142 -291
  107. package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
  108. package/build/src/v1beta/sample_query_set_service_client.js +104 -149
  109. package/build/src/v1beta/schema_service_client.d.ts +111 -111
  110. package/build/src/v1beta/schema_service_client.js +138 -282
  111. package/build/src/v1beta/search_service_client.d.ts +665 -665
  112. package/build/src/v1beta/search_service_client.js +97 -128
  113. package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
  114. package/build/src/v1beta/search_tuning_service_client.js +120 -243
  115. package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
  116. package/build/src/v1beta/serving_config_service_client.js +95 -129
  117. package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
  118. package/build/src/v1beta/site_search_engine_service_client.js +186 -386
  119. package/build/src/v1beta/user_event_service_client.d.ts +78 -78
  120. package/build/src/v1beta/user_event_service_client.js +128 -261
  121. package/package.json +1 -1
@@ -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
- .constructor;
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
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
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 = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
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
- ? this._protos.lookupService('google.cloud.discoveryengine.v1beta.SampleQuerySetService')
249
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
250
- this._protos.google.cloud.discoveryengine.v1beta
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] || undefined;
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 ['https://www.googleapis.com/auth/cloud-platform'];
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
- this._gaxModule.routingHeader.fromParams({
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
- this._gaxModule.routingHeader.fromParams({
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
- this._gaxModule.routingHeader.fromParams({
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
- this._gaxModule.routingHeader.fromParams({
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
- this._gaxModule.routingHeader.fromParams({
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
- this._gaxModule.routingHeader.fromParams({
555
- parent: request.parent ?? '',
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
- this._gaxModule.routingHeader.fromParams({
616
- parent: request.parent ?? '',
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
- * Gets information about a location.
628
- *
629
- * @param {Object} request
630
- * The request object that will be sent.
631
- * @param {string} request.name
632
- * Resource name for the location.
633
- * @param {object} [options]
634
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
635
- * @returns {Promise} - The promise which resolves to an array.
636
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
637
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
638
- * for more details and examples.
639
- * @example
640
- * ```
641
- * const [response] = await client.getLocation(request);
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
- * Lists information about the supported locations for this service. Returns an iterable object.
649
- *
650
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
651
- * @param {Object} request
652
- * The request object that will be sent.
653
- * @param {string} request.name
654
- * The resource that owns the locations collection, if applicable.
655
- * @param {string} request.filter
656
- * The standard list filter.
657
- * @param {number} request.pageSize
658
- * The standard list page size.
659
- * @param {string} request.pageToken
660
- * The standard list page token.
661
- * @param {object} [options]
662
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
663
- * @returns {Object}
664
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
665
- * When you iterate the returned iterable, each element will be an object representing
666
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
667
- * so you can stop the iteration when you don't need more results.
668
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
669
- * for more details and examples.
670
- * @example
671
- * ```
672
- * const iterable = client.listLocationsAsync(request);
673
- * for await (const response of iterable) {
674
- * // process response
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();