@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,26 +97,17 @@ class SearchServiceClient {
97
97
  constructor(opts, gaxInstance) {
98
98
  // Ensure that options include all the required fields.
99
99
  const staticMembers = this.constructor;
100
- if (opts?.universe_domain &&
101
- opts?.universeDomain &&
102
- opts?.universe_domain !== opts?.universeDomain) {
100
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
103
101
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
104
102
  }
105
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
106
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
107
- : undefined;
108
- this._universeDomain =
109
- opts?.universeDomain ??
110
- opts?.universe_domain ??
111
- universeDomainEnvVar ??
112
- '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';
113
105
  this._servicePath = 'discoveryengine.' + this._universeDomain;
114
106
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
115
107
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
116
108
  const port = opts?.port || staticMembers.port;
117
109
  const clientConfig = opts?.clientConfig ?? {};
118
- const fallback = opts?.fallback ??
119
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
110
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
120
111
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
121
112
  // Request numeric enum values if REST transport is used.
122
113
  opts.numericEnums = true;
@@ -146,7 +137,10 @@ class SearchServiceClient {
146
137
  }
147
138
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
148
139
  // Determine the client header string.
149
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
140
+ const clientHeader = [
141
+ `gax/${this._gaxModule.version}`,
142
+ `gapic/${version}`,
143
+ ];
150
144
  if (typeof process === 'object' && 'versions' in process) {
151
145
  clientHeader.push(`gl-node/${process.versions.node}`);
152
146
  }
@@ -215,7 +209,7 @@ class SearchServiceClient {
215
209
  // pages). Denote the keys used for pagination and results.
216
210
  this.descriptors.page = {
217
211
  search: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results'),
218
- searchLite: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results'),
212
+ searchLite: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results')
219
213
  };
220
214
  // Put together the default options sent with requests.
221
215
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.SearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -244,11 +238,10 @@ class SearchServiceClient {
244
238
  }
245
239
  // Put together the "service stub" for
246
240
  // google.cloud.discoveryengine.v1beta.SearchService.
247
- this.searchServiceStub = this._gaxGrpc.createStub(this._opts.fallback
248
- ? this._protos.lookupService('google.cloud.discoveryengine.v1beta.SearchService')
249
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
250
- this._protos.google.cloud.discoveryengine.v1beta
251
- .SearchService, this._opts, this._providedCustomServicePath);
241
+ this.searchServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
242
+ this._protos.lookupService('google.cloud.discoveryengine.v1beta.SearchService') :
243
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
244
+ this._protos.google.cloud.discoveryengine.v1beta.SearchService, this._opts, this._providedCustomServicePath);
252
245
  // Iterate over each of the methods that the service provides
253
246
  // and create an API call method for each.
254
247
  const searchServiceStubMethods = ['search', 'searchLite'];
@@ -262,7 +255,8 @@ class SearchServiceClient {
262
255
  }, (err) => () => {
263
256
  throw err;
264
257
  });
265
- const descriptor = this.descriptors.page[methodName] || undefined;
258
+ const descriptor = this.descriptors.page[methodName] ||
259
+ undefined;
266
260
  const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
267
261
  this.innerApiCalls[methodName] = apiCall;
268
262
  }
@@ -274,8 +268,7 @@ class SearchServiceClient {
274
268
  * @returns {string} The DNS address for this service.
275
269
  */
276
270
  static get servicePath() {
277
- if (typeof process === 'object' &&
278
- typeof process.emitWarning === 'function') {
271
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
279
272
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
280
273
  }
281
274
  return 'discoveryengine.googleapis.com';
@@ -286,8 +279,7 @@ class SearchServiceClient {
286
279
  * @returns {string} The DNS address for this service.
287
280
  */
288
281
  static get apiEndpoint() {
289
- if (typeof process === 'object' &&
290
- typeof process.emitWarning === 'function') {
282
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
291
283
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
292
284
  }
293
285
  return 'discoveryengine.googleapis.com';
@@ -315,7 +307,9 @@ class SearchServiceClient {
315
307
  * @returns {string[]} List of default scopes.
316
308
  */
317
309
  static get scopes() {
318
- return ['https://www.googleapis.com/auth/cloud-platform'];
310
+ return [
311
+ 'https://www.googleapis.com/auth/cloud-platform'
312
+ ];
319
313
  }
320
314
  /**
321
315
  * Return the project ID used by this class.
@@ -341,13 +335,10 @@ class SearchServiceClient {
341
335
  options = options || {};
342
336
  options.otherArgs = options.otherArgs || {};
343
337
  options.otherArgs.headers = options.otherArgs.headers || {};
344
- options.otherArgs.headers['x-goog-request-params'] =
345
- this._gaxModule.routingHeader.fromParams({
346
- serving_config: request.servingConfig ?? '',
347
- });
348
- this.initialize().catch(err => {
349
- throw err;
338
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
339
+ 'serving_config': request.servingConfig ?? '',
350
340
  });
341
+ this.initialize().catch(err => { throw err; });
351
342
  const wrappedCallback = callback
352
343
  ? (error, values, nextPageRequest, rawResponse) => {
353
344
  this._log.info('search values %j', values);
@@ -656,15 +647,12 @@ class SearchServiceClient {
656
647
  options = options || {};
657
648
  options.otherArgs = options.otherArgs || {};
658
649
  options.otherArgs.headers = options.otherArgs.headers || {};
659
- options.otherArgs.headers['x-goog-request-params'] =
660
- this._gaxModule.routingHeader.fromParams({
661
- serving_config: request.servingConfig ?? '',
662
- });
650
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
651
+ 'serving_config': request.servingConfig ?? '',
652
+ });
663
653
  const defaultCallSettings = this._defaults['search'];
664
654
  const callSettings = defaultCallSettings.merge(options);
665
- this.initialize().catch(err => {
666
- throw err;
667
- });
655
+ this.initialize().catch(err => { throw err; });
668
656
  this._log.info('search stream %j', request);
669
657
  return this.descriptors.page.search.createStream(this.innerApiCalls.search, request, callSettings);
670
658
  }
@@ -965,15 +953,12 @@ class SearchServiceClient {
965
953
  options = options || {};
966
954
  options.otherArgs = options.otherArgs || {};
967
955
  options.otherArgs.headers = options.otherArgs.headers || {};
968
- options.otherArgs.headers['x-goog-request-params'] =
969
- this._gaxModule.routingHeader.fromParams({
970
- serving_config: request.servingConfig ?? '',
971
- });
956
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
957
+ 'serving_config': request.servingConfig ?? '',
958
+ });
972
959
  const defaultCallSettings = this._defaults['search'];
973
960
  const callSettings = defaultCallSettings.merge(options);
974
- this.initialize().catch(err => {
975
- throw err;
976
- });
961
+ this.initialize().catch(err => { throw err; });
977
962
  this._log.info('search iterate %j', request);
978
963
  return this.descriptors.page.search.asyncIterate(this.innerApiCalls['search'], request, callSettings);
979
964
  }
@@ -990,13 +975,10 @@ class SearchServiceClient {
990
975
  options = options || {};
991
976
  options.otherArgs = options.otherArgs || {};
992
977
  options.otherArgs.headers = options.otherArgs.headers || {};
993
- options.otherArgs.headers['x-goog-request-params'] =
994
- this._gaxModule.routingHeader.fromParams({
995
- serving_config: request.servingConfig ?? '',
996
- });
997
- this.initialize().catch(err => {
998
- throw err;
978
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
979
+ 'serving_config': request.servingConfig ?? '',
999
980
  });
981
+ this.initialize().catch(err => { throw err; });
1000
982
  const wrappedCallback = callback
1001
983
  ? (error, values, nextPageRequest, rawResponse) => {
1002
984
  this._log.info('searchLite values %j', values);
@@ -1305,15 +1287,12 @@ class SearchServiceClient {
1305
1287
  options = options || {};
1306
1288
  options.otherArgs = options.otherArgs || {};
1307
1289
  options.otherArgs.headers = options.otherArgs.headers || {};
1308
- options.otherArgs.headers['x-goog-request-params'] =
1309
- this._gaxModule.routingHeader.fromParams({
1310
- serving_config: request.servingConfig ?? '',
1311
- });
1290
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1291
+ 'serving_config': request.servingConfig ?? '',
1292
+ });
1312
1293
  const defaultCallSettings = this._defaults['searchLite'];
1313
1294
  const callSettings = defaultCallSettings.merge(options);
1314
- this.initialize().catch(err => {
1315
- throw err;
1316
- });
1295
+ this.initialize().catch(err => { throw err; });
1317
1296
  this._log.info('searchLite stream %j', request);
1318
1297
  return this.descriptors.page.searchLite.createStream(this.innerApiCalls.searchLite, request, callSettings);
1319
1298
  }
@@ -1614,70 +1593,67 @@ class SearchServiceClient {
1614
1593
  options = options || {};
1615
1594
  options.otherArgs = options.otherArgs || {};
1616
1595
  options.otherArgs.headers = options.otherArgs.headers || {};
1617
- options.otherArgs.headers['x-goog-request-params'] =
1618
- this._gaxModule.routingHeader.fromParams({
1619
- serving_config: request.servingConfig ?? '',
1620
- });
1596
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
1597
+ 'serving_config': request.servingConfig ?? '',
1598
+ });
1621
1599
  const defaultCallSettings = this._defaults['searchLite'];
1622
1600
  const callSettings = defaultCallSettings.merge(options);
1623
- this.initialize().catch(err => {
1624
- throw err;
1625
- });
1601
+ this.initialize().catch(err => { throw err; });
1626
1602
  this._log.info('searchLite iterate %j', request);
1627
1603
  return this.descriptors.page.searchLite.asyncIterate(this.innerApiCalls['searchLite'], request, callSettings);
1628
1604
  }
1629
1605
  /**
1630
- * Gets information about a location.
1631
- *
1632
- * @param {Object} request
1633
- * The request object that will be sent.
1634
- * @param {string} request.name
1635
- * Resource name for the location.
1636
- * @param {object} [options]
1637
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1638
- * @returns {Promise} - The promise which resolves to an array.
1639
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1640
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1641
- * for more details and examples.
1642
- * @example
1643
- * ```
1644
- * const [response] = await client.getLocation(request);
1645
- * ```
1646
- */
1606
+ * Gets information about a location.
1607
+ *
1608
+ * @param {Object} request
1609
+ * The request object that will be sent.
1610
+ * @param {string} request.name
1611
+ * Resource name for the location.
1612
+ * @param {object} [options]
1613
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1614
+ * @returns {Promise} - The promise which resolves to an array.
1615
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1616
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1617
+ * for more details and examples.
1618
+ * @example
1619
+ * ```
1620
+ * const [response] = await client.getLocation(request);
1621
+ * ```
1622
+ */
1647
1623
  getLocation(request, options, callback) {
1648
1624
  return this.locationsClient.getLocation(request, options, callback);
1649
1625
  }
1650
1626
  /**
1651
- * Lists information about the supported locations for this service. Returns an iterable object.
1652
- *
1653
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1654
- * @param {Object} request
1655
- * The request object that will be sent.
1656
- * @param {string} request.name
1657
- * The resource that owns the locations collection, if applicable.
1658
- * @param {string} request.filter
1659
- * The standard list filter.
1660
- * @param {number} request.pageSize
1661
- * The standard list page size.
1662
- * @param {string} request.pageToken
1663
- * The standard list page token.
1664
- * @param {object} [options]
1665
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1666
- * @returns {Object}
1667
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1668
- * When you iterate the returned iterable, each element will be an object representing
1669
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1670
- * so you can stop the iteration when you don't need more results.
1671
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1672
- * for more details and examples.
1673
- * @example
1674
- * ```
1675
- * const iterable = client.listLocationsAsync(request);
1676
- * for await (const response of iterable) {
1677
- * // process response
1678
- * }
1679
- * ```
1680
- */
1627
+ * Lists information about the supported locations for this service. Returns an iterable object.
1628
+ *
1629
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1630
+ * @param {Object} request
1631
+ * The request object that will be sent.
1632
+ * @param {string} request.name
1633
+ * The resource that owns the locations collection, if applicable.
1634
+ * @param {string} request.filter
1635
+ * The standard list filter.
1636
+ * @param {number} request.pageSize
1637
+ * The standard list page size.
1638
+ * @param {string} request.pageToken
1639
+ * The standard list page token.
1640
+ * @param {object} [options]
1641
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1642
+ * @returns {Object}
1643
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1644
+ * When you iterate the returned iterable, each element will be an object representing
1645
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1646
+ * so you can stop the iteration when you don't need more results.
1647
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1648
+ * for more details and examples.
1649
+ * @example
1650
+ * ```
1651
+ * const iterable = client.listLocationsAsync(request);
1652
+ * for await (const response of iterable) {
1653
+ * // process response
1654
+ * }
1655
+ * ```
1656
+ */
1681
1657
  listLocationsAsync(request, options) {
1682
1658
  return this.locationsClient.listLocationsAsync(request, options);
1683
1659
  }
@@ -1764,8 +1740,7 @@ class SearchServiceClient {
1764
1740
  * @returns {string} A string representing the project.
1765
1741
  */
1766
1742
  matchProjectFromEvaluationName(evaluationName) {
1767
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1768
- .project;
1743
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
1769
1744
  }
1770
1745
  /**
1771
1746
  * Parse the location from Evaluation resource.
@@ -1775,8 +1750,7 @@ class SearchServiceClient {
1775
1750
  * @returns {string} A string representing the location.
1776
1751
  */
1777
1752
  matchLocationFromEvaluationName(evaluationName) {
1778
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1779
- .location;
1753
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
1780
1754
  }
1781
1755
  /**
1782
1756
  * Parse the evaluation from Evaluation resource.
@@ -1786,8 +1760,7 @@ class SearchServiceClient {
1786
1760
  * @returns {string} A string representing the evaluation.
1787
1761
  */
1788
1762
  matchEvaluationFromEvaluationName(evaluationName) {
1789
- return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1790
- .evaluation;
1763
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
1791
1764
  }
1792
1765
  /**
1793
1766
  * Return a fully-qualified groundingConfig resource name string.
@@ -4151,8 +4124,7 @@ class SearchServiceClient {
4151
4124
  * @returns {string} A string representing the project.
4152
4125
  */
4153
4126
  matchProjectFromSampleQueryName(sampleQueryName) {
4154
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
4155
- .project;
4127
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
4156
4128
  }
4157
4129
  /**
4158
4130
  * Parse the location from SampleQuery resource.
@@ -4162,8 +4134,7 @@ class SearchServiceClient {
4162
4134
  * @returns {string} A string representing the location.
4163
4135
  */
4164
4136
  matchLocationFromSampleQueryName(sampleQueryName) {
4165
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
4166
- .location;
4137
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
4167
4138
  }
4168
4139
  /**
4169
4140
  * Parse the sample_query_set from SampleQuery resource.
@@ -4173,8 +4144,7 @@ class SearchServiceClient {
4173
4144
  * @returns {string} A string representing the sample_query_set.
4174
4145
  */
4175
4146
  matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
4176
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
4177
- .sample_query_set;
4147
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
4178
4148
  }
4179
4149
  /**
4180
4150
  * Parse the sample_query from SampleQuery resource.
@@ -4184,8 +4154,7 @@ class SearchServiceClient {
4184
4154
  * @returns {string} A string representing the sample_query.
4185
4155
  */
4186
4156
  matchSampleQueryFromSampleQueryName(sampleQueryName) {
4187
- return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
4188
- .sample_query;
4157
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
4189
4158
  }
4190
4159
  /**
4191
4160
  * Return a fully-qualified sampleQuerySet resource name string.
@@ -4244,7 +4213,7 @@ class SearchServiceClient {
4244
4213
  this._log.info('ending gRPC channel');
4245
4214
  this._terminated = true;
4246
4215
  stub.close();
4247
- this.locationsClient.close();
4216
+ this.locationsClient.close().catch(err => { throw err; });
4248
4217
  });
4249
4218
  }
4250
4219
  return Promise.resolve();
@@ -137,7 +137,7 @@ export declare class SearchTuningServiceClient {
137
137
  */
138
138
  listCustomModels(request?: protos.google.cloud.discoveryengine.v1beta.IListCustomModelsRequest, options?: CallOptions): Promise<[
139
139
  protos.google.cloud.discoveryengine.v1beta.IListCustomModelsResponse,
140
- (protos.google.cloud.discoveryengine.v1beta.IListCustomModelsRequest | undefined),
140
+ protos.google.cloud.discoveryengine.v1beta.IListCustomModelsRequest | undefined,
141
141
  {} | undefined
142
142
  ]>;
143
143
  listCustomModels(request: protos.google.cloud.discoveryengine.v1beta.IListCustomModelsRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1beta.IListCustomModelsResponse, protos.google.cloud.discoveryengine.v1beta.IListCustomModelsRequest | null | undefined, {} | null | undefined>): void;
@@ -193,86 +193,86 @@ export declare class SearchTuningServiceClient {
193
193
  */
194
194
  checkTrainCustomModelProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1beta.TrainCustomModelResponse, protos.google.cloud.discoveryengine.v1beta.TrainCustomModelMetadata>>;
195
195
  /**
196
- * Gets information about a location.
197
- *
198
- * @param {Object} request
199
- * The request object that will be sent.
200
- * @param {string} request.name
201
- * Resource name for the location.
202
- * @param {object} [options]
203
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
204
- * @returns {Promise} - The promise which resolves to an array.
205
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
206
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
207
- * for more details and examples.
208
- * @example
209
- * ```
210
- * const [response] = await client.getLocation(request);
211
- * ```
212
- */
196
+ * Gets information about a location.
197
+ *
198
+ * @param {Object} request
199
+ * The request object that will be sent.
200
+ * @param {string} request.name
201
+ * Resource name for the location.
202
+ * @param {object} [options]
203
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
204
+ * @returns {Promise} - The promise which resolves to an array.
205
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
206
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
207
+ * for more details and examples.
208
+ * @example
209
+ * ```
210
+ * const [response] = await client.getLocation(request);
211
+ * ```
212
+ */
213
213
  getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
214
214
  /**
215
- * Lists information about the supported locations for this service. Returns an iterable object.
216
- *
217
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
218
- * @param {Object} request
219
- * The request object that will be sent.
220
- * @param {string} request.name
221
- * The resource that owns the locations collection, if applicable.
222
- * @param {string} request.filter
223
- * The standard list filter.
224
- * @param {number} request.pageSize
225
- * The standard list page size.
226
- * @param {string} request.pageToken
227
- * The standard list page token.
228
- * @param {object} [options]
229
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
230
- * @returns {Object}
231
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
232
- * When you iterate the returned iterable, each element will be an object representing
233
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
234
- * so you can stop the iteration when you don't need more results.
235
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
236
- * for more details and examples.
237
- * @example
238
- * ```
239
- * const iterable = client.listLocationsAsync(request);
240
- * for await (const response of iterable) {
241
- * // process response
242
- * }
243
- * ```
244
- */
215
+ * Lists information about the supported locations for this service. Returns an iterable object.
216
+ *
217
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
218
+ * @param {Object} request
219
+ * The request object that will be sent.
220
+ * @param {string} request.name
221
+ * The resource that owns the locations collection, if applicable.
222
+ * @param {string} request.filter
223
+ * The standard list filter.
224
+ * @param {number} request.pageSize
225
+ * The standard list page size.
226
+ * @param {string} request.pageToken
227
+ * The standard list page token.
228
+ * @param {object} [options]
229
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
230
+ * @returns {Object}
231
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
232
+ * When you iterate the returned iterable, each element will be an object representing
233
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
234
+ * so you can stop the iteration when you don't need more results.
235
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
236
+ * for more details and examples.
237
+ * @example
238
+ * ```
239
+ * const iterable = client.listLocationsAsync(request);
240
+ * for await (const response of iterable) {
241
+ * // process response
242
+ * }
243
+ * ```
244
+ */
245
245
  listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
246
246
  /**
247
- * Gets the latest state of a long-running operation. Clients can use this
248
- * method to poll the operation result at intervals as recommended by the API
249
- * service.
250
- *
251
- * @param {Object} request - The request object that will be sent.
252
- * @param {string} request.name - The name of the operation resource.
253
- * @param {Object=} options
254
- * Optional parameters. You can override the default settings for this call,
255
- * e.g, timeout, retries, paginations, etc. See {@link
256
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
257
- * for the details.
258
- * @param {function(?Error, ?Object)=} callback
259
- * The function which will be called with the result of the API call.
260
- *
261
- * The second parameter to the callback is an object representing
262
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
263
- * @return {Promise} - The promise which resolves to an array.
264
- * The first element of the array is an object representing
265
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
266
- * The promise has a method named "cancel" which cancels the ongoing API call.
267
- *
268
- * @example
269
- * ```
270
- * const client = longrunning.operationsClient();
271
- * const name = '';
272
- * const [response] = await client.getOperation({name});
273
- * // doThingsWith(response)
274
- * ```
275
- */
247
+ * Gets the latest state of a long-running operation. Clients can use this
248
+ * method to poll the operation result at intervals as recommended by the API
249
+ * service.
250
+ *
251
+ * @param {Object} request - The request object that will be sent.
252
+ * @param {string} request.name - The name of the operation resource.
253
+ * @param {Object=} options
254
+ * Optional parameters. You can override the default settings for this call,
255
+ * e.g, timeout, retries, paginations, etc. See {@link
256
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
257
+ * for the details.
258
+ * @param {function(?Error, ?Object)=} callback
259
+ * The function which will be called with the result of the API call.
260
+ *
261
+ * The second parameter to the callback is an object representing
262
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
263
+ * @return {Promise} - The promise which resolves to an array.
264
+ * The first element of the array is an object representing
265
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
266
+ * The promise has a method named "cancel" which cancels the ongoing API call.
267
+ *
268
+ * @example
269
+ * ```
270
+ * const client = longrunning.operationsClient();
271
+ * const name = '';
272
+ * const [response] = await client.getOperation({name});
273
+ * // doThingsWith(response)
274
+ * ```
275
+ */
276
276
  getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
277
277
  /**
278
278
  * Lists operations that match the specified filter in the request. If the