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