@google-cloud/discoveryengine 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
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,1432 @@
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.SearchServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1alpha/search_service_client_config.json`.
25
+ * This file defines retry strategy and timeouts for all API methods in this library.
26
+ */
27
+ const gapicConfig = require("./search_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Service for search.
31
+ * @class
32
+ * @memberof v1alpha
33
+ */
34
+ class SearchServiceClient {
35
+ /**
36
+ * Construct an instance of SearchServiceClient.
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 SearchServiceClient({fallback: true}, gax);
72
+ * ```
73
+ */
74
+ constructor(opts, gaxInstance) {
75
+ var _a, _b;
76
+ this._terminated = false;
77
+ this.descriptors = {
78
+ page: {},
79
+ stream: {},
80
+ longrunning: {},
81
+ batching: {},
82
+ };
83
+ // Ensure that options include all the required fields.
84
+ const staticMembers = this.constructor;
85
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || staticMembers.servicePath;
86
+ this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
87
+ const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
88
+ const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};
89
+ const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
90
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
91
+ // Request numeric enum values if REST transport is used.
92
+ opts.numericEnums = true;
93
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
94
+ if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
95
+ opts['scopes'] = staticMembers.scopes;
96
+ }
97
+ // Load google-gax module synchronously if needed
98
+ if (!gaxInstance) {
99
+ gaxInstance = require('google-gax');
100
+ }
101
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
102
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
103
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
104
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
105
+ // Save options to use in initialize() method.
106
+ this._opts = opts;
107
+ // Save the auth object to the client, for use by other methods.
108
+ this.auth = this._gaxGrpc.auth;
109
+ // Set useJWTAccessWithScope on the auth object.
110
+ this.auth.useJWTAccessWithScope = true;
111
+ // Set defaultServicePath on the auth object.
112
+ this.auth.defaultServicePath = staticMembers.servicePath;
113
+ // Set the default scopes in auth client if needed.
114
+ if (servicePath === staticMembers.servicePath) {
115
+ this.auth.defaultScopes = staticMembers.scopes;
116
+ }
117
+ this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
118
+ // Determine the client header string.
119
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
120
+ if (typeof process !== 'undefined' && 'versions' in process) {
121
+ clientHeader.push(`gl-node/${process.versions.node}`);
122
+ }
123
+ else {
124
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
125
+ }
126
+ if (!opts.fallback) {
127
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
128
+ }
129
+ else {
130
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
131
+ }
132
+ if (opts.libName && opts.libVersion) {
133
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
134
+ }
135
+ // Load the applicable protos.
136
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
137
+ // This API contains "path templates"; forward-slash-separated
138
+ // identifiers to uniquely identify resources within the API.
139
+ // Create useful helper objects for these.
140
+ this.pathTemplates = {
141
+ projectLocationCollectionDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}'),
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
+ projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
146
+ projectLocationCollectionEngineServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}'),
147
+ projectLocationDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}'),
148
+ projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
149
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
150
+ projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
151
+ projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
152
+ };
153
+ // Some of the methods on this service return "paged" results,
154
+ // (e.g. 50 results at a time, with tokens to get subsequent
155
+ // pages). Denote the keys used for pagination and results.
156
+ this.descriptors.page = {
157
+ search: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'results'),
158
+ };
159
+ // Put together the default options sent with requests.
160
+ this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.SearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
161
+ // Set up a dictionary of "inner API calls"; the core implementation
162
+ // of calling the API is handled in `google-gax`, with this code
163
+ // merely providing the destination and request information.
164
+ this.innerApiCalls = {};
165
+ // Add a warn function to the client constructor so it can be easily tested.
166
+ this.warn = this._gaxModule.warn;
167
+ }
168
+ /**
169
+ * Initialize the client.
170
+ * Performs asynchronous operations (such as authentication) and prepares the client.
171
+ * This function will be called automatically when any class method is called for the
172
+ * first time, but if you need to initialize it before calling an actual method,
173
+ * feel free to call initialize() directly.
174
+ *
175
+ * You can await on this method if you want to make sure the client is initialized.
176
+ *
177
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
178
+ */
179
+ initialize() {
180
+ // If the client stub promise is already initialized, return immediately.
181
+ if (this.searchServiceStub) {
182
+ return this.searchServiceStub;
183
+ }
184
+ // Put together the "service stub" for
185
+ // google.cloud.discoveryengine.v1alpha.SearchService.
186
+ this.searchServiceStub = this._gaxGrpc.createStub(this._opts.fallback
187
+ ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.SearchService')
188
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
189
+ this._protos.google.cloud.discoveryengine.v1alpha
190
+ .SearchService, this._opts, this._providedCustomServicePath);
191
+ // Iterate over each of the methods that the service provides
192
+ // and create an API call method for each.
193
+ const searchServiceStubMethods = ['search'];
194
+ for (const methodName of searchServiceStubMethods) {
195
+ const callPromise = this.searchServiceStub.then(stub => (...args) => {
196
+ if (this._terminated) {
197
+ return Promise.reject('The client has already been closed.');
198
+ }
199
+ const func = stub[methodName];
200
+ return func.apply(stub, args);
201
+ }, (err) => () => {
202
+ throw err;
203
+ });
204
+ const descriptor = this.descriptors.page[methodName] || undefined;
205
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
206
+ this.innerApiCalls[methodName] = apiCall;
207
+ }
208
+ return this.searchServiceStub;
209
+ }
210
+ /**
211
+ * The DNS address for this API service.
212
+ * @returns {string} The DNS address for this service.
213
+ */
214
+ static get servicePath() {
215
+ return 'discoveryengine.googleapis.com';
216
+ }
217
+ /**
218
+ * The DNS address for this API service - same as servicePath(),
219
+ * exists for compatibility reasons.
220
+ * @returns {string} The DNS address for this service.
221
+ */
222
+ static get apiEndpoint() {
223
+ return 'discoveryengine.googleapis.com';
224
+ }
225
+ /**
226
+ * The port for this API service.
227
+ * @returns {number} The default port for this service.
228
+ */
229
+ static get port() {
230
+ return 443;
231
+ }
232
+ /**
233
+ * The scopes needed to make gRPC calls for every method defined
234
+ * in this service.
235
+ * @returns {string[]} List of default scopes.
236
+ */
237
+ static get scopes() {
238
+ return ['https://www.googleapis.com/auth/cloud-platform'];
239
+ }
240
+ /**
241
+ * Return the project ID used by this class.
242
+ * @returns {Promise} A promise that resolves to string containing the project ID.
243
+ */
244
+ getProjectId(callback) {
245
+ if (callback) {
246
+ this.auth.getProjectId(callback);
247
+ return;
248
+ }
249
+ return this.auth.getProjectId();
250
+ }
251
+ search(request, optionsOrCallback, callback) {
252
+ var _a;
253
+ request = request || {};
254
+ let options;
255
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
256
+ callback = optionsOrCallback;
257
+ options = {};
258
+ }
259
+ else {
260
+ options = optionsOrCallback;
261
+ }
262
+ options = options || {};
263
+ options.otherArgs = options.otherArgs || {};
264
+ options.otherArgs.headers = options.otherArgs.headers || {};
265
+ options.otherArgs.headers['x-goog-request-params'] =
266
+ this._gaxModule.routingHeader.fromParams({
267
+ serving_config: (_a = request.servingConfig) !== null && _a !== void 0 ? _a : '',
268
+ });
269
+ this.initialize();
270
+ return this.innerApiCalls.search(request, options, callback);
271
+ }
272
+ /**
273
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
274
+ * @param {Object} request
275
+ * The request object that will be sent.
276
+ * @param {string} request.servingConfig
277
+ * Required. The resource name of the Search serving config, such as
278
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
279
+ * This field is used to identify the serving configuration name, set
280
+ * of models used to make the search.
281
+ * @param {string} request.branch
282
+ * The branch resource name, such as
283
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
284
+ *
285
+ * Use `default_branch` as the branch ID or leave this field empty, to search
286
+ * documents under the default branch.
287
+ * @param {string} request.query
288
+ * Raw search query.
289
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery} request.imageQuery
290
+ * Raw image query.
291
+ * @param {number} request.pageSize
292
+ * Maximum number of
293
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. If
294
+ * unspecified, defaults to a reasonable value. The maximum allowed value is
295
+ * 100. Values above 100 are coerced to 100.
296
+ *
297
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
298
+ * @param {string} request.pageToken
299
+ * A page token received from a previous
300
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
301
+ * call. Provide this to retrieve the subsequent page.
302
+ *
303
+ * When paginating, all other parameters provided to
304
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
305
+ * must match the call that provided the page token. Otherwise, an
306
+ * `INVALID_ARGUMENT` error is returned.
307
+ * @param {number} request.offset
308
+ * A 0-indexed integer that specifies the current offset (that is, starting
309
+ * result location, amongst the
310
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s deemed by the
311
+ * API as relevant) in search results. This field is only considered if
312
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.page_token|page_token}
313
+ * is unset.
314
+ *
315
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
316
+ * @param {string} request.filter
317
+ * The filter syntax consists of an expression language for constructing a
318
+ * predicate from one or more fields of the documents being filtered. Filter
319
+ * expression is case-sensitive.
320
+ *
321
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
322
+ * @param {string} request.orderBy
323
+ * The order in which documents are returned. Documents can be ordered by
324
+ * a field in an {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}
325
+ * object. Leave it unset if ordered by relevance. `order_by` expression is
326
+ * case-sensitive.
327
+ *
328
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
329
+ * @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
330
+ * Information about the end user.
331
+ * Highly recommended for analytics.
332
+ * {@link protos.google.cloud.discoveryengine.v1alpha.UserInfo.user_agent|UserInfo.user_agent}
333
+ * is used to deduce `device_type` for analytics.
334
+ * @param {number[]} request.facetSpecs
335
+ * Facet specifications for faceted search. If empty, no facets are returned.
336
+ *
337
+ * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
338
+ * error is returned.
339
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} request.boostSpec
340
+ * Boost specification to boost certain documents.
341
+ * @param {number[]} request.params
342
+ * Additional search parameters.
343
+ *
344
+ * For public website search only, supported values are:
345
+ *
346
+ * * `user_country_code`: string. Default empty. If set to non-empty, results
347
+ * are restricted or boosted based on the location provided.
348
+ * * `search_type`: double. Default empty. Enables non-webpage searching
349
+ * depending on the value. The only valid non-default value is 1,
350
+ * which enables image searching.
351
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
352
+ * The query expansion specification that specifies the conditions under which
353
+ * query expansion occurs.
354
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
355
+ * The spell correction specification that specifies the mode under
356
+ * which spell correction takes effect.
357
+ * @param {string} request.userPseudoId
358
+ * A unique identifier for tracking visitors. For example, this could be
359
+ * implemented with an HTTP cookie, which should be able to uniquely identify
360
+ * a visitor on a single device. This unique identifier should not change if
361
+ * the visitor logs in or out of the website.
362
+ *
363
+ * This field should NOT have a fixed value such as `unknown_visitor`.
364
+ *
365
+ * This should be the same identifier as
366
+ * {@link protos.google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
367
+ * and
368
+ * {@link protos.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
369
+ *
370
+ * The field must be a UTF-8 encoded string with a length limit of 128
371
+ * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
372
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec} request.contentSearchSpec
373
+ * A specification for configuring the behavior of content search.
374
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec} request.embeddingSpec
375
+ * Uses the provided embedding to do additional semantic document retrieval.
376
+ * The retrieval is based on the dot product of
377
+ * {@link protos.|SearchRequest.embedding_spec.embedding_vectors.vector} and the document
378
+ * embedding that is provided in
379
+ * {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path}.
380
+ *
381
+ * If {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path} is not
382
+ * provided, it will use {@link protos.|ServingConfig.embedding_config.field_paths}.
383
+ * @param {string} request.rankingExpression
384
+ * The ranking expression controls the customized ranking on retrieval
385
+ * documents. This overrides
386
+ * {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
387
+ * The ranking expression is a single function or multiple functions that are
388
+ * joint by "+".
389
+ * * ranking_expression = function, { " + ", function };
390
+ * Supported functions:
391
+ * * double * relevance_score
392
+ * * double * dotProduct(embedding_field_path)
393
+ * Function variables:
394
+ * `relevance_score`: pre-defined keywords, used for measure relevance
395
+ * between query and document.
396
+ * `embedding_field_path`: the document embedding field
397
+ * used with query embedding vector.
398
+ * `dotProduct`: embedding function between embedding_field_path and query
399
+ * embedding vector.
400
+ *
401
+ * Example ranking expression:
402
+ * If document has an embedding field doc_embedding, the ranking expression
403
+ * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
404
+ * @param {boolean} request.safeSearch
405
+ * Whether to turn on safe search. This is only supported for
406
+ * website search.
407
+ * @param {number[]} request.userLabels
408
+ * The user labels applied to a resource must meet the following requirements:
409
+ *
410
+ * * Each resource can have multiple labels, up to a maximum of 64.
411
+ * * Each label must be a key-value pair.
412
+ * * Keys have a minimum length of 1 character and a maximum length of 63
413
+ * characters and cannot be empty. Values can be empty and have a maximum
414
+ * length of 63 characters.
415
+ * * Keys and values can contain only lowercase letters, numeric characters,
416
+ * underscores, and dashes. All characters must use UTF-8 encoding, and
417
+ * international characters are allowed.
418
+ * * The key portion of a label must be unique. However, you can use the same
419
+ * key with multiple resources.
420
+ * * Keys must start with a lowercase letter or international character.
421
+ *
422
+ * See [Google Cloud
423
+ * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
424
+ * for more details.
425
+ * @param {object} [options]
426
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
427
+ * @returns {Stream}
428
+ * An object stream which emits an object representing {@link protos.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult|SearchResult} on 'data' event.
429
+ * The client library will perform auto-pagination by default: it will call the API as many
430
+ * times as needed. Note that it can affect your quota.
431
+ * We recommend using `searchAsync()`
432
+ * method described below for async iteration which you can stop as needed.
433
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
434
+ * for more details and examples.
435
+ */
436
+ searchStream(request, options) {
437
+ var _a;
438
+ request = request || {};
439
+ options = options || {};
440
+ options.otherArgs = options.otherArgs || {};
441
+ options.otherArgs.headers = options.otherArgs.headers || {};
442
+ options.otherArgs.headers['x-goog-request-params'] =
443
+ this._gaxModule.routingHeader.fromParams({
444
+ serving_config: (_a = request.servingConfig) !== null && _a !== void 0 ? _a : '',
445
+ });
446
+ const defaultCallSettings = this._defaults['search'];
447
+ const callSettings = defaultCallSettings.merge(options);
448
+ this.initialize();
449
+ return this.descriptors.page.search.createStream(this.innerApiCalls.search, request, callSettings);
450
+ }
451
+ /**
452
+ * Equivalent to `search`, but returns an iterable object.
453
+ *
454
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
455
+ * @param {Object} request
456
+ * The request object that will be sent.
457
+ * @param {string} request.servingConfig
458
+ * Required. The resource name of the Search serving config, such as
459
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
460
+ * This field is used to identify the serving configuration name, set
461
+ * of models used to make the search.
462
+ * @param {string} request.branch
463
+ * The branch resource name, such as
464
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
465
+ *
466
+ * Use `default_branch` as the branch ID or leave this field empty, to search
467
+ * documents under the default branch.
468
+ * @param {string} request.query
469
+ * Raw search query.
470
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery} request.imageQuery
471
+ * Raw image query.
472
+ * @param {number} request.pageSize
473
+ * Maximum number of
474
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. If
475
+ * unspecified, defaults to a reasonable value. The maximum allowed value is
476
+ * 100. Values above 100 are coerced to 100.
477
+ *
478
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
479
+ * @param {string} request.pageToken
480
+ * A page token received from a previous
481
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
482
+ * call. Provide this to retrieve the subsequent page.
483
+ *
484
+ * When paginating, all other parameters provided to
485
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
486
+ * must match the call that provided the page token. Otherwise, an
487
+ * `INVALID_ARGUMENT` error is returned.
488
+ * @param {number} request.offset
489
+ * A 0-indexed integer that specifies the current offset (that is, starting
490
+ * result location, amongst the
491
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s deemed by the
492
+ * API as relevant) in search results. This field is only considered if
493
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.page_token|page_token}
494
+ * is unset.
495
+ *
496
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
497
+ * @param {string} request.filter
498
+ * The filter syntax consists of an expression language for constructing a
499
+ * predicate from one or more fields of the documents being filtered. Filter
500
+ * expression is case-sensitive.
501
+ *
502
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
503
+ * @param {string} request.orderBy
504
+ * The order in which documents are returned. Documents can be ordered by
505
+ * a field in an {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}
506
+ * object. Leave it unset if ordered by relevance. `order_by` expression is
507
+ * case-sensitive.
508
+ *
509
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
510
+ * @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
511
+ * Information about the end user.
512
+ * Highly recommended for analytics.
513
+ * {@link protos.google.cloud.discoveryengine.v1alpha.UserInfo.user_agent|UserInfo.user_agent}
514
+ * is used to deduce `device_type` for analytics.
515
+ * @param {number[]} request.facetSpecs
516
+ * Facet specifications for faceted search. If empty, no facets are returned.
517
+ *
518
+ * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
519
+ * error is returned.
520
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} request.boostSpec
521
+ * Boost specification to boost certain documents.
522
+ * @param {number[]} request.params
523
+ * Additional search parameters.
524
+ *
525
+ * For public website search only, supported values are:
526
+ *
527
+ * * `user_country_code`: string. Default empty. If set to non-empty, results
528
+ * are restricted or boosted based on the location provided.
529
+ * * `search_type`: double. Default empty. Enables non-webpage searching
530
+ * depending on the value. The only valid non-default value is 1,
531
+ * which enables image searching.
532
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
533
+ * The query expansion specification that specifies the conditions under which
534
+ * query expansion occurs.
535
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
536
+ * The spell correction specification that specifies the mode under
537
+ * which spell correction takes effect.
538
+ * @param {string} request.userPseudoId
539
+ * A unique identifier for tracking visitors. For example, this could be
540
+ * implemented with an HTTP cookie, which should be able to uniquely identify
541
+ * a visitor on a single device. This unique identifier should not change if
542
+ * the visitor logs in or out of the website.
543
+ *
544
+ * This field should NOT have a fixed value such as `unknown_visitor`.
545
+ *
546
+ * This should be the same identifier as
547
+ * {@link protos.google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
548
+ * and
549
+ * {@link protos.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
550
+ *
551
+ * The field must be a UTF-8 encoded string with a length limit of 128
552
+ * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
553
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec} request.contentSearchSpec
554
+ * A specification for configuring the behavior of content search.
555
+ * @param {google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec} request.embeddingSpec
556
+ * Uses the provided embedding to do additional semantic document retrieval.
557
+ * The retrieval is based on the dot product of
558
+ * {@link protos.|SearchRequest.embedding_spec.embedding_vectors.vector} and the document
559
+ * embedding that is provided in
560
+ * {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path}.
561
+ *
562
+ * If {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path} is not
563
+ * provided, it will use {@link protos.|ServingConfig.embedding_config.field_paths}.
564
+ * @param {string} request.rankingExpression
565
+ * The ranking expression controls the customized ranking on retrieval
566
+ * documents. This overrides
567
+ * {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
568
+ * The ranking expression is a single function or multiple functions that are
569
+ * joint by "+".
570
+ * * ranking_expression = function, { " + ", function };
571
+ * Supported functions:
572
+ * * double * relevance_score
573
+ * * double * dotProduct(embedding_field_path)
574
+ * Function variables:
575
+ * `relevance_score`: pre-defined keywords, used for measure relevance
576
+ * between query and document.
577
+ * `embedding_field_path`: the document embedding field
578
+ * used with query embedding vector.
579
+ * `dotProduct`: embedding function between embedding_field_path and query
580
+ * embedding vector.
581
+ *
582
+ * Example ranking expression:
583
+ * If document has an embedding field doc_embedding, the ranking expression
584
+ * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
585
+ * @param {boolean} request.safeSearch
586
+ * Whether to turn on safe search. This is only supported for
587
+ * website search.
588
+ * @param {number[]} request.userLabels
589
+ * The user labels applied to a resource must meet the following requirements:
590
+ *
591
+ * * Each resource can have multiple labels, up to a maximum of 64.
592
+ * * Each label must be a key-value pair.
593
+ * * Keys have a minimum length of 1 character and a maximum length of 63
594
+ * characters and cannot be empty. Values can be empty and have a maximum
595
+ * length of 63 characters.
596
+ * * Keys and values can contain only lowercase letters, numeric characters,
597
+ * underscores, and dashes. All characters must use UTF-8 encoding, and
598
+ * international characters are allowed.
599
+ * * The key portion of a label must be unique. However, you can use the same
600
+ * key with multiple resources.
601
+ * * Keys must start with a lowercase letter or international character.
602
+ *
603
+ * See [Google Cloud
604
+ * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
605
+ * for more details.
606
+ * @param {object} [options]
607
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
608
+ * @returns {Object}
609
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
610
+ * When you iterate the returned iterable, each element will be an object representing
611
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult|SearchResult}. The API will be called under the hood as needed, once per the page,
612
+ * so you can stop the iteration when you don't need more results.
613
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
614
+ * for more details and examples.
615
+ * @example <caption>include:samples/generated/v1alpha/search_service.search.js</caption>
616
+ * region_tag:discoveryengine_v1alpha_generated_SearchService_Search_async
617
+ */
618
+ searchAsync(request, options) {
619
+ var _a;
620
+ request = request || {};
621
+ options = options || {};
622
+ options.otherArgs = options.otherArgs || {};
623
+ options.otherArgs.headers = options.otherArgs.headers || {};
624
+ options.otherArgs.headers['x-goog-request-params'] =
625
+ this._gaxModule.routingHeader.fromParams({
626
+ serving_config: (_a = request.servingConfig) !== null && _a !== void 0 ? _a : '',
627
+ });
628
+ const defaultCallSettings = this._defaults['search'];
629
+ const callSettings = defaultCallSettings.merge(options);
630
+ this.initialize();
631
+ return this.descriptors.page.search.asyncIterate(this.innerApiCalls['search'], request, callSettings);
632
+ }
633
+ /**
634
+ * Gets information about a location.
635
+ *
636
+ * @param {Object} request
637
+ * The request object that will be sent.
638
+ * @param {string} request.name
639
+ * Resource name for the location.
640
+ * @param {object} [options]
641
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
642
+ * @returns {Promise} - The promise which resolves to an array.
643
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
644
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
645
+ * for more details and examples.
646
+ * @example
647
+ * ```
648
+ * const [response] = await client.getLocation(request);
649
+ * ```
650
+ */
651
+ getLocation(request, options, callback) {
652
+ return this.locationsClient.getLocation(request, options, callback);
653
+ }
654
+ /**
655
+ * Lists information about the supported locations for this service. Returns an iterable object.
656
+ *
657
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
658
+ * @param {Object} request
659
+ * The request object that will be sent.
660
+ * @param {string} request.name
661
+ * The resource that owns the locations collection, if applicable.
662
+ * @param {string} request.filter
663
+ * The standard list filter.
664
+ * @param {number} request.pageSize
665
+ * The standard list page size.
666
+ * @param {string} request.pageToken
667
+ * The standard list page token.
668
+ * @param {object} [options]
669
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
670
+ * @returns {Object}
671
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
672
+ * When you iterate the returned iterable, each element will be an object representing
673
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
674
+ * so you can stop the iteration when you don't need more results.
675
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
676
+ * for more details and examples.
677
+ * @example
678
+ * ```
679
+ * const iterable = client.listLocationsAsync(request);
680
+ * for await (const response of iterable) {
681
+ * // process response
682
+ * }
683
+ * ```
684
+ */
685
+ listLocationsAsync(request, options) {
686
+ return this.locationsClient.listLocationsAsync(request, options);
687
+ }
688
+ // --------------------
689
+ // -- Path templates --
690
+ // --------------------
691
+ /**
692
+ * Return a fully-qualified projectLocationCollectionDataStoreBranch resource name string.
693
+ *
694
+ * @param {string} project
695
+ * @param {string} location
696
+ * @param {string} collection
697
+ * @param {string} data_store
698
+ * @param {string} branch
699
+ * @returns {string} Resource name string.
700
+ */
701
+ projectLocationCollectionDataStoreBranchPath(project, location, collection, dataStore, branch) {
702
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.render({
703
+ project: project,
704
+ location: location,
705
+ collection: collection,
706
+ data_store: dataStore,
707
+ branch: branch,
708
+ });
709
+ }
710
+ /**
711
+ * Parse the project from ProjectLocationCollectionDataStoreBranch resource.
712
+ *
713
+ * @param {string} projectLocationCollectionDataStoreBranchName
714
+ * A fully-qualified path representing project_location_collection_data_store_branch resource.
715
+ * @returns {string} A string representing the project.
716
+ */
717
+ matchProjectFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName) {
718
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match(projectLocationCollectionDataStoreBranchName).project;
719
+ }
720
+ /**
721
+ * Parse the location from ProjectLocationCollectionDataStoreBranch resource.
722
+ *
723
+ * @param {string} projectLocationCollectionDataStoreBranchName
724
+ * A fully-qualified path representing project_location_collection_data_store_branch resource.
725
+ * @returns {string} A string representing the location.
726
+ */
727
+ matchLocationFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName) {
728
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match(projectLocationCollectionDataStoreBranchName).location;
729
+ }
730
+ /**
731
+ * Parse the collection from ProjectLocationCollectionDataStoreBranch resource.
732
+ *
733
+ * @param {string} projectLocationCollectionDataStoreBranchName
734
+ * A fully-qualified path representing project_location_collection_data_store_branch resource.
735
+ * @returns {string} A string representing the collection.
736
+ */
737
+ matchCollectionFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName) {
738
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match(projectLocationCollectionDataStoreBranchName).collection;
739
+ }
740
+ /**
741
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranch resource.
742
+ *
743
+ * @param {string} projectLocationCollectionDataStoreBranchName
744
+ * A fully-qualified path representing project_location_collection_data_store_branch resource.
745
+ * @returns {string} A string representing the data_store.
746
+ */
747
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName) {
748
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match(projectLocationCollectionDataStoreBranchName).data_store;
749
+ }
750
+ /**
751
+ * Parse the branch from ProjectLocationCollectionDataStoreBranch resource.
752
+ *
753
+ * @param {string} projectLocationCollectionDataStoreBranchName
754
+ * A fully-qualified path representing project_location_collection_data_store_branch resource.
755
+ * @returns {string} A string representing the branch.
756
+ */
757
+ matchBranchFromProjectLocationCollectionDataStoreBranchName(projectLocationCollectionDataStoreBranchName) {
758
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match(projectLocationCollectionDataStoreBranchName).branch;
759
+ }
760
+ /**
761
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
762
+ *
763
+ * @param {string} project
764
+ * @param {string} location
765
+ * @param {string} collection
766
+ * @param {string} data_store
767
+ * @param {string} branch
768
+ * @param {string} document
769
+ * @returns {string} Resource name string.
770
+ */
771
+ projectLocationCollectionDataStoreBranchDocumentPath(project, location, collection, dataStore, branch, document) {
772
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render({
773
+ project: project,
774
+ location: location,
775
+ collection: collection,
776
+ data_store: dataStore,
777
+ branch: branch,
778
+ document: document,
779
+ });
780
+ }
781
+ /**
782
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource.
783
+ *
784
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
785
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
786
+ * @returns {string} A string representing the project.
787
+ */
788
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
789
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).project;
790
+ }
791
+ /**
792
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource.
793
+ *
794
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
795
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
796
+ * @returns {string} A string representing the location.
797
+ */
798
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
799
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).location;
800
+ }
801
+ /**
802
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource.
803
+ *
804
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
805
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
806
+ * @returns {string} A string representing the collection.
807
+ */
808
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
809
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).collection;
810
+ }
811
+ /**
812
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource.
813
+ *
814
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
815
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
816
+ * @returns {string} A string representing the data_store.
817
+ */
818
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
819
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).data_store;
820
+ }
821
+ /**
822
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource.
823
+ *
824
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
825
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
826
+ * @returns {string} A string representing the branch.
827
+ */
828
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
829
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).branch;
830
+ }
831
+ /**
832
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource.
833
+ *
834
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
835
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
836
+ * @returns {string} A string representing the document.
837
+ */
838
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
839
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
840
+ }
841
+ /**
842
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
843
+ *
844
+ * @param {string} project
845
+ * @param {string} location
846
+ * @param {string} collection
847
+ * @param {string} data_store
848
+ * @param {string} conversation
849
+ * @returns {string} Resource name string.
850
+ */
851
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
852
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
853
+ project: project,
854
+ location: location,
855
+ collection: collection,
856
+ data_store: dataStore,
857
+ conversation: conversation,
858
+ });
859
+ }
860
+ /**
861
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
862
+ *
863
+ * @param {string} projectLocationCollectionDataStoreConversationName
864
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
865
+ * @returns {string} A string representing the project.
866
+ */
867
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
868
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
869
+ }
870
+ /**
871
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
872
+ *
873
+ * @param {string} projectLocationCollectionDataStoreConversationName
874
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
875
+ * @returns {string} A string representing the location.
876
+ */
877
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
878
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
879
+ }
880
+ /**
881
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
882
+ *
883
+ * @param {string} projectLocationCollectionDataStoreConversationName
884
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
885
+ * @returns {string} A string representing the collection.
886
+ */
887
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
888
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
889
+ }
890
+ /**
891
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
892
+ *
893
+ * @param {string} projectLocationCollectionDataStoreConversationName
894
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
895
+ * @returns {string} A string representing the data_store.
896
+ */
897
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
898
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
899
+ }
900
+ /**
901
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
902
+ *
903
+ * @param {string} projectLocationCollectionDataStoreConversationName
904
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
905
+ * @returns {string} A string representing the conversation.
906
+ */
907
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
908
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
909
+ }
910
+ /**
911
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
912
+ *
913
+ * @param {string} project
914
+ * @param {string} location
915
+ * @param {string} collection
916
+ * @param {string} data_store
917
+ * @param {string} schema
918
+ * @returns {string} Resource name string.
919
+ */
920
+ projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
921
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
922
+ project: project,
923
+ location: location,
924
+ collection: collection,
925
+ data_store: dataStore,
926
+ schema: schema,
927
+ });
928
+ }
929
+ /**
930
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
931
+ *
932
+ * @param {string} projectLocationCollectionDataStoreSchemaName
933
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
934
+ * @returns {string} A string representing the project.
935
+ */
936
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
937
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
938
+ }
939
+ /**
940
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
941
+ *
942
+ * @param {string} projectLocationCollectionDataStoreSchemaName
943
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
944
+ * @returns {string} A string representing the location.
945
+ */
946
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
947
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
948
+ }
949
+ /**
950
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
951
+ *
952
+ * @param {string} projectLocationCollectionDataStoreSchemaName
953
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
954
+ * @returns {string} A string representing the collection.
955
+ */
956
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
957
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
958
+ }
959
+ /**
960
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
961
+ *
962
+ * @param {string} projectLocationCollectionDataStoreSchemaName
963
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
964
+ * @returns {string} A string representing the data_store.
965
+ */
966
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
967
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
968
+ }
969
+ /**
970
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
971
+ *
972
+ * @param {string} projectLocationCollectionDataStoreSchemaName
973
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
974
+ * @returns {string} A string representing the schema.
975
+ */
976
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
977
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
978
+ }
979
+ /**
980
+ * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.
981
+ *
982
+ * @param {string} project
983
+ * @param {string} location
984
+ * @param {string} collection
985
+ * @param {string} data_store
986
+ * @param {string} serving_config
987
+ * @returns {string} Resource name string.
988
+ */
989
+ projectLocationCollectionDataStoreServingConfigPath(project, location, collection, dataStore, servingConfig) {
990
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render({
991
+ project: project,
992
+ location: location,
993
+ collection: collection,
994
+ data_store: dataStore,
995
+ serving_config: servingConfig,
996
+ });
997
+ }
998
+ /**
999
+ * Parse the project from ProjectLocationCollectionDataStoreServingConfig resource.
1000
+ *
1001
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1002
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1003
+ * @returns {string} A string representing the project.
1004
+ */
1005
+ matchProjectFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1006
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).project;
1007
+ }
1008
+ /**
1009
+ * Parse the location from ProjectLocationCollectionDataStoreServingConfig resource.
1010
+ *
1011
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1012
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1013
+ * @returns {string} A string representing the location.
1014
+ */
1015
+ matchLocationFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1016
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).location;
1017
+ }
1018
+ /**
1019
+ * Parse the collection from ProjectLocationCollectionDataStoreServingConfig resource.
1020
+ *
1021
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1022
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1023
+ * @returns {string} A string representing the collection.
1024
+ */
1025
+ matchCollectionFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1026
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).collection;
1027
+ }
1028
+ /**
1029
+ * Parse the data_store from ProjectLocationCollectionDataStoreServingConfig resource.
1030
+ *
1031
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1032
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1033
+ * @returns {string} A string representing the data_store.
1034
+ */
1035
+ matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1036
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).data_store;
1037
+ }
1038
+ /**
1039
+ * Parse the serving_config from ProjectLocationCollectionDataStoreServingConfig resource.
1040
+ *
1041
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
1042
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
1043
+ * @returns {string} A string representing the serving_config.
1044
+ */
1045
+ matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
1046
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).serving_config;
1047
+ }
1048
+ /**
1049
+ * Return a fully-qualified projectLocationCollectionEngineServingConfig resource name string.
1050
+ *
1051
+ * @param {string} project
1052
+ * @param {string} location
1053
+ * @param {string} collection
1054
+ * @param {string} engine
1055
+ * @param {string} serving_config
1056
+ * @returns {string} Resource name string.
1057
+ */
1058
+ projectLocationCollectionEngineServingConfigPath(project, location, collection, engine, servingConfig) {
1059
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render({
1060
+ project: project,
1061
+ location: location,
1062
+ collection: collection,
1063
+ engine: engine,
1064
+ serving_config: servingConfig,
1065
+ });
1066
+ }
1067
+ /**
1068
+ * Parse the project from ProjectLocationCollectionEngineServingConfig resource.
1069
+ *
1070
+ * @param {string} projectLocationCollectionEngineServingConfigName
1071
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1072
+ * @returns {string} A string representing the project.
1073
+ */
1074
+ matchProjectFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1075
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).project;
1076
+ }
1077
+ /**
1078
+ * Parse the location from ProjectLocationCollectionEngineServingConfig resource.
1079
+ *
1080
+ * @param {string} projectLocationCollectionEngineServingConfigName
1081
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1082
+ * @returns {string} A string representing the location.
1083
+ */
1084
+ matchLocationFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1085
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).location;
1086
+ }
1087
+ /**
1088
+ * Parse the collection from ProjectLocationCollectionEngineServingConfig resource.
1089
+ *
1090
+ * @param {string} projectLocationCollectionEngineServingConfigName
1091
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1092
+ * @returns {string} A string representing the collection.
1093
+ */
1094
+ matchCollectionFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1095
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).collection;
1096
+ }
1097
+ /**
1098
+ * Parse the engine from ProjectLocationCollectionEngineServingConfig resource.
1099
+ *
1100
+ * @param {string} projectLocationCollectionEngineServingConfigName
1101
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1102
+ * @returns {string} A string representing the engine.
1103
+ */
1104
+ matchEngineFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1105
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).engine;
1106
+ }
1107
+ /**
1108
+ * Parse the serving_config from ProjectLocationCollectionEngineServingConfig resource.
1109
+ *
1110
+ * @param {string} projectLocationCollectionEngineServingConfigName
1111
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
1112
+ * @returns {string} A string representing the serving_config.
1113
+ */
1114
+ matchServingConfigFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
1115
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).serving_config;
1116
+ }
1117
+ /**
1118
+ * Return a fully-qualified projectLocationDataStoreBranch resource name string.
1119
+ *
1120
+ * @param {string} project
1121
+ * @param {string} location
1122
+ * @param {string} data_store
1123
+ * @param {string} branch
1124
+ * @returns {string} Resource name string.
1125
+ */
1126
+ projectLocationDataStoreBranchPath(project, location, dataStore, branch) {
1127
+ return this.pathTemplates.projectLocationDataStoreBranchPathTemplate.render({
1128
+ project: project,
1129
+ location: location,
1130
+ data_store: dataStore,
1131
+ branch: branch,
1132
+ });
1133
+ }
1134
+ /**
1135
+ * Parse the project from ProjectLocationDataStoreBranch resource.
1136
+ *
1137
+ * @param {string} projectLocationDataStoreBranchName
1138
+ * A fully-qualified path representing project_location_data_store_branch resource.
1139
+ * @returns {string} A string representing the project.
1140
+ */
1141
+ matchProjectFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName) {
1142
+ return this.pathTemplates.projectLocationDataStoreBranchPathTemplate.match(projectLocationDataStoreBranchName).project;
1143
+ }
1144
+ /**
1145
+ * Parse the location from ProjectLocationDataStoreBranch resource.
1146
+ *
1147
+ * @param {string} projectLocationDataStoreBranchName
1148
+ * A fully-qualified path representing project_location_data_store_branch resource.
1149
+ * @returns {string} A string representing the location.
1150
+ */
1151
+ matchLocationFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName) {
1152
+ return this.pathTemplates.projectLocationDataStoreBranchPathTemplate.match(projectLocationDataStoreBranchName).location;
1153
+ }
1154
+ /**
1155
+ * Parse the data_store from ProjectLocationDataStoreBranch resource.
1156
+ *
1157
+ * @param {string} projectLocationDataStoreBranchName
1158
+ * A fully-qualified path representing project_location_data_store_branch resource.
1159
+ * @returns {string} A string representing the data_store.
1160
+ */
1161
+ matchDataStoreFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName) {
1162
+ return this.pathTemplates.projectLocationDataStoreBranchPathTemplate.match(projectLocationDataStoreBranchName).data_store;
1163
+ }
1164
+ /**
1165
+ * Parse the branch from ProjectLocationDataStoreBranch resource.
1166
+ *
1167
+ * @param {string} projectLocationDataStoreBranchName
1168
+ * A fully-qualified path representing project_location_data_store_branch resource.
1169
+ * @returns {string} A string representing the branch.
1170
+ */
1171
+ matchBranchFromProjectLocationDataStoreBranchName(projectLocationDataStoreBranchName) {
1172
+ return this.pathTemplates.projectLocationDataStoreBranchPathTemplate.match(projectLocationDataStoreBranchName).branch;
1173
+ }
1174
+ /**
1175
+ * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
1176
+ *
1177
+ * @param {string} project
1178
+ * @param {string} location
1179
+ * @param {string} data_store
1180
+ * @param {string} branch
1181
+ * @param {string} document
1182
+ * @returns {string} Resource name string.
1183
+ */
1184
+ projectLocationDataStoreBranchDocumentPath(project, location, dataStore, branch, document) {
1185
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render({
1186
+ project: project,
1187
+ location: location,
1188
+ data_store: dataStore,
1189
+ branch: branch,
1190
+ document: document,
1191
+ });
1192
+ }
1193
+ /**
1194
+ * Parse the project from ProjectLocationDataStoreBranchDocument resource.
1195
+ *
1196
+ * @param {string} projectLocationDataStoreBranchDocumentName
1197
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1198
+ * @returns {string} A string representing the project.
1199
+ */
1200
+ matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1201
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).project;
1202
+ }
1203
+ /**
1204
+ * Parse the location from ProjectLocationDataStoreBranchDocument resource.
1205
+ *
1206
+ * @param {string} projectLocationDataStoreBranchDocumentName
1207
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1208
+ * @returns {string} A string representing the location.
1209
+ */
1210
+ matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1211
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).location;
1212
+ }
1213
+ /**
1214
+ * Parse the data_store from ProjectLocationDataStoreBranchDocument resource.
1215
+ *
1216
+ * @param {string} projectLocationDataStoreBranchDocumentName
1217
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1218
+ * @returns {string} A string representing the data_store.
1219
+ */
1220
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1221
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).data_store;
1222
+ }
1223
+ /**
1224
+ * Parse the branch from ProjectLocationDataStoreBranchDocument resource.
1225
+ *
1226
+ * @param {string} projectLocationDataStoreBranchDocumentName
1227
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1228
+ * @returns {string} A string representing the branch.
1229
+ */
1230
+ matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1231
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).branch;
1232
+ }
1233
+ /**
1234
+ * Parse the document from ProjectLocationDataStoreBranchDocument resource.
1235
+ *
1236
+ * @param {string} projectLocationDataStoreBranchDocumentName
1237
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1238
+ * @returns {string} A string representing the document.
1239
+ */
1240
+ matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1241
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
1242
+ }
1243
+ /**
1244
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1245
+ *
1246
+ * @param {string} project
1247
+ * @param {string} location
1248
+ * @param {string} data_store
1249
+ * @param {string} conversation
1250
+ * @returns {string} Resource name string.
1251
+ */
1252
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1253
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1254
+ project: project,
1255
+ location: location,
1256
+ data_store: dataStore,
1257
+ conversation: conversation,
1258
+ });
1259
+ }
1260
+ /**
1261
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1262
+ *
1263
+ * @param {string} projectLocationDataStoreConversationName
1264
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1265
+ * @returns {string} A string representing the project.
1266
+ */
1267
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1268
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1269
+ }
1270
+ /**
1271
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1272
+ *
1273
+ * @param {string} projectLocationDataStoreConversationName
1274
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1275
+ * @returns {string} A string representing the location.
1276
+ */
1277
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1278
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1279
+ }
1280
+ /**
1281
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1282
+ *
1283
+ * @param {string} projectLocationDataStoreConversationName
1284
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1285
+ * @returns {string} A string representing the data_store.
1286
+ */
1287
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1288
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1289
+ }
1290
+ /**
1291
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1292
+ *
1293
+ * @param {string} projectLocationDataStoreConversationName
1294
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1295
+ * @returns {string} A string representing the conversation.
1296
+ */
1297
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1298
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1299
+ }
1300
+ /**
1301
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
1302
+ *
1303
+ * @param {string} project
1304
+ * @param {string} location
1305
+ * @param {string} data_store
1306
+ * @param {string} schema
1307
+ * @returns {string} Resource name string.
1308
+ */
1309
+ projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
1310
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
1311
+ project: project,
1312
+ location: location,
1313
+ data_store: dataStore,
1314
+ schema: schema,
1315
+ });
1316
+ }
1317
+ /**
1318
+ * Parse the project from ProjectLocationDataStoreSchema resource.
1319
+ *
1320
+ * @param {string} projectLocationDataStoreSchemaName
1321
+ * A fully-qualified path representing project_location_data_store_schema resource.
1322
+ * @returns {string} A string representing the project.
1323
+ */
1324
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1325
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
1326
+ }
1327
+ /**
1328
+ * Parse the location from ProjectLocationDataStoreSchema resource.
1329
+ *
1330
+ * @param {string} projectLocationDataStoreSchemaName
1331
+ * A fully-qualified path representing project_location_data_store_schema resource.
1332
+ * @returns {string} A string representing the location.
1333
+ */
1334
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1335
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
1336
+ }
1337
+ /**
1338
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
1339
+ *
1340
+ * @param {string} projectLocationDataStoreSchemaName
1341
+ * A fully-qualified path representing project_location_data_store_schema resource.
1342
+ * @returns {string} A string representing the data_store.
1343
+ */
1344
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1345
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
1346
+ }
1347
+ /**
1348
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
1349
+ *
1350
+ * @param {string} projectLocationDataStoreSchemaName
1351
+ * A fully-qualified path representing project_location_data_store_schema resource.
1352
+ * @returns {string} A string representing the schema.
1353
+ */
1354
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1355
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
1356
+ }
1357
+ /**
1358
+ * Return a fully-qualified projectLocationDataStoreServingConfig resource name string.
1359
+ *
1360
+ * @param {string} project
1361
+ * @param {string} location
1362
+ * @param {string} data_store
1363
+ * @param {string} serving_config
1364
+ * @returns {string} Resource name string.
1365
+ */
1366
+ projectLocationDataStoreServingConfigPath(project, location, dataStore, servingConfig) {
1367
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render({
1368
+ project: project,
1369
+ location: location,
1370
+ data_store: dataStore,
1371
+ serving_config: servingConfig,
1372
+ });
1373
+ }
1374
+ /**
1375
+ * Parse the project from ProjectLocationDataStoreServingConfig resource.
1376
+ *
1377
+ * @param {string} projectLocationDataStoreServingConfigName
1378
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1379
+ * @returns {string} A string representing the project.
1380
+ */
1381
+ matchProjectFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1382
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).project;
1383
+ }
1384
+ /**
1385
+ * Parse the location from ProjectLocationDataStoreServingConfig resource.
1386
+ *
1387
+ * @param {string} projectLocationDataStoreServingConfigName
1388
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1389
+ * @returns {string} A string representing the location.
1390
+ */
1391
+ matchLocationFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1392
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).location;
1393
+ }
1394
+ /**
1395
+ * Parse the data_store from ProjectLocationDataStoreServingConfig resource.
1396
+ *
1397
+ * @param {string} projectLocationDataStoreServingConfigName
1398
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1399
+ * @returns {string} A string representing the data_store.
1400
+ */
1401
+ matchDataStoreFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1402
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).data_store;
1403
+ }
1404
+ /**
1405
+ * Parse the serving_config from ProjectLocationDataStoreServingConfig resource.
1406
+ *
1407
+ * @param {string} projectLocationDataStoreServingConfigName
1408
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1409
+ * @returns {string} A string representing the serving_config.
1410
+ */
1411
+ matchServingConfigFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1412
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).serving_config;
1413
+ }
1414
+ /**
1415
+ * Terminate the gRPC channel and close the client.
1416
+ *
1417
+ * The client will no longer be usable and all future behavior is undefined.
1418
+ * @returns {Promise} A promise that resolves when the client is closed.
1419
+ */
1420
+ close() {
1421
+ if (this.searchServiceStub && !this._terminated) {
1422
+ return this.searchServiceStub.then(stub => {
1423
+ this._terminated = true;
1424
+ stub.close();
1425
+ this.locationsClient.close();
1426
+ });
1427
+ }
1428
+ return Promise.resolve();
1429
+ }
1430
+ }
1431
+ exports.SearchServiceClient = SearchServiceClient;
1432
+ //# sourceMappingURL=search_service_client.js.map