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