@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, LROperation } from 'google-gax';
2
+ import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, LocationsClient, LocationProtos } from 'google-gax';
3
3
  import * as protos from '../../protos/protos';
4
4
  /**
5
5
  * Service for ingesting end user actions on a website to Discovery Engine API.
@@ -20,6 +20,7 @@ export declare class UserEventServiceClient {
20
20
  innerApiCalls: {
21
21
  [name: string]: Function;
22
22
  };
23
+ locationsClient: LocationsClient;
23
24
  pathTemplates: {
24
25
  [name: string]: gax.PathTemplate;
25
26
  };
@@ -55,8 +56,7 @@ export declare class UserEventServiceClient {
55
56
  * API remote host.
56
57
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
57
58
  * Follows the structure of {@link gapicConfig}.
58
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
59
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
59
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
60
60
  * For more information, please check the
61
61
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
62
62
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -64,7 +64,7 @@ export declare class UserEventServiceClient {
64
64
  * HTTP implementation. Load only fallback version and pass it to the constructor:
65
65
  * ```
66
66
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
67
- * const client = new UserEventServiceClient({fallback: 'rest'}, gax);
67
+ * const client = new UserEventServiceClient({fallback: true}, gax);
68
68
  * ```
69
69
  */
70
70
  constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
@@ -119,9 +119,8 @@ export declare class UserEventServiceClient {
119
119
  * @param {object} [options]
120
120
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
121
121
  * @returns {Promise} - The promise which resolves to an array.
122
- * The first element of the array is an object representing {@link google.cloud.discoveryengine.v1.UserEvent | UserEvent}.
123
- * Please see the
124
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
122
+ * The first element of the array is an object representing {@link protos.google.cloud.discoveryengine.v1.UserEvent|UserEvent}.
123
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
125
124
  * for more details and examples.
126
125
  * @example <caption>include:samples/generated/v1/user_event_service.write_user_event.js</caption>
127
126
  * region_tag:discoveryengine_v1_generated_UserEventService_WriteUserEvent_async
@@ -135,7 +134,7 @@ export declare class UserEventServiceClient {
135
134
  writeUserEvent(request: protos.google.cloud.discoveryengine.v1.IWriteUserEventRequest, callback: Callback<protos.google.cloud.discoveryengine.v1.IUserEvent, protos.google.cloud.discoveryengine.v1.IWriteUserEventRequest | null | undefined, {} | null | undefined>): void;
136
135
  /**
137
136
  * Writes a single user event from the browser. This uses a GET request to
138
- * due to browser restriction of POST-ing to a 3rd party domain.
137
+ * due to browser restriction of POST-ing to a third-party domain.
139
138
  *
140
139
  * This method is used only by the Discovery Engine API JavaScript pixel and
141
140
  * Google Tag Manager. Users should not call this method directly.
@@ -151,7 +150,7 @@ export declare class UserEventServiceClient {
151
150
  * @param {string} request.uri
152
151
  * The URL including cgi-parameters but excluding the hash fragment with a
153
152
  * length limit of 5,000 characters. This is often more useful than the
154
- * referer URL, because many browsers only send the domain for 3rd party
153
+ * referer URL, because many browsers only send the domain for third-party
155
154
  * requests.
156
155
  * @param {number} request.ets
157
156
  * The event timestamp in milliseconds. This prevents browser caching of
@@ -160,9 +159,8 @@ export declare class UserEventServiceClient {
160
159
  * @param {object} [options]
161
160
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
162
161
  * @returns {Promise} - The promise which resolves to an array.
163
- * The first element of the array is an object representing {@link google.api.HttpBody | HttpBody}.
164
- * Please see the
165
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
162
+ * The first element of the array is an object representing {@link protos.google.api.HttpBody|HttpBody}.
163
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
166
164
  * for more details and examples.
167
165
  * @example <caption>include:samples/generated/v1/user_event_service.collect_user_event.js</caption>
168
166
  * region_tag:discoveryengine_v1_generated_UserEventService_CollectUserEvent_async
@@ -186,11 +184,11 @@ export declare class UserEventServiceClient {
186
184
  * @param {Object} request
187
185
  * The request object that will be sent.
188
186
  * @param {google.cloud.discoveryengine.v1.ImportUserEventsRequest.InlineSource} request.inlineSource
189
- * Required. The Inline source for the input content for UserEvents.
187
+ * The Inline source for the input content for UserEvents.
190
188
  * @param {google.cloud.discoveryengine.v1.GcsSource} request.gcsSource
191
- * Required. Cloud Storage location for the input content.
189
+ * Cloud Storage location for the input content.
192
190
  * @param {google.cloud.discoveryengine.v1.BigQuerySource} request.bigquerySource
193
- * Required. BigQuery input source.
191
+ * BigQuery input source.
194
192
  * @param {string} request.parent
195
193
  * Required. Parent DataStore resource name, of the form
196
194
  * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`
@@ -203,8 +201,7 @@ export declare class UserEventServiceClient {
203
201
  * The first element of the array is an object representing
204
202
  * a long running operation. Its `promise()` method returns a promise
205
203
  * you can `await` for.
206
- * Please see the
207
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
204
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
208
205
  * for more details and examples.
209
206
  * @example <caption>include:samples/generated/v1/user_event_service.import_user_events.js</caption>
210
207
  * region_tag:discoveryengine_v1_generated_UserEventService_ImportUserEvents_async
@@ -222,13 +219,63 @@ export declare class UserEventServiceClient {
222
219
  * The operation name that will be passed.
223
220
  * @returns {Promise} - The promise which resolves to an object.
224
221
  * The decoded operation object has result and metadata field to get information from.
225
- * Please see the
226
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
222
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
227
223
  * for more details and examples.
228
224
  * @example <caption>include:samples/generated/v1/user_event_service.import_user_events.js</caption>
229
225
  * region_tag:discoveryengine_v1_generated_UserEventService_ImportUserEvents_async
230
226
  */
231
227
  checkImportUserEventsProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1.ImportUserEventsResponse, protos.google.cloud.discoveryengine.v1.ImportUserEventsMetadata>>;
228
+ /**
229
+ * Gets information about a location.
230
+ *
231
+ * @param {Object} request
232
+ * The request object that will be sent.
233
+ * @param {string} request.name
234
+ * Resource name for the location.
235
+ * @param {object} [options]
236
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
237
+ * @returns {Promise} - The promise which resolves to an array.
238
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
239
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
240
+ * for more details and examples.
241
+ * @example
242
+ * ```
243
+ * const [response] = await client.getLocation(request);
244
+ * ```
245
+ */
246
+ 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>;
247
+ /**
248
+ * Lists information about the supported locations for this service. Returns an iterable object.
249
+ *
250
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
251
+ * @param {Object} request
252
+ * The request object that will be sent.
253
+ * @param {string} request.name
254
+ * The resource that owns the locations collection, if applicable.
255
+ * @param {string} request.filter
256
+ * The standard list filter.
257
+ * @param {number} request.pageSize
258
+ * The standard list page size.
259
+ * @param {string} request.pageToken
260
+ * The standard list page token.
261
+ * @param {object} [options]
262
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
263
+ * @returns {Object}
264
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
265
+ * When you iterate the returned iterable, each element will be an object representing
266
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
267
+ * so you can stop the iteration when you don't need more results.
268
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
269
+ * for more details and examples.
270
+ * @example
271
+ * ```
272
+ * const iterable = client.listLocationsAsync(request);
273
+ * for await (const response of iterable) {
274
+ * // process response
275
+ * }
276
+ * ```
277
+ */
278
+ listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
232
279
  /**
233
280
  * Gets the latest state of a long-running operation. Clients can use this
234
281
  * method to poll the operation result at intervals as recommended by the API
@@ -451,6 +498,57 @@ export declare class UserEventServiceClient {
451
498
  * @returns {string} A string representing the document.
452
499
  */
453
500
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;
501
+ /**
502
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
503
+ *
504
+ * @param {string} project
505
+ * @param {string} location
506
+ * @param {string} collection
507
+ * @param {string} data_store
508
+ * @param {string} conversation
509
+ * @returns {string} Resource name string.
510
+ */
511
+ projectLocationCollectionDataStoreConversationPath(project: string, location: string, collection: string, dataStore: string, conversation: string): string;
512
+ /**
513
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
514
+ *
515
+ * @param {string} projectLocationCollectionDataStoreConversationName
516
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
517
+ * @returns {string} A string representing the project.
518
+ */
519
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
520
+ /**
521
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
522
+ *
523
+ * @param {string} projectLocationCollectionDataStoreConversationName
524
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
525
+ * @returns {string} A string representing the location.
526
+ */
527
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
528
+ /**
529
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
530
+ *
531
+ * @param {string} projectLocationCollectionDataStoreConversationName
532
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
533
+ * @returns {string} A string representing the collection.
534
+ */
535
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
536
+ /**
537
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
538
+ *
539
+ * @param {string} projectLocationCollectionDataStoreConversationName
540
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
541
+ * @returns {string} A string representing the data_store.
542
+ */
543
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
544
+ /**
545
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
546
+ *
547
+ * @param {string} projectLocationCollectionDataStoreConversationName
548
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
549
+ * @returns {string} A string representing the conversation.
550
+ */
551
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
454
552
  /**
455
553
  * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
456
554
  *
@@ -586,6 +684,48 @@ export declare class UserEventServiceClient {
586
684
  * @returns {string} A string representing the document.
587
685
  */
588
686
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;
687
+ /**
688
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
689
+ *
690
+ * @param {string} project
691
+ * @param {string} location
692
+ * @param {string} data_store
693
+ * @param {string} conversation
694
+ * @returns {string} Resource name string.
695
+ */
696
+ projectLocationDataStoreConversationPath(project: string, location: string, dataStore: string, conversation: string): string;
697
+ /**
698
+ * Parse the project from ProjectLocationDataStoreConversation resource.
699
+ *
700
+ * @param {string} projectLocationDataStoreConversationName
701
+ * A fully-qualified path representing project_location_data_store_conversation resource.
702
+ * @returns {string} A string representing the project.
703
+ */
704
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
705
+ /**
706
+ * Parse the location from ProjectLocationDataStoreConversation resource.
707
+ *
708
+ * @param {string} projectLocationDataStoreConversationName
709
+ * A fully-qualified path representing project_location_data_store_conversation resource.
710
+ * @returns {string} A string representing the location.
711
+ */
712
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
713
+ /**
714
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
715
+ *
716
+ * @param {string} projectLocationDataStoreConversationName
717
+ * A fully-qualified path representing project_location_data_store_conversation resource.
718
+ * @returns {string} A string representing the data_store.
719
+ */
720
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
721
+ /**
722
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
723
+ *
724
+ * @param {string} projectLocationDataStoreConversationName
725
+ * A fully-qualified path representing project_location_data_store_conversation resource.
726
+ * @returns {string} A string representing the conversation.
727
+ */
728
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
589
729
  /**
590
730
  * Return a fully-qualified projectLocationDataStoreSchema resource name string.
591
731
  *
@@ -60,8 +60,7 @@ class UserEventServiceClient {
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 UserEventServiceClient {
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 UserEventServiceClient({fallback: 'rest'}, gax);
71
+ * const client = new UserEventServiceClient({fallback: true}, gax);
73
72
  * ```
74
73
  */
75
74
  constructor(opts, gaxInstance) {
@@ -115,6 +114,7 @@ class UserEventServiceClient {
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 UserEventServiceClient {
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,9 +140,11 @@ class UserEventServiceClient {
140
140
  this.pathTemplates = {
141
141
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
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
  projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
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
  };
148
150
  const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
@@ -153,7 +155,7 @@ class UserEventServiceClient {
153
155
  auth: this.auth,
154
156
  grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
155
157
  };
156
- if (opts.fallback === 'rest') {
158
+ if (opts.fallback) {
157
159
  lroOptions.protoJson = protoFilesRoot;
158
160
  lroOptions.httpRules = [
159
161
  {
@@ -172,6 +174,15 @@ class UserEventServiceClient {
172
174
  {
173
175
  get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
174
176
  },
177
+ {
178
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
179
+ },
180
+ {
181
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
182
+ },
183
+ {
184
+ get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
185
+ },
175
186
  {
176
187
  get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
177
188
  },
@@ -201,9 +212,18 @@ class UserEventServiceClient {
201
212
  {
202
213
  get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
203
214
  },
215
+ {
216
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
217
+ },
218
+ {
219
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
220
+ },
204
221
  {
205
222
  get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
206
223
  },
224
+ {
225
+ get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
226
+ },
207
227
  { get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
208
228
  {
209
229
  get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
@@ -391,8 +411,7 @@ class UserEventServiceClient {
391
411
  * The operation name that will be passed.
392
412
  * @returns {Promise} - The promise which resolves to an object.
393
413
  * The decoded operation object has result and metadata field to get information from.
394
- * Please see the
395
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
414
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
396
415
  * for more details and examples.
397
416
  * @example <caption>include:samples/generated/v1/user_event_service.import_user_events.js</caption>
398
417
  * region_tag:discoveryengine_v1_generated_UserEventService_ImportUserEvents_async
@@ -403,6 +422,61 @@ class UserEventServiceClient {
403
422
  const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importUserEvents, this._gaxModule.createDefaultBackoffSettings());
404
423
  return decodeOperation;
405
424
  }
425
+ /**
426
+ * Gets information about a location.
427
+ *
428
+ * @param {Object} request
429
+ * The request object that will be sent.
430
+ * @param {string} request.name
431
+ * Resource name for the location.
432
+ * @param {object} [options]
433
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
434
+ * @returns {Promise} - The promise which resolves to an array.
435
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
436
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
437
+ * for more details and examples.
438
+ * @example
439
+ * ```
440
+ * const [response] = await client.getLocation(request);
441
+ * ```
442
+ */
443
+ getLocation(request, options, callback) {
444
+ return this.locationsClient.getLocation(request, options, callback);
445
+ }
446
+ /**
447
+ * Lists information about the supported locations for this service. Returns an iterable object.
448
+ *
449
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
450
+ * @param {Object} request
451
+ * The request object that will be sent.
452
+ * @param {string} request.name
453
+ * The resource that owns the locations collection, if applicable.
454
+ * @param {string} request.filter
455
+ * The standard list filter.
456
+ * @param {number} request.pageSize
457
+ * The standard list page size.
458
+ * @param {string} request.pageToken
459
+ * The standard list page token.
460
+ * @param {object} [options]
461
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
462
+ * @returns {Object}
463
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
464
+ * When you iterate the returned iterable, each element will be an object representing
465
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
466
+ * so you can stop the iteration when you don't need more results.
467
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
468
+ * for more details and examples.
469
+ * @example
470
+ * ```
471
+ * const iterable = client.listLocationsAsync(request);
472
+ * for await (const response of iterable) {
473
+ * // process response
474
+ * }
475
+ * ```
476
+ */
477
+ listLocationsAsync(request, options) {
478
+ return this.locationsClient.listLocationsAsync(request, options);
479
+ }
406
480
  /**
407
481
  * Gets the latest state of a long-running operation. Clients can use this
408
482
  * method to poll the operation result at intervals as recommended by the API
@@ -672,6 +746,75 @@ class UserEventServiceClient {
672
746
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
673
747
  return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
674
748
  }
749
+ /**
750
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
751
+ *
752
+ * @param {string} project
753
+ * @param {string} location
754
+ * @param {string} collection
755
+ * @param {string} data_store
756
+ * @param {string} conversation
757
+ * @returns {string} Resource name string.
758
+ */
759
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
760
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
761
+ project: project,
762
+ location: location,
763
+ collection: collection,
764
+ data_store: dataStore,
765
+ conversation: conversation,
766
+ });
767
+ }
768
+ /**
769
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
770
+ *
771
+ * @param {string} projectLocationCollectionDataStoreConversationName
772
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
773
+ * @returns {string} A string representing the project.
774
+ */
775
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
776
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
777
+ }
778
+ /**
779
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
780
+ *
781
+ * @param {string} projectLocationCollectionDataStoreConversationName
782
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
783
+ * @returns {string} A string representing the location.
784
+ */
785
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
786
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
787
+ }
788
+ /**
789
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
790
+ *
791
+ * @param {string} projectLocationCollectionDataStoreConversationName
792
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
793
+ * @returns {string} A string representing the collection.
794
+ */
795
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
796
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
797
+ }
798
+ /**
799
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
800
+ *
801
+ * @param {string} projectLocationCollectionDataStoreConversationName
802
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
803
+ * @returns {string} A string representing the data_store.
804
+ */
805
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
806
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
807
+ }
808
+ /**
809
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
810
+ *
811
+ * @param {string} projectLocationCollectionDataStoreConversationName
812
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
813
+ * @returns {string} A string representing the conversation.
814
+ */
815
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
816
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
817
+ }
675
818
  /**
676
819
  * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
677
820
  *
@@ -855,6 +998,63 @@ class UserEventServiceClient {
855
998
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
856
999
  return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
857
1000
  }
1001
+ /**
1002
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1003
+ *
1004
+ * @param {string} project
1005
+ * @param {string} location
1006
+ * @param {string} data_store
1007
+ * @param {string} conversation
1008
+ * @returns {string} Resource name string.
1009
+ */
1010
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1011
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1012
+ project: project,
1013
+ location: location,
1014
+ data_store: dataStore,
1015
+ conversation: conversation,
1016
+ });
1017
+ }
1018
+ /**
1019
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1020
+ *
1021
+ * @param {string} projectLocationDataStoreConversationName
1022
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1023
+ * @returns {string} A string representing the project.
1024
+ */
1025
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1026
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1027
+ }
1028
+ /**
1029
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1030
+ *
1031
+ * @param {string} projectLocationDataStoreConversationName
1032
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1033
+ * @returns {string} A string representing the location.
1034
+ */
1035
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1036
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1037
+ }
1038
+ /**
1039
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1040
+ *
1041
+ * @param {string} projectLocationDataStoreConversationName
1042
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1043
+ * @returns {string} A string representing the data_store.
1044
+ */
1045
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1046
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1047
+ }
1048
+ /**
1049
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1050
+ *
1051
+ * @param {string} projectLocationDataStoreConversationName
1052
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1053
+ * @returns {string} A string representing the conversation.
1054
+ */
1055
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1056
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1057
+ }
858
1058
  /**
859
1059
  * Return a fully-qualified projectLocationDataStoreSchema resource name string.
860
1060
  *
@@ -923,6 +1123,7 @@ class UserEventServiceClient {
923
1123
  return this.userEventServiceStub.then(stub => {
924
1124
  this._terminated = true;
925
1125
  stub.close();
1126
+ this.locationsClient.close();
926
1127
  this.operationsClient.close();
927
1128
  });
928
1129
  }