@google-cloud/discoveryengine 0.6.0 → 0.7.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 (44) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +38 -22
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +100 -0
  4. package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +116 -0
  5. package/build/protos/google/cloud/discoveryengine/v1/document.proto +118 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +313 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +334 -0
  8. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +86 -0
  9. package/build/protos/google/cloud/discoveryengine/v1/schema.proto +58 -0
  10. package/build/protos/google/cloud/discoveryengine/v1/schema_service.proto +256 -0
  11. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +289 -0
  12. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +458 -0
  13. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +133 -0
  14. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +54 -0
  15. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +29 -4
  16. package/build/protos/protos.d.ts +6589 -0
  17. package/build/protos/protos.js +16050 -1
  18. package/build/protos/protos.json +1807 -0
  19. package/build/src/index.d.ts +18 -19
  20. package/build/src/index.js +9 -9
  21. package/build/src/v1/completion_service_client.d.ts +455 -0
  22. package/build/src/v1/completion_service_client.js +659 -0
  23. package/build/src/v1/completion_service_client_config.json +43 -0
  24. package/build/src/v1/document_service_client.d.ts +995 -0
  25. package/build/src/v1/document_service_client.js +1191 -0
  26. package/build/src/v1/document_service_client_config.json +82 -0
  27. package/build/src/v1/index.d.ts +5 -0
  28. package/build/src/v1/index.js +31 -0
  29. package/build/src/v1/schema_service_client.d.ts +795 -0
  30. package/build/src/v1/schema_service_client.js +1129 -0
  31. package/build/src/v1/schema_service_client_config.json +63 -0
  32. package/build/src/v1/search_service_client.d.ts +857 -0
  33. package/build/src/v1/search_service_client.js +1073 -0
  34. package/build/src/v1/search_service_client_config.json +43 -0
  35. package/build/src/v1/user_event_service_client.d.ts +638 -0
  36. package/build/src/v1/user_event_service_client.js +933 -0
  37. package/build/src/v1/user_event_service_client_config.json +62 -0
  38. package/build/src/v1beta/document_service_client.d.ts +52 -0
  39. package/build/src/v1beta/document_service_client.js +6 -0
  40. package/build/src/v1beta/schema_service_client.js +6 -0
  41. package/build/src/v1beta/search_service_client.d.ts +78 -12
  42. package/build/src/v1beta/search_service_client.js +52 -8
  43. package/build/src/v1beta/user_event_service_client.js +6 -0
  44. package/package.json +2 -2
@@ -0,0 +1,933 @@
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/v1/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 v1
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 | "rest"} [options.fallback] - Use HTTP fallback mode.
64
+ * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
65
+ * For more information, please check the
66
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
67
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
68
+ * need to avoid loading the default gRPC version and want to use the fallback
69
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
70
+ * ```
71
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
72
+ * const client = new UserEventServiceClient({fallback: 'rest'}, gax);
73
+ * ```
74
+ */
75
+ constructor(opts, gaxInstance) {
76
+ var _a, _b;
77
+ this._terminated = false;
78
+ this.descriptors = {
79
+ page: {},
80
+ stream: {},
81
+ longrunning: {},
82
+ batching: {},
83
+ };
84
+ // Ensure that options include all the required fields.
85
+ const staticMembers = this.constructor;
86
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || staticMembers.servicePath;
87
+ this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
88
+ const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
89
+ const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};
90
+ 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');
91
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
92
+ // Request numeric enum values if REST transport is used.
93
+ opts.numericEnums = true;
94
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
95
+ if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
96
+ opts['scopes'] = staticMembers.scopes;
97
+ }
98
+ // Load google-gax module synchronously if needed
99
+ if (!gaxInstance) {
100
+ gaxInstance = require('google-gax');
101
+ }
102
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
103
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
104
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
105
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
106
+ // Save options to use in initialize() method.
107
+ this._opts = opts;
108
+ // Save the auth object to the client, for use by other methods.
109
+ this.auth = this._gaxGrpc.auth;
110
+ // Set useJWTAccessWithScope on the auth object.
111
+ this.auth.useJWTAccessWithScope = true;
112
+ // Set defaultServicePath on the auth object.
113
+ this.auth.defaultServicePath = staticMembers.servicePath;
114
+ // Set the default scopes in auth client if needed.
115
+ if (servicePath === staticMembers.servicePath) {
116
+ this.auth.defaultScopes = staticMembers.scopes;
117
+ }
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 if (opts.fallback === 'rest') {
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
+ projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
144
+ projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
145
+ projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
146
+ projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
147
+ };
148
+ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
149
+ // This API contains "long-running operations", which return a
150
+ // an Operation object that allows for tracking of the operation,
151
+ // rather than holding a request open.
152
+ const lroOptions = {
153
+ auth: this.auth,
154
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
155
+ };
156
+ if (opts.fallback === 'rest') {
157
+ lroOptions.protoJson = protoFilesRoot;
158
+ lroOptions.httpRules = [
159
+ {
160
+ selector: 'google.longrunning.Operations.GetOperation',
161
+ get: '/v1/{name=projects/*/operations/*}',
162
+ additional_bindings: [
163
+ {
164
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
165
+ },
166
+ {
167
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
168
+ },
169
+ {
170
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
171
+ },
172
+ {
173
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
174
+ },
175
+ {
176
+ get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
177
+ },
178
+ {
179
+ get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
180
+ },
181
+ {
182
+ get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
183
+ },
184
+ {
185
+ get: '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}',
186
+ },
187
+ { get: '/v1/{name=projects/*/locations/*/operations/*}' },
188
+ { get: '/v1/{name=projects/*/operations/*}' },
189
+ ],
190
+ },
191
+ {
192
+ selector: 'google.longrunning.Operations.ListOperations',
193
+ get: '/v1/{name=projects/*}/operations',
194
+ additional_bindings: [
195
+ {
196
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
197
+ },
198
+ {
199
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
200
+ },
201
+ {
202
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
203
+ },
204
+ {
205
+ get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
206
+ },
207
+ { get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
208
+ {
209
+ get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
210
+ },
211
+ {
212
+ get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
213
+ },
214
+ { get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
215
+ { get: '/v1/{name=projects/*/locations/*}/operations' },
216
+ { get: '/v1/{name=projects/*}/operations' },
217
+ ],
218
+ },
219
+ ];
220
+ }
221
+ this.operationsClient = this._gaxModule
222
+ .lro(lroOptions)
223
+ .operationsClient(opts);
224
+ const importUserEventsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.ImportUserEventsResponse');
225
+ const importUserEventsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1.ImportUserEventsMetadata');
226
+ this.descriptors.longrunning = {
227
+ importUserEvents: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importUserEventsResponse.decode.bind(importUserEventsResponse), importUserEventsMetadata.decode.bind(importUserEventsMetadata)),
228
+ };
229
+ // Put together the default options sent with requests.
230
+ this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.UserEventService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
231
+ // Set up a dictionary of "inner API calls"; the core implementation
232
+ // of calling the API is handled in `google-gax`, with this code
233
+ // merely providing the destination and request information.
234
+ this.innerApiCalls = {};
235
+ // Add a warn function to the client constructor so it can be easily tested.
236
+ this.warn = this._gaxModule.warn;
237
+ }
238
+ /**
239
+ * Initialize the client.
240
+ * Performs asynchronous operations (such as authentication) and prepares the client.
241
+ * This function will be called automatically when any class method is called for the
242
+ * first time, but if you need to initialize it before calling an actual method,
243
+ * feel free to call initialize() directly.
244
+ *
245
+ * You can await on this method if you want to make sure the client is initialized.
246
+ *
247
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
248
+ */
249
+ initialize() {
250
+ // If the client stub promise is already initialized, return immediately.
251
+ if (this.userEventServiceStub) {
252
+ return this.userEventServiceStub;
253
+ }
254
+ // Put together the "service stub" for
255
+ // google.cloud.discoveryengine.v1.UserEventService.
256
+ this.userEventServiceStub = this._gaxGrpc.createStub(this._opts.fallback
257
+ ? this._protos.lookupService('google.cloud.discoveryengine.v1.UserEventService')
258
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
259
+ this._protos.google.cloud.discoveryengine.v1
260
+ .UserEventService, this._opts, this._providedCustomServicePath);
261
+ // Iterate over each of the methods that the service provides
262
+ // and create an API call method for each.
263
+ const userEventServiceStubMethods = [
264
+ 'writeUserEvent',
265
+ 'collectUserEvent',
266
+ 'importUserEvents',
267
+ ];
268
+ for (const methodName of userEventServiceStubMethods) {
269
+ const callPromise = this.userEventServiceStub.then(stub => (...args) => {
270
+ if (this._terminated) {
271
+ return Promise.reject('The client has already been closed.');
272
+ }
273
+ const func = stub[methodName];
274
+ return func.apply(stub, args);
275
+ }, (err) => () => {
276
+ throw err;
277
+ });
278
+ const descriptor = this.descriptors.longrunning[methodName] || undefined;
279
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
280
+ this.innerApiCalls[methodName] = apiCall;
281
+ }
282
+ return this.userEventServiceStub;
283
+ }
284
+ /**
285
+ * The DNS address for this API service.
286
+ * @returns {string} The DNS address for this service.
287
+ */
288
+ static get servicePath() {
289
+ return 'discoveryengine.googleapis.com';
290
+ }
291
+ /**
292
+ * The DNS address for this API service - same as servicePath(),
293
+ * exists for compatibility reasons.
294
+ * @returns {string} The DNS address for this service.
295
+ */
296
+ static get apiEndpoint() {
297
+ return 'discoveryengine.googleapis.com';
298
+ }
299
+ /**
300
+ * The port for this API service.
301
+ * @returns {number} The default port for this service.
302
+ */
303
+ static get port() {
304
+ return 443;
305
+ }
306
+ /**
307
+ * The scopes needed to make gRPC calls for every method defined
308
+ * in this service.
309
+ * @returns {string[]} List of default scopes.
310
+ */
311
+ static get scopes() {
312
+ return ['https://www.googleapis.com/auth/cloud-platform'];
313
+ }
314
+ /**
315
+ * Return the project ID used by this class.
316
+ * @returns {Promise} A promise that resolves to string containing the project ID.
317
+ */
318
+ getProjectId(callback) {
319
+ if (callback) {
320
+ this.auth.getProjectId(callback);
321
+ return;
322
+ }
323
+ return this.auth.getProjectId();
324
+ }
325
+ writeUserEvent(request, optionsOrCallback, callback) {
326
+ var _a;
327
+ request = request || {};
328
+ let options;
329
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
330
+ callback = optionsOrCallback;
331
+ options = {};
332
+ }
333
+ else {
334
+ options = optionsOrCallback;
335
+ }
336
+ options = options || {};
337
+ options.otherArgs = options.otherArgs || {};
338
+ options.otherArgs.headers = options.otherArgs.headers || {};
339
+ options.otherArgs.headers['x-goog-request-params'] =
340
+ this._gaxModule.routingHeader.fromParams({
341
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
342
+ });
343
+ this.initialize();
344
+ return this.innerApiCalls.writeUserEvent(request, options, callback);
345
+ }
346
+ collectUserEvent(request, optionsOrCallback, callback) {
347
+ var _a;
348
+ request = request || {};
349
+ let options;
350
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
351
+ callback = optionsOrCallback;
352
+ options = {};
353
+ }
354
+ else {
355
+ options = optionsOrCallback;
356
+ }
357
+ options = options || {};
358
+ options.otherArgs = options.otherArgs || {};
359
+ options.otherArgs.headers = options.otherArgs.headers || {};
360
+ options.otherArgs.headers['x-goog-request-params'] =
361
+ this._gaxModule.routingHeader.fromParams({
362
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
363
+ });
364
+ this.initialize();
365
+ return this.innerApiCalls.collectUserEvent(request, options, callback);
366
+ }
367
+ importUserEvents(request, optionsOrCallback, callback) {
368
+ var _a;
369
+ request = request || {};
370
+ let options;
371
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
372
+ callback = optionsOrCallback;
373
+ options = {};
374
+ }
375
+ else {
376
+ options = optionsOrCallback;
377
+ }
378
+ options = options || {};
379
+ options.otherArgs = options.otherArgs || {};
380
+ options.otherArgs.headers = options.otherArgs.headers || {};
381
+ options.otherArgs.headers['x-goog-request-params'] =
382
+ this._gaxModule.routingHeader.fromParams({
383
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
384
+ });
385
+ this.initialize();
386
+ return this.innerApiCalls.importUserEvents(request, options, callback);
387
+ }
388
+ /**
389
+ * Check the status of the long running operation returned by `importUserEvents()`.
390
+ * @param {String} name
391
+ * The operation name that will be passed.
392
+ * @returns {Promise} - The promise which resolves to an object.
393
+ * 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)
396
+ * for more details and examples.
397
+ * @example <caption>include:samples/generated/v1/user_event_service.import_user_events.js</caption>
398
+ * region_tag:discoveryengine_v1_generated_UserEventService_ImportUserEvents_async
399
+ */
400
+ async checkImportUserEventsProgress(name) {
401
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
402
+ const [operation] = await this.operationsClient.getOperation(request);
403
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importUserEvents, this._gaxModule.createDefaultBackoffSettings());
404
+ return decodeOperation;
405
+ }
406
+ /**
407
+ * Gets the latest state of a long-running operation. Clients can use this
408
+ * method to poll the operation result at intervals as recommended by the API
409
+ * service.
410
+ *
411
+ * @param {Object} request - The request object that will be sent.
412
+ * @param {string} request.name - The name of the operation resource.
413
+ * @param {Object=} options
414
+ * Optional parameters. You can override the default settings for this call,
415
+ * e.g, timeout, retries, paginations, etc. See {@link
416
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
417
+ * for the details.
418
+ * @param {function(?Error, ?Object)=} callback
419
+ * The function which will be called with the result of the API call.
420
+ *
421
+ * The second parameter to the callback is an object representing
422
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
423
+ * @return {Promise} - The promise which resolves to an array.
424
+ * The first element of the array is an object representing
425
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
426
+ * The promise has a method named "cancel" which cancels the ongoing API call.
427
+ *
428
+ * @example
429
+ * ```
430
+ * const client = longrunning.operationsClient();
431
+ * const name = '';
432
+ * const [response] = await client.getOperation({name});
433
+ * // doThingsWith(response)
434
+ * ```
435
+ */
436
+ getOperation(request, options, callback) {
437
+ return this.operationsClient.getOperation(request, options, callback);
438
+ }
439
+ /**
440
+ * Lists operations that match the specified filter in the request. If the
441
+ * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
442
+ *
443
+ * For-await-of syntax is used with the iterable to recursively get response element on-demand.
444
+ *
445
+ * @param {Object} request - The request object that will be sent.
446
+ * @param {string} request.name - The name of the operation collection.
447
+ * @param {string} request.filter - The standard list filter.
448
+ * @param {number=} request.pageSize -
449
+ * The maximum number of resources contained in the underlying API
450
+ * response. If page streaming is performed per-resource, this
451
+ * parameter does not affect the return value. If page streaming is
452
+ * performed per-page, this determines the maximum number of
453
+ * resources in a page.
454
+ * @param {Object=} options
455
+ * Optional parameters. You can override the default settings for this call,
456
+ * e.g, timeout, retries, paginations, etc. See {@link
457
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
458
+ * details.
459
+ * @returns {Object}
460
+ * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
461
+ *
462
+ * @example
463
+ * ```
464
+ * const client = longrunning.operationsClient();
465
+ * for await (const response of client.listOperationsAsync(request));
466
+ * // doThingsWith(response)
467
+ * ```
468
+ */
469
+ listOperationsAsync(request, options) {
470
+ return this.operationsClient.listOperationsAsync(request, options);
471
+ }
472
+ /**
473
+ * Starts asynchronous cancellation on a long-running operation. The server
474
+ * makes a best effort to cancel the operation, but success is not
475
+ * guaranteed. If the server doesn't support this method, it returns
476
+ * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
477
+ * {@link Operations.GetOperation} or
478
+ * other methods to check whether the cancellation succeeded or whether the
479
+ * operation completed despite cancellation. On successful cancellation,
480
+ * the operation is not deleted; instead, it becomes an operation with
481
+ * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
482
+ * 1, corresponding to `Code.CANCELLED`.
483
+ *
484
+ * @param {Object} request - The request object that will be sent.
485
+ * @param {string} request.name - The name of the operation resource to be cancelled.
486
+ * @param {Object=} options
487
+ * Optional parameters. You can override the default settings for this call,
488
+ * e.g, timeout, retries, paginations, etc. See {@link
489
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
490
+ * details.
491
+ * @param {function(?Error)=} callback
492
+ * The function which will be called with the result of the API call.
493
+ * @return {Promise} - The promise which resolves when API call finishes.
494
+ * The promise has a method named "cancel" which cancels the ongoing API
495
+ * call.
496
+ *
497
+ * @example
498
+ * ```
499
+ * const client = longrunning.operationsClient();
500
+ * await client.cancelOperation({name: ''});
501
+ * ```
502
+ */
503
+ cancelOperation(request, options, callback) {
504
+ return this.operationsClient.cancelOperation(request, options, callback);
505
+ }
506
+ /**
507
+ * Deletes a long-running operation. This method indicates that the client is
508
+ * no longer interested in the operation result. It does not cancel the
509
+ * operation. If the server doesn't support this method, it returns
510
+ * `google.rpc.Code.UNIMPLEMENTED`.
511
+ *
512
+ * @param {Object} request - The request object that will be sent.
513
+ * @param {string} request.name - The name of the operation resource to be deleted.
514
+ * @param {Object=} options
515
+ * Optional parameters. You can override the default settings for this call,
516
+ * e.g, timeout, retries, paginations, etc. See {@link
517
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
518
+ * for the details.
519
+ * @param {function(?Error)=} callback
520
+ * The function which will be called with the result of the API call.
521
+ * @return {Promise} - The promise which resolves when API call finishes.
522
+ * The promise has a method named "cancel" which cancels the ongoing API
523
+ * call.
524
+ *
525
+ * @example
526
+ * ```
527
+ * const client = longrunning.operationsClient();
528
+ * await client.deleteOperation({name: ''});
529
+ * ```
530
+ */
531
+ deleteOperation(request, options, callback) {
532
+ return this.operationsClient.deleteOperation(request, options, callback);
533
+ }
534
+ // --------------------
535
+ // -- Path templates --
536
+ // --------------------
537
+ /**
538
+ * Return a fully-qualified projectLocationCollectionDataStore resource name string.
539
+ *
540
+ * @param {string} project
541
+ * @param {string} location
542
+ * @param {string} collection
543
+ * @param {string} data_store
544
+ * @returns {string} Resource name string.
545
+ */
546
+ projectLocationCollectionDataStorePath(project, location, collection, dataStore) {
547
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render({
548
+ project: project,
549
+ location: location,
550
+ collection: collection,
551
+ data_store: dataStore,
552
+ });
553
+ }
554
+ /**
555
+ * Parse the project from ProjectLocationCollectionDataStore resource.
556
+ *
557
+ * @param {string} projectLocationCollectionDataStoreName
558
+ * A fully-qualified path representing project_location_collection_data_store resource.
559
+ * @returns {string} A string representing the project.
560
+ */
561
+ matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
562
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).project;
563
+ }
564
+ /**
565
+ * Parse the location from ProjectLocationCollectionDataStore resource.
566
+ *
567
+ * @param {string} projectLocationCollectionDataStoreName
568
+ * A fully-qualified path representing project_location_collection_data_store resource.
569
+ * @returns {string} A string representing the location.
570
+ */
571
+ matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
572
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).location;
573
+ }
574
+ /**
575
+ * Parse the collection from ProjectLocationCollectionDataStore resource.
576
+ *
577
+ * @param {string} projectLocationCollectionDataStoreName
578
+ * A fully-qualified path representing project_location_collection_data_store resource.
579
+ * @returns {string} A string representing the collection.
580
+ */
581
+ matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
582
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).collection;
583
+ }
584
+ /**
585
+ * Parse the data_store from ProjectLocationCollectionDataStore resource.
586
+ *
587
+ * @param {string} projectLocationCollectionDataStoreName
588
+ * A fully-qualified path representing project_location_collection_data_store resource.
589
+ * @returns {string} A string representing the data_store.
590
+ */
591
+ matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
592
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).data_store;
593
+ }
594
+ /**
595
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
596
+ *
597
+ * @param {string} project
598
+ * @param {string} location
599
+ * @param {string} collection
600
+ * @param {string} data_store
601
+ * @param {string} branch
602
+ * @param {string} document
603
+ * @returns {string} Resource name string.
604
+ */
605
+ projectLocationCollectionDataStoreBranchDocumentPath(project, location, collection, dataStore, branch, document) {
606
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render({
607
+ project: project,
608
+ location: location,
609
+ collection: collection,
610
+ data_store: dataStore,
611
+ branch: branch,
612
+ document: document,
613
+ });
614
+ }
615
+ /**
616
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource.
617
+ *
618
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
619
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
620
+ * @returns {string} A string representing the project.
621
+ */
622
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
623
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).project;
624
+ }
625
+ /**
626
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource.
627
+ *
628
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
629
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
630
+ * @returns {string} A string representing the location.
631
+ */
632
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
633
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).location;
634
+ }
635
+ /**
636
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource.
637
+ *
638
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
639
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
640
+ * @returns {string} A string representing the collection.
641
+ */
642
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
643
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).collection;
644
+ }
645
+ /**
646
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource.
647
+ *
648
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
649
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
650
+ * @returns {string} A string representing the data_store.
651
+ */
652
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
653
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).data_store;
654
+ }
655
+ /**
656
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource.
657
+ *
658
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
659
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
660
+ * @returns {string} A string representing the branch.
661
+ */
662
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
663
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).branch;
664
+ }
665
+ /**
666
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource.
667
+ *
668
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
669
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
670
+ * @returns {string} A string representing the document.
671
+ */
672
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
673
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
674
+ }
675
+ /**
676
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
677
+ *
678
+ * @param {string} project
679
+ * @param {string} location
680
+ * @param {string} collection
681
+ * @param {string} data_store
682
+ * @param {string} schema
683
+ * @returns {string} Resource name string.
684
+ */
685
+ projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
686
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
687
+ project: project,
688
+ location: location,
689
+ collection: collection,
690
+ data_store: dataStore,
691
+ schema: schema,
692
+ });
693
+ }
694
+ /**
695
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
696
+ *
697
+ * @param {string} projectLocationCollectionDataStoreSchemaName
698
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
699
+ * @returns {string} A string representing the project.
700
+ */
701
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
702
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
703
+ }
704
+ /**
705
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
706
+ *
707
+ * @param {string} projectLocationCollectionDataStoreSchemaName
708
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
709
+ * @returns {string} A string representing the location.
710
+ */
711
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
712
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
713
+ }
714
+ /**
715
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
716
+ *
717
+ * @param {string} projectLocationCollectionDataStoreSchemaName
718
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
719
+ * @returns {string} A string representing the collection.
720
+ */
721
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
722
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
723
+ }
724
+ /**
725
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
726
+ *
727
+ * @param {string} projectLocationCollectionDataStoreSchemaName
728
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
729
+ * @returns {string} A string representing the data_store.
730
+ */
731
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
732
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
733
+ }
734
+ /**
735
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
736
+ *
737
+ * @param {string} projectLocationCollectionDataStoreSchemaName
738
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
739
+ * @returns {string} A string representing the schema.
740
+ */
741
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
742
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
743
+ }
744
+ /**
745
+ * Return a fully-qualified projectLocationDataStore resource name string.
746
+ *
747
+ * @param {string} project
748
+ * @param {string} location
749
+ * @param {string} data_store
750
+ * @returns {string} Resource name string.
751
+ */
752
+ projectLocationDataStorePath(project, location, dataStore) {
753
+ return this.pathTemplates.projectLocationDataStorePathTemplate.render({
754
+ project: project,
755
+ location: location,
756
+ data_store: dataStore,
757
+ });
758
+ }
759
+ /**
760
+ * Parse the project from ProjectLocationDataStore resource.
761
+ *
762
+ * @param {string} projectLocationDataStoreName
763
+ * A fully-qualified path representing project_location_data_store resource.
764
+ * @returns {string} A string representing the project.
765
+ */
766
+ matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName) {
767
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).project;
768
+ }
769
+ /**
770
+ * Parse the location from ProjectLocationDataStore resource.
771
+ *
772
+ * @param {string} projectLocationDataStoreName
773
+ * A fully-qualified path representing project_location_data_store resource.
774
+ * @returns {string} A string representing the location.
775
+ */
776
+ matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName) {
777
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).location;
778
+ }
779
+ /**
780
+ * Parse the data_store from ProjectLocationDataStore resource.
781
+ *
782
+ * @param {string} projectLocationDataStoreName
783
+ * A fully-qualified path representing project_location_data_store resource.
784
+ * @returns {string} A string representing the data_store.
785
+ */
786
+ matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName) {
787
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).data_store;
788
+ }
789
+ /**
790
+ * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
791
+ *
792
+ * @param {string} project
793
+ * @param {string} location
794
+ * @param {string} data_store
795
+ * @param {string} branch
796
+ * @param {string} document
797
+ * @returns {string} Resource name string.
798
+ */
799
+ projectLocationDataStoreBranchDocumentPath(project, location, dataStore, branch, document) {
800
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render({
801
+ project: project,
802
+ location: location,
803
+ data_store: dataStore,
804
+ branch: branch,
805
+ document: document,
806
+ });
807
+ }
808
+ /**
809
+ * Parse the project from ProjectLocationDataStoreBranchDocument resource.
810
+ *
811
+ * @param {string} projectLocationDataStoreBranchDocumentName
812
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
813
+ * @returns {string} A string representing the project.
814
+ */
815
+ matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
816
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).project;
817
+ }
818
+ /**
819
+ * Parse the location from ProjectLocationDataStoreBranchDocument resource.
820
+ *
821
+ * @param {string} projectLocationDataStoreBranchDocumentName
822
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
823
+ * @returns {string} A string representing the location.
824
+ */
825
+ matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
826
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).location;
827
+ }
828
+ /**
829
+ * Parse the data_store from ProjectLocationDataStoreBranchDocument resource.
830
+ *
831
+ * @param {string} projectLocationDataStoreBranchDocumentName
832
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
833
+ * @returns {string} A string representing the data_store.
834
+ */
835
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
836
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).data_store;
837
+ }
838
+ /**
839
+ * Parse the branch from ProjectLocationDataStoreBranchDocument resource.
840
+ *
841
+ * @param {string} projectLocationDataStoreBranchDocumentName
842
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
843
+ * @returns {string} A string representing the branch.
844
+ */
845
+ matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
846
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).branch;
847
+ }
848
+ /**
849
+ * Parse the document from ProjectLocationDataStoreBranchDocument resource.
850
+ *
851
+ * @param {string} projectLocationDataStoreBranchDocumentName
852
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
853
+ * @returns {string} A string representing the document.
854
+ */
855
+ matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
856
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
857
+ }
858
+ /**
859
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
860
+ *
861
+ * @param {string} project
862
+ * @param {string} location
863
+ * @param {string} data_store
864
+ * @param {string} schema
865
+ * @returns {string} Resource name string.
866
+ */
867
+ projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
868
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
869
+ project: project,
870
+ location: location,
871
+ data_store: dataStore,
872
+ schema: schema,
873
+ });
874
+ }
875
+ /**
876
+ * Parse the project from ProjectLocationDataStoreSchema resource.
877
+ *
878
+ * @param {string} projectLocationDataStoreSchemaName
879
+ * A fully-qualified path representing project_location_data_store_schema resource.
880
+ * @returns {string} A string representing the project.
881
+ */
882
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
883
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
884
+ }
885
+ /**
886
+ * Parse the location from ProjectLocationDataStoreSchema resource.
887
+ *
888
+ * @param {string} projectLocationDataStoreSchemaName
889
+ * A fully-qualified path representing project_location_data_store_schema resource.
890
+ * @returns {string} A string representing the location.
891
+ */
892
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
893
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
894
+ }
895
+ /**
896
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
897
+ *
898
+ * @param {string} projectLocationDataStoreSchemaName
899
+ * A fully-qualified path representing project_location_data_store_schema resource.
900
+ * @returns {string} A string representing the data_store.
901
+ */
902
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
903
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
904
+ }
905
+ /**
906
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
907
+ *
908
+ * @param {string} projectLocationDataStoreSchemaName
909
+ * A fully-qualified path representing project_location_data_store_schema resource.
910
+ * @returns {string} A string representing the schema.
911
+ */
912
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
913
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
914
+ }
915
+ /**
916
+ * Terminate the gRPC channel and close the client.
917
+ *
918
+ * The client will no longer be usable and all future behavior is undefined.
919
+ * @returns {Promise} A promise that resolves when the client is closed.
920
+ */
921
+ close() {
922
+ if (this.userEventServiceStub && !this._terminated) {
923
+ return this.userEventServiceStub.then(stub => {
924
+ this._terminated = true;
925
+ stub.close();
926
+ this.operationsClient.close();
927
+ });
928
+ }
929
+ return Promise.resolve();
930
+ }
931
+ }
932
+ exports.UserEventServiceClient = UserEventServiceClient;
933
+ //# sourceMappingURL=user_event_service_client.js.map