@google-cloud/discoveryengine 1.2.0 → 1.3.1

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 (63) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +25 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +38 -8
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +3 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +39 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +98 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +307 -0
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +1 -1
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +370 -0
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +336 -0
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +9 -3
  12. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +123 -3
  13. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +147 -0
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +164 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +540 -0
  16. package/build/protos/protos.d.ts +10923 -3222
  17. package/build/protos/protos.js +29891 -12914
  18. package/build/protos/protos.json +2367 -668
  19. package/build/src/index.js +1 -1
  20. package/build/src/v1/completion_service_client.js +1 -1
  21. package/build/src/v1/conversational_search_service_client.js +1 -1
  22. package/build/src/v1/document_service_client.js +1 -1
  23. package/build/src/v1/index.js +1 -1
  24. package/build/src/v1/schema_service_client.js +1 -1
  25. package/build/src/v1/search_service_client.js +1 -1
  26. package/build/src/v1/user_event_service_client.js +1 -1
  27. package/build/src/v1alpha/completion_service_client.d.ts +261 -0
  28. package/build/src/v1alpha/completion_service_client.js +360 -0
  29. package/build/src/v1alpha/conversational_search_service_client.d.ts +278 -0
  30. package/build/src/v1alpha/conversational_search_service_client.js +360 -0
  31. package/build/src/v1alpha/data_store_service_client.d.ts +1279 -0
  32. package/build/src/v1alpha/data_store_service_client.js +1739 -0
  33. package/build/src/v1alpha/data_store_service_client_config.json +46 -0
  34. package/build/src/v1alpha/document_service_client.d.ts +336 -0
  35. package/build/src/v1alpha/document_service_client.js +472 -2
  36. package/build/src/v1alpha/engine_service_client.d.ts +1298 -0
  37. package/build/src/v1alpha/engine_service_client.js +1789 -0
  38. package/build/src/v1alpha/engine_service_client_config.json +58 -0
  39. package/build/src/v1alpha/index.d.ts +3 -0
  40. package/build/src/v1alpha/index.js +7 -1
  41. package/build/src/v1alpha/recommendation_service_client.d.ts +345 -3
  42. package/build/src/v1alpha/recommendation_service_client.js +464 -0
  43. package/build/src/v1alpha/schema_service_client.d.ts +261 -0
  44. package/build/src/v1alpha/schema_service_client.js +368 -2
  45. package/build/src/v1alpha/search_service_client.d.ts +453 -9
  46. package/build/src/v1alpha/search_service_client.js +542 -6
  47. package/build/src/v1alpha/search_tuning_service_client.d.ts +968 -0
  48. package/build/src/v1alpha/search_tuning_service_client.js +1452 -0
  49. package/build/src/v1alpha/search_tuning_service_client_config.json +30 -0
  50. package/build/src/v1alpha/site_search_engine_service_client.d.ts +856 -1
  51. package/build/src/v1alpha/site_search_engine_service_client.js +993 -34
  52. package/build/src/v1alpha/site_search_engine_service_client_config.json +44 -0
  53. package/build/src/v1alpha/user_event_service_client.d.ts +261 -0
  54. package/build/src/v1alpha/user_event_service_client.js +368 -2
  55. package/build/src/v1beta/completion_service_client.js +1 -1
  56. package/build/src/v1beta/conversational_search_service_client.js +1 -1
  57. package/build/src/v1beta/document_service_client.js +1 -1
  58. package/build/src/v1beta/index.js +1 -1
  59. package/build/src/v1beta/recommendation_service_client.js +1 -1
  60. package/build/src/v1beta/schema_service_client.js +1 -1
  61. package/build/src/v1beta/search_service_client.js +1 -1
  62. package/build/src/v1beta/user_event_service_client.js +1 -1
  63. package/package.json +4 -4
@@ -0,0 +1,1789 @@
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
+ projectLocationCollectionDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine'),
149
+ projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
150
+ projectLocationCollectionEngineConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/conversations/{conversation}'),
151
+ projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
152
+ projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
153
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
154
+ projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
155
+ projectLocationDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine'),
156
+ projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
157
+ };
158
+ // Some of the methods on this service return "paged" results,
159
+ // (e.g. 50 results at a time, with tokens to get subsequent
160
+ // pages). Denote the keys used for pagination and results.
161
+ this.descriptors.page = {
162
+ listEngines: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'engines'),
163
+ };
164
+ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
165
+ // This API contains "long-running operations", which return a
166
+ // an Operation object that allows for tracking of the operation,
167
+ // rather than holding a request open.
168
+ const lroOptions = {
169
+ auth: this.auth,
170
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
171
+ };
172
+ if (opts.fallback) {
173
+ lroOptions.protoJson = protoFilesRoot;
174
+ lroOptions.httpRules = [
175
+ {
176
+ selector: 'google.longrunning.Operations.GetOperation',
177
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
178
+ additional_bindings: [
179
+ {
180
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
181
+ },
182
+ {
183
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
184
+ },
185
+ {
186
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
187
+ },
188
+ {
189
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
190
+ },
191
+ {
192
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
193
+ },
194
+ {
195
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
196
+ },
197
+ {
198
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
199
+ },
200
+ {
201
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
202
+ },
203
+ {
204
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
205
+ },
206
+ {
207
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
208
+ },
209
+ {
210
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
211
+ },
212
+ { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
213
+ { get: '/v1alpha/{name=projects/*/operations/*}' },
214
+ ],
215
+ },
216
+ {
217
+ selector: 'google.longrunning.Operations.ListOperations',
218
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
219
+ additional_bindings: [
220
+ {
221
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
222
+ },
223
+ {
224
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
225
+ },
226
+ {
227
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
228
+ },
229
+ {
230
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
231
+ },
232
+ {
233
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
234
+ },
235
+ {
236
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
237
+ },
238
+ {
239
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
240
+ },
241
+ {
242
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
243
+ },
244
+ {
245
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
246
+ },
247
+ {
248
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
249
+ },
250
+ {
251
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
252
+ },
253
+ { get: '/v1alpha/{name=projects/*/locations/*}/operations' },
254
+ { get: '/v1alpha/{name=projects/*}/operations' },
255
+ ],
256
+ },
257
+ ];
258
+ }
259
+ this.operationsClient = this._gaxModule
260
+ .lro(lroOptions)
261
+ .operationsClient(opts);
262
+ const createEngineResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.Engine');
263
+ const createEngineMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.CreateEngineMetadata');
264
+ const deleteEngineResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
265
+ const deleteEngineMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.DeleteEngineMetadata');
266
+ const tuneEngineResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.TuneEngineResponse');
267
+ const tuneEngineMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.TuneEngineMetadata');
268
+ this.descriptors.longrunning = {
269
+ createEngine: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createEngineResponse.decode.bind(createEngineResponse), createEngineMetadata.decode.bind(createEngineMetadata)),
270
+ deleteEngine: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteEngineResponse.decode.bind(deleteEngineResponse), deleteEngineMetadata.decode.bind(deleteEngineMetadata)),
271
+ tuneEngine: new this._gaxModule.LongrunningDescriptor(this.operationsClient, tuneEngineResponse.decode.bind(tuneEngineResponse), tuneEngineMetadata.decode.bind(tuneEngineMetadata)),
272
+ };
273
+ // Put together the default options sent with requests.
274
+ this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.EngineService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
275
+ // Set up a dictionary of "inner API calls"; the core implementation
276
+ // of calling the API is handled in `google-gax`, with this code
277
+ // merely providing the destination and request information.
278
+ this.innerApiCalls = {};
279
+ // Add a warn function to the client constructor so it can be easily tested.
280
+ this.warn = this._gaxModule.warn;
281
+ }
282
+ /**
283
+ * Initialize the client.
284
+ * Performs asynchronous operations (such as authentication) and prepares the client.
285
+ * This function will be called automatically when any class method is called for the
286
+ * first time, but if you need to initialize it before calling an actual method,
287
+ * feel free to call initialize() directly.
288
+ *
289
+ * You can await on this method if you want to make sure the client is initialized.
290
+ *
291
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
292
+ */
293
+ initialize() {
294
+ // If the client stub promise is already initialized, return immediately.
295
+ if (this.engineServiceStub) {
296
+ return this.engineServiceStub;
297
+ }
298
+ // Put together the "service stub" for
299
+ // google.cloud.discoveryengine.v1alpha.EngineService.
300
+ this.engineServiceStub = this._gaxGrpc.createStub(this._opts.fallback
301
+ ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.EngineService')
302
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
303
+ this._protos.google.cloud.discoveryengine.v1alpha
304
+ .EngineService, this._opts, this._providedCustomServicePath);
305
+ // Iterate over each of the methods that the service provides
306
+ // and create an API call method for each.
307
+ const engineServiceStubMethods = [
308
+ 'createEngine',
309
+ 'deleteEngine',
310
+ 'updateEngine',
311
+ 'getEngine',
312
+ 'listEngines',
313
+ 'pauseEngine',
314
+ 'resumeEngine',
315
+ 'tuneEngine',
316
+ ];
317
+ for (const methodName of engineServiceStubMethods) {
318
+ const callPromise = this.engineServiceStub.then(stub => (...args) => {
319
+ if (this._terminated) {
320
+ return Promise.reject('The client has already been closed.');
321
+ }
322
+ const func = stub[methodName];
323
+ return func.apply(stub, args);
324
+ }, (err) => () => {
325
+ throw err;
326
+ });
327
+ const descriptor = this.descriptors.page[methodName] ||
328
+ this.descriptors.longrunning[methodName] ||
329
+ undefined;
330
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
331
+ this.innerApiCalls[methodName] = apiCall;
332
+ }
333
+ return this.engineServiceStub;
334
+ }
335
+ /**
336
+ * The DNS address for this API service.
337
+ * @returns {string} The DNS address for this service.
338
+ */
339
+ static get servicePath() {
340
+ return 'discoveryengine.googleapis.com';
341
+ }
342
+ /**
343
+ * The DNS address for this API service - same as servicePath(),
344
+ * exists for compatibility reasons.
345
+ * @returns {string} The DNS address for this service.
346
+ */
347
+ static get apiEndpoint() {
348
+ return 'discoveryengine.googleapis.com';
349
+ }
350
+ /**
351
+ * The port for this API service.
352
+ * @returns {number} The default port for this service.
353
+ */
354
+ static get port() {
355
+ return 443;
356
+ }
357
+ /**
358
+ * The scopes needed to make gRPC calls for every method defined
359
+ * in this service.
360
+ * @returns {string[]} List of default scopes.
361
+ */
362
+ static get scopes() {
363
+ return ['https://www.googleapis.com/auth/cloud-platform'];
364
+ }
365
+ /**
366
+ * Return the project ID used by this class.
367
+ * @returns {Promise} A promise that resolves to string containing the project ID.
368
+ */
369
+ getProjectId(callback) {
370
+ if (callback) {
371
+ this.auth.getProjectId(callback);
372
+ return;
373
+ }
374
+ return this.auth.getProjectId();
375
+ }
376
+ updateEngine(request, optionsOrCallback, callback) {
377
+ var _a;
378
+ request = request || {};
379
+ let options;
380
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
381
+ callback = optionsOrCallback;
382
+ options = {};
383
+ }
384
+ else {
385
+ options = optionsOrCallback;
386
+ }
387
+ options = options || {};
388
+ options.otherArgs = options.otherArgs || {};
389
+ options.otherArgs.headers = options.otherArgs.headers || {};
390
+ options.otherArgs.headers['x-goog-request-params'] =
391
+ this._gaxModule.routingHeader.fromParams({
392
+ 'engine.name': (_a = request.engine.name) !== null && _a !== void 0 ? _a : '',
393
+ });
394
+ this.initialize();
395
+ return this.innerApiCalls.updateEngine(request, options, callback);
396
+ }
397
+ getEngine(request, optionsOrCallback, callback) {
398
+ var _a;
399
+ request = request || {};
400
+ let options;
401
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
402
+ callback = optionsOrCallback;
403
+ options = {};
404
+ }
405
+ else {
406
+ options = optionsOrCallback;
407
+ }
408
+ options = options || {};
409
+ options.otherArgs = options.otherArgs || {};
410
+ options.otherArgs.headers = options.otherArgs.headers || {};
411
+ options.otherArgs.headers['x-goog-request-params'] =
412
+ this._gaxModule.routingHeader.fromParams({
413
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
414
+ });
415
+ this.initialize();
416
+ return this.innerApiCalls.getEngine(request, options, callback);
417
+ }
418
+ pauseEngine(request, optionsOrCallback, callback) {
419
+ var _a;
420
+ request = request || {};
421
+ let options;
422
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
423
+ callback = optionsOrCallback;
424
+ options = {};
425
+ }
426
+ else {
427
+ options = optionsOrCallback;
428
+ }
429
+ options = options || {};
430
+ options.otherArgs = options.otherArgs || {};
431
+ options.otherArgs.headers = options.otherArgs.headers || {};
432
+ options.otherArgs.headers['x-goog-request-params'] =
433
+ this._gaxModule.routingHeader.fromParams({
434
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
435
+ });
436
+ this.initialize();
437
+ return this.innerApiCalls.pauseEngine(request, options, callback);
438
+ }
439
+ resumeEngine(request, optionsOrCallback, callback) {
440
+ var _a;
441
+ request = request || {};
442
+ let options;
443
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
444
+ callback = optionsOrCallback;
445
+ options = {};
446
+ }
447
+ else {
448
+ options = optionsOrCallback;
449
+ }
450
+ options = options || {};
451
+ options.otherArgs = options.otherArgs || {};
452
+ options.otherArgs.headers = options.otherArgs.headers || {};
453
+ options.otherArgs.headers['x-goog-request-params'] =
454
+ this._gaxModule.routingHeader.fromParams({
455
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
456
+ });
457
+ this.initialize();
458
+ return this.innerApiCalls.resumeEngine(request, options, callback);
459
+ }
460
+ createEngine(request, optionsOrCallback, callback) {
461
+ var _a;
462
+ request = request || {};
463
+ let options;
464
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
465
+ callback = optionsOrCallback;
466
+ options = {};
467
+ }
468
+ else {
469
+ options = optionsOrCallback;
470
+ }
471
+ options = options || {};
472
+ options.otherArgs = options.otherArgs || {};
473
+ options.otherArgs.headers = options.otherArgs.headers || {};
474
+ options.otherArgs.headers['x-goog-request-params'] =
475
+ this._gaxModule.routingHeader.fromParams({
476
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
477
+ });
478
+ this.initialize();
479
+ return this.innerApiCalls.createEngine(request, options, callback);
480
+ }
481
+ /**
482
+ * Check the status of the long running operation returned by `createEngine()`.
483
+ * @param {String} name
484
+ * The operation name that will be passed.
485
+ * @returns {Promise} - The promise which resolves to an object.
486
+ * The decoded operation object has result and metadata field to get information from.
487
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
488
+ * for more details and examples.
489
+ * @example <caption>include:samples/generated/v1alpha/engine_service.create_engine.js</caption>
490
+ * region_tag:discoveryengine_v1alpha_generated_EngineService_CreateEngine_async
491
+ */
492
+ async checkCreateEngineProgress(name) {
493
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
494
+ const [operation] = await this.operationsClient.getOperation(request);
495
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createEngine, this._gaxModule.createDefaultBackoffSettings());
496
+ return decodeOperation;
497
+ }
498
+ deleteEngine(request, optionsOrCallback, callback) {
499
+ var _a;
500
+ request = request || {};
501
+ let options;
502
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
503
+ callback = optionsOrCallback;
504
+ options = {};
505
+ }
506
+ else {
507
+ options = optionsOrCallback;
508
+ }
509
+ options = options || {};
510
+ options.otherArgs = options.otherArgs || {};
511
+ options.otherArgs.headers = options.otherArgs.headers || {};
512
+ options.otherArgs.headers['x-goog-request-params'] =
513
+ this._gaxModule.routingHeader.fromParams({
514
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
515
+ });
516
+ this.initialize();
517
+ return this.innerApiCalls.deleteEngine(request, options, callback);
518
+ }
519
+ /**
520
+ * Check the status of the long running operation returned by `deleteEngine()`.
521
+ * @param {String} name
522
+ * The operation name that will be passed.
523
+ * @returns {Promise} - The promise which resolves to an object.
524
+ * The decoded operation object has result and metadata field to get information from.
525
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
526
+ * for more details and examples.
527
+ * @example <caption>include:samples/generated/v1alpha/engine_service.delete_engine.js</caption>
528
+ * region_tag:discoveryengine_v1alpha_generated_EngineService_DeleteEngine_async
529
+ */
530
+ async checkDeleteEngineProgress(name) {
531
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
532
+ const [operation] = await this.operationsClient.getOperation(request);
533
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteEngine, this._gaxModule.createDefaultBackoffSettings());
534
+ return decodeOperation;
535
+ }
536
+ tuneEngine(request, optionsOrCallback, callback) {
537
+ var _a;
538
+ request = request || {};
539
+ let options;
540
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
541
+ callback = optionsOrCallback;
542
+ options = {};
543
+ }
544
+ else {
545
+ options = optionsOrCallback;
546
+ }
547
+ options = options || {};
548
+ options.otherArgs = options.otherArgs || {};
549
+ options.otherArgs.headers = options.otherArgs.headers || {};
550
+ options.otherArgs.headers['x-goog-request-params'] =
551
+ this._gaxModule.routingHeader.fromParams({
552
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
553
+ });
554
+ this.initialize();
555
+ return this.innerApiCalls.tuneEngine(request, options, callback);
556
+ }
557
+ /**
558
+ * Check the status of the long running operation returned by `tuneEngine()`.
559
+ * @param {String} name
560
+ * The operation name that will be passed.
561
+ * @returns {Promise} - The promise which resolves to an object.
562
+ * The decoded operation object has result and metadata field to get information from.
563
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
564
+ * for more details and examples.
565
+ * @example <caption>include:samples/generated/v1alpha/engine_service.tune_engine.js</caption>
566
+ * region_tag:discoveryengine_v1alpha_generated_EngineService_TuneEngine_async
567
+ */
568
+ async checkTuneEngineProgress(name) {
569
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
570
+ const [operation] = await this.operationsClient.getOperation(request);
571
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.tuneEngine, this._gaxModule.createDefaultBackoffSettings());
572
+ return decodeOperation;
573
+ }
574
+ listEngines(request, optionsOrCallback, callback) {
575
+ var _a;
576
+ request = request || {};
577
+ let options;
578
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
579
+ callback = optionsOrCallback;
580
+ options = {};
581
+ }
582
+ else {
583
+ options = optionsOrCallback;
584
+ }
585
+ options = options || {};
586
+ options.otherArgs = options.otherArgs || {};
587
+ options.otherArgs.headers = options.otherArgs.headers || {};
588
+ options.otherArgs.headers['x-goog-request-params'] =
589
+ this._gaxModule.routingHeader.fromParams({
590
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
591
+ });
592
+ this.initialize();
593
+ return this.innerApiCalls.listEngines(request, options, callback);
594
+ }
595
+ /**
596
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
597
+ * @param {Object} request
598
+ * The request object that will be sent.
599
+ * @param {string} request.parent
600
+ * Required. The parent resource name, such as
601
+ * `projects/{project}/locations/{location}/collections/{collection_id}`.
602
+ * @param {number} [request.pageSize]
603
+ * Optional. Not supported.
604
+ * @param {string} [request.pageToken]
605
+ * Optional. Not supported.
606
+ * @param {string} [request.filter]
607
+ * Optional. Filter by solution type. For example:
608
+ * solution_type=SOLUTION_TYPE_SEARCH
609
+ * @param {object} [options]
610
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
611
+ * @returns {Stream}
612
+ * An object stream which emits an object representing {@link protos.google.cloud.discoveryengine.v1alpha.Engine|Engine} on 'data' event.
613
+ * The client library will perform auto-pagination by default: it will call the API as many
614
+ * times as needed. Note that it can affect your quota.
615
+ * We recommend using `listEnginesAsync()`
616
+ * method described below for async iteration which you can stop as needed.
617
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
618
+ * for more details and examples.
619
+ */
620
+ listEnginesStream(request, options) {
621
+ var _a;
622
+ request = request || {};
623
+ options = options || {};
624
+ options.otherArgs = options.otherArgs || {};
625
+ options.otherArgs.headers = options.otherArgs.headers || {};
626
+ options.otherArgs.headers['x-goog-request-params'] =
627
+ this._gaxModule.routingHeader.fromParams({
628
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
629
+ });
630
+ const defaultCallSettings = this._defaults['listEngines'];
631
+ const callSettings = defaultCallSettings.merge(options);
632
+ this.initialize();
633
+ return this.descriptors.page.listEngines.createStream(this.innerApiCalls.listEngines, request, callSettings);
634
+ }
635
+ /**
636
+ * Equivalent to `listEngines`, but returns an iterable object.
637
+ *
638
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
639
+ * @param {Object} request
640
+ * The request object that will be sent.
641
+ * @param {string} request.parent
642
+ * Required. The parent resource name, such as
643
+ * `projects/{project}/locations/{location}/collections/{collection_id}`.
644
+ * @param {number} [request.pageSize]
645
+ * Optional. Not supported.
646
+ * @param {string} [request.pageToken]
647
+ * Optional. Not supported.
648
+ * @param {string} [request.filter]
649
+ * Optional. Filter by solution type. For example:
650
+ * solution_type=SOLUTION_TYPE_SEARCH
651
+ * @param {object} [options]
652
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
653
+ * @returns {Object}
654
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
655
+ * When you iterate the returned iterable, each element will be an object representing
656
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Engine|Engine}. The API will be called under the hood as needed, once per the page,
657
+ * so you can stop the iteration when you don't need more results.
658
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
659
+ * for more details and examples.
660
+ * @example <caption>include:samples/generated/v1alpha/engine_service.list_engines.js</caption>
661
+ * region_tag:discoveryengine_v1alpha_generated_EngineService_ListEngines_async
662
+ */
663
+ listEnginesAsync(request, options) {
664
+ var _a;
665
+ request = request || {};
666
+ options = options || {};
667
+ options.otherArgs = options.otherArgs || {};
668
+ options.otherArgs.headers = options.otherArgs.headers || {};
669
+ options.otherArgs.headers['x-goog-request-params'] =
670
+ this._gaxModule.routingHeader.fromParams({
671
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
672
+ });
673
+ const defaultCallSettings = this._defaults['listEngines'];
674
+ const callSettings = defaultCallSettings.merge(options);
675
+ this.initialize();
676
+ return this.descriptors.page.listEngines.asyncIterate(this.innerApiCalls['listEngines'], request, callSettings);
677
+ }
678
+ /**
679
+ * Gets information about a location.
680
+ *
681
+ * @param {Object} request
682
+ * The request object that will be sent.
683
+ * @param {string} request.name
684
+ * Resource name for the location.
685
+ * @param {object} [options]
686
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
687
+ * @returns {Promise} - The promise which resolves to an array.
688
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
689
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
690
+ * for more details and examples.
691
+ * @example
692
+ * ```
693
+ * const [response] = await client.getLocation(request);
694
+ * ```
695
+ */
696
+ getLocation(request, options, callback) {
697
+ return this.locationsClient.getLocation(request, options, callback);
698
+ }
699
+ /**
700
+ * Lists information about the supported locations for this service. Returns an iterable object.
701
+ *
702
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
703
+ * @param {Object} request
704
+ * The request object that will be sent.
705
+ * @param {string} request.name
706
+ * The resource that owns the locations collection, if applicable.
707
+ * @param {string} request.filter
708
+ * The standard list filter.
709
+ * @param {number} request.pageSize
710
+ * The standard list page size.
711
+ * @param {string} request.pageToken
712
+ * The standard list page token.
713
+ * @param {object} [options]
714
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
715
+ * @returns {Object}
716
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
717
+ * When you iterate the returned iterable, each element will be an object representing
718
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
719
+ * so you can stop the iteration when you don't need more results.
720
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
721
+ * for more details and examples.
722
+ * @example
723
+ * ```
724
+ * const iterable = client.listLocationsAsync(request);
725
+ * for await (const response of iterable) {
726
+ * // process response
727
+ * }
728
+ * ```
729
+ */
730
+ listLocationsAsync(request, options) {
731
+ return this.locationsClient.listLocationsAsync(request, options);
732
+ }
733
+ /**
734
+ * Gets the latest state of a long-running operation. Clients can use this
735
+ * method to poll the operation result at intervals as recommended by the API
736
+ * service.
737
+ *
738
+ * @param {Object} request - The request object that will be sent.
739
+ * @param {string} request.name - The name of the operation resource.
740
+ * @param {Object=} options
741
+ * Optional parameters. You can override the default settings for this call,
742
+ * e.g, timeout, retries, paginations, etc. See {@link
743
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
744
+ * for the details.
745
+ * @param {function(?Error, ?Object)=} callback
746
+ * The function which will be called with the result of the API call.
747
+ *
748
+ * The second parameter to the callback is an object representing
749
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
750
+ * @return {Promise} - The promise which resolves to an array.
751
+ * The first element of the array is an object representing
752
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
753
+ * The promise has a method named "cancel" which cancels the ongoing API call.
754
+ *
755
+ * @example
756
+ * ```
757
+ * const client = longrunning.operationsClient();
758
+ * const name = '';
759
+ * const [response] = await client.getOperation({name});
760
+ * // doThingsWith(response)
761
+ * ```
762
+ */
763
+ getOperation(request, options, callback) {
764
+ return this.operationsClient.getOperation(request, options, callback);
765
+ }
766
+ /**
767
+ * Lists operations that match the specified filter in the request. If the
768
+ * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
769
+ *
770
+ * For-await-of syntax is used with the iterable to recursively get response element on-demand.
771
+ *
772
+ * @param {Object} request - The request object that will be sent.
773
+ * @param {string} request.name - The name of the operation collection.
774
+ * @param {string} request.filter - The standard list filter.
775
+ * @param {number=} request.pageSize -
776
+ * The maximum number of resources contained in the underlying API
777
+ * response. If page streaming is performed per-resource, this
778
+ * parameter does not affect the return value. If page streaming is
779
+ * performed per-page, this determines the maximum number of
780
+ * resources in a page.
781
+ * @param {Object=} options
782
+ * Optional parameters. You can override the default settings for this call,
783
+ * e.g, timeout, retries, paginations, etc. See {@link
784
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
785
+ * details.
786
+ * @returns {Object}
787
+ * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
788
+ *
789
+ * @example
790
+ * ```
791
+ * const client = longrunning.operationsClient();
792
+ * for await (const response of client.listOperationsAsync(request));
793
+ * // doThingsWith(response)
794
+ * ```
795
+ */
796
+ listOperationsAsync(request, options) {
797
+ return this.operationsClient.listOperationsAsync(request, options);
798
+ }
799
+ /**
800
+ * Starts asynchronous cancellation on a long-running operation. The server
801
+ * makes a best effort to cancel the operation, but success is not
802
+ * guaranteed. If the server doesn't support this method, it returns
803
+ * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
804
+ * {@link Operations.GetOperation} or
805
+ * other methods to check whether the cancellation succeeded or whether the
806
+ * operation completed despite cancellation. On successful cancellation,
807
+ * the operation is not deleted; instead, it becomes an operation with
808
+ * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
809
+ * 1, corresponding to `Code.CANCELLED`.
810
+ *
811
+ * @param {Object} request - The request object that will be sent.
812
+ * @param {string} request.name - The name of the operation resource to be cancelled.
813
+ * @param {Object=} options
814
+ * Optional parameters. You can override the default settings for this call,
815
+ * e.g, timeout, retries, paginations, etc. See {@link
816
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
817
+ * details.
818
+ * @param {function(?Error)=} callback
819
+ * The function which will be called with the result of the API call.
820
+ * @return {Promise} - The promise which resolves when API call finishes.
821
+ * The promise has a method named "cancel" which cancels the ongoing API
822
+ * call.
823
+ *
824
+ * @example
825
+ * ```
826
+ * const client = longrunning.operationsClient();
827
+ * await client.cancelOperation({name: ''});
828
+ * ```
829
+ */
830
+ cancelOperation(request, options, callback) {
831
+ return this.operationsClient.cancelOperation(request, options, callback);
832
+ }
833
+ /**
834
+ * Deletes a long-running operation. This method indicates that the client is
835
+ * no longer interested in the operation result. It does not cancel the
836
+ * operation. If the server doesn't support this method, it returns
837
+ * `google.rpc.Code.UNIMPLEMENTED`.
838
+ *
839
+ * @param {Object} request - The request object that will be sent.
840
+ * @param {string} request.name - The name of the operation resource to be deleted.
841
+ * @param {Object=} options
842
+ * Optional parameters. You can override the default settings for this call,
843
+ * e.g, timeout, retries, paginations, etc. See {@link
844
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
845
+ * for the details.
846
+ * @param {function(?Error)=} callback
847
+ * The function which will be called with the result of the API call.
848
+ * @return {Promise} - The promise which resolves when API call finishes.
849
+ * The promise has a method named "cancel" which cancels the ongoing API
850
+ * call.
851
+ *
852
+ * @example
853
+ * ```
854
+ * const client = longrunning.operationsClient();
855
+ * await client.deleteOperation({name: ''});
856
+ * ```
857
+ */
858
+ deleteOperation(request, options, callback) {
859
+ return this.operationsClient.deleteOperation(request, options, callback);
860
+ }
861
+ // --------------------
862
+ // -- Path templates --
863
+ // --------------------
864
+ /**
865
+ * Return a fully-qualified collection resource name string.
866
+ *
867
+ * @param {string} project
868
+ * @param {string} location
869
+ * @param {string} collection
870
+ * @returns {string} Resource name string.
871
+ */
872
+ collectionPath(project, location, collection) {
873
+ return this.pathTemplates.collectionPathTemplate.render({
874
+ project: project,
875
+ location: location,
876
+ collection: collection,
877
+ });
878
+ }
879
+ /**
880
+ * Parse the project from Collection resource.
881
+ *
882
+ * @param {string} collectionName
883
+ * A fully-qualified path representing Collection resource.
884
+ * @returns {string} A string representing the project.
885
+ */
886
+ matchProjectFromCollectionName(collectionName) {
887
+ return this.pathTemplates.collectionPathTemplate.match(collectionName)
888
+ .project;
889
+ }
890
+ /**
891
+ * Parse the location from Collection resource.
892
+ *
893
+ * @param {string} collectionName
894
+ * A fully-qualified path representing Collection resource.
895
+ * @returns {string} A string representing the location.
896
+ */
897
+ matchLocationFromCollectionName(collectionName) {
898
+ return this.pathTemplates.collectionPathTemplate.match(collectionName)
899
+ .location;
900
+ }
901
+ /**
902
+ * Parse the collection from Collection resource.
903
+ *
904
+ * @param {string} collectionName
905
+ * A fully-qualified path representing Collection resource.
906
+ * @returns {string} A string representing the collection.
907
+ */
908
+ matchCollectionFromCollectionName(collectionName) {
909
+ return this.pathTemplates.collectionPathTemplate.match(collectionName)
910
+ .collection;
911
+ }
912
+ /**
913
+ * Return a fully-qualified engine resource name string.
914
+ *
915
+ * @param {string} project
916
+ * @param {string} location
917
+ * @param {string} collection
918
+ * @param {string} engine
919
+ * @returns {string} Resource name string.
920
+ */
921
+ enginePath(project, location, collection, engine) {
922
+ return this.pathTemplates.enginePathTemplate.render({
923
+ project: project,
924
+ location: location,
925
+ collection: collection,
926
+ engine: engine,
927
+ });
928
+ }
929
+ /**
930
+ * Parse the project from Engine resource.
931
+ *
932
+ * @param {string} engineName
933
+ * A fully-qualified path representing Engine resource.
934
+ * @returns {string} A string representing the project.
935
+ */
936
+ matchProjectFromEngineName(engineName) {
937
+ return this.pathTemplates.enginePathTemplate.match(engineName).project;
938
+ }
939
+ /**
940
+ * Parse the location from Engine resource.
941
+ *
942
+ * @param {string} engineName
943
+ * A fully-qualified path representing Engine resource.
944
+ * @returns {string} A string representing the location.
945
+ */
946
+ matchLocationFromEngineName(engineName) {
947
+ return this.pathTemplates.enginePathTemplate.match(engineName).location;
948
+ }
949
+ /**
950
+ * Parse the collection from Engine resource.
951
+ *
952
+ * @param {string} engineName
953
+ * A fully-qualified path representing Engine resource.
954
+ * @returns {string} A string representing the collection.
955
+ */
956
+ matchCollectionFromEngineName(engineName) {
957
+ return this.pathTemplates.enginePathTemplate.match(engineName).collection;
958
+ }
959
+ /**
960
+ * Parse the engine from Engine resource.
961
+ *
962
+ * @param {string} engineName
963
+ * A fully-qualified path representing Engine resource.
964
+ * @returns {string} A string representing the engine.
965
+ */
966
+ matchEngineFromEngineName(engineName) {
967
+ return this.pathTemplates.enginePathTemplate.match(engineName).engine;
968
+ }
969
+ /**
970
+ * Return a fully-qualified projectLocationCollectionDataStore resource name string.
971
+ *
972
+ * @param {string} project
973
+ * @param {string} location
974
+ * @param {string} collection
975
+ * @param {string} data_store
976
+ * @returns {string} Resource name string.
977
+ */
978
+ projectLocationCollectionDataStorePath(project, location, collection, dataStore) {
979
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render({
980
+ project: project,
981
+ location: location,
982
+ collection: collection,
983
+ data_store: dataStore,
984
+ });
985
+ }
986
+ /**
987
+ * Parse the project from ProjectLocationCollectionDataStore resource.
988
+ *
989
+ * @param {string} projectLocationCollectionDataStoreName
990
+ * A fully-qualified path representing project_location_collection_data_store resource.
991
+ * @returns {string} A string representing the project.
992
+ */
993
+ matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
994
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).project;
995
+ }
996
+ /**
997
+ * Parse the location from ProjectLocationCollectionDataStore resource.
998
+ *
999
+ * @param {string} projectLocationCollectionDataStoreName
1000
+ * A fully-qualified path representing project_location_collection_data_store resource.
1001
+ * @returns {string} A string representing the location.
1002
+ */
1003
+ matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
1004
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).location;
1005
+ }
1006
+ /**
1007
+ * Parse the collection from ProjectLocationCollectionDataStore resource.
1008
+ *
1009
+ * @param {string} projectLocationCollectionDataStoreName
1010
+ * A fully-qualified path representing project_location_collection_data_store resource.
1011
+ * @returns {string} A string representing the collection.
1012
+ */
1013
+ matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
1014
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).collection;
1015
+ }
1016
+ /**
1017
+ * Parse the data_store from ProjectLocationCollectionDataStore resource.
1018
+ *
1019
+ * @param {string} projectLocationCollectionDataStoreName
1020
+ * A fully-qualified path representing project_location_collection_data_store resource.
1021
+ * @returns {string} A string representing the data_store.
1022
+ */
1023
+ matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
1024
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).data_store;
1025
+ }
1026
+ /**
1027
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
1028
+ *
1029
+ * @param {string} project
1030
+ * @param {string} location
1031
+ * @param {string} collection
1032
+ * @param {string} data_store
1033
+ * @param {string} branch
1034
+ * @param {string} document
1035
+ * @returns {string} Resource name string.
1036
+ */
1037
+ projectLocationCollectionDataStoreBranchDocumentPath(project, location, collection, dataStore, branch, document) {
1038
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render({
1039
+ project: project,
1040
+ location: location,
1041
+ collection: collection,
1042
+ data_store: dataStore,
1043
+ branch: branch,
1044
+ document: document,
1045
+ });
1046
+ }
1047
+ /**
1048
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource.
1049
+ *
1050
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
1051
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
1052
+ * @returns {string} A string representing the project.
1053
+ */
1054
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1055
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).project;
1056
+ }
1057
+ /**
1058
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource.
1059
+ *
1060
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
1061
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
1062
+ * @returns {string} A string representing the location.
1063
+ */
1064
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1065
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).location;
1066
+ }
1067
+ /**
1068
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource.
1069
+ *
1070
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
1071
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
1072
+ * @returns {string} A string representing the collection.
1073
+ */
1074
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1075
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).collection;
1076
+ }
1077
+ /**
1078
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource.
1079
+ *
1080
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
1081
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
1082
+ * @returns {string} A string representing the data_store.
1083
+ */
1084
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1085
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).data_store;
1086
+ }
1087
+ /**
1088
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource.
1089
+ *
1090
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
1091
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
1092
+ * @returns {string} A string representing the branch.
1093
+ */
1094
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1095
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).branch;
1096
+ }
1097
+ /**
1098
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource.
1099
+ *
1100
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
1101
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
1102
+ * @returns {string} A string representing the document.
1103
+ */
1104
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1105
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
1106
+ }
1107
+ /**
1108
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
1109
+ *
1110
+ * @param {string} project
1111
+ * @param {string} location
1112
+ * @param {string} collection
1113
+ * @param {string} data_store
1114
+ * @param {string} conversation
1115
+ * @returns {string} Resource name string.
1116
+ */
1117
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
1118
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
1119
+ project: project,
1120
+ location: location,
1121
+ collection: collection,
1122
+ data_store: dataStore,
1123
+ conversation: conversation,
1124
+ });
1125
+ }
1126
+ /**
1127
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
1128
+ *
1129
+ * @param {string} projectLocationCollectionDataStoreConversationName
1130
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
1131
+ * @returns {string} A string representing the project.
1132
+ */
1133
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
1134
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
1135
+ }
1136
+ /**
1137
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
1138
+ *
1139
+ * @param {string} projectLocationCollectionDataStoreConversationName
1140
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
1141
+ * @returns {string} A string representing the location.
1142
+ */
1143
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
1144
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
1145
+ }
1146
+ /**
1147
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
1148
+ *
1149
+ * @param {string} projectLocationCollectionDataStoreConversationName
1150
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
1151
+ * @returns {string} A string representing the collection.
1152
+ */
1153
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
1154
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
1155
+ }
1156
+ /**
1157
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
1158
+ *
1159
+ * @param {string} projectLocationCollectionDataStoreConversationName
1160
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
1161
+ * @returns {string} A string representing the data_store.
1162
+ */
1163
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
1164
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
1165
+ }
1166
+ /**
1167
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
1168
+ *
1169
+ * @param {string} projectLocationCollectionDataStoreConversationName
1170
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
1171
+ * @returns {string} A string representing the conversation.
1172
+ */
1173
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
1174
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
1175
+ }
1176
+ /**
1177
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
1178
+ *
1179
+ * @param {string} project
1180
+ * @param {string} location
1181
+ * @param {string} collection
1182
+ * @param {string} data_store
1183
+ * @param {string} schema
1184
+ * @returns {string} Resource name string.
1185
+ */
1186
+ projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
1187
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
1188
+ project: project,
1189
+ location: location,
1190
+ collection: collection,
1191
+ data_store: dataStore,
1192
+ schema: schema,
1193
+ });
1194
+ }
1195
+ /**
1196
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
1197
+ *
1198
+ * @param {string} projectLocationCollectionDataStoreSchemaName
1199
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
1200
+ * @returns {string} A string representing the project.
1201
+ */
1202
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
1203
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
1204
+ }
1205
+ /**
1206
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
1207
+ *
1208
+ * @param {string} projectLocationCollectionDataStoreSchemaName
1209
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
1210
+ * @returns {string} A string representing the location.
1211
+ */
1212
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
1213
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
1214
+ }
1215
+ /**
1216
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
1217
+ *
1218
+ * @param {string} projectLocationCollectionDataStoreSchemaName
1219
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
1220
+ * @returns {string} A string representing the collection.
1221
+ */
1222
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
1223
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
1224
+ }
1225
+ /**
1226
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
1227
+ *
1228
+ * @param {string} projectLocationCollectionDataStoreSchemaName
1229
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
1230
+ * @returns {string} A string representing the data_store.
1231
+ */
1232
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
1233
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
1234
+ }
1235
+ /**
1236
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
1237
+ *
1238
+ * @param {string} projectLocationCollectionDataStoreSchemaName
1239
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
1240
+ * @returns {string} A string representing the schema.
1241
+ */
1242
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
1243
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
1244
+ }
1245
+ /**
1246
+ * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngine resource name string.
1247
+ *
1248
+ * @param {string} project
1249
+ * @param {string} location
1250
+ * @param {string} collection
1251
+ * @param {string} data_store
1252
+ * @returns {string} Resource name string.
1253
+ */
1254
+ projectLocationCollectionDataStoreSiteSearchEnginePath(project, location, collection, dataStore) {
1255
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render({
1256
+ project: project,
1257
+ location: location,
1258
+ collection: collection,
1259
+ data_store: dataStore,
1260
+ });
1261
+ }
1262
+ /**
1263
+ * Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
1264
+ *
1265
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
1266
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
1267
+ * @returns {string} A string representing the project.
1268
+ */
1269
+ matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
1270
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).project;
1271
+ }
1272
+ /**
1273
+ * Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
1274
+ *
1275
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
1276
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
1277
+ * @returns {string} A string representing the location.
1278
+ */
1279
+ matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
1280
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).location;
1281
+ }
1282
+ /**
1283
+ * Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
1284
+ *
1285
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
1286
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
1287
+ * @returns {string} A string representing the collection.
1288
+ */
1289
+ matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
1290
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).collection;
1291
+ }
1292
+ /**
1293
+ * Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
1294
+ *
1295
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
1296
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
1297
+ * @returns {string} A string representing the data_store.
1298
+ */
1299
+ matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
1300
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).data_store;
1301
+ }
1302
+ /**
1303
+ * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineTargetSite resource name string.
1304
+ *
1305
+ * @param {string} project
1306
+ * @param {string} location
1307
+ * @param {string} collection
1308
+ * @param {string} data_store
1309
+ * @param {string} target_site
1310
+ * @returns {string} Resource name string.
1311
+ */
1312
+ projectLocationCollectionDataStoreSiteSearchEngineTargetSitePath(project, location, collection, dataStore, targetSite) {
1313
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.render({
1314
+ project: project,
1315
+ location: location,
1316
+ collection: collection,
1317
+ data_store: dataStore,
1318
+ target_site: targetSite,
1319
+ });
1320
+ }
1321
+ /**
1322
+ * Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
1323
+ *
1324
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
1325
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
1326
+ * @returns {string} A string representing the project.
1327
+ */
1328
+ matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
1329
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).project;
1330
+ }
1331
+ /**
1332
+ * Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
1333
+ *
1334
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
1335
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
1336
+ * @returns {string} A string representing the location.
1337
+ */
1338
+ matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
1339
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).location;
1340
+ }
1341
+ /**
1342
+ * Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
1343
+ *
1344
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
1345
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
1346
+ * @returns {string} A string representing the collection.
1347
+ */
1348
+ matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
1349
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).collection;
1350
+ }
1351
+ /**
1352
+ * Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
1353
+ *
1354
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
1355
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
1356
+ * @returns {string} A string representing the data_store.
1357
+ */
1358
+ matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
1359
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).data_store;
1360
+ }
1361
+ /**
1362
+ * Parse the target_site from ProjectLocationCollectionDataStoreSiteSearchEngineTargetSite resource.
1363
+ *
1364
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName
1365
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_target_site resource.
1366
+ * @returns {string} A string representing the target_site.
1367
+ */
1368
+ matchTargetSiteFromProjectLocationCollectionDataStoreSiteSearchEngineTargetSiteName(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName) {
1369
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineTargetSiteName).target_site;
1370
+ }
1371
+ /**
1372
+ * Return a fully-qualified projectLocationCollectionEngineConversation resource name string.
1373
+ *
1374
+ * @param {string} project
1375
+ * @param {string} location
1376
+ * @param {string} collection
1377
+ * @param {string} engine
1378
+ * @param {string} conversation
1379
+ * @returns {string} Resource name string.
1380
+ */
1381
+ projectLocationCollectionEngineConversationPath(project, location, collection, engine, conversation) {
1382
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.render({
1383
+ project: project,
1384
+ location: location,
1385
+ collection: collection,
1386
+ engine: engine,
1387
+ conversation: conversation,
1388
+ });
1389
+ }
1390
+ /**
1391
+ * Parse the project from ProjectLocationCollectionEngineConversation resource.
1392
+ *
1393
+ * @param {string} projectLocationCollectionEngineConversationName
1394
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
1395
+ * @returns {string} A string representing the project.
1396
+ */
1397
+ matchProjectFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
1398
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).project;
1399
+ }
1400
+ /**
1401
+ * Parse the location from ProjectLocationCollectionEngineConversation resource.
1402
+ *
1403
+ * @param {string} projectLocationCollectionEngineConversationName
1404
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
1405
+ * @returns {string} A string representing the location.
1406
+ */
1407
+ matchLocationFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
1408
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).location;
1409
+ }
1410
+ /**
1411
+ * Parse the collection from ProjectLocationCollectionEngineConversation resource.
1412
+ *
1413
+ * @param {string} projectLocationCollectionEngineConversationName
1414
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
1415
+ * @returns {string} A string representing the collection.
1416
+ */
1417
+ matchCollectionFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
1418
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).collection;
1419
+ }
1420
+ /**
1421
+ * Parse the engine from ProjectLocationCollectionEngineConversation resource.
1422
+ *
1423
+ * @param {string} projectLocationCollectionEngineConversationName
1424
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
1425
+ * @returns {string} A string representing the engine.
1426
+ */
1427
+ matchEngineFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
1428
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).engine;
1429
+ }
1430
+ /**
1431
+ * Parse the conversation from ProjectLocationCollectionEngineConversation resource.
1432
+ *
1433
+ * @param {string} projectLocationCollectionEngineConversationName
1434
+ * A fully-qualified path representing project_location_collection_engine_conversation resource.
1435
+ * @returns {string} A string representing the conversation.
1436
+ */
1437
+ matchConversationFromProjectLocationCollectionEngineConversationName(projectLocationCollectionEngineConversationName) {
1438
+ return this.pathTemplates.projectLocationCollectionEngineConversationPathTemplate.match(projectLocationCollectionEngineConversationName).conversation;
1439
+ }
1440
+ /**
1441
+ * Return a fully-qualified projectLocationDataStore resource name string.
1442
+ *
1443
+ * @param {string} project
1444
+ * @param {string} location
1445
+ * @param {string} data_store
1446
+ * @returns {string} Resource name string.
1447
+ */
1448
+ projectLocationDataStorePath(project, location, dataStore) {
1449
+ return this.pathTemplates.projectLocationDataStorePathTemplate.render({
1450
+ project: project,
1451
+ location: location,
1452
+ data_store: dataStore,
1453
+ });
1454
+ }
1455
+ /**
1456
+ * Parse the project from ProjectLocationDataStore resource.
1457
+ *
1458
+ * @param {string} projectLocationDataStoreName
1459
+ * A fully-qualified path representing project_location_data_store resource.
1460
+ * @returns {string} A string representing the project.
1461
+ */
1462
+ matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1463
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).project;
1464
+ }
1465
+ /**
1466
+ * Parse the location from ProjectLocationDataStore resource.
1467
+ *
1468
+ * @param {string} projectLocationDataStoreName
1469
+ * A fully-qualified path representing project_location_data_store resource.
1470
+ * @returns {string} A string representing the location.
1471
+ */
1472
+ matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1473
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).location;
1474
+ }
1475
+ /**
1476
+ * Parse the data_store from ProjectLocationDataStore resource.
1477
+ *
1478
+ * @param {string} projectLocationDataStoreName
1479
+ * A fully-qualified path representing project_location_data_store resource.
1480
+ * @returns {string} A string representing the data_store.
1481
+ */
1482
+ matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1483
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).data_store;
1484
+ }
1485
+ /**
1486
+ * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
1487
+ *
1488
+ * @param {string} project
1489
+ * @param {string} location
1490
+ * @param {string} data_store
1491
+ * @param {string} branch
1492
+ * @param {string} document
1493
+ * @returns {string} Resource name string.
1494
+ */
1495
+ projectLocationDataStoreBranchDocumentPath(project, location, dataStore, branch, document) {
1496
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render({
1497
+ project: project,
1498
+ location: location,
1499
+ data_store: dataStore,
1500
+ branch: branch,
1501
+ document: document,
1502
+ });
1503
+ }
1504
+ /**
1505
+ * Parse the project from ProjectLocationDataStoreBranchDocument resource.
1506
+ *
1507
+ * @param {string} projectLocationDataStoreBranchDocumentName
1508
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1509
+ * @returns {string} A string representing the project.
1510
+ */
1511
+ matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1512
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).project;
1513
+ }
1514
+ /**
1515
+ * Parse the location from ProjectLocationDataStoreBranchDocument resource.
1516
+ *
1517
+ * @param {string} projectLocationDataStoreBranchDocumentName
1518
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1519
+ * @returns {string} A string representing the location.
1520
+ */
1521
+ matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1522
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).location;
1523
+ }
1524
+ /**
1525
+ * Parse the data_store from ProjectLocationDataStoreBranchDocument resource.
1526
+ *
1527
+ * @param {string} projectLocationDataStoreBranchDocumentName
1528
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1529
+ * @returns {string} A string representing the data_store.
1530
+ */
1531
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1532
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).data_store;
1533
+ }
1534
+ /**
1535
+ * Parse the branch from ProjectLocationDataStoreBranchDocument resource.
1536
+ *
1537
+ * @param {string} projectLocationDataStoreBranchDocumentName
1538
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1539
+ * @returns {string} A string representing the branch.
1540
+ */
1541
+ matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1542
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).branch;
1543
+ }
1544
+ /**
1545
+ * Parse the document from ProjectLocationDataStoreBranchDocument resource.
1546
+ *
1547
+ * @param {string} projectLocationDataStoreBranchDocumentName
1548
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1549
+ * @returns {string} A string representing the document.
1550
+ */
1551
+ matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1552
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
1553
+ }
1554
+ /**
1555
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1556
+ *
1557
+ * @param {string} project
1558
+ * @param {string} location
1559
+ * @param {string} data_store
1560
+ * @param {string} conversation
1561
+ * @returns {string} Resource name string.
1562
+ */
1563
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1564
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1565
+ project: project,
1566
+ location: location,
1567
+ data_store: dataStore,
1568
+ conversation: conversation,
1569
+ });
1570
+ }
1571
+ /**
1572
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1573
+ *
1574
+ * @param {string} projectLocationDataStoreConversationName
1575
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1576
+ * @returns {string} A string representing the project.
1577
+ */
1578
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1579
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1580
+ }
1581
+ /**
1582
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1583
+ *
1584
+ * @param {string} projectLocationDataStoreConversationName
1585
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1586
+ * @returns {string} A string representing the location.
1587
+ */
1588
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1589
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1590
+ }
1591
+ /**
1592
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1593
+ *
1594
+ * @param {string} projectLocationDataStoreConversationName
1595
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1596
+ * @returns {string} A string representing the data_store.
1597
+ */
1598
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1599
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1600
+ }
1601
+ /**
1602
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1603
+ *
1604
+ * @param {string} projectLocationDataStoreConversationName
1605
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1606
+ * @returns {string} A string representing the conversation.
1607
+ */
1608
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1609
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1610
+ }
1611
+ /**
1612
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
1613
+ *
1614
+ * @param {string} project
1615
+ * @param {string} location
1616
+ * @param {string} data_store
1617
+ * @param {string} schema
1618
+ * @returns {string} Resource name string.
1619
+ */
1620
+ projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
1621
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
1622
+ project: project,
1623
+ location: location,
1624
+ data_store: dataStore,
1625
+ schema: schema,
1626
+ });
1627
+ }
1628
+ /**
1629
+ * Parse the project from ProjectLocationDataStoreSchema resource.
1630
+ *
1631
+ * @param {string} projectLocationDataStoreSchemaName
1632
+ * A fully-qualified path representing project_location_data_store_schema resource.
1633
+ * @returns {string} A string representing the project.
1634
+ */
1635
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1636
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
1637
+ }
1638
+ /**
1639
+ * Parse the location from ProjectLocationDataStoreSchema resource.
1640
+ *
1641
+ * @param {string} projectLocationDataStoreSchemaName
1642
+ * A fully-qualified path representing project_location_data_store_schema resource.
1643
+ * @returns {string} A string representing the location.
1644
+ */
1645
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1646
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
1647
+ }
1648
+ /**
1649
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
1650
+ *
1651
+ * @param {string} projectLocationDataStoreSchemaName
1652
+ * A fully-qualified path representing project_location_data_store_schema resource.
1653
+ * @returns {string} A string representing the data_store.
1654
+ */
1655
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1656
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
1657
+ }
1658
+ /**
1659
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
1660
+ *
1661
+ * @param {string} projectLocationDataStoreSchemaName
1662
+ * A fully-qualified path representing project_location_data_store_schema resource.
1663
+ * @returns {string} A string representing the schema.
1664
+ */
1665
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1666
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
1667
+ }
1668
+ /**
1669
+ * Return a fully-qualified projectLocationDataStoreSiteSearchEngine resource name string.
1670
+ *
1671
+ * @param {string} project
1672
+ * @param {string} location
1673
+ * @param {string} data_store
1674
+ * @returns {string} Resource name string.
1675
+ */
1676
+ projectLocationDataStoreSiteSearchEnginePath(project, location, dataStore) {
1677
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render({
1678
+ project: project,
1679
+ location: location,
1680
+ data_store: dataStore,
1681
+ });
1682
+ }
1683
+ /**
1684
+ * Parse the project from ProjectLocationDataStoreSiteSearchEngine resource.
1685
+ *
1686
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1687
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1688
+ * @returns {string} A string representing the project.
1689
+ */
1690
+ matchProjectFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1691
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).project;
1692
+ }
1693
+ /**
1694
+ * Parse the location from ProjectLocationDataStoreSiteSearchEngine resource.
1695
+ *
1696
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1697
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1698
+ * @returns {string} A string representing the location.
1699
+ */
1700
+ matchLocationFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1701
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).location;
1702
+ }
1703
+ /**
1704
+ * Parse the data_store from ProjectLocationDataStoreSiteSearchEngine resource.
1705
+ *
1706
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1707
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1708
+ * @returns {string} A string representing the data_store.
1709
+ */
1710
+ matchDataStoreFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1711
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).data_store;
1712
+ }
1713
+ /**
1714
+ * Return a fully-qualified projectLocationDataStoreSiteSearchEngineTargetSite resource name string.
1715
+ *
1716
+ * @param {string} project
1717
+ * @param {string} location
1718
+ * @param {string} data_store
1719
+ * @param {string} target_site
1720
+ * @returns {string} Resource name string.
1721
+ */
1722
+ projectLocationDataStoreSiteSearchEngineTargetSitePath(project, location, dataStore, targetSite) {
1723
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.render({
1724
+ project: project,
1725
+ location: location,
1726
+ data_store: dataStore,
1727
+ target_site: targetSite,
1728
+ });
1729
+ }
1730
+ /**
1731
+ * Parse the project from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1732
+ *
1733
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1734
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1735
+ * @returns {string} A string representing the project.
1736
+ */
1737
+ matchProjectFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1738
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).project;
1739
+ }
1740
+ /**
1741
+ * Parse the location from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1742
+ *
1743
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1744
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1745
+ * @returns {string} A string representing the location.
1746
+ */
1747
+ matchLocationFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1748
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).location;
1749
+ }
1750
+ /**
1751
+ * Parse the data_store from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1752
+ *
1753
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1754
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1755
+ * @returns {string} A string representing the data_store.
1756
+ */
1757
+ matchDataStoreFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1758
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).data_store;
1759
+ }
1760
+ /**
1761
+ * Parse the target_site from ProjectLocationDataStoreSiteSearchEngineTargetSite resource.
1762
+ *
1763
+ * @param {string} projectLocationDataStoreSiteSearchEngineTargetSiteName
1764
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_target_site resource.
1765
+ * @returns {string} A string representing the target_site.
1766
+ */
1767
+ matchTargetSiteFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
1768
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).target_site;
1769
+ }
1770
+ /**
1771
+ * Terminate the gRPC channel and close the client.
1772
+ *
1773
+ * The client will no longer be usable and all future behavior is undefined.
1774
+ * @returns {Promise} A promise that resolves when the client is closed.
1775
+ */
1776
+ close() {
1777
+ if (this.engineServiceStub && !this._terminated) {
1778
+ return this.engineServiceStub.then(stub => {
1779
+ this._terminated = true;
1780
+ stub.close();
1781
+ this.locationsClient.close();
1782
+ this.operationsClient.close();
1783
+ });
1784
+ }
1785
+ return Promise.resolve();
1786
+ }
1787
+ }
1788
+ exports.EngineServiceClient = EngineServiceClient;
1789
+ //# sourceMappingURL=engine_service_client.js.map