@google-cloud/discoveryengine 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +26 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +155 -0
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +134 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +138 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +306 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +221 -0
  12. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
  13. package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +851 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
  18. package/build/protos/protos.d.ts +12587 -7
  19. package/build/protos/protos.js +34918 -3126
  20. package/build/protos/protos.json +3458 -5
  21. package/build/src/index.d.ts +3 -1
  22. package/build/src/index.js +4 -1
  23. package/build/src/v1alpha/completion_service_client.d.ts +603 -0
  24. package/build/src/v1alpha/completion_service_client.js +843 -0
  25. package/build/src/v1alpha/completion_service_client_config.json +43 -0
  26. package/build/src/v1alpha/conversational_search_service_client.d.ts +998 -0
  27. package/build/src/v1alpha/conversational_search_service_client.js +1275 -0
  28. package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
  29. package/build/src/v1alpha/document_service_client.d.ts +1140 -0
  30. package/build/src/v1alpha/document_service_client.js +1393 -0
  31. package/build/src/v1alpha/document_service_client_config.json +82 -0
  32. package/build/src/v1alpha/index.d.ts +8 -0
  33. package/build/src/v1alpha/index.js +37 -0
  34. package/build/src/v1alpha/recommendation_service_client.d.ts +735 -0
  35. package/build/src/v1alpha/recommendation_service_client.js +938 -0
  36. package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
  37. package/build/src/v1alpha/schema_service_client.d.ts +935 -0
  38. package/build/src/v1alpha/schema_service_client.js +1327 -0
  39. package/build/src/v1alpha/schema_service_client_config.json +63 -0
  40. package/build/src/v1alpha/search_service_client.d.ts +1208 -0
  41. package/build/src/v1alpha/search_service_client.js +1432 -0
  42. package/build/src/v1alpha/search_service_client_config.json +43 -0
  43. package/build/src/v1alpha/site_search_engine_service_client.d.ts +704 -0
  44. package/build/src/v1alpha/site_search_engine_service_client.js +1087 -0
  45. package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
  46. package/build/src/v1alpha/user_event_service_client.d.ts +853 -0
  47. package/build/src/v1alpha/user_event_service_client.js +1174 -0
  48. package/build/src/v1alpha/user_event_service_client_config.json +67 -0
  49. package/package.json +3 -3
@@ -0,0 +1,1174 @@
1
+ "use strict";
2
+ // Copyright 2023 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // ** This file is automatically generated by gapic-generator-typescript. **
17
+ // ** https://github.com/googleapis/gapic-generator-typescript **
18
+ // ** All changes to this file may be overwritten. **
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.UserEventServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1alpha/user_event_service_client_config.json`.
25
+ * This file defines retry strategy and timeouts for all API methods in this library.
26
+ */
27
+ const gapicConfig = require("./user_event_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Service for ingesting end user actions on a website to Discovery Engine API.
31
+ * @class
32
+ * @memberof v1alpha
33
+ */
34
+ class UserEventServiceClient {
35
+ /**
36
+ * Construct an instance of UserEventServiceClient.
37
+ *
38
+ * @param {object} [options] - The configuration object.
39
+ * The options accepted by the constructor are described in detail
40
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
41
+ * The common options are:
42
+ * @param {object} [options.credentials] - Credentials object.
43
+ * @param {string} [options.credentials.client_email]
44
+ * @param {string} [options.credentials.private_key]
45
+ * @param {string} [options.email] - Account email address. Required when
46
+ * using a .pem or .p12 keyFilename.
47
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
48
+ * .p12 key downloaded from the Google Developers Console. If you provide
49
+ * a path to a JSON file, the projectId option below is not necessary.
50
+ * NOTE: .pem and .p12 require you to specify options.email as well.
51
+ * @param {number} [options.port] - The port on which to connect to
52
+ * the remote host.
53
+ * @param {string} [options.projectId] - The project ID from the Google
54
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
55
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
56
+ * app is running in an environment which supports
57
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
58
+ * your project ID will be detected automatically.
59
+ * @param {string} [options.apiEndpoint] - The domain name of the
60
+ * API remote host.
61
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
62
+ * Follows the structure of {@link gapicConfig}.
63
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
64
+ * For more information, please check the
65
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
66
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
67
+ * need to avoid loading the default gRPC version and want to use the fallback
68
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
69
+ * ```
70
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
71
+ * const client = new UserEventServiceClient({fallback: true}, gax);
72
+ * ```
73
+ */
74
+ constructor(opts, gaxInstance) {
75
+ var _a, _b;
76
+ this._terminated = false;
77
+ this.descriptors = {
78
+ page: {},
79
+ stream: {},
80
+ longrunning: {},
81
+ batching: {},
82
+ };
83
+ // Ensure that options include all the required fields.
84
+ const staticMembers = this.constructor;
85
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || staticMembers.servicePath;
86
+ this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
87
+ const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
88
+ const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};
89
+ const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
90
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
91
+ // Request numeric enum values if REST transport is used.
92
+ opts.numericEnums = true;
93
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
94
+ if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
95
+ opts['scopes'] = staticMembers.scopes;
96
+ }
97
+ // Load google-gax module synchronously if needed
98
+ if (!gaxInstance) {
99
+ gaxInstance = require('google-gax');
100
+ }
101
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
102
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
103
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
104
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
105
+ // Save options to use in initialize() method.
106
+ this._opts = opts;
107
+ // Save the auth object to the client, for use by other methods.
108
+ this.auth = this._gaxGrpc.auth;
109
+ // Set useJWTAccessWithScope on the auth object.
110
+ this.auth.useJWTAccessWithScope = true;
111
+ // Set defaultServicePath on the auth object.
112
+ this.auth.defaultServicePath = staticMembers.servicePath;
113
+ // Set the default scopes in auth client if needed.
114
+ if (servicePath === staticMembers.servicePath) {
115
+ this.auth.defaultScopes = staticMembers.scopes;
116
+ }
117
+ this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
118
+ // Determine the client header string.
119
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
120
+ if (typeof process !== 'undefined' && 'versions' in process) {
121
+ clientHeader.push(`gl-node/${process.versions.node}`);
122
+ }
123
+ else {
124
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
125
+ }
126
+ if (!opts.fallback) {
127
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
128
+ }
129
+ else {
130
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
131
+ }
132
+ if (opts.libName && opts.libVersion) {
133
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
134
+ }
135
+ // Load the applicable protos.
136
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
137
+ // This API contains "path templates"; forward-slash-separated
138
+ // identifiers to uniquely identify resources within the API.
139
+ // Create useful helper objects for these.
140
+ this.pathTemplates = {
141
+ projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
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}'),
144
+ projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
145
+ projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
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}'),
148
+ projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
149
+ };
150
+ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
151
+ // This API contains "long-running operations", which return a
152
+ // an Operation object that allows for tracking of the operation,
153
+ // rather than holding a request open.
154
+ const lroOptions = {
155
+ auth: this.auth,
156
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
157
+ };
158
+ if (opts.fallback) {
159
+ lroOptions.protoJson = protoFilesRoot;
160
+ lroOptions.httpRules = [
161
+ {
162
+ selector: 'google.longrunning.Operations.GetOperation',
163
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
164
+ additional_bindings: [
165
+ {
166
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
167
+ },
168
+ {
169
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
170
+ },
171
+ {
172
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
173
+ },
174
+ {
175
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
176
+ },
177
+ {
178
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
179
+ },
180
+ {
181
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
182
+ },
183
+ {
184
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
185
+ },
186
+ {
187
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
188
+ },
189
+ {
190
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
191
+ },
192
+ {
193
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
194
+ },
195
+ { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
196
+ { get: '/v1alpha/{name=projects/*/operations/*}' },
197
+ ],
198
+ },
199
+ {
200
+ selector: 'google.longrunning.Operations.ListOperations',
201
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
202
+ additional_bindings: [
203
+ {
204
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
205
+ },
206
+ {
207
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
208
+ },
209
+ {
210
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
211
+ },
212
+ {
213
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
214
+ },
215
+ {
216
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
217
+ },
218
+ {
219
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
220
+ },
221
+ {
222
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
223
+ },
224
+ {
225
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
226
+ },
227
+ {
228
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
229
+ },
230
+ {
231
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
232
+ },
233
+ { get: '/v1alpha/{name=projects/*/locations/*}/operations' },
234
+ { get: '/v1alpha/{name=projects/*}/operations' },
235
+ ],
236
+ },
237
+ ];
238
+ }
239
+ this.operationsClient = this._gaxModule
240
+ .lro(lroOptions)
241
+ .operationsClient(opts);
242
+ const purgeUserEventsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse');
243
+ const purgeUserEventsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata');
244
+ const importUserEventsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse');
245
+ const importUserEventsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata');
246
+ this.descriptors.longrunning = {
247
+ purgeUserEvents: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeUserEventsResponse.decode.bind(purgeUserEventsResponse), purgeUserEventsMetadata.decode.bind(purgeUserEventsMetadata)),
248
+ importUserEvents: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importUserEventsResponse.decode.bind(importUserEventsResponse), importUserEventsMetadata.decode.bind(importUserEventsMetadata)),
249
+ };
250
+ // Put together the default options sent with requests.
251
+ this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.UserEventService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
252
+ // Set up a dictionary of "inner API calls"; the core implementation
253
+ // of calling the API is handled in `google-gax`, with this code
254
+ // merely providing the destination and request information.
255
+ this.innerApiCalls = {};
256
+ // Add a warn function to the client constructor so it can be easily tested.
257
+ this.warn = this._gaxModule.warn;
258
+ }
259
+ /**
260
+ * Initialize the client.
261
+ * Performs asynchronous operations (such as authentication) and prepares the client.
262
+ * This function will be called automatically when any class method is called for the
263
+ * first time, but if you need to initialize it before calling an actual method,
264
+ * feel free to call initialize() directly.
265
+ *
266
+ * You can await on this method if you want to make sure the client is initialized.
267
+ *
268
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
269
+ */
270
+ initialize() {
271
+ // If the client stub promise is already initialized, return immediately.
272
+ if (this.userEventServiceStub) {
273
+ return this.userEventServiceStub;
274
+ }
275
+ // Put together the "service stub" for
276
+ // google.cloud.discoveryengine.v1alpha.UserEventService.
277
+ this.userEventServiceStub = this._gaxGrpc.createStub(this._opts.fallback
278
+ ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.UserEventService')
279
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
280
+ this._protos.google.cloud.discoveryengine.v1alpha
281
+ .UserEventService, this._opts, this._providedCustomServicePath);
282
+ // Iterate over each of the methods that the service provides
283
+ // and create an API call method for each.
284
+ const userEventServiceStubMethods = [
285
+ 'writeUserEvent',
286
+ 'collectUserEvent',
287
+ 'purgeUserEvents',
288
+ 'importUserEvents',
289
+ ];
290
+ for (const methodName of userEventServiceStubMethods) {
291
+ const callPromise = this.userEventServiceStub.then(stub => (...args) => {
292
+ if (this._terminated) {
293
+ return Promise.reject('The client has already been closed.');
294
+ }
295
+ const func = stub[methodName];
296
+ return func.apply(stub, args);
297
+ }, (err) => () => {
298
+ throw err;
299
+ });
300
+ const descriptor = this.descriptors.longrunning[methodName] || undefined;
301
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
302
+ this.innerApiCalls[methodName] = apiCall;
303
+ }
304
+ return this.userEventServiceStub;
305
+ }
306
+ /**
307
+ * The DNS address for this API service.
308
+ * @returns {string} The DNS address for this service.
309
+ */
310
+ static get servicePath() {
311
+ return 'discoveryengine.googleapis.com';
312
+ }
313
+ /**
314
+ * The DNS address for this API service - same as servicePath(),
315
+ * exists for compatibility reasons.
316
+ * @returns {string} The DNS address for this service.
317
+ */
318
+ static get apiEndpoint() {
319
+ return 'discoveryengine.googleapis.com';
320
+ }
321
+ /**
322
+ * The port for this API service.
323
+ * @returns {number} The default port for this service.
324
+ */
325
+ static get port() {
326
+ return 443;
327
+ }
328
+ /**
329
+ * The scopes needed to make gRPC calls for every method defined
330
+ * in this service.
331
+ * @returns {string[]} List of default scopes.
332
+ */
333
+ static get scopes() {
334
+ return ['https://www.googleapis.com/auth/cloud-platform'];
335
+ }
336
+ /**
337
+ * Return the project ID used by this class.
338
+ * @returns {Promise} A promise that resolves to string containing the project ID.
339
+ */
340
+ getProjectId(callback) {
341
+ if (callback) {
342
+ this.auth.getProjectId(callback);
343
+ return;
344
+ }
345
+ return this.auth.getProjectId();
346
+ }
347
+ writeUserEvent(request, optionsOrCallback, callback) {
348
+ var _a;
349
+ request = request || {};
350
+ let options;
351
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
352
+ callback = optionsOrCallback;
353
+ options = {};
354
+ }
355
+ else {
356
+ options = optionsOrCallback;
357
+ }
358
+ options = options || {};
359
+ options.otherArgs = options.otherArgs || {};
360
+ options.otherArgs.headers = options.otherArgs.headers || {};
361
+ options.otherArgs.headers['x-goog-request-params'] =
362
+ this._gaxModule.routingHeader.fromParams({
363
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
364
+ });
365
+ this.initialize();
366
+ return this.innerApiCalls.writeUserEvent(request, options, callback);
367
+ }
368
+ collectUserEvent(request, optionsOrCallback, callback) {
369
+ var _a;
370
+ request = request || {};
371
+ let options;
372
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
373
+ callback = optionsOrCallback;
374
+ options = {};
375
+ }
376
+ else {
377
+ options = optionsOrCallback;
378
+ }
379
+ options = options || {};
380
+ options.otherArgs = options.otherArgs || {};
381
+ options.otherArgs.headers = options.otherArgs.headers || {};
382
+ options.otherArgs.headers['x-goog-request-params'] =
383
+ this._gaxModule.routingHeader.fromParams({
384
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
385
+ });
386
+ this.initialize();
387
+ return this.innerApiCalls.collectUserEvent(request, options, callback);
388
+ }
389
+ purgeUserEvents(request, optionsOrCallback, callback) {
390
+ var _a;
391
+ request = request || {};
392
+ let options;
393
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
394
+ callback = optionsOrCallback;
395
+ options = {};
396
+ }
397
+ else {
398
+ options = optionsOrCallback;
399
+ }
400
+ options = options || {};
401
+ options.otherArgs = options.otherArgs || {};
402
+ options.otherArgs.headers = options.otherArgs.headers || {};
403
+ options.otherArgs.headers['x-goog-request-params'] =
404
+ this._gaxModule.routingHeader.fromParams({
405
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
406
+ });
407
+ this.initialize();
408
+ return this.innerApiCalls.purgeUserEvents(request, options, callback);
409
+ }
410
+ /**
411
+ * Check the status of the long running operation returned by `purgeUserEvents()`.
412
+ * @param {String} name
413
+ * The operation name that will be passed.
414
+ * @returns {Promise} - The promise which resolves to an object.
415
+ * The decoded operation object has result and metadata field to get information from.
416
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
417
+ * for more details and examples.
418
+ * @example <caption>include:samples/generated/v1alpha/user_event_service.purge_user_events.js</caption>
419
+ * region_tag:discoveryengine_v1alpha_generated_UserEventService_PurgeUserEvents_async
420
+ */
421
+ async checkPurgeUserEventsProgress(name) {
422
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
423
+ const [operation] = await this.operationsClient.getOperation(request);
424
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.purgeUserEvents, this._gaxModule.createDefaultBackoffSettings());
425
+ return decodeOperation;
426
+ }
427
+ importUserEvents(request, optionsOrCallback, callback) {
428
+ var _a;
429
+ request = request || {};
430
+ let options;
431
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
432
+ callback = optionsOrCallback;
433
+ options = {};
434
+ }
435
+ else {
436
+ options = optionsOrCallback;
437
+ }
438
+ options = options || {};
439
+ options.otherArgs = options.otherArgs || {};
440
+ options.otherArgs.headers = options.otherArgs.headers || {};
441
+ options.otherArgs.headers['x-goog-request-params'] =
442
+ this._gaxModule.routingHeader.fromParams({
443
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
444
+ });
445
+ this.initialize();
446
+ return this.innerApiCalls.importUserEvents(request, options, callback);
447
+ }
448
+ /**
449
+ * Check the status of the long running operation returned by `importUserEvents()`.
450
+ * @param {String} name
451
+ * The operation name that will be passed.
452
+ * @returns {Promise} - The promise which resolves to an object.
453
+ * The decoded operation object has result and metadata field to get information from.
454
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
455
+ * for more details and examples.
456
+ * @example <caption>include:samples/generated/v1alpha/user_event_service.import_user_events.js</caption>
457
+ * region_tag:discoveryengine_v1alpha_generated_UserEventService_ImportUserEvents_async
458
+ */
459
+ async checkImportUserEventsProgress(name) {
460
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
461
+ const [operation] = await this.operationsClient.getOperation(request);
462
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importUserEvents, this._gaxModule.createDefaultBackoffSettings());
463
+ return decodeOperation;
464
+ }
465
+ /**
466
+ * Gets information about a location.
467
+ *
468
+ * @param {Object} request
469
+ * The request object that will be sent.
470
+ * @param {string} request.name
471
+ * Resource name for the location.
472
+ * @param {object} [options]
473
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
474
+ * @returns {Promise} - The promise which resolves to an array.
475
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
476
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
477
+ * for more details and examples.
478
+ * @example
479
+ * ```
480
+ * const [response] = await client.getLocation(request);
481
+ * ```
482
+ */
483
+ getLocation(request, options, callback) {
484
+ return this.locationsClient.getLocation(request, options, callback);
485
+ }
486
+ /**
487
+ * Lists information about the supported locations for this service. Returns an iterable object.
488
+ *
489
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
490
+ * @param {Object} request
491
+ * The request object that will be sent.
492
+ * @param {string} request.name
493
+ * The resource that owns the locations collection, if applicable.
494
+ * @param {string} request.filter
495
+ * The standard list filter.
496
+ * @param {number} request.pageSize
497
+ * The standard list page size.
498
+ * @param {string} request.pageToken
499
+ * The standard list page token.
500
+ * @param {object} [options]
501
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
502
+ * @returns {Object}
503
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
504
+ * When you iterate the returned iterable, each element will be an object representing
505
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
506
+ * so you can stop the iteration when you don't need more results.
507
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
508
+ * for more details and examples.
509
+ * @example
510
+ * ```
511
+ * const iterable = client.listLocationsAsync(request);
512
+ * for await (const response of iterable) {
513
+ * // process response
514
+ * }
515
+ * ```
516
+ */
517
+ listLocationsAsync(request, options) {
518
+ return this.locationsClient.listLocationsAsync(request, options);
519
+ }
520
+ /**
521
+ * Gets the latest state of a long-running operation. Clients can use this
522
+ * method to poll the operation result at intervals as recommended by the API
523
+ * service.
524
+ *
525
+ * @param {Object} request - The request object that will be sent.
526
+ * @param {string} request.name - The name of the operation resource.
527
+ * @param {Object=} options
528
+ * Optional parameters. You can override the default settings for this call,
529
+ * e.g, timeout, retries, paginations, etc. See {@link
530
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
531
+ * for the details.
532
+ * @param {function(?Error, ?Object)=} callback
533
+ * The function which will be called with the result of the API call.
534
+ *
535
+ * The second parameter to the callback is an object representing
536
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
537
+ * @return {Promise} - The promise which resolves to an array.
538
+ * The first element of the array is an object representing
539
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
540
+ * The promise has a method named "cancel" which cancels the ongoing API call.
541
+ *
542
+ * @example
543
+ * ```
544
+ * const client = longrunning.operationsClient();
545
+ * const name = '';
546
+ * const [response] = await client.getOperation({name});
547
+ * // doThingsWith(response)
548
+ * ```
549
+ */
550
+ getOperation(request, options, callback) {
551
+ return this.operationsClient.getOperation(request, options, callback);
552
+ }
553
+ /**
554
+ * Lists operations that match the specified filter in the request. If the
555
+ * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
556
+ *
557
+ * For-await-of syntax is used with the iterable to recursively get response element on-demand.
558
+ *
559
+ * @param {Object} request - The request object that will be sent.
560
+ * @param {string} request.name - The name of the operation collection.
561
+ * @param {string} request.filter - The standard list filter.
562
+ * @param {number=} request.pageSize -
563
+ * The maximum number of resources contained in the underlying API
564
+ * response. If page streaming is performed per-resource, this
565
+ * parameter does not affect the return value. If page streaming is
566
+ * performed per-page, this determines the maximum number of
567
+ * resources in a page.
568
+ * @param {Object=} options
569
+ * Optional parameters. You can override the default settings for this call,
570
+ * e.g, timeout, retries, paginations, etc. See {@link
571
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
572
+ * details.
573
+ * @returns {Object}
574
+ * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
575
+ *
576
+ * @example
577
+ * ```
578
+ * const client = longrunning.operationsClient();
579
+ * for await (const response of client.listOperationsAsync(request));
580
+ * // doThingsWith(response)
581
+ * ```
582
+ */
583
+ listOperationsAsync(request, options) {
584
+ return this.operationsClient.listOperationsAsync(request, options);
585
+ }
586
+ /**
587
+ * Starts asynchronous cancellation on a long-running operation. The server
588
+ * makes a best effort to cancel the operation, but success is not
589
+ * guaranteed. If the server doesn't support this method, it returns
590
+ * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
591
+ * {@link Operations.GetOperation} or
592
+ * other methods to check whether the cancellation succeeded or whether the
593
+ * operation completed despite cancellation. On successful cancellation,
594
+ * the operation is not deleted; instead, it becomes an operation with
595
+ * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
596
+ * 1, corresponding to `Code.CANCELLED`.
597
+ *
598
+ * @param {Object} request - The request object that will be sent.
599
+ * @param {string} request.name - The name of the operation resource to be cancelled.
600
+ * @param {Object=} options
601
+ * Optional parameters. You can override the default settings for this call,
602
+ * e.g, timeout, retries, paginations, etc. See {@link
603
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
604
+ * details.
605
+ * @param {function(?Error)=} callback
606
+ * The function which will be called with the result of the API call.
607
+ * @return {Promise} - The promise which resolves when API call finishes.
608
+ * The promise has a method named "cancel" which cancels the ongoing API
609
+ * call.
610
+ *
611
+ * @example
612
+ * ```
613
+ * const client = longrunning.operationsClient();
614
+ * await client.cancelOperation({name: ''});
615
+ * ```
616
+ */
617
+ cancelOperation(request, options, callback) {
618
+ return this.operationsClient.cancelOperation(request, options, callback);
619
+ }
620
+ /**
621
+ * Deletes a long-running operation. This method indicates that the client is
622
+ * no longer interested in the operation result. It does not cancel the
623
+ * operation. If the server doesn't support this method, it returns
624
+ * `google.rpc.Code.UNIMPLEMENTED`.
625
+ *
626
+ * @param {Object} request - The request object that will be sent.
627
+ * @param {string} request.name - The name of the operation resource to be deleted.
628
+ * @param {Object=} options
629
+ * Optional parameters. You can override the default settings for this call,
630
+ * e.g, timeout, retries, paginations, etc. See {@link
631
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
632
+ * for the details.
633
+ * @param {function(?Error)=} callback
634
+ * The function which will be called with the result of the API call.
635
+ * @return {Promise} - The promise which resolves when API call finishes.
636
+ * The promise has a method named "cancel" which cancels the ongoing API
637
+ * call.
638
+ *
639
+ * @example
640
+ * ```
641
+ * const client = longrunning.operationsClient();
642
+ * await client.deleteOperation({name: ''});
643
+ * ```
644
+ */
645
+ deleteOperation(request, options, callback) {
646
+ return this.operationsClient.deleteOperation(request, options, callback);
647
+ }
648
+ // --------------------
649
+ // -- Path templates --
650
+ // --------------------
651
+ /**
652
+ * Return a fully-qualified projectLocationCollectionDataStore resource name string.
653
+ *
654
+ * @param {string} project
655
+ * @param {string} location
656
+ * @param {string} collection
657
+ * @param {string} data_store
658
+ * @returns {string} Resource name string.
659
+ */
660
+ projectLocationCollectionDataStorePath(project, location, collection, dataStore) {
661
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render({
662
+ project: project,
663
+ location: location,
664
+ collection: collection,
665
+ data_store: dataStore,
666
+ });
667
+ }
668
+ /**
669
+ * Parse the project from ProjectLocationCollectionDataStore resource.
670
+ *
671
+ * @param {string} projectLocationCollectionDataStoreName
672
+ * A fully-qualified path representing project_location_collection_data_store resource.
673
+ * @returns {string} A string representing the project.
674
+ */
675
+ matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
676
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).project;
677
+ }
678
+ /**
679
+ * Parse the location from ProjectLocationCollectionDataStore resource.
680
+ *
681
+ * @param {string} projectLocationCollectionDataStoreName
682
+ * A fully-qualified path representing project_location_collection_data_store resource.
683
+ * @returns {string} A string representing the location.
684
+ */
685
+ matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
686
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).location;
687
+ }
688
+ /**
689
+ * Parse the collection from ProjectLocationCollectionDataStore resource.
690
+ *
691
+ * @param {string} projectLocationCollectionDataStoreName
692
+ * A fully-qualified path representing project_location_collection_data_store resource.
693
+ * @returns {string} A string representing the collection.
694
+ */
695
+ matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
696
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).collection;
697
+ }
698
+ /**
699
+ * Parse the data_store from ProjectLocationCollectionDataStore resource.
700
+ *
701
+ * @param {string} projectLocationCollectionDataStoreName
702
+ * A fully-qualified path representing project_location_collection_data_store resource.
703
+ * @returns {string} A string representing the data_store.
704
+ */
705
+ matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
706
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).data_store;
707
+ }
708
+ /**
709
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
710
+ *
711
+ * @param {string} project
712
+ * @param {string} location
713
+ * @param {string} collection
714
+ * @param {string} data_store
715
+ * @param {string} branch
716
+ * @param {string} document
717
+ * @returns {string} Resource name string.
718
+ */
719
+ projectLocationCollectionDataStoreBranchDocumentPath(project, location, collection, dataStore, branch, document) {
720
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render({
721
+ project: project,
722
+ location: location,
723
+ collection: collection,
724
+ data_store: dataStore,
725
+ branch: branch,
726
+ document: document,
727
+ });
728
+ }
729
+ /**
730
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource.
731
+ *
732
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
733
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
734
+ * @returns {string} A string representing the project.
735
+ */
736
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
737
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).project;
738
+ }
739
+ /**
740
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource.
741
+ *
742
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
743
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
744
+ * @returns {string} A string representing the location.
745
+ */
746
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
747
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).location;
748
+ }
749
+ /**
750
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource.
751
+ *
752
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
753
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
754
+ * @returns {string} A string representing the collection.
755
+ */
756
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
757
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).collection;
758
+ }
759
+ /**
760
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource.
761
+ *
762
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
763
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
764
+ * @returns {string} A string representing the data_store.
765
+ */
766
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
767
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).data_store;
768
+ }
769
+ /**
770
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource.
771
+ *
772
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
773
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
774
+ * @returns {string} A string representing the branch.
775
+ */
776
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
777
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).branch;
778
+ }
779
+ /**
780
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource.
781
+ *
782
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
783
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
784
+ * @returns {string} A string representing the document.
785
+ */
786
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
787
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
788
+ }
789
+ /**
790
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
791
+ *
792
+ * @param {string} project
793
+ * @param {string} location
794
+ * @param {string} collection
795
+ * @param {string} data_store
796
+ * @param {string} conversation
797
+ * @returns {string} Resource name string.
798
+ */
799
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
800
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
801
+ project: project,
802
+ location: location,
803
+ collection: collection,
804
+ data_store: dataStore,
805
+ conversation: conversation,
806
+ });
807
+ }
808
+ /**
809
+ * Parse the project 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 project.
814
+ */
815
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
816
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
817
+ }
818
+ /**
819
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
820
+ *
821
+ * @param {string} projectLocationCollectionDataStoreConversationName
822
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
823
+ * @returns {string} A string representing the location.
824
+ */
825
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
826
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
827
+ }
828
+ /**
829
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
830
+ *
831
+ * @param {string} projectLocationCollectionDataStoreConversationName
832
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
833
+ * @returns {string} A string representing the collection.
834
+ */
835
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
836
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
837
+ }
838
+ /**
839
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
840
+ *
841
+ * @param {string} projectLocationCollectionDataStoreConversationName
842
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
843
+ * @returns {string} A string representing the data_store.
844
+ */
845
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
846
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
847
+ }
848
+ /**
849
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
850
+ *
851
+ * @param {string} projectLocationCollectionDataStoreConversationName
852
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
853
+ * @returns {string} A string representing the conversation.
854
+ */
855
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
856
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
857
+ }
858
+ /**
859
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
860
+ *
861
+ * @param {string} project
862
+ * @param {string} location
863
+ * @param {string} collection
864
+ * @param {string} data_store
865
+ * @param {string} schema
866
+ * @returns {string} Resource name string.
867
+ */
868
+ projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
869
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
870
+ project: project,
871
+ location: location,
872
+ collection: collection,
873
+ data_store: dataStore,
874
+ schema: schema,
875
+ });
876
+ }
877
+ /**
878
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
879
+ *
880
+ * @param {string} projectLocationCollectionDataStoreSchemaName
881
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
882
+ * @returns {string} A string representing the project.
883
+ */
884
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
885
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
886
+ }
887
+ /**
888
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
889
+ *
890
+ * @param {string} projectLocationCollectionDataStoreSchemaName
891
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
892
+ * @returns {string} A string representing the location.
893
+ */
894
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
895
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
896
+ }
897
+ /**
898
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
899
+ *
900
+ * @param {string} projectLocationCollectionDataStoreSchemaName
901
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
902
+ * @returns {string} A string representing the collection.
903
+ */
904
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
905
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
906
+ }
907
+ /**
908
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
909
+ *
910
+ * @param {string} projectLocationCollectionDataStoreSchemaName
911
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
912
+ * @returns {string} A string representing the data_store.
913
+ */
914
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
915
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
916
+ }
917
+ /**
918
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
919
+ *
920
+ * @param {string} projectLocationCollectionDataStoreSchemaName
921
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
922
+ * @returns {string} A string representing the schema.
923
+ */
924
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
925
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
926
+ }
927
+ /**
928
+ * Return a fully-qualified projectLocationDataStore resource name string.
929
+ *
930
+ * @param {string} project
931
+ * @param {string} location
932
+ * @param {string} data_store
933
+ * @returns {string} Resource name string.
934
+ */
935
+ projectLocationDataStorePath(project, location, dataStore) {
936
+ return this.pathTemplates.projectLocationDataStorePathTemplate.render({
937
+ project: project,
938
+ location: location,
939
+ data_store: dataStore,
940
+ });
941
+ }
942
+ /**
943
+ * Parse the project from ProjectLocationDataStore resource.
944
+ *
945
+ * @param {string} projectLocationDataStoreName
946
+ * A fully-qualified path representing project_location_data_store resource.
947
+ * @returns {string} A string representing the project.
948
+ */
949
+ matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName) {
950
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).project;
951
+ }
952
+ /**
953
+ * Parse the location from ProjectLocationDataStore resource.
954
+ *
955
+ * @param {string} projectLocationDataStoreName
956
+ * A fully-qualified path representing project_location_data_store resource.
957
+ * @returns {string} A string representing the location.
958
+ */
959
+ matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName) {
960
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).location;
961
+ }
962
+ /**
963
+ * Parse the data_store from ProjectLocationDataStore resource.
964
+ *
965
+ * @param {string} projectLocationDataStoreName
966
+ * A fully-qualified path representing project_location_data_store resource.
967
+ * @returns {string} A string representing the data_store.
968
+ */
969
+ matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName) {
970
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).data_store;
971
+ }
972
+ /**
973
+ * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
974
+ *
975
+ * @param {string} project
976
+ * @param {string} location
977
+ * @param {string} data_store
978
+ * @param {string} branch
979
+ * @param {string} document
980
+ * @returns {string} Resource name string.
981
+ */
982
+ projectLocationDataStoreBranchDocumentPath(project, location, dataStore, branch, document) {
983
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render({
984
+ project: project,
985
+ location: location,
986
+ data_store: dataStore,
987
+ branch: branch,
988
+ document: document,
989
+ });
990
+ }
991
+ /**
992
+ * Parse the project from ProjectLocationDataStoreBranchDocument resource.
993
+ *
994
+ * @param {string} projectLocationDataStoreBranchDocumentName
995
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
996
+ * @returns {string} A string representing the project.
997
+ */
998
+ matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
999
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).project;
1000
+ }
1001
+ /**
1002
+ * Parse the location from ProjectLocationDataStoreBranchDocument resource.
1003
+ *
1004
+ * @param {string} projectLocationDataStoreBranchDocumentName
1005
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1006
+ * @returns {string} A string representing the location.
1007
+ */
1008
+ matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1009
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).location;
1010
+ }
1011
+ /**
1012
+ * Parse the data_store from ProjectLocationDataStoreBranchDocument resource.
1013
+ *
1014
+ * @param {string} projectLocationDataStoreBranchDocumentName
1015
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1016
+ * @returns {string} A string representing the data_store.
1017
+ */
1018
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1019
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).data_store;
1020
+ }
1021
+ /**
1022
+ * Parse the branch from ProjectLocationDataStoreBranchDocument resource.
1023
+ *
1024
+ * @param {string} projectLocationDataStoreBranchDocumentName
1025
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1026
+ * @returns {string} A string representing the branch.
1027
+ */
1028
+ matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1029
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).branch;
1030
+ }
1031
+ /**
1032
+ * Parse the document from ProjectLocationDataStoreBranchDocument resource.
1033
+ *
1034
+ * @param {string} projectLocationDataStoreBranchDocumentName
1035
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1036
+ * @returns {string} A string representing the document.
1037
+ */
1038
+ matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1039
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
1040
+ }
1041
+ /**
1042
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1043
+ *
1044
+ * @param {string} project
1045
+ * @param {string} location
1046
+ * @param {string} data_store
1047
+ * @param {string} conversation
1048
+ * @returns {string} Resource name string.
1049
+ */
1050
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1051
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1052
+ project: project,
1053
+ location: location,
1054
+ data_store: dataStore,
1055
+ conversation: conversation,
1056
+ });
1057
+ }
1058
+ /**
1059
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1060
+ *
1061
+ * @param {string} projectLocationDataStoreConversationName
1062
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1063
+ * @returns {string} A string representing the project.
1064
+ */
1065
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1066
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1067
+ }
1068
+ /**
1069
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1070
+ *
1071
+ * @param {string} projectLocationDataStoreConversationName
1072
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1073
+ * @returns {string} A string representing the location.
1074
+ */
1075
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1076
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1077
+ }
1078
+ /**
1079
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1080
+ *
1081
+ * @param {string} projectLocationDataStoreConversationName
1082
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1083
+ * @returns {string} A string representing the data_store.
1084
+ */
1085
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1086
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1087
+ }
1088
+ /**
1089
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1090
+ *
1091
+ * @param {string} projectLocationDataStoreConversationName
1092
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1093
+ * @returns {string} A string representing the conversation.
1094
+ */
1095
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1096
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1097
+ }
1098
+ /**
1099
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
1100
+ *
1101
+ * @param {string} project
1102
+ * @param {string} location
1103
+ * @param {string} data_store
1104
+ * @param {string} schema
1105
+ * @returns {string} Resource name string.
1106
+ */
1107
+ projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
1108
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
1109
+ project: project,
1110
+ location: location,
1111
+ data_store: dataStore,
1112
+ schema: schema,
1113
+ });
1114
+ }
1115
+ /**
1116
+ * Parse the project from ProjectLocationDataStoreSchema resource.
1117
+ *
1118
+ * @param {string} projectLocationDataStoreSchemaName
1119
+ * A fully-qualified path representing project_location_data_store_schema resource.
1120
+ * @returns {string} A string representing the project.
1121
+ */
1122
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1123
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
1124
+ }
1125
+ /**
1126
+ * Parse the location from ProjectLocationDataStoreSchema resource.
1127
+ *
1128
+ * @param {string} projectLocationDataStoreSchemaName
1129
+ * A fully-qualified path representing project_location_data_store_schema resource.
1130
+ * @returns {string} A string representing the location.
1131
+ */
1132
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1133
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
1134
+ }
1135
+ /**
1136
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
1137
+ *
1138
+ * @param {string} projectLocationDataStoreSchemaName
1139
+ * A fully-qualified path representing project_location_data_store_schema resource.
1140
+ * @returns {string} A string representing the data_store.
1141
+ */
1142
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1143
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
1144
+ }
1145
+ /**
1146
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
1147
+ *
1148
+ * @param {string} projectLocationDataStoreSchemaName
1149
+ * A fully-qualified path representing project_location_data_store_schema resource.
1150
+ * @returns {string} A string representing the schema.
1151
+ */
1152
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1153
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
1154
+ }
1155
+ /**
1156
+ * Terminate the gRPC channel and close the client.
1157
+ *
1158
+ * The client will no longer be usable and all future behavior is undefined.
1159
+ * @returns {Promise} A promise that resolves when the client is closed.
1160
+ */
1161
+ close() {
1162
+ if (this.userEventServiceStub && !this._terminated) {
1163
+ return this.userEventServiceStub.then(stub => {
1164
+ this._terminated = true;
1165
+ stub.close();
1166
+ this.locationsClient.close();
1167
+ this.operationsClient.close();
1168
+ });
1169
+ }
1170
+ return Promise.resolve();
1171
+ }
1172
+ }
1173
+ exports.UserEventServiceClient = UserEventServiceClient;
1174
+ //# sourceMappingURL=user_event_service_client.js.map