@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.
Files changed (167) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +7 -2
  3. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
  5. package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
  6. package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
  7. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
  8. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
  9. package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
  10. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
  12. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
  13. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
  14. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
  15. package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
  16. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
  17. package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
  19. package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
  21. package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
  22. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
  23. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
  24. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
  25. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
  26. package/build/protos/protos.d.ts +4390 -300
  27. package/build/protos/protos.js +13785 -2922
  28. package/build/protos/protos.json +1355 -14
  29. package/build/src/index.d.ts +4 -1
  30. package/build/src/index.js +4 -21
  31. package/build/src/v1/completion_service_client.d.ts +313 -76
  32. package/build/src/v1/completion_service_client.js +451 -262
  33. package/build/src/v1/completion_service_proto_list.json +3 -0
  34. package/build/src/v1/control_service_client.d.ts +318 -81
  35. package/build/src/v1/control_service_client.js +422 -132
  36. package/build/src/v1/control_service_proto_list.json +3 -0
  37. package/build/src/v1/conversational_search_service_client.d.ts +341 -134
  38. package/build/src/v1/conversational_search_service_client.js +395 -223
  39. package/build/src/v1/conversational_search_service_client_config.json +5 -0
  40. package/build/src/v1/conversational_search_service_proto_list.json +3 -0
  41. package/build/src/v1/data_store_service_client.d.ts +359 -122
  42. package/build/src/v1/data_store_service_client.js +460 -280
  43. package/build/src/v1/data_store_service_proto_list.json +3 -0
  44. package/build/src/v1/document_service_client.d.ts +364 -121
  45. package/build/src/v1/document_service_client.js +469 -300
  46. package/build/src/v1/document_service_proto_list.json +3 -0
  47. package/build/src/v1/engine_service_client.d.ts +340 -103
  48. package/build/src/v1/engine_service_client.js +460 -279
  49. package/build/src/v1/engine_service_proto_list.json +3 -0
  50. package/build/src/v1/gapic_metadata.json +59 -0
  51. package/build/src/v1/grounded_generation_service_client.d.ts +286 -51
  52. package/build/src/v1/grounded_generation_service_client.js +405 -100
  53. package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
  54. package/build/src/v1/index.d.ts +1 -0
  55. package/build/src/v1/index.js +3 -1
  56. package/build/src/v1/project_service_client.d.ts +313 -76
  57. package/build/src/v1/project_service_client.js +434 -222
  58. package/build/src/v1/project_service_proto_list.json +3 -0
  59. package/build/src/v1/rank_service_client.d.ts +285 -48
  60. package/build/src/v1/rank_service_client.js +398 -85
  61. package/build/src/v1/rank_service_proto_list.json +3 -0
  62. package/build/src/v1/recommendation_service_client.d.ts +142 -49
  63. package/build/src/v1/recommendation_service_client.js +198 -82
  64. package/build/src/v1/recommendation_service_proto_list.json +3 -0
  65. package/build/src/v1/schema_service_client.d.ts +348 -111
  66. package/build/src/v1/schema_service_client.js +457 -273
  67. package/build/src/v1/schema_service_proto_list.json +3 -0
  68. package/build/src/v1/search_service_client.d.ts +748 -559
  69. package/build/src/v1/search_service_client.js +302 -133
  70. package/build/src/v1/search_service_proto_list.json +3 -0
  71. package/build/src/v1/search_tuning_service_client.d.ts +314 -77
  72. package/build/src/v1/search_tuning_service_client.js +439 -235
  73. package/build/src/v1/search_tuning_service_proto_list.json +3 -0
  74. package/build/src/v1/serving_config_service_client.d.ts +1851 -0
  75. package/build/src/v1/serving_config_service_client.js +2642 -0
  76. package/build/src/v1/serving_config_service_client_config.json +30 -0
  77. package/build/src/v1/serving_config_service_proto_list.json +39 -0
  78. package/build/src/v1/site_search_engine_service_client.d.ts +504 -151
  79. package/build/src/v1/site_search_engine_service_client.js +625 -351
  80. package/build/src/v1/site_search_engine_service_client_config.json +12 -0
  81. package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
  82. package/build/src/v1/user_event_service_client.d.ts +335 -86
  83. package/build/src/v1/user_event_service_client.js +447 -253
  84. package/build/src/v1/user_event_service_proto_list.json +3 -0
  85. package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
  86. package/build/src/v1alpha/acl_config_service_client.js +82 -106
  87. package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
  88. package/build/src/v1alpha/chunk_service_client.js +92 -120
  89. package/build/src/v1alpha/completion_service_client.d.ts +77 -77
  90. package/build/src/v1alpha/completion_service_client.js +134 -280
  91. package/build/src/v1alpha/control_service_client.d.ts +85 -85
  92. package/build/src/v1alpha/control_service_client.js +105 -151
  93. package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
  94. package/build/src/v1alpha/conversational_search_service_client.js +145 -237
  95. package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
  96. package/build/src/v1alpha/data_store_service_client.js +151 -316
  97. package/build/src/v1alpha/document_service_client.d.ts +126 -126
  98. package/build/src/v1alpha/document_service_client.js +156 -328
  99. package/build/src/v1alpha/engine_service_client.d.ts +106 -106
  100. package/build/src/v1alpha/engine_service_client.js +155 -325
  101. package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
  102. package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
  103. package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
  104. package/build/src/v1alpha/evaluation_service_client.js +143 -295
  105. package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
  106. package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
  107. package/build/src/v1alpha/project_service_client.d.ts +78 -78
  108. package/build/src/v1alpha/project_service_client.js +126 -262
  109. package/build/src/v1alpha/rank_service_client.d.ts +47 -47
  110. package/build/src/v1alpha/rank_service_client.js +81 -104
  111. package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
  112. package/build/src/v1alpha/recommendation_service_client.js +79 -100
  113. package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
  114. package/build/src/v1alpha/sample_query_service_client.js +144 -301
  115. package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
  116. package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
  117. package/build/src/v1alpha/schema_service_client.d.ts +112 -112
  118. package/build/src/v1alpha/schema_service_client.js +140 -292
  119. package/build/src/v1alpha/search_service_client.d.ts +327 -327
  120. package/build/src/v1alpha/search_service_client.js +88 -112
  121. package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
  122. package/build/src/v1alpha/search_tuning_service_client.js +122 -253
  123. package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
  124. package/build/src/v1alpha/serving_config_service_client.js +97 -133
  125. package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
  126. package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
  127. package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
  128. package/build/src/v1alpha/user_event_service_client.js +130 -271
  129. package/build/src/v1beta/completion_service_client.d.ts +78 -78
  130. package/build/src/v1beta/completion_service_client.js +136 -279
  131. package/build/src/v1beta/control_service_client.d.ts +84 -84
  132. package/build/src/v1beta/control_service_client.js +103 -147
  133. package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
  134. package/build/src/v1beta/conversational_search_service_client.js +143 -233
  135. package/build/src/v1beta/data_store_service_client.d.ts +124 -124
  136. package/build/src/v1beta/data_store_service_client.js +141 -288
  137. package/build/src/v1beta/document_service_client.d.ts +124 -124
  138. package/build/src/v1beta/document_service_client.js +150 -309
  139. package/build/src/v1beta/engine_service_client.d.ts +106 -106
  140. package/build/src/v1beta/engine_service_client.js +153 -315
  141. package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
  142. package/build/src/v1beta/evaluation_service_client.js +141 -285
  143. package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
  144. package/build/src/v1beta/grounded_generation_service_client.js +86 -114
  145. package/build/src/v1beta/project_service_client.d.ts +76 -76
  146. package/build/src/v1beta/project_service_client.js +115 -231
  147. package/build/src/v1beta/rank_service_client.d.ts +47 -47
  148. package/build/src/v1beta/rank_service_client.js +79 -99
  149. package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
  150. package/build/src/v1beta/recommendation_service_client.js +77 -96
  151. package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
  152. package/build/src/v1beta/sample_query_service_client.js +142 -291
  153. package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
  154. package/build/src/v1beta/sample_query_set_service_client.js +104 -149
  155. package/build/src/v1beta/schema_service_client.d.ts +111 -111
  156. package/build/src/v1beta/schema_service_client.js +138 -282
  157. package/build/src/v1beta/search_service_client.d.ts +665 -665
  158. package/build/src/v1beta/search_service_client.js +97 -128
  159. package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
  160. package/build/src/v1beta/search_tuning_service_client.js +120 -243
  161. package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
  162. package/build/src/v1beta/serving_config_service_client.js +95 -129
  163. package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
  164. package/build/src/v1beta/site_search_engine_service_client.js +186 -386
  165. package/build/src/v1beta/user_event_service_client.d.ts +78 -78
  166. package/build/src/v1beta/user_event_service_client.js +128 -261
  167. 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
- .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
  }
@@ -213,7 +206,7 @@ class SampleQuerySetServiceClient {
213
206
  // (e.g. 50 results at a time, with tokens to get subsequent
214
207
  // pages). Denote the keys used for pagination and results.
215
208
  this.descriptors.page = {
216
- listSampleQuerySets: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQuerySets'),
209
+ listSampleQuerySets: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQuerySets')
217
210
  };
218
211
  // Put together the default options sent with requests.
219
212
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.SampleQuerySetService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -242,20 +235,13 @@ class SampleQuerySetServiceClient {
242
235
  }
243
236
  // Put together the "service stub" for
244
237
  // google.cloud.discoveryengine.v1alpha.SampleQuerySetService.
245
- this.sampleQuerySetServiceStub = this._gaxGrpc.createStub(this._opts.fallback
246
- ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SampleQuerySetService')
247
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
248
- this._protos.google.cloud.discoveryengine.v1alpha
249
- .SampleQuerySetService, this._opts, this._providedCustomServicePath);
238
+ this.sampleQuerySetServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
239
+ this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SampleQuerySetService') :
240
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
241
+ this._protos.google.cloud.discoveryengine.v1alpha.SampleQuerySetService, this._opts, this._providedCustomServicePath);
250
242
  // Iterate over each of the methods that the service provides
251
243
  // and create an API call method for each.
252
- const sampleQuerySetServiceStubMethods = [
253
- 'getSampleQuerySet',
254
- 'listSampleQuerySets',
255
- 'createSampleQuerySet',
256
- 'updateSampleQuerySet',
257
- 'deleteSampleQuerySet',
258
- ];
244
+ const sampleQuerySetServiceStubMethods = ['getSampleQuerySet', 'listSampleQuerySets', 'createSampleQuerySet', 'updateSampleQuerySet', 'deleteSampleQuerySet'];
259
245
  for (const methodName of sampleQuerySetServiceStubMethods) {
260
246
  const callPromise = this.sampleQuerySetServiceStub.then(stub => (...args) => {
261
247
  if (this._terminated) {
@@ -266,7 +252,8 @@ class SampleQuerySetServiceClient {
266
252
  }, (err) => () => {
267
253
  throw err;
268
254
  });
269
- const descriptor = this.descriptors.page[methodName] || undefined;
255
+ const descriptor = this.descriptors.page[methodName] ||
256
+ undefined;
270
257
  const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
271
258
  this.innerApiCalls[methodName] = apiCall;
272
259
  }
@@ -278,8 +265,7 @@ class SampleQuerySetServiceClient {
278
265
  * @returns {string} The DNS address for this service.
279
266
  */
280
267
  static get servicePath() {
281
- if (typeof process === 'object' &&
282
- typeof process.emitWarning === 'function') {
268
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
283
269
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
284
270
  }
285
271
  return 'discoveryengine.googleapis.com';
@@ -290,8 +276,7 @@ class SampleQuerySetServiceClient {
290
276
  * @returns {string} The DNS address for this service.
291
277
  */
292
278
  static get apiEndpoint() {
293
- if (typeof process === 'object' &&
294
- typeof process.emitWarning === 'function') {
279
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
295
280
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
296
281
  }
297
282
  return 'discoveryengine.googleapis.com';
@@ -319,7 +304,9 @@ class SampleQuerySetServiceClient {
319
304
  * @returns {string[]} List of default scopes.
320
305
  */
321
306
  static get scopes() {
322
- return ['https://www.googleapis.com/auth/cloud-platform'];
307
+ return [
308
+ 'https://www.googleapis.com/auth/cloud-platform'
309
+ ];
323
310
  }
324
311
  /**
325
312
  * Return the project ID used by this class.
@@ -345,13 +332,10 @@ class SampleQuerySetServiceClient {
345
332
  options = options || {};
346
333
  options.otherArgs = options.otherArgs || {};
347
334
  options.otherArgs.headers = options.otherArgs.headers || {};
348
- options.otherArgs.headers['x-goog-request-params'] =
349
- this._gaxModule.routingHeader.fromParams({
350
- name: request.name ?? '',
351
- });
352
- this.initialize().catch(err => {
353
- throw err;
335
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
336
+ 'name': request.name ?? '',
354
337
  });
338
+ this.initialize().catch(err => { throw err; });
355
339
  this._log.info('getSampleQuerySet request %j', request);
356
340
  const wrappedCallback = callback
357
341
  ? (error, response, options, rawResponse) => {
@@ -359,8 +343,7 @@ class SampleQuerySetServiceClient {
359
343
  callback(error, response, options, rawResponse); // We verified callback above.
360
344
  }
361
345
  : undefined;
362
- return this.innerApiCalls
363
- .getSampleQuerySet(request, options, wrappedCallback)
346
+ return this.innerApiCalls.getSampleQuerySet(request, options, wrappedCallback)
364
347
  ?.then(([response, options, rawResponse]) => {
365
348
  this._log.info('getSampleQuerySet response %j', response);
366
349
  return [response, options, rawResponse];
@@ -379,13 +362,10 @@ class SampleQuerySetServiceClient {
379
362
  options = options || {};
380
363
  options.otherArgs = options.otherArgs || {};
381
364
  options.otherArgs.headers = options.otherArgs.headers || {};
382
- options.otherArgs.headers['x-goog-request-params'] =
383
- this._gaxModule.routingHeader.fromParams({
384
- parent: request.parent ?? '',
385
- });
386
- this.initialize().catch(err => {
387
- throw err;
365
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
366
+ 'parent': request.parent ?? '',
388
367
  });
368
+ this.initialize().catch(err => { throw err; });
389
369
  this._log.info('createSampleQuerySet request %j', request);
390
370
  const wrappedCallback = callback
391
371
  ? (error, response, options, rawResponse) => {
@@ -393,8 +373,7 @@ class SampleQuerySetServiceClient {
393
373
  callback(error, response, options, rawResponse); // We verified callback above.
394
374
  }
395
375
  : undefined;
396
- return this.innerApiCalls
397
- .createSampleQuerySet(request, options, wrappedCallback)
376
+ return this.innerApiCalls.createSampleQuerySet(request, options, wrappedCallback)
398
377
  ?.then(([response, options, rawResponse]) => {
399
378
  this._log.info('createSampleQuerySet response %j', response);
400
379
  return [response, options, rawResponse];
@@ -413,13 +392,10 @@ class SampleQuerySetServiceClient {
413
392
  options = options || {};
414
393
  options.otherArgs = options.otherArgs || {};
415
394
  options.otherArgs.headers = options.otherArgs.headers || {};
416
- options.otherArgs.headers['x-goog-request-params'] =
417
- this._gaxModule.routingHeader.fromParams({
418
- 'sample_query_set.name': request.sampleQuerySet.name ?? '',
419
- });
420
- this.initialize().catch(err => {
421
- throw err;
395
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
396
+ 'sample_query_set.name': request.sampleQuerySet.name ?? '',
422
397
  });
398
+ this.initialize().catch(err => { throw err; });
423
399
  this._log.info('updateSampleQuerySet request %j', request);
424
400
  const wrappedCallback = callback
425
401
  ? (error, response, options, rawResponse) => {
@@ -427,8 +403,7 @@ class SampleQuerySetServiceClient {
427
403
  callback(error, response, options, rawResponse); // We verified callback above.
428
404
  }
429
405
  : undefined;
430
- return this.innerApiCalls
431
- .updateSampleQuerySet(request, options, wrappedCallback)
406
+ return this.innerApiCalls.updateSampleQuerySet(request, options, wrappedCallback)
432
407
  ?.then(([response, options, rawResponse]) => {
433
408
  this._log.info('updateSampleQuerySet response %j', response);
434
409
  return [response, options, rawResponse];
@@ -447,13 +422,10 @@ class SampleQuerySetServiceClient {
447
422
  options = options || {};
448
423
  options.otherArgs = options.otherArgs || {};
449
424
  options.otherArgs.headers = options.otherArgs.headers || {};
450
- options.otherArgs.headers['x-goog-request-params'] =
451
- this._gaxModule.routingHeader.fromParams({
452
- name: request.name ?? '',
453
- });
454
- this.initialize().catch(err => {
455
- throw err;
425
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
426
+ 'name': request.name ?? '',
456
427
  });
428
+ this.initialize().catch(err => { throw err; });
457
429
  this._log.info('deleteSampleQuerySet request %j', request);
458
430
  const wrappedCallback = callback
459
431
  ? (error, response, options, rawResponse) => {
@@ -461,8 +433,7 @@ class SampleQuerySetServiceClient {
461
433
  callback(error, response, options, rawResponse); // We verified callback above.
462
434
  }
463
435
  : undefined;
464
- return this.innerApiCalls
465
- .deleteSampleQuerySet(request, options, wrappedCallback)
436
+ return this.innerApiCalls.deleteSampleQuerySet(request, options, wrappedCallback)
466
437
  ?.then(([response, options, rawResponse]) => {
467
438
  this._log.info('deleteSampleQuerySet response %j', response);
468
439
  return [response, options, rawResponse];
@@ -481,13 +452,10 @@ class SampleQuerySetServiceClient {
481
452
  options = options || {};
482
453
  options.otherArgs = options.otherArgs || {};
483
454
  options.otherArgs.headers = options.otherArgs.headers || {};
484
- options.otherArgs.headers['x-goog-request-params'] =
485
- this._gaxModule.routingHeader.fromParams({
486
- parent: request.parent ?? '',
487
- });
488
- this.initialize().catch(err => {
489
- throw err;
455
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
456
+ 'parent': request.parent ?? '',
490
457
  });
458
+ this.initialize().catch(err => { throw err; });
491
459
  const wrappedCallback = callback
492
460
  ? (error, values, nextPageRequest, rawResponse) => {
493
461
  this._log.info('listSampleQuerySets values %j', values);
@@ -548,15 +516,12 @@ class SampleQuerySetServiceClient {
548
516
  options = options || {};
549
517
  options.otherArgs = options.otherArgs || {};
550
518
  options.otherArgs.headers = options.otherArgs.headers || {};
551
- options.otherArgs.headers['x-goog-request-params'] =
552
- this._gaxModule.routingHeader.fromParams({
553
- parent: request.parent ?? '',
554
- });
519
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
520
+ 'parent': request.parent ?? '',
521
+ });
555
522
  const defaultCallSettings = this._defaults['listSampleQuerySets'];
556
523
  const callSettings = defaultCallSettings.merge(options);
557
- this.initialize().catch(err => {
558
- throw err;
559
- });
524
+ this.initialize().catch(err => { throw err; });
560
525
  this._log.info('listSampleQuerySets stream %j', request);
561
526
  return this.descriptors.page.listSampleQuerySets.createStream(this.innerApiCalls.listSampleQuerySets, request, callSettings);
562
527
  }
@@ -609,70 +574,67 @@ class SampleQuerySetServiceClient {
609
574
  options = options || {};
610
575
  options.otherArgs = options.otherArgs || {};
611
576
  options.otherArgs.headers = options.otherArgs.headers || {};
612
- options.otherArgs.headers['x-goog-request-params'] =
613
- this._gaxModule.routingHeader.fromParams({
614
- parent: request.parent ?? '',
615
- });
577
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
578
+ 'parent': request.parent ?? '',
579
+ });
616
580
  const defaultCallSettings = this._defaults['listSampleQuerySets'];
617
581
  const callSettings = defaultCallSettings.merge(options);
618
- this.initialize().catch(err => {
619
- throw err;
620
- });
582
+ this.initialize().catch(err => { throw err; });
621
583
  this._log.info('listSampleQuerySets iterate %j', request);
622
584
  return this.descriptors.page.listSampleQuerySets.asyncIterate(this.innerApiCalls['listSampleQuerySets'], request, callSettings);
623
585
  }
624
586
  /**
625
- * Gets information about a location.
626
- *
627
- * @param {Object} request
628
- * The request object that will be sent.
629
- * @param {string} request.name
630
- * Resource name for the location.
631
- * @param {object} [options]
632
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
633
- * @returns {Promise} - The promise which resolves to an array.
634
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
635
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
636
- * for more details and examples.
637
- * @example
638
- * ```
639
- * const [response] = await client.getLocation(request);
640
- * ```
641
- */
587
+ * Gets information about a location.
588
+ *
589
+ * @param {Object} request
590
+ * The request object that will be sent.
591
+ * @param {string} request.name
592
+ * Resource name for the location.
593
+ * @param {object} [options]
594
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
595
+ * @returns {Promise} - The promise which resolves to an array.
596
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
597
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
598
+ * for more details and examples.
599
+ * @example
600
+ * ```
601
+ * const [response] = await client.getLocation(request);
602
+ * ```
603
+ */
642
604
  getLocation(request, options, callback) {
643
605
  return this.locationsClient.getLocation(request, options, callback);
644
606
  }
645
607
  /**
646
- * Lists information about the supported locations for this service. Returns an iterable object.
647
- *
648
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
649
- * @param {Object} request
650
- * The request object that will be sent.
651
- * @param {string} request.name
652
- * The resource that owns the locations collection, if applicable.
653
- * @param {string} request.filter
654
- * The standard list filter.
655
- * @param {number} request.pageSize
656
- * The standard list page size.
657
- * @param {string} request.pageToken
658
- * The standard list page token.
659
- * @param {object} [options]
660
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
661
- * @returns {Object}
662
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
663
- * When you iterate the returned iterable, each element will be an object representing
664
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
665
- * so you can stop the iteration when you don't need more results.
666
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
667
- * for more details and examples.
668
- * @example
669
- * ```
670
- * const iterable = client.listLocationsAsync(request);
671
- * for await (const response of iterable) {
672
- * // process response
673
- * }
674
- * ```
675
- */
608
+ * Lists information about the supported locations for this service. Returns an iterable object.
609
+ *
610
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
611
+ * @param {Object} request
612
+ * The request object that will be sent.
613
+ * @param {string} request.name
614
+ * The resource that owns the locations collection, if applicable.
615
+ * @param {string} request.filter
616
+ * The standard list filter.
617
+ * @param {number} request.pageSize
618
+ * The standard list page size.
619
+ * @param {string} request.pageToken
620
+ * The standard list page token.
621
+ * @param {object} [options]
622
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
623
+ * @returns {Object}
624
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
625
+ * When you iterate the returned iterable, each element will be an object representing
626
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
627
+ * so you can stop the iteration when you don't need more results.
628
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
629
+ * for more details and examples.
630
+ * @example
631
+ * ```
632
+ * const iterable = client.listLocationsAsync(request);
633
+ * for await (const response of iterable) {
634
+ * // process response
635
+ * }
636
+ * ```
637
+ */
676
638
  listLocationsAsync(request, options) {
677
639
  return this.locationsClient.listLocationsAsync(request, options);
678
640
  }
@@ -700,8 +662,7 @@ class SampleQuerySetServiceClient {
700
662
  * @returns {string} A string representing the project.
701
663
  */
702
664
  matchProjectFromAclConfigName(aclConfigName) {
703
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
704
- .project;
665
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
705
666
  }
706
667
  /**
707
668
  * Parse the location from AclConfig resource.
@@ -711,8 +672,7 @@ class SampleQuerySetServiceClient {
711
672
  * @returns {string} A string representing the location.
712
673
  */
713
674
  matchLocationFromAclConfigName(aclConfigName) {
714
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
715
- .location;
675
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
716
676
  }
717
677
  /**
718
678
  * Return a fully-qualified engine resource name string.
@@ -794,8 +754,7 @@ class SampleQuerySetServiceClient {
794
754
  * @returns {string} A string representing the project.
795
755
  */
796
756
  matchProjectFromEvaluationName(evaluationName) {
797
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
798
- .project;
757
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
799
758
  }
800
759
  /**
801
760
  * Parse the location from Evaluation resource.
@@ -805,8 +764,7 @@ class SampleQuerySetServiceClient {
805
764
  * @returns {string} A string representing the location.
806
765
  */
807
766
  matchLocationFromEvaluationName(evaluationName) {
808
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
809
- .location;
767
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
810
768
  }
811
769
  /**
812
770
  * Parse the evaluation from Evaluation resource.
@@ -816,8 +774,7 @@ class SampleQuerySetServiceClient {
816
774
  * @returns {string} A string representing the evaluation.
817
775
  */
818
776
  matchEvaluationFromEvaluationName(evaluationName) {
819
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
820
- .evaluation;
777
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
821
778
  }
822
779
  /**
823
780
  * Return a fully-qualified location resource name string.
@@ -2917,8 +2874,7 @@ class SampleQuerySetServiceClient {
2917
2874
  * @returns {string} A string representing the project.
2918
2875
  */
2919
2876
  matchProjectFromSampleQueryName(sampleQueryName) {
2920
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
2921
- .project;
2877
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
2922
2878
  }
2923
2879
  /**
2924
2880
  * Parse the location from SampleQuery resource.
@@ -2928,8 +2884,7 @@ class SampleQuerySetServiceClient {
2928
2884
  * @returns {string} A string representing the location.
2929
2885
  */
2930
2886
  matchLocationFromSampleQueryName(sampleQueryName) {
2931
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
2932
- .location;
2887
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
2933
2888
  }
2934
2889
  /**
2935
2890
  * Parse the sample_query_set from SampleQuery resource.
@@ -2939,8 +2894,7 @@ class SampleQuerySetServiceClient {
2939
2894
  * @returns {string} A string representing the sample_query_set.
2940
2895
  */
2941
2896
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
2942
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
2943
- .sample_query_set;
2897
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
2944
2898
  }
2945
2899
  /**
2946
2900
  * Parse the sample_query from SampleQuery resource.
@@ -2950,8 +2904,7 @@ class SampleQuerySetServiceClient {
2950
2904
  * @returns {string} A string representing the sample_query.
2951
2905
  */
2952
2906
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
2953
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
2954
- .sample_query;
2907
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
2955
2908
  }
2956
2909
  /**
2957
2910
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -3010,7 +2963,7 @@ class SampleQuerySetServiceClient {
3010
2963
  this._log.info('ending gRPC channel');
3011
2964
  this._terminated = true;
3012
2965
  stub.close();
3013
- this.locationsClient.close();
2966
+ this.locationsClient.close().catch(err => { throw err; });
3014
2967
  });
3015
2968
  }
3016
2969
  return Promise.resolve();