@google-cloud/discoveryengine 1.1.0 → 1.3.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 (59) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +39 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +190 -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/data_store.proto +98 -0
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +307 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +370 -0
  12. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +336 -0
  13. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +227 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +874 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
  22. package/build/protos/protos.d.ts +16365 -7
  23. package/build/protos/protos.js +42499 -1945
  24. package/build/protos/protos.json +4455 -5
  25. package/build/src/index.d.ts +3 -1
  26. package/build/src/index.js +4 -1
  27. package/build/src/v1alpha/completion_service_client.d.ts +645 -0
  28. package/build/src/v1alpha/completion_service_client.js +901 -0
  29. package/build/src/v1alpha/completion_service_client_config.json +43 -0
  30. package/build/src/v1alpha/conversational_search_service_client.d.ts +1040 -0
  31. package/build/src/v1alpha/conversational_search_service_client.js +1333 -0
  32. package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
  33. package/build/src/v1alpha/data_store_service_client.d.ts +1060 -0
  34. package/build/src/v1alpha/data_store_service_client.js +1431 -0
  35. package/build/src/v1alpha/data_store_service_client_config.json +46 -0
  36. package/build/src/v1alpha/document_service_client.d.ts +1257 -0
  37. package/build/src/v1alpha/document_service_client.js +1555 -0
  38. package/build/src/v1alpha/document_service_client_config.json +82 -0
  39. package/build/src/v1alpha/engine_service_client.d.ts +1079 -0
  40. package/build/src/v1alpha/engine_service_client.js +1481 -0
  41. package/build/src/v1alpha/engine_service_client_config.json +58 -0
  42. package/build/src/v1alpha/index.d.ts +10 -0
  43. package/build/src/v1alpha/index.js +41 -0
  44. package/build/src/v1alpha/recommendation_service_client.d.ts +858 -0
  45. package/build/src/v1alpha/recommendation_service_client.js +1100 -0
  46. package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
  47. package/build/src/v1alpha/schema_service_client.d.ts +977 -0
  48. package/build/src/v1alpha/schema_service_client.js +1385 -0
  49. package/build/src/v1alpha/schema_service_client_config.json +63 -0
  50. package/build/src/v1alpha/search_service_client.d.ts +1394 -0
  51. package/build/src/v1alpha/search_service_client.js +1640 -0
  52. package/build/src/v1alpha/search_service_client_config.json +43 -0
  53. package/build/src/v1alpha/site_search_engine_service_client.d.ts +821 -0
  54. package/build/src/v1alpha/site_search_engine_service_client.js +1249 -0
  55. package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
  56. package/build/src/v1alpha/user_event_service_client.d.ts +895 -0
  57. package/build/src/v1alpha/user_event_service_client.js +1232 -0
  58. package/build/src/v1alpha/user_event_service_client_config.json +67 -0
  59. package/package.json +5 -5
@@ -0,0 +1,1431 @@
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.DataStoreServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1alpha/data_store_service_client_config.json`.
25
+ * This file defines retry strategy and timeouts for all API methods in this library.
26
+ */
27
+ const gapicConfig = require("./data_store_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Service for managing
31
+ * {@link protos.google.cloud.discoveryengine.v1alpha.DataStore|DataStore} configuration.
32
+ * @class
33
+ * @memberof v1alpha
34
+ */
35
+ class DataStoreServiceClient {
36
+ /**
37
+ * Construct an instance of DataStoreServiceClient.
38
+ *
39
+ * @param {object} [options] - The configuration object.
40
+ * The options accepted by the constructor are described in detail
41
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
42
+ * The common options are:
43
+ * @param {object} [options.credentials] - Credentials object.
44
+ * @param {string} [options.credentials.client_email]
45
+ * @param {string} [options.credentials.private_key]
46
+ * @param {string} [options.email] - Account email address. Required when
47
+ * using a .pem or .p12 keyFilename.
48
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
49
+ * .p12 key downloaded from the Google Developers Console. If you provide
50
+ * a path to a JSON file, the projectId option below is not necessary.
51
+ * NOTE: .pem and .p12 require you to specify options.email as well.
52
+ * @param {number} [options.port] - The port on which to connect to
53
+ * the remote host.
54
+ * @param {string} [options.projectId] - The project ID from the Google
55
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
56
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
57
+ * app is running in an environment which supports
58
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
59
+ * your project ID will be detected automatically.
60
+ * @param {string} [options.apiEndpoint] - The domain name of the
61
+ * API remote host.
62
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
63
+ * Follows the structure of {@link gapicConfig}.
64
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
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 DataStoreServiceClient({fallback: true}, 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
+ this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
119
+ // Determine the client header string.
120
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
121
+ if (typeof process !== 'undefined' && 'versions' in process) {
122
+ clientHeader.push(`gl-node/${process.versions.node}`);
123
+ }
124
+ else {
125
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
126
+ }
127
+ if (!opts.fallback) {
128
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
129
+ }
130
+ else {
131
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
132
+ }
133
+ if (opts.libName && opts.libVersion) {
134
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
135
+ }
136
+ // Load the applicable protos.
137
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
138
+ // This API contains "path templates"; forward-slash-separated
139
+ // identifiers to uniquely identify resources within the API.
140
+ // Create useful helper objects for these.
141
+ this.pathTemplates = {
142
+ collectionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}'),
143
+ enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
144
+ projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
145
+ projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
146
+ projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
147
+ projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
148
+ projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
149
+ projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
150
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
151
+ projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
152
+ };
153
+ // Some of the methods on this service return "paged" results,
154
+ // (e.g. 50 results at a time, with tokens to get subsequent
155
+ // pages). Denote the keys used for pagination and results.
156
+ this.descriptors.page = {
157
+ listDataStores: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataStores'),
158
+ };
159
+ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
160
+ // This API contains "long-running operations", which return a
161
+ // an Operation object that allows for tracking of the operation,
162
+ // rather than holding a request open.
163
+ const lroOptions = {
164
+ auth: this.auth,
165
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
166
+ };
167
+ if (opts.fallback) {
168
+ lroOptions.protoJson = protoFilesRoot;
169
+ lroOptions.httpRules = [
170
+ {
171
+ selector: 'google.longrunning.Operations.GetOperation',
172
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
173
+ additional_bindings: [
174
+ {
175
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
176
+ },
177
+ {
178
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
179
+ },
180
+ {
181
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
182
+ },
183
+ {
184
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
185
+ },
186
+ {
187
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
188
+ },
189
+ {
190
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
191
+ },
192
+ {
193
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
194
+ },
195
+ {
196
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
197
+ },
198
+ {
199
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
200
+ },
201
+ {
202
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
203
+ },
204
+ { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
205
+ { get: '/v1alpha/{name=projects/*/operations/*}' },
206
+ ],
207
+ },
208
+ {
209
+ selector: 'google.longrunning.Operations.ListOperations',
210
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
211
+ additional_bindings: [
212
+ {
213
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
214
+ },
215
+ {
216
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
217
+ },
218
+ {
219
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
220
+ },
221
+ {
222
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
223
+ },
224
+ {
225
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
226
+ },
227
+ {
228
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
229
+ },
230
+ {
231
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
232
+ },
233
+ {
234
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
235
+ },
236
+ {
237
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
238
+ },
239
+ {
240
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
241
+ },
242
+ { get: '/v1alpha/{name=projects/*/locations/*}/operations' },
243
+ { get: '/v1alpha/{name=projects/*}/operations' },
244
+ ],
245
+ },
246
+ ];
247
+ }
248
+ this.operationsClient = this._gaxModule
249
+ .lro(lroOptions)
250
+ .operationsClient(opts);
251
+ const createDataStoreResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.DataStore');
252
+ const createDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.CreateDataStoreMetadata');
253
+ const deleteDataStoreResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
254
+ const deleteDataStoreMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.DeleteDataStoreMetadata');
255
+ this.descriptors.longrunning = {
256
+ createDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createDataStoreResponse.decode.bind(createDataStoreResponse), createDataStoreMetadata.decode.bind(createDataStoreMetadata)),
257
+ deleteDataStore: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteDataStoreResponse.decode.bind(deleteDataStoreResponse), deleteDataStoreMetadata.decode.bind(deleteDataStoreMetadata)),
258
+ };
259
+ // Put together the default options sent with requests.
260
+ this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.DataStoreService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
261
+ // Set up a dictionary of "inner API calls"; the core implementation
262
+ // of calling the API is handled in `google-gax`, with this code
263
+ // merely providing the destination and request information.
264
+ this.innerApiCalls = {};
265
+ // Add a warn function to the client constructor so it can be easily tested.
266
+ this.warn = this._gaxModule.warn;
267
+ }
268
+ /**
269
+ * Initialize the client.
270
+ * Performs asynchronous operations (such as authentication) and prepares the client.
271
+ * This function will be called automatically when any class method is called for the
272
+ * first time, but if you need to initialize it before calling an actual method,
273
+ * feel free to call initialize() directly.
274
+ *
275
+ * You can await on this method if you want to make sure the client is initialized.
276
+ *
277
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
278
+ */
279
+ initialize() {
280
+ // If the client stub promise is already initialized, return immediately.
281
+ if (this.dataStoreServiceStub) {
282
+ return this.dataStoreServiceStub;
283
+ }
284
+ // Put together the "service stub" for
285
+ // google.cloud.discoveryengine.v1alpha.DataStoreService.
286
+ this.dataStoreServiceStub = this._gaxGrpc.createStub(this._opts.fallback
287
+ ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.DataStoreService')
288
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
289
+ this._protos.google.cloud.discoveryengine.v1alpha
290
+ .DataStoreService, this._opts, this._providedCustomServicePath);
291
+ // Iterate over each of the methods that the service provides
292
+ // and create an API call method for each.
293
+ const dataStoreServiceStubMethods = [
294
+ 'createDataStore',
295
+ 'getDataStore',
296
+ 'listDataStores',
297
+ 'deleteDataStore',
298
+ 'updateDataStore',
299
+ ];
300
+ for (const methodName of dataStoreServiceStubMethods) {
301
+ const callPromise = this.dataStoreServiceStub.then(stub => (...args) => {
302
+ if (this._terminated) {
303
+ return Promise.reject('The client has already been closed.');
304
+ }
305
+ const func = stub[methodName];
306
+ return func.apply(stub, args);
307
+ }, (err) => () => {
308
+ throw err;
309
+ });
310
+ const descriptor = this.descriptors.page[methodName] ||
311
+ this.descriptors.longrunning[methodName] ||
312
+ undefined;
313
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
314
+ this.innerApiCalls[methodName] = apiCall;
315
+ }
316
+ return this.dataStoreServiceStub;
317
+ }
318
+ /**
319
+ * The DNS address for this API service.
320
+ * @returns {string} The DNS address for this service.
321
+ */
322
+ static get servicePath() {
323
+ return 'discoveryengine.googleapis.com';
324
+ }
325
+ /**
326
+ * The DNS address for this API service - same as servicePath(),
327
+ * exists for compatibility reasons.
328
+ * @returns {string} The DNS address for this service.
329
+ */
330
+ static get apiEndpoint() {
331
+ return 'discoveryengine.googleapis.com';
332
+ }
333
+ /**
334
+ * The port for this API service.
335
+ * @returns {number} The default port for this service.
336
+ */
337
+ static get port() {
338
+ return 443;
339
+ }
340
+ /**
341
+ * The scopes needed to make gRPC calls for every method defined
342
+ * in this service.
343
+ * @returns {string[]} List of default scopes.
344
+ */
345
+ static get scopes() {
346
+ return ['https://www.googleapis.com/auth/cloud-platform'];
347
+ }
348
+ /**
349
+ * Return the project ID used by this class.
350
+ * @returns {Promise} A promise that resolves to string containing the project ID.
351
+ */
352
+ getProjectId(callback) {
353
+ if (callback) {
354
+ this.auth.getProjectId(callback);
355
+ return;
356
+ }
357
+ return this.auth.getProjectId();
358
+ }
359
+ getDataStore(request, optionsOrCallback, callback) {
360
+ var _a;
361
+ request = request || {};
362
+ let options;
363
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
364
+ callback = optionsOrCallback;
365
+ options = {};
366
+ }
367
+ else {
368
+ options = optionsOrCallback;
369
+ }
370
+ options = options || {};
371
+ options.otherArgs = options.otherArgs || {};
372
+ options.otherArgs.headers = options.otherArgs.headers || {};
373
+ options.otherArgs.headers['x-goog-request-params'] =
374
+ this._gaxModule.routingHeader.fromParams({
375
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
376
+ });
377
+ this.initialize();
378
+ return this.innerApiCalls.getDataStore(request, options, callback);
379
+ }
380
+ updateDataStore(request, optionsOrCallback, callback) {
381
+ var _a;
382
+ request = request || {};
383
+ let options;
384
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
385
+ callback = optionsOrCallback;
386
+ options = {};
387
+ }
388
+ else {
389
+ options = optionsOrCallback;
390
+ }
391
+ options = options || {};
392
+ options.otherArgs = options.otherArgs || {};
393
+ options.otherArgs.headers = options.otherArgs.headers || {};
394
+ options.otherArgs.headers['x-goog-request-params'] =
395
+ this._gaxModule.routingHeader.fromParams({
396
+ 'data_store.name': (_a = request.dataStore.name) !== null && _a !== void 0 ? _a : '',
397
+ });
398
+ this.initialize();
399
+ return this.innerApiCalls.updateDataStore(request, options, callback);
400
+ }
401
+ createDataStore(request, optionsOrCallback, callback) {
402
+ var _a;
403
+ request = request || {};
404
+ let options;
405
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
406
+ callback = optionsOrCallback;
407
+ options = {};
408
+ }
409
+ else {
410
+ options = optionsOrCallback;
411
+ }
412
+ options = options || {};
413
+ options.otherArgs = options.otherArgs || {};
414
+ options.otherArgs.headers = options.otherArgs.headers || {};
415
+ options.otherArgs.headers['x-goog-request-params'] =
416
+ this._gaxModule.routingHeader.fromParams({
417
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
418
+ });
419
+ this.initialize();
420
+ return this.innerApiCalls.createDataStore(request, options, callback);
421
+ }
422
+ /**
423
+ * Check the status of the long running operation returned by `createDataStore()`.
424
+ * @param {String} name
425
+ * The operation name that will be passed.
426
+ * @returns {Promise} - The promise which resolves to an object.
427
+ * The decoded operation object has result and metadata field to get information from.
428
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
429
+ * for more details and examples.
430
+ * @example <caption>include:samples/generated/v1alpha/data_store_service.create_data_store.js</caption>
431
+ * region_tag:discoveryengine_v1alpha_generated_DataStoreService_CreateDataStore_async
432
+ */
433
+ async checkCreateDataStoreProgress(name) {
434
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
435
+ const [operation] = await this.operationsClient.getOperation(request);
436
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createDataStore, this._gaxModule.createDefaultBackoffSettings());
437
+ return decodeOperation;
438
+ }
439
+ deleteDataStore(request, optionsOrCallback, callback) {
440
+ var _a;
441
+ request = request || {};
442
+ let options;
443
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
444
+ callback = optionsOrCallback;
445
+ options = {};
446
+ }
447
+ else {
448
+ options = optionsOrCallback;
449
+ }
450
+ options = options || {};
451
+ options.otherArgs = options.otherArgs || {};
452
+ options.otherArgs.headers = options.otherArgs.headers || {};
453
+ options.otherArgs.headers['x-goog-request-params'] =
454
+ this._gaxModule.routingHeader.fromParams({
455
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
456
+ });
457
+ this.initialize();
458
+ return this.innerApiCalls.deleteDataStore(request, options, callback);
459
+ }
460
+ /**
461
+ * Check the status of the long running operation returned by `deleteDataStore()`.
462
+ * @param {String} name
463
+ * The operation name that will be passed.
464
+ * @returns {Promise} - The promise which resolves to an object.
465
+ * The decoded operation object has result and metadata field to get information from.
466
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
467
+ * for more details and examples.
468
+ * @example <caption>include:samples/generated/v1alpha/data_store_service.delete_data_store.js</caption>
469
+ * region_tag:discoveryengine_v1alpha_generated_DataStoreService_DeleteDataStore_async
470
+ */
471
+ async checkDeleteDataStoreProgress(name) {
472
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
473
+ const [operation] = await this.operationsClient.getOperation(request);
474
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteDataStore, this._gaxModule.createDefaultBackoffSettings());
475
+ return decodeOperation;
476
+ }
477
+ listDataStores(request, optionsOrCallback, callback) {
478
+ var _a;
479
+ request = request || {};
480
+ let options;
481
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
482
+ callback = optionsOrCallback;
483
+ options = {};
484
+ }
485
+ else {
486
+ options = optionsOrCallback;
487
+ }
488
+ options = options || {};
489
+ options.otherArgs = options.otherArgs || {};
490
+ options.otherArgs.headers = options.otherArgs.headers || {};
491
+ options.otherArgs.headers['x-goog-request-params'] =
492
+ this._gaxModule.routingHeader.fromParams({
493
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
494
+ });
495
+ this.initialize();
496
+ return this.innerApiCalls.listDataStores(request, options, callback);
497
+ }
498
+ /**
499
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
500
+ * @param {Object} request
501
+ * The request object that will be sent.
502
+ * @param {string} request.parent
503
+ * Required. The parent branch resource name, such as
504
+ * `projects/{project}/locations/{location}/collections/{collection_id}`.
505
+ *
506
+ * If the caller does not have permission to list {@link protos.|DataStores}s under this
507
+ * location, regardless of whether or not this data store exists, a
508
+ * PERMISSION_DENIED error is returned.
509
+ * @param {number} request.pageSize
510
+ * Maximum number of
511
+ * {@link protos.google.cloud.discoveryengine.v1alpha.DataStore|DataStore}s to return. If
512
+ * unspecified, defaults to 10. The maximum allowed value is 50. Values above
513
+ * 50 will be coerced to 50.
514
+ *
515
+ * If this field is negative, an INVALID_ARGUMENT is returned.
516
+ * @param {string} request.pageToken
517
+ * A page token
518
+ * {@link protos.google.cloud.discoveryengine.v1alpha.ListDataStoresResponse.next_page_token|ListDataStoresResponse.next_page_token},
519
+ * received from a previous
520
+ * {@link protos.google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores|DataStoreService.ListDataStores}
521
+ * call. Provide this to retrieve the subsequent page.
522
+ *
523
+ * When paginating, all other parameters provided to
524
+ * {@link protos.google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores|DataStoreService.ListDataStores}
525
+ * must match the call that provided the page token. Otherwise, an
526
+ * INVALID_ARGUMENT error is returned.
527
+ * @param {string} request.filter
528
+ * Filter by solution type. For example: filter =
529
+ * 'solution_type:SOLUTION_TYPE_SEARCH'
530
+ * @param {object} [options]
531
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
532
+ * @returns {Stream}
533
+ * An object stream which emits an object representing {@link protos.google.cloud.discoveryengine.v1alpha.DataStore|DataStore} on 'data' event.
534
+ * The client library will perform auto-pagination by default: it will call the API as many
535
+ * times as needed. Note that it can affect your quota.
536
+ * We recommend using `listDataStoresAsync()`
537
+ * method described below for async iteration which you can stop as needed.
538
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
539
+ * for more details and examples.
540
+ */
541
+ listDataStoresStream(request, options) {
542
+ var _a;
543
+ request = request || {};
544
+ options = options || {};
545
+ options.otherArgs = options.otherArgs || {};
546
+ options.otherArgs.headers = options.otherArgs.headers || {};
547
+ options.otherArgs.headers['x-goog-request-params'] =
548
+ this._gaxModule.routingHeader.fromParams({
549
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
550
+ });
551
+ const defaultCallSettings = this._defaults['listDataStores'];
552
+ const callSettings = defaultCallSettings.merge(options);
553
+ this.initialize();
554
+ return this.descriptors.page.listDataStores.createStream(this.innerApiCalls.listDataStores, request, callSettings);
555
+ }
556
+ /**
557
+ * Equivalent to `listDataStores`, but returns an iterable object.
558
+ *
559
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
560
+ * @param {Object} request
561
+ * The request object that will be sent.
562
+ * @param {string} request.parent
563
+ * Required. The parent branch resource name, such as
564
+ * `projects/{project}/locations/{location}/collections/{collection_id}`.
565
+ *
566
+ * If the caller does not have permission to list {@link protos.|DataStores}s under this
567
+ * location, regardless of whether or not this data store exists, a
568
+ * PERMISSION_DENIED error is returned.
569
+ * @param {number} request.pageSize
570
+ * Maximum number of
571
+ * {@link protos.google.cloud.discoveryengine.v1alpha.DataStore|DataStore}s to return. If
572
+ * unspecified, defaults to 10. The maximum allowed value is 50. Values above
573
+ * 50 will be coerced to 50.
574
+ *
575
+ * If this field is negative, an INVALID_ARGUMENT is returned.
576
+ * @param {string} request.pageToken
577
+ * A page token
578
+ * {@link protos.google.cloud.discoveryengine.v1alpha.ListDataStoresResponse.next_page_token|ListDataStoresResponse.next_page_token},
579
+ * received from a previous
580
+ * {@link protos.google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores|DataStoreService.ListDataStores}
581
+ * call. Provide this to retrieve the subsequent page.
582
+ *
583
+ * When paginating, all other parameters provided to
584
+ * {@link protos.google.cloud.discoveryengine.v1alpha.DataStoreService.ListDataStores|DataStoreService.ListDataStores}
585
+ * must match the call that provided the page token. Otherwise, an
586
+ * INVALID_ARGUMENT error is returned.
587
+ * @param {string} request.filter
588
+ * Filter by solution type. For example: filter =
589
+ * 'solution_type:SOLUTION_TYPE_SEARCH'
590
+ * @param {object} [options]
591
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
592
+ * @returns {Object}
593
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
594
+ * When you iterate the returned iterable, each element will be an object representing
595
+ * {@link protos.google.cloud.discoveryengine.v1alpha.DataStore|DataStore}. The API will be called under the hood as needed, once per the page,
596
+ * so you can stop the iteration when you don't need more results.
597
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
598
+ * for more details and examples.
599
+ * @example <caption>include:samples/generated/v1alpha/data_store_service.list_data_stores.js</caption>
600
+ * region_tag:discoveryengine_v1alpha_generated_DataStoreService_ListDataStores_async
601
+ */
602
+ listDataStoresAsync(request, options) {
603
+ var _a;
604
+ request = request || {};
605
+ options = options || {};
606
+ options.otherArgs = options.otherArgs || {};
607
+ options.otherArgs.headers = options.otherArgs.headers || {};
608
+ options.otherArgs.headers['x-goog-request-params'] =
609
+ this._gaxModule.routingHeader.fromParams({
610
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
611
+ });
612
+ const defaultCallSettings = this._defaults['listDataStores'];
613
+ const callSettings = defaultCallSettings.merge(options);
614
+ this.initialize();
615
+ return this.descriptors.page.listDataStores.asyncIterate(this.innerApiCalls['listDataStores'], request, callSettings);
616
+ }
617
+ /**
618
+ * Gets information about a location.
619
+ *
620
+ * @param {Object} request
621
+ * The request object that will be sent.
622
+ * @param {string} request.name
623
+ * Resource name for the location.
624
+ * @param {object} [options]
625
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
626
+ * @returns {Promise} - The promise which resolves to an array.
627
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
628
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
629
+ * for more details and examples.
630
+ * @example
631
+ * ```
632
+ * const [response] = await client.getLocation(request);
633
+ * ```
634
+ */
635
+ getLocation(request, options, callback) {
636
+ return this.locationsClient.getLocation(request, options, callback);
637
+ }
638
+ /**
639
+ * Lists information about the supported locations for this service. Returns an iterable object.
640
+ *
641
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
642
+ * @param {Object} request
643
+ * The request object that will be sent.
644
+ * @param {string} request.name
645
+ * The resource that owns the locations collection, if applicable.
646
+ * @param {string} request.filter
647
+ * The standard list filter.
648
+ * @param {number} request.pageSize
649
+ * The standard list page size.
650
+ * @param {string} request.pageToken
651
+ * The standard list page token.
652
+ * @param {object} [options]
653
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
654
+ * @returns {Object}
655
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
656
+ * When you iterate the returned iterable, each element will be an object representing
657
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
658
+ * so you can stop the iteration when you don't need more results.
659
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
660
+ * for more details and examples.
661
+ * @example
662
+ * ```
663
+ * const iterable = client.listLocationsAsync(request);
664
+ * for await (const response of iterable) {
665
+ * // process response
666
+ * }
667
+ * ```
668
+ */
669
+ listLocationsAsync(request, options) {
670
+ return this.locationsClient.listLocationsAsync(request, options);
671
+ }
672
+ /**
673
+ * Gets the latest state of a long-running operation. Clients can use this
674
+ * method to poll the operation result at intervals as recommended by the API
675
+ * service.
676
+ *
677
+ * @param {Object} request - The request object that will be sent.
678
+ * @param {string} request.name - The name of the operation resource.
679
+ * @param {Object=} options
680
+ * Optional parameters. You can override the default settings for this call,
681
+ * e.g, timeout, retries, paginations, etc. See {@link
682
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
683
+ * for the details.
684
+ * @param {function(?Error, ?Object)=} callback
685
+ * The function which will be called with the result of the API call.
686
+ *
687
+ * The second parameter to the callback is an object representing
688
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
689
+ * @return {Promise} - The promise which resolves to an array.
690
+ * The first element of the array is an object representing
691
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
692
+ * The promise has a method named "cancel" which cancels the ongoing API call.
693
+ *
694
+ * @example
695
+ * ```
696
+ * const client = longrunning.operationsClient();
697
+ * const name = '';
698
+ * const [response] = await client.getOperation({name});
699
+ * // doThingsWith(response)
700
+ * ```
701
+ */
702
+ getOperation(request, options, callback) {
703
+ return this.operationsClient.getOperation(request, options, callback);
704
+ }
705
+ /**
706
+ * Lists operations that match the specified filter in the request. If the
707
+ * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
708
+ *
709
+ * For-await-of syntax is used with the iterable to recursively get response element on-demand.
710
+ *
711
+ * @param {Object} request - The request object that will be sent.
712
+ * @param {string} request.name - The name of the operation collection.
713
+ * @param {string} request.filter - The standard list filter.
714
+ * @param {number=} request.pageSize -
715
+ * The maximum number of resources contained in the underlying API
716
+ * response. If page streaming is performed per-resource, this
717
+ * parameter does not affect the return value. If page streaming is
718
+ * performed per-page, this determines the maximum number of
719
+ * resources in a page.
720
+ * @param {Object=} options
721
+ * Optional parameters. You can override the default settings for this call,
722
+ * e.g, timeout, retries, paginations, etc. See {@link
723
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
724
+ * details.
725
+ * @returns {Object}
726
+ * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
727
+ *
728
+ * @example
729
+ * ```
730
+ * const client = longrunning.operationsClient();
731
+ * for await (const response of client.listOperationsAsync(request));
732
+ * // doThingsWith(response)
733
+ * ```
734
+ */
735
+ listOperationsAsync(request, options) {
736
+ return this.operationsClient.listOperationsAsync(request, options);
737
+ }
738
+ /**
739
+ * Starts asynchronous cancellation on a long-running operation. The server
740
+ * makes a best effort to cancel the operation, but success is not
741
+ * guaranteed. If the server doesn't support this method, it returns
742
+ * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
743
+ * {@link Operations.GetOperation} or
744
+ * other methods to check whether the cancellation succeeded or whether the
745
+ * operation completed despite cancellation. On successful cancellation,
746
+ * the operation is not deleted; instead, it becomes an operation with
747
+ * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
748
+ * 1, corresponding to `Code.CANCELLED`.
749
+ *
750
+ * @param {Object} request - The request object that will be sent.
751
+ * @param {string} request.name - The name of the operation resource to be cancelled.
752
+ * @param {Object=} options
753
+ * Optional parameters. You can override the default settings for this call,
754
+ * e.g, timeout, retries, paginations, etc. See {@link
755
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
756
+ * details.
757
+ * @param {function(?Error)=} callback
758
+ * The function which will be called with the result of the API call.
759
+ * @return {Promise} - The promise which resolves when API call finishes.
760
+ * The promise has a method named "cancel" which cancels the ongoing API
761
+ * call.
762
+ *
763
+ * @example
764
+ * ```
765
+ * const client = longrunning.operationsClient();
766
+ * await client.cancelOperation({name: ''});
767
+ * ```
768
+ */
769
+ cancelOperation(request, options, callback) {
770
+ return this.operationsClient.cancelOperation(request, options, callback);
771
+ }
772
+ /**
773
+ * Deletes a long-running operation. This method indicates that the client is
774
+ * no longer interested in the operation result. It does not cancel the
775
+ * operation. If the server doesn't support this method, it returns
776
+ * `google.rpc.Code.UNIMPLEMENTED`.
777
+ *
778
+ * @param {Object} request - The request object that will be sent.
779
+ * @param {string} request.name - The name of the operation resource to be deleted.
780
+ * @param {Object=} options
781
+ * Optional parameters. You can override the default settings for this call,
782
+ * e.g, timeout, retries, paginations, etc. See {@link
783
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
784
+ * for the details.
785
+ * @param {function(?Error)=} callback
786
+ * The function which will be called with the result of the API call.
787
+ * @return {Promise} - The promise which resolves when API call finishes.
788
+ * The promise has a method named "cancel" which cancels the ongoing API
789
+ * call.
790
+ *
791
+ * @example
792
+ * ```
793
+ * const client = longrunning.operationsClient();
794
+ * await client.deleteOperation({name: ''});
795
+ * ```
796
+ */
797
+ deleteOperation(request, options, callback) {
798
+ return this.operationsClient.deleteOperation(request, options, callback);
799
+ }
800
+ // --------------------
801
+ // -- Path templates --
802
+ // --------------------
803
+ /**
804
+ * Return a fully-qualified collection resource name string.
805
+ *
806
+ * @param {string} project
807
+ * @param {string} location
808
+ * @param {string} collection
809
+ * @returns {string} Resource name string.
810
+ */
811
+ collectionPath(project, location, collection) {
812
+ return this.pathTemplates.collectionPathTemplate.render({
813
+ project: project,
814
+ location: location,
815
+ collection: collection,
816
+ });
817
+ }
818
+ /**
819
+ * Parse the project from Collection resource.
820
+ *
821
+ * @param {string} collectionName
822
+ * A fully-qualified path representing Collection resource.
823
+ * @returns {string} A string representing the project.
824
+ */
825
+ matchProjectFromCollectionName(collectionName) {
826
+ return this.pathTemplates.collectionPathTemplate.match(collectionName)
827
+ .project;
828
+ }
829
+ /**
830
+ * Parse the location from Collection resource.
831
+ *
832
+ * @param {string} collectionName
833
+ * A fully-qualified path representing Collection resource.
834
+ * @returns {string} A string representing the location.
835
+ */
836
+ matchLocationFromCollectionName(collectionName) {
837
+ return this.pathTemplates.collectionPathTemplate.match(collectionName)
838
+ .location;
839
+ }
840
+ /**
841
+ * Parse the collection from Collection resource.
842
+ *
843
+ * @param {string} collectionName
844
+ * A fully-qualified path representing Collection resource.
845
+ * @returns {string} A string representing the collection.
846
+ */
847
+ matchCollectionFromCollectionName(collectionName) {
848
+ return this.pathTemplates.collectionPathTemplate.match(collectionName)
849
+ .collection;
850
+ }
851
+ /**
852
+ * Return a fully-qualified engine resource name string.
853
+ *
854
+ * @param {string} project
855
+ * @param {string} location
856
+ * @param {string} collection
857
+ * @param {string} engine
858
+ * @returns {string} Resource name string.
859
+ */
860
+ enginePath(project, location, collection, engine) {
861
+ return this.pathTemplates.enginePathTemplate.render({
862
+ project: project,
863
+ location: location,
864
+ collection: collection,
865
+ engine: engine,
866
+ });
867
+ }
868
+ /**
869
+ * Parse the project from Engine resource.
870
+ *
871
+ * @param {string} engineName
872
+ * A fully-qualified path representing Engine resource.
873
+ * @returns {string} A string representing the project.
874
+ */
875
+ matchProjectFromEngineName(engineName) {
876
+ return this.pathTemplates.enginePathTemplate.match(engineName).project;
877
+ }
878
+ /**
879
+ * Parse the location from Engine resource.
880
+ *
881
+ * @param {string} engineName
882
+ * A fully-qualified path representing Engine resource.
883
+ * @returns {string} A string representing the location.
884
+ */
885
+ matchLocationFromEngineName(engineName) {
886
+ return this.pathTemplates.enginePathTemplate.match(engineName).location;
887
+ }
888
+ /**
889
+ * Parse the collection from Engine resource.
890
+ *
891
+ * @param {string} engineName
892
+ * A fully-qualified path representing Engine resource.
893
+ * @returns {string} A string representing the collection.
894
+ */
895
+ matchCollectionFromEngineName(engineName) {
896
+ return this.pathTemplates.enginePathTemplate.match(engineName).collection;
897
+ }
898
+ /**
899
+ * Parse the engine from Engine resource.
900
+ *
901
+ * @param {string} engineName
902
+ * A fully-qualified path representing Engine resource.
903
+ * @returns {string} A string representing the engine.
904
+ */
905
+ matchEngineFromEngineName(engineName) {
906
+ return this.pathTemplates.enginePathTemplate.match(engineName).engine;
907
+ }
908
+ /**
909
+ * Return a fully-qualified projectLocationCollectionDataStore resource name string.
910
+ *
911
+ * @param {string} project
912
+ * @param {string} location
913
+ * @param {string} collection
914
+ * @param {string} data_store
915
+ * @returns {string} Resource name string.
916
+ */
917
+ projectLocationCollectionDataStorePath(project, location, collection, dataStore) {
918
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render({
919
+ project: project,
920
+ location: location,
921
+ collection: collection,
922
+ data_store: dataStore,
923
+ });
924
+ }
925
+ /**
926
+ * Parse the project from ProjectLocationCollectionDataStore resource.
927
+ *
928
+ * @param {string} projectLocationCollectionDataStoreName
929
+ * A fully-qualified path representing project_location_collection_data_store resource.
930
+ * @returns {string} A string representing the project.
931
+ */
932
+ matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
933
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).project;
934
+ }
935
+ /**
936
+ * Parse the location from ProjectLocationCollectionDataStore resource.
937
+ *
938
+ * @param {string} projectLocationCollectionDataStoreName
939
+ * A fully-qualified path representing project_location_collection_data_store resource.
940
+ * @returns {string} A string representing the location.
941
+ */
942
+ matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
943
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).location;
944
+ }
945
+ /**
946
+ * Parse the collection from ProjectLocationCollectionDataStore resource.
947
+ *
948
+ * @param {string} projectLocationCollectionDataStoreName
949
+ * A fully-qualified path representing project_location_collection_data_store resource.
950
+ * @returns {string} A string representing the collection.
951
+ */
952
+ matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
953
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).collection;
954
+ }
955
+ /**
956
+ * Parse the data_store from ProjectLocationCollectionDataStore resource.
957
+ *
958
+ * @param {string} projectLocationCollectionDataStoreName
959
+ * A fully-qualified path representing project_location_collection_data_store resource.
960
+ * @returns {string} A string representing the data_store.
961
+ */
962
+ matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
963
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).data_store;
964
+ }
965
+ /**
966
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
967
+ *
968
+ * @param {string} project
969
+ * @param {string} location
970
+ * @param {string} collection
971
+ * @param {string} data_store
972
+ * @param {string} branch
973
+ * @param {string} document
974
+ * @returns {string} Resource name string.
975
+ */
976
+ projectLocationCollectionDataStoreBranchDocumentPath(project, location, collection, dataStore, branch, document) {
977
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render({
978
+ project: project,
979
+ location: location,
980
+ collection: collection,
981
+ data_store: dataStore,
982
+ branch: branch,
983
+ document: document,
984
+ });
985
+ }
986
+ /**
987
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource.
988
+ *
989
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
990
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
991
+ * @returns {string} A string representing the project.
992
+ */
993
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
994
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).project;
995
+ }
996
+ /**
997
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource.
998
+ *
999
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
1000
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
1001
+ * @returns {string} A string representing the location.
1002
+ */
1003
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1004
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).location;
1005
+ }
1006
+ /**
1007
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource.
1008
+ *
1009
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
1010
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
1011
+ * @returns {string} A string representing the collection.
1012
+ */
1013
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1014
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).collection;
1015
+ }
1016
+ /**
1017
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource.
1018
+ *
1019
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
1020
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
1021
+ * @returns {string} A string representing the data_store.
1022
+ */
1023
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1024
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).data_store;
1025
+ }
1026
+ /**
1027
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource.
1028
+ *
1029
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
1030
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
1031
+ * @returns {string} A string representing the branch.
1032
+ */
1033
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1034
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).branch;
1035
+ }
1036
+ /**
1037
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource.
1038
+ *
1039
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
1040
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
1041
+ * @returns {string} A string representing the document.
1042
+ */
1043
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1044
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
1045
+ }
1046
+ /**
1047
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
1048
+ *
1049
+ * @param {string} project
1050
+ * @param {string} location
1051
+ * @param {string} collection
1052
+ * @param {string} data_store
1053
+ * @param {string} conversation
1054
+ * @returns {string} Resource name string.
1055
+ */
1056
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
1057
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
1058
+ project: project,
1059
+ location: location,
1060
+ collection: collection,
1061
+ data_store: dataStore,
1062
+ conversation: conversation,
1063
+ });
1064
+ }
1065
+ /**
1066
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
1067
+ *
1068
+ * @param {string} projectLocationCollectionDataStoreConversationName
1069
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
1070
+ * @returns {string} A string representing the project.
1071
+ */
1072
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
1073
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
1074
+ }
1075
+ /**
1076
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
1077
+ *
1078
+ * @param {string} projectLocationCollectionDataStoreConversationName
1079
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
1080
+ * @returns {string} A string representing the location.
1081
+ */
1082
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
1083
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
1084
+ }
1085
+ /**
1086
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
1087
+ *
1088
+ * @param {string} projectLocationCollectionDataStoreConversationName
1089
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
1090
+ * @returns {string} A string representing the collection.
1091
+ */
1092
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
1093
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
1094
+ }
1095
+ /**
1096
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
1097
+ *
1098
+ * @param {string} projectLocationCollectionDataStoreConversationName
1099
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
1100
+ * @returns {string} A string representing the data_store.
1101
+ */
1102
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
1103
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
1104
+ }
1105
+ /**
1106
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
1107
+ *
1108
+ * @param {string} projectLocationCollectionDataStoreConversationName
1109
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
1110
+ * @returns {string} A string representing the conversation.
1111
+ */
1112
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
1113
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
1114
+ }
1115
+ /**
1116
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
1117
+ *
1118
+ * @param {string} project
1119
+ * @param {string} location
1120
+ * @param {string} collection
1121
+ * @param {string} data_store
1122
+ * @param {string} schema
1123
+ * @returns {string} Resource name string.
1124
+ */
1125
+ projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
1126
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
1127
+ project: project,
1128
+ location: location,
1129
+ collection: collection,
1130
+ data_store: dataStore,
1131
+ schema: schema,
1132
+ });
1133
+ }
1134
+ /**
1135
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
1136
+ *
1137
+ * @param {string} projectLocationCollectionDataStoreSchemaName
1138
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
1139
+ * @returns {string} A string representing the project.
1140
+ */
1141
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
1142
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
1143
+ }
1144
+ /**
1145
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
1146
+ *
1147
+ * @param {string} projectLocationCollectionDataStoreSchemaName
1148
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
1149
+ * @returns {string} A string representing the location.
1150
+ */
1151
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
1152
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
1153
+ }
1154
+ /**
1155
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
1156
+ *
1157
+ * @param {string} projectLocationCollectionDataStoreSchemaName
1158
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
1159
+ * @returns {string} A string representing the collection.
1160
+ */
1161
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
1162
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
1163
+ }
1164
+ /**
1165
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
1166
+ *
1167
+ * @param {string} projectLocationCollectionDataStoreSchemaName
1168
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
1169
+ * @returns {string} A string representing the data_store.
1170
+ */
1171
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
1172
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
1173
+ }
1174
+ /**
1175
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
1176
+ *
1177
+ * @param {string} projectLocationCollectionDataStoreSchemaName
1178
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
1179
+ * @returns {string} A string representing the schema.
1180
+ */
1181
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
1182
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
1183
+ }
1184
+ /**
1185
+ * Return a fully-qualified projectLocationDataStore resource name string.
1186
+ *
1187
+ * @param {string} project
1188
+ * @param {string} location
1189
+ * @param {string} data_store
1190
+ * @returns {string} Resource name string.
1191
+ */
1192
+ projectLocationDataStorePath(project, location, dataStore) {
1193
+ return this.pathTemplates.projectLocationDataStorePathTemplate.render({
1194
+ project: project,
1195
+ location: location,
1196
+ data_store: dataStore,
1197
+ });
1198
+ }
1199
+ /**
1200
+ * Parse the project from ProjectLocationDataStore resource.
1201
+ *
1202
+ * @param {string} projectLocationDataStoreName
1203
+ * A fully-qualified path representing project_location_data_store resource.
1204
+ * @returns {string} A string representing the project.
1205
+ */
1206
+ matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1207
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).project;
1208
+ }
1209
+ /**
1210
+ * Parse the location from ProjectLocationDataStore resource.
1211
+ *
1212
+ * @param {string} projectLocationDataStoreName
1213
+ * A fully-qualified path representing project_location_data_store resource.
1214
+ * @returns {string} A string representing the location.
1215
+ */
1216
+ matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1217
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).location;
1218
+ }
1219
+ /**
1220
+ * Parse the data_store from ProjectLocationDataStore resource.
1221
+ *
1222
+ * @param {string} projectLocationDataStoreName
1223
+ * A fully-qualified path representing project_location_data_store resource.
1224
+ * @returns {string} A string representing the data_store.
1225
+ */
1226
+ matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1227
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).data_store;
1228
+ }
1229
+ /**
1230
+ * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
1231
+ *
1232
+ * @param {string} project
1233
+ * @param {string} location
1234
+ * @param {string} data_store
1235
+ * @param {string} branch
1236
+ * @param {string} document
1237
+ * @returns {string} Resource name string.
1238
+ */
1239
+ projectLocationDataStoreBranchDocumentPath(project, location, dataStore, branch, document) {
1240
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render({
1241
+ project: project,
1242
+ location: location,
1243
+ data_store: dataStore,
1244
+ branch: branch,
1245
+ document: document,
1246
+ });
1247
+ }
1248
+ /**
1249
+ * Parse the project from ProjectLocationDataStoreBranchDocument resource.
1250
+ *
1251
+ * @param {string} projectLocationDataStoreBranchDocumentName
1252
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1253
+ * @returns {string} A string representing the project.
1254
+ */
1255
+ matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1256
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).project;
1257
+ }
1258
+ /**
1259
+ * Parse the location from ProjectLocationDataStoreBranchDocument resource.
1260
+ *
1261
+ * @param {string} projectLocationDataStoreBranchDocumentName
1262
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1263
+ * @returns {string} A string representing the location.
1264
+ */
1265
+ matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1266
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).location;
1267
+ }
1268
+ /**
1269
+ * Parse the data_store from ProjectLocationDataStoreBranchDocument resource.
1270
+ *
1271
+ * @param {string} projectLocationDataStoreBranchDocumentName
1272
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1273
+ * @returns {string} A string representing the data_store.
1274
+ */
1275
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1276
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).data_store;
1277
+ }
1278
+ /**
1279
+ * Parse the branch from ProjectLocationDataStoreBranchDocument resource.
1280
+ *
1281
+ * @param {string} projectLocationDataStoreBranchDocumentName
1282
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1283
+ * @returns {string} A string representing the branch.
1284
+ */
1285
+ matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1286
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).branch;
1287
+ }
1288
+ /**
1289
+ * Parse the document from ProjectLocationDataStoreBranchDocument resource.
1290
+ *
1291
+ * @param {string} projectLocationDataStoreBranchDocumentName
1292
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1293
+ * @returns {string} A string representing the document.
1294
+ */
1295
+ matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1296
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
1297
+ }
1298
+ /**
1299
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1300
+ *
1301
+ * @param {string} project
1302
+ * @param {string} location
1303
+ * @param {string} data_store
1304
+ * @param {string} conversation
1305
+ * @returns {string} Resource name string.
1306
+ */
1307
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1308
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1309
+ project: project,
1310
+ location: location,
1311
+ data_store: dataStore,
1312
+ conversation: conversation,
1313
+ });
1314
+ }
1315
+ /**
1316
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1317
+ *
1318
+ * @param {string} projectLocationDataStoreConversationName
1319
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1320
+ * @returns {string} A string representing the project.
1321
+ */
1322
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1323
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1324
+ }
1325
+ /**
1326
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1327
+ *
1328
+ * @param {string} projectLocationDataStoreConversationName
1329
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1330
+ * @returns {string} A string representing the location.
1331
+ */
1332
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1333
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1334
+ }
1335
+ /**
1336
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1337
+ *
1338
+ * @param {string} projectLocationDataStoreConversationName
1339
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1340
+ * @returns {string} A string representing the data_store.
1341
+ */
1342
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1343
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1344
+ }
1345
+ /**
1346
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1347
+ *
1348
+ * @param {string} projectLocationDataStoreConversationName
1349
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1350
+ * @returns {string} A string representing the conversation.
1351
+ */
1352
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1353
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1354
+ }
1355
+ /**
1356
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
1357
+ *
1358
+ * @param {string} project
1359
+ * @param {string} location
1360
+ * @param {string} data_store
1361
+ * @param {string} schema
1362
+ * @returns {string} Resource name string.
1363
+ */
1364
+ projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
1365
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
1366
+ project: project,
1367
+ location: location,
1368
+ data_store: dataStore,
1369
+ schema: schema,
1370
+ });
1371
+ }
1372
+ /**
1373
+ * Parse the project from ProjectLocationDataStoreSchema resource.
1374
+ *
1375
+ * @param {string} projectLocationDataStoreSchemaName
1376
+ * A fully-qualified path representing project_location_data_store_schema resource.
1377
+ * @returns {string} A string representing the project.
1378
+ */
1379
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1380
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
1381
+ }
1382
+ /**
1383
+ * Parse the location from ProjectLocationDataStoreSchema resource.
1384
+ *
1385
+ * @param {string} projectLocationDataStoreSchemaName
1386
+ * A fully-qualified path representing project_location_data_store_schema resource.
1387
+ * @returns {string} A string representing the location.
1388
+ */
1389
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1390
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
1391
+ }
1392
+ /**
1393
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
1394
+ *
1395
+ * @param {string} projectLocationDataStoreSchemaName
1396
+ * A fully-qualified path representing project_location_data_store_schema resource.
1397
+ * @returns {string} A string representing the data_store.
1398
+ */
1399
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1400
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
1401
+ }
1402
+ /**
1403
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
1404
+ *
1405
+ * @param {string} projectLocationDataStoreSchemaName
1406
+ * A fully-qualified path representing project_location_data_store_schema resource.
1407
+ * @returns {string} A string representing the schema.
1408
+ */
1409
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1410
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
1411
+ }
1412
+ /**
1413
+ * Terminate the gRPC channel and close the client.
1414
+ *
1415
+ * The client will no longer be usable and all future behavior is undefined.
1416
+ * @returns {Promise} A promise that resolves when the client is closed.
1417
+ */
1418
+ close() {
1419
+ if (this.dataStoreServiceStub && !this._terminated) {
1420
+ return this.dataStoreServiceStub.then(stub => {
1421
+ this._terminated = true;
1422
+ stub.close();
1423
+ this.locationsClient.close();
1424
+ this.operationsClient.close();
1425
+ });
1426
+ }
1427
+ return Promise.resolve();
1428
+ }
1429
+ }
1430
+ exports.DataStoreServiceClient = DataStoreServiceClient;
1431
+ //# sourceMappingURL=data_store_service_client.js.map