@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
@@ -96,28 +96,18 @@ class ConversationalSearchServiceClient {
96
96
  */
97
97
  constructor(opts, gaxInstance) {
98
98
  // Ensure that options include all the required fields.
99
- const staticMembers = this
100
- .constructor;
101
- if (opts?.universe_domain &&
102
- opts?.universeDomain &&
103
- opts?.universe_domain !== opts?.universeDomain) {
99
+ const staticMembers = this.constructor;
100
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
104
101
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
105
102
  }
106
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
107
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
108
- : undefined;
109
- this._universeDomain =
110
- opts?.universeDomain ??
111
- opts?.universe_domain ??
112
- universeDomainEnvVar ??
113
- 'googleapis.com';
103
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
104
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
114
105
  this._servicePath = 'discoveryengine.' + this._universeDomain;
115
106
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
116
107
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
117
108
  const port = opts?.port || staticMembers.port;
118
109
  const clientConfig = opts?.clientConfig ?? {};
119
- const fallback = opts?.fallback ??
120
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
110
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
121
111
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
122
112
  // Request numeric enum values if REST transport is used.
123
113
  opts.numericEnums = true;
@@ -147,7 +137,10 @@ class ConversationalSearchServiceClient {
147
137
  }
148
138
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
149
139
  // Determine the client header string.
150
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
140
+ const clientHeader = [
141
+ `gax/${this._gaxModule.version}`,
142
+ `gapic/${version}`,
143
+ ];
151
144
  if (typeof process === 'object' && 'versions' in process) {
152
145
  clientHeader.push(`gl-node/${process.versions.node}`);
153
146
  }
@@ -212,7 +205,7 @@ class ConversationalSearchServiceClient {
212
205
  // pages). Denote the keys used for pagination and results.
213
206
  this.descriptors.page = {
214
207
  listConversations: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'conversations'),
215
- listSessions: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sessions'),
208
+ listSessions: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sessions')
216
209
  };
217
210
  // Put together the default options sent with requests.
218
211
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.ConversationalSearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -241,28 +234,13 @@ class ConversationalSearchServiceClient {
241
234
  }
242
235
  // Put together the "service stub" for
243
236
  // google.cloud.discoveryengine.v1alpha.ConversationalSearchService.
244
- this.conversationalSearchServiceStub = this._gaxGrpc.createStub(this._opts.fallback
245
- ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.ConversationalSearchService')
246
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
247
- this._protos.google.cloud.discoveryengine.v1alpha
248
- .ConversationalSearchService, this._opts, this._providedCustomServicePath);
237
+ this.conversationalSearchServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
238
+ this._protos.lookupService('google.cloud.discoveryengine.v1alpha.ConversationalSearchService') :
239
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
240
+ this._protos.google.cloud.discoveryengine.v1alpha.ConversationalSearchService, this._opts, this._providedCustomServicePath);
249
241
  // Iterate over each of the methods that the service provides
250
242
  // and create an API call method for each.
251
- const conversationalSearchServiceStubMethods = [
252
- 'converseConversation',
253
- 'createConversation',
254
- 'deleteConversation',
255
- 'updateConversation',
256
- 'getConversation',
257
- 'listConversations',
258
- 'answerQuery',
259
- 'getAnswer',
260
- 'createSession',
261
- 'deleteSession',
262
- 'updateSession',
263
- 'getSession',
264
- 'listSessions',
265
- ];
243
+ const conversationalSearchServiceStubMethods = ['converseConversation', 'createConversation', 'deleteConversation', 'updateConversation', 'getConversation', 'listConversations', 'answerQuery', 'getAnswer', 'createSession', 'deleteSession', 'updateSession', 'getSession', 'listSessions'];
266
244
  for (const methodName of conversationalSearchServiceStubMethods) {
267
245
  const callPromise = this.conversationalSearchServiceStub.then(stub => (...args) => {
268
246
  if (this._terminated) {
@@ -273,7 +251,8 @@ class ConversationalSearchServiceClient {
273
251
  }, (err) => () => {
274
252
  throw err;
275
253
  });
276
- const descriptor = this.descriptors.page[methodName] || undefined;
254
+ const descriptor = this.descriptors.page[methodName] ||
255
+ undefined;
277
256
  const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
278
257
  this.innerApiCalls[methodName] = apiCall;
279
258
  }
@@ -285,8 +264,7 @@ class ConversationalSearchServiceClient {
285
264
  * @returns {string} The DNS address for this service.
286
265
  */
287
266
  static get servicePath() {
288
- if (typeof process === 'object' &&
289
- typeof process.emitWarning === 'function') {
267
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
290
268
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
291
269
  }
292
270
  return 'discoveryengine.googleapis.com';
@@ -297,8 +275,7 @@ class ConversationalSearchServiceClient {
297
275
  * @returns {string} The DNS address for this service.
298
276
  */
299
277
  static get apiEndpoint() {
300
- if (typeof process === 'object' &&
301
- typeof process.emitWarning === 'function') {
278
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
302
279
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
303
280
  }
304
281
  return 'discoveryengine.googleapis.com';
@@ -326,7 +303,9 @@ class ConversationalSearchServiceClient {
326
303
  * @returns {string[]} List of default scopes.
327
304
  */
328
305
  static get scopes() {
329
- return ['https://www.googleapis.com/auth/cloud-platform'];
306
+ return [
307
+ 'https://www.googleapis.com/auth/cloud-platform'
308
+ ];
330
309
  }
331
310
  /**
332
311
  * Return the project ID used by this class.
@@ -352,13 +331,10 @@ class ConversationalSearchServiceClient {
352
331
  options = options || {};
353
332
  options.otherArgs = options.otherArgs || {};
354
333
  options.otherArgs.headers = options.otherArgs.headers || {};
355
- options.otherArgs.headers['x-goog-request-params'] =
356
- this._gaxModule.routingHeader.fromParams({
357
- name: request.name ?? '',
358
- });
359
- this.initialize().catch(err => {
360
- throw err;
334
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
335
+ 'name': request.name ?? '',
361
336
  });
337
+ this.initialize().catch(err => { throw err; });
362
338
  this._log.info('converseConversation request %j', request);
363
339
  const wrappedCallback = callback
364
340
  ? (error, response, options, rawResponse) => {
@@ -366,8 +342,7 @@ class ConversationalSearchServiceClient {
366
342
  callback(error, response, options, rawResponse); // We verified callback above.
367
343
  }
368
344
  : undefined;
369
- return this.innerApiCalls
370
- .converseConversation(request, options, wrappedCallback)
345
+ return this.innerApiCalls.converseConversation(request, options, wrappedCallback)
371
346
  ?.then(([response, options, rawResponse]) => {
372
347
  this._log.info('converseConversation response %j', response);
373
348
  return [response, options, rawResponse];
@@ -386,13 +361,10 @@ class ConversationalSearchServiceClient {
386
361
  options = options || {};
387
362
  options.otherArgs = options.otherArgs || {};
388
363
  options.otherArgs.headers = options.otherArgs.headers || {};
389
- options.otherArgs.headers['x-goog-request-params'] =
390
- this._gaxModule.routingHeader.fromParams({
391
- parent: request.parent ?? '',
392
- });
393
- this.initialize().catch(err => {
394
- throw err;
364
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
365
+ 'parent': request.parent ?? '',
395
366
  });
367
+ this.initialize().catch(err => { throw err; });
396
368
  this._log.info('createConversation request %j', request);
397
369
  const wrappedCallback = callback
398
370
  ? (error, response, options, rawResponse) => {
@@ -400,8 +372,7 @@ class ConversationalSearchServiceClient {
400
372
  callback(error, response, options, rawResponse); // We verified callback above.
401
373
  }
402
374
  : undefined;
403
- return this.innerApiCalls
404
- .createConversation(request, options, wrappedCallback)
375
+ return this.innerApiCalls.createConversation(request, options, wrappedCallback)
405
376
  ?.then(([response, options, rawResponse]) => {
406
377
  this._log.info('createConversation response %j', response);
407
378
  return [response, options, rawResponse];
@@ -420,13 +391,10 @@ class ConversationalSearchServiceClient {
420
391
  options = options || {};
421
392
  options.otherArgs = options.otherArgs || {};
422
393
  options.otherArgs.headers = options.otherArgs.headers || {};
423
- options.otherArgs.headers['x-goog-request-params'] =
424
- this._gaxModule.routingHeader.fromParams({
425
- name: request.name ?? '',
426
- });
427
- this.initialize().catch(err => {
428
- throw err;
394
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
395
+ 'name': request.name ?? '',
429
396
  });
397
+ this.initialize().catch(err => { throw err; });
430
398
  this._log.info('deleteConversation request %j', request);
431
399
  const wrappedCallback = callback
432
400
  ? (error, response, options, rawResponse) => {
@@ -434,8 +402,7 @@ class ConversationalSearchServiceClient {
434
402
  callback(error, response, options, rawResponse); // We verified callback above.
435
403
  }
436
404
  : undefined;
437
- return this.innerApiCalls
438
- .deleteConversation(request, options, wrappedCallback)
405
+ return this.innerApiCalls.deleteConversation(request, options, wrappedCallback)
439
406
  ?.then(([response, options, rawResponse]) => {
440
407
  this._log.info('deleteConversation response %j', response);
441
408
  return [response, options, rawResponse];
@@ -454,13 +421,10 @@ class ConversationalSearchServiceClient {
454
421
  options = options || {};
455
422
  options.otherArgs = options.otherArgs || {};
456
423
  options.otherArgs.headers = options.otherArgs.headers || {};
457
- options.otherArgs.headers['x-goog-request-params'] =
458
- this._gaxModule.routingHeader.fromParams({
459
- 'conversation.name': request.conversation.name ?? '',
460
- });
461
- this.initialize().catch(err => {
462
- throw err;
424
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
425
+ 'conversation.name': request.conversation.name ?? '',
463
426
  });
427
+ this.initialize().catch(err => { throw err; });
464
428
  this._log.info('updateConversation request %j', request);
465
429
  const wrappedCallback = callback
466
430
  ? (error, response, options, rawResponse) => {
@@ -468,8 +432,7 @@ class ConversationalSearchServiceClient {
468
432
  callback(error, response, options, rawResponse); // We verified callback above.
469
433
  }
470
434
  : undefined;
471
- return this.innerApiCalls
472
- .updateConversation(request, options, wrappedCallback)
435
+ return this.innerApiCalls.updateConversation(request, options, wrappedCallback)
473
436
  ?.then(([response, options, rawResponse]) => {
474
437
  this._log.info('updateConversation response %j', response);
475
438
  return [response, options, rawResponse];
@@ -488,13 +451,10 @@ class ConversationalSearchServiceClient {
488
451
  options = options || {};
489
452
  options.otherArgs = options.otherArgs || {};
490
453
  options.otherArgs.headers = options.otherArgs.headers || {};
491
- options.otherArgs.headers['x-goog-request-params'] =
492
- this._gaxModule.routingHeader.fromParams({
493
- name: request.name ?? '',
494
- });
495
- this.initialize().catch(err => {
496
- throw err;
454
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
455
+ 'name': request.name ?? '',
497
456
  });
457
+ this.initialize().catch(err => { throw err; });
498
458
  this._log.info('getConversation request %j', request);
499
459
  const wrappedCallback = callback
500
460
  ? (error, response, options, rawResponse) => {
@@ -502,8 +462,7 @@ class ConversationalSearchServiceClient {
502
462
  callback(error, response, options, rawResponse); // We verified callback above.
503
463
  }
504
464
  : undefined;
505
- return this.innerApiCalls
506
- .getConversation(request, options, wrappedCallback)
465
+ return this.innerApiCalls.getConversation(request, options, wrappedCallback)
507
466
  ?.then(([response, options, rawResponse]) => {
508
467
  this._log.info('getConversation response %j', response);
509
468
  return [response, options, rawResponse];
@@ -522,13 +481,10 @@ class ConversationalSearchServiceClient {
522
481
  options = options || {};
523
482
  options.otherArgs = options.otherArgs || {};
524
483
  options.otherArgs.headers = options.otherArgs.headers || {};
525
- options.otherArgs.headers['x-goog-request-params'] =
526
- this._gaxModule.routingHeader.fromParams({
527
- serving_config: request.servingConfig ?? '',
528
- });
529
- this.initialize().catch(err => {
530
- throw err;
484
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
485
+ 'serving_config': request.servingConfig ?? '',
531
486
  });
487
+ this.initialize().catch(err => { throw err; });
532
488
  this._log.info('answerQuery request %j', request);
533
489
  const wrappedCallback = callback
534
490
  ? (error, response, options, rawResponse) => {
@@ -536,8 +492,7 @@ class ConversationalSearchServiceClient {
536
492
  callback(error, response, options, rawResponse); // We verified callback above.
537
493
  }
538
494
  : undefined;
539
- return this.innerApiCalls
540
- .answerQuery(request, options, wrappedCallback)
495
+ return this.innerApiCalls.answerQuery(request, options, wrappedCallback)
541
496
  ?.then(([response, options, rawResponse]) => {
542
497
  this._log.info('answerQuery response %j', response);
543
498
  return [response, options, rawResponse];
@@ -556,13 +511,10 @@ class ConversationalSearchServiceClient {
556
511
  options = options || {};
557
512
  options.otherArgs = options.otherArgs || {};
558
513
  options.otherArgs.headers = options.otherArgs.headers || {};
559
- options.otherArgs.headers['x-goog-request-params'] =
560
- this._gaxModule.routingHeader.fromParams({
561
- name: request.name ?? '',
562
- });
563
- this.initialize().catch(err => {
564
- throw err;
514
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
515
+ 'name': request.name ?? '',
565
516
  });
517
+ this.initialize().catch(err => { throw err; });
566
518
  this._log.info('getAnswer request %j', request);
567
519
  const wrappedCallback = callback
568
520
  ? (error, response, options, rawResponse) => {
@@ -570,8 +522,7 @@ class ConversationalSearchServiceClient {
570
522
  callback(error, response, options, rawResponse); // We verified callback above.
571
523
  }
572
524
  : undefined;
573
- return this.innerApiCalls
574
- .getAnswer(request, options, wrappedCallback)
525
+ return this.innerApiCalls.getAnswer(request, options, wrappedCallback)
575
526
  ?.then(([response, options, rawResponse]) => {
576
527
  this._log.info('getAnswer response %j', response);
577
528
  return [response, options, rawResponse];
@@ -590,13 +541,10 @@ class ConversationalSearchServiceClient {
590
541
  options = options || {};
591
542
  options.otherArgs = options.otherArgs || {};
592
543
  options.otherArgs.headers = options.otherArgs.headers || {};
593
- options.otherArgs.headers['x-goog-request-params'] =
594
- this._gaxModule.routingHeader.fromParams({
595
- parent: request.parent ?? '',
596
- });
597
- this.initialize().catch(err => {
598
- throw err;
544
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
545
+ 'parent': request.parent ?? '',
599
546
  });
547
+ this.initialize().catch(err => { throw err; });
600
548
  this._log.info('createSession request %j', request);
601
549
  const wrappedCallback = callback
602
550
  ? (error, response, options, rawResponse) => {
@@ -604,8 +552,7 @@ class ConversationalSearchServiceClient {
604
552
  callback(error, response, options, rawResponse); // We verified callback above.
605
553
  }
606
554
  : undefined;
607
- return this.innerApiCalls
608
- .createSession(request, options, wrappedCallback)
555
+ return this.innerApiCalls.createSession(request, options, wrappedCallback)
609
556
  ?.then(([response, options, rawResponse]) => {
610
557
  this._log.info('createSession response %j', response);
611
558
  return [response, options, rawResponse];
@@ -624,13 +571,10 @@ class ConversationalSearchServiceClient {
624
571
  options = options || {};
625
572
  options.otherArgs = options.otherArgs || {};
626
573
  options.otherArgs.headers = options.otherArgs.headers || {};
627
- options.otherArgs.headers['x-goog-request-params'] =
628
- this._gaxModule.routingHeader.fromParams({
629
- name: request.name ?? '',
630
- });
631
- this.initialize().catch(err => {
632
- throw err;
574
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
575
+ 'name': request.name ?? '',
633
576
  });
577
+ this.initialize().catch(err => { throw err; });
634
578
  this._log.info('deleteSession request %j', request);
635
579
  const wrappedCallback = callback
636
580
  ? (error, response, options, rawResponse) => {
@@ -638,8 +582,7 @@ class ConversationalSearchServiceClient {
638
582
  callback(error, response, options, rawResponse); // We verified callback above.
639
583
  }
640
584
  : undefined;
641
- return this.innerApiCalls
642
- .deleteSession(request, options, wrappedCallback)
585
+ return this.innerApiCalls.deleteSession(request, options, wrappedCallback)
643
586
  ?.then(([response, options, rawResponse]) => {
644
587
  this._log.info('deleteSession response %j', response);
645
588
  return [response, options, rawResponse];
@@ -658,13 +601,10 @@ class ConversationalSearchServiceClient {
658
601
  options = options || {};
659
602
  options.otherArgs = options.otherArgs || {};
660
603
  options.otherArgs.headers = options.otherArgs.headers || {};
661
- options.otherArgs.headers['x-goog-request-params'] =
662
- this._gaxModule.routingHeader.fromParams({
663
- 'session.name': request.session.name ?? '',
664
- });
665
- this.initialize().catch(err => {
666
- throw err;
604
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
605
+ 'session.name': request.session.name ?? '',
667
606
  });
607
+ this.initialize().catch(err => { throw err; });
668
608
  this._log.info('updateSession request %j', request);
669
609
  const wrappedCallback = callback
670
610
  ? (error, response, options, rawResponse) => {
@@ -672,8 +612,7 @@ class ConversationalSearchServiceClient {
672
612
  callback(error, response, options, rawResponse); // We verified callback above.
673
613
  }
674
614
  : undefined;
675
- return this.innerApiCalls
676
- .updateSession(request, options, wrappedCallback)
615
+ return this.innerApiCalls.updateSession(request, options, wrappedCallback)
677
616
  ?.then(([response, options, rawResponse]) => {
678
617
  this._log.info('updateSession response %j', response);
679
618
  return [response, options, rawResponse];
@@ -692,13 +631,10 @@ class ConversationalSearchServiceClient {
692
631
  options = options || {};
693
632
  options.otherArgs = options.otherArgs || {};
694
633
  options.otherArgs.headers = options.otherArgs.headers || {};
695
- options.otherArgs.headers['x-goog-request-params'] =
696
- this._gaxModule.routingHeader.fromParams({
697
- name: request.name ?? '',
698
- });
699
- this.initialize().catch(err => {
700
- throw err;
634
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
635
+ 'name': request.name ?? '',
701
636
  });
637
+ this.initialize().catch(err => { throw err; });
702
638
  this._log.info('getSession request %j', request);
703
639
  const wrappedCallback = callback
704
640
  ? (error, response, options, rawResponse) => {
@@ -706,8 +642,7 @@ class ConversationalSearchServiceClient {
706
642
  callback(error, response, options, rawResponse); // We verified callback above.
707
643
  }
708
644
  : undefined;
709
- return this.innerApiCalls
710
- .getSession(request, options, wrappedCallback)
645
+ return this.innerApiCalls.getSession(request, options, wrappedCallback)
711
646
  ?.then(([response, options, rawResponse]) => {
712
647
  this._log.info('getSession response %j', response);
713
648
  return [response, options, rawResponse];
@@ -726,13 +661,10 @@ class ConversationalSearchServiceClient {
726
661
  options = options || {};
727
662
  options.otherArgs = options.otherArgs || {};
728
663
  options.otherArgs.headers = options.otherArgs.headers || {};
729
- options.otherArgs.headers['x-goog-request-params'] =
730
- this._gaxModule.routingHeader.fromParams({
731
- parent: request.parent ?? '',
732
- });
733
- this.initialize().catch(err => {
734
- throw err;
664
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
665
+ 'parent': request.parent ?? '',
735
666
  });
667
+ this.initialize().catch(err => { throw err; });
736
668
  const wrappedCallback = callback
737
669
  ? (error, values, nextPageRequest, rawResponse) => {
738
670
  this._log.info('listConversations values %j', values);
@@ -793,15 +725,12 @@ class ConversationalSearchServiceClient {
793
725
  options = options || {};
794
726
  options.otherArgs = options.otherArgs || {};
795
727
  options.otherArgs.headers = options.otherArgs.headers || {};
796
- options.otherArgs.headers['x-goog-request-params'] =
797
- this._gaxModule.routingHeader.fromParams({
798
- parent: request.parent ?? '',
799
- });
728
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
729
+ 'parent': request.parent ?? '',
730
+ });
800
731
  const defaultCallSettings = this._defaults['listConversations'];
801
732
  const callSettings = defaultCallSettings.merge(options);
802
- this.initialize().catch(err => {
803
- throw err;
804
- });
733
+ this.initialize().catch(err => { throw err; });
805
734
  this._log.info('listConversations stream %j', request);
806
735
  return this.descriptors.page.listConversations.createStream(this.innerApiCalls.listConversations, request, callSettings);
807
736
  }
@@ -854,15 +783,12 @@ class ConversationalSearchServiceClient {
854
783
  options = options || {};
855
784
  options.otherArgs = options.otherArgs || {};
856
785
  options.otherArgs.headers = options.otherArgs.headers || {};
857
- options.otherArgs.headers['x-goog-request-params'] =
858
- this._gaxModule.routingHeader.fromParams({
859
- parent: request.parent ?? '',
860
- });
786
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
787
+ 'parent': request.parent ?? '',
788
+ });
861
789
  const defaultCallSettings = this._defaults['listConversations'];
862
790
  const callSettings = defaultCallSettings.merge(options);
863
- this.initialize().catch(err => {
864
- throw err;
865
- });
791
+ this.initialize().catch(err => { throw err; });
866
792
  this._log.info('listConversations iterate %j', request);
867
793
  return this.descriptors.page.listConversations.asyncIterate(this.innerApiCalls['listConversations'], request, callSettings);
868
794
  }
@@ -879,13 +805,10 @@ class ConversationalSearchServiceClient {
879
805
  options = options || {};
880
806
  options.otherArgs = options.otherArgs || {};
881
807
  options.otherArgs.headers = options.otherArgs.headers || {};
882
- options.otherArgs.headers['x-goog-request-params'] =
883
- this._gaxModule.routingHeader.fromParams({
884
- parent: request.parent ?? '',
885
- });
886
- this.initialize().catch(err => {
887
- throw err;
808
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
809
+ 'parent': request.parent ?? '',
888
810
  });
811
+ this.initialize().catch(err => { throw err; });
889
812
  const wrappedCallback = callback
890
813
  ? (error, values, nextPageRequest, rawResponse) => {
891
814
  this._log.info('listSessions values %j', values);
@@ -946,15 +869,12 @@ class ConversationalSearchServiceClient {
946
869
  options = options || {};
947
870
  options.otherArgs = options.otherArgs || {};
948
871
  options.otherArgs.headers = options.otherArgs.headers || {};
949
- options.otherArgs.headers['x-goog-request-params'] =
950
- this._gaxModule.routingHeader.fromParams({
951
- parent: request.parent ?? '',
952
- });
872
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
873
+ 'parent': request.parent ?? '',
874
+ });
953
875
  const defaultCallSettings = this._defaults['listSessions'];
954
876
  const callSettings = defaultCallSettings.merge(options);
955
- this.initialize().catch(err => {
956
- throw err;
957
- });
877
+ this.initialize().catch(err => { throw err; });
958
878
  this._log.info('listSessions stream %j', request);
959
879
  return this.descriptors.page.listSessions.createStream(this.innerApiCalls.listSessions, request, callSettings);
960
880
  }
@@ -1007,70 +927,67 @@ class ConversationalSearchServiceClient {
1007
927
  options = options || {};
1008
928
  options.otherArgs = options.otherArgs || {};
1009
929
  options.otherArgs.headers = options.otherArgs.headers || {};
1010
- options.otherArgs.headers['x-goog-request-params'] =
1011
- this._gaxModule.routingHeader.fromParams({
1012
- parent: request.parent ?? '',
1013
- });
930
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
931
+ 'parent': request.parent ?? '',
932
+ });
1014
933
  const defaultCallSettings = this._defaults['listSessions'];
1015
934
  const callSettings = defaultCallSettings.merge(options);
1016
- this.initialize().catch(err => {
1017
- throw err;
1018
- });
935
+ this.initialize().catch(err => { throw err; });
1019
936
  this._log.info('listSessions iterate %j', request);
1020
937
  return this.descriptors.page.listSessions.asyncIterate(this.innerApiCalls['listSessions'], request, callSettings);
1021
938
  }
1022
939
  /**
1023
- * Gets information about a location.
1024
- *
1025
- * @param {Object} request
1026
- * The request object that will be sent.
1027
- * @param {string} request.name
1028
- * Resource name for the location.
1029
- * @param {object} [options]
1030
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1031
- * @returns {Promise} - The promise which resolves to an array.
1032
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1033
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1034
- * for more details and examples.
1035
- * @example
1036
- * ```
1037
- * const [response] = await client.getLocation(request);
1038
- * ```
1039
- */
940
+ * Gets information about a location.
941
+ *
942
+ * @param {Object} request
943
+ * The request object that will be sent.
944
+ * @param {string} request.name
945
+ * Resource name for the location.
946
+ * @param {object} [options]
947
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
948
+ * @returns {Promise} - The promise which resolves to an array.
949
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
950
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
951
+ * for more details and examples.
952
+ * @example
953
+ * ```
954
+ * const [response] = await client.getLocation(request);
955
+ * ```
956
+ */
1040
957
  getLocation(request, options, callback) {
1041
958
  return this.locationsClient.getLocation(request, options, callback);
1042
959
  }
1043
960
  /**
1044
- * Lists information about the supported locations for this service. Returns an iterable object.
1045
- *
1046
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1047
- * @param {Object} request
1048
- * The request object that will be sent.
1049
- * @param {string} request.name
1050
- * The resource that owns the locations collection, if applicable.
1051
- * @param {string} request.filter
1052
- * The standard list filter.
1053
- * @param {number} request.pageSize
1054
- * The standard list page size.
1055
- * @param {string} request.pageToken
1056
- * The standard list page token.
1057
- * @param {object} [options]
1058
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1059
- * @returns {Object}
1060
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1061
- * When you iterate the returned iterable, each element will be an object representing
1062
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1063
- * so you can stop the iteration when you don't need more results.
1064
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1065
- * for more details and examples.
1066
- * @example
1067
- * ```
1068
- * const iterable = client.listLocationsAsync(request);
1069
- * for await (const response of iterable) {
1070
- * // process response
1071
- * }
1072
- * ```
1073
- */
961
+ * Lists information about the supported locations for this service. Returns an iterable object.
962
+ *
963
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
964
+ * @param {Object} request
965
+ * The request object that will be sent.
966
+ * @param {string} request.name
967
+ * The resource that owns the locations collection, if applicable.
968
+ * @param {string} request.filter
969
+ * The standard list filter.
970
+ * @param {number} request.pageSize
971
+ * The standard list page size.
972
+ * @param {string} request.pageToken
973
+ * The standard list page token.
974
+ * @param {object} [options]
975
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
976
+ * @returns {Object}
977
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
978
+ * When you iterate the returned iterable, each element will be an object representing
979
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
980
+ * so you can stop the iteration when you don't need more results.
981
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
982
+ * for more details and examples.
983
+ * @example
984
+ * ```
985
+ * const iterable = client.listLocationsAsync(request);
986
+ * for await (const response of iterable) {
987
+ * // process response
988
+ * }
989
+ * ```
990
+ */
1074
991
  listLocationsAsync(request, options) {
1075
992
  return this.locationsClient.listLocationsAsync(request, options);
1076
993
  }
@@ -1098,8 +1015,7 @@ class ConversationalSearchServiceClient {
1098
1015
  * @returns {string} A string representing the project.
1099
1016
  */
1100
1017
  matchProjectFromAclConfigName(aclConfigName) {
1101
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1102
- .project;
1018
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).project;
1103
1019
  }
1104
1020
  /**
1105
1021
  * Parse the location from AclConfig resource.
@@ -1109,8 +1025,7 @@ class ConversationalSearchServiceClient {
1109
1025
  * @returns {string} A string representing the location.
1110
1026
  */
1111
1027
  matchLocationFromAclConfigName(aclConfigName) {
1112
- return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName)
1113
- .location;
1028
+ return this.pathTemplates.aclConfigPathTemplate.match(aclConfigName).location;
1114
1029
  }
1115
1030
  /**
1116
1031
  * Return a fully-qualified engine resource name string.
@@ -1192,8 +1107,7 @@ class ConversationalSearchServiceClient {
1192
1107
  * @returns {string} A string representing the project.
1193
1108
  */
1194
1109
  matchProjectFromEvaluationName(evaluationName) {
1195
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1196
- .project;
1110
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
1197
1111
  }
1198
1112
  /**
1199
1113
  * Parse the location from Evaluation resource.
@@ -1203,8 +1117,7 @@ class ConversationalSearchServiceClient {
1203
1117
  * @returns {string} A string representing the location.
1204
1118
  */
1205
1119
  matchLocationFromEvaluationName(evaluationName) {
1206
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1207
- .location;
1120
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
1208
1121
  }
1209
1122
  /**
1210
1123
  * Parse the evaluation from Evaluation resource.
@@ -1214,8 +1127,7 @@ class ConversationalSearchServiceClient {
1214
1127
  * @returns {string} A string representing the evaluation.
1215
1128
  */
1216
1129
  matchEvaluationFromEvaluationName(evaluationName) {
1217
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1218
- .evaluation;
1130
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
1219
1131
  }
1220
1132
  /**
1221
1133
  * Return a fully-qualified project resource name string.
@@ -3282,8 +3194,7 @@ class ConversationalSearchServiceClient {
3282
3194
  * @returns {string} A string representing the project.
3283
3195
  */
3284
3196
  matchProjectFromSampleQueryName(sampleQueryName) {
3285
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3286
- .project;
3197
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
3287
3198
  }
3288
3199
  /**
3289
3200
  * Parse the location from SampleQuery resource.
@@ -3293,8 +3204,7 @@ class ConversationalSearchServiceClient {
3293
3204
  * @returns {string} A string representing the location.
3294
3205
  */
3295
3206
  matchLocationFromSampleQueryName(sampleQueryName) {
3296
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3297
- .location;
3207
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
3298
3208
  }
3299
3209
  /**
3300
3210
  * Parse the sample_query_set from SampleQuery resource.
@@ -3304,8 +3214,7 @@ class ConversationalSearchServiceClient {
3304
3214
  * @returns {string} A string representing the sample_query_set.
3305
3215
  */
3306
3216
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
3307
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3308
- .sample_query_set;
3217
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
3309
3218
  }
3310
3219
  /**
3311
3220
  * Parse the sample_query from SampleQuery resource.
@@ -3315,8 +3224,7 @@ class ConversationalSearchServiceClient {
3315
3224
  * @returns {string} A string representing the sample_query.
3316
3225
  */
3317
3226
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
3318
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3319
- .sample_query;
3227
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
3320
3228
  }
3321
3229
  /**
3322
3230
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -3375,7 +3283,7 @@ class ConversationalSearchServiceClient {
3375
3283
  this._log.info('ending gRPC channel');
3376
3284
  this._terminated = true;
3377
3285
  stub.close();
3378
- this.locationsClient.close();
3286
+ this.locationsClient.close().catch(err => { throw err; });
3379
3287
  });
3380
3288
  }
3381
3289
  return Promise.resolve();