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