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