@google-cloud/discoveryengine 1.1.0 → 1.2.0

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