@google-cloud/discoveryengine 1.0.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +33 -1
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
  5. package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
  8. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
  9. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
  10. package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
  12. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
  13. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +155 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +134 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +138 -0
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +306 -0
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
  22. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +221 -0
  23. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
  24. package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
  25. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +851 -0
  26. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
  29. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +6 -0
  30. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +9 -2
  31. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +25 -0
  32. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +115 -3
  33. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
  34. package/build/protos/protos.d.ts +22864 -6680
  35. package/build/protos/protos.js +57205 -16191
  36. package/build/protos/protos.json +5548 -1224
  37. package/build/src/index.d.ts +6 -1
  38. package/build/src/index.js +7 -1
  39. package/build/src/v1/completion_service_client.d.ts +156 -6
  40. package/build/src/v1/completion_service_client.js +188 -4
  41. package/build/src/v1/conversational_search_service_client.d.ts +947 -0
  42. package/build/src/v1/conversational_search_service_client.js +1205 -0
  43. package/build/src/v1/conversational_search_service_client_config.json +68 -0
  44. package/build/src/v1/document_service_client.d.ts +165 -18
  45. package/build/src/v1/document_service_client.js +215 -11
  46. package/build/src/v1/index.d.ts +1 -0
  47. package/build/src/v1/index.js +3 -1
  48. package/build/src/v1/schema_service_client.d.ts +148 -4
  49. package/build/src/v1/schema_service_client.js +207 -5
  50. package/build/src/v1/search_service_client.d.ts +238 -28
  51. package/build/src/v1/search_service_client.js +248 -20
  52. package/build/src/v1/user_event_service_client.d.ts +153 -9
  53. package/build/src/v1/user_event_service_client.js +207 -5
  54. package/build/src/v1alpha/completion_service_client.d.ts +603 -0
  55. package/build/src/v1alpha/completion_service_client.js +843 -0
  56. package/build/src/v1alpha/completion_service_client_config.json +43 -0
  57. package/build/src/v1alpha/conversational_search_service_client.d.ts +998 -0
  58. package/build/src/v1alpha/conversational_search_service_client.js +1275 -0
  59. package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
  60. package/build/src/v1alpha/document_service_client.d.ts +1140 -0
  61. package/build/src/v1alpha/document_service_client.js +1393 -0
  62. package/build/src/v1alpha/document_service_client_config.json +82 -0
  63. package/build/src/v1alpha/index.d.ts +8 -0
  64. package/build/src/v1alpha/index.js +37 -0
  65. package/build/src/v1alpha/recommendation_service_client.d.ts +735 -0
  66. package/build/src/v1alpha/recommendation_service_client.js +938 -0
  67. package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
  68. package/build/src/v1alpha/schema_service_client.d.ts +935 -0
  69. package/build/src/v1alpha/schema_service_client.js +1327 -0
  70. package/build/src/v1alpha/schema_service_client_config.json +63 -0
  71. package/build/src/v1alpha/search_service_client.d.ts +1208 -0
  72. package/build/src/v1alpha/search_service_client.js +1432 -0
  73. package/build/src/v1alpha/search_service_client_config.json +43 -0
  74. package/build/src/v1alpha/site_search_engine_service_client.d.ts +704 -0
  75. package/build/src/v1alpha/site_search_engine_service_client.js +1087 -0
  76. package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
  77. package/build/src/v1alpha/user_event_service_client.d.ts +853 -0
  78. package/build/src/v1alpha/user_event_service_client.js +1174 -0
  79. package/build/src/v1alpha/user_event_service_client_config.json +67 -0
  80. package/build/src/v1beta/completion_service_client.d.ts +55 -4
  81. package/build/src/v1beta/completion_service_client.js +60 -4
  82. package/build/src/v1beta/conversational_search_service_client.d.ts +75 -4
  83. package/build/src/v1beta/conversational_search_service_client.js +60 -4
  84. package/build/src/v1beta/document_service_client.d.ts +55 -4
  85. package/build/src/v1beta/document_service_client.js +61 -5
  86. package/build/src/v1beta/recommendation_service_client.d.ts +55 -4
  87. package/build/src/v1beta/recommendation_service_client.js +60 -4
  88. package/build/src/v1beta/schema_service_client.d.ts +55 -4
  89. package/build/src/v1beta/schema_service_client.js +61 -5
  90. package/build/src/v1beta/search_service_client.d.ts +142 -4
  91. package/build/src/v1beta/search_service_client.js +118 -4
  92. package/build/src/v1beta/user_event_service_client.d.ts +55 -4
  93. package/build/src/v1beta/user_event_service_client.js +61 -5
  94. package/package.json +5 -5
@@ -0,0 +1,938 @@
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.RecommendationServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1alpha/recommendation_service_client_config.json`.
25
+ * This file defines retry strategy and timeouts for all API methods in this library.
26
+ */
27
+ const gapicConfig = require("./recommendation_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Service for making recommendations.
31
+ * @class
32
+ * @memberof v1alpha
33
+ */
34
+ class RecommendationServiceClient {
35
+ /**
36
+ * Construct an instance of RecommendationServiceClient.
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 RecommendationServiceClient({fallback: true}, gax);
72
+ * ```
73
+ */
74
+ constructor(opts, gaxInstance) {
75
+ var _a, _b;
76
+ this._terminated = false;
77
+ this.descriptors = {
78
+ page: {},
79
+ stream: {},
80
+ longrunning: {},
81
+ batching: {},
82
+ };
83
+ // Ensure that options include all the required fields.
84
+ const staticMembers = this
85
+ .constructor;
86
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || staticMembers.servicePath;
87
+ this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
88
+ const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
89
+ const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};
90
+ const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
91
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
92
+ // Request numeric enum values if REST transport is used.
93
+ opts.numericEnums = true;
94
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
95
+ if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
96
+ opts['scopes'] = staticMembers.scopes;
97
+ }
98
+ // Load google-gax module synchronously if needed
99
+ if (!gaxInstance) {
100
+ gaxInstance = require('google-gax');
101
+ }
102
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
103
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
104
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
105
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
106
+ // Save options to use in initialize() method.
107
+ this._opts = opts;
108
+ // Save the auth object to the client, for use by other methods.
109
+ this.auth = this._gaxGrpc.auth;
110
+ // Set useJWTAccessWithScope on the auth object.
111
+ this.auth.useJWTAccessWithScope = true;
112
+ // Set defaultServicePath on the auth object.
113
+ this.auth.defaultServicePath = staticMembers.servicePath;
114
+ // Set the default scopes in auth client if needed.
115
+ if (servicePath === staticMembers.servicePath) {
116
+ this.auth.defaultScopes = staticMembers.scopes;
117
+ }
118
+ this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
119
+ // Determine the client header string.
120
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
121
+ if (typeof process !== 'undefined' && 'versions' in process) {
122
+ clientHeader.push(`gl-node/${process.versions.node}`);
123
+ }
124
+ else {
125
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
126
+ }
127
+ if (!opts.fallback) {
128
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
129
+ }
130
+ else {
131
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
132
+ }
133
+ if (opts.libName && opts.libVersion) {
134
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
135
+ }
136
+ // Load the applicable protos.
137
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
138
+ // This API contains "path templates"; forward-slash-separated
139
+ // identifiers to uniquely identify resources within the API.
140
+ // Create useful helper objects for these.
141
+ this.pathTemplates = {
142
+ projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
143
+ projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
144
+ projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
145
+ projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
146
+ projectLocationCollectionEngineServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}'),
147
+ projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
148
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
149
+ projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
150
+ projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
151
+ };
152
+ // Put together the default options sent with requests.
153
+ this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.RecommendationService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
154
+ // Set up a dictionary of "inner API calls"; the core implementation
155
+ // of calling the API is handled in `google-gax`, with this code
156
+ // merely providing the destination and request information.
157
+ this.innerApiCalls = {};
158
+ // Add a warn function to the client constructor so it can be easily tested.
159
+ this.warn = this._gaxModule.warn;
160
+ }
161
+ /**
162
+ * Initialize the client.
163
+ * Performs asynchronous operations (such as authentication) and prepares the client.
164
+ * This function will be called automatically when any class method is called for the
165
+ * first time, but if you need to initialize it before calling an actual method,
166
+ * feel free to call initialize() directly.
167
+ *
168
+ * You can await on this method if you want to make sure the client is initialized.
169
+ *
170
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
171
+ */
172
+ initialize() {
173
+ // If the client stub promise is already initialized, return immediately.
174
+ if (this.recommendationServiceStub) {
175
+ return this.recommendationServiceStub;
176
+ }
177
+ // Put together the "service stub" for
178
+ // google.cloud.discoveryengine.v1alpha.RecommendationService.
179
+ this.recommendationServiceStub = this._gaxGrpc.createStub(this._opts.fallback
180
+ ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.RecommendationService')
181
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
182
+ this._protos.google.cloud.discoveryengine.v1alpha
183
+ .RecommendationService, this._opts, this._providedCustomServicePath);
184
+ // Iterate over each of the methods that the service provides
185
+ // and create an API call method for each.
186
+ const recommendationServiceStubMethods = ['recommend'];
187
+ for (const methodName of recommendationServiceStubMethods) {
188
+ const callPromise = this.recommendationServiceStub.then(stub => (...args) => {
189
+ if (this._terminated) {
190
+ return Promise.reject('The client has already been closed.');
191
+ }
192
+ const func = stub[methodName];
193
+ return func.apply(stub, args);
194
+ }, (err) => () => {
195
+ throw err;
196
+ });
197
+ const descriptor = undefined;
198
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
199
+ this.innerApiCalls[methodName] = apiCall;
200
+ }
201
+ return this.recommendationServiceStub;
202
+ }
203
+ /**
204
+ * The DNS address for this API service.
205
+ * @returns {string} The DNS address for this service.
206
+ */
207
+ static get servicePath() {
208
+ return 'discoveryengine.googleapis.com';
209
+ }
210
+ /**
211
+ * The DNS address for this API service - same as servicePath(),
212
+ * exists for compatibility reasons.
213
+ * @returns {string} The DNS address for this service.
214
+ */
215
+ static get apiEndpoint() {
216
+ return 'discoveryengine.googleapis.com';
217
+ }
218
+ /**
219
+ * The port for this API service.
220
+ * @returns {number} The default port for this service.
221
+ */
222
+ static get port() {
223
+ return 443;
224
+ }
225
+ /**
226
+ * The scopes needed to make gRPC calls for every method defined
227
+ * in this service.
228
+ * @returns {string[]} List of default scopes.
229
+ */
230
+ static get scopes() {
231
+ return ['https://www.googleapis.com/auth/cloud-platform'];
232
+ }
233
+ /**
234
+ * Return the project ID used by this class.
235
+ * @returns {Promise} A promise that resolves to string containing the project ID.
236
+ */
237
+ getProjectId(callback) {
238
+ if (callback) {
239
+ this.auth.getProjectId(callback);
240
+ return;
241
+ }
242
+ return this.auth.getProjectId();
243
+ }
244
+ recommend(request, optionsOrCallback, callback) {
245
+ var _a;
246
+ request = request || {};
247
+ let options;
248
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
249
+ callback = optionsOrCallback;
250
+ options = {};
251
+ }
252
+ else {
253
+ options = optionsOrCallback;
254
+ }
255
+ options = options || {};
256
+ options.otherArgs = options.otherArgs || {};
257
+ options.otherArgs.headers = options.otherArgs.headers || {};
258
+ options.otherArgs.headers['x-goog-request-params'] =
259
+ this._gaxModule.routingHeader.fromParams({
260
+ serving_config: (_a = request.servingConfig) !== null && _a !== void 0 ? _a : '',
261
+ });
262
+ this.initialize();
263
+ return this.innerApiCalls.recommend(request, options, callback);
264
+ }
265
+ /**
266
+ * Gets information about a location.
267
+ *
268
+ * @param {Object} request
269
+ * The request object that will be sent.
270
+ * @param {string} request.name
271
+ * Resource name for the location.
272
+ * @param {object} [options]
273
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
274
+ * @returns {Promise} - The promise which resolves to an array.
275
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
276
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
277
+ * for more details and examples.
278
+ * @example
279
+ * ```
280
+ * const [response] = await client.getLocation(request);
281
+ * ```
282
+ */
283
+ getLocation(request, options, callback) {
284
+ return this.locationsClient.getLocation(request, options, callback);
285
+ }
286
+ /**
287
+ * Lists information about the supported locations for this service. Returns an iterable object.
288
+ *
289
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
290
+ * @param {Object} request
291
+ * The request object that will be sent.
292
+ * @param {string} request.name
293
+ * The resource that owns the locations collection, if applicable.
294
+ * @param {string} request.filter
295
+ * The standard list filter.
296
+ * @param {number} request.pageSize
297
+ * The standard list page size.
298
+ * @param {string} request.pageToken
299
+ * The standard list page token.
300
+ * @param {object} [options]
301
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
302
+ * @returns {Object}
303
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
304
+ * When you iterate the returned iterable, each element will be an object representing
305
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
306
+ * so you can stop the iteration when you don't need more results.
307
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
308
+ * for more details and examples.
309
+ * @example
310
+ * ```
311
+ * const iterable = client.listLocationsAsync(request);
312
+ * for await (const response of iterable) {
313
+ * // process response
314
+ * }
315
+ * ```
316
+ */
317
+ listLocationsAsync(request, options) {
318
+ return this.locationsClient.listLocationsAsync(request, options);
319
+ }
320
+ // --------------------
321
+ // -- Path templates --
322
+ // --------------------
323
+ /**
324
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
325
+ *
326
+ * @param {string} project
327
+ * @param {string} location
328
+ * @param {string} collection
329
+ * @param {string} data_store
330
+ * @param {string} branch
331
+ * @param {string} document
332
+ * @returns {string} Resource name string.
333
+ */
334
+ projectLocationCollectionDataStoreBranchDocumentPath(project, location, collection, dataStore, branch, document) {
335
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render({
336
+ project: project,
337
+ location: location,
338
+ collection: collection,
339
+ data_store: dataStore,
340
+ branch: branch,
341
+ document: document,
342
+ });
343
+ }
344
+ /**
345
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource.
346
+ *
347
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
348
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
349
+ * @returns {string} A string representing the project.
350
+ */
351
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
352
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).project;
353
+ }
354
+ /**
355
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource.
356
+ *
357
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
358
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
359
+ * @returns {string} A string representing the location.
360
+ */
361
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
362
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).location;
363
+ }
364
+ /**
365
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource.
366
+ *
367
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
368
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
369
+ * @returns {string} A string representing the collection.
370
+ */
371
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
372
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).collection;
373
+ }
374
+ /**
375
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource.
376
+ *
377
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
378
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
379
+ * @returns {string} A string representing the data_store.
380
+ */
381
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
382
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).data_store;
383
+ }
384
+ /**
385
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource.
386
+ *
387
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
388
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
389
+ * @returns {string} A string representing the branch.
390
+ */
391
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
392
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).branch;
393
+ }
394
+ /**
395
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource.
396
+ *
397
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
398
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
399
+ * @returns {string} A string representing the document.
400
+ */
401
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
402
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
403
+ }
404
+ /**
405
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
406
+ *
407
+ * @param {string} project
408
+ * @param {string} location
409
+ * @param {string} collection
410
+ * @param {string} data_store
411
+ * @param {string} conversation
412
+ * @returns {string} Resource name string.
413
+ */
414
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
415
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
416
+ project: project,
417
+ location: location,
418
+ collection: collection,
419
+ data_store: dataStore,
420
+ conversation: conversation,
421
+ });
422
+ }
423
+ /**
424
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
425
+ *
426
+ * @param {string} projectLocationCollectionDataStoreConversationName
427
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
428
+ * @returns {string} A string representing the project.
429
+ */
430
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
431
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
432
+ }
433
+ /**
434
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
435
+ *
436
+ * @param {string} projectLocationCollectionDataStoreConversationName
437
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
438
+ * @returns {string} A string representing the location.
439
+ */
440
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
441
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
442
+ }
443
+ /**
444
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
445
+ *
446
+ * @param {string} projectLocationCollectionDataStoreConversationName
447
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
448
+ * @returns {string} A string representing the collection.
449
+ */
450
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
451
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
452
+ }
453
+ /**
454
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
455
+ *
456
+ * @param {string} projectLocationCollectionDataStoreConversationName
457
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
458
+ * @returns {string} A string representing the data_store.
459
+ */
460
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
461
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
462
+ }
463
+ /**
464
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
465
+ *
466
+ * @param {string} projectLocationCollectionDataStoreConversationName
467
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
468
+ * @returns {string} A string representing the conversation.
469
+ */
470
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
471
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
472
+ }
473
+ /**
474
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
475
+ *
476
+ * @param {string} project
477
+ * @param {string} location
478
+ * @param {string} collection
479
+ * @param {string} data_store
480
+ * @param {string} schema
481
+ * @returns {string} Resource name string.
482
+ */
483
+ projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
484
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
485
+ project: project,
486
+ location: location,
487
+ collection: collection,
488
+ data_store: dataStore,
489
+ schema: schema,
490
+ });
491
+ }
492
+ /**
493
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
494
+ *
495
+ * @param {string} projectLocationCollectionDataStoreSchemaName
496
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
497
+ * @returns {string} A string representing the project.
498
+ */
499
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
500
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
501
+ }
502
+ /**
503
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
504
+ *
505
+ * @param {string} projectLocationCollectionDataStoreSchemaName
506
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
507
+ * @returns {string} A string representing the location.
508
+ */
509
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
510
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
511
+ }
512
+ /**
513
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
514
+ *
515
+ * @param {string} projectLocationCollectionDataStoreSchemaName
516
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
517
+ * @returns {string} A string representing the collection.
518
+ */
519
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
520
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
521
+ }
522
+ /**
523
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
524
+ *
525
+ * @param {string} projectLocationCollectionDataStoreSchemaName
526
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
527
+ * @returns {string} A string representing the data_store.
528
+ */
529
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
530
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
531
+ }
532
+ /**
533
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
534
+ *
535
+ * @param {string} projectLocationCollectionDataStoreSchemaName
536
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
537
+ * @returns {string} A string representing the schema.
538
+ */
539
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
540
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
541
+ }
542
+ /**
543
+ * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.
544
+ *
545
+ * @param {string} project
546
+ * @param {string} location
547
+ * @param {string} collection
548
+ * @param {string} data_store
549
+ * @param {string} serving_config
550
+ * @returns {string} Resource name string.
551
+ */
552
+ projectLocationCollectionDataStoreServingConfigPath(project, location, collection, dataStore, servingConfig) {
553
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render({
554
+ project: project,
555
+ location: location,
556
+ collection: collection,
557
+ data_store: dataStore,
558
+ serving_config: servingConfig,
559
+ });
560
+ }
561
+ /**
562
+ * Parse the project from ProjectLocationCollectionDataStoreServingConfig resource.
563
+ *
564
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
565
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
566
+ * @returns {string} A string representing the project.
567
+ */
568
+ matchProjectFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
569
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).project;
570
+ }
571
+ /**
572
+ * Parse the location from ProjectLocationCollectionDataStoreServingConfig resource.
573
+ *
574
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
575
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
576
+ * @returns {string} A string representing the location.
577
+ */
578
+ matchLocationFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
579
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).location;
580
+ }
581
+ /**
582
+ * Parse the collection from ProjectLocationCollectionDataStoreServingConfig resource.
583
+ *
584
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
585
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
586
+ * @returns {string} A string representing the collection.
587
+ */
588
+ matchCollectionFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
589
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).collection;
590
+ }
591
+ /**
592
+ * Parse the data_store from ProjectLocationCollectionDataStoreServingConfig resource.
593
+ *
594
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
595
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
596
+ * @returns {string} A string representing the data_store.
597
+ */
598
+ matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
599
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).data_store;
600
+ }
601
+ /**
602
+ * Parse the serving_config from ProjectLocationCollectionDataStoreServingConfig resource.
603
+ *
604
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
605
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
606
+ * @returns {string} A string representing the serving_config.
607
+ */
608
+ matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
609
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).serving_config;
610
+ }
611
+ /**
612
+ * Return a fully-qualified projectLocationCollectionEngineServingConfig resource name string.
613
+ *
614
+ * @param {string} project
615
+ * @param {string} location
616
+ * @param {string} collection
617
+ * @param {string} engine
618
+ * @param {string} serving_config
619
+ * @returns {string} Resource name string.
620
+ */
621
+ projectLocationCollectionEngineServingConfigPath(project, location, collection, engine, servingConfig) {
622
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render({
623
+ project: project,
624
+ location: location,
625
+ collection: collection,
626
+ engine: engine,
627
+ serving_config: servingConfig,
628
+ });
629
+ }
630
+ /**
631
+ * Parse the project from ProjectLocationCollectionEngineServingConfig resource.
632
+ *
633
+ * @param {string} projectLocationCollectionEngineServingConfigName
634
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
635
+ * @returns {string} A string representing the project.
636
+ */
637
+ matchProjectFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
638
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).project;
639
+ }
640
+ /**
641
+ * Parse the location from ProjectLocationCollectionEngineServingConfig resource.
642
+ *
643
+ * @param {string} projectLocationCollectionEngineServingConfigName
644
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
645
+ * @returns {string} A string representing the location.
646
+ */
647
+ matchLocationFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
648
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).location;
649
+ }
650
+ /**
651
+ * Parse the collection from ProjectLocationCollectionEngineServingConfig resource.
652
+ *
653
+ * @param {string} projectLocationCollectionEngineServingConfigName
654
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
655
+ * @returns {string} A string representing the collection.
656
+ */
657
+ matchCollectionFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
658
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).collection;
659
+ }
660
+ /**
661
+ * Parse the engine from ProjectLocationCollectionEngineServingConfig resource.
662
+ *
663
+ * @param {string} projectLocationCollectionEngineServingConfigName
664
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
665
+ * @returns {string} A string representing the engine.
666
+ */
667
+ matchEngineFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
668
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).engine;
669
+ }
670
+ /**
671
+ * Parse the serving_config from ProjectLocationCollectionEngineServingConfig resource.
672
+ *
673
+ * @param {string} projectLocationCollectionEngineServingConfigName
674
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
675
+ * @returns {string} A string representing the serving_config.
676
+ */
677
+ matchServingConfigFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
678
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).serving_config;
679
+ }
680
+ /**
681
+ * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
682
+ *
683
+ * @param {string} project
684
+ * @param {string} location
685
+ * @param {string} data_store
686
+ * @param {string} branch
687
+ * @param {string} document
688
+ * @returns {string} Resource name string.
689
+ */
690
+ projectLocationDataStoreBranchDocumentPath(project, location, dataStore, branch, document) {
691
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render({
692
+ project: project,
693
+ location: location,
694
+ data_store: dataStore,
695
+ branch: branch,
696
+ document: document,
697
+ });
698
+ }
699
+ /**
700
+ * Parse the project from ProjectLocationDataStoreBranchDocument resource.
701
+ *
702
+ * @param {string} projectLocationDataStoreBranchDocumentName
703
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
704
+ * @returns {string} A string representing the project.
705
+ */
706
+ matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
707
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).project;
708
+ }
709
+ /**
710
+ * Parse the location from ProjectLocationDataStoreBranchDocument resource.
711
+ *
712
+ * @param {string} projectLocationDataStoreBranchDocumentName
713
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
714
+ * @returns {string} A string representing the location.
715
+ */
716
+ matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
717
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).location;
718
+ }
719
+ /**
720
+ * Parse the data_store from ProjectLocationDataStoreBranchDocument resource.
721
+ *
722
+ * @param {string} projectLocationDataStoreBranchDocumentName
723
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
724
+ * @returns {string} A string representing the data_store.
725
+ */
726
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
727
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).data_store;
728
+ }
729
+ /**
730
+ * Parse the branch from ProjectLocationDataStoreBranchDocument resource.
731
+ *
732
+ * @param {string} projectLocationDataStoreBranchDocumentName
733
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
734
+ * @returns {string} A string representing the branch.
735
+ */
736
+ matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
737
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).branch;
738
+ }
739
+ /**
740
+ * Parse the document from ProjectLocationDataStoreBranchDocument resource.
741
+ *
742
+ * @param {string} projectLocationDataStoreBranchDocumentName
743
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
744
+ * @returns {string} A string representing the document.
745
+ */
746
+ matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
747
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
748
+ }
749
+ /**
750
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
751
+ *
752
+ * @param {string} project
753
+ * @param {string} location
754
+ * @param {string} data_store
755
+ * @param {string} conversation
756
+ * @returns {string} Resource name string.
757
+ */
758
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
759
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
760
+ project: project,
761
+ location: location,
762
+ data_store: dataStore,
763
+ conversation: conversation,
764
+ });
765
+ }
766
+ /**
767
+ * Parse the project from ProjectLocationDataStoreConversation resource.
768
+ *
769
+ * @param {string} projectLocationDataStoreConversationName
770
+ * A fully-qualified path representing project_location_data_store_conversation resource.
771
+ * @returns {string} A string representing the project.
772
+ */
773
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
774
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
775
+ }
776
+ /**
777
+ * Parse the location from ProjectLocationDataStoreConversation resource.
778
+ *
779
+ * @param {string} projectLocationDataStoreConversationName
780
+ * A fully-qualified path representing project_location_data_store_conversation resource.
781
+ * @returns {string} A string representing the location.
782
+ */
783
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
784
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
785
+ }
786
+ /**
787
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
788
+ *
789
+ * @param {string} projectLocationDataStoreConversationName
790
+ * A fully-qualified path representing project_location_data_store_conversation resource.
791
+ * @returns {string} A string representing the data_store.
792
+ */
793
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
794
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
795
+ }
796
+ /**
797
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
798
+ *
799
+ * @param {string} projectLocationDataStoreConversationName
800
+ * A fully-qualified path representing project_location_data_store_conversation resource.
801
+ * @returns {string} A string representing the conversation.
802
+ */
803
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
804
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
805
+ }
806
+ /**
807
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
808
+ *
809
+ * @param {string} project
810
+ * @param {string} location
811
+ * @param {string} data_store
812
+ * @param {string} schema
813
+ * @returns {string} Resource name string.
814
+ */
815
+ projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
816
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
817
+ project: project,
818
+ location: location,
819
+ data_store: dataStore,
820
+ schema: schema,
821
+ });
822
+ }
823
+ /**
824
+ * Parse the project from ProjectLocationDataStoreSchema resource.
825
+ *
826
+ * @param {string} projectLocationDataStoreSchemaName
827
+ * A fully-qualified path representing project_location_data_store_schema resource.
828
+ * @returns {string} A string representing the project.
829
+ */
830
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
831
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
832
+ }
833
+ /**
834
+ * Parse the location from ProjectLocationDataStoreSchema resource.
835
+ *
836
+ * @param {string} projectLocationDataStoreSchemaName
837
+ * A fully-qualified path representing project_location_data_store_schema resource.
838
+ * @returns {string} A string representing the location.
839
+ */
840
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
841
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
842
+ }
843
+ /**
844
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
845
+ *
846
+ * @param {string} projectLocationDataStoreSchemaName
847
+ * A fully-qualified path representing project_location_data_store_schema resource.
848
+ * @returns {string} A string representing the data_store.
849
+ */
850
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
851
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
852
+ }
853
+ /**
854
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
855
+ *
856
+ * @param {string} projectLocationDataStoreSchemaName
857
+ * A fully-qualified path representing project_location_data_store_schema resource.
858
+ * @returns {string} A string representing the schema.
859
+ */
860
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
861
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
862
+ }
863
+ /**
864
+ * Return a fully-qualified projectLocationDataStoreServingConfig resource name string.
865
+ *
866
+ * @param {string} project
867
+ * @param {string} location
868
+ * @param {string} data_store
869
+ * @param {string} serving_config
870
+ * @returns {string} Resource name string.
871
+ */
872
+ projectLocationDataStoreServingConfigPath(project, location, dataStore, servingConfig) {
873
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render({
874
+ project: project,
875
+ location: location,
876
+ data_store: dataStore,
877
+ serving_config: servingConfig,
878
+ });
879
+ }
880
+ /**
881
+ * Parse the project from ProjectLocationDataStoreServingConfig resource.
882
+ *
883
+ * @param {string} projectLocationDataStoreServingConfigName
884
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
885
+ * @returns {string} A string representing the project.
886
+ */
887
+ matchProjectFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
888
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).project;
889
+ }
890
+ /**
891
+ * Parse the location from ProjectLocationDataStoreServingConfig resource.
892
+ *
893
+ * @param {string} projectLocationDataStoreServingConfigName
894
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
895
+ * @returns {string} A string representing the location.
896
+ */
897
+ matchLocationFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
898
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).location;
899
+ }
900
+ /**
901
+ * Parse the data_store from ProjectLocationDataStoreServingConfig resource.
902
+ *
903
+ * @param {string} projectLocationDataStoreServingConfigName
904
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
905
+ * @returns {string} A string representing the data_store.
906
+ */
907
+ matchDataStoreFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
908
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).data_store;
909
+ }
910
+ /**
911
+ * Parse the serving_config from ProjectLocationDataStoreServingConfig resource.
912
+ *
913
+ * @param {string} projectLocationDataStoreServingConfigName
914
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
915
+ * @returns {string} A string representing the serving_config.
916
+ */
917
+ matchServingConfigFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
918
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).serving_config;
919
+ }
920
+ /**
921
+ * Terminate the gRPC channel and close the client.
922
+ *
923
+ * The client will no longer be usable and all future behavior is undefined.
924
+ * @returns {Promise} A promise that resolves when the client is closed.
925
+ */
926
+ close() {
927
+ if (this.recommendationServiceStub && !this._terminated) {
928
+ return this.recommendationServiceStub.then(stub => {
929
+ this._terminated = true;
930
+ stub.close();
931
+ this.locationsClient.close();
932
+ });
933
+ }
934
+ return Promise.resolve();
935
+ }
936
+ }
937
+ exports.RecommendationServiceClient = RecommendationServiceClient;
938
+ //# sourceMappingURL=recommendation_service_client.js.map