@google-cloud/discoveryengine 0.8.0 → 1.1.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 (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
@@ -1,5 +1,5 @@
1
1
  import type * as gax from 'google-gax';
2
- import type { Callback, CallOptions, Descriptors, ClientOptions } from 'google-gax';
2
+ import type { Callback, CallOptions, Descriptors, ClientOptions, LocationsClient, LocationProtos } from 'google-gax';
3
3
  import * as protos from '../../protos/protos';
4
4
  /**
5
5
  * Service for making recommendations.
@@ -20,6 +20,7 @@ export declare class RecommendationServiceClient {
20
20
  innerApiCalls: {
21
21
  [name: string]: Function;
22
22
  };
23
+ locationsClient: LocationsClient;
23
24
  pathTemplates: {
24
25
  [name: string]: gax.PathTemplate;
25
26
  };
@@ -54,8 +55,7 @@ export declare class RecommendationServiceClient {
54
55
  * API remote host.
55
56
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
56
57
  * Follows the structure of {@link gapicConfig}.
57
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
58
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
58
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
59
59
  * For more information, please check the
60
60
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
61
61
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -63,7 +63,7 @@ export declare class RecommendationServiceClient {
63
63
  * HTTP implementation. Load only fallback version and pass it to the constructor:
64
64
  * ```
65
65
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
66
- * const client = new RecommendationServiceClient({fallback: 'rest'}, gax);
66
+ * const client = new RecommendationServiceClient({fallback: true}, gax);
67
67
  * ```
68
68
  */
69
69
  constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
@@ -123,15 +123,15 @@ export declare class RecommendationServiceClient {
123
123
  * write request is required for event logging.
124
124
  *
125
125
  * Don't set
126
- * {@link google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
126
+ * {@link protos.google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
127
127
  * or
128
- * {@link google.cloud.discoveryengine.v1beta.UserInfo.user_id|UserEvent.user_info.user_id}
128
+ * {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_id|UserEvent.user_info.user_id}
129
129
  * to the same fixed ID for different users. If you are trying to receive
130
130
  * non-personalized recommendations (not recommended; this can negatively
131
131
  * impact model performance), instead set
132
- * {@link google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
132
+ * {@link protos.google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
133
133
  * to a random unique ID and leave
134
- * {@link google.cloud.discoveryengine.v1beta.UserInfo.user_id|UserEvent.user_info.user_id}
134
+ * {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_id|UserEvent.user_info.user_id}
135
135
  * unset.
136
136
  * @param {number} request.pageSize
137
137
  * Maximum number of results to return. Set this property
@@ -152,11 +152,11 @@ export declare class RecommendationServiceClient {
152
152
  * If your filter blocks all results, the API will return generic
153
153
  * (unfiltered) popular Documents. If you only want results strictly matching
154
154
  * the filters, set `strictFiltering` to True in
155
- * {@link google.cloud.discoveryengine.v1beta.RecommendRequest.params|RecommendRequest.params}
155
+ * {@link protos.google.cloud.discoveryengine.v1beta.RecommendRequest.params|RecommendRequest.params}
156
156
  * to receive empty results instead.
157
157
  *
158
158
  * Note that the API will never return
159
- * {@link google.cloud.discoveryengine.v1beta.Document|Document}s with
159
+ * {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s with
160
160
  * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
161
161
  * @param {boolean} request.validateOnly
162
162
  * Use validate only mode for this recommendation query. If set to true, a
@@ -170,10 +170,10 @@ export declare class RecommendationServiceClient {
170
170
  *
171
171
  * * `returnDocument`: Boolean. If set to true, the associated Document
172
172
  * object will be returned in
173
- * {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document|RecommendResponse.RecommendationResult.document}.
173
+ * {@link protos.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document|RecommendResponse.RecommendationResult.document}.
174
174
  * * `returnScore`: Boolean. If set to true, the recommendation 'score'
175
175
  * corresponding to each returned Document will be set in
176
- * {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata|RecommendResponse.RecommendationResult.metadata}.
176
+ * {@link protos.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata|RecommendResponse.RecommendationResult.metadata}.
177
177
  * The given 'score' indicates the probability of a Document conversion
178
178
  * given the user's context and history.
179
179
  * * `strictFiltering`: Boolean. True by default. If set to false, the service
@@ -209,9 +209,8 @@ export declare class RecommendationServiceClient {
209
209
  * @param {object} [options]
210
210
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
211
211
  * @returns {Promise} - The promise which resolves to an array.
212
- * The first element of the array is an object representing {@link google.cloud.discoveryengine.v1beta.RecommendResponse | RecommendResponse}.
213
- * Please see the
214
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
212
+ * The first element of the array is an object representing {@link protos.google.cloud.discoveryengine.v1beta.RecommendResponse|RecommendResponse}.
213
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
215
214
  * for more details and examples.
216
215
  * @example <caption>include:samples/generated/v1beta/recommendation_service.recommend.js</caption>
217
216
  * region_tag:discoveryengine_v1beta_generated_RecommendationService_Recommend_async
@@ -223,6 +222,57 @@ export declare class RecommendationServiceClient {
223
222
  ]>;
224
223
  recommend(request: protos.google.cloud.discoveryengine.v1beta.IRecommendRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1beta.IRecommendResponse, protos.google.cloud.discoveryengine.v1beta.IRecommendRequest | null | undefined, {} | null | undefined>): void;
225
224
  recommend(request: protos.google.cloud.discoveryengine.v1beta.IRecommendRequest, callback: Callback<protos.google.cloud.discoveryengine.v1beta.IRecommendResponse, protos.google.cloud.discoveryengine.v1beta.IRecommendRequest | null | undefined, {} | null | undefined>): void;
225
+ /**
226
+ * Gets information about a location.
227
+ *
228
+ * @param {Object} request
229
+ * The request object that will be sent.
230
+ * @param {string} request.name
231
+ * Resource name for the location.
232
+ * @param {object} [options]
233
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
234
+ * @returns {Promise} - The promise which resolves to an array.
235
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
236
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
237
+ * for more details and examples.
238
+ * @example
239
+ * ```
240
+ * const [response] = await client.getLocation(request);
241
+ * ```
242
+ */
243
+ 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>;
244
+ /**
245
+ * Lists information about the supported locations for this service. Returns an iterable object.
246
+ *
247
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
248
+ * @param {Object} request
249
+ * The request object that will be sent.
250
+ * @param {string} request.name
251
+ * The resource that owns the locations collection, if applicable.
252
+ * @param {string} request.filter
253
+ * The standard list filter.
254
+ * @param {number} request.pageSize
255
+ * The standard list page size.
256
+ * @param {string} request.pageToken
257
+ * The standard list page token.
258
+ * @param {object} [options]
259
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
260
+ * @returns {Object}
261
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
262
+ * When you iterate the returned iterable, each element will be an object representing
263
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
264
+ * so you can stop the iteration when you don't need more results.
265
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
266
+ * for more details and examples.
267
+ * @example
268
+ * ```
269
+ * const iterable = client.listLocationsAsync(request);
270
+ * for await (const response of iterable) {
271
+ * // process response
272
+ * }
273
+ * ```
274
+ */
275
+ listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
226
276
  /**
227
277
  * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
228
278
  *
@@ -283,6 +333,57 @@ export declare class RecommendationServiceClient {
283
333
  * @returns {string} A string representing the document.
284
334
  */
285
335
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;
336
+ /**
337
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
338
+ *
339
+ * @param {string} project
340
+ * @param {string} location
341
+ * @param {string} collection
342
+ * @param {string} data_store
343
+ * @param {string} conversation
344
+ * @returns {string} Resource name string.
345
+ */
346
+ projectLocationCollectionDataStoreConversationPath(project: string, location: string, collection: string, dataStore: string, conversation: string): string;
347
+ /**
348
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
349
+ *
350
+ * @param {string} projectLocationCollectionDataStoreConversationName
351
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
352
+ * @returns {string} A string representing the project.
353
+ */
354
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
355
+ /**
356
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
357
+ *
358
+ * @param {string} projectLocationCollectionDataStoreConversationName
359
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
360
+ * @returns {string} A string representing the location.
361
+ */
362
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
363
+ /**
364
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
365
+ *
366
+ * @param {string} projectLocationCollectionDataStoreConversationName
367
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
368
+ * @returns {string} A string representing the collection.
369
+ */
370
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
371
+ /**
372
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
373
+ *
374
+ * @param {string} projectLocationCollectionDataStoreConversationName
375
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
376
+ * @returns {string} A string representing the data_store.
377
+ */
378
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
379
+ /**
380
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
381
+ *
382
+ * @param {string} projectLocationCollectionDataStoreConversationName
383
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
384
+ * @returns {string} A string representing the conversation.
385
+ */
386
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
286
387
  /**
287
388
  * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
288
389
  *
@@ -436,6 +537,48 @@ export declare class RecommendationServiceClient {
436
537
  * @returns {string} A string representing the document.
437
538
  */
438
539
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;
540
+ /**
541
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
542
+ *
543
+ * @param {string} project
544
+ * @param {string} location
545
+ * @param {string} data_store
546
+ * @param {string} conversation
547
+ * @returns {string} Resource name string.
548
+ */
549
+ projectLocationDataStoreConversationPath(project: string, location: string, dataStore: string, conversation: string): string;
550
+ /**
551
+ * Parse the project from ProjectLocationDataStoreConversation resource.
552
+ *
553
+ * @param {string} projectLocationDataStoreConversationName
554
+ * A fully-qualified path representing project_location_data_store_conversation resource.
555
+ * @returns {string} A string representing the project.
556
+ */
557
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
558
+ /**
559
+ * Parse the location from ProjectLocationDataStoreConversation resource.
560
+ *
561
+ * @param {string} projectLocationDataStoreConversationName
562
+ * A fully-qualified path representing project_location_data_store_conversation resource.
563
+ * @returns {string} A string representing the location.
564
+ */
565
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
566
+ /**
567
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
568
+ *
569
+ * @param {string} projectLocationDataStoreConversationName
570
+ * A fully-qualified path representing project_location_data_store_conversation resource.
571
+ * @returns {string} A string representing the data_store.
572
+ */
573
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
574
+ /**
575
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
576
+ *
577
+ * @param {string} projectLocationDataStoreConversationName
578
+ * A fully-qualified path representing project_location_data_store_conversation resource.
579
+ * @returns {string} A string representing the conversation.
580
+ */
581
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
439
582
  /**
440
583
  * Return a fully-qualified projectLocationDataStoreSchema resource name string.
441
584
  *
@@ -60,8 +60,7 @@ class RecommendationServiceClient {
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 RecommendationServiceClient {
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 RecommendationServiceClient({fallback: 'rest'}, gax);
71
+ * const client = new RecommendationServiceClient({fallback: true}, gax);
73
72
  * ```
74
73
  */
75
74
  constructor(opts, gaxInstance) {
@@ -116,6 +115,7 @@ class RecommendationServiceClient {
116
115
  if (servicePath === staticMembers.servicePath) {
117
116
  this.auth.defaultScopes = staticMembers.scopes;
118
117
  }
118
+ this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
119
119
  // Determine the client header string.
120
120
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
121
121
  if (typeof process !== 'undefined' && 'versions' in process) {
@@ -127,7 +127,7 @@ class RecommendationServiceClient {
127
127
  if (!opts.fallback) {
128
128
  clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
129
129
  }
130
- else if (opts.fallback === 'rest') {
130
+ else {
131
131
  clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
132
132
  }
133
133
  if (opts.libName && opts.libVersion) {
@@ -140,9 +140,11 @@ class RecommendationServiceClient {
140
140
  // Create useful helper objects for these.
141
141
  this.pathTemplates = {
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
  projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
147
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
146
148
  projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
147
149
  projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
148
150
  };
@@ -259,6 +261,61 @@ class RecommendationServiceClient {
259
261
  this.initialize();
260
262
  return this.innerApiCalls.recommend(request, options, callback);
261
263
  }
264
+ /**
265
+ * Gets information about a location.
266
+ *
267
+ * @param {Object} request
268
+ * The request object that will be sent.
269
+ * @param {string} request.name
270
+ * Resource name for the location.
271
+ * @param {object} [options]
272
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
273
+ * @returns {Promise} - The promise which resolves to an array.
274
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
275
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
276
+ * for more details and examples.
277
+ * @example
278
+ * ```
279
+ * const [response] = await client.getLocation(request);
280
+ * ```
281
+ */
282
+ getLocation(request, options, callback) {
283
+ return this.locationsClient.getLocation(request, options, callback);
284
+ }
285
+ /**
286
+ * Lists information about the supported locations for this service. Returns an iterable object.
287
+ *
288
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
289
+ * @param {Object} request
290
+ * The request object that will be sent.
291
+ * @param {string} request.name
292
+ * The resource that owns the locations collection, if applicable.
293
+ * @param {string} request.filter
294
+ * The standard list filter.
295
+ * @param {number} request.pageSize
296
+ * The standard list page size.
297
+ * @param {string} request.pageToken
298
+ * The standard list page token.
299
+ * @param {object} [options]
300
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
301
+ * @returns {Object}
302
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
303
+ * When you iterate the returned iterable, each element will be an object representing
304
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
305
+ * so you can stop the iteration when you don't need more results.
306
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
307
+ * for more details and examples.
308
+ * @example
309
+ * ```
310
+ * const iterable = client.listLocationsAsync(request);
311
+ * for await (const response of iterable) {
312
+ * // process response
313
+ * }
314
+ * ```
315
+ */
316
+ listLocationsAsync(request, options) {
317
+ return this.locationsClient.listLocationsAsync(request, options);
318
+ }
262
319
  // --------------------
263
320
  // -- Path templates --
264
321
  // --------------------
@@ -343,6 +400,75 @@ class RecommendationServiceClient {
343
400
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
344
401
  return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
345
402
  }
403
+ /**
404
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
405
+ *
406
+ * @param {string} project
407
+ * @param {string} location
408
+ * @param {string} collection
409
+ * @param {string} data_store
410
+ * @param {string} conversation
411
+ * @returns {string} Resource name string.
412
+ */
413
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
414
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
415
+ project: project,
416
+ location: location,
417
+ collection: collection,
418
+ data_store: dataStore,
419
+ conversation: conversation,
420
+ });
421
+ }
422
+ /**
423
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
424
+ *
425
+ * @param {string} projectLocationCollectionDataStoreConversationName
426
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
427
+ * @returns {string} A string representing the project.
428
+ */
429
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
430
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
431
+ }
432
+ /**
433
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
434
+ *
435
+ * @param {string} projectLocationCollectionDataStoreConversationName
436
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
437
+ * @returns {string} A string representing the location.
438
+ */
439
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
440
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
441
+ }
442
+ /**
443
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
444
+ *
445
+ * @param {string} projectLocationCollectionDataStoreConversationName
446
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
447
+ * @returns {string} A string representing the collection.
448
+ */
449
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
450
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
451
+ }
452
+ /**
453
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
454
+ *
455
+ * @param {string} projectLocationCollectionDataStoreConversationName
456
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
457
+ * @returns {string} A string representing the data_store.
458
+ */
459
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
460
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
461
+ }
462
+ /**
463
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
464
+ *
465
+ * @param {string} projectLocationCollectionDataStoreConversationName
466
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
467
+ * @returns {string} A string representing the conversation.
468
+ */
469
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
470
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
471
+ }
346
472
  /**
347
473
  * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
348
474
  *
@@ -550,6 +676,63 @@ class RecommendationServiceClient {
550
676
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
551
677
  return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
552
678
  }
679
+ /**
680
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
681
+ *
682
+ * @param {string} project
683
+ * @param {string} location
684
+ * @param {string} data_store
685
+ * @param {string} conversation
686
+ * @returns {string} Resource name string.
687
+ */
688
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
689
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
690
+ project: project,
691
+ location: location,
692
+ data_store: dataStore,
693
+ conversation: conversation,
694
+ });
695
+ }
696
+ /**
697
+ * Parse the project from ProjectLocationDataStoreConversation resource.
698
+ *
699
+ * @param {string} projectLocationDataStoreConversationName
700
+ * A fully-qualified path representing project_location_data_store_conversation resource.
701
+ * @returns {string} A string representing the project.
702
+ */
703
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
704
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
705
+ }
706
+ /**
707
+ * Parse the location from ProjectLocationDataStoreConversation resource.
708
+ *
709
+ * @param {string} projectLocationDataStoreConversationName
710
+ * A fully-qualified path representing project_location_data_store_conversation resource.
711
+ * @returns {string} A string representing the location.
712
+ */
713
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
714
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
715
+ }
716
+ /**
717
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
718
+ *
719
+ * @param {string} projectLocationDataStoreConversationName
720
+ * A fully-qualified path representing project_location_data_store_conversation resource.
721
+ * @returns {string} A string representing the data_store.
722
+ */
723
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
724
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
725
+ }
726
+ /**
727
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
728
+ *
729
+ * @param {string} projectLocationDataStoreConversationName
730
+ * A fully-qualified path representing project_location_data_store_conversation resource.
731
+ * @returns {string} A string representing the conversation.
732
+ */
733
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
734
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
735
+ }
553
736
  /**
554
737
  * Return a fully-qualified projectLocationDataStoreSchema resource name string.
555
738
  *
@@ -675,6 +858,7 @@ class RecommendationServiceClient {
675
858
  return this.recommendationServiceStub.then(stub => {
676
859
  this._terminated = true;
677
860
  stub.close();
861
+ this.locationsClient.close();
678
862
  });
679
863
  }
680
864
  return Promise.resolve();