@google-cloud/discoveryengine 0.8.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +13 -1
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
  5. package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
  8. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
  9. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
  10. package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
  12. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
  13. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
  14. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +7 -2
  15. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +13 -2
  16. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +138 -0
  17. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +306 -0
  18. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +2 -4
  19. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +2 -1
  20. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +17 -17
  21. package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +1 -1
  22. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +276 -64
  23. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +45 -36
  24. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +2 -2
  25. package/build/protos/protos.d.ts +13913 -8367
  26. package/build/protos/protos.js +36766 -22883
  27. package/build/protos/protos.json +3956 -2571
  28. package/build/src/index.d.ts +4 -1
  29. package/build/src/index.js +4 -1
  30. package/build/src/v1/completion_service_client.d.ts +161 -12
  31. package/build/src/v1/completion_service_client.js +188 -4
  32. package/build/src/v1/conversational_search_service_client.d.ts +947 -0
  33. package/build/src/v1/conversational_search_service_client.js +1205 -0
  34. package/build/src/v1/conversational_search_service_client_config.json +68 -0
  35. package/build/src/v1/document_service_client.d.ts +245 -109
  36. package/build/src/v1/document_service_client.js +231 -31
  37. package/build/src/v1/index.d.ts +1 -0
  38. package/build/src/v1/index.js +3 -1
  39. package/build/src/v1/schema_service_client.d.ts +187 -53
  40. package/build/src/v1/schema_service_client.js +224 -27
  41. package/build/src/v1/search_service_client.d.ts +266 -59
  42. package/build/src/v1/search_service_client.js +267 -41
  43. package/build/src/v1/user_event_service_client.d.ts +159 -19
  44. package/build/src/v1/user_event_service_client.js +208 -7
  45. package/build/src/v1beta/completion_service_client.d.ts +159 -12
  46. package/build/src/v1beta/completion_service_client.js +188 -4
  47. package/build/src/v1beta/conversational_search_service_client.d.ts +947 -0
  48. package/build/src/v1beta/conversational_search_service_client.js +1205 -0
  49. package/build/src/v1beta/conversational_search_service_client_config.json +68 -0
  50. package/build/src/v1beta/document_service_client.d.ts +237 -101
  51. package/build/src/v1beta/document_service_client.js +227 -27
  52. package/build/src/v1beta/index.d.ts +1 -0
  53. package/build/src/v1beta/index.js +3 -1
  54. package/build/src/v1beta/recommendation_service_client.d.ts +158 -15
  55. package/build/src/v1beta/recommendation_service_client.js +188 -4
  56. package/build/src/v1beta/schema_service_client.d.ts +187 -53
  57. package/build/src/v1beta/schema_service_client.js +224 -27
  58. package/build/src/v1beta/search_service_client.d.ts +305 -71
  59. package/build/src/v1beta/search_service_client.js +293 -49
  60. package/build/src/v1beta/user_event_service_client.d.ts +156 -16
  61. package/build/src/v1beta/user_event_service_client.js +208 -7
  62. package/package.json +10 -13
@@ -60,8 +60,7 @@ class SearchServiceClient {
60
60
  * API remote host.
61
61
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
62
62
  * Follows the structure of {@link gapicConfig}.
63
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
64
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
63
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
65
64
  * For more information, please check the
66
65
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
67
66
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -69,7 +68,7 @@ class SearchServiceClient {
69
68
  * HTTP implementation. Load only fallback version and pass it to the constructor:
70
69
  * ```
71
70
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
72
- * const client = new SearchServiceClient({fallback: 'rest'}, gax);
71
+ * const client = new SearchServiceClient({fallback: true}, gax);
73
72
  * ```
74
73
  */
75
74
  constructor(opts, gaxInstance) {
@@ -115,6 +114,7 @@ class SearchServiceClient {
115
114
  if (servicePath === staticMembers.servicePath) {
116
115
  this.auth.defaultScopes = staticMembers.scopes;
117
116
  }
117
+ this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
118
118
  // Determine the client header string.
119
119
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
120
120
  if (typeof process !== 'undefined' && 'versions' in process) {
@@ -126,7 +126,7 @@ class SearchServiceClient {
126
126
  if (!opts.fallback) {
127
127
  clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
128
128
  }
129
- else if (opts.fallback === 'rest') {
129
+ else {
130
130
  clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
131
131
  }
132
132
  if (opts.libName && opts.libVersion) {
@@ -140,10 +140,12 @@ class SearchServiceClient {
140
140
  this.pathTemplates = {
141
141
  projectLocationCollectionDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}'),
142
142
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
143
+ projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
143
144
  projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
144
145
  projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
145
146
  projectLocationDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}'),
146
147
  projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
148
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
147
149
  projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
148
150
  projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
149
151
  };
@@ -282,34 +284,57 @@ class SearchServiceClient {
282
284
  * documents under the default branch.
283
285
  * @param {string} request.query
284
286
  * Raw search query.
287
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.ImageQuery} request.imageQuery
288
+ * Raw image query.
285
289
  * @param {number} request.pageSize
286
- * Maximum number of {@link google.cloud.discoveryengine.v1.Document|Document}s to
290
+ * Maximum number of {@link protos.google.cloud.discoveryengine.v1.Document|Document}s to
287
291
  * return. If unspecified, defaults to a reasonable value. The maximum allowed
288
- * value is 100. Values above 100 will be coerced to 100.
292
+ * value is 100. Values above 100 are coerced to 100.
289
293
  *
290
294
  * If this field is negative, an `INVALID_ARGUMENT` is returned.
291
295
  * @param {string} request.pageToken
292
296
  * A page token received from a previous
293
- * {@link google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
297
+ * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
294
298
  * call. Provide this to retrieve the subsequent page.
295
299
  *
296
300
  * When paginating, all other parameters provided to
297
- * {@link google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
301
+ * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
298
302
  * must match the call that provided the page token. Otherwise, an
299
303
  * `INVALID_ARGUMENT` error is returned.
300
304
  * @param {number} request.offset
301
305
  * A 0-indexed integer that specifies the current offset (that is, starting
302
306
  * result location, amongst the
303
- * {@link google.cloud.discoveryengine.v1.Document|Document}s deemed by the API as
307
+ * {@link protos.google.cloud.discoveryengine.v1.Document|Document}s deemed by the API as
304
308
  * relevant) in search results. This field is only considered if
305
- * {@link google.cloud.discoveryengine.v1.SearchRequest.page_token|page_token} is
309
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest.page_token|page_token} is
306
310
  * unset.
307
311
  *
308
312
  * If this field is negative, an `INVALID_ARGUMENT` is returned.
313
+ * @param {string} request.filter
314
+ * The filter syntax consists of an expression language for constructing a
315
+ * predicate from one or more fields of the documents being filtered. Filter
316
+ * expression is case-sensitive.
317
+ *
318
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
319
+ * @param {string} request.orderBy
320
+ * The order in which documents are returned. Documents can be ordered by
321
+ * a field in an {@link protos.google.cloud.discoveryengine.v1.Document|Document} object.
322
+ * Leave it unset if ordered by relevance. `order_by` expression is
323
+ * case-sensitive.
324
+ *
325
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
309
326
  * @param {google.cloud.discoveryengine.v1.UserInfo} request.userInfo
310
327
  * Information about the end user.
311
- * Highly recommended for analytics. The user_agent string in UserInfo will
312
- * be used to deduce device_type for analytics.
328
+ * Highly recommended for analytics.
329
+ * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent}
330
+ * is used to deduce `device_type` for analytics.
331
+ * @param {number[]} request.facetSpecs
332
+ * Facet specifications for faceted search. If empty, no facets are returned.
333
+ *
334
+ * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
335
+ * error is returned.
336
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.BoostSpec} request.boostSpec
337
+ * Boost specification to boost certain documents.
313
338
  * @param {number[]} request.params
314
339
  * Additional search parameters.
315
340
  *
@@ -322,10 +347,10 @@ class SearchServiceClient {
322
347
  * which enables image searching.
323
348
  * @param {google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
324
349
  * The query expansion specification that specifies the conditions under which
325
- * query expansion will occur.
350
+ * query expansion occurs.
326
351
  * @param {google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
327
352
  * The spell correction specification that specifies the mode under
328
- * which spell correction will take effect.
353
+ * which spell correction takes effect.
329
354
  * @param {string} request.userPseudoId
330
355
  * A unique identifier for tracking visitors. For example, this could be
331
356
  * implemented with an HTTP cookie, which should be able to uniquely identify
@@ -335,18 +360,17 @@ class SearchServiceClient {
335
360
  * This field should NOT have a fixed value such as `unknown_visitor`.
336
361
  *
337
362
  * This should be the same identifier as
338
- * {@link google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
363
+ * {@link protos.google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
339
364
  * and
340
- * {@link google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
365
+ * {@link protos.google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
341
366
  *
342
367
  * The field must be a UTF-8 encoded string with a length limit of 128
343
368
  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
344
369
  * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec} request.contentSearchSpec
345
- * The content search spec that configs the desired behavior of content
346
- * search.
370
+ * A specification for configuring the behavior of content search.
347
371
  * @param {boolean} request.safeSearch
348
372
  * Whether to turn on safe search. This is only supported for
349
- * {@link |ContentConfig.PUBLIC_WEBSITE}.
373
+ * website search.
350
374
  * @param {number[]} request.userLabels
351
375
  * The user labels applied to a resource must meet the following requirements:
352
376
  *
@@ -368,13 +392,12 @@ class SearchServiceClient {
368
392
  * @param {object} [options]
369
393
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
370
394
  * @returns {Stream}
371
- * An object stream which emits an object representing {@link google.cloud.discoveryengine.v1.SearchResponse.SearchResult | SearchResult} on 'data' event.
395
+ * An object stream which emits an object representing {@link protos.google.cloud.discoveryengine.v1.SearchResponse.SearchResult|SearchResult} on 'data' event.
372
396
  * The client library will perform auto-pagination by default: it will call the API as many
373
397
  * times as needed. Note that it can affect your quota.
374
398
  * We recommend using `searchAsync()`
375
399
  * method described below for async iteration which you can stop as needed.
376
- * Please see the
377
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
400
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
378
401
  * for more details and examples.
379
402
  */
380
403
  searchStream(request, options) {
@@ -411,34 +434,57 @@ class SearchServiceClient {
411
434
  * documents under the default branch.
412
435
  * @param {string} request.query
413
436
  * Raw search query.
437
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.ImageQuery} request.imageQuery
438
+ * Raw image query.
414
439
  * @param {number} request.pageSize
415
- * Maximum number of {@link google.cloud.discoveryengine.v1.Document|Document}s to
440
+ * Maximum number of {@link protos.google.cloud.discoveryengine.v1.Document|Document}s to
416
441
  * return. If unspecified, defaults to a reasonable value. The maximum allowed
417
- * value is 100. Values above 100 will be coerced to 100.
442
+ * value is 100. Values above 100 are coerced to 100.
418
443
  *
419
444
  * If this field is negative, an `INVALID_ARGUMENT` is returned.
420
445
  * @param {string} request.pageToken
421
446
  * A page token received from a previous
422
- * {@link google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
447
+ * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
423
448
  * call. Provide this to retrieve the subsequent page.
424
449
  *
425
450
  * When paginating, all other parameters provided to
426
- * {@link google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
451
+ * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
427
452
  * must match the call that provided the page token. Otherwise, an
428
453
  * `INVALID_ARGUMENT` error is returned.
429
454
  * @param {number} request.offset
430
455
  * A 0-indexed integer that specifies the current offset (that is, starting
431
456
  * result location, amongst the
432
- * {@link google.cloud.discoveryengine.v1.Document|Document}s deemed by the API as
457
+ * {@link protos.google.cloud.discoveryengine.v1.Document|Document}s deemed by the API as
433
458
  * relevant) in search results. This field is only considered if
434
- * {@link google.cloud.discoveryengine.v1.SearchRequest.page_token|page_token} is
459
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest.page_token|page_token} is
435
460
  * unset.
436
461
  *
437
462
  * If this field is negative, an `INVALID_ARGUMENT` is returned.
463
+ * @param {string} request.filter
464
+ * The filter syntax consists of an expression language for constructing a
465
+ * predicate from one or more fields of the documents being filtered. Filter
466
+ * expression is case-sensitive.
467
+ *
468
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
469
+ * @param {string} request.orderBy
470
+ * The order in which documents are returned. Documents can be ordered by
471
+ * a field in an {@link protos.google.cloud.discoveryengine.v1.Document|Document} object.
472
+ * Leave it unset if ordered by relevance. `order_by` expression is
473
+ * case-sensitive.
474
+ *
475
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
438
476
  * @param {google.cloud.discoveryengine.v1.UserInfo} request.userInfo
439
477
  * Information about the end user.
440
- * Highly recommended for analytics. The user_agent string in UserInfo will
441
- * be used to deduce device_type for analytics.
478
+ * Highly recommended for analytics.
479
+ * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent}
480
+ * is used to deduce `device_type` for analytics.
481
+ * @param {number[]} request.facetSpecs
482
+ * Facet specifications for faceted search. If empty, no facets are returned.
483
+ *
484
+ * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
485
+ * error is returned.
486
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.BoostSpec} request.boostSpec
487
+ * Boost specification to boost certain documents.
442
488
  * @param {number[]} request.params
443
489
  * Additional search parameters.
444
490
  *
@@ -451,10 +497,10 @@ class SearchServiceClient {
451
497
  * which enables image searching.
452
498
  * @param {google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
453
499
  * The query expansion specification that specifies the conditions under which
454
- * query expansion will occur.
500
+ * query expansion occurs.
455
501
  * @param {google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
456
502
  * The spell correction specification that specifies the mode under
457
- * which spell correction will take effect.
503
+ * which spell correction takes effect.
458
504
  * @param {string} request.userPseudoId
459
505
  * A unique identifier for tracking visitors. For example, this could be
460
506
  * implemented with an HTTP cookie, which should be able to uniquely identify
@@ -464,18 +510,17 @@ class SearchServiceClient {
464
510
  * This field should NOT have a fixed value such as `unknown_visitor`.
465
511
  *
466
512
  * This should be the same identifier as
467
- * {@link google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
513
+ * {@link protos.google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
468
514
  * and
469
- * {@link google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
515
+ * {@link protos.google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
470
516
  *
471
517
  * The field must be a UTF-8 encoded string with a length limit of 128
472
518
  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
473
519
  * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec} request.contentSearchSpec
474
- * The content search spec that configs the desired behavior of content
475
- * search.
520
+ * A specification for configuring the behavior of content search.
476
521
  * @param {boolean} request.safeSearch
477
522
  * Whether to turn on safe search. This is only supported for
478
- * {@link |ContentConfig.PUBLIC_WEBSITE}.
523
+ * website search.
479
524
  * @param {number[]} request.userLabels
480
525
  * The user labels applied to a resource must meet the following requirements:
481
526
  *
@@ -497,12 +542,11 @@ class SearchServiceClient {
497
542
  * @param {object} [options]
498
543
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
499
544
  * @returns {Object}
500
- * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
545
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
501
546
  * When you iterate the returned iterable, each element will be an object representing
502
- * {@link google.cloud.discoveryengine.v1.SearchResponse.SearchResult | SearchResult}. The API will be called under the hood as needed, once per the page,
547
+ * {@link protos.google.cloud.discoveryengine.v1.SearchResponse.SearchResult|SearchResult}. The API will be called under the hood as needed, once per the page,
503
548
  * so you can stop the iteration when you don't need more results.
504
- * Please see the
505
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
549
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
506
550
  * for more details and examples.
507
551
  * @example <caption>include:samples/generated/v1/search_service.search.js</caption>
508
552
  * region_tag:discoveryengine_v1_generated_SearchService_Search_async
@@ -522,6 +566,61 @@ class SearchServiceClient {
522
566
  this.initialize();
523
567
  return this.descriptors.page.search.asyncIterate(this.innerApiCalls['search'], request, callSettings);
524
568
  }
569
+ /**
570
+ * Gets information about a location.
571
+ *
572
+ * @param {Object} request
573
+ * The request object that will be sent.
574
+ * @param {string} request.name
575
+ * Resource name for the location.
576
+ * @param {object} [options]
577
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
578
+ * @returns {Promise} - The promise which resolves to an array.
579
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
580
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
581
+ * for more details and examples.
582
+ * @example
583
+ * ```
584
+ * const [response] = await client.getLocation(request);
585
+ * ```
586
+ */
587
+ getLocation(request, options, callback) {
588
+ return this.locationsClient.getLocation(request, options, callback);
589
+ }
590
+ /**
591
+ * Lists information about the supported locations for this service. Returns an iterable object.
592
+ *
593
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
594
+ * @param {Object} request
595
+ * The request object that will be sent.
596
+ * @param {string} request.name
597
+ * The resource that owns the locations collection, if applicable.
598
+ * @param {string} request.filter
599
+ * The standard list filter.
600
+ * @param {number} request.pageSize
601
+ * The standard list page size.
602
+ * @param {string} request.pageToken
603
+ * The standard list page token.
604
+ * @param {object} [options]
605
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
606
+ * @returns {Object}
607
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
608
+ * When you iterate the returned iterable, each element will be an object representing
609
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
610
+ * so you can stop the iteration when you don't need more results.
611
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
612
+ * for more details and examples.
613
+ * @example
614
+ * ```
615
+ * const iterable = client.listLocationsAsync(request);
616
+ * for await (const response of iterable) {
617
+ * // process response
618
+ * }
619
+ * ```
620
+ */
621
+ listLocationsAsync(request, options) {
622
+ return this.locationsClient.listLocationsAsync(request, options);
623
+ }
525
624
  // --------------------
526
625
  // -- Path templates --
527
626
  // --------------------
@@ -675,6 +774,75 @@ class SearchServiceClient {
675
774
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
676
775
  return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
677
776
  }
777
+ /**
778
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
779
+ *
780
+ * @param {string} project
781
+ * @param {string} location
782
+ * @param {string} collection
783
+ * @param {string} data_store
784
+ * @param {string} conversation
785
+ * @returns {string} Resource name string.
786
+ */
787
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
788
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
789
+ project: project,
790
+ location: location,
791
+ collection: collection,
792
+ data_store: dataStore,
793
+ conversation: conversation,
794
+ });
795
+ }
796
+ /**
797
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
798
+ *
799
+ * @param {string} projectLocationCollectionDataStoreConversationName
800
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
801
+ * @returns {string} A string representing the project.
802
+ */
803
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
804
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
805
+ }
806
+ /**
807
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
808
+ *
809
+ * @param {string} projectLocationCollectionDataStoreConversationName
810
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
811
+ * @returns {string} A string representing the location.
812
+ */
813
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
814
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
815
+ }
816
+ /**
817
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
818
+ *
819
+ * @param {string} projectLocationCollectionDataStoreConversationName
820
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
821
+ * @returns {string} A string representing the collection.
822
+ */
823
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
824
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
825
+ }
826
+ /**
827
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
828
+ *
829
+ * @param {string} projectLocationCollectionDataStoreConversationName
830
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
831
+ * @returns {string} A string representing the data_store.
832
+ */
833
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
834
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
835
+ }
836
+ /**
837
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
838
+ *
839
+ * @param {string} projectLocationCollectionDataStoreConversationName
840
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
841
+ * @returns {string} A string representing the conversation.
842
+ */
843
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
844
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
845
+ }
678
846
  /**
679
847
  * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
680
848
  *
@@ -939,6 +1107,63 @@ class SearchServiceClient {
939
1107
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
940
1108
  return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
941
1109
  }
1110
+ /**
1111
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1112
+ *
1113
+ * @param {string} project
1114
+ * @param {string} location
1115
+ * @param {string} data_store
1116
+ * @param {string} conversation
1117
+ * @returns {string} Resource name string.
1118
+ */
1119
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1120
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1121
+ project: project,
1122
+ location: location,
1123
+ data_store: dataStore,
1124
+ conversation: conversation,
1125
+ });
1126
+ }
1127
+ /**
1128
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1129
+ *
1130
+ * @param {string} projectLocationDataStoreConversationName
1131
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1132
+ * @returns {string} A string representing the project.
1133
+ */
1134
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1135
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1136
+ }
1137
+ /**
1138
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1139
+ *
1140
+ * @param {string} projectLocationDataStoreConversationName
1141
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1142
+ * @returns {string} A string representing the location.
1143
+ */
1144
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1145
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1146
+ }
1147
+ /**
1148
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1149
+ *
1150
+ * @param {string} projectLocationDataStoreConversationName
1151
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1152
+ * @returns {string} A string representing the data_store.
1153
+ */
1154
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1155
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1156
+ }
1157
+ /**
1158
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1159
+ *
1160
+ * @param {string} projectLocationDataStoreConversationName
1161
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1162
+ * @returns {string} A string representing the conversation.
1163
+ */
1164
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1165
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1166
+ }
942
1167
  /**
943
1168
  * Return a fully-qualified projectLocationDataStoreSchema resource name string.
944
1169
  *
@@ -1064,6 +1289,7 @@ class SearchServiceClient {
1064
1289
  return this.searchServiceStub.then(stub => {
1065
1290
  this._terminated = true;
1066
1291
  stub.close();
1292
+ this.locationsClient.close();
1067
1293
  });
1068
1294
  }
1069
1295
  return Promise.resolve();