@google-cloud/discoveryengine 1.1.0 → 1.3.0

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