@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,1275 @@
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.ConversationalSearchServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1alpha/conversational_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("./conversational_search_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Service for conversational search.
31
+ * @class
32
+ * @memberof v1alpha
33
+ */
34
+ class ConversationalSearchServiceClient {
35
+ /**
36
+ * Construct an instance of ConversationalSearchServiceClient.
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 ConversationalSearchServiceClient({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
+ projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
143
+ projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
144
+ projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
145
+ projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
146
+ projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
147
+ projectLocationCollectionEngineServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}'),
148
+ projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
149
+ projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
150
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
151
+ projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
152
+ projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
153
+ };
154
+ // Some of the methods on this service return "paged" results,
155
+ // (e.g. 50 results at a time, with tokens to get subsequent
156
+ // pages). Denote the keys used for pagination and results.
157
+ this.descriptors.page = {
158
+ listConversations: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'conversations'),
159
+ };
160
+ // Put together the default options sent with requests.
161
+ this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.ConversationalSearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
162
+ // Set up a dictionary of "inner API calls"; the core implementation
163
+ // of calling the API is handled in `google-gax`, with this code
164
+ // merely providing the destination and request information.
165
+ this.innerApiCalls = {};
166
+ // Add a warn function to the client constructor so it can be easily tested.
167
+ this.warn = this._gaxModule.warn;
168
+ }
169
+ /**
170
+ * Initialize the client.
171
+ * Performs asynchronous operations (such as authentication) and prepares the client.
172
+ * This function will be called automatically when any class method is called for the
173
+ * first time, but if you need to initialize it before calling an actual method,
174
+ * feel free to call initialize() directly.
175
+ *
176
+ * You can await on this method if you want to make sure the client is initialized.
177
+ *
178
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
179
+ */
180
+ initialize() {
181
+ // If the client stub promise is already initialized, return immediately.
182
+ if (this.conversationalSearchServiceStub) {
183
+ return this.conversationalSearchServiceStub;
184
+ }
185
+ // Put together the "service stub" for
186
+ // google.cloud.discoveryengine.v1alpha.ConversationalSearchService.
187
+ this.conversationalSearchServiceStub = this._gaxGrpc.createStub(this._opts.fallback
188
+ ? this._protos.lookupService('google.cloud.discoveryengine.v1alpha.ConversationalSearchService')
189
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
190
+ this._protos.google.cloud.discoveryengine.v1alpha
191
+ .ConversationalSearchService, this._opts, this._providedCustomServicePath);
192
+ // Iterate over each of the methods that the service provides
193
+ // and create an API call method for each.
194
+ const conversationalSearchServiceStubMethods = [
195
+ 'converseConversation',
196
+ 'createConversation',
197
+ 'deleteConversation',
198
+ 'updateConversation',
199
+ 'getConversation',
200
+ 'listConversations',
201
+ ];
202
+ for (const methodName of conversationalSearchServiceStubMethods) {
203
+ const callPromise = this.conversationalSearchServiceStub.then(stub => (...args) => {
204
+ if (this._terminated) {
205
+ return Promise.reject('The client has already been closed.');
206
+ }
207
+ const func = stub[methodName];
208
+ return func.apply(stub, args);
209
+ }, (err) => () => {
210
+ throw err;
211
+ });
212
+ const descriptor = this.descriptors.page[methodName] || undefined;
213
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
214
+ this.innerApiCalls[methodName] = apiCall;
215
+ }
216
+ return this.conversationalSearchServiceStub;
217
+ }
218
+ /**
219
+ * The DNS address for this API service.
220
+ * @returns {string} The DNS address for this service.
221
+ */
222
+ static get servicePath() {
223
+ return 'discoveryengine.googleapis.com';
224
+ }
225
+ /**
226
+ * The DNS address for this API service - same as servicePath(),
227
+ * exists for compatibility reasons.
228
+ * @returns {string} The DNS address for this service.
229
+ */
230
+ static get apiEndpoint() {
231
+ return 'discoveryengine.googleapis.com';
232
+ }
233
+ /**
234
+ * The port for this API service.
235
+ * @returns {number} The default port for this service.
236
+ */
237
+ static get port() {
238
+ return 443;
239
+ }
240
+ /**
241
+ * The scopes needed to make gRPC calls for every method defined
242
+ * in this service.
243
+ * @returns {string[]} List of default scopes.
244
+ */
245
+ static get scopes() {
246
+ return ['https://www.googleapis.com/auth/cloud-platform'];
247
+ }
248
+ /**
249
+ * Return the project ID used by this class.
250
+ * @returns {Promise} A promise that resolves to string containing the project ID.
251
+ */
252
+ getProjectId(callback) {
253
+ if (callback) {
254
+ this.auth.getProjectId(callback);
255
+ return;
256
+ }
257
+ return this.auth.getProjectId();
258
+ }
259
+ converseConversation(request, optionsOrCallback, callback) {
260
+ var _a;
261
+ request = request || {};
262
+ let options;
263
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
264
+ callback = optionsOrCallback;
265
+ options = {};
266
+ }
267
+ else {
268
+ options = optionsOrCallback;
269
+ }
270
+ options = options || {};
271
+ options.otherArgs = options.otherArgs || {};
272
+ options.otherArgs.headers = options.otherArgs.headers || {};
273
+ options.otherArgs.headers['x-goog-request-params'] =
274
+ this._gaxModule.routingHeader.fromParams({
275
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
276
+ });
277
+ this.initialize();
278
+ return this.innerApiCalls.converseConversation(request, options, callback);
279
+ }
280
+ createConversation(request, optionsOrCallback, callback) {
281
+ var _a;
282
+ request = request || {};
283
+ let options;
284
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
285
+ callback = optionsOrCallback;
286
+ options = {};
287
+ }
288
+ else {
289
+ options = optionsOrCallback;
290
+ }
291
+ options = options || {};
292
+ options.otherArgs = options.otherArgs || {};
293
+ options.otherArgs.headers = options.otherArgs.headers || {};
294
+ options.otherArgs.headers['x-goog-request-params'] =
295
+ this._gaxModule.routingHeader.fromParams({
296
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
297
+ });
298
+ this.initialize();
299
+ return this.innerApiCalls.createConversation(request, options, callback);
300
+ }
301
+ deleteConversation(request, optionsOrCallback, callback) {
302
+ var _a;
303
+ request = request || {};
304
+ let options;
305
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
306
+ callback = optionsOrCallback;
307
+ options = {};
308
+ }
309
+ else {
310
+ options = optionsOrCallback;
311
+ }
312
+ options = options || {};
313
+ options.otherArgs = options.otherArgs || {};
314
+ options.otherArgs.headers = options.otherArgs.headers || {};
315
+ options.otherArgs.headers['x-goog-request-params'] =
316
+ this._gaxModule.routingHeader.fromParams({
317
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
318
+ });
319
+ this.initialize();
320
+ return this.innerApiCalls.deleteConversation(request, options, callback);
321
+ }
322
+ updateConversation(request, optionsOrCallback, callback) {
323
+ var _a;
324
+ request = request || {};
325
+ let options;
326
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
327
+ callback = optionsOrCallback;
328
+ options = {};
329
+ }
330
+ else {
331
+ options = optionsOrCallback;
332
+ }
333
+ options = options || {};
334
+ options.otherArgs = options.otherArgs || {};
335
+ options.otherArgs.headers = options.otherArgs.headers || {};
336
+ options.otherArgs.headers['x-goog-request-params'] =
337
+ this._gaxModule.routingHeader.fromParams({
338
+ 'conversation.name': (_a = request.conversation.name) !== null && _a !== void 0 ? _a : '',
339
+ });
340
+ this.initialize();
341
+ return this.innerApiCalls.updateConversation(request, options, callback);
342
+ }
343
+ getConversation(request, optionsOrCallback, callback) {
344
+ var _a;
345
+ request = request || {};
346
+ let options;
347
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
348
+ callback = optionsOrCallback;
349
+ options = {};
350
+ }
351
+ else {
352
+ options = optionsOrCallback;
353
+ }
354
+ options = options || {};
355
+ options.otherArgs = options.otherArgs || {};
356
+ options.otherArgs.headers = options.otherArgs.headers || {};
357
+ options.otherArgs.headers['x-goog-request-params'] =
358
+ this._gaxModule.routingHeader.fromParams({
359
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
360
+ });
361
+ this.initialize();
362
+ return this.innerApiCalls.getConversation(request, options, callback);
363
+ }
364
+ listConversations(request, optionsOrCallback, callback) {
365
+ var _a;
366
+ request = request || {};
367
+ let options;
368
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
369
+ callback = optionsOrCallback;
370
+ options = {};
371
+ }
372
+ else {
373
+ options = optionsOrCallback;
374
+ }
375
+ options = options || {};
376
+ options.otherArgs = options.otherArgs || {};
377
+ options.otherArgs.headers = options.otherArgs.headers || {};
378
+ options.otherArgs.headers['x-goog-request-params'] =
379
+ this._gaxModule.routingHeader.fromParams({
380
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
381
+ });
382
+ this.initialize();
383
+ return this.innerApiCalls.listConversations(request, options, callback);
384
+ }
385
+ /**
386
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
387
+ * @param {Object} request
388
+ * The request object that will be sent.
389
+ * @param {string} request.parent
390
+ * Required. The data store resource name. Format:
391
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
392
+ * @param {number} request.pageSize
393
+ * Maximum number of results to return. If unspecified, defaults
394
+ * to 50. Max allowed value is 1000.
395
+ * @param {string} request.pageToken
396
+ * A page token, received from a previous `ListConversations` call.
397
+ * Provide this to retrieve the subsequent page.
398
+ * @param {string} request.filter
399
+ * A filter to apply on the list results. The supported features are:
400
+ * user_pseudo_id, state.
401
+ *
402
+ * Example:
403
+ * "user_pseudo_id = some_id"
404
+ * @param {string} request.orderBy
405
+ * A comma-separated list of fields to order by, sorted in ascending order.
406
+ * Use "desc" after a field name for descending.
407
+ * Supported fields:
408
+ * * `update_time`
409
+ * * `create_time`
410
+ * * `conversation_name`
411
+ *
412
+ * Example:
413
+ * "update_time desc"
414
+ * "create_time"
415
+ * @param {object} [options]
416
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
417
+ * @returns {Stream}
418
+ * An object stream which emits an object representing {@link protos.google.cloud.discoveryengine.v1alpha.Conversation|Conversation} on 'data' event.
419
+ * The client library will perform auto-pagination by default: it will call the API as many
420
+ * times as needed. Note that it can affect your quota.
421
+ * We recommend using `listConversationsAsync()`
422
+ * method described below for async iteration which you can stop as needed.
423
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
424
+ * for more details and examples.
425
+ */
426
+ listConversationsStream(request, options) {
427
+ var _a;
428
+ request = request || {};
429
+ options = options || {};
430
+ options.otherArgs = options.otherArgs || {};
431
+ options.otherArgs.headers = options.otherArgs.headers || {};
432
+ options.otherArgs.headers['x-goog-request-params'] =
433
+ this._gaxModule.routingHeader.fromParams({
434
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
435
+ });
436
+ const defaultCallSettings = this._defaults['listConversations'];
437
+ const callSettings = defaultCallSettings.merge(options);
438
+ this.initialize();
439
+ return this.descriptors.page.listConversations.createStream(this.innerApiCalls.listConversations, request, callSettings);
440
+ }
441
+ /**
442
+ * Equivalent to `listConversations`, but returns an iterable object.
443
+ *
444
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
445
+ * @param {Object} request
446
+ * The request object that will be sent.
447
+ * @param {string} request.parent
448
+ * Required. The data store resource name. Format:
449
+ * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
450
+ * @param {number} request.pageSize
451
+ * Maximum number of results to return. If unspecified, defaults
452
+ * to 50. Max allowed value is 1000.
453
+ * @param {string} request.pageToken
454
+ * A page token, received from a previous `ListConversations` call.
455
+ * Provide this to retrieve the subsequent page.
456
+ * @param {string} request.filter
457
+ * A filter to apply on the list results. The supported features are:
458
+ * user_pseudo_id, state.
459
+ *
460
+ * Example:
461
+ * "user_pseudo_id = some_id"
462
+ * @param {string} request.orderBy
463
+ * A comma-separated list of fields to order by, sorted in ascending order.
464
+ * Use "desc" after a field name for descending.
465
+ * Supported fields:
466
+ * * `update_time`
467
+ * * `create_time`
468
+ * * `conversation_name`
469
+ *
470
+ * Example:
471
+ * "update_time desc"
472
+ * "create_time"
473
+ * @param {object} [options]
474
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
475
+ * @returns {Object}
476
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
477
+ * When you iterate the returned iterable, each element will be an object representing
478
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Conversation|Conversation}. The API will be called under the hood as needed, once per the page,
479
+ * so you can stop the iteration when you don't need more results.
480
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
481
+ * for more details and examples.
482
+ * @example <caption>include:samples/generated/v1alpha/conversational_search_service.list_conversations.js</caption>
483
+ * region_tag:discoveryengine_v1alpha_generated_ConversationalSearchService_ListConversations_async
484
+ */
485
+ listConversationsAsync(request, options) {
486
+ var _a;
487
+ request = request || {};
488
+ options = options || {};
489
+ options.otherArgs = options.otherArgs || {};
490
+ options.otherArgs.headers = options.otherArgs.headers || {};
491
+ options.otherArgs.headers['x-goog-request-params'] =
492
+ this._gaxModule.routingHeader.fromParams({
493
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
494
+ });
495
+ const defaultCallSettings = this._defaults['listConversations'];
496
+ const callSettings = defaultCallSettings.merge(options);
497
+ this.initialize();
498
+ return this.descriptors.page.listConversations.asyncIterate(this.innerApiCalls['listConversations'], request, callSettings);
499
+ }
500
+ /**
501
+ * Gets information about a location.
502
+ *
503
+ * @param {Object} request
504
+ * The request object that will be sent.
505
+ * @param {string} request.name
506
+ * Resource name for the location.
507
+ * @param {object} [options]
508
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
509
+ * @returns {Promise} - The promise which resolves to an array.
510
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
511
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
512
+ * for more details and examples.
513
+ * @example
514
+ * ```
515
+ * const [response] = await client.getLocation(request);
516
+ * ```
517
+ */
518
+ getLocation(request, options, callback) {
519
+ return this.locationsClient.getLocation(request, options, callback);
520
+ }
521
+ /**
522
+ * Lists information about the supported locations for this service. Returns an iterable object.
523
+ *
524
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
525
+ * @param {Object} request
526
+ * The request object that will be sent.
527
+ * @param {string} request.name
528
+ * The resource that owns the locations collection, if applicable.
529
+ * @param {string} request.filter
530
+ * The standard list filter.
531
+ * @param {number} request.pageSize
532
+ * The standard list page size.
533
+ * @param {string} request.pageToken
534
+ * The standard list page token.
535
+ * @param {object} [options]
536
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
537
+ * @returns {Object}
538
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
539
+ * When you iterate the returned iterable, each element will be an object representing
540
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
541
+ * so you can stop the iteration when you don't need more results.
542
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
543
+ * for more details and examples.
544
+ * @example
545
+ * ```
546
+ * const iterable = client.listLocationsAsync(request);
547
+ * for await (const response of iterable) {
548
+ * // process response
549
+ * }
550
+ * ```
551
+ */
552
+ listLocationsAsync(request, options) {
553
+ return this.locationsClient.listLocationsAsync(request, options);
554
+ }
555
+ // --------------------
556
+ // -- Path templates --
557
+ // --------------------
558
+ /**
559
+ * Return a fully-qualified projectLocationCollectionDataStore resource name string.
560
+ *
561
+ * @param {string} project
562
+ * @param {string} location
563
+ * @param {string} collection
564
+ * @param {string} data_store
565
+ * @returns {string} Resource name string.
566
+ */
567
+ projectLocationCollectionDataStorePath(project, location, collection, dataStore) {
568
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render({
569
+ project: project,
570
+ location: location,
571
+ collection: collection,
572
+ data_store: dataStore,
573
+ });
574
+ }
575
+ /**
576
+ * Parse the project from ProjectLocationCollectionDataStore resource.
577
+ *
578
+ * @param {string} projectLocationCollectionDataStoreName
579
+ * A fully-qualified path representing project_location_collection_data_store resource.
580
+ * @returns {string} A string representing the project.
581
+ */
582
+ matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
583
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).project;
584
+ }
585
+ /**
586
+ * Parse the location from ProjectLocationCollectionDataStore resource.
587
+ *
588
+ * @param {string} projectLocationCollectionDataStoreName
589
+ * A fully-qualified path representing project_location_collection_data_store resource.
590
+ * @returns {string} A string representing the location.
591
+ */
592
+ matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
593
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).location;
594
+ }
595
+ /**
596
+ * Parse the collection from ProjectLocationCollectionDataStore resource.
597
+ *
598
+ * @param {string} projectLocationCollectionDataStoreName
599
+ * A fully-qualified path representing project_location_collection_data_store resource.
600
+ * @returns {string} A string representing the collection.
601
+ */
602
+ matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
603
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).collection;
604
+ }
605
+ /**
606
+ * Parse the data_store from ProjectLocationCollectionDataStore resource.
607
+ *
608
+ * @param {string} projectLocationCollectionDataStoreName
609
+ * A fully-qualified path representing project_location_collection_data_store resource.
610
+ * @returns {string} A string representing the data_store.
611
+ */
612
+ matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
613
+ return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).data_store;
614
+ }
615
+ /**
616
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
617
+ *
618
+ * @param {string} project
619
+ * @param {string} location
620
+ * @param {string} collection
621
+ * @param {string} data_store
622
+ * @param {string} branch
623
+ * @param {string} document
624
+ * @returns {string} Resource name string.
625
+ */
626
+ projectLocationCollectionDataStoreBranchDocumentPath(project, location, collection, dataStore, branch, document) {
627
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render({
628
+ project: project,
629
+ location: location,
630
+ collection: collection,
631
+ data_store: dataStore,
632
+ branch: branch,
633
+ document: document,
634
+ });
635
+ }
636
+ /**
637
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource.
638
+ *
639
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
640
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
641
+ * @returns {string} A string representing the project.
642
+ */
643
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
644
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).project;
645
+ }
646
+ /**
647
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource.
648
+ *
649
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
650
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
651
+ * @returns {string} A string representing the location.
652
+ */
653
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
654
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).location;
655
+ }
656
+ /**
657
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource.
658
+ *
659
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
660
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
661
+ * @returns {string} A string representing the collection.
662
+ */
663
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
664
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).collection;
665
+ }
666
+ /**
667
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource.
668
+ *
669
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
670
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
671
+ * @returns {string} A string representing the data_store.
672
+ */
673
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
674
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).data_store;
675
+ }
676
+ /**
677
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource.
678
+ *
679
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
680
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
681
+ * @returns {string} A string representing the branch.
682
+ */
683
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
684
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).branch;
685
+ }
686
+ /**
687
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource.
688
+ *
689
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentName
690
+ * A fully-qualified path representing project_location_collection_data_store_branch_document resource.
691
+ * @returns {string} A string representing the document.
692
+ */
693
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
694
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
695
+ }
696
+ /**
697
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
698
+ *
699
+ * @param {string} project
700
+ * @param {string} location
701
+ * @param {string} collection
702
+ * @param {string} data_store
703
+ * @param {string} conversation
704
+ * @returns {string} Resource name string.
705
+ */
706
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
707
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
708
+ project: project,
709
+ location: location,
710
+ collection: collection,
711
+ data_store: dataStore,
712
+ conversation: conversation,
713
+ });
714
+ }
715
+ /**
716
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
717
+ *
718
+ * @param {string} projectLocationCollectionDataStoreConversationName
719
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
720
+ * @returns {string} A string representing the project.
721
+ */
722
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
723
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
724
+ }
725
+ /**
726
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
727
+ *
728
+ * @param {string} projectLocationCollectionDataStoreConversationName
729
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
730
+ * @returns {string} A string representing the location.
731
+ */
732
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
733
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
734
+ }
735
+ /**
736
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
737
+ *
738
+ * @param {string} projectLocationCollectionDataStoreConversationName
739
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
740
+ * @returns {string} A string representing the collection.
741
+ */
742
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
743
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
744
+ }
745
+ /**
746
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
747
+ *
748
+ * @param {string} projectLocationCollectionDataStoreConversationName
749
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
750
+ * @returns {string} A string representing the data_store.
751
+ */
752
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
753
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
754
+ }
755
+ /**
756
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
757
+ *
758
+ * @param {string} projectLocationCollectionDataStoreConversationName
759
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
760
+ * @returns {string} A string representing the conversation.
761
+ */
762
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
763
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
764
+ }
765
+ /**
766
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
767
+ *
768
+ * @param {string} project
769
+ * @param {string} location
770
+ * @param {string} collection
771
+ * @param {string} data_store
772
+ * @param {string} schema
773
+ * @returns {string} Resource name string.
774
+ */
775
+ projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
776
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
777
+ project: project,
778
+ location: location,
779
+ collection: collection,
780
+ data_store: dataStore,
781
+ schema: schema,
782
+ });
783
+ }
784
+ /**
785
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
786
+ *
787
+ * @param {string} projectLocationCollectionDataStoreSchemaName
788
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
789
+ * @returns {string} A string representing the project.
790
+ */
791
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
792
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
793
+ }
794
+ /**
795
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
796
+ *
797
+ * @param {string} projectLocationCollectionDataStoreSchemaName
798
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
799
+ * @returns {string} A string representing the location.
800
+ */
801
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
802
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
803
+ }
804
+ /**
805
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
806
+ *
807
+ * @param {string} projectLocationCollectionDataStoreSchemaName
808
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
809
+ * @returns {string} A string representing the collection.
810
+ */
811
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
812
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
813
+ }
814
+ /**
815
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
816
+ *
817
+ * @param {string} projectLocationCollectionDataStoreSchemaName
818
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
819
+ * @returns {string} A string representing the data_store.
820
+ */
821
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
822
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
823
+ }
824
+ /**
825
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
826
+ *
827
+ * @param {string} projectLocationCollectionDataStoreSchemaName
828
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
829
+ * @returns {string} A string representing the schema.
830
+ */
831
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
832
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
833
+ }
834
+ /**
835
+ * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.
836
+ *
837
+ * @param {string} project
838
+ * @param {string} location
839
+ * @param {string} collection
840
+ * @param {string} data_store
841
+ * @param {string} serving_config
842
+ * @returns {string} Resource name string.
843
+ */
844
+ projectLocationCollectionDataStoreServingConfigPath(project, location, collection, dataStore, servingConfig) {
845
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render({
846
+ project: project,
847
+ location: location,
848
+ collection: collection,
849
+ data_store: dataStore,
850
+ serving_config: servingConfig,
851
+ });
852
+ }
853
+ /**
854
+ * Parse the project from ProjectLocationCollectionDataStoreServingConfig resource.
855
+ *
856
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
857
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
858
+ * @returns {string} A string representing the project.
859
+ */
860
+ matchProjectFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
861
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).project;
862
+ }
863
+ /**
864
+ * Parse the location from ProjectLocationCollectionDataStoreServingConfig resource.
865
+ *
866
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
867
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
868
+ * @returns {string} A string representing the location.
869
+ */
870
+ matchLocationFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
871
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).location;
872
+ }
873
+ /**
874
+ * Parse the collection from ProjectLocationCollectionDataStoreServingConfig resource.
875
+ *
876
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
877
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
878
+ * @returns {string} A string representing the collection.
879
+ */
880
+ matchCollectionFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
881
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).collection;
882
+ }
883
+ /**
884
+ * Parse the data_store from ProjectLocationCollectionDataStoreServingConfig resource.
885
+ *
886
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
887
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
888
+ * @returns {string} A string representing the data_store.
889
+ */
890
+ matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
891
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).data_store;
892
+ }
893
+ /**
894
+ * Parse the serving_config from ProjectLocationCollectionDataStoreServingConfig resource.
895
+ *
896
+ * @param {string} projectLocationCollectionDataStoreServingConfigName
897
+ * A fully-qualified path representing project_location_collection_data_store_serving_config resource.
898
+ * @returns {string} A string representing the serving_config.
899
+ */
900
+ matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName(projectLocationCollectionDataStoreServingConfigName) {
901
+ return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match(projectLocationCollectionDataStoreServingConfigName).serving_config;
902
+ }
903
+ /**
904
+ * Return a fully-qualified projectLocationCollectionEngineServingConfig resource name string.
905
+ *
906
+ * @param {string} project
907
+ * @param {string} location
908
+ * @param {string} collection
909
+ * @param {string} engine
910
+ * @param {string} serving_config
911
+ * @returns {string} Resource name string.
912
+ */
913
+ projectLocationCollectionEngineServingConfigPath(project, location, collection, engine, servingConfig) {
914
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.render({
915
+ project: project,
916
+ location: location,
917
+ collection: collection,
918
+ engine: engine,
919
+ serving_config: servingConfig,
920
+ });
921
+ }
922
+ /**
923
+ * Parse the project from ProjectLocationCollectionEngineServingConfig resource.
924
+ *
925
+ * @param {string} projectLocationCollectionEngineServingConfigName
926
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
927
+ * @returns {string} A string representing the project.
928
+ */
929
+ matchProjectFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
930
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).project;
931
+ }
932
+ /**
933
+ * Parse the location from ProjectLocationCollectionEngineServingConfig resource.
934
+ *
935
+ * @param {string} projectLocationCollectionEngineServingConfigName
936
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
937
+ * @returns {string} A string representing the location.
938
+ */
939
+ matchLocationFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
940
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).location;
941
+ }
942
+ /**
943
+ * Parse the collection from ProjectLocationCollectionEngineServingConfig resource.
944
+ *
945
+ * @param {string} projectLocationCollectionEngineServingConfigName
946
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
947
+ * @returns {string} A string representing the collection.
948
+ */
949
+ matchCollectionFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
950
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).collection;
951
+ }
952
+ /**
953
+ * Parse the engine from ProjectLocationCollectionEngineServingConfig resource.
954
+ *
955
+ * @param {string} projectLocationCollectionEngineServingConfigName
956
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
957
+ * @returns {string} A string representing the engine.
958
+ */
959
+ matchEngineFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
960
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).engine;
961
+ }
962
+ /**
963
+ * Parse the serving_config from ProjectLocationCollectionEngineServingConfig resource.
964
+ *
965
+ * @param {string} projectLocationCollectionEngineServingConfigName
966
+ * A fully-qualified path representing project_location_collection_engine_serving_config resource.
967
+ * @returns {string} A string representing the serving_config.
968
+ */
969
+ matchServingConfigFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
970
+ return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).serving_config;
971
+ }
972
+ /**
973
+ * Return a fully-qualified projectLocationDataStore resource name string.
974
+ *
975
+ * @param {string} project
976
+ * @param {string} location
977
+ * @param {string} data_store
978
+ * @returns {string} Resource name string.
979
+ */
980
+ projectLocationDataStorePath(project, location, dataStore) {
981
+ return this.pathTemplates.projectLocationDataStorePathTemplate.render({
982
+ project: project,
983
+ location: location,
984
+ data_store: dataStore,
985
+ });
986
+ }
987
+ /**
988
+ * Parse the project from ProjectLocationDataStore resource.
989
+ *
990
+ * @param {string} projectLocationDataStoreName
991
+ * A fully-qualified path representing project_location_data_store resource.
992
+ * @returns {string} A string representing the project.
993
+ */
994
+ matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName) {
995
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).project;
996
+ }
997
+ /**
998
+ * Parse the location from ProjectLocationDataStore resource.
999
+ *
1000
+ * @param {string} projectLocationDataStoreName
1001
+ * A fully-qualified path representing project_location_data_store resource.
1002
+ * @returns {string} A string representing the location.
1003
+ */
1004
+ matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1005
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).location;
1006
+ }
1007
+ /**
1008
+ * Parse the data_store from ProjectLocationDataStore resource.
1009
+ *
1010
+ * @param {string} projectLocationDataStoreName
1011
+ * A fully-qualified path representing project_location_data_store resource.
1012
+ * @returns {string} A string representing the data_store.
1013
+ */
1014
+ matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName) {
1015
+ return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).data_store;
1016
+ }
1017
+ /**
1018
+ * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
1019
+ *
1020
+ * @param {string} project
1021
+ * @param {string} location
1022
+ * @param {string} data_store
1023
+ * @param {string} branch
1024
+ * @param {string} document
1025
+ * @returns {string} Resource name string.
1026
+ */
1027
+ projectLocationDataStoreBranchDocumentPath(project, location, dataStore, branch, document) {
1028
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render({
1029
+ project: project,
1030
+ location: location,
1031
+ data_store: dataStore,
1032
+ branch: branch,
1033
+ document: document,
1034
+ });
1035
+ }
1036
+ /**
1037
+ * Parse the project from ProjectLocationDataStoreBranchDocument resource.
1038
+ *
1039
+ * @param {string} projectLocationDataStoreBranchDocumentName
1040
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1041
+ * @returns {string} A string representing the project.
1042
+ */
1043
+ matchProjectFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1044
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).project;
1045
+ }
1046
+ /**
1047
+ * Parse the location from ProjectLocationDataStoreBranchDocument resource.
1048
+ *
1049
+ * @param {string} projectLocationDataStoreBranchDocumentName
1050
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1051
+ * @returns {string} A string representing the location.
1052
+ */
1053
+ matchLocationFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1054
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).location;
1055
+ }
1056
+ /**
1057
+ * Parse the data_store from ProjectLocationDataStoreBranchDocument resource.
1058
+ *
1059
+ * @param {string} projectLocationDataStoreBranchDocumentName
1060
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1061
+ * @returns {string} A string representing the data_store.
1062
+ */
1063
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1064
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).data_store;
1065
+ }
1066
+ /**
1067
+ * Parse the branch from ProjectLocationDataStoreBranchDocument resource.
1068
+ *
1069
+ * @param {string} projectLocationDataStoreBranchDocumentName
1070
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1071
+ * @returns {string} A string representing the branch.
1072
+ */
1073
+ matchBranchFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1074
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).branch;
1075
+ }
1076
+ /**
1077
+ * Parse the document from ProjectLocationDataStoreBranchDocument resource.
1078
+ *
1079
+ * @param {string} projectLocationDataStoreBranchDocumentName
1080
+ * A fully-qualified path representing project_location_data_store_branch_document resource.
1081
+ * @returns {string} A string representing the document.
1082
+ */
1083
+ matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1084
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
1085
+ }
1086
+ /**
1087
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1088
+ *
1089
+ * @param {string} project
1090
+ * @param {string} location
1091
+ * @param {string} data_store
1092
+ * @param {string} conversation
1093
+ * @returns {string} Resource name string.
1094
+ */
1095
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1096
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1097
+ project: project,
1098
+ location: location,
1099
+ data_store: dataStore,
1100
+ conversation: conversation,
1101
+ });
1102
+ }
1103
+ /**
1104
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1105
+ *
1106
+ * @param {string} projectLocationDataStoreConversationName
1107
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1108
+ * @returns {string} A string representing the project.
1109
+ */
1110
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1111
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1112
+ }
1113
+ /**
1114
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1115
+ *
1116
+ * @param {string} projectLocationDataStoreConversationName
1117
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1118
+ * @returns {string} A string representing the location.
1119
+ */
1120
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1121
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1122
+ }
1123
+ /**
1124
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1125
+ *
1126
+ * @param {string} projectLocationDataStoreConversationName
1127
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1128
+ * @returns {string} A string representing the data_store.
1129
+ */
1130
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1131
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1132
+ }
1133
+ /**
1134
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1135
+ *
1136
+ * @param {string} projectLocationDataStoreConversationName
1137
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1138
+ * @returns {string} A string representing the conversation.
1139
+ */
1140
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1141
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1142
+ }
1143
+ /**
1144
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
1145
+ *
1146
+ * @param {string} project
1147
+ * @param {string} location
1148
+ * @param {string} data_store
1149
+ * @param {string} schema
1150
+ * @returns {string} Resource name string.
1151
+ */
1152
+ projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
1153
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
1154
+ project: project,
1155
+ location: location,
1156
+ data_store: dataStore,
1157
+ schema: schema,
1158
+ });
1159
+ }
1160
+ /**
1161
+ * Parse the project from ProjectLocationDataStoreSchema resource.
1162
+ *
1163
+ * @param {string} projectLocationDataStoreSchemaName
1164
+ * A fully-qualified path representing project_location_data_store_schema resource.
1165
+ * @returns {string} A string representing the project.
1166
+ */
1167
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1168
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
1169
+ }
1170
+ /**
1171
+ * Parse the location from ProjectLocationDataStoreSchema resource.
1172
+ *
1173
+ * @param {string} projectLocationDataStoreSchemaName
1174
+ * A fully-qualified path representing project_location_data_store_schema resource.
1175
+ * @returns {string} A string representing the location.
1176
+ */
1177
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1178
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
1179
+ }
1180
+ /**
1181
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
1182
+ *
1183
+ * @param {string} projectLocationDataStoreSchemaName
1184
+ * A fully-qualified path representing project_location_data_store_schema resource.
1185
+ * @returns {string} A string representing the data_store.
1186
+ */
1187
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1188
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
1189
+ }
1190
+ /**
1191
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
1192
+ *
1193
+ * @param {string} projectLocationDataStoreSchemaName
1194
+ * A fully-qualified path representing project_location_data_store_schema resource.
1195
+ * @returns {string} A string representing the schema.
1196
+ */
1197
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
1198
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
1199
+ }
1200
+ /**
1201
+ * Return a fully-qualified projectLocationDataStoreServingConfig resource name string.
1202
+ *
1203
+ * @param {string} project
1204
+ * @param {string} location
1205
+ * @param {string} data_store
1206
+ * @param {string} serving_config
1207
+ * @returns {string} Resource name string.
1208
+ */
1209
+ projectLocationDataStoreServingConfigPath(project, location, dataStore, servingConfig) {
1210
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render({
1211
+ project: project,
1212
+ location: location,
1213
+ data_store: dataStore,
1214
+ serving_config: servingConfig,
1215
+ });
1216
+ }
1217
+ /**
1218
+ * Parse the project from ProjectLocationDataStoreServingConfig resource.
1219
+ *
1220
+ * @param {string} projectLocationDataStoreServingConfigName
1221
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1222
+ * @returns {string} A string representing the project.
1223
+ */
1224
+ matchProjectFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1225
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).project;
1226
+ }
1227
+ /**
1228
+ * Parse the location from ProjectLocationDataStoreServingConfig resource.
1229
+ *
1230
+ * @param {string} projectLocationDataStoreServingConfigName
1231
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1232
+ * @returns {string} A string representing the location.
1233
+ */
1234
+ matchLocationFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1235
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).location;
1236
+ }
1237
+ /**
1238
+ * Parse the data_store from ProjectLocationDataStoreServingConfig resource.
1239
+ *
1240
+ * @param {string} projectLocationDataStoreServingConfigName
1241
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1242
+ * @returns {string} A string representing the data_store.
1243
+ */
1244
+ matchDataStoreFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1245
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).data_store;
1246
+ }
1247
+ /**
1248
+ * Parse the serving_config from ProjectLocationDataStoreServingConfig resource.
1249
+ *
1250
+ * @param {string} projectLocationDataStoreServingConfigName
1251
+ * A fully-qualified path representing project_location_data_store_serving_config resource.
1252
+ * @returns {string} A string representing the serving_config.
1253
+ */
1254
+ matchServingConfigFromProjectLocationDataStoreServingConfigName(projectLocationDataStoreServingConfigName) {
1255
+ return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match(projectLocationDataStoreServingConfigName).serving_config;
1256
+ }
1257
+ /**
1258
+ * Terminate the gRPC channel and close the client.
1259
+ *
1260
+ * The client will no longer be usable and all future behavior is undefined.
1261
+ * @returns {Promise} A promise that resolves when the client is closed.
1262
+ */
1263
+ close() {
1264
+ if (this.conversationalSearchServiceStub && !this._terminated) {
1265
+ return this.conversationalSearchServiceStub.then(stub => {
1266
+ this._terminated = true;
1267
+ stub.close();
1268
+ this.locationsClient.close();
1269
+ });
1270
+ }
1271
+ return Promise.resolve();
1272
+ }
1273
+ }
1274
+ exports.ConversationalSearchServiceClient = ConversationalSearchServiceClient;
1275
+ //# sourceMappingURL=conversational_search_service_client.js.map