@google-cloud/discoveryengine 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +39 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +190 -0
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +134 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +138 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +306 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +98 -0
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +307 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +370 -0
  12. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +336 -0
  13. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +227 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +874 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
  22. package/build/protos/protos.d.ts +16365 -7
  23. package/build/protos/protos.js +42499 -1945
  24. package/build/protos/protos.json +4455 -5
  25. package/build/src/index.d.ts +3 -1
  26. package/build/src/index.js +4 -1
  27. package/build/src/v1alpha/completion_service_client.d.ts +645 -0
  28. package/build/src/v1alpha/completion_service_client.js +901 -0
  29. package/build/src/v1alpha/completion_service_client_config.json +43 -0
  30. package/build/src/v1alpha/conversational_search_service_client.d.ts +1040 -0
  31. package/build/src/v1alpha/conversational_search_service_client.js +1333 -0
  32. package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
  33. package/build/src/v1alpha/data_store_service_client.d.ts +1060 -0
  34. package/build/src/v1alpha/data_store_service_client.js +1431 -0
  35. package/build/src/v1alpha/data_store_service_client_config.json +46 -0
  36. package/build/src/v1alpha/document_service_client.d.ts +1257 -0
  37. package/build/src/v1alpha/document_service_client.js +1555 -0
  38. package/build/src/v1alpha/document_service_client_config.json +82 -0
  39. package/build/src/v1alpha/engine_service_client.d.ts +1079 -0
  40. package/build/src/v1alpha/engine_service_client.js +1481 -0
  41. package/build/src/v1alpha/engine_service_client_config.json +58 -0
  42. package/build/src/v1alpha/index.d.ts +10 -0
  43. package/build/src/v1alpha/index.js +41 -0
  44. package/build/src/v1alpha/recommendation_service_client.d.ts +858 -0
  45. package/build/src/v1alpha/recommendation_service_client.js +1100 -0
  46. package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
  47. package/build/src/v1alpha/schema_service_client.d.ts +977 -0
  48. package/build/src/v1alpha/schema_service_client.js +1385 -0
  49. package/build/src/v1alpha/schema_service_client_config.json +63 -0
  50. package/build/src/v1alpha/search_service_client.d.ts +1394 -0
  51. package/build/src/v1alpha/search_service_client.js +1640 -0
  52. package/build/src/v1alpha/search_service_client_config.json +43 -0
  53. package/build/src/v1alpha/site_search_engine_service_client.d.ts +821 -0
  54. package/build/src/v1alpha/site_search_engine_service_client.js +1249 -0
  55. package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
  56. package/build/src/v1alpha/user_event_service_client.d.ts +895 -0
  57. package/build/src/v1alpha/user_event_service_client.js +1232 -0
  58. package/build/src/v1alpha/user_event_service_client_config.json +67 -0
  59. package/package.json +5 -5
@@ -0,0 +1,1249 @@
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.SiteSearchEngineServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1alpha/site_search_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("./site_search_engine_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Service for managing site search related resources.
31
+ * @class
32
+ * @memberof v1alpha
33
+ */
34
+ class SiteSearchEngineServiceClient {
35
+ /**
36
+ * Construct an instance of SiteSearchEngineServiceClient.
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 SiteSearchEngineServiceClient({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
85
+ .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
+ enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
143
+ projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
144
+ projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
145
+ projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
146
+ projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
147
+ projectLocationCollectionDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine'),
148
+ projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
149
+ projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
150
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
151
+ projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
152
+ projectLocationDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine'),
153
+ };
154
+ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
155
+ // This API contains "long-running operations", which return a
156
+ // an Operation object that allows for tracking of the operation,
157
+ // rather than holding a request open.
158
+ const lroOptions = {
159
+ auth: this.auth,
160
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
161
+ };
162
+ if (opts.fallback) {
163
+ lroOptions.protoJson = protoFilesRoot;
164
+ lroOptions.httpRules = [
165
+ {
166
+ selector: 'google.longrunning.Operations.GetOperation',
167
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
168
+ additional_bindings: [
169
+ {
170
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
171
+ },
172
+ {
173
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
174
+ },
175
+ {
176
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
177
+ },
178
+ {
179
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
180
+ },
181
+ {
182
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
183
+ },
184
+ {
185
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
186
+ },
187
+ {
188
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/operations/*}',
189
+ },
190
+ {
191
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
192
+ },
193
+ {
194
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
195
+ },
196
+ {
197
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
198
+ },
199
+ { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
200
+ { get: '/v1alpha/{name=projects/*/operations/*}' },
201
+ ],
202
+ },
203
+ {
204
+ selector: 'google.longrunning.Operations.ListOperations',
205
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
206
+ additional_bindings: [
207
+ {
208
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
209
+ },
210
+ {
211
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
212
+ },
213
+ {
214
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
215
+ },
216
+ {
217
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
218
+ },
219
+ {
220
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
221
+ },
222
+ {
223
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}/operations',
224
+ },
225
+ {
226
+ get: '/v1alpha/{name=projects/*/locations/*/collections/*}/operations',
227
+ },
228
+ {
229
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
230
+ },
231
+ {
232
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
233
+ },
234
+ {
235
+ get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
236
+ },
237
+ { get: '/v1alpha/{name=projects/*/locations/*}/operations' },
238
+ { get: '/v1alpha/{name=projects/*}/operations' },
239
+ ],
240
+ },
241
+ ];
242
+ }
243
+ this.operationsClient = this._gaxModule
244
+ .lro(lroOptions)
245
+ .operationsClient(opts);
246
+ const recrawlUrisResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.RecrawlUrisResponse');
247
+ const recrawlUrisMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata');
248
+ this.descriptors.longrunning = {
249
+ recrawlUris: new this._gaxModule.LongrunningDescriptor(this.operationsClient, recrawlUrisResponse.decode.bind(recrawlUrisResponse), recrawlUrisMetadata.decode.bind(recrawlUrisMetadata)),
250
+ };
251
+ // Put together the default options sent with requests.
252
+ this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.SiteSearchEngineService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
253
+ // Set up a dictionary of "inner API calls"; the core implementation
254
+ // of calling the API is handled in `google-gax`, with this code
255
+ // merely providing the destination and request information.
256
+ this.innerApiCalls = {};
257
+ // Add a warn function to the client constructor so it can be easily tested.
258
+ this.warn = this._gaxModule.warn;
259
+ }
260
+ /**
261
+ * Initialize the client.
262
+ * Performs asynchronous operations (such as authentication) and prepares the client.
263
+ * This function will be called automatically when any class method is called for the
264
+ * first time, but if you need to initialize it before calling an actual method,
265
+ * feel free to call initialize() directly.
266
+ *
267
+ * You can await on this method if you want to make sure the client is initialized.
268
+ *
269
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
270
+ */
271
+ initialize() {
272
+ // If the client stub promise is already initialized, return immediately.
273
+ if (this.siteSearchEngineServiceStub) {
274
+ return this.siteSearchEngineServiceStub;
275
+ }
276
+ // Put together the "service stub" for
277
+ // google.cloud.discoveryengine.v1alpha.SiteSearchEngineService.
278
+ this.siteSearchEngineServiceStub = this._gaxGrpc.createStub(this._opts.fallback
279
+ ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SiteSearchEngineService')
280
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
281
+ this._protos.google.cloud.discoveryengine.v1alpha
282
+ .SiteSearchEngineService, this._opts, this._providedCustomServicePath);
283
+ // Iterate over each of the methods that the service provides
284
+ // and create an API call method for each.
285
+ const siteSearchEngineServiceStubMethods = ['recrawlUris'];
286
+ for (const methodName of siteSearchEngineServiceStubMethods) {
287
+ const callPromise = this.siteSearchEngineServiceStub.then(stub => (...args) => {
288
+ if (this._terminated) {
289
+ return Promise.reject('The client has already been closed.');
290
+ }
291
+ const func = stub[methodName];
292
+ return func.apply(stub, args);
293
+ }, (err) => () => {
294
+ throw err;
295
+ });
296
+ const descriptor = this.descriptors.longrunning[methodName] || undefined;
297
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
298
+ this.innerApiCalls[methodName] = apiCall;
299
+ }
300
+ return this.siteSearchEngineServiceStub;
301
+ }
302
+ /**
303
+ * The DNS address for this API service.
304
+ * @returns {string} The DNS address for this service.
305
+ */
306
+ static get servicePath() {
307
+ return 'discoveryengine.googleapis.com';
308
+ }
309
+ /**
310
+ * The DNS address for this API service - same as servicePath(),
311
+ * exists for compatibility reasons.
312
+ * @returns {string} The DNS address for this service.
313
+ */
314
+ static get apiEndpoint() {
315
+ return 'discoveryengine.googleapis.com';
316
+ }
317
+ /**
318
+ * The port for this API service.
319
+ * @returns {number} The default port for this service.
320
+ */
321
+ static get port() {
322
+ return 443;
323
+ }
324
+ /**
325
+ * The scopes needed to make gRPC calls for every method defined
326
+ * in this service.
327
+ * @returns {string[]} List of default scopes.
328
+ */
329
+ static get scopes() {
330
+ return ['https://www.googleapis.com/auth/cloud-platform'];
331
+ }
332
+ /**
333
+ * Return the project ID used by this class.
334
+ * @returns {Promise} A promise that resolves to string containing the project ID.
335
+ */
336
+ getProjectId(callback) {
337
+ if (callback) {
338
+ this.auth.getProjectId(callback);
339
+ return;
340
+ }
341
+ return this.auth.getProjectId();
342
+ }
343
+ recrawlUris(request, optionsOrCallback, callback) {
344
+ var _a;
345
+ request = request || {};
346
+ let options;
347
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
348
+ callback = optionsOrCallback;
349
+ options = {};
350
+ }
351
+ else {
352
+ options = optionsOrCallback;
353
+ }
354
+ options = options || {};
355
+ options.otherArgs = options.otherArgs || {};
356
+ options.otherArgs.headers = options.otherArgs.headers || {};
357
+ options.otherArgs.headers['x-goog-request-params'] =
358
+ this._gaxModule.routingHeader.fromParams({
359
+ site_search_engine: (_a = request.siteSearchEngine) !== null && _a !== void 0 ? _a : '',
360
+ });
361
+ this.initialize();
362
+ return this.innerApiCalls.recrawlUris(request, options, callback);
363
+ }
364
+ /**
365
+ * Check the status of the long running operation returned by `recrawlUris()`.
366
+ * @param {String} name
367
+ * The operation name that will be passed.
368
+ * @returns {Promise} - The promise which resolves to an object.
369
+ * The decoded operation object has result and metadata field to get information from.
370
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
371
+ * for more details and examples.
372
+ * @example <caption>include:samples/generated/v1alpha/site_search_engine_service.recrawl_uris.js</caption>
373
+ * region_tag:discoveryengine_v1alpha_generated_SiteSearchEngineService_RecrawlUris_async
374
+ */
375
+ async checkRecrawlUrisProgress(name) {
376
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
377
+ const [operation] = await this.operationsClient.getOperation(request);
378
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.recrawlUris, this._gaxModule.createDefaultBackoffSettings());
379
+ return decodeOperation;
380
+ }
381
+ /**
382
+ * Gets information about a location.
383
+ *
384
+ * @param {Object} request
385
+ * The request object that will be sent.
386
+ * @param {string} request.name
387
+ * Resource name for the location.
388
+ * @param {object} [options]
389
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
390
+ * @returns {Promise} - The promise which resolves to an array.
391
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
392
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
393
+ * for more details and examples.
394
+ * @example
395
+ * ```
396
+ * const [response] = await client.getLocation(request);
397
+ * ```
398
+ */
399
+ getLocation(request, options, callback) {
400
+ return this.locationsClient.getLocation(request, options, callback);
401
+ }
402
+ /**
403
+ * Lists information about the supported locations for this service. Returns an iterable object.
404
+ *
405
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
406
+ * @param {Object} request
407
+ * The request object that will be sent.
408
+ * @param {string} request.name
409
+ * The resource that owns the locations collection, if applicable.
410
+ * @param {string} request.filter
411
+ * The standard list filter.
412
+ * @param {number} request.pageSize
413
+ * The standard list page size.
414
+ * @param {string} request.pageToken
415
+ * The standard list page token.
416
+ * @param {object} [options]
417
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
418
+ * @returns {Object}
419
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
420
+ * When you iterate the returned iterable, each element will be an object representing
421
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
422
+ * so you can stop the iteration when you don't need more results.
423
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
424
+ * for more details and examples.
425
+ * @example
426
+ * ```
427
+ * const iterable = client.listLocationsAsync(request);
428
+ * for await (const response of iterable) {
429
+ * // process response
430
+ * }
431
+ * ```
432
+ */
433
+ listLocationsAsync(request, options) {
434
+ return this.locationsClient.listLocationsAsync(request, options);
435
+ }
436
+ /**
437
+ * Gets the latest state of a long-running operation. Clients can use this
438
+ * method to poll the operation result at intervals as recommended by the API
439
+ * service.
440
+ *
441
+ * @param {Object} request - The request object that will be sent.
442
+ * @param {string} request.name - The name of the operation resource.
443
+ * @param {Object=} options
444
+ * Optional parameters. You can override the default settings for this call,
445
+ * e.g, timeout, retries, paginations, etc. See {@link
446
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
447
+ * for the details.
448
+ * @param {function(?Error, ?Object)=} callback
449
+ * The function which will be called with the result of the API call.
450
+ *
451
+ * The second parameter to the callback is an object representing
452
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
453
+ * @return {Promise} - The promise which resolves to an array.
454
+ * The first element of the array is an object representing
455
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
456
+ * The promise has a method named "cancel" which cancels the ongoing API call.
457
+ *
458
+ * @example
459
+ * ```
460
+ * const client = longrunning.operationsClient();
461
+ * const name = '';
462
+ * const [response] = await client.getOperation({name});
463
+ * // doThingsWith(response)
464
+ * ```
465
+ */
466
+ getOperation(request, options, callback) {
467
+ return this.operationsClient.getOperation(request, options, callback);
468
+ }
469
+ /**
470
+ * Lists operations that match the specified filter in the request. If the
471
+ * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
472
+ *
473
+ * For-await-of syntax is used with the iterable to recursively get response element on-demand.
474
+ *
475
+ * @param {Object} request - The request object that will be sent.
476
+ * @param {string} request.name - The name of the operation collection.
477
+ * @param {string} request.filter - The standard list filter.
478
+ * @param {number=} request.pageSize -
479
+ * The maximum number of resources contained in the underlying API
480
+ * response. If page streaming is performed per-resource, this
481
+ * parameter does not affect the return value. If page streaming is
482
+ * performed per-page, this determines the maximum number of
483
+ * resources in a page.
484
+ * @param {Object=} options
485
+ * Optional parameters. You can override the default settings for this call,
486
+ * e.g, timeout, retries, paginations, etc. See {@link
487
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
488
+ * details.
489
+ * @returns {Object}
490
+ * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
491
+ *
492
+ * @example
493
+ * ```
494
+ * const client = longrunning.operationsClient();
495
+ * for await (const response of client.listOperationsAsync(request));
496
+ * // doThingsWith(response)
497
+ * ```
498
+ */
499
+ listOperationsAsync(request, options) {
500
+ return this.operationsClient.listOperationsAsync(request, options);
501
+ }
502
+ /**
503
+ * Starts asynchronous cancellation on a long-running operation. The server
504
+ * makes a best effort to cancel the operation, but success is not
505
+ * guaranteed. If the server doesn't support this method, it returns
506
+ * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
507
+ * {@link Operations.GetOperation} or
508
+ * other methods to check whether the cancellation succeeded or whether the
509
+ * operation completed despite cancellation. On successful cancellation,
510
+ * the operation is not deleted; instead, it becomes an operation with
511
+ * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
512
+ * 1, corresponding to `Code.CANCELLED`.
513
+ *
514
+ * @param {Object} request - The request object that will be sent.
515
+ * @param {string} request.name - The name of the operation resource to be cancelled.
516
+ * @param {Object=} options
517
+ * Optional parameters. You can override the default settings for this call,
518
+ * e.g, timeout, retries, paginations, etc. See {@link
519
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
520
+ * details.
521
+ * @param {function(?Error)=} callback
522
+ * The function which will be called with the result of the API call.
523
+ * @return {Promise} - The promise which resolves when API call finishes.
524
+ * The promise has a method named "cancel" which cancels the ongoing API
525
+ * call.
526
+ *
527
+ * @example
528
+ * ```
529
+ * const client = longrunning.operationsClient();
530
+ * await client.cancelOperation({name: ''});
531
+ * ```
532
+ */
533
+ cancelOperation(request, options, callback) {
534
+ return this.operationsClient.cancelOperation(request, options, callback);
535
+ }
536
+ /**
537
+ * Deletes a long-running operation. This method indicates that the client is
538
+ * no longer interested in the operation result. It does not cancel the
539
+ * operation. If the server doesn't support this method, it returns
540
+ * `google.rpc.Code.UNIMPLEMENTED`.
541
+ *
542
+ * @param {Object} request - The request object that will be sent.
543
+ * @param {string} request.name - The name of the operation resource to be deleted.
544
+ * @param {Object=} options
545
+ * Optional parameters. You can override the default settings for this call,
546
+ * e.g, timeout, retries, paginations, etc. See {@link
547
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
548
+ * for the details.
549
+ * @param {function(?Error)=} callback
550
+ * The function which will be called with the result of the API call.
551
+ * @return {Promise} - The promise which resolves when API call finishes.
552
+ * The promise has a method named "cancel" which cancels the ongoing API
553
+ * call.
554
+ *
555
+ * @example
556
+ * ```
557
+ * const client = longrunning.operationsClient();
558
+ * await client.deleteOperation({name: ''});
559
+ * ```
560
+ */
561
+ deleteOperation(request, options, callback) {
562
+ return this.operationsClient.deleteOperation(request, options, callback);
563
+ }
564
+ // --------------------
565
+ // -- Path templates --
566
+ // --------------------
567
+ /**
568
+ * Return a fully-qualified engine resource name string.
569
+ *
570
+ * @param {string} project
571
+ * @param {string} location
572
+ * @param {string} collection
573
+ * @param {string} engine
574
+ * @returns {string} Resource name string.
575
+ */
576
+ enginePath(project, location, collection, engine) {
577
+ return this.pathTemplates.enginePathTemplate.render({
578
+ project: project,
579
+ location: location,
580
+ collection: collection,
581
+ engine: engine,
582
+ });
583
+ }
584
+ /**
585
+ * Parse the project from Engine resource.
586
+ *
587
+ * @param {string} engineName
588
+ * A fully-qualified path representing Engine resource.
589
+ * @returns {string} A string representing the project.
590
+ */
591
+ matchProjectFromEngineName(engineName) {
592
+ return this.pathTemplates.enginePathTemplate.match(engineName).project;
593
+ }
594
+ /**
595
+ * Parse the location from Engine resource.
596
+ *
597
+ * @param {string} engineName
598
+ * A fully-qualified path representing Engine resource.
599
+ * @returns {string} A string representing the location.
600
+ */
601
+ matchLocationFromEngineName(engineName) {
602
+ return this.pathTemplates.enginePathTemplate.match(engineName).location;
603
+ }
604
+ /**
605
+ * Parse the collection from Engine resource.
606
+ *
607
+ * @param {string} engineName
608
+ * A fully-qualified path representing Engine resource.
609
+ * @returns {string} A string representing the collection.
610
+ */
611
+ matchCollectionFromEngineName(engineName) {
612
+ return this.pathTemplates.enginePathTemplate.match(engineName).collection;
613
+ }
614
+ /**
615
+ * Parse the engine from Engine resource.
616
+ *
617
+ * @param {string} engineName
618
+ * A fully-qualified path representing Engine resource.
619
+ * @returns {string} A string representing the engine.
620
+ */
621
+ matchEngineFromEngineName(engineName) {
622
+ return this.pathTemplates.enginePathTemplate.match(engineName).engine;
623
+ }
624
+ /**
625
+ * Return a fully-qualified projectLocationCollectionDataStore resource name string.
626
+ *
627
+ * @param {string} project
628
+ * @param {string} location
629
+ * @param {string} collection
630
+ * @param {string} data_store
631
+ * @returns {string} Resource name string.
632
+ */
633
+ projectLocationCollectionDataStorePath(project, location, collection, dataStore) {
634
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render({
635
+ project: project,
636
+ location: location,
637
+ collection: collection,
638
+ data_store: dataStore,
639
+ });
640
+ }
641
+ /**
642
+ * Parse the project from ProjectLocationCollectionDataStore resource.
643
+ *
644
+ * @param {string} projectLocationCollectionDataStoreName
645
+ * A fully-qualified path representing project_location_collection_data_store resource.
646
+ * @returns {string} A string representing the project.
647
+ */
648
+ matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
649
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).project;
650
+ }
651
+ /**
652
+ * Parse the location from ProjectLocationCollectionDataStore resource.
653
+ *
654
+ * @param {string} projectLocationCollectionDataStoreName
655
+ * A fully-qualified path representing project_location_collection_data_store resource.
656
+ * @returns {string} A string representing the location.
657
+ */
658
+ matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
659
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).location;
660
+ }
661
+ /**
662
+ * Parse the collection from ProjectLocationCollectionDataStore resource.
663
+ *
664
+ * @param {string} projectLocationCollectionDataStoreName
665
+ * A fully-qualified path representing project_location_collection_data_store resource.
666
+ * @returns {string} A string representing the collection.
667
+ */
668
+ matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
669
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).collection;
670
+ }
671
+ /**
672
+ * Parse the data_store from ProjectLocationCollectionDataStore resource.
673
+ *
674
+ * @param {string} projectLocationCollectionDataStoreName
675
+ * A fully-qualified path representing project_location_collection_data_store resource.
676
+ * @returns {string} A string representing the data_store.
677
+ */
678
+ matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
679
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).data_store;
680
+ }
681
+ /**
682
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
683
+ *
684
+ * @param {string} project
685
+ * @param {string} location
686
+ * @param {string} collection
687
+ * @param {string} data_store
688
+ * @param {string} branch
689
+ * @param {string} document
690
+ * @returns {string} Resource name string.
691
+ */
692
+ projectLocationCollectionDataStoreBranchDocumentPath(project, location, collection, dataStore, branch, document) {
693
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render({
694
+ project: project,
695
+ location: location,
696
+ collection: collection,
697
+ data_store: dataStore,
698
+ branch: branch,
699
+ document: document,
700
+ });
701
+ }
702
+ /**
703
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource.
704
+ *
705
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
706
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
707
+ * @returns {string} A string representing the project.
708
+ */
709
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
710
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).project;
711
+ }
712
+ /**
713
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource.
714
+ *
715
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
716
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
717
+ * @returns {string} A string representing the location.
718
+ */
719
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
720
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).location;
721
+ }
722
+ /**
723
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource.
724
+ *
725
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
726
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
727
+ * @returns {string} A string representing the collection.
728
+ */
729
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
730
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).collection;
731
+ }
732
+ /**
733
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource.
734
+ *
735
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
736
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
737
+ * @returns {string} A string representing the data_store.
738
+ */
739
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
740
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).data_store;
741
+ }
742
+ /**
743
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource.
744
+ *
745
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
746
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
747
+ * @returns {string} A string representing the branch.
748
+ */
749
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
750
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).branch;
751
+ }
752
+ /**
753
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource.
754
+ *
755
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
756
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
757
+ * @returns {string} A string representing the document.
758
+ */
759
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
760
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
761
+ }
762
+ /**
763
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
764
+ *
765
+ * @param {string} project
766
+ * @param {string} location
767
+ * @param {string} collection
768
+ * @param {string} data_store
769
+ * @param {string} conversation
770
+ * @returns {string} Resource name string.
771
+ */
772
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
773
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
774
+ project: project,
775
+ location: location,
776
+ collection: collection,
777
+ data_store: dataStore,
778
+ conversation: conversation,
779
+ });
780
+ }
781
+ /**
782
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
783
+ *
784
+ * @param {string} projectLocationCollectionDataStoreConversationName
785
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
786
+ * @returns {string} A string representing the project.
787
+ */
788
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
789
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
790
+ }
791
+ /**
792
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
793
+ *
794
+ * @param {string} projectLocationCollectionDataStoreConversationName
795
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
796
+ * @returns {string} A string representing the location.
797
+ */
798
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
799
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
800
+ }
801
+ /**
802
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
803
+ *
804
+ * @param {string} projectLocationCollectionDataStoreConversationName
805
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
806
+ * @returns {string} A string representing the collection.
807
+ */
808
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
809
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
810
+ }
811
+ /**
812
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
813
+ *
814
+ * @param {string} projectLocationCollectionDataStoreConversationName
815
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
816
+ * @returns {string} A string representing the data_store.
817
+ */
818
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
819
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
820
+ }
821
+ /**
822
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
823
+ *
824
+ * @param {string} projectLocationCollectionDataStoreConversationName
825
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
826
+ * @returns {string} A string representing the conversation.
827
+ */
828
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
829
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
830
+ }
831
+ /**
832
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
833
+ *
834
+ * @param {string} project
835
+ * @param {string} location
836
+ * @param {string} collection
837
+ * @param {string} data_store
838
+ * @param {string} schema
839
+ * @returns {string} Resource name string.
840
+ */
841
+ projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
842
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
843
+ project: project,
844
+ location: location,
845
+ collection: collection,
846
+ data_store: dataStore,
847
+ schema: schema,
848
+ });
849
+ }
850
+ /**
851
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
852
+ *
853
+ * @param {string} projectLocationCollectionDataStoreSchemaName
854
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
855
+ * @returns {string} A string representing the project.
856
+ */
857
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
858
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
859
+ }
860
+ /**
861
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
862
+ *
863
+ * @param {string} projectLocationCollectionDataStoreSchemaName
864
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
865
+ * @returns {string} A string representing the location.
866
+ */
867
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
868
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
869
+ }
870
+ /**
871
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
872
+ *
873
+ * @param {string} projectLocationCollectionDataStoreSchemaName
874
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
875
+ * @returns {string} A string representing the collection.
876
+ */
877
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
878
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
879
+ }
880
+ /**
881
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
882
+ *
883
+ * @param {string} projectLocationCollectionDataStoreSchemaName
884
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
885
+ * @returns {string} A string representing the data_store.
886
+ */
887
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
888
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
889
+ }
890
+ /**
891
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
892
+ *
893
+ * @param {string} projectLocationCollectionDataStoreSchemaName
894
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
895
+ * @returns {string} A string representing the schema.
896
+ */
897
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
898
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
899
+ }
900
+ /**
901
+ * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngine resource name string.
902
+ *
903
+ * @param {string} project
904
+ * @param {string} location
905
+ * @param {string} collection
906
+ * @param {string} data_store
907
+ * @returns {string} Resource name string.
908
+ */
909
+ projectLocationCollectionDataStoreSiteSearchEnginePath(project, location, collection, dataStore) {
910
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.render({
911
+ project: project,
912
+ location: location,
913
+ collection: collection,
914
+ data_store: dataStore,
915
+ });
916
+ }
917
+ /**
918
+ * Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
919
+ *
920
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
921
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
922
+ * @returns {string} A string representing the project.
923
+ */
924
+ matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
925
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).project;
926
+ }
927
+ /**
928
+ * Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
929
+ *
930
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
931
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
932
+ * @returns {string} A string representing the location.
933
+ */
934
+ matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
935
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).location;
936
+ }
937
+ /**
938
+ * Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
939
+ *
940
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
941
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
942
+ * @returns {string} A string representing the collection.
943
+ */
944
+ matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
945
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).collection;
946
+ }
947
+ /**
948
+ * Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngine resource.
949
+ *
950
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineName
951
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine resource.
952
+ * @returns {string} A string representing the data_store.
953
+ */
954
+ matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
955
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).data_store;
956
+ }
957
+ /**
958
+ * Return a fully-qualified projectLocationDataStore resource name string.
959
+ *
960
+ * @param {string} project
961
+ * @param {string} location
962
+ * @param {string} data_store
963
+ * @returns {string} Resource name string.
964
+ */
965
+ projectLocationDataStorePath(project, location, dataStore) {
966
+ return this.pathTemplates.projectLocationDataStorePathTemplate.render({
967
+ project: project,
968
+ location: location,
969
+ data_store: dataStore,
970
+ });
971
+ }
972
+ /**
973
+ * Parse the project from ProjectLocationDataStore resource.
974
+ *
975
+ * @param {string} projectLocationDataStoreName
976
+ * A fully-qualified path representing project_location_data_store resource.
977
+ * @returns {string} A string representing the project.
978
+ */
979
+ matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName) {
980
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).project;
981
+ }
982
+ /**
983
+ * Parse the location from ProjectLocationDataStore resource.
984
+ *
985
+ * @param {string} projectLocationDataStoreName
986
+ * A fully-qualified path representing project_location_data_store resource.
987
+ * @returns {string} A string representing the location.
988
+ */
989
+ matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName) {
990
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).location;
991
+ }
992
+ /**
993
+ * Parse the data_store from ProjectLocationDataStore resource.
994
+ *
995
+ * @param {string} projectLocationDataStoreName
996
+ * A fully-qualified path representing project_location_data_store resource.
997
+ * @returns {string} A string representing the data_store.
998
+ */
999
+ matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1000
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).data_store;
1001
+ }
1002
+ /**
1003
+ * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
1004
+ *
1005
+ * @param {string} project
1006
+ * @param {string} location
1007
+ * @param {string} data_store
1008
+ * @param {string} branch
1009
+ * @param {string} document
1010
+ * @returns {string} Resource name string.
1011
+ */
1012
+ projectLocationDataStoreBranchDocumentPath(project, location, dataStore, branch, document) {
1013
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render({
1014
+ project: project,
1015
+ location: location,
1016
+ data_store: dataStore,
1017
+ branch: branch,
1018
+ document: document,
1019
+ });
1020
+ }
1021
+ /**
1022
+ * Parse the project from ProjectLocationDataStoreBranchDocument resource.
1023
+ *
1024
+ * @param {string} projectLocationDataStoreBranchDocumentName
1025
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1026
+ * @returns {string} A string representing the project.
1027
+ */
1028
+ matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1029
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).project;
1030
+ }
1031
+ /**
1032
+ * Parse the location from ProjectLocationDataStoreBranchDocument resource.
1033
+ *
1034
+ * @param {string} projectLocationDataStoreBranchDocumentName
1035
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1036
+ * @returns {string} A string representing the location.
1037
+ */
1038
+ matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1039
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).location;
1040
+ }
1041
+ /**
1042
+ * Parse the data_store from ProjectLocationDataStoreBranchDocument resource.
1043
+ *
1044
+ * @param {string} projectLocationDataStoreBranchDocumentName
1045
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1046
+ * @returns {string} A string representing the data_store.
1047
+ */
1048
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1049
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).data_store;
1050
+ }
1051
+ /**
1052
+ * Parse the branch from ProjectLocationDataStoreBranchDocument resource.
1053
+ *
1054
+ * @param {string} projectLocationDataStoreBranchDocumentName
1055
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1056
+ * @returns {string} A string representing the branch.
1057
+ */
1058
+ matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1059
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).branch;
1060
+ }
1061
+ /**
1062
+ * Parse the document from ProjectLocationDataStoreBranchDocument resource.
1063
+ *
1064
+ * @param {string} projectLocationDataStoreBranchDocumentName
1065
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1066
+ * @returns {string} A string representing the document.
1067
+ */
1068
+ matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1069
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
1070
+ }
1071
+ /**
1072
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1073
+ *
1074
+ * @param {string} project
1075
+ * @param {string} location
1076
+ * @param {string} data_store
1077
+ * @param {string} conversation
1078
+ * @returns {string} Resource name string.
1079
+ */
1080
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1081
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1082
+ project: project,
1083
+ location: location,
1084
+ data_store: dataStore,
1085
+ conversation: conversation,
1086
+ });
1087
+ }
1088
+ /**
1089
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1090
+ *
1091
+ * @param {string} projectLocationDataStoreConversationName
1092
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1093
+ * @returns {string} A string representing the project.
1094
+ */
1095
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1096
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1097
+ }
1098
+ /**
1099
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1100
+ *
1101
+ * @param {string} projectLocationDataStoreConversationName
1102
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1103
+ * @returns {string} A string representing the location.
1104
+ */
1105
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1106
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1107
+ }
1108
+ /**
1109
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1110
+ *
1111
+ * @param {string} projectLocationDataStoreConversationName
1112
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1113
+ * @returns {string} A string representing the data_store.
1114
+ */
1115
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1116
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1117
+ }
1118
+ /**
1119
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1120
+ *
1121
+ * @param {string} projectLocationDataStoreConversationName
1122
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1123
+ * @returns {string} A string representing the conversation.
1124
+ */
1125
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1126
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1127
+ }
1128
+ /**
1129
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
1130
+ *
1131
+ * @param {string} project
1132
+ * @param {string} location
1133
+ * @param {string} data_store
1134
+ * @param {string} schema
1135
+ * @returns {string} Resource name string.
1136
+ */
1137
+ projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
1138
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
1139
+ project: project,
1140
+ location: location,
1141
+ data_store: dataStore,
1142
+ schema: schema,
1143
+ });
1144
+ }
1145
+ /**
1146
+ * Parse the project from ProjectLocationDataStoreSchema resource.
1147
+ *
1148
+ * @param {string} projectLocationDataStoreSchemaName
1149
+ * A fully-qualified path representing project_location_data_store_schema resource.
1150
+ * @returns {string} A string representing the project.
1151
+ */
1152
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1153
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
1154
+ }
1155
+ /**
1156
+ * Parse the location from ProjectLocationDataStoreSchema resource.
1157
+ *
1158
+ * @param {string} projectLocationDataStoreSchemaName
1159
+ * A fully-qualified path representing project_location_data_store_schema resource.
1160
+ * @returns {string} A string representing the location.
1161
+ */
1162
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1163
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
1164
+ }
1165
+ /**
1166
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
1167
+ *
1168
+ * @param {string} projectLocationDataStoreSchemaName
1169
+ * A fully-qualified path representing project_location_data_store_schema resource.
1170
+ * @returns {string} A string representing the data_store.
1171
+ */
1172
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1173
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
1174
+ }
1175
+ /**
1176
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
1177
+ *
1178
+ * @param {string} projectLocationDataStoreSchemaName
1179
+ * A fully-qualified path representing project_location_data_store_schema resource.
1180
+ * @returns {string} A string representing the schema.
1181
+ */
1182
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1183
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
1184
+ }
1185
+ /**
1186
+ * Return a fully-qualified projectLocationDataStoreSiteSearchEngine resource name string.
1187
+ *
1188
+ * @param {string} project
1189
+ * @param {string} location
1190
+ * @param {string} data_store
1191
+ * @returns {string} Resource name string.
1192
+ */
1193
+ projectLocationDataStoreSiteSearchEnginePath(project, location, dataStore) {
1194
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.render({
1195
+ project: project,
1196
+ location: location,
1197
+ data_store: dataStore,
1198
+ });
1199
+ }
1200
+ /**
1201
+ * Parse the project from ProjectLocationDataStoreSiteSearchEngine resource.
1202
+ *
1203
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1204
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1205
+ * @returns {string} A string representing the project.
1206
+ */
1207
+ matchProjectFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1208
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).project;
1209
+ }
1210
+ /**
1211
+ * Parse the location from ProjectLocationDataStoreSiteSearchEngine resource.
1212
+ *
1213
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1214
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1215
+ * @returns {string} A string representing the location.
1216
+ */
1217
+ matchLocationFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1218
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).location;
1219
+ }
1220
+ /**
1221
+ * Parse the data_store from ProjectLocationDataStoreSiteSearchEngine resource.
1222
+ *
1223
+ * @param {string} projectLocationDataStoreSiteSearchEngineName
1224
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine resource.
1225
+ * @returns {string} A string representing the data_store.
1226
+ */
1227
+ matchDataStoreFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
1228
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).data_store;
1229
+ }
1230
+ /**
1231
+ * Terminate the gRPC channel and close the client.
1232
+ *
1233
+ * The client will no longer be usable and all future behavior is undefined.
1234
+ * @returns {Promise} A promise that resolves when the client is closed.
1235
+ */
1236
+ close() {
1237
+ if (this.siteSearchEngineServiceStub && !this._terminated) {
1238
+ return this.siteSearchEngineServiceStub.then(stub => {
1239
+ this._terminated = true;
1240
+ stub.close();
1241
+ this.locationsClient.close();
1242
+ this.operationsClient.close();
1243
+ });
1244
+ }
1245
+ return Promise.resolve();
1246
+ }
1247
+ }
1248
+ exports.SiteSearchEngineServiceClient = SiteSearchEngineServiceClient;
1249
+ //# sourceMappingURL=site_search_engine_service_client.js.map